content stringlengths 10 4.9M |
|---|
/**
* Test that an item is disabled if the user does not have the correct role (the
* "destination" in the menu has to match a view name in a view annotated
* with @Route)
*/
@Test
public void testDisableItem() {
MenuBar bar = menuService.constructMenu("ocs.menu");
MenuItem first... |
<gh_stars>0
import sys
import time
from decimal import Decimal
from netsuit.dpkt import dpkt
from netsuit.utils.compat import intround
# pcap file header magic
TCPDUMP_MAGIC = 0xa1b2c3d4
TCPDUMP_MAGIC_NANO = 0xa1b23c4d
PMUDPCT_MAGIC = 0xd4c3b2a1
PMUDPCT_MAGIC_NANO = 0x4d3cb2a1
PCAP_VERSION_MAJOR = 2
PCAP_VERSION_MI... |
<filename>apps/demo/src/highlight/Highlighter.tsx
import React, {
createContext,
PropsWithChildren,
useContext,
useMemo
} from 'react';
import { highlight } from 'lowlight';
import {
StyleProp,
Text,
TextStyle,
View,
ViewProps,
StyleSheet
} from 'react-native';
import StylesheetsProvider, { Highligh... |
/********************************************************************
* Copyright (C) 2013-2014 Texas Instruments Incorporated.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of so... |
import java.util.Scanner;
public class Guess {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
int h = s.nextInt();
long n = s.nextLong();
long start = 1, end = (long) Math.pow(2, h);
long left = end / 2, right = left + 1;
long curr = h;
char move = 'L';
... |
Fabrication of novel dental nanocomposites and investigation their physicochemical and biological properties
This article evaluates physicochemical, mechanical, and biological properties of a series of novel dental nanocomposites that fabricated from multifunctional methacrylate-based dental monomers, triethyleneglyco... |
/*
The MIT License (MIT)
Copyright (c) 2014 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... |
Women and ICT: A Study on Access and Perceptions in North India
The potential of information and communication technology (ICT) as a tool to reduce gender inequality and strengthen the position of women in a society is increasingly recognized. However, a significant gender digital divide is also observed, which is ref... |
The 2018 Kia Niro Plug-in Hybrid was introduced Thursday at the 2017 Los Angeles Auto Show , adding a considerably larger battery pack to the existing Niro Hybrid crossover With an estimated 26 miles of all-electric range, the Niro Plug-in is in the same ballpark as most other plug-in hybrid models like the Toyota Priu... |
package org.mockito.junit;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.mockito.internal.rules.JUnitRule;
import static org.mockito.internal.util.Checks.checkNotNull;
/**
* The MockitoJUnitRule Rule can be used instead of {@link org.mocki... |
-- | This was the very first game. Simple labyrinth in full view
-- to navigate a snake to the bottom.
import qualified Tools as T
import qualified LocalSettings as Settings
data MazePosition = MazeOff
| MazeAt Int Int
| MazeSolved
-- | Character to use for the snake. A constant.
s... |
import java.util.Scanner;
public class Taxisec {
static int cars=0;
static int ones=0;
static int twos=0;
static int threes=0;
public static void main(String [] args){
Scanner sc = new Scanner(System.in);
taxi(sc);
count();
sc.close();
}
private static void taxi(Scanner sc){
int groups = sc.nextInt();... |
package pulapula;
import java.util.LinkedList;
public class Trampoline{
private LinkedList<Kid> waiting;
private LinkedList<Kid> playing;
public Trampoline(){
waiting = new LinkedList<>();
playing = new LinkedList<>();
}
public String toString(){
return "=> " + this.inver... |
<filename>util/test/rdtest/shared/Texture_Zoo.py
import renderdoc as rd
import rdtest
from typing import List, Tuple
import time
import os
# Not a real test, re-used by API-specific tests
class Texture_Zoo():
def __init__(self):
self.proxied = False
self.fake_msaa = False
self.textures = {... |
Gendered Priorities? Policy Communication in the U.S. Senate
Abstract Women running for Congress make different choices than men about how to connect with constituents on social media, but few studies investigate how these variable strategies shape in-office messaging, particularly those of U.S. senators. This article... |
VANCOUVER -- Given all the drama surrounding the Vancouver Canucks' goaltending situation this season, it’s not surprising there has been another twist heading into the Stanley Cup Playoffs.
The Canucks announced Thursday that Cory Schneider is day-to-day with an undisclosed injury, meaning Roberto Luongo could return... |
package com.veinhorn.scrollgalleryview.loader;
import android.content.Context;
import android.widget.ImageView;
/**
* MediaLoader is used for loading medias from different sources such as url, file system, etc.
*/
public interface MediaLoader {
/**
* @return true if implementation load's image, otherwise ... |
/**
* Created by Administrador on 9/4/2015.
*/
public class WS_Futbalon
{
String result = "";
private int MY_SOCKET_TIMEOUT_MS = 5000;
private static WsTestActivity sInstance;
private RequestQueue mRequestQueue;
public String Request(Activity activity, String WsURL)
{
try
{
... |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Main
( main,
)
where
import Data.Proxy (Proxy (Proxy))
import qualified Data.Text as T
import qualified Data.Text.Lazy
import qualified Data.Text.Lazy.Encoding
import qualified Examples.MultipleEndpoints
import qualifi... |
def add_natgw(self, idx: int, nat_eips: Ref = None):
if nat_eips:
eip = Select(idx, nat_eips)
else:
self.nat_eip = self.t.add_resource(EIP(
f'NatEip{self.idx}',
Domain='vpc',
))
eip = GetAtt(self.nat_eip, 'AllocationId')
... |
def save_hyp_graph(self, filename, word_idict_trg, detailed=True, highlight_best=True):
if self.hyp_graph:
renderer = HypGraphRenderer(self.hyp_graph)
renderer.wordify(word_idict_trg)
renderer.save(filename, detailed, highlight_best)
else:
pass |
n, k = map(int, input().split())
mod = 10 ** 9 + 7
ans = 0
begin = 0
end = 0
a = 0
b = n
for i in range(k):
begin += a
end += b
a += 1
b -= 1
ans += end - begin + 1
for i in range(k + 1, n + 2):
begin += a
end += b
a += 1
b -= 1
ans += end - begin + 1
if k == n + 1:
ans = 1
... |
/**
* \brief Borrow the SDL_Renderer pointer managed by the PyCSDL2_Renderer.
*
* \param obj The PyCSDL2_Renderer object
* \param[out] out Output pointer.
* \returns 1 on success, 0 with an exception set on failure.
*/
static int
PyCSDL2_RendererPtr(PyObject *obj, SDL_Renderer **out)
{
PyCSDL2_Renderer *self ... |
/**
* Helper class for {@link SqliteJobQueue} to generate sql queries and statements.
*/
public class SqlHelper {
/**
* package
**/
String FIND_BY_ID_QUERY;
/**
* package
**/
String FIND_BY_TAG_QUERY;
/**
* package
**/
String FIND_BY_DEPENDEE_TAG_QUERY;
/**
... |
NMR and molecular mechanics studies on the solution‐state conformation of (−)‐scopolamine free base
The NMR parameters of (−)‐scopolamine free base in CDCl3 determined by Sarazin et al. were used to reevaluate some of the stereochemical conclusions recently reported by the authors. Similarly to the case with the proto... |
a=int(raw_input())
l=map(int,raw_input().strip().split())
l1=[[] for i in range(a+1)]
p=1
for j in range(a+1):
for k in range(p,l[j]+p):
l1[j].append(k)
p=l[j]+p
m=1
for k in range(a+1):
if l[k]!=1 and m!=3:
m=3
elif l[k]!=1:
m=2
break
else:
m=... |
/**
* Non-blocking method that attempts to acquire the read lock. Returns true
* if successful.
* Checks conditions (whether it can acquire the read lock), and if they are true,
* updates readers info.
*
* Note that if conditions are false (can not acquire the read lock at the moment), thi... |
533 SHARES Share Tweet
If the economy is doing just fine, then why is homelessness at levels not seen “since the Great Depression” in major cities all over the country? If the U.S. economy was actually in good shape, we would expect that the number of people that are homeless would be going down or at least stabilizin... |
import { ToolbarItemFactory } from "./providers/toolbar/toolbarItemFactory";
import { ToolbarItemType } from "./react/components/toolbar/toolbarItem";
import { strings } from "./common/strings";
export enum ToolbarItemName {
SelectCanvas = "selectCanvas",
DrawRectangle = "drawRectangle",
PreviousAsset = "n... |
<filename>src/worker/error.rs
use crate::index::TextIndexError;
use postgres::Error as PostgresError;
use serde_yaml::Error as YamlError;
use std::error::Error;
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result as FmtResult;
use std::io::Error as IoError;
pub type WorkerResult<T> = Result<T, WorkerE... |
line = input()
lenth = len(line)
count = 0
for i in range(lenth):
if line[i] == line.upper()[i]:
count += 1
print([line.lower(),line.upper()][count > lenth // 2])
|
s = input()
vowels = ['a', 'e', 'i', 'o', 'u']
cnt = 0
for c in s:
if c.isalpha():
if c in vowels:
cnt += 1
elif c.isdigit():
d = int(c)
if d%2 != 0:
cnt += 1
print(cnt)
|
.
OBJECTIVE
To evaluate the independent and joint effects of FADS1 polymorphism and fish oil intake on oral squamous cell carcinoma( OSCC).
METHODS
A case-control study was conducted with 259 newly diagnosed primary OSCC patients and538 controls frequency-matched by sex and age in Fujian from September 2010 to Septe... |
// Decompose a type into its component spaces.
static void decompose(TypeChecker &TC, const DeclContext *DC, Type tp,
SmallVectorImpl<Space> &arr) {
assert(canDecompose(tp, DC) && "Non-decomposable type?");
if (tp->isBool()) {
arr.push_back(Space::forBool(true));
... |
/*
* It's a special case: depth 0 represent the page with the include-all directive. We let the user
* decide if he want to render it (default: yes). Additionally we handle the case where maxDepth
* is 0, we should transfer the IncludeAllPage object under the page that have the include-all
* directive.
*... |
import { exec } from 'child_process'
import Command from "../classes/Command";
export default new Command({
commandName:"kill",
subCommandGroup:"bot",
staffOnly:true,
async execute(interaction){
await interaction.reply({
content:`Killing bot...`
})
process.exit()
... |
def tuple_by_pairs(self):
return Sublist((self[i], self[i+1]) for i in range(len(self) - 1)) |
<gh_stars>0
// Copyright 2020 The Kubermatic Kubernetes Platform contributors.
//
// 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
//
// U... |
{-# LANGUAGE FlexibleContexts #-}
module Effects.SocketContext (
SocketContext(..),
SocketContextError(..)
) where
import qualified Control.Monad.Except as MTL
import qualified Data.ByteString.Lazy as B
import Data.Int
data SocketContextError = SocketClosed deriving (Eq, Show)
class MTL.MonadError SocketCon... |
BIRMINGHAM, Alabama -- Trader Joe's will open its first Alabama store in Birmingham in 2015.
The Birmingham store will be at The Summit Shopping Center. The store will be approximately 12,600 square feet in size.
The company today said the store will open in the second half of next year.
In 2013, AL.com readers said... |
An empirical backbone-backbone hydrogen-bonding potential in proteins and its applications to NMR structure refinement and validation.
A new multidimensional potential is described that encodes for the relative spatial arrangement of the peptidyl backbone units as observed within a large database of high-resolution X-... |
def pvdc_add_storage_profile(self,
pvdc_name,
storage_profile_names):
provider_vdc, pvdc_ext_href, pvdc_ext_resource = self.get_pvdc(
pvdc_name)
avail_storage_profiles = self.client.get_linked_resource(
resource=pv... |
class BuildInfo:
"""
Common set of methods with access to database connection to acquire
key information from the build database
"""
def __init__(self, db_conn):
"""Set up access for database connection"""
self.db = db_conn
def query_documents(self, doctype, where_clause=None,... |
// CountryCode_Values returns all elements of the CountryCode enum
func CountryCode_Values() []string {
return []string{
CountryCodeAf,
CountryCodeAx,
CountryCodeAl,
CountryCodeDz,
CountryCodeAs,
CountryCodeAd,
CountryCodeAo,
CountryCodeAi,
CountryCodeAq,
CountryCodeAg,
CountryCodeAr,
CountryCo... |
<reponame>MSNLAB/SmartEye
import os
import sys
import torch
from loguru import logger
from config.model_info import model_lib
from torchvision.models import *
from torchvision.models.detection import *
def load_models(model_list):
loaded_model = {}
weight_folder = os.path.join(os.path.dirname(__file__), "../c... |
/*
* getname.c
*
* <NAME> 09/28/88
*
*/
#include "copyright2.h"
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/file.h>
#include <sys/time.h>
#include <errno.h>
#include <pwd.h>
#include <string.h>
#include <ctype.h>
#includ... |
<gh_stars>1-10
from .ElementaryFluxModes import calculate_elementary_modes
from .ElementaryFluxVectors import calculate_elementary_vectors
from .MinimalCutSets import calculate_minimum_cut_sets
from .EFMtools import *
|
<filename>revolsys-core/src/main/java/com/revolsys/io/map/FunctionMapObjectFactory.java<gh_stars>0
package com.revolsys.io.map;
import java.util.function.Function;
import com.revolsys.collection.map.MapEx;
public class FunctionMapObjectFactory extends AbstractMapObjectFactory {
private final Function<MapEx, Object... |
given_card = input()
cards_at_hand = list(input().split(' '))
out = 'NO'
for i in cards_at_hand:
if given_card[0] == i[0] or given_card[1] == i[1]:
out = 'YES'
break
print(out)
|
Author's note: I'll try to resist any ear puns in this article.
It's been 17 years since Mike Tyson tried to bite Evander Holyfield's ear off in the third round of their second fight at the MGM in Vegas. On August 9th, Tyson will merely bend Holyfield's ear (SORRY couldn't resist) when he gives the presentation speech... |
/**
* Search the book by its publisher
* @param publisher the publisher of the book
* @return a list of books, sorted by book SN
* @throws java.lang.Exception Exception thrown
*/
public List<Book> searchBookByPublisher(String publisher) throws Exception {
ArrayList<Book> books = new Arr... |
def find_samples(path, sample=None, pattern=re_sample, depth=1, **kw):
def sample_name_filter(f):
return re.search(pattern, f) != None
plist = []
if sample:
if os.path.exists(sample):
with open(sample) as fh:
samplelist = fh.readlines()
plist = [os.pat... |
// SetDetectedApps sets the detectedApps property value. The list of detected apps associated with a device.
func (m *DeviceManagement) SetDetectedApps(value []DetectedAppable)() {
if m != nil {
m.detectedApps = value
}
} |
/**
* Request to update a compute resource
*
* REF IFA 005 v2.3.1 - sect. 7.3.1.4
*
* @author nextworks
*
*/
public class UpdateComputeRequest implements InterfaceMessage {
private String computeId;
private List<VirtualNetworkInterfaceData> networkInterfaceNew = new ArrayList<>();
private List<VirtualNetwo... |
<gh_stars>1-10
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package com.ebay.trading.api;
import java.io.Serializable;
import com.leansoft.nano.annotation.*;
import java.util.List;
import java.util.Date;
/**
*
* Type defining the <b>UserAgreementInfo</b> container, which consists of de... |
Pride and purpose as antidotes to black homicidal violence.
The incidence of black male homicide is a major public menace. The lowest incidence of black male homicide was when the black power movement was visible and flourishing. Psychohistorical data support the contention that racial pride is an effective means for ... |
def auto_add_recovery_codes(self, user, force=False):
has_authenticators = False
if not force:
for authenticator in Authenticator.objects.filter(
user=user, type__in=[a.type for a in available_authenticators()]
):
iface = authenticator.interface
... |
#include "char_map.h"
BEGIN_HSPS_NAMESPACE
const char lowercase[char_map::_CHAR_COUNT] =
{(char)0x00,(char)0x01,(char)0x02,(char)0x03,(char)0x04,
(char)0x05,(char)0x06,(char)0x07,(char)0x08,(char)0x09,
(char)0x0A,(char)0x0B,(char)0x0C,(char)0x0D,(char)0x0E,
(char)0x0F,(char)0x10,(char)0x11,(char)0... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 12 15:25:31 2017
@author: mmrosek
"""
from skimage.filters import threshold_otsu, rank, threshold_local
import imageio
import skimage.filters as filters
import skimage.morphology as morphology
import matplotlib.pyplot as plt
import numpy as np
from... |
<filename>src/app/components/TablePanel/SearchInput.tsx
/**
* TokenDetail
*/
import React, { useState, useEffect, useRef } from 'react';
import styled from 'styled-components/macro';
import { tranferToLowerCase } from 'utils';
import 'utils/lazyJSSDK';
import { Search as SearchComp } from '../Search/Loadable';
import... |
/**
* Verifiy usage of a system camel context
*
* @author thomas.diesler@jboss.com
* @since 09-Mar-2016
*/
@CamelAware
@RunWith(Arquillian.class)
public class SystemContextTransformTest {
@Deployment
public static JARArchive deployment() {
JARArchive archive = ShrinkWrap.create(JARArchive.class, "... |
/**
* A class that is used to provide a contex to the EntityManager Operations. Contexts allows custom Gemini Modules
* to add code/behaviours and information to the EntityManger lifecicle in order to easily extend the core features.
* For example the authentication module add User information to the Context in orde... |
<gh_stars>0
/*
* Copyright 2016-2018, EnMasse authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package io.enmasse.queue.scheduler;
import io.enmasse.address.model.Address;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
i... |
<reponame>yanzhe-chen/LeetCode
#ifndef WORD_SEARCH_HPP_
#define WORD_SEARCH_HPP_
#include <vector>
#include <string>
using namespace std;
class WordSearch {
public:
bool exist(vector<vector<char>> &board, string word);
private:
bool backtrack(vector<vector<char>> &board, string &word, int depth, int i, int ... |
/*
CloseAllWallets closes all Wallet objects. They do *not* need to be part of WalletManager.Wallets.
"All wallets" really means *all* wallets.
*/
func (wm *WalletManager) CloseAllWallets() (err error) {
var call *dbus.Call
if !wm.isInit {
err = ErrInitWM
return
}
if call = wm.Dbus.Call(
DbusWMCloseAllWalle... |
pub fn flight_to(xmin : i32,xmax: i32,ymin: i32,ymax: i32,vx: i32,vy: i32) -> Option<i32> {
let mut x = 0;
let mut y = 0;
let mut vxc = vx;
let mut vyc = vy;
let mut max_y = 0;
loop {
x = x + vxc;
y = y + vyc;
//max height
if y > max_y { max_y = y; }
... |
/**
* An Apache XMLRPC webserver based on Netty.
*
* @author Keith M. Hughes
*/
public class NettyXmlRpcWebServer {
/**
* Port for the web server.
*/
private int port;
/**
* Address for the web server.
*/
private InetAddress address;
/**
* Server handler for web sockets.
*/
private... |
/**
* Generated by Oshare (https://github.com/fcannizzaro/oshare)
* @author Francesco Cannizzaro (fcannizzaro)
* @version 1.0.2
*/
public class Remote {
public static class api {
public static int value;
public static void run(Object ... args) {
Oshare.invoke("api.run", args);
... |
def autoassign(self, peaks, freq_thresh=10.0, int_thresh=10.0, finesse=10.0, lin=True):
def remove_dublicates(seq1, seq2, seq3):
seq1_new = []
seq2_new = []
seq3_new = []
i = 0
for e in seq1:
if e not in seq1_new:
se... |
package org.dorsmedia.utils;
import java.util.List;
public class ListUtils {
public static <T> T getFirstValue(List<T> list) {
if (list != null) {
return list.stream().findFirst().orElse(null);
}
return null;
}
}
|
def transform(self, S):
if isinstance(S, _gaugegroup.UnitaryGaugeGroupElement) or \
isinstance(S, _gaugegroup.TPSpamGaugeGroupElement):
U = S.get_transform_matrix()
Uinv = S.get_transform_matrix_inverse()
if self.unitary_postfactor is not None:
self... |
#include<stdio.h>
int main() {
int a, b, c, x, y, sum = 0, t;
scanf("%d %d %d",&a, &b, &c);
if (a>=b) {
x = a;
y = b;
}
else{
x = b;
y = a;
}
if (x - y >= c) {
sum = 2 * (y + c);
}
else if (x - y < c) {
t = (c - x + y) / 2;
sum = 2*(t + x);
}
printf("%d\n", sum);
} |
Distortion Varieties
The distortion varieties of a given projective variety are parametrized by duplicating coordinates and multiplying them with monomials. We study their degrees and defining equations. Exact formulas are obtained for the case of one-parameter distortions. These are based on Chow polytopes and Gr\"ob... |
<gh_stars>10-100
#ifndef MAIL_BOX_H
#define MAIL_BOX_H
#include "common.h"
#include <QObject>
#include <QVariant>
#include <QUuid>
#include <QMap>
#define MODULE_MAINWINDOW EMODULE::eMODULE_MAINWINDOW
#define MODULE_STD_WATCHER EMODULE::eMODULE_STD_WATCHER
#define MODULE_SCRIPT_PLAYER EMODULE::eMODULE... |
Image copyright AFP Image caption Mali troops, pictured here near the capital Bamako, fled Timbuktu before rebels arrived
Mali's neighbours are considering imposing an economic blockade to force its military leaders to step down, after rebels seized the whole of the north over the weekend.
West African leaders had gi... |
class observe_progress:
"""
Context manager for observing progress in the enclosed context.
:param label: A label.
:param total_work: The total work.
"""
def __init__(self, label: str, total_work: float):
assert_given(label, 'label')
assert_true(total_work > 0, 'total_work must... |
The dark and shadowed regions of the Moon fascinate astronomers and Pink Floyd fans alike. Our Moon’s rotation axis has a tilt of 1.5º, meaning that some parts of its polar regions never see sunlight – the bottoms of certain craters, for example, are always in shadow.
Imaged during summertime in the Moon’s southern he... |
<reponame>sitina/GoodData-CL-1
/*
* Copyright (c) 2009, GoodData Corporation. 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 cop... |
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "OnlineSubsystemIOSPrivatePCH.h"
#include "TurnBasedEventListener.h"
@interface FTurnBasedEventListenerIOS()
{
FTurnBasedEventDelegate* _owner;
}
@end
@implementation FTurnBasedEventListenerIOS
- (id)initWithOwner:(FTurnBasedEventDelegate&)o... |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll n, k, A, B;
cin>>n>>k>>A>>B;
if(k==1){
cout<<(n-1)*A<<endl;
return 0;
}
ll ans = 0;
while(n > 1){
if(n<k){
ans += (n-1)*A;
n=1;
// cout<<"first choice "<<endl;
// cout<<"coins "<<(n-1)*A<<endl;
... |
// Perform the complete hash process in one call
int Waterfall::Hash(int hashbitlen, const BitSequence *data, DataLength databitlen,
BitSequence *hashval) {
int ret;
ret = Waterfall::Init(hashbitlen);
if (ret != SUCCESS) return ret;
ret = Waterfall::Update(data, databitlen);
if (ret != SUCCESS) return ret;
re... |
Non-linear equity model for measuring patchouli oil at various levels
Indonesian patchouli agroindustry involving many actors is one of the sectors that should be developed because it supplies most of the global patchouli oil. One thing that should be considered in the agroindustry development is the inequity of benef... |
// postRawResponse requests the specified resource. The response, if provided,
// will be returned in a byte slice
func (c *Client) postRawResponse(resource string, data string) ([]byte, error) {
req, err := c.NewRequest("POST", resource, strings.NewReader(data))
if err != nil {
return nil, err
}
req.Header.Set("... |
<reponame>Semerkosa/Trading-platform
package monitor.service;
import monitor.model.service.AssetsInfoServiceModel;
import monitor.model.service.UsersInfoServiceModel;
public interface MonitorService {
UsersInfoServiceModel getTotalUsers();
AssetsInfoServiceModel getTotalAssets(String currencyType);
}
|
<reponame>jamesjnadeau/jupyterlab
import { reduce } from '@lumino/algorithm';
import { PanelLayout } from '@lumino/widgets';
import { NotebookTools, INotebookTracker } from '@jupyterlab/notebook';
import { Cell } from '@jupyterlab/cells';
import { JupyterFrontEnd } from '@jupyterlab/application';
import {
nullTransla... |
<filename>Apprende/models.py<gh_stars>1-10
from django.db import models
# Create your models here.
class Autor(models.Model):
nombreAutor = models.CharField(max_length=60)
descripcion = models.TextField(null=True, blank=True,default="No hay descripcion")
correo = models.EmailField(null=True, blank=True) ... |
/**
* Represents an inlined {@link Constant} value.
*/
public class ConstantValue extends Value {
private final Constant constant;
public ConstantValue(ValueKind<?> kind, Constant constant) {
super(kind);
this.constant = constant;
}
public Constant getConstant() {
return con... |
import re
from graphql import GraphQLError
class ErrorHandler():
'''Handles errors in the application'''
def validate_empty_fields(self, **kwargs):
"""
Function to validate empty fields when
saving an object
:params kwargs
"""
for field in kwargs:
v... |
<filename>source/Common/Net/MessageCenterModule/MessageCenterModule.cpp
//
// Created by taroyuyu on 2018/1/7.
//
#include "MessageCenterModule.h"
#include <functional>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <sy... |
/**
* configuration of a LDAP group to Archiva roles.
*
* @version $Revision$ $Date$
*/
@SuppressWarnings( "all" )
public class LdapGroupMapping
implements java.io.Serializable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* LDAP Group... |
<gh_stars>10-100
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"strings"
)
const (
WorkDir = "./build/"
KeyRing = "os"
NSD = WorkDir + "shareledger"
NSCLI = WorkDir + "slcli"
chainID = "SHR-VoyagerNet"
)
var (
makePath string = "/usr/bin/make"
dockerComposePath = "/... |
<filename>src/templates/packages/back/o-auth/src/@apps/iam/permission/application/events/created-permissions.event-handler.ts
import { EventsHandler, IEventHandler } from '@nestjs/cqrs';
import { CreatedPermissionsEvent } from './created-permissions.event';
@EventsHandler(CreatedPermissionsEvent)
export class CreatedP... |
<reponame>allanice001/envkey
import * as express from "express";
import {Api} from "@core/types";
export const okResult: Api.Net.OkResult = { type: "success" };
export const plainHtmlPage = (body: string): string => `<html lang="en"><body>
<style type="text/css">html,body{margin:0;padding: 34px;font-family: "Aria... |
PAULSBORO — Consolidated Rail Corp., owner of the train that derailed in Paulsboro a year ago, has filed a motion to dismiss a lawsuit that claims toxic chemicals spilled in the accident caused physical harm to residents and business owners.
The company, known as Conrail, filed the motion Tuesday in U.S. District Cour... |
import 'vue'
declare module 'vue/types/vue' {
interface Vue {
$formulate: {
handle: (
err: typeof Error,
formName: string,
skip?: boolean
) => void | typeof Error
reset: <V>(formName: string, initialValue?: V) => void
... |
The Social Organization of a ‘Stone Fight’
This article examines the sequential organization and social meaning of a ‘stone fight’ between a group of Spanish Gitano children and a group of non-Gitano neighbour children. The episode crystallizes an ongoing dispute between neighbours in the community regarding access an... |
data = [input().split() for _ in range(9)]
print(*["{} {} {}".format(name, int(a)+int(b), int(a)*200+int(b)*300) for name, a, b in data], sep="\n") |
There are many indicators the leaked 2005 NBC/Universal Trump video may have been a coordinated GOPe (UniParty) plot to remove the threat to their influence and affluence posed by the candidacy of Donald Trump.
Here’s a summary of stories, interviews and excerpts related to this issue. [I’ll weigh in with my take afte... |
def _RunBisectionScript(config, working_directory, path_to_file, path_to_goma,
path_to_extra_src, dry_run):
bisect_utils.OutputAnnotationStepStart('Config')
print
for k, v in config.iteritems():
print ' %s : %s' % (k, v)
print
bisect_utils.OutputAnnotationStepClosed()
cmd = ['python', os.path.join(... |
Triple synchronous gastrointestinal malignancies: a rare occurrence.
Gastrointestinal cancer is common, and is a significant cause of morbidity and mortality. The synchronous occurrence of two different malignancies is not uncommon, but that of more than two malignancies is extremely rare. Such occurrences often pose ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.