text stringlengths 27 775k |
|---|
# frozen_string_literal: true
require 'opal/nodes/node_with_args'
require 'opal/rewriters/break_finder'
module Opal
module Nodes
class IterNode < NodeWithArgs
handle :iter
children :args, :body
attr_accessor :block_arg, :shadow_args
def compile
inline_params = nil
extr... |
import 'package:tiled/tiled.dart';
/// {@template _simple_flips}
/// Tiled represents all flips and rotation using three possible flips:
/// horizontal, vertical and diagonal.
/// This class converts that representation to a simpler one, that uses one
/// angle (with pi/2 steps) and one flip (horizontal). All vertical... |
/*
* Copyright 2018 LINE Corporation
*
* LINE Corporation licenses this file to you 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 r... |
<?php
/* Queue Settings, Queue Names must not have whitespace, or HTML ids fail! */
$conf['queue']['budget']['cpu'] = 8;
$conf['queue']['budget']['memory'] = 24;
$conf['queue']['budget']['nodes'] = 10;
$conf['queue']['blacklight']['cpu'] = 384;
$conf['queue']['blacklight']['memory... |
package Release_VIII.A_Chapter_9.R10_Cons;
import java.util.Random;
public class Questions implements SharedCons {
Random rand = new Random();
int ask() {
int prob = (int) (100*rand.nextDouble());
if(prob<30) return NO; //30%
else if(prob<60) return YES; //30%
else if(prob<70) return MAYBE; //10%
... |
require 'benchmark'
total = (ENV['TOTAL'] || 5_000).to_i
array = Array.new(total) {|i| i}
Benchmark.bmbm do |x|
x.report 'empty' do
total.times {|i| i }
end
x.report 'String#<<(fixed)' do
str1 = "helluva"
str2 = "fool"
total.times do |i|
str1 << str2
end
end
x.report 'String#<<... |
Matthew 9
18-26) The Jewish girl and the Gentile woman
girl was 12, woman was sick for 12yr.
20) Jesus, on His way to raise the Jew, healed the Gentile
|
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "<ul>\n";
$queryString = $ENV{'QUERY_STRING'};
print "<li>$queryString</li>\n";
print "</ul>\n";
|
{-# LANGUAGE GADTSyntax #-}
module LazyMList where
data List m a where
Nil :: List m a
Cons :: a -> m (List m a) -> List m a
type MList m a = m (List m a)
nil :: Monad m => MList m a
nil = return Nil
cons :: Monad m => a -> MList m a -> MList m a
cons a = return . Cons a
mfoldr :: Monad m => (a -> m r -> m r... |
# ![remark][logo]
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
**remark** is a tool that transforms markdown wi... |
<?php
#####################
//CONFIGURATIONS
#####################
// Define the name of the backup directory
define('BACKUP_DIR', 'myBackups' ) ;
// Define Database Credentials
define('HOST', 'localhost' ) ;
define('USER', 'root' ) ;
define('PASSWORD', 'root' ) ;
define('DB_NAME', 'time' ) ;
/*
Define the f... |
<?php
namespace Xinix\BonoAuth;
class RequestWrapper
{
protected $request;
public function __construct($request)
{
$this->request = $request;
}
public function __call($method, $parameters)
{
return call_user_func_array(array($this->request, $method), $parameters);
}
... |
/*
* SimpleRelational.cpp
*
* Created on: Feb 2, 2022
* Author: biplavs
*/
#include <iostream>
#include <cstdlib>
using namespace std;
// Credit: Based on example in Chapter 14 of C++ book -
// Fundamentals of Programming by Richard L. Halterman
// Models a mathematical rational number
class SimpleRati... |
using System;
class Volleyball
{
static void Main()
{
string yearType = Console.ReadLine().ToLower();
int p = int.Parse(Console.ReadLine());
int h = int.Parse(Console.ReadLine());
double playedGames = 0;
int totalWeekends = 48;
int weekendsSofia = totalWeekends... |
/// <reference types="react" />
/**
* @private
*/
export interface StartCallButtonProps {
onClickHandler: () => void;
isDisabled: boolean;
className?: string;
/** If set, the button is intended to rejoin an existing call. */
rejoinCall?: boolean;
}
/**
* @private
*/
export declare const StartCal... |
package org.dukecon.sessionize.jsondata
import kotlinx.serialization.Serializable
@Serializable
data class Sponsor(val name: String, val groupName: String, val url: String, val icon: String,
val sponsorId: String? = null)
@Serializable
data class SponsorGroup(val groupName: String, val sponsors: L... |
package cn.tursom.storage
interface LiveTime {
fun getLiveTime(roomId: Int): Long
fun roomOnLive(roomId: Int)
} |
$(function () {
$(document).ready(function () {
$('.hamburger-fix-menu').click(function () {
$('.box-right-line').toggleClass('z-index-style');
$(this).toggleClass('is-active');
$('.footer_box_fixed').fadeToggle(300);
$('.box-right-line a:not(:first-child)').fadeToggle(0);
$('.box... |
package io.gitlab.arturbosch.detekt.cli.runners
import io.gitlab.arturbosch.detekt.cli.ClasspathResourceConverter
import io.gitlab.arturbosch.detekt.cli.CliArgs
import io.gitlab.arturbosch.detekt.cli.DEFAULT_CONFIG
import java.io.File
class ConfigExporter(private val arguments: CliArgs) : Executable {
override f... |
namespace InteriorDesign.Web.Controllers
{
using System.Security.Claims;
using System.Threading.Tasks;
using InteriorDesign.Data.Models;
using InteriorDesign.Models.InputModels;
using InteriorDesign.Services.Contracts;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Id... |
import 'package:equatable/equatable.dart';
abstract class ListPageState extends Equatable {
const ListPageState();
}
class Uninitialized extends ListPageState {
@override
List<Object> get props => null;
@override
String toString() => '[State] ListPageState: Uninitialized';
}
class Saving extends ListPageS... |
/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
#include <realm.hpp>
#include "error_handling.hpp"
#include "marshalling.hpp"
#include "realm_export_decls.hpp"
using namespace realm;
using namespace realm::binding;
extern "C" {
REALM_EXPORT void row_destroy(Row* row_ptr)
{
... |
# coding=utf8
import json
import traceback
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from django.contrib.auth.models import User as Auth_User
from lib import utils
from config import errors
ROLE2NAME = {
1: '超管',
0: '一般管'
}
STATUS2NAME ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace InterestRateCalc.Api.Core.Dtos
{
public class InputObjectDto
{
public decimal CreditAmount { get; set; }
public int Term { get; set; }
public decimal ExistingCredit { get; set; }
... |
fn bool_to_f64(b: &bool) -> f64 {
if *b {
1.0
} else {
0.0
}
}
pub struct Neuron {
threshold: f64,
learning_rate: f64,
weights: Vec<f64>,
}
impl Neuron {
pub fn new(num_inputs: u32) -> Neuron {
Neuron {
threshold: 0.9,
learning_rate: 0.01,
... |
# frozen_string_literal: true
module Fumifumi
module Magazine
class Import
def initialize(magazine)
@magazine = magazine
end
def call
update_magazine do |magazine|
magazine.update! series: series
magazine.import!(book)
end
end
private
... |
package com.anqit.spanqit.graphpattern;
import com.anqit.spanqit.core.QueryElementCollection;
/**
* A SPARQL Alternative Graph Pattern.
*
* @see <a
* href="http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#alternatives">
* SPARQL Alternative Graph Patterns</a>
*/
class AlternativeGrap... |
using System;
using System.Security.Cryptography;
using System.Text;
namespace Hawk.Core.Utils
{
public class CMDHelper
{
public static string GetMD5Value(string password)
{
using (var md5 = new MD5CryptoServiceProvider())
{
... |
using System;
using System.Device.Gpio;
using System.Device.I2c;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Iot.Device.CharacterLcd;
using Iot.Device.Pcx857x;
using Iot.Device.Subscriptions.Abstractions;
using Microsoft.Extensions.Configuration;
namespace Iot.Device.Subscr... |
<?php
use yii\helpers\Html;
use frontend\models\BlogPost;
use frontend\models\BlogPostComments;
use common\models\User;
?>
<div class="comment">
<hgroup>
<h5><?=$model['username']?></h5>
<h6><?=$model['created_at']?></h6>
</hgroup>
<section>
<?php if($model['image']){?><img src="<?=$model['image... |
<?php
namespace App\Jobs\Install;
use App\Abstracts\Job;
use App\Utilities\Console;
class EnableModule extends Job
{
protected $alias;
protected $company_id;
protected $locale;
/**
* Create a new job instance.
*
* @param $alias
* @param $company_id
* @param $locale
... |
#!/bin/bash
function get_oss_count()
{
local mount=${1-/beegfs}
echo $(beegfs-ctl --listnodes --nodetype=storage --mount=$mount | wc -l)
}
function get_mdt_count()
{
local mount=${1-/beegfs}
echo $(beegfs-ctl --listnodes --nodetype=metadata --mount=$mount | wc -l)
}
|
---
title: Commission member Ralph Fossey who
tags:
- Mar 1960
---
Commission member Ralph Fossey, who owns property on Elliott Key, rejects the sale delay of submerged bay land.
Newspapers: **Miami Morning News or The Miami Herald**
Page: **10**, Section: **A**
|
#
# Project:: Ansible Role - JumpCloud
#
# Copyright 2020, Route 1337, LLC, All Rights Reserved.
#
# Maintainers:
# - Matthew Ahrenstein: matthew@route1337.com
#
# See LICENSE
#
# Prereqs tests
if ['ubuntu', 'centos'].include?(os[:name])
# Verify the /opt/jc directory exists
describe file('/opt/jc') do
it { ... |
pub use logos::Span;
pub struct Error {
pub message: String,
pub location: Option<Span>,
}
impl Error {
pub fn new(message: String, location: Option<Span>) -> Error {
Error { message, location }
}
}
|
<?php
namespace common\tests\unit;
use common\helpers\DateTimeHelper;
use DateTime;
class DateTimeMonthIntervalTest extends Unit {
public const FORMAT = 'Y-m-d';
public function testFebrurary(): void {
$this->tester->assertSame(
'2019-02-28',
DateTimeHelper::getSameDayNextMonth(new DateTime('2019-01-31')... |
package me.zouzhipeng;
public interface CaptchaGenerator {
/**
* Generator captcha images automaticlly to destination.
* @param folder the folder path to output
* @return Successful or failed after created.
*/
@Deprecated
public boolean generate(String folder);
/**
* Generator captcha images... |
using System;
namespace pipe
{
public class RealEnvironmentVariableProvider : IEnvironmentVariableProvider
{
public string Get(string name)
{
return Environment.GetEnvironmentVariable(name);
}
}
} |
using System.Collections.Generic;
namespace Benchmarking
{
public class ChartData
{
public string CurveLabel;
public string YAxisLabel;
public IList<ExperimentResult> Results;
}
} |
using Autofac;
using Autofac.Integration.WebApi;
using PingYourPackage.API.Model.Dtos;
using PingYourPackage.Domain.Entities;
using PingYourPackage.Domain.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using... |
namespace MeetingCaptureWebApp.Models
{
public class TaskViewModel
{
public string Title { get; set; }
public string DueDate { get; set; }
public string AssignedTo { get; set; }
public bool Completed { get; set; }
}
}
|
Pull intel from curated feeds online, parse the results and put them into the mysql database..
To setup the db, run
'docker-compose up -d'
Schema is auto loaded into DB itip.
itip user is created with '#itip2017' as the default password, change this for production obviously.
|
import React, { useEffect, useState } from 'react';
import reducerRegistry from '@onaio/redux-reducer-registry';
import { Col, Row, Spin } from 'antd';
import { RouteComponentProps } from 'react-router';
import { Store } from 'redux';
import { connect } from 'react-redux';
import { KeycloakService } from '@opensrp/keyc... |
# theroasties
A website listing the best pubs in London to get a roast dinner, sub-divided by the four cardinal directions.
|
namespace UnleashedDDD.Sales.Domain.Model.Customers.State
{
public class CustomerState
{
}
}
|
<?php
/**
* Dispatcher tests
*/
class DispatcherTest extends PHPUnit_Framework_TestCase
{
private $object;
function setUp()
{
parent::setUp();
$this->object = new Dispatcher(new View());
$this->object->setBootstrap(new Bootstrap());
$this->object->setEventManager(new Eve... |
object DM: TDM
OldCreateOrder = False
OnCreate = DataModuleCreate
OnDestroy = DataModuleDestroy
Left = 297
Top = 203
Height = 228
Width = 270
object lstImage: TImageList
Left = 24
Top = 24
Bitmap = {
494C010107000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
000000000000360... |
//
// Created by Vetle Wegner Ingeberg on 22/04/2021.
//
#ifndef AFRODITE_SLOT_HH
#define AFRODITE_SLOT_HH
#include <Detectors/DetectorFactory.hh>
class Slot {
private:
int detector_number;
Detector::DetectorFactory *factory;
public:
// Construction of a slot is done by giving it a detector type and ... |
package loci
package transmitter
import scala.language.experimental.macros
import scala.reflect.macros.whitebox
object DummyImplicit {
class Resolvable private[DummyImplicit]
object Resolvable {
implicit def dummy: Resolvable = new Resolvable
implicit def noDummy: Resolvable = macro NoDummyImplicit.skip
... |
import {loadScript} from './react-loader';
import './index.css';
(async function foo() {
await loadScript('https://unpkg.com/react@15.6.1/dist/react.js');
await loadScript('https://unpkg.com/react-dom@15.6.1/dist/react-dom.js');
await loadScript(
'https://unpkg.com/react-dom@15.6.1/dist/react-dom-server.js'
... |
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
plugins {
id("otel.java-conventions")
}
dependencies {
implementation("org.apache.groovy:groovy")
}
|
import styled from "styled-components"
import BuildButton from "./BuildButton"
import {
AnimDuration,
Color,
mixinResetButtonStyle,
overviewItemBorderRadius,
SizeUnit,
} from "./style-helpers"
export const SidebarBuildButton = styled(BuildButton)`
${mixinResetButtonStyle};
width: ${SizeUnit(1)};
height... |
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed.'); }
class CKEditorConfig {
protected static $config = array();
final private function __construct() {}
final private function __clone() {}
public static function get($editor_config_key = null, $editor_toolbar_key = null) {
... |
class Task < ActiveRecord::Base
belongs_to :project
has_many :comments, dependent: :destroy
acts_as_list scope: :project, top_of_list: 0, add_new_at: :top
validates :name, presence: true, length: { maximum: 250 }
end
|
#!/bin/bash
uglifyjs about.js -m -o about.js
uglifyjs footer.js -m -o footer.js
uglifyjs home.js -m -o home.js
uglifyjs index.js -m -o index.js
uglifyjs islogin_admin.js -m -o islogin_admin.js
uglifyjs islogin_blog.js -m -o islogin_blog.js
uglifyjs islogin_editor.js -m -o islogin_editor.js
uglifyjs islogin_home.js -m -... |
# List actions.
get '/fieldforce/:consumer' do |consumer|
erb :field_force, locals: { consumer: consumer }
end
get '/fieldforce/byId/:fieldworkerid' do |fieldworkerid|
erb :field_worker, locals: { fieldworkerid: fieldworkerid }
end
# search example
get '/fieldforce/surname/:surname' do |surname|
erb :field_sear... |
# Analysis of ecological distances in R
Part of Pat's Code Club series that started 2021-12-06
|
#!/bin/sh
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
STATUS=$(sudo systemctl status amazon-ssm-agent)
if echo $STATUS | grep -q "running"; then
echo "Install succeeded"
else
echo "Install failed" >&2
fi |
import { createBaseEntity } from '../lib';
export interface TokenKey {
token: string;
}
export interface TokenProps extends TokenKey {
userId: string;
}
const BaseEntity = createBaseEntity('Token')
.props<TokenProps>()
.key<TokenKey>(key => `TOKEN:${key.token}`)
.build();
export class TokenEntity extends ... |
# frozen_string_literal: true
# == Schema Information
#
# Table name: languages
#
# id :integer not null, primary key
# abbreviation :string(255)
# default_language :boolean
# description :string(255)
# name :string(255)
#
FactoryBot.define do
factory :language do
... |
#!/bin/bash
source ../spec.sh
source ./module_spec.sh
countbrokenmansymlinks()
{
LINKCOUNT="0"
BROKENCOUNT="0"
for SYMLINK in `find ${BDIR}/fsman/ -type l`; do
LINKCOUNT=$(( LINKCOUNT + 1 ))
if [ ! -e "${SYMLINK}" ]; then
if [ "$1" == "PRINT" ]; then echo "BROKEN: ${SYMLINK}"; fi
BROKENCOUNT=$(( BROKENCO... |
# render basic data as a link
# Used in UMM-S for URL::URLValue
# :nodoc:
class UmmPreviewLink < UmmPreviewElement
def render
title = 'Use Service API' if schema_type == 'service' && full_key == 'URL/URLValue'
valid_url = validate_link_url(element_value)
if valid_url
link_to element_value, element... |
/*
* Copyright (c) 2010 Sony Pictures Imageworks Inc.
*
* 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, thi... |
#!/bin/sh
sed -n '10p' file.txt
# Alternative
# awk 'NR==10' file.txt
|
package co.theasi.plotly
case class Axis(
options: AxisOptions
)
object Axis {
def apply(): Axis = Axis(AxisOptions())
}
|
<?php
namespace app;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Borrows extends Model
{
public function borrowers()
{
return $this->hasOne('\App\Borrowers', 'id','borrower_id');
}
public function book()
{
return $this->hasOne('\App\Books', 'id', 'book_id');
... |
# frozen_string_literal: true
require 'test_helper'
describe 'data' do
around { |test| VCR.use_cassette('Parts', &test) }
subject { WikiData::Fetcher.new(id: 'Q312894').data }
it 'should know its ID' do
subject[:id].must_equal 'Q312894'
end
it 'should know the name' do
subject[:name].must_equal 'J... |
;
; Bondwell 2 graphics routines
;
; Stefano Bodrato 2021
;
SECTION code_graphics
PUBLIC cleargraphics
PUBLIC _cleargraphics
PUBLIC clg
PUBLIC _clg
EXTERN generic_console_cls
defc clg = _clg
defc _clg = cleargraphics
defc cleargraphics = _cleargraphics
defc _cleargraphics = generic... |
namespace Gma.QrCodeNet.Encoding.DataEncodation
{
public abstract class EncoderBase
{
internal EncoderBase()
{
}
protected virtual int GetDataLength(string content) => content.Length;
/// <summary>
/// Returns the bit representation of input data.
/// </summary>
/// <param name="content"></param>
... |
require 'app_helper'
describe 'offender contact list method' do
let(:url){ "offenders/#{offender_id}/visits/contact_list" }
let(:offender_id){ ENV['NOMIS_API_OFFENDER_ID'] }
let(:params){ {} }
# Bomb out if no offender_id is given - we need to know a valid
# identifier for lots of methods, and there is no w... |
package lai.ast;
public class LaiStatementSetVar extends LaiStatement {
public LaiVariable var;
public LaiExpression exp;
public LaiStatementSetVar(LaiVariable var, LaiExpression exp) {
this.var = var;
this.exp = exp;
this.node_children.add(var);
this.node_children.add(exp);
}
@Override... |
---
path: react-custom-hooks-for-later-use
date: 2021-04-02T11:06:05.698Z
title: React custom hooks for later use
description: A place to keep all my custom hooks
---

# Table
* [useScroll](#useScroll)
* [useWindowSize](#useWindowSize)
* [useScreen](#useScreen)
* [useStateWithSessionStorage](#... |
import PyPlot: subplots
type VStyle
fill::Union{RGB, Void}
function VStyle(;fill=nothing)
new(fill)
end
end
style2mplkw(s::VStyle) = Dict(:fill => s.fill)
##Note: Mathematica and Matplotlib don't have nested scopes for the viewports, you can lay
## them over each other, but not inside one another.... |
# frozen_string_literal: true
module GraphQL
module Client
module Query
class MutationDocument
def self.new(schema, name = nil)
document = Document.new(schema)
mutation = document.add_mutation(name)
if block_given?
yield mutation
end
m... |
#!/bin/bash
# removes a layer which just has baddies
SEARCH_STRING="collision_mask = 5"
function remove_collision_mask {
for file in $(ls $dir)
do
if [[ "$file" == *tscn ]]; then
echo "removing collision mask for ::: '$file' ";
sed -i '' 's/collision_mask = 5//g' $file
... |
'use strict';
const asyncTag = (m => /* c8 ignore start */ m.__esModule ? m.default : m /* c8 ignore stop */)(require('async-tag'));
const {render: $render, html: $html, svg: $svg} = require('./index.js');
const tag = original => {
const tag = asyncTag(original);
tag.node = tag;
tag.for = () => tag;
return ta... |
export 'forms/form_input_field_with_icon.dart';
export 'forms/form_input_field.dart';
export 'forms/form_vertical_spacing.dart';
export 'widgets/primary_button.dart';
export 'widgets/line_button.dart';
export 'widgets/logo_graphic_header.dart';
export 'widgets/dropdown_picker.dart';
export 'widgets/dropdown_picker_with... |
package dk.alexandra.fresco.tools.bitTriples;
import dk.alexandra.fresco.tools.bitTriples.elements.MultiplicationTriple;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import org.junit.Assert;
import org.junit.Test;
public class BitTripleTest extends NetworkedTest{
priv... |
module FullCircle
class API
attr_reader :connection
def initialize(connection, response_parser: ResponseParser.new, results_per_page: 20)
@connection=connection
@response_parser = response_parser
@results_per_page = results_per_page
end
def fetch_events_for_ad(id,params={})
... |
! { dg-do run }
! PR41192 NAMELIST input with just a comment ("&NAME ! comment \") error
program cmdline
! comment by itself causes error in gfortran
call process(' ')
call process('i=10 , j=20 k=30 ! change all three values')
call process(' ')
call process('! change no values')! before patch this failed.
... |
(ns lucid.distribute.util.sort)
(defn all-branch-nodes
"returns all nodes in the branche
(all-branch-nodes MANIFEST)
=> ({:coordinate [blah/blah.common \"0.1.0-SNAPSHOT\"],
:dependencies [[org.clojure/clojure \"1.6.0\"]],
:id \"common\"}
...
{:coordinate [blah/blah.reso... |
import argparse
import logging
import sys
from typing import List
from lxml import etree
from lxml import html # type: ignore
import pyperclip # type: ignore
import requests
from .exceptions import DownloadError, NoFileExistsError
from .query import DblpQuery
def download(url: str, logger: logging.Logger) -> str:... |
use bevy::prelude::*;
use bevy_inspector_egui::Inspectable;
const MAX_ANGULAR_VELOCITY: f32 = 30.0;
#[derive(Component, Inspectable)]
pub struct Body {
pub linear_velocity: Vec3,
pub angular_velocity: Vec3,
#[inspectable(min = 0.0, max = 1.0)]
pub elasticity: f32,
pub friction: f32,
pub mass... |
// +build linux
package main
import (
"fmt"
"log"
"os"
"github.com/google/gopacket/pcap"
)
func (p *packiffer) setInterfaceFriendlyName() {
}
func displayFriendlyInterfaceName() {
devices, err := pcap.FindAllDevs()
if err != nil {
log.Fatal(err)
}
displayDevices(devices)
os.Exit(0)
}
func displayDevic... |
package no.nav.syfo.sykmelding.model
data class SykmeldingIdAndFnr(
val sykmeldingId: String,
val fnr: String
)
|
type RunRef<R> = {
readonly errors: unknown[];
readonly result: R;
};
function* $run<T, R, U>(iter: Iterator<T, R, U>, ref: any) {
do {
try {
const n = iter.next();
// This sucks?? Why does it need to have === true??
if (n.done === true) {
ref.result = n.value;
return;
}
yield n.value;
... |
///
/// venosyd © 2016-2021
///
/// sergio lisan <sels@venosyd.com>
///
library opensyd.logs.dialogs.escopos;
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:opensyd_flutter/opensyd_flutter.dart';
import 'package:opensyd_providers/opensyd_provide... |
#!/bin/sh
windres ./src/versuse-resource.rc -O coff -o ./src/versuse-resource.res
g++ -c -Wall ./src/versuse-main.cpp -o ./src/versuse-main.o
g++ -static -o ./bin/Versuse3.exe ./src/versuse-main.o ./src/versuse-resource.res -mwindows
|
/*
* Copyright (c) 2015-2020, Virgil Security, Inc.
*
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* (1) R... |
using System;
using System.Collections.Generic;
using System.Text;
namespace Mvp.Feature.BasicContent.Models
{
public class HalfWidthBanner : CtaContent
{
}
}
|
module AssertJson
def assert_json(json_string, &block)
if block_given?
@json = AssertJson::Json.new(json_string)
# json.instance_exec(json, &block)
yield @json
end
end
def item(index, &block)
@json.item(index, &block)
end
def has(*args, &block)
@json.has(*args, &block)
e... |
namespace System
{
public static class Int32Extension
{
public static unsafe int Reverse(this int value)
{
return ((value >> 24) & 0xFF) | (value << 24) | ((value >> 8) & 0xFF00) | ((value & 0xFF00) << 8);
}
public static int Align(this int value, int align)
... |
import codecs
import numpy as np
from sklearn.metrics import precision_recall_fscore_support, accuracy_score, classification_report
from sklearn.model_selection import KFold
from scipy import stats
from sklearn.svm import SVC
from . import classifiers, retriever, timeseries
def _split(data):
ret = []
for i... |
#include "ItemFPPProperties.hpp"
#include "engine/app3D/defs/ModelDef.hpp"
#include "../../Global.hpp"
#include "../../Core.hpp"
#include "engine/util/DefDatabase.hpp"
#include "../AnimationFramesSetDef.hpp"
namespace app
{
void ItemFPPProperties::expose(engine::DataFile::Node &node)
{
TRACK;
node.var(m_mod... |
// module.exports 默认是一空对象,和exports 是相等的
'use strict';
// 引入数据库操作db对象
const db = require('../models/db');
//解析文件上传
const formidable = require('formidable');
//引入path核心对象
const path = require('path');
//引入配置对象
const config = require('../config');
/**
* [添加音乐]
* @param {[type]} req [description]
* @param {[type]... |
// Copyright 2021 VMware
//
// 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 writi... |
INSERT INTO baseline_rr (
map_unit_id,
map_unit_name,
indirect_benefits,
base_contribution,
rr_rating,
wildfire_rating,
wildfire_contribution,
total_reserve,
mz3,
mz4,
mz5,
breed_baseline,
summer_baseline,
winter_baseline)
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ... |
using System;
namespace ServiceFabric.BackupRestore.Web.Models
{
public class BackupEnabledServiceReference
{
public Uri ApplicationName { get; set; }
public Uri ServiceName { get; set; }
public Guid Int64RangePartitionGuid { get; set; }
public Uri Endpoint { get; set; }
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MCR.views
{
public partial class ServerSettingDialog : Form
{
private NetState... |
package sqlite
import (
"github.com/go-jet/jet/v2/internal/jet"
)
type onConflict interface {
WHERE(indexPredicate BoolExpression) conflictTarget
conflictTarget
}
type conflictTarget interface {
DO_NOTHING() InsertStatement
DO_UPDATE(action conflictAction) InsertStatement
}
type onConflictClause struct {
inse... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.