text stringlengths 27 775k |
|---|
/**
* Clipboard Module
* @module Clipboard
*/
import { container } from "../../nodeshow.js"
import { Container } from "../../Container.js"
import { InputAccessManagerInstance as InputAccessManager } from "./InputAccessManager.mjs"
import { InputManager } from "../utils/InputManager.js"
let appId = null; //Temporar... |
package example09
import java.io.File
import java.io.FileInputStream
object ReadBinFile {
def main(args: Array[String]): Unit = {
val file = new File("src/example09/README.md")
val in = new FileInputStream(file)
val bytes = new Array[Byte](file.length.toInt)
in.read(bytes)
println(new Strin... |
#!/usr/bin/env python3
import numpy as np
import cv2
class Box:
"""
Rectangular box, suitable for use with OpenCV.
Attributes
----------
x : int
x-coordinate of top-left corner
y : int
y-coordinate of top-left corner
width : int
x-length of box
height : int
... |
---
_id: cac44ed0-b748-11e6-9b81-0bc3350a75b6
_parent: /articles/jekyll-static-comments/
replying_to: '4'
name: Michael Rose
email: 1ce71bc10b86565464b612093d89707e
hidden: ''
date: '2016-11-30T22:03:15.286Z'
---
Staticman now supports
[threaded comments](https://github.com/eduardoboucas/staticman/issues/35). The
Liqu... |
from django import template
from django.utils.html import mark_safe
from ..constants import Status
register = template.Library()
@register.filter
def status_badge(subscriber):
css_classes = {
Status.PENDING: 'badge-warning',
Status.SUBSCRIBED: 'badge-primary',
Status.UNSUBSCRIBED: 'badge... |
module Problem012 where
import Problem011
decodeModified :: Eq a => [ModifiedEncoding a] -> [a]
decodeModified = foldr f []
where
f (Single x) acc = x : acc
f (Multiple n x) acc = replicate n x ++ acc
|
<?php
/**
* Horde_Share_Exception
*
*
*/
class Horde_Share_Exception extends Horde_Exception_Wrapped
{
} |
; A118639: Smallest number expressible using the next Roman-numeral symbol.
; Submitted by Jon Maiga
; 1,4,9,40,90,400,900,4000,9000,40000,90000,400000,900000
lpb $0
sub $0,1
add $1,1
mov $2,$3
mul $2,5
trn $2,$1
add $2,3
mov $3,$1
add $3,$1
add $1,$2
lpe
mov $0,$2
add $0,1
|
use itertools::Itertools;
use rayon::prelude::*;
use std::thread::spawn;
#[macro_use]
extern crate may;
// https://en.wikipedia.org/wiki/Bailey–Borwein–Plouffe_formula
fn bbp(k: u32) -> f64 {
let a1 = 4.0 / (8 * k + 1) as f64;
let a2 = 2.0 / (8 * k + 4) as f64;
let a3 = 1.0 / (8 * k + 5) as f64;
let a... |
class SystemScreenCapturer {
void capture({required String imagePath, bool silent = true}) {
throw UnimplementedError();
}
}
|
import * as chai from 'chai';
import 'mocha';
import * as sinon from 'sinon';
import Utils from '../src/utils';
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
const expect = chai.expect;
/* tslint:disable:no-unused-expression */
describe('Utils', () => {
it('can deepSort() nested ob... |
extern crate proc_macro;
use proc_macro::TokenStream;
use serde_json::Value;
/// 将相连的若干的 list 分割
fn split_to_vec(input: &str) -> Vec<&str> {
let mut start = 0;
let mut cnt = 0;
let mut ret = vec![];
for (idx, c) in input.chars().enumerate() {
match c {
'[' => {
if ... |
using UnityEngine;
namespace CommandPattern.Case1.Base1 {
/// <summary>
/// * The 'Abstract Command' class
/// </summary>
// ? Use singleton
public abstract class MoveCommand {
public Cube Cube;
public KeyCode KeyCode;
public MoveCommand(KeyCode keyCode) => KeyCode = keyCode;
public bool ... |
#pragma once
#include "Event.h"
inline namespace MARS
{
class EXPORT_TYPE KeyEvent : public Event
{
public:
inline int32 GetKeyCode() const { return KeyCode; }
EVENT_CLASS_CATEGORY(CategoryKeyboard | CategoryInput)
protected:
KeyEvent(int32 InKeyCode)
: KeyCode(InKeyCode) { }
int32 KeyCode;
};... |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using ALinq.SqlClient;
namespace ALinq.SqlClient
{
internal class SqlColumnizer
{
// Fields
private ColumnDeclarer declarer;
... |
//
// MainAppViewController.h
// helloworld
//
// Created by chen on 14/7/13.
// Copyright (c) 2014年 chen. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "LeftViewController.h"
@interface MainAppViewController : UIViewController<TCLeftListSelectDelegate>
@end
|
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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.apa... |
<?php
namespace forStubMockTesting;
class User {
public function __construct()
{
echo 'constructor was called!';
}
public function createUser($name, $email)
{
$this->name = $name;
$this->email = $email;
if($this->validate())
{
return $this->save... |
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
use std::ops::{Add, Sub, Mul, Div, AddAssign};
///
/// Represents a scalar value which can either be single (f32) or double (f64) precision
///
pub trait Scalar:
private::Sealed +
Copy +
Add<Self, Output=Self> +
Sub<Self, Output=Self> +
Mul<Self, Output=Self> +
Div<Self, Output=Self> +
AddA... |
#!/bin/sh
# © 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
status=`git diff HEAD --quiet || echo '-dirty'`
echo "#define HYP_GIT_VERSION `git rev-parse --short HEAD`$status"
if [ -z "$status" ]
then
echo "#define HYP_BUILD_DATE \"`TZ=UTC git show -s --pretty="... |
package net.degols.libs.election
import javax.inject.Singleton
@Singleton
class ElectionConfigurationMerge extends ConfigurationMerge {
override val filenames: Seq[String] = Seq("application.election.conf")
}
|
class MudPie::StockCommand
MudPie::COMMANDS['stock'] = self
def self.summary
"Update pantry with pages and layouts"
end
def self.help
"Usage: mudpie stock"
end
def self.call(argv, options)
self.new(MudPie::Bakery.new).execute
end
def initialize(bakery)
@pantry = bakery.pantry
end
... |
import { Animal } from './Animal';
export class Sheep extends Animal{
constructor(name) {
super(name);
}
}
|
#!/bin/bash
for file in $1/*.sv; do
module=$(basename -s .sv $file)
if echo "$module" | grep -q '_pkg$' ; then
continue
fi
${HOME}/Downloads/sv2v/bin/sv2v \
--define=SYNTHESIS \
$1/*_pkg.sv \
$1/../vendor/lowrisc_ip/ip/prim/rtl/prim_ram_1p_pkg.sv \
-I$1/../vendor/lowrisc_ip/ip/... |
package soup.movie.theme
import android.widget.TextView
import androidx.databinding.BindingAdapter
@BindingAdapter("themeOptionLabel")
fun setThemeOptionLabel(textView: TextView, themeOption: ThemeOption?) {
val resId = when (themeOption) {
ThemeOption.Light -> R.string.theme_option_light
ThemeOpt... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?= $site->title()->html() ?> | <?= $page->title()->html() ?></title>
<link rel="shortcut icon" type="image/png" href="<?= site()->url() ?>/assets/images/favicon.png"/>
<lin... |
export function mod(value: number, divisor: number) {
return ((value % divisor) + divisor) % divisor;
}
|
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! Helpers for triggering best-effort crash reports.
use anyhow::anyhow;
use fidl_fuchsia_feedback::{CrashReport, CrashReporterProxy};
use fuchsia_zircon... |
import {cloneDeep} from "lodash";
import {ClientHelper, DesiredCapabilities, ServerConfig, WindowSize} from "../../..";
import {setBrowserStackSessionName, standardCapabilities, standardServerConfig} from "../../0_helper/config";
describe(`creatin... |
#!/bin/bash -eu
#
# Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
package goopenzwave
// #include "gzw_manager.h"
// #include <stdlib.h>
import "C"
// GetPollInterval returns the time period between polls of a node's state.
func GetPollInterval() int32 {
return int32(C.manager_getPollInterval(cmanager))
}
// SetPollInterval will set the time period between polls of a node's state... |
<?php
declare(strict_types=1);
namespace Shapin\TalkJS\Model\Conversation;
class ConversationCreatedOrUpdated
{
}
|
module test_bukdu_plugs_prequisite_plugs
using Test
using Bukdu
@test length(Bukdu.bukdu_env[:prequisite_plugs]) == 1
empty!(Bukdu.bukdu_env[:prequisite_plugs])
using Bukdu
@test length(Bukdu.bukdu_env[:prequisite_plugs]) == 0
plug(Plug.Head)
@test length(Bukdu.bukdu_env[:prequisite_plugs]) == 1
end # module test... |
submodule (points_basic) geo
implicit none
contains
module procedure point_dist
point_dist = hypot(ax - bx, ay - by)
end procedure point_dist
end submodule geo
|
package Curses::Orrery;
use v5.12.0;
use Moo;
use Types::Standard qw(ArrayRef Bool InstanceOf Int Num Tuple);
use Astro::Coords::Angle;
use Astro::Coords::Planet;
use Astro::MoonPhase;
use Astro::Telescope;
use Curses;
use DateTime;
use DateTime::TimeZone;
use I18N::Langinfo qw(CODESET langinfo);
use Math::Trig qw(de... |
using Root.Coding.Code.Enums.E01D.Json.Reflection;
namespace Root.Coding.Code.Attributes.E01D.Json.Reflection
{
public class JsonArrayAttribute:JsonContainerAttribute
{
public JsonArrayAttributeInternals Internals { get; set; }
public override JsonContainerKind Kind => JsonContainerKind.Array;... |
<?php
namespace App\Http\Resources\Pegawai;
use Illuminate\Http\Resources\Json\JsonResource;
class listCollection extends JsonResource
{
public function toArray($request)
{
return [
'nip' => $this->PegNip,
'nama' => $this->pegNama,
'noHp' => $this->pegnoHp,
... |
package com.github.sanctum.clans.construct.extra;
import com.github.sanctum.clans.construct.api.Insignia;
public class InsigniaError extends InstantiationException {
private static final long serialVersionUID = -2323418870626176815L;
private final String key;
public InsigniaError(String key, String message) {
... |
const { JSDOM } = require("jsdom");
const { ExifImage } = require("exif");
const sharp = require("sharp");
const path = require("path")
const { promises: { readFile, writeFile } } = require("fs");
const { findByType } = require("../utils/file-search.util")
async function start() {
const target = "./photographs/in... |
<div class="m-default-index">
<div class="row top-icon">
<div class="col-sm-3 col-xs-3 top-icon-item"><a href="<?= \yii\helpers\Url::to(['/m/trade'])?>">
<div class="bg-danger icon-wrap"><i class="glyphicon glyphicon-stats icon"></i></div>
<p class="text">股票操盘</p>
</a></d... |
package disk
import (
"bytes"
"strconv"
"sync"
"time"
"github.com/akrylysov/pogreb"
)
// PogrebDB - represents a pogreb db implementation
type PogrebDB struct {
db *pogreb.DB
sync.RWMutex
}
// OpenPogrebDB - Opens the specified path
func OpenPogrebDB(path string) (*PogrebDB, error) {
db, err := pogreb.Open(... |
const fs = require('fs');
const scrapeDigitalDebitCardActivatedEmail = require('../src/scrapeDigitalDebitCardActivatedEmail');
test('scrapeDigitalDebitCardActivatedEmail', () => {
const htmlEmail = fs.readFileSync('./test/emails/digital-debit-card-activated-email.html');
const actual = scrapeDigitalDebitCardActiv... |
import React, { CSSProperties } from 'react'
import FormCheck from 'react-bootstrap/FormCheck'
interface Props {
/** The id for the switch element */
id: string
/** The label to render next to the switch */
label: string
/** Determines if the switch should be disabled or not. By default false */
disabled?:... |
# frozen_string_literal: true
require "rails_helper"
RSpec.describe "ImportGiasDataJob" do
describe "#perform" do
it "should run the GIAS data importer" do
files = {
school_data_file: "file.csv",
school_links_file: "links.csv",
}
fetch_gias_files = class_double("DataStage::Fet... |
using hedCommon.extension.runtime;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using static UnityEditor.EditorGUILayout;
namespace hedCommon.extension.editor
{
/// <summary>
/// all of thi... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
#ifndef GUARD_median_h
#define GUARD_median_h
#include <vector>
double median(std::vector<double> vec);
#endif
|
/*
* Copyright 2019 Google LLC.
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using Syst... |
/// The Fluent Assertions library written in Dart.
///
/// It uses Dart's Extension Functions to provide a fluent wrapper around test assertions.
library fluent_assertions;
export 'src/basic_assertions.dart';
export 'src/numerical_assertions.dart';
export 'src/string_assertions.dart';
|
require 'english/double_metaphone'
require 'test/unit'
#require 'fastercsv'
# 1218 tests, 2436 assertions
class TC_DoubleMetaphone < Test::Unit::TestCase
DIR = File.dirname(__FILE__)
DATA = File.read(File.join(DIR,'fixture/double_metaphone.txt')).split(/\n/)
DATA.each_with_index do |line, i|
row = *line... |
package tictactoe
import(
"log"
"fmt"
"strings"
)
type GameNode struct {
b *Board
i, j int // where are they playing
p Player // whose turn is it
}
func (b *Board) CheckForWin() *Player {
var winners map[Player]bool
winners = make(map[Player]bool)
// Check for a winner
// rows
for _, row := range b ... |
/*
* Copyright (C) 2009-2016 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api
import org.specs2.mutable.Specification
class LoggerConfiguratorSpec extends Specification {
"generateProperties" should {
"generate in the simplest case" in {
val env = Environment.simple()
val config = ... |
#!/bin/bash
# Replace with your identity
readonly CODE_SIGN_IDENTITY=C6DD0BCD24C737EA0505F1EB26B8BBEEDEC12F1B
set -e # forbid command failure
# Embed provisioning profile
cp \
Karabiner-DriverKit-VirtualHIDDeviceClient/embedded.provisionprofile \
build/Release/Karabiner-DriverKit-VirtualHIDDeviceClient.app/C... |
import itertools as it
def test_get_deleters(generic_case_data):
"""
Test :meth:`.GenericFunctionalGroup.get_deleters`.
Parameters
----------
generic_case_data : :class:`.GenericCaseData`
The test case. Holds the functional group to test and the
correct deleter atoms.
Returns... |
<?
enforce_login();
if ($_REQUEST['action']) {
switch($_REQUEST['action']) {
case 'email':
include('delete_email.php');
break;
case 'takeemail':
include('take_delete_email.php');
break;
case 'ip':
include('delete_ip.php');
break;
case 'takeip':
include('take... |
<?php
/**
* Created by PhpStorm.
* User: Danil Baibak danil.baibak@gmail.com
* Date: 23/04/15
* Time: 11:58
*/
namespace Bundles\WidgetBundle\Tests\Service;
use Bundles\WidgetBundle\Service\ImageService;
use Bundles\WidgetBundle\Tests\Entity\UserFakeRepository;
class ImageServiceTest extends \PHPUnit_Framework_T... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java... |
use crate::Opt;
use notify::{
event::{Event as NEvent, EventKind as NEventKind},
immediate_watcher, RecursiveMode, Watcher,
};
use std::fs;
use std::fs::File;
use std::io::prelude::*;
use std::net::TcpStream;
use std::process::Command;
use std::sync::{Arc, Mutex};
use std::time::{Duration, Instant};
#[derive(D... |
/*
* Copyright 2013-2015 Vitalii Fedorchenko (nrecosite.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3
* as published by the Free Software Foundation
* You can be released from the requirements of the licen... |
//
// Copyright (c) 2018, University of Edinburgh
// 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 source code must retain the above copyright notice,
// this lis... |
/****************************************************************************
* Copyright (C) 2014 by Brendan Duncan. *
* *
* This file is part of DartRay. *
* ... |
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedType.Global
namespace Caxapexac.Common.Sharp.Extensions
{
public static class ObjectExtensions
{
public static bool HasMethod(this object self, string methodName)
{
ret... |
<div id="nav-bar">
<li class="nav-item" id="header">Sillystringz Factory Manager</li>
<li class="nav-item nav-link">@Html.ActionLink("Home", "Index", "Home")</li>
<li class="nav-item nav-link">@Html.ActionLink("Engineers", "Index", "Engineers")</li>
<li class="nav-item nav-link">@Html.ActionLink("Machines", "In... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from itertools import chain
from operator import methodcaller
import regex as re
from six.moves import zip_longest
from dateparser.utils import normalize_unicode
PARSER_HARDCODED_TOKENS = [":", ".", " ", "-", "/"]
PARSER_KNOWN_TOKENS = ["am", "pm", "a"... |
'use strict';
const assert = require('assert');
const asyncUtils = exports;
asyncUtils.forEachSequential = async function(array, functionToBeApplied) {
assert(functionToBeApplied instanceof Function, 'The second parameter has to be a function.');
let resultArray = [];
if (Array.isArray(array))
{
for (let arr... |
---
title: "Open Source and ReScience"
collection: thesis
type: "Thesis topic"
permalink: /thesis/open_source_rescience
venue: "Osnabrück University, Institute of Cognitive Science"
date: 2019-09-20
location: "Osnabrück, Germany"
---
Ever read an exciting paper that you could not find any source code for?
It has long ... |
require "test_helper"
class SetupGameTest < Minitest::Test
def setup
@messages = Minesweeper::Messages.new
@validator = Minesweeper::InputValidator.new(@messages)
bomb_positions = [10, 11, 12, 13, 14]
@test_board = Minesweeper::Board.new(5, 5, bomb_positions)
@mock_cli = Minesweeper::MockCli.new(... |
# Tutti-Frutti
:kiwi_fruit: :strawberry: :kiwi_fruit:
An archive of half-baked projects, fire & forget hacks, and a shameless clipboard.
## Gallery



|
require "utils.rb"
module Language
module Python
def self.major_minor_version python
version = /\d\.\d/.match `#{python} --version 2>&1`
return unless version
Version.new(version.to_s)
end
def self.each_python build, &block
original_pythonpath = ENV["PYTHONPATH"]
["python",... |
/**
* Copyright 2017 Yahoo Holdings Inc.
* Licensed under the terms of the MIT license. See LICENSE file in project root for terms.
*/
/* eslint-env mocha */
/* eslint-disable no-unused-expressions */
import { Cerebro } from '../cerebro'
const expect = require('chai').expect
const FIXTURE_PATH = '../../test/fixtur... |
<?php
/*
* This file is part of the MagmaCore package.
*
* (c) Ricardo Miller <ricardomiller@lava-studio.co.uk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace MagmaCore\Http;
use Symfony\Compon... |
export interface ICreditCard {
ccNetwork:string;
lastFourNumbers:number;
expiryMonth:number;
expiryYear:number;
cvvVerified:boolean;
} |
---
layout: post
title: "数据分析思维"
date: 2022-01-10
description: "数据分析思考"
tag: 数据分析
katex: true
---
```
数据分析的本质是解决问题,创造价值;而不是为了分析而分析,为了汇报而分析。
```
通过这段期间的数据分析工作,对这个岗位也有了一些思考。
首先是数据分析的sense:
## 目标思维
- **正确定义问题与目标**
做分析要想想自己分析是为了什么,要得到什么结果,解决什么问题。
- **合理分解问题**
通常一个项目,一个数据需求是一个比较大的问题,把大问题拆解为各个小问题并逐个击破,是数分必要的能力。拆解... |
SUBROUTINE DT_DIAGR(Na,Nb,Ijproj,B,Js,Jt,Jnt,Inta,Intb,Idirec,
& Nidx)
C***********************************************************************
C Based on the original version by Shmakov et al. *
C This version dated 21.04.95 is revised by S. Roesler ... |
package com.dataart.spreadsheetanalytics.demo.main;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.dataart.spreadsheetanalytics.api.engine.IAuditor;
import com.dataart.spreadsheetanalytics.api.eng... |
// expect:be sure to finish!
// author:KercyLAN
// create at:2020-2-29 12:38
package ktime
import (
"testing"
"time"
)
func TestInterval(t *testing.T) {
d := time.Now()
t.Log(Interval(d.Unix()))
t.Log(Interval(d.Unix() - 10))
t.Log(Interval(d.Unix() - 100))
t.Log(Interval(d.Unix() - 10000))
t.Log(Interval(d.... |
import 'package:every_door/models/osm_element.dart';
import 'package:test/test.dart';
import 'package:every_door/helpers/snap_nodes.dart';
import 'package:latlong2/latlong.dart' show LatLng;
OsmElement wayFromPoints(List<LatLng> points) {
return OsmElement(
id: OsmId(OsmElementType.way, 0),
version: 1,
t... |
# PIC LCD Driver Module Demonstration Circuit
In this directory is a KiCad project for the design of a minimal circuit to demonstrate driving
a segment LCD from a PIC MCU (in this case a PIC16LF19156) equipped with a built-in LCD driver module.
## Bill of Materials
Qty | Reference | Value | Description
--- | -------... |
{ **********************************************************************
* Unit FCOMP.PAS *
* Version 1.1 *
* (c) J. Debord, July 2000 * ... |
# -*- coding: utf-8 -*-
"""fragments are block of html which can be dynamically added"""
from django.contrib.auth.decorators import login_required
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.forms.models import modelformset_factory
from dja... |
using System;
namespace Serilog.Console
{
class Program
{
static void Main(string[] args)
{
Log.Logger = new LoggerConfiguration().ReadFrom.AppSettings()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("logs\\logs.txt", rolling... |
<?php
namespace Midata\Object;
use Midata\Object;
/**
* This is class represents the database view.
*/
abstract class View extends Object
{
const ATTRIBUTE_DEFINITION = 'definition';
abstract public function definition();
public static function allAttributes()
{
return arra... |
package com.mapbox.navigation.ui;
import androidx.annotation.NonNull;
import java.util.HashMap;
class WifiNetworkChecker {
private final HashMap<Integer, Boolean> statusMap;
WifiNetworkChecker(HashMap<Integer, Boolean> statusMap) {
this.statusMap = statusMap;
initialize(statusMap);
}
@NonNull
Bo... |
<?php
namespace AppBundle\Controller;
use AppBundle\Entity\User;
use AppBundle\Form\UserType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class AdminC... |
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generi... |
(ns cmr.spatial.mbr
(:require
[cmr.spatial.math :as math :refer :all]
[primitive-math]
[cmr.spatial.point :as p]
[cmr.spatial.derived :as d]
[cmr.common.services.errors :as errors]
[cmr.common.validations.core :as v]
[pjstadig.assertions :as pj]
[cmr.spatial.validation :as sv]
[cmr.spatial.... |
// Copyright(c) Microsoft Corporation
// 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
//
// THIS CODE IS PROVIDED ON AN ... |
package io.testaxis.intellijplugin.toolwindow.builds.views.testcasetabs
import com.intellij.ide.highlighter.HighlighterFactory
import com.intellij.openapi.editor.EditorFactory
import com.intellij.openapi.editor.LogicalPosition
import com.intellij.openapi.editor.colors.EditorColors
import com.intellij.openapi.editor.co... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
/**
* This class allow us to load a sudoku from a file and print it
* It's also used to merge the unsolved sudoku with the values from the C... |
{# If our source override didn't take, this would be an errror #}
select * from {{ source('my_source', 'my_table') }}
|
<?php
namespace App\Http\Controllers;
use App\Http\Model\Managers\WorkerManager;
use Illuminate\Http\Request;
use App\Http\Controllers\Auth;
use App\Http\Model\Managers\CompanyManager;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
pu... |
#!/bin/sh
export DJANGO_SETTINGS_MODULE=core.settings.dev
cd /code
celery -A core worker --beat --scheduler django --loglevel=info
|
# obelisk
A lightwight service for data transformations and interfacing
for reflectance calculations
## Installation
### Docker
Obelisk requires docker. The easiest way to put docker on your
system is through docker desktop, which requires administrator
privileges. You can find installation instructions for
docker... |
module.exports = {
name: "join",
description: "Tham gia phòng",
aliases: ['connect'],
execute(client, message, args) {
const voiceChannel = message.member.voice.channel;
if (!voiceChannel) return;
voiceChannel.join();
}
} |
<?php
namespace App\Http\Controllers;
use App\Category;
use App\News;
use App\User;
use Illuminate\Support\Facades\DB;
use function GuzzleHttp\Promise\all;
class MainController extends Controller
{
public function index(){
$users= User::all();
$threeNews = DB::table('news')->orderBy('created_at',... |
# Advanced Topics
This page presents advanced information in a not so structured manner. It is used as both a reference
for external and internal developers, and therefore rewards flexibility over structure.
## Examples
Multiple netius examples can be found in the [Examples](examples.md) page.
## Python 3
The migr... |
Deface::Override.new(
virtual_path: 'spree/admin/products/_form',
name: 'add cyo_price to edit page',
insert_after: "[data-hook='admin_product_form_cost_currency']",
text: '<div data-hook="admin_product_form_cyo_price">
<%= f.check_box :cyo_price %>
<%= f.label :cyo_price, Spree.t(:cyo_pri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.