content stringlengths 10 4.9M |
|---|
/*
==============
idSessionLocal::HandleIntroMenuCommands
Executes any commands returned by the gui
==============
*/
void idSessionLocal::HandleIntroMenuCommands( const char *menuCommand ) {
int i;
idCmdArgs args;
args.TokenizeString( menuCommand, false );
for( i = 0; i < args.Argc(); ) {
const char *cmd = args... |
import { React } from "../deps.ts";
class Editor extends React.Component {
render() {
return(
<div className="h-[95.1%] w-[100%] bg-[rgb(10,5,5)]">
<div id="changes" className="absolute top-[0.5%] left-[2.5%] text-white font-mono text-[1.5vh]"></div>
<div ... |
package ca.sukhsingh.actions.on.google.response.data.google.richresponse;
/**
* Created by sukhsingh on 2017-08-26.
*/
import ca.sukhsingh.actions.on.google.Util;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.log4j.Logger;
import java.u... |
package org.xbib.content.xml.stream;
import org.xml.sax.ContentHandler;
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLStreamException;
/**
* Receive and convert StAX events to SAX events.
* Extends {@link SaxE... |
import discord
import os
import requests
import json
from keepalive import keep_alive
from reactions import react_eggplant, react_pop
from discord.ext import commands
my_secret = os.environ['token']
client = commands.Bot(command_prefix = '**')
client.remove_command("help")
def get_meme():
response = requests... |
An integrated hybrid methodology for estimation of absorptivity and interface temperature in laser transmission welding
This study reports a new hybrid integrated technique to predict the absorptivity of absorber and the interface temperature of the joint in laser transmission welding. The new approach is more robust ... |
<gh_stars>0
package org.utn.edu.ar.model.persistence.gaeDatastore;
import java.util.ArrayList;
import java.util.Date;
import com.google.appengine.api.datastore.*;
import com.google.appengine.repackaged.com.google.common.collect.Lists;
import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.c... |
<reponame>icaksh/Python-Projects-Protek<filename>Chapter 06/Latihan/statistik.py
def sum(*angka):
hasil = 0
for alatake in angka:
hasil += alatake
return hasil
def average(*angka):
kangDividen = 0
for alasarma in angka:
alasarma = alasarma #fix unused variable
kangDividen +=... |
#include "cpu_id.h"
#include "types.h"
#include "platform.h"
#include <util/generic/singleton.h>
#if defined(_win_)
#include <intrin.h>
#include <immintrin.h>
#elif defined(_x86_)
#include <cpuid.h>
#endif
#include <string.h>
#if defined(_x86_) && !defined(_win_)
static ui64 _xgetbv(ui32 xcr) {
ui32 eax;
ui... |
/*
* BkZOO!
*
* Copyright 2011-2017 yoichibeer.
* Released under the MIT license.
*/
#include <tut/tut.hpp>
#include "bkzoo_tut.h"
#include "clipboard/Clipboard.h"
#include "for_debug/detect_memory_leak.h"
using namespace bkzoo::clipboard;
namespace tut
{
// Data used by each test
struct Clipboard_d... |
Fewer than 30% of U.S. teens understand their paycheck, according to the financial literacy portion of a test administered by the Organization for Economic Co-operation and Development.
More than one in six 15-year-olds is unable to make even simple decisions about everyday spending, and only one in 10 can solve compl... |
from functools import partial
import pandas as pd
import pytest
from unittest.mock import Mock, patch
import requests
from bzfunds import constants
from bzfunds.data import *
from bzfunds.dbm import *
from bzfunds.utils import get_url_from_date
# Globals
date_str = "2021-01-01"
date = pd.to_datetime(date_str)
mana... |
Most people told us it would never work, but we did it anyway: We started charging 10¢ to post content on our social network. Our users didn’t leave. In fact, they are posting more than ever, and the quality of content has improved. Our experiment seems to be working. People are willing to pay to post content.
That is... |
// Copyright 2021-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../openpgl.h"
#include "Field.h"
#include <string>
#include <stdexcept>
namespace openpgl
{
namespace cpp
{
struct Field;
/**
* @brief The Device class is a key component of OpenPGL. It is used to set
* compute... |
package me.draimlib;
import com.google.common.collect.Lists;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandExecutor;
import org.bukkit.event.Listener;
import java.util.List;
import java.util.logging.Logger;
public abstract class Module<T extends DraimLib> {
protected T plugin;
protected boolean ... |
// TestExtractAssembleExtract tests the extract and assemble subcommand of UTK.
// The subcommands are run in this order:
//
// 1. utk extract tt.rom dir1
// 2. utk assemble dir1 tmp.rom
// 3. utk extract tmp.rom dir2
//
// The test passes iff the contents or dir1 and dir2 recursively equal. This
// roundabout method i... |
HPM OF ESTROGEN MODEL ON THE DYNAMICS OF BREAST CANCER
We enhance a deterministic mathematical model involving universal dynamics on breast cancer with immune response. This is population model so includes Normal cells class, Tumor cells, Immune cells and Estrogen. The eects regarding Estrogen are below incorporated i... |
/**
* PurityDatum generated by hbm2java
*/
public class PurityDatum implements java.io.Serializable {
private Long datumPkId;
private File file;
private SynthesisPurity synthesisPurity;
private String name;
private Float value;
private String valueType;
private String valueUnit;
private String createdBy;
pr... |
def make_covariates_editable(self):
if debug: print("Called make_covariates_editable()")
self.age_spinner.update(disabled=False)
self.sex_select.update(disabled=False)
self.tiv_spinner.update(disabled=False)
self.field_strength_select.update(disabled=False)
self.residuali... |
/*-------------------*
| <NAME> |
| URI 1961 |
| <NAME> |
*--------------------*/
import java.util.Scanner;
import java.util.Locale;
public class Main {
public static void main(String[] args) {
Locale.setDefault(new Locale("en", "US"));
Scanner sc = new Scanner(System.in);
int sapo = sc.nex... |
def _setup_IMRPhenomPv3_interpolation(self, VERSION):
from phenom import phenEOB
self.phenEOBmodel = phenEOB.InitialisePhenEOBModel(VERSION)
self.phenEOBalpha = phenEOB.phenEOBalpha(self.phenEOBmodel.ia) |
package leetcode
// https://leetcode-cn.com/problems/longest-consecutive-sequence/
/**
给定一个未排序的整数数组,找出最长连续序列的长度。
要求算法的时间复杂度为 O(n)。
示例:
输入: [100, 4, 200, 1, 3, 2]
输出: 4
解释: 最长连续序列是 [1, 2, 3, 4]。它的长度为 4。
*/
func longestConsecutive(nums []int) int {
dpMap := make(map[int]int)
var ans int
for i := range nums {
if ... |
/**
* Scientific notation expresses a number in this form
* <blockquote><i>
* x = a * 10<sup>b</sup>
* </i></blockquote>
* <i>a</i> is called the significand or mantissa, and <i>1 ≤ |a| < 10</i>.
* <i>b</i> is called the exponent and is an integer.
* <p/>
* Strictly speaking, <i>0</i> cannot be re... |
Current therapy of catamenial pneumothorax.
Catamenial pneumothorax, or monthly recurring pneumothorax associated with menstruation, has been reported with increasing frequency in recent years. A representative case illustrates the clinical syndrome, particularly the intraoperative findings. Characteristic of this dis... |
package api
import (
rss "github.com/mmcdole/gofeed"
"io/ioutil"
"log"
"net/http"
"net/url"
"regexp"
)
type USN struct {
URL string
markdownCache string
metadataCache *metadata
rssMetadata rssMetadata
}
type rssMetadata struct {
Title string `yaml:"title"`
Description string `yaml:"description"... |
Fez is Morocco’s medieval city, dating back ages and crowned with such epithets as “The Athens of Africa” and “The Mecca of the West.” It is Morocco’s second largest city, home to 1.1 million people, although you wouldn’t know it by arriving at the Fes airport.
We got to Fes, and found it to be a single-plane, tarmac-... |
def forward(self, wavefront):
wf = wavefront.copy()
correction = np.einsum('kj,j,ji,...i->...k',
self.transformation, self.coeffs, self.transformation_inverse, wf.electric_field, optimize='optimal')
wf.electric_field -= correction
return wf |
<reponame>noahsalvi/DomainGenie<gh_stars>0
import type { ElectronApi } from "./electronApi";
declare global {
interface Window {
electronApi: ElectronApi;
}
}
|
# 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, software
# d... |
/**
* Returns the position of this entity.
*
* @return The position of this entity.
*/
public Tag.List Pos() {
return new Tag.List("Pos", Tag.Type.DOUBLE, new Tag.Double(null, posx),
new Tag.Double(null, posy),
new Tag.Double(null, posz));
} |
/// Creates a new crossterm backend.
pub fn init() -> Result<Box<dyn backend::Backend>, crossterm::ErrorKind>
where
Self: Sized,
{
let _alternate_screen = AlternateScreen::to_alternate(true)?;
let input = input();
let async_reader = input.read_async();
input.enable_mouse_... |
<reponame>patrickelectric/ardupilot-camera-manager<gh_stars>0
use log::*;
use std::io::Write;
use crate::cli;
use env_logger::fmt::{Color, Style, StyledValue};
// Change style based on the message log level
fn colored_level<'a>(style: &'a mut Style, level: Level) -> StyledValue<'a, &'static str> {
match level {
... |
def checkExisting(self) -> None:
if os.path.isfile("README.md"):
while 1:
try:
value = input("README.md already exists. Do you want to create a new README.md file? [y/n] ")
if value == 'y':
self.fileDesc = open("README.m... |
/* The following code was generated by JFlex 1.7.0-SNAPSHOT tweaked for IntelliJ platform */
package com.pdehaan.flatbuffers;
import com.intellij.lexer.FlexLexer;
import com.intellij.psi.tree.IElementType;
import com.pdehaan.flatbuffers.psi.FlatbuffersTypes;
import com.intellij.psi.TokenType;
/**
* This class is a... |
<filename>lachesis-rs/src/server/heartbeat.rs
use std::time::Duration;
use std::io;
use actix::prelude::*;
pub struct Heartbeat {
pub count: usize,
}
impl Heartbeat {
fn beat(&mut self, _context: &mut Context<Self>) {
self.count += 1;
}
}
pub struct GetHeartbeatCount;
impl Message for GetHeart... |
Possible heterogeneity of Streptococcus milleri determined by DNA mol % (guanine plus cytosine) measurement and physiological characterization.
DNA base pair ratios (mol % guanine + cytosine) were calculated, for eighteen strains of Streptococcus milleri, from measurements of DNA melting temperature (Tm). Strains of v... |
#include <stdexcept>
#include "OnlineDB/Oracle/interface/Oracle.h"
#include "OnlineDB/EcalCondDB/interface/ODTTCciCycle.h"
using namespace std;
using namespace oracle::occi;
ODTTCciCycle::ODTTCciCycle()
{
m_env = nullptr;
m_conn = nullptr;
m_writeStmt = nullptr;
m_readStmt = nullptr;
//
m_ID = 0;
m_ttc... |
/* -----------------------------------------------------------------------------------------------------------------
COPYRIGHT (c) 2009 - 2017
HONEYWELL INC.,
ALL RIGHTS RESERVED
This so... |
/*
Package dispatch is used to dispatch irc messages to event handlers in an
concurrent fashion. It supports various event handler types to easily
extract information from events, as well as define more succint handlers.
*/
package dispatch
import (
"runtime"
"strings"
"sync"
"github.com/aarondl/ultimateq/irc"
"... |
<gh_stars>1-10
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as React from 'react';
import { VisualizationType } from 'common/types/visualization-type';
import { test as content } from 'content/test';
import { AssessmentBuilder } from '../assessment-builder';
... |
def _minCostConnectPoints(self, points: List[List[int]]) -> int:
assert isinstance(points, list) and len(points) >= 1
n = len(points)
edges = []
def build(pos: List[Tuple[int, int, int]]):
pos.sort()
diff_list = [y - x for (x, y, _) in pos]
diff_sort =... |
<reponame>undertideco/go-tweetcrawler
package main
import (
"encoding/csv"
"encoding/json"
"fmt"
"github.com/ChimeraCoder/anaconda"
"io/ioutil"
"log"
"net/url"
"os"
"strconv"
"time"
)
type Config struct {
TweetsFileName string `json:"tweetsFileName"`
ConsumerKey string `json:"consumerKey"`
ConsumerSec... |
The Conservative government will announce an income-splitting tax break for parents Thursday, sources say.
The measure will allow the higher-earning parent of children up to 18 years of age to transfer as much as $50,000 of income to the lower-earning spouse for tax purposes.
(What is income-splitting? Read The Globe... |
<filename>lamp-example/lamp-example-server/src/main/java/com/tangyh/lamp/example/config/ExampleWebConfiguration.java
package com.tangyh.lamp.example.config;
import com.tangyh.basic.boot.config.BaseConfig;
import com.tangyh.basic.log.event.SysLogListener;
import com.tangyh.lamp.oauth.api.LogApi;
import org.springframew... |
/**
* Created by thawkins on 9/19/2018.
*/
public class TimelineProjectItem
{
private String _timelineObjectId; // FK to snprc_scheduler.Timeline
private Integer _projectItemId; // FK to snd.ProjectItems
private String _timelineFootNotes;
private Integer _sortOrder;
private String _objectId;
... |
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fr(i, n) for (ll i = 0; i < n; ++i)
#define frab(i, a, b) for (ll i = a; i < b; ++i)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pr;
const int N = 2e5 + 1;
const ll INF = 2e9;
const... |
#include <bits/stdc++.h>
using namespace std;
typedef long long Long;
const int N = 1e5 + 2;
const Long INF = 1e15 + 7;
/************************************/
int num[N];
int n;
bool check(int target) {
Long sum = 0;
for (int i = 0; i < n; i ++) {
sum += target - num[i];
}
return sum >= target;
}
int main()... |
// NewWriter creates and returns a new Writer configured with config.
//
// DEPRECATED: Writer value can be instantiated and configured directly,
// this function is retained for backward compatibility and will be removed
// in version 1.0.
func NewWriter(config WriterConfig) *Writer {
if err := config.Validate(); err... |
/**
* A fluent builder to aid in constructing a {@link ColumnMapping}.
*
* @since 0.14.0
*/
public static class Builder {
boolean hasOCCVersion = false;
boolean hasCounter = false;
private Collection<FieldMapping> fieldMappings = new ArrayList<FieldMapping>();
/**
* Adds a mapping to ... |
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
private void initComponents()
{
popupMenu = new javax.swing.JPopupMenu(... |
// When note is moved to another notebook, move note under Dropbox immediately as well.
public static void onNoteMove(File noteFile, File metaFile, File destNotebook) {
if (noSync()) {
return;
}
HashSet<String> syncedNotebooks = Elephant.settings.getSyncSelection();
boolean isSourceSynced = syncedNotebooks.c... |
//---------------------------------------------------------------------------//
// Check that the photoelectric cross section can be extracted
TEUCHOS_UNIT_TEST( XSSEPRDataExtractor, extractPhotoelectricCrossSection )
{
Teuchos::ArrayView<const double> photoelectric_cs =
b_xss_data_extractor->extractPhotoelectri... |
def numeric_entities_codec(text):
if isinstance(text, (UnicodeEncodeError, UnicodeTranslateError)):
s = []
for c in text.object[text.start:text.end]:
s.append(NUMERIC_ENT.format(ord(c)))
return ''.join(s), text.end
else:
raise TypeError("Can't handle {0!r}".format(tex... |
/**
* Generates an .ics formatted file with the event info and launches intent chooser to
* share said file
*/
private void shareEvent(ShareType type) {
VCalendar calendar = new VCalendar();
calendar.addProperty(VCalendar.VERSION, "2.0");
calendar.addProperty(VCalendar.PRODID, VCa... |
use std::collections::HashMap;
#[derive(Clone, Debug)]
enum Rule {
Literal(char),
And(Vec<usize>),
Or(Vec<Rule>),
}
impl Rule {
fn create_from(r: &[&str]) -> Rule {
if r.len() == 1 && r[0].starts_with('"') {
return Rule::Literal(r[0].chars().nth(1).unwrap());
}
if l... |
package fr.ght1pc9kc.scraphead.core.scrap;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import java.net.URI;
import java.net.URL;
import java.net.http.HttpHeaders;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Optional;
@Slf4j
@UtilityClass
... |
/**
* Return true if a link is currently associated with this node or it's a redirect to an active node; and parent is active. RECURSIVE.
*/
boolean isActive(DB db) throws SQLException {
NodeLink nl = getCurrentNodeLink(db);
if (nl==null || nl.isEmpty()) return false;
if (nl.isRedirect()) {
NodeLink rnl = ... |
/**
* Ensure that the offscreen images are initialized and are at least as
* large as the size given as parameter.
*/
private void checkOffScreenImages(int width, int height) {
int currentImageWidth = 0;
int currentImageHeight = 0;
if (swtImage != null) {
currentImageWidth = swtImage.getImageData().width... |
<filename>src/i3lock-next-helper.c
/*
* i3lock-next-helper.c
* This program takes a screenshot and blurs it for use with the
* i3lock-next script.
* NOTE: should not be run directly by user
*
*/
/* Standard */
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
/* X11 */
#include <X11/Xlib.h>
#include <... |
/*
* JBoss, Home of Professional Open Source
* Copyright 2014 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Vers... |
Letters to the Editor
"Sugar...food colors, additives, and flavors (especially red food color)...many children reacted to other common foods, including milk, corn, wheat, chocolate, eggs, and oranges." What is left to eat?
We completely agree with Dr Crook's statement that some of his patients "may have improved due ... |
/*
* @(#) Parser.java
*
* JSTL Expression Language Parser / Evaluator
* Copyright (C) 2003, 2005, 2006, 2007, 2012, 2013, 2020 <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 Softwar... |
import faker from 'faker/locale/nb_NO';
import navfaker from 'nav-faker';
import Cookies from 'js-cookie';
import FetchMock, { Middleware, MiddlewareUtils, MockHandler, MockRequest } from 'yet-another-fetch-mock';
import { erGyldigFødselsnummer } from 'nav-faker/dist/personidentifikator/helpers/fodselsnummer-utils';
im... |
<reponame>fernando-romulo-silva/myStudies
package org.jespanol.conference;
import jakarta.nosql.mapping.AttributeConverter;
import java.time.Year;
public class YearConverter implements AttributeConverter<Year, Integer> {
@Override
public Integer convertToDatabaseColumn(Year attribute) {
if (attribut... |
/**
* Create an end-element event.
*/
@SuppressWarnings("unchecked")
public abstract EndElement createEndElement(String prefix,
String namespaceUri,
String localName,
Iterato... |
//not needed any more because the window was implemented directly in init()
public class Window
{
public Window(int w, int h, String title, tankGame game)
{
// game.setPreferredSize ( new Dimension ( w,h ) );
// game.setMaximumSize ( new Dimension ( w,h ) );
// game.setMinimumSize ( new ... |
<gh_stars>0
import { Heading } from "@chakra-ui/react";
import { TOKEN } from "@static/constants";
import { useRouter } from "next/router";
import { removeNookie } from "next-nookies-persist";
import React, { useEffect } from "react";
const SignOutPage = () => {
const router = useRouter();
useEffect(() => {
r... |
package com.littleinferno.flowchart.scene;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.support.v7.widget.CardView;
import android.util.AttributeSet;
import android.view.DragEvent;
import android.view.GestureDe... |
<gh_stars>0
package types
import (
sdk "github.com/pokt-network/posmint/types"
"sync"
)
type HostedBlockchain struct {
Hash string `json:"addr"`
URL string `json:"url"`
}
type HostedBlockchains struct {
M map[string]HostedBlockchain // m[addr] -> addr, url
l sync.Mutex
o sync.Once
}
var (
globalHostedChain... |
// UnmarshalBinary Parameter 1, AntennaID.
func (p *AntennaID) UnmarshalBinary(data []byte) error {
if err := hasEnoughBytes(ParamAntennaID, 2, len(data), true); err != nil {
return err
}
*p = AntennaID(binary.BigEndian.Uint16(data))
return nil
} |
import { AvoGuid } from "./AvoGuid";
import { AvoInspector } from "./AvoInspector";
export interface BaseBody {
apiKey: string;
appName: string;
appVersion: string;
libVersion: string;
env: string;
libPlatform: "node";
messageId: string;
trackingId: string;
createdAt: string;
sessionId: string;
s... |
<reponame>cloudmailin/cloudmailin-go<filename>outbound_test.go
package cloudmailin
import (
"fmt"
"strings"
"testing"
)
func buildMessage() OutboundMail {
attachmentContent := "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP0rdr1HwAFHwKCk87e6gAAAABJRU5ErkJggg=="
return OutboundMail{
From: "<EMA... |
package main
import "fmt"
func judge(temp int) string {
if 30 <= temp {
return "Yes"
} else {
return "No"
}
}
func main() {
var temp int
fmt.Scan(&temp)
ans := judge(temp)
fmt.Println(ans)
} |
package controllers
import (
"encoding/json"
"io/ioutil"
"log"
)
type Universities struct {
Name string `json:"name"`
Abbreviation string `json:"abbreviation"`
WebsiteLink string `json:"website_link"`
}
// NewUniversities New Universities structure
type NewUniversities struct {
Name string `j... |
def fetch(
console: Console,
url: str,
re: Optional[Pattern],
filters: Optional[Filter],
ignore: Optional[Filter],
pages: bool,
) -> Optional[Tuple[Shelf, Scraper]]:
with Loader(console, "Fetching info"):
filters = filters or Filter.true()
ignore = ignore or Filter.false()
... |
def summary_writer_function(name, tensor, function, family=None):
name_scope = ops.get_name_scope()
if name_scope:
name_scope += "/"
def record():
with ops.name_scope(name_scope), summary_op_util.summary_scope(
name, family, values=[tensor]) as (tag, scope):
with ops.control_dependencies([fu... |
<reponame>mikolajgucki/ae-engine
#ifndef AE_DESKTOP_LUA_LIB_HTTP_H
#define AE_DESKTOP_LUA_LIB_HTTP_H
#include <vector>
#include "json/json.h"
#include "DLog.h"
#include "Timer.h"
#include "DesktopPluginCfg.h"
#include "LuaLibHTTP.h"
#include "HTTPLuaExtraLib.h"
#include "DesktopHTTPResponse.h"
namespace a... |
def _recursively_apply_get_cassette_subclass(self, replacement_dict_or_obj):
if isinstance(replacement_dict_or_obj, dict):
for key, replacement_obj in replacement_dict_or_obj.items():
replacement_obj = self._recursively_apply_get_cassette_subclass(
replacement_obj... |
#include "exception_frame.h"
#include <stddef.h>
#include <thread.h>
#define text(t) __asm__("\n__OUT__" t)
#define define(t, v) __asm__("\n__OUT__#define " t " %0" :: "n" (v))
void asm_def(void)
{
text("#ifndef arm_v7m_asm_def_h");
text("#define arm_v7m_asm_def_h");
text();
text("/*");
text(" * asm_def.h - Auto... |
class HttpWebRequest(WebRequest, ISerializable):
"""
Provides an HTTP-specific implementation of the System.Net.WebRequest class.
HttpWebRequest()
"""
def Abort(self):
"""
Abort(self: HttpWebRequest)
Cancels a request to an Internet resource.
"""
pass
def Ad... |
package cmd
import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/minamijoyo/myaws/myaws"
)
func init() {
RootCmd.AddCommand(newELBCmd())
}
func newELBCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "elb",
Short: "Manage ELB resources",
Run: func(cmd *cobra.Command, args []string) {
... |
//
// Created by 伊従寛哉 on 2020/12/29.
//
#include <stdio.h>
#include <time.h>
#include "matrix_setting.h"
#include "cachecache.h"
int main() {
int i,j;
// 連立方程式 Ax = b
// 行列Aは正定値対象行列
// matrix a = {{5.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0},
// {2.0, 5.0, 2.0, 1.0, 1.0, 1.0, 1.0,... |
def choose_file(self):
from spec2nexus.spec import SpecDataFile
dirname = self.get_default_directory(self.filename.text())
filename = getOpenFileName(self, 'Open file', dirname)
if os.path.exists(filename):
self.filename.setText(str(filename))
self.spec = SpecData... |
Optical Communications Efficient burst aggregation for QoS-aware slotted OBS systems
A crucial issue in slotted OBS systems is the slot-generating traffic aggregation strategy as it impacts heavily on efficiency. The longer the assembly time, the better the fill level, at the penalty of delay, which may affect sensiti... |
<reponame>Mezantrop74/decomp<filename>pkg/decompile/index.go
package decompile
import (
"go/ast"
"go/token"
gotypes "go/types"
"github.com/llir/llvm/ir"
"github.com/pkg/errors"
)
// createGlobalDecls indexes global identifiers and creates scaffolding Go
// declarations (without bodies but with types) based on t... |
// sorts module tags based on their semantic versions.
// this is necessary because lexically sorted is not sufficient
// due to v10.0.0 appearing before v2.0.0
func sortModuleTagsBySemver(modDirs []string) {
sort.SliceStable(modDirs, func(i, j int) bool {
lv, err := semver.NewVersion(modDirs[i])
if err != nil {
... |
<gh_stars>0
//! # Low-level access to the Central Directory File Header records of a ZIP
//! archive
use std::iter::Iterator;
use utils::Slice;
use zip::raw::CentralDirectoryFileHeaderReader;
/// An iterator over a contiguous sequence of Central Directory File Header
/// records.
///
/// The iterator returns the Ce... |
def _find_share(self, volume):
if not self._mounted_shares:
raise VzStorageNoSharesMounted()
for share in self._mounted_shares:
if self._is_share_eligible(share, volume.size):
break
else:
raise VzStorageNoSuitableShareFound(
vol... |
The Ordinary Universal Magisterium: Unresolved Questions
|
WASHINGTON (Reuters) - Federal regulators’ decision to designate insurer MetLife Inc (MET.N) as “too big to fail” was “arbitrary and capricious,” the U.S. judge who struck down the determination last month wrote in an opinion that was unsealed on Thursday.
The MetLife building is seen in New York, March 8, 2010. REUTE... |
//
// DeserializeInt
// Purpose: Reads an int from file.
//
int DeserializeInt( int *val )
{
DESERIALIZE_OPEN_FILE
{
int msg = fscanf_s( fp, "%d", val );
fgetc( fp );
return msg;
}
return EOF;
} |
import numpy as np
import nltk
import math
import gensim
import resources as res
class Ruler(object):
title = None
text = None
model = None
seen_words = {}
def __init__(self, title, text):
self.title = [tit.lower() for tit in title.split(' ')]
self.text = text
#self.model ... |
def generateTree(self):
def setElement(parent, name, text):
element = ET.SubElement(parent, name)
element.text = str(text)
ure = ET.Element(ur.JOB_USAGE_RECORD)
assert self.record_id is not None, "No recordId specified, cannot generate usage record"
record_identit... |
def main():
obj_store = NetAppCloudManagerConnectorGCP()
obj_store.apply() |
Glass Ceilings and Oak-Paneled Walls - Women on Corporate Boards
Gender diversity on corporate boards can be approached from two perspectives: first, women on boards are good for business since that contributes to better decision making and hence better governance and performance; second, as a social equity issue, wom... |
def seive(num,n):
li=[True]*(n+1)
x=2
li[0]=False
li[1]=False
while x*x<n:
if li[x]:
for i in range(x*x,len(li),x):
li[i]=False
x+=1
for i in range(num,len(li)):
if li[i]:
return i... |
import { bufferToBase64 } from '@slater-notes/core';
import { FILE_COLLECTION_KEY } from '../utils/DBIndexKeys';
import disk from '../utils/disk';
const getFileCollectionFromDiskAsBase64 = async (userId: string): Promise<string | null> => {
const encryptedData = await disk.get(`${FILE_COLLECTION_KEY}--${userId}`);
... |
Afghanistan, Ghowr Province: an opium village
[Ed. note: Connor O’Steen writes of going to an opium village in Afghanistan’s Ghowr province to do the necessary research to admit Nasim to the orphanage in Chaghcharan.]
First the roads. They were dirt the entire way and I was expecting this, but I had also figured that... |
<gh_stars>0
package vhttp
import (
"fmt"
"testing"
)
func TestIp(t *testing.T) {
v4Addr := GetIpv4Addr()
fmt.Println(v4Addr)
v6Addr := GetIpv6Addr()
fmt.Println(v6Addr)
}
|
import { ComponentType } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text, Block } from '@tarojs/components'
import { observer, inject } from '@tarojs/mobx'
import cs from 'classnames'
import { toastTxt } from '../../../constants/constants'
import { WeatherProps } from '../../../t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.