language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,178 | 2.59375 | 3 | [
"MIT"
] | permissive | # Apache Conf - Catch Suspecious Requests
Apache server config for catching suspecious requests.
Analyzes incoming request data (Request URI, User Agent, etc) for pre-defined patterns of suspecious activity.
Requests deemed suspecious are stopped from being processed and a standard response is given (by default, a p... |
Python | UTF-8 | 1,471 | 2.90625 | 3 | [] | no_license | from django import template
import datetime
register = template.Library()
@register.filter
def is_selected(value, page_name):
"""custom django filter to check and apply extra style if currently viewed
page is selected from navigation
Usage:
{{ "link_on_navigation_name"|is_selected:current_pag... |
JavaScript | UTF-8 | 1,811 | 3.671875 | 4 | [] | no_license | // {
// firstname: 'Mollie'
// lastname: 'Smith'
// age: 27
// }
// user1.age
// var weddinglist = [
// 'old',
// 'new',
// 'borrowed',
// 'blue',
// ]
// console.log(weddinglist[2]);
// var userlist[
// user1 user2
// ]
// console.log(userlist[1].firstname);
var addressbook = [{... |
Java | UTF-8 | 81 | 1.789063 | 2 | [] | no_license | package enums;
public enum Status {
TODO,PROGRESS,BLOCKED,IN_REVIEW,DONE
}
|
SQL | UTF-8 | 650 | 2.71875 | 3 | [] | no_license | -- create table SQL statements demo
--
-- usage:
-- $ ucasdb ./01_create.sql
-- correct statement --
create table crtDemo (id int, name varchar);
-- wrong statements --
-- 0. table existed --
create table crtDemo (id int, name varchar);
-- 1. miss field name --
create table crtWrong... |
Java | UTF-8 | 7,863 | 2.0625 | 2 | [] | no_license | package com.cardmax.base.Chat;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import andro... |
Python | UTF-8 | 125 | 3.65625 | 4 | [] | no_license | amount=int(input('Enter the price: '))
def price(amount):
discount= 0.1*amount
print (amount-discount)
price(amount)
|
Java | UTF-8 | 6,636 | 2.15625 | 2 | [] | no_license | package com.wmall.wechat.service;
import com.alibaba.fastjson.JSON;
import com.wmall.config.WechatInfoConfig;
import com.wmall.utils.HttpUtil;
import com.wmall.wechat.enums.WeChatConstant;
import com.wmall.wechat.pojo.*;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.util.http.URIUtil;
import org.ap... |
JavaScript | UTF-8 | 1,125 | 2.515625 | 3 | [
"MIT"
] | permissive | import React from 'react';
import axios from 'axios';
import StripeCheckout from 'react-stripe-checkout';
import STRIPE_PUBLISHABLE from './constants/stripe';
import PAYMENT_SERVER_URL from './constants/server';
// checkout component uses teh stripeCheckout that comes from the library installed. It receives personal ... |
C | UTF-8 | 154 | 3.0625 | 3 | [] | no_license | #include <stdio.h>
#define PI 3.1415927
int main()
{
double a;
while(scanf("%lf",&a)!=EOF)
{
printf("%.3f\n",4*PI*a*a*a/3);
}
return 0;
}
|
Markdown | UTF-8 | 2,096 | 2.546875 | 3 | [] | no_license | # Reinforcement Learning
This is a repo containing explanations and implementations of the following Reinforcement Learning algorithms. Note that, if you want to see the notebooks clearly (with LaTeX and stuff) you need to clone the repo.
* ```git clone git@github.com:ceteke/RL.git```
* ```cd RL```
* ```jupyter n... |
C++ | UTF-8 | 11,694 | 2.625 | 3 | [] | no_license | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#inc... |
JavaScript | UTF-8 | 241 | 2.828125 | 3 | [] | no_license | const document = {
querySelectorAll: () => ['element1', 'element2', 'element3']
};
const cols = document.querySelectorAll('.column');
const col1 = cols[0];
const col3 = cols[2];
console.log("col1:", col1);
console.log("col3:", col3);
|
Markdown | UTF-8 | 1,812 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Bytestrings
This is an implementation of a
[pre-SRFI specification](https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/BytestringsCowan.md)
by John Cowan which provides bytestrings for Scheme. It should be
portable to any R7RS-small implementation with
[(scheme bytevector)](http://www.r6rs.org/final/html/r6rs-l... |
Java | UTF-8 | 354 | 2.171875 | 2 | [] | no_license | package test4.processor;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
public class AdminUserProcessor implements Processor{
@Override
public void process(Exchange exchange) throws Exception {
System.out.println("Processing a ADMIN user...");
exchange.getIn().setHeader(... |
Java | UTF-8 | 1,941 | 2.171875 | 2 | [] | no_license | package com.inn.project1.project1.dao;
import java.math.BigInteger;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
... |
Python | UTF-8 | 2,681 | 3.359375 | 3 | [
"BSD-3-Clause"
] | permissive | #GUI BT program reference
from tkinter import *
import bluetooth
# Look for all Bluetooth devices
# the computer knows about.
print("Searching for devices...")
print("")
nearby_devices = bluetooth.discover_devices()#array of devices
# Run through all the devices found and list their name
num = 0
print("Se... |
Markdown | UTF-8 | 1,239 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | CSRFWork
==========
A simple way of protecting forms regarding to CSRF
Installation:
-------------
* Place the csrf.php file into your application folder
* Include it
```include_once 'csrf.php'; ```
* and initate it: ```CSRF::init();```
HowTo
---------
There are 2 methods available for you to interact with y... |
C# | UTF-8 | 3,034 | 2.640625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace CarouselDemo
{
public partial class App : Application
{
public static List<Models.Chapter> MainData { get; set; }
public App()
{
InitializeComponent();
M... |
C++ | UTF-8 | 30,321 | 3.03125 | 3 | [] | no_license | #include <LiquidCrystal.h>
int index = 0;
// add all the letters and digits to the keyboard
String keyboard[]={"SEND","A", "B","C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "SEND", "DEL", "SPACE"... |
SQL | UTF-8 | 12,783 | 3.515625 | 4 | [] | no_license | CREATE PROCEDURE CH15_Calc_Bowler_Pins_Avg_Hcp
AS
UPDATE Bowlers SET Bowlers.BowlerTotalPins = DSum('RawScore','Bowler_Scores ','Bowler_Scores.BowlerID = ' & Bowlers.BowlerID), Bowlers.BowlerGamesBowled = DCount('RawScore','Bowler_Scores','Bowler_Scores.BowlerID = ' & Bowlers.BowlerID), Bowlers.BowlerCurrentAverage ... |
Python | UTF-8 | 209 | 3.609375 | 4 | [] | no_license | # Count the number of elements in a given array.
def _count(nums: list[int | str]) -> int:
N: int = len(nums)
if N == 0 or N == 1:
return N
return 1 + _count(nums[1:])
assert _count([1, 2, 3, 4]) == 4 |
Java | UTF-8 | 337 | 1.53125 | 2 | [] | no_license | package com.google.android.gms.internal.measurement;
import java.util.Arrays;
final class zzug implements zzui {
zzug(zzue arg1) {
this();
}
private zzug() {
super();
}
public final byte[] zzc(byte[] arg1, int arg2, int arg3) {
return Arrays.copyOfRange(arg1, arg2, arg3 +... |
Java | UTF-8 | 2,420 | 2.484375 | 2 | [] | no_license | package com.devcat.watchdogruntime;
import android.util.Log;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import java.util.concurrent.TimeUnit;
/**
*... |
Markdown | UTF-8 | 6,200 | 2.640625 | 3 | [] | no_license | # Membership Plans
AgileVentures helps teams of developers get together to work on open source charity IT projects. In the [free plan](/free) developers get the use of AgileVentures Slack.
<div>
<table
class="tg"
style="
border-collapse: collapse;
border-spacing: 0;
border-color: #aaa;
width: 100%;
"
>
<tbody>
<tr s... |
Python | UTF-8 | 2,123 | 3.03125 | 3 | [] | no_license | import re
batRegex = re.compile(r'Bat(wo)?man')
mo=batRegex.search('The Adventures of Batman')
print(mo.group())
mo=batRegex.search('The Adventures of Batwoman')
print(mo.group())
mo=batRegex.search('The Adventures of Batwowowoman')
print(mo==None)
phoneRegex=re.compile(r'\d\d\d-\d\d\d-\d\d\d\d')
mo=phoneRegex.search... |
PHP | UTF-8 | 4,873 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
class TheBigDB {
public $version = "0.2.0";
public $default_configuration = array(
"api_key" => null,
"use_ssl" => false,
"verify_ssl_certificates" => false, # Not yet implemented
"before_request_execution" => null, # Not yet implemented
"after_request_execution" => null, # Not yet impl... |
Markdown | UTF-8 | 510 | 3.3125 | 3 | [
"MIT"
] | permissive | # Hashmap LEFT JOIN
The SQL LEFT JOIN returns all rows from the left table, even if there are no matches in the right table. This means that if the ON clause matches 0 (zero) records in the right table; the join will still return a row in the result, but with NULL in each column from the right table.
## Challenge
Writ... |
TypeScript | UTF-8 | 68 | 2.515625 | 3 | [] | no_license | export type Item = {
id: number;
name:string;
done: boolean;
} |
JavaScript | UTF-8 | 1,803 | 2.546875 | 3 | [] | no_license | describe("App", function() {
var app;
beforeEach(function() {
app = new App($);
});
it("context can be initialized with context path", function () {
expect(app.context).not.toBeDefined();
expect(app.context).toBeUndefined();
expect(app.context).toBeNothing();
expect(app.con... |
C++ | UTF-8 | 1,018 | 3 | 3 | [] | no_license | #include"tree.h"
#include<vector>
using namespace std;
class Solution0113 {
public:
vector<vector<int>> pathSum(TreeNode* root, int targetSum) {
vector<vector<int>> result;
vector<int> partResult;
if(root == nullptr) {
return result;
}
dfs(root, targetSum, partRe... |
Shell | UTF-8 | 1,468 | 3.21875 | 3 | [
"MIT"
] | permissive | #!/bin/bash
#set -v
# usage: perf_record_benchmark v1
export EXE_DIR=../build/threads/
export BENCHMARK_BINARY=queue_bench_v${1}
export PERFTOOLS_DIR=../../FlameGraph
function fecho {
echo $1 >> perf_run.out
}
function run_with_threads {
nice -n -20 ${EXE_DIR}/${BENCHMARK_BINARY} -m 1000000 -r 5000 -n ... |
Java | UTF-8 | 3,054 | 2.703125 | 3 | [] | no_license | package ru.list.victor_90.study.myapplication.design;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toa... |
C# | UTF-8 | 3,097 | 2.640625 | 3 | [
"MIT"
] | permissive | using System;
using QuickGraph.Unit;
namespace QuickGraph.Algorithms.MaximumFlow
{
[TypeFixture(typeof(IMutableVertexAndEdgeListGraph<string, Edge<string>>))]
[TypeFactory(typeof(AdjacencyGraphFactory))]
[TypeFactory(typeof(BidirectionalGraphFactory))]
public class AllVerticesGraphAugmentorAlgorithmTe... |
Python | UTF-8 | 498 | 3.203125 | 3 | [
"Apache-2.0"
] | permissive | import glob
for imageName in glob.glob('*.txt'):
newList = []
f = open(imageName)
for line in f.readlines():
tempList = line.split()
newTempList = [tempList[0], tempList[5], tempList[1], tempList[2], tempList[3], tempList[4]]
newList.append(newTempList)
f.close
w = open(imag... |
JavaScript | UTF-8 | 3,487 | 2.96875 | 3 | [] | no_license | var valueOne = "";
var valueTwo = "";
var runningTotal = "";
//var lastDigit = "0";
//var currentDigit = "";
function addValue(number) {
var newNumber = number;
if (runningTotal == "0") {
valueTwo = "";
}
//lastDigit = currentDigit;
//console.log("lastDigit: " + lastDigit);
switch... |
Java | UTF-8 | 1,872 | 2.609375 | 3 | [
"MIT"
] | permissive | /**
* Created by MomoLuaNative.
* Copyright (c) 2020, Momo Group. All rights reserved.
*
* This source code is licensed under the MIT.
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
*/
package com.xfy.shell;
import java.io.*;
/**
*... |
Java | UTF-8 | 3,043 | 2.203125 | 2 | [] | no_license | package com.landasoft.demo.cloudfoundry.springcloudclient.controller;
import com.landasoft.demo.cloudfoundry.springcloudclient.feign.ClientBackendFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.bean... |
Swift | UTF-8 | 3,619 | 3.015625 | 3 | [] | no_license | //
// DefaultAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class DefaultAPI {
/**
- parameter latOrg: (query) Latitude of origin location - parameter lngOrg: (query) Longitude of origin location - paramete... |
JavaScript | UTF-8 | 218 | 2.625 | 3 | [] | no_license |
export function phoneReg(phone) {
var reg = /^[1][3,4,5,7,8][0-9]{9}$/;
return reg.test(phone)
}
export function passWordReg(psw){
var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,21}$/;
return reg.test(psw)
} |
PHP | UTF-8 | 1,158 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace NottsDigital\Api\Tests;
use PHPUnit\Framework\TestCase;
class GroupConfigValidationTest extends TestCase
{
/**
* @var array
*/
private $groupConfig;
protected function setUp(): void
{
$groupsJson = \file_get_contents(dirname(__DIR__).'/groups.json');
$this->... |
Python | UTF-8 | 9,265 | 2.71875 | 3 | [
"MIT"
] | permissive | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2021 Edward Higgins <ed.higgins@york.ac.uk>
#
# Distributed under terms of the MIT license.
""" TRAJECTORIES - Trajectory construction and manipulation module
Description:
trajectories.py contains the Trajectory class containing info... |
Java | UTF-8 | 1,735 | 2.6875 | 3 | [] | no_license | package org.igeek.common;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
/**
* Created... |
Python | UTF-8 | 3,665 | 2.875 | 3 | [] | no_license | import numpy as np
from sklearn.datasets import make_regression
from matplotlib import pyplot
def sse(X, Y, initial_w, X_transpose):
max_iterations = 10000
t = 0
print("Training start for SSE")
while t < max_iterations:
error = list(map(lambda x: np.subtract(np.matmul(np.transpose(initial_w), ... |
Python | UTF-8 | 510 | 3.625 | 4 | [] | no_license | ### Print or breakpoint to debug
def max(lst):
#max_num = 0
max_num = -float('inf')
for num in lst:
print(num, max_num)
if num > max_num:
print('entered if statement')
max_num = num
return max_num
print(max([-1, -2, -4]))
### Use pdb
def max(lst):
#max_n... |
Python | UTF-8 | 189 | 2.5625 | 3 | [] | no_license | N=int(input())
suc=0
mis=0
for i in range(N):
#750 yukicoder
_s=input().split()
x,s=int(_s[0]),len(_s[1])
w=min(12*x//1000,s)
suc=suc+w
mis=mis+(s-w)
print(suc,mis)
|
Java | UTF-8 | 1,475 | 2.1875 | 2 | [] | no_license | package com.posidex.bean;
public class LifeAsiaResponseMessageBean {
private String policyNumber;
private String mergeClientNumber;
private String retainedClientNumber;
private String flag;
private String errorCode;
private String errorDescription;
public String getPolicyNumber() {
return policyNumber;
}
public void ... |
C# | UTF-8 | 1,442 | 2.71875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class HomeGenerator
{
List<RoomNode> allNodesCollection = new List<RoomNode>();
private int homeWidth;
private int homeLength;
public HomeGenerator(int homeWidth, int homeLength)
{... |
Java | UTF-8 | 1,043 | 2.3125 | 2 | [] | no_license | package ch.heig.pl.presentation;
import ch.heig.pl.business.ContactService;
import ch.heig.pl.model.Contact;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
impor... |
Python | UTF-8 | 1,168 | 3.234375 | 3 | [
"MIT"
] | permissive | import gudhi as gd
import numpy as np
import matplotlib.pyplot as plt
def circle_sample(n, r):
angles = np.random.uniform(0, 2*np.pi, n)
return r*np.cos(angles), r*np.sin(angles)
# First we sample 150 points from the unit circle and the radius 2 circle
xs1, ys1 = circle_sample(150, 1.0)
xs2, ys2 = circle_samp... |
C# | UTF-8 | 1,480 | 2.609375 | 3 | [] | no_license | // This is the blue dwarf
// more information at https://github.com/picrap/BlueDwarf
namespace BlueDwarf.ViewModel
{
using System;
using System.Reflection;
using ArxOne.MrAdvice.MVVM.Properties;
using ArxOne.MrAdvice.MVVM.Threading;
using Properties;
/// <summary>
/// View-model base (in c... |
Java | UTF-8 | 4,064 | 2.296875 | 2 | [] | no_license | package com.royken.teknik.entities;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.io.Serializable;
import java.util.Date;
/**
... |
Markdown | UTF-8 | 11,786 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | ---
layout: post
title: 基于SVM的人脸识别
categories: [blog ]
tags: [SVM, Support Vector Machine]
description: 通过SVM分类的方法,进行人脸识别
---
## #数据说明
> LFW全称为Labeled Faces in the Wild, 是一个应用于人脸识别问题的数据库,更多内容查看官方网站:http://vis-www.cs.umass.edu/lfw
LFW语料图片,每张图片都有人名Label标记。每个人可能有多张不同情况下情景下的图片。如George W Bush 有530张图片,而有一些人名对应的图片可能只有一张或者几... |
C# | UTF-8 | 515 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | using Favalon.Expressions;
using System;
namespace Favalon.Terms
{
#pragma warning disable CS0659
public abstract class Term : IEquatable<Term?>
#pragma warning restore CS0659
{
private protected Term()
{ }
public abstract Term HigherOrder { get; }
public abstract bool Equals... |
Java | UTF-8 | 479 | 2.1875 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cc104proj;
/**
*
* @author Mark Gregor Miguel
*/
public class BuildingBlock {
int row;
int col;
i... |
Java | UTF-8 | 1,559 | 3.109375 | 3 | [] | no_license | package helper.mapreduce;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.List;
/**
* An extremely basic and naive MapReduce framework.
*/
public final class MapReduceExecutor {
/**
* Executes the specified programs using the supplied input data. If more than one progra... |
C++ | UTF-8 | 2,604 | 2.84375 | 3 | [] | no_license | #pragma once
#include "glbase.hpp"
#include <string>
#include <stb_image.h>
namespace game::opengl
{
class texture
{
public:
operator GLuint()
{
return _texture;
}
texture(std::string_view name)
{
int width, height, channels;
s... |
Java | UTF-8 | 198 | 2.59375 | 3 | [] | no_license | package ru.job4j.oop;
public class Hare {
public void tryEat(Ball ball){
System.out.println("Попытался заяц съесть колобка , а тот убежал");
}
}
|
Python | UTF-8 | 4,388 | 2.625 | 3 | [] | no_license | #!/usr/bin/python
# Auteur : F.Lavaud
# Carte : Raspberry Pi
# ====================================
# Variable globale
# ====================================
import VariableGlob as GLOB
# ====================================
# liste des imports
# ====================================
import sys
import socket
impor... |
Python | UTF-8 | 6,556 | 2.984375 | 3 | [] | no_license | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# MAGIC WAND, MINECRABRACADABRA #
# #
... |
C++ | UTF-8 | 667 | 2.859375 | 3 | [] | no_license | #include<iostream>
using namespace std;
int a[10001];
void qsort(int l,int r)
{
int i=l,j=r;
double mid=a[(l+r)/2];
do{
while(a[i]<mid) i++;
while(a[j]>mid) j--;
if(i<=j)
{
swap(a[i],a[j]);
i++,j--;
}
}while(i<=j);
if(l<j) qsort(l,j);
if(r>i) qsort(i,r);
}
int main()
{
int n,t,time;
cin >> n;... |
Java | UTF-8 | 1,136 | 2.078125 | 2 | [] | no_license | package com.tt.jms.consumer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfigur... |
PHP | UTF-8 | 3,451 | 2.578125 | 3 | [] | no_license | <?php
include "dp_conn.php";
$sinav_adi = $_POST["sinav_adi"];
$verisor=$pdo->prepare("SELECT * from quiz WHERE quizName = :sinav_adi");
$verisor->execute(array( 'sinav_adi' => $sinav_adi ));
$vericek=$verisor->fetch(PDO::FETCH_ASSOC);
$sinav_id = $vericek["quizId"];
$n= $vericek["sorusayisi"]; ... |
Java | UTF-8 | 6,615 | 1.90625 | 2 | [] | no_license | /**
*
*/
package org.pssframework.model.system;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import ... |
C | UTF-8 | 1,424 | 2.84375 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* to_unsigned.c :+: :+: :+: ... |
SQL | UTF-8 | 508 | 3.109375 | 3 | [] | no_license | create table if not exists nodes(
actions VARCHAR (255),
displayDescription VARCHAR (255),
displayName VARCHAR (255) not null,
durationInMillis bigint,
id varchar (255) not null,
input VARCHAR (255),
result VARCHAR (255),
startTime TIMESTAMP,
state VARCHAR (255),
type VARCHAR (255),
causeOfBlockage VARCHAR (255),
edges... |
C++ | UTF-8 | 47,029 | 2.515625 | 3 | [] | no_license | /***************************************************************************
init.cpp - description
-------------------
begin : Thu Apr 11 2002
copyright : (C) 2002 by Mirela Andronescu
email : andrones@cs.ubc.... |
Python | UTF-8 | 2,100 | 2.984375 | 3 | [] | no_license | from queue import Queue
from collections import defaultdict
from message import ChatMessage
# simple in-memory database for this project.
class SimpleDb(object):
def __init__(self, user_cache_size=10):
self.username_lookup = dict()
self.username_cnt = 0
self.user_messages = defaultdict(lamb... |
Python | UTF-8 | 1,583 | 2.796875 | 3 | [] | no_license | import datetime
def test_schema_dump(peewee_obj, schema):
dump_data = schema.dump(peewee_obj).data
assert dump_data == {'id': 1,
'name': 'test_restaurant',
'opens_at': '08:30:00',
'closes_at': '00:00:00'}
def test_schema_load(raw_obj... |
SQL | UTF-8 | 1,151 | 2.625 | 3 | [] | no_license | SET SERVEROUTPUT ON
BEGIN
-- -------------------------------------------------------
DBMS_AQADM.CREATE_QUEUE_TABLE (
queue_table => 'chirico.Q2_T'
, queue_payload_type => 'chirico.message_type'
);
-- -------------------------------------------------------
DBMS_AQADM.CREAT... |
Java | GB18030 | 2,842 | 3.1875 | 3 | [
"MIT"
] | permissive | package mars.meiwen;
import mars.bigwork.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class txt013 extends Activity{
private TextView txt013;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super... |
Python | UTF-8 | 484 | 3.125 | 3 | [] | no_license | # import os
# import sys
# import json
# target = sys.argv[1]
# with open(target, 'r') as reader:
# json_str = reader.read()
# json_lists = json.loads(json_str) # dict, read
# with open(target, 'w+') as writer:
# sorted_list = sorted(json_lists, key = lambda i: i["date"], reverse = True) # only work... |
Markdown | UTF-8 | 692 | 2.859375 | 3 | [] | no_license | # Hackathon08
Desarrollo de la hackathon de la semana 8
• ¿Cuál es la importancia de usar un algoritmo?
Un algortimo describe paso a paso las tareas que se debe desarrollar en un proceso dado, esto permite el control de cada paso mejorando asi cada proceso.
• ¿Cómo un algoritmo mejora el proceso o servicio de una emp... |
Java | UTF-8 | 772 | 3.25 | 3 | [] | no_license | public class SpecialOffer {
Product product;
String description;
String start;
String end;
double discount;
SpecialOffer(Product p, String d, String s, String e, double dis){
product = p;
description = d;
start = s;
end = e;
discount = dis;
}
void... |
Java | UTF-8 | 1,111 | 2.078125 | 2 | [] | no_license | package com.lagou.service;
import com.lagou.domain.ResourceCategory;
import com.lagou.domain.Role;
import com.lagou.domain.RoleMenuVo;
import com.lagou.domain.RoleResourceVo;
import java.util.List;
/**
* @author liu
* @description 角色查询Service层接口
* @date 2021/7/14 14:03
*/
public interface RoleService {
/*
... |
C++ | UTF-8 | 945 | 3.203125 | 3 | [] | no_license | #include "../lib/createTree.hpp"
using namespace std;
void morris(TreeNode *root, int k) {
int count = 0;
TreeNode *curr = root;
while (curr != nullptr) {
if (curr->left == nullptr) {
count++;
if (count == k) {
cout << curr->val << endl;
}
curr = curr->right;
} else {
... |
Java | UTF-8 | 987 | 2.8125 | 3 | [] | no_license | package com.pineapple.java.redis.ch09;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Pipeline;
public class ZipList {
public static void testLongZiplistPerformance(Jedis conn) {
System.out.println("\n----- testLongZiplistPerformance -----");
longZiplistPerformance(conn, Sharding.TE... |
PHP | UTF-8 | 8,202 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* 管理员服务
*/
namespace Aizxin\Services\Admin;
use Aizxin\Repositories\Eloquent\UserRepositoryEloquent;
use Aizxin\Repositories\Eloquent\RoleRepositoryEloquent;
use Aizxin\Tools\Result;
use Aizxin\Validators\UserLoginValidator;
use Aizxin\Validators\UserValidator;
use Auth;
use Cache;
use Exception;
use Pret... |
C | UTF-8 | 415 | 2.578125 | 3 | [] | no_license | #include "libmfcrc.h"
static uint8_t crc8_reduce(uint8_t idx)
{
uint8_t cnt = 8;
do {
uint8_t m = idx & 0x80;
idx <<= 1;
if (m)
idx ^= 0x07;
} while (--cnt);
return idx;
}
uint8_t crc8_ccitt_byte(uint8_t crc, uint8_t c)
{
return crc8_reduce(crc ^ c);
}
uint8_t crc8_ccitt(const uint8_t *buf, uint8_t len... |
Java | UTF-8 | 826 | 1.757813 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.paypal.android.sdk;
import android.support.design.widget.al;
import java.util.concurrent.CountDownLatch;
public class fn
{
fin... |
C# | UTF-8 | 832 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using AlaskaAirlines.BL.Models;
using AlaskaAirlines.DAL;
namespace AlaskaAirlines.BL
{
public class AirportManager
{
private static AirportManager _instance;
private const String AIRPORT_FILEPATH = "c:\\users\\paul\\documents\\visual... |
PHP | UTF-8 | 4,802 | 2.96875 | 3 | [] | no_license | <?php
namespace MasterDmx\LaravelMedia\Images;
use Intervention\Image\Image;
use MasterDmx\LaravelMedia\Contexts\Context;
use MasterDmx\LaravelMedia\Exceptions\ValidationException;
class ImageValidator
{
/**
* Минимальная ширина
*/
public const RULE_MIN_WIDTH = 'min_width';
/**
* Максимал... |
Python | UTF-8 | 1,437 | 3.09375 | 3 | [] | no_license | #!/usr/bin/python
# coding: utf-8
import smbus
import time
bus = smbus.SMBus(1) # I2Cバス番号
address = 0x49 # ADS1015のI2Cアドレス
# I2C data write (1byte)
def write(reg, value):
bus.write_byte_data(address, reg, value)
# I2C data write (block)
def blockwrite(reg, s):
bus.write_i2c_block_data(address, reg, s[0:... |
C++ | UTF-8 | 610 | 2.546875 | 3 | [] | no_license | #pragma once
/**
* The following relevant macros are defined in the makefile:
* CTH_SRATE
* CTH_INTEGRAL
* CTH_FLOATING
*
* When possible, use the corresponding constexpr bool values or types defined in this file.
*/
#define STRING(x) #x
#define LITERAL(x) STRING(x)
namespace cynth {
/** Sample rate... |
Java | UTF-8 | 11,857 | 1.84375 | 2 | [] | no_license | package com.sipai.controller.process;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.... |
Java | UTF-8 | 1,169 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | package io.github.wanghuayao.jutils.serializer.converter.impl;
import io.github.wanghuayao.jutils.serializer.converter.ByteConverter;
import java.math.BigDecimal;
import java.math.BigInteger;
public class BigDecimalByteconverter implements ByteConverter<BigDecimal> {
ByteConverter<Integer> intByteConvert... |
Java | UTF-8 | 1,294 | 2.328125 | 2 | [] | no_license | package servlet;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import dao.HotelDao;
import entity.Hotel;
import global.Utils;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import... |
C++ | UTF-8 | 447 | 2.609375 | 3 | [] | no_license | #include <iostream>
#include <math.h>
#include "loading.h"
using namespace std;
int main(int argc, char const *argv[])
{
const double pi =3.14;
loading();
double a;
cout<<"Xin moi nhap so can tinh: ";
cin>>a;
double t = (a*pi)/180;
cout<<"\nsin:"<<sin(t);
cout<<"\n";
cout<<"cos:"<<... |
Java | UTF-8 | 635 | 1.898438 | 2 | [] | no_license | package com.tuojin.tvfilm.contract;
import com.tuojin.tvfilm.base.BaseView;
import com.tuojin.tvfilm.bean.CategoryInfo;
import java.util.List;
/**
* 文 件 名: CategoryContract
* 创 建 人: Administrator
* 创建日期: 2016/9/21 13:50
* 文件描述:
* 邮 箱:
* 博 客:
* 修改时间:
* 修改备注:
*/
public class CategoryContract {
public ... |
Python | UTF-8 | 868 | 3.71875 | 4 | [] | no_license | #!/usr/bin/python3
""" In this module it create a Class Rectangle"""
BaseGeometry = __import__('7-base_geometry').BaseGeometry
class Rectangle(BaseGeometry):
"""This a class Rectangle"""
def __init__(self, width, height):
"""Initialize an instance of Rectangle
Arguments:
width:... |
Java | UTF-8 | 14,570 | 2.046875 | 2 | [] | no_license | package cn.weli.svideo.module.video.component.widget.videoheart;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import a... |
Java | UTF-8 | 1,603 | 2.65625 | 3 | [] | no_license | package sample;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextArea;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Controller {
public ComboBox choiceTime... |
Shell | UTF-8 | 1,442 | 2.71875 | 3 | [] | no_license | # save time!
yum install -y /usr/bin/applydeltarpm
# make sure we have compilers and such like
yum groupinstall -y 'Development Tools'
# go and get the SoftwareCollections.org
wget https://www.softwarecollections.org/repos/rhscl/php55/epel-7-x86_64
# add Webtatic repo for PHP 5.5 packages
rpm -Uvh https://mirror.we... |
Java | UTF-8 | 2,653 | 2.59375 | 3 | [] | no_license | package rs.fon.miltek.models;
import java.io.Serializable;
import java.text.DecimalFormat;
public class Product implements Serializable{
private int productID;
private String title;
private double price;
private int brandID;
private int categoryID;
private String image;
private String desc... |
Python | UTF-8 | 2,671 | 3.34375 | 3 | [] | no_license | #!/usr/local/bin/python3
'''
Main program to show how to use this.
See terms.txt for definitions and explanations.
'''
if __name__ == "__main__":
# pylint doesn't like the fact that my variables are lowercase here
# pylint: disable=invalid-name
from solvers import BFSSolver
from puzzles import Expert39... |
Markdown | UTF-8 | 462 | 3.09375 | 3 | [] | no_license | # ChordApp
<strong>An app that displays all 7 chord/scale intervals for all 12 musical keys</strong>
https://erichkopp.github.io/TheorumWheel

<ul>
<li>Easily transpose a song from one key to another </li>
<li>Roman numeral system (I,ii,iii,IV,V,vi,vii) denotes each chord/scale inter... |
Java | UTF-8 | 4,182 | 2.578125 | 3 | [
"Apache-2.0"
] | 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 ... |
C++ | UTF-8 | 606 | 2.515625 | 3 | [] | no_license | //------------------------------------------------------------------------------
// @file main.cpp
// @author Matthew Hird
// @date February 18, 2018
//
// @brief Contains main function loop. Creates a ReservationSystem class
// object called resSys. Calls resSys.menu() to access the
// ... |
Markdown | UTF-8 | 3,965 | 2.96875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: "Documentary styles"
categories:
- culture
date: 2004-07-12 00:00
comments: true
---
<p>I've been watching quite a few documentaries recently, and it has made me think a bit about what makes them effective. In the style of the old 'compare and contrast' essays we all had to write at school, I w... |
TypeScript | UTF-8 | 2,181 | 2.734375 | 3 | [
"MIT"
] | permissive | import {FieldReference} from '../../../validation'
import {RuleDef, ValidationBuilder} from '../../ruleBuilder'
import {InitialValueProperty, SchemaValidationValue} from '../../types'
import {IntrinsicDefinitions, TypeAliasDefinition, IntrinsicTypeName} from '../schemaDefinition'
import {BaseSchemaDefinition, TitledLis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.