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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 1,165 | 2.515625 | 3 | [] | no_license | var Todo = require('./models/todo');
// expose the routes to our app with module.exports
module.exports = function(app){
// routes ======================================================================
// api ---------------------------------------------------------------------
// get all todos
app.get... |
Markdown | UTF-8 | 1,638 | 3.21875 | 3 | [] | no_license |
# Welcome to Car Store API Project!
This project was implemented in order to demonstrate how to build rest APIs using Spring Boot. The project structure was generated using [Spring Initilizr](https://start.spring.io/)
For this demonstration purpose, we are creating a collection of APIs to manage a car store.
The ... |
C | UTF-8 | 3,908 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | #include <libopticon/react.h>
#include <stdlib.h>
#include <string.h>
pathnode OPTICONF_ROOT;
/** Allocate a pathnode */
pathnode *pathnode_alloc (void) {
pathnode *self = (pathnode *) malloc (sizeof (pathnode));
if (! self) return NULL;
self->prev = self->next = self->parent =
self... |
C++ | UTF-8 | 1,881 | 2.671875 | 3 | [] | no_license | #include "AvailabilityServer.h"
#include "Socket.h"
#include "Utils.h"
#include <string>
#include <iostream>
#include <intrin.h>
using namespace Backend;
using namespace std;
AvailabilityServer::AvailabilityServer(IProductReader^ productReader)
{
_productReader = productReader;
_isRunning = false;
}
void Availabil... |
SQL | UTF-8 | 751 | 3.109375 | 3 | [] | no_license | -- CREATE DATABASE itp;
-- \c itp
CREATE TABLE mqtt_message (
id SERIAL PRIMARY KEY,
topic TEXT NOT NULL,
payload TEXT,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE sensor_data (
id SERIAL PRIMARY KEY,
device VARCHAR(50),
measurement VARCHAR(50),
rea... |
Java | UTF-8 | 978 | 2.34375 | 2 | [] | no_license | /*
* Copyright (c) www.bugull.com
*/
package com.bugull.redis.recipes;
import com.bugull.redis.RedisConnection;
import com.bugull.redis.exception.RedisException;
import com.bugull.redis.utils.JedisUtil;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
/**
*
* @author Frank Wen(xbwen@hotmai... |
Java | UTF-8 | 3,056 | 2.3125 | 2 | [] | no_license | package com.itheima.dao;
import com.itheima.domain.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.T... |
Markdown | UTF-8 | 8,103 | 2.578125 | 3 | [
"MIT"
] | permissive | # MSBuild.Xrm.SourceControl
## Releases
## 2.0.0
Added Environment variable to support multiple extracts for people who work across multiple projects environments
## 1.0.4
Initial release supporting Extract of Customisations.
**Build and Release Status**: )
hours = total_secs //3600
secs_still_remaining = total_secs %3600
minutes = secs_still_remaining //60
secs_finally_remaining = secs_still_remaining %60
print("Hours = ", hours, " minutes = ", minutes, " seconds = ", secs_finally_remaining)... |
C | UTF-8 | 161 | 2.890625 | 3 | [
"MIT"
] | permissive | #include <stdio.h>
int main(){
int n,a[100],i=0;
scanf("%d",&n);
while(i<n){
scanf("%d",&a[i]);
i++;
}
while(i>0){
i--;
printf("%d\n",a[i]);
}
}
|
C | UTF-8 | 3,137 | 2.546875 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parsing.c :+: :+: :+: ... |
Java | UTF-8 | 524 | 2.109375 | 2 | [] | no_license | public /*explicit*/ redecl_iterator(redecl_iterator<decl_type> $Prm0) {
//START JInit
this.Current = $Prm0.Current;
this.Starter = $Prm0.Starter;
this.PassedFirst = $Prm0.PassedFirst;
//END JInit
}
@Override
public boolean $eq(Object other) {
return $eq_redecl_iterator(this, (redecl_iterator)other);
}
@Ov... |
SQL | UTF-8 | 178 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T08:35:00Z' AND timestamp<'2017-11-19T08:35:00Z' AND temperature>=12 AND temperature<=48
|
Python | UTF-8 | 2,690 | 2.875 | 3 | [] | no_license | import sklearn
from sklearn.neural_network import MLPClassifier
from sklearn.neural_network import MLPRegressor
from sklearn import datasets, linear_model
import cPickle
from emotion import *
# Returns a classifier that analyzes the correlation between data.
def trainOnData(data):
X = [pair[0] for pair in data]
... |
Markdown | UTF-8 | 13,840 | 2.640625 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "教程:Azure Active Directory 与 Grovo 集成 | Microsoft Docs"
description: "了解如何在 Azure Active Directory 和 Grovo 之间配置单一登录。"
services: active-directory
documentationCenter: na
author: jeevansd
manager: femila
ms.reviewer: joflore
ms.assetid: 399cecc3-aa62-4914-8b6c-5a35289820c1
ms.service: active-directory
... |
Java | UTF-8 | 4,620 | 1.976563 | 2 | [] | no_license | /* */ package com.cicro.wcm.dao.zwgk.ser;
/* */
/* */ import com.cicro.util.DateUtil;
/* */ import com.cicro.wcm.bean.logs.SettingLogsBean;
/* */ import com.cicro.wcm.bean.zwgk.ser.SerCategoryBean;
/* */ import com.cicro.wcm.dao.PublicTableDAO;
/* */ import com.cicro.wcm.db.DBManager;
/* ... |
C++ | UTF-8 | 4,242 | 3.046875 | 3 | [] | no_license | #include "Game.h"
//functions private
void Game::initVariables() {
this->window = nullptr;
this->points = 0;
this->tiles = 16;
this->ballPositionX = 5;
this->ballPositionY = 2;
srand(time(NULL));
}
void Game::initWindow() {
this->videoMode.height = 600;
this->videoMode.width = 800;
this->window = new sf::... |
PHP | UTF-8 | 493 | 2.59375 | 3 | [] | no_license | --TEST--
Test retrieving the SVM training parameters.
--SKIPIF--
<?php
if (!extension_loaded('svm')) die('skip');
?>
--FILE--
<?php
$svm = new svm();
$params = $svm->getOptions();
if(count($params) > 2) {
echo "ok 1\n";
} else {
echo "retrieving params failed";
}
if(isset($params[SVM::OPT_CACHE_SIZE])) {
echo "ok ... |
JavaScript | UTF-8 | 1,211 | 2.640625 | 3 | [] | no_license | import React, { Component } from 'react';
import './App.css';
import Clock from './clock';
import Heading from './heading';
import Stopwatch from './stopwatch';
class App extends Component{
constructor(props){
super(props);
this.state={
deadline:'',
newDeadline:'',
timerNumber:null,
newTimer:null
... |
Java | UTF-8 | 13,577 | 1.945313 | 2 | [] | no_license | package com.bsl.service.user.impl;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import... |
Markdown | UTF-8 | 3,722 | 3.15625 | 3 | [] | no_license | ## Resources System ##
The final method of managing source data in FME Server is to use the system of tools called Resources.
---
### What are Resources? ###
"Resources" is an inbuilt file management system that allows data (and other files) to be published to an FME Server instance and used within all Server opera... |
C | UTF-8 | 815 | 3.640625 | 4 | [
"MIT"
] | permissive | /*
* Copyright(c) 2011-2023 The Maintainers of Nanvix.
* Licensed under the MIT License.
*/
#include <stddef.h>
/**
* @details The __strncpy() function copies not more than @p n characters
* (characters that follow a null character are not copied) from the
* array pointed to by @p s2 to the array pointed to by ... |
Java | UTF-8 | 1,338 | 2.171875 | 2 | [] | no_license | package com.marketplace.wishlist.service;
import com.marketplace.wishlist.AbstractITCase;
import com.marketplace.wishlist.exception.BusinessException;
import com.marketplace.wishlist.model.Wish;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.facto... |
Markdown | UTF-8 | 1,724 | 2.8125 | 3 | [] | no_license | ---
title: CS3STHLM 2020 Theme Smarter!
date: 2020-02-14 05:00:00
categories:
- blog
layout: blog
author: CS3STHLM Crew
pdf:
-
published: true
permalink: /blog/cs3sthlm-2020-theme-smarter/
---
<img src="{{ site.baseurl }}/assets/cs3sthlm-heart.png" class="blog-content-image-half" />
<h1 class="blog-title" itemprop="... |
Java | UTF-8 | 613 | 2.796875 | 3 | [] | no_license | package Level3;
public class Solution_네트워크 {
static int n = 3;
static int[][] computers = {{1,1,0},{1,1,0},{0,0,1}};
public static void main(String[] args) {
int answer =0;
boolean[] visit = new boolean[n];
for(int i = 0; i < n;i++) {
if(!visit[i]) {
answer++;
dfs(i, visit, computers);
... |
PHP | UTF-8 | 743 | 3.375 | 3 | [] | no_license | <?php
$cities = array(
'Germany' => 'Berlin',
'France' => 'Paris',
'Ukraine' => 'Kiev'
);
$object = new ArrayObject($cities);
$iterator = $object->getIterator();
$object['Russia'] = 'Moscow';
$object->append('Tokio');
while ($iterator->valid()) {
echo $iterator->key() .' '. $iterator->current() . '<b... |
C++ | UTF-8 | 512 | 3.296875 | 3 | [] | no_license | #include <iostream>
using namespace std;
int coord(int x,int y){
if(y==x){
int n=1;
while(x!=0 && x!=1){
n++;
x-=2;
}
if(x==1)
return (4*n-3);
else
return (4*n-4);
}
else if(y==(x-2)){
int n=1;
while(y!=0 && y!=1){
n++;
y-=2;
}
if(y==1)
return (4*n-1);
else
return (4*n-2... |
Markdown | UTF-8 | 1,229 | 2.796875 | 3 | [] | no_license | # MuleSoft training: DevFundamentals w/Mule-4
The contents in these folders contain solution files for walkthroughs covered each day.
**Note**:
The projects in Day-1 thru Day-3 are built with AnypointStudio ver 7.4.1. Whereas the projects in Day-4 and Day-5 are built using newer version of Studio ver 7.4.2
<BR>
##... |
Java | UTF-8 | 81 | 1.804688 | 2 | [] | no_license | package myProject;
public interface IPlayer {
public IHand getHand();
}
|
Java | UTF-8 | 815 | 2.234375 | 2 | [
"MIT"
] | permissive | package com.example.fuseExample.transform;
import org.apache.camel.Exchange;
import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CvsAggregationStrategy implements AggregationStrategy {
public Exchange aggre... |
Java | UTF-8 | 1,142 | 2.421875 | 2 | [] | no_license | package com.example.a3671129.musidroid;
import android.util.Log;
import android.widget.SeekBar;
import android.widget.TextView;
import l2i013.musidroid.model.InstrumentPart;
public class TempoChangeListener implements SeekBar.OnSeekBarChangeListener {
private TheApplication app;
private TextView tempoText;... |
Java | UTF-8 | 18,516 | 1.695313 | 2 | [] | no_license | /*
*
*/
package com.indra.iquality.dao.jdbctemplateimplem;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMap... |
Java | UTF-8 | 15,385 | 1.851563 | 2 | [] | no_license | package com.taca.boombuy.net;
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.to... |
Java | UTF-8 | 977 | 2 | 2 | [] | no_license | package com.example.internetshop.controllers;
import com.example.internetshop.FormFilter;
import com.example.internetshop.entities.Product;
import com.example.internetshop.repositories.ProductRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
im... |
Markdown | UTF-8 | 9,184 | 2.984375 | 3 | [] | no_license | ---
layout: post
title: 第二百一十七节 符富卷入了调查工作
category: 4
path: 2011-12-12-4-21700.md
tag: [normal]
---
万里辉已经习惯了符不二家有一屋子人的情景了。符不二是村长,家里等于是半个村公所。村里的百姓来办事的,说话的,甚至还要喊冤的。基本上每天川流不息。虽然村里盖了还算气派的村公所,但是老百姓还是习惯抬腿就上村长家来办事。
屋子里聚集这么一堆人中间站起个伏波军的士兵给他敬礼,才让他有点意外军队放假了么?
“这是符富,在伏波军当兵。”符不二赶紧介绍道,符富突然从军队里回来让他吃了一惊,这小子莫非是当了逃兵?这可要连累死他了!想到前阶段他还去... |
Java | UTF-8 | 2,512 | 2.671875 | 3 | [] | no_license | package com.team5.game.tools;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GameState implements Serializable {
private static GameState instance;
private int difficulty;
private int currentHealth;
private float playerX;
pri... |
Java | UTF-8 | 736 | 1.8125 | 2 | [] | no_license | package pomPages.todoLy;
import controls.Button;
import controls.TextBox;
import org.openqa.selenium.By;
public class TodoistLogin {
public TextBox emailTextBox = new TextBox(By.xpath("//input[@class=\"input_email\"]"));
public Button registrarEmailButton = new Button(By.xpath("//button[@id=\"step_one_submit... |
Java | UTF-8 | 2,761 | 2.296875 | 2 | [] | no_license | package com.zhihuishu.springboot.springboothello;
import com.zhihuishu.springboot.springboothello.test.bean.Person;
import com.zhihuishu.springboot.springboothello.test.controller.HelloWorldController;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.fac... |
PHP | UTF-8 | 3,227 | 2.8125 | 3 | [] | no_license | <?php
/**
* File for class DHLStructCancelPickupRequest
* @package DHL
* @subpackage Structs
* @author WsdlToPhp Team <contact@wsdltophp.com>
* @version 20150429-01
* @date 2016-03-21
*/
/**
* This class stands for DHLStructCancelPickupRequest originally named CancelPickupRequest
* Documentation : The data for... |
Markdown | UTF-8 | 4,925 | 2.71875 | 3 | [] | no_license | ---
description: "Easiest Way to Make Quick Pumpkin Dog Biscuits"
title: "Easiest Way to Make Quick Pumpkin Dog Biscuits"
slug: 1464-easiest-way-to-make-quick-pumpkin-dog-biscuits
date: 2020-05-27T09:40:59.009Z
image: https://img-global.cpcdn.com/recipes/6540781627113472/751x532cq70/pumpkin-dog-biscuits-recipe-main-pho... |
PHP | UTF-8 | 2,725 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Sobit\SudokuChecker\Sudoku;
use Sobit\SudokuChecker\Factory\SudokuBoxFactory;
use Sobit\SudokuChecker\Factory\SudokuColumnFactory;
use Sobit\SudokuChecker\Factory\SudokuRowFactory;
use Sobit\SudokuChecker\Helper\ArrayHelper;
use Sobit\SudokuChecker\Validator\DimensionValidator;
/**
* Class Sudoku
*... |
Java | UTF-8 | 285 | 2.203125 | 2 | [] | no_license | import com.ssau.btc.sys.CurrentPriceProvider;
import org.junit.Test;
/**
* Author: Sergey42
* Date: 05.04.14 18:24
*/
public class CurrentPriceTest {
@Test
public void run() {
System.out.println(new CurrentPriceProvider().getCurrentPrice());
}
}
|
JavaScript | UTF-8 | 399 | 4.03125 | 4 | [] | no_license | // triangle.js
//
// Write a triangle on the console
for (let i = 0, pound = ""; i < 7; i++) {
console.log(pound += "#");
}
// NOTE: The above could also be done using the padStart method built into
// strings on an empty string (e.g. "".padStart(i,"#") == "#####") when i = 5)
// or with the repeat method (e.g. "... |
Java | UTF-8 | 1,005 | 3.375 | 3 | [] | no_license | package com.ocalessons.lesson13;
public class Lesson13 {
public void lesson13() {
System.out.println("Start Lesson 13");
int aa;
for (int i = 0; i < 9; i++) {
switchMounth(i);
}
}
public void switchMounth(int a) {
switch (a) {
case 1:
... |
C# | UTF-8 | 1,861 | 2.609375 | 3 | [
"MS-PL"
] | permissive | //===============================================================================================================
// System : Personal Data Interchange Classes
// File : CardKind.cs
// Author : Eric Woodruff (Eric@EWoodruff.us)
// Updated : 12/20/2019
// Note : Copyright 2019, Eric Woodruff, All rights reserv... |
Python | UTF-8 | 890 | 3.40625 | 3 | [] | no_license | from Tkinter import *
class Application(Frame):
def __init__(self, master):
Frame.__init__(self, master)
self.grid()
self.bttn_clicks = 0
self.create_widgets()
def create_widgets(self):
self.lbl = Label(self, text="Click to increment!")
self.lbl.grid()
... |
JavaScript | UTF-8 | 2,556 | 2.953125 | 3 | [
"MIT"
] | permissive | var App = {
foods: [],
dataUrl: 'http://joefearnley.com/slow-carb-search/data/foods.json',
init: function () {
this.fetchFoods();
},
fetchFoods: function() {
var self = this;
$.get(self.dataUrl).done(function(response) {
self.foods = response;
self.sho... |
PHP | UTF-8 | 1,952 | 2.671875 | 3 | [] | no_license | <?php
/**
* The primary tool for the plugin.
*
* @since {{VERSION}}
*/
defined( 'ABSPATH' ) || die();
class WCM_GAP_Tool {
/**
* WCM_GAP_Tool constructor.
*
* @since {{VERSION}}
*/
function __construct() {
add_action( 'current_screen', array( $this, 'screen_actions' ) );
add_action( 'wp_ajax_wcm_g... |
Markdown | UTF-8 | 26,810 | 2.734375 | 3 | [] | no_license | ---
layout: default
title: "Spring Boot Recipes"
---
# Spring Boot Recipes
{:.no_toc}
* TOC
{:toc}
## Overview
These are my notes from the book [Spring Boot 2 Recipes: A Problem-Solution Approach](https://www.amazon.ca/dp/1484239628). I highly recommend this book to anyone who is already somewhat familiar with the ... |
Python | UTF-8 | 270 | 3 | 3 | [] | no_license | class Solution:
def isSubsequence(self, short: str, long: str) -> bool:
if not short: return True
i = 0
for ch in long:
if ch == short[i]:
i += 1
if i == len(short): return True
return False |
C++ | UTF-8 | 480 | 2.5625 | 3 | [] | no_license | /*
TASK:White Eye
LANG: CPP
AUTHOR: KersW
SCHOOL: RYW
*/
#include<bits/stdc++.h>
using namespace std;
stack<int> st;
int main()
{
int n,m,i,j;
char a ;
scanf("%d %d",&n,&m);
for(i=0;i<n+m;i++){
scanf(" %c",&a);
if(a=='A'){
scanf("%d",&j);
while(!st... |
Java | UTF-8 | 1,265 | 3.53125 | 4 | [] | no_license | package com.clear.thread;
/**
* ClassName DeadLock
*
* @author qml
* Date 2021/1/25 11:52
* Version 1.0
**/
public class DeadLock {
private static final String read_lock=new String();
private static final String write_lock=new String();
private void read(){
synchronized (read_lock){
... |
Markdown | UTF-8 | 5,016 | 2.765625 | 3 | [] | no_license | # ViiMU - Varolii Member Utility
## About
This utility was created to allow you to ADD, UPDATE, DELETE members using data in csv format.
##Installation
Note - ViiMU requires suds. [SUDS](https://fedorahosted.org/suds/)
pip install suds
git clone https://github.com/tpe11etier/viimu.git
Once installed you'l... |
Java | WINDOWS-1251 | 2,413 | 2 | 2 | [] | no_license | package old.com.hps.july.sync.msaccess.adapters;
import java.sql.*;
import old.com.hps.july.sync.*;
import com.hps.july.cdbc.lib.CDBCResultSet;
/**
* @author Ildar
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creat... |
Java | UTF-8 | 649 | 2.875 | 3 | [] | no_license |
class c8258096 {
private String encryptPassword(String password) throws NoSuchAlgorithmException {
StringBuffer encryptedPassword = new StringBuffer();
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.reset();
md5.update(password.getBytes());
byte digest[] = md5.... |
Markdown | UTF-8 | 4,565 | 2.859375 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: include file
description: include file
services: logic-apps
author: ecfan
ms.service: logic-apps
ms.topic: include
ms.date: 05/15/2018
ms.author: estfan
ms.custom: include file
---
* If you're using Azure SQL Database, follow the steps under
[Connect to Azure SQL Database](#connect-azure-sql-db). ... |
Python | UTF-8 | 116 | 2.640625 | 3 | [
"MIT"
] | permissive | def say_hello():
print('Hello')
class Astronaut:
name = 'José Jiménez'
jose = Astronaut()
say_hello()
# Hello
|
JavaScript | UTF-8 | 2,062 | 3.265625 | 3 | [] | no_license | /***************************
*
* CHILLI+GARLIC
* MODEL: Faves.js
*
***************************/
/***************************
*
* Faves object
* Methods:
* isFave(recipeID)
* persistFaves()
* restoresFaves()
* addFave
* removeFave
* Properties:
* faveList: array of fave obje... |
PHP | UTF-8 | 2,492 | 2.765625 | 3 | [] | no_license | <?php
include("class_mysql.php");
$db = new MYSQL();
//// GET SUBCATEGORIES
if(isset($_GET['cat_id']) && is_numeric($_GET['cat_id']))
{
if($db->connect_db())
{
$cat_id = $db->escape_chars($_GET['cat_id']);
$sql = "SELECT * FROM subcategories WHERE cat_id ='".$cat_id."' ORDER BY subcat_name";
$result = $db->q... |
C | UTF-8 | 4,352 | 4.21875 | 4 | [] | no_license | /*
NAME-Saurav ROLL-1601CS41 DATE-21st march 2017
The aim of the program is to implement a singely linked list and sort it using its height and weight
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//defining the strucure of the node
typedef struct node {
char roll[10];
int ht;
int wt... |
SQL | UTF-8 | 4,116 | 3.890625 | 4 | [] | no_license | -- Организация
-- id первичный ключ
-- name название организации
-- full_name полное название организации
-- inn ИНН
-- kpp КПП
-- address адрес
-- phone телефон
-- is_active признак активности
-- version оптимистичная блокировка
CREATE TABLE IF NOT EXIS... |
Markdown | UTF-8 | 807 | 3.46875 | 3 | [] | no_license | ## jQuery namespace ('jQuery' and '\$')
jQuery is the starting point for writing any jQuery code. It can be used as a function jQuery(...) or a variable jQuery.foo. \$ is an alias for jQuery and the two can usually be interchanged for each other (except where
`jQuery.noConflict()`; has been used - see Avoiding namespa... |
Markdown | WINDOWS-1252 | 7,345 | 3.15625 | 3 | [] | no_license | ---
title: "**Peer Assessment 1 in Reproducible Research**"
output: html_document
---
- Author: GL
- Date: 05/16/2015
## 1. Introduction
It is now possible to collect a large amount of data about personal movement using activity monitoring devices such as a Fitbit, Nike Fuelband, or Jawbone Up. These type of device... |
Python | UTF-8 | 455 | 3.734375 | 4 | [] | no_license | # Tree walking
import os
for dirpath, dirname, files in os.walk("mydir"):
print(dirpath, " : ", dirname, " : ", files)
def printdirandfile(dirname):
for dirpath, dirnames, files in os.walk(dirname):
print(dirpath)
for file in files:
print(" L ", file)
... |
Java | UTF-8 | 2,595 | 2.21875 | 2 | [] | no_license | package io.github.tanu31195.audionirvana;
public class Earphone {
private String model;
private String type;
private String back;
private boolean wireless;
private boolean portable;
private String comfort;
private String sound;
private String noiseCancelling;
private String frequenc... |
Swift | UTF-8 | 2,351 | 2.5625 | 3 | [
"MIT"
] | permissive | //
// Container.swift
// Bright
//
// Created by Roman on 29.06.2020.
//
import AppKit
import Swinject
import RxSwift
import SwiftUI
private struct DisplayBrightnessServiceEnvironmentKey: EnvironmentKey {
static var defaultValue: DisplayBrightnessService?
}
extension EnvironmentValues {
var displayBrightn... |
Python | UTF-8 | 1,544 | 3.078125 | 3 | [
"MIT"
] | permissive | """
Requirements Files Extensions
=============================
By default ``pip-compile-multi`` compiles ``*.txt`` from ``*.in`` files.
While this is a common naming pattern, each project can use it's own:
.. code-block:: text
-i, --in-ext TEXT File extension of input files
-o, --out-ext TEXT File ... |
Ruby | UTF-8 | 1,743 | 2.671875 | 3 | [] | no_license | class AlignmentCodonCost < ActiveRecord::Base
belongs_to :alignment_codon
belongs_to :condition
belongs_to :cost_type
validates_presence_of :alignment_codon_id, :condition_id, :cost_type_id, :mean
validates_uniqueness_of :alignment_codon_id, :scope => [:condition_id, :cost_type_id]
def self.create_from_c... |
Java | UTF-8 | 1,174 | 2.46875 | 2 | [
"Apache-2.0"
] | permissive | package com.mytaxi.domainobject;
import javax.persistence.*;
@Entity
@Table(name = "manufacture")
public class ManufatureDO {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "pk_manufatureId")
private Long id;
@Column(name = "ManufactureName")
private String name;
... |
Markdown | UTF-8 | 1,373 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | [](https://jitpack.io/#snarks/OpenRange)
# OpenRange
Open ended version of Kotlin's `ClosedRange` class
## Usage
Get a range that covers the value `512` _and lower_:
```kotlin
val range: OpenRange<Int> = lessOrEqual(512)
assertTrue(0 in range)
assertTrue(512 in r... |
Markdown | UTF-8 | 512 | 2.890625 | 3 | [] | no_license | - [x] Start stage 1 of the project:heart:
- [x] Complete stage 1 of the project
- [x] Finish my changes
- [x] Push my commits to GitHub
- [x] Start stage 2 of the project
- [X] Complete stage 2
- [X] Start stage 3 of the project
- [X] Complete stage 3
- [X] Start stage 4 of the project
- [X] Complete stage 4. P.S. I a... |
Java | UTF-8 | 2,884 | 2.96875 | 3 | [] | no_license | package org.seeker.swing.stock.util;
import java.util.List;
import java.util.Vector;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
@SuppressWarnings("serial")
public class TableTools extends... |
Java | UTF-8 | 838 | 2.578125 | 3 | [] | no_license | import java.net.URL;
import java.net.URLClassLoader;
public class PluginManager {
private final String pluginRootDirectory;
public PluginManager(String pluginRootDirectory) {
this.pluginRootDirectory = pluginRootDirectory;
}
public Plugin load(String pluginName, String pluginClassName) {
... |
Java | UTF-8 | 2,195 | 2.15625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2014-2021 Web Firm Framework
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
Java | UTF-8 | 3,028 | 1.820313 | 2 | [] | no_license | package com.nieyue.controller.test;
import static org.junit.Assert.fail;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcR... |
JavaScript | UTF-8 | 1,406 | 2.859375 | 3 | [] | no_license | import gsap from "gsap";
export default class Image {
constructor(el) {
this.DOM = {
el: el
};
this.next = false;
this.arrImage = [];
this.DOM.image1 = this.DOM.el.querySelector("img:nth-child(1)");
this.DOM.image2 = this.DOM.el.querySelector("img:nth-child(2)");
this.DOM.images = t... |
Shell | UTF-8 | 249 | 2.8125 | 3 | [] | no_license | #!/bin/bash
if [[ $(uname -a) =~ Android ]]; then
curl -s "https://www.dict.cc/german-english/$1.html" \
|html2text \
|sed -n '/Tabular\ list/,/back\ to\ top/p' \
|less
else
google -w "https://www.dict.cc/german-english/$1.html"
fi
|
Java | UTF-8 | 338 | 2.34375 | 2 | [] | no_license | package cs160_wk9_le2;
public class Player {
//members
public String name;
public PlayerClass playerClass;
int health;
String race;
int xp;
Milestone[] completedMilestones;
//constructor
public Player(String n, PlayerClass pC, int h, String r, int x) {
name = n;
playerClass = pC;
health = h;
race = ... |
C# | UTF-8 | 6,434 | 2.640625 | 3 | [] | no_license | using System.Text.RegularExpressions;
using DocHound.Interfaces;
using Markdig;
using Markdig.Extensions.AutoIdentifiers;
namespace DocHound.TopicRenderers.Markdown
{
public class MarkdownTopicRenderer : ITopicRenderer
{
public string RenderToHtml(TopicInformation topic, string imageRootUrl = "", ISet... |
Python | UTF-8 | 4,184 | 3.171875 | 3 | [] | no_license | import math
import itertools
from raise_helper import *
from position import Position, BB_AMT, SB_AMT
class Player:
def __init__(self, pos):
self.pos = pos
self.stack = 100
self.folded = False
self.has_option = True
invested = {
Position.BB: BB_AMT,
P... |
C++ | UTF-8 | 798 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | // dynamic programming | coin change | C++
// Part of Cosmos by OpenGenus Foundation
#include <iostream>
#include <vector>
const int MAX = 100;
int coinWays(int amt, std::vector<int>& coins)
{
// init the dp table
std::vector<int> dp(MAX, 0);
int n = coins.size();
dp[0] = 1; // base case
for (int... |
C# | UTF-8 | 2,274 | 2.71875 | 3 | [] | no_license | using System;
using System.Threading;
using System.Windows.Media;
namespace Lab7.Model
{
internal class PlayerThread : IDisposable
{
private bool _isPlay;
private bool _isStop;
private bool _isInterrupt;
private readonly AutoResetEvent _ar = new AutoResetEvent(false);
... |
PHP | UTF-8 | 4,510 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Dress;
class DressController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$vestiti = Dress::all();
$data = [
... |
SQL | UTF-8 | 11,158 | 3.6875 | 4 | [] | no_license |
-- 获取2020年的客户项目负责人数据
drop temporary table if exists test.cusitem_person;
create temporary table if not exists test.cusitem_person
select
start_dt
,end_dt
,concat(bi_cuscode,item_code,cbustype) as matchid
,areadirector
,cverifier
from edw.x_cusitem_person
where start_dt >= '2020-01-01';
alter tab... |
Markdown | UTF-8 | 1,178 | 3.328125 | 3 | [] | no_license | # cs546-Final-Project
## Setup:
Bring terminal to root project folder. Run "npm install" to get requisite packages.
Run "node ./tasks/seed.js" to seed the database with example posts.
Run "npm start" to start the web server, and connect in a browser by going to localhost:3000.
## Usage:
Homepa... |
C++ | UTF-8 | 3,434 | 2.859375 | 3 | [
"MIT"
] | permissive | /*=============================================================================
Win32ConsoleStream.cpp
Project: Sonata Engine
Author: Julien Delezenne
=============================================================================*/
#include "Core/IO/ConsoleStream.h"
#include "Core/Exception/ArgumentNullException.h"
#in... |
Java | UTF-8 | 5,106 | 2.296875 | 2 | [] | no_license | package org.softuni.main.casebook.handlers.dynamic;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.softuni.main.casebook.annotations.ApplicationRequestHandler;
import org.softuni.main.casebook.annotations.Get;
import org.softuni.main.casebook.annotations.Post;
import org.softuni.mai... |
C | GB18030 | 17,735 | 2.59375 | 3 | [] | no_license | #include "header.h"
#include <stdio.h>
#include<string.h>
#define N 6
operatedata userdata;
extern char *wday[] ;
extern struct tt * p;
FILE *number;
int vipnumber=N;
people * VipList()
{
FILE *fp;
int i;
if((fp=fopen("vip.txt","r"))==NULL)
{
printf("ļʧ\n");
exit(0);
... |
Go | UTF-8 | 2,429 | 2.703125 | 3 | [] | no_license | // storeResultsFunctionTesting
package main
import (
"database/sql"
"errors"
"fmt"
//"strconv"
_ "github.com/go-sql-driver/mysql"
)
type Submission struct {
courseName string
assignmentName string
userName string
userID int
sourceName string // without .cpp, call... |
Python | UTF-8 | 476 | 3.75 | 4 | [] | no_license | #!/usr/bin/env python
#
# A palindromic number reads the same both ways. The largest palindrome made
# from the product of two 2-digit numbers is 9009 = 91 99.
#
# Find the largest palindrome made from the product of two 3-digit numbers.
#
from euler.util import is_palindrome
def run():
L = []
for i in rev... |
C | UTF-8 | 1,746 | 3.21875 | 3 | [] | no_license | /*
** main.c for main in /home/pion_b/CPE_2015_getnextline
**
** Made by Virgile Pion
** Login <pion_b@epitech.net>
**
** Started on Mon Jan 4 10:53:25 2016 Virgile Pion
** Last update Sun Jan 22 01:34:39 2017 Virgile
*/
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <... |
JavaScript | UTF-8 | 289 | 2.796875 | 3 | [] | no_license | // console.log(this);
const kibria = {
id: 101,
name: "Rj Kibriya",
major: 'mathematics',
isRich: false,
money: 5000,
treatDey: function (expense, boksis) {
this.money = this.money - expense - boksis
console.log(this);
return this.money
}
} |
Ruby | UTF-8 | 763 | 3.25 | 3 | [] | no_license | class User
attr_reader :age
def initialize(hash)
@name = hash[:name]
@age = hash[:age]
end
def name
if @name
@name
else
puts "a girl has no name"
end
end
def plants
self.user_plants.map do |user_plant|
user_p... |
Python | UTF-8 | 2,379 | 3.546875 | 4 | [] | no_license | #crawl web https://www.udacity.com/cs101x/index.html
import urllib
import time
#1) get the urls of a web page
def geturls(url): # get the first/next link in source code of variable "page"
page = urllib.urlopen(url).read()
linklist = []
start_link = page.find('<a href=')
while start_link ... |
Python | UTF-8 | 1,070 | 2.8125 | 3 | [] | no_license | from tkinter import *
from tkinter import filedialog,messagebox
root = Tk()
root.geometry('300x300')
root.title('encrypt/decrypt')
def encdec():
f1 = filedialog.askopenfile(mode='r', filetype=[ ('png file', '*.png'),('jpg file', '*.jpg'), ('mp3 file', '*.mp3'), ('video file', '*.mp4'), ('mkv file', '*.mkv'), ('gi... |
C++ | UTF-8 | 197 | 2.921875 | 3 | [] | no_license | #include <iostream>
using namespace std;
int Count(int x){
for (int i=1;i<=16;i=i<<1){
x=x^(x>>i);
}
return x&1;
}
int main(){
int x;
while (cin>>x){
cout<<Count(x)<<endl;
}
return 0;
} |
Java | UTF-8 | 1,162 | 3.828125 | 4 | [] | no_license | package data_structure.queue;
public class ListQueue<T> {
private QueueNode<T> front;
private QueueNode<T> rear;
public ListQueue() {
this.front = null;
this.front = null;
}
public void enQueue(T item) {
QueueNode<T> node = new QueueNode<>(item);
if(isEmpty()){
... |
Java | UTF-8 | 907 | 2.59375 | 3 | [] | no_license | package com.howie.java.request;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* Created with IntelliJ IDEA
*
* @Author yua... |
C# | UTF-8 | 1,089 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | using CreateUserFields.Domain;
using SimpleQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CreateUserFields.Infra
{
public class SettingRepository : ISettingRepository
{
private IDataConnection _dataConnec... |
Python | UTF-8 | 1,120 | 3.3125 | 3 | [] | no_license | #!/usr/bin/env python
import sys
S = 4
x_won = "X won"
o_won = "O won"
draw = "Draw"
not_completed = "Game has not completed"
def solve(board):
ways = []
ways.append([ (j, j) for j in xrange(S) ])
ways.append([ (j, S - j - 1) for j in xrange(S) ])
for i in xrange(S):
ways.append([ (i, j) for ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.