code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30
values | license stringclasses 15
values | size int64 3 1.01M |
|---|---|---|---|---|---|
require 'unicode_japanese'
class Text
class TextDecodeError < StandardError ; end
class TextEncodeError < StandardError ; end
NDS_SPECIAL_CHARACTERS = "・¡¢£¨©®°±´¸¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýŒœˆ˜‐‗‘’‚“”„•…′″›※€™«»⁰"
AOS_SPECIAL_CHARACTERS = {
0x90 => "Œ",
0x91 =... | LagoLunatic/DSVEdit | dsvlib/text.rb | Ruby | mit | 22,491 |
//
// DTAccount.h
// DefenseOfTheAncients
//
// Created by Mr.Yao on 16/3/16.
// Copyright © 2016年 Mr.Yao. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DTAccount : NSObject
@property (nonatomic, strong) NSNumber *uid;
@property (nonatomic, strong) NSString *token;
+ (instancetype)sharedA... | yaoquanfeng123/DefenseOfTheAncients | DefenseOfTheAncients/API/DTAccount.h | C | mit | 393 |
<?php
namespace Icecave\Pasta\AST\Expr;
// @codeCoverageIgnoreStart
class BitwiseOr extends PolyadicOperator
{
}
| IcecaveStudios/pasta-ast | src/Expr/BitwiseOr.php | PHP | mit | 115 |
import containers from './containers'
import ui from './ui'
import App from './App'
module.exports = {...containers, ...ui, App} | MoonTahoe/cyber-chat | components/index.js | JavaScript | mit | 129 |
<?php
namespace Concrete\Package\AttributePlainText;
use Concrete\Core\Backup\ContentImporter;
use Package;
class Controller extends Package
{
protected $pkgHandle = 'attribute_plain_text';
protected $appVersionRequired = '5.7.4';
protected $pkgVersion = '1.0.1';
public function getPackageName()
... | Remo/concrete5-attribute-plain-text | controller.php | PHP | mit | 964 |
package types
// DO NOT EDIT. THIS FILE WAS AUTOMATICALLY GENERATED
import (
types "github.com/sudorandom/softlayer-go/slapi/types"
)
// SoftLayer_Container_Product_Order_Network_LoadBalancer_Global - This is the datatype that needs to
// be populated and sent to SoftLayer_Product_Order::placeOrder. This datatype h... | sudorandom/softlayer-go-gen | types/gen_softlayer_container_product_order_network_loadbalancer_global.go | GO | mit | 18,366 |
'use strict';
// Production specific configuration
// =================================
module.exports = {
// Server IP
ip: process.env.OPENSHIFT_NODEJS_IP ||
process.env.IP ||
undefined,
// Server port
port: process.env.OPENSHIFT_NODEJS_PORT ||
process.env.PORT |... | johnttan/spicybattle | server/config/environment/production.js | JavaScript | mit | 597 |
/*
* generated by Xtext
*/
package co.edu.uniandes.mono.gesco.ui.contentassist.antlr;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser;
import org.eclipse.xtext.ui.editor.contenta... | lfmendivelso10/GescoFinal | DSL/co.edu.uniandes.mono.gesco.ui/src-gen/co/edu/uniandes/mono/gesco/ui/contentassist/antlr/PartialDSLContentAssistParser.java | Java | mit | 1,288 |
#!/usr/bin/env bash
function ansible_mac() {
local ANISBLE_VIRTUALENV_SCRIPT_URI="https://raw.githubusercontent.com/shrikeh/ansible-virtualenv/${ANSIBLE_INSTALLER_BRANCH:-develop}/init.sh";
local ANSIBLE_VIRTUALENV_SCRIPT_TMP_DIR="$(mktemp -d -t 'ansible_virtualenv')";
curl -o "${ANSIBLE_VIRTUALENV_SCRIPT_TMP_DI... | shrikeh/ansible-virtualenv | test.sh | Shell | mit | 454 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Tests\Component\Translation;
use Symfony\Component\Translation\... | orchestra-io/sample-symfony2 | vendor/symfony/tests/Symfony/Tests/Component/Translation/TranslatorTest.php | PHP | mit | 7,353 |
/*
CDVAdMobAdsAdListener.h
Copyright 2015 AppFeel. All rights reserved.
http://www.appfeel.com
AdMobAds Cordova Plugin (cordova-admob)
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 wit... | kkleokrish/admob-google-cordova-clean | src/ios/CDVAdMobAdsAdListener.h | C | mit | 1,762 |
// stdafx.cpp : source file that includes just the standard includes
// TestConsoleW32.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
| vdemydiuk/mtdb | TestConsoleW32/stdafx.cpp | C++ | mit | 301 |
<!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"/>
<title>Superprogram: Plik ... | superdyzio/PWR-Stuff | AIR-ARR/Programowanie Obiektowe/12/dox/html/_lista_blokow_8hh_source.html | HTML | mit | 5,572 |
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const repl = require('repl');
const program = require('commander');
const esper = require('..');
const Engine = esper.Engine;
function enterRepl() {
function replEval(cmd, context, fn, cb) {
engine.evalDetatched(cmd).then(function(result) {
cb(null, r... | codecombat/esper.js | contrib/cli.js | JavaScript | mit | 3,797 |
using System.IO;
using System.Linq;
namespace Moonfish.Guerilla.Tags
{
partial class StructureBspClusterBlock : IResourceBlock
{
public ResourcePointer GetResourcePointer(int index = 0)
{
return GeometryBlockInfo.BlockOffset;
}
public int GetResourceLength(int inde... | jacksoncougar/Moonfxsh | Moonfish/Guerilla/Tags/StructureBspClusterBlock.cs | C# | mit | 2,077 |
<?php if(isset($user)) {?>
<table>
<tr>
<td><?php echo $user->username;?></td>
<td><?php echo $user->password;?></td>
<td><?php echo $user->email;?></td>
</tr>
</table>
<?php }?>
<?php echo validation_errors('<p class="error">');?> | Du-an-Giao-Duc/education | application/views/login/register_confirm.php | PHP | mit | 231 |
gdata-diff
==========
Online service to watch and report changes to Google Data elements (Google Drive Documents)
| whardier/gdata-diff | README.md | Markdown | mit | 115 |
---
layout: losbull2
title: losbull2
permalink: /losbull2/
---
| kaelabbott/kaelabbott.github.io | liga-bcd/losbull2.md | Markdown | mit | 65 |
package selector;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.util.EventObject;
class Barra
implements AdjustmentListener
{
SelectorApplet applet;
public Barra(SelectorApplet applet)
{
this.applet = applet;
}
public void adjustmentValueC... | Thaenor/magnetic-and-electric-forces-study | src/selector/Barra.java | Java | mit | 659 |
const express = require('express');
const router = express.Router();
const queries = require('../db/queries');
const knex = require('../db/knex.js');
const request = require('request');
router.get('/clear', (req, res, next) => {
queries.clearStationsTable((results) => {
console.log(results);
});
res.redirect... | gvickstrom/Fishing_App | src/server/routes/sites.js | JavaScript | mit | 6,277 |
//===============================================================================
// TinyIoC
//
// An easy to use, hassle free, Inversion of Control Container for small projects
// and beginners alike.
//
// https://github.com/grumpydev/TinyIoC
//========================================================================... | chrisriesgo/making-mobile-click | Demo.IoC/TinyIoC.cs | C# | mit | 124,512 |
---
title: 面向对象的Javascript
layout: post
category : web开发
tags : [Javascript, 面向对象]
published: true
---
Javascript虽然称不上一种严格意义上的面向对象语言,例如没有像PHP,C++那样提供`class`关键字。但在Javascript中所有的东西都是一个对象,除了一些内置的原语(如`null`和`undefined`),这样的特性使其能很方便的进行面向对象的开发,同样也使其面向对象的实现方式具有多样性。
## 对象的创建
### 1. 简单的对象创建
使用Object,创建Object的实例,然后向其中添加内容。Obj... | Ljhero/ljhero.github.com | _posts/2012-07-12-javascript-object.md | Markdown | mit | 7,465 |
NAME=pew
build:
@mkdir -p bin/
go build -o bin/$(NAME)
fmt:
go fmt ./...
test:
go test ./...
| leocassarani/pew | Makefile | Makefile | mit | 100 |
<?php
namespace N98\Magento\Command\LocalConfig;
use N98\Magento\Command\AbstractMagentoCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class GenerateCommand extends AbstractMagentoCommand
{
protec... | magicaner/n98-magerun | src/N98/Magento/Command/LocalConfig/GenerateCommand.php | PHP | mit | 6,920 |
class AddStateToSites < ActiveRecord::Migration
def self.up
add_column :sites, :state, :string
end
def self.down
remove_column :sites, :state
end
end
| techvalidate/portrait | db/migrate/20090619225703_add_state_to_sites.rb | Ruby | mit | 167 |
version https://git-lfs.github.com/spec/v1
oid sha256:8b2c75ae8236614319bbfe99cee3dba6fa2183434deff5a3dd2f69625589c74a
size 391
| yogeshsaroya/new-cdnjs | ajax/libs/yui/3.15.0/arraylist-filter/arraylist-filter-min.js | JavaScript | mit | 128 |
ARG version=4
FROM minidocks/base:3.8 AS v3
FROM minidocks/base AS v4
FROM v$version AS latest
LABEL maintainer="Martin Hasoň <martin.hason@gmail.com>"
RUN apk --update add ffmpeg ffmpegthumbnailer && clean
COPY rootfs /
CMD [ "ffmpeg" ]
| microcontainers/microcontainers | ffmpeg/Dockerfile | Dockerfile | mit | 245 |
package org.luaj.vm2;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
/**
* Debug helper class to pretty-print lua bytecodes.
* @see Prototype
* @see LuaClosure
*/
public class Print extends Lua
{
/** opcode names */
private static final String STRING_FOR_NULL = "null";
private static fina... | dwing4g/luaj | src/org/luaj/vm2/Print.java | Java | mit | 10,612 |
/*
* Copyright (c) 2009 WiQuery team
*
* 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, merge, publi... | WiQuery/wiquery | wiquery-jquery-ui/src/test/java/org/odlabs/wiquery/ui/resizable/ResizableBehaviorTestCase.java | Java | mit | 10,375 |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <IDEFoundation/IDEContainer.h>
#import <IDEKit/IDEKeyDrivenNavigableItemRepresentedObject-Protocol.h>
@class DVTDocumentLocation, DVTFileDataType, DVTSymbol, IDEContai... | XVimProject/XVim2 | XVim2/XcodeHeader/IDEKit/IDEContainer-PasteboardSupport.h | C | mit | 3,267 |
<div *ngIf="notesService.getSelectedEvaluation(evaluationTitle); let evaluation" class='container'>
<div class="page-header">
<h5>{{ evaluation.titre }}
<i class="right material-icons">{{ evaluation.individuel ? 'person' : 'group' }}</i>
</h5>
<h6>Note de l'évaluation:
... | titoine54/victoria | Frontend/src/app/views/note/note.component.html | HTML | mit | 1,753 |
<?php
namespace Origami\Entity\Manager;
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Origami ORM (objet relationnel mapping)
* @author Yoann VANITOU
* @license http://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/maltyxx/origami
*/
class Query
{
/**
* Gestionna... | bellalau/LAMPgroup | application/third_party/origami/libraries/Origami/Entity/Manager/Query.php | PHP | mit | 12,482 |
package contests;
/**
* Created by sherxon on 2/27/17.
*/
public class Solution2 {
public static void main(String[] args) {
}
static public String shortestPalindrome(String s) {
if (s.length() <= 1) return s;
char[] a = s.toCharArray();
StringBuilder sb = new StringBuilder();
... | sherxon/AlgoDS | src/contests/Solution2.java | Java | mit | 639 |
<?php
namespace Meling\Cart;
/**
* Class Totals
* @package Meling\Cart
*/
class Totals
{
/**
* @var Products
*/
protected $products;
/**
* @var Actions
*/
protected $actionsAfter;
/**
* @var Cards\Card
*/
protected $card;
/**
* @var \PHPixie\ORM\Wrap... | Linfuby/Cart | src/Meling/Cart/Totals.php | PHP | mit | 2,866 |
<html>
<body>
<style>
table {
border-collapse: collapse;
width: 100%;
}
td {
vertical-align: top;
border-collapse: collapse;
border: solid 1px #888;
width: 50%;
padding: 2mm;
}
code {
background-color: #eee;
color: #357;
white-space: pre;
}
figure {
border: solid 1px #ccc... | sleeplessinc/markup | index.html | HTML | mit | 2,933 |
import DOMUtils from 'tinymce/core/api/dom/DOMUtils';
interface Bookmark {
startContainer: Node;
startOffset: number;
endContainer?: Node;
endOffset?: number;
}
/**
* Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with
* index 0 so that they can be restored proper... | tinymce/tinymce | modules/tinymce/src/plugins/quickbars/main/ts/selection/Bookmark.ts | TypeScript | mit | 3,254 |
from random import randint, seed, choice, random
from numpy import zeros, uint8, cumsum, floor, ceil
from math import sqrt, log
from collections import namedtuple
from PIL import Image
from logging import info, getLogger
class Tree:
def __init__(self, leaf):
self.leaf = leaf
self.lchild = None
self.rchild = Non... | juancroldan/derinkuyu | generation/BSPTree.py | Python | mit | 6,186 |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var rx_1 = require("rx");
/* tslint:enable */
function cache(callback) {
var cached$ = this.replay(undefined, 1);
var subscription = cached$.connect();
callback(function () { return subscription.dispose(); });
return cached$;
}... | ZachBray/eye-oh-see-react | dist/Rx.js | JavaScript | mit | 392 |
var chai = require('chai');
var should = chai.should();
var pictogramResponse = require('../../../lib/model/response/pictogramResponse');
describe('pictogramResponse model test', function () {
var id = 'id';
var category = 'category';
var url = 'url';
it('should create model', function (done) {
var pict... | xclipboard/npm-xclipboard-model | test/model/response/pictogramResponseTest.js | JavaScript | mit | 1,113 |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template explicit_error_stepper_base</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" h... | laborautonomo/poedit | deps/boost/libs/numeric/odeint/doc/html/boost/numeric/odeint/explicit_error_idp26364872.html | HTML | mit | 75,492 |
//===========source description =================================
//http://we.easyelectronics.ru/STM32/stm32---bit-banding.html
//===============================================================
#ifndef BITBANDING_H
#define BITBANDING_H
#define MASK_TO_BIT31(A) (A==0x80000000)? 31 : 0
#define MASK_TO_BIT30(A) ... | drovosekov/SolderStation | stm32/CooCox_Prj/app/misc/inc/bitbanding.h | C | mit | 3,268 |
<?php
/**
* Choice.php provides additional data access classes for the SurveySez project
*
* An instance of the Response class will attempt to identify a SurveyID from the srv_responses
* database table, and if it exists, will attempt to create all associated Survey, Question & Answer
* objects, nearly exactly ... | BrettSpencer/SurveySez | SurveySez/Choice.php | PHP | mit | 1,641 |
[](https://travis-ci.org/ukasofisosaari/kasvu_scripts)
# Kuksa Tilastotyökalu
Tool for calculating statistics for Scouts and Guides of Finland.
## Getting Started
These instructions will get you a copy of the project up and running... | ukasofisosaari/kuksa_tilastotyokalu | README.md | Markdown | mit | 1,355 |
"use strict";
/**
* @license
* Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | ManakCP/NestJs | node_modules/@tensorflow/tfjs-core/dist/variable_test.js | JavaScript | mit | 13,815 |
import React from "react";
import { useResponse } from "@curi/react-dom";
import NavLinks from "./NavLinks";
export default function App() {
let { response } = useResponse();
let { body: Body } = response;
return (
<div>
<NavLinks />
<Body response={response} />
</div>
);
}
| pshrmn/curi | examples/misc/server-rendering/src/components/App.js | JavaScript | mit | 305 |
<?php
namespace ConnectHolland\TulipAPIBundle\Tests\Command;
use ConnectHolland\TulipAPIBundle\Command\SynchronizeCommand;
use ConnectHolland\TulipAPIBundle\Model\TulipObjectInterface;
use ConnectHolland\TulipAPIBundle\Queue\QueueManager;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\AbstractQuery... | ConnectHolland/TulipAPIBundle | Tests/Command/SynchronizeCommandTest.php | PHP | mit | 4,279 |
import { Tween } from '../core';
import { mat4 } from '../math';
export class MatrixTween extends Tween {
action() {
for (let i = 0; i < this.from.length; i++) {
this.object[i] = this.from[i] + this.current_step * (this.to[i] - this.from[i]);
}
}
pre_start() {
super.pre_start();
this.fro... | michalbe/cervus | tweens/matrix-tween.js | JavaScript | mit | 355 |
#include "stdafx.h"
#include "model.h"
#include "node.h"
#include "../manager/resourcemanager.h"
#include "mesh.h"
#include "bonemgr.h"
using namespace graphic;
// Bone¸¶´Ù °æ°è¹Ú½º¸¦ »ý¼ºÇÑ´Ù.
struct sMinMax
{
Vector3 Min;
Vector3 Max;
sMinMax() : Min(Vector3(0,0,0)), Max(Vector3(0,0,0)) {}
};
cModel::cMode... | kami36/3Dproject | Graphic/model/model.cpp | C++ | mit | 4,095 |
using TeamReview.Core.Models;
using TeamReview.Web.ViewModels;
namespace TeamReview.SpecsWithoutBrowser.StepDefinitions.Models {
public class ReviewInfo {
public ReviewConfiguration ReviewConfiguration;
public ReviewCategory CurrentCategory;
public string TypeOfReport { get; set; }
public UserProfile... | teamaton/TeamReview | TeamReview.SpecsWithoutBrowser/StepDefinitions/Models/ReviewInfo.cs | C# | mit | 413 |
<?php
declare(strict_types=1);
/**
* This file is part of the Netrc package.
*
* (c) Alex Medvedev <alex.medwedew@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Date: 3/21/14
*/
namespace Fduch\Netrc\Exception;
us... | fduch/netrc | src/Exception/ParseException.php | PHP | mit | 448 |
import React from 'react';
import MobileTearSheet from './MobileTearSheet';
import List from 'material-ui/lib/lists/list';
import ListItem from 'material-ui/lib/lists/list-item';
import ActionInfo from 'material-ui/lib/svg-icons/action/info';
import Divider from 'material-ui/lib/divider';
import Avatar from 'material-u... | PranavRam/pfrally | src/pages/home/ListExampleFolder.js | JavaScript | mit | 1,876 |
module.exports = function Boot(game) {
return {
preload: function(){
game.load.image('mars', '/assets/images/mars.png');
},
create: function(){
//This is just like any other Phaser create function
console.log('Boot was just loaded');
this.mars = game.add.sprite(0, 0, 'mars');
... | krzychukula/browserify-phaser | src/states/boot.js | JavaScript | mit | 439 |
import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
def _uniform(*shape):
return numpy.random.uniform(-1, 1, shape).astype(numpy.float32)
@testing.parameteriz... | anaruse/chainer | tests/chainer_tests/functions_tests/connection_tests/test_bilinear.py | Python | mit | 6,944 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* i... | pfalcon/micropython | ports/stm32/pyb_i2c.c | C | mit | 37,207 |
var topics = require('../data').topics;
console.log(topics);
var result = topics.filter(function (topic) { //filter renvoie les 'true'
return topic.user.name === 'Leonard'; //? true : false;
});
var result2 = topics.filter(topic=>topic.user.name === 'Leonard');
var titles = topics.map(function (topic) {
retu... | florianfouchard/javascript-training | src/function/ES5.js | JavaScript | mit | 3,573 |
using System;
using System.Collections.Generic;
using System.Text;
namespace Imml
{
public interface IElementFactory
{
ImmlElement Create(string elementName, IImmlElement parentElement);
}
}
| craigomatic/IMML | src/Imml/IElementFactory.cs | C# | mit | 215 |
File.dirname(__FILE__).tap do |supermarket|
Dir[File.join(supermarket, 'import', '*.rb')].map do |file|
file.split(File::SEPARATOR).last.split('.').first
end.each do |name|
require "supermarket/import/#{name}"
end
end
require 'supermarket/community_site'
module Supermarket
module Import
def self.d... | gofullstack/chef-legacy | lib/supermarket/import.rb | Ruby | mit | 1,365 |
StatsGopher.PresenceMonitor = function PresenceMonitor (opts) {
opts = opts || {};
this.statsGopher = opts.statsGopher;
this.key = opts.key;
this.send = this.executeNextSend;
this.paused = false;
}
StatsGopher.PresenceMonitor.prototype = {
ignoreNextSend: function () {
},
queueNextSend: function () {
... | sjltaylor/stats-gopher-js | src/stats_gopher.presence_monitor.js | JavaScript | mit | 1,828 |
#include "problem_28.hpp"
#include <iostream>
using namespace std;
int sum_for_corners_in_square(int side) {
return 4*side*side - 6*(side - 1);
}
TEST(problem_28, full) {
int sum(1);
for (int d = 3; d <= 1001; d+=2) {
sum += sum_for_corners_in_square(d);
}
EXPECT_EQ(669171001, sum)... | weierstrass/project-euler | 28/problem_28.cpp | C++ | mit | 324 |
app.service('operacoes', function() {
this.somar = function(valor1, valor2) {
return valor1 + valor2;
}
this.subtrair = function(valor1, valor2) {
return valor1 - valor2;
}
});
| rodriggoarantes/rra-angular | js/aula09.service.js | JavaScript | mit | 220 |
<div class="mediaList">
<div *ngFor="let contest of contestList" class="media">
<div class="media-left">
<a>
<img *ngFor="let photo of contest.examplePhotos" width="64px" class="media-object" src="{{photo.url}}" alt="beast">
</a>
</div>
<div class="media-left">
<a>
<img *... | SoLoud/loudProjectFront | src/client/app/contests/list/contests-list.component.html | HTML | mit | 935 |
<?php
/*
* This file is part of the Topycs package.
*
* (c) Daniel Ribeiro <drgomesp@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Topycs\Discussions\Builder;
/**
* Defines a fluent builder for threads.
... | adamelso/Topycs | src/Topycs/Discussions/Builder/ThreadBuilderInterface.php | PHP | mit | 665 |
from modelmapper.declarations import Mapper, Field
from modelmapper.qt.fields import QLineEditAccessor
class String(QLineEditAccessor):
def get_value(self):
return str(self.widget.text())
def set_value(self, value):
self.widget.setText(str(value))
class Integer(QLineEditAccessor):
def... | franramirez688/model-mapper | tests/factory/qt/mapper_data.py | Python | mit | 1,040 |
function paddAppendClear() {
jQuery('.append-clear').append('<div class="clear"></div>');
}
function paddWrapInner1() {
jQuery('.wrap-inner-1').wrapInner('<div class="inner"></div>');
}
function paddWrapInner3() {
jQuery('.wrap-inner-3').wrapInner('<div class="m"></div>');
jQuery('.wrap-inner-3').prepend('<div c... | chin8628/SIC | wp-content/themes/germaniumify/js/main.loading.js | JavaScript | mit | 1,282 |
//
// PDFKitten.h
// PDFKitten
//
// Created by Nickolay Tarbayev on 17.04.14.
// Copyright (c) 2014 Chalmers Göteborg. All rights reserved.
//
#import <PDFKitten/PDFKPageScanner.h>
#import <PDFKitten/PDFKSelection.h>
| GabrielHauber/PDFKitten | PDFKittenLib/PDFKitten.h | C | mit | 225 |
.tdImgThumb .RoomImageList {
margin: 10px;
padding: 0;
}
.tdImgThumb .RoomImageList li {
display: none;
margin: 0;
padding: 0;
}
.tdImgThumb .RoomImageList li:first-child {
display: block;
}
.tdImgThumb .RoomImageList img {
display: block;
}
.tdImgThumb .RoomImageListMore {
display: block;
text-al... | tomek-f/event-calendar | src/static/var/HotelsGlobal2.css | CSS | mit | 354 |
<?php
/**
* FurryBear
*
* PHP Version 5.3
*
* @category Congress_API
* @package FurryBear
* @author lobostome <lobostome@local.dev>
* @license http://opensource.org/licenses/MIT MIT License
* @link https://github.com/lobostome/FurryBear
*/
namespace FurryBear\Resource\SunlightCongress\Method;
use... | lobostome/FurryBear | src/FurryBear/Resource/SunlightCongress/Method/Votes.php | PHP | mit | 1,233 |
/* globals $ */
const modals = window.modals;
const footer = window.footer;
const notifier = window.notifier;
const admin = window.admin;
((scope) => {
const modalLogin = modals.get("login");
const modalRegister = modals.get("register");
const helperFuncs = {
loginUser(userToLogin) {
co... | VenelinGP/Gemstones | src/public/pages/nav/nav.js | JavaScript | mit | 6,675 |
/*
* zipl - zSeries Initial Program Loader tool
*
* Mini libc implementation
*
* Copyright IBM Corp. 2013, 2017
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef LIBC_H
#define LIBC_H
#include <stdint.h>
#include... | ibm-s390-tools/s390-tools | zipl/boot/libc.h | C | mit | 2,488 |
<!DOCTYPE html>
<html ng-app="freeUniTaxiApp">
<head>
<title>FreeUni Taxi</title>
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
... | freeuni-sdp/FreeUni-SDP-2014-Final-Project | console/src/main/webapp/index.html | HTML | mit | 1,471 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumOrdersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forum_orders', function (Blueprint $table) {
... | adam-boduch/coyote | database/migrations/2015_12_09_212709_create_forum_orders_table.php | PHP | mit | 1,086 |
__author__ = 'bptripp'
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from keras.models import Sequential
from keras.layers.core import Dense, Activation, Flatten
from keras.... | bptripp/grasp-convnet | py/cninit.py | Python | mit | 7,083 |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe WeeklyDigestsController do
end
| hadley/crantastic | spec/controllers/weekly_digests_controller_spec.rb | Ruby | mit | 111 |
# Links
A collection of links that I've found useful in learning web design/development.
A not-very-organized work-in-progress. More to come.
## Start here(?)
* http://prework.flatironschool.com/
## Front-end development topics
* http://alistapart.com/
* http://css-tricks.com/
* http://thechangelog.com/
* http://pau... | imbreakfast/teach-tim-code | LINKS.md | Markdown | mit | 1,052 |
<!DOCTYPE html>
<head>
<title>Your page title here</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../stylesheets/blog-stylesheet.css">
</head>
<body>
<h1>Enumberable Methods Group-by</h1>
<h4>3/22/2015</h4>
<section>
<p>
Group by is an enumberable method that can t... | sevennote/sevennote.github.io | blog/t-4-enumberable-methods.html | HTML | mit | 895 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
int pd[110][110] = {};
int choose(int a, int b) {
if(pd[a][b]) return pd[a][b];
if(a==b) return 1;
if(a<b) return 0;
if(b==0) return 1;
return pd[a][b] = choose(a-1... | matheuscarius/competitive-programming | maratonando/Seletiva UFPE 2016/e.cpp | C++ | mit | 839 |
//============================================================================
// Name : Code.cpp
// Author : Yahya Milani
// Version :
// Copyright : Use as much as you like with author's name for noncommercial cases ONLY
// Description : C++, Ansi-style
//============================================... | yahya-milani/Parallel-FEM | src/Static.cpp | C++ | mit | 17,272 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.DataTransfer (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.DataTransfer
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Generat... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/DataTransfer.hs | Haskell | mit | 349 |
// Copyright (C) 2015-2021 The Neo Project.
//
// The neo is free software distributed under the MIT software license,
// see the accompanying file LICENSE in the main directory of the
// project or http://www.opensource.org/licenses/mit-license.php
// for more details.
//
// Redistribution and use in source and bi... | AntShares/AntShares | src/neo/IO/Caching/ECPointCache.cs | C# | mit | 771 |
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html
module CloudFormer
module CloudFront
class StreamingDistribution
class StreamingDistributionConfig < ResourceProperty
aws_attribute :logging, type: Streami... | custora/cloud_former | lib/cloud_former/resource_properties/cloud_front/streaming_distribution/streaming_distribution_config.rb | Ruby | mit | 828 |
(function () {
'use strict';
angular
.module('patients')
.controller('PatientsListController', PatientsListController);
PatientsListController.$inject = ['PatientsService'];
function PatientsListController(PatientsService) {
var vm = this;
vm.patients = PatientsService.query();
}
})();
| anshuman-singh-93/patient-crud-simple-app | modules/patients/client/controllers/list-patients.client.controller.js | JavaScript | mit | 317 |
// Polyfills
// (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
// import 'ie-shim'; // Internet Explorer
// import 'es6-shim';
// import 'es6-promise';
// import 'es7-reflect-metadata';
// Prefer CoreJS over the polyfills above
require('core-js');
require('zone.js/dist/zone... | karnex47/iaa | src/polyfills.js | JavaScript | mit | 508 |
---
title: Linux 中的fork()函数
date: 2016-10-19 18:58:33
tag: Bin
layout: post
---
## 0x00 开始
程序启动,便会建立一个相应的进程。进程包括代码,数据,堆,栈...其实就是这个程序本身。
程序一般都是顺序执行的,也就是不能同时做两件事。但是有些时候需要做点额外的事,比如一个服务器程序:和客户端建立连接,然后通信,这时就不能和别的客户端连接了...
所以,世界需要额外的事,于是子进程运应而生(雾)
fork()函数做的就是这件事,不是多线程(多线程也是程序在做一样的事),而是复制一个进程,相当于分身。然后这个分身去做额外的事,比如那个服务器程... | DrimTuer/drimtuer.github.io | _posts/Bin/2016-10-19-fork-function-learn.md | Markdown | mit | 6,455 |
require 'time_crisis/tzinfo/timezone_definition'
module TimeCrisis::TZInfo
module Definitions
module Asia
module Tehran
include TimezoneDefinition
timezone 'Asia/Tehran' do |tz|
tz.offset :o0, 12344, 0, :LMT
tz.offset :o1, 12344, 0, :TMT
tz.offset :o2,... | ttilley/time_crisis | lib/time_crisis/tzinfo/definitions/Asia/Tehran.rb | Ruby | mit | 5,409 |
<script type="text/javascript">
function changeKotaKab(){
var select_provinsi = $("#select_provinsi").val();
$.ajax({
url: "<?php echo base_url('index.php/kecamatan/selectkotakab' ); ?>/" + select_provinsi,
success: function(result) {
$("#select_kota_kab").html(result);
}
});
}
</script>
<div class... | andie87/MOUSystem | application/modules/kecamatan/views/edit.php | PHP | mit | 3,133 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dpdgraph: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.cs... | coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.09.1-2.0.6/released/8.10.2/dpdgraph/0.6.1.html | HTML | mit | 6,705 |
# Extend Dynamics 365 Virtual Agent with Bot Framework
The purpose of this project is to extend/combine your D365 Virtual Agent with your existing (or new) custom bot. You can read the details about this codewalk [here](https://dev.to/arafattehsin/extend-dynamics-365-virtual-agent-with-microsoft-bot-framework-1c9p).
| arafattehsin/CognitiveRocket | Dynamics-365/VABotFramework/README.md | Markdown | mit | 320 |
# autoprefixer-online
autoprefixer online
### Online
[autoprefixer](http://autoprefixer.firstblood.me)
### Run server on local
You need install node(version 4+) , npm(version 3+) and webpack(version 1.x) fist, then
Clone project:
```
$ git clone https://github.com/ssehacker/autoprefixer-online.git
```
Install depend... | ssehacker/autoprefixer-online | README.md | Markdown | mit | 459 |
/*
* Nana GUI Programming Interface Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* @fil... | Greentwip/Windy | 3rdparty/nana/include/nana/gui/programming_interface.hpp | C++ | mit | 12,662 |
<?php
use google\appengine\api\users\User;
use google\appengine\api\users\UserService;
$user = UserService::getCurrentUser();
if (isset($user)) {
/* echo sprintf('<li>Welcome, %s! (<a href="%s">sign out</a>)',
$user->getNickname(),
UserService::createLogoutUrl('/')); */
$u... | Autchariyakk/web592group08 | admin.php | PHP | mit | 735 |
<TS language="vi_VN" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Nhấn chuột phải để sửa địa chỉ hoặc nhãn</translation>
</message>
<message>
<source>Create a new address</source>
<trans... | ppcoin/ppcoin | src/qt/locale/bitcoin_vi_VN.ts | TypeScript | mit | 42,099 |
'use strict';
//Setting up route
angular.module('shop-list').config(['$stateProvider',
function($stateProvider) {
// Shop list state routing
$stateProvider.
state('detail-product', {
url: '/detail-product/:productId',
templateUrl: 'modules/shop-list/views/detail-product.client.view.html'
}).
state('pr... | kruny1001/pbshop | public/modules/shop-list/config/shop-list.client.routes.js | JavaScript | mit | 447 |
<?php
/**
* 3 latest posts under slider.
*/
$thumb = has_post_thumbnail ()? wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' ): [null];
if (!$thumb[0]){
if ( get_post_meta( $post->ID, '_scheduled_thumbnail_id' ) ){
$array = get_post_meta( $post->ID, '_scheduled_thumbnail_id' );
$thumb =... | damnmagazine/damn-sage | templates/home-company-posts.php | PHP | mit | 1,880 |
/*
This file is part of TableGUI.
Copyright (c) 2014 Felipe Ferreira da Silva
TableGUI is licensed under MIT license.
See the file "LICENSE" for license details.
*/
TGUIWidget *GUI_Alloc_Label(TGUIWindow *AWindow, TGUIWidget *AWidget);
| sphaero/TableGUI | GUI_label.h | C | mit | 250 |
<?php
namespace Dazzle\Redis\Command\Compose;
use Dazzle\Redis\Command\Builder;
use Dazzle\Redis\Command\Enum;
use Dazzle\Redis\Driver\Request;
trait ApiSetTrait
{
/**
* @param Request $request
* @return mixed
*/
abstract function dispatch(Request $request);
/**
* @override
* @i... | dazzle-php/redis | src/Redis/Command/Compose/ApiSetTrait.php | PHP | mit | 4,082 |
---
title: "International House of Pa....Brews!"
layout: "post"
permalink: "/2013/04/international-house-of-pabrews.html"
uuid: "5761248402315161748"
guid: "tag:blogger.com,1999:blog-4897882164686544357.post-5761248402315161748"
date: "2013-04-20 19:51:00"
updated: "2013-04-20 19:51:39"
description:
blogger:
siteid... | bradorego/beerbatterbreakfast | _posts/2013-04-20-international-house-of-pabrews.html | HTML | mit | 9,217 |
namespace AAWebSmartHouse.Data.Migrations
{
using System.Data.Entity.Migrations;
using System.Linq;
using AAWebSmartHouse.Common;
using AAWebSmartHouse.Data.Models;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
public sealed class Configuration : DbMigr... | Obelixx/AASmartHouse | AAWebSmartHouse/Data/AAWebSmartHouse.Data/Migrations/Configuration.cs | C# | mit | 4,177 |
// Copyright (c) 2009-2012 Bitcoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h" // for pwalletMain
#include "bitcoinrpc.h"
#include "ui_interface.h"
#include "base58.h"
#include <boost/lexica... | volumecoin/volume | src/rpcdump.cpp | C++ | mit | 2,846 |
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: AssemblyTitle("Pr... | ReapeR-MaxPayne/SU-TM-PF-Ext-0517-Excersises-CSharp | 03-DataTypesAndVariables-Exercises/Problem_15_Calculator/Properties/AssemblyInfo.cs | C# | mit | 1,418 |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(d... | eriklieben/aurelia-materialize-css | dist/amd/components/card/cardActionElement.js | JavaScript | mit | 1,745 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.