content
stringlengths
10
4.9M
package com.swust.client; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.util.concurrent.DefaultThreadFactory; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf...
/// Adds a new entry to the fill output. pub fn entry(&mut self, entry: &dyn Format<Context>) -> &mut Self { self.result = self.result.and_then(|_| { let mut buffer = VecBuffer::new(self.fmt.state_mut()); write!(buffer, [entry])?; let item = buffer.into_element(); ...
<gh_stars>0 package com.example.tinyhousemonitoring; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.MenuItem; import com.example.tinyhousemonitoring.fragments.HealthFragment; import com.example.tinyhousemon...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | |...
/** * * Note on parallelization: The permutations are split into different tasks. Rotations + point placements is not. * */ public class ParallelBruteForcePackager extends AbstractBruteForcePackager { public static ParallelBruteForcePackagerBuilder newBuilder() { return new ParallelBruteForcePackagerBuilder();...
<reponame>cmdallas/aws-app-mesh-controller-for-k8s<filename>test/e2e/framework/resource/virtualrouter/manager.go package virtualrouter import ( "context" appmesh "github.com/aws/aws-app-mesh-controller-for-k8s/apis/appmesh/v1beta2" "github.com/aws/aws-app-mesh-controller-for-k8s/pkg/aws/services" "github.com/aws/a...
Attorneys for the state argued that Utah's law promotes the state's interest in "responsible procreation." Seth Anderson, left, and Michael Ferguson were one of the first couples married after a Utah judge declared the state's ban on same-sex marriage unconstitutional on Dec. 20 (Photo11: Kim Raff, AP) Story Highlight...
<filename>src/hooks/useTeoTablesForceUpdate.ts import { useState, useEffect } from 'react'; //** Возвращает функцию, которая устанавливает года, для которых нужно обновить данные */ export default (refetch: () => void, currentYearState: number) => { const [yearsToUpdate, setYearsToUpdate] = useState<Set<number>>(); ...
<gh_stars>100-1000 package com.medusa.gruul.platform.model.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.Range; import javax.validation.constraints.NotNull; /** * @author whh * @description * @data: 2020/8/8 */ @Data public class ShopPackageOr...
<filename>internal/testutils/repositoryTestUtils.go package testutils import ( "ethereum-service/model" "log" "math/big" "time" "github.com/CHainGate/backend/pkg/enum" "github.com/DATA-DOG/go-sqlmock" "github.com/google/uuid" "gorm.io/driver/postgres" "gorm.io/gorm" ) var ( chaingateAcc *model.Account ...
/** * Harit Kapadia, Jack Farley * Ms. Krasteva * 2019/May/26 */ public class QuestCompletionListener{ public void finishQuest(){ synchronized(this) { notifyAll(); } } }
Feasibility of an exercise intervention for women with postnatal depression: a pilot randomised controlled trial. BACKGROUND Postnatal depression is a serious mental health problem that may be reduced by exercise. AIM This study examined the feasibility of an exercise intervention for women with postnatal depression...
/** * Stores the given meta infos for the stored object. * * @param properties properties to store * @throws IOException in case of an IO error */ public void storeProperties(Map<String, String> properties) throws IOException { Properties props = new Properties(); properties.for...
<filename>__tests__/api.test.ts<gh_stars>1-10 // Import Node Module import request from 'supertest'; // Import express app import app from '../src/app'; // Test root API endpoint // API root should return a 404, this will be updated at somepoint to 501 Not Implemented describe('GET /find-tenant', () => { it('Respo...
class HtmlLinkReplacer: """ replaces links in html. Used to keep links working when including dropbox .html files in pages Uses BeautifulSoup html parser. """ def __init__(self): pass def replace_links(self, html, baseURL, currentpath): """ prepend baseURL to all relative links...
def infer_scene_from_dataset(x, y): from lmatools.grid.fixed import goesr_conus, goesr_meso, goesr_full, goesr_resolutions rtol = 1.0e-2 dx = np.abs(x[1]-x[0]) resolution = '{:d}microradian at nadir'.format(int(np.round(dx*1e6))) for km, microrad in goesr_resolutions.items(): if np.allclose(...
def defined_by_parent(self): if self.get_parent() is None: return False for base in getBaseClasses(self.get_parent().obj): base_obj = getattr(base, self.name, None) if self.obj is base_obj: return False return True
ORLANDO — Senator John McCain opened up a hard-hitting political attack on Senator Barack Obama’s national security credentials and stepped up his rhetoric against the Russians in Georgia in a speech on Monday aimed at showcasing his ability to be commander-in-chief. In an address to a Veterans of Foreign Wars convent...
<reponame>Learner1729/planningModule /** * MIT License * * Copyright (c) 2018 <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 limitatio...
/** * Tools needed to run a private IOTA testnet. * * (c) 2017 Michael Schierl. Licensed under MIT License. */ public class Main { public static void main(String[] args) throws Exception { if (args.length == 1 && args[0].equals("SnapshotBuilder")) { //TestnetSnapshotBuilder.main(args); } else if (args.len...
/** * (Re)schedule this timer. Discards any previously scheduled timeout. * * @param delay delay before expiration in milliseconds * @throws IllegalStateException if the lock object is not locked */ public void timeoutAfter(int delay) { assert Thread.holdsLock(this.raft); Precon...
/** * This is deleted delete all document(s), which is matched */ @Override public void deleteManyDocument() { MongoDatabase db = null; MongoCollection collection = null; Bson query = null; try { db = client.getDatabase(mongo.getDataBase()); collection = db.getCollection(mongo.getSampleCollection());...
<gh_stars>0 // Copyright 2021 The Project Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless r...
/** * @author Konstantin Krismer */ public class RegExMethodWidgetState extends State { private String regEx; public RegExMethodWidgetState() { } public RegExMethodWidgetState(String regEx) { super(); this.regEx = regEx; } public String getRegEx() { return regEx; } public void setRegEx(String regEx...
<gh_stars>100-1000 /** * Copyright 2019 Airbnb. Licensed under Apache-2.0. See LICENSE in the project root for license * information. */ package com.airbnb.dynein.scheduler; public class Constants { public static final String MAX_PARTITIONS = "maxPartitions"; public static final String SQS_CONSUMER = "sqsConsum...
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<string> using namespace std; int main() { string str; cin>>str; long long num_1=0; int num_2=0; long long sum=0; for(int i=str.size()-1;i>=0;i--) { sum+=(str[i]-'0'); num_2++; ...
def delete_borrower(self, objectid): if type(objectid) != bson.objectid.ObjectId: raise TypeError(f"objectid is not a BSON ObjectId: {objectid}") return self._borrowers.find_one_and_delete({"_id": objectid})
/** * ConsoleLogger.hpp * * log++ - Intuitive logging library for C++ written by <NAME>. * Co-author: <NAME> */ /**************************** * Local Includes * ****************************/ #include "FileLogger.hpp" #include "LogExtensions.hpp" /*************************** * System Includes * ...
/** * Prints the Area and all Evu's in a human readable format * to a file. * @param outputFile is a File. */ public void printAll (File outputFile) throws SimpplleError { PrintWriter fout; try { fout = new PrintWriter(new FileOutputStream(outputFile)); printAll(fout); fou...
// Score is called on each filtered node. It must return success and an integer // indicating the rank of the node. All scoring plugins must return success or // the pod will be rejected. func (s *Scheduler) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)...
/** * This Exeption is thrown if a DataReader finds an error in a read Line * f. e. wrong column number * * @author Christian Schmidt 2005 * */ public class LineErrorException extends Exception { public int tokenCount; /** * */ public LineErrorException() { super(); ...
def maxpeer_searched(self): assert self.maxpeers == -1 or len(self.peers) <= self.maxpeers return self.maxpeers > -1 and len(self.peers) == self.maxpeers
<gh_stars>10-100 package cn.chuanwise.xiaoming.contact.contact; import cn.chuanwise.xiaoming.bot.XiaomingBot; import cn.chuanwise.xiaoming.contact.message.Message; import cn.chuanwise.xiaoming.event.SendMessageEvent; import cn.chuanwise.xiaoming.object.XiaomingObjectImpl; import lombok.Getter; import net.mamoe.mirai.c...
<gh_stars>10-100 package com.hyd.ssdb.conn; import com.hyd.ssdb.*; import com.hyd.ssdb.conf.Server; import com.hyd.ssdb.protocol.Block; import com.hyd.ssdb.protocol.Request; import com.hyd.ssdb.protocol.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.ByteArrayOutputStream; import jav...
/** * Utils for import spacing. * * @author Ben Leitner */ class ImportUtil { private ImportUtil() { // No instantiation } static boolean needsNewLine(@Nullable String priorImport, String currentImport) { if (priorImport == null) { return true; } String[] priorParts = priorImport.split...
// Snapshot returns an identifier for the current revision of the state. func (sdb *StateDB) Snapshot() int { id := sdb.nextRevisionId sdb.nextRevisionId++ sdb.revision = append(sdb.revision, revision{id, sdb.journal.length()}) return id }
Photolysis of AgHal Single Crystals After Modification of Surface As a know, the changing of ionic balance in solution lead the modification of specific surface. It is displayed in t changing of specific surface and the concentration lowcoordination Br ions on the surface and the ions condu tivity. Inasmuch as the pho...
def problem_joint_fitness(x, y): cf = 10 h_1 = 50 x_1 = 0.75 y_1 = 0.75 s_1 = 1.6 f_1 = h_1 * \ (1 - ((16.0/s_1) * pow((x/cf - x_1), 2)) - ((16.0/s_1) * pow((y/cf - y_1), 2))) h_2 = 150 x_2 = 0.25 y_2 = 0.25 s_2 = 1.0/32.0 f_2 = h_2 * \ (1 - ((16.0/...
import os import datetime as dt from watchcbb.scrape.SportsRefScrape import SportsRefScrape from watchcbb.sql import SQLEngine sql = SQLEngine('cbb') srscrape = SportsRefScrape() TODAY = dt.date(2020,2,17) LOOKBACK = 2 OVERWRITE = True SEASON = TODAY.year if TODAY.month < 6 else TODAY.year+1 for iprev in range(LOO...
<reponame>relvacode/gpool-docker package ddpool // NodeWorkerStatus is a representation of the current node workers status. type NodeWorkerStatus struct { Total uint Executing uint } // NodeStorageStatus is a representation of the current node storage status. type NodeStorageStatus struct { Capacity uint64 A...
<filename>examples/applications/gaussian/gaussian_relu_rbm_training.py import torch import torchvision from learnergy.models.gaussian import GaussianReluRBM # Creating training and testing dataset train = torchvision.datasets.MNIST( root='./data', train=True, download=True, transform=torchvision.transforms.Compos...
/** * Initialize the palette through K-means color quantization. */ private void initPalette() { KMeansPlusPlusClusterer<PixelClusterable> clusterer = new KMeansPlusPlusClusterer<>(paletteSize, 200, new LabDistanceMeasure()); System.out.println("clustering..."); System....
<reponame>AdrianZw/csapex_core_plugins /// HEADER #include "segmentation.h" /// PROJECT #include <csapex/model/node_modifier.h> #include <csapex/msg/generic_vector_message.hpp> #include <csapex/msg/io.h> #include <csapex/param/parameter_factory.h> #include <csapex/utility/register_apex_plugin.h> #include <csapex_scan...
import json from collections import defaultdict import os from PIL import Image, ImageDraw # exp = '01222_cascade_r101_dcn_16e_grid' exp = '01231_cascade_r101_dcn_16e_grid_gcb' base_dir = '/data/hope/data/data/wine/data/' test = json.load(open(base_dir + 'chongqing1_round1_testA_20191223/testA.json')) id2im_name = {i...
package main import "fmt" func array() { var a [5]int var b [5]int = [5]int{1, 2, 3, 4, 5} c := [...]string{"a", "b", "c", "d", "e"} d := [4]string{"geek", "gfg", "Geeks1231", "GeeksforGeeks"} a[4] = 100 fmt.Println("element at index 1:", a[1]) fmt.Println("element at index 4:", a[4]) fmt.Println("length of a...
/** * Class for processing different client request (create, fetch and delete) and * returning an appropriate response to the <b>Server</b> class which ultimately * send the response back to the client. * * This class also implements the Serializable interface for storing the current * state and fetching the last...
<filename>Episode.go package twist // Episode represents a single episode on twist.moe. type Episode struct { Link string `json:"link"` Number int `json:"episode:number"` AnimeTwistID int `json:"animetwist:id"` }
<filename>cmake_targets/oaisim_build_oai/build/CMakeFiles/R11.2/X2ap-Cause.h<gh_stars>1-10 /* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "X2AP-IEs" * found in "/home/liu/openairinterface5g/openair2/X2AP/MESSAGES/ASN1/R11.2/X2AP-IEs.asn" * `asn1c -gen-PER` */ #ifndef _X2ap_Cause_H...
<reponame>stores-and-sales/backend<gh_stars>0 // Copyright (c) 2022 Pestras // // This software is released under the MIT License. // https://opensource.org/licenses/MIT import { Validall } from '@pestras/validall'; export enum ProductsValidators { CREATE = 'CreateProduct', UPDATE = 'UpdateProduct', ADD_IMAGE ...
use proconio::{input, fastout}; struct Helper { memo: Vec<(usize, usize)> } impl Helper { fn traverse(&self, index: usize, mut val: usize, mut total: usize ) -> usize { if val == 1 { return total } val -= 1; let (b_p, b_b) = self.memo[index-1]; let last = b_p + b_b; ...
// VisitElementAccessNode generates the il code for an array element access func (v *ILCodeGenerationVisitor) VisitElementAccessNode(node *node.ElementAccessNode) { node.Expression.Accept(v) node.Designator.Accept(v) designatorType := v.symbolTable.GetTypeByExpression(node.Designator) if v.isArrayType(designatorTyp...
Nowcasting algorithm for wind fields using ensemble forecasting and aircraft flight data This study proposes an algorithm that combines ensemble numerical weather‐prediction model data and aircraft flight data in a wind nowcasting system for safe and efficient aircraft operation. It uses an ensemble‐weighted average m...
import { doElsMatchSegs } from 'fullcalendar-tests/src/lib/segs' import { ResourceTimelineViewWrapper } from '../lib/wrappers/ResourceTimelineViewWrapper' import { TimelineViewWrapper } from '../lib/wrappers/TimelineViewWrapper' describe('timeline businessHours', () => { pushOptions({ initialView: 'timelineDay',...
<reponame>knocklabs/knock-node export interface KnockOptions { host?: string; } export interface HttpException extends Error { readonly status: number; readonly requestID: string; } export interface PostAndPutOptions { query?: { [key: string]: any }; } export interface UnprocessableEntityError { message: s...
COMPARATIVE ANALYSIS OF TRANSLATIONS OF THE SEVENTH BOOK OF PLATO’S “ ” WITH THE ORIGINAL TEXT. POLYVARIATIVITY OF FORM AND MEANING An appealing to original texts, a comparing linguistic variations in the forms of their offsprings (translations), a research of processes of branching of meanings, a reconstruction of th...
/** * This class is an Adapter for Appendable objects. * * @author Nicolas Richeton * */ public class FutureAppendableAdapter implements FutureAppendable { private Appendable out; private List<Future<CharSequence>> futureList; public FutureAppendableAdapter(Appendable out) { this.out = out;...
<gh_stars>1-10 package rawg func (suite *RAWGTestSuite) TestGetTag() { tag, err := suite.client.GetTag(1) suite.NoError(err) suite.Equal("Survival", tag.Name) } func (suite *RAWGTestSuite) TestGetTagFailed() { suite.client.baseUrl = "" tag, err := suite.client.GetTag(1) suite.Error(err) suite.Nil(tag) }
/** * iterates through selecting for user to go through stages selecting an auton or the debugger * and then all the config options * loads all screens at start so there are no mem management issues * finishes when all options are chosen */ int chooseAuton() { Autons auton_data; SelectionScreen scr1; O...
My 4-year-old autistic son Jordan loves video games. I took him and his twin sister Sophie to Dave and Buster’s in Braintree one afternoon, but we had to leave after five minutes because he became overwhelmed. Sadly, he and Sophie miss out on a lot because of his disability. I emailed Michelle Pena, the restaurant’s e...
package sit.int204.practice.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframewo...
<filename>Semester4/Algorithms/test.c // Mergesort #include <stdio.h> void merge(int *arr, int start, int mid, int end) { int n1[mid - start], n2[end - mid], i, j, k; i = 0; j = start; while (j < mid) n1[i++] = arr[j++]; i = 0; k = mid; while (k < end) n2[i++] = arr[k++]; ...
/** * Filter that accepts cards that have been targeted by a weapon accepted by the weapon filter this turn. * @param weaponFilter the weapon filter * @return Filter */ public static Filter hasBeenTargetedByWeaponThisTurn(final Filter weaponFilter) { return new Filter() { @Overri...
/** * Gets the scrollLeft value for this element. * @return the scrollLeft value for this element * @see <a href="http://msdn.microsoft.com/en-us/library/ms534617.aspx">MSDN documentation</a> */ public int jsxGet_scrollLeft() { if (scrollLeft_ < 0) { scrollLeft_ = 0; } ...
/** * Mouse listener to allow the window to be draggable even though it is * undecorated and unresizable. * */ private void initMouseListener() { try { this.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { mouseD...
package com.zwo.pls.modules.mem.mapper; import com.zwo.pls.modules.mem.domain.Department; import com.zwo.pls.modules.mem.domain.DepartmentCriteria; import org.apache.ibatis.annotations.Param; import tk.mybatis.mapper.common.Mapper; import java.util.List; public interface DepartmentMapper extends Mapper<Department> {...
// coreGroupResourcePriority returns the relative priority of the resource, in the following order: // pods, pvcs, pvs, everything else. func coreGroupResourcePriority(resource string) int { switch strings.ToLower(resource) { case "pods": return pod case "persistentvolumeclaims": return pvc case "persistentvolu...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ #define CONTENT_BROWSER_WORKER_HOST_WORKER_MESSAGE_FILTER_H_ #include "base/callback.h" ...
/** * Estimates the memory footprint of a SparseRow with <code>clen</code> * columns and <code>sp</code> sparsity. This method accounts for the * overhead incurred by extra cells allocated (but not used) for SparseRow. * It assumes that non-zeros are uniformly distributed in the matrix -- * i.e., #estimated n...
package org.opencv.core; /** * Template class for a 4-element vector derived from Vec. * * Being derived from "Vec<_Tp, 4>", "Scalar_" and "Scalar" can be used just as * typical 4-element vectors. In addition, they can be converted to/from * "CvScalar". The type "Scalar" is widely used in OpenCV to pass pixel val...
// Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "fxjs/cfx_v8.h" #include "core/fxcrt/fx_memory.h" #include "third_pa...
/******************************************************************************* * Copyright (c) 2015 Development Gateway, Inc and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the MIT License (MIT) * which accompanies this distribution, and is...
def initialize_error_reporting() -> None: import sentry_sdk from sentry_sdk import configure_scope from sentry_sdk.integrations.atexit import AtexitIntegration from sentry_sdk.integrations.dedupe import DedupeIntegration from sentry_sdk.integrations.excepthook import ExcepthookIntegration key = ...
Hoshangabad: No son or daughter of the state should remain deprived of education. This is what the government and the chief minister wants. Vidya Bharati is doing commendable work in the field of education. Besides lighting the lamp of knowledge, it is also inculcating moral values in the students. Those passing out fr...
def multipass_render(template, variables, environment): this_template = template for i in range(1, RENDER_PASS_LIMIT + 1): logging.debug(f"Performing render pass {i}...") this_template_rendered = this_template.render(variables) if "{{" not in this_template_rendered: return th...
<gh_stars>1-10 /* * This work was created by participants in the DataONE project, and is * jointly copyrighted by participating institutions in DataONE. For * more information on DataONE, see our web site at http://dataone.org. * * Copyright 2019. All rights reserved. * * Licensed under the Apache License, Ver...
def define_categories(self, files) -> None: for file in filter(lambda f: f.is_documentation_page(), files): with open(file.abs_src_path, encoding='utf-8') as handle: source, meta_data = meta.get_data(handle.read()) if len(meta_data) <= 0 or 'categories' not in meta_da...
<reponame>aslaksm/veilarbportefoljeflatefs import {useRef} from 'react'; export function useTimer(): { startTimer: () => void; stoppTimer: () => number; } { const ref = useRef<number>(-1); function start() { ref.current = Date.now(); } function stopp() { if (ref.current === -1...
<reponame>jdh8/metallic<filename>src/soft/float/floatunsitf.c #include "../../math/reinterpret.h" #include <stdint.h> long double __floatunsitf(uint32_t a) { if (!a) return 0; uint64_t high = (reinterpret(uint64_t, (double)a) >> 4) + 0x3C00000000000000; return reinterpret(long double, (unsigned _...
<gh_stars>0 package com.icommerce.product.restapi; public interface VersionController { String getVersion(); }
/** * Boundary Top Left Pixel Number (ST0903 VTarget Pack Tag 2). * * <p>From ST0903: * * <blockquote> * * Specifies the position of the top left corner of the target bounding box within a frame as a * pixel number. Numbering commences with 1, at the top left pixel, and proceeds from left to right, * top to bo...
As rumored this week, chip designer and supplier Avago is buying chip designer Broadcom in a cash-and-stock deal worth $37bn (£24bn). Broadcom is probably best known to Reg readers as the biz behind the BCM system-on-chips found in the Raspberry Pi and various other gizmos. The combined biz will rename itself Broadcom...
#include "roConstantBuffer.h" roConstantBuffer::roConstantBuffer(UINT bufferSize, UINT elementSize) : roGPUBuffer() { roGPUBuffer::CreateConstantBuffer(bufferSize, elementSize); } void roConstantBuffer::UploadData(int index, UINT numElements, const void* data) { roGPUBuffer::CopyToGPU(index, numElements, data); }...
<filename>src/main/java/com/helger/event/dispatch/async/IAsynchronousEventDispatcher.java /** * Copyright (C) 2015-2020 <NAME> (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ma...
/** Copyright 2020 RWTH Aachen University. All rights reserved. * * Licensed under the RWTH ASR License (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.hltpr.rwth-aachen.de/rwth-asr/rwth-asr-license.html * * Un...
#n,k = map(int,input().split()) #l = list(map(int,input().split())) from collections import defaultdict for _ in range(int(input())): s = input() k = len(s) check = [0]*k ans=0 for i in range(1,k): if i==1: if s[i]==s[i-1] and check[i-1]==0: check[i]=1...
/** * A simple {@link Fragment} subclass. */ public class MoreFragment extends Fragment { ListView lv_more; public MoreFragment() { // Required empty public constructor } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
import dataclasses import datetime import functools import typing from typing import Type, TypeVar import elasticsearch7 import pydantic from utils.exceptions import IndexWasNotInitializedError from utils.index import IndexMeta, set_index_meta from utils.typings import CreateAction DocType = TypeVar("DocType", bound...
<reponame>munezbn/sample_webkit_extension<filename>include/sample_web_extension.h<gh_stars>1-10 #ifndef __SAMPLE_WEB_EXTENSION_ #define __SAMPLE_WEB_EXTENSION_ #include <gio/gio.h> #include <JavaScriptCore/JSContextRef.h> #include <jsc/jsc.h> #ifdef PLATFORM_GTK #include <webkit2/webkit-web-extension.h> #elif define...
The influence of musculoskeletal forces on the growth of the prenatal cortex in the ilium: a finite element study Abstract Remodelling and adaptation of bone within the pelvis is believed to be influenced by the mechanical strains generated during locomotion. Variation in the cortical bone thickness observed in the pr...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package batch import ( "github.com/pulumi/pulumi/sdk/v2/go/pulumi" ) // The Batch Compute Environment data source allows access to details of a s...
/** * * @author Marcel Jakob */ @Entity @Table(name = "UPP_Zahlungsmethode") public class Zahlungsmethode implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "zahlungsmethode_ids") @TableGenerator(name = "zah...
<reponame>zhigui-projects/z-ledger /* Copyright Zhigui.com. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package transport import ( "context" "crypto/tls" "crypto/x509" "time" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepali...
<filename>multiapps-controller-core/src/test/java/org/cloudfoundry/multiapps/controller/core/validators/parameters/HostValidatorTest.java<gh_stars>10-100 package org.cloudfoundry.multiapps.controller.core.validators.parameters; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupite...
<filename>lib/z_vendor/getto-application/board/validate_board/method.ts import { ValidateBoardState } from "./data" export interface UpdateBoardValidateStateMethod<N extends string> { (name: N, valid: boolean, post: Post<ValidateBoardState>): void } interface Post<E> { (event: E): void }
Major ISPs such as Telstra, Optus and Primus will voluntarily block (at the ISP level) a list of sites which specifically serve child abuse and pornography content Communications Minister Stephen Conroy this morning announced a number of wide-ranging modifications to the Government's controversial mandatory internet f...
package core import ( "bytes" "fmt" "go.uber.org/zap/buffer" "gopkg.in/yaml.v3" "os" "strings" ) type Variables []VariableStage func (v *Variables) Inspect() error { for _, vs := range *v { if err := vs.Inspect(); err != nil { return err } } return nil } func (v *Variables) GenVariables() ([]*Variab...
Employees at four of the nation’s largest technology companies have given the majority of their political dollars to Democratic candidates and causes, federal records show. Democrats have received more than 80 percent of the $2.4 million in donations that workers at Amazon, Google, Facebook and Apple gave directly to ...
<reponame>pleak-tools/pleak-sql-analysis {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, RebindableSyntax, FlexibleInstances #-} module BanachQ where import Banach (Expr(..), TableExpr(..), (!!), chooseBeta, chooseBetaCustom, gamma, dualnorm, skipith) import qualified Banach as B import ProgramOptions imp...
def _get_data(self,filename): self.data = [] with open(filename,'r') as f: for line in f: m = re.match('\[([a-zA-Z0-9\- :,]+)\]\s*\[([a-zA-Z]+)\]\s*(.*)', line) if m: temp = m.group(1) ts =...
def build(self, model, dataset, circuits, resource_alloc=None, verbosity=0): return self.cls_to_build.create_from(model=model, dataset=dataset, circuits=circuits, resource_alloc=resource_alloc, verbosity=verbosity, regular...