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 | 1,888 | 4.21875 | 4 | [] | no_license | package Arrays;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class ArrayMethods {
public static void main(String[] args) {
int array1[]= {1,2,3};
int array2[]= {1,2,6};
array2=array1; //Copy one array to another. Refrence variable of array 1 starts pointin... |
Java | UTF-8 | 121 | 2.25 | 2 | [] | no_license | package com.designpatterns.abstractfactory.furniture;
public interface Sofa {
String getSize();
void lieOn();
}
|
C++ | GB18030 | 974 | 3.46875 | 3 | [] | no_license | #ifndef C532_H
#define C532_H
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
/*
*
*
*
* еǰһִں֣һԡһ飬Ե
* a[i] > a[j] i < j a[i] a[j] һԡ
*
* [2, 4, 1, 3, 5] У 3 (2, 1), (4, 1), (4, 3) 3
*/
class Solution {
public:
/*
* @param A: an array
* @return: total of reverse pairs
*/
long... |
Java | UTF-8 | 2,970 | 2.28125 | 2 | [] | no_license | package com.jidea.code.support.logging;
import org.omg.CORBA.UNSUPPORTED_POLICY;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.spi.LocationAwareLogger;
/**
* SLF4J
*
* @author:Just
* @create:2016-11-12 10:56
*/
public class SLF4JImpl implements Log {
private static final String ca... |
Java | UTF-8 | 844 | 2.265625 | 2 | [] | no_license | package org.httpRemoteDesktop;
import java.io.IOException;
import java.io.OutputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ScreenShotServlet extends HttpServl... |
Markdown | UTF-8 | 1,347 | 2.625 | 3 | [
"MIT"
] | permissive | ---
title: Lesson 5
layout: post
author: shalom.kashyap
permalink: /lesson-5/
source-id: 1QJf3edY8QGcupmqbsV5KZEaZUsCNLXFwlGeDvMEE3Ds
published: true
---
Specific
Measureable
Achievable
Realistic
Timely
<table>
<tr>
<td>Title</td>
<td>Lesson 5</td>
<td>Date</td>
<td>02/02/17</td>
</tr>
</table... |
PHP | ISO-8859-1 | 3,336 | 3.015625 | 3 | [] | no_license | <?php
/**
* @package Calendar
* @class StandardCalendarController
* @author Jimmy CHARLEBOIS
* @date 04-01-2007
* @brief Contrleur standard de calendrier
*/
System::import( 'System.MVC.AbstractController' );
class StandardCalendarController extends AbstractContr... |
Python | UTF-8 | 318 | 2.71875 | 3 | [] | no_license | # Runs on Leetcode
# Runtime - O(nlogn)
# space - O(1)
class Solution(object):
def arrayPairSum(self, nums):
if not nums:
return
nums.sort()
n=0
for i in range(0,len(nums),2):
n+=min(nums[i],nums[i+1])
# print(n)
return n
|
TypeScript | UTF-8 | 229 | 2.578125 | 3 | [] | no_license | enum UserStatus {
user = "user",
moderator = "moderator",
admin = "admin"
}
export interface IUser {
_id: string;
nickname: string;
email: string;
avatar: { url: string; publicId: string };
status: UserStatus;
}
|
Java | UTF-8 | 716 | 2.046875 | 2 | [] | no_license | package eu.ydp.empiria.player.client.controller.item;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import eu.ydp.empiria.player.client.controller.communication.ItemData;
import eu.ydp.empiria.player.client.controller.data.DataSourceManager;
import eu.ydp.empir... |
Java | UTF-8 | 1,448 | 2.578125 | 3 | [] | no_license | package ht.com.prison.management.incarcerationservice.dao;
import ht.com.prison.management.incarcerationservice.model.Prisonier;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax... |
Python | UTF-8 | 4,462 | 2.6875 | 3 | [
"Apache-2.0",
"MIT",
"Unlicense",
"BSL-1.0",
"NCSA",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause",
"OFL-1.0",
"BSD-2-Clause-Views",
"Zlib"
] | permissive | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
C | UTF-8 | 5,232 | 3.390625 | 3 | [] | no_license | /*
* A parameter reader for multiple values.
* Parameters will be store in a list as <key, [values]>
* @Author Adam Ho
*
* Usage example:
*
* param_slist_t *list = (param_slist_t*) malloc(sizeof(param_slist_t));
* param_s_t *curr = NULL;
* val_t *temp = NULL;
* read_param_file("../parameters/list_agent.txt"... |
Markdown | UTF-8 | 1,968 | 2.625 | 3 | [
"MIT"
] | permissive | # HTML-CSS-Capstone
This is the Microverse capstone project of HTML & CSS Module.
I have built a responsive pet shop inspired by electronic shop.
Desgin idea by [Mohammed Awad](https://www.behance.net/gallery/24796463/ZATTIX)
The project consist of two pages:
-Home page
-Search page
## Video preview
[![Watch the vid... |
PHP | UTF-8 | 3,416 | 2.625 | 3 | [] | no_license | <?php
namespace CsrDelft\service\security;
use CsrDelft\entity\security\enum\RemoteLoginStatus;
use CsrDelft\repository\security\RemoteLoginRepository;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
... |
PHP | UTF-8 | 3,120 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Customer;
class PastDataController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [];
... |
Java | UTF-8 | 657 | 2.046875 | 2 | [] | no_license | package com.atyukavkin.football.service;
import com.atyukavkin.football.dao.TeamDao;
import com.atyukavkin.football.model.Team;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by Andrey Tyukavkin.
*/
@Service
public ... |
Python | UTF-8 | 1,307 | 3.484375 | 3 | [] | no_license | """
018. 4Sum
@name: li jin
@date: Mar 02, 2016
@link: https://leetcode.com/problems/4sum/
@time: 120 ms
"""
class Solution(object):
def fourSum(self, nums, target):
nums.sort()
n = len(nums)
ans = []
for i in xrange(n-3):
if i and nums[i] == nums[i-1]... |
Java | UTF-8 | 1,225 | 2.546875 | 3 | [] | no_license | package com.newgen.commons.model;
/**
* @author Jalo Deng
* @email 651379728@qq.com
* @date 2019-04-25 09:59
*/
public class Result {
private Integer ret;
private String msg;
private Object data;
private Integer total;
public Result() {}
/**
* 返回结果集
* @param ret 1:成功,0:失败/已存在
* @param msg 信息... |
Java | UTF-8 | 4,457 | 2.078125 | 2 | [] | no_license | package czsem.gate.tectomt;
import gate.AnnotationSet;
import gate.Document;
import gate.util.InvalidOffsetException;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import... |
Markdown | UTF-8 | 24,314 | 3.25 | 3 | [] | no_license | ### Use of classical and machine learning data science methods for improved prediction of migration in relation to climate change throughout Africa
by Justin Maynard April 5, 2020
### Introduction
Data science can be used to understand and measure climate change as a determinant of migration in Afric... |
Python | UTF-8 | 2,267 | 2.703125 | 3 | [] | no_license | import json
import requests
import sys
assert sys.version_info >= (3, 5) # make sure we have Python 3.5+
from zipfile import ZipFile
from pyspark.sql import SparkSession, types
from io import *
import pandas as pd
from urllib.request import *
spark = SparkSession.builder.appName('Load Consumer Price Index Data').getOrC... |
C++ | UTF-8 | 2,835 | 3.546875 | 4 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
bool isScramble(string s1, string s2) {
if(s1 == s2) return true;
if(s1.size() != s2.size()) return false;
int n = s1.size();
vector<vector<vector<int>>> f(n, vector<vector<int>>(n, vector<int>(n+1, 0)));
// 先处理长度为 1... |
Python | UTF-8 | 198 | 3.171875 | 3 | [] | no_license | t=int(input())
N=int(input())
k=0
while N:
if(N%2==0):
N=N/2
else:
N=3*N+1
if(N==t):
k=1
break
if(k==1):
print("YES")
else:
print("NO")
|
Python | UTF-8 | 667 | 4.8125 | 5 | [] | no_license | """
Ask the user for a string and print out whether this string is a palindrome or not.
(A palindrome is a string that reads the same forwards and backwards.)
"""
word = input("Please enter a word : ")
# solution 1
reversed_word = word[::-1]
print(reversed_word)
if word == reversed_word:
print("The word you ent... |
C# | UTF-8 | 4,351 | 2.9375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
namespace com.continental.TDM.HelperLibrary
{
/// <summary>
/// A class that can be used as a result. Can be positive (okay) or negative (fail).
/// If failed a error code != 0 (see H... |
C# | UTF-8 | 730 | 2.734375 | 3 | [
"MIT"
] | permissive | namespace WSF.Shell.Interop.Dlls
{
using System;
using System.Runtime.InteropServices;
internal partial class NativeMethods
{
/// <summary>
/// Destroys an icon and frees any memory the icon occupied.
/// </summary>
/// <param name="hIcon">Handle to the icon to be destr... |
Python | UTF-8 | 2,514 | 3.5 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env python
class mpretty:
"""turn numbers into easy to read abbreviations"""
def __init__(self, number):
"""Return a mprettifier object and set number to number"""
self.number = number
self.mod_table = [
{ "length":6, 'modifier':'M'},
{ "length":9, '... |
JavaScript | UTF-8 | 6,532 | 3.234375 | 3 | [] | no_license | const _catname = ['image', 'audio', 'text', 'json', 'xml'];
const _catlu = {};
for (let i = 0; i < _catname.length; i += 1) {
_catlu[_catname[i]] = true;
}
// Each load invocation creates a bundle. A bundle
// keeps track of the callback function, which URLs
// to process, and how many assets have been received.
//... |
Markdown | UTF-8 | 5,478 | 3.4375 | 3 | [] | no_license | ---
title: Asking for information
description: Asking for information documentation.
---
## Introduction
Asking for information plays a key part in our customers’ experience with British Gas. All functional journeys include elements of data capture and asking a customer to make a choice. Grouping questions, informati... |
C | UTF-8 | 2,024 | 2.625 | 3 | [] | no_license |
#include <math.h>
#define NRANSI
#include "nrutil.h"
#define ROTATE(a,i,j,k,l) g=a[i][j];h=a[k][l];a[i][j]=g-s*(h+g*tau);\
a[k][l]=h+s*(g-h*tau);
void jacobi(float **a, int n, float d[], float **v, int *nrot)
{
int j, iq, ip, i;
float tresh, theta, tau, t, sm, s, h, g, c, *b, *z;
b = vector(1, n);
z = vector(1,... |
Java | UTF-8 | 681 | 2.109375 | 2 | [] | no_license | package com.tecacet.sardine.booking.component;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitMessagingTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import lombok.RequiredArgsConstructor;
@Component
@Requi... |
Markdown | UTF-8 | 3,392 | 3.15625 | 3 | [] | no_license | ---
# title: "Cloning a Starter Project"
layout: default
---
Cloning a git repository creates a local copy of the repository where you can make changes to the source code. It maintains a link back to the repository it was cloned from, and you can push/pull code from that repository. This is a very typical use-case f... |
Shell | UTF-8 | 930 | 3.125 | 3 | [] | no_license | #! /bin/bash
echo "===== Updating from SVN ====="
svn update
echo
svn info >rev.txt
grep Revision: rev.txt > rev1.txt
VER=$(egrep -o [[:digit:]]* rev1.txt)
let "VER+=1"
rm rev.txt
rm rev1.txt
echo "===== GENERATING VERSION STAMP ====="
echo "//Automatically generated file - do not edit"
echo "#define DATE_STR \"`da... |
C | UTF-8 | 1,257 | 3.03125 | 3 | [] | no_license | /*
* This file implements functions for
* - handling of instructions of type om
*/
#include <stdio.h>
#include "../inc/msg.h"
#include "../inc/output.h"
#include "../inc/check.h"
#include "../inc/global.h"
/*
* outputs instruction to output for instructions width om instruction type
* opcode: opcode of instruct... |
Ruby | UTF-8 | 2,444 | 3.15625 | 3 | [] | no_license | #To Generate this file do:
# rails g cancan:ability
class Ability
include CanCan::Ability #All the methods use the cancan ability will be part of this class.
def initialize(user) #this will be the current user when running the block.
#Inside 👍🏼 of this method, "user" is the "current_user"
#To use canca... |
Rust | UTF-8 | 4,907 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-mit-taylor-variant"
] | permissive | // Copyright 2015 Brian Smith.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL... |
Swift | UTF-8 | 4,910 | 2.609375 | 3 | [
"MIT"
] | permissive | //
// LatexView.swift
//
// Created by Alfred Gao on 20210408.
import SwiftUI
import WebKit
public struct LatexView: UIViewRepresentable {
@Binding var latex: String
@Binding var height: CGFloat?
var css: String
public init(_ latex:Binding<String>, height: Binding<CGFloat?> = Binding.... |
JavaScript | UTF-8 | 13,697 | 2.96875 | 3 | [
"CC-BY-4.0"
] | permissive | 'use strict'
/*
description PROJECT: Validate the number of a credit card based on specified ruleset
code revision #6
*/
function runProjectccNumberValidator() {
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
// ... |
C# | UTF-8 | 7,013 | 2.828125 | 3 | [] | no_license | namespace FacturaDLL
{
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.IO;
public class FileIO
{
private string[] _datos;
private StreamWriter escritor;
private StreamReader lector;
private string path;
private ushort pos... |
Markdown | UTF-8 | 2,905 | 2.578125 | 3 | [] | no_license | # Resource Links
These resources are also linked from individual challenges. If you find a resource that is missing, or one that is here but not useful, submit a pull request or an issue on github. If you find yourself wanting to email a cool link to your cohort - check if it is here first and if not, add it!
## Ru... |
Python | UTF-8 | 811 | 3.234375 | 3 | [
"MIT"
] | permissive | # pylint: disable=missing-docstring
def rev_range(size):
return range(size-1, -1, -1)
def rev_dict(dictionary):
return {v: k for k, v in dictionary.items()}
def bits_to_byte(bits):
byte = 0
for pos, value in enumerate(reversed(bits)):
if value == 1:
byte = (1 << pos) | byte
... |
Ruby | UTF-8 | 1,133 | 2.75 | 3 | [
"MIT"
] | permissive | require_relative './github_to_trello/github_gateway'
require_relative './github_to_trello/trello_gateway'
require 'octokit'
require 'trello'
class GithubToTrello
def initialize(options)
[:public_key, :token, :board_id, :repo_name].each do |required_field|
_raise_argument_error(required_field) unless optio... |
C | UTF-8 | 24,239 | 3.5 | 4 | [] | no_license |
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <climits>
#include <cfloat>
using namespace std;
/**********************************************************/
/******** GLOBAL TYPES, CONSTANTS, AND VARIABLES **********/
/**********************************************************/
// d... |
JavaScript | UTF-8 | 929 | 2.875 | 3 | [] | no_license | app.get("/login", function (request, response) {
// Give a simple login form
str = `
<body>
<form action="" method="POST">
<input type="text" name="username" size="40" placeholder="enter username" ><br />
<input type="password" name="password" size="40" placeholder="enter password"><br />
<input typ... |
C# | UTF-8 | 289 | 3.171875 | 3 | [] | no_license | using System.Text;
namespace CSharpStudy
{
static class StringExtensions
{
public static string Repeat(this string str, int count)
{
var builder = new StringBuilder();
for(var i = 0; i < count; i++)
{
builder.Append(str);
}
return builder.ToString();
}
}
}
|
Java | UTF-8 | 546 | 3.125 | 3 | [] | no_license | package com.yosemei.Assert;
/**
* Created by root on 9/18/15.
*/
public class AssertFoo {
public static void main(String[] args) {
// 断言1结果为true,则继续往下执行
assert true;
System.out.println("断言1没有问题,Go !");
System.out.println("\n------------------\n");
// 断言2结果为false,程序终止
... |
Java | UTF-8 | 371 | 1.710938 | 2 | [] | no_license | package com.monitoratec.tokenservice.vtswalletservice.domain.payload.input.base;
import lombok.Data;
import javax.validation.constraints.NotBlank;
public @Data class BasePayload {
@NotBlank(message = "API Key should not be empty/null")
private String apiKey;
@NotBlank(message = "Shared Secret should not ... |
SQL | UTF-8 | 563 | 4.15625 | 4 | [] | no_license | -- Question: Which state has the highest per capita individual contribution to primary elections?
--replace this with your query
SELECT total_cont.STATE, total_cont.TOTAL_AMT,
total_cont.TOTAL_AMT / state_pop.TOTAL_POP as PER_CAPITA_DONATION
from (
select STATE, sum(TRANSACTION_AMT) as TOTAL_AMT
from indiv_co... |
Java | UTF-8 | 715 | 2.21875 | 2 | [] | no_license | package javasScriptExecutor;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class JsBorder {
public static void main(S... |
Python | UTF-8 | 3,881 | 3.21875 | 3 | [] | no_license | import urllib.request
import json
import itertools
import time
import pathlib
import datetime
"""
投稿者の記事とそれに紐づくコメントをJSON形式で取得し、ファイルとして保存します。
記事の保存先: ${timesatmp}/item/${id}.json
コメントの保存先: ${timesatmp}/comment/${id}.json
ここではQiita APIを利用します。Qiita APIについては以下を参照すること: https://qiita.com/api/v2/docs
"""
def f... |
Java | UTF-8 | 766 | 2.25 | 2 | [] | no_license | package cn.stylefeng.guns.core.api;
import java.io.Serializable;
/**
* API 返回结果集基础封装对象
* @author SHF
* @version 创建时间:2018年12月27日 下午1:49:08
* @param <T>
*/
public class ResultBaseEntity<T> implements Serializable{
private static final long serialVersionUID = 1L;
private Integer code;
private String mess... |
Ruby | UTF-8 | 1,807 | 2.546875 | 3 | [] | no_license | # $Id$
$:.unshift File.join(File.dirname(__FILE__), "../..", "lib")
require 'test/unit'
require 'racket'
class TestLV < Test::Unit::TestCase
def test_init
assert_nothing_raised() { Racket::Misc::LV.new(2) }
assert_nothing_raised() { Racket::Misc::LV.new(2,4,1,1,6) }
end
def test_decode
t1 = Racke... |
Markdown | UTF-8 | 6,939 | 2.984375 | 3 | [
"MIT"
] | permissive | ---
theme : "moon"
highlightTheme : "monokai"
---
<style>
.reveal .slides {
zoom: 1 !important;
height: auto !important;
}
.reveal .slides section {
top: 50% !important;
transform: translateY(-50%) !important;
zoom: 0.75 !important;
}
.reveal pre {
... |
PHP | UTF-8 | 227 | 2.8125 | 3 | [] | no_license | <?php
/**
*
*/
class Cliente extends Persona
{
function Cliente($nombre, $apellido, $correo, $fecha_nac, $telefono){
$this->Persona($nombre, $apellido, $correo, $fecha_nac, $telefono);
}
}
?>
|
JavaScript | UTF-8 | 4,092 | 2.5625 | 3 | [] | no_license | import React, {useState} from 'react';
import Modal from "react-bootstrap/Modal";
import ModalBody from "react-bootstrap/ModalBody";
import ModalHeader from "react-bootstrap/ModalHeader";
import ModalFooter from "react-bootstrap/ModalFooter";
import ModalTitle from "react-bootstrap/ModalTitle";
import Button from 're... |
PHP | UTF-8 | 3,061 | 2.625 | 3 | [] | no_license | <?php
/**
* Se inicia la sesion del usuario
* Se llama al controlador principal
*/
@session_start();
require_once "app/controllers/controller.php";
$loginE = "";
/**
* Se realiza una condición para recibir los datos del formulario
* Se compara con los registro existentes para el inicio de sesion
*/
if (!empty($_P... |
Python | UTF-8 | 2,753 | 2.828125 | 3 | [] | no_license | import tensorflow as tf
from tensorflow.keras.layers import Conv2D, Conv2DTranspose, MaxPooling2D, UpSampling2D, Dropout, Input, Concatenate, BatchNormalization
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
def down_conv(tensor, n_filters, size, padding = 'same', initializer = ... |
C | UTF-8 | 2,229 | 2.859375 | 3 | [] | no_license | // Authors - Tomer Segal 207133646, Nadav Nave 209365725
// Exercise 4 in the Course Introduction to system programming
// This file include all the main functions of the client
#pragma once
#ifndef __CLIENTMAINFUNCTIONS_H__
#define __CLENTMAINFUNCTIONS_H__
#include "ThreadFunctions.h"
#include "SharedHardCodedData.h... |
Python | UTF-8 | 10,647 | 3.078125 | 3 | [] | no_license | Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: /home/user/RTR105/montercarlo.py =================
========================
Random Number Generation
========================
================... |
Markdown | UTF-8 | 1,807 | 3.140625 | 3 | [] | no_license | # Proposal feedback
#What is the project
The way I look at the project there are two threats that location spoofing enables:
1. You can learn about people nearby where you really are not (e.g., you're in Boston, see people in Los Angeles)
1. The second aspect is, the "people nearby" feature might (a) give you no lo... |
Markdown | UTF-8 | 3,300 | 2.6875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Avoid BBM"
---
[BBM](http://www.bbm.com/) was never slated to be a part of my [secure mobile messaging comparison][1]. But the [recent release of BBM 2.0](http://blogs.blackberry.com/2014/02/bbm-2-update/) revealed that there are far too many people who still consider it to be secure. This is a... |
Java | UTF-8 | 277 | 2.359375 | 2 | [] | no_license | package com.travelmaker.dto.enumeration;
/**
* <p>유저의 권한을 나타내는 enum
* <p>A, U 두가지 속성이 존재함
* @author 김선일
*
*/
public enum Authority {
/**
* 관리자 권한 (Admin)
*/
A,
/**
* 일반 사용자 권한 (User)
*/
U
}
|
PHP | UTF-8 | 1,478 | 2.625 | 3 | [] | no_license | <?
include("conexion.php");
$nombre = $_GET['id'];
if($nombre!=''){
$consulta = mysql_query("SELECT * FROM " .$nombre);
$haber = mysql_query("SELECT * FROM ".$nombre." WHERE TIPO='haber' ORDER BY FECHA");
$debe = mysql_query("SELECT * FROM ".$nombre." WHERE TIPO='debe' ORDER BY FECHA");
echo "<table class='... |
Markdown | UTF-8 | 2,904 | 2.609375 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"MIT",
"BSD-2-Clause"
] | permissive | [§2] (rfc pem) - PEM format library {#rfc.pem}
-------------
###### [!Library] `(rfc pem)`
This library provides PEM format file parser.
Currently only supports RFC 1421 format.
### [§3] Conditions
This library defines these conditions.
###### [!Condition Type] `&pem-error`
Super condition of all PEM file pr... |
Python | UTF-8 | 1,021 | 2.71875 | 3 | [] | no_license | from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.contrib.auth import get_user_model
from django.db.models import Q
def username_exist_validator(val):
"""
Help to determine is exist user with specific username or email.
"""
try:
ge... |
C++ | UTF-8 | 5,158 | 3.15625 | 3 | [] | no_license | // TODO: vector processor
// fast inverse square root
#ifndef __VECTOR2_H__
#define __VECTOR2_H__ 1
#include <math.h>
#include "math_utils.h"
class Vector2 {
public:
inline Vector2();
inline Vector2(float x, float y);
inline Vector2(const Vector2& copy);
inline ~Vector2();
inlin... |
C | UTF-8 | 1,241 | 2.875 | 3 | [] | no_license | #ifndef _WC_WHEELMOVEMENT_H_
#define _WC_WHEELMOVEMENT_H_
#include <wc/Error.h>
/**
* \defgroup wcWheelMovement Wheel movement
* \brief A structure representing wheel movements.
* @{
*/
/// A wheel movement.
typedef struct
{
unsigned int index; ///< Channel index.
int increments; ///< The number of incre... |
Python | UTF-8 | 7,207 | 2.65625 | 3 | [] | no_license | from django.test import TestCase
from game.models import Board, UnallowedError
from game.views import _AI_move_random
from django.test import Client, LiveServerTestCase
from selenium import webdriver
from django.core.urlresolvers import reverse
import json
import os
from time import sleep
class MakeMoveTest(TestCase)... |
C++ | UTF-8 | 4,303 | 3.171875 | 3 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <time.h>
using namespace std;
class Graph
{
private:
int** matrix;
public:
int N;
int edges;
~Graph() {
for (int i = 0; i < N; ++i)
... |
Java | UTF-8 | 3,771 | 2.734375 | 3 | [] | no_license | package sickomode;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Hashtable;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.even... |
C++ | UTF-8 | 298 | 2.703125 | 3 | [
"MIT"
] | permissive | class Solution {
public:
bool containsDuplicate(vector<int>& nums) {
unordered_set<int> table;
for (int num : nums) {
if (table.count(num)) {
return true;
}
table.insert(num);
}
return false;
}
};
|
PHP | UTF-8 | 536 | 3.15625 | 3 | [] | no_license | <?php
class PDOConnectionFactory{
private $dsn = 'mysql:host=localhost;dbname=savant';
private $user = 'root';
private $password = '';
private $conn = null;
public function criaConexao(){
try {
$this->conn = new PDO($this->dsn, $this->user, $this->password);
$this->conn->setAttribute(PDO::ATTR_ER... |
TypeScript | UTF-8 | 2,581 | 2.796875 | 3 | [] | no_license | import { createFigma } from 'figma-api-stub'
import { getRealtivePosition } from '../src'
const GAP = 50
const figma = createFigma({})
const pageNode = figma.createPage()
const frameNode1 = figma.createFrame()
const frameNode2 = figma.createFrame()
const frameNode3 = figma.createFrame()
const frameNode4 = figma.create... |
Python | UTF-8 | 6,184 | 2.65625 | 3 | [] | no_license | import os
import json
import pickle
from collections import defaultdict
from typing import Dict, Any, DefaultDict, Union, Tuple
from utility_functions import get_config, get_cmd_args, prep_output_dir
from indexing import Indexer
from frequency_analysis import FreqAnalyzer
from embeddings import get_emb
from document_em... |
Shell | UTF-8 | 101 | 2.53125 | 3 | [] | no_license | #!/bin/bash
for i in {1..10}
do
echo "$i,$(curl -s "http://$3:$(($2+$i))/keys/number")"
sleep 1
done
|
Markdown | UTF-8 | 1,329 | 3.328125 | 3 | [
"CC0-1.0"
] | permissive | # Test format: Verify KZG proof
Verify the KZG proof for a given `blob` and an evaluation point `z` that claims to result in a value of `y`.
## Test case format
The test data is declared in a `data.yaml` file:
```yaml
input:
commitment: KZGCommitment -- the KZG commitment to the data blob
z: Bytes32 -- bytes en... |
SQL | UTF-8 | 632 | 3.296875 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE build_fenwick() BEGIN
DECLARE twos INT;
SET @c:=1;
SELECT COUNT(*) INTO @top FROM entries;
PREPARE query FROM "SELECT (@sum:=@sum+fenwick) INTO @x FROM entries WHERE id=?";
PREPARE query2 FROM "UPDATE entries SET fenwick=@sum WHERE id=?";
PREPARE query3 FROM "SELECT weight INTO @su... |
C | UTF-8 | 253 | 3.828125 | 4 | [] | no_license | #include<stdio.h>
int DigitPrinter(int num) {
int digit;
while(num >= 10) {
digit = num % 10;
printf("%d ",digit);
num = num / 10;
}
return digit;
}
int main() {
int num = 12345;
int l_digit = DigitPrinter(num);
printf("%d\n",l_digit);
}
|
Markdown | UTF-8 | 1,958 | 2.859375 | 3 | [
"MIT"
] | permissive |
# cryptii
[](LICENSE.md)
Cryptii is a web app where you can encode and decode content between different formats. This happens fully in your browser using JavaScript, no content will be sent to any kind of server. Please note that the encryption methods... |
Java | UTF-8 | 1,657 | 3.234375 | 3 | [] | no_license | package it.polito.oma.etp.solver;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
public class TabuList {
private int size,
maxSize;
private LinkedList<Neighbor> tabuList;
public TabuList(int initialSize, int maxSize) {
size = initialSize;
this.maxSize = maxSize;
tabu... |
Python | UTF-8 | 11,518 | 2.609375 | 3 | [
"MIT"
] | permissive | # Copyright 2015 Matthieu Courbariaux
# This file is part of BinaryConnect.
# BinaryConnect is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... |
C++ | UTF-8 | 5,843 | 3.0625 | 3 | [] | no_license | // soluzione di B.Cosentino
#include<iostream>
using namespace std;
// PRE = (C è costituita da n>=0 sottosequenze di interi, ciascuna terminante con -1 e la fine delle sottosequenze è segnata da -2, X ha almeno 2*n elementi) & (lim=0)
void IC(int C[], int X[], int &lim){
int start=0; // variabile per l'inizio dell... |
C++ | SHIFT_JIS | 1,421 | 2.71875 | 3 | [] | no_license | #pragma once
#include <core/type.h>
#include <win/Rect.h>
#include <common/chase_value.h>
namespace game
{
class Texture;
}
namespace core
{
/**
* wiC[
*
* ̃NX́AЂƂ̔wieNX`ێAړE]Egk̊ȈՃAj[V@\ĂB
*/
class BgSpriteLayer
{
public:
using Texture = game::Texture;
private:
const stri... |
C | UTF-8 | 776 | 2.78125 | 3 | [] | no_license | #include<stdio.h>
#include<conio.h>
#include<string.h>
#include<fstream.h>
int main(int argc,char*argv[])
{
printf("Numbers of arguements = %d",argc);
int line_no;
char *in_file = argv[1];
FILE *input_file = fopen(in_file,"r");
char out_file[100];
strcpy(out_file,argv[1]);
strcat(out_file,... |
C++ | UTF-8 | 1,510 | 3.0625 | 3 | [] | no_license | #include "FoodDataBase.h"
void FoodExtra::print(vector<string>* types, int name_size, int type_size, int weight_size, int count_size, int date_size, int price_size)
{
Food::print(types, name_size, type_size, weight_size, count_size, date_size, price_size);
cout.width(date_size);
Date* t_date = saleDate;
cout << t... |
TypeScript | UTF-8 | 1,804 | 2.65625 | 3 | [] | no_license | import { Component, OnInit, Inject } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { LoginAuthServiceService } from '../service/login-auth-service.service';
import { SESSION_STORAGE, WebStorageService } from 'angular-webstorag... |
PHP | UTF-8 | 3,417 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Book;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class BookController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$books = Bo... |
C# | UTF-8 | 2,107 | 2.640625 | 3 | [
"MIT"
] | permissive | using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using LineBotNet.Core.ApiClient;
using LineBotNet.Core.Data;
using LineBotNet.Core.Data.SendingMessageContents;
using Microsoft.Azure.WebJobs;
using Newtonsoft.Json;
namespace LineBotMessageWebJob
{
public class Functions
{
... |
Java | UTF-8 | 8,354 | 1.757813 | 2 | [] | no_license | package com.apps;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import androi... |
Java | UTF-8 | 2,354 | 3.375 | 3 | [] | no_license | class GarageDoor {
private Motor motor;
private DoorState currentState;
GarageDoor() {
this.motor = new Motor();
this.currentState = new Closed();
}
void openDoor() {
currentState.openDoor();
}
void closeDoor(){
currentState.closeDoor();
}
void stop... |
Python | UTF-8 | 140 | 2.859375 | 3 | [] | no_license | import time
def print_time(func, params):
st = time.time()
result = func(*params)
end = time.time()
print end - st, result
|
PHP | UTF-8 | 1,713 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Adyen Checkout Example (https://www.adyen.com/)
* Copyright (c) 2019 Adyen BV (https://www.adyen.com/)
* /originKeys Documentation: https://docs.adyen.com/api-explorer/#/CheckoutUtility/v1/originKeys
*/
function getOriginKey() {
$apikey = getenv('CHECKOUT_APIKEY');
$merchantAccount = getenv('MER... |
TypeScript | UTF-8 | 2,580 | 2.625 | 3 | [] | no_license | import { map, tap } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
export interface Token {
token: string
}
export enum Permission {
AccessExtended,
OtherPermission
}
export interface Toke... |
Python | UTF-8 | 821 | 3.3125 | 3 | [] | no_license |
t=int(input())
'''
for T in range(t):
x=int(input())
arr=list(map(int,input().split()))
arr1 = arr[:int(x / 2) - 1:-1]
arr2 = arr[:int(x / 2):]
arr3=[]
if len(arr)%2==0:
for i in range(len(arr1)):
arr3.append(arr1[i])
arr3.append(arr2[i])
else:
for i ... |
JavaScript | UTF-8 | 3,520 | 4.375 | 4 | [
"MIT"
] | permissive | // JavaScript Olympics
// I paired with Timur on this challenge.
// This challenge took me 2 hours.
// Warm Up
// Bulk Up
// Pseudocode
// ITERATE through array
// Add win property, defined as anonymous function that references that elements name and event
function athletes(arrAthletes){
arrAthletes.forEac... |
C# | UTF-8 | 664 | 2.609375 | 3 | [] | no_license | using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Johnson
{
[TestClass]
public class InitialPresenterTest
{
[TestMethod]
public void ShouldCallGenerateView()
{
InitialViewDummy view = new InitialViewDummy();
InitialPresenter presenter = new Initi... |
C | UTF-8 | 1,057 | 3.75 | 4 | [] | no_license |
/* Fig.9.20 C program to find connected components */
#include <stdio.h>
#include <stdlib.h>
#define MAX 13
typedef int NODE;
typedef struct EDGE *EDGELIST;
struct EDGE {
NODE node1, node2;
EDGELIST next;
};
typedef struct TREENODE *TREE;
struct TREENODE {
int height;
TREE parent;
};
TREE find(... |
Python | UTF-8 | 4,525 | 2.625 | 3 | [] | no_license | import os
from flask import Flask, request, jsonify, abort
from sqlalchemy import exc
import json
from flask_cors import CORS
from .database.models import db_drop_and_create_all, setup_db, Drink
from .auth.auth import AuthError, requires_auth
app = Flask(__name__)
setup_db(app)
CORS(app)
# db_drop_and_create_all()
... |
Markdown | UTF-8 | 6,705 | 2.765625 | 3 | [
"MIT"
] | permissive | +++
date = "2018-05-05T17:56:30+09:00"
title = "移動力と地形コスト"
banner = "green"
categories = ["コラム"]
+++
# はじめに
みなさん、斥候は好きですか?
移動力2の彼らは、迅速な探索に、偵察に、となくてはならない存在ですよね。
でも、丘・森・道路・ヘリコプターなどが複雑に絡んでくると
いったいユニットってどこまで移動できるのかよくわからなくなりがちです。
今回はそんなユニットの移動についてのお話です。
<!--more-->
# 移動力
みなさんご存知移動力。足のマークで表記されているあれです。
ユニットごとに固定です。一応大将軍を合成... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.