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 | 3,442 | 3.109375 | 3 | [] | no_license | ### v-model 原理 看下面代码
通过给 input 元素监听 input 事件 使 $event.target.value 等于绑定值
### with 语法
```js
// 如果想要改变 obj 中每一项的值,一般写法可能会是这样:
// 重复写了 3 次的“obj”
obj.a = 2;
obj.b = 3;
obj.c = 4;
// 而用了 with 的写法,会有一个简单的快捷方式
with (obj) {
a = 3; //a=obj.a
b = 4;
c = 5;
}
```
### 模板编译(vue-template-compiler)
... |
Java | UTF-8 | 595 | 2.859375 | 3 | [] | no_license | package AbstractClasses_Schugeschaeft;
public abstract class Adidas extends AbstractClasses_Schugeschaeft.Shoe {
private String brand = "Adidas";
private int guaranteeInDays = 29;
public Adidas(String sole, String material, String color, boolean waterproof) {
super(sole, material, color, waterproof);
}
pub... |
Python | UTF-8 | 641 | 3.625 | 4 | [] | no_license | #!/bin/python
# 9-1 exercise
# @author strong
# @email 1025155365@qq.com
class Restaurant:
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print(self.restaurant_name + ':' + self.c... |
Java | UTF-8 | 319 | 2.671875 | 3 | [] | no_license | import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class TaskSecond {
public static boolean checkArray(Integer[] array){
Set<Integer> set = new HashSet<Integer>(Arrays.asList(array));
return (set.size() == 2) && (set.contains(1)) &&(set.contains(4));
}
}
|
C++ | UTF-8 | 11,450 | 2.578125 | 3 | [
"MIT"
] | permissive | /*
* dbtype_DocumentProperty.cpp
*/
#include "dbtypes/dbtype_DocumentProperty.h"
#include "dbtypes/dbtype_PropertyData.h"
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <stddef.h>
#include "osinterface/osinterface_OsTypes.h"
#include "utilities/mutgos_config.h"
#include "text/t... |
Python | UTF-8 | 1,011 | 3.390625 | 3 | [] | no_license | class Solution:
def intToRoman(self, num):
"""
:type num: int
:rtype: str
"""
rule = {
1000: 'M',
500: 'D',
100: 'C',
50: 'L',
10: 'X',
5: 'V',
1: 'I'
}
# rule_pattern = [100... |
C++ | UTF-8 | 2,719 | 2.765625 | 3 | [] | no_license | #include "events/gestureeventfilter_p.h"
#include <algorithm>
GestureEventFilter::GestureEventFilter()
{
}
GestureEventFilter::~GestureEventFilter()
{
}
GestureMoveEventFilter::GestureMoveEventFilter()
: GestureEventFilter()
, m_moveThreshold(0)
, m_trackMovement(true)
{
}
void GestureMoveEventFilter::... |
Java | UTF-8 | 3,233 | 2.71875 | 3 | [] | no_license | package com.bignerdranch.android.client;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import java.util.List;
public class SearchActivity extends AppCompatActivity {
private List<String> people;
private List<String> ev... |
Markdown | UTF-8 | 2,992 | 2.984375 | 3 | [] | no_license | # Uge 19
Jeg har lavet to videoserier til jer. Den første videoserie introducerer Loggeren i en normal java applikation. Den anden serie viser loggeren brugt i Kaspers projektskabelon. Udover at vise loggeren i to forskellige miljøer, så bruger jeg de to serier til at se på fejl generelt. Hvilke informationer skal en ... |
C++ | UTF-8 | 1,232 | 2.546875 | 3 | [] | no_license | #include "Main.h"
using namespace std;
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
void graphMain()
{
vector<string> vtrStrEquation = createVtrStrEquation((inputStrEQN()));
Equation equation;
equation = evalVtrStrEquation(vtrStrEquation);
if(validateEquation(equation) == false)
{
cout << "Inv... |
C# | UTF-8 | 826 | 3.34375 | 3 | [] | no_license | using System;
namespace expr13
{
class Program
{//Khaibullin Bulat (goat and hay Square)
static void Main(string[] args)
{
var a = Convert.ToInt32(Console.ReadLine());
var r = Convert.ToInt32(Console.ReadLine());
double sum = 0;
if (r<=0.5*a)
... |
Java | UTF-8 | 552 | 1.898438 | 2 | [] | no_license | package com.amine;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Merkez {
public static void main(String[] args) {
// TODO Auto-generated method stub
ApplicationContext context = new ClassPathXmlApplicationContext(... |
JavaScript | UTF-8 | 9,185 | 2.78125 | 3 | [
"MIT"
] | permissive | var bigEndianPlatform = null;
/**
* Check if the endianness of the platform is big-endian (most significant bit first)
* @returns {boolean} True if big-endian, false if little-endian
*/
function isBigEndianPlatform() {
if ( bigEndianPlatform === null ) {
var buffer = new ArrayBuffer( 2 ),
uint8Array = new U... |
Markdown | UTF-8 | 12,771 | 3.375 | 3 | [
"MIT"
] | permissive | ---
title: Get the most out of Community Bridge Program
date: "2020-08-25"
description: "I am fortunate enough to have them as mentors as they not only guided me technically but also showed how to become a good software engineer and human being."
tags: ["open-source", "internships", "cncf", "linux-foundation"]
disqus: ... |
C | UTF-8 | 5,205 | 2.9375 | 3 | [] | no_license | /*
* Filename: ql.c
*
* Purpose: doubly-linked queue manager
*
* Copyright Sierra Wireless Inc., 2008 All rights reserved
*
* Notes: The user of the queue is required to provide its own concurrent
* control in the way of locks and such.
*/
#include "aa/aaglobal.h"
#include "ql/qludefs.h"... |
JavaScript | UTF-8 | 1,104 | 2.8125 | 3 | [] | no_license | /* eslint-disable radix */
/* eslint-disable no-prototype-builtins */
/* eslint-disable react/jsx-filename-extension */
/* eslint-disable react/prop-types */
/* eslint-disable no-unused-vars */
import React from 'react';
function MathComponent(props) {
let result = '';
let finalResult = '';
const operators = {
... |
C | WINDOWS-1250 | 192 | 2.640625 | 3 | [] | no_license | #include <stdio.h>
#include <conio.h>
int anubis(void)
{
int i;//varivel de controle do loop
for (i = 1; i <= 3; i++)
{
printf("Aprendendo Linguagem C\n");
}
getch();
return(0);
}
|
Python | UTF-8 | 515 | 2.734375 | 3 | [] | no_license | import pygame
black = pygame.Color(0, 0, 0)
white = pygame.Color(255, 255, 255)
blue = pygame.Color(0, 0, 255)
light_blue = pygame.Color(0, 0, 170)
yellow = pygame.Color(255, 255, 0)
red = pygame.Color(255, 0, 0)
light_red = pygame.Color(255, 160, 160)
green = pygame.Color(0, 255, 0)
light_green = pygame.Color(0, 1... |
Python | UTF-8 | 715 | 3.65625 | 4 | [] | no_license | distance=float(input("Enter the Total kilometers driven per day:"))
cost_petrol=float(input("Enter the Cost per litre of petrol:"))
mileage=float(input("Enter the Average kms per litre (mileage):"))
fee_parking=float(input("Enter the Parking fee per day:"))
toll=float(input("Enter the Toll tax per day:"))
if (di... |
JavaScript | UTF-8 | 373 | 3.3125 | 3 | [] | no_license | // this is local as it hasnt be declared for exports
var local = 'bjcdkhd';
// whereas this is can be used in other files
var shouldWeHaveCake = function() {
// return true;
console.log('yes lets eat the fucker');
}
// module.exports = shouldWeHaveCake;
// we can also make this a library by turning it into an ob... |
Markdown | UTF-8 | 3,080 | 3.265625 | 3 | [] | no_license | # [Swift] Stored Property
Property는 값을 Class, Struct, Enum과 연결한다.
Swift의 Property에는 크게 세가지가 있다.
- Stored Property
- Computed Property
- Type Property
Stored Property는 Class와 Struct에서 constant와 variable 값을 instance의 일부로 저장한다.
```swift
struct FixedLengthRange {
var firstValue: Int
let length: Int
}
let rang... |
Markdown | UTF-8 | 19,613 | 2.78125 | 3 | [] | no_license | # swagger_client.PhoneSharedLineGroupsApi
All URIs are relative to *https://api.zoom.us/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_members_to_shared_line_group**](PhoneSharedLineGroupsApi.md#add_members_to_shared_line_group) | **POST** /phone/shared_line_groups/{share... |
Java | UTF-8 | 2,079 | 2.078125 | 2 | [] | no_license | package ru.st.selenium.elements;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.... |
Java | UTF-8 | 1,693 | 2.96875 | 3 | [] | no_license | package javacollections.maintask.electricalAppliances;
import javacollections.maintask.specifications.EnergyConsumptionClass;
import javacollections.maintask.specifications.Execution;
public class CookingFoodAppliances extends Appliance {
private EnergyConsumptionClass energyConsumptionClass;
private Executio... |
Markdown | UTF-8 | 2,874 | 2.828125 | 3 | [
"MIT"
] | permissive | ---
title: Classroom Audio
author: 'kurtis'
date: '2015-06-08'
slug: classroom-audio
categories:
- Research
tags:
- dissertation
draft: no
summary:
image:
caption: ''
focal_point: ''
---
The research team recorded an entire week's worth of class meetings of three courses at four times during the course of the... |
Java | UTF-8 | 506 | 1.921875 | 2 | [] | no_license | package com.aaa.dao;/*
*/
import com.aaa.entity.SysMenuPath;
import java.util.List;
public interface SysMenuPathDao {
//查询资源详情,路径对应的操作
List<SysMenuPath> findSysMenu();
//添加资源路径
Integer addPath(SysMenuPath sysMenuPath);
//删除资源路径
Integer deletePath(Integer id);
//查询资源是否重复
SysMenuPa... |
C++ | UTF-8 | 1,729 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | class Solution {
public:
int canCompleteCircuit(vector<int>& gas, vector<int>& cost) {
int curGas = 0;
for (int i = 0, j = -1; i < gas.size(); i++){
if (gas[i] < cost[i])
continue;
curGas = gas[i] - cost[i];
for (j = i + 1; j != i; j++){
... |
C | UTF-8 | 457 | 3.9375 | 4 | [] | no_license | #include <unistd.h>
#include <stdio.h>
void ft_ultimate_div_mod(int *a, int *b);
int main(void)
{
int a;
int b;
a = 10;
b = 5;
ft_ultimate_div_mod(&a, &b);
printf("a, divided: %i\n", a);
printf("b, modulated: %i\n", b);
return (0);
}
void ft_ultimate_div_mod(int *a, int *b)
{
... |
C++ | UTF-8 | 3,253 | 3.0625 | 3 | [] | no_license | //
// Created by user on 03.12.18.
//
#include <fstream>
#include "MatrixMultiplier2.h"
MatrixMultiplier2::MatrixMultiplier2( char *filenameA, char *filenameB, int num_threads_, char *filenameC_) :
num_threads(num_threads_), filenameC(filenameC_) {
try {
read_MatrixA(filenameA);
... |
Java | UTF-8 | 3,301 | 2.625 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Controle;
import GUI.Desenvolvedor.JanelaTexto;
import java.awt.Component;
import java.io.BufferedReader;
import java.io.File;... |
JavaScript | UTF-8 | 326 | 3.859375 | 4 | [] | no_license | var num = Math.floor(Math.random() * 101);
function guessnum(){
var guess = document.forms['form1'].num.value;
if (guess == num)
{
alert("Great you Guessed! How did you know that?");
}
if (guess < num)
{
alert("No your number is too low!");
}
if (guess > num)
{
alert("No your number is too high")... |
Markdown | UTF-8 | 1,196 | 2.515625 | 3 | [] | no_license | ## space2vec: Model Code
Check our the posts here: [space2vec.com](http://space2vec.com)
The project behind the code is talked about in detail throughout the blog posts. But this
is where the cool code stuff happens!
## Data
You can find the feature engineered CSV from the autoscan project (under the "Features" hea... |
Java | UTF-8 | 2,389 | 2.34375 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.infineon.infohub.sap.excel.model;
import java.io.Serializable;
/**
*
* @author Raaj
*/
public class SapTe... |
Java | UTF-8 | 5,280 | 1.867188 | 2 | [] | no_license | package com.accessorydm.filetransfer.action;
import com.accessorydm.XDMDmUtils;
import com.accessorydm.adapter.XDMInitAdapter;
import com.accessorydm.agent.fota.XFOTADl;
import com.accessorydm.db.file.XDB;
import com.accessorydm.db.file.XDBFumoAdp;
import com.accessorydm.eng.core.XDMEvent;
import com.accessorydm.eng.c... |
Markdown | UTF-8 | 2,012 | 3.375 | 3 | [] | no_license | ### 题目描述
SORT 公司是一个专门为人们提供排序服务的公司,该公司的宗旨是「顺序是最美丽的」。
为了把工厂中高低不等的物品按从低到高排好序,工程师发明了一种排序机械臂。
它遵循一个简单的排序规则,第一次操作找到高度最低的物品的位置P<sub>1</sub>,并把左起第一个物品至P<sub>1</sub>间的物品(即区间[1,P<sub>1</sub>]间的物品)反序;第二次找到第二低的物品的位置P<sub>2</sub>,并把左起第二个至P<sub>2</sub>间的物品(即区间[2,P<sub>2</sub>]间的物品)反序……最终所有的物品都会被排好序。
<p align="">
<img src="http:... |
Markdown | UTF-8 | 1,521 | 3.453125 | 3 | [
"MIT"
] | permissive | ---
layout: page
title: Ruby Exception
category: 技术
tags: Ruby
---
{% include JB/setup %}
## C时代的异常处理
由于C没有异常处理机制,所以只能通过返回值来判断是否存在异常。
这种方式有两个弊端:
- 遗漏会出现异常的点
- 如果面面俱到,则错误处理代码可能会淹没正常的业务代码
## Ruby的异常处理
在Ruby中,我们用raise方法来创建一个表示异常的对象。
raise有四种使用方法:
- raise
产生一个错误信息为空的RuntimeError(default for raise)
- raise ... |
Java | UTF-8 | 1,642 | 2.15625 | 2 | [] | no_license | package com.ecolemultimedia.sabermostaf.projet2.cells;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.ecolemultimedia.saber... |
PHP | UTF-8 | 4,162 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\MessageBag;
class AuthController extends Controller {
public function __construct()
{
$this->beforeFilter('csrf', array('on' => 'post'));
}
public function login()
{
return View::make('homepage', array('title' => 'Login', 'main' => 'homepage', 'mostra_login' => true));
}
pub... |
PHP | UTF-8 | 824 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Sharp\Filters;
use Carbon\Carbon;
use Code16\Sharp\EntityList\EntityListDateRangeRequiredFilter;
class PassengerBirthdateFilter implements EntityListDateRangeRequiredFilter
{
public function label()
{
return "Born between";
}
/**
* @return array
*
* awaite... |
Python | UTF-8 | 11,297 | 3.078125 | 3 | [] | no_license | #!/usr/bin/python
# -*- coding: utf-8 -*-
import random
from spacegeo import *
from pylab import *
class Cortex(object):
def __init__(self,cell_width=3.,cell_length=15.):
self.width = cell_width
self.length = cell_length
def isinside(self,particle):
''' returns true if the p... |
Java | UTF-8 | 3,677 | 2.28125 | 2 | [] | no_license | package com.example.matheus.projeto_final;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
imp... |
SQL | UTF-8 | 817 | 3.8125 | 4 | [] | no_license | CREATE TABLE AuthConsumer
(
ConsumerId varchar(255) PRIMARY KEY NOT NULL,
CreatedAt datetime NOT NULL,
UpdatedAt datetime NOT NULL,
ClientId varchar(255),
ClientSecret varchar(255),
Username varchar(255)
);
CREATE UNIQUE INDEX PK__AuthConsumer_ConsumerId ON AuthConsumer(ConsumerId);
CREATE UNIQ... |
Java | UTF-8 | 5,350 | 3.015625 | 3 | [
"MIT"
] | permissive | package net.bolbat.utils.lang;
import net.bolbat.utils.annotation.Audience;
import net.bolbat.utils.annotation.Stability;
/**
* Useful validations.
*
* @author Alexandr Bolbat
*/
@Audience.Public
@Stability.Evolving
public final class Validations {
/**
* Default constructor with preventing instantiations of ... |
C++ | UTF-8 | 1,337 | 2.796875 | 3 | [] | no_license | //***************************************************************************************
// A collection of mathmaticly constants and functions
// Autors: Kay Goossen
// Date: 29 September 2015
// Version: 1.01
//***************************************************************************************
#include "Line.h"... |
C# | UTF-8 | 5,010 | 2.53125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using CatsAndDogs_project.Data;
using CatsAndDogs_project.Models;
using Microsoft.AspNetCore.Authorization;
na... |
PHP | UTF-8 | 770 | 2.78125 | 3 | [] | no_license | <?php namespace App\Data\Blog;
use Validator;
class Stock extends BaseModel
{
// Database table used by the model
protected $table = 'stocks';
protected $guarded = ['id'];
/**
* Validate input data for stock
*
* @return Validator
*/
public static function validateStock($inpu... |
Java | UTF-8 | 2,964 | 4.1875 | 4 | [] | no_license | /*
File Name: Nim.java
//******PROPERTY OF ALICIA RODRIGUEZ********
Nim class which depends only on the Player interface and
Pile class. It does not depend on any of the other classes that
implement the Player Interface.
*/
package nimgame;
//******PROPERTY OF ALICIA RODRIGUEZ********
public class Nim
{
... |
Java | UTF-8 | 4,924 | 2.875 | 3 | [] | no_license | package lab2;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.xml.bind.annotation.XmlTransient;
import java.time.LocalDate;
import java.time.Month;
import java.util.regex.*;
public class Bus {
private int capacity;
private String indentificationNumber;
private LocalDate dataConstructio... |
Python | UTF-8 | 387 | 3 | 3 | [] | no_license | # https://leetcode.com/problems/ransom-note/
# Solved Date: 20.05.03.
def can_construct(ransomNote, magazine):
from collections import Counter
magazine_counter = Counter(magazine)
ransomNote_counter = Counter(ransomNote)
for letter in ransomNote_counter.keys():
if magazine_counter[letter] < ra... |
Python | UTF-8 | 573 | 2.8125 | 3 | [] | no_license | def do(f):
fabric = [[''] * 1000 for _ in range(1000)]
for line in f:
id, _, xy, size = line.split()
id = int(id[1:])
x, y = map(int, xy.strip(':').split(','))
w, h = map(int, size.split('x'))
for i in range(x, x + w):
for j in range(y, y + h):
... |
Python | UTF-8 | 791 | 3.59375 | 4 | [] | no_license | """class person(object):
def __init__(self,name):
self.name=name
def getname(self):
return self.name
def isemployee(self):
return False
class employee(person):
def isemployee(self):
return True
emp=person("geeks")
print(emp.getname(),emp.isemployee())
emp=employee("geeks1... |
Markdown | UTF-8 | 428 | 2.8125 | 3 | [] | no_license | # Instance of my Menu class
**Class**
class: KidsHolidayMenu
**Attributes**
```ruby
menu_name = "Kid's Holiday Specials"
material = "paper"
color = "Green"
food_items = { "Mac 'n Cheese": 2.50, "Smiling Pancakes": 3.50}
is_open = false
```
**Methods**
* change_name: `menu_name = "Kid's Happy Holiday Specials"`
* ... |
PHP | UTF-8 | 5,926 | 2.9375 | 3 | [] | no_license | <?php
if (isset($_POST['short'])) { $short = $_POST['short']; }
if (isset($_POST['comment'])) { $comment = $_POST['comment']; }
if (isset($_POST['expire'])) { deleteFiles(); deleteFromDB(); header('Location: http://local-dev.chooseshort.com/'); }
if (isset($_POST['submit'])) { createShort($short, $comment); insertS... |
Java | GB18030 | 2,845 | 2.578125 | 3 | [] | no_license | package spring_app14_jdbc;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import javax.swing.tree.TreePath;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
public class EmpDAO implement... |
Java | UTF-8 | 788 | 2.546875 | 3 | [] | no_license | package stud;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.NavigableSet;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import javax.xml.ws.handler.MessageContext.Scope;
public class cc8 {
public static vo... |
Python | UTF-8 | 419 | 3.03125 | 3 | [] | no_license | __author__ = 'Merlo'
import string
def checkio(text):
text = text.lower()
remove = string.digits + string.punctuation + ' '
for char in text:
if char in remove:
text = text.replace(char, '')
text = sorted(text)
result = ""
count = 0
for item in text:
if text.cou... |
C# | UTF-8 | 490 | 2.75 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LabirintEPAM2019
{
public class Ground : BaseConsoleCell
{
public override ConsoleColor ForegroundColor { get; protected set; } = ConsoleColor.Green;
public override ch... |
Java | UTF-8 | 19,866 | 2.640625 | 3 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package exchangerateprediction;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;
import java.util.Arrays;
import java.util.Formatter;
//***this package is based on byte array,... |
C++ | UHC | 453 | 3.203125 | 3 | [] | no_license |
// Լ ƴ ʼ Դϴ.
// ü ( data) Լ(getXXXX) ݵ
// Լ Ǿ մϴ.
class Rect
{
int x, y, w, h;
public:
int getArea() const { return w *h; }
};
void foo(const Rect& r)
{
int n = r.getArea(); // ?
}
int main()
{
Rect r; // ʱȭ ߴٰ ϰ
int n = r.getArea();
foo(r);
}
|
JavaScript | UTF-8 | 7,601 | 2.59375 | 3 | [] | no_license | "use strict";
function Dom(storage) {
var self = this;
self.find = find;
self.batchFind = batchFind;
self.modal = new modal(self);
self.addUser = addUser;
self.createConversation = createConversation;
self.createConversationLink = createConversationLink;
self.showConversation = showCon... |
Java | UTF-8 | 14,085 | 2.6875 | 3 | [] | no_license | package com.example.sourcecodeview;
import android.accessibilityservice.AccessibilityService;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityN... |
Java | UTF-8 | 4,255 | 2.09375 | 2 | [] | no_license | package pojo.annotations;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persisten... |
Markdown | UTF-8 | 2,098 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | ---
title: "Managing Dagster Cloud deployments | Dagster Docs"
---
# Managing Dagster Cloud deployments
Learn how to deploy your code to Dagster Cloud, use command line tools, set up CI/CD, and define environment variables.
<ArticleList>
<ArticleListItem
title="Managing full deployments"
href="/dagster-clo... |
Java | UTF-8 | 18,541 | 1.8125 | 2 | [] | no_license | /*
* Copyright (C) 2014 Le Ngoc Anh <greendream.ait@gmail.com>
*
* 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 require... |
Shell | UTF-8 | 984 | 3.484375 | 3 | [] | no_license | #!/bin/bash
downloadDir="/var/www/nextcloud/data/"
downloadList="${downloadDir}"
userDir=""
links=$(sudo cat ${downloadList})
if [ ! -z $links ]; then
# Connect to VPN
windscribe connect DE
tempLinks=$links
for link in $links
do
tempLinks=${te... |
PHP | UTF-8 | 424 | 2.90625 | 3 | [] | no_license | <?php
class user{
private $email;
private $name;
private $birthday;
private $gender;
private $sdt;
public function __construct($email, $name, $birthday,$gender,$sdt)
{
$this->email = $email;
$this->name = $name;
$this->birt... |
Java | UTF-8 | 1,936 | 3.328125 | 3 | [] | no_license | package animation;
import biuoop.DrawSurface;
import biuoop.Sleeper;
import running.Counter;
import inerfaces.Animation;
import running.SpriteCollection;
import java.awt.Color;
/**
* This func will countdown each game start's.
* It will implement animation, so it can be drawn on given surface.
*/
pu... |
Markdown | UTF-8 | 3,942 | 2.828125 | 3 | [] | no_license | # Article 5
I. - Le montant de l'aide prévue au VI de l'article 3 de la loi du 13 juin 1998 susvisée, ainsi que celui de chacune des majorations, est forfaitaire et fixé, par salarié, pour chaque année d'exécution de la convention.
La majoration prévue au troisième alinéa du VI du même article est attribuée au plus p... |
Python | UTF-8 | 3,137 | 2.546875 | 3 | [] | no_license | from collections import namedtuple
import argparse
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from os.path import realpath, join, dirname
import time
CNNModel = namedtuple("CNNModel", "input_x input_y keep_prob output loss train_op")
SCRIPT_DIR = dirname(realpath(__file__))
DA... |
Swift | UTF-8 | 2,184 | 3 | 3 | [
"MIT"
] | permissive | //
// SMEvent.swift
// StateMachine
//
// Created by coderyi on 2020/11/29.
//
import UIKit
open class SMEvent: NSObject, NSCoding, NSCopying {
var shouldFireEventBlock: ((_ event: SMEvent, _ transition: SMTransition?) -> Bool)?
var willFireEventBlock: ((_ event: SMEvent, _ transition: SMTransition?) -... |
Java | UTF-8 | 19,670 | 2.09375 | 2 | [] | no_license | /*
* 创建日期 2005-7-14
*
* 要更改此生成的文件的模板,请转至
* 窗口 - 首选项 - Java - 代码样式 - 代码模板
*/
package cn.com.infosec.netseal.common.util.p10;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import... |
Java | UTF-8 | 11,857 | 2.28125 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package microcreditbanking.classes;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JOptionPane;
/**
*
* @author Ricky Islam
*/
pub... |
Java | UTF-8 | 1,859 | 2.484375 | 2 | [] | no_license | package com.example.demo.entity;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* @author 作者 zuoruibo: ... |
C | UTF-8 | 1,495 | 3.859375 | 4 | [] | no_license | #include<stdio.h>
#include<stdlib.h>
#include "BiTree.h"
#define N 10
void CreateBiTree(BiTree *T, char ch)
{
/*
If the very tree is empty, then malloc space for it
and initialize the children NULL
and evaluate the data as ch
*/
if(!*T)
{
*T = (BiTNode*)malloc(sizeof(BiTNode)... |
Markdown | UTF-8 | 2,118 | 2.78125 | 3 | [] | no_license | ---
layout: post
title: ツリー構造の情報を作りたい
date: 2018-03-06 10:08:24
categories: c#
---
<p><a href="https://i.stack.imgur.com/iBzmC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iBzmC.png" alt="画像の説明をここに入力"></a></p>
<p>あるデータをツリー構造のデータを作ろうとしているのですが、<br>
うまくロジックをくめずにおります。<br>
イメージとしては<br>
画像のようなA~Fのデータをツ... |
Java | UTF-8 | 1,102 | 2.046875 | 2 | [] | no_license | package com.jayden.testandroid.lollipop.animation;
import android.annotation.TargetApi;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import com.jayden.test... |
C++ | UTF-8 | 4,035 | 3.171875 | 3 | [] | no_license | #include <iostream>
#include <stack>
#include <string>
#include <vector>
#include <utility>
#include <math.h>
#include <algorithm>
const int SMALLCONST = -1000000001;
void readInput(int* n, int* m, std::vector<std::vector<int>>* grid,
std::istream &in_stream = std::cin) {
in_stream >> *n;
in_str... |
Python | UTF-8 | 1,299 | 3.046875 | 3 | [] | no_license | import numpy
import scipy.special
# nueral network
class nueralNetwork:
def __init__(self,inputnodes,hiddennodes,outputnodes,learningrate):
# nodes
self.inodes = inputnodes
self.hnodes = hiddennodes
self.unodes = outputnodes
# weight
self.wih = numpy.random.normal(0... |
Markdown | UTF-8 | 1,504 | 3.03125 | 3 | [] | no_license | # SVN-DIFF 文件解析工具
## 简介
svn-diff 是一个对svn diff文件解析的模块,用于解析SVN diff返回的结果。
## 使用说明
### 模块接入
* svn-diff 是一个对svn diff文件解析的模块,所以需要先将svn diff返回的结果输出到一个文件中(建议使用.diff作为后缀名,方便使用TortoiseSVN打开查看)。然后再使用svn_diff去解析该文件:
```python
import svn_diff
diff = svn_diff.Diff(diff_file) # diff_file为diff文件路径
```
* Diff包含一个字典files,key为fi... |
JavaScript | UTF-8 | 14,083 | 2.578125 | 3 | [] | no_license |
function DatePicker(imgUrl) {
Element.prototype.append = function (elements) {
for (var a = 0; a < elements.length; a++) {
this.appendChild(elements[a]);
}
}
Element.prototype.setStyles = function (styleObj) {
for (var style in styleObj) {
this.style[style... |
C# | UTF-8 | 2,569 | 2.828125 | 3 | [] | no_license | using System;
namespace Beam
{
//
// tree node
//
public class AABBTreeNode
{
static int version = 1;
public int escapeNodeOffset;
public AABBExternalNode externalNode; // user data
public AABBBox extents; // bounding box
public AABBTreeNode(A... |
JavaScript | UTF-8 | 966 | 2.75 | 3 | [] | no_license | var UserItems = {};
var count = 0;
Diary = require('../models/diary.js');
function User(user){
this.name = user.name;
this.password = user.password;
this.avatar = user.avatar;
};
module.exports = User;
User.prototype.save = function(){
var user = {
name: this.name,
password: this.password,
avatar: this.avat... |
C++ | ISO-8859-1 | 1,737 | 3.546875 | 4 | [] | no_license | // PROG - 19/02/2020 - TPC1
// Ficha1 - Exerccio 5
// up201806629
#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
int ex_1_5_a()
{
int hour1, hour2, minute1, minute2, second1, second2, second_sum, minute_sum, hour_sum, days, minute, second, hour;
cout << "Time1 (hour minutes seconds... |
C# | UTF-8 | 1,387 | 3.5 | 4 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
namespace InOne.Task.Structure.IMPL
{
public class ArrayStack<T> : IStack<T>, IEnumerable<T>
{
private T[] _arr;
private int _top;
private int _size;
public ArrayStack(int size)
{
_size... |
Java | UTF-8 | 1,271 | 2.3125 | 2 | [] | no_license | package com.example.freightmanagement.model;
/**
* Created by songdechuan on 2020/8/6.
*/
public class TrainingListBean {
/**
* id : 1
* type : 1
* content : 1+2
* createTime : 1596350485000
* updateTime : 1596350485000
*/
private int id;
... |
Java | UTF-8 | 3,123 | 2.421875 | 2 | [] | no_license | package com.my.myapplication;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Size;
import org.opencv.objdet... |
Java | UTF-8 | 1,323 | 2.78125 | 3 | [] | no_license | import phases.UploadDayLiftRidesPhases;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws InterruptedException, IOException {
try (Scanner scanner = new Scanner(System.in)) {
System.out.println("Please enter the details t... |
Java | UTF-8 | 1,542 | 2.703125 | 3 | [] | no_license | package com.icode.library.tools.utils;
import android.app.Activity;
import android.util.DisplayMetrics;
/**
* 和系统屏幕相关的操作
*
*/
public class IScreenUtils {
//屏幕宽度
private static int screenWidth = 0;
//屏幕高度
private static int screenHeight = 0;
//每英寸有多少个显示点
private static float density = 0;
//Standard quanti... |
PHP | UTF-8 | 3,890 | 2.8125 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
header("Location: index.php");
exit;
}
// Include config file
require_once "config.php";
// Define variables and initialize with empty values
$username = $password = $err = "";
// Processing form data when form is ... |
C# | UTF-8 | 6,024 | 2.53125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Condensate_API.Models;
using SteamKit2;
using Condensate_API.Services;
using System.Net.Http;
using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
namespace Condensate_API.Controllers
{
[Route("api/[controlle... |
Java | UTF-8 | 707 | 3.875 | 4 | [] | no_license | import java.util.Scanner;
public class Proyecto711 {
public static void main(String[] zzz) {
Scanner teclado= new Scanner(System.in);
float p;
float s;
System.out.print("Ingrese el primer numero");
p = teclado.nextFloat();
System.out.print("Ingrese el segundo numero");
s = teclado.nextFloat();
... |
JavaScript | UTF-8 | 2,406 | 2.5625 | 3 | [] | no_license | import * as actionTypes from '../actions/actionTypes';
import { updateObject } from '../utility';
const initialState = {
Movielist : [],
initialMovieList : [],
page : null,
ModalStatus : false,
activeMovie : null,
pageNumber : 0,
totalPages : null,
scrolling : false,
rat... |
Java | UTF-8 | 2,740 | 2.28125 | 2 | [] | no_license | package cn.huaxunchina.cloud.location.app.lbs;
import java.util.ArrayList;
import java.util.List;
import cn.huaxunchina.cloud.app.R;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.Marker;
import com.b... |
Python | UTF-8 | 1,625 | 2.859375 | 3 | [] | no_license | import simpy
import random
SIM_TIME = 1000
RANDOM_SEED = 42
MEAN = 1.8
VAR = 0.2
NUM_MACHINES = 10
REPOSITORY = 3
NUM_REPAIRMEN = 3
MAX_EXPERIENCE = 1.65
MIN_EXPERIENCE = 0.55
# Constante que calcula la experiencia del operario
EXPERIENCE_PER_HOUR = (MAX_EXPERIENCE-MIN_EXPERIENCE)/SIM_TIME
class SystemMachine(object... |
Java | UTF-8 | 303 | 1.640625 | 2 | [] | no_license | package android.com.mobilechat.model.notification.body;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class BecameRoomMemberBody {
private final Long roomId;
private final String roomName;
private final String roomDescription;
private final int roomMembersCount;
}
|
Java | UTF-8 | 5,429 | 2.390625 | 2 | [] | no_license | package math.nyx.framework.square;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import math.nyx.framework.square.SquareDecimationStrategy;
import math.nyx.utils.TestUtils;
import org.apache.commons.math.linear.Array2DRowRealMatrix;
import org.apache.commons.math.linea... |
PHP | UTF-8 | 1,727 | 2.625 | 3 | [] | no_license | <?php
namespace ProjectesWeb\Controller;
use ProjectesWeb\Model\Repository\TasksRepository;
use ProjectesWeb\View\ViewHelper;
use Zend\Diactoros\Response;
use ProjectesWeb\Model\Entity\Task;
/**
* Class TaskController
* @package ProjectesWeb\lib\Controller
*/
class TaskController
{
private $request;
/**
... |
Java | UTF-8 | 2,538 | 2.109375 | 2 | [] | no_license | package com.spoid;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class SplashActivity extends AppCompatActivity {
Handler handler;
... |
Java | UTF-8 | 849 | 2.765625 | 3 | [] | no_license | package irvine.oeis.a014;
import irvine.factor.factor.Cheetah;
import irvine.math.group.IntegerField;
import irvine.math.group.PolynomialRingField;
import irvine.math.polynomial.Polynomial;
import irvine.math.z.Z;
import irvine.oeis.Sequence;
/**
* A014651 Number of partitions of n into its nonprime divisors with at... |
Java | UTF-8 | 1,004 | 3.078125 | 3 | [] | no_license | import java.util.Scanner;
// codeforces.com/problemset/problem/828/A
public class RestaurantTables {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int a = s.nextInt();
int b = s.nextInt();
int[] customers = new int[n];
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.