language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 971 | 1.875 | 2 | [] | no_license | package e.datvo_000.jp9shop.Model.Object;
import android.content.Intent;
public class SoDiaChi {
String email,name,phone,address;
int ma;
int macdinh;
public int getMa() {
return ma;
}
public void setMa(int ma) {
this.ma = ma;
}
public String getEmail() {
ret... |
Python | UTF-8 | 82 | 3.234375 | 3 | [] | no_license | pemrograman = ["Java", "PHP", "Python", "C++"]
for x in pemrograman:
print(x) |
Java | UTF-8 | 670 | 2.4375 | 2 | [] | no_license | package com.cinema.services.impl;
/**
*
* @author Valentin Fadloun
*
**/
import org.springframework.stereotype.Service;
import com.cinema.models.Salle;
import com.cinema.repositories.SalleRepository;
import com.cinema.services.SalleService;
import com.cinema.services.crud.impl.CRUDServiceImpl;
/**
*
* Créat... |
Java | UTF-8 | 13,408 | 1.828125 | 2 | [] | no_license | package com.equivi.mailsy.service.mailgun;
import com.equivi.mailsy.service.constant.dEmailerWebPropertyKey;
import com.equivi.mailsy.service.mailgun.response.MailgunResponseEventMessage;
import com.equivi.mailsy.service.mailgun.response.MailgunResponseMessage;
import com.equivi.mailsy.service.mailgun.response.Unsubsc... |
Markdown | UTF-8 | 833 | 2.609375 | 3 | [] | no_license | # 最终状态
## 视频示例
<video controls height='100%' width='100%' src="https://encooacademy.oss-cn-shanghai.aliyuncs.com/activity/FinalState.mp4"></video>
## 概述
“最终状态”组件是状态机中使用的组件,是状态机工作流的基础组成部分。状态机工作流中必须包含一个“最终状态”组件。
> **说明:**
>“状态”组件必须放置在“状态机”组件中。
“最终状态”组件包括一个可编辑区域:
- Entry 区域:包含在 Entry 区域的组件会在工作流进入该*最终状态*组件时被执行。
## 属... |
Rust | UTF-8 | 7,545 | 2.640625 | 3 | [] | no_license | use crate::ast::*;
use crate::target;
use crate::target::currency::Currency;
#[derive(Debug, Default)]
pub struct Context {
pub environment: crate::environment::Environment,
pub contract_declaration_context: Option<ContractDeclarationContext>,
pub contract_behaviour_declaration_context: Option<ContractBeha... |
Python | UTF-8 | 4,025 | 3.34375 | 3 | [] | no_license | from time import sleep
import random
hanger=['''
_____
| |
|
|
|
_|_''', '''
_____
| |
O |
|
|... |
TypeScript | UTF-8 | 2,678 | 2.609375 | 3 | [
"MIT"
] | permissive | import { Deferred } from 'concurrency.libx.js';
import { helpers } from '../helpers';
import { IDeferred, Mapping } from '../types/interfaces';
import { log } from './log';
class QueueWorkerItem<T> {
item: T;
promises: Deferred<any>[];
}
export class QueueWorker<TIn, TOut> {
private queue: Mapping<QueueWo... |
Java | UTF-8 | 422 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | package co.speedar.infra.itcool.love;
public class LoveXiaominMoreEveryDay {
public static void main(String[] args) {
Runnable loveXiaominMoreEveryDay = () -> {
int theDayWeMet = 18126;
int myLoveToYou = 10;
int endOfWorld = Integer.MAX_VALUE;
for (int day = theDayWeMet; day < endOfWorld; day++) {
m... |
Shell | UTF-8 | 350 | 3.140625 | 3 | [] | no_license | #!/bin/bash
function run_test() {
for ((i=1;i<=1000;i+=1)); do
echo Round $i
wrk -t 10 -c 10 --latency http://localhost:8080/empty-test-app/empty/index
if [ $? -ne 0 ]; then
exit 1
fi
let modulus=$i%3
if [ $modulus -eq 0 ]; then
echo Wait 10 secs
sleep 1... |
Java | UTF-8 | 498 | 1.671875 | 2 | [] | no_license | package rocksdb.constant;
import com.lightgraph.graph.constant.GraphConstant;
public class RocksConstant {
public static final String ROCKSDB_DATA_PATH = "rocksdb.data.path";
public static final String ROCKSDB_DATA_PATH_DEFAULT = GraphConstant.GRAPH_HOME + "/data";
public static final String ROCKSDB_ALL... |
C++ | UTF-8 | 2,669 | 3.140625 | 3 | [] | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
const int NODES = 6;
const int ARCS = 9;
//these are the start and end point for the graph traversal
const int START = 0;
const int END = 3;
void FillAdjacencyMatrix( int A[NODES][NODES], int G[ARCS*2+NODES][3] );
//fills the adjacency matrix with the dista... |
JavaScript | UTF-8 | 381 | 2.515625 | 3 | [] | no_license | //quantity
//currentPrice
//updateBalance() -->puts currentPrice in avePrice send buy function to chris
myApp.controller('BuyController', ['fleaMarketService', function(fleaMarketService) {
console.log("BuyController sourced!");
var buy = this;
buy.submit = function(){
console.log('in BuyController');
};... |
Java | UTF-8 | 393 | 2.578125 | 3 | [] | no_license | @Test
public void testInterceptorIsInvokedWithNoTarget() throws Throwable {
// Test return value
final int age = 25;
MethodInterceptor mi = (invocation -> age);
AdvisedSupport pc = new AdvisedSupport(ITestBean.class);
pc.addAdvice(mi);
AopProxy aop = createAopProxy(pc);
ITestBean tb = (ITestBean) aop.... |
Python | UTF-8 | 1,314 | 2.515625 | 3 | [] | no_license | # -*- coding: UTF-8 -*-
'''
@Project :bmTest_fastapi
@File :dubbo_schemas.py
@IDE :PyCharm
@Author :junjie
@Date :2021/3/4 22:17
'''
from pydantic import BaseModel,validator,Field
from typing import Optional
import re
#创建数据模型
class DubboListBody(BaseModel):
url : str = Field(..., title="dubbo接口IP地址",des... |
C# | UTF-8 | 1,484 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace Bookstore.Models
{
public class EmployeeMetadata
{
[Required]
[StringLength(9)]
[Display(Name = "Employee's id")]
[RegularExpres... |
Java | UTF-8 | 641 | 1.757813 | 2 | [
"Apache-2.0"
] | permissive | package cn.lilq.smilodon.properties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
/*
* @auther: Li Liangquan
* @date: 2021/1/8 16:13
* smilodon.client 客户端配置类
*/
@Data
@AllArgsConstructor
@NoArgsC... |
TypeScript | UTF-8 | 5,806 | 2.640625 | 3 | [] | no_license |
class Main extends egret.DisplayObjectContainer {
/**
* 加载进度界面
* Process interface loading
*/
private loadingView: LoadingUI;
public constructor() {
super();
this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
}
private onAddToStage(event: e... |
Java | UTF-8 | 2,640 | 2.71875 | 3 | [] | no_license | package com.kimkihwan.me.imagelist.util;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.MappingJsonFactory;
import com.kimkihwan.me.imagelist... |
Java | UTF-8 | 1,238 | 2.15625 | 2 | [] | no_license | /*
* Copyright (c) 2015, Samith Dassanayake. All Rights Reserved.
*
* 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 requir... |
Markdown | UTF-8 | 2,421 | 3.1875 | 3 | [] | no_license | # Link-state-protocol-in-python
This project implenments the OSPF using Dijkstra algorithm (Open Shortest Path First) network protocol in python. Link-State Routing protocol is a main class of routing protocols. It is performed by every switching node/router in the network. The basic concept of link-state routing i... |
Markdown | UTF-8 | 2,646 | 3.1875 | 3 | [
"BSD-2-Clause"
] | permissive | # Memory
### Where's my data?
With Cepl your data can exist in 3 different places:
- lisp memory - The regular lisp data in your program. This get's GC'd (garbage collected)
- c memory - Data stored in block of cffi memory. This does not get GC'd
- gpu memory - Data stored on the GPU. This does not get GC'd
A lot o... |
JavaScript | UTF-8 | 1,643 | 2.671875 | 3 | [] | no_license | const NTask = require('../ntask.js');
const Template = require('../templates/tasks.js');
class Tasks extends NTask {
constructor(body) {
super();
this.body = body;
}
render() {
this.renderTaskList();
}
addEventListener() {
this.taskDoneCheckbox();
this.taskRemoveClick();
}
renderTa... |
Markdown | UTF-8 | 8,475 | 2.578125 | 3 | [] | no_license | # cypress-dynamic-data
It showcases the use of:-
- Typescript
- The Cypress GUI tool
- The Cypress command line tool
- Cypress custom commands `cy.foo()`
- PageObject Models on a Login Site
- Resuable Web Selectors
- CircleCI integration
- Slack reporting
- Mochawesome for fancy HTML reporting
- DevTools console log ... |
Java | UTF-8 | 943 | 2.03125 | 2 | [] | no_license | package com.fonality.test.dao;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;... |
Markdown | UTF-8 | 958 | 2.734375 | 3 | [] | no_license | ---
sutra: वर्षाल्लुक् च
vRtti: द्विगोरित्येव । वर्षान्ताद् द्विगोर्निर्वृत्तादिष्वर्थेषु वा खः प्रत्ययो भवति । पक्षे ठञ् । तयोश्च वा लुग्भवति ॥
vRtti_eng: The above affixes _kha_ and _than_ may also be elided after a _Dvigu_ ending in _varsha_.
---
The affix ख as well as ठञ् come in the five fold senses (5.1.79), (5.... |
Java | UTF-8 | 1,409 | 2.28125 | 2 | [
"Apache-2.0"
] | permissive | package io.bootique.tools.template.processor;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import com.google.inject.Inject;
import io.bootique.tools.template.PropertyService;
import io.bootique.tools.template... |
Java | UTF-8 | 1,141 | 2.703125 | 3 | [] | no_license | package me.damiankaras.ev3cubesolver.brick.Motors;
public class MotorManager {
private static final MotorManager instance = new MotorManager();
public static MotorManager getInstance() {
return instance;
}
// public static final int MOTOR_BASKET = 0;
// public static final int MOTOR_SENSOR... |
Markdown | UTF-8 | 789 | 2.53125 | 3 | [] | no_license | ### Hi there 👋
🌱 I’m a Software Engineer at BigBinary.
👨🏽💻 I graduated my BTech in Computer Science from Federal Institute of Science And Technology.
<!-- 🔭 I’m currently working on my final year BTech Project in Python, Django and React. -->
📫 How to reach me: alanloovees@gmail.com
"There's always a bett... |
PHP | UTF-8 | 5,732 | 2.71875 | 3 | [] | no_license | <?php
/**
* This file contains the RWC\Features\Fundraisers\ReportingMetabox class.
*
* @author Brian Reich <breich@reich-consulting.net>
* @copyright Copyright (C) 2017 Reich Web Consulting
* @package RWC
*/
namespace RWC\Features\Fundraisers {
/**
* An Exception class for Fundraiser feature related e... |
JavaScript | UTF-8 | 7,041 | 2.6875 | 3 | [] | permissive | var assert = require('assert');
var fs = require('fs');
var blend = require('..');
var utilities = require('./support/utilities');
// Polyfill buffers.
if (!Buffer) {
var Buffer = require('buffer').Buffer;
var SlowBuffer = require('buffer').SlowBuffer;
SlowBuffer.prototype.fill = Buffer.prototype.fill = f... |
Java | UTF-8 | 632 | 1.992188 | 2 | [] | no_license | package br.jus.cnj.inova.validators;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ValidatorsConfig {
@Bean
ValidatorsManager getValidatorsManager(ApplicationC... |
C++ | UTF-8 | 975 | 2.984375 | 3 | [
"MIT"
] | permissive | #include <process.h>
Process :: Process(string pid) {
this->Pid_ = pid;
this->User_ = ProcessParser::getProcUser(pid);
this->Command_ = ProcessParser::getCmd(pid);
this->CpuUtilization_ = ProcessParser::getCpuPercent(pid);
this->Ram_ = ProcessParser::getVmSize(pid);
this->UpTime_ = ProcessParser::g... |
PHP | UTF-8 | 124 | 2.546875 | 3 | [] | no_license | <?php
# Usando argumentos en archivos
# para probar:
# php 01-args.php Juan
$nombre= $argv[1];
echo "Hola ".$nombre;
?> |
PHP | UTF-8 | 2,751 | 3.796875 | 4 | [] | no_license | <?php
class Map {
/* $table = [
* 'encrypt' =>
* ['A' => 'A', 'B' => 'B', ...],
* ['A' => 'B', 'B' => 'C', ...],
* ...
* 'decrypt' =>
* ['A' => 'A', 'B' => 'B', ...],
* ['B' => 'A', 'C' => 'B', ...],
* ...
*/
protected $table;
/* index of each character:
... |
Shell | UTF-8 | 924 | 4.125 | 4 | [] | no_license | #!/bin/bash
man="\
USAGE
$(basename $0) [HOST:][docs|flash] [OPTIONS]
OPTIONS
-n dry run
-r restore instead of backup
-h this help
"
function sync() {
from=$1; to=$2; n=$3
mkdir -p $to
rsync -av --delete $n $from $to
}
function restore() {
from=$1; to=$2; n=$3
sync $to $from $n
}
flash=$FLASH_ROOT/flash... |
Swift | UTF-8 | 380 | 2.546875 | 3 | [
"MIT"
] | permissive | //
// ActivationFunctions.swift
// Simple-Swift-AI
//
// Created by Arjun Gupta on 7/29/16.
// Copyright © 2016 ArjunGupta. All rights reserved.
//
import Foundation
class ActivationFunctions {
class func linear(x: Double) -> Double {
return x
}
class func sigmoid(val: Double) -... |
JavaScript | UTF-8 | 2,968 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Webhook for LINE
function doPost(e) {
var token = PropertiesService.getScriptProperties().getProperty('CHANNEL_ACCESS_TOKEN');
var reply_token= JSON.parse(e.postData.contents).events[0].replyToken;
var user_id= JSON.parse(e.postData.contents).events[0].source.userId;
var group_id= JSON.parse(e.postData.cont... |
Markdown | UTF-8 | 4,208 | 3.296875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | ---
layout: post
title: 'iPhone/Mac Objective-C内存管理教程和原理剖析(二)口诀与范式'
date: 2010-07-29
wordpress_id: 628
permalink: /blogs/628
comments: true
categories:
- iPhone
- Mac
tags:
- iPhone
- Mac
- objective-c
- 内存管理
---
二 口诀与范式
1 口诀。
1.1 谁创建,谁释放(类似于“谁污染,谁治理”)。如果你通过alloc、new或copy来创建一个对象,那么你必须调用release或autor... |
TypeScript | UTF-8 | 6,295 | 2.5625 | 3 | [
"MIT"
] | permissive | import {
Page,
Browser,
Response,
EvaluateFn,
SerializableOrJSHandle,
PageFnOptions,
} from "puppeteer-core";
import { iResponse } from "../interfaces/iresponse";
import { BrowserControl } from "./browser-control";
import { toType } from "../util";
import { wrapAsValue } from "../helpers";
import { ValuePro... |
Python | UTF-8 | 6,690 | 2.734375 | 3 | [] | no_license | #!/usr/bin/python
# Python file to monitor pastebin for pastes containing the passed regex
# Eventually this should be run by nagios every 5 mins
### TODO
### 1. allow more than one searchterm
### 2. implement exit codes (to be used as a nagios check)
### 3. implement distinct alert destinations based on each searchte... |
Java | UTF-8 | 133 | 1.664063 | 2 | [] | no_license | class Program{
public static void main(String[] args) {
ExamplePerson a = new ExamplePerson("Joonas", 12, true);
}
} |
Java | UTF-8 | 2,720 | 2.375 | 2 | [] | no_license | package net.sf.ehcache.constructs.scheduledrefresh;
import junit.framework.Assert;
import org.junit.Test;
import java.util.Calendar;
import java.util.GregorianCalendar;
/**
* Created with IntelliJ IDEA.
* User: cschanck
* Date: 6/17/13
* Time: 12:06 PM
* To change this template use File | Settings ... |
Java | UTF-8 | 2,904 | 3.078125 | 3 | [] | no_license | package webLesson01;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
public class NoteDAO {
Connection con = null;
PreparedStatement st = null;
ResultSet rs = null;
static final String U... |
Markdown | UTF-8 | 2,490 | 2.78125 | 3 | [] | permissive | # Markdown-CLI
[](https://github.com/margual56/Markdown-CLI/issues)
[](https://github.com/margual56/Markdown-CLI/blob/main/docs/LICE... |
JavaScript | UTF-8 | 497 | 2.765625 | 3 | [] | no_license | let admin = prompt('Кто пришел?');
if (admin == null){
alert("Вход отменен!");
}else if (admin == "Админ") {
let password = prompt('Пароль?');
if (password == "Админ"){
alert("Привет чувырло!");
} else if (password == null){
close.prompt;
} else{
alert("Пароль неверен")... |
Java | GB18030 | 1,464 | 2.625 | 3 | [] | no_license | package com.nonfamous.commom.util.html.filter;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
/**
*
* @author fish
* updateinsert,removeùķΣ
* ùjavastringԵhtml
*
*/
public class BeanHtmlFilterInterceptor implements MethodInterceptor {
private String[]... |
C++ | UTF-8 | 1,566 | 3.28125 | 3 | [] | no_license | #pragma once
#include <Constraint.h>
#include <math.h>
/*============================================================================\\
| Any constraint that has a parameter that shapes the probabilty of a tile to
| be placed depending of the value returned by the constraint.
|
| As the strength gets closer to infini... |
Swift | UTF-8 | 903 | 2.90625 | 3 | [] | no_license | import RxSwift
/// Cached repository for repository protocol
class CachedRepository: RepositoryProtocol {
// MARK: Properties
private let moyaRepository: MoyaRepository
private let realmRepository: RealmRepository
// MARK: Initialization
init(moyaRepository: MoyaRepository, realmRepository: Rea... |
Java | UTF-8 | 3,112 | 2.125 | 2 | [] | no_license | package app.prac.monthlykhata.Activity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.google.andr... |
C | UTF-8 | 180 | 3.046875 | 3 | [] | no_license | #include <stdio.h>
int main()
{
int a,b,c;
printf("addition");
printf("1st number");
scanf("%d",&a);
printf("2st number");
scanf("%d",&b);
c=a+b;
printf("%d",c);
return 0;
}
|
Java | UTF-8 | 659 | 2.421875 | 2 | [] | no_license | package com.example.soc_macmini_15.musicplayer.Model;
public class SongsList {
private String title;
private String subTitle;
private String path;
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public SongsList(String ... |
C | UTF-8 | 2,407 | 3.421875 | 3 | [] | no_license | // karekök bulan fonsiyonu dogrusal ent kullanarak yazınız
#include <stdio.h>
#include <math.h>
/* --ALGORİTMA--
1. Start
2. Verileri al
3. Verilen iki kökü fonksiyona koy ve çıkan değerleri çarp
4. Sonucun sıfırdan küçük olup olmadığını kontrol et küçükse bu aralıkta kök vardır. Adım 5' e
geç. Küçük değilse ... |
Python | UTF-8 | 4,093 | 2.71875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Thu 7-Oct-2021
Link :
ANN regression model : https://colab.research.google.com/drive/1eje9zILprgVmohMN7cKykI3fn4FBRPnF
Onehot encoder : https://towardsdatascience.com/columntransformer-in-scikit-for-labelencoding-and-onehotencoding-in-machine-learning-c6255952731b
... |
Java | UTF-8 | 436 | 2.421875 | 2 | [] | no_license | package info.germanvaldesdev.demo.scaffoltasks.tasks;
public abstract class Task {
private TaskProcessor<Task> taskProcessor;
Task() {
taskProcessor = TaskProcessorUtil.getTaskProcessorFor(getClass());
}
public void processRequest(String req) {
taskProcessor.processRequest(req, this... |
JavaScript | UTF-8 | 347 | 2.546875 | 3 | [
"MIT"
] | permissive | suite('Using JSONP', function () {
test('Requesting a callback with text runs the callback.', function (done) {
// Introduce a global function called 'verify'. This is by intention.
verify = function (text) {
expect(text).to.eql('http.js');
done();
};
http.get('/usingJsonp/text', { jsonp:... |
Java | UTF-8 | 14,898 | 1.773438 | 2 | [] | no_license | package reactive.ui;
import android.view.*;
import android.app.*;
import android.content.*;
import android.graphics.*;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.util.*;
import android.view.*;
import android.widget.*;
import java.util.*;
import... |
Markdown | UTF-8 | 4,701 | 2.578125 | 3 | [
"BSD-2-Clause"
] | permissive | daru
====
Data Analysis in RUby
[](http://badge.fury.io/rb/daru)
[](https://travis-ci.org/v0dro/daru)
## Introduction
daru (Data Analysis in RUby) is a library for storage, analysis, manipulation and visualization ... |
Java | UTF-8 | 1,045 | 3.46875 | 3 | [] | no_license | package com.leetcode.array;
/*
给你 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
说明:你不能倾斜容器。
示例
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/container-with-most-water
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
public class MaxArea {
... |
Java | UTF-8 | 1,243 | 3.4375 | 3 | [] | no_license | package IceCreamFactory;
public class Children {
private String name;
private IceCream iceCream;
private String favouritColor;
private String favouritTaste;
private int favouritWeight;
private int favouritSize;
public String getName() {
return name;
}
public IceCream getIceCream() {
return ... |
PHP | UTF-8 | 3,473 | 2.9375 | 3 | [] | no_license | <?php
require_once 'Framework/Modele.php';
/**
* Fournit les services d'accès aux genres musicaux
*
* @author Baptiste Pesquet
*/
class Place extends Modele {
// Renvoie la liste des places associés à un transaction
public function getPlaces($idTransaction = NULL) {
if ($idTransaction == NULL) ... |
Java | UTF-8 | 1,957 | 2.328125 | 2 | [] | no_license | /*
* Copyright 2009 LugIron Software, Inc. All Rights Reserved.
*
* $Id$
*/
package io.pgmigrate;
import java.sql.Timestamp;
public class Migration implements Comparable<Migration> {
private String name;
private Integer ordinal;
private Timestamp created;
private Boolean production;
private ... |
C++ | UTF-8 | 423 | 2.65625 | 3 | [] | no_license | #pragma once
#include <string>
class Shader
{
public:
Shader(const char* vertexPath, const char* fragmentPath);
void use();
void setBool(const std::string &name, bool value) const;
void setInt(const std::string &name, int value) const;
void setFloat(const std::string &name, float value) const;
void setFloat4(c... |
PHP | UTF-8 | 776 | 2.828125 | 3 | [] | no_license | <?php
include_once "koneksi-db-andri.php";
try {
// perintah untuk membuat sebuah tabel bernama kawan_main_ff
$sql = "CREATE TABLE kawan_main_ff (
id INT(6) AUTO_INCREMENT PRIMARY KEY,
nama VARCHAR(30) NOT NULL,
kelas VARCHAR(30) NOT NULL,
tgl_lahir date N... |
Markdown | UTF-8 | 1,550 | 2.8125 | 3 | [] | no_license | ## High Efficiency High Power Density Multi-level PFC Converter
#### Project Type: ARÇELİK
#### Project Duration: 33 months
### Brief Summary
Power factor correction (PFC) is a term given to a technology that has been used since the turn of the 20th century to restore the power factor to as close to unity as is ec... |
Python | UTF-8 | 293 | 3.15625 | 3 | [] | no_license | S = input() #문장
N = len(S) #문장 길이
a = [0,0] #연속된 값 갯수
a_indx = 0 #
for i in range(N-1) :
if S[i] == S[i+1] :
a[a_indx] += 1
else :
a_indx = 1 - a_indx
print(min(a))
|
JavaScript | UTF-8 | 1,691 | 3.328125 | 3 | [] | no_license | function createMenuItem (name, price, description) {
const menuItem = document.createElement('div');
menuItem.classList.add('menu-item');
const itemName = document.createElement('h3');
itemName.textContent = name;
itemName.classList.add('menu-item-name');
const itemPrice = document.createEleme... |
Java | UTF-8 | 292 | 3.15625 | 3 | [] | no_license | public class Sunflower extends Plant {
//コンストラクタ
public Sunflower(String name, String color){
super(name, color);
}
//実装メソッド
public void live(){
System.out.println(this.name + "は太陽の方向を向いて光合成をして生きる");
}
}
|
Shell | UTF-8 | 4,655 | 3.65625 | 4 | [] | no_license | #!/bin/bash
function usage {
cat <<EOF
Usage: kubectl switch -m <MODE> [-s <SERVICES>(postgres | odoo)] -n <NAMESPACE>
Options:
-m <MODE> # Mode of execution (ON/OFF) activate or deactivate the environment of test
-s <SERVICES> # Concrete service to activate or deactivate
-n <NAMESPACE> # Namespace that we wan... |
C# | UTF-8 | 2,706 | 3.4375 | 3 | [] | no_license | using System;
namespace Lists
{
class MainClass
{
public static void Main()
{
MyListObject<int> myList = new MyListObject<int>();
//Appending
Console.WriteLine("Appending:");
Console.WriteLine($"list: {myList.GetString()}, length: {myList.Count}");
... |
PHP | UTF-8 | 205 | 2.609375 | 3 | [] | no_license | <?php
class Controller
{
public function CreateView($viewName) {
require "View/" . $viewName . ".php";
}
public function isLogined() {
return !empty($_SESSION['id']);
}
} |
Java | UTF-8 | 1,974 | 2.109375 | 2 | [] | no_license | package com.pureland.common.db.data;
import java.util.List;
import com.pureland.common.enums.Entity;
import com.pureland.common.util.DataObject;
public class User extends DataObject {
private static final long serialVersionUID = 8799515651436886728L;
private Long id;
private String account;
private String pass... |
Markdown | UTF-8 | 1,497 | 3.640625 | 4 | [] | no_license | # A command-line node.js word guess game
# Requires
* npm install - dependencies: random-words and inquirer
* word.js requires letter.js
* index.js requires word.js
# Functionality
* Game starts with "node index" from the console
* Presents with underscore in place of secret word
* User is allowed 10 guesses to guess... |
C# | UTF-8 | 820 | 3.90625 | 4 | [
"MIT"
] | permissive | using System;
using System.Linq;
namespace _03._Count_Uppercase_Words
{
class Program
{
static void Main(string[] args)
{
//string[] text = Console.ReadLine().Split();
//foreach (var word in text)
//{
//
// if (Char.IsUppe... |
C++ | UTF-8 | 1,201 | 2.96875 | 3 | [] | no_license | #include "myClockHand.h"
myClockHand::myClockHand() {
this->angle = 0;
}
void myClockHand::draw()
{
//// back face
//glBegin(GL_POLYGON);
// glNormal3f(0,0,-1);
// glVertex3f(-0.1,0,-0.1);
// glVertex3f(0,1,0);
// glVertex3f(0.1,0,-0.1);
//glEnd();
//// bottom face
//glBegin(GL_POLYGON);
// glNormal3... |
C# | UTF-8 | 3,933 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | #region Copyright & License
// Copyright © 2012 - 2021 François Chabot
//
// 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 r... |
PHP | UTF-8 | 1,268 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use App\Repository\ProduitsRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProduitsRepository::class)
*/
class Produits
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM... |
Python | UTF-8 | 1,497 | 3.125 | 3 | [] | no_license | # import csv
# import sys
#
# with open('output_gsmarena_clean.csv') as csvfile:
# readCSV = csv.reader(csvfile, delimiter='|')
# dates = []
# colors = []
# i = 0
# for row in readCSV:
# if (i == 0):
# print(row)
# else:
# sys.exit(1)
# i = i + 1;
... |
C# | UTF-8 | 2,772 | 2.578125 | 3 | [
"MIT"
] | permissive | #r "Microsoft.WindowsAzure.Storage"
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
class AnalyzeTweetsTable
{
public enum AnalyzeType
{
Picture = 0,
Text = 1
}
public class Analyze... |
C++ | UTF-8 | 2,961 | 4.40625 | 4 | [] | no_license | #include <iostream>
#include <vector>
/*
Operator Overloading cannot access Private Data Members, we can access it through Public function
so, we use Friend Function
*/
class User
{
std::string status = "Gold";
static int user_count;
public:
static int get_user_count()
{
re... |
C++ | UTF-8 | 1,993 | 3.296875 | 3 | [] | no_license | #include <stdio.h>
#include <sys/time.h>
#include <iostream>
void
timeval_normalize(struct timeval &tv, time_t sec, suseconds_t us)
{
constexpr suseconds_t max_tv_usec {999999};
if(sec < 0) {
sec = 0;
us = 0;
std::cerr << __func__ << " negative time input... |
Java | UTF-8 | 247 | 1.96875 | 2 | [] | no_license | package junit.suitMathTest;
import org.junit.Assert;
import org.junit.Test;
public class MathTest2 extends Assert {
@Test
public void testSqrt() {
assertTrue(Math.sqrt(1) == 1);
assertTrue(Math.sqrt(1000000) == 1000);
}
}
|
C# | UTF-8 | 4,405 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Drawing.Imaging;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using System.IO;
using QM.Core.Exception;
using QM.Core.Files;
... |
PHP | UTF-8 | 6,192 | 3.28125 | 3 | [] | no_license | <?php
class menu_builder {
private $current_item;
private $menu_items;
private $menu;
private $post_id;
/**
* Construct the object by supplying required parameters.
*/
public function __construct($params) {
$this->set_post_id( $params['post_id'] );
$this->set_menu_items( $params['menu_items'] );
$... |
Shell | UTF-8 | 347 | 3.265625 | 3 | [] | no_license | #!/usr/bin/bash
read -p "enter the no of array1 elements" n
for (( i=0; i<n; i++ ))
do
read -p "enter element:" val
arr[$i]=$val
done
read -p "enter the no of array2 elements" n
for (( i=0; i<n; i++ ))
do
read -p "enter element:" val
arr1[$i]=$val
done
echo "merged array is:"
for (( i=0; i<n; i++ ))
do
echo "${... |
Java | UTF-8 | 1,204 | 3.078125 | 3 | [] | no_license | package com.wd.tst;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import com.wd.file.FileUtil;
public class Tst1 {
public static void main(String[] args) {
File file = new File("data/1.txt");
StringBuilder sb = n... |
Java | UTF-8 | 5,015 | 1.648438 | 2 | [] | no_license | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the te... |
Java | UTF-8 | 3,542 | 2.453125 | 2 | [] | no_license | package it.intecs.pisa.develenv.ui.widgets;
import java.io.File;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.Gr... |
C++ | UTF-8 | 1,102 | 2.59375 | 3 | [] | no_license | // 056b-2 解説AC/bitset型を用いる
// 想定解法: (個数)*(金額)で2次元DP
// 水diff
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define rep3r(i, m, n... |
Shell | UTF-8 | 752 | 2.515625 | 3 | [] | no_license | v=$1
v=${v:-9}
echo Installing LLVM v${v}
lsb_release || sudo apt-get install lsb-release -yqq
code=$(lsb_release -c -s)
echo ""; echo "DEBs"
echo "
deb http://apt.llvm.org/$code/ llvm-toolchain-$code main
deb-src http://apt.llvm.org/$code/ llvm-toolchain-$code main
deb http://apt.llvm.org/$code/ llvm-toolchain-$code-$... |
Python | UTF-8 | 1,457 | 3.640625 | 4 | [] | no_license | from collections import defaultdict
class Graph:
def __init__(self):
self.graph=defaultdict(list)
self.startime={}
self.endtime={}
self.time=0
def addedge(self,x,y):
self.graph[x].append(y)
self.graph[y].append(x)
def dfscon(self,s,visited):
#time=0
visited[s]=True
#self.startime[s]=time+... |
PHP | UTF-8 | 525 | 2.625 | 3 | [] | no_license | <?php
/**
* Description of DeleteDados
*
* @author Júnior
*/
class DeleteDados {
public function deleteEspecialidades(especialidades $Esp){
$deleteEsp = new Delete();
$deleteEsp->ExeDelete("especialidades", "WHERE cod = :id", 'id='.$Esp->getId_especialidade());
}
... |
Java | UTF-8 | 2,595 | 2.375 | 2 | [] | no_license | package mx.com.televisa.derechocorporativo.daos;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import mx.com.televisa.derechocorporativo.bean.GlosarioBean;
import mx.com.televisa.derechocorporativo.bean.SessionBean;
... |
Markdown | UTF-8 | 567 | 2.6875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | ---
layout: post
title: "Game-Archiver"
date: 2020-05-18 02:28:27 +0000
permalink: game-archiver
---
About this Project. I actually found this one to be easier than the last as I didnt have to code around someone elses coding structure for data. Being able to controll the format of my information the whole... |
Ruby | UTF-8 | 162 | 3.078125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive |
def my_collect(collection)
i = 0
returnedArr = []
while i < collection.size do
returnedArr << yield(collection[i])
i += 1
end
returnedArr
end
|
Python | UTF-8 | 6,159 | 2.859375 | 3 | [
"MIT"
] | permissive | import numpy as np
import pandas as pd
from scipy import sparse
import argparse
import os
import json
parser = argparse.ArgumentParser(description='Prepare datasets.')
parser.add_argument('--dataset', type=str, nargs='?', default='assistments12')
parser.add_argument('--min_interactions', type=int, nargs='?', default=1... |
Python | UTF-8 | 812 | 2.984375 | 3 | [] | no_license | from PIL import Image
import os
import argparse
def rescale_images(directory, size):
for img in os.listdir(directory):
im = Image.open(directory+img)
im = im.rotate(-90, expand=True)
im_resized = im.resize(size, Image.ANTIALIAS)
im_resized.save(directory+img)
if __name__ == ... |
Markdown | UTF-8 | 238 | 2.625 | 3 | [] | no_license | # TypeError < StandardError
(from ruby core)
---
Raised when encountering an object that is not of the expected type.
[1, 2, 3].first("two")
*raises the exception:*
TypeError: no implicit conversion of String into Integer
---
|
Swift | UTF-8 | 3,549 | 3.3125 | 3 | [] | no_license | //
// PieChartCarouselAccessibilityElement.swift
// Accessibility Chart
//
// Created by Haryanto Salim on 12/07/21.
//
import UIKit
class PieChartCarouselAccessibilityElement: UIAccessibilityElement {
var currentSegment: Segment? {
didSet{
if let currSegment = currentSegment{
... |
Java | UTF-8 | 6,240 | 1.960938 | 2 | [
"LicenseRef-scancode-unknown-license-reference",
"EPL-1.0",
"CDDL-1.1",
"Classpath-exception-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-jdom",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"MIT",
"CC0-1.0",
"CC-BY-3.0",
"CC-PDDC",
"GCC-exception-3.1",... | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.