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
11,429
2.6875
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: Ativar o acesso de leitura público para contentores e blobs no armazenamento de Blobs do Azure | Documentos da Microsoft description: Saiba como tornar disponível para acesso anónimo a contentores e blobs e como devem ser acessados por meio de programação. services: storage author: tamram ms.service: storage...
C
UTF-8
2,508
3.15625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <errno.h> #ifdef _MSC_VER #include <direct.h> #endif #include "../feat2macros.h" int mkdir_wrapper(const char* buff) { /* catch MSC compiler; this does not support the POSIX-style mkdir */ #ifdef _MSC_VER return _mkdir(buff);...
C++
UTF-8
344
2.65625
3
[]
no_license
#ifndef SLLNODE_H #define SLLNODE_H using namespace std; class SllNode { public: SllNode(); virtual ~SllNode(); int getData(); bool setData(int); SllNode* getNextPtr(); bool setNextPtr(SllNode*); protected: private: int data; SllNode* next; ...
C#
UTF-8
1,047
2.984375
3
[]
no_license
using System; namespace AggregateSource.Testing { /// <summary> /// The given-when-then test specification builder bootstrapper. /// </summary> public class Scenario : IGivenStateBuilder { /// <summary> /// Given the following events occured. /// </summary> /// <param name="id">The aggregate t...
Shell
UTF-8
395
3.125
3
[]
no_license
#!/bin/bash if [ $# -ne 3 ] then echo "Usage: ./genACC <tgt_name> <tmp_root> <home_root>" exit fi # ---- get arguments ----# tgt_name=$1 tmp_root=$2 home_root=$3 # ---- process -----# ACCPred=$home_root/util/ACC_Predict/acc_pred $ACCPred $tmp_root/$tgt_name.hhm $tmp_root/$tgt_name.ss2 $tmp_root/$tgt_n...
Java
UTF-8
1,114
2.40625
2
[]
no_license
@Test public void testProxyWithRequestContentAndResponseContent() throws Exception { startServer(new HttpServlet() { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if...
JavaScript
UTF-8
3,496
2.96875
3
[]
no_license
//传入一个object export default function combineReducers(reducers){ //获取该object的key值 const reducerKeys = Object.keys(reducers) //过滤后的reducers const finalReducers = {} //获取每一个key对应的value //在开发环境下判断是不是undefined //然后将值类型是函数的值放入finalreducers for(let i = 0;i<reducerKeys.length;i++){ const...
Java
UTF-8
1,234
2.25
2
[ "Apache-2.0" ]
permissive
package com.audio.player.databases; import android.app.Application; import com.audio.player.databases.dao.AudioBookChapterDao; import com.audio.player.databases.dao.AudioBookProgressDao; import com.audio.player.databases.table.AudioBookChapter; import com.audio.player.databases.table.AudioBookProgress; import com.aud...
Go
UTF-8
2,828
3.21875
3
[]
no_license
package monit import ( "encoding/json" "fmt" "strconv" "strings" ) const ( // Underline constant Underline = "\n================================\n" // NotAvailable constant NotAvailable = "N.A" // Byte size Byte = 1.0 // KiloByte size KiloByte = 1024 * Byte // MegaByte size MegaByte = 1024 * KiloByte /...
Java
UTF-8
1,495
2.421875
2
[]
no_license
package on2021_08.on2021_08_25_AtCoder___AtCoder_Beginner_Contest_214.F___Substrings; import template.io.FastInput; import template.io.FastOutput; import template.primitve.generated.graph.LongDijkstraMinimumCostFlow; import template.utils.Debug; import java.util.Arrays; public class FSubstrings { int mod = (in...
JavaScript
UTF-8
2,253
2.546875
3
[ "MIT" ]
permissive
const gfm = require('..'); const { convert, convertUnsafe } = gfm; const assert = require('assert'); it('passing empty string', () => { assert.equal(convert(''), ''); }); it('strikethrough', () => { assert.equal(convert('# Hi\nThis ~text~~~~ is ~~~~curious 😡🙉🙈~.'), '<h1>Hi</h1>\n<p>This <del>text</del> is <de...
Python
UTF-8
520
2.59375
3
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
from django.db import models from django.utils import timezone from datetime import datetime, timedelta class Item(models.Model): name = models.CharField(max_length=30) price = models.IntegerField() image = models.ImageField(upload_to="webpage/images/items/") dato = models.DateTimeField(default=timez...
Java
UTF-8
426
2.125
2
[]
no_license
package nl.hu.prbed.airline.flightroute.presentation.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "No such flightroute") public class FlightRouteNotFoundHTTPException extends RuntimeExceptio...
JavaScript
UTF-8
1,576
2.921875
3
[]
no_license
App.filter('toShortDate', function () { return function (t) { if (!t || !moment(t).isValid()) { return '-'; } else { var year = moment(t).get('year'); var month = moment(t).get('month') + 1; var day = moment(t).get('date'); v...
Python
UTF-8
4,001
2.59375
3
[ "Apache-2.0" ]
permissive
# Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp import re import time import numpy as np from mmdet.datasets import DATASETS from .base_sot_dataset import BaseSOTDataset @DATASETS.register_module() class OTB100Dataset(BaseSOTDataset): """OTB100 dataset of single object tracking. ...
Java
UTF-8
533
2.84375
3
[]
no_license
package singleton; /** * @author raguiarperez */ public class Singleton { public static void main(String[] args) { NewSingleton obx1 = NewSingleton.Instanciar(); NewSingleton obx2 = NewSingleton.Instanciar(); obx1.setNombre("carlos"); obx1.setApellido("Gomez"); ...
Markdown
UTF-8
365
2.546875
3
[]
no_license
# Automated tweeting ## :point_right: This project was created for my personal needs but might help you too:point_left:<br> ### Using Selenium automation tool in **Python** the app opens my personal Video portfolio on stock website **Pond5**, picks 10 random video clips from my whole portfolio, and tweets links to ea...
Markdown
UTF-8
742
2.765625
3
[]
no_license
# tarification Le projet met en place un model flexible qui implémente les différents schémas de tarification présentés dans l'exercie, et est capable de recevoir assez facilement d'autres schémas de tarification. pour le faire il faut: - Etendre le model de base des tarifications et définir les propriétés en plus du...
SQL
UTF-8
918
4.53125
5
[]
no_license
#8. What query would you run to get a list of client names and the total # of leads we've generated for each of our clients' #sites between January 1, 2011 to December 31, 2011? #Order this query by client id. #Come up with a second query that shows all the clients, the site name(s), and the total number of leads g...
Markdown
UTF-8
555
3.625
4
[]
no_license
# GCI-Fedora-Project _Google Code-In 2019:_ In this GCI Task by Fedora Project, we were tasked to create a simple program that returns the number of divisors a number has in a given range. Examples: 1. input: 5, output: 5 is divisible by 2 numbers 2. input: 10, output: 10 is divisible by 4 numbers I chose to comple...
PHP
UTF-8
6,234
2.71875
3
[]
no_license
<?php require_once "conexion.php"; class ModeloAcumuladoMensual{ /*============================================= MOSTRAR Acumulado =============================================*/ static public function mdlMostrarReportAcumuladoMensual($tabla, $item, $valor){ $stmt = Conexion::conectar()->prepare("SELEC...
Java
UTF-8
1,857
2.9375
3
[]
no_license
package crono.inf; import java.util.*; public class InfTriple { private InfClass subject; private InfClass predicate; private InfClass object; private boolean entailed; //constructors public InfTriple() { this.subject = new InfClass(); this.predicate = new InfClass(); this.object = new InfClass(); t...
Markdown
UTF-8
2,750
2.578125
3
[ "MIT" ]
permissive
# alicloud_slb_master_slave_server_group [back](../alicloud.md) ### Index - [Example Usage](#example-usage) - [Variables](#variables) - [Resource](#resource) - [Outputs](#outputs) ### Terraform ```terraform terraform { required_providers { alicloud = ">= 1.120.0" } } ``` [top](#index) ### Example Usage ...
TypeScript
UTF-8
1,910
2.546875
3
[]
no_license
import {Injectable} from '@angular/core'; import {Observable} from 'rxjs'; import {HttpClient} from '@angular/common/http'; import {Proveedor} from './proveedor'; import { environment } from '../../environments/environment'; const API_URL = environment.apiURL; const proveedores = '/proveedores'; import { ProveedorDet...
C#
UTF-8
1,151
2.796875
3
[ "BSD-2-Clause" ]
permissive
using System; namespace Jint { public class EvalCodeScope : IDisposable { private readonly bool _eval; private readonly bool _force; private readonly int _forcedRefCount; private static int _refCount; public EvalCodeScope(bool eval = true, bool force = false) ...
Python
UTF-8
2,097
2.71875
3
[]
no_license
import datetime as dt import xlrd import xlutils as xlutils import xlwt """ 在 xlutils的init文件中导入这些功能才能使用 from .compat import * from .copy import * from .display import * from .filter import * from .margins import * from .save import * from .styles import * from .view import * """ import time class connect_excel: ...
Java
UTF-8
1,381
2.96875
3
[]
no_license
package br.ufc.quixada.cripto; import java.io.File; import java.security.PrivateKey; import java.security.PublicKey; import br.ufc.quixada.cripto.GeradorChave; public class Main { public static void main(String[] args) throws Exception{ // -- Gera o par de chaves, em dois arquivos (chave.publica e // chave....
Java
UTF-8
1,142
3.921875
4
[]
no_license
package com.company.day4.Functinal_Interface; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.IntFunction; import java.util.function.ToIntFunction; /** * Function 계열 * - Mapping: 입력 -> 출력의 Mapping을 하는 함수형 인터페이스 * - 입력 타입과 출력 타입은 다를 수 있다. */ public class Functio...
Java
ISO-8859-7
244
2.171875
2
[]
no_license
package com.test8; public class test { public static void main(String[] args) { // TODO Auto-generated method stub Cat c = new Cat(); c.setName(""); c.setAge(2); c.setSex(''); c.setType("è"); c.ShowData(); } }
Python
UTF-8
261
4.3125
4
[]
no_license
name = "Mike" # f stringという昨日を使う message = f"ようこそ、{name}さん" # 表示して確認 print(message) name2 = "Kate" age = 18 # 複数の変数がある場合(数字もそのまま使える) print(f"{name2}は、{age}歳です")
JavaScript
UTF-8
1,809
2.75
3
[ "MIT" ]
permissive
/* * This is not a reusable component. * This is a simple pattern and should serve as a base * for development of custom components that intelligently * render children based on user input or certain logic */ import React, { Component } from 'react'; import Registry from '../utils/Registry'; import BaseComponent ...
Ruby
UTF-8
450
2.71875
3
[]
no_license
require './test/test_helper' class CardTest < Minitest::Test def test_it_belongs_to_a_suit card = Card.new("2", "heart") assert Card.suits.include?(card.suit) assert_equal "heart", card.suit end def test_it_has_a_rank card = Card.new("2", "heart") assert Card.ranks.include?(card.rank) ...
Markdown
UTF-8
27,405
2.671875
3
[]
no_license
# 为什么一定要拼尽全力考上985、211大学? - 算法与数学之美 - CSDN博客 2018年12月06日 21:00:00[算法与数学之美](https://me.csdn.net/FnqTyr45)阅读数:216 ![640?wx_fmt=jpeg](https://ss.csdn.net/p?https://mmbiz.qpic.cn/mmbiz_jpg/951TjTgiabkwogJo5acNzjxMGMdVcOeZxUWtPiaEQ2k2ibjoFtLMKnhOLDyXn9P9AZkWvYUuEtiaIbTETuRZUBKLiaw/640?wx_fmt=jpeg) 曾在知乎上看到这样一段话: > 渣学校意味着渣教学,...
Markdown
UTF-8
1,035
3.15625
3
[]
no_license
# realm-android-app O objetivo deste experimento é construir um aplicativo que gerencie quadros de tarefas, utilizando a biblioteca Realm para a persistência dos dados. Para enriquecer ainda mais a experiência, escreveremos a lógica utilizando a linguagem Kotlin. :yum: ### Requisitos mínimos :white_check_mark: * Um q...
C++
UTF-8
1,348
2.84375
3
[]
no_license
#include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> Adafruit_SSD1306 display = Adafruit_SSD1306(128, 32, &Wire); void setup() { Serial.begin(9600); Serial.println("OLED FeatherWing test"); // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally display.b...
Java
UTF-8
644
2.875
3
[]
no_license
package com.aweful.PdfBox; import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; /** * Hello world! * */ public class App { public static void main( String[] args ) throws IOException { System.out.println( "Hello World!" )...
Python
UTF-8
16,061
3.03125
3
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
from aerosandbox import AeroSandboxObject from aerosandbox.geometry.common import * from typing import List, Dict, Any, Union, Tuple, Optional from pathlib import Path import aerosandbox.geometry.mesh_utilities as mesh_utils import copy class Fuselage(AeroSandboxObject): """ Definition for a fuselage or other...
JavaScript
UTF-8
10,565
2.640625
3
[]
no_license
"use strict"; var canvas; var gl; var points = []; var colors = []; var NumTimesToSubdivide = 3; var theta = [-10, 225, 0]; var thetaLoc; var vertices = [vec3( -0.5, -0.5, -0.5), vec3( -0.5, -0.5, 0.5), vec3( -0.5, 0.5, -0.5), vec3( -0.5, 0.5, 0.5), vec3( 0.5, -0.5, -0.5), vec3( 0.5...
Python
UTF-8
22,277
2.890625
3
[]
no_license
# coding:utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt from mountain_car_env import MountainCarEnv from random import sample, seed class GridCoder: ''' 网格编码 ''' def __init__(self, size_arr, obs_low, obs_scale): ''' 不同维度上的网格大小 size_arr ''' ...
Python
UTF-8
10,484
2.75
3
[ "MIT" ]
permissive
#how do we write python code again? import sys #Setup some global values NonPrefixed = False CBPrefixed = False Parenthesies = False Commas = False Curlies = False Numbers = False #replace these letters with the propper values later r = ["REG_B", "REG_C",...
PHP
UTF-8
647
2.59375
3
[]
no_license
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateRestaurantsTable extends Migration { public function up() { Schema::create('restaurants', function(Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->string('name'); $tab...
Java
UTF-8
744
1.890625
2
[]
no_license
package zhiyuan.com.loan.activity; import android.app.Activity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import com.umeng.analytics.MobclickAgent; import zhiyuan.com.loan.R; public class BaseActivity extends Activity { @Override protected void onC...
Java
UTF-8
911
1.953125
2
[]
no_license
package com.cn.wms_system_new.bean; public class FunctionItem { private String title; private String viewType; private String imageName; private String operateName; private int unFinishedNum; public FunctionItem() { } public String getViewType() { return viewType; } public void setViewType(String view...
Python
UTF-8
899
3.296875
3
[]
no_license
# 5kyu # chameleons is int[3], desiredColor is int from 0 to 2 def check_input(chameleons): check = [1 if e == 0 else 0 for e in chameleons] if sum(check) >= 2: return False def chameleon(chameleons, desiredColor): desired, moves = chameleons[desiredColor], 0 if check_input(chameleons) == False: if chameleon...
Java
UTF-8
818
2.34375
2
[]
no_license
package com.lowry.lapspace3; /** * Created by lowry on 04/04/2018. */ public class ClassNotificationDetails { private int company_id; private int lap_id; private String company_name; private String company_image_string; public ClassNotificationDetails(int company_id, int lap_id, String company_...
Java
UTF-8
7,568
2.03125
2
[]
no_license
package com.jiayi.platform.security.gataway.filter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.auth0.jwt.exceptions.TokenExpiredException; import com.jiayi.platform.security.core.dto.JsonObject; import com.jiayi.platform.security.gataway.core.config.AuthCodes; import com.jiayi...
JavaScript
UTF-8
847
3.015625
3
[]
no_license
function MarkdownWidget() { this.italicsRegex = /\*(\w+)\*{1}/gi; this.altItalicsRegex = /\_(\w+)\_/gi; this.boldRegex = /\*\*(\w+)\*\*/gi; }; MarkdownWidget.prototype.italics = function(input) { var text = input; var test = text.replace(this.italicsRegex, "<i> $1 </i>" ); console.log(test); return test;...
Java
UTF-8
281
1.882813
2
[]
no_license
package factory; public class MysqlUserFactory implements IFactory { @Override public IUserOperation getUserOperation() { return new MysqlUser(); } @Override public IProductOperation getProductOperation() { return new SnakeOperation(); } }
Java
UTF-8
682
1.75
2
[]
no_license
package com.huya.dbms.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import com.github.obase.webc.Kits; import com.github.obase.webc.Webc; im...
Python
UTF-8
756
3.703125
4
[]
no_license
""" 二进制和字符串之间的转化 """ def encode(s): return ' '.join([bin(ord(c)).replace('0b', '') for c in s]) def decode(s): return ''.join([chr(i) for i in [int(b, 2) for b in s.split(' ')]]) result = encode('hello') # print('hello 的二进制是:\n', result) results = decode('1101000 1100101 1101100 1101100 1101111') # print('\n...
Java
UTF-8
1,072
2.203125
2
[]
no_license
package me.himi.love.entity.loader.impl; import me.himi.love.IAppService.UploadFaceResponse; import me.himi.love.entity.loader.IUploadFileResponseLoader; import org.json.JSONException; import org.json.JSONObject; /** * @ClassName:LoginedUserLoaderImpl * @author sparklee liduanwei_911@163.com * @date Nov 4, 2014 9...
Python
UTF-8
1,203
3.203125
3
[]
no_license
import math import os import random import re import sys # # Complete the 'countingValleys' function below. # # The function is expected to return an INTEGER. # The function accepts following parameters: # 1. INTEGER steps # 2. STRING path # # def countingValleys(steps, path): # level = 0 # valleys = 0 # ...
JavaScript
UTF-8
868
3.375
3
[]
no_license
var ES6 = React.createClass({ // shortcut to write methods // equivalent to `render: function()` render() { // const allows to declare a variable that cant // change value (that stays 'constant') const x = 1 // [param] => [eval] is a shortcut to write functions // it is an arrow function /...
C
UTF-8
3,851
2.859375
3
[]
no_license
#include <sys/ipc.h> #include <sys/types.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #define TMPFILE "./tmpmatrix.txt" int count_of_alocated_pointers = 0; void ** array_of_alocated_pointers = NU...
JavaScript
UTF-8
371
4.21875
4
[]
no_license
// Take 2 strings s1 and s2 including only letters from ato z. Return a new sorted string, the longest possible, containing distinct letters, // each taken only once - coming from s1 or s2. function longest(s1, s2) { // your code s1 = "aretheyhere"; s2 = "yestheyarehere"; let long = [...new Set(s1 + s2)].sort...
SQL
UTF-8
736
4.25
4
[ "MIT" ]
permissive
CREATE VIEW `constraints` AS SELECT usg.table_schema as table_catalog, usg.table_name as table_name, usg.column_name as referencing_column_name, usg.REFERENCED_TABLE_NAME as referenced_table_name, usg.ORDINAL_POSITION as ordinal_position, usg.RE...
C++
UTF-8
1,164
3.5
4
[]
no_license
#include "Phonebook.hpp" Phonebook::Phonebook() { this->amount = 0; } Phonebook::~Phonebook() { } void Phonebook::add_new_contact(void) { if (this->amount == 8) std::cout << "Contact list is full!\n"; else if (this->contact_list[this->amount].create_contact() == true) this->amount++; } void Phonebook::sho...
C++
UTF-8
979
3.796875
4
[ "MIT" ]
permissive
#include<iostream> #include<string> #include "dna.h" using::std::cout; using::std::cin; using::std::string; /* Write code that prompts user to enter 1 for Get GC Content, or 2 for Get DNA Complement. The program will prompt user for a DNA string and call either get gc content or get dna complement func...
Markdown
UTF-8
1,687
3.34375
3
[ "0BSD" ]
permissive
# As You Wish I really like the _The Princess Bride_ and "as you wish" was the first thing that popped into my head when I was thinking about making decisions. While some might think there's a wholesome or romantic reasoning behind it, I'm certain it's because I'm horrible at making decisions and I'll go along with wh...
Java
UTF-8
7,414
1.648438
2
[]
no_license
package com.ganesh.mahindra.model; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class GetBreakdown { @Id private int id; private int machineId; private String machineNo; private String machineName; private String month; private String date; private String dept; p...
C#
UTF-8
3,657
3.390625
3
[]
no_license
using System; using VirtualCard.Interfaces; namespace VirtualCard { /// <summary> /// An implementation of <see cref="ICard"/> for a virtual payment card /// </summary> public class VirtualCard : ICard { private decimal _currentBalance; private readonly ITransactionResponseFactory ...
TypeScript
UTF-8
572
2.515625
3
[ "MIT" ]
permissive
import request from 'supertest' import {app} from "../../app"; const createJob = (title: string, price: number) => { return request(app) .post('/api/v1/jobs') .set('Cookie', global.login()) .send({ title, price }) } it('can fetch a list of jobs', async () => ...
C
UTF-8
600
3.375
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <stdlib.h> void copy(int fdsrc,int fddst){ char c; int n; while((n = read(fdsrc,&c,1)) != 0) write(fddst,&c,1); } int main(int argc, char const *argv[]){ int tube[2]; // two files descriptors for piping, tube[0] --> reading, tube[1] --> writing int v = pipe(tube)...
PHP
UTF-8
4,431
2.53125
3
[]
no_license
<?php include_once '../../inc/databaseConnection.php'; if (isset($_REQUEST['action'])) { $_REQUEST['action'](); } function getCourier() { global $con; $sql = "select * from courier"; $results = mysqli_query($con, $sql); $temp = array(); while ($result = mysqli_fetch_assoc($results)) { $...
C++
UTF-8
341
3.609375
4
[]
no_license
#include <iostream> using namespace std; class Convert { public : int i; void increment(Convert &obj) { obj.i=obj.i*2; cout << "Value of i in member function : " << obj.i; } }; int main () { Convert obj1; obj1.i=3; obj1.increment(obj1); cout << "\nValue of i in main : " << obj1.i << "\...
JavaScript
UTF-8
3,071
2.703125
3
[]
no_license
import React from 'react'; export default class NewThreads extends React.Component { constructor(props) { super(props); this.state = {}; } componentDidUpdate() { console.log('updated'); } parsePosts = (subreddit) => { const subreddits = JSON.parse(localStorage.getItem('subreddits')); co...
Shell
UTF-8
4,678
3.671875
4
[ "MIT" ]
permissive
#!/bin/bash # script to run a simple load test for a serial key: # 1. Generate 1000 rows with known distribution # 2. Count rows - should be 1000 # 3. Count rows where str column = "a" - should be 100 # 4. Update all rows where str column = "a" # 5. Count rows where str column = "a" - should be 0 # 6. Delete all rows ...
Ruby
UTF-8
3,372
2.640625
3
[]
no_license
class Purchase < ApplicationRecord # relacionamento com o Revendedor belongs_to :user # virtual fields attr_accessor :cpf, :original_value # emun status da compra enum status: [ :in_validation, :approved ] # validações e campos obrigatórios before_validation :set_value, on: [:create, :update] befor...
Markdown
UTF-8
5,032
2.609375
3
[]
no_license
--- description: "Steps to Prepare Award-winning Easy! My Melody Onigiri For Charaben (Decorative Bentos)" title: "Steps to Prepare Award-winning Easy! My Melody Onigiri For Charaben (Decorative Bentos)" slug: 1116-steps-to-prepare-award-winning-easy-my-melody-onigiri-for-charaben-decorative-bentos date: 2020-09-20T11:...
Java
UTF-8
807
3.703125
4
[]
no_license
public class MethodOverloadingArrayAndMatrix { public static void main(String[] args) { int array[] = {2, 5, 6, 8, -5}; int matrix[][] = {{2, 3, 5, 6}, {4, 7, 8, 0}}; System.out.println("sum of the array is -> " + sum(array)); System.out.println("average of ...
PHP
UTF-8
20,057
2.78125
3
[]
no_license
<?php session_start(); include "databse_con.php"; include "helper.php"; $valid_form = false; ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $response = []; if (isset($_POST['endpoint']) && $_POST['endpoint'] == 'image_update') { $ext = pathinfo($_FILES["profileImage"...
C#
UTF-8
1,189
3
3
[ "MIT" ]
permissive
using System; namespace ComponentTask.Internal { internal static class DelegateExtensions { /// <summary> /// Get a diagnostic identifier that best describes this delegate. /// </summary> /// <remarks> /// Only meant for diagnostic purposes, do NOT depend on o...
C++
UTF-8
4,483
2.78125
3
[]
no_license
#include "proxy.hpp" void accept_event_callback(struct ev_loop *loop, struct ev_io *watcher, int revents); void read_event_callback(struct ev_loop *loop, struct ev_io *watcher, int revents); void sql_line_detection_and_processing(char *str); /* *********************************** constructors ******************...
Java
UTF-8
9,137
2.984375
3
[]
no_license
package engine; import engine.exceptions.OutOfBoardBoundariesException; import engine.jaxb.schema.generated.Letter; import javax.xml.soap.Node; import java.awt.*; import java.util.List; import java.util.Random; import java.util.HashMap; import java.util.Map; import java.util.*; public class Board { static cla...
PHP
UTF-8
827
2.859375
3
[]
no_license
<?php class Member extends Eloquent { /** * The database table used by the model. * * @var string */ protected $table = 'members'; protected $fillable = array('id', 'username', 'password', 'nickname', 'email', 'create_at', 'update_at'); public $timestamps = true; /** * 获取用户头像 姓名 IP ...
JavaScript
UTF-8
5,196
2.734375
3
[ "Apache-2.0" ]
permissive
// <<hpp_insert gen/TreeNode.js>> /** * Extend FilterCapableTreeNode by adding support for feedback cycle arrows and solvers. * @typedef DmLinkageTreeNode */ class DmLinkageTreeNode extends FilterCapableNode { constructor(origNode, attribNames, parent) { super(origNode, attribNames, parent); if...
Markdown
UTF-8
2,611
3.25
3
[]
no_license
# pidarr_bot - A telegram bot to control Pidarr This telegram bot is designed to be used with [Pidarr](https://github.com/AdrienCos/pidarr). To build it, run `make` from the root of the repo. To run it, start by settings the following environment variables: | Variable | Contents ...
Shell
UTF-8
623
3.953125
4
[]
no_license
#!/bin/sh # Run this as root if [ "$EUID" -ne 0 ] then echo "Please run as the root user... exiting." exit fi NETWORK="ansible_ovirt_demo_net" ## # Check if the network already exist..if so? remove them # CHECK_NETWORK=`virsh net-list | grep ${NETWORK}` if [ "${CHECK_NETWORK}" != "" ]; then if [ "$1" = 'destr...
Python
UTF-8
706
3.984375
4
[]
no_license
'''Q2 of Assignment 5: Vending machine change calculator Patrick Boroughs 16 April 2014''' cost = eval(input("Enter the cost (in cents):\n")) payment=0 while cost>payment: deposit=eval(input("Deposit a coin or note (in cents):\n")) payment+=deposit if payment>cost: print("Your change is:") chang...
JavaScript
UTF-8
28,083
3.109375
3
[ "MIT" ]
permissive
// DEPENDENCIES var mysql = require("mysql"); const inquirer = require("inquirer"); const cTable = require("console.table"); const fs = require('fs'); //require("dotenv").config(); // CLASSES const Employee = require("./lib/Employee"); // MYSQL SETUP const connection = mysql.createConnection({ host: "localhost", ...
SQL
UTF-8
524
3.09375
3
[]
no_license
database sysmaster; drop database lportal; create database lportal WITH LOG; create procedure 'lportal'.isnull(test_string varchar) returning boolean; IF test_string IS NULL THEN RETURN 't'; ELSE RETURN 'f'; END IF end procedure; create table models_MobilePhone ( id_ int8 not null primary key, name varchar(75), ...
Java
UTF-8
785
1.804688
2
[ "MIT" ]
permissive
package uk.gov.hmcts.ecm.common.model.helper; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @Data @AllArgsConstructor @Builder public class DefaultValues { private String positionType; private String claimantTypeOfClaimant; private String tribunalCorrespondenceAddressLine1; ...
Java
UTF-8
1,291
2.28125
2
[]
no_license
package hazelcast.com.sample; import com.hazelcast.core.EntryEvent; import com.hazelcast.core.EntryListener; import com.hazelcast.core.MapEvent; public class MyMapEntryListener implements EntryListener<Long, Client> { public void entryAdded(EntryEvent<Long, Client> event) { System.out.println("Thread Name: "+Thr...
Java
UTF-8
532
2.6875
3
[]
no_license
package com.Anukul.Vaccination.VaccinationApp.models; public enum AgeLimit { AGE0TO45(0,45), AGE18TO45(18,45), AGE45TO60(45,60), AGE0TOABOVE(0,Integer.MAX_VALUE), AGE60TOABOVE(60,Integer.MAX_VALUE), AGE18TOABOVE(18,Integer.MAX_VALUE), AGE45TOABOVE(45,Integer.MAX_VALUE); Integer minAge; Integer maxAge; ...
PHP
UTF-8
2,251
2.625
3
[]
no_license
<?php //echo 1;die; echo ini_get('max_input_time'); echo ini_get('upload_max_filesize'); include("config/config.php"); if(!isset($_SESSION['uinfoadmin'])) header("Location: login.php"); // Nếu người dùng click Upload if (isset($_POST['submit'])) { // Nếu người dùng có chọn file để upload if (isset($_FILES['fil...
PHP
UTF-8
336
3.3125
3
[]
no_license
<?php echo str_replace("ASP", "PHP", "I love ASP, ASP said"); echo "<br>"; $str = "Line 1\nLine 2\rLine 3\r\nLine 4\n"; $order = array("\r\n", "\n", "\r"); $replace = '<br />'; $newstr = str_replace($order, $replace, $str); echo $newstr; ?...
Shell
UTF-8
95
2.921875
3
[]
no_license
#!/bin/bash # #check whether no is positve # if test $1 -ge 0 then echo "Number is positu" fi
C++
UTF-8
716
2.859375
3
[]
no_license
/** * Author: Lijing Wang * Date: 5/7/2015 */ #pragma once #include "key.hpp" namespace ndn { class Verificator { public: Verificator() { Name identity(IDENTITY_NAME); Name keyName = m_keyChain.getDefaultKeyNameForIdentity(identity); m_publicKey = m_keyChain.getPublicKey(keyName); }; bool ...
Python
UTF-8
1,965
3.140625
3
[]
no_license
#!/usr/bin/python2 import re def detail_file_extract(detail_fp): """ Given file pointer to detail file, extract information into form below: return [{"detail":value, "detail":value, ...}, ...] """ ###################### # Step 1) Build Legend ### # Travel to the legend. for line in ...
Python
UTF-8
651
3.546875
4
[ "MIT" ]
permissive
# Matrix generator module import numpy as np import random as rnd def gen_random_matrix(n): return np.array(np.random.random([n, n])) def gen_diagonally_dominant_matrix(n): matrix = gen_random_matrix(n) sum = 0 for i in range(n): for j in range(n): if i != j: sum...
Markdown
UTF-8
3,607
3.6875
4
[ "MIT" ]
permissive
# Day 8: I Heard You Like Registers The crux of this problem is to be able to parse the instructions and carry them out. The basic data structure used is a Dictionary to hold the registers. The `Dictionary at: ifAbsent:` method is very handy when it comes to incrementing and decrementing registers that have not been...
PHP
UTF-8
609
2.515625
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Transaction extends Model { // Table Name protected $table = 'transactions'; // Primary Key public $primaryKey = 'id'; // Timestamps public $timestamps = true; /** * The attributes that are mass assignable. * ...
C#
UTF-8
3,700
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using MySql.Data.MySqlClient; namespace DMCooking { public partial class Top5 : Form ...
Markdown
UTF-8
504
2.53125
3
[]
no_license
# Sound Distributor A socket-based sound distributor ## How to use ``` $ npm install $ node index.js ``` And point your browser to `http://localhost:3000`. Optionally specify a port by supplying the `PORT` env variable. ## Features Log multiple computers into the site and run the command `startPhase()` in the b...
C++
UTF-8
777
3.359375
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; class MatrixBoard { public: int Matrix[443]; void setMatrix() { for(int i=0;i<21;i++) for(int j=0;j<21;j++) Matrix[i*21+j] = 0; } void modifiedMatrix(int row,int col,int type)//type = 0 noting 1 black 2 white { Matrix[row*21+col] = type+...
Markdown
UTF-8
2,597
2.515625
3
[ "Apache-2.0" ]
permissive
+++ title = "Encryption" weight = 3 +++ ## Root Configuration Class name: org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration Attributes: | *Name* | *DataType* | *Description* | | -------------- | ----------------------------------...
Java
UTF-8
743
2
2
[]
no_license
package serviceI; import java.util.Date; import java.util.List; import org.springframework.stereotype.Component; import model.BeanItemBudget; import util.BaseException; @Component public interface IItemBudgetService { public void addItemBudget( int budgetId, String itemName, int oItemId, float itemBudgetCost)throws...
C++
UTF-8
1,137
3.203125
3
[ "Apache-2.0" ]
permissive
#include "armor.h" Armor::Armor() : Item(false, 1, Point(0,0), "ARMADURA GENERICA"){ m_def = 1; m_magic_def = 1; m_durability_current = 100; m_durability_max = 100; m_weigth = 1; } Armor::Armor(bool inside, int size, Point pos, std::string id, int def, int mdef, Element elm, int dur, int w) :...
Python
UTF-8
7,263
2.609375
3
[]
no_license
# adding and removal of cars after tracking (using iou) # detect only vehicles import cv2 import numpy as np import copy from imutils.video import FPS net = cv2.dnn.readNet("../../yolov3.weights", "../../yolov3.cfg") classes = [] with open("../../coco.names", "r") as f: classes = [line.strip() for line in f.readl...
Markdown
UTF-8
1,768
2.578125
3
[ "MIT" ]
permissive
# JVC Camera Control Program ## Table of Contents 1. [Description](#Description) 2. [Developer Info](#Developer-Info) 1. [Pre-Requisites](#Pre-Requisites) 2. [API](#API) 3. [Future Work](#Future-Work) 4. [Miscellaneous](#Miscellaneous) ## Description This program allow the user to control and receive informa...