text stringlengths 27 775k |
|---|
namespace FactsGreet.Web.Infrastructure
{
using System;
public static class Paginator
{
public static (int Skip, int Take) GetPagination(int page, int itemsPerPage)
{
return ((Math.Max(1, page) - 1) * itemsPerPage, itemsPerPage);
}
}
}
|
import Drawer from 'rc-drawer'
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { Link, Outlet, useNavigate } from 'react-router-dom'
import { selectUi, updateShowSetting } from 'src/store/ui'
import { HomeDrawer } from '../HomeDrawer'
import { HomeFooter ... |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeApplications #-}
module Pics.MM
( acura
, acuraMarker
, xMarker
, circleMarker
, diamondMarker
, dotMarker
, arrowMarker
) where
import Data.Maybe (fromMaybe)
import Diagrams.Prelude
import Pics.Palette ... |
#! /bin/bash
wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.zip
unzip boost_1_67_0.zip
|
unit mega;
interface
type
T_Array_3_LongInt = array of array [0..2] of LongInt;
T_Array_LongInt = array of LongInt;
procedure encode(n: LongInt; l: T_Array_3_LongInt);
procedure decode(n: LongInt; l: T_Array_LongInt);
function solve(a: SmallInt; b: LongInt; c: Int64; d: Single; e: Double): Double;
implementation
... |
#ifndef __USART_H
#define __USART_H
#define USART0_GPIO_TX_PIN GPIO_PIN_9
#define USART0_GPIO_RX_PIN GPIO_PIN_10
#define USART0_GPIO_PORT GPIOA
#define USART1_GPIO_TX_PIN GPIO_PIN_2
#define USART1_GPIO_RX_PIN GPIO_PIN_3
#define USART1_GPIO_PORT GPIOA
#define USART2_GPIO_TX_PIN GPIO_PIN_10
#define USART2_G... |
package com.deviseworks.mcc.frontend.common
object API {
private const val API_BASE = "http://172.20.86.19:8080"
const val PLAYER_LIST = "$API_BASE/api/player/list"
const val SERVER_COMMAND = "$API_BASE/api/server/order/add"
const val SERVER_MEMORY = "$API_BASE/api/server/memory"
} |
# Simplecov Report with Group metrics
A GitHub Action that report simplecov coverage with group metrics.

## Usage:
This action needs JSON file generated by following gem.
https://github.com/pi-chan/simplecov-json
The action works only with `pull_request` event.
### Inputs
- `token` - The G... |
import 'package:flutter/material.dart';
@immutable
class Seed {
const Seed({
required this.value,
required this.expiration,
});
factory Seed.fromJson(Map<String, dynamic> json) {
return Seed(
value: json['seed'] as String,
expiration: DateTime.parse(
json['expires_at'] as String,
... |
package com.kirdmiv.todo
import android.content.Context
import android.util.Log
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.JsonArray
import java.io.File
import java.io.InputStream
class NoteFactory {
companion object {
fun saveNotes(context: Context, notes: Mutab... |
package codes.mii.SaveEditor.Types
class NBT_End : Data {
override val name: String = "End"
override val nameLength: Byte = 0
override val typeByte: Byte = 0
} |
/**
* @author Edouard Demotes-Mainard <https://github.com/EdouardDem>
* @license http://opensource.org/licenses/BSD-2-Clause BSD 2-Clause License
*/
/**
* Object djs for namespace
*/
window.djs = window.djs || {};
/**
* This class manage an ordered callback stack
* This class is chainable
*/
djs.CallStack = f... |
window.app_api.sendToMain('Take it Main');
window.app_api.receiveFromMain(data => {
console.log(data);
});
|
#!/usr/bin/env bash
SERVER="
a.usgjsq.net
b.usgjsq.net
c.usgjsq.net
d.usgjsq.net
e.usgjsq.net
f.usgjsq.net
g.usgjsq.net
h.usgjsq.net
ca.igjsq.net
uk1.igjsq.net
uk2.igjsq.net
de1.igjsq.net
de2.igjsq.net
es.igjsq.net
fr1.igjsq.net
fr2.igjsq.net
ru.igjsq.net
a.twgjsq.com
b.twgjsq.com
c.twgjsq.com
a.hkgjsq.com
b.... |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using BitBoxUnity.Core;
using System.Reflection;
using BitBoxExample.CSCommon;
using System;
public partial class ClientNetwork : Singleton<ClientNetwork>
{
public void Send_CS_ECHO_APP_REQ(string data)
{
Packet packet = ne... |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'toilet_inspection.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ToiletInspection _$ToiletInspectionFromJson(Map<String, ... |
// Based on https://github.com/DNSCrypt/doh-server/blob/master/src/libdoh/src/odoh.rs
use crate::error::*;
use crate::log::*;
use bytes::Bytes;
use odoh_rs::{
parse, ObliviousDoHConfigContents, ObliviousDoHConfigs, ObliviousDoHMessage,
ObliviousDoHMessagePlaintext, OdohSecret,
};
use rand::{rngs::StdRng, Rng, Seeda... |
# $Id$
#
# Copyright (c) 2005-2007 Daisuke Maki <daisuke@endeworks.jp>
# All rights reserved.
package XML::RSS::LibXML::Namespaces;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT_OK);
my %KnownNamespaces;
my %RevKnownNamespaces;
BEGIN
{
%KnownNamespaces = (
rdf => "http://www.w3.... |
import jsdom from "jsdom";
global.document = jsdom.jsdom("<!DOCTYPE html><html><body></body></html>");
global.navigator = { userAgent: "node.js" };
global.window = document.parentWindow;
|
<?php
namespace lav45\settings\tests\models;
use lav45\settings\storage\StorageInterface;
class LocalStorage implements StorageInterface
{
private $data = [];
public function getValue($key)
{
return isset($this->data[$key]) ? $this->data[$key] : false;
}
public function setValue($key, $... |
import urllib.parse
import re
import logging
from .entities import Source
__all__ = ["UrlHelper", "isolate_regions"]
logger = logging.getLogger(__name__)
_GITHUB_URL_RE = re.compile(r"https://github.com/(.*)/issues/([0-9]+)")
def make_github_issue_url(github_repository, github_issue_id):
return f"https://gi... |
import numpy as np
from functools import partial
ij_all = [(0, 0), (0, 1), (1, 0), (1, 1), (2, 1), (1, 2), (2, 2),
(2, 3), (3, 2), (3, 3), (4, 3), (3, 4), (4, 4)]
myother = 5
mylst = np.zeros((5, 5))
def myLoop(ij_inputs, other, lst):
print(ij_inputs)
i, j = ij_inputs
lst[i, j] = other
... |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'Book.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Book _$BookFromJson(Map<String, dynamic> json) {
return Book(
... |
using System;
using Newtonsoft.Json;
namespace YetAnotherTwitchBot.Models
{
public class ExecutiveOrder
{
public string Title;
public string Type;
public string Abstract;
[JsonProperty(PropertyName = "document_number")]
public string DocumentNumber;
[JsonProperty... |
# wakatime-zsh-plugin
#
# Documentation is available at:
# https://github.com/sobolevn/wakatime-zsh-plugin
_wakatime_heartbeat() {
# Sends a heartbeat to the wakatime server before each command.
# But it can be disabled by an environment variable:
# Set `$WAKATIME_DO_NOT_TRACK` to 1 to skip the tracking.
if ((... |
#! /bin/bash
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
umask 022
if [ "${VERBOSE}" = "true" ] ; then
set -e -u -x
fi
yum -y update
if [ $(rpm -q kernel | wc -l) -gt 1 ] ; then
reboot &
sleep 300
fi
|
---
id: pretty-console-reporter
title: Pretty Console Reporter
sidebar_label: 3. Pretty Console Reporter
---
import useBaseUrl from '@docusaurus/useBaseUrl';
The `PrettyConsoleReporter` is a modern CLI console reporter with colors, indentation, spinner and other nice things...
| | ... |
/*
**********************************************************************************************************************
*
* the Embedded Secure Bootloader System
*
*
* Copyright(C), 2006-2014, Allwinnertech Co., Ltd.
* All Rights Reserved
*
* File ... |
using AxinLib.IO.CSV;
using ExcelReport.Driver.CSV.Extends;
using System.IO;
namespace ExcelReport.Driver.CSV
{
public class WorkbookLoader : IWorkbookLoader
{
public IWorkbook Load(string filePath)
{
var workbook = new Workbook();
var sheet = workbook[Path.GetFileNameW... |
# YoutubeTranslationHelper
Scripts to support the translation of Youtube subtitles.
# Download the original subtitles.
Go to the respective video on YT. Select the gear wheel and pick 'Subtitles' and then 'Add subtitles'.
A new page will open. Press the blue button 'Select language'. Pick your source language.
A for... |
package net.starlegacy.feature.economy.cargotrade
import net.starlegacy.cache.trade.CargoCrates
import net.starlegacy.database.Oid
import net.starlegacy.database.schema.economy.CargoCrate
import net.starlegacy.feature.economy.city.TradeCityData
/**
* Used for shipments that haven't been claimed yet.
*/
data class U... |
package App::Prove::Plugin::Count;
use 5.008001;
use strict;
use warnings;
our $VERSION = "0.03";
use App::Prove;
use Class::Method::Modifiers qw( around );
use TAP::Formatter::Base;
my $total_file_count;
my $current_file_count = 0;
sub load {
around 'App::Prove::_get_tests' => sub {
my $orig = shift;
... |
---
layout: page
title: About
---
Buradaki yazıları aslında tamamen kendim için yazıyorum. O yüzden beklentilerinizi yüksek tutmayın.
## İletişim
* onur dot ozgur dot ozkan at bulutfon dot com
* http://twitter.com/onurozgurozkan
|
#! /shell/quirk/test/for/moderni/sh
# See the file LICENSE in the main modernish directory for the licence.
# QRK_SPCBIXP: Variable assignments preceding special builtins
# are exported, and persist as exported. (bash -o posix; yash)
_Msh_test=foo :
isset -x _Msh_test
|
package ru.job4j.stream;
import org.junit.Test;
import java.util.List;
import java.util.function.Predicate;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
public class SchoolTest {
@Test
public void whenTheScoreIs80() {
Student student1 = new Student(80, "10А");
Stud... |
window.app = new Vue({
el: '#app',
data: {
variants: [
'primary',
'secondary',
'success',
'warning',
'danger',
'outline-primary',
'outline-secondary',
'outline-success',
'outline-warning',
'outline-danger',
'link'
],
sizes: ['sm', '', 'lg... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Collections.Generic
{
// Provides a read-only, covariant view of a generic list.
public interface IReadOnlyCollection<out T> : IEnumerable<T>
{
i... |
/*******************************************************************************
* Copyright 2011-2014 Sergey Tarasevich
*
* 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.... |
module Teal.Expr where
import Control.Applicative
import Data.Functor.Identity
( Identity
)
import qualified Data.List as DL
import qualified Data.Map as DM
import qualified Data.String as DS
import Text.Parsec
( Pars... |
using MultiNoa.Networking.Transport.Connection;
namespace MultiNoa.Networking.Server
{
public class NoaTcpServer: ServerBase
{
public NoaTcpServer(ushort port, string protocolVersion, int tps = 5, string name = "New Server") :
base(port, protocolVersion, new NoaTcpListener(port, protocolVe... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VVVV.PluginInterfaces.V2;
using BulletSharp;
namespace VVVV.Nodes.Bullet
{
public abstract class AbstractBodyForceNode : AbstractBodyInteractionNode<RigidBody>
{
[Input("Auto Activate", DefaultValue=1, Order = 1000)]
... |
<?php
namespace App\Http\Controllers;
use App\Http\Requests\CreateF1exercicioc1m1Request;
use App\Http\Requests\UpdateF1exercicioc1m1Request;
use App\Repositories\F1exercicioc1m1Repository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
class F1exercicioc1m1Controll... |
# This script retrieves data for a pan-gene calculation, from a remote location (typically https or ftp).
# Retrieved files are typically nucleotide CDS files and/or protein files, and
# corresponding annotation files, in GFF3 or BED format.
# Edit this file to identify the base URL for the remote location, and the ... |
ALB Plugin changelog
v1.1
-----
- adding Content-Type header and setting to application/xml
v1.0
-----
- initial release |
#!/bin/bash
set -e
readonly my_dir="$( cd "$( dirname "${0}" )" && pwd )"
readonly BASE_SHA=$(docker run --rm cyberdojo/starter-base:latest sh -c 'echo -n ${BASE_SHA}')
readonly TAG=${BASE_SHA:0:7}
# Set STARTER_BASE_TAG so it tunnels through
# cyberdojo -> cyber-dojo-inner -> cat-start-point-create.sh
export STARTE... |
amnesia0287's Keymap
===
Keymap Maintainer: [amnesia0287](https://github.com/amnesia0287)
Difference from base layout: Primarily the HHKB-ness
Intended usage: Daily driver for programming
|
import { FontSizeFunc, FONTSIZES } from './MathCss';
import { FONT_FAMILIES, FONT_STYLES } from './fontMetrics';
export const LETTERS = 'a-zA-Z@αβγΓδΔϵζηθΘιIκλΛμνοπΠρσΣτυϕΦχΞξψΨω';
export type MathExpr = {
expr: string;
attr: {
dx: number; // dx, dy used for before character gets printed
dxx?: number; // d... |
#!/bin/sh
#$1 = IMAGENAME, $2 = CONTAINERNAME
if [ "$#" -ne 2 ]; then
echo "Usage: $0 IMAGENAME CONTAINERNAME" >&2
exit 1
fi
docker build -t $1 .
docker run --name=$2 -t -d -p 80:5004 $1
|
import FPS from './fps'
import Bag from './bag'
import Terrain from '../terrain'
import Block from '../terrain/mesh/block'
import Control from '../control'
import { Mode } from '../player'
import Joystick from './joystick'
import { isMobile } from '../utils'
export default class UI {
constructor(terrain: Terrain, co... |
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cofoundry.Domain.Data
{
public static class DbContextConfigurationHelper
{
/// <summary>
/// Turns off La... |
# frozen_string_literal: true
require 'spec_helper'
require 'appmap/util'
describe AppMap::Util, docker: false do
describe 'scenario_filename' do
let(:subject) { AppMap::Util.method(:scenario_filename) }
it 'leaves short names alone' do
expect(subject.call('foobar')).to eq('foobar.appmap.json')
en... |
# frozen_string_literal: true
# all_ranks: a sorted array of strings (names of taxonomic ranks)
# start_rank: a string, the name of the first (highest) rank used
class Ticker
attr_reader :new_taxon_count
def initialize(all_ranks, start_rank = nil, log = nil)
start_index = start_rank ? all_ranks.index(start_ra... |
'use strict';
require('process').env.OAUTHRECIPES_SURPRESS_TRACE = true;
const utils = require('../../utils');
const validate = require('../../validate');
const knex = require('../../knex/knex.js');
const mockKnex = require('mock-knex');
const tracker = require('mock-knex').getTracker();
describe('validate', ... |
package com.kenilt.skeleton.managers.recycler
import com.kenilt.skeleton.managers.interfaces.IModel
import com.kenilt.skeleton.managers.interfaces.IPageable
import com.kenilt.skeleton.managers.listeners.EnqueueListener
import com.kenilt.skeleton.model.response.ErrorResponse
import retrofit2.Call
/**
* Created by tha... |
/*************************************************************************
> File Name: t.h
> Author: snowflake
> Mail: 278121951@qq.com
> Created Time: Fri 05 Feb 2021 05:15:17 PM CST
> Copyright (C) 2007 Free Software Foundation, Inc.
> See the copyright notice in the file /usr/LICENSE.
>
> 这个头文件定义了许多常量,其中多... |
__version__ = '4.1.0'
from functools import wraps
from tri_declarative import LAST
from iommi._db_compat import (
register_factory,
setup_db_compat,
)
from iommi.action import Action
from iommi.asset import Asset
from iommi.base import MISSING
from iommi.form import (
Field,
Form,
register_field_... |
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:spotube/components/Home/Sidebar.dart';
import 'package:spotube/hooks/useBreakpoints.dart';
import 'package:spotube/models/sideBarTiles.dart';
class SpotubeNavigationBar extends HookWidget {
final int selectedIn... |
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataType {
String = 0,
Bool = 1,
Bytes = 2,
Int64 = 3,
Float32 = 4,
Float64 = 5,
TimestampMicros = 6,
}
|
require 'test_helper'
class AjaxControllerTest < ActionController::TestCase
def test_textile_preview
assert_routing 'ajax/textile-preview', {:controller => 'ajax', :action => 'textile_preview'}
end
def test_textile_preview
post :textile_preview, test_params
assert_response :success
assert_tem... |
package com.example.demoapp.demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class TennisCoachPersonnel implements CoachPersonnel {
@Value("${tenniscoach.name}")
... |
class String
# Use method missing to call create_colors
# if needed
def method_missing(name, *args)
unless String.colors.include?(name.to_s)
super unless String.colors_map[name]
String.create_colors
self.send(name)
else
super
end
end
# Redefine respond_to?
def respond_t... |
#include <stdlib.h>
#include "dataBase.h"
#include "query.h"
#include "logger.h"
#include "menu.h"
int main(int argc, char const *argv[]) {
DataBase *dataBase = NULL;
Query *query = NULL;
dataBase = connect(NULL);
if (dataBase == NULL) {
ERROR("Probleme dans l'ouverture des tables. Fermeture du programm... |
namespace Vulkan
{
public enum VkStructureType : uint
{
ApplicationInfo = 0,
InstanceCreateInfo = 1,
DeviceQueueCreateInfo = 2,
DeviceCreateInfo ... |
using JT808.Protocol.Extensions;
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
namespace JT808.Protocol.Test.Extensions
{
public class JT808EnumExtensionsTest
{
[Fact]
public void Test1()
{
var list0 = JT808EnumExtensions.ParseAlarmStatus(5... |
# Copyright 2017 Glen Harmon
import logging
import sublime
import sublime_plugin
logger = logging.getLogger('network_tech.settings.listener')
STATUS_KEY = 'Network Tech'
SETTINGS_FILE_NAME = 'Network Tech.sublime-settings'
NETWORK_INFO_ON_HOVER_SETTING_NAME = 'network_info_on_hover'
class ToggleNetworkInfoOnHover... |
<?php
/**
* @todo Write file documentation.
*/
namespace Finlet\flexmail\Config;
interface ConfigInterface {
}
?> |
---
Title: How to publish packages to NPM
Published: 2016-01-02
Tags:
- npm
- javascript
- package-management
---
If you haven't already set your NPM author info, here's how you do it
# npm set init.author.name "Your Name"
# npm set init.author.email "you@example.com"
# npm set init.author.url "http... |
import React from 'react';
import topView from 'rn-topview';
import OperationContainer from './OperationContainer';
export default function a() {
var actions = (arguments.length <= 0 ? undefined : arguments[0]) || [{ text: '确定' }];
var onAnimationEnd = function onAnimationEnd(visible) {
if (!visible) {
... |
import React, { FC, useState } from 'react';
import Dialog from '../molecules/Dialog';
import Card from '../molecules/Card';
import CardActions from '../molecules/CardActions';
import CardContent from '../molecules/CardContent';
import Button from '../atoms/Button';
import CardHeader from '../molecules/CardHeader';
im... |
print '
Generating template inheritance definitions...'
IF OBJECT_ID('[orm_meta].[inheritance]', 'U') IS NOT NULL
drop table [orm_meta].[inheritance]
go
create table [orm_meta].[inheritance]
(
parent_template_guid uniqueidentifier not null
, child_template_guid uniqueidentifier not null
, ordinal int not null
, co... |
---
layout: post
title: "Stream을 이용하여 파일 읽고 쓰기"
image: '/assets/img/'
description: 'Stream을 이용하여 파일 읽고 쓰기'
tags:
- Example
- Stream
- File I/O
categories:
- Android
---
다음 소스는 Stream을 이용하여 파일을 읽고 쓰는 예제입니다.
```java
@Override
public void Write(String value) {
try {
File file = new File(getPath(), "FILE_NAME... |
<table class="paneltable" cellpadding="0" cellspacing="0">
<tr>
<td class="altsxg"></td><td class="altceg">##/titolo##</td><td class="altdxg"></td>
</tr>
<tr>
<td class="medsx"></td><td class="medce">##/testo##</td><td class="meddx"></td>
</tr>
<tr>
<td class="bassx"></td><td class="basce"></td><td class="b... |
class Product
include Mongoid::Document
field :name
field :reference
field :quantity, type: Integer
belongs_to :category
embeds_many :comments, as: :commentable
embeds_one :manager, as: :managable
validates_presence_of :name
validates_associated :category
accepts_nested_attributes_for :category... |
#!/bin/bash
set -eu
# Luks test
imageName=test.img
imageAlias=test_image
oldPassword=test
newPassword=test2
echo -n $oldPassword > initPassword.key
echo -n $newPassword > newPassword.key
function atexit {
sudo cryptsetup close $imageAlias || true
sudo umount mnt || true
rmdir mnt 2>/dev/null || true
echo "clea... |
import 'package:flutter/material.dart';
/// Represents the data for a carousel.
abstract class CarouselItem {
final String title;
final String subtitle;
final ImageProvider? imageProvider;
final List<CarouselButtonItem> buttons;
const CarouselItem({
required this.title,
required this.subtitle,
t... |
import { storiesOf } from '@storybook/react';
import { number, text } from '@storybook/addon-knobs';
import { BigValue } from './BigValue';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
const getKnobs = () => {
... |
#!/usr/bin/env bash
# Creates an .env from ENV variables (mainly for use with `react-native-config`)
ENV_WHITELIST="^NF_"
printf "Creating an '.env' file with the following whitelist: "%s"\n" $ENV_WHITELIST
env | egrep $ENV_WHITELIST > .env
printf "'.env' file created\n"
|
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
namespace Aop.Api.Domain
{
/// <summary>
/// AlipayMarketingActivityOrderCreateModel Data Structure.
/// </summary>
[Serializable]
public class AlipayMarketingActivityOrderCreateModel : AopObject
{
... |
# short.me
URL shortener for node.js
# Installation
Get the source code and run
```
npm install
bower install
```
Change `config/default.json` to fit your needs.
# Contribution
Create issues or pull request to contribute :)
This project has just started, so it still lacks tests and documentation ;-)
|
import 'package:flutter/material.dart';
import 'package:isolate_bloc/isolate_bloc.dart';
import 'package:weather_app/blocs/settings_bloc.dart';
import 'package:weather_app/blocs/theme_bloc.dart';
import 'package:weather_app/blocs/weather_bloc.dart';
import 'package:weather_app/utils/theme_utils.dart';
import 'isolate_... |
using System.Runtime.Serialization;
namespace Alexa.NET.Management.Metrics
{
public enum SkillType
{
[EnumMember(Value="custom")]
Custom,
[EnumMember(Value = "smartHome")]
SmartHome,
[EnumMember(Value = "flashBriefing")]
FlashBriefing
}
} |
module Bumbleworks
module Api
class ErrorPresenter < Presenter
def to_hash
{
:process_id => presented.wfid,
:expression_id => presented.expression.expid,
:error_class_name => presented.error_class_name,
:message => presented.message,
:backtrace => pr... |
class ApplicationMailer < ActionMailer::Base
default from: "Math Support Finder <msf@mathmlcloud.org>"
layout "email"
end
|
class RegistrationsController < Devise::RegistrationsController
def create
if skip_user_creation_confirmation?
devise_parameter_sanitizer.for(:sign_up) << [:confirmed_at]
params[:user][:confirmed_at] = DateTime.now
end
super
end
protected
def after_inactive_sign_up_path_for(_resource)... |
import React from 'react';
import { StaticQuery, graphql } from 'gatsby';
const PreBuildStaticQuery: React.FC = () => {
return (
<StaticQuery
query={graphql`
query RickAndMortyQueryGatsby {
rickAndMorty {
character(id: 1) {
name
image
}
... |
<li class="@yield('active-dashboard')">
<a href="{{ url('member/dashboard')}}">
<i class="fa fa-dashboard"></i>
<span class="nav-label">Dashboard</span>
</a>
</li>
<li class="@yield('active-kta')">
<a href="{{ url('member/kta')}}">
<i class="fa fa-credit-card"></i>
<span class="nav-label">KTA</span>
</a>
</... |
---
title: "Creation of a mini self driving car using Deep Learning"
date: 2020-2-27
tags: [Machine Learning, data science,statistics]
header:
image: "/images/exoplanets.jpeg"
excerpt: "Deep Learning, Data Science, statistics"
---
Using a neural networks named LSTM was built a little autonomous car named donkey car,
... |
'use strict'
import {RouteConfig} from 'react-router-config';
import {App} from 'containers/app';
import {Login} from 'containers/pages/login';
import {One} from 'containers/pages/one';
import {Two} from 'containers/pages/two';
import {Welcome} from 'containers/pages/welcome';
import Customer from 'containers/pages/... |
<?php
namespace Nemundo\Workflow\App\PersonalCalendar\Data;
use Nemundo\Model\Collection\AbstractModelCollection;
class PersonalCalendarCollection extends AbstractModelCollection
{
protected function loadCollection()
{
$this->addModel(new \Nemundo\Workflow\App\PersonalCalendar\Data\PersonalCalendar\P... |
module Game where
import Control.Monad
import Data.Maybe (isNothing)
import Direction
import View
import Graphics.Gloss hiding (Point)
import Graphics.Gloss.Interface.Environment
import Graphics.Gloss.Interface.IO.Game hiding (Point)
import GameBoard
import KeyInput
import Player
import State
import System.Exit
impo... |
#
module OopUtils
def abstract
calling_method = caller[0][/`.*'/][1..-2]
raise NotImplementedError, "You must implement the #{calling_method} method"
end
end
|
# This code snippet contains some examples on the python language
# element of operator
fruits = ["watermelon", "mango", "lychee", "mango", "cherry"]
for fruit in fruits:
print(fruit)
print("Is dragon-fruit present in our fruit basket? " + str("dragon-fruit" in fruits))
# Slicing
watermelon = "Watermelon is a... |
package dp
// 91. Decode Ways
import "strconv"
func numDecodings(s string) int {
if len(s) == 0 {
return 0
}
n := len(s)
dp := make([]int, n+1)
dp[0] = 1
if s[0] == '0' {
dp[1] = 0
} else {
dp[1] = 1
}
for i := 2; i <= n; i++ {
one, _ := strconv.Atoi(s[i-1 : i])
if one != 0 {
dp[i] += dp[i-1]
... |
const autoplayBtn = document.querySelector('.play-pause-global');
function setupControls () {
setAutoplaySetting(getAutoplaySetting());
autoplayBtn.addEventListener('click', () => {
setAutoplaySetting(!getAutoplaySetting());
});
}
function getAutoplaySetting () {
let autoplay = window.localStorage.getIte... |
require 'kaiju/property'
class PropertiesController < ApplicationController
include PropertiesHelper
before_action :fetch_objects
before_action { fetch_workspace(params[:workspace_id]) }
before_action(except: [:show]) { authorize(params[:workspace_object].editors) }
# GET /projects/1/workspaces/1/components/1... |
import { QPathModel } from "./QPathModel";
export class QNoopPath implements QPathModel {
constructor(private path: string) {
if (!path || !path.trim()) {
throw Error("Path must be supplied!");
}
}
public getPath(): string {
return this.path;
}
}
|
#!/bin/bash
apt=/etc/apt
file=sources.list
apt_file=${apt}/${file}
backup=${apt_file}.backup
if [ $EUID -ne 0 ]; then
echo "$0 needs sudoer priveleges to modify ${apt_file}"
echo "please run script as super user (root)"
exit 1
fi
updateApt (){
mv $file $apt_file &&
echo "apt has been updated"
}
... |
require 'set'
require 'datamappify/data/mapper/attribute'
module Datamappify
module Data
class Mapper
# @return [Class]
attr_accessor :entity_class
# @return [String]
attr_accessor :default_provider_name
# @return [String]
attr_writer :default_source_class_name
# @ret... |
(in-package #:coalton-tests)
(deftest test-rounding ()
(is (= 0 (coalton:coalton (coalton-library:floor 0.1))))
(is (= 1 (coalton:coalton (coalton-library:ceiling 0.1))))
(is (= 0 (coalton:coalton (coalton-library:round 0.1))))
(is (= -1 (coalton:coalton (coalton-library:floor -0.1))))
(is (= 0 (coalton:c... |
import React, { useState } from 'react';
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap';
function Mynavbar (){
const [collapsed, setCollapsed] = useState(true);
function toggleNavbar() {
setCollapsed(!collapsed)
}
return (
<div>
<Navbar ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.