code
stringlengths
4
1.01M
using System; using System.Diagnostics; using System.IO; namespace Cogito.Diagnostics { /// <summary> /// Implements a <see cref="TraceListener"/> that writes to a file, rolling over for each day. /// </summary> public class RollingFileTraceListener : TraceListener { readonly st...
# Test hashlib module # # $Id: test_hashlib.py 79216 2010-03-21 19:16:28Z georg.brandl $ # # Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # import hashlib import unittest from test import test_support from test.test_support import _4G, preci...
require 'rails/generators' require 'rails/generators/migration' require 'migration_assist/helper/file_name' module RailsAssist::Migration include Rails::Generators::Migration include FileNameHelper def reverse_migration_name name name.gsub(/^add_/, 'remove_').gsub(/^create_/, 'drop_') end def rever...
package a2ndrade.explore.data.model; import android.graphics.Color; import android.os.Parcel; import android.os.Parcelable; public class Repo implements Parcelable { public static final int DEFAULT_COLOR = Color.DKGRAY; public final String name; public final String description; private boolean isStar...
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Resources::Mgmt::V2019_10_01 module Models # # Deployment operation parameters. # class ScopedDeployment include MsRe...
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Cosmosdb::Mgmt::V2020_06_01_preview module Models # # A private endpoint connection # class PrivateEndpointConnection < Prox...
// // ExampleTableViewController.h // WDIOSLibrary // // Created by Dhanu Saksrisathaporn on 9/13/2559 BE. // Copyright © 2559 Dhanu Saksrisathaporn. All rights reserved. // @import WDIOSLibrary; @interface ExampleTableViewController : WDIOSTableViewController @end
// // DialogueBoxSystem.cpp // Chilli Source // Created by Ian Copland on 04/03/2014. // // The MIT License (MIT) // // Copyright (c) 2014 Tag Games Limited // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), ...
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013-2014 sagyf Yang. The Four Group. */ package goja.lang.util; import java.util.List; import java.util.Map; import java.util.Set; public interface Context extends Cloneable { Context set(String name, Object value); Set<St...
"use strict"; var sqlite3 = require('sqlite3'); var authHelper = require('./server/helpers/auth'); var db = new sqlite3.Database('./data/users.db'); db.serialize(function() { db.run( 'CREATE TABLE "users" (' + '"id" INTEGER PRIMARY KEY AUTOINCREMENT,' + '"username" TEX...
REM ----------------------------------------------------------- REM --- PHP_EXCEL / LIBXL EXTENSION REM ----------------------------------------------------------- @ECHO OFF SET DIR=%~dp0 SET DIR=%Dir:~0,-1%\.. CD %DIR%\phpdev\vc11\x64\php-5.6.9\ext @ECHO. @ECHO cloning php_excel repository... git clone https://gith...
/**************************************************************************** Copyright (c) 2013-2015 scutgame.com http://www.scutgame.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
<?php unset($where); if ($_GET['l'] == 'anfragen'){ $where['typ'] = 1; } elseif ($_GET['l'] == 'angebote'){ $where['typ'] = 0; } elseif ((($_GET['l'] == 'meinkonto') && !isset($_GET['a'])) || (($_GET['l'] == 'meinkonto') && ($_GET['a'] == 'angebote'))){ $where['typ'] = 0; $where['userid'] = $_SESSION['...
using System.Collections.Generic; using System.Xml.Serialization; namespace Subsonic.Common.Classes { public class RandomSongs { [XmlElement("song")] public List<Child> Songs; } }
package es.infointernet.bean; import java.security.Principal; import java.util.List; public class User implements Principal { private String username; private List<String> roles; public String getUsername() { return username; } public void setUsername(String username) { this.username = use...
name 'phpbb' maintainer 'Millisami' maintainer_email 'millisami@gmail.com' license 'MIT' description 'Installs/Configures phpbb' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' depends 'mysql' depends 'database' depends...
#region License /* The MIT License Copyright (c) 2008 Sky Morey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy...
package org.sharedmq.primitives; import java.nio.ByteBuffer; /** * An adapter for the {@link MappedByteArrayStorageKey}. */ public class MappedByteArrayStorageKeyStorageAdapter implements StorageAdapter<MappedByteArrayStorageKey> { private static final MappedByteArrayStorageKeyStorageAdapter instance ...
<?php /* This file is auto-generated. Don't edit directly! */ namespace Jsor\Doctrine\PostGIS\Functions; use Jsor\Doctrine\PostGIS\AbstractFunctionalTestCase; use Jsor\Doctrine\PostGIS\PointsEntity; class ST_OverlapsTest extends AbstractFunctionalTestCase { protected function setUp() { parent::setUp...
--- layout: default title: Contato name: contato --- <div class="view contact"> <div class="wrapper"> <section class="space"> <h1 class="title">Contato</h1> <p> Tem um projeto legal em mente, e acha que posso ajudá-lo com ele? <br> Sin...
package algorithms.imageProcessing.features; import algorithms.util.PairInt; import algorithms.util.PixelHelper; import gnu.trove.iterator.TIntIterator; import gnu.trove.set.TIntSet; import gnu.trove.set.hash.TIntHashSet; import java.util.HashSet; import java.util.Set; import algorithms.packing.Intersection2DPacking; ...
using Microsoft.WindowsAzure.ServiceRuntime; namespace SFA.DAS.EmployerUsers.Web { public class WebRole : RoleEntryPoint { public override bool OnStart() { // For information on handling configuration changes // see the MSDN topic at http://go.microsoft.com/fwli...
# `res.location()` Sets the "Location" response header to the specified URL expression (`url`). ### Usage ```usage res.location(url); ``` ### Example ```javascript res.location('/foo/bar'); res.location('foo/bar'); res.location('http://example.com'); res.location('../login'); res.location('back'); ``` ### Notes >+ ...
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *bitcoin_strings[] = { QT_TRANSLATE_NOOP("bitcoin-core", "" "%s, you must set a rpcpassword in the configuration file:\n" " %s\n" "It is recomm...
// Package services provides Github Integration. package services import ( "encoding/json" ) // Git structs type User struct { Name string Email string Username string Display_name string } type GitRepository struct { Id int Name string Full_name ...
#define SOKOL_IMPL #include "sokol_args.h" void use_args_impl(void) { sargs_setup(&(sargs_desc){0}); }
"use strict" var writeIEEE754 = require('../float_parser').writeIEEE754 , readIEEE754 = require('../float_parser').readIEEE754 , Long = require('../long').Long , Double = require('../double').Double , Timestamp = require('../timestamp').Timestamp , ObjectID = require('../objectid').ObjectID , Symbol ...
<?php namespace Nht\Http\Requests; use Nht\Http\Requests\Request; class AdminCategoryRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. ...
<?php return [ '@class' => 'Gantry\\Component\\File\\CompiledYamlFile', 'filename' => '/Users/emil/Documents/code/ratello-landing/user/data/gantry5/themes/g5_helium/config/offline_page/layout.yaml', 'modified' => 1491210004, 'data' => [ 'version' => 2, 'preset' => [ 'image' =...
/** * DocumentController * * @description :: Server-side logic for managing documents * @help :: See http://links.sailsjs.org/docs/controllers */ var exec = require('child_process').exec; var path = require('path'); var fs = require('fs'); var UPLOADFOLDER = __dirname+'/../../.tmp/uploads'; module.export...
<!DOCTYPE html> <html lang="en"> <head> <!-- The jQuery library is a prerequisite for all jqSuite products --> <script type="text/ecmascript" src="../../../js/jquery.min.js"></script> <!-- This is the Javascript file of jqGrid --> <script type="text/ecmascript" src="../../../js/trirand/jquery.jqGri...
class ItemMarkersCountCache < ActiveRecord::Migration def self.up add_column :items, :markers_count, :integer, {:default => 0} end def self.down remove_column :items, :markers_count end end
using System; namespace SoCreate.ServiceFabric.PubSubDemo.SampleEvents { public class SampleEvent { public Guid Id { get; set; } public string Message { get; set; } public SampleEvent() { Id = Guid.NewGuid(); } } public class SampleUnorderedEv...
'use strict'; var assert = require('assert'), mongoose = require('mongoose'), mobgoose = require('../')(mongoose); var Foo = mongoose.model('Foo', new mongoose.Schema({}), 'foo_collection_name'); it('accepts configuration without url', function() { return mobgoose({ host: 'localhost', database: 'test123' }...
using System; using System.Collections.Generic; using System.Linq; using System.Security; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using NBitcoin; using Newtonsoft.Json; using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Controllers; using Stratis.Bitcoin.Fe...
package be.tjoener.editor.model; public interface Movable { Point getPosition(); void moveTo(Point position); }
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; public class Point { public double X { get; set; } public double Y { get; set; } } class Program { static void Main() { var pointOne = ReadPointCoordinates(); var pointTwo = ...
/* * Copyright (c) 2019 Handywedge Co.,Ltd. * * This software is released under the MIT License. * * http://opensource.org/licenses/mit-license.php */ package com.handywedge.context; import java.util.Date; import javax.enterprise.context.RequestScoped; import com.handywedge.context.FWRequestContext; import lo...
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [NonInviteServerTransaction](./sip.js.noninviteservertransaction.md) ## NonInviteServerTransaction class Non-INVITE Server Transaction. <b>Signature:</b> ```typescript expo...
"use strict"; const setupTask = require('utils').setupTask; const calcTasks = require("calcTasks"); module.exports = { run : function(creep){ if(!creep.task){ var room = creep.room; var creepsByTask = _(Game.creeps).filter( (c) => c.task && c.task.roomName == room.name).groupBy('task.typ...
namespace CampusSystem.Services.Data.Contracts { using System.Linq; using CampusSystem.Data.Models; public interface IFloorService { IQueryable<Floor> GetFloorByBuildingId(int buildingId); IQueryable<Room> GetRoomsByFloorId(int floorId); int GetFloorNameById(int floorId); ...
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; namespace AspxCommerce.ServiceItem { [Serializable] [DataContract] public class ServiceItemsDetailsInfo { [DataMember] private int _itemID; [DataMember] ...
<?php /* @Framework/Form/search_widget.html.php */ class __TwigTemplate_1e27897cdf53745818839e0426e315ba62e8c6dc797e62f5556e82b242f48ae4 extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array...
import { ModuleWithProviders } from "@angular/core"; export * from './src/app/services/image-lazy-load.service'; export * from './src/app/services/web-worker.service'; export * from './src/app/directives/image-lazy-load.directive'; export declare class ImageLazyLoadModule { static forRoot(configuredProviders: Array...
<?php namespace App\Http\Controllers; use Greg\View\Viewer; class HomeController { public function index(Viewer $viewer) { return $viewer->render('home'); } }
@echo off rem Checking command is run as administrator >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" rem If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt ech...
# iOS SDK 集成指南 <style> img[alt=jpush_ios] { width: 800px; } </style> ## SDK说明 ### 适用版本 本文匹配的 SDK版本:r2.1.5 以后。 [查看最近更新](../../updates)了解最新的SDK更新情况。 使用Xcode 6及以上版本可以使用新版Push SDK,Xcode 5环境下需要运行旧版本SDK(1.7.4) ### 资源文件 包名为JPush-iOS-SDK-{版本号} * lib文件夹:包含头文件 JPUSHService.h,静态库文件jpush-ios-x.x.x.a,jcore-ios-x.x.x.a,支...
package lcf.clock.prefs; import java.util.List; import lcf.clock.R; import lcf.weather.CitiesCallback; import lcf.weather.City; import lcf.weather.WeatherMain; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import androi...
// GET /api/v1/nowplaying/groovesalad { "stationId": "groovesalad", "time": 1425871720000, "artist": "Panorama", "title": "Selene", "album": "Panorama", "trackCorrected": false, "artistCorrected": false, "albumCorrected": false, "corrected": false, "duration": 335000, "durationEstimated": false }
# TraceConfig Object * `recording_mode` String (optional) - Can be `record-until-full`, `record-continuously`, `record-as-much-as-possible` or `trace-to-console`. Defaults to `record-until-full`. * `trace_buffer_size_in_kb` number (optional) - maximum size of the trace recording buffer in kilobytes. Defaults to 100M...
python3.6 ex21.py
/** * Using Rails-like standard naming convention for endpoints. * GET /api/bridges -> index * POST /api/bridges -> create * GET /api/bridges/:id -> show * PUT /api/bridges/:id -> upsert * PATCH /api/bridges/:id -> patch * DELETE /api/br...
<?php class Jobs extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('job_get'); $this->load->helper('url_helper'); $this->load->library('session'); } public functio...
all: cstsn.js clean: rm cstsn.js cstsn.js: cstsn.coffee coffee -c cstsn.coffee
/* jQuery UI Sortable plugin wrapper @param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config */ angular.module('ui.sortable', []) .value('uiSortableConfig',{}) .directive('uiSortable', [ 'uiSortableConfig', function(uiSortableConfig) { return { ...
<?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="14"/> <source>About Bitcoin</source> <translation type="unfinished"/> </message> ...
# o2.validation@0.2.0 * Name changed from `validate` to `validation`. * `isArray`, `isFunction`, and `isPromise` methods added. # o2.validation@0.0.0 * Initial commit.
load("build/jslint.js"); var src = readFile("dist/jquery.ImageColorPicker.js"); JSLINT(src, { evil: true, forin: true }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: // http://docs.jquery.com/JQuery_Core_Style_Guidelines var ok = { "Expect...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
#!/bin/bash # Install tomcat locally - https://tomcat.apache.org/index.html # # change the following environment variables to your project configuration as needed, # otherwise the defaults below will be used. # * TOMCAT_VERSION # # Include the following command your builds: # \curl -sSL https://raw.githubusercontent.co...
// ----------------------------------------------------------------------- // <copyright file="SubscriptionDailyUsageRecordCollectionOperations.java" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> // ---------------------------------------------------------------...
Noodles.http_app.routes do end
# seed-angular4-webpack Seed for angular 4 with webpack
require("lualib.texturepack_toolkit") prequire("generated") patch()
public class HelloWorld{ public static void main(String[] args) { System.out.println("Hello, World"); } }
# # rb_main.rb # Croak # # Created by Brian Cooke on 8/21/08. # Copyright (c) 2008 roobasoft, LLC. All rights reserved. # require 'osx/cocoa' require 'rubygems' include OSX Thread.abort_on_exception = true %w(EMKeychainProxy EMKeyChainItem).each do |class_name| OSX.ns_import class_name.to_sym end gemdir = OS...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTi...
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local NPCT = E:NewModule('NameplateTweaks', 'AceEvent-3.0') local NP = E:GetModule('NamePlates') if E.private.npct == nil then E.private.npct = {} end if P.npct == nil then P.npct = {} end -- Locked Settings, These settings...
using UnityEngine; using UnityEngine.UI; interface ITEST { } public class RestrictInterfaceExample : MonoBehaviour, ITEST { [RestrictInterface (typeof(ITEST))] public Object[] m_LayoutElement; }
<div ng-controller="SetupController"> <div data-alert class="loading-screen" ng-show="loading"> <i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i> Creating wallet... </div> <div class="setup" ng-show="!loading"> <form name="setupForm" ng-submit="create(setupForm)" novalidate> <div cla...
// The MIT License (MIT) // // Copyright (c) 2015-2016 Rasmus Mikkelsen // Copyright (c) 2015-2016 eBay Software Foundation // https://github.com/rasmus/EventFlow // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software")...
#find /store/user/tuos/RpPb2016/MiniForest/mb/v2/MinimumBias1/pp_mb_miniforest_v2/160217_005457/0000/Min* -type f -size +1M > MBx find /store/user/tuos/RpPb2016/MiniForest/mc/pu1/v02/MinBias_TuneCUETP8M1_5p02TeV-pythia8/pp_mcpu_miniforest_v02/160218_230825/0000/Min* -type f -size +1M > PU1.txt
/* * The MIT License * * Copyright 2015 Paul. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, me...
// *********************************************************************** // Filename : StopWatch.h // Author : LIZHENG // Created : 2014-04-28 // Description : 高精度计时器 // // Copyright (c) lizhenghn@gmail.com. All rights reserved. // ******************************************************...
--[[ The patterns '%D' and '[^%d]' are equivalent. What about the patterns '[^%d%u]' and '[%D%U]'? ]] --[[ [^%d%u] => ~(digit or upper-case letter) => ~(digit) and ~(upper-case letter) [%D%U] => ~digit or ~upper-case letter ]] print(string.match("1", "[^%d%u]")) --> nil print(string.match("1", "[%D%U]")) --> "1" pri...
import { jMask } from '@mask-j/jMask'; import { parser_parse, mask_stringify } from '@core/parser/exports'; import { listeners_on, listeners_off } from '@core/util/listeners'; UTest({ 'should parse name' () { var ast = jMask(` define Foo { h4 > 'Hello' } `); var def = ast.filter('define').get(0); eq...
var fs = require('fs'); var os=require('os'); var express = require('express'), // wine = require('./routes/wines'); user = require('./services/user'); contact = require('./services/contact'); inbox = require('./services/inbox'); outbox = require('./services/outbox'); device = require('./services/devic...
package cc.hughes.droidchatty; public class SearchResult { private int _postId; private String _author; private String _content; private String _posted; public SearchResult(int postId, String author, String content, String posted) { _postId = postId; _author = author; ...
using CSC.Common.Infrastructure.GitHub; using CSC.CSClassroom.Model.Projects; namespace CSC.CSClassroom.Service.Projects.PushEvents { /// <summary> /// A commit that we were notified of through a push event. /// </summary> public class PushEventCommit { /// <summary> /// The push event that notified us of th...
# -*- coding: utf-8 -*- import sys sys.path.append('../browser_interface/browser') class BrowserFactory(object): def create(self, type, *args, **kwargs): return getattr(__import__(type), type)(*args, **kwargs)
# [qc.Util](README.md).findClass ## Prototype * class findClass(string name) ## Paramters | Paramter | Type | Description | | ------------- | ------------- | -------------| | name | string | The name of class | ## Description Fiind class by name
/** * * Description: Simple Chat Server. * Author: Deric Fagnan * * * */ #include <stdio.h> #include <stdlib.h> #include <string.h> //strlen #include <unistd.h> //write #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> //inet_addr #include <pthread.h> //for threading , l...
using System.Collections.Generic; using ChessOk.ModelFramework.Messages; namespace ChessOk.ModelFramework.Commands.Messages { /// <summary> /// Обработчик сообщения <see cref="ICommandInvokedMessage{T}"/>, которое /// посылается в шину после выполнения команды с типом <typeparamref name="T"/> ...
# -*- coding: utf-8 -*- import sqlite3 VERBOSE = 0 CTABLE_DOMAIN = ''' CREATE TABLE IF NOT EXISTS Domains( did INTEGER PRIMARY KEY AUTOINCREMENT, domain VARCHAR(64) UNIQUE, indegree INTEGER, outdegree INTEGER )''' CTABLE_WEBSITE = ''' CREATE TABLE IF NOT EXISTS Websites( wid INTEGER PRIMARY KEY AUTOINCREMENT, ...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #define PACKET_SIZE 256 #define THRESHOLD_VAL 10 // Performs thresholding with <THRESHOLD_VAL> and performs zero-length encoding // @data: pointer to the dataset to encode; encodes <PACKET_SIZE> bytes at a time // @output: pointer to the output buffer; ...
<!DOCTYPE html> <html class="aboutHtml"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Frantz Augustin. Marketer. Web Developer. Boston, MA."> <meta name="robots" content="index, follow"> <meta property="og:url" content="ht...
package com.muller.wikimagesearch.volley; import com.android.volley.AuthFailureError; import com.android.volley.NetworkResponse; import com.android.volley.ParseError; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.toolbox.HttpHeaderParser; import com.google.gso...
# coding: utf-8 import re from crossword import * class Crossword2(Crossword): def __init__(self): self.grid = OpenGrid() self.connected = {} self.used_words = [] def copy(self): copied = Crossword2() copied.grid = self.grid.copy() copied.connected = self.co...
# README [https://leetcode.com/problems/flatten-binary-tree-to-linked-list/](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/)
.field-error-msg { font-size: 12px; }
// Javascript helper functions for parsing and displaying UUIDs in the MongoDB shell. // This is a temporary solution until SERVER-3153 is implemented. // To create BinData values corresponding to the various driver encodings use: // var s = "{00112233-4455-6677-8899-aabbccddeeff}"; // var uuid = UUID(s); // ...
var assert = require('assert'); var RequestBuilder = require('../lib/rest-builder'); describe('REST Request Builder', function () { describe('Request templating', function () { var server = null; before(function (done) { var express = require('express'); var app = express(...
using System.Xml; namespace Anycmd.Xacml.Policy.TargetItems { /// <summary> /// Represents a read-only Action element in the Policy document. This class is a specialization of TargetItem class /// which contains the information needed for all the items that can be part of the target. /// </summary> public class A...
**问题:** 假设一个班上有N个同学。同学之间有些是朋友,有些不是。朋友关系是可以传递的。比如A是B的直接朋友,B是C的直接朋友,那么A是C的间接朋友。我们定义朋友圈就是一组直接或间接朋友的同学。输入一个N*N的矩阵M表示班上的朋友关系,如果M[i][j]=1,那么同学i和同学j是直接朋友。请问该班有多少个朋友圈? 例如输入如下的数组,则表明同学0和同学1是朋友,他们组成一个朋友圈。而同学2一个人组成一个朋友圈。因此输出2。 [[1,1,0], [1,1,0], [0,0,1]] 首先我们注意到朋友关系是对称的,也就是A和B是朋友,那么B和A自然也是朋友。那么输入的矩阵M应该是沿着对角线对称的。另外,一个人和他自己...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" con...
using System; namespace libmapgen { [Serializable()] public class FlatHeightmap : IInitialMapGenerator { public int width { get; set; } public int height { get; set; } public FlatHeightmap (int width, int height) { this.width = width; this.height = height; } public MapArea generate () { retu...
<?php /** * Filesystem Access Object interface. * * PHP Version 5.3 * * @package Lunr\Gravity\Filesystem * @author Heinz Wiesinger <heinz@m2mobi.com> * @copyright 2013-2018, M2Mobi BV, Amsterdam, The Netherlands * @license http://lunr.nl/LICENSE MIT License */ namespace Lunr\Gravity\Filesystem; /...
// The code below is a stub. Just enough to satisfy the compiler. // In order to pass the tests you can add-to or change any of this code. #[allow(unused_variables)] pub fn convert(input: &str) -> Result<String, ()> { unimplemented!(); }
using UnityEngine; using System; public struct SpriteInfo { public string SpriteSheetName; public Vector2 SpritePosition; public Vector3 SpriteSize; }
<!DOCTYPE html> <html lang="en"> <head><meta name="generator" content="Hexo 3.9.0"> <title>FairyGUI - 进度条</title> <meta charset="utf-8"> <meta name="description" content="FairyGUI教程"> <meta name="keywords" content="FairyGUI,FGUI,FairyGUI教程"> <meta name="vi...