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 |
|---|---|---|---|---|---|---|---|
C++ | UTF-8 | 218 | 2.71875 | 3 | [] | no_license | /* La sentencia FOR */
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
for(int i = 1, j = 100; i <= 100 && j >= 1; i++, j--){
cout << i << " " << j << endl;
}
getch();
return 0;
}
|
TypeScript | UTF-8 | 2,103 | 3.34375 | 3 | [
"MIT"
] | permissive | // Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
import { BehaviorSubject, Subject } from 'rxjs';
import { ObservableCollectionIterator } from './ObservableCollectionIterator';
/**
* Represents a collection of items ... |
C# | UTF-8 | 775 | 3.25 | 3 | [] | no_license | using Gemstone.Definitions.Enums;
namespace Gemstone.Classes.Functional
{
public class DamageDice
{
public Die Die { get; private set; }
public DamageType Type { get; private set; }
public bool IsMagic { get; private set; }
public DamageDice(Die die, DamageType type, bool isMa... |
C# | UTF-8 | 1,432 | 3.03125 | 3 | [
"MIT"
] | permissive | // ***********************************************************************
// Copyright (c) Charlie Poole and TestCentric contributors.
// Licensed under the MIT License. See LICENSE in root directory.
// ***********************************************************************
namespace TCLite.Constraints
{
/// <su... |
C# | UTF-8 | 488 | 3.171875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _17_Unmanaged_Code
{
class Unsafe1App
{
public static unsafe void GetValues(int* x, int* y)
{
*x = 6;
*y = 42;
}
public static unsafe void MainMain()
{
... |
JavaScript | UTF-8 | 2,071 | 2.703125 | 3 | [] | no_license |
import {Game} from './gameController.js'
export class Terminal {
terminalBox = null;
game = null;
constructor(instance, terminalBox){
this.terminalBox = $(instance).find(terminalBox)[0]
for(var element in this.commands) {
this.commands[element].vm = this;
... |
Markdown | UTF-8 | 43,212 | 2.890625 | 3 | [] | no_license |
# 4 Implementatie
## 4.1 Testing checklist
### 4.1.1 Overzicht
Dit is de kern van het project. Het was de bedoeling dat er een lijst werd opgesteld waarin alle paradigma's die getest moesten worden onder elkaar weergegeven werden. In de "testing guideline" staat voor elk element in deze lijst beschreven hoe dat spe... |
Java | UTF-8 | 871 | 2.609375 | 3 | [] | no_license | package eclipsenetbeans.gui;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.swing.JFrame;
public class ScreenRenderer {
private static Screen screen;
private static JFrame frame = null;
public static void render(Graphics2D g2, Rectangle bounds, double off) {
g2.setC... |
Java | UTF-8 | 4,712 | 2.078125 | 2 | [] | no_license | package com.pengheng.core.datasource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import com.pengheng.core.SpringContextUtil;
import com.pengheng.util.Toolkits;
... |
Java | UTF-8 | 813 | 1.9375 | 2 | [
"Apache-2.0"
] | permissive | package app.coronawarn.datadonation.services.ppac.ios.controller.validation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
impor... |
C++ | UTF-8 | 2,173 | 2.9375 | 3 | [] | no_license | #pragma once
#ifndef MPL_DEMO_TWIST_HPP
#define MPL_DEMO_TWIST_HPP
#include <Eigen/Dense>
namespace mpl::demo {
template <class S>
class Twist {
using Scalar = S;
Eigen::Matrix<Scalar, 6, 1> m_;
public:
Twist() {
}
template <typename V, typename R... |
Java | UTF-8 | 743 | 2.265625 | 2 | [] | no_license | package com.example.demo.dao.Model;
import javax.persistence.*;
import java.util.List;
@Entity
public class Zespol {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@ManyToMany(targetEntity = Pracownik.class, mappedBy = "zespoly", cascade = CascadeT... |
C | UTF-8 | 3,796 | 2.53125 | 3 | [] | no_license | /***********************************************************************
* FILENAME : SmartLock.c
* AUTHOR: Justin Barnitz, Kevin Loeffler
* DATE: NOV 2016
* DESCRIPTION: LPC 1115 xpresso board. Recieves bluetooth commands to
* control servo motor, to lock/unlock door.
*
* PIN LAYOUT:
* Pin 2.0 => PWM for servo
* ... |
Markdown | UTF-8 | 382 | 2.5625 | 3 | [] | no_license | # 登录记录(t_sys_login_log)
| 列名 | 类型 | KEY | 可否为空 | 注释 |
| ---- | ---- | ---- | ---- | ---- |
|id|int(65)|PRI|否|主键|
|logname|varchar(255)||是|日志名称|
|userid|int(65)||是|管理员id|
|create_time|datetime||是|创建时间|
|succeed|varchar(255)||是|是否执行成功|
|message|text||是|具体消息|
|ip|varchar(255)||是|登录ip|
|
C# | UTF-8 | 6,672 | 3.03125 | 3 | [
"MIT"
] | permissive | // ############################################################################
// # Galen Lanphier #
// # https://github.com/lanphiergm/AdventOfCodeCS #
// # MIT License. See LICENSE file #... |
Markdown | UTF-8 | 7,294 | 2.921875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Manage secrets in Azure Container Apps
description: Learn to store and consume sensitive configuration values in Azure Container Apps.
services: container-apps
author: craigshoemaker
ms.service: container-apps
ms.topic: how-to
ms.date: 09/29/2022
ms.author: cshoe
ms.custom: event-tier1-build-2022, ignite-202... |
Markdown | UTF-8 | 2,344 | 3.140625 | 3 | [
"Unlicense"
] | permissive | # Relevance logic
**Relevance logic** (also relevant logic) is a substructural logic that requires that antecedent and consequent of implications be relevantly related.
Relevance logic aims to capture aspects of implication that are ignored by the "material implication" operator in classical truth-functional logic,... |
Markdown | UTF-8 | 1,038 | 2.8125 | 3 | [
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | # SI 506: Lab Exercise 06
This week's lab focuses on a new data construct, tuples, and on implementing a quick function for the quiz.
You will complete two exercises involving tuples so that you can become familiar with how they work,
and why they are so important to python. You will also get to implement a function ... |
PHP | UTF-8 | 2,394 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Service;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class FileUploader
{
/**
* @var
*/
private $targetDirectoryActualite;
/**
* @var
*/
private $targetDirectorySpectacle;
/**... |
Python | UTF-8 | 1,079 | 4.46875 | 4 | [] | no_license | #1. Integer
# add(+), subtract(-), multiply(*) and divide(/)
2 + 3
3-2
2*3
3/2
# multiplication
3 ** 2 # result = 9
print(3**2)
3 ** 3 # result = 27
print(3**3)
# multiple operation
(2+ 3)*4
# 2. Floats
# same integer
# 3. Integer and Floats
# Divide always get a Float
4/2 # result = 2.0
print(4/2)
# mix an integer ... |
C++ | UTF-8 | 964 | 2.515625 | 3 | [] | no_license | #ifndef TCPCLIENT_H
#define TCPCLIENT_H
//System Includes
#include <netdb.h>
#include <strings.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <pthread.h>
#include <queue>
#include <semaphore.h>
//User Includes
#include "../Core/comm/globals.h"
#include "../Core/comm/data/servermessage.h"
#include "../Core... |
C++ | UTF-8 | 832 | 2.6875 | 3 | [] | no_license | #include<iostream>
using namespace std;
main()
{
int t;
scanf("%d",&t);
while(t--)
{
int a[105]={0},n=3,i;
long long int j;
long long int sum=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
sum+=a[i];
}
bool prev[sum+2],curr[sum+2];
for(j=1;j<=sum;j++)
prev[j]=0;//base condition 1 : if sum is not ... |
JavaScript | UTF-8 | 1,394 | 2.9375 | 3 | [
"MIT"
] | permissive | /* global PubSub, test, ok, equal, deepEqual, start, asyncTest, expect */
test('test listener length', function () {
var pubSub = new PubSub();
equal(pubSub.listeners.length, 0, 'unused pubSub has no listeners');
var token1 = pubSub.subscribe(function () {}, function () {});
pubSub.subscribe(function () {}, functi... |
Java | UTF-8 | 1,183 | 3 | 3 | [] | no_license | package com.XPeru.chess;
import java.util.ArrayList;
import java.util.List;
public class Queen extends ChessPieceBase {
public Queen(int xPosition, int yPosition) {
super(xPosition, yPosition);
this.setNamePiece('Q');
}
@Override
boolean canBeChecked() {
// TODO Auto-generated method stub
return false;
... |
Python | UTF-8 | 281 | 2.734375 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Login management script """
from getpass import getpass
def get_username():
return input("Username: ")
def get_password():
return getpass("Password: ")
if __name__ == "__main__":
print("Not directly executable") |
TypeScript | UTF-8 | 1,160 | 2.578125 | 3 | [
"MIT"
] | permissive | import { BeerType } from '../enums/beer-type.enum';
import { BeerService } from './beer.service';
describe('BeerService', () => {
it('should insert new beer', async () => {
const srv = new BeerService();
srv.insert({ name: 'banana', beerType: BeerType.LAGER }).subscribe();
srv.fetchAllBeers().subscr... |
PHP | UTF-8 | 12,536 | 2.5625 | 3 | [] | no_license | <?php
require_once('../../clases/includes/dbmanejador.php');
class Modelo {
function Modelo(){
}
function consulta_familia($nombre_familia, $modelo_familia, $estilo_id){
$con = new DBmanejador;
if($con->conectar() == true){
$consulta = '
SELECT f.familia_id, i.marca, i.modelo, e.nombre_estilo, f.n... |
Java | UTF-8 | 4,473 | 2.46875 | 2 | [] | no_license | //package ressourceUseless;
//
//import java.io.IOException;
//import java.net.InetAddress;
//import com.badlogic.gdx.ApplicationListener;
//import com.badlogic.gdx.Gdx;
//import com.badlogic.gdx.graphics.GL10;
//import com.esotericsoftware.kryonet.Client;
//import com.esotericsoftware.kryonet.Connection;
//import com.... |
C# | UTF-8 | 827 | 2.578125 | 3 | [] | no_license | using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace PresentationLayer.Models
{
public class AddStoreDiscountModel
{
[DisplayName("Minimum Purchase Price For Discount")]
[Required(ErrorMessage = "Please minimum price to recieve discount", AllowEmpty... |
Python | UTF-8 | 982 | 2.71875 | 3 | [] | no_license | import unittest
import sys
sys.path.append('../../src')
from filter.ArrayExtr.base.ArrayExtr import ArrayExtr, GetArrayExtr
from filter.ArrayExtr.ArrayOddExtr import ArrayOddExtr
from filter.ArrayExtr.ArrayConstantExtr import ArrayConstantExtr
class TestGetArrayExtr(unittest.TestCase):
"""
Тесты получения нужн... |
Swift | UTF-8 | 676 | 2.546875 | 3 | [
"MIT"
] | permissive | //
// UserModel.swift
// ValorantTracker
//
// Created by Aritro Paul on 05/01/21.
//
import Foundation
struct User: Codable {
let country, sub, playerLocale: String
let acct: Account
enum CodingKeys: String, CodingKey {
case country, sub
case playerLocale = "player_locale"
cas... |
C++ | UTF-8 | 284 | 2.703125 | 3 | [
"MIT"
] | permissive | #include "SpawnPoint.h"
SpawnPoint::SpawnPoint(Vector position,Vector direction) :
position(position),direction(direction) {}
Vector SpawnPoint::getPosition() {
return this->position;
}
Vector SpawnPoint::getDirection() {
return this->direction;
}
SpawnPoint::~SpawnPoint() {}
|
Python | UTF-8 | 536 | 3.65625 | 4 | [] | no_license | from cs50 import get_string
text = get_string("Text: ")
letters = 0
words = 1
sentences = 0
for c in text:
if c.isalpha():
letters += 1
elif c == " ":
words += 1
elif c in [".", "!", "?"]:
sentences += 1
indexL = (letters / words) * 100
indexS = (sentences / words) * 100
i... |
Java | UTF-8 | 714 | 2.6875 | 3 | [] | no_license | package operations;
import util.MatrixUtil;
import java.util.Arrays;
import java.util.Collections;
public final class ShiftOperation implements ShuffleOperation {
private Character[][] ma3x;
private final int k;
public ShiftOperation(int k) {
this.k = k;
}
@Override
pub... |
C++ | SHIFT_JIS | 696 | 3.125 | 3 | [] | no_license | #pragma once
#include "../etc/Vector2.h"
class Game;
class Mouse
{
public:
// fXgN^
~Mouse();
// CX^Xϐ̎擾
static Mouse& Get(void) {
static Mouse instance;
return instance;
}
//
void UpData(void);
// NbN
bool Click(void) {
return (state != 0);
}
// gK[NbN
bool TrigerClick(void) {
return (state... |
JavaScript | UTF-8 | 260 | 3.546875 | 4 | [] | no_license | // Пиши код ниже этой строки
function addOverNum(number, ...args) {
let total = 0;
for (const arg of args) {
if (arg > number) {
total += arg;
}
}
return total;
}
console.log(addOverNum(10, 12, 4, 11, 48, 10, 8));
|
Python | UTF-8 | 2,553 | 2.578125 | 3 | [] | no_license | from django.db import models
from django.urls import reverse
class Answer(models.Model):
"""Через админку добавляем ответ на вопрос, который отобразится для каждого вопроса."""
title = models.CharField("Ответ", max_length=100)
def __str__(self):
return self.title
class Meta:
verbose_... |
Python | UTF-8 | 1,441 | 3.875 | 4 | [] | no_license | import time
class timer:
def __init__(self, minutes=int(0), seconds=float(0)):
self.seconds = float(seconds)
self.minutes = int(minutes)
self.hours = int(0)
def __timeUP(self):
if (self.hours == 0 and self.minutes == 0 and round(self.seconds, 2) == 0.00):
return Tr... |
C | UTF-8 | 983 | 3.15625 | 3 | [
"MIT"
] | permissive | #include <stdio.h>
#define true 1
#define false 0
int popstar(int N[][1000], int j, int n)
{
for (int i = 0; i < n; i++)
{
if (N[i][j] != 1) return false;
}
return true;
}
int main()
{
int N[1000][1000], n, maybe[1000], busca, busca_p, k = 0;
scanf("%i", &n);
for (int i = 0; i <... |
Python | UTF-8 | 2,398 | 4.1875 | 4 | [
"MIT"
] | permissive | # Yet Another KMP Problem
#######################################################################################################################
#
# This challenge uses the famous KMP algorithm. It isn't really important to understand how KMP works, but you
# should understand what it calculates.
# A KMP algori... |
Markdown | UTF-8 | 45,840 | 2.71875 | 3 | [] | no_license | ---
layout: default
title: "2345.周恩来李先念接见财贸系统代表的讲话"
weight: 2345
---
李先念1967-3-21
周恩来李先念接见财贸系统代表的讲话
周恩来 李先念
1967.03.21
〖地点:国务院小礼堂。国务院财贸系统革命造反派代表和财贸各部党组成员出席。〗
周总理讲话
同志们,很对不住大家,昨天晚上大家呆了半夜,昨晚搞了两个座谈会,搞了一个是黑龙江的,一个是安徽的,继续下去就不行了。财贸系统座谈会是最多的了,你们自己能解决的问题,还要找我,现在怎么谈法?你先谈还是我先谈。看来财金学院“八·八队”的大字报,提了一些问题,我来解答,你们同意不同意?当然有些不是属于我... |
Python | UTF-8 | 7,870 | 2.515625 | 3 | [] | no_license | # -*- coding:utf-8 -*-
import re
import xlrd
import xlsxwriter
import sys
import os
class colType:
def __init__(self):
#self.filename = sys.argv[1]
#path = os.path.dirname(self.filename)
#name = os.path.basename(self.filename).split('.')[0]
#self.model_name = path +"/"+ name + '_模型.... |
Java | UTF-8 | 498 | 2.03125 | 2 | [] | no_license | package dao;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import model.Responsable;
@Transactional
public interface ResponsableInt {
public void addResponsable(Responsable responsable);
public void updateResponsable(Responsable responsable);
public void deletresponsable(... |
C++ | UTF-8 | 1,010 | 3.015625 | 3 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
typedef long long ll;
string A, B, As(100, 0), Bs(100, 0);
int main() {
cin >> A >> B;
size_t i = 0;
bool result = false;
bool greater;
for (size_t i = 0; i < A.length(); i++) {
char c = A[i];
if ('a' <= c && c <= 'z') {
... |
Python | UTF-8 | 4,814 | 3.328125 | 3 | [] | no_license | import numpy as np
class Reward():
def __init__(self):
pass
def get_reward(self, data, action):
'''
The main method we call for getting reward
'''
# The data we get from carla
image, depth, seg, velocity, accleration = data
# Our car p... |
Python | UTF-8 | 1,104 | 3.578125 | 4 | [] | no_license | # parsing in python
#
# format: (c = comment, p CNF = conjunctive normal form)
# c
# c start with comments
# c
# c
# p cnf 5 3
# 1 -5 4 0
# -1 5 3 4 0
# -3 -4 0
def parseDataFile(filePath):
dataFile = open(filePath, "r")
data = dataFile.read()
data = data.split("\n")
nbvar = 0
nbclause = 0
cl... |
JavaScript | UTF-8 | 1,512 | 3 | 3 | [
"MIT"
] | permissive | function validateLoginForm() {
var username = document.forms["Login"]["username"].value;
var password = document.forms["Login"]["password"].value;
if (username == "") {
alert("username must be filled");
return false;
}
if (password == "") {
alert("password must be filled");
... |
JavaScript | UTF-8 | 247 | 3.40625 | 3 | [] | no_license |
function reverseString(str) {
let letterArray = str.split('');
let reversedArray = [];
for (let i = 0; i < str.length; i++) {
reversedArray.push(letterArray.pop())
}
return reversedArray.join('');
}
module.exports = reverseString; |
Java | UTF-8 | 2,128 | 2.59375 | 3 | [] | no_license | package ifnetpoo.Controllers;
import ifnetpoo.Models.PaginaWeb;
import ifnetpoo.Models.Livro;
import ifnetpoo.Models.Usuario;
import ifnetpoo.Models.Disciplina;
import ifnetpoo.Interfaces.IMaterial;
import ifnetpoo.DAO.MaterialDAO;
import ifnetpoo.Database.MySQLConnection;
import ifnetpoo.CustomExceptions.Excessao... |
Java | UTF-8 | 1,110 | 3.265625 | 3 | [] | no_license | package com.company;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
public class Server {
public static void main (String[] args) throws IOException {
final int PORT = 8080;
final String ROOT_DIRECTORY_PATH = "root";
ServerSocket serverSocket = new ServerSocket(PORT);
int numberOfThr... |
Java | UTF-8 | 591 | 2.671875 | 3 | [] | no_license | package com.montealegreluis.ticketbeast.concerts.address;
import static org.junit.jupiter.api.Assertions.*;
import com.montealegreluis.assertions.IllegalArgumentException;
import org.junit.jupiter.api.Test;
final class CityTest {
@Test
void it_cannot_be_blank() {
assertThrows(IllegalArgumentException.class, ... |
Swift | UTF-8 | 2,037 | 2.59375 | 3 | [] | no_license | //
// Created by Alx Krw on 08.10.2020
// Copyright © 2020 Ronas IT. All rights reserved.
//
import UIKit
import Framezilla
final class AppButton: UIButton {
var enabledSettings = (backgroundColor: UIColor.eveningSea, tintColor: UIColor.white)
var disabledSettings = (backgroundColor: UIColor.solitude, tint... |
C++ | UTF-8 | 2,305 | 3.328125 | 3 | [] | no_license | #include <iostream>
#include <string>
#include "Fighter.h"
using namespace std;
int main(){
Fighter creature_one(50.0, 30.0, 10.0, 5.0,"Ratatat" );
Fighter creature_two(200.0, 60.0, 10.0, 30.0,"Lunala");
int optionNumber;
while(true){
cout << "USER 1 \n\n";
creature_one.display_statist... |
C# | UTF-8 | 1,158 | 3.625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Page07
{
class Program
{
public static void Main()
{
int n;
int other = 100;
// Console.WriteLine($"inside Main before: n= {n}, othe... |
Markdown | UTF-8 | 1,526 | 2.828125 | 3 | [] | no_license | # Microservice
## Why Microservice?
Because of several drawbacks of previous architecture - Monolithic Architecture:
1. Unreliable:

if part of service is down, entire services are down. impact the availability of entire application
2. Unsalable: there is a need that we ne... |
Python | UTF-8 | 684 | 3.890625 | 4 | [
"Apache-2.0"
] | permissive | import collections
class Path(object):
"""Path object represents a single node in a words path
It's used for finding path between two corresponding words.
Technically it is a reversed linked list where each node keeps a value set to a
certain word and a pointer to the previous node.
"""
def _... |
PHP | UTF-8 | 1,077 | 2.515625 | 3 | [] | no_license | <?php
Require_once 'pdo.php';
function loai_insert($ten_loai){
$sql = "INSERT INTO loaihang(ten_loai) VALUES(?)";
pdo_execute($sql, $ten_loai);
}
function loai_update($ma_loai, $ten_loai){
$sql = "UPDATE loaihang SET ten_loai=? WHERE ma_loai=?";
pdo_execute($sql, $ten_lo... |
C# | UTF-8 | 1,205 | 3.796875 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PracticalPart5._4
{
class Program
{
static void Main(string[] args)
{
//Сформировать одномерный массив из 20 случайных чисел в диапазоне [-50;50]. Определит... |
C++ | UTF-8 | 877 | 3.109375 | 3 | [] | no_license | class Solution {
public:
int len(vector<int>& p){
return p[0]*p[0]+p[1]*p[1];
}
void quickSel(vector<vector<int>>& points,int left,int right,int K){
if(left==right) return;
int pvt=len(points[right]);
int index=left;
for(int i=left;i<right;++i){
if(len(poi... |
C# | UTF-8 | 6,807 | 3.03125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace WF_AsyncPinger
{
static class AsyncHelper
{
static public bool PingSy... |
Swift | UTF-8 | 8,106 | 2.515625 | 3 | [
"MIT"
] | permissive | //
// MainViewController.swift
// Weibo
//
// Created by sw on 16/6/6.
// Copyright © 2016年 sw. All rights reserved.
//
import UIKit
class MainViewController: UITabBarController {
// MARK: 生命周期方法
override func viewDidLoad() {
super.viewDidLoad()
// 添加所有子控制器
addChildViewCo... |
C | UTF-8 | 1,800 | 2.765625 | 3 | [] | no_license | /*
** parsing_args.c for PSU_2015_zappy
**
** Made by Matthew LEJEUNE
** Login lejeun_m
**
** Started on Fri Jun 10 15:46:01 2016 Matthew LEJEUNE
** Last update Mon Jun 13 15:31:13 2016 Matthew LEJEUNE
*/
#include "server.h"
int find_port(char **av)
{
int index;
index = 0;
while (av[index] != NULL)
{
if ... |
Markdown | UTF-8 | 1,942 | 3 | 3 | [
"MIT"
] | permissive | # Docker Example with NiceGUI
This README provides a walkthrough on how to utilize the NiceGUI release docker image, [zauberzeug/nicegui, available on Docker Hub](https://hub.docker.com/r/zauberzeug/nicegui).
The image is configured using a `docker-compose.yml` file for ease of use.
You can achieve similar results usi... |
Java | UTF-8 | 1,150 | 2.453125 | 2 | [] | no_license | package com.wgycs.webview;
import android.util.Log;
import android.webkit.JavascriptInterface;
import org.json.JSONObject;
/**
* @ProjectName: FM_android
* @Package: com.wgycs.library_webview
* @ClassName: JavaScriptInterface
* @Description: webview js 接口处理类
* @Create: By wangy / 2020/4/7 19:49
* ... |
Python | UTF-8 | 885 | 3.578125 | 4 | [] | no_license | class Animal():
def __init__(self, nome, idade, genero, peso):
self._nome = nome
self._idade = idade
self._genero = genero
self._peso = peso
self._energia = 60.0
self.som = ""
def obter_informacoes(self):
return "Nome: {} | Idade: {} | Gênero: {} ... |
Markdown | UTF-8 | 252 | 3.21875 | 3 | [] | no_license | # 次数
## 概念与性质
定义(次数):
- 设 m 是大于 1 的整数,a 是与 m 互素的整数,使 $$a^l \equiv 1 \pmod{m}$$ 成立的最小正整数 l 叫做 a 对模 m 的次数。记作 $$ord_m(a)$$ 或 $$\sigma(a)$$
|
Java | UTF-8 | 3,026 | 2.375 | 2 | [
"BSD-3-Clause",
"LGPL-2.1-or-later",
"LicenseRef-scancode-mit-old-style",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.1-only",
"Apache-2.0",
"MPL-2.0",
"EPL-1.0"
] | permissive | /*
* Copyright 2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
Java | UTF-8 | 5,058 | 2.046875 | 2 | [] | no_license | package com.restful.daily_click.repository;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.restful.daily_click.entity.ClassInfoEntity;
import com.restful.daily_click.entity.ClassRoomEntity;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.r... |
C# | UTF-8 | 755 | 2.609375 | 3 | [] | no_license | using System;
using System.Windows.Input;
using WpfTest.Components;
namespace WpfTest.ViewModels
{
public class CameraViewModel : NotificationObject
{
private int _imageWidth;
public CameraViewModel()
{
ImageWidth = 1280;
SetImageWidthCommand = new DelegateComm... |
C++ | UTF-8 | 1,236 | 2.640625 | 3 | [] | no_license | #pragma once
#ifndef LEX_HPP
#define LEX_HPP_DEF
#include <iostream>
#include <string>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <float.h>
#define st_compare 0
#define st_reserved 1
#define st_variable 2
using namespace std;
bool isNumber(char a);
int isR... |
Markdown | UTF-8 | 2,360 | 3 | 3 | [] | no_license | Python-Movie-Recommender
Author: Amir Ali
==============================================
Built using Python 2.7.13 |
with Python Anaconda 4.4.0 (64-bit) IDE
Required Python Modules = [pandas, numpy, scipy, sklearn, sqlite3, matplotlib ]
-------------------------------------------------------------------------------
T... |
Python | UTF-8 | 1,447 | 3.46875 | 3 | [] | no_license | #Multiple Columns
#-----------------------------
#%#Converting multiple columns to Categories
#multiple columns to categories
import pandas as pd
from pydataset import data
data =data('iris')
data.columns
data.describe()
data.dtypes
def rstr(df): return df.shape, df.apply(lambda x: [x.unique()])
print(rstr(data))
df.in... |
Java | UTF-8 | 1,155 | 2.125 | 2 | [] | no_license | package com.artmark.avaxo.command;
import com.artmark.avaxo.command.model.CommandModel;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframe... |
C | WINDOWS-1250 | 2,920 | 2.890625 | 3 | [] | no_license |
#include "autreMenu.h"
// Globale variables
extern int midx, midy;
#define PI 3.14
void systemSolair()
{
int m=0,v=260,eh=300,mr=100,j=10,s=230,u=190,n=20;
float pi=3.1424,a,b,c,d,e,f,g,h,z;
while(1)
{
// Changer le diplacement dans l'orbit
a=(pi/180)*m++;
b=(pi/180)*v++;
... |
Rust | UTF-8 | 234 | 2.828125 | 3 | [] | no_license | pub fn is_prime(x: u64) -> bool{
if x > 2 && x % 2 == 0 {
return false
}
if x == 1 {
return false
}
for n in 2..x/2+1 {
if x % n == 0 {
return false
}
}
true
} |
JavaScript | UTF-8 | 710 | 3.96875 | 4 | [
"MIT"
] | permissive | /**
* @param {string} a
* @param {string} b
* @return {number}
*/
const hammingDistance = (a, b) => {
const result = [];
if (a.length === b.length) {
let textA = " ";
let textB = " ";
for (let i = 0; i < a.length; i++) {
textA += a[i].charCodeAt(0).toString(2) + " ";
}
for (let i = 0... |
Python | UTF-8 | 4,270 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | """A preprocessor that extracts all of the outputs from the
notebook file. The extracted outputs are returned in the 'resources' dictionary.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import re
from binascii import a2b_base64
import sys
import os
from mi... |
Java | UTF-8 | 5,515 | 2.109375 | 2 | [] | no_license | package com.movision.controller.boss.robot;
import com.movision.common.Response;
import com.movision.facade.robot.RobotFacade;
import com.movision.mybatis.user.entity.User;
import com.movision.utils.pagination.model.Paging;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.Api... |
C# | UTF-8 | 7,174 | 2.515625 | 3 | [] | no_license | using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace AnalogClockApplication
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private AnalogClockControl... |
Java | UTF-8 | 607 | 3.296875 | 3 | [] | no_license | package com.trylabs;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
System.out.println("Введите количество минут разговора и день недели(1-7)");
Scanner scanner = new Scanner(System.in);
int n=scanner.nextInt();
int day=scanner.nextInt();
... |
Markdown | UTF-8 | 4,791 | 2.9375 | 3 | [] | no_license | ---
author: whidy
comments: true
date: 2013-10-17 15:12:00+00:00
layout: post
link: http://www.whidy.net/chrome-codecademy-font-size-10px.html
slug: chrome-codecademy-font-size-10px
title: Chrome无法正确显示小于12px的问题思考解决
wordpress_id: 1784
categories:
- CSS
- HTML
- IT技术
- 技术分享
tags:
- 技术
- 网站
---
很多东西都是有时效性的啦...正巧我又遇到一个设计做... |
C++ | UTF-8 | 1,196 | 3.296875 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <string>
using namespace std;
bool isValid(string s)
{
if(s.empty() || s.size() > 3 || (s.size() > 1 && s[0] == '0'))
return false;
int res = atoi(s.c_str());
return (res >= 0 && res <= 255);
}
void restore(string s,int k,string out,vector<string> &re... |
Java | UTF-8 | 3,615 | 2.203125 | 2 | [] | no_license | package Controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.persistence.EntityManager;
import Comparator.Comparador;
import Entity.CondicionOrdenamiento;
import Entity.Empresa;
imp... |
C++ | UTF-8 | 1,276 | 3.640625 | 4 | [] | no_license | #include <iostream>
#include <chrono>
#include <vector>
#include <memory>
using namespace std;
using namespace chrono;
// 7. Radix Sort
// Time Complexity: theta(n)
template <typename T>
void RadixSort(T* A, int n, int k)
{
vector<T> vec_tmp[10];
for (int i = 0, mod = 10, div = 1, tmp_idx = 0; i <= k - 1; ++i, mo... |
Go | UTF-8 | 605 | 2.921875 | 3 | [] | no_license | package question_671_680
import (
"testing"
)
func Test_validPalindrome(t *testing.T) {
tests := []struct {
s string
want bool
}{
{"ab", true},
{"a", true},
{"aba", true},
{"abca", true},
{"bddb", true},
{"abbca", true},
{"abbdca", false},
{"aguokepatgbnvfqmgmlcupuufxoohdfpgjdmysgvhmvffcnqxj... |
Java | UTF-8 | 12,796 | 2.046875 | 2 | [] | no_license | // Code generated by Wire protocol buffer compiler, do not edit.
// Source file: AppInterface.proto at 227:1
package com.yijianyi.protocol;
import com.squareup.wire.FieldEncoding;
import com.squareup.wire.Message;
import com.squareup.wire.ProtoAdapter;
import com.squareup.wire.ProtoReader;
import com.squareup.wire.Pro... |
Java | UTF-8 | 1,208 | 2.984375 | 3 | [] | no_license | package exercício_too_agosto;
public class Exercício_TOO_Agosto {
public static void main(String[] args) {
System.out.println("***** DAGOS DO PACIENTE ***** \n");
Paciente p = new Paciente();
p.setNome("Helen");
p.setSobrenome("Ikeda");
p.setCPF("055.475.999-66")... |
Java | UTF-8 | 6,336 | 1.867188 | 2 | [
"Apache-2.0"
] | permissive | package com.xinfan.wxshop.business.admin;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stere... |
Shell | UTF-8 | 246 | 2.640625 | 3 | [] | no_license | #!/bin/bash
IMAGENAME=${2:-"debian:jessie"}
sed "s/{{IMAGENAME}}/${IMAGENAME}/" Dockerfile.templ > Dockerfile
docker build -t py2deb .
rm Dockerfile
mkdir -p pkg
docker run -v `pwd`/pkg:/tmp --rm=true -it --name py2deb py2deb py2deb $3 -- $1
|
Python | UTF-8 | 1,483 | 2.515625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Thu May 2 11:15:26 2019
@author: Chris
"""
from bokeh.models import Panel, Tabs
from bokeh.io import output_file, show
from bokeh.plotting import figure
import gridwatchLinePlot
import tidalvwind
import twinRidgePlot
import govtDataPlot
import loadFollowingHex
im... |
Markdown | UTF-8 | 366 | 2.65625 | 3 | [] | no_license | # Overview
This is a tic-tac-toe program
This simple game demonstrates how to use files to save game progress and resume the game by reading the game board from the file if it exists.
I created this game to review working with JSON files in python.
[Software Demo Video](http://youtube.link.goes.here)
# Development... |
C# | UTF-8 | 1,163 | 3.390625 | 3 | [] | no_license | using System;
namespace Ejercicio02
{
class Program
{
static void Main(string[] args)
{
int valorMax = 0;
int times = 0;
int[,] matriz = new int[4, 4];
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4;... |
TypeScript | UTF-8 | 2,002 | 2.5625 | 3 | [
"MIT"
] | permissive | import * as firebase from "firebase";
import stateEngine from "./state-engine";
import App from "./app";
interface GridConfig {
x: number,
y: number,
autoPosition: boolean,
id: string
}
export class AppGridService {
public saveInstalledGrid() {
const apps = stateEngine.get("installed-apps... |
Python | UTF-8 | 273 | 3.21875 | 3 | [] | no_license | num = int(input())
arr = []
newarr = []
arr = list(map(int, input().split()))
maxnum = max(arr)
for i in arr:
newarr.append(i / maxnum * 100)
print(round(sum(newarr) / num, 6))
# round는 소수 n번째 자리까지 보여주는 것 n번째 전에서 반올림한다.
|
Java | UTF-8 | 17,227 | 1.78125 | 2 | [] | no_license | package com.example.designofsteelstructures;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import andro... |
TypeScript | UTF-8 | 4,606 | 2.71875 | 3 | [] | no_license | import crypto from 'crypto';
import { EntityPlainProtectedColumn } from '@column/entities';
describe('Plain entity column protection FROM', () => {
test(`String data should be deserialized in the same format it's stored`, () => {
const entityPlain = new EntityPlainProtectedColumn({
binaryTextFormat: 'hex',... |
Java | UTF-8 | 382 | 1.992188 | 2 | [] | no_license | package ru.nchernetsov.test.sbertech.common.message;
import lombok.Data;
import java.io.Serializable;
/**
* Адрес для указания отправителя и получателя сообщений
*/
@Data
public class Address implements Serializable {
private final String address;
public Address(String address) {
this.address = ad... |
C# | UTF-8 | 1,250 | 2.78125 | 3 | [] | no_license | class Path
{
public string Id { get; set; }
public File File { get; set; }
}
class File
{
public Guid Id { get; set; }
public ICollection<Version> Versions { get; set; }
}
class Version
{
public string Id { get; set; }
}
clas... |
Ruby | UTF-8 | 2,171 | 2.8125 | 3 | [
"MIT"
] | permissive | require "fmparser/error"
require "fmparser/node"
require "fmparser/parser/deep_hash_parser"
module FMParser
class Parser
# @param [<String>] paths
# @param [Class] root Google::Protobuf message class
def parse(paths:, root:)
deep_hash = DeepHashParser.parse(paths)
scalars, enums, messages = ... |
C++ | UTF-8 | 389 | 3.109375 | 3 | [] | no_license | #include <math.h>
#include <stdio.h>
#include <iostream>
using namespace std;
int main( void )
{
//Entrada
float raio = 0;
float area = 0;
const float pi = 3.14159;
cout << "ATIVIDADES (5)";
cout << "\n\nInforme o raio do circulo: ";
cin >> raio;
//Processamento
area = pi*pow(r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.