repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
navikt/vtp
model/src/main/java/no/nav/foreldrepenger/vtp/testmodell/inntektytelse/arena/ArenaModell.java
package no.nav.foreldrepenger.vtp.testmodell.inntektytelse.arena; import java.util.List; import java.util.Optional; import com.fasterxml.jackson.annotation.JsonCreator; import no.nav.foreldrepenger.vtp.testmodell.Feilkode; public record ArenaModell(Feilkode feilkode, List<ArenaSak> saker) { public ArenaModell() { this(null, null); } @JsonCreator public ArenaModell(Feilkode feilkode, List<ArenaSak> saker) { this.feilkode = feilkode; this.saker = Optional.ofNullable(saker).orElse(List.of()); } }
lductrung92/openlayer4
public/assets/proj4js/lib/defs/EPSG25835.js
<filename>public/assets/proj4js/lib/defs/EPSG25835.js Proj4js.defs["EPSG:25835"] = "+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs "
vladyslavkarpovych/JavaRushTasks
4.JavaMultithreading/task/task35/task3513/Main.java
<gh_stars>0 package com.javarush.task.task35.task3513; import javax.swing.*; public class Main { public static void main(String[] args) { Model model = new Model(); Controller controller = new Controller(model); JFrame game = new JFrame(); game.setTitle("2048"); game.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); game.setSize(450, 500); game.setResizable(false); game.add(controller.getView()); game.setLocationRelativeTo(null); game.setVisible(true); } }
lechium/iOS1351Headers
System/Library/PrivateFrameworks/TSUtility.framework/TSSPreset.h
<reponame>lechium/iOS1351Headers /* * This header is generated by classdump-dyld 1.5 * on Wednesday, October 27, 2021 at 3:17:07 PM Mountain Standard Time * Operating System: Version 13.5.1 (Build 17F80) * Image Source: /System/Library/PrivateFrameworks/TSUtility.framework/TSUtility * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. Updated by <NAME>. */ @class NSString; @protocol TSSPreset <TSSThemeAsset> @property (nonatomic,readonly) NSString * presetKind; @optional -(void)drawSwatchInRect:(CGRect)arg1 inContext:(CGContextRef)arg2; @required -(NSString *)presetKind; @end
juandx1/RiotAPI2
Masterify - WebApp/app/dto/TopChampionDTO.java
<filename>Masterify - WebApp/app/dto/TopChampionDTO.java package dto; /** * Created by <NAME> on 9/05/2016. */ public class TopChampionDTO { public int kills; public int deaths; public int assits; public int gold; public int win; public int lost; public int games; public TopChampionDTO() { } }
appotry/cosmopolitan
third_party/python/Modules/cjkcodecs/__gb2312_decmap.c
#include "libc/x/x.h" /* clang-format off */ static bool __gb2312_decmap_once; static void *__gb2312_decmap_ptr; static const unsigned char __gb2312_decmap_rodata[11651] = { 0xb5, 0xbb, 0x77, 0x54, 0x54, 0xd9, 0xd7, 0x2d, 0x7a, 0xe7, 0xae, 0x53, 0x45, 0x51, 0x14, 0x05, 0x14, 0x45, 0x46, 0x92, 0x48, 0x52, 0x10, 0x05, 0x05, 0x51, 0x01, 0xc5, 0x9c, 0xb3, 0xad, 0xad, 0xb6, 0xda, 0x6a, 0xab, 0x6d, 0xab, 0x6d, 0x68, 0x53, 0xb7, 0x4d, 0xce, 0x39, 0xe7, 0x2c, 0x41, 0x82, 0x64, 0x90, 0x9c, 0x33, 0x92, 0x04, 0x13, 0x19, 0x25, 0xa8, 0x48, 0x50, 0x11, 0x11, 0xe4, 0x15, 0xdd, 0xbf, 0xef, 0xde, 0x37, 0xde, 0x1b, 0xdf, 0x1b, 0xef, 0x8f, 0x7b, 0x77, 0xfd, 0x51, 0xe3, 0x9c, 0xb1, 0xcf, 0xae, 0xbd, 0xd7, 0x9a, 0x73, 0xae, 0xb5, 0xaa, 0x56, 0x99, 0x17, 0x83, 0x90, 0x09, 0x5a, 0x7f, 0x0e, 0x68, 0x05, 0xcc, 0xac, 0x02, 0x50, 0xdd, 0x26, 0x9e, 0xb3, 0x0c, 0xb7, 0x59, 0x86, 0x92, 0x1c, 0x61, 0x90, 0x0f, 0x26, 0x44, 0x86, 0xfc, 0x3b, 0x38, 0x44, 0x98, 0x14, 0x15, 0x60, 0x87, 0xe9, 0x77, 0x6b, 0x2c, 0x20, 0xda, 0xb4, 0x95, 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 0xd8, 0x72, 0x58, 0x63, 0xb1, 0x8a, 0xba, 0xa0, 0xb1, 0x31, 0x21, 0x76, 0xa0, 0xff, 0x70, 0xc2, 0x15, 0x21, 0x38, 0x26, 0x7a, 0x4a, 0x78, 0xcd, 0xba, 0x14, 0x38, 0x60, 0x71, 0x35, 0xcc, 0xc8, 0x7e, 0x56, 0x24, 0x64, 0x7f, 0x4c, 0x44, 0x10, 0xf4, 0xc9, 0x52, 0x55, 0xb1, 0x65, 0x87, 0xc4, 0x65, 0xc9, 0x4e, 0xb2, 0x52, 0x56, 0xb9, 0x67, 0x00, 0xef, 0xde, 0x60, 0x31, 0x53, 0x62, 0x13, 0xb6, 0x52, 0xbb, 0xd8, 0x87, 0xd6, 0xae, 0x39, 0xb8, 0x5e, 0x4b, 0x8c, 0xa1, 0x28, 0x7a, 0xc6, 0x4c, 0x56, 0x48, 0x89, 0x70, 0xe5, 0x0d, 0xb7, 0x31, 0xd8, 0x4c, 0x0d, 0x71, 0x79, 0x36, 0x8b, 0x0d, 0xb5, 0x01, 0x39, 0x9e, 0x20, 0xdd, 0x94, 0x47, 0x04, 0x65, 0x95, 0x38, 0x0c, 0x46, 0xbc, 0xc0, 0x42, 0x35, 0x06, 0x5b, 0x4e, 0x89, 0x88, 0x70, 0xa9, 0xe5, 0x8b, 0x56, 0x2a, 0x83, 0x2d, 0xb7, 0x46, 0x5c, 0x56, 0x5e, 0x75, 0x99, 0xbe, 0x11, 0xd9, 0x02, 0x51, 0x71, 0xa1, 0xa5, 0x5a, 0x77, 0xf5, 0xc4, 0xb9, 0x27, 0x94, 0x35, 0x16, 0xca, 0x9b, 0xc0, 0x58, 0x52, 0x5e, 0x87, 0xc9, 0x2f, 0x1c, 0xbe, 0xe4, 0x42, 0xbe, 0x83, 0xc1, 0x94, 0xe4, 0x73, 0x84, 0xcb, 0x64, 0x48, 0xb3, 0x44, 0x39, 0xf5, 0x91, 0xb0, 0x88, 0x86, 0xff, 0x4e, 0x06, 0x93, 0x41, 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 0x04, 0x57, 0x9a, 0x50, 0x2b, 0x05, 0x44, 0x14, 0xa8, 0x69, 0x21, 0x70, 0x4a, 0x39, 0x65, 0x1c, 0x26, 0xc5, 0x02, 0x8b, 0xce, 0x25, 0xfc, 0xb8, 0x42, 0x63, 0x52, 0x60, 0x31, 0x9b, 0x05, 0xb7, 0xad, 0xdf, 0x05, 0x5f, 0x06, 0xc5, 0xe2, 0x0a, 0x28, 0xc9, 0x49, 0x2b, 0x70, 0x98, 0xd2, 0xcc, 0x0c, 0x0e, 0xb1, 0xb1, 0x84, 0xab, 0x05, 0xf8, 0x9f, 0xc8, 0xf9, 0xa2, 0xe5, 0xba, 0x98, 0xba, 0xcd, 0x5f, 0x10, 0x0c, 0x0e, 0x8d, 0xc6, 0x62, 0x9d, 0xe3, 0x31, 0x78, 0x34, 0x36, 0x61, 0xff, 0x5f, }; optimizesize void *__gb2312_decmap(void) { if (__gb2312_decmap_once) return __gb2312_decmap_ptr; return xloadzd(&__gb2312_decmap_once, &__gb2312_decmap_ptr, __gb2312_decmap_rodata, 11651, 13102, 7482, 2, 0xa41681b8u); /* 77.8602% profit */ }
collenirwin/Codewars-Solutions
Solutions/JavaScript/One line task Square Every Digit(6 kyu).js
sd=x=>+[...""+x].map(n=>n*n).join``
maboglia/Fintech2022
Prj02_Laboratorio/src/enumerazioni/Colori.java
<filename>Prj02_Laboratorio/src/enumerazioni/Colori.java package enumerazioni; public enum Colori { RED("#FF0000"), GREEN("#00FF00"), BLUE("#0000FF"); String esadecimale; private Colori(String esa) { esadecimale = esa; } @Override public String toString() { return esadecimale; } }
yogeshjain999/trb-endpoint
test/rails-app/app/concepts/timeline/operation/public.rb
module Timeline::Operation class Public < Trailblazer::Operation step :model def model(ctx, params:, **) ctx[:model] = Status.load(user: nil, limit: params[:limit].to_i) end end end
Mrjoy832/Chrome-Extension
screenshot and video recorder/chromeStoreCapture.js
function setScreenshotUrl(e) { document.getElementById("imgFixForLong").src = e; }
pbaris/jmix
jmix-ui/ui/src/main/java/io/jmix/ui/data/impl/SimpleDataItem.java
/* * Copyright 2021 Haulmont. * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jmix.ui.data.impl; import io.jmix.core.metamodel.model.utils.MethodsCache; import io.jmix.core.metamodel.model.utils.ObjectPathUtils; import io.jmix.ui.data.DataItem; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * Data item, which contains an instance of any class. */ public class SimpleDataItem implements DataItem, DataItem.HasId { private static final long serialVersionUID = -283289357315588981L; private static transient Map<Class, MethodsCache> methodCacheMap = new ConcurrentHashMap<>(); protected Object item; public SimpleDataItem(Object item) { this.item = item; } /** * @return item */ public Object getItem() { return item; } /** * Sets item. * * @param item item to be set */ public void setItem(Object item) { this.item = item; } /** * Get an property value. Locates the property by the given path in object graph starting from this object. * <p> * Each property in a class which will be used by {@code SimpleDataItem} must have a {@code public} getter method. * Reflection is used to get property values. * * @param path path to the attribute * @return the value of a property with the specified property path. * If property value is an instance of {@link Collection}, * then method returns {@link List} of {@link SimpleDataItem}. * If any traversing property value is null, this method stops here and returns current value. * Otherwise method returns getter value */ @Override public Object getValue(String path) { String[] properties = ObjectPathUtils.parseValuePath(path); Object currentValue = null; Object currentObject = item; for (String property : properties) { if (currentObject == null) { break; } currentValue = getMethodsCache(currentObject).getGetter(property).apply(currentObject); if (currentValue == null) { break; } if (currentValue instanceof Collection) { List<DataItem> items = new ArrayList<>(); for (Object item : (Collection) currentValue) { items.add(new SimpleDataItem(item)); } return items; } currentObject = currentValue; } return currentValue; } protected MethodsCache getMethodsCache(Object object) { Class cls = object.getClass(); return methodCacheMap.computeIfAbsent(cls, k -> MethodsCache.getOrCreate(cls)); } @Override public Object getId() { return item; } }
philipsorst/gitki.java
src/main/java/net/dontdrinkandroot/gitki/service/wiki/DefaultWikiService.java
package net.dontdrinkandroot.gitki.service.wiki; import net.dontdrinkandroot.gitki.model.DirectoryPath; import net.dontdrinkandroot.gitki.model.FilePath; import net.dontdrinkandroot.gitki.model.GitUser; import net.dontdrinkandroot.gitki.model.LockInfo; import net.dontdrinkandroot.gitki.service.git.GitService; import net.dontdrinkandroot.gitki.service.lock.LockMissingException; import net.dontdrinkandroot.gitki.service.lock.LockService; import net.dontdrinkandroot.gitki.service.lock.LockedException; import org.eclipse.jgit.api.errors.GitAPIException; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.inject.Inject; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * @author <NAME> <<EMAIL>> */ @Service public class DefaultWikiService implements WikiService { private GitService gitService; private LockService lockService; private List<String> indexFiles = new ArrayList<>(); protected DefaultWikiService() { /* Reflection Instantiation */ } @Inject public DefaultWikiService(GitService gitService, LockService lockService) { this.gitService = gitService; this.lockService = lockService; } @Value("#{gitkiConfigurationProperties.indexFiles}") public void setIndexFiles(List<String> indexFiles) { this.indexFiles = indexFiles; } @Override public FilePath resolveIndexFile(DirectoryPath directoryPath) { for (String indexFile : this.indexFiles) { FilePath indexFilePath = directoryPath.appendFileName(indexFile); if (this.gitService.exists(indexFilePath)) { return indexFilePath; } } return null; } @Override public LockInfo lock(FilePath filePath, GitUser user) throws LockedException { return this.lockService.lock(filePath, user); } @Override public void save( FilePath filePath, GitUser user, String commitMessage, String content ) throws LockedException, LockMissingException, IOException, GitAPIException { this.lockService.lock(filePath, user); this.gitService.addAndCommit(filePath, content, user, commitMessage); } @Override public void saveAndUnlock( FilePath filePath, GitUser user, String commitMessage, String content ) throws LockedException, IOException, GitAPIException { this.lockService.lock(filePath, user); this.gitService.addAndCommit(filePath, content, user, commitMessage); this.lockService.release(filePath, user); } @Override public LockInfo getLockInfo(FilePath filePath) { return this.lockService.check(filePath); } @Override public void unlock(FilePath filePath, GitUser user) throws LockedException { this.lockService.release(filePath, user); } }
panosant/iot
src/main/java/org/antonakospanos/iot/atlas/web/dto/events/HeartbeatResponseData.java
<filename>src/main/java/org/antonakospanos/iot/atlas/web/dto/events/HeartbeatResponseData.java<gh_stars>0 package org.antonakospanos.iot.atlas.web.dto.events; import org.antonakospanos.iot.atlas.web.dto.ModuleActionDto; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import java.util.List; public class HeartbeatResponseData { private List<ModuleActionDto> actions; public List<ModuleActionDto> getActions() { return actions; } public void setActions(List<ModuleActionDto> actions) { this.actions = actions; } @Override public String toString() { return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE); } }
underlost/Replica
replica/api/urls.py
from __future__ import absolute_import from django.conf.urls import * from django.contrib.auth.decorators import login_required from django.views.generic import TemplateView from coreExtend import api as core_api from replica.pulse import api as pulse_api from replica.contrib.blip import api as blip_api class SimpleStaticView(TemplateView): def get_template_names(self): return "replica/api/%s.html" % (self.kwargs.get('template_name')) def get(self, request, *args, **kwargs): return super(SimpleStaticView, self).get(request, *args, **kwargs) blip_urls = patterns('', url(r'^timelines/(?P<slug>[0-9a-zA-Z_-]+)$', blip_api.TimelineDetail.as_view(), name='timeline-detail'), url(r'^timelines/(?P<slug>[0-9a-zA-Z_-]+)/list$', blip_api.TimelineBlipList.as_view(), name='timeline-blip-list'), url(r'^timelines$', blip_api.TimelineList.as_view(), name='timeline-list'), url(r'^new/blip$', blip_api.BlipCreate.as_view(), name='blip-new'), url(r'^new/timeline$', blip_api.TimelineCreate.as_view(), name='timeline-new'), url(r'^status/(?P<guid>[0-9a-zA-Z_-]+)$', blip_api.BlipDetail.as_view(), name='blip-detail'), url(r'^all$', blip_api.BlipList.as_view(), name='blip-list'), ) urlpatterns = patterns('', # Pulse url(r'^topics$', pulse_api.TopicList.as_view(), name='topic-list'), url(r'^topics/(?P<slug>[0-9a-zA-Z_-]+)$', pulse_api.TopicDetail.as_view(), name='topic-detail'), url(r'^topics/(?P<slug>[0-9a-zA-Z_-]+)/entries$', pulse_api.TopicEntryList.as_view(), name='topic-entries-list'), url(r'^entrytypes$', pulse_api.EntryTypeList.as_view(), name='entrytype-list'), url(r'^entrytypes/(?P<slug>[0-9a-zA-Z_-]+)$', pulse_api.EntryTypeDetail.as_view(), name='entrytype-detail'), url(r'^entrytypes/(?P<slug>[0-9a-zA-Z_-]+)/entries$', pulse_api.EntryTypeEntryList.as_view(), name='entrytype-entries-list'), url(r'^entries$', pulse_api.EntryList.as_view(), name='entry-list'), url(r'^entries/drafts$', pulse_api.EntryDraftList.as_view(), name='entry-drafts-list'), url(r'^entries/upcoming$', pulse_api.EntryUpcomingList.as_view(), name='entry-upcoming-list'), url(r'^entry/(?P<guid>[0-9a-zA-Z_-]+)$', pulse_api.EntryDetail.as_view(), name='entry-detail'), url(r'^pages$', pulse_api.PageList.as_view(), name='page-list'), url(r'^page/(?P<guid>[0-9a-zA-Z_-]+)$', pulse_api.PageDetail.as_view(), name='page-detail'), # contrib.blip url(r'^blip/', include(blip_urls)), url(r'^users/(?P<username>[0-9a-zA-Z_-]+)/timelines$', blip_api.UserTimelineList.as_view(), name='user-timeline-list'), url(r'^users/(?P<username>[0-9a-zA-Z_-]+)/blip$', blip_api.UserBlipList.as_view(), name='user-blip-list'), # Users url(r'^users/(?P<username>[0-9a-zA-Z_-]+)$', core_api.UserDetail.as_view(), name='user-detail'), url(r'^users$', core_api.UserList.as_view(), name='user-list'), url(r'^current$', core_api.CurrentUser.as_view(), name='user-current'), #Static #url(r'^(?P<template_name>\w+)$', login_required(SimpleStaticView.as_view()), name='api'), url(r'^$', TemplateView.as_view(template_name="replica/api/index.html"), name='API-Index'), )
YolandaMDavis/nifi
nifi-nar-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/main/java/org/apache/nifi/processors/evtx/XmlRootNodeHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.processors.evtx; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.apache.nifi.processors.evtx.parser.bxml.RootNode; public class XmlRootNodeHandler implements RootNodeHandler { public static final String EVENTS = "Events"; private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newFactory(); private final XMLStreamWriter xmlStreamWriter; private final XmlBxmlNodeVisitorFactory xmlBxmlNodeVisitorFactory; public XmlRootNodeHandler(OutputStream outputStream) throws IOException { this(getXmlStreamWriter(new BufferedOutputStream(outputStream)), XmlBxmlNodeVisitor::new); } public XmlRootNodeHandler(XMLStreamWriter xmlStreamWriter, XmlBxmlNodeVisitorFactory xmlBxmlNodeVisitorFactory) throws IOException { this.xmlStreamWriter = xmlStreamWriter; this.xmlBxmlNodeVisitorFactory = xmlBxmlNodeVisitorFactory; try { this.xmlStreamWriter.writeStartDocument(); try { this.xmlStreamWriter.writeStartElement(EVENTS); } catch (XMLStreamException e) { this.xmlStreamWriter.close(); throw e; } } catch (XMLStreamException e) { throw new IOException(e); } } private static XMLStreamWriter getXmlStreamWriter(OutputStream outputStream) throws IOException { try { return XML_OUTPUT_FACTORY.createXMLStreamWriter(outputStream, "UTF-8"); } catch (XMLStreamException e) { throw new IOException(e); } } @Override public void handle(RootNode rootNode) throws IOException { xmlBxmlNodeVisitorFactory.create(xmlStreamWriter, rootNode); } @Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } } }
phanquanghiep123/fc40-fe
app/containers/NSC_CancelRequest/DetailPage/BasketsInUseTable/columnDefs.js
<filename>app/containers/NSC_CancelRequest/DetailPage/BasketsInUseTable/columnDefs.js /* eslint-disable indent */ import { formatToCurrency } from 'utils/numberUtils'; import CellRenderer from './CustomCellRenderer'; import CustomCellEditor from './CustomCellEditor'; import CustomSelectCellEditor from './CustomSelectCellEditor'; import ImageUploadCellRenderer from './ImageUploadCellRenderer'; import appTheme from '../../../App/theme'; import ActionsRenderer from './ActionsRenderer'; import MuiSelectEditor from '../../../../components/MuiSelect/Editor'; import HiddenCellData from '../../../../components/FormikUI/HiddenCellData'; import MuiSelectInputEditor from '../../../../components/MuiSelect/InputEditor'; import PinnedRowRenderer from '../../../../components/FormikUI/PinnedRowRenderer2'; import { getNested, isNumberString } from '../../../App/utils'; import { BASKET_INUSE_TABLE, MAX_INT, ASSET_TABLE } from '../constants'; import { numericParser, searchSelectOptions } from '../utils'; import * as appActions from '../../../App/actions'; import { basketsInUseFields } from '../tableFields'; export const numberCurrency = params => params.value && isNumberString(params.value) ? formatToCurrency(params.value) : params.value; const alignRight = { textAlign: 'right', paddingRight: 5, }; // positive float number regex // const positiveNumberRgx = /^\d+(\.\d+)?$/; const makeEditableCellStyle = params => ({ background: params.node.rowPinned ? 'inherit' : appTheme.palette.background.default, paddingLeft: '0.5rem', paddingRight: '0.5rem', ...(params.data.isDeleted ? { textDecoration: 'line-through', } : {}), }); const makeDefaultCellStyle = params => params.data.isDeleted ? { textDecoration: 'line-through', } : {}; export const makeDefaultColDef = () => ({ editable: false, resizable: false, suppressMovable: true, cellEditorFramework: CustomCellEditor, cellRendererFramework: undefined, cellStyle: makeDefaultCellStyle, pinnedRowCellRendererFramework: HiddenCellData, }); /** * Check If new row added is duplicated * @param context * @param rowIndex * @param data * @param currentField - one of 'palletBasketCode' or 'basketCodeLocator' * @param selected - selected value * @param dispatch * @return {boolean} - true => is duplicated */ const checkDuplicatedRow = ( context, rowIndex, data, currentField, selected, dispatch, ) => { const t = basketsInUseFields; const tableData = [ ...(getNested(context.props.formik, 'values', BASKET_INUSE_TABLE) || []), ].filter((val, index) => val && index !== rowIndex); if (tableData && tableData.length) { // eslint-disable-next-line no-restricted-syntax for (const row of tableData) { if ( (currentField === t.palletBasketCode && row[currentField] === selected.value && row[t.basketLocatorCode] === data[t.basketLocatorCode]) || (currentField === t.basketLocatorCode && row[currentField] === selected.value && row[t.palletBasketCode] && row[t.palletBasketCode] === data[t.palletBasketCode]) ) { dispatch( appActions.showWarning( 'Không được chọn trùng kho nguồn và mã khay sọt', ), ); return true; } } } return false; }; export const makeColumnDefs = ( pageType, receiptData, selectBoxData, onOpenDialogDelete, onOpenImagePopup, onOpenSelectAssetsPopup, onSetDataUseTable, onEditPopup, onFetchBasketLocatorAC, onFetchBasketByLocatorAC, onUpdateBasketsInUsePinnedData, isDraftSelected, dispatch, ) => { const t = basketsInUseFields; const isAutoReceipt = getNested(receiptData, 'isAutoReceipt'); return [ { headerName: 'STT', field: t.stt, cellRenderer: ({ rowIndex }) => rowIndex + 1, width: 40, suppressSizeToFit: true, }, { headerName: '<NAME>', field: t.basketLocatorName, editable: false, cellStyle: params => makeDefaultCellStyle(params), cellRendererFramework: CellRenderer, suppressSizeToFit: true, width: 120, cellEditorFramework: MuiSelectEditor, cellEditorParams: ({ context, rowIndex, data }) => ({ promiseOptions: (inputValue, callback) => { const filters = context.props.formik.values; onFetchBasketLocatorAC(filters, returnedData => { const filteredData = searchSelectOptions(inputValue, returnedData); callback(filteredData); }); }, onChange: selected => { const { formik } = context.props; const isDuplicated = checkDuplicatedRow( context, rowIndex, data, t.basketLocatorCode, selected, dispatch, ); if (isDuplicated) { updateRowData(context, BASKET_INUSE_TABLE, rowIndex, data); return; } const updatedValues = { [t.basketLocatorCode]: selected.value, [t.basketLocatorName]: selected.label, [t.locatorType]: selected.locatorType, [t.inStockQuantityDiff]: data[t.palletBasketCode] && data[t.cancelQuantity] && isNumberString(data[t.cancelQuantity]) ? -parseFloat(data[t.cancelQuantity] || '0') : null, }; // update palletBasketCode & related fields if they are filled if (data[t.palletBasketCode]) { updateRowData(context, BASKET_INUSE_TABLE, rowIndex, updatedValues); onFetchBasketByLocatorAC( formik, selected.locatorType, '', baskets => { const [selectedBasket] = baskets.filter( bs => bs && bs.value === data[t.palletBasketCode], ); if (selectedBasket) { updatedValues[t.inStockQuantity] = selectedBasket.inStock; updatedValues[t.inStockQuantityDiff] = data[t.cancelQuantity] && isNumberString(data[t.cancelQuantity]) ? parseFloat(updatedValues[t.inStockQuantity] || '0') - parseFloat(data[t.cancelQuantity] || '0') : null; } else { updatedValues[t.palletBasketCode] = null; updatedValues[t.inStockQuantity] = null; updatedValues[t.uom] = null; updatedValues[t.inStockQuantityDiff] = null; } updateRowData( context, BASKET_INUSE_TABLE, rowIndex, updatedValues, ); setTimeout(() => onUpdateBasketsInUsePinnedData(formik)); }, ); return; } updateRowData(context, BASKET_INUSE_TABLE, rowIndex, updatedValues); }, parseValue: value => value || undefined, }), }, { headerName: '<NAME>', field: t.palletBasketCode, editable: false, cellStyle: params => makeDefaultCellStyle(params), cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, suppressSizeToFit: true, width: 120, cellEditorFramework: CustomSelectCellEditor, cellEditorParams: ({ context, rowIndex, data }) => ({ dependencies: [t.basketLocatorCode], timeout: 1000, promiseOptions: (inputValue, callback) => { const { formik } = context.props; const { basketLocatorCode } = data; if (basketLocatorCode) onFetchBasketByLocatorAC( formik, basketLocatorCode, inputValue, callback, ); }, onChange: selected => { const isDuplicated = checkDuplicatedRow( context, rowIndex, data, t.palletBasketCode, selected, dispatch, ); const updatedValues = isDuplicated ? { [t.palletBasketCode]: null, [t.palletBasketName]: null, [t.inStockQuantityDiff]: null, } : { [t.palletBasketCode]: selected.value, [t.palletBasketName]: selected.palletBasketName, [t.inStockQuantity]: selected.inStock, [t.uom]: selected.uom, [t.inStockQuantityDiff]: data[t.cancelQuantity] && isNumberString(data[t.cancelQuantity]) ? parseFloat(selected.inStock || '0') - parseFloat(data[t.cancelQuantity] || '0') : null, }; updateRowData(context, BASKET_INUSE_TABLE, rowIndex, updatedValues); }, parseValue: value => value || undefined, }), }, { headerName: 'T<NAME>', field: t.palletBasketName, cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, }, { headerName: 'SL huỷ tối đa', field: t.maxCancelQuantity, valueFormatter: numberCurrency, cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, pinnedRowCellRendererParams: { style: { color: appTheme.palette.text.primary }, }, hide: !isAutoReceipt, cellStyle: alignRight, headerClass: 'ag-numeric-header', }, { headerName: 'SL tồn', field: t.inStockQuantity, valueFormatter: numberCurrency, cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, hide: isAutoReceipt, cellStyle: alignRight, headerClass: 'ag-numeric-header', }, { headerName: 'SL hủy', field: t.cancelQuantity, valueFormatter: numberCurrency, headerClass: isDraftSelected ? 'ag-numeric-header' : 'ag-numeric-header ag-header-required', editable: false, cellStyle: params => ({ ...makeDefaultCellStyle(params), ...alignRight }), cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, pinnedRowCellRendererParams: { style: { color: appTheme.palette.text.primary }, }, cellEditorParams: () => ({ dependencies: [t.palletBasketCode], }), valueParser: numericParser, valueSetter: params => { const { data, node, newValue, context } = params; if ((newValue || newValue === 0) && isNumberString(newValue)) { if (parseFloat(newValue) > MAX_INT) { // if invalid input updateRowData(context, BASKET_INUSE_TABLE, node.rowIndex, { [t.cancelQuantity]: undefined, [t.inStockQuantityDiff]: null, [t.maxCancelQuantityDiff]: null, }); setTimeout(() => dispatch( appActions.showWarning( `SL huỷ không được quá ${formatToCurrency(MAX_INT)}`, ), ), ); return true; } const updatedValues = { [t.cancelQuantity]: newValue, [t.inStockQuantityDiff]: parseFloat(data[t.inStockQuantity] || '0') - parseFloat(newValue || '0'), [t.maxCancelQuantityDiff]: parseFloat(data[t.maxCancelQuantity] || '0') - parseFloat(newValue || '0'), }; updateRowData( context, BASKET_INUSE_TABLE, node.rowIndex, updatedValues, ); return true; } // if invalid input updateRowData(context, BASKET_INUSE_TABLE, node.rowIndex, { [t.cancelQuantity]: isNumberString(newValue) ? newValue : undefined, [t.inStockQuantityDiff]: null, [t.maxCancelQuantityDiff]: null, }); return true; }, }, { headerName: 'Chênh lệch (Tối đa - Huỷ)', field: t.maxCancelQuantityDiff, valueFormatter: numberCurrency, cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, pinnedRowCellRendererParams: { style: { color: appTheme.palette.text.primary }, }, cellStyle: params => { const isNegative = typeof params.value === 'number' && params.value < 0; const isPositive = typeof params.value === 'number' && params.value > 0; let style = {}; if (isNegative) style = { color: 'red', fontWeight: 'bold' }; if (isPositive) style = { color: 'blue', fontWeight: 'bold' }; return { ...style, ...alignRight }; }, headerClass: 'ag-numeric-header', hide: !isAutoReceipt, }, { headerName: 'Chênh lệch (Tồn - Huỷ)', field: t.inStockQuantityDiff, headerClass: 'ag-numeric-header', valueFormatter: numberCurrency, cellRendererFramework: CellRenderer, pinnedRowCellRendererFramework: PinnedRowRenderer, cellStyle: params => { const isNegative = typeof params.value === 'number' && params.value < 0; let style = {}; if (isNegative) style = { color: 'red', fontWeight: 'bold' }; return { ...style, ...alignRight }; }, hide: isAutoReceipt, }, { headerName: 'Đơn vị tính', field: t.uom, cellRendererFramework: CellRenderer, }, { headerName: 'Nguyên nhân hủy', field: t.cause, resizable: false, suppressSizeToFit: true, width: 120, headerClass: isDraftSelected ? null : 'ag-header-required', editable: pageType.create || (pageType.edit && !isAutoReceipt), cellStyle: params => { if (pageType.create || pageType.edit) { return makeEditableCellStyle(params); } return makeDefaultCellStyle(params); }, cellRendererFramework: CellRenderer, cellEditorFramework: MuiSelectInputEditor, cellEditorParams: ({ context, rowIndex, data }) => ({ dependencies: [t.cause], timeout: 1000, options: context.props.selectBoxData.causeAsset, onChange: selected => { const isDuplicated = checkDuplicatedRow( context, rowIndex, data, t.cause, selected, dispatch, ); const updatedValues = isDuplicated ? { cause: '', causeCode: null, } : { cause: selected.label, causeCode: selected.value, }; const dataAsset = context.props.formik.values.assets.map(item => { if ( data.cancelRequestBasketDetailCode === item.cancelRequestBasketDetailCode ) { return { ...item, cause: selected.label, causeCode: selected.value, }; } return { ...item, }; }); updateRowData(context, BASKET_INUSE_TABLE, rowIndex, updatedValues); context.props.formik.updateFieldValue(ASSET_TABLE, dataAsset, true); }, parseValue: value => value || undefined, }), }, { headerName: 'Tình trạng trước khi hủy', field: t.assetStatus, headerClass: isDraftSelected ? null : 'ag-header-required', editable: pageType.create || pageType.edit, cellStyle: params => { if (pageType.create || pageType.edit) { return makeEditableCellStyle(params); } return makeDefaultCellStyle(params); }, cellRendererFramework: CellRenderer, cellEditorFramework: CustomCellEditor, cellEditorParams: () => ({ dependencies: [t.palletBasketCode], }), }, { headerName: 'Hình ảnh', field: t.images, editable: false, // edit directly in the CellRenderer // headerClass: 'ag-header-required', suppressSizeToFit: true, width: 120, cellStyle: params => { if (pageType.create || pageType.edit) { return makeEditableCellStyle(params); } return makeDefaultCellStyle(params); }, cellRendererFramework: ImageUploadCellRenderer, cellRendererParams: ({ context }) => ({ formik: context.props.formik, pageType, onOpenImagePopup, dispatch, }), }, { headerName: '<NAME>', field: t.note, editable: pageType.create || (pageType.edit && !isAutoReceipt), cellStyle: params => { if (pageType.create || (pageType.edit && !isAutoReceipt)) { return makeEditableCellStyle(params); } return makeDefaultCellStyle(params); }, cellRendererFramework: CellRenderer, cellEditorFramework: CustomCellEditor, cellEditorParams: () => ({ dependencies: [t.palletBasketCode], }), }, { headerName: '', field: 'actions', width: 100, editable: false, cellClass: 'cell-action-butons', cellRendererFramework: ActionsRenderer, cellRendererParams: { onOpenDialogDelete, pageType, onOpenSelectAssetsPopup, onSetDataUseTable, onEditPopup, receiptData, }, suppressNavigable: true, suppressSizeToFit: true, }, ]; }; /** * Update row data * @param context * @param tableId * @param rowIndex * @param updatedValues */ function updateRowData(context, tableId, rowIndex, updatedValues) { context.props.formik.updateFieldArrayValue(tableId, rowIndex, updatedValues); } // function isLoadedFromServer(params) { // return getNested(params.data, 'isLoadedFromServer'); // }
soajs/soajs.controller
test/data/provision/marketplace/payment.js
<reponame>soajs/soajs.controller 'use strict'; let service = { _id: "5e1f3e71c5a59210a8152626", type: "service", name: "payment", configuration: { subType: "market", port: 4006, requestTimeout: 30, requestTimeoutRenewal: 5, group: "SOAJS Core Services" }, versions: [{ "version": "1", maintenance: { port: { type: "maintenance" }, readiness: "/heartbeat", commands: [ { label: "Releoad Registry", path: "/reloadRegistry", icon: "registry" }, { label: "Resource Info", path: "/resourceInfo", icon: "info" } ] }, apis: [ { l: "Login Through Passport", v: "/passport/login/:strategy", m: "get", group: "Guest" }, { l: "Login Through Passport Validate", v: "/passport/validate/:strategy", m: "get", group: "Guest" } ], extKeyRequired: true, oauth: true, provision_ACL: false, urac: false, urac_ACL: false, urac_Profile: false } ] }; module.exports = service;
MarcoBgn/maestrano-connector-rails
spec/integration/id_references_spec.rb
<filename>spec/integration/id_references_spec.rb require 'spec_helper' describe 'id references' do class Entities::IdReference < Maestrano::Connector::Rails::Entity def self.external_entity_name 'Payment' end def self.connec_entity_name 'Payment' end def self.mapper_class PaymentMapper end def self.references { record_references: %w(organization_id), id_references: %w(lines/id) } end def self.object_name_from_connec_entity_hash(entity) entity['title'] end def self.id_from_external_entity_hash(entity) entity['ID'] end class LineMapper extend HashMapper map from('id'), to('ID') map from('amount'), to('Price') end class PaymentMapper extend HashMapper map from('title'), to('Title') map from('organization_id'), to('AccountId') map from('lines'), to('Line'), using: LineMapper end end let(:provider) { 'provider' } let(:oauth_uid) { 'oauth uid' } let!(:organization) { create(:organization, oauth_provider: provider, oauth_uid: oauth_uid) } let(:connec_client) { Maestrano::Connector::Rails::ConnecHelper.get_client(organization) } let(:external_client) { Object.new } let(:connec_payment_id) { '1205c5e0-e18e-0133-890f-07d4de9f9781' } let(:connec_line_id1) { '3405c5e0-e18e-0133-890f-07d4de9f9781' } let(:connec_line_id2) { '4505c5e0-e18e-0133-890f-07d4de9f9781' } let(:ext_payment_id) { 'ext payment id' } let(:ext_org_id) { 'ext org id' } let(:ext_line_id1) { 'ext line id1' } let(:ext_line_id2) { 'ext line id2' } let(:payment_title) { 'This is a payment' } let(:entity_name) { 'id_reference' } before { allow(connec_client).to receive(:get).and_return(ActionDispatch::Response.new(200, {}, {payments: [connec_payment]}.to_json, {})) allow(connec_client).to receive(:batch).and_return(ActionDispatch::Response.new(200, {}, {results: [{status: 200, body: {payments: {}}}]}.to_json, {})) allow_any_instance_of(Entities::IdReference).to receive(:get_external_entities).and_return([]) allow(Maestrano::Connector::Rails::External).to receive(:entities_list).and_return([entity_name]) organization.reset_synchronized_entities(true) } subject { Maestrano::Connector::Rails::SynchronizationJob.new.sync_entity(entity_name, organization, connec_client, external_client, organization.last_synchronization_date, {}) } describe 'a creation from connec' do before { allow_any_instance_of(Entities::IdReference).to receive(:create_external_entity).and_return(entity_received_after_creation) } let(:connec_payment) { { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_payment_id } ], 'title' => payment_title, 'organization_id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => '2305c5e0-e18e-0133-890f-07d4de9f9781' }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_org_id } ], 'lines' => lines } } let(:lines) { [ { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id1 } ], 'amount' => 123 }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id2 } ], 'amount' => 456 } ] } let(:mapped_entity) { { Title: payment_title, AccountId: ext_org_id, Line: [ { Price: 123 }, { Price: 456 } ] }.with_indifferent_access } let(:entity_received_after_creation) { { 'ID' => ext_payment_id, 'Title' => payment_title, 'AccountId' => ext_org_id, 'Line' => [ { 'ID' => ext_line_id1, 'Price' => 123 }, { 'ID' => ext_line_id2, 'Price' => 456 } ] } } let(:batch_params) { { :sequential=>true, :ops=> [ { :method=>"put", :url=>"/api/v2/#{organization.uid}/payments/#{connec_payment_id}", :params=> { :payments=>{ 'id' => [ { 'id' => ext_payment_id, 'provider' =>provider, 'realm' =>oauth_uid } ], 'lines' => [ { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id1 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id1 } ] }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id2 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id2 } ] } ] } } } ] } } it 'handles the idmap correctly' do expect{ subject }.to change{ Maestrano::Connector::Rails::IdMap.count }.by(1) idmap = Maestrano::Connector::Rails::IdMap.last expect(idmap.name).to eql(payment_title) expect(idmap.connec_entity).to eql('payment') expect(idmap.external_entity).to eql('payment') expect(idmap.message).to be_nil expect(idmap.external_id).to eql(ext_payment_id) expect(idmap.connec_id).to eql(connec_payment_id) end it 'does the mapping correctly' do idmap = Entities::IdReference.create_idmap(organization_id: organization.id, external_id: ext_payment_id, connec_id: connec_payment_id) allow(Entities::IdReference).to receive(:find_or_create_idmap).and_return(idmap) expect_any_instance_of(Entities::IdReference).to receive(:push_entities_to_external).with([{entity: mapped_entity, idmap: idmap, id_refs_only_connec_entity: {'lines' => lines.map { |line| line.delete('amount'); line }}}]) subject end it 'send the external ids to connec' do expect(connec_client).to receive(:batch).with(batch_params) subject end end describe 'an update from connec with no new lines' do before { allow_any_instance_of(Entities::IdReference).to receive(:update_external_entity).and_return(entity_received_after_update) } let!(:idmap) { Entities::IdReference.create_idmap(organization_id: organization.id, external_id: ext_payment_id, connec_id: connec_payment_id) } let(:connec_payment) { { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_payment_id }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_payment_id } ], 'title' => payment_title, 'organization_id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => '2305c5e0-e18e-0133-890f-07d4de9f9781' }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_org_id } ], 'lines' => lines } } let(:lines) { [ { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id1 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id1 } ], 'amount' => 345, }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id2 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id2 } ], 'amount' => 678 } ] } let(:mapped_entity) { { Title: payment_title, AccountId: ext_org_id, Line: [ { ID: ext_line_id1, Price: 345 }, { ID: ext_line_id2, Price: 678 } ] }.with_indifferent_access } let(:entity_received_after_update) { { 'ID' => ext_payment_id, 'Title' => payment_title, 'AccountId' => ext_org_id, 'Line' => [ { 'ID' => ext_line_id1, 'Price' => 123 }, { 'ID' => ext_line_id2, 'Price' => 456 } ] } } it 'update the idmap' do subject expect(idmap.reload.message).to be_nil expect(idmap.reload.name).to eql(payment_title) expect(idmap.reload.last_push_to_external > 1.minute.ago).to be true end it 'does the mapping correctly' do expect_any_instance_of(Entities::IdReference).to receive(:push_entities_to_external).with([{entity: mapped_entity, idmap: idmap, id_refs_only_connec_entity: {'lines' => lines.map { |line| line.delete('amount'); line }}}]) subject end it 'does not send anything back to connec' do expect(connec_client).to receive(:batch) # TODO change when performance improvment in connec helper is done # expect(connec_client).to_not receive(:batch) subject end end describe 'an update from connec with a new lines' do before { allow_any_instance_of(Entities::IdReference).to receive(:update_external_entity).and_return(entity_received_after_update) } let!(:idmap) { Entities::IdReference.create_idmap(organization_id: organization.id, external_id: ext_payment_id, connec_id: connec_payment_id) } let(:connec_line_id3) { '8905c5e0-e18e-0133-890f-07d4de9f9781' } let(:ext_line_id3) { 'ext line id3' } let(:connec_payment) { { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_payment_id }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_payment_id } ], 'title' => payment_title, 'organization_id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => '2305c5e0-e18e-0133-890f-07d4de9f9781' }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_org_id } ], 'lines' => lines } } let(:lines) { [ { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id1 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id1 } ], 'amount' => 345, }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id2 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id2 } ], 'amount' => 678 }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id3 } ], 'amount' => 999 } ] } let(:mapped_entity) { { Title: payment_title, AccountId: ext_org_id, Line: [ { ID: ext_line_id1, Price: 345 }, { ID: ext_line_id2, Price: 678 }, { Price: 999 } ] }.with_indifferent_access } let(:entity_received_after_update) { { 'ID' => ext_payment_id, 'Title' => payment_title, 'AccountId' => ext_org_id, 'Line' => [ { 'ID' => ext_line_id1, 'Price' => 123 }, { 'ID' => ext_line_id2, 'Price' => 456 }, { 'ID' => ext_line_id3, 'Price' => 999 } ] } } let(:batch_params) { { :sequential=>true, :ops=> [ { :method=>"put", :url=>"/api/v2/#{organization.uid}/payments/#{connec_payment_id}", :params=> { :payments=>{ 'id' => [ { 'id' => ext_payment_id, 'provider' =>provider, 'realm' =>oauth_uid } ], 'lines' => [ { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id1 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id1 } ] }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id2 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id2 } ] }, { 'id' => [ { 'realm' => 'org-fg4a', 'provider' => 'connec', 'id' => connec_line_id3 }, { 'realm' => oauth_uid, 'provider' => provider, 'id' => ext_line_id3 } ] } ] } } } ] } } it 'update the idmap' do subject expect(idmap.reload.message).to be_nil expect(idmap.reload.name).to eql(payment_title) expect(idmap.reload.last_push_to_external > 1.minute.ago).to be true end it 'does the mapping correctly' do expect_any_instance_of(Entities::IdReference).to receive(:push_entities_to_external).with([{entity: mapped_entity, idmap: idmap, id_refs_only_connec_entity: {'lines' => lines.map { |line| line.delete('amount'); line }}}]) subject end it 'send the external ids to connec' do expect(connec_client).to receive(:batch).with(batch_params) subject end end end
Yurai-Kitadate/A_2108
src/repository/plan.go
<gh_stars>0 package repository import ( "sync" "github.com/jphacks/A_2108/src/domain" "gorm.io/gorm" ) type PlanRepository struct { db *gorm.DB } func NewPlanRepository(db *gorm.DB) *PlanRepository { return &PlanRepository{ db: db, } } type PlanError struct { s string } func (e PlanError) Error() string { return e.s } type dictionary_i2s struct { sync.Mutex dict map[int]string } func NewDict_i2s() *dictionary_i2s { return &dictionary_i2s{ dict: make(map[int]string), } } func (d *dictionary_i2s) Set(key int, value string) { d.Lock() d.dict[key] = value d.Unlock() } func (d *dictionary_i2s) Get(key int) string { d.Lock() defer d.Unlock() return d.dict[key] } type dictionary_s2i struct { sync.Mutex dict map[string]int } func NewDict_s2i() *dictionary_s2i { return &dictionary_s2i{ dict: make(map[string]int), } } func (d *dictionary_s2i) Set(key string, value int) { d.Lock() d.dict[key] = value d.Unlock() } func (d *dictionary_s2i) Get(key string) int { d.Lock() defer d.Unlock() return d.dict[key] } var ( seasonKey2def *dictionary_i2s categoryKey2def *dictionary_i2s timespanKey2def *dictionary_i2s seasonDef2key *dictionary_s2i categoryDef2key *dictionary_s2i timespanDef2key *dictionary_s2i ) func initPlan(db *gorm.DB) { // Prefetch Definitions { seasonKey2def = NewDict_i2s() categoryKey2def = NewDict_i2s() timespanKey2def = NewDict_i2s() seasonDef2key = NewDict_s2i() categoryDef2key = NewDict_s2i() timespanDef2key = NewDict_s2i() seasonDefinition := []domain.DBSeasonDefinition{} timeSpanDefinition := []domain.DBTimeSpanDefinition{} categoryDefinition := []domain.DBCategoryDefinition{} if err := db.Find(&seasonDefinition).Error; err != nil { panic("DB Load Error") } for _, v := range seasonDefinition { seasonKey2def.Set(v.ID, v.Description) seasonDef2key.Set(v.Description, v.ID) } if err := db.Find(&timeSpanDefinition).Error; err != nil { panic("DB Load Error") } for _, v := range timeSpanDefinition { timespanKey2def.Set(v.ID, v.Description) timespanDef2key.Set(v.Description, v.ID) } if err := db.Find(&categoryDefinition).Error; err != nil { panic("DB Load Error") } for _, v := range categoryDefinition { categoryKey2def.Set(v.ID, v.Description) categoryDef2key.Set(v.Description, v.ID) } } } func (pr PlanRepository) GetPlanByID(planID int) (domain.Plan, error) { db := pr.db plan := domain.Plan{} { db_plan := domain.DBPlan{} err := db.First(&db_plan, planID).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.PlanId = db_plan.ID plan.Title = db_plan.Title plan.Description = db_plan.Description plan.Image = db_plan.Image plan.CreatedAt = db_plan.CreatedAt ur := UserRepository{db} user, err := ur.GetUserByID(db_plan.UserID) if err != nil { return plan, errHandling(err) } plan.CreatorUser = user } { db_days := []domain.DBDay{} err := db.Where("plan_id = ?", planID).Find(&db_days).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Days = make(domain.Days, len(db_days)) for i, v := range db_days { plan.Days[i].ID = v.ID plan.Days[i].NthDay = v.NthDay } } { for i, day := range plan.Days { db_headings := []domain.DBHeading{} err := db.Where("day_id = ?", day.ID).Find(&db_headings).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Days[i].Headings = make(domain.Headings, len(db_headings)) for j, v := range db_headings { heading := &plan.Days[i].Headings[j] heading.ID = v.ID heading.Text = v.HeadingText heading.Order = v.Order } db_schedules := []domain.DBSchedule{} err = db.Where("day_id = ?", day.ID).Find(&db_schedules).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Days[i].Schedule = make(domain.Schedule, len(db_schedules)) for j, v := range db_schedules { schedule := &plan.Days[i].Schedule[j] schedule.ID = v.ID schedule.Title = v.Title schedule.Description = v.Description schedule.StartTime = v.StartTime schedule.EndTime = v.EndTime schedule.HpLink = v.HPLink schedule.ReservationLink = v.ReservationLink schedule.Order = v.Order db_address := domain.DBAddress{} err = db.Where("schedule_id = ?", plan.Days[i].Schedule[j].ID).First(&db_address).Error if err == gorm.ErrRecordNotFound { schedule.Address = nil } else if err != nil { return domain.Plan{}, err } else { schedule.Address = &domain.Address{ ID: db_address.ID, PlusCode: db_address.PlusCode, } } } } } { conditions := domain.DBCondition{} err := db.Where("plan_id = ?", plan.PlanId).First(&conditions).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Conditions.ID = conditions.ID plan.Conditions.EstimatedCost = conditions.EstimatedCharge db_seasons := []domain.DBSeason{} err = db.Where("condition_id = ?", conditions.ID).Find(&db_seasons).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Conditions.Season = make([]domain.Season, len(db_seasons)) for i, v := range db_seasons { season := &plan.Conditions.Season[i] season.ID = v.ID season.Text = seasonKey2def.Get(v.SeasonDefinitionID) } db_categories := []domain.DBCategory{} err = db.Where("condition_id = ?", conditions.ID).Find(&db_categories).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Conditions.Category = make([]domain.Category, len(db_categories)) for i, v := range db_categories { category := &plan.Conditions.Category[i] category.ID = v.ID category.Text = categoryKey2def.Get(v.CategoryDefinitionID) } db_timeSpan := []domain.DBTimeSpan{} err = db.Where("condition_id = ?", conditions.ID).Find(&db_timeSpan).Error if err != nil { return domain.Plan{}, errHandling(err) } plan.Conditions.TimeSpan = make([]domain.TimeSpan, len(db_timeSpan)) for i, v := range db_timeSpan { timespan := &plan.Conditions.TimeSpan[i] timespan.ID = v.ID timespan.Text = timespanKey2def.Get(v.TimeSpanDefinitionID) } } return plan, nil } func (pr PlanRepository) GetPlansOrderedbyTime(limit int) (domain.Plans, error) { db := pr.db var plans domain.Plans db_plans := []domain.DBPlan{} err := db.Limit(limit).Find(&db_plans).Error if err != nil { return domain.Plans{}, errHandling(err) } plans = make(domain.Plans, len(db_plans)) for i, v := range db_plans { plans[i], err = pr.GetPlanByID(v.ID) if err != nil { return plans, errHandling(err) } } return plans, nil } func (pr PlanRepository) DeletePlanByID(planID int) error { return nil } func (pr PlanRepository) PostPlan(plan domain.Plan) (int, error) { db := pr.db userID, err := func() (int, error) { if user, ok := plan.CreatorUser.(domain.User); ok { return user.ID, nil } if user, ok := plan.CreatorUser.(domain.MaskedUser); ok { return user.ID, nil } return 0, &PlanError{CANNOT_CONVERT} }() if err != nil { return 0, err } var planID int { db_plan := domain.DBPlan{ Title: plan.Title, Description: plan.Description, Image: plan.Image, UserID: userID, CreatedAt: plan.CreatedAt, } err := db.Create(&db_plan).Error if err != nil { return 0, errHandling(err) } planID = db_plan.ID } { conditions := domain.DBCondition{ PlanID: planID, EstimatedCharge: plan.Conditions.EstimatedCost, } err := db.Create(&conditions).Error if err != nil { return 0, errHandling(err) } db_seasons := make([]domain.DBSeason, len(plan.Conditions.Season)) for i, v := range plan.Conditions.Season { season := &db_seasons[i] season.ConditionID = conditions.ID season.SeasonDefinitionID = seasonDef2key.Get(v.Text) } err = db.Create(&db_seasons).Error if err != nil { return 0, errHandling(err) } db_timeSpan := make([]domain.DBTimeSpan, len(plan.Conditions.TimeSpan)) for i, v := range plan.Conditions.TimeSpan { timespan := &db_timeSpan[i] timespan.ConditionID = conditions.ID timespan.TimeSpanDefinitionID = timespanDef2key.Get(v.Text) } err = db.Create(&db_timeSpan).Error if err != nil { return 0, errHandling(err) } db_categories := make([]domain.DBCategory, len(plan.Conditions.Category)) for i, v := range plan.Conditions.Category { category := &db_categories[i] category.ConditionID = conditions.ID category.CategoryDefinitionID = categoryDef2key.Get(v.Text) } err = db.Create(&db_categories).Error if err != nil { return 0, errHandling(err) } } { db_days := make([]domain.DBDay, len(plan.Days)) for i, v := range plan.Days { db_days[i].PlanID = planID db_days[i].NthDay = v.NthDay } err := db.Create(&db_days).Error if err != nil { return 0, errHandling(err) } for i, v := range db_days { plan.Days[i].ID = v.ID } } { for _, day := range plan.Days { db_headings := make([]domain.DBHeading, len(day.Headings)) for j, v := range day.Headings { db_heading := &db_headings[j] db_heading.DayID = day.ID db_heading.HeadingText = v.Text db_heading.Order = v.Order } err := db.Create(&db_headings).Error if err != nil { return 0, errHandling(err) } db_schedules := make([]domain.DBSchedule, len(day.Schedule)) for j, v := range day.Schedule { schedule := &db_schedules[j] schedule.DayID = day.ID schedule.Title = v.Title schedule.Description = v.Description schedule.StartTime = v.StartTime schedule.EndTime = v.EndTime schedule.HPLink = v.HpLink schedule.ReservationLink = v.ReservationLink schedule.Order = v.Order db_address := domain.DBAddress{ PlusCode: v.Address.PlusCode, } if err = db.Create(&db_address).Error; err != nil { return 0, errHandling(err) } } err = db.Create(&db_schedules).Error if err != nil { return 0, errHandling(err) } } } return planID, nil } func (pr PlanRepository) PutPlan(plan domain.Plan) error { return nil }
EMGroup/js-eden
js/ast/basestatement.js
<filename>js/ast/basestatement.js Eden.AST.BaseStatement = function() { this.start = 0; this.end = 0; this.parent = undefined; this.errors = []; this.warning = undefined; this.executed = 0; this.numlines = -1; this.doxyComment = undefined; this.lock = 0; this.source = undefined; this.id = 0; this.stamp = 0; this.nextSibling = undefined; this.previousSibling = undefined; this.tags = undefined; this.local = false; this.subscribers = null; this.line = -1; this.generated = null; this.dependencies = Object.create(null); this.version = 0; } Eden.AST.BaseStatement.attribute = function(name, scope) { let val; switch(name) { case "ast" : val = this; break; case "brief" : if (this.doxyComment) { val = this.doxyComment.brief(); } break; case "comment" : if (this.doxyComment) { val = this.doxyComment.stripped(); } break; case "source" : val = this.getSource(); break; case "innersource" : if (this.type === "script") { val = this.getInnerSource(); } else if (this.type === "custom") { val = this.text; } else { val = this.getSource(); } break; case "outersource" : val = (this.type === "script") ? this.getOuterSource() : this.getSource(); break; case "exprtree" : if (this.expression) val = Eden.Selectors.expressionToLists(this.expression); break; case "expression": if (this.expression && this.lvalue && this.lvalue.source) { val = this.getSource().substr(this.lvalue.source.length).trim(); if (this.type === "definition") val = val.substring(2,val.length-1).trim(); else if (this.type === "assignment") val = val.substr(1,val.length-1).trim(); } break; case "title" : if (this.base && this.base.mainDoxyComment) { this.base.mainDoxyComment.stripped(); var controls = this.base.mainDoxyComment.getControls(); if (controls && controls["@title"]) val = controls["@title"][0]; } break; case "type" : val = this.type; break; case "locked" : val = (this.lock) ? true : false; break; case "location" : val = this.getLocationName(); break; case "name" : if (this.lvalue) { val = this.lvalue.getSymbol({}, {}, scope).name; } else if (this.name && this.type !== "do") { val = this.name; } else if (this.parent === undefined && this.base && this.base.origin) { val = this.base.origin.name; } else if (this.path !== undefined) { val = this.path; } break; case "symbol" : if (this.lvalue) { val = this.lvalue.getSymbol({}, {}, scope); } break; case "line" : if (this.line !== undefined) { val = this.line; } break; case "depends" : val = (this.dependencies) ? Object.keys(this.dependencies) : []; break; case "datatype" : val = (this.expression) ? this.expression.typevalue : 0; break; case "value" : try { val = (this.expression) ? this.expression.execute({scopes:[]}, {}, scope) : undefined; } catch(e) { } break; case "active" : val = ((this.type === "when" && this.enabled) || (this.lvalue && scope.context.symbols[this.lvalue.name] && scope.context.symbols[this.lvalue.name].origin && scope.context.symbols[this.lvalue.name].origin.id === this.id)); break; case "executed" : val = this.executed > 0; break; case "historic" : val = this.executed == -1; break; case "tags" : if (this.doxyComment) { val = this.doxyComment.getHashTags(); } break; case "rawcomment" : if (this.doxyComment) { val = this.doxyComment.content; } break; case "controls" : case "id" : val = this.id; break; case "path" : val = Eden.Selectors.getID(this); break; //case "script" : val = Eden.Selectors.getScriptBase(stat); break; case "remote" : var p = this; while(p.parent) p = p.parent; if (!p.base || !p.base.origin) { val = false; break; } val = p.base.origin.remote; break; case "root" : val = this.parent === undefined; break; case "static" : val = (this.lvalue) ? this.lvalue.isstatic : false; break; } return val; } Eden.AST.BaseStatement.addSubscriber = function(dependency) { if (!this.subscribers) this.subscribers = {}; this.subscribers[dependency] = eden.root.lookup(dependency); } Eden.AST.BaseStatement.removeSubscriber = function(dependency) { delete this.subscribers[dependency]; } Eden.AST.BaseStatement.setDoxyComment = function(doxy) { this.doxyComment = doxy; if (doxy) { if (this.tags === undefined) { this.tags = doxy.getHashTags(); } else { this.tags = this.tags.concat(doxy.getHashTags()); } if (doxy.hasTag("#library")) { if (this.type === "function" || this.type === "action") { Eden.edenFunctions[this.name] = true; } else if (this.type === "definition" || this.type === "assignment") { Eden.edenFunctions[this.lvalue.name] = true; } } } } Eden.AST.BaseStatement.getLocationName = function() { let p = this.parent; while (p && !p.name) p = p.parent; if (p && p.name) { if (p.name == "*When") { let pp = p.getLocationName(); return pp + " > when"; } else { return p.name; } } return "*unknown*"; } Eden.AST.BaseStatement.buildID = function() { var hash = 0; var ch; var hashstr = this.source; if (this.doxyComment) hashstr = this.doxyComment.content + hashstr; //if (this.parent) hashstr += this.parent.id; var len = hashstr.length; for (var i=0; i<len; i++) { ch = hashstr.charCodeAt(i); hash = ((hash << 5) - hash) + ch; hash = hash & hash; } if (this.name && this.type != "do") { this.id = this.name +"@"+ hash; } else if (this.lvalue) { this.id = this.lvalue.name + "@" + hash; } else { this.id = this.type +"@"+ hash; } var p = this.parent; while (p && !p.name) p = p.parent; if (p && p.name) this.id = this.id + p.name; } Eden.AST.BaseStatement.addIndex = function() { if (this.type == "dummy") console.trace("ADDING DUMMY INDEX"); this.buildID(); if (this.statements) { for (var i=0; i<this.statements.length; i++) { if (this.statements[i].type != "dummy") this.statements[i].addIndex(); } } Eden.Index.update(this); } Eden.AST.BaseStatement.removeIndex = function() { if (this.statements) { for (var i=0; i<this.statements.length; i++) { if (this.statements[i].type != "dummy") this.statements[i].removeIndex(); } } Eden.Index.remove(this); } Eden.AST.BaseStatement.destroy = function() { if (this.executed < 1) Eden.Index.remove(this); this.parent = undefined; this.nextSibling = undefined; this.previousSibling = undefined; if (this.statements) { for (var i=0; i<this.statements.length; i++) { if (this.statements[i].type != "dummy") this.statements[i].destroy(); } } this.executed = -1; } Eden.AST.BaseStatement.hasErrors = function() { return this.errors.length > 0; } Eden.AST.BaseStatement.getNumberOfLines = function() { return this.numlines; } Eden.AST.BaseStatement.getNumberOfInnerLines = function() { return this.numlines; } /** Get start line relative to immediate parent. */ Eden.AST.BaseStatement.getStartLine = function(relative) { return (this.parent) ? this.parent.getRelativeLine(this, relative) : -1; } Eden.AST.BaseStatement.getEndLine = function(relative) { return this.getStartLine(relative) + this.getNumberOfLines(); } Eden.AST.BaseStatement.getRange = function(relative) { var sl = this.getStartLine(relative); return [sl,sl+this.getNumberOfLines()]; } Eden.AST.BaseStatement.setSource = function(start, end, src) { this.start = start; this.end = end; this.source = src; } Eden.AST.BaseStatement.getSource = function() { return this.source; } Eden.AST.BaseStatement.getOuterSource = function() { var src = this.getSource(); if (this.parent === undefined) { src = "action " + this.name + "{" + src + "}"; } if (this.doxyComment) { src = "/** " + this.doxyComment.content + " */\n"+src; } var p = this.parent; while (p) { if (p.type == "script") { if (p.name) { src = "action "+p.name+" {\n"+src+"\n}"; } else { src = "{\n"+src+"\n}"; } if (p.doxyComment) { src = "/** " + p.doxyComment.content + " */\n"+src; } p = p.parent; } else { p = undefined; } } return src; } Eden.AST.BaseStatement.getOrigin = function() { var p = this; while (p.parent) p = p.parent; if (p.base) return p.base.origin; else return undefined; } Eden.AST.BaseStatement.getEdenCode = function() { return "parse(\""+this.getSource()+"\")"; }
sramirez/jCOLIBRI-weka
src/jcolibri/method/retrieve/NNretrieval/similarity/local/MaxString.java
package jcolibri.method.retrieve.NNretrieval.similarity.local; import jcolibri.method.retrieve.NNretrieval.similarity.LocalSimilarityFunction; /** * This function returns a similarity value depending of the biggest substring * that belong to both strings. */ public class MaxString implements LocalSimilarityFunction { /** * Applies the similarity function. * * @param s * String. * @param t * String. * @return result of apply the similarity funciton. */ public double compute(Object s, Object t) throws jcolibri.exception.NoApplicableSimilarityFunctionException { if ((s == null) || (t == null)) return 0; if (!(s instanceof java.lang.String)) throw new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), s.getClass()); if (!(t instanceof java.lang.String)) throw new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), s.getClass()); String news = (String) s; String newt = (String) t; if (news.equals(newt)) return 1.0; else return ((double) MaxSubString(news, newt) / (double) Math.max(news .length(), newt.length())); } /** * Returns the length of the biggest substring that belong to both strings. * * @param s * @param t * @return */ private int MaxSubString(String s, String t) { String shorter = (s.length() > t.length()) ? t : s; String longer = (shorter.equals(s)) ? t : s; int best = 0; for (int i = 0; i < shorter.length(); i++) { for (int j = shorter.length(); j > i; j--) { if (longer.indexOf(shorter.substring(i, j)) != -1) best = Math.max(best, j - i); } } return best; } /** Applicable to String */ public boolean isApplicable(Object o1, Object o2) { if((o1==null)&&(o2==null)) return true; else if(o1==null) return o2 instanceof String; else if(o2==null) return o1 instanceof String; else return (o1 instanceof String)&&(o2 instanceof String); } }
lerry903/spring-boot-api-project-seed
src/main/java/com/company/project/auth/model/SysMenu.java
<filename>src/main/java/com/company/project/auth/model/SysMenu.java package com.company.project.auth.model; import java.io.Serializable; import javax.persistence.*; @Table(name = "t_sys_menu") public class SysMenu implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; /** * 菜单编号 */ private String code; /** * 菜单名称 */ private String name; /** * 类型 0:目录 1:菜单 2:按钮 */ private Integer type; /** * 父级编号,一级菜单为null */ @Column(name = "parent_code") private String parentCode; /** * 菜单URL */ private String url; /** * 图标 */ private String icon; /** * 状态 -1:已删除 0隐藏,1正常 */ private Byte status; /** * 授权 */ private String secured; /** * 备注 */ private String remark; /** * 排序 */ @Column(name = "order_num") private Integer orderNum; private static final long serialVersionUID = 1L; /** * @return id */ public Long getId() { return id; } /** * @param id */ public void setId(Long id) { this.id = id; } /** * 获取菜单编号 * * @return code - 菜单编号 */ public String getCode() { return code; } /** * 设置菜单编号 * * @param code 菜单编号 */ public void setCode(String code) { this.code = code; } /** * 获取菜单名称 * * @return name - 菜单名称 */ public String getName() { return name; } /** * 设置菜单名称 * * @param name 菜单名称 */ public void setName(String name) { this.name = name; } /** * 获取类型 0:目录 1:菜单 2:按钮 * * @return type - 类型 0:目录 1:菜单 2:按钮 */ public Integer getType() { return type; } /** * 设置类型 0:目录 1:菜单 2:按钮 * * @param type 类型 0:目录 1:菜单 2:按钮 */ public void setType(Integer type) { this.type = type; } /** * 获取父级编号,一级菜单为null * * @return parent_code - 父级编号,一级菜单为null */ public String getParentCode() { return parentCode; } /** * 设置父级编号,一级菜单为null * * @param parentCode 父级编号,一级菜单为null */ public void setParentCode(String parentCode) { this.parentCode = parentCode; } /** * 获取菜单URL * * @return url - 菜单URL */ public String getUrl() { return url; } /** * 设置菜单URL * * @param url 菜单URL */ public void setUrl(String url) { this.url = url; } /** * 获取图标 * * @return icon - 图标 */ public String getIcon() { return icon; } /** * 设置图标 * * @param icon 图标 */ public void setIcon(String icon) { this.icon = icon; } /** * 获取状态 -1:已删除 0隐藏,1正常 * * @return status - 状态 -1:已删除 0隐藏,1正常 */ public Byte getStatus() { return status; } /** * 设置状态 -1:已删除 0隐藏,1正常 * * @param status 状态 -1:已删除 0隐藏,1正常 */ public void setStatus(Byte status) { this.status = status; } /** * 获取授权 * * @return secured - 授权 */ public String getSecured() { return secured; } /** * 设置授权 * * @param secured 授权 */ public void setSecured(String secured) { this.secured = secured; } /** * 获取备注 * * @return remark - 备注 */ public String getRemark() { return remark; } /** * 设置备注 * * @param remark 备注 */ public void setRemark(String remark) { this.remark = remark; } /** * 获取排序 * * @return order_num - 排序 */ public Integer getOrderNum() { return orderNum; } /** * 设置排序 * * @param orderNum 排序 */ public void setOrderNum(Integer orderNum) { this.orderNum = orderNum; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", code=").append(code); sb.append(", name=").append(name); sb.append(", type=").append(type); sb.append(", parentCode=").append(parentCode); sb.append(", url=").append(url); sb.append(", icon=").append(icon); sb.append(", status=").append(status); sb.append(", secured=").append(secured); sb.append(", remark=").append(remark); sb.append(", orderNum=").append(orderNum); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }
Retraces/UkraineBot
venv/lib/python3.8/site-packages/parso/grammar.py
/home/runner/.cache/pip/pool/1a/e9/17/88dee50a7dd9787b2f25c32b1eab500c5ced2fe281b1d4307b3ab25c37
Neusoft-Technology-Solutions/aws-sdk-cpp
aws-cpp-sdk-rekognition/source/model/GetContentModerationResult.cpp
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/rekognition/model/GetContentModerationResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/utils/UnreferencedParam.h> #include <utility> using namespace Aws::Rekognition::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetContentModerationResult::GetContentModerationResult() : m_jobStatus(VideoJobStatus::NOT_SET) { } GetContentModerationResult::GetContentModerationResult(const Aws::AmazonWebServiceResult<JsonValue>& result) : m_jobStatus(VideoJobStatus::NOT_SET) { *this = result; } GetContentModerationResult& GetContentModerationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("JobStatus")) { m_jobStatus = VideoJobStatusMapper::GetVideoJobStatusForName(jsonValue.GetString("JobStatus")); } if(jsonValue.ValueExists("StatusMessage")) { m_statusMessage = jsonValue.GetString("StatusMessage"); } if(jsonValue.ValueExists("VideoMetadata")) { m_videoMetadata = jsonValue.GetObject("VideoMetadata"); } if(jsonValue.ValueExists("ModerationLabels")) { Array<JsonView> moderationLabelsJsonList = jsonValue.GetArray("ModerationLabels"); for(unsigned moderationLabelsIndex = 0; moderationLabelsIndex < moderationLabelsJsonList.GetLength(); ++moderationLabelsIndex) { m_moderationLabels.push_back(moderationLabelsJsonList[moderationLabelsIndex].AsObject()); } } if(jsonValue.ValueExists("NextToken")) { m_nextToken = jsonValue.GetString("NextToken"); } if(jsonValue.ValueExists("ModerationModelVersion")) { m_moderationModelVersion = jsonValue.GetString("ModerationModelVersion"); } return *this; }
teknux-org/jetty-bootstrap
jetty-bootstrap/src/test/java/org/teknux/jettybootstrap/test/keystore/JettyKeystoreConvertorBuilderTest.java
<filename>jetty-bootstrap/src/test/java/org/teknux/jettybootstrap/test/keystore/JettyKeystoreConvertorBuilderTest.java /******************************************************************************* * (C) Copyright 2014 Teknux.org (http://teknux.org/). * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Contributors: * "<NAME>" * "<NAME>" * "<NAME>" * *******************************************************************************/ package org.teknux.jettybootstrap.test.keystore; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SignatureException; import java.security.cert.CertificateException; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; import org.teknux.jettybootstrap.keystore.JettyKeystoreConvertorBuilder; import org.teknux.jettybootstrap.keystore.JettyKeystoreException; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class JettyKeystoreConvertorBuilderTest { protected static final String KEYSTORE_ALIAS = "jettybootstraptest"; protected static final String KEYSTORE_PASSWORD = "<PASSWORD>"; @Test public void do01KeystoreTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream inputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/jks/test.jks"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setKeystore(inputStream, "test"); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do02KeyAndKeystoreTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/jks/test.key"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/jks/test.jks"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS8(keyInputStream).setCertificateFromKeystore( crtInputStream, "test"); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do03KeystoreAndCrtTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/jks/test.jks"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/jks/test.crt"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromKeystore(keyInputStream, "test") .setCertificateFromPKCS8(crtInputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do04PemTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream inputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.pem"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPKCS8(inputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, "test"); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do05KeyAndCrtTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.key"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.crt"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS8(keyInputStream).setCertificateFromPKCS8( crtInputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do06KeyAndPemTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.key"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.pem"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS8(keyInputStream).setCertificateFromPKCS8( crtInputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do07PemAndCrtTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.pem"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs8/test.crt"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS8(keyInputStream).setCertificateFromPKCS8( crtInputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do08P12Test() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream inputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs12/test.p12"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPKCS12(inputStream, "test"); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do09KeyAndP12Test() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs12/test.key"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs12/test.p12"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS8(keyInputStream).setCertificateFromPKCS12( crtInputStream, "test"); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } @Test public void do10P12AndCrtTest() throws JettyKeystoreException, InvalidKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException { InputStream keyInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs12/test.p12"); InputStream crtInputStream = getClass().getResourceAsStream("/org/teknux/jettybootstrap/test/keystore/pkcs12/test.crt"); JettyKeystoreConvertorBuilder jettyKeystoreConvertorBuilder = new JettyKeystoreConvertorBuilder().setPrivateKeyFromPKCS12(keyInputStream, "test").setCertificateFromPKCS8( crtInputStream); jettyKeystoreConvertorBuilder.checkValidity(true, true); KeyStore keystore = jettyKeystoreConvertorBuilder.build(KEYSTORE_ALIAS, KEYSTORE_PASSWORD); JettyKeystoreConvertorBuilder.checkValidity(keystore, KEYSTORE_ALIAS, true, true); } }
KailongPeng/rt-cloud
tests/test_bidsInterface.py
<filename>tests/test_bidsInterface.py import os import pytest from rtCommon.bidsArchive import BidsArchive from rtCommon.bidsIncremental import BidsIncremental from rtCommon.imageHandling import convertDicomImgToNifti, readDicomFromFile from rtCommon.clientInterface import ClientInterface from rtCommon.bidsInterface import BidsInterface, tmpDownloadOpenNeuro from rtCommon.bidsCommon import getDicomMetadata from tests.backgroundTestServers import BackgroundTestServers from tests.common import rtCloudPath, tmpDir test_sampleProjectDicomPath = os.path.join(rtCloudPath, 'projects', 'sample', 'dicomDir', '20190219.0219191_faceMatching.0219191_faceMatching') allowedDirs = [test_sampleProjectDicomPath, tmpDir] class TestBidsInterface: serversForTests = None def setup_class(cls): cls.serversForTests = BackgroundTestServers() def teardown_class(cls): cls.serversForTests.stopServers() # Local bidsInterface test def test_localBidsInterface(self): """Test BidsInterface when instantiated in local mode""" TestBidsInterface.serversForTests.stopServers() TestBidsInterface.serversForTests.startServers(dataRemote=False, allowedDirs=allowedDirs) clientInterface = ClientInterface() bidsInterface = clientInterface.bidsInterface dicomStreamTest(bidsInterface) openNeuroStreamTest(bidsInterface) # Remote bidsInterface test def test_remoteBidsInterface(self): """Test BidsInterface when instantiated in local mode""" # Use a remote (RPC) client to the bidsInterface TestBidsInterface.serversForTests.stopServers() TestBidsInterface.serversForTests.startServers(dataRemote=True, allowedDirs=allowedDirs) clientInterface = ClientInterface() bidsInterface = clientInterface.bidsInterface dicomStreamTest(bidsInterface) openNeuroStreamTest(bidsInterface) # bidsInterface created locally by the client (no projectServer) def test_clientLocalBidsInterface(self): TestBidsInterface.serversForTests.stopServers() # Allowed dirs for local case set to the same as in the backgroundTestServers bidsInterface = BidsInterface(dataRemote=False, allowedDirs=allowedDirs) dicomStreamTest(bidsInterface) openNeuroStreamTest(bidsInterface) def readLocalDicomIncremental(volIdx, entities): # read the incremental locally for test comparison dicomPath = os.path.join(test_sampleProjectDicomPath, "001_000013_{TR:06d}.dcm".format(TR=volIdx)) dicomImg = readDicomFromFile(dicomPath) dicomMetadata = getDicomMetadata(dicomImg) dicomMetadata.update(entities) niftiImg = convertDicomImgToNifti(dicomImg) localIncremental = BidsIncremental(niftiImg, dicomMetadata) return localIncremental def dicomStreamTest(bidsInterface): # initialize the stream entities = {'subject': '01', 'task': 'test', 'run': 1, 'suffix': 'bold', 'datatype': 'func'} # Try to init a stream to a non-allowed path if bidsInterface.isRunningRemote(): with pytest.raises(Exception) as err: streamId = bidsInterface.initDicomBidsStream('/path/not/allowed', "001_000013_{TR:06d}.dcm", 300*1024, **entities) assert "not within list of allowed directories" in str(err.value) # Now init the real stream to an allowed path print(f'### {test_sampleProjectDicomPath}') streamId = bidsInterface.initDicomBidsStream(test_sampleProjectDicomPath, "001_000013_{TR:06d}.dcm", 300*1024, **entities) # Test that not specifying volIdx to getIncremental starts from the beginning in order for idx in [*range(3)]: # get the incremental from the stream streamIncremental = bidsInterface.getIncremental(streamId) localIncremental = readLocalDicomIncremental(idx, entities) print(f"Dicom stream check: image {idx}") assert streamIncremental == localIncremental # Next provide a specific volume volIdx = 7 streamIncremental = bidsInterface.getIncremental(streamId, volIdx=volIdx) localIncremental = readLocalDicomIncremental(volIdx, entities) print(f"Dicom stream check: image {idx}") assert streamIncremental == localIncremental # Resume without specifying volumes for idx in [*range(8, 10)]: # get the incremental from the stream streamIncremental = bidsInterface.getIncremental(streamId) localIncremental = readLocalDicomIncremental(idx, entities) print(f"Dicom stream check: image {idx}") assert streamIncremental == localIncremental def openNeuroStreamTest(bidsInterface): dsAccessionNumber = 'ds002338' dsSubject = 'xp201' datasetDir = tmpDownloadOpenNeuro(dsAccessionNumber, dsSubject, 1) localEntities = {'subject': dsSubject, 'run': 1, 'suffix': 'bold', 'datatype': 'func'} remoteEntities = {'subject': dsSubject, 'run': 1} localBidsArchive = BidsArchive(datasetDir) streamId = bidsInterface.initOpenNeuroStream(dsAccessionNumber, **remoteEntities) for idx in range(3): streamIncremental = bidsInterface.getIncremental(streamId) localIncremental = localBidsArchive._getIncremental(idx, **localEntities) print(f"OpenNeuro stream check: image {idx}") assert streamIncremental == localIncremental for idx in [5, 2, 7]: streamIncremental = bidsInterface.getIncremental(streamId, volIdx=idx) localIncremental = localBidsArchive._getIncremental(idx, **localEntities) print(f"OpenNeuro stream check: image {idx}") assert streamIncremental == localIncremental # Resume without specifying volumes for idx in [*range(8, 10)]: streamIncremental = bidsInterface.getIncremental(streamId) localIncremental = localBidsArchive._getIncremental(idx, **localEntities) print(f"OpenNeuro stream check: image {idx}") assert streamIncremental == localIncremental numVols = bidsInterface.getNumVolumes(streamId) assert numVols > 0 and numVols < 1000 # Check with local bidsRun localBidsRun = localBidsArchive.getBidsRun(**localEntities) assert numVols == localBidsRun.numIncrementals() assert numVols > 10 for idx in [*range(6, 10)]: streamIncremental = bidsInterface.getIncremental(streamId, volIdx=idx) localIncremental = localBidsRun.getIncremental(idx) print(f"OpenNeuro bidsRun check: image {idx}") assert streamIncremental == localIncremental
AndGirl/MyNews
app/src/main/java/com/ybj/mynews/ui/main/activity/PhotosDetailActivity.java
<reponame>AndGirl/MyNews<gh_stars>0 package com.ybj.mynews.ui.main.activity; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.view.animation.DecelerateInterpolator; import android.widget.RelativeLayout; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.ybj.mynews.R; import com.ybj.mynews.app.AppConstant; import com.ybj.mynews.commonutils.MyUtils; import com.ybj.mynews.commonutils.SystemUiVisibilityUtil; import com.ybj.mynews.commonwidget.StatusBarCompat; import com.ybj.mynews.widget.PullBackLayout; import butterknife.Bind; import butterknife.ButterKnife; import uk.co.senab.photoview.PhotoView; import uk.co.senab.photoview.PhotoViewAttacher; /** * 大图详情 */ public class PhotosDetailActivity extends AppCompatActivity implements PullBackLayout.Callback { @Bind(R.id.photo_touch_iv) PhotoView mPhotoTouchIv; @Bind(R.id.pull_back_layout) PullBackLayout mPullBackLayout; @Bind(R.id.toolbar) Toolbar mToolbar; @Bind(R.id.activity_photos_detail) RelativeLayout mActivityPhotosDetail; private boolean mIsToolBarHidden;//toolbar是否隐藏 private boolean mIsStatusBarHidden;//toolbar隐藏状态栏 private ColorDrawable mBackground;//背景图片 public static void startAction(Context context,String url){ Intent intent = new Intent(context, PhotosDetailActivity.class); intent.putExtra(AppConstant.PHOTO_DETAIL,url); context.startActivity(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //透明状态栏 StatusBarCompat.translucentStatusBar(this); setContentView(R.layout.activity_photos_detail); ButterKnife.bind(this); initView(); } @Override protected void onDestroy() { super.onDestroy(); ButterKnife.unbind(this); } private void initView() { mPullBackLayout.setCallback(this); toolBarFadeIn(); initToolbar(); initBackground(); loadPhotoIv(); initImageView(); setPhotoViewClickEvent(); } /*设置图片的点击事件*/ private void setPhotoViewClickEvent() { mPhotoTouchIv.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() { @Override public void onPhotoTap(View view, float x, float y) { hideOrShowToolbar(); hideOrShowStatusBar(); } }); } /*影藏状态栏*/ private void hideOrShowStatusBar() { if(mIsStatusBarHidden) { SystemUiVisibilityUtil.enter(PhotosDetailActivity.this); }else{ SystemUiVisibilityUtil.exit(PhotosDetailActivity.this); } mIsStatusBarHidden = !mIsStatusBarHidden; } private void initImageView() { loadPhotoIv(); } private void loadPhotoIv() { String url = getIntent().getStringExtra(AppConstant.PHOTO_DETAIL); Glide.with(this) .load(url) .diskCacheStrategy(DiskCacheStrategy.ALL) .error(R.drawable.ic_empty_picture) .crossFade().into(mPhotoTouchIv); } private void initBackground() { mBackground = new ColorDrawable(Color.BLACK); MyUtils.getRootView(this).setBackgroundDrawable(mBackground); } private void initToolbar() { mToolbar.setTitle("美女"); mToolbar.setNavigationOnClickListener(new View.OnClickListener() {//返回键的监听 @Override public void onClick(View view) { finish(); } }); } private void toolBarFadeIn() { mIsToolBarHidden = true; hideOrShowToolbar(); } private void hideOrShowToolbar() { mToolbar.animate() .alpha(mIsToolBarHidden ? 1.0f : 0.0f) .setInterpolator(new DecelerateInterpolator(2)) .start(); } private void toolBarFadeOut() { mIsToolBarHidden = false; hideOrShowToolbar(); } @Override public void onPullStart() { toolBarFadeOut(); mIsStatusBarHidden = true; hideOrShowStatusBar(); } @Override public void onPull(float progress) { progress = Math.min(1f,progress*3f); mBackground.setAlpha((int)(0xff/*255*/ * (1f-progress))); } @Override public void onPullCancel() { toolBarFadeIn(); } @Override public void onPullComplete() { supportFinishAfterTransition();//暂时理解为退出时结束当前activity } @Override public void supportFinishAfterTransition() { super.supportFinishAfterTransition(); } }
raionik/Py4Bio
code/ch13/regexsys1.py
import re, sys myregex = re.compile(sys.argv[2]) counter = 0 with open(sys.argv[1]) as fh: for line in fh: if myregex.search(line): counter += 1 print(counter)
shiruka/network
src/main/java/io/github/shiruka/network/package-info.java
/** * the package that contains main classes. */ package io.github.shiruka.network;
rogeraime/microservices-java
adigitalwash/laundryservice/src/main/java/com/adesso/digitalwash/model/Laundry.java
<filename>adigitalwash/laundryservice/src/main/java/com/adesso/digitalwash/model/Laundry.java package com.adesso.digitalwash.model; import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Optional; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.OneToMany; import com.adesso.digitalwash.model.Cloth; @Entity public class Laundry { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private LocalDate submissionDate; private LocalDate acceptedDate; private LocalDate deliveryDate; private String laundryOwner; private BigDecimal totalCost; private BigDecimal paid; private String eMail; private boolean completed; @Lob private String image; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "laundry") private List<Cloth> clothes = new ArrayList<>(); public Laundry() { this.totalCost = BigDecimal.ZERO; } public Laundry(List<Cloth> clothes) { this.clothes = clothes; } public Integer getClothCountOfCategory(Long id) { Optional<Cloth> c = this.clothes.stream().filter(cl -> cl.getCategoryId().equals(id)).findFirst(); return c.isPresent() ? c.get().getClothCount() : 0; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public LocalDate getSubmissionDate() { return submissionDate; } public void setSubmissionDate(LocalDate submissionDate) { this.submissionDate = submissionDate; } public LocalDate getAcceptedDate() { return acceptedDate; } public void setAcceptedDate(LocalDate acceptedDate) { this.acceptedDate = acceptedDate; } public LocalDate getDeliveryDate() { return deliveryDate; } public void setDeliveryDate(LocalDate deliveryDate) { this.deliveryDate = deliveryDate; } public String getLaundryOwner() { return laundryOwner; } public void setLaundryOwner(String laundryOwner) { this.laundryOwner = laundryOwner; } public BigDecimal getTotalCost() { return totalCost; } public void setTotalCost(BigDecimal totalCost) { this.totalCost = totalCost; } public List<Cloth> getClothes() { return clothes; } public void setClothes(List<Cloth> clothes) { this.clothes = clothes; } public void computeTotalCost() { if (!(clothes == null || clothes.isEmpty() || totalCost == null)) { clothes.forEach(c -> totalCost = totalCost.add(c.getCosts())); } } public void assignClothesToLaundry(List<Cloth> clothes) { if (clothes != null) { clothes.forEach(c -> { assignClothToLaundry(c); }); } } public void assignClothToLaundry(Cloth cloth) { if (cloth != null) { if (cloth.getLaundry() != this) { cloth.setLaundry(this); } } } public String geteMail() { return eMail; } public void setEMail(String eMail) { this.eMail = eMail; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public BigDecimal getPaid() { return paid; } public void setPaid(BigDecimal paid) { this.paid = paid; } public boolean isCompleted() { return completed; } public void setCompleted(boolean completed) { this.completed = completed; } }
limuness/ThaumicPotatoes2
src/main/java/com/zxc74171/thaumicpotatoes/items/ItemMetaShovel.java
package com.zxc74171.thaumicpotatoes.items; import java.util.Set; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; public class ItemMetaShovel extends ItemSpade { public ItemMetaShovel(Item.ToolMaterial material) { super(material); } @Override public Set<String> getToolClasses(ItemStack stack) { return ImmutableSet.of("axe"); } @SuppressWarnings({ "rawtypes", "unused" }) private static Set effectiveAgainst = Sets.newHashSet(new Block[] { Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN}); }
forkch/scrabble_ar
examples/book_androidstudio/VuforiaJME/app/src/main/java/com/ar4android/vuforiaJME/VuforiaJME.java
<filename>examples/book_androidstudio/VuforiaJME/app/src/main/java/com/ar4android/vuforiaJME/VuforiaJME.java /* VuforiaJME - VuforiaJME Example * * Example Chapter 5 * accompanying the book * "Augmented Reality for Android Application Development", Packt Publishing, 2013. * * Copyright 2013 <NAME>, <NAME> / Packt Publishing. * * This example is dependent of the Qualcomm Vuforia SDK * The Vuforia SDK is a product of Qualcomm Austria Research Center GmbH * * https://developer.vuforia.com * * This example was built from the ImageTarget example accompanying the Vuforia SDK * https://developer.vuforia.com/resources/sample-apps/image-targets-sample-app * */ package com.ar4android.vuforiaJME; import java.nio.ByteBuffer; import java.util.concurrent.Callable; import android.util.Log; import com.jme3.animation.AnimChannel; import com.jme3.animation.AnimControl; import com.jme3.animation.AnimEventListener; import com.jme3.animation.LoopMode; import com.jme3.app.SimpleApplication; import com.jme3.input.FlyByCamera; import com.jme3.light.DirectionalLight; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Quaternion; import com.jme3.math.Vector2f; import com.jme3.math.Vector3f; import com.jme3.renderer.Camera; import com.jme3.renderer.RenderManager; import com.jme3.renderer.ViewPort; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; import com.jme3.scene.shape.Quad; import com.jme3.texture.Image; import com.jme3.texture.Texture2D; import com.jme3.app.AndroidHarness; import jme3tools.optimize.GeometryBatchFactory; public class VuforiaJME extends SimpleApplication implements AnimEventListener { private static final String TAG = "VuforiaJME"; // The geometry which will represent the video background private Geometry mVideoBGGeom; // The material which will be applied to the video background geometry. private Material mvideoBGMat; // The texture displaying the Android camera preview frames. private Texture2D mCameraTexture; // the JME image which serves as intermediate storage place for the Android // camera frame before the pixels get uploaded into the texture. private Image mCameraImage; // A flag indicating if the scene has been already initialized. private boolean mSceneInitialized = false; // A flag indicating if the JME Image has been already initialized. private boolean mVideoImageInitialized = false; // A flag indicating if a new Android camera image is available. boolean mNewCameraFrameAvailable = false; // private float mForegroundCamFOVY = 30; private float mForegroundCamFOVY = 50; // for a Samsung Galaxy SII // for animation // The controller allows access to the animation sequences of the model private AnimControl mAniControl; // the channel is used to run one animation sequence at a time private AnimChannel mAniChannel; Camera videoBGCam; Camera fgCam; /** Native function for initializing the renderer. */ public native void initTracking(int width, int height); /** Native function to update the renderer. */ public native void updateTracking(); public static void main(String[] args) { VuforiaJME app = new VuforiaJME(); app.start(); } // The default method used to initialize your JME application. @Override public void simpleInitApp() { Log.e(TAG, "simpleInitApp"); // Do not display statistics or frames per second setDisplayStatView(false); setDisplayFps(false); //Logger.getLogger("").setLevel(Level.SEVERE); // We use custom viewports - so the main viewport does not need to contain the rootNode viewPort.detachScene(rootNode); initTracking(settings.getWidth(), settings.getHeight()); initVideoBackground(settings.getWidth(), settings.getHeight()); initBackgroundCamera(); initForegroundScene(); initForegroundCamera(mForegroundCamFOVY); } // This function creates the geometry, the viewport and the virtual camera // needed for rendering the incoming Android camera frames in the scene // graph public void initVideoBackground(int screenWidth, int screenHeight) { // Create a Quad shape. Quad videoBGQuad = new Quad(1, 1, true); // Create a Geometry with the Quad shape mVideoBGGeom = new Geometry("quad", videoBGQuad); float newWidth = 1.f * screenWidth / screenHeight; // Center the Geometry in the middle of the screen. mVideoBGGeom.setLocalTranslation(-0.5f * newWidth, -0.5f, 0.f);// // Scale (stretch) the width of the Geometry to cover the whole screen // width. mVideoBGGeom.setLocalScale(1.f * newWidth, 1.f, 1); // Apply a unshaded material which we will use for texturing. mvideoBGMat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mVideoBGGeom.setMaterial(mvideoBGMat); // Create a new texture which will hold the Android camera preview frame // pixels. mCameraTexture = new Texture2D(); mSceneInitialized = true; } public void initBackgroundCamera() { // Create a custom virtual camera with orthographic projection videoBGCam = new Camera(settings.getWidth(), settings.getHeight()); videoBGCam.setViewPort(0.0f, 1.0f, 0.f, 1.0f); videoBGCam.setLocation(new Vector3f(0f, 0f, 1.f)); videoBGCam.setAxes(new Vector3f(-1f,0f,0f), new Vector3f(0f,1f,0f), new Vector3f(0f,0f,-1f)); videoBGCam.setParallelProjection(true); // Also create a custom viewport. ViewPort videoBGVP = renderManager.createMainView("VideoBGView",videoBGCam); // Attach the geometry representing the video background to the // viewport. videoBGVP.attachScene(mVideoBGGeom); //videoBGVP.setClearFlags(true, false, false); //videoBGVP.setBackgroundColor(new ColorRGBA(1,0,0,1)); } public void initForegroundScene() { //use the box for debugging /* Box b = new Box(Vector3f.ZERO, 7, 4, 5); // create cube shape at the origin Geometry geom = new Geometry("Box", b); // create cube geometry from the shape Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); // create a simple material mat.setColor("Color", ColorRGBA.Blue); // set color of material to blue geom.setMaterial(mat); // set the cube's material rootNode.attachChild(geom); // make the cube appear in the scene geom.setLocalTranslation(new Vector3f(0.0f,5.0f,0.0f)); */ // Load a model from test_data (OgreXML + material + texture) Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.mesh.xml"); ninja.scale(0.125f, 0.125f, 0.125f); Quaternion rotateNinjaX=new Quaternion(); rotateNinjaX.fromAngleAxis(3.14f/2.0f,new Vector3f(1.0f,0.0f,0.0f)); Quaternion rotateNinjaZ=new Quaternion(); rotateNinjaZ.fromAngleAxis(3.14f,new Vector3f(0.0f,0.0f,1.0f));; // rotateNinjaX.mult(rotateNinjaZ); Quaternion rotateNinjaXZ=rotateNinjaZ.mult(rotateNinjaX); ninja.rotate(rotateNinjaXZ); //3.14/2.,new Vector3f(1.0.,0.0,1.0))); // ninja.rotate(0.0f, -3.0f, 0.0f); ninja.setLocalTranslation(0.0f, 0.0f, 0.0f); rootNode.attachChild(ninja); // You must add a light to make the model visible DirectionalLight back = new DirectionalLight(); back.setDirection(new Vector3f(0.f,-1.f,1.0f)); rootNode.addLight(back); DirectionalLight front = new DirectionalLight(); front.setDirection(new Vector3f(0.f,1.f,1.0f)); rootNode.addLight(front); mAniControl = ninja.getControl(AnimControl.class); mAniControl.addListener(this); mAniChannel = mAniControl.createChannel(); // show animation from beginning mAniChannel.setAnim("Walk"); mAniChannel.setLoopMode(LoopMode.Loop); mAniChannel.setSpeed(1f); } public void initForegroundCamera(float fovY) { fgCam = new Camera(settings.getWidth(), settings.getHeight()); fgCam.setViewPort(0, 1.0f, 0.f,1.0f); fgCam.setLocation(new Vector3f(0f, 0f, 0f)); fgCam.setAxes(new Vector3f(-1f,0f,0f), new Vector3f(0f,1f,0f), new Vector3f(0f,0f,-1f)); fgCam.setFrustumPerspective(fovY, settings.getWidth()/settings.getHeight(), 1, 1000); ViewPort fgVP = renderManager.createMainView("ForegroundView", fgCam); fgVP.attachScene(rootNode); //color,depth,stencil fgVP.setClearFlags(false, true, false); fgVP.setBackgroundColor(new ColorRGBA(0,0,0,1)); // fgVP.setBackgroundColor(new ColorRGBA(0,0,0,0)); } public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) { // unused } public void onAnimChange(AnimControl control, AnimChannel channel, String animName) { // unused } public void setCameraPerspectiveNative(float fovY,float aspectRatio) { // Log.d(TAG,"Update Camera Perspective.."); fgCam.setFrustumPerspective(fovY,aspectRatio, 1.f, 100.f); } public void setCameraViewportNative(float viewport_w,float viewport_h,float size_x,float size_y) { //Log.d(TAG,"Update Camera Viewport.."); float newWidth = 1.f; float newHeight = 1.f; if (viewport_h != settings.getHeight()) { newWidth=viewport_w/viewport_h; newHeight=1.0f; videoBGCam.resize((int)viewport_w,(int)viewport_h,true); videoBGCam.setParallelProjection(true); } //exercise: find the similar transformation //when viewport_w != settings.getWidth //Adjusting viewport: from BackgroundTextureAccess example in Qualcomm Vuforia float viewportPosition_x = (((int)(settings.getWidth() - viewport_w)) / (int) 2);//+0 float viewportPosition_y = (((int)(settings.getHeight() - viewport_h)) / (int) 2);//+0 float viewportSize_x = viewport_w;//2560 float viewportSize_y = viewport_h;//1920 //transform in normalized coordinate viewportPosition_x = (float)viewportPosition_x/(float)viewport_w; viewportPosition_y = (float)viewportPosition_y/(float)viewport_h; viewportSize_x = viewportSize_x/viewport_w; viewportSize_y = viewportSize_y/viewport_h; //adjust for viewport start (modify video quad) mVideoBGGeom.setLocalTranslation(-0.5f*newWidth+viewportPosition_x,-0.5f*newHeight+viewportPosition_y,0.f); //adust for viewport size (modify video quad) mVideoBGGeom.setLocalScale(newWidth, newHeight, 1.f); } public void setCameraPoseNative(float cam_x,float cam_y,float cam_z) { //Log.d(TAG,"Update Camera Pose.."); fgCam.setLocation(new Vector3f(cam_x,cam_y,cam_z)); } public void setCameraOrientationNative(float cam_right_x,float cam_right_y,float cam_right_z, float cam_up_x,float cam_up_y,float cam_up_z,float cam_dir_x,float cam_dir_y,float cam_dir_z) { //Log.d(TAG,"Update Orientation Pose.."); //left,up,direction fgCam.setAxes( new Vector3f(-cam_right_x,-cam_right_y,-cam_right_z), new Vector3f(-cam_up_x,-cam_up_y,-cam_up_z), new Vector3f(cam_dir_x,cam_dir_y,cam_dir_z)); } // This method retrieves the preview images from the Android world and puts them into a JME image. public void setVideoBGTexture(final Image image) { if (!mSceneInitialized) { return; } mCameraImage = image; mNewCameraFrameAvailable = true; } @Override public void simpleUpdate(float tpf) { updateTracking(); if (mNewCameraFrameAvailable) { mCameraTexture.setImage(mCameraImage); mvideoBGMat.setTexture("ColorMap", mCameraTexture); } // mCubeGeom.rotate(new Quaternion(1.f, 0.f, 0.f, 0.01f)); mVideoBGGeom.updateLogicalState(tpf); mVideoBGGeom.updateGeometricState(); } @Override public void simpleRender(RenderManager rm) { // TODO: add render code } }
yutingwu000/RED4
src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/project/build/validation/GeneralSettingsTableValidator.java
<filename>src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/project/build/validation/GeneralSettingsTableValidator.java<gh_stars>100-1000 /* * Copyright 2015 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.robotframework.ide.eclipse.main.plugin.project.build.validation; import static java.util.stream.Collectors.toList; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.rf.ide.core.testdata.model.AKeywordBaseSetting; import org.rf.ide.core.testdata.model.AModelElement; import org.rf.ide.core.testdata.model.ATags; import org.rf.ide.core.testdata.model.TemplateSetting; import org.rf.ide.core.testdata.model.table.SettingTable; import org.rf.ide.core.testdata.model.table.setting.DefaultTags; import org.rf.ide.core.testdata.model.table.setting.ForceTags; import org.rf.ide.core.testdata.model.table.setting.LibraryImport; import org.rf.ide.core.testdata.model.table.setting.Metadata; import org.rf.ide.core.testdata.model.table.setting.ResourceImport; import org.rf.ide.core.testdata.model.table.setting.SuiteDocumentation; import org.rf.ide.core.testdata.model.table.setting.SuiteSetup; import org.rf.ide.core.testdata.model.table.setting.SuiteTeardown; import org.rf.ide.core.testdata.model.table.setting.TaskSetup; import org.rf.ide.core.testdata.model.table.setting.TaskTeardown; import org.rf.ide.core.testdata.model.table.setting.TaskTemplate; import org.rf.ide.core.testdata.model.table.setting.TaskTimeout; import org.rf.ide.core.testdata.model.table.setting.TestSetup; import org.rf.ide.core.testdata.model.table.setting.TestTeardown; import org.rf.ide.core.testdata.model.table.setting.TestTemplate; import org.rf.ide.core.testdata.model.table.setting.TestTimeout; import org.rf.ide.core.testdata.model.table.setting.UnknownSetting; import org.rf.ide.core.testdata.model.table.setting.VariablesImport; import org.rf.ide.core.testdata.text.read.recognizer.RobotToken; import org.rf.ide.core.testdata.text.read.recognizer.RobotTokenType; import org.rf.ide.core.validation.RobotTimeFormat; import org.robotframework.ide.eclipse.main.plugin.model.RobotSettingsSection; import org.robotframework.ide.eclipse.main.plugin.model.RobotSuiteFile; import org.robotframework.ide.eclipse.main.plugin.project.build.AdditionalMarkerAttributes; import org.robotframework.ide.eclipse.main.plugin.project.build.RobotArtifactsValidator.ModelUnitValidator; import org.robotframework.ide.eclipse.main.plugin.project.build.RobotProblem; import org.robotframework.ide.eclipse.main.plugin.project.build.ValidationReportingStrategy; import org.robotframework.ide.eclipse.main.plugin.project.build.causes.ArgumentProblem; import org.robotframework.ide.eclipse.main.plugin.project.build.causes.GeneralSettingsProblem; import org.robotframework.ide.eclipse.main.plugin.project.build.causes.IProblemCause; import org.robotframework.ide.eclipse.main.plugin.project.build.validation.versiondependent.VersionDependentValidators; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Streams; class GeneralSettingsTableValidator implements ModelUnitValidator { private final FileValidationContext validationContext; private final Optional<RobotSettingsSection> settingsSection; private final ValidationReportingStrategy reporter; private final VersionDependentValidators versionDependentValidators; GeneralSettingsTableValidator(final FileValidationContext validationContext, final Optional<RobotSettingsSection> settingSection, final ValidationReportingStrategy reporter) { this.validationContext = validationContext; this.settingsSection = settingSection; this.reporter = reporter; this.versionDependentValidators = new VersionDependentValidators(validationContext, reporter); } @Override public void validate(final IProgressMonitor monitor) throws CoreException { if (!settingsSection.isPresent()) { return; } final RobotSettingsSection robotSettingsSection = settingsSection.get(); final RobotSuiteFile suiteFile = robotSettingsSection.getSuiteFile(); final SettingTable settingsTable = robotSettingsSection.getLinkedElement(); reportVersionSpecificProblems(settingsTable, monitor); reportUnknownSettings(settingsTable.getUnknownSettings()); validateLibraries(suiteFile, settingsTable.getLibraryImports(), monitor); validateResources(suiteFile, settingsTable.getResourcesImports(), monitor); validateVariables(suiteFile, settingsTable.getVariablesImports(), monitor); validateSetupsAndTeardowns(settingsTable.getSuiteSetups()); validateSetupsAndTeardowns(settingsTable.getSuiteTeardowns()); validateSetupsAndTeardowns(settingsTable.getTestSetups()); validateSetupsAndTeardowns(settingsTable.getTestTeardowns()); validateSetupsAndTeardowns(settingsTable.getTaskSetups()); validateSetupsAndTeardowns(settingsTable.getTaskTeardowns()); validateTemplates(settingsTable.getTestTemplates(), settingsTable.getTaskTemplates()); validateTestTimeouts(settingsTable.getTestTimeouts()); validateTaskTimeouts(settingsTable.getTaskTimeouts()); validateTags(settingsTable.getDefaultTags()); validateTags(settingsTable.getForceTags()); validateDocumentations(settingsTable.getDocumentation()); validateMetadatas(settingsTable.getMetadatas()); validateTestAndTasksSettingsMixes(suiteFile, settingsTable); validateKeywordsAndVariablesUsagesInExecutables(settingsTable); reportUnknownVariablesInNonExecutables(settingsTable); } private void reportVersionSpecificProblems(final SettingTable table, final IProgressMonitor monitor) throws CoreException { versionDependentValidators.getGeneralSettingsTableValidators(table).forEach(ModelUnitValidator::validate); } private void reportUnknownSettings(final List<UnknownSetting> unknownSettings) { for (final UnknownSetting unknownSetting : unknownSettings) { final RobotToken token = unknownSetting.getDeclaration(); final RobotProblem problem = RobotProblem.causedBy(GeneralSettingsProblem.UNKNOWN_SETTING) .formatMessageWith(token.getText()); final String robotVersion = validationContext.getVersion().asString(); reporter.handleProblem(problem, validationContext.getFile(), token, ImmutableMap.of(AdditionalMarkerAttributes.NAME, token.getText(), AdditionalMarkerAttributes.ROBOT_VERSION, robotVersion)); } } private void validateLibraries(final RobotSuiteFile suiteFile, final List<LibraryImport> libraryImports, final IProgressMonitor monitor) throws CoreException { new GeneralSettingsLibrariesImportValidator(validationContext, suiteFile, libraryImports, reporter) .validate(monitor); } private void validateResources(final RobotSuiteFile suiteFile, final List<ResourceImport> resourcesImports, final IProgressMonitor monitor) throws CoreException { new GeneralSettingsResourcesImportValidator(validationContext, suiteFile, resourcesImports, reporter) .validate(monitor); } private void validateVariables(final RobotSuiteFile suiteFile, final List<VariablesImport> variablesImports, final IProgressMonitor monitor) throws CoreException { new GeneralSettingsVariablesImportValidator(validationContext, suiteFile, variablesImports, reporter) .validate(monitor); } private void validateSetupsAndTeardowns(final List<? extends AKeywordBaseSetting<?>> keywordBasedSettings) { final boolean areAllEmpty = keywordBasedSettings.stream().map(AKeywordBaseSetting::getKeywordName).allMatch( kwToken -> kwToken == null); if (areAllEmpty) { reportEmptySettings(keywordBasedSettings); } } private void validateTemplates(final List<TestTemplate> testTemplates, final List<TaskTemplate> taskTemplates) { final List<TemplateSetting> allTemplates = new ArrayList<>(testTemplates); allTemplates.addAll(taskTemplates); final boolean areAllEmpty = allTemplates.stream() .map(TemplateSetting::getKeywordName) .allMatch(kwToken -> kwToken == null); if (areAllEmpty) { reportEmptySettings(testTemplates); reportEmptySettings(taskTemplates); } } private void validateTestTimeouts(final List<TestTimeout> timeouts) { final boolean areAllEmpty = timeouts.stream().map(TestTimeout::getTimeout).allMatch( timeoutToken -> timeoutToken == null); if (areAllEmpty) { reportEmptySettings(timeouts); } reportInvalidTimeoutSyntax( timeouts.stream().map(TestTimeout::getTimeout).filter(t -> t != null).collect(toList())); } private void validateTaskTimeouts(final List<TaskTimeout> timeouts) { final boolean areAllEmpty = timeouts.stream() .map(TaskTimeout::getTimeout) .allMatch(timeoutToken -> timeoutToken == null); if (areAllEmpty) { reportEmptySettings(timeouts); } reportInvalidTimeoutSyntax( timeouts.stream().map(TaskTimeout::getTimeout).filter(t -> t != null).collect(toList())); } private void reportInvalidTimeoutSyntax(final List<RobotToken> timeouts) { for (final RobotToken timeoutToken : timeouts) { final String timeout = timeoutToken.getText(); if (!timeoutToken.getTypes().contains(RobotTokenType.VARIABLE_USAGE) && !timeout.equalsIgnoreCase("none") && !RobotTimeFormat.isValidRobotTimeArgument(timeout.trim())) { final RobotProblem problem = RobotProblem.causedBy(ArgumentProblem.INVALID_TIME_FORMAT) .formatMessageWith(timeout); reporter.handleProblem(problem, validationContext.getFile(), timeoutToken); } } } private void validateTags(final List<? extends ATags<?>> tagsSetting) { final boolean areAllEmpty = tagsSetting.stream().map(ATags::getTags).allMatch(List::isEmpty); if (areAllEmpty) { reportEmptySettings(tagsSetting); } } private void validateDocumentations(final List<SuiteDocumentation> documentations) { final boolean areAllEmpty = documentations.stream().map(SuiteDocumentation::getDocumentationText).allMatch( List::isEmpty); if (areAllEmpty) { reportEmptySettings(documentations); } } private void validateMetadatas(final List<Metadata> metadatas) { final List<Metadata> emptyMetadatas = metadatas.stream().filter(metadata -> metadata.getKey() == null).collect( toList()); reportEmptySettings(emptyMetadatas); } private void reportEmptySettings(final List<? extends AModelElement<?>> elements) { for (final AModelElement<?> element : elements) { final RobotToken settingToken = element.getDeclaration(); final String settingName = settingToken.getText(); final RobotProblem problem = RobotProblem.causedBy(GeneralSettingsProblem.EMPTY_SETTING) .formatMessageWith(settingName); reporter.handleProblem(problem, validationContext.getFile(), settingToken); } } private void validateTestAndTasksSettingsMixes(final RobotSuiteFile model, final SettingTable settingsTable) { if (model.isSuiteFile()) { final Stream<AModelElement<?>> taskSettings = Streams.concat(settingsTable.getTaskSetups().stream(), settingsTable.getTaskTeardowns().stream(), settingsTable.getTaskTemplates().stream(), settingsTable.getTaskTimeouts().stream()); taskSettings.map(AModelElement::getDeclaration) .forEach(settingDecl -> reportTestAndTaskSettingMixed( GeneralSettingsProblem.TASK_SETTING_USED_IN_TESTS_SUITE, settingDecl)); } else if (model.isRpaSuiteFile()) { final Stream<AModelElement<?>> testSettings = Streams.concat(settingsTable.getTestSetups().stream(), settingsTable.getTestTeardowns().stream(), settingsTable.getTestTemplates().stream(), settingsTable.getTestTimeouts().stream()); testSettings.map(AModelElement::getDeclaration) .forEach(settingDecl -> reportTestAndTaskSettingMixed( GeneralSettingsProblem.TEST_SETTING_USED_IN_TASKS_SUITE, settingDecl)); } } private void reportTestAndTaskSettingMixed(final IProblemCause cause, final RobotToken declaration) { final String settingName = declaration.getText(); final RobotProblem problem = RobotProblem.causedBy(cause).formatMessageWith(settingName); reporter.handleProblem(problem, validationContext.getFile(), declaration, ImmutableMap.of(AdditionalMarkerAttributes.NAME, settingName)); } private void validateKeywordsAndVariablesUsagesInExecutables(final SettingTable settingsTable) { final Set<String> additionalVariables = new HashSet<>(); final List<ExecutableValidator> execValidators = new ArrayList<>(); for (final SuiteSetup suiteSetup : settingsTable.getSuiteSetups()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, suiteSetup, reporter)); } for (final TestSetup testSetup : settingsTable.getTestSetups()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, testSetup, reporter)); } for (final TaskSetup taskSetup : settingsTable.getTaskSetups()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, taskSetup, reporter)); } for (final TaskTeardown taskTeardown : settingsTable.getTaskTeardowns()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, taskTeardown, reporter)); } for (final TestTeardown testTeardown : settingsTable.getTestTeardowns()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, testTeardown, reporter)); } for (final SuiteTeardown suiteTeardown : settingsTable.getSuiteTeardowns()) { execValidators.add(ExecutableValidator.of(validationContext, additionalVariables, suiteTeardown, reporter)); } execValidators.forEach(ExecutableValidator::validate); } private void reportUnknownVariablesInNonExecutables(final SettingTable settingsTable) { final UnknownVariables unknownVarsValidator = new UnknownVariables(validationContext, reporter); for (final TestTimeout testTimeout : settingsTable.getTestTimeouts()) { unknownVarsValidator.reportUnknownVars(testTimeout.getTimeout()); } for (final TaskTimeout taskTimeout : settingsTable.getTaskTimeouts()) { unknownVarsValidator.reportUnknownVars(taskTimeout.getTimeout()); } for (final DefaultTags defaultTag : settingsTable.getDefaultTags()) { unknownVarsValidator.reportUnknownVars(defaultTag.getTags()); } for (final ForceTags forceTag : settingsTable.getForceTags()) { unknownVarsValidator.reportUnknownVars(forceTag.getTags()); } } }
DCarper/rubinius
lib/ext/melbourne/visitor19.cpp
#include <sstream> #include <stdint.h> #include "ruby.h" #include "parser_state19.hpp" #include "visitor19.hpp" #include "symbols.hpp" namespace melbourne { namespace grammar19 { void create_error(rb_parser_state *parser_state, char *msg) { VALUE err_msg; // Cleanup one of the common and ugly syntax errors. if(std::string("syntax error, unexpected $end, expecting kEND") == std::string(msg)) { if(start_lines->size() > 0) { StartPosition& pos = start_lines->back(); std::stringstream ss; ss << "missing 'end' for '" << pos.kind << "' started on line " << pos.line; err_msg = rb_str_new2(ss.str().c_str()); } else { err_msg = rb_str_new2("missing 'end' for unknown start"); } } else { err_msg = 0; std::string pmsg(msg); std::string comma(", "); size_t one = pmsg.find(comma); if(one != std::string::npos) { size_t two = pmsg.find(comma, one+1); if(two != std::string::npos) { std::string sub = pmsg.substr(two+2); err_msg = rb_str_new2(sub.c_str()); } } if(!err_msg) err_msg = rb_str_new2(msg); } int col = (int)(lex_p - lex_pbeg); rb_funcall(processor, rb_intern("process_parse_error"),4, err_msg, INT2FIX(col), INT2FIX(ruby_sourceline), lex_lastline); parse_error = true; } #define nd_3rd u3.node VALUE process_parse_tree(rb_parser_state*, VALUE, NODE*, ID*); static VALUE process_dynamic(rb_parser_state *parser_state, VALUE ptp, NODE *node, ID *locals) { VALUE array = rb_ary_new(); while(node) { if (node->nd_head) { rb_ary_push(array, process_parse_tree(parser_state, ptp, node->nd_head, locals)); } node = node->nd_next; } return array; } static VALUE process_iter(rb_parser_state *parser_state, VALUE ptp, NODE *node, ID *locals, int *level, ID method, VALUE line) { VALUE iter, body, args; iter = process_parse_tree(parser_state, ptp, node->nd_iter, locals); (*level)++; if (node->nd_var != (NODE *)1 && node->nd_var != (NODE *)2 && node->nd_var != NULL) { args = process_parse_tree(parser_state, ptp, node->nd_var, locals); } else { if (node->nd_var == NULL) { // e.g. proc {} args = Qnil; } else { // e.g. proc {||} args = INT2FIX(0); } } (*level)--; body = process_parse_tree(parser_state, ptp, node->nd_body, locals); return rb_funcall(ptp, method, 4, line, iter, args, body); } /* Visits all the nodes in the parse tree. * Adapted from ParseTree by <NAME> and <NAME>. */ VALUE process_parse_tree(rb_parser_state *parser_state, VALUE ptp, NODE *n, ID *locals) { NODE * volatile node = n; static int masgn_level = 0; static unsigned case_level = 0; static unsigned when_level = 0; static unsigned inside_case_args = 0; VALUE line, tree = Qnil; if(!node) return tree; again: if(node) { line = INT2FIX(nd_line(node)); } else { return rb_funcall(ptp, rb_intern("process_dangling_node"), 0); } // fprintf(stderr, "%s\n", get_node_type_string((enum node_type)nd_type(node))); switch(nd_type(node)) { case NODE_BLOCK: { VALUE array = rb_ary_new(); while (node) { rb_ary_push(array, process_parse_tree(parser_state, ptp, node->nd_head, locals)); node = node->nd_next; } tree = rb_funcall(ptp, rb_sBlock, 2, line, array); break; } case NODE_DEFINED: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_head, locals); tree = rb_funcall(ptp, rb_sDefined, 2, line, expr); break; } case NODE_COLON2: { VALUE container = process_parse_tree(parser_state, ptp, node->nd_head, locals); tree = rb_funcall(ptp, rb_sColon2, 3, line, container, ID2SYM(node->nd_mid)); break; } case NODE_MATCH2: { VALUE pattern = process_parse_tree(parser_state, ptp, node->nd_recv, locals); VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sMatch2, 3, line, pattern, value); break; } case NODE_MATCH3: { VALUE pattern = process_parse_tree(parser_state, ptp, node->nd_recv, locals); VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sMatch3, 3, line, pattern, value); break; } case NODE_BEGIN: { VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sBegin, 2, line, body); break; } case NODE_IF: { VALUE cond, body = Qnil, else_body = Qnil; cond = process_parse_tree(parser_state, ptp, node->nd_cond, locals); if (node->nd_body) { body = process_parse_tree(parser_state, ptp, node->nd_body, locals); } if (node->nd_else) { else_body = process_parse_tree(parser_state, ptp, node->nd_else, locals); } tree = rb_funcall(ptp, rb_sIf, 4, line, cond, body, else_body); break; } case NODE_CASE: { VALUE expr = Qnil, els = Qnil; NODE* else_node = 0; case_level++; if(node->nd_head) { expr = process_parse_tree(parser_state, ptp, node->nd_head, locals); /* expr */ } VALUE whens = rb_ary_new(); node = node->nd_body; while(node) { if (nd_type(node) == NODE_WHEN) { /* when */ rb_ary_push(whens, process_parse_tree(parser_state, ptp, node, locals)); node = node->nd_next; } else { else_node = node; break; /* else */ } } case_level--; // Be sure to decrease the case_level before processing the else. // See http://github.com/rubinius/rubinius/issues#issue/240 for an example of // why. if(else_node) { els = process_parse_tree(parser_state, ptp, else_node, locals); } tree = rb_funcall(ptp, rb_sCase, 4, line, expr, whens, els); break; } case NODE_WHEN: { VALUE body = Qnil; when_level++; /* when without case, ie, no expr in case */ if(!inside_case_args && case_level < when_level) { if(when_level > 0) when_level--; node = NEW_CASE(0, node); goto again; } inside_case_args++; VALUE args = process_parse_tree(parser_state, ptp, node->nd_head, locals); /* args */ inside_case_args--; if(node->nd_body) { body = process_parse_tree(parser_state, ptp, node->nd_body, locals); /* body */ } if(when_level > 0) when_level--; tree = rb_funcall(ptp, rb_sWhen, 3, line, args, body); break; } case NODE_WHILE: { VALUE cond, body = Qnil, post_cond; cond = process_parse_tree(parser_state, ptp, node->nd_cond, locals); if(node->nd_body) { body = process_parse_tree(parser_state, ptp, node->nd_body, locals); } post_cond = node->nd_3rd == 0 ? Qfalse : Qtrue; tree = rb_funcall(ptp, rb_sWhile, 4, line, cond, body, post_cond); break; } case NODE_UNTIL: { VALUE cond, body = Qnil, post_cond; cond = process_parse_tree(parser_state, ptp, node->nd_cond, locals); if(node->nd_body) { body = process_parse_tree(parser_state, ptp, node->nd_body, locals); } post_cond = node->nd_3rd == 0 ? Qfalse : Qtrue; tree = rb_funcall(ptp, rb_sUntil, 4, line, cond, body, post_cond); break; } case NODE_BLOCK_PASS: { VALUE args = Qnil; if(node->nd_1st) { args = process_parse_tree(parser_state, ptp, node->nd_1st, locals); } VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sBlockPass, 3, line, args, body); break; } case NODE_FOR: tree = process_iter(parser_state, ptp, node, locals, &masgn_level, rb_sFor, line); break; case NODE_ITER: { VALUE iter = process_parse_tree(parser_state, ptp, node->nd_iter, locals); VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sIter, 3, line, iter, body); break; } case NODE_LAMBDA: { VALUE scope = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sLambda, 2, line, scope); break; } case NODE_BREAK: { VALUE expr = Qnil; if (node->nd_stts) { expr = process_parse_tree(parser_state, ptp, node->nd_stts, locals); } tree = rb_funcall(ptp, rb_sBreak, 2, line, expr); break; } case NODE_NEXT: { VALUE expr = Qnil; if (node->nd_stts) { expr = process_parse_tree(parser_state, ptp, node->nd_stts, locals); } tree = rb_funcall(ptp, rb_sNext, 2, line, expr); break; } case NODE_YIELD: { VALUE expr = Qnil; if (node->nd_stts) { expr = process_parse_tree(parser_state, ptp, node->nd_stts, locals); } tree = rb_funcall(ptp, rb_sYield, 3, line, expr, node->u3.value); break; } case NODE_RESCUE: { VALUE body = process_parse_tree(parser_state, ptp, node->nd_1st, locals); VALUE resc = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); VALUE els = process_parse_tree(parser_state, ptp, node->nd_3rd, locals); tree = rb_funcall(ptp, rb_sRescue, 4, line, body, resc, els); break; } case NODE_RESBODY: { /* rescue body: * begin stmt rescue exception => var; stmt; [rescue e2 => v2; s2;]* end * stmt rescue stmt * a = b rescue c */ VALUE conditions = Qnil; if(node->nd_3rd) { conditions = process_parse_tree(parser_state, ptp, node->nd_3rd, locals); } VALUE body = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); VALUE next = process_parse_tree(parser_state, ptp, node->nd_1st, locals); tree = rb_funcall(ptp, rb_sResbody, 4, line, conditions, body, next); break; } case NODE_ENSURE: { VALUE head, ensr = Qnil; head = process_parse_tree(parser_state, ptp, node->nd_head, locals); if (node->nd_ensr) { ensr = process_parse_tree(parser_state, ptp, node->nd_ensr, locals); } tree = rb_funcall(ptp, rb_sEnsure, 3, line, head, ensr); break; } case NODE_AND: { VALUE left = process_parse_tree(parser_state, ptp, node->nd_1st, locals); VALUE right = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); tree = rb_funcall(ptp, rb_sAnd, 3, line, left, right); break; } case NODE_OR: { VALUE left = process_parse_tree(parser_state, ptp, node->nd_1st, locals); VALUE right = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); tree = rb_funcall(ptp, rb_sOr, 3, line, left, right); break; } case NODE_DOT2: { VALUE start = process_parse_tree(parser_state, ptp, node->nd_beg, locals); VALUE finish = process_parse_tree(parser_state, ptp, node->nd_end, locals); tree = rb_funcall(ptp, rb_sDot2, 3, line, start, finish); break; } case NODE_DOT3: { VALUE start = process_parse_tree(parser_state, ptp, node->nd_beg, locals); VALUE finish = process_parse_tree(parser_state, ptp, node->nd_end, locals); tree = rb_funcall(ptp, rb_sDot3, 3, line, start, finish); break; } case NODE_FLIP2: { VALUE start = process_parse_tree(parser_state, ptp, node->nd_beg, locals); VALUE finish = process_parse_tree(parser_state, ptp, node->nd_end, locals); tree = rb_funcall(ptp, rb_sFlip2, 3, line, start, finish); break; } case NODE_FLIP3: { VALUE start = process_parse_tree(parser_state, ptp, node->nd_beg, locals); VALUE finish = process_parse_tree(parser_state, ptp, node->nd_end, locals); tree = rb_funcall(ptp, rb_sFlip3, 3, line, start, finish); break; } case NODE_RETURN: { VALUE expr = Qnil; if (node->nd_stts) { expr = process_parse_tree(parser_state, ptp, node->nd_stts, locals); } tree = rb_funcall(ptp, rb_sReturn, 2, line, expr); break; } case NODE_ARGSCAT: { VALUE array = process_parse_tree(parser_state, ptp, node->nd_head, locals); VALUE rest = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sArgsCat, 3, line, array, rest); break; } case NODE_ARGSPUSH: { VALUE head = process_parse_tree(parser_state, ptp, node->nd_head, locals); VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sArgsPush, 3, line, head, body); break; } case NODE_CALL: { VALUE args = Qnil; VALUE recv = process_parse_tree(parser_state, ptp, node->nd_recv, locals); if (node->nd_args) { args = process_parse_tree(parser_state, ptp, node->nd_args, locals); } tree = rb_funcall(ptp, rb_sCall, 4, line, recv, ID2SYM(node->nd_mid), args); break; } case NODE_FCALL: { VALUE args = Qnil; if (node->nd_args) { args = process_parse_tree(parser_state, ptp, node->nd_args, locals); } tree = rb_funcall(ptp, rb_sFCall, 3, line, ID2SYM(node->nd_mid), args); break; } case NODE_VCALL: tree = rb_funcall(ptp, rb_sVCall, 2, line, ID2SYM(node->nd_mid)); break; case NODE_SUPER: { VALUE args = process_parse_tree(parser_state, ptp, node->nd_args, locals); tree = rb_funcall(ptp, rb_sSuper, 2, line, args); break; } case NODE_SCOPE: { VALUE args = Qnil; VALUE bv_locals = Qnil; if(node->nd_args) { if(nd_type(node->nd_args) == NODE_ARGS_AUX) { args = process_parse_tree(parser_state, ptp, node->nd_args->nd_1st, node->nd_tbl); bv_locals = process_parse_tree(parser_state, ptp, node->nd_args->nd_2nd, node->nd_tbl); } else { args = process_parse_tree(parser_state, ptp, node->nd_args, node->nd_tbl); } } VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, node->nd_tbl); tree = rb_funcall(ptp, rb_sScope, 4, line, args, body, bv_locals); break; } case NODE_OP_ASGN1: { VALUE op; VALUE recv = process_parse_tree(parser_state, ptp, node->nd_recv, locals); VALUE args = process_parse_tree(parser_state, ptp, node->nd_args->nd_2nd, locals); switch(node->nd_mid) { case 0: op = ID2SYM(parser_intern("or")); break; case 1: op = ID2SYM(parser_intern("and")); break; default: op = ID2SYM(node->nd_mid); } VALUE value = process_parse_tree(parser_state, ptp, node->nd_args->nd_head, locals); tree = rb_funcall(ptp, rb_sOpAsgn1, 5, line, recv, value, op, args); break; } case NODE_OP_ASGN2: { VALUE op; VALUE recv = process_parse_tree(parser_state, ptp, node->nd_recv, locals); switch(node->nd_next->nd_mid) { case 0: op = ID2SYM(parser_intern("or")); break; case 1: op = ID2SYM(parser_intern("and")); break; default: op = ID2SYM(node->nd_next->nd_mid); } VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sOpAsgn2, 5, line, recv, ID2SYM(node->nd_next->nd_aid), op, value); break; } case NODE_OP_ASGN_AND: { VALUE var = process_parse_tree(parser_state, ptp, node->nd_head, locals); VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sOpAsgnAnd, 3, line, var, value); break; } case NODE_OP_ASGN_OR: { VALUE var = process_parse_tree(parser_state, ptp, node->nd_head, locals); VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sOpAsgnOr, 3, line, var, value); break; } case NODE_MASGN: { VALUE args = Qnil; masgn_level++; VALUE head = process_parse_tree(parser_state, ptp, node->nd_head, locals); if (node->nd_args) { if(node->nd_args != (NODE *)-1) { args = process_parse_tree(parser_state, ptp, node->nd_args, locals); } else { args = Qtrue; } } VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sMAsgn, 4, line, head, value, args); masgn_level--; break; } case NODE_LASGN: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sLAsgn, 3, line, ID2SYM(node->nd_vid), expr); break; } case NODE_IASGN: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sIAsgn, 3, line, ID2SYM(node->nd_vid), expr); break; } case NODE_CVASGN: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sCVAsgn, 3, line, ID2SYM(node->nd_vid), expr); break; } case NODE_CVDECL: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sCVDecl, 3, line, ID2SYM(node->nd_vid), expr); break; } case NODE_GASGN: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sGAsgn, 3, line, ID2SYM(node->nd_vid), expr); break; } case NODE_CDECL: { VALUE expr; if(node->nd_vid) { expr = ID2SYM(node->nd_vid); } else { expr = process_parse_tree(parser_state, ptp, node->nd_else, locals); } VALUE value = process_parse_tree(parser_state, ptp, node->nd_value, locals); tree = rb_funcall(ptp, rb_sCDecl, 3, line, expr, value); break; } case NODE_VALIAS: /* u1 u2 (alias $global $global2) */ tree = rb_funcall(ptp, rb_sVAlias, 3, line, ID2SYM(node->u1.id), ID2SYM(node->u2.id)); break; case NODE_ALIAS: { /* u1 u2 (alias :blah :blah2) */ VALUE to = process_parse_tree(parser_state, ptp, node->u1.node, locals); VALUE from = process_parse_tree(parser_state, ptp, node->u2.node, locals); tree = rb_funcall(ptp, rb_sAlias, 3, line, to, from); break; } case NODE_UNDEF: { /* u2 (undef instvar) */ VALUE name = process_parse_tree(parser_state, ptp, node->u2.node, locals); tree = rb_funcall(ptp, rb_sUndef, 2, line, name); break; } case NODE_COLON3: /* u2 (::OUTER_CONST) */ tree = rb_funcall(ptp, rb_sColon3, 2, line, ID2SYM(node->u2.id)); break; case NODE_HASH: { VALUE array = rb_ary_new(); node = node->nd_head; while (node) { rb_ary_push(array, process_parse_tree(parser_state, ptp, node->nd_head, locals)); if (!(node = node->nd_next)) { // @todo: properly process the parse error printf("odd number list for Hash"); abort(); } rb_ary_push(array, process_parse_tree(parser_state, ptp, node->nd_head, locals)); node = node->nd_next; } tree = rb_funcall(ptp, rb_sHash, 2, line, array); break; } case NODE_ARRAY: { VALUE array = rb_ary_new(); while (node) { rb_ary_push(array, process_parse_tree(parser_state, ptp, node->nd_head, locals)); node = node->nd_next; } tree = rb_funcall(ptp, rb_sArray, 2, line, array); break; } case NODE_DSTR: { VALUE array = process_dynamic(parser_state, ptp, node->nd_next, locals); tree = rb_funcall(ptp, rb_sDStr, 3, line, node->nd_lit, array); break; } case NODE_DSYM: { VALUE array = process_dynamic(parser_state, ptp, node->nd_next, locals); tree = rb_funcall(ptp, rb_sDSym, 3, line, node->nd_lit, array); break; } case NODE_DXSTR: { VALUE array = process_dynamic(parser_state, ptp, node->nd_next, locals); tree = rb_funcall(ptp, rb_sDXStr, 3, line, node->nd_lit, array); break; } case NODE_DREGX: { VALUE flags = Qnil; VALUE array = process_dynamic(parser_state, ptp, node->nd_next, locals); if (node->nd_cflag) flags = INT2FIX(node->nd_cflag); tree = rb_funcall(ptp, rb_sDRegx, 4, line, node->nd_lit, array, flags); break; } case NODE_DREGX_ONCE: { VALUE flags = Qnil; VALUE array = process_dynamic(parser_state, ptp, node->nd_next, locals); if (node->nd_cflag) flags = INT2FIX(node->nd_cflag); tree = rb_funcall(ptp, rb_sDRegxOnce, 4, line, node->nd_lit, array, flags); break; } case NODE_DEFN: { VALUE body = Qnil; if (node->nd_defn) { body = process_parse_tree(parser_state, ptp, node->nd_defn, locals); } tree = rb_funcall(ptp, rb_sDefn, 3, line, ID2SYM(node->nd_mid), body); break; } case NODE_DEFS: { VALUE recv = Qnil, body = Qnil; if (node->nd_defn) { recv = process_parse_tree(parser_state, ptp, node->nd_recv, locals); body = process_parse_tree(parser_state, ptp, node->nd_defn, locals); } tree = rb_funcall(ptp, rb_sDefs, 4, line, recv, ID2SYM(node->nd_mid), body); break; } case NODE_CLASS: { VALUE name, super = Qnil; if (nd_type(node->nd_cpath) == NODE_COLON2 && !node->nd_cpath->nd_vid) { name = ID2SYM((ID)node->nd_cpath->nd_mid); } else { name = process_parse_tree(parser_state, ptp, node->nd_cpath, locals); } if(node->nd_super) { super = process_parse_tree(parser_state, ptp, node->nd_super, locals); } VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sClass, 4, line, name, super, body); break; } case NODE_MODULE: { VALUE name; if (nd_type(node->nd_cpath) == NODE_COLON2 && !node->nd_cpath->nd_vid) { name = ID2SYM((ID)node->nd_cpath->nd_mid); } else { name = process_parse_tree(parser_state, ptp, node->nd_cpath, locals); } VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sModule, 3, line, name, body); break; } case NODE_SCLASS: { VALUE recv = process_parse_tree(parser_state, ptp, node->nd_recv, locals); VALUE body = process_parse_tree(parser_state, ptp, node->nd_body, locals); tree = rb_funcall(ptp, rb_sSClass, 3, line, recv, body); break; } case NODE_OPT_ARG: { VALUE args = rb_ary_new(); do { rb_ary_push(args, process_parse_tree(parser_state, ptp, node->nd_body, locals)); node = node->nd_next; } while(node); tree = rb_funcall(ptp, rb_sOptArg, 2, line, args); break; } case NODE_ARGS: { VALUE args = Qnil; VALUE opts = Qnil; VALUE splat = Qnil; VALUE post = Qnil; VALUE block = Qnil; int total_args = 0; ID* args_ary = 0; NODE* aux = node->nd_args; NODE* post_args = aux->nd_next; NODE* masgn = 0; NODE* next = 0; if(node->nd_argc > 0) { total_args = (int)locals[0]; args_ary = locals + 1; if(post_args && post_args->nd_next && nd_type(post_args->nd_next) == NODE_AND) { if(nd_type(post_args->nd_next->nd_head) == NODE_BLOCK) { masgn = post_args->nd_next->nd_head->nd_head; next = post_args->nd_next->nd_head->nd_next; } else { masgn = post_args->nd_next->nd_head; next = masgn->nd_next; // -1 comes from: mlhs_head tSTAR if(masgn->nd_cnt == -1) next = 0; } } args = rb_ary_new(); for(int i = 0; i < node->nd_argc && i < total_args; i++) { VALUE arg = Qnil; if(!INTERNAL_ID_P(args_ary[i])) { arg = ID2SYM(args_ary[i]); } else if(masgn) { arg = process_parse_tree(parser_state, ptp, masgn, locals); if(next && nd_type(next) == NODE_BLOCK) { masgn = next->nd_head; next = next->nd_next; } else { masgn = next; if(masgn) next = masgn->nd_next; } } rb_ary_push(args, arg); } } if(node->nd_opt) { opts = process_parse_tree(parser_state, ptp, node->nd_opt, locals); } if(INTERNAL_ID_P(aux->nd_rest)) { splat = Qtrue; } else if(aux->nd_rest) { if(aux->nd_rest == 1) { // m { |a,| ... } splat = Qfalse; } else { splat = ID2SYM(aux->nd_rest); } } if(aux->nd_mid) block = ID2SYM(aux->nd_mid); if(post_args && post_args->nd_pid) { total_args = (int)locals[0]; args_ary = locals + 1; int start; for(start = 0; start < total_args; start++) { if(args_ary[start] == post_args->nd_pid) break; } post = rb_ary_new(); for(int i = 0; i < post_args->nd_argc && start + i < total_args; i++) { rb_ary_push(post, ID2SYM(args_ary[start + i])); } } tree = rb_funcall(ptp, rb_sArgs, 6, line, args, opts, splat, post, block); break; } case NODE_LVAR: if(!INTERNAL_ID_P(node->nd_vid)) { tree = rb_funcall(ptp, rb_sLVar, 2, line, ID2SYM(node->nd_vid)); } break; case NODE_IVAR: tree = rb_funcall(ptp, rb_sIVar, 2, line, ID2SYM(node->nd_vid)); break; case NODE_CVAR: tree = rb_funcall(ptp, rb_sCVar, 2, line, ID2SYM(node->nd_vid)); break; case NODE_GVAR: tree = rb_funcall(ptp, rb_sGVar, 2, line, ID2SYM(node->nd_vid)); break; case NODE_CONST: tree = rb_funcall(ptp, rb_sConst, 2, line, ID2SYM(node->nd_vid)); break; case NODE_XSTR: /* u1 (%x{ls}) */ tree = rb_funcall(ptp, rb_sXStr, 2, line, node->nd_lit); break; case NODE_STR: /* u1 */ tree = rb_funcall(ptp, rb_sStr, 2, line, node->nd_lit); break; case NODE_REGEX: tree = rb_funcall(ptp, rb_sRegex, 3, line, node->nd_lit, INT2FIX(node->nd_cnt)); break; case NODE_MATCH: tree = rb_funcall(ptp, rb_sMatch, 3, line, node->nd_lit, INT2FIX(node->nd_cnt)); break; case NODE_LIT: tree = rb_funcall(ptp, rb_sLit, 2, line, node->nd_lit); break; case NODE_VALUES: { VALUE first = process_parse_tree(parser_state, ptp, node->nd_head, locals); VALUE rest = process_parse_tree(parser_state, ptp, node->nd_args, locals); tree = rb_funcall(ptp, rb_sValues, 3, line, first, rest); break; } case NODE_NUMBER: tree = rb_funcall(ptp, rb_sNumber, 2, line, node->nd_lit); break; case NODE_FLOAT: tree = rb_funcall(ptp, rb_sFloat, 2, line, node->nd_lit); break; case NODE_NTH_REF: /* u2 u3 ($1) - u3 is local_cnt('~') ignorable? */ tree = rb_funcall(ptp, rb_sNthRef, 2, line, INT2FIX(node->nd_nth)); break; case NODE_BACK_REF: { /* u2 u3 ($& etc) */ char str[2]; str[0] = node->nd_nth; str[1] = 0; tree = rb_funcall(ptp, rb_sBackRef, 2, line, ID2SYM(parser_intern(str))); break; } case NODE_BLOCK_ARG: /* u1 u3 (def x(&b) */ tree = rb_funcall(ptp, rb_sBlockArg, 2, line, ID2SYM(node->u1.id)); break; case NODE_RETRY: tree = rb_funcall(ptp, rb_sRetry, 1, line); break; case NODE_FALSE: tree = rb_funcall(ptp, rb_sFalse, 1, line); break; case NODE_NIL: tree = rb_funcall(ptp, rb_sNil, 1, line); break; case NODE_SELF: tree = rb_funcall(ptp, rb_sSelf, 1, line); break; case NODE_TRUE: tree = rb_funcall(ptp, rb_sTrue, 1, line); break; case NODE_ZARRAY: tree = rb_funcall(ptp, rb_sZArray, 1, line); break; case NODE_ZSUPER: tree = rb_funcall(ptp, rb_sZSuper, 1, line); break; case NODE_REDO: tree = rb_funcall(ptp, rb_sRedo, 1, line); break; case NODE_FILE: tree = rb_funcall(ptp, rb_sFile, 1, line); break; case NODE_SPLAT: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_head, locals); tree = rb_funcall(ptp, rb_sSplat, 2, line, expr); break; } case NODE_TO_ARY: { VALUE expr = process_parse_tree(parser_state, ptp, node->nd_head, locals); tree = rb_funcall(ptp, rb_sToAry, 2, line, expr); break; } case NODE_ATTRASGN: { /* literal.meth = y u1 u2 u3 */ VALUE recv; /* node id node */ if (node->nd_1st == RNODE(1)) { recv = process_parse_tree(parser_state, ptp, NEW_SELF(), locals); } else { recv = process_parse_tree(parser_state, ptp, node->nd_1st, locals); } VALUE value = process_parse_tree(parser_state, ptp, node->nd_3rd, locals); tree = rb_funcall(ptp, rb_sAttrAsgn, 4, line, recv, ID2SYM(node->u2.id), value); break; } case NODE_EVSTR: { VALUE value = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); tree = rb_funcall(ptp, rb_sEvStr, 2, line, value); break; } case NODE_POSTEXE: { /* END { ... } */ VALUE scope = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); tree = rb_funcall(ptp, rb_sPostExe, 2, line, scope); break; } case NODE_POSTARG: { VALUE into = Qnil; if(node->nd_1st != RNODE(-1)) { into = process_parse_tree(parser_state, ptp, node->nd_1st, locals); } VALUE rest = process_parse_tree(parser_state, ptp, node->nd_2nd, locals); tree = rb_funcall(ptp, rb_sPostArg, 3, line, into, rest); break; } default: { VALUE node_name = rb_str_new2(get_node_type_string((enum node_type)nd_type(node))); VALUE node_type = INT2FIX(nd_type(node)); tree = rb_funcall(ptp, rb_intern("process_missing_node"), 3, line, node_name, node_type); break; } } return tree; } }; // namespace grammar19 };
saulmaldonado/ds-and-algorithms
arrays/2sum/2sum.js
/** * @param {number[]} nums * @param {number} target * @return {number[]} */ function twoSum(nums, target) { const map = {}; for (let i = 0; i < nums.length; i++) { if (map[target - nums[i]] !== undefined) { return [map[target - nums[i]], i]; } map[nums[i]] = i; } return []; }
ahgamut/randonet
src/randonet/generator/__init__.py
<reponame>ahgamut/randonet from .param import IntParam, FloatParam, BinaryParam, ChoiceParam, TupleParam from .unit import Unit, Factory
tinours/PCSim2
src/gov/nist/javax/sip/header/AllowEventsList.java
<reponame>tinours/PCSim2<filename>src/gov/nist/javax/sip/header/AllowEventsList.java<gh_stars>1-10 /******************************************************************************* * Product of NIST/ITL Advanced Networking Technologies Division (ANTD). * *******************************************************************************/ package gov.nist.javax.sip.header; import java.util.*; import java.text.ParseException; import javax.sip.header.*; /** * List of AllowEvents headers. * The sip message can have multiple AllowEvents headers which are strung * together in a list. * * @author <NAME> <<EMAIL>> <br/> * @author <NAME> <<EMAIL>><br/> * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a> * * @version JAIN-SIP-1.1 $Revision: 1.2 $ $Date: 2004/01/22 13:26:29 $ * */ public class AllowEventsList extends SIPHeaderList { private static final long serialVersionUID = 1L; /** default constructor */ public AllowEventsList() { super(AllowEvents.class, AllowEventsHeader.NAME); } /** * Gets an Iterator of all the methods of the AllowEventsHeader. Returns an empty * * Iterator if no methods are defined in this AllowEvents Header. * * * * @return Iterator of String objects each identifing the methods of * * AllowEventsHeader. * * @since JAIN SIP v1.1 * */ public ListIterator<String> getMethods() { ListIterator<?> li = super.hlist.listIterator(); LinkedList<String> ll = new LinkedList<String>(); while (li.hasNext()) { AllowEvents allowEvents = (AllowEvents) li.next(); ll.add(allowEvents.getEventType()); } return ll.listIterator(); } /** * Sets the methods supported defined by this AllowEventsHeader. * * * * @param methods - the Iterator of Strings defining the methods supported * * in this AllowEventsHeader * * @throws ParseException which signals that an error has been reached * * unexpectedly while parsing the Strings defining the methods supported. * * @since JAIN SIP v1.1 * */ public void setMethods(List<String> methods) throws ParseException { ListIterator<String> it = methods.listIterator(); while (it.hasNext()) { AllowEvents allowEvents = new AllowEvents(); allowEvents.setEventType((String) it.next()); this.add(allowEvents); } } } /* * $Log: AllowEventsList.java,v $ * Revision 1.2 2004/01/22 13:26:29 sverker * Issue number: * Obtained from: * Submitted by: sverker * Reviewed by: mranga * * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags. * * CVS: ---------------------------------------------------------------------- * CVS: Issue number: * CVS: If this change addresses one or more issues, * CVS: then enter the issue number(s) here. * CVS: Obtained from: * CVS: If this change has been taken from another system, * CVS: then name the system in this line, otherwise delete it. * CVS: Submitted by: * CVS: If this code has been contributed to the project by someone else; i.e., * CVS: they sent us a patch or a set of diffs, then include their name/email * CVS: address here. If this is your work then delete this line. * CVS: Reviewed by: * CVS: If we are doing pre-commit code reviews and someone else has * CVS: reviewed your changes, include their name(s) here. * CVS: If you have not had it reviewed then delete this line. * */
mferten/k12k20tr.com
public/js/USAStates/NY/mapdata.js
<reponame>mferten/k12k20tr.com<gh_stars>0 simplemaps_statemap_mapdata={ main_settings: { width: "responsive", background_color: "#FFFFFF", background_transparent: "yes", popups: "detect", state_description: "State description", state_color: "#88A4BC", state_hover_color: "#3B729F", state_url: "", border_size: 1.5, border_color: "#ffffff", all_states_inactive: "no", all_states_zoomable: "no", location_description: "Location description", location_color: "#FF0067", location_opacity: 0.8, location_hover_opacity: 1, location_url: "", location_size: 25, location_type: "square", location_border_color: "#FFFFFF", location_border: 2, location_hover_border: 2.5, all_locations_inactive: "no", all_locations_hidden: "no", label_color: "#ffffff", label_hover_color: "#ffffff", label_size: 22, label_font: "Arial", hide_labels: "no", manual_zoom: "no", back_image: "no", arrow_box: "no", navigation_size: "40", navigation_color: "#f7f7f7", navigation_border_color: "#636363", initial_back: "no", initial_zoom: -1, initial_zoom_solo: "no", region_opacity: 1, region_hover_opacity: 0.6, zoom_out_incrementally: "yes", zoom_percentage: 0.99, zoom_time: 0.5, popup_color: "white", popup_opacity: 0.9, popup_shadow: 1, popup_corners: 5, popup_font: "12px/1.5 Verdana, Arial, Helvetica, sans-serif", popup_nocss: "no", div: "map", auto_load: "no", rotate: "0", url_new_tab: "yes", images_directory: "default", import_labels: "no", fade_time: 0.1, link_text: "View Website" }, state_specific: { "36001": { name: "Albany", description: "default", color: "default", hover_color: "default", url: "default" }, "36003": { name: "Allegany", description: "default", color: "default", hover_color: "default", url: "default" }, "36005": { name: "Bronx", description: "default", color: "default", hover_color: "default", url: "default" }, "36007": { name: "Broome", description: "default", color: "default", hover_color: "default", url: "default" }, "36009": { name: "Cattaraugus", description: "default", color: "default", hover_color: "default", url: "default" }, "36011": { name: "Cayuga", description: "default", color: "default", hover_color: "default", url: "default" }, "36013": { name: "Chautauqua", description: "default", color: "default", hover_color: "default", url: "default" }, "36015": { name: "Chemung", description: "default", color: "default", hover_color: "default", url: "default" }, "36017": { name: "Chenango", description: "default", color: "default", hover_color: "default", url: "default" }, "36019": { name: "Clinton", description: "default", color: "default", hover_color: "default", url: "default" }, "36021": { name: "Columbia", description: "default", color: "default", hover_color: "default", url: "default" }, "36023": { name: "Cortland", description: "default", color: "default", hover_color: "default", url: "default" }, "36025": { name: "Delaware", description: "default", color: "default", hover_color: "default", url: "default" }, "36027": { name: "Dutchess", description: "default", color: "default", hover_color: "default", url: "default" }, "36029": { name: "Erie", description: "default", color: "default", hover_color: "default", url: "default" }, "36031": { name: "Essex", description: "default", color: "default", hover_color: "default", url: "default" }, "36033": { name: "Franklin", description: "default", color: "default", hover_color: "default", url: "default" }, "36035": { name: "Fulton", description: "default", color: "default", hover_color: "default", url: "default" }, "36037": { name: "Genesee", description: "default", color: "default", hover_color: "default", url: "default" }, "36039": { name: "Greene", description: "default", color: "default", hover_color: "default", url: "default" }, "36041": { name: "Hamilton", description: "default", color: "default", hover_color: "default", url: "default" }, "36043": { name: "Herkimer", description: "default", color: "default", hover_color: "default", url: "default" }, "36045": { name: "Jefferson", description: "default", color: "default", hover_color: "default", url: "default" }, "36047": { name: "Kings", description: "default", color: "default", hover_color: "default", url: "default" }, "36049": { name: "Lewis", description: "default", color: "default", hover_color: "default", url: "default" }, "36051": { name: "Livingston", description: "default", color: "default", hover_color: "default", url: "default" }, "36053": { name: "Madison", description: "default", color: "default", hover_color: "default", url: "default" }, "36055": { name: "Monroe", description: "default", color: "default", hover_color: "default", url: "default" }, "36057": { name: "Montgomery", description: "default", color: "default", hover_color: "default", url: "default" }, "36059": { name: "Nassau", description: "default", color: "default", hover_color: "default", url: "default" }, "36061": { name: "<NAME>", description: "default", color: "default", hover_color: "default", url: "default" }, "36063": { name: "Niagara", description: "default", color: "default", hover_color: "default", url: "default" }, "36065": { name: "Oneida", description: "default", color: "default", hover_color: "default", url: "default" }, "36067": { name: "Onondaga", description: "default", color: "default", hover_color: "default", url: "default" }, "36069": { name: "Ontario", description: "default", color: "default", hover_color: "default", url: "default" }, "36071": { name: "Orange", description: "default", color: "default", hover_color: "default", url: "default" }, "36073": { name: "Orleans", description: "default", color: "default", hover_color: "default", url: "default" }, "36075": { name: "Oswego", description: "default", color: "default", hover_color: "default", url: "default" }, "36077": { name: "Otsego", description: "default", color: "default", hover_color: "default", url: "default" }, "36079": { name: "Putnam", description: "default", color: "default", hover_color: "default", url: "default" }, "36081": { name: "Queens", description: "default", color: "default", hover_color: "default", url: "default" }, "36083": { name: "Rensselaer", description: "default", color: "default", hover_color: "default", url: "default" }, "36085": { name: "Richmond", description: "default", color: "default", hover_color: "default", url: "default" }, "36087": { name: "Rockland", description: "default", color: "default", hover_color: "default", url: "default" }, "36089": { name: "<NAME>", description: "default", color: "default", hover_color: "default", url: "default" }, "36091": { name: "Saratoga", description: "default", color: "default", hover_color: "default", url: "default" }, "36093": { name: "Schenectady", description: "default", color: "default", hover_color: "default", url: "default" }, "36095": { name: "Schoharie", description: "default", color: "default", hover_color: "default", url: "default" }, "36097": { name: "Schuyler", description: "default", color: "default", hover_color: "default", url: "default" }, "36099": { name: "Seneca", description: "default", color: "default", hover_color: "default", url: "default" }, "36101": { name: "Steuben", description: "default", color: "default", hover_color: "default", url: "default" }, "36103": { name: "Suffolk", description: "default", color: "default", hover_color: "default", url: "default" }, "36105": { name: "Sullivan", description: "default", color: "default", hover_color: "default", url: "default" }, "36107": { name: "Tioga", description: "default", color: "default", hover_color: "default", url: "default" }, "36109": { name: "Tompkins", description: "default", color: "default", hover_color: "default", url: "default" }, "36111": { name: "Ulster", description: "default", color: "default", hover_color: "default", url: "default" }, "36113": { name: "Warren", description: "default", color: "default", hover_color: "default", url: "default" }, "36115": { name: "Washington", description: "default", color: "default", hover_color: "default", url: "default" }, "36117": { name: "Wayne", description: "default", color: "default", hover_color: "default", url: "default" }, "36119": { name: "Westchester", description: "default", color: "default", hover_color: "default", url: "default" }, "36121": { name: "Wyoming", description: "default", color: "default", hover_color: "default", url: "default" }, "36123": { name: "Yates", description: "default", color: "default", hover_color: "default", url: "default" } }, locations: {}, labels: {} };
alexgorbatchev/date-fns
src/is_same_minute/test.js
<filename>src/is_same_minute/test.js // @flow /* eslint-env mocha */ var assert = require('power-assert') var isSameMinute = require('./') describe('isSameMinute', function () { it('returns true if the given dates have the same minute', function () { var result = isSameMinute( new Date(2014, 8 /* Sep */, 4, 6, 30), new Date(2014, 8 /* Sep */, 4, 6, 30, 15) ) assert(result === true) }) it('returns false if the given dates have different minutes', function () { var result = isSameMinute( new Date(2014, 8 /* Sep */, 4, 6, 30, 59), new Date(2014, 8 /* Sep */, 4, 6, 31) ) assert(result === false) }) it('accepts a string', function () { var result = isSameMinute( new Date(2014, 8 /* Sep */, 4, 18, 45).toISOString(), new Date(2014, 8 /* Sep */, 4, 18, 45, 30).toISOString() ) assert(result === true) }) it('accepts a timestamp', function () { var result = isSameMinute( new Date(2014, 8 /* Sep */, 4, 18, 45).getTime(), new Date(2014, 8 /* Sep */, 4, 18, 45, 30).getTime() ) assert(result === true) }) })
yoooou/Nucleus
src/s1ap/handlers/paging.c
/* * Copyright (c) 2019, Infosys Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <string.h> #include <unistd.h> #include <stdint.h> #include "ProtocolIE-Container.h" #include "ProtocolIE-ID.h" #include "ProtocolIE-Field.h" #include "log.h" #include "err_codes.h" #include "ipc_api.h" #include "s1ap.h" #include "s1ap_config.h" #include "main.h" #include "msgType.h" #include "common_proc_info.h" /*Stage specific message processing. */ static int paging_processing(struct paging_req_Q_msg *g_paging) { log_msg(LOG_DEBUG,"Process paging."); uint32_t length = 0; uint8_t *buffer = NULL; Buffer g_paging_buffer = {0}; struct s1ap_common_req_Q_msg req = {0}; req.IE_type = S1AP_PAGING_REQ; req.enb_fd = g_paging->enb_fd; req.m_tmsi = g_paging->ue_idx; req.enb_s1ap_ue_id = g_paging->enb_s1ap_ue_id; req.cn_domain = g_paging->cn_domain; memcpy(req.imsi, g_paging->IMSI, BINARY_IMSI_LEN); memcpy(&req.tai, &g_paging->tai, sizeof(struct TAI)); int ret = s1ap_mme_encode_initiating(&req, &buffer, &length); if(ret == -1) { log_msg(LOG_ERROR, "Encoding paging request failed.\n"); return E_FAIL; } buffer_copy(&g_paging_buffer, buffer, length); send_sctp_msg(g_paging->enb_fd, g_paging_buffer.buf, g_paging_buffer.pos,1); log_msg(LOG_INFO, "\n-----Paging sent to UE.---\n"); return SUCCESS; } /** * Thread function for stage. */ void* paging_handler(void *data) { log_msg(LOG_INFO, "paging handler ready.\n"); paging_processing((struct paging_req_Q_msg*)data); return NULL; }
Roulbac/GanSeg
test.py
<reponame>Roulbac/GanSeg<gh_stars>10-100 from options.test_parser import TestParser from models import create_model, get_model_parsing_modifier from datasets import create_dataset, get_dataset_parsing_modifier parser = TestParser() model_name = parser.get_model_name() dataset_name = parser.get_dataset_name() print('Model name: {}'.format(model_name)) print('Dataset name: {}'.format(dataset_name)) model_parser_modifier = get_model_parsing_modifier(model_name) model_parser_modifier(parser, is_train=False) dataset_parser_modifier = get_dataset_parsing_modifier(dataset_name) dataset_parser_modifier(parser, is_train=False) opts, _ = parser.parse_options() opts_str = parser.make_opts_string(opts, verbose=True) model = create_model(opts) dataset = create_dataset(opts) if opts.eval: model.set_eval() model.test(dataset)
microjasa/javolution
src/test/java/org/javolution/lang/MathLibTest.java
<gh_stars>100-1000 /* * Javolution - Java(TM) Solution for Real-Time and Embedded Systems * Copyright (C) 2012 - Javolution (http://javolution.org/) * All rights reserved. * * Permission to use, copy, modify, and distribute this software is * freely granted, provided that this notice is preserved. */ package org.javolution.lang; import static org.junit.Assert.assertEquals; import org.junit.Test; public class MathLibTest { @Test public void testAbsWithDouble(){ assertEquals("Absolute Value of Negative Input Returns Positive", 1.0, MathLib.abs(-1.0), 0); assertEquals("Absolute Value of Positive Input Returns Positive", 1.0, MathLib.abs(-1.0), 0); } @Test public void testAbsWithFloat(){ assertEquals("Absolute Value of Negative Input Returns Positive", 1.0f, MathLib.abs(-1.0f), 0); assertEquals("Absolute Value of Positive Input Returns Positive", 1.0f, MathLib.abs(-1.0f), 0); } @Test public void testAbsWithInt(){ assertEquals("Absolute Value of Negative Input Returns Positive", 1, MathLib.abs(-1)); assertEquals("Absolute Value of Positive Input Returns Positive", 1, MathLib.abs(1)); } @Test public void testAbsWithLong(){ assertEquals("Absolute Value of Negative Input Returns Positive", 1L, MathLib.abs(-1L)); assertEquals("Absolute Value of Positive Input Returns Positive", 1L, MathLib.abs(1L)); } @Test public void testBitCount(){ assertEquals("BitCount of 1 is 1", 1, MathLib.bitCount(1L)); assertEquals("BitCount of 2 is 1", 1, MathLib.bitCount(2L)); assertEquals("BitCount of 3 is 2", 2, MathLib.bitCount(3L)); assertEquals("BitCount of 4 is 1", 1, MathLib.bitCount(4L)); assertEquals("BitCount of 5 is 2", 2, MathLib.bitCount(5L)); assertEquals("BitCount of 6 is 2", 2, MathLib.bitCount(6L)); assertEquals("BitCount of 7 is 3", 3, MathLib.bitCount(7L)); assertEquals("BitCount of 8 is 1", 1, MathLib.bitCount(8L)); } @Test public void testBitLengthWithInt(){ assertEquals("BitLength of 1 is 1", 1, MathLib.bitLength(1)); assertEquals("BitLength of 2 is 2", 2, MathLib.bitLength(2)); assertEquals("BitLength of 3 is 2", 2, MathLib.bitLength(3)); assertEquals("BitLength of 4 is 3", 3, MathLib.bitLength(4)); assertEquals("BitLength of 5 is 3", 3, MathLib.bitLength(5)); assertEquals("BitLength of 6 is 3", 3, MathLib.bitLength(6)); assertEquals("BitLength of 7 is 3", 3, MathLib.bitLength(7)); assertEquals("BitLength of 8 is 4", 4, MathLib.bitLength(8)); } @Test public void testBitLengthWithLong(){ assertEquals("BitLength of 1 is 1", 1, MathLib.bitLength(1L)); assertEquals("BitLength of 2 is 2", 2, MathLib.bitLength(2L)); assertEquals("BitLength of 3 is 2", 2, MathLib.bitLength(3L)); assertEquals("BitLength of 4 is 3", 3, MathLib.bitLength(4L)); assertEquals("BitLength of 5 is 3", 3, MathLib.bitLength(5L)); assertEquals("BitLength of 6 is 3", 3, MathLib.bitLength(6L)); assertEquals("BitLength of 7 is 3", 3, MathLib.bitLength(7L)); assertEquals("BitLength of 8 is 4", 4, MathLib.bitLength(8L)); } @Test public void testCeil(){ assertEquals("Ceil(1.0) is 1.0", 1.0, MathLib.ceil(1.0), 1.0); assertEquals("Ceil(1.1) is 2.0", 2.0, MathLib.ceil(1.1), 1.0); assertEquals("Ceil(1.2) is 2.0", 2.0, MathLib.ceil(1.2), 1.0); assertEquals("Ceil(1.3) is 2.0", 2.0, MathLib.ceil(1.3), 1.0); assertEquals("Ceil(1.4) is 2.0", 2.0, MathLib.ceil(1.4), 1.0); assertEquals("Ceil(1.5) is 2.0", 2.0, MathLib.ceil(1.5), 1.0); assertEquals("Ceil(1.6) is 2.0", 2.0, MathLib.ceil(1.6), 1.0); assertEquals("Ceil(1.7) is 2.0", 2.0, MathLib.ceil(1.7), 1.0); assertEquals("Ceil(1.8) is 2.0", 2.0, MathLib.ceil(1.8), 1.0); assertEquals("Ceil(1.9) is 2.0", 2.0, MathLib.ceil(1.9), 1.0); } @Test public void testDigitLengthWithInt(){ assertEquals("Digit Length of 1 is 1", 1, MathLib.digitLength(1)); assertEquals("Digit Length of 12 is 2", 2, MathLib.digitLength(12)); assertEquals("Digit Length of 123 is 3", 3, MathLib.digitLength(123)); assertEquals("Digit Length of 1234 is 4", 4, MathLib.digitLength(1234)); assertEquals("Digit Length of -1 is 1", 1, MathLib.digitLength(-1)); assertEquals("Digit Length of -12 is 2", 2, MathLib.digitLength(-12)); assertEquals("Digit Length of -123 is 3", 3, MathLib.digitLength(-123)); assertEquals("Digit Length of -1234 is 4", 4, MathLib.digitLength(-1234)); assertEquals("Digit Length of Integer.MIN_VALUE is 10", 10, MathLib.digitLength(Integer.MIN_VALUE)); assertEquals("Digit Length of Integer.MAX_VALUE is 10", 10, MathLib.digitLength(Integer.MAX_VALUE)); } @Test public void testDigitLengthWithLong(){ assertEquals("Digit Length of 1 is 1", 1, MathLib.digitLength(1L)); assertEquals("Digit Length of 12 is 2", 2, MathLib.digitLength(12L)); assertEquals("Digit Length of 123 is 3", 3, MathLib.digitLength(123L)); assertEquals("Digit Length of 1234 is 4", 4, MathLib.digitLength(1234L)); assertEquals("Digit Length of -1 is 1", 1, MathLib.digitLength(-1L)); assertEquals("Digit Length of -12 is 2", 2, MathLib.digitLength(-12L)); assertEquals("Digit Length of -123 is 3", 3, MathLib.digitLength(-123L)); assertEquals("Digit Length of -1234 is 4", 4, MathLib.digitLength(-1234L)); assertEquals("Digit Length of Long.MIN_VALUE is 19", 19, MathLib.digitLength(Long.MIN_VALUE)); assertEquals("Digit Length of Long.MAX_VALUE is 19", 19, MathLib.digitLength(Long.MAX_VALUE)); } @Test public void testFloor(){ assertEquals("Floor(1.1) is 1.0", 1.0, MathLib.floor(1.1), 1.0); assertEquals("Floor(1.2) is 1.0", 1.0, MathLib.floor(1.2), 1.0); assertEquals("Floor(1.3) is 1.0", 1.0, MathLib.floor(1.3), 1.0); assertEquals("Floor(1.4) is 1.0", 1.0, MathLib.floor(1.4), 1.0); assertEquals("Floor(1.5) is 1.0", 1.0, MathLib.floor(1.5), 1.0); assertEquals("Floor(1.6) is 1.0", 1.0, MathLib.floor(1.6), 1.0); assertEquals("Floor(1.7) is 1.0", 1.0, MathLib.floor(1.7), 1.0); assertEquals("Floor(1.8) is 1.0", 1.0, MathLib.floor(1.8), 1.0); assertEquals("Floor(1.9) is 1.0", 1.0, MathLib.floor(1.9), 1.0); assertEquals("Floor(2.0) is 2.0", 2.0, MathLib.floor(2.0), 1.0); } @Test public void testMaxWithDouble(){ assertEquals("Max(5.0,7.0) Is 7.0", 7.0, MathLib.max(5.0,7.0), 0.0); assertEquals("Max(-7.0,5.0) Is 5.0", 5.0, MathLib.max(-7.0,5.0), 0.0); } @Test public void testMaxWithFloat(){ assertEquals("Max(5.0,7.0) Is 7.0", 7.0f, MathLib.max(5.0f,7.0f), 0.0); assertEquals("Max(-7.0,5.0) Is 5.0", 5.0f, MathLib.max(-7.0f,5.0f), 0.0); } @Test public void testMaxWithInt(){ assertEquals("Max(5,7) Is 7", 7, MathLib.max(5,7)); assertEquals("Max(-7,5) Is 5", 5, MathLib.max(-7,5)); } @Test public void testMaxWithLong(){ assertEquals("Max(5,7) Is 7", 7L, MathLib.max(5L,7L)); assertEquals("Max(-7,5) Is 5", 5L, MathLib.max(-7L,5L)); } @Test public void testMinWithDouble(){ assertEquals("Min(5.0,7.0) Is 5.0", 5.0, MathLib.min(5.0,7.0), 0.0); assertEquals("Min(-7.0,5.0) Is -7.0", -7.0, MathLib.min(-7.0,5.0), 0.0); } @Test public void testMinWithFloat(){ assertEquals("Min(5.0,7.0) Is 5.0", 5.0f, MathLib.min(5.0f,7.0f), 0.0); assertEquals("Min(-7.0,5.0) Is -7.0", -7.0f, MathLib.min(-7.0f,5.0f), 0.0); } @Test public void testMinWithInt(){ assertEquals("Min(5,7) Is 5", 5, MathLib.min(5,7)); assertEquals("Min(-7,5) Is -7", -7, MathLib.min(-7,5)); } @Test public void testMinWithLong(){ assertEquals("Min(5,7) Is 5", 5L, MathLib.min(5L,7L)); assertEquals("Min(-7,5) Is -7", -7L, MathLib.min(-7L,5L)); } @Test public void testNumberOfLeadingZeros(){ assertEquals("Leading Zeroes of 0 is 64", 64, MathLib.numberOfLeadingZeros(0L)); assertEquals("Leading Zeroes of 1 is 63", 63, MathLib.numberOfLeadingZeros(1L)); assertEquals("Leading Zeroes of 2 is 62", 62, MathLib.numberOfLeadingZeros(2L)); assertEquals("Leading Zeroes of 3 is 62", 62, MathLib.numberOfLeadingZeros(3L)); assertEquals("Leading Zeroes of 4 is 61", 61, MathLib.numberOfLeadingZeros(4L)); } @Test public void testNumberOfTrailingZeros(){ // When all bits are 0, you can't classify leading vs. trailing so its 64 assertEquals("Leading Zeroes of 0 is 64", 64, MathLib.numberOfTrailingZeros(0L)); assertEquals("Leading Zeroes of 1 is 0", 0, MathLib.numberOfTrailingZeros(1L)); assertEquals("Leading Zeroes of 2 is 1", 1, MathLib.numberOfTrailingZeros(2L)); assertEquals("Leading Zeroes of 3 is 0", 0, MathLib.numberOfTrailingZeros(3L)); assertEquals("Leading Zeroes of 4 is 2", 2, MathLib.numberOfTrailingZeros(4L)); } @Test public void testRoundWithDouble(){ assertEquals("Round(1.0) is 1.0", 1.0, MathLib.round(1.0), 1.0); assertEquals("Round(1.1) is 1.0", 1.0, MathLib.round(1.1), 1.0); assertEquals("Round(1.2) is 1.0", 1.0, MathLib.round(1.2), 1.0); assertEquals("Round(1.3) is 1.0", 1.0, MathLib.round(1.3), 1.0); assertEquals("Round(1.4) is 1.0", 1.0, MathLib.round(1.4), 1.0); assertEquals("Round(1.5) is 2.0", 2.0, MathLib.round(1.5), 1.0); assertEquals("Round(1.6) is 2.0", 2.0, MathLib.round(1.6), 1.0); assertEquals("Round(1.7) is 2.0", 2.0, MathLib.round(1.7), 1.0); assertEquals("Round(1.8) is 2.0", 2.0, MathLib.round(1.8), 1.0); assertEquals("Round(1.9) is 2.0", 2.0, MathLib.round(1.9), 1.0); } @Test public void testRoundWithFloat(){ assertEquals("Round(1.0) is 1.0", 1.0f, MathLib.round(1.0f), 1.0); assertEquals("Round(1.1) is 1.0", 1.0f, MathLib.round(1.1f), 1.0); assertEquals("Round(1.2) is 1.0", 1.0f, MathLib.round(1.2f), 1.0); assertEquals("Round(1.3) is 1.0", 1.0f, MathLib.round(1.3f), 1.0); assertEquals("Round(1.4) is 1.0", 1.0f, MathLib.round(1.4f), 1.0); assertEquals("Round(1.5) is 2.0", 2.0f, MathLib.round(1.5f), 1.0); assertEquals("Round(1.6) is 2.0", 2.0f, MathLib.round(1.6f), 1.0); assertEquals("Round(1.7) is 2.0", 2.0f, MathLib.round(1.7f), 1.0); assertEquals("Round(1.8) is 2.0", 2.0f, MathLib.round(1.8f), 1.0); assertEquals("Round(1.9) is 2.0", 2.0f, MathLib.round(1.9f), 1.0); } @Test public void testSqrt(){ assertEquals("Sqrt(9) Is 3", 3.0, MathLib.sqrt(9.0), 0.0); } }
jdleesmiller/writelatex-git-bridge
src/main/java/uk/ac/ic/wlgitbridge/snapshot/push/exception/InvalidPostbackKeyException.java
package uk.ac.ic.wlgitbridge.snapshot.push.exception; /** * Created by Winston on 04/12/14. */ public class InvalidPostbackKeyException extends Exception {}
keynes120/red-packet
node_modules/plupload/src/moxie/src/javascript/runtime/flash/file/FileReader.js
<filename>node_modules/plupload/src/moxie/src/javascript/runtime/flash/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileReader @private */ define("moxie/runtime/flash/file/FileReader", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Encode" ], function(extensions, Encode) { function _formatData(data, op) { switch (op) { case 'readAsText': return Encode.atob(data, 'utf8'); case 'readAsBinaryString': return Encode.atob(data); case 'readAsDataURL': return data; } return null; } var FileReader = { read: function(op, blob) { var comp = this; comp.result = ''; // special prefix for DataURL read mode if (op === 'readAsDataURL') { comp.result = 'data:' + (blob.type || '') + ';base64,'; } comp.bind('Progress', function(e, data) { if (data) { comp.result += _formatData(data, op); } }, 999); return comp.getRuntime().shimExec.call(this, 'FileReader', 'readAsBase64', blob.uid); } }; return (extensions.FileReader = FileReader); });
punzki/kotlin
libraries/stdlib/jvm/runtime/kotlin/jvm/internal/MutablePropertyReference1.java
<filename>libraries/stdlib/jvm/runtime/kotlin/jvm/internal/MutablePropertyReference1.java /* * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * that can be found in the license/LICENSE.txt file. */ package kotlin.jvm.internal; import kotlin.SinceKotlin; import kotlin.reflect.KCallable; import kotlin.reflect.KMutableProperty1; import kotlin.reflect.KProperty1; @SuppressWarnings("unchecked") public abstract class MutablePropertyReference1 extends MutablePropertyReference implements KMutableProperty1 { public MutablePropertyReference1() { } @SinceKotlin(version = "1.1") public MutablePropertyReference1(Object receiver) { super(receiver); } @Override protected KCallable computeReflected() { return Reflection.mutableProperty1(this); } @Override public Object invoke(Object receiver) { return get(receiver); } @Override public KProperty1.Getter getGetter() { return ((KMutableProperty1) getReflected()).getGetter(); } @Override public KMutableProperty1.Setter getSetter() { return ((KMutableProperty1) getReflected()).getSetter(); } @Override @SinceKotlin(version = "1.1") public Object getDelegate(Object receiver) { return ((KMutableProperty1) getReflected()).getDelegate(receiver); } }
adam-mautner/iMarcats-Market-System
marketmodel/src/main/java/com/imarcats/model/mutators/PropertyChangeListener.java
<reponame>adam-mautner/iMarcats-Market-System<filename>marketmodel/src/main/java/com/imarcats/model/mutators/PropertyChangeListener.java package com.imarcats.model.mutators; /** * Call-back Listener of Property Changes * * @author Adam * */ public interface PropertyChangeListener { /** * Called on the change of a Property * @param changedObject_ Object being Changed * @param propertyChange_ Property Change */ public void propertyChanged(Object changedObject_, PropertyChange propertyChange_); }
JackDan9/hamal
hamal/hamal/auth/token.py
<reponame>JackDan9/hamal # _*_ coding:utf-8 _*_ from datetime import datetime, timedelta import jwt from oslo_log import log as logging import hamal.conf from hamal import exception from hamal.i18n import _, _LE, _LI CONF = hamal.conf.CONF LOG = logging.getLogger(__name__) def create_token(user): """Create token by user information :param user: context to user information """ payload = { 'username': user['email'], 'id': user['id'], 'extra': user['extra'], 'default_project_id': user['default_project_id'], 'iat': datetime.utcnow(), 'exp': datetime.utcnow() + timedelta(days=1) } token = jwt.encode(payload, CONF.token.secret, algorithm='HS256') return token def verify_token(token): """Verify token information :param token: context to token information """ try: payload = jwt.decode(token, CONF.token.secret, algorithms=['HS256']) payload['email'] = payload['username'] token = create_token(payload) return token except: LOG.exception(_LE('Verify token exception!')) return False
isuruuy429/product-ei
integration/mediation-tests/tests-common/integration-test-utils/src/main/java/org/wso2/esb/integration/common/utils/clients/jmsclient/JMSQueueMessageProducer.java
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.wso2.esb.integration.common.utils.clients.jmsclient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.automation.extensions.servers.jmsserver.controller.config.JMSBrokerConfiguration; import java.io.Serializable; import java.util.Properties; import javax.jms.BytesMessage; import javax.jms.Connection; import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MapMessage; import javax.jms.Message; import javax.jms.MessageProducer; import javax.jms.ObjectMessage; import javax.jms.QueueConnectionFactory; import javax.jms.Session; import javax.jms.StreamMessage; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; /** * This class replicates org.wso2.carbon.automation.extensions.servers.jmsserver.client.JMSQueueMessageProducer * introducing a Message Producer for a JMS queue, with additional methods including publishing different types of * JMS messages. */ public class JMSQueueMessageProducer { private static final Log logger = LogFactory.getLog(JMSQueueMessageProducer.class); /** * Constant to identify if the broker used is WSO2 MB. */ private static final String MB_BROKER_URL_PREFIX = "amqp://"; private Connection connection = null; private Session session = null; private MessageProducer producer = null; private QueueConnectionFactory connectionFactory = null; public JMSQueueMessageProducer(JMSBrokerConfiguration jmsBrokerConfiguration) throws NamingException { Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, jmsBrokerConfiguration.getInitialNamingFactory()); if (jmsBrokerConfiguration.getProviderURL().startsWith(MB_BROKER_URL_PREFIX)) { //setting property for Qpid running on WSO2 MB properties.put("connectionfactory.QueueConnectionFactory", jmsBrokerConfiguration.getProviderURL()); } else { //setting property for ActiveMQ properties.setProperty(Context.PROVIDER_URL, jmsBrokerConfiguration.getProviderURL()); } Context context = new InitialContext(properties); connectionFactory = (QueueConnectionFactory) context.lookup("QueueConnectionFactory"); } /** * Method to establish the connection with the given Queue, with messages not being persisted. * This must be called before calling pushMessage() to send messages. * * @param queueName name of the Queue * @throws JMSException if an error occurs creating the connection, session or producer */ public void connect(String queueName) throws JMSException { connect(queueName, false); } /** * Method to establish the connection with the given Queue, with message persistance as specified. * This must be called before calling pushMessage() to send messages. * * @param persistMessage whether or not messages need to be persisted * @param queueName name of the queue * @throws JMSException if connection to the queue fails */ public void connect(String queueName, boolean persistMessage) throws JMSException { connection = connectionFactory.createConnection(); connection.start(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = session.createQueue(queueName); producer = session.createProducer(destination); if (persistMessage) { producer.setDeliveryMode(DeliveryMode.PERSISTENT); } else { producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); } } /** * Method to disconnect the connection with the given Queue. * This must be called after sending the messages to release the connection. */ public void disconnect() { try { if (producer != null) { producer.close(); } if (session != null) { session.close(); } if (connection != null) { connection.close(); } } catch (JMSException e) { logger.warn("JMSException thrown while disconnecting ", e); } } /** * Method to send the message to the destination Queue. * * @param message message to be sent */ public void sendMessage(Message message) throws JMSException { checkIfConnected(); producer.send(message); } /** * Method to send a TextMessage. * * @param payload content of the TextMessage to be sent * @throws JMSException if an error occurs sending the BytesMessage */ public void sendTextMessage(String payload) throws JMSException { checkIfConnected(); TextMessage textMessage = session.createTextMessage(payload); producer.send(textMessage); } /** * Method to send a BytesMessage. * * @param payload content of the BytesMessage to be sent * @throws JMSException if an error occurs sending the BytesMessage */ public void sendBytesMessage(byte[] payload) throws JMSException { checkIfConnected(); BytesMessage bytesMessage = session.createBytesMessage(); bytesMessage.writeBytes(payload); producer.send(bytesMessage); } /** * Method to send a StreamMessage. * * @param payload content of the StreamMessage to be sent * @throws JMSException if an error occurs sending the BytesMessage */ public void sendStreamMessage(byte[] payload) throws JMSException { checkIfConnected(); StreamMessage streamMessage = session.createStreamMessage(); streamMessage.writeBytes(payload); producer.send(streamMessage); } /** * Method to send a MapMessage. * * @throws JMSException if an error occurs sending the MapMessage */ public void sendMapMessage() throws JMSException { checkIfConnected(); MapMessage mapMessage = session.createMapMessage(); producer.send(mapMessage); } /** * Method to send an ObjectMessage. * * @param payload content of the ObjectMessage to be sent * @throws JMSException if an error occurs sending the ObjectMessage */ public void sendObjectMessage(Serializable payload) throws JMSException { checkIfConnected(); ObjectMessage objectMessage = session.createObjectMessage(payload); producer.send(objectMessage); } /** * Private method to check if session or producer are null, implying a connection was not established. * * @throws IllegalStateException if a connection has not been established */ private void checkIfConnected() throws IllegalStateException { if (session == null || producer == null) { throw new IllegalStateException("No connection to a queue. Connection needs to be established to send " + "messages"); } } }
ant0ine/phantomjs
src/qt/src/3rdparty/webkit/Source/WebCore/storage/IDBObjectStore.h
<gh_stars>10-100 /* * Copyright (C) 2010 Google 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: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef IDBObjectStore_h #define IDBObjectStore_h #include "IDBCursor.h" #include "IDBIndex.h" #include "IDBKey.h" #include "IDBKeyRange.h" #include "IDBObjectStoreBackendInterface.h" #include "IDBRequest.h" #include "OptionsObject.h" #include "PlatformString.h" #include "SerializedScriptValue.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> #if ENABLE(INDEXED_DATABASE) namespace WebCore { class DOMStringList; class IDBAny; class IDBObjectStore : public RefCounted<IDBObjectStore> { public: static PassRefPtr<IDBObjectStore> create(PassRefPtr<IDBObjectStoreBackendInterface> idbObjectStore, IDBTransaction* transaction) { return adoptRef(new IDBObjectStore(idbObjectStore, transaction)); } ~IDBObjectStore() { } String name() const; String keyPath() const; PassRefPtr<DOMStringList> indexNames() const; // FIXME: Try to modify the code generator so this is unneeded. PassRefPtr<IDBRequest> add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return add(context, value, 0, ec); } PassRefPtr<IDBRequest> put(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return put(context, value, 0, ec); } PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, ExceptionCode& ec) { return createIndex(name, keyPath, OptionsObject(), ec); } PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, 0, ec); } PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::NEXT, ec); } PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKey>, ExceptionCode&); PassRefPtr<IDBRequest> add(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, ExceptionCode&); PassRefPtr<IDBRequest> put(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, ExceptionCode&); PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, PassRefPtr<IDBKey> key, ExceptionCode&); PassRefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCode&); PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, const OptionsObject&, ExceptionCode&); PassRefPtr<IDBIndex> index(const String& name, ExceptionCode&); void deleteIndex(const String& name, ExceptionCode&); PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, unsigned short direction, ExceptionCode&); private: IDBObjectStore(PassRefPtr<IDBObjectStoreBackendInterface>, IDBTransaction*); void removeTransactionFromPendingList(); RefPtr<IDBObjectStoreBackendInterface> m_objectStore; RefPtr<IDBTransaction> m_transaction; }; } // namespace WebCore #endif #endif // IDBObjectStore_h
onap/aai-aai-common
aai-core/src/main/java/org/onap/aai/serialization/queryformats/ChangesFormat.java
/** * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. 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 required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= */ package org.onap.aai.serialization.queryformats; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import org.apache.tinkerpop.gremlin.structure.Direction; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.onap.aai.config.SpringContextAware; import org.onap.aai.db.props.AAIProperties; import org.onap.aai.serialization.queryformats.exceptions.AAIFormatVertexException; import java.util.*; import java.util.concurrent.TimeUnit; public class ChangesFormat extends MultiFormatMapper { private Long startTs = 0L; public void startTs(String startTime) { /* * StartTs = truncate time */ if (startTime == null || startTime.isEmpty() || "now".equals(startTime) || "0".equals(startTime) || "-1".equals(startTime)){ String historyTruncateDays = SpringContextAware.getApplicationContext().getEnvironment().getProperty("history.truncate.window.days", "365"); this.startTs = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(Long.parseLong(historyTruncateDays)); } else { this.startTs = Long.parseLong(startTime); } } @Override protected Optional<JsonObject> getJsonFromVertex(Vertex v) { JsonObject json = new JsonObject(); if (!v.properties(AAIProperties.RESOURCE_VERSION).hasNext() || !v.properties(AAIProperties.NODE_TYPE).hasNext() || !v.properties(AAIProperties.AAI_URI).hasNext()) { return Optional.empty(); } json.addProperty("node-type", v.<String>value(AAIProperties.NODE_TYPE)); json.addProperty("uri", v.<String>value(AAIProperties.AAI_URI)); final Set<Long> changes = new HashSet<>(); v.properties(AAIProperties.RESOURCE_VERSION).forEachRemaining(o-> o.properties(AAIProperties.START_TS, AAIProperties.END_TS) .forEachRemaining(p -> { Long val = (Long) p.value(); if(val >= startTs) { changes.add(val); } } )); v.edges(Direction.BOTH).forEachRemaining(e -> { if(e.property(AAIProperties.START_TS).isPresent() && (Long)e.property(AAIProperties.START_TS).value() >= startTs) { changes.add((Long) e.property(AAIProperties.START_TS).value()); } if(e.property(AAIProperties.END_TS).isPresent() && (Long)e.property(AAIProperties.END_TS).value() >= startTs) { changes.add((Long) e.property(AAIProperties.END_TS).value()); } }); List<Long> sortedList = new ArrayList<>(changes); sortedList.sort(Comparator.naturalOrder()); JsonArray jsonArray = new JsonArray(); sortedList.forEach(jsonArray::add); json.add("changes", jsonArray); return Optional.of(json); } @Override protected Optional<JsonObject> getJsonFromVertex(Vertex input, Map<String, List<String>> properties) throws AAIFormatVertexException { return Optional.empty(); } }
ameryhan/amery_base_java
ahan/src/main/java/amery/interview/sortbigfile/MergerFileSortTask.java
<reponame>ameryhan/amery_base_java<gh_stars>1-10 package amery.interview.sortbigfile; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.RecursiveTask; public class MergerFileSortTask extends RecursiveTask<String> { List<String> partFiles; int lo, hi; String filename; public MergerFileSortTask(List<String> partFiles, int lo, int hi, String filename) { super(); this.partFiles = partFiles; this.lo = lo; this.hi = hi; this.filename = filename; } public MergerFileSortTask(List<String> partFiles, String filename) { this(partFiles, 0, partFiles.size(), filename); } @Override protected String compute() { // 如果要归并的文件数大于2,则fork int fileCount = hi - lo; if (fileCount > 2) { //fileCount>2 则继续拆分 int mid = fileCount / 2; MergerFileSortTask task1 = new MergerFileSortTask(partFiles, lo, lo + mid, this.filename + "-1"); MergerFileSortTask task2 = new MergerFileSortTask(partFiles, lo + mid, hi, this.filename + "-2"); // 任务提交forkjoinPool中去执行 task1.fork(); task2.fork(); // 合并两个文件 try { //文件 this.mergerFile(task1.get(), task2.get()); //合并执行结果 } catch (IOException | InterruptedException | ExecutionException e) { e.printStackTrace(); } } else if (fileCount == 2) { //文件个数为2,合并文件 // 合并两个文件 try { this.mergerFile(this.partFiles.get(lo), this.partFiles.get(lo + 1)); } catch (IOException e) { e.printStackTrace(); } } else if (fileCount == 1) { return this.partFiles.get(lo); } return this.filename; } private void mergerFile(String f1, String f2) throws IOException { try (BufferedReader reader1 = new BufferedReader(new FileReader(f1)); BufferedReader reader2 = new BufferedReader(new FileReader(f2)); PrintWriter pw = new PrintWriter(filename)) { String s1 = reader1.readLine(), s2 = reader2.readLine(); Integer d1 = s1 == null ? null : Integer.valueOf(s1); Integer d2 = s2 == null ? null : Integer.valueOf(s2); while (true) { if (s1 == null) { //s1为null,直接把2写完 // 直接读取reader2,写 while (s2 != null) { pw.println(s2); s2 = reader2.readLine(); } } else if (s2 == null) { //s2为null,直接把1写完 // 直接读取reader1,写 while (s1 != null) { pw.println(s1); s1 = reader1.readLine(); } } else { // 比较两个值 while (d1 <= d2 && s1 != null) { // 写s1, 继续读reader1 pw.println(s1); s1 = reader1.readLine(); if (s1 != null) { d1 = Integer.valueOf(s1); } } while (d1 > d2 && s2 != null) { // 写s2, 继续读reader2 pw.println(s2); s2 = reader2.readLine(); if (s2 != null) { d2 = Integer.valueOf(s2); } } } if (s1 == null && s2 == null) // 都读完了 break; } } } }
WARMASTERS/rebellion_g54
lib/rebellion_g54/action/world_bank.rb
require 'rebellion_g54/action/base' require 'rebellion_g54/action/income' module RebellionG54; module Action; class WorldBank < Base @flavor_name = 'Banking' @description = 'Take all coins from the Bank' @required_role = :world_bank class State attr_reader :bank def initialize @bank = 0 end def name_and_effect "#{flavor_name} (#{effect})" end def effect "Take all #{@bank} coin#{'s' if @bank != 1} from the Bank" end def action_performed(action_class) @bank += 1 if action_class == Income end def take_bank bank = @bank @bank = 0 bank end def new(*args) WorldBank.new(self, *args) end def method_missing(m, *args) WorldBank.send(m, *args) end end @per_game_state = State def initialize(state, *args) super(*args) @state = state @taken = nil end def effect(_ = nil) # If we took already, used saved @taken value. Else, read from bank. taken = @taken || @state.bank "Take all #{taken} coin#{'s' if taken != 1} from the Bank" end def resolve(game, token, active_player, join_players, target_players) @taken = @state.take_bank active_player.give_coins(token, @taken) end end; end; end
chao2zhang/androidx
car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/templates/SignInWithGoogleActivity.java
/* * Copyright (C) 2021 The Android Open Source Project * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package androidx.car.app.sample.showcase.common.templates; import android.os.Bundle; import androidx.activity.ComponentActivity; import androidx.annotation.Nullable; /** * An activity for use by the car app library to perform actions such as requesting permissions. */ public class SignInWithGoogleActivity extends ComponentActivity { static final String BINDER_KEY = "binder"; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // OnSignInComplete signInCompleteCallback = // (OnSignInComplete) getIntent().getExtras().getBinder(BINDER_KEY); // // ActivityResultLauncher<Intent> activityResultLauncher = // registerForActivityResult( // new ActivityResultContracts.StartActivityForResult(), // result -> { // GoogleSignInAccount account = // GoogleSignIn.getSignedInAccountFromIntent( // result.getData()).getResult(); // signInCompleteCallback.onSignInComplete(account); // finish(); // }); // // GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this); // if (account != null) { // signInCompleteCallback.onSignInComplete(account); // finish(); // } // // GoogleSignInOptions gso = // new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) // .requestEmail() // .requestProfile() // .build(); // GoogleSignInClient signInClient = GoogleSignIn.getClient(this, gso); // activityResultLauncher.launch(signInClient.getSignInIntent()); } // /** // * Binder callback to provide to the sign in activity. // */ // abstract static class OnSignInComplete extends Binder implements IBinder { // /** // * Notifies that sign in flow completed. // * // * @param account the account signed in or {@code null} if there were issues signing in. // */ // public abstract void onSignInComplete(@Nullable GoogleSignInAccount account); // } }
nickman/tsdb-csf
csf-hub/src/main/java/com/sun/jdmk/MBeanServerInt.java
/* * @(#)file MBeanServerInt.java * @(#)author Sun Microsystems, Inc. * @(#)version 1.18 * @(#)date 07/10/01 * * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. * * The contents of this file are subject to the terms of either the GNU General * Public License Version 2 only ("GPL") or the Common Development and * Distribution License("CDDL")(collectively, the "License"). You may not use * this file except in compliance with the License. You can obtain a copy of the * License at http://opendmk.dev.java.net/legal_notices/licenses.txt or in the * LEGAL_NOTICES folder that accompanied this code. See the License for the * specific language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file found at * http://opendmk.dev.java.net/legal_notices/licenses.txt * or in the LEGAL_NOTICES folder that accompanied this code. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. * * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding * * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." * * If you don't indicate a single choice of license, a recipient has the option * to distribute your version of this file under either the CDDL or the GPL * Version 2, or to extend the choice of license to its licensees as provided * above. However, if you add GPL Version 2 code and therefore, elected the * GPL Version 2 license, then the option applies only if the new code is made * subject to such option by the copyright holder. * */ package com.sun.jdmk; import javax.management.MBeanServerDelegate; import javax.management.*; import java.io.ObjectInputStream; import java.util.Set; import com.sun.jdmk.interceptor.DefaultMBeanServerInterceptor; import com.sun.jdmk.interceptor.MBeanServerInterceptor; /** * Extends the MBeanInterceptor interface to provide methods for * getting and setting the DefaultMBeanInterceptor used for request * treatment, getters for the MetaData and MBeanInstantiator objects * associated to the MBeanServer and a getter for the class loader of * an MBean given its ObjectName. * * @since Java DMK 5.0 * @deprecated Use {@link com.sun.jdmk.JdmkMBeanServer} instead. */ public interface MBeanServerInt extends MBeanServerInterceptor { /** * Return the MBeanInterceptor to which all requests from the * MBeanServer interface are forwarded. * @deprecated use {@link com.sun.jdmk.JdmkMBeanServer#getMBeanServerInterceptor()} */ public MBeanInterceptor getDefaultMBeanInterceptor(); /** * <p>Change the MBeanInterceptor object to which all requests * from the MBeanServer interface are forwarded. The old * object is lost unless it was accessible by other means.</p> * * @param interceptor the new object. * @exception IllegalArgumentException if <code>interceptor</code> is null. * @deprecated use {@link com.sun.jdmk.JdmkMBeanServer#setMBeanServerInterceptor(com.sun.jdmk.interceptor.MBeanServerInterceptor)} */ public void setDefaultMBeanInterceptor(MBeanInterceptor interceptor) throws IllegalArgumentException; /** * Return the MBeanInstantiator associated to this MBeanServer. */ public MBeanInstantiator getMBeanInstantiator(); /** * Return the MetaData associated to this MBeanServer. */ public MetaData getMetaData(); /** * Return the MBeanServerDelegate representing the MBeanServer */ public javax.management.MBeanServerDelegate getMBeanServerDelegate(); }
meir-galilsoftware/pro-gallery
packages/gallery/tests/e2e/styleParams/galleryTextAlign.e2e.spec.js
<reponame>meir-galilsoftware/pro-gallery import GalleryDriver from '../../drivers/pptrDriver'; import {toMatchImageSnapshot} from '../../drivers/matchers'; import GALLERY_CONSTS from '../../../src/common/constants'; jest.setTimeout(30000) expect.extend({ toMatchImageSnapshot }); describe('gallerytextAlign - e2e', () => { let driver; beforeEach(async () => { driver = new GalleryDriver(); await driver.launchBrowser(); }); afterEach(() => { driver.closeBrowser(); }); it('should align texts to the left', async () => { await driver.openPage({ galleryLayout: 2, galleryTextAlign: GALLERY_CONSTS.galleryTextAlign.LEFT, allowTitle: true, titlePlacement: GALLERY_CONSTS.placements.SHOW_ON_HOVER, hoveringBehaviour: GALLERY_CONSTS.infoBehaviourOnHover.NO_CHANGE, }); await driver.waitFor.hookToBeVisible('item-container'); const page = await driver.grab.elemScreenshot('.pro-gallery'); expect(page).toMatchImageSnapshot(); }); it('should align texts to the right', async () => { await driver.openPage({ galleryLayout: 2, galleryTextAlign: GALLERY_CONSTS.galleryTextAlign.RIGHT, allowTitle: true, titlePlacement: GALLERY_CONSTS.placements.SHOW_ON_HOVER, hoveringBehaviour: GALLERY_CONSTS.infoBehaviourOnHover.NO_CHANGE, }); await driver.waitFor.hookToBeVisible('item-container'); const page = await driver.grab.elemScreenshot('.pro-gallery'); expect(page).toMatchImageSnapshot(); }); it('should align texts to the center', async () => { await driver.openPage({ galleryLayout: 2, galleryTextAlign: GALLERY_CONSTS.galleryTextAlign.CENTER, allowTitle: true, titlePlacement: GALLERY_CONSTS.placements.SHOW_ON_HOVER, hoveringBehaviour: GALLERY_CONSTS.infoBehaviourOnHover.NO_CHANGE, }); await driver.waitFor.hookToBeVisible('item-container'); const page = await driver.grab.elemScreenshot('.pro-gallery'); expect(page).toMatchImageSnapshot(); }); })
ghsecuritylab/DIR600B2
dir600b_v2.03/kernels/rt305x/drivers/isdn/hardware/eicon/dbgioctl.h
<reponame>ghsecuritylab/DIR600B2<filename>dir600b_v2.03/kernels/rt305x/drivers/isdn/hardware/eicon/dbgioctl.h /* * Copyright (c) Eicon Technology Corporation, 2000. * This source file is supplied for the use with Eicon Technology Corporation's range of DIVA Server Adapters. * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /*------------------------------------------------------------------*/ /* file: dbgioctl.h */ /*------------------------------------------------------------------*/ #if !defined(__DBGIOCTL_H__) #define __DBGIOCTL_H__ #ifdef NOT_YET_NEEDED /* * The requested operation is passed in arg0 of DbgIoctlArgs, * additional arguments (if any) in arg1, arg2 and arg3. */ typedef struct { ULONG arg0 ; ULONG arg1 ; ULONG arg2 ; ULONG arg3 ; } DbgIoctlArgs ; #define DBG_COPY_LOGS 0 /* copy debugs to user until buffer full */ /* arg1: size threshold */ /* arg2: timeout in milliseconds */ #define DBG_FLUSH_LOGS 1 /* flush pending debugs to user buffer */ /* arg1: internal driver id */ #define DBG_LIST_DRVS 2 /* return the list of registered drivers */ #define DBG_GET_MASK 3 /* get current debug mask of driver */ /* arg1: internal driver id */ #define DBG_SET_MASK 4 /* set/change debug mask of driver */ /* arg1: internal driver id */ /* arg2: new debug mask */ #define DBG_GET_BUFSIZE 5 /* get current buffer size of driver */ /* arg1: internal driver id */ /* arg2: new debug mask */ #define DBG_SET_BUFSIZE 6 /* set new buffer size of driver */ /* arg1: new buffer size */ /* * common internal debug message structure */ typedef struct { unsigned short id ; /* virtual driver id */ unsigned short type ; /* special message type */ unsigned long seq ; /* sequence number of message */ unsigned long size ; /* size of message in bytes */ unsigned long next ; /* offset to next buffered message */ LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */ unsigned char data[4] ;/* message data */ } OldDbgMessage ; typedef struct { LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */ unsigned short size ; /* size of message in bytes */ unsigned short ffff ; /* always 0xffff to indicate new msg */ unsigned short id ; /* virtual driver id */ unsigned short type ; /* special message type */ unsigned long seq ; /* sequence number of message */ unsigned char data[4] ;/* message data */ } DbgMessage ; #endif #define DRV_ID_UNKNOWN 0x0C /* for messages via prtComp() */ #define MSG_PROC_FLAG 0x80 #define MSG_PROC_NO_GET(x) (((x) & MSG_PROC_FLAG) ? (((x) >> 4) & 7) : -1) #define MSG_PROC_NO_SET(x) (MSG_PROC_FLAG | (((x) & 7) << 4)) #define MSG_TYPE_DRV_ID 0x0001 #define MSG_TYPE_FLAGS 0x0002 #define MSG_TYPE_STRING 0x0003 #define MSG_TYPE_BINARY 0x0004 #define MSG_HEAD_SIZE ((unsigned long)&(((DbgMessage *)0)->data[0])) #define MSG_ALIGN(len) (((unsigned long)(len) + MSG_HEAD_SIZE + 3) & ~3) #define MSG_SIZE(pMsg) MSG_ALIGN((pMsg)->size) #define MSG_NEXT(pMsg) ((DbgMessage *)( ((char *)(pMsg)) + MSG_SIZE(pMsg) )) #define OLD_MSG_HEAD_SIZE ((unsigned long)&(((OldDbgMessage *)0)->data[0])) #define OLD_MSG_ALIGN(len) (((unsigned long)(len)+OLD_MSG_HEAD_SIZE+3) & ~3) /* * manifest constants */ #define MSG_FRAME_MAX_SIZE 2150 /* maximum size of B1 frame */ #define MSG_TEXT_MAX_SIZE 1024 /* maximum size of msg text */ #define MSG_MAX_SIZE MSG_ALIGN(MSG_FRAME_MAX_SIZE) #define DBG_MIN_BUFFER_SIZE 0x00008000 /* minimal total buffer size 32 KB */ #define DBG_DEF_BUFFER_SIZE 0x00020000 /* default total buffer size 128 KB */ #define DBG_MAX_BUFFER_SIZE 0x00400000 /* maximal total buffer size 4 MB */ #define DBGDRV_NAME "Diehl_DIMAINT" #define UNIDBG_DRIVER L"\\Device\\Diehl_DIMAINT" /* UNICODE name for kernel */ #define DEBUG_DRIVER "\\\\.\\" DBGDRV_NAME /* traditional string for apps */ #define DBGVXD_NAME "DIMAINT" #define DEBUG_VXD "\\\\.\\" DBGVXD_NAME /* traditional string for apps */ /* * Special IDI interface debug construction */ #define DBG_IDI_SIG_REQ (unsigned long)0xF479C402 #define DBG_IDI_SIG_IND (unsigned long)0xF479C403 #define DBG_IDI_NL_REQ (unsigned long)0xF479C404 #define DBG_IDI_NL_IND (unsigned long)0xF479C405 typedef struct { unsigned long magic_type ; unsigned short data_len ; unsigned char layer_ID ; unsigned char entity_ID ; unsigned char request ; unsigned char ret_code ; unsigned char indication ; unsigned char complete ; unsigned char data[4] ; } DbgIdiAct, *DbgIdiAction ; /* * We want to use the same IOCTL codes in Win95 and WinNT. * The official constructor for IOCTL codes is the CTL_CODE macro * from <winoctl.h> (<devioctl.h> in WinNT DDK environment). * The problem here is that we don't know how to get <winioctl.h> * working in a Win95 DDK environment! */ # ifdef CTL_CODE /*{*/ /* Assert that we have the same idea of the CTL_CODE macro. */ #define CTL_CODE( DeviceType, Function, Method, Access ) ( \ ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \ ) # else /* !CTL_CODE */ /*}{*/ /* Use the definitions stolen from <winioctl.h>. */ #define CTL_CODE( DeviceType, Function, Method, Access ) ( \ ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \ ) #define METHOD_BUFFERED 0 #define METHOD_IN_DIRECT 1 #define METHOD_OUT_DIRECT 2 #define METHOD_NEITHER 3 #define FILE_ANY_ACCESS 0 #define FILE_READ_ACCESS ( 0x0001 ) // file & pipe #define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe # endif /* CTL_CODE */ /*}*/ /* * Now we can define WinNT/Win95 DeviceIoControl codes. * * These codes are defined in di_defs.h too, a possible mismatch will be * detected when the dbgtool is compiled. */ #define IOCTL_DRIVER_LNK \ CTL_CODE(0x8001U,0x701,METHOD_OUT_DIRECT,FILE_ANY_ACCESS) #define IOCTL_DRIVER_DBG \ CTL_CODE(0x8001U,0x702,METHOD_OUT_DIRECT,FILE_ANY_ACCESS) #endif /* __DBGIOCTL_H__ */
mathiasbynens/unicode-data
6.1.0/blocks/Syloti-Nagri-regex.js
// Regular expression that matches all symbols in the Syloti Nagri block as per Unicode v6.1.0: /[\uA800-\uA82F]/;
mrneo240/suicide-barbie
Code/Modules/player/cfg.h
<filename>Code/Modules/player/cfg.h #ifndef MUTALISK_PLAYER__CFG_H_ #define MUTALISK_PLAYER__CFG_H_ #include <mutalisk/common.h> #if defined(WIN32) // disable: unreferenced local function has been removed #pragma warning(disable : 4505) // disable: assignment operator could not be generated #pragma warning(disable : 4512) // disable: forcing value to bool 'true' or 'false' (performance warning) #pragma warning(disable:4800) // disable: name was marked as #pragma deprecated #pragma warning(disable : 4995) #endif #endif // MUTALISK_EFFECTS__CFG_H_
Hengle/huailiang.github.io-1
source/js/jax/output/HTML-CSS/fonts/STIX/General/Italic/CombDiactForSymbols.js
<reponame>Hengle/huailiang.github.io-1 MathJax.Hub.Insert( MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['STIXGeneral-italic'], { 0x20D0: [760,-627,0,-453,-17], 0x20D1: [760,-627,0,-426,10], 0x20D2: [662,156,0,-300,-234], 0x20D6: [760,-548,0,-453,-17], 0x20D7: [760,-548,0,-453,-17], 0x20DB: [622,-523,0,-453,44], 0x20DC: [622,-523,0,-582,114], 0x20DD: [725,221,0,-723,223], 0x20E1: [760,-548,0,-453,25], 0x20E4: [1023,155,0,-970,490], 0x20E5: [662,156,0,-430,-24], 0x20E6: [662,156,0,-351,-86], 0x20E7: [725,178,0,-595,221], 0x20E8: [-119,218,0,-462,35], 0x20E9: [681,-538,0,-478,55], 0x20EA: [419,-87,0,-793,153], 0x20EC: [-119,252,0,27,463], 0x20ED: [-119,252,0,27,463], 0x20EE: [-40,252,0,-453,-17], 0x20EF: [-40,252,0,-453,-17] } ); MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir + "/General/Italic/CombDiactForSymbols.js");
olegvn88/gostudy
app/main/app/switches/Switch.go
<filename>app/main/app/switches/Switch.go package switches import ( "fmt" "runtime" "time" ) func main() { for i := 0; i < 10; i++ { defer fmt.Println("Hello world") getCurrentTime() time.Sleep(time.Second) } } func GetKindOfOS() string { result := runtime.GOOS return result } func getCurrentTime() { fmt.Println(time.Now().Hour(), ":", time.Now().Minute(), ":", time.Now().Second()) }
hac80310/openproject-heroku
db/migrate/20131015121430_index_on_users.rb
class IndexOnUsers < ActiveRecord::Migration def change add_index :users, [:type, :login], :length => {:type => 255, :login => 255} add_index :users, [:type, :status] end end
vespa-mrs/vespa
vespa/simulation/plot_panel_integral.py
<gh_stars>0 # Python modules # 3rd party modules import numpy as np # Our modules import vespa.common.wx_gravy.plot_panel as plot_panel class PlotPanelIntegral(plot_panel.PlotPanel): def __init__(self, parent, tab, **kwargs): plot_panel.PlotPanel.__init__( self, parent, **kwargs ) # parent is the containing panel for this plot_panel, it is used # in resize events, the tab attribute is the AUI Notebook tab # that contains this plot_panel self.parent = parent self.tab = tab self.set_color( (255,255,255) ) # EVENT FUNCTIONS ----------------------------------------------- def on_motion(self, xdata, ydata, value, bounds, iaxis): if self.tab.integral_data is None: return npts = self.tab.integral_data.shape[0] xindx = int(npts * (-(xdata - bounds[0]) / (-bounds[2]))) xindx = np.clip(xindx, 0, npts-1)+1 self.tab.statusbar.SetStatusText(( "X-Index = "+str(xindx)), 0) self.tab.statusbar.SetStatusText(( "X-Axis = "+str(xdata)), 1) self.tab.statusbar.SetStatusText(( "Value = " +str(value)), 2) def on_zoom_select(self, xmin, xmax, val, ymin, ymax, reset=False): pass def on_zoom_motion(self, xmin, xmax, val, ymin, ymax): pass def on_refs_select(self, xmin, xmax, val): pass def on_refs_motion(self, xmin, xmax, val): pass def on_middle_press(self, xloc, yloc, indx, bounds=None, xdata=None, ydata=None): if self.tab.integral_data is None: return if bounds is not None and xdata is not None: npts = self.tab.integral_data.shape[0] xindx = int(npts * (-(xdata - bounds[0]) / (-bounds[2]))) xindx = np.clip(xindx, 0, npts-1)+1 # check for display mode and fill x-axis mode = self.tab.ChoiceDisplayMode.GetCurrentSelection() if mode == 0: return elif mode == 1: self.tab.SpinIndex1.SetValue(xindx) self.tab.LabelIndex1Value.SetLabel(str(self.tab.experiment.dims[0][xindx-1])) elif mode == 2: self.tab.SpinIndex2.SetValue(xindx) self.tab.LabelIndex2Value.SetLabel(str(self.tab.experiment.dims[1][xindx-1])) elif mode == 3: self.tab.SpinIndex3.SetValue(xindx) self.tab.LabelIndex3Value.SetLabel(str(self.tab.experiment.dims[2][xindx-1])) else: return self.tab.plot_canvas() self.tab.plot_contour()
namtel-hp/fundraising-website
team_fundraising/migrations/0011_fundraiser_photo.py
# Generated by Django 2.1.5 on 2019-02-03 22:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('team_fundraising', '0010_auto_20190131_0011'), ] operations = [ migrations.AddField( model_name='fundraiser', name='photo', field=models.ImageField(blank=True, upload_to='photos/'), ), ]
macinnir/dvc
core/lib/utils/log/ILog.go
package log // ILog defines the log type ILog interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Println(args ...interface{}) Printf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Fatal(args ...interface{}) Warn(args ...interface{}) }
liningwang/mallplus-cloudok
mall-business/goods-center/src/main/java/com/mallplus/goods/service/impl/PmsSkuStockServiceImpl.java
package com.mallplus.goods.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.mallplus.common.entity.pms.PmsSkuStock; import com.mallplus.goods.mapper.PmsSkuStockMapper; import com.mallplus.goods.service.IPmsSkuStockService; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import javax.annotation.Resource; import java.util.List; /** * <p> * sku的库存 服务实现类 * </p> * * @author zscat * @since 2019-04-19 */ @Service public class PmsSkuStockServiceImpl extends ServiceImpl<PmsSkuStockMapper, PmsSkuStock> implements IPmsSkuStockService { @Resource private PmsSkuStockMapper skuStockMapper; @Override public List<PmsSkuStock> getList(Long pid, String keyword) { QueryWrapper q = new QueryWrapper(); q.eq("product_id",pid); if (!StringUtils.isEmpty(keyword)) { q.like("sku_code",keyword); } return skuStockMapper.selectList(q); } @Override public int update(Long pid, List<PmsSkuStock> skuStockList) { return skuStockMapper.replaceList(skuStockList); } }
sergmain/webmill
riverock-webmill-container/src/test/java/org/riverock/webmill/container/definition/PortletDefinitionProcessorTest.java
<reponame>sergmain/webmill /* * org.riverock.webmill.container - Webmill portlet container implementation * * Copyright (C) 2006, Riverock Software, All Rights Reserved. * * Riverock - The Open-source Java Development Community * http://www.riverock.org * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.riverock.webmill.container.definition; import java.io.File; import org.riverock.webmill.container.portlet.bean.PortletApplication; import org.riverock.webmill.container.portlet.bean.PortletDefinition; import org.riverock.webmill.container.portlet.bean.Preferences; /** * @author smaslyukov * Date: 08.08.2005 * Time: 19:01:23 * $Id: PortletDefinitionProcessorTest.java 1237 2007-07-03 14:40:35Z serg_main $ */ public class PortletDefinitionProcessorTest { public static void main(String[] args) throws Exception { PortletDefinitionProcessor processor = new JaxbPortletDefinitionProcessorImpl(); String[] files = { "doc/xml/portlet.1.xml", "doc/xml/portlet.2.xml", "doc/xml/portlet.3.xml", "doc/xml/portlet.4.xml", "doc/xml/portlet.5.xml", "doc/xml/portlet.6.xml" }; for (String file : files) { System.out.println("file = " + file); processor.process( new File(file) ); } // File file = new File("portlet.2.xml"); File file = new File("doc/xml/portlet.6.xml"); PortletApplication application = processor.process( file ); PortletDefinition definition = application.getPortlet().get(0); Preferences portletPreferences = definition.getPreferences(); int i = 0; } }
trezy/trezy.com
scripts/addFieldToUser.js
require('dotenv').config() // Module imports const firebase = require('firebase-admin') const mri = require('mri') const argv = process.argv.slice(2) const args = mri(argv, { alias: { c: 'collection', d: ['default'], f: 'field', }, default: { collection: 'profiles', default: '', }, }) const app = firebase.initializeApp({ credential: firebase.credential.cert({ auth_provider_x509_cert_url: process.env.FIREBASE_AUTH_PROVIDER_X509_CERT_URL, auth_uri: process.env.FIREBASE_AUTH_URI, client_email: process.env.FIREBASE_CLIENT_EMAIL, client_id: process.env.FIREBASE_CLIENT_ID, client_x509_cert_url: process.env.FIREBASE_CLIENT_X509_CERT_URL, private_key_id: process.env.FIREBASE_PRIVATE_KEY_ID, private_key: process.env.FIREBASE_PRIVATE_KEY, project_id: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID, token_uri: process.env.FIREBASE_TOKEN_URI, type: process.env.FIREBASE_TYPE, }), databaseURL: process.env.NEXT_PUBLIC_FIREBASE_DATABASE_URL, }) const firestore = app.firestore() const usersCollection = firestore.collection('users') async function addFieldToUsers(collectionName, fieldName, defaultValue = null) { console.log(`Adding ${fieldName} field to ${collectionName} collection with default value of ${defaultValue}.`) if (['true', 'false'].includes(defaultValue)) { defaultValue = JSON.parse(defaultValue) } const collection = firestore.collection(collectionName) console.log('retrieving users...') let { users } = await firebase.auth().listUsers(1000) users = users.map(user => user.toJSON()) console.log('done.') let index = 0 while (index < users.length) { const user = users[index] index += 1 const docRef = collection.doc(user.uid) console.log(`getting collection data for ${user.displayName || user.uid}...`) const doc = await docRef.get() console.log('done.') // if (!doc.data()[fieldName]) { console.log(`updating collection data for ${user.displayName || user.uid}...`) await docRef.update({ [fieldName]: defaultValue }) console.log('done.') // } } } addFieldToUsers(args.collection, args.field, args.default)
iranjunior/TinderMarvel
src/pages/Register/index.js
import React from 'react'; import { Container, BackButton, Header, Title, FormContainer, Form, LoginButton, LoginText, Footer, } from './styles'; import Name from '~/components/form/name'; import Email from '~/components/form/email'; import City from '~/components/form/city'; import Age from '~/components/form/age'; import State from '~/components/form/state'; import Country from '~/components/form/country'; import Password from '~/components/form/password'; import ConfirmPassword from '~/components/form/confirmPassword'; import BackIcons from '~/components/icons/backincons'; export default function Login({navigation}) { return ( <Container> <Header> <BackButton onPress={() => navigation.navigate('Welcome')}> <BackIcons /> </BackButton> <Title>Cadastro</Title> </Header> <FormContainer> <Form> <Name /> <Email /> <City lengthSize="medium-high" /> <Age lengthSize="medium-low" /> <State lengthSize="medium" /> <Country lengthSize="medium" /> <Password /> <ConfirmPassword /> <Footer> <LoginButton onPress={() => navigation.navigate('Welcome')}> <LoginText>Registrar</LoginText> </LoginButton> </Footer> </Form> </FormContainer> </Container> ); }
fengzhao-study-notes/blueocean-plugin
blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueTrend.java
<filename>blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueTrend.java package io.jenkins.blueocean.rest.model; import io.jenkins.blueocean.rest.Navigable; import org.kohsuke.stapler.export.Exported; import java.util.Map; /** * A category of tabular data, typically one that changes over time (e.g. across successive runs) * * To create a new "trend" * 1. Implement {@link io.jenkins.blueocean.rest.factory.BlueTrendFactory} and return a new subclass of BlueTrend * 2. Subclass {@link BlueTable} and {@link BlueTableRow} adding suitable properties to construct the data set. * * @author cliffmeyers */ public abstract class BlueTrend extends Resource implements BlueTable { public static final String ID = "id"; public static final String DISPLAY_NAME = "displayName"; /** * A unique identifier for the trend to be used in the REST API path, e.g. my-pipeline/trends/${id} * Note that an ID collision will result in only one trend being available. * @return identifier */ @Exported(name = ID) public abstract String getId(); /** * @return name display in UI */ @Exported(name = DISPLAY_NAME) public abstract String getDisplayName(); /** * @return map of columns' property names (keys) and descriptions (values). optional */ @Exported(name = COLUMNS, inline = true) public abstract Map<String, String> getColumns(); /** @return individual rows of data */ @Navigable public abstract Container<BlueTableRow> getRows(); }
gitoscc/B4A
Libs_FirebaseNotifications/src/anywheresoftware/b4a/objects/FirebaseNotificationsService.java
/* * Copyright 2010 - 2020 Anywhere Software (www.b4x.com) * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package anywheresoftware.b4a.objects; import java.io.Serializable; import java.util.Map.Entry; import android.app.Service; import android.content.Intent; import android.os.Build; import android.os.Handler; import android.os.Parcelable; import android.service.notification.StatusBarNotification; import anywheresoftware.b4a.AbsObjectWrapper; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.BA.DependsOn; import anywheresoftware.b4a.BA.Events; import anywheresoftware.b4a.BA.Hide; import anywheresoftware.b4a.BA.ShortName; import anywheresoftware.b4a.BA.Version; import anywheresoftware.b4a.keywords.Common; import anywheresoftware.b4a.objects.collections.Map; import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.iid.FirebaseInstanceIdService; import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; import com.google.firebase.messaging.RemoteMessage.Notification; import com.sun.rowset.internal.BaseRow; import com.sun.xml.internal.fastinfoset.stax.events.EventBase; @Hide public class FirebaseNotificationsService extends FirebaseMessagingService{ private static boolean firstMessage = true; private static Handler handler; private static Class<?> ServiceClass; private static Class<?> ReceiverClass; @Override public void onCreate() { super.onCreate(); try { handler = new Handler(); ServiceClass = Class.forName(getPackageName() + ".firebasemessaging"); ReceiverClass = Class.forName(getPackageName() + ".firebasemessaging$firebasemessaging_BR"); } catch (ClassNotFoundException e) { e.printStackTrace(); BA.LogError("FirebaseMessaging not found."); } } public static Intent createIntent(Service me, String event) { Intent i; i = new Intent(me, ReceiverClass); i.setAction("b4a_firebasemessaging"); i.putExtra("event", event); return i; } @Override public void onMessageReceived(final RemoteMessage remoteMessage) { handler.post(new Runnable() { @Override public void run() { final Intent i = createIntent(FirebaseNotificationsService.this, "b4a_messagereceived"); i.putExtra("message", remoteMessage); try { if (firstMessage || Common.IsPaused(null, ServiceClass) == false) { firstMessage = false; sendBroadcast(i); } else { BA.handler.postDelayed(new Runnable() { @Override public void run() { sendBroadcast(i); } }, 500); } } catch (Exception e) { throw new RuntimeException(e); } }}); } @Hide public static class InstanceService extends FirebaseInstanceIdService { @Override public void onTokenRefresh() { sendBroadcast(createIntent(this, "b4a_tokenrefresh")); } } @DependsOn(values={"com.google.firebase:firebase-messaging", "com.google.firebase:firebase-core"}) @Version(1.21f) @ShortName("FirebaseMessaging") @Events(values={"TokenRefresh (Token As String)", "MessageArrived (Message As RemoteMessage)"}) public static class FirebaseMessageWrapper extends AbsObjectWrapper<FirebaseMessaging> { private BA ba; private String eventName; public void Initialize(BA ba, String EventName) { setObject(FirebaseMessaging.getInstance()); this.ba = ba; this.eventName = EventName.toLowerCase(BA.cul); } /** * Should be called from Service_Start. Returns true if the intent was handled. */ public boolean HandleIntent(Intent Intent) { if (Intent == null || "b4a_firebasemessaging".equals(Intent.getAction()) == false) return false; Intent.setExtrasClassLoader(RemoteMessage.class.getClassLoader()); String event = Intent.getStringExtra("event"); if (event.equals("b4a_tokenrefresh")) ba.raiseEventFromUI(this, eventName + "_tokenrefresh", getToken()); else if (event.equals("b4a_messagereceived")) { RemoteMessage rm = Intent.getParcelableExtra("message"); ba.raiseEventFromUI(this, eventName + "_messagearrived", AbsObjectWrapper.ConvertToWrapper(new RemoteMessageWrapper(), rm)); } return true; } /** * Returns the device token. The token can change from time to time. The TokenRefresh event is raised when the token changes. *The token is only needed when sending messages to a specific device. */ public String getToken() { return BA.returnString(FirebaseInstanceId.getInstance().getToken()); } /** * Subscribes to the specified topic. *Example:<code> *fm.SubscribeToTopic("general")</code> */ public void SubscribeToTopic(String Topic) { getObject().subscribeToTopic(Topic); } /** * Unsubscribes from a topic. */ public void UnsubscribeFromTopic(String Topic) { getObject().unsubscribeFromTopic(Topic); } } /** * Holds the push message data. */ @ShortName("RemoteMessage") public static class RemoteMessageWrapper extends AbsObjectWrapper<RemoteMessage> { /** * Gets the collapse key (if set). */ public String getCollapseKey() { return BA.returnString(getObject().getCollapseKey()); } /** * Returns the sender id or the topic name. In the later case the value will start with /topics/ */ public String getFrom() { return BA.returnString(getObject().getFrom()); } /** * Gets the message id. */ public String getMessageId() { return getObject().getMessageId(); } /** * Returns the time the message was sent. */ public long getSentTime() { return getObject().getSentTime(); } /** * Returns a Map with the key / values set as the message data. */ public Map GetData() { Map m = new Map(); m.Initialize(); if (getObject().getData() != null) { for (Entry<String, String> e : getObject().getData().entrySet()) { m.Put(e.getKey(), e.getValue()); } } return m; } // public String getNotificationBody() { // Notification n = getObject().getNotification(); // if (n == null) // return ""; // return BA.returnString(n.getBody()); // } // public String getNotificationTitle() { // Notification n = getObject().getNotification(); // if (n == null) // return ""; // return BA.returnString(n.getTitle()); // } } }
plinck/TeamATC
client/src/components/Dashboard/GoogleMap/GoogleMap.js
<reponame>plinck/TeamATC import React, { useState } from 'react'; import Map from './Map' //import { Card, CardContent, Grid, Box, Typography, Table, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core'; import { Card, CardContent, Grid, Box, Typography } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import moment from "moment"; const styles = theme => ({ text: { marginBottom: "-10px" }, noWrap: { whiteSpace: "nowrap", overflow: 'hidden', [theme.breakpoints.down('sm')]: { marginRight: "5px" } }, caption: { fontStyle: "italic" }, header: { marginBottom: "-10px", fontWeight: "bold" }, mobile: { [theme.breakpoints.down('sm')]: { display: "none" } } }) const GoogleMap = (props) => { const { classes } = props const handlePress = (e) => { e.stopPropagation(); props.callbackParent({ isDraggable: false }); } const [totalDist, setTotalDist] = useState(0); // teamLegTotals is a copy to teamResults with the next leg info added to it const [teamLegTotals, setTeamLegTotals] = useState(props.teamResults); const computeTotalDistance = (result) => { let totalDist = 0; var myroute = result.routes[0]; for (let i = 0; i < myroute.legs.length; i++) { totalDist += myroute.legs[i].distance.value; } totalDist = totalDist / 1000 / 1.609344 //km to miles setTotalDist(totalDist) } const calcCompletion = (distance) => { if (distance >= totalDist) { return 100 } else { return parseInt(distance / totalDist * 100) } } // Using the teamResults array, attach the leg info to each teams record // legs come from the map component and atre computed after the route is drawn // This function goes through each team and sees whwere they are on the route, then // attaches next legh info to their teamResults record // TODO :- Right now the function state values are not displayed on the dashboard // unless you go into the debugger. It must be a timing issuie with state vars but // I have yet to figure it out const calcNextLegInfo = (legs) => { //Loop through each team for (let k = 0; k < teamLegTotals.length; k++) { let totalDistanceToNextLeg = 0; let nextLegName = ""; let distanceToNextLeg = 0; let nextLegCompletionPercent = 0; let nextLegIdx = 0; let includedDistanceTotal = 0; let i = 0; // Loop until you find the next leg based on your distance // This loop will end where you are "in between" two legs // Then you just need to extract the leg info an attach to team record includedDistanceTotal += props.challenge.isSwim ? teamLegTotals[k].swimPointsTotal : 0; includedDistanceTotal += props.challenge.isBike ? teamLegTotals[k].bikeDistanceTotal : 0; includedDistanceTotal += props.challenge.isRun ? teamLegTotals[k].runPointsTotal : 0; includedDistanceTotal += props.challenge.isOther ? teamLegTotals[k].otherDistanceTotal : 0; for (i = 0; i < legs.length && totalDistanceToNextLeg < includedDistanceTotal ; i++) { let legDistance = legs[i].distance.value / 1000 / 1.609344; // to miles totalDistanceToNextLeg += legDistance; nextLegIdx = i; } nextLegName = legs[nextLegIdx].end_address; distanceToNextLeg = totalDistanceToNextLeg - includedDistanceTotal; if (distanceToNextLeg <= 0) { nextLegCompletionPercent = 100; } else if (includedDistanceTotal >= totalDistanceToNextLeg) { nextLegCompletionPercent = 100; } else { nextLegCompletionPercent = parseInt((includedDistanceTotal / totalDistanceToNextLeg) * 100); } teamLegTotals[k].nextLegName = nextLegName; teamLegTotals[k].distanceToNextLeg = distanceToNextLeg.toFixed(0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); teamLegTotals[k].nextLegCompletionPercent = nextLegCompletionPercent; teamLegTotals[k].includedDistanceTotal = includedDistanceTotal; teamLegTotals[k].includedDistanceTotalDisplay = includedDistanceTotal.toFixed(0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } setTeamLegTotals(teamLegTotals); } let challengeMapIncludes = "" if (props.challenge.isSwim) { challengeMapIncludes += "Swim(x10) " } if (props.challenge.isBike) { challengeMapIncludes += "Bike " } if (props.challenge.isRun) { challengeMapIncludes += "Run(x3) " } if (props.challenge.isOther) { challengeMapIncludes += "Other " } return ( <Card style={{ height: '100%' }}> <CardContent style={{ height: '100%' }} > <Box style={{ marginBottom: "10px" }} fontStyle="oblique" fontWeight="fontWeightBold"> <span style={{ color: 'grey' }}>{props.title ? props.title : 'Challenge Map'}</span> </Box> <Grid container style={{ height: '91%' }} spacing={2}> <Grid style={{ height: "100%", padding: "5px 0px" }} item xs={12} sm={9} md={8} onMouseDown={(e) => handlePress(e)}> <Map id="myMap" options={{ center: { lat: 37.0902, lng: -95.7129 }, zoom: 8, streetViewControl: false, fullscreenControl: false, mapTypeControl: false, }} challenge={props.challenge} teamResults={props.teamResults} start={props.start} end={props.end} waypoints={props.waypoints} computeTotalDistance={computeTotalDistance} calcNextLegInfo={calcNextLegInfo} totalDist={totalDist} /> </Grid> <Grid container item xs={false} sm={3} md={4}> <Grid item xs={12}> <Typography variant="h5" style={{ textAlign: "center" }}>Challenge Details</Typography> <ul style={{ margin: "5px 10px" }}> <li>Start Point: {props.start} </li> <li>End Point: {props.end} </li> <li>Total Distance: {totalDist.toFixed(0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} mi</li> <li>Challenge Ends: {props.endDate ? moment(props.endDate).format("MM-DD-YYYY") : "N/A"}</li> <li>Challenge Totals Include: {challengeMapIncludes}</li> </ul> </Grid> <Grid item xs={12} style={{ textAlign: "center" }}> <Typography variant="h5">Team Leaders</Typography> <Grid container justify="space-between" alignItems="center" > <Grid style={{ textAlign: "left" }} className={classes.mobile} item xs md={5}> <Typography className={classes.header}>Team</Typography> </Grid> <Grid className={classes.mobile} item xs={false} md={3}> <Typography className={classes.header}>Distance (mi)</Typography> </Grid> <Grid className={classes.mobile} item xs={false} md={3}> <Typography className={classes.header}>Completion (%)</Typography> </Grid> </Grid> <hr></hr> {teamLegTotals.sort((x, y) => { const yDist = y.includedDistanceTotal ? y.includedDistanceTotal : 0; const xDist = x.includedDistanceTotal ? x.includedDistanceTotal : 0; return(yDist - xDist); }).map((result, index) => ( <Grid container key={index} justify="space-between" alignItems="center" > <Grid style={{ textAlign: "left" }} className={classes.noWrap} item xs md={5}> <Typography className={classes.text}>{result.userRecord ? result.displayName: result.teamName}</Typography> <Typography className={classes.caption} variant="caption">Next:{result.nextLegName}</Typography> </Grid> <Grid className={classes.mobile} item xs={false} md={3}> <Typography className={classes.text}> {result.includedDistanceTotalDisplay ? result.includedDistanceTotalDisplay : 0} </Typography> <Typography className={classes.caption} variant="caption">{result.distanceToNextLeg} mi </Typography> </Grid> <Grid className={classes.mobile} item xs={false} md={3}> <Typography className={classes.text}> {calcCompletion(result.includedDistanceTotal ? result.includedDistanceTotal : 0)}% </Typography> <Typography className={classes.caption} variant="caption">{result.nextLegCompletionPercent}%</Typography> </Grid> </Grid> ))} </Grid> </Grid> </Grid> </CardContent> </Card> ); } export default withStyles(styles)(GoogleMap)
atnos/chouette
mobi.chouette.exchange/src/test/java/mobi/chouette/model/blueprint/NetworkBlueprint.java
package mobi.chouette.model.blueprint; import java.util.Date; import java.util.UUID; import mobi.chouette.model.Network; import mobi.chouette.model.type.PTNetworkSourceTypeEnum; import com.tobedevoured.modelcitizen.annotation.Blueprint; import com.tobedevoured.modelcitizen.annotation.Default; import com.tobedevoured.modelcitizen.field.FieldCallback; @SuppressWarnings("deprecation") @Blueprint(Network.class) public class NetworkBlueprint { @Default FieldCallback objectId = new FieldCallback() { @Override public String get(Object model) { return "TEST:PTNetwork:" + UUID.randomUUID(); } }; @Default String name = "METRO"; @Default int objectVersion = 1; // TODO : Verify date @Default Date versionDate = new Date(1234479600); @Default String description = "Réseau de métro de la RATP"; @Default String registrationNumber = "110"; @Default String sourceName = "RATP"; @Default String sourceIdentifier = "RATP-KXD"; @Default String comment = "Mon réseau"; @Default PTNetworkSourceTypeEnum sourceType = PTNetworkSourceTypeEnum.PublicTransport; }
xinzhang1234/peloton
src/include/wire/packet_manager.h
//===----------------------------------------------------------------------===// // // Peloton // // packet_manager.h // // Identification: src/include/wire/packet_manager.h // // Copyright (c) 2015-16, Carnegie Mellon University Database Group // //===----------------------------------------------------------------------===// #pragma once #include <boost/assign/list_of.hpp> #include <iostream> #include <mutex> #include <string> #include <unordered_map> #include <vector> #include "common/cache.h" #include "common/portal.h" #include "common/statement.h" #include "tcop/tcop.h" #include "wire/marshal.h" // Packet content macros #define NULL_CONTENT_SIZE -1 namespace peloton { namespace wire { typedef std::vector<std::unique_ptr<OutputPacket>> ResponseBuffer; class PacketManager { public: PacketManager(); ~PacketManager(); /* Startup packet processing logic */ bool ProcessStartupPacket(InputPacket* pkt); /* Main switch case wrapper to process every packet apart from the startup * packet. Avoid flushing the response for extended protocols. */ bool ProcessPacket(InputPacket* pkt); /* Manage the startup packet */ // bool ManageStartupPacket(); void Reset(); // Returns a vector of all the PreparedStatements that this PacketManager has // that reference the given table id const std::vector<Statement*> GetPreparedStatements(oid_t table_id) { return table_statement_cache_[table_id]; } void InvalidatePreparedStatements(oid_t table_id); // Ugh... this should not be here but we have no choice... void ReplanPreparedStatement(Statement* statement); //===--------------------------------------------------------------------===// // STATIC HELPERS //===--------------------------------------------------------------------===// // Deserialize the parameter types from packet static size_t ReadParamType(InputPacket* pkt, int num_params, std::vector<int32_t>& param_types); // Deserialize the parameter format from packet static size_t ReadParamFormat(InputPacket* pkt, int num_params_format, std::vector<int16_t>& formats); // Deserialize the parameter value from packet static size_t ReadParamValue( InputPacket* pkt, int num_params, std::vector<int32_t>& param_types, std::vector<std::pair<int, std::string>>& bind_parameters, std::vector<type::Value>& param_values, std::vector<int16_t>& formats); static std::vector<PacketManager*> GetPacketManagers() { return (PacketManager::packet_managers_); } Client client_; // has the startup packet been received for this connection bool is_started = false; // Should we send the buffered packets right away? bool force_flush = false; // TODO declare a response buffer pool so that we can reuse the responses // so that we don't have to new packet each time ResponseBuffer responses; private: //===--------------------------------------------------------------------===// // PROTOCOL HANDLING FUNCTIONS //===--------------------------------------------------------------------===// // Generic error protocol packet void SendErrorResponse( std::vector<std::pair<NetworkMessageType, std::string>> error_status); // Sends ready for query packet to the frontend void SendReadyForQuery(NetworkTransactionStateType txn_status); // Sends the attribute headers required by SELECT queries void PutTupleDescriptor(const std::vector<FieldInfo>& tuple_descriptor); // Send each row, one packet at a time, used by SELECT queries void SendDataRows(std::vector<StatementResult>& results, int colcount, int& rows_affected); // Used to send a packet that indicates the completion of a query. Also has // txn state mgmt void CompleteCommand(const std::string& query_type, int rows); // Specific response for empty or NULL queries void SendEmptyQueryResponse(); /* Helper function used to make hardcoded ParameterStatus('S') * packets during startup */ void MakeHardcodedParameterStatus( const std::pair<std::string, std::string>& kv); /* We don't support "SET" and "SHOW" SQL commands yet. * Also, duplicate BEGINs and COMMITs shouldn't be executed. * This function helps filtering out the execution for such cases */ bool HardcodedExecuteFilter(std::string query_type); /* Execute a Simple query protocol message */ void ExecQueryMessage(InputPacket* pkt); /* Process the PARSE message of the extended query protocol */ void ExecParseMessage(InputPacket* pkt); /* Process the BIND message of the extended query protocol */ void ExecBindMessage(InputPacket* pkt); /* Process the DESCRIBE message of the extended query protocol */ bool ExecDescribeMessage(InputPacket* pkt); /* Process the EXECUTE message of the extended query protocol */ void ExecExecuteMessage(InputPacket* pkt); /* Process the optional CLOSE message of the extended query protocol */ void ExecCloseMessage(InputPacket* pkt); //===--------------------------------------------------------------------===// // MEMBERS //===--------------------------------------------------------------------===// // Manage standalone queries std::shared_ptr<Statement> unnamed_statement_; // The result-column format code std::vector<int> result_format_; // global txn state NetworkTransactionStateType txn_state_; // state to mang skipped queries bool skipped_stmt_ = false; std::string skipped_query_string_; std::string skipped_query_type_; // Statement cache // StatementName -> Statement Cache<std::string, Statement> statement_cache_; // TableOid -> Statements // FIXME: This table statement cache is not in sync with the other cache. // That means if something gets thrown out of the statement cache it is not // automatically evicted from this cache. std::unordered_map<oid_t, std::vector<Statement*>> table_statement_cache_; // Portals std::unordered_map<std::string, std::shared_ptr<Portal>> portals_; // packets ready for read size_t pkt_cntr_; // Manage parameter types for unnamed statement stats::QueryMetric::QueryParamBuf unnamed_stmt_param_types_; // Parameter types for statements // Warning: the data in the param buffer becomes invalid when the value // stored // in stat table is destroyed std::unordered_map<std::string, stats::QueryMetric::QueryParamBuf> statement_param_types_; // The traffic cop used for this connection std::unique_ptr<tcop::TrafficCop> traffic_cop_; //===--------------------------------------------------------------------===// // STATIC DATA //===--------------------------------------------------------------------===// static const std::unordered_map<std::string, std::string> parameter_status_map_; // HACK: Global list of PacketManager instances // We need this in order to reset statement caches when the catalog changes // We need to think of a more elegant solution for this static std::vector<PacketManager*> packet_managers_; static std::mutex packet_managers_mutex_; }; } // End wire namespace } // End peloton namespace
678ho/SpringbootFileUploadPractice
src/main/java/org/zerock/mreview/security/service/ClubOAuth2UserDetailsService.java
package org.zerock.mreview.security.service; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService; import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest; import org.springframework.security.oauth2.core.OAuth2AuthenticationException; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.stereotype.Service; import org.zerock.mreview.entity.ClubMember; import org.zerock.mreview.entity.ClubMemberRole; import org.zerock.mreview.repository.ClubMemberRepository; import org.zerock.mreview.security.dto.ClubAuthMemberDTO; import java.util.Optional; import java.util.stream.Collectors; @Log4j2 @Service @RequiredArgsConstructor public class ClubOAuth2UserDetailsService extends DefaultOAuth2UserService { private final ClubMemberRepository repository; private final PasswordEncoder passwordEncoder; @Override public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException { log.info("--------------------------------------"); log.info("userRequest:" + userRequest); String clientName = userRequest.getClientRegistration().getClientName(); log.info("clientName: " + clientName); log.info(userRequest.getAdditionalParameters()); OAuth2User oAuth2User = super.loadUser(userRequest); log.info("====================================="); oAuth2User.getAttributes().forEach((k,v) -> { log.info(k +":" + v); }); String email = null; if(clientName.equals("Google")){ email = oAuth2User.getAttribute("email"); } log.info("EMAIL: " + email); // ClubMember member = saveSocialMember(email); //조금 뒤에 사용 // // return oAuth2User; ClubMember member = saveSocialMember(email); ClubAuthMemberDTO clubAuthMember = new ClubAuthMemberDTO( member.getEmail(), member.getPassword(), true, //fromSocial member.getRoleSet().stream().map( role -> new SimpleGrantedAuthority("ROLE_" + role.name())) .collect(Collectors.toList()), oAuth2User.getAttributes() ); clubAuthMember.setName(member.getName()); return clubAuthMember; } private ClubMember saveSocialMember(String email){ //기존에 동일한 이메일로 가입한 회원이 있는 경우에는 그대로 조회만 Optional<ClubMember> result = repository.findByEmail(email, true); if(result.isPresent()){ return result.get(); } //없다면 회원 추가 패스워드는 1111 이름은 그냥 이메일 주소로 ClubMember clubMember = ClubMember.builder().email(email) .name(email) .password( <PASSWORD>("<PASSWORD>") ) .fromSocial(true) .build(); clubMember.addMemberRole(ClubMemberRole.USER); repository.save(clubMember); return clubMember; } }
adite39/java-algorithms-data-structures
src/problems/leetcode/CountCompleteBinaryTreeNodes.java
<reponame>adite39/java-algorithms-data-structures<filename>src/problems/leetcode/CountCompleteBinaryTreeNodes.java package problems.leetcode; /** * https://leetcode.com/problems/count-complete-tree-nodes */ public class CountCompleteBinaryTreeNodes { private static class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } @Override public String toString() { return "TreeNode{" + "val=" + val + '}'; } } public int countNodes(TreeNode node) { if (node == null) { return 0; } return 1 + countNodes(node.left) + countNodes(node.right); } }
bitsnap/scunk
project/plugins.sbt
<reponame>bitsnap/scunk addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.12") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.22") addSbtPlugin("io.chrisdavenport" % "sbt-no-publish" % "0.1.0")
oglimmer/BootsFaces-OSP
src/main/joda/DateTimeConverter.java
<reponame>oglimmer/BootsFaces-OSP package com.anem.green.web.convert; import java.util.Map; import jakarta.el.ELContext; import jakarta.el.ValueExpression; import jakarta.faces.component.UIComponent; import jakarta.faces.context.FacesContext; import jakarta.faces.convert.Converter; import jakarta.faces.convert.ConverterException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.LocalDate; import org.joda.time.LocalTime; import org.joda.time.ReadableInstant; import org.joda.time.ReadablePartial; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import com.anem.green.web.SessionPreferences; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; /** */ public class DateTimeConverter implements Converter { private ValueExpression timeZoneExpression; /** * used to temporarily store the facesContext during the duration of a getAsString or getAsObject */ transient FacesContext facesContext; @Override public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) { this.facesContext = facesContext; Class<?> type = ValueExpressionHelper.getValueType(facesContext, uiComponent, Lists.<Class<?>> newArrayList(DateTime.class, LocalDate.class, LocalTime.class)); Preconditions.checkArgument(type != null, "DateTimeConverter is not attached to a component bound to either a" + " DateTime, LocalDate, or LocalTime."); Object valueAsObject; if (type.isAssignableFrom(DateTime.class)) { valueAsObject = (DateTime) getAsObjectInstance(facesContext, uiComponent, value); } else if (type.isAssignableFrom(LocalDate.class)) { Object dateTime = getAsObjectInstance(facesContext, uiComponent, value); valueAsObject = dateTime == null ? null : new LocalDate(dateTime); } else if (type.isAssignableFrom(LocalTime.class)) { Object dateTime = getAsObjectInstance(facesContext, uiComponent, value); valueAsObject = dateTime == null ? null : new LocalTime(dateTime); } else { throw new AssertionError("ValueExpressionHelper.getValueType() broke its contract"); } this.facesContext = null; return valueAsObject; } @Override public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value) { this.facesContext = facesContext; Class<?> type = ValueExpressionHelper.getValueType(facesContext, uiComponent, Lists.<Class<?>> newArrayList(DateTime.class, LocalDate.class, LocalTime.class)); Preconditions.checkArgument(type != null, "DateTimeConverter is not attached to a component bound to either a" + " DateTime, LocalDate, or LocalTime."); if (value instanceof LocalDate) { LocalDate localDate = (LocalDate) value; return getAsStringValue(facesContext, uiComponent, localDate.toDateTimeAtStartOfDay(getTimeZone())); } if (value instanceof LocalTime) { LocalTime localTime = (LocalTime) value; return getAsStringValue(facesContext, uiComponent, localTime.toDateTimeToday(getTimeZone())); } if (value instanceof ReadablePartial) { ReadablePartial readablePartial = (ReadablePartial) value; return getAsStringValue(facesContext, uiComponent, readablePartial.toDateTime(new DateTime())); } this.facesContext = null; return getAsStringValue(facesContext, uiComponent, value); } private Object getAsObjectInstance(FacesContext facesContext, UIComponent uiComponent, String value) { if (facesContext == null) { throw new NullPointerException("facesContext"); } if (uiComponent == null) { throw new NullPointerException("uiComponent"); } if (value != null) { value = value.trim(); if (value.length() > 0) { DateTimeFormatter format = getDateFormat(uiComponent); try { return format.parseDateTime(value); } catch (IllegalArgumentException e) { throw new ConverterException(e); } } } return null; } private String getAsStringValue(FacesContext facesContext, UIComponent uiComponent, Object value) { if (facesContext == null) { throw new NullPointerException("facesContext"); } if (uiComponent == null) { throw new NullPointerException("uiComponent"); } if (value == null) { return ""; } if (value instanceof String) { return (String) value; } DateTimeFormatter format = getDateFormat(uiComponent); try { return format.print((ReadableInstant) value); } catch (Exception e) { throw new ConverterException("Cannot convert value '" + value + "'"); } } private DateTimeFormatter getDateFormat(UIComponent uiComponent) { DateTimeFormatter format = DateTimeFormat.forPattern(getPattern(uiComponent)); format = format.withLocale(SessionPreferences.getCurrentLocale()); format = format.withZone(getTimeZone()); return format; } public DateTimeZone getTimeZone() { if (timeZoneExpression == null) { return DateTimeZone.getDefault(); } else { ELContext context;// TODO: Need to know how to test this. if (facesContext == null) { context = FacesContext.getCurrentInstance().getELContext(); } else { context = facesContext.getELContext(); } return (DateTimeZone) timeZoneExpression.getValue(context); } } public static String getPattern(UIComponent component) { Map<String, Object> properties = component.getAttributes(); String pattern = (String) properties.get("dateFormat"); if (null == pattern) { pattern = (String) properties.get("pattern"); } if (null == pattern) { pattern = "MM/dd/yyyy"; } return pattern; } }
vadi2/codeql
python/ql/test/3/library-tests/PointsTo/regressions/subprocess-assert/mwe_failure_2.py
import subprocess assert subprocess.call(['run-backup']) class TestCase: pass class MyTest(TestCase): pass
opentelekomcloud/alien4cloud
alien4cloud-rest-api/src/main/java/alien4cloud/utils/FileUploadUtil.java
package alien4cloud.utils; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import org.springframework.web.multipart.MultipartFile; import lombok.extern.slf4j.Slf4j; @Slf4j public final class FileUploadUtil { private FileUploadUtil() { } /** * Implementation of transferTo of the multipart file is not reliable as relative to configured folder (by default system tmp folder). * This method uses the input stream to copy the file to the right location. * * @throws IOException In case we fail to copy the file (in case the transfer to failed). */ public static void safeTransferTo(Path targetPath, MultipartFile multipartFile) throws IOException { if (multipartFile.isEmpty()) { log.debug("Uploaded file is empty."); return; } try (InputStream fileStream = multipartFile.getInputStream()) { Files.copy(fileStream, targetPath, StandardCopyOption.REPLACE_EXISTING); } } public static void safeTransferTo (Path targetPath, InputStream stream) throws IOException { Files.copy(stream, targetPath, StandardCopyOption.REPLACE_EXISTING); } }
ploukareas/Design-Patterns
Java/src/main/java/behavioralpatterns/strategy/Strategy.java
package behavioralpatterns.strategy; // ˅ // ˄ public interface Strategy { // Show a hand signal. HandSignal showHandSignal(); // Notify a game result. void notifyGameResult(GameResultType result, HandSignal ownHand, HandSignal opponentsHand); // ˅ // ˄ } // ˅ // ˄
rohscx/nodeUtilz
cusFun/lib/networkScope/minusEight.js
<reponame>rohscx/nodeUtilz<gh_stars>0 module.exports = function minusEight(n) { if (n <= 8) { return n; } else { return n - 8; } };
Dikaeinstein/book-a-meal
server/models/User.js
<filename>server/models/User.js module.exports = (sequelize, DataTypes) => { const User = sequelize.define('User', { name: { type: DataTypes.STRING, allowNull: false, }, email: { type: DataTypes.STRING, allowNull: false, }, password: { type: DataTypes.STRING, allowNull: false, }, role: { type: DataTypes.ENUM('customer', 'caterer', 'superAdmin'), allowNull: false, }, createdAt: { type: DataTypes.DATE, field: 'created_at', }, updatedAt: { type: DataTypes.DATE, field: 'updated_at', name: 'updatedAt', }, deletedAt: { type: DataTypes.DATE, field: 'deleted_at', }, }); User.associate = (models) => { // associations can be defined here User.hasMany(models.Order, { foreignKey: { name: 'userId', field: 'user_id', onDelete: 'CASCADE', }, as: 'user', }); User.hasMany(models.Meal, { foreignKey: { name: 'userId', field: 'user_id', onDelete: 'CASCADE', }, }); }; return User; };
spencercjh/sync-leetcode-today-problem-java-example
src/main/java/spencercjh/problems/MaxConsecutiveOnesIii.java
<filename>src/main/java/spencercjh/problems/MaxConsecutiveOnesIii.java package spencercjh.problems; /** * https://leetcode-cn.com/problems/max-consecutive-ones-iii/ * * @author spencercjh */ public class MaxConsecutiveOnesIii { public int longestOnes(int[] A, int K) { } }
Aneo-Development/Aneo
commands/fun/tweet.js
<reponame>Aneo-Development/Aneo<filename>commands/fun/tweet.js const Meme = require("memer-api") const memer = new Meme(); const { Client, Message, MessageEmbed, MessageAttachment } = require('discord.js'); module.exports = { name: 'tweet', /** * @param {Client} client * @param {Message} message * @param {String[]} args */ run: async(client, message, args) => { const user1 = message.member; const avatar = user1.user.displayAvatarURL({ dynamic: false }) const text = args.join(' '); if (!text) return message.reply(`Please provide a text.`); const username = user1.user.username; memer.tweet(avatar, username, text).then(image => { const attachment = new MessageAttachment(image, "tweet.png") message.channel.send(attachment) }) } }
msgimanila/EXT-React-MSG
demos/jsx-in-ext-js-classic/app/desktop/src/view/main/footer/FooterView.js
Ext.define('jsxInExtJSClassic.view.main.footer.FooterView', { extend: 'Ext.panel.Panel', xtype: 'footerview', cls: 'footerview', title: 'Ext JS version: ' + Ext.versions.extjs.version });
theenergydetective/commander
commander/src/main/java/com/ted/commander/client/view/userSettings/ChangeEmailPresenter.java
/* * Copyright 2015 The Energy Detective. All Rights Reserved. */ package com.ted.commander.client.view.userSettings; import com.google.gwt.place.shared.Place; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Widget; import com.ted.commander.client.callback.DefaultMethodCallback; import com.ted.commander.client.clientFactory.ClientFactory; import com.ted.commander.client.events.PlaceRequestEvent; import com.ted.commander.client.places.ChangeEmailPlace; import com.ted.commander.client.places.UserSettingsPlace; import com.ted.commander.client.resources.WebStringResource; import com.ted.commander.client.restInterface.RESTFactory; import com.ted.commander.client.util.Validator; import com.ted.commander.common.model.UserEmail; import org.fusesource.restygwt.client.Method; import java.util.logging.Logger; public class ChangeEmailPresenter implements ChangeEmailView.Presenter, IsWidget { static final Logger LOGGER = Logger.getLogger(ChangeEmailPresenter.class.getName()); final ClientFactory clientFactory; final ChangeEmailView view; final ChangeEmailPlace place; WebStringResource stringRes = WebStringResource.INSTANCE; public ChangeEmailPresenter(ClientFactory clientFactory, ChangeEmailPlace place) { LOGGER.fine("CREATING NEW UserSettingsPresenter"); this.clientFactory = clientFactory; this.place = place; view = clientFactory.getChangeEmailView(); view.setPresenter(this); view.reset(); } @Override public boolean isValid() { return true; } @Override public Widget asWidget() { return view.asWidget(); } @Override public void goTo(Place place) { clientFactory.getEventBus().fireEvent(new PlaceRequestEvent(place, this.place, null)); } @Override public void onResize() { } @Override public void changeEmail(String newEmail, String confirmEmail) { view.setNewInValid(false, ""); view.setConfirmationInValid(false, ""); boolean reqMissing = false; boolean noMatch = false; boolean invalidEmail = false; if (newEmail.trim().isEmpty()) { reqMissing = false; view.setNewInValid(true, WebStringResource.INSTANCE.requiredField()); } if (confirmEmail.trim().isEmpty()) { reqMissing = false; view.setConfirmationInValid(true, WebStringResource.INSTANCE.requiredField()); } if (!reqMissing) { if (!Validator.isValidEmail(newEmail)) { invalidEmail = true; view.setNewInValid(true, WebStringResource.INSTANCE.invalidEmailError()); } } if (!invalidEmail && !newEmail.trim().equals(confirmEmail.trim())) { noMatch = true; view.setConfirmationInValid(true, WebStringResource.INSTANCE.emailMatchError()); //view.setNewInValid(true, ""); } if (!reqMissing && !noMatch && !invalidEmail) { final UserEmail userEmail = new UserEmail(); userEmail.setOldEmail(clientFactory.getUser().getUsername()); userEmail.setNewEmail(newEmail.trim()); RESTFactory.getUserService(clientFactory).changeEmail(userEmail, clientFactory.getUser().getId(), new DefaultMethodCallback() { public void onSuccess(Method method, Object o) { clientFactory.getUser().setUsername(userEmail.getNewEmail()); LOGGER.fine("User updated"); goTo(new UserSettingsPlace("")); } }); } } }
wernerdegroot/applicatives
processor/src/main/java/nl/wernerdegroot/applicatives/processor/domain/PackageName.java
package nl.wernerdegroot.applicatives.processor.domain; import nl.wernerdegroot.applicatives.processor.domain.containing.ContainingPackage; import java.util.Objects; public class PackageName { private final String packageName; public PackageName(String packageName) { this.packageName = packageName; } public static PackageName of(String packageName) { return new PackageName(packageName); } public FullyQualifiedName withClassName(ClassName className) { return FullyQualifiedName.of(packageName + "." + className.raw()); } public ContainingPackage asPackage() { return ContainingPackage.of(this); } public String raw() { return packageName; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PackageName that = (PackageName) o; return raw().equals(that.raw()); } @Override public int hashCode() { return Objects.hash(raw()); } @Override public String toString() { return "PackageName{" + "packageName='" + packageName + '\'' + '}'; } }
beaugunderson/hallway-pusher
lib/services/dwolla/map.js
exports.account = { id: 'Id', oembed: function(data) { var ret = { id: data.Id, title: data.Name, location: data.City + ' ' + data.State, provider_name: 'dwolla' }; return ret; } } exports.defaults = { self: 'account' }
Bluedz/XTKAnal
src/main/java/com/xtk/anal/model/auto/ResearchInforTstExample.java
package com.xtk.anal.model.auto; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 调研信息登记表 ResearchInforTstExample * @author xtk_自动生成 * @email <EMAIL> * @date 2020-05-18 16:10:14 */ public class ResearchInforTstExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public ResearchInforTstExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(String value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(String value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(String value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(String value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(String value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(String value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdLike(String value) { addCriterion("id like", value, "id"); return (Criteria) this; } public Criteria andIdNotLike(String value) { addCriterion("id not like", value, "id"); return (Criteria) this; } public Criteria andIdIn(List<String> values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List<String> values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(String value1, String value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(String value1, String value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andRegistrarIsNull() { addCriterion("registrar is null"); return (Criteria) this; } public Criteria andRegistrarIsNotNull() { addCriterion("registrar is not null"); return (Criteria) this; } public Criteria andRegistrarEqualTo(String value) { addCriterion("registrar =", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarNotEqualTo(String value) { addCriterion("registrar <>", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarGreaterThan(String value) { addCriterion("registrar >", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarGreaterThanOrEqualTo(String value) { addCriterion("registrar >=", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarLessThan(String value) { addCriterion("registrar <", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarLessThanOrEqualTo(String value) { addCriterion("registrar <=", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarLike(String value) { addCriterion("registrar like", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarNotLike(String value) { addCriterion("registrar not like", value, "registrar"); return (Criteria) this; } public Criteria andRegistrarIn(List<String> values) { addCriterion("registrar in", values, "registrar"); return (Criteria) this; } public Criteria andRegistrarNotIn(List<String> values) { addCriterion("registrar not in", values, "registrar"); return (Criteria) this; } public Criteria andRegistrarBetween(String value1, String value2) { addCriterion("registrar between", value1, value2, "registrar"); return (Criteria) this; } public Criteria andRegistrarNotBetween(String value1, String value2) { addCriterion("registrar not between", value1, value2, "registrar"); return (Criteria) this; } public Criteria andCustomerNameIsNull() { addCriterion("customer_name is null"); return (Criteria) this; } public Criteria andCustomerNameIsNotNull() { addCriterion("customer_name is not null"); return (Criteria) this; } public Criteria andCustomerNameEqualTo(String value) { addCriterion("customer_name =", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameNotEqualTo(String value) { addCriterion("customer_name <>", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameGreaterThan(String value) { addCriterion("customer_name >", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameGreaterThanOrEqualTo(String value) { addCriterion("customer_name >=", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameLessThan(String value) { addCriterion("customer_name <", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameLessThanOrEqualTo(String value) { addCriterion("customer_name <=", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameLike(String value) { addCriterion("customer_name like", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameNotLike(String value) { addCriterion("customer_name not like", value, "customerName"); return (Criteria) this; } public Criteria andCustomerNameIn(List<String> values) { addCriterion("customer_name in", values, "customerName"); return (Criteria) this; } public Criteria andCustomerNameNotIn(List<String> values) { addCriterion("customer_name not in", values, "customerName"); return (Criteria) this; } public Criteria andCustomerNameBetween(String value1, String value2) { addCriterion("customer_name between", value1, value2, "customerName"); return (Criteria) this; } public Criteria andCustomerNameNotBetween(String value1, String value2) { addCriterion("customer_name not between", value1, value2, "customerName"); return (Criteria) this; } public Criteria andDescriptionIsNull() { addCriterion("description is null"); return (Criteria) this; } public Criteria andDescriptionIsNotNull() { addCriterion("description is not null"); return (Criteria) this; } public Criteria andDescriptionEqualTo(String value) { addCriterion("description =", value, "description"); return (Criteria) this; } public Criteria andDescriptionNotEqualTo(String value) { addCriterion("description <>", value, "description"); return (Criteria) this; } public Criteria andDescriptionGreaterThan(String value) { addCriterion("description >", value, "description"); return (Criteria) this; } public Criteria andDescriptionGreaterThanOrEqualTo(String value) { addCriterion("description >=", value, "description"); return (Criteria) this; } public Criteria andDescriptionLessThan(String value) { addCriterion("description <", value, "description"); return (Criteria) this; } public Criteria andDescriptionLessThanOrEqualTo(String value) { addCriterion("description <=", value, "description"); return (Criteria) this; } public Criteria andDescriptionLike(String value) { addCriterion("description like", value, "description"); return (Criteria) this; } public Criteria andDescriptionNotLike(String value) { addCriterion("description not like", value, "description"); return (Criteria) this; } public Criteria andDescriptionIn(List<String> values) { addCriterion("description in", values, "description"); return (Criteria) this; } public Criteria andDescriptionNotIn(List<String> values) { addCriterion("description not in", values, "description"); return (Criteria) this; } public Criteria andDescriptionBetween(String value1, String value2) { addCriterion("description between", value1, value2, "description"); return (Criteria) this; } public Criteria andDescriptionNotBetween(String value1, String value2) { addCriterion("description not between", value1, value2, "description"); return (Criteria) this; } public Criteria andWorkshopIsNull() { addCriterion("workshop is null"); return (Criteria) this; } public Criteria andWorkshopIsNotNull() { addCriterion("workshop is not null"); return (Criteria) this; } public Criteria andWorkshopEqualTo(String value) { addCriterion("workshop =", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopNotEqualTo(String value) { addCriterion("workshop <>", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopGreaterThan(String value) { addCriterion("workshop >", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopGreaterThanOrEqualTo(String value) { addCriterion("workshop >=", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopLessThan(String value) { addCriterion("workshop <", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopLessThanOrEqualTo(String value) { addCriterion("workshop <=", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopLike(String value) { addCriterion("workshop like", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopNotLike(String value) { addCriterion("workshop not like", value, "workshop"); return (Criteria) this; } public Criteria andWorkshopIn(List<String> values) { addCriterion("workshop in", values, "workshop"); return (Criteria) this; } public Criteria andWorkshopNotIn(List<String> values) { addCriterion("workshop not in", values, "workshop"); return (Criteria) this; } public Criteria andWorkshopBetween(String value1, String value2) { addCriterion("workshop between", value1, value2, "workshop"); return (Criteria) this; } public Criteria andWorkshopNotBetween(String value1, String value2) { addCriterion("workshop not between", value1, value2, "workshop"); return (Criteria) this; } public Criteria andDesignCapacityIsNull() { addCriterion("design_capacity is null"); return (Criteria) this; } public Criteria andDesignCapacityIsNotNull() { addCriterion("design_capacity is not null"); return (Criteria) this; } public Criteria andDesignCapacityEqualTo(String value) { addCriterion("design_capacity =", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityNotEqualTo(String value) { addCriterion("design_capacity <>", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityGreaterThan(String value) { addCriterion("design_capacity >", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityGreaterThanOrEqualTo(String value) { addCriterion("design_capacity >=", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityLessThan(String value) { addCriterion("design_capacity <", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityLessThanOrEqualTo(String value) { addCriterion("design_capacity <=", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityLike(String value) { addCriterion("design_capacity like", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityNotLike(String value) { addCriterion("design_capacity not like", value, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityIn(List<String> values) { addCriterion("design_capacity in", values, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityNotIn(List<String> values) { addCriterion("design_capacity not in", values, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityBetween(String value1, String value2) { addCriterion("design_capacity between", value1, value2, "designCapacity"); return (Criteria) this; } public Criteria andDesignCapacityNotBetween(String value1, String value2) { addCriterion("design_capacity not between", value1, value2, "designCapacity"); return (Criteria) this; } public Criteria andAssetsOriginalValueIsNull() { addCriterion("assets_original_value is null"); return (Criteria) this; } public Criteria andAssetsOriginalValueIsNotNull() { addCriterion("assets_original_value is not null"); return (Criteria) this; } public Criteria andAssetsOriginalValueEqualTo(String value) { addCriterion("assets_original_value =", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueNotEqualTo(String value) { addCriterion("assets_original_value <>", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueGreaterThan(String value) { addCriterion("assets_original_value >", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueGreaterThanOrEqualTo(String value) { addCriterion("assets_original_value >=", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueLessThan(String value) { addCriterion("assets_original_value <", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueLessThanOrEqualTo(String value) { addCriterion("assets_original_value <=", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueLike(String value) { addCriterion("assets_original_value like", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueNotLike(String value) { addCriterion("assets_original_value not like", value, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueIn(List<String> values) { addCriterion("assets_original_value in", values, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueNotIn(List<String> values) { addCriterion("assets_original_value not in", values, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueBetween(String value1, String value2) { addCriterion("assets_original_value between", value1, value2, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetsOriginalValueNotBetween(String value1, String value2) { addCriterion("assets_original_value not between", value1, value2, "assetsOriginalValue"); return (Criteria) this; } public Criteria andAssetListIsNull() { addCriterion("asset_list is null"); return (Criteria) this; } public Criteria andAssetListIsNotNull() { addCriterion("asset_list is not null"); return (Criteria) this; } public Criteria andAssetListEqualTo(String value) { addCriterion("asset_list =", value, "assetList"); return (Criteria) this; } public Criteria andAssetListNotEqualTo(String value) { addCriterion("asset_list <>", value, "assetList"); return (Criteria) this; } public Criteria andAssetListGreaterThan(String value) { addCriterion("asset_list >", value, "assetList"); return (Criteria) this; } public Criteria andAssetListGreaterThanOrEqualTo(String value) { addCriterion("asset_list >=", value, "assetList"); return (Criteria) this; } public Criteria andAssetListLessThan(String value) { addCriterion("asset_list <", value, "assetList"); return (Criteria) this; } public Criteria andAssetListLessThanOrEqualTo(String value) { addCriterion("asset_list <=", value, "assetList"); return (Criteria) this; } public Criteria andAssetListLike(String value) { addCriterion("asset_list like", value, "assetList"); return (Criteria) this; } public Criteria andAssetListNotLike(String value) { addCriterion("asset_list not like", value, "assetList"); return (Criteria) this; } public Criteria andAssetListIn(List<String> values) { addCriterion("asset_list in", values, "assetList"); return (Criteria) this; } public Criteria andAssetListNotIn(List<String> values) { addCriterion("asset_list not in", values, "assetList"); return (Criteria) this; } public Criteria andAssetListBetween(String value1, String value2) { addCriterion("asset_list between", value1, value2, "assetList"); return (Criteria) this; } public Criteria andAssetListNotBetween(String value1, String value2) { addCriterion("asset_list not between", value1, value2, "assetList"); return (Criteria) this; } public Criteria andSOPTimeIsNull() { addCriterion("SOP_time is null"); return (Criteria) this; } public Criteria andSOPTimeIsNotNull() { addCriterion("SOP_time is not null"); return (Criteria) this; } public Criteria andSOPTimeEqualTo(Date value) { addCriterion("SOP_time =", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeNotEqualTo(Date value) { addCriterion("SOP_time <>", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeGreaterThan(Date value) { addCriterion("SOP_time >", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeGreaterThanOrEqualTo(Date value) { addCriterion("SOP_time >=", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeLessThan(Date value) { addCriterion("SOP_time <", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeLessThanOrEqualTo(Date value) { addCriterion("SOP_time <=", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeLike(Date value) { addCriterion("SOP_time like", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeNotLike(Date value) { addCriterion("SOP_time not like", value, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeIn(List<Date> values) { addCriterion("SOP_time in", values, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeNotIn(List<Date> values) { addCriterion("SOP_time not in", values, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeBetween(Date value1, Date value2) { addCriterion("SOP_time between", value1, value2, "sOPTime"); return (Criteria) this; } public Criteria andSOPTimeNotBetween(Date value1, Date value2) { addCriterion("SOP_time not between", value1, value2, "sOPTime"); return (Criteria) this; } public Criteria andCompanionProductionPlanIsNull() { addCriterion("companion_production_plan is null"); return (Criteria) this; } public Criteria andCompanionProductionPlanIsNotNull() { addCriterion("companion_production_plan is not null"); return (Criteria) this; } public Criteria andCompanionProductionPlanEqualTo(String value) { addCriterion("companion_production_plan =", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanNotEqualTo(String value) { addCriterion("companion_production_plan <>", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanGreaterThan(String value) { addCriterion("companion_production_plan >", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanGreaterThanOrEqualTo(String value) { addCriterion("companion_production_plan >=", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanLessThan(String value) { addCriterion("companion_production_plan <", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanLessThanOrEqualTo(String value) { addCriterion("companion_production_plan <=", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanLike(String value) { addCriterion("companion_production_plan like", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanNotLike(String value) { addCriterion("companion_production_plan not like", value, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanIn(List<String> values) { addCriterion("companion_production_plan in", values, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanNotIn(List<String> values) { addCriterion("companion_production_plan not in", values, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanBetween(String value1, String value2) { addCriterion("companion_production_plan between", value1, value2, "companionProductionPlan"); return (Criteria) this; } public Criteria andCompanionProductionPlanNotBetween(String value1, String value2) { addCriterion("companion_production_plan not between", value1, value2, "companionProductionPlan"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorIsNull() { addCriterion("General_contractor_integrator is null"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorIsNotNull() { addCriterion("General_contractor_integrator is not null"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorEqualTo(String value) { addCriterion("General_contractor_integrator =", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorNotEqualTo(String value) { addCriterion("General_contractor_integrator <>", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorGreaterThan(String value) { addCriterion("General_contractor_integrator >", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorGreaterThanOrEqualTo(String value) { addCriterion("General_contractor_integrator >=", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorLessThan(String value) { addCriterion("General_contractor_integrator <", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorLessThanOrEqualTo(String value) { addCriterion("General_contractor_integrator <=", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorLike(String value) { addCriterion("General_contractor_integrator like", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorNotLike(String value) { addCriterion("General_contractor_integrator not like", value, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorIn(List<String> values) { addCriterion("General_contractor_integrator in", values, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorNotIn(List<String> values) { addCriterion("General_contractor_integrator not in", values, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorBetween(String value1, String value2) { addCriterion("General_contractor_integrator between", value1, value2, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andGeneralContractorIntegratorNotBetween(String value1, String value2) { addCriterion("General_contractor_integrator not between", value1, value2, "generalContractorIntegrator"); return (Criteria) this; } public Criteria andTOP10IsNull() { addCriterion("TOP10 is null"); return (Criteria) this; } public Criteria andTOP10IsNotNull() { addCriterion("TOP10 is not null"); return (Criteria) this; } public Criteria andTOP10EqualTo(String value) { addCriterion("TOP10 =", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10NotEqualTo(String value) { addCriterion("TOP10 <>", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10GreaterThan(String value) { addCriterion("TOP10 >", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10GreaterThanOrEqualTo(String value) { addCriterion("TOP10 >=", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10LessThan(String value) { addCriterion("TOP10 <", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10LessThanOrEqualTo(String value) { addCriterion("TOP10 <=", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10Like(String value) { addCriterion("TOP10 like", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10NotLike(String value) { addCriterion("TOP10 not like", value, "tOP10"); return (Criteria) this; } public Criteria andTOP10In(List<String> values) { addCriterion("TOP10 in", values, "tOP10"); return (Criteria) this; } public Criteria andTOP10NotIn(List<String> values) { addCriterion("TOP10 not in", values, "tOP10"); return (Criteria) this; } public Criteria andTOP10Between(String value1, String value2) { addCriterion("TOP10 between", value1, value2, "tOP10"); return (Criteria) this; } public Criteria andTOP10NotBetween(String value1, String value2) { addCriterion("TOP10 not between", value1, value2, "tOP10"); return (Criteria) this; } public Criteria andScrappageSchemeIsNull() { addCriterion("scrappage_scheme is null"); return (Criteria) this; } public Criteria andScrappageSchemeIsNotNull() { addCriterion("scrappage_scheme is not null"); return (Criteria) this; } public Criteria andScrappageSchemeEqualTo(String value) { addCriterion("scrappage_scheme =", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeNotEqualTo(String value) { addCriterion("scrappage_scheme <>", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeGreaterThan(String value) { addCriterion("scrappage_scheme >", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeGreaterThanOrEqualTo(String value) { addCriterion("scrappage_scheme >=", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeLessThan(String value) { addCriterion("scrappage_scheme <", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeLessThanOrEqualTo(String value) { addCriterion("scrappage_scheme <=", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeLike(String value) { addCriterion("scrappage_scheme like", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeNotLike(String value) { addCriterion("scrappage_scheme not like", value, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeIn(List<String> values) { addCriterion("scrappage_scheme in", values, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeNotIn(List<String> values) { addCriterion("scrappage_scheme not in", values, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeBetween(String value1, String value2) { addCriterion("scrappage_scheme between", value1, value2, "scrappageScheme"); return (Criteria) this; } public Criteria andScrappageSchemeNotBetween(String value1, String value2) { addCriterion("scrappage_scheme not between", value1, value2, "scrappageScheme"); return (Criteria) this; } public Criteria andTurnoverConsumptionListIsNull() { addCriterion("turnover_consumption_list is null"); return (Criteria) this; } public Criteria andTurnoverConsumptionListIsNotNull() { addCriterion("turnover_consumption_list is not null"); return (Criteria) this; } public Criteria andTurnoverConsumptionListEqualTo(String value) { addCriterion("turnover_consumption_list =", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListNotEqualTo(String value) { addCriterion("turnover_consumption_list <>", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListGreaterThan(String value) { addCriterion("turnover_consumption_list >", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListGreaterThanOrEqualTo(String value) { addCriterion("turnover_consumption_list >=", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListLessThan(String value) { addCriterion("turnover_consumption_list <", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListLessThanOrEqualTo(String value) { addCriterion("turnover_consumption_list <=", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListLike(String value) { addCriterion("turnover_consumption_list like", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListNotLike(String value) { addCriterion("turnover_consumption_list not like", value, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListIn(List<String> values) { addCriterion("turnover_consumption_list in", values, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListNotIn(List<String> values) { addCriterion("turnover_consumption_list not in", values, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListBetween(String value1, String value2) { addCriterion("turnover_consumption_list between", value1, value2, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andTurnoverConsumptionListNotBetween(String value1, String value2) { addCriterion("turnover_consumption_list not between", value1, value2, "turnoverConsumptionList"); return (Criteria) this; } public Criteria andSupplyCycleListIsNull() { addCriterion("supply_cycle_list is null"); return (Criteria) this; } public Criteria andSupplyCycleListIsNotNull() { addCriterion("supply_cycle_list is not null"); return (Criteria) this; } public Criteria andSupplyCycleListEqualTo(String value) { addCriterion("supply_cycle_list =", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListNotEqualTo(String value) { addCriterion("supply_cycle_list <>", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListGreaterThan(String value) { addCriterion("supply_cycle_list >", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListGreaterThanOrEqualTo(String value) { addCriterion("supply_cycle_list >=", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListLessThan(String value) { addCriterion("supply_cycle_list <", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListLessThanOrEqualTo(String value) { addCriterion("supply_cycle_list <=", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListLike(String value) { addCriterion("supply_cycle_list like", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListNotLike(String value) { addCriterion("supply_cycle_list not like", value, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListIn(List<String> values) { addCriterion("supply_cycle_list in", values, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListNotIn(List<String> values) { addCriterion("supply_cycle_list not in", values, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListBetween(String value1, String value2) { addCriterion("supply_cycle_list between", value1, value2, "supplyCycleList"); return (Criteria) this; } public Criteria andSupplyCycleListNotBetween(String value1, String value2) { addCriterion("supply_cycle_list not between", value1, value2, "supplyCycleList"); return (Criteria) this; } public Criteria andSpecificationCategoryListIsNull() { addCriterion("specification_category_list is null"); return (Criteria) this; } public Criteria andSpecificationCategoryListIsNotNull() { addCriterion("specification_category_list is not null"); return (Criteria) this; } public Criteria andSpecificationCategoryListEqualTo(String value) { addCriterion("specification_category_list =", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListNotEqualTo(String value) { addCriterion("specification_category_list <>", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListGreaterThan(String value) { addCriterion("specification_category_list >", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListGreaterThanOrEqualTo(String value) { addCriterion("specification_category_list >=", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListLessThan(String value) { addCriterion("specification_category_list <", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListLessThanOrEqualTo(String value) { addCriterion("specification_category_list <=", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListLike(String value) { addCriterion("specification_category_list like", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListNotLike(String value) { addCriterion("specification_category_list not like", value, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListIn(List<String> values) { addCriterion("specification_category_list in", values, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListNotIn(List<String> values) { addCriterion("specification_category_list not in", values, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListBetween(String value1, String value2) { addCriterion("specification_category_list between", value1, value2, "specificationCategoryList"); return (Criteria) this; } public Criteria andSpecificationCategoryListNotBetween(String value1, String value2) { addCriterion("specification_category_list not between", value1, value2, "specificationCategoryList"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageIsNull() { addCriterion("framework_agreement_coverage is null"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageIsNotNull() { addCriterion("framework_agreement_coverage is not null"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageEqualTo(String value) { addCriterion("framework_agreement_coverage =", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageNotEqualTo(String value) { addCriterion("framework_agreement_coverage <>", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageGreaterThan(String value) { addCriterion("framework_agreement_coverage >", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageGreaterThanOrEqualTo(String value) { addCriterion("framework_agreement_coverage >=", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageLessThan(String value) { addCriterion("framework_agreement_coverage <", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageLessThanOrEqualTo(String value) { addCriterion("framework_agreement_coverage <=", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageLike(String value) { addCriterion("framework_agreement_coverage like", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageNotLike(String value) { addCriterion("framework_agreement_coverage not like", value, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageIn(List<String> values) { addCriterion("framework_agreement_coverage in", values, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageNotIn(List<String> values) { addCriterion("framework_agreement_coverage not in", values, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageBetween(String value1, String value2) { addCriterion("framework_agreement_coverage between", value1, value2, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andFrameworkAgreementCoverageNotBetween(String value1, String value2) { addCriterion("framework_agreement_coverage not between", value1, value2, "frameworkAgreementCoverage"); return (Criteria) this; } public Criteria andOpeningRateIsNull() { addCriterion("opening_rate is null"); return (Criteria) this; } public Criteria andOpeningRateIsNotNull() { addCriterion("opening_rate is not null"); return (Criteria) this; } public Criteria andOpeningRateEqualTo(String value) { addCriterion("opening_rate =", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateNotEqualTo(String value) { addCriterion("opening_rate <>", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateGreaterThan(String value) { addCriterion("opening_rate >", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateGreaterThanOrEqualTo(String value) { addCriterion("opening_rate >=", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateLessThan(String value) { addCriterion("opening_rate <", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateLessThanOrEqualTo(String value) { addCriterion("opening_rate <=", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateLike(String value) { addCriterion("opening_rate like", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateNotLike(String value) { addCriterion("opening_rate not like", value, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateIn(List<String> values) { addCriterion("opening_rate in", values, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateNotIn(List<String> values) { addCriterion("opening_rate not in", values, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateBetween(String value1, String value2) { addCriterion("opening_rate between", value1, value2, "openingRate"); return (Criteria) this; } public Criteria andOpeningRateNotBetween(String value1, String value2) { addCriterion("opening_rate not between", value1, value2, "openingRate"); return (Criteria) this; } public Criteria andDowntimeRateIsNull() { addCriterion("downtime_rate is null"); return (Criteria) this; } public Criteria andDowntimeRateIsNotNull() { addCriterion("downtime_rate is not null"); return (Criteria) this; } public Criteria andDowntimeRateEqualTo(String value) { addCriterion("downtime_rate =", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateNotEqualTo(String value) { addCriterion("downtime_rate <>", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateGreaterThan(String value) { addCriterion("downtime_rate >", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateGreaterThanOrEqualTo(String value) { addCriterion("downtime_rate >=", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateLessThan(String value) { addCriterion("downtime_rate <", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateLessThanOrEqualTo(String value) { addCriterion("downtime_rate <=", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateLike(String value) { addCriterion("downtime_rate like", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateNotLike(String value) { addCriterion("downtime_rate not like", value, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateIn(List<String> values) { addCriterion("downtime_rate in", values, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateNotIn(List<String> values) { addCriterion("downtime_rate not in", values, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateBetween(String value1, String value2) { addCriterion("downtime_rate between", value1, value2, "downtimeRate"); return (Criteria) this; } public Criteria andDowntimeRateNotBetween(String value1, String value2) { addCriterion("downtime_rate not between", value1, value2, "downtimeRate"); return (Criteria) this; } public Criteria andPainPointsIsNull() { addCriterion("pain_points is null"); return (Criteria) this; } public Criteria andPainPointsIsNotNull() { addCriterion("pain_points is not null"); return (Criteria) this; } public Criteria andPainPointsEqualTo(String value) { addCriterion("pain_points =", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsNotEqualTo(String value) { addCriterion("pain_points <>", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsGreaterThan(String value) { addCriterion("pain_points >", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsGreaterThanOrEqualTo(String value) { addCriterion("pain_points >=", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsLessThan(String value) { addCriterion("pain_points <", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsLessThanOrEqualTo(String value) { addCriterion("pain_points <=", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsLike(String value) { addCriterion("pain_points like", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsNotLike(String value) { addCriterion("pain_points not like", value, "painPoints"); return (Criteria) this; } public Criteria andPainPointsIn(List<String> values) { addCriterion("pain_points in", values, "painPoints"); return (Criteria) this; } public Criteria andPainPointsNotIn(List<String> values) { addCriterion("pain_points not in", values, "painPoints"); return (Criteria) this; } public Criteria andPainPointsBetween(String value1, String value2) { addCriterion("pain_points between", value1, value2, "painPoints"); return (Criteria) this; } public Criteria andPainPointsNotBetween(String value1, String value2) { addCriterion("pain_points not between", value1, value2, "painPoints"); return (Criteria) this; } public Criteria andMaterialCoverageIsNull() { addCriterion("material_coverage is null"); return (Criteria) this; } public Criteria andMaterialCoverageIsNotNull() { addCriterion("material_coverage is not null"); return (Criteria) this; } public Criteria andMaterialCoverageEqualTo(String value) { addCriterion("material_coverage =", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageNotEqualTo(String value) { addCriterion("material_coverage <>", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageGreaterThan(String value) { addCriterion("material_coverage >", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageGreaterThanOrEqualTo(String value) { addCriterion("material_coverage >=", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageLessThan(String value) { addCriterion("material_coverage <", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageLessThanOrEqualTo(String value) { addCriterion("material_coverage <=", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageLike(String value) { addCriterion("material_coverage like", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageNotLike(String value) { addCriterion("material_coverage not like", value, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageIn(List<String> values) { addCriterion("material_coverage in", values, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageNotIn(List<String> values) { addCriterion("material_coverage not in", values, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageBetween(String value1, String value2) { addCriterion("material_coverage between", value1, value2, "materialCoverage"); return (Criteria) this; } public Criteria andMaterialCoverageNotBetween(String value1, String value2) { addCriterion("material_coverage not between", value1, value2, "materialCoverage"); return (Criteria) this; } public Criteria andComparisonResultIsNull() { addCriterion("comparison_result is null"); return (Criteria) this; } public Criteria andComparisonResultIsNotNull() { addCriterion("comparison_result is not null"); return (Criteria) this; } public Criteria andComparisonResultEqualTo(String value) { addCriterion("comparison_result =", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultNotEqualTo(String value) { addCriterion("comparison_result <>", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultGreaterThan(String value) { addCriterion("comparison_result >", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultGreaterThanOrEqualTo(String value) { addCriterion("comparison_result >=", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultLessThan(String value) { addCriterion("comparison_result <", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultLessThanOrEqualTo(String value) { addCriterion("comparison_result <=", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultLike(String value) { addCriterion("comparison_result like", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultNotLike(String value) { addCriterion("comparison_result not like", value, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultIn(List<String> values) { addCriterion("comparison_result in", values, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultNotIn(List<String> values) { addCriterion("comparison_result not in", values, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultBetween(String value1, String value2) { addCriterion("comparison_result between", value1, value2, "comparisonResult"); return (Criteria) this; } public Criteria andComparisonResultNotBetween(String value1, String value2) { addCriterion("comparison_result not between", value1, value2, "comparisonResult"); return (Criteria) this; } public Criteria andConclusionIsNull() { addCriterion("conclusion is null"); return (Criteria) this; } public Criteria andConclusionIsNotNull() { addCriterion("conclusion is not null"); return (Criteria) this; } public Criteria andConclusionEqualTo(String value) { addCriterion("conclusion =", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionNotEqualTo(String value) { addCriterion("conclusion <>", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionGreaterThan(String value) { addCriterion("conclusion >", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionGreaterThanOrEqualTo(String value) { addCriterion("conclusion >=", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionLessThan(String value) { addCriterion("conclusion <", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionLessThanOrEqualTo(String value) { addCriterion("conclusion <=", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionLike(String value) { addCriterion("conclusion like", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionNotLike(String value) { addCriterion("conclusion not like", value, "conclusion"); return (Criteria) this; } public Criteria andConclusionIn(List<String> values) { addCriterion("conclusion in", values, "conclusion"); return (Criteria) this; } public Criteria andConclusionNotIn(List<String> values) { addCriterion("conclusion not in", values, "conclusion"); return (Criteria) this; } public Criteria andConclusionBetween(String value1, String value2) { addCriterion("conclusion between", value1, value2, "conclusion"); return (Criteria) this; } public Criteria andConclusionNotBetween(String value1, String value2) { addCriterion("conclusion not between", value1, value2, "conclusion"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLike(Date value) { addCriterion("create_time like", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotLike(Date value) { addCriterion("create_time not like", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List<Date> values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List<Date> values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
sarbull/components
packages/purplecoat.js
<filename>packages/purplecoat.js { "name": "purplecoat.js", "url": "https://github.com/ellekasai/purplecoat.js.git" }
robindittmar/mechanics
mechanics/src/core/Player.h
#ifndef __PLAYER_H__ #define __PLAYER_H__ // Purpose: Backtracking class CPlayer { public: CPlayer(); ~CPlayer(); private: float m_fSimulationTime; bool m_bIsDormant; }; #endif // __PLAYER_H__
MohammedBashiru/rave-android
rave_android/src/main/java/com/flutterwave/raveandroid/banktransfer/BankTransferFragment.java
package com.flutterwave.raveandroid.banktransfer; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.Fragment; import com.flutterwave.raveandroid.R; import com.flutterwave.raveandroid.RavePayActivity; import com.flutterwave.raveandroid.RavePayInitializer; import com.flutterwave.raveandroid.ViewObject; import com.flutterwave.raveandroid.data.Utils; import com.flutterwave.raveandroid.data.events.FeeDisplayResponseEvent; import com.flutterwave.raveandroid.data.events.InstructionsDisplayedEvent; import com.flutterwave.raveandroid.data.events.RequeryCancelledEvent; import com.flutterwave.raveandroid.di.modules.BankTransferModule; import com.flutterwave.raveandroid.rave_java_commons.Payload; import com.flutterwave.raveandroid.rave_java_commons.RaveConstants; import com.flutterwave.raveandroid.rave_logger.events.StartTypingEvent; import com.flutterwave.raveandroid.rave_presentation.data.events.ErrorEvent; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import java.util.HashMap; import javax.inject.Inject; import static android.view.View.GONE; /** * A simple {@link Fragment} subclass. */ public class BankTransferFragment extends Fragment implements BankTransferUiContract.View, View.OnClickListener, View.OnFocusChangeListener { @Inject BankTransferPresenter presenter; View v; TextInputEditText amountEt; TextInputLayout amountTil; TextView amountTv; TextView accountNumberTv; TextView bankNameTv; TextView beneficiaryNameTv; TextView transferInstructionTv; TextView transferStatusTv; Button verifyPaymentButton; Button payButton; ConstraintLayout initiateChargeLayout; ConstraintLayout transferDetailsLayout; RavePayInitializer ravePayInitializer; private ProgressDialog progressDialog; private ProgressDialog pollingProgressDialog; public BankTransferFragment() { // Required empty public constructor } @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { injectComponents(); if (savedInstanceState != null) { presenter.restoreState(savedInstanceState); } v = inflater.inflate(R.layout.rave_sdk_fragment_bank_transfer, container, false); initializeViews(); setListeners(); initializePresenter(); return v; } private void injectComponents() { if (getActivity() != null) { ((RavePayActivity) getActivity()).getRaveUiComponent() .plus(new BankTransferModule(this)) .inject(this); } } private void initializePresenter() { if (getActivity() != null) { ravePayInitializer = ((RavePayActivity) getActivity()).getRavePayInitializer(); presenter.init(ravePayInitializer); } } private void setListeners() { payButton.setOnClickListener(this); verifyPaymentButton.setOnClickListener(this); amountEt.setOnFocusChangeListener(this); } @Override public void onClick(View view) { int viewId = view.getId(); if (viewId == payButton.getId()) { clearErrors(); Utils.hide_keyboard(getActivity()); collectData(); } else if (viewId == verifyPaymentButton.getId()) { verifyPayment(); } } private void collectData() { HashMap<String, ViewObject> dataHashMap = new HashMap<>(); dataHashMap.put(RaveConstants.fieldAmount, new ViewObject(amountTil.getId(), amountEt.getText().toString(), TextInputLayout.class)); presenter.onDataCollected(dataHashMap); } private void initializeViews() { amountEt = v.findViewById(R.id.rave_amountEt); amountTil = v.findViewById(R.id.rave_amountTil); initiateChargeLayout = v.findViewById(R.id.rave_initiate_payment_layout); transferDetailsLayout = v.findViewById(R.id.rave_transfer_details_layout); transferInstructionTv = v.findViewById(R.id.rave_bank_transfer_instruction); transferStatusTv = v.findViewById(R.id.rave_transfer_status_tv); amountTv = v.findViewById(R.id.rave_amount_tv); beneficiaryNameTv = v.findViewById(R.id.rave_beneficiary_name_tv); bankNameTv = v.findViewById(R.id.rave_bank_name_tv); accountNumberTv = v.findViewById(R.id.rave_account_number_tv); payButton = v.findViewById(R.id.rave_payButton); verifyPaymentButton = v.findViewById(R.id.rave_verify_payment_button); } @Override public void onAmountValidationSuccessful(String amountToPay) { amountTil.setVisibility(GONE); amountEt.setText(amountToPay); } @Override public void showFieldError(int viewID, String message, Class<?> viewType) { if (viewType == TextInputLayout.class) { TextInputLayout view = v.findViewById(viewID); view.setError(message); } else if (viewType == EditText.class) { EditText view = v.findViewById(viewID); view.setError(message); } } private void verifyPayment() { presenter.startPaymentVerification(300); } @Override public void showPollingIndicator(boolean active) { if (getActivity() != null) { if (getActivity().isFinishing()) return; } if (pollingProgressDialog == null) { pollingProgressDialog = new ProgressDialog(getActivity()); pollingProgressDialog.setMessage("Checking transaction status. \nPlease wait"); } if (active && !pollingProgressDialog.isShowing()) { pollingProgressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { presenter.logEvent(new RequeryCancelledEvent().getEvent(), ravePayInitializer.getPublicKey()); pollingProgressDialog.dismiss(); presenter.cancelPolling(); } }); pollingProgressDialog.show(); } else if (active && pollingProgressDialog.isShowing()) { //pass } else { pollingProgressDialog.dismiss(); } } private void clearErrors() { amountTil.setError(null); amountTil.setErrorEnabled(false); } @Override public void onPollingCanceled(String flwRef, String txRef, final String responseAsJSONString) { showBackToApp(getString(R.string.bant_transfer_polling_cancelled_message), responseAsJSONString); } @Override public void onPollingTimeout(String flwRef, String txRef, final String responseAsJSONString) { showBackToApp(getString(R.string.pay_with_bank_timeout_notification), responseAsJSONString); } private void showBackToApp(String transferStatusMessage, final String responseAsJSONString) { transferStatusTv.setText(transferStatusMessage); transferStatusTv.setVisibility(View.VISIBLE); verifyPaymentButton.setText(getString(R.string.back_to_app)); verifyPaymentButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.putExtra("response", responseAsJSONString); if (getActivity() != null) { ((RavePayActivity) getActivity()).setRavePayResult(RavePayActivity.RESULT_ERROR, intent); getActivity().finish(); } } }); } @Override public void showProgressIndicator(boolean active) { if (getActivity().isFinishing()) { return; } if (progressDialog == null) { progressDialog = new ProgressDialog(getActivity()); progressDialog.setCanceledOnTouchOutside(false); progressDialog.setMessage("Please wait..."); } if (active && !progressDialog.isShowing()) { progressDialog.show(); } else if (active && progressDialog.isShowing()) { //pass } else { progressDialog.dismiss(); } } @Override public void onPaymentError(String message) { // dismissDialog(); presenter.logEvent(new ErrorEvent(message).getEvent(), ravePayInitializer.getPublicKey()); Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show(); } @Override public void showToast(String message) { Toast.makeText(requireContext(), message+"", Toast.LENGTH_SHORT).show(); } @Override public void onPaymentSuccessful(String status, String flwRef, final String responseAsString) { Intent intent = new Intent(); intent.putExtra("response", responseAsString); if (getActivity() != null) { ((RavePayActivity) getActivity()).setRavePayResult(RavePayActivity.RESULT_SUCCESS, intent); getActivity().finish(); } } @Override public void onPaymentFailed(String message, final String responseAsJSONString) { Intent intent = new Intent(); intent.putExtra("response", responseAsJSONString); if (getActivity() != null) { ((RavePayActivity) getActivity()).setRavePayResult(RavePayActivity.RESULT_ERROR, intent); getActivity().finish(); } } @Override public void onTransferDetailsReceived(String amount, String accountNumber, String bankName, String beneficiaryName) { presenter.logEvent(new InstructionsDisplayedEvent("Bank Transfer").getEvent(), ravePayInitializer.getPublicKey()); showTransferDetails(amount, accountNumber, bankName, beneficiaryName); } private void showTransferDetails(String amount, String accountNumber, String bankName, String beneficiaryName) { amountTv.setText(amount); beneficiaryNameTv.setText(beneficiaryName); bankNameTv.setText(bankName); accountNumberTv.setText(accountNumber); transferInstructionTv.setText( String.format("%s %s", getString(R.string.bank_transfer_instructions_placeholder), beneficiaryName != null ? beneficiaryName : "this account") ); initiateChargeLayout.setVisibility(GONE); transferDetailsLayout.setVisibility(View.VISIBLE); } @Override public void onTransactionFeeFetched(String charge_amount, final Payload payload, String fee) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage("You will be charged a total of " + charge_amount + ravePayInitializer.getCurrency() + ". Do you want to continue?"); builder.setPositiveButton("YES", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); presenter.logEvent(new FeeDisplayResponseEvent(true).getEvent(), ravePayInitializer.getPublicKey()); presenter.payWithBankTransfer(payload, ravePayInitializer.getEncryptionKey()); } }).setNegativeButton("NO", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); presenter.logEvent(new FeeDisplayResponseEvent(false).getEvent(), ravePayInitializer.getPublicKey()); } }); builder.show(); } @Override public void onFetchFeeError(String s) { presenter.logEvent(new ErrorEvent(s).getEvent(), ravePayInitializer.getPublicKey()); showToast(s); } @Override public void onValidationSuccessful(HashMap<String, ViewObject> dataHashMap) { presenter.processTransaction(dataHashMap, ravePayInitializer); } @Override public void onAmountValidationFailed() { amountTil.setVisibility(View.VISIBLE); } @Override public void onResume() { super.onResume(); presenter.onAttachView(this); } @Override public void onDetach() { super.onDetach(); if (presenter != null) { presenter.onDetachView(); } } @Override public void onFocusChange(View view, boolean hasFocus) { int i = view.getId(); String fieldName = ""; if (i == R.id.rave_amountEt) { fieldName = "Amount"; } if (hasFocus) { presenter.logEvent(new StartTypingEvent(fieldName).getEvent(), ravePayInitializer.getPublicKey()); } } }
xiaoxiaoxin8/DesignPatternPro
src/main/java/com/proxy/staticproxy/pojo/GasProxy.java
package com.proxy.staticproxy.pojo; /** * @program: repertory * @description: 燃气充值代理服务 * @author: tangliang * @create: 2019-03-14 21:31 **/ public class GasProxy { GasCompany gasCompany; public GasProxy(GasCompany gasCompany){ this.gasCompany = gasCompany; } public void proxyRecharge(){ before(); gasCompany.recharge(); after(); } private void after(){ } private void before(){ System.out.println("这里是静态代理,请先缴纳手续费"); } }
dgumenyuk/Environment_generation
RQ3/Autonomous_robot/Player_pipeline_/run.py
''' Python script to run all the maps generated for robot and saved in the ".results" folder. ''' import json import re from RDP import rdp import os import time def modify(points, map_name): ''' Funtion to modify the "autonomous_agents", "events" and "stage" files to enter the new pooints and map name. ''' # modifing the points for robot and events with open("autonomous_agents.json", "r") as f: agents = json.load(f) with open("events.json", "r") as f: events = json.load(f) points_list = [] for point in points: x = point["x"] y = point["y"] points_list.append([x, y]) points = rdp(points_list, epsilon=0.5) #points = points_list routes = [] p = 0 while p < len(points): p_set = {} p_set["x"] = points[p][0] p_set["y"] = points[p][1] routes.append(p_set) p += 1 agents["agents"]["Autonomous1"]["waypoints"] = routes events["events"]["waypoint_arrival"]["agents"]["Autonomous1"] = routes with open("autonomous_agents.json", "w") as f: json.dump(agents, f, indent=4) with open("events.json", "w") as f: json.dump(events, f, indent=4) # modifying the map name with open("stage.world", "r") as f: file = f.read() file = re.sub(r"(?<=e_/)(.*?)(?=\")", map_name, file) with open("stage.world", "w") as f: f.write(file) if __name__ == "__main__": ''' Executes every map in "results" subdirectories and save the execution summary (failed (1) or success (0) to "fails.json" file) ''' base_folder = "./results" for directory in os.listdir(base_folder): res_folder = os.path.join(base_folder, directory) failure_record = {} fail_num = 0 start_time = time.time() for folder in os.listdir(res_folder): if "fails" not in folder: map_path = os.path.join(res_folder, folder) test_path = os.path.join(res_folder, folder, "scenarios.json") failure_record[str(folder)] = {} with open(test_path, "r") as f: all_waypoints = json.load(f) # print(all_waypoints) for file in sorted(os.listdir(map_path)): if "png" in file: print(os.path.splitext(file)[0]) map_name = os.path.splitext(file)[0] map_name_path = os.path.join(map_path, file) print(map_name_path) waypoints = all_waypoints[map_name] modify(waypoints, map_name_path) print(folder, map_name) os.system("./go.sh") with open("eventdetector.log", "r") as f: data = f.read() if ("loit" in data) or ("stal" in data): failure_record[str(folder)][map_name] = 1 fail_num += 1 elif "failed" in data: failure_record[str(folder)][map_name] = -1 else: failure_record[str(folder)][map_name] = 0 with open( os.path.join(map_path, "eventdetector_" + map_name + ".log"), "w", ) as f: f.write(data) end_time = time.time() failure_record["failures"] = fail_num failure_record["total_time"] = (end_time - start_time) / 60 with open(os.path.join(res_folder, "fails.json"), "w") as f: json.dump(failure_record, f, indent=4) print("Total time", (end_time - start_time) / 60)
OceanOPS/oceanops-api
src/main/java/org/oceanops/api/orm/auto/_NetworkSite.java
<gh_stars>1-10 package org.oceanops.api.orm.auto; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.apache.cayenne.BaseDataObject; import org.apache.cayenne.exp.property.EntityProperty; import org.apache.cayenne.exp.property.NumericProperty; import org.apache.cayenne.exp.property.PropertyFactory; import org.oceanops.api.orm.Network; import org.oceanops.api.orm.Site; /** * Class _NetworkSite was generated by Cayenne. * It is probably a good idea to avoid changing this class manually, * since it may be overwritten next time code is regenerated. * If you need to make any customizations, please use subclass. */ public abstract class _NetworkSite extends BaseDataObject { private static final long serialVersionUID = 1L; public static final String NETWORK_ID_PK_COLUMN = "NETWORK_ID"; public static final String SITE_ID_PK_COLUMN = "SITE_ID"; public static final NumericProperty<Integer> NETWORK_ID = PropertyFactory.createNumeric("networkId", Integer.class); public static final NumericProperty<Integer> SITE_ID = PropertyFactory.createNumeric("siteId", Integer.class); public static final EntityProperty<Network> NETWORK = PropertyFactory.createEntity("network", Network.class); public static final EntityProperty<Site> SITE = PropertyFactory.createEntity("site", Site.class); protected Integer networkId; protected Integer siteId; protected Object network; protected Object site; public void setNetworkId(Integer networkId) { beforePropertyWrite("networkId", this.networkId, networkId); this.networkId = networkId; } public Integer getNetworkId() { beforePropertyRead("networkId"); return this.networkId; } public void setSiteId(Integer siteId) { beforePropertyWrite("siteId", this.siteId, siteId); this.siteId = siteId; } public Integer getSiteId() { beforePropertyRead("siteId"); return this.siteId; } public void setNetwork(Network network) { setToOneTarget("network", network, true); } public Network getNetwork() { return (Network)readProperty("network"); } public void setSite(Site site) { setToOneTarget("site", site, true); } public Site getSite() { return (Site)readProperty("site"); } @Override public Object readPropertyDirectly(String propName) { if(propName == null) { throw new IllegalArgumentException(); } switch(propName) { case "networkId": return this.networkId; case "siteId": return this.siteId; case "network": return this.network; case "site": return this.site; default: return super.readPropertyDirectly(propName); } } @Override public void writePropertyDirectly(String propName, Object val) { if(propName == null) { throw new IllegalArgumentException(); } switch (propName) { case "networkId": this.networkId = (Integer)val; break; case "siteId": this.siteId = (Integer)val; break; case "network": this.network = val; break; case "site": this.site = val; break; default: super.writePropertyDirectly(propName, val); } } private void writeObject(ObjectOutputStream out) throws IOException { writeSerialized(out); } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { readSerialized(in); } @Override protected void writeState(ObjectOutputStream out) throws IOException { super.writeState(out); out.writeObject(this.networkId); out.writeObject(this.siteId); out.writeObject(this.network); out.writeObject(this.site); } @Override protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException { super.readState(in); this.networkId = (Integer)in.readObject(); this.siteId = (Integer)in.readObject(); this.network = in.readObject(); this.site = in.readObject(); } }
Novemser/LearnJava
src/main/java/Practice/P2.java
<filename>src/main/java/Practice/P2.java package Practice; import java.util.*; /** * * * Created by Novemser on 2016/9/29. */ public class P2 { public static void main(String... args) { P2 runner = new P2(); Scanner scanner = new Scanner(System.in); while (scanner.hasNextLine()) { String line = scanner.nextLine(); System.out.println(runner.doJob(line)); } } private String doJob(CharSequence input) { HashMap<Character, Integer> map = new HashMap<>(); for (int i = 0; i < input.length(); i++) { Character ch = input.charAt(i); if (map.containsKey(ch)) { map.put(ch, 1 + map.get(ch)); } else { map.put(ch, 1); } } List<Map.Entry<Character, Integer>> sorted = new ArrayList<>(map.entrySet()); Collections.sort(sorted, (o1, o2) -> o2.getValue().compareTo(o1.getValue())); StringBuilder builder = new StringBuilder(); for (Map.Entry item : sorted) { builder.append("\'"); builder.append(item.getKey()).append("\'").append(":"); builder.append(item.getValue()); builder.append(", "); } return builder.toString(); } }
inh3rit/SmartIM
smartqq/src/main/java/com/scienjus/smartqq/model/DiscussMessage.java
<reponame>inh3rit/SmartIM package com.scienjus.smartqq.model; /** * 讨论组消息. * * @author ScienJus * @author <a href="http://88250.b3log.org"><NAME></a> * @date 15/12/19. */ public class DiscussMessage extends QQMessage { private long discussId; public long getDiscussId() { return discussId; } public void setDiscussId(long discussId) { this.discussId = discussId; } }
insphereapplication/rhodes
platform/shared/sync/SyncProtocol_3.h
<filename>platform/shared/sync/SyncProtocol_3.h #pragma once #include "ISyncProtocol.h" #include "common/StringConverter.h" #include "common/RhoFilePath.h" namespace rho { namespace sync { struct CSyncProtocol_3 : public ISyncProtocol { String m_strContentType; CSyncProtocol_3() { m_strContentType = "application/json"; } const String& getContentType(){ return m_strContentType; } virtual int getVersion(){ return 3; } String getLoginUrl() { return RHOCONF().getPath("syncserver") + "clientlogin"; } String getLoginBody( const String& name, const String& password) { return "{\"login\":\"" + name + "\",\"password\":\"" + password + "\",\"remember_me\":1}"; } String getClientCreateUrl() { return RHOCONF().getPath("syncserver") + "clientcreate"; } String getClientRegisterUrl() { return RHOCONF().getPath("syncserver") + "clientregister"; } String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType ) { return "{\"client_id\":\"" + strClientID + "\",\"device_pin\":\"" + strPin + "\",\"device_port\":\"" + common::convertToStringA(nPort) + "\",\"device_type\":\"" + strType + "\"}"; } String getClientResetUrl(const String& strClientID) { return RHOCONF().getPath("syncserver") + "clientreset?client_id=" + strClientID; } String getClientChangesUrl() { String strUrl = RHOCONF().getPath("syncserver"); return strUrl.substr(0,strUrl.length()-1); } String getServerQueryUrl(const String& strAction ) { String strUrl = RHOCONF().getPath("syncserver"); if ( strAction.length() > 0 ) strUrl = common::CFilePath::join(strUrl, strAction); else strUrl = strUrl.substr(0,strUrl.length()-1); return strUrl; } String getServerQueryBody(const String& strSrcName, const String& strClientID, int nPageSize ) { String strQuery = "?client_id=" + strClientID + "&p_size=" + common::convertToStringA(nPageSize) + "&version=3"; if ( strSrcName.length() > 0 ) strQuery += "&source_name=" + strSrcName; return strQuery; } }; } }
islayy/Books-solutions
Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.13.py
# Write a program that asks the user to input a set of floating-point # values. When the user enters a value that is not a number, # give the user a second chance to enter the value. After two chances, # quit reading input. Add all correctly specified values and # print the sum when the user is done entering data. Use exception # handling to detect improper inputs. # IMPORTS # FUNCTIONS # main def main(): inputList = [] tries = 1 while tries < 3: try: inputN = int(input("Enter a number: ")) inputList.append(inputN) except ValueError: print("Not a number! Enter a number to continue") print("or enter a character to quit") tries += 1 print("Sum: %d" % sum(inputList)) # PROGRAM RUN if __name__ == "__main__": main()
contacttoakhil/LeetCode-1
leetcode/78. Subsets/s4.cpp
// OJ: https://leetcode.com/problems/subsets // Author: github.com/lzl124631x // Time: O(N^2 * 2^N) // Space: O(1) class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> ans(1); for (int i = 0; i < nums.size(); ++i) { int len = ans.size(); for (int j = 0; j < len; ++j) { ans.push_back(ans[j]); ans.back().push_back(nums[i]); } } return ans; } };