code stringlengths 4 1.01M |
|---|
<?php
namespace AdminBundle\Form;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CommentType extends AbstractType
{
/**
* {@inheritdoc}
*/
public... |
#!/bin/bash
PHP=php
echo 'Copy the distributed YAML parameters to the required parameters.yml.'
cp app/config/parameters.yml.pagoda app/config/parameters.yml
echo 'Download the composer.phar file, so the vendors can be installed from the distributed composer.json.'
if [ ! -f composer.phar ]
then
curl -s -... |
# MailMessageModel.From Property
Additional header content
Gets or sets the from address for this e-mail message.
**Namespace:** <a href="N_iTin_Export_Model">iTin.Export.Model</a><br />**Assembly:** iTin.Export.Core (in iTin.Export.Core.dll) Version: 2.0.0.0 (2.0.0.0)
## Syntax
**C#**<br />
``` C#
publ... |
#include "Common.h"
#include "Core.h"
#include "Event.h"
#include "Message.h"
#include "ProfilerServer.h"
#include "EventDescriptionBoard.h"
namespace Brofiler
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct MessageHe... |
class RenameTemperatureProfileIdToBehaviorProfileId < ActiveRecord::Migration
def change
rename_column :testing_grounds, :temperature_profile_id, :behavior_profile_id
end
end
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.... |
'use strict';
function removeIndex(key, id, callback) {
var client = this._;
client.del(key + ':' + id + '@index', callback);
}
module.exports = removeIndex;
|
:: Execute a Ruby command with the current version
@ setlocal EnableDelayedExpansion
@ call "%~dp0common_vars.cmd"
@ set PARAMS=%*
:: If we are executing a Ruby script, search for the version inside the directory
:: of this script instead of searching in the current directory
@ if "%~1" == "ruby" (
set PA... |
# String_PadLeft
`String_PadLeft` returns a new string that right-aligns the characters in the `source` string by padding them on the left with a specified `paddingChar` Unicode character, for a specified total length.
```csharp
String_PadLeft (
@source NVARCHAR (MAX),
@totalWidth INT,
@paddingChar NVARCHAR (1)
... |
{% extends template_base %}
{% block title %}Reader's hall{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-7 col-md-6 col-md-offset-1">
<h3>Books by authors</h3>
<div class="list-group">
{% for author, books in books_by_authors.items %}
<div class="list-group... |
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for NASAPI/routes/schema.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
... |
# __init__.py: Yet Another Bayes Net library
# Contact: Jacob Schreiber ( jmschreiber91@gmail.com )
"""
For detailed documentation and examples, see the README.
"""
# Make our dependencies explicit so compiled Cython code won't segfault trying
# to load them.
import networkx, matplotlib.pyplot, scipy
import numpy as... |
package ooo.purity.unwatermark.gui;
import ooo.purity.unwatermark.Mode;
import ooo.purity.unwatermark.ModeFactory;
import ooo.purity.unwatermark.mode.MFSA;
import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.Unsuppo... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Egbert Verhage
*
* 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 us... |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.21 at 09:... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double OrangeLabelVersionNumber;
FOUNDATION_EXPORT const unsigned char OrangeLabelVersionString[];
|
<?php
/**
* This file is part of FunctionInjector project.
* You are using it at your own risk and you are fully responsible for everything that code will do.
*
* Copyright (c) 2016 Grzegorz Zdanowski <grzegorz@noflash.pl>
*
* For the full copyright and license information, please view the LICENSE file distribute... |
# hagenberg-gamejam.at
Website for the Hagenberg Game Jam
## Development on Windows
These are the full development instructions to get a development machine running under Microsoft Windows.
### Install Git and Clone the Repository
Get the Git binaries from <https://git-scm.com/> or download GitHub Desktop from <htt... |
using UnityEngine;
[ExecuteInEditMode]
[AddComponentMenu("Colorful/Fast Vignette")]
public class CC_FastVignette : CC_Base
{
public Vector2 center = new Vector2(0.5f, 0.5f);
[Range(-100f, 100f)]
public float sharpness = 10f;
[Range(0f, 100f)]
public float darkness = 30f;
public bool desaturate = false;
void... |
# ES6 Module Loader Polyfill [![Build Status][travis-image]][travis-url]
Dynamically loads ES6 modules in browsers and [NodeJS](#nodejs-use) with support for loading existing and custom module formats through loader hooks.
This project implements dynamic module loading through `System` exactly to the previous ES6-spe... |
/* FTUI Plugin
* Copyright (c) 2016 Mario Stephan <mstephan@shared-files.de>
* Under MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/* global ftui:true, Modul_widget:true */
"use strict";
var Modul_medialist = function () {
$('head').append('<link rel="stylesheet" href="' + ftui.config.d... |
<?php
declare(strict_types=1);
/*
* This file is part of the RollerworksSearch package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Search\Extension\Symfony\... |
---
layout: logistics
date: June 14 - 16, 2010
permalink: meetings/2010/06/logistics
---
### [Meeting Registration](https://www.ornl.gov/ccsd_registrations/nccs_mpi_forums/)
Advanced registration is required for this meeting so that Cisco can process their visitor processing procedure.
The registration covers snacks... |
# GradeMe
COMS 309 Project that helps your average student.
|
#pragma once
// ApplicationDialog dialog
/*struct buttonSet
{
CString name;
CButton* ctrlCheckButton;
CButton* altCheckButton;
CComboBox* VKBox;
};*///This actually seemed to crash windows?????
class ApplicationDialog : public CDialog
{
DECLARE_DYNAMIC(ApplicationDialog)
public:
ApplicationDi... |
version https://git-lfs.github.com/spec/v1
oid sha256:2d79d4ce9f72e0b9db16aee949410ecd30bfcfb5205af39053f05ac39083e151
size 22425
|
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
# `$ regarde`
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [ 2014 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accom... |
//******************************************************************************************************
// CollectionEventArgs.cs - Gbtc
//
// Copyright © 2014, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See... |
/**
* Copyright (c) 2012-2014 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
package com.github.anba.es6draft.ast;
/**
* <h1>12 ECMAScript Language: Expressions</h1><br>
* <h2>12.1 Primary Expressions</h2><br>
* <h3>12.... |
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
requirejs: {
compile: {
options: {
shim: {
grape: {
exports: 'Grape'
... |
---
title: Quick-start guide
permalink: /docs/quickstart/
---
If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements)), you can creat... |
# REAutoComplete
[](https://travis-ci.org/rinat-enikeev/REAutoComplete)
[](http://cocoapods.org/pods/REAutoComplete)
[ {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './src',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon', 'brows... |
steps-bash-script
=================
Saves it's input as a bash file and runs it. Roll your own, custom bash scripts with this Bitrise Step!
This Step is part of the [Open StepLib](http://www.steplib.com/), you can find its StepLib page [here](http://www.steplib.com/step/bash-script-runner)
## Input:
- Check the `st... |
class TokyoMetro::Factory::Convert::Customize::Api::TrainTimetable::RomanceCar::Info < TokyoMetro::Factory::Convert::Common::Api::MetaClass::TrainInfos::RomanceCar::Info
end
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
make_loaddata.py
Convert ken_all.csv to loaddata
"""
import argparse
import csv
def merge_separated_line(args):
"""
yields line
yields a line.
if two (or more) lines has same postalcode,
merge them.
"""
def is_dup(line, buff):
""... |
package main.java.srm149;
import java.util.HashSet;
import java.util.Set;
/*
* SRM 149 DIV I Level 2
* http://community.topcoder.com/stat?c=problem_statement&pm=1331
*/
public class MessageMess {
private Set<String> _dictionarySet = new HashSet<String>();
public String restore(String[] dictionary, String messa... |
package seedu.taskboss.logic.commands;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* Finds and lists all tasks in TaskBoss whose name contains any of the argument keywords.
* Keyword matching is case sensitive.
*/
public class FindCommand extends Command {
private static fina... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package autoescola.view;
import autoescola.controleDao.ControleLogin;
import autoescola.controleDao.ControleVeiculo;
import autoescola... |
#pragma once
#include "def.h"
class fsm
:public boost::enable_shared_from_this<fsm>
{
std::map<string,ptr_state_unit> m_stateunitmap;
void* m_userdata; // room , game_user , user......
ptr_state_unit m_curstateunit;
public:
fsm();
~fsm();
void add(string arg_name, ptr_state_unit arg_state_unit)
{
m_st... |
require File.dirname(__FILE__) + '/../spec_helper'
describe ProjectsController, "spam" do
let(:spammer_content) {
p = Project.make!
p.user.update_attributes(spammer: true)
p
}
let(:flagged_content) {
p = Project.make!
Flag.make!(flaggable: p, flag: Flag::SPAM)
p
}
it "should render 4... |
const FeedParser = require("feedparser");
const request = require("request");
const Promise = require("bluebird");
const flatten = require("lodash").flatten;
const nodemailer = require("nodemailer");
const cfg = require("dotenv").config();
const readUrls = require("./urls.json");
const EMAIL_OPTIONS = {
host:... |
/*
* -╥⌐⌐⌐⌐ -⌐⌐⌐⌐-
* ≡╢░░░░⌐\░░░φ ╓╝░░░░⌐░░░░╪╕
* ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q
* ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣
* ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒
* ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å
* ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝`
* ``˚¬ ⌐ ˚˚⌐´
*
* ... |
const {Scene, Sprite} = spritejs;
const container = document.getElementById('stage');
const scene = new Scene({
container,
width: 1200,
height: 600,
// contextType: '2d',
});
const layer = scene.layer();
(async function () {
const sprite = new Sprite({
anchor: 0.5,
bgcolor: 'red',
pos: [500, 300]... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using AutoRest.Core;
using AutoRest.Core.ClientModel;
using AutoRest.Core.Utilities;
using Auto... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AcademyRPG
{
class Ninja:Character,IGatherer,IFighter
{
private int attackPointsCount;
public Ninja(string name, Point position,int owner)
: base(name, position, owner)
{
... |
#include "learnuv.h"
int main() {
int err;
double uptime;
err = uv_uptime(&uptime);
CHECK(err, "uv_uptime");
log_info("Uptime: %f", uptime);
log_report("Uptime: %f", uptime);
size_t resident_set_memory;
err = uv_resident_set_memory(&resident_set_memory);
CHECK(err, "uv_resident_set_memory");
log_... |
---
layout: page
title: Rowe Motors Show
date: 2016-05-24
author: Matthew Clarke
tags: weekly links, java
status: published
summary: Vivamus accumsan libero at purus.
banner: images/banner/wedding.jpg
booking:
startDate: 09/28/2018
endDate: 10/01/2018
ctyhocn: FDYOHHX
groupCode: RMS
published: true
---
Ut molli... |
require 'fn_space/utils'
describe FnSpace::Utils do
describe 'mod' do
it 'creates a object with assign function' do
res = FnSpace::Utils.mod.().assign(:q){50}.assign(:w){93}
expect(res.q).to eql(50)
expect(res.w).to eql(93)
end
end
describe 'struct' do
it 'creates a struct from a h... |
#!/bin/sh
set -e
if [ -n "${MESOS_HOST}" ]; then
if [ -z "${COLLECTD_HOST}" ]; then
export COLLECTD_HOST="${MESOS_HOST}"
fi
fi
export GRAPHITE_PORT=${GRAPHITE_PORT:-2003}
export GRAPHITE_PREFIX=${GRAPHITE_PREFIX:-collectd.}
export COLLECTD_INTERVAL=${COLLECTD_INTERVAL:-10}
# Adding a user if needed to be ab... |
<?php
namespace Jasig;
/*
* Copyright © 2003-2010, The ESUP-Portail consortium & the JA-SIG Collaborative.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of sourc... |
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using U3d = UnityEngine;
namespace M2Image
{
/// <summary>
/// WZL(与WZX配套)文件读取工具类
/// </summary>
internal sealed class WZL : IDisposable
{
/// <summary... |
import webpack from 'webpack';
import path from 'path';
export default {
debug: true,
devtool: 'cheap-module-eval-source-map',
noInfo: false,
entry: [
// 'eventsource-polyfill', // necessary for hot reloading with IE
'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot mo... |
h3.fb-album-heading, h3.fb-account-heading {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: inline-block;
margin: 0px;
margin-left: 10px;
font-weight: lighter;
color: rgba(59, 89, 152, 1);
}
h3.fb-album-heading {
cursor: pointer;
}
h3.fb-album-heading-... |
/*******************************************************************************
MIT License
Copyright (c) 2017 Jeff Kubascik
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, ... |
// Copyright 2021-2022, University of Colorado Boulder
/**
* Provides a minimum and preferred width. The minimum width is set by the component, so that layout containers could
* know how "small" the component can be made. The preferred width is set by the layout container, and the component
* should adjust its size... |
//
// Created by admarkov on 09.05.17.
//
#include "mapping.h"
Node* Node::clone(Node* r, Node* p) {
if (r==nullptr) r = NodeToItsCopy[root];
Node *n = new Node (p, r, type, data, nullptr, nullptr);
NodeToItsCopy[this] = n;
CopyToClonedNode[n] = this;
if (n->root==nullptr) n->root = n;
if (lef... |
<a href="https://github.com/yanhaijing/canvaShape">
<img src="./img/logo.gif" width="100px">
</a>
#[canvaShape](https://github.com/yanhaijing/canvaShape)
==========
一款用来自存管理和存储绘制到html5 canvas上的图形信息的库,用来解决canvas绘制的图形为位图,不能存储信息
|
<?php
namespace Core\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Phone
*
* @ORM\Table(name="phone", uniqueConstraints={@ORM\UniqueConstraint(name="phone", columns={"phone","ddd","people_id"})}, indexes={@ORM\Index(name="IDX_E7927C743147C936", columns={"people_id"})})
* @ORM\Entity
*/
class Phone {
/**
... |
/**
*
*/
package com.zimbra.qa.selenium.framework.util;
import java.net.*;
import java.util.regex.*;
import org.apache.log4j.*;
import com.zimbra.common.soap.Element;
/**
* Represents an 'external' account
*
* @author Matt Rhoades
*
*/
public class ZimbraExternalAccount extends ZimbraAccount {
private sta... |
package com.github.ysl3000.quantum.impl;
import com.github.ysl3000.quantum.QuantumConnectors;
import com.github.ysl3000.quantum.impl.circuits.CircuitManager;
import com.github.ysl3000.quantum.impl.utils.MessageLogger;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConf... |
/*
* sysctl.h: General linux system control interface
*
* Begun 24 March 1995, Stephen Tweedie
*
****************************************************************
****************************************************************
**
** WARNING:
** The values in this file are exported to user space via
** the ... |
# esearch
ES API
|
<?php
namespace Cviebrock\EloquentTaggable\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use I... |
using System;
using System.Linq;
namespace Task_5
{
class Program
{
static void Main(string[] args)
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
int count= 0;
Console.WriteLine("Ohjelma kertoo kuinka monta vokaalia lauseessa on!");
Conso... |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#pragma once
#include "cpprest/base_uri.h"
#include "web_request.h"
namespace signalr
{
class web_request_factory
{
public:
virtua... |
//{
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FILL(i,n) memset(i,n,sizeof i)
#define X first
#define Y second
#define SZ(_a) (int)_a.size()
#define ALL(_a) _a.begin(),_a.end()
#define pb push_back
#ifdef bri... |
/*!
* Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
src: ... |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.gfx.silverlight_attach"]){ //_hasResource checks added by build. Do not use _hasResource direc... |
<?php
$myArr = array("Keeyana", "Mary", "Peter", "Sally");
$myJSON = json_encode($myArr);
echo $myJSON;
?>
|
---
layout: page
title: Santiago Rain Software Conference
date: 2016-05-24
author: Jeremy Kennedy
tags: weekly links, java
status: published
summary: Vestibulum sollicitudin elit ac nunc faucibus ultrices. Morbi laoreet suscipit.
banner: images/banner/office-01.jpg
booking:
startDate: 03/25/2017
endDate: 03/30/2017... |
<?php
/**
* Created by Roquie.
* E-mail: roquie0@gmail.com
* GitHub: Roquie
* Date: 17/05/2017
*/
namespace Tmconsulting\Uniteller\Tests\Payment;
use Tmconsulting\Uniteller\Payment\Payment;
use Tmconsulting\Uniteller\Payment\UriInterface;
use Tmconsulting\Uniteller\Tests\TestCase;
class PaymentTest extends Test... |
/**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highmaps]]
*/
package com.highmaps.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScript n... |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import Greetings from './components/Greetings';
import SignupPage from './components/signup/SignupPage'
export default (
<Route path="/" component={App}>
<IndexRoute component={Greetings}/> //make all ma... |
a{color:red}b{p:v}a{margin:3 3 3 4} |
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.
# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the comm... |
<?php
/*
Unsafe sample
input : get the field userData from the variable $_GET via an object, which store it in a array
sanitize : none
construction : concatenation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify,... |
#include "MoQiang.h"
enum CAUSE{
AN_ZHI_JIE_FANG=2901,
HUAN_YING_XING_CHEN=2902,
HEI_AN_SHU_FU=2903,
AN_ZHI_ZHANG_BI=2904,
CHONG_YING=2905,
CHONG_YING_DISCARD = 29051,
QI_HEI_ZHI_QIANG=2906
};
MoQiang::MoQiang()
{
makeConnection();
setMyRole(this);
Button *cho... |
require 'rubygems'
require 'test/unit'
require 'flexmock/test_unit'
require 'action_view/test_case'
require 'action_view/helpers'
require File.expand_path(File.dirname(__FILE__) + '/../lib/i18n_multi_locales_form')
|
class Item < ActiveRecord::Base
# The SecureRandom library is used to generate uid:s
require 'securerandom'
# Generate uid on creation
before_save :generate_uid, on: :new
def generate_uid
self.uid = SecureRandom.uuid
end
validates :uid,
presence: true,
format: { with: /\h{8}-\h{4}-\h{4... |
<?php
namespace App\AdminBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Temp... |
---
layout: default
---
<div class="home">
<div class="posts yue">
{% for post in paginator.posts %}
<div class="post">
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="post-link"><h3 class="h2 post-title">{{ post.title }... |
<?php
declare(strict_types=1);
namespace Doctrine\ODM\MongoDB\Tests\Functional;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
use Doctrine\ODM\MongoDB\Tests\BaseTest;
use Documents\SchemaValidated;
use function MongoDB\BSON\fromJSON;
use function MongoDB\BSON\f... |
package hr.fer.bio.project.booleanarray;
import hr.fer.bio.project.rankable.Rankable;
import hr.fer.bio.project.wavelet.TreeNode;
import java.util.Arrays;
/**
* Simple class for boolean[] encapsulation
*
* @author bpervan
* @since 1.0
*/
public class BooleanArray implements Rankable {
public boolean[] data... |
run:
@./buildserver.sh " "
@./run.sh
build:
@./buildserver.sh
setup:
@./setup.sh
setupnode:
@./setupnode.sh
|
#colorful-nav {
padding-bottom: 0px;
border: 1px transparent;
}
#colorful-nav .navbar {
margin-bottom: 0px;
}
#colorful-nav {
background-color: transparent;
}
#colorful-nav .navbar-nav {
border-radius: 10px;
float:none;
height: 5%;
}
#colorful-nav .navbar-collapse {
border-top: 0;
}
... |
class Solution {
public:
string multiply(string num1, string num2) {
string a, b;
a = num1;
b = num2;
string A, B;
// cout << a;
// cout << b;
int fa = 1;
int fb = 1;
int f = 1;
int lena = 0;
int lenb = 0;
if (a[0] == '-') {
A = a.substr(1, a.siz... |
<form name="form" sg-read-only="!(access.administrarTrabajadores || access.administrarTrabajadoresAgencia)" class="form-horizontal" novalidate>
<fieldset class="border-top">
<legend><span class="text ng-scope">Asignar usuario <i class="fa fa-question-circle text-muted ng-scope"
tooltip="Usuario asig... |
using System;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Threading;
using PropertyChanged;
using WpfTestApp.Tasks;
namespace WpfTestApp.Model
{
public interface IUIModel
{
bool Busy { get; }
void CancelOperations();
Cancellation... |
(function() {
'use strict';
angular
.module('tiny-leaflet-directive')
.factory('tldMapService', tldMapService);
tldMapService.$inject = ['tldHelpers'];
function tldMapService(tldHelpers) {
var maps = {};
return {
setMap: setMap,
getMap: getMap,... |
<?php
App::uses('Invoices.InvoicesAppModel', 'Model');
/**
* InvoiceLine model
*
*/
class InvoiceSetting extends InvoicesAppModel {
/**
* Validation rules - initialized in constructor
*
* @var array
*/
public $validate = array();
/**
* Constructor
*
* @param mixed $id Set this ID for this model on startup, c... |
using UnityEditor;
using UnityEditor.Callbacks;
namespace Agens.StickersEditor
{
public class StickersBuildPostprocessor
{
[PostProcessBuild(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
if (target != BuildTarget.iOS)
... |
<?php
//
// Copyright (c) 2020-2022 Grigore Stefan <g_stefan@yahoo.com>
// Created by Grigore Stefan <g_stefan@yahoo.com>
//
// MIT License (MIT) <http://opensource.org/licenses/MIT>
//
defined("XYO_CLOUD") or die("Access is denied");
$this->processModel("set-primary-key-value-one");
$this->processModel("set-ds");
i... |
/*eslint-disable react/prop-types*/
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'
import { Provider, connect, ReactReduxContext } from '../../src/index.js'
import * as rtl from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
con... |
module Nyaa
module Commands
module Admin
extend Discordrb::Commands::CommandContainer
command(:'bot.kill', help_available: false,
permission_level: 4, permission_message: false) do |event|
event.user.pm "Desligando..."
Nyaa::Database::ModLog.create(
event: :s... |
using System;
using System.Collections.Generic;
using System.Linq;
using hw.DebugFormatter;
using hw.Scanner;
using hw.UnitTest;
using Reni;
namespace ReniUI.Test
{
[UnitTest]
[AutoCompleteFunctionInCompound]
public sealed class AutoComplete : DependenceProvider
{
const string text = @"systemda... |
# codehub.github.io |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-23 08:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0003_auto_20171221_0336'),
]
operations = [
migrations.AlterField... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.