blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
edd606b88041b4a7671a7088261dc6b377c4a2c9
|
40a4ec003b3c71291af21d1325d55e88e7509a00
|
/core/src/main/java/io/atomix/core/iterator/impl/IterableService.java
|
8444dcf5793ea9dd941b670dd35969b94dbad6d6
|
[
"Apache-2.0"
] |
permissive
|
sosojustdo/atomix
|
54adfc3e7a9dd89e57aff662d165c6e83619b297
|
5571264faa02e4eb287a0d5416f11f028c70a9f8
|
refs/heads/master
| 2020-03-25T04:14:45.138818
| 2018-08-02T18:58:12
| 2018-08-02T23:43:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,407
|
java
|
/*
* Copyright 2018-present Open Networking Foundation
*
* 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.atomix.core.iterator.impl;
import io.atomix.primitive.operation.Command;
import io.atomix.primitive.operation.Query;
/**
* Base interface for iterable services.
*/
public interface IterableService<E> {
/**
* Returns an iterator.
*
* @return the iterator ID
*/
@Command
long iterate();
/**
* Returns the next batch of elements for the given iterator.
*
* @param iteratorId the iterator identifier
* @param position the iterator position
* @return the next batch of entries for the iterator or {@code null} if the iterator is complete
*/
@Query
IteratorBatch<E> next(long iteratorId, int position);
/**
* Closes an iterator.
*
* @param iteratorId the iterator identifier
*/
@Command
void close(long iteratorId);
}
|
[
"jordan.halterman@gmail.com"
] |
jordan.halterman@gmail.com
|
c5c78d3971080a6765f20fc3906637b0a1884d00
|
0bfee7ea62559718b4554bbc107696a202cd0bd6
|
/sm-core/src/main/java/com/salesmanager/core/business/order/model/orderproduct/OrderProductAttribute.java
|
c998ea213748e15ca414d3774cd7511b0fb8120f
|
[] |
no_license
|
shopizer/shopizer-dev
|
76ca72dc4523cf1e6d32c7dfbe75a967a0f41f50
|
f60c25a6f51726fe8a83f601b4da49a89fd0acfc
|
refs/heads/master
| 2020-12-24T16:50:38.394531
| 2013-07-03T07:43:05
| 2013-07-03T07:43:05
| 6,570,083
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,277
|
java
|
package com.salesmanager.core.business.order.model.orderproduct;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import com.salesmanager.core.business.catalog.product.model.attribute.ProductOption;
import com.salesmanager.core.business.catalog.product.model.attribute.ProductOptionValue;
import com.salesmanager.core.constants.SchemaConstant;
@Entity
@Table (name="ORDER_PRODUCT_ATTRIBUTE" , schema=SchemaConstant.SALESMANAGER_SCHEMA)
public class OrderProductAttribute implements Serializable {
private static final long serialVersionUID = 6037571119918073015L;
@Id
@Column (name="ORDER_PRODUCT_ATTRIBUTE_ID", nullable=false , unique=true )
@TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "ORDER_PRODUCT_ATTR_ID_NEXT_VAL")
@GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
private Long id;
@Column ( name= "OPTION_VALUES_PRICE" , nullable=false , precision=15 , scale=4 )
private BigDecimal optionValuePrice;
@Column ( name= "PRODUCT_ATTRIBUTE_IS_FREE" , nullable=false )
private boolean productAttributeIsFree;
@Column ( name= "PRODUCT_ATTRIBUTE_WEIGHT" , precision=15 , scale=4 )
private java.math.BigDecimal productAttributeWeight;
@ManyToOne
@JoinColumn(name = "ORDER_PRODUCT_ID", nullable = false)
private OrderProduct orderProduct;
@ManyToOne
@JoinColumn(name = "PRODUCT_OPTION_ID", nullable = false)
private ProductOption productOption;
@ManyToOne
@JoinColumn(name = "PRODUCT_OPTIONS_VALUE_ID", nullable = false)
private ProductOptionValue productOptionValue;
public OrderProductAttribute() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public BigDecimal getOptionValuePrice() {
return optionValuePrice;
}
public void setOptionValuePrice(BigDecimal optionValuePrice) {
this.optionValuePrice = optionValuePrice;
}
public boolean isProductAttributeIsFree() {
return productAttributeIsFree;
}
public void setProductAttributeIsFree(boolean productAttributeIsFree) {
this.productAttributeIsFree = productAttributeIsFree;
}
public java.math.BigDecimal getProductAttributeWeight() {
return productAttributeWeight;
}
public void setProductAttributeWeight(
java.math.BigDecimal productAttributeWeight) {
this.productAttributeWeight = productAttributeWeight;
}
public OrderProduct getOrderProduct() {
return orderProduct;
}
public void setOrderProduct(OrderProduct orderProduct) {
this.orderProduct = orderProduct;
}
public ProductOption getProductOption() {
return productOption;
}
public void setProductOption(ProductOption productOption) {
this.productOption = productOption;
}
public ProductOptionValue getProductOptionValue() {
return productOptionValue;
}
public void setProductOptionValue(ProductOptionValue productOptionValue) {
this.productOptionValue = productOptionValue;
}
}
|
[
"srbala@gmail.com"
] |
srbala@gmail.com
|
e8147ba551e8133d5a368e64337dbcee1fb86dbb
|
f45c2611ebecaa7458bf453deb04392f4f9d591f
|
/lib/C4J/src/net/sf/classifier4J/SimpleHTMLTokenizer.java
|
89a8e6cb6eddf9f11fa15338053a9fa44152535c
|
[] |
no_license
|
abdallah-95/Arabic-News-Reader-Server
|
92dc9db0323df0d5694b6c97febd1d04947c740d
|
ef986c40bc7ccff261e4c1c028ae423573ee4a74
|
refs/heads/master
| 2021-05-12T05:08:23.710984
| 2018-01-15T01:46:25
| 2018-01-15T01:46:25
| 117,183,791
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,033
|
java
|
/*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 Nick Lothian. 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.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* developers of Classifier4J (http://classifier4j.sf.net/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The name "Classifier4J" must not be used to endorse or promote
* products derived from this software without prior written
* permission. For written permission, please contact
* http://sourceforge.net/users/nicklothian/.
*
* 5. Products derived from this software may not be called
* "Classifier4J", nor may "Classifier4J" appear in their names
* without prior written permission. For written permission, please
* contact http://sourceforge.net/users/nicklothian/.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 THE APACHE SOFTWARE FOUNDATION 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.
* ====================================================================
*/
package net.sf.classifier4J;
import java.util.Stack;
/**
* <p>Simple HTML Tokenizer. Its goal is to tokenize words that would be displayed
* in a normal web browser.</p>
*
* <p>It does not handle meta tags, alt or text attributes, but it does remove
* CSS style definitions and javascript code.</p>
*
* <p>It handles entity references by replacing them with a space(!!). This can be
* overridden.</p>
*
*
* @since 18 Nov 2003
* @author Nick Lothian
*/
public class SimpleHTMLTokenizer extends DefaultTokenizer {
/**
* Constructor that using the BREAK_ON_WORD_BREAKS tokenizer config by default
*/
public SimpleHTMLTokenizer() {
super();
}
public SimpleHTMLTokenizer(int tokenizerConfig) {
super(tokenizerConfig);
}
public SimpleHTMLTokenizer(String regularExpression) {
super(regularExpression);
}
/**
* Replaces entity references with spaces
*
* @param contentsWithUnresolvedEntityReferences the contents with the entity references
* @return the contents with the entities replaces with spaces
*/
protected String resolveEntities(String contentsWithUnresolvedEntityReferences) {
if (contentsWithUnresolvedEntityReferences == null) {
throw new IllegalArgumentException("Cannot pass null");
}
return contentsWithUnresolvedEntityReferences.replaceAll("&.{2,8};", " ");
}
/**
* @see net.sf.classifier4J.ITokenizer#tokenize(java.lang.String)
*/
public String[] tokenize(String input) {
Stack stack = new Stack();
Stack tagStack = new Stack();
// iterate over the input string and parse find text that would be displayed
char[] chars = input.toCharArray();
StringBuffer result = new StringBuffer();
StringBuffer currentTagName = new StringBuffer();
for (int i = 0; i < chars.length; i++) {
switch (chars[i]) {
case '<' :
stack.push(Boolean.TRUE);
currentTagName = new StringBuffer();
break;
case '>' :
stack.pop();
if (currentTagName != null) {
String currentTag = currentTagName.toString();
if (currentTag.startsWith("/")) {
tagStack.pop();
} else {
tagStack.push(currentTag.toLowerCase());
}
}
break;
default :
if (stack.size() == 0) {
String currentTag = (String) tagStack.peek();
// ignore everything inside <script></script> or <style></style> tags
if (currentTag != null) {
if (!(currentTag.startsWith("script") || currentTag.startsWith("style"))) {
result.append(chars[i]);
}
} else {
result.append(chars[i]);
}
} else {
currentTagName.append(chars[i]);
}
break;
}
}
return super.tokenize(resolveEntities(result.toString()).trim());
}
}
|
[
"abdallah.x95@gmail.com"
] |
abdallah.x95@gmail.com
|
59acd64495ad740edd540c0a3d2ade7dba5561e2
|
9df1684efcd7618f1dd46780274caacc1908433a
|
/infer/tests/codetoanalyze/java/infer/Lists.java
|
dd1c0a3cb6df23a4b1c77e750ce0a34b10318ed0
|
[
"MIT",
"GPL-1.0-or-later"
] |
permissive
|
Abd-Elrazek/infer
|
a9f02c971c0c80e1d419bf51665e9570f6716174
|
be4c5aaa0fc7cb2e259f1ad683c04c8cfa11875c
|
refs/heads/master
| 2020-04-15T05:08:20.331302
| 2019-01-07T08:01:29
| 2019-01-07T08:04:32
| 164,410,091
| 1
| 0
|
MIT
| 2019-05-25T17:09:51
| 2019-01-07T09:38:22
|
OCaml
|
UTF-8
|
Java
| false
| false
| 1,445
|
java
|
/*
* Copyright (c) 2016-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package codetoanalyze.java.infer;
import java.util.List;
class Lists {
void emptyRemembersOk(List l) {
boolean empty = l.isEmpty();
Object o = null;
if (empty != l.isEmpty()) {
o.toString();
}
}
void removeInvalidatesNonEmptinessNPE(List l, int i) {
if (!l.isEmpty()) {
l.remove(i);
Object o = null;
if (l.isEmpty()) {
o.toString();
}
}
}
void clearCausesEmptinessNPE(List l, int i) {
if (!l.isEmpty()) {
l.clear();
Object o = null;
if (l.isEmpty()) {
o.toString();
}
}
}
// it would be too noisy to report here
void plainGetOk(List l, int i) {
l.get(i).toString();
}
Object getElement(List l) {
return l.isEmpty() ? null : l.get(0);
}
void getElementOk(List l) {
if (l.isEmpty()) {
return;
}
getElement(l).toString();
}
void getElementNPE(List l) {
if (!l.isEmpty()) {
return;
}
getElement(l).toString();
}
// don't fully understand why we don't get this one; model should allow it
void FN_addInvalidatesEmptinessNPE(List l) {
if (l.isEmpty()) {
l.add(0, new Object());
Object o = null;
if (!l.isEmpty()) {
o.toString();
}
}
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
c5f1557ff85f0a8d4fe6f80dd98f34ac612104c4
|
1f72b719b79f24504a6ab03ddf8e6b08c38f0ba2
|
/app/src/main/java/asywalul/minang/wisatasumbar/model/WeatherWrapper.java
|
c879176737da3a75b6650fbdf2250821a2eb4d7d
|
[] |
no_license
|
asywalulfikri/kamangtambuo
|
77893f7641cd1fa7fc964b674d67bfbfcd427347
|
287bfffdafe6d53b716faad55a1a042ca0330e77
|
refs/heads/master
| 2021-12-14T15:02:16.151949
| 2018-02-21T13:49:55
| 2018-02-21T13:49:55
| 58,432,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 201
|
java
|
package asywalul.minang.wisatasumbar.model;
import java.util.ArrayList;
public class WeatherWrapper {
public ArrayList<Weather> list;
public int totalRecords;
public boolean hasNext;
}
|
[
"asywalulfikri@yahoo.co.id"
] |
asywalulfikri@yahoo.co.id
|
5b663a8a02ba8d1c5bcd896ea91889bb6ccf52d4
|
ad95d104983b77b3472fc80ebc1c68b06af0453a
|
/springboot2/src/main/java/com/hellozjf/learn/springboot2/SpringbootApplication.java
|
648d98646bb47dae80d7e866e3953d7f153811b6
|
[] |
no_license
|
hellozjf/learn
|
21e3b108b77167c34b9b8c184d26f396db62f58b
|
4f74b5b57d7709c337ca8506d4be4ee5a5d347fd
|
refs/heads/master
| 2022-12-16T22:54:06.492009
| 2019-11-05T00:37:45
| 2019-11-05T00:37:45
| 186,748,735
| 0
| 0
| null | 2022-12-06T00:43:12
| 2019-05-15T04:24:37
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,456
|
java
|
package com.hellozjf.learn.springboot2;
import com.hellozjf.learn.springboot2.config.CustomConfig;
import com.hellozjf.learn.springboot2.service.DateTimeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
/**
* @author hellozjf
*/
@SpringBootApplication
@EnableJpaAuditing
@Slf4j
public class SpringbootApplication implements CommandLineRunner {
public static void main(String[] args) {
// springboot默认不开启图形界面,通过设置headless(false)开启图形界面
new SpringApplicationBuilder(SpringbootApplication.class)
.headless(false)
.run(args);
}
@Autowired
private CustomConfig customConfig;
@Autowired
private DateTimeService dateTimeService;
/**
* springboot启动完会回调的函数
* @param args
* @throws Exception
*/
@Override
public void run(String... args) throws Exception {
log.debug("hello = {}", customConfig.getHello());
log.debug("number = {}", customConfig.getNumber());
log.debug("test = {}", dateTimeService.getWeekStartTime(dateTimeService.getCurrentTime()));
}
}
|
[
"908686171@qq.com"
] |
908686171@qq.com
|
17ebc3f89a537e4478ec4f960880762cd82fab75
|
dc75eafadd4e87e035b933527424f3366d07a9c0
|
/src/main/java/net/malisis/core/client/gui/component/interaction/UIRadioButton.java
|
4ef102132b3baca2a11b5a96d0c34aa19c1e7e81
|
[
"MIT"
] |
permissive
|
AlmuraDev/MalisisCore
|
44ac0d365bcbecdcc2eb0ce128ddd431d0aae185
|
24f4f0c91abc9e39432847a9def32799627d3692
|
refs/heads/1.8.9
| 2021-07-18T21:45:17.811806
| 2016-05-01T13:08:53
| 2016-05-01T13:08:53
| 135,522,365
| 2
| 2
|
MIT
| 2020-04-03T19:25:39
| 2018-05-31T02:41:29
|
Java
|
UTF-8
|
Java
| false
| false
| 7,033
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Ordinastie
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package net.malisis.core.client.gui.component.interaction;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import net.malisis.core.client.gui.GuiRenderer;
import net.malisis.core.client.gui.MalisisGui;
import net.malisis.core.client.gui.component.IGuiText;
import net.malisis.core.client.gui.component.UIComponent;
import net.malisis.core.client.gui.element.SimpleGuiShape;
import net.malisis.core.client.gui.event.ComponentEvent.ValueChange;
import net.malisis.core.renderer.RenderParameters;
import net.malisis.core.renderer.font.FontRenderOptions;
import net.malisis.core.renderer.font.MalisisFont;
import net.malisis.core.renderer.icon.provider.GuiIconProvider;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.opengl.GL11;
/**
* @author Ordinastie
*
*/
public class UIRadioButton extends UIComponent<UIRadioButton> implements IGuiText<UIRadioButton>
{
private static HashMap<String, List<UIRadioButton>> radioButtons = new HashMap<>();
/** The {@link MalisisFont} to use for this {@link UIRadioButton}. */
protected MalisisFont font = MalisisFont.minecraftFont;
/** The {@link FontRenderOptions} to use for this {@link UIRadioButton}. */
protected FontRenderOptions fro = new FontRenderOptions();
private String name;
private String text;
private boolean selected;
private GuiIconProvider rbIconProvider;
public UIRadioButton(MalisisGui gui, String name, String text)
{
super(gui);
this.name = name;
setText(text);
fro.color = 0x444444;
shape = new SimpleGuiShape();
iconProvider = new GuiIconProvider(gui.getGuiTexture().getIcon(200, 54, 8, 8), null, gui.getGuiTexture().getIcon(200, 62, 8, 8));
rbIconProvider = new GuiIconProvider(gui.getGuiTexture().getIcon(214, 54, 6, 6), gui.getGuiTexture().getIcon(220, 54, 6, 6), gui
.getGuiTexture().getIcon(208, 54, 6, 6));
addRadioButton(this);
}
public UIRadioButton(MalisisGui gui, String name)
{
this(gui, name, null);
}
//#region Getters/Setters
@Override
public MalisisFont getFont()
{
return font;
}
@Override
public UIRadioButton setFont(MalisisFont font)
{
this.font = font != null ? font : MalisisFont.minecraftFont;
calculateSize();
return this;
}
@Override
public FontRenderOptions getFontRenderOptions()
{
return fro;
}
@Override
public UIRadioButton setFontRenderOptions(FontRenderOptions fro)
{
this.fro = fro;
calculateSize();
return this;
}
/**
* Sets the text for this {@link UIRadioButton}.
*
* @param text the new text
*/
public UIRadioButton setText(String text)
{
this.text = text;
calculateSize();
return this;
}
/**
* Gets the text for this {@link UICheckBox}.
*
* @return the text
*/
public String getText()
{
return text;
}
/**
* Checks if this {@link UIRadioButton} is selected.
*
* @return true, if is selected
*/
public boolean isSelected()
{
return selected;
}
/**
* Sets state of this {@link UIRadioButton} to selected.<br>
* If a radiobutton with the same name is currently selected, unselects it.<br>
* Does not fire {@link SelectEvent}.
*
* @return the UI radio button
*/
public UIRadioButton setSelected()
{
UIRadioButton rb = getSelected(name);
if (rb != null)
rb.selected = false;
selected = true;
return this;
}
//#end Getters/Setters
/**
* Calculates the size for this {@link UIRadioButton}.
*/
private void calculateSize()
{
int w = StringUtils.isEmpty(text) ? 0 : (int) font.getStringWidth(text, fro);
setSize(w + 11, 10);
}
@Override
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
{
shape.resetState();
shape.setSize(8, 8);
shape.translate(1, 0, 0);
renderer.drawShape(shape, rp);
renderer.next();
// draw the white shade over the slot
if (hovered)
{
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_ALPHA_TEST);
renderer.enableBlending();
rp = new RenderParameters();
rp.colorMultiplier.set(0xFFFFFF);
rp.alpha.set(80);
rp.useTexture.set(false);
shape.resetState();
shape.setSize(6, 6);
shape.setPosition(2, 1);
renderer.drawShape(shape, rp);
renderer.next();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
if (text != null)
renderer.drawText(font, text, 12, 0, 0, fro);
}
@Override
public void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
{
if (selected)
{
GL11.glEnable(GL11.GL_BLEND);
rp.reset();
shape.resetState();
shape.setSize(6, 6);
shape.setPosition(2, 1);
rp.iconProvider.set(rbIconProvider);
renderer.drawShape(shape, rp);
}
}
@Override
public boolean onClick(int x, int y)
{
if (fireEvent(new UIRadioButton.SelectEvent(this)))
setSelected();
return true;
}
public static void addRadioButton(UIRadioButton rb)
{
List<UIRadioButton> listRb = radioButtons.get(rb.name);
if (listRb == null)
listRb = new ArrayList<>();
listRb.add(rb);
radioButtons.put(rb.name, listRb);
}
public static UIRadioButton getSelected(String name)
{
List<UIRadioButton> listRb = radioButtons.get(name);
if (listRb == null)
return null;
for (UIRadioButton rb : listRb)
if (rb.selected)
return rb;
return null;
}
public static UIRadioButton getSelected(UIRadioButton rb)
{
return getSelected(rb.name);
}
/**
* Event fired when a {@link UIRadioButton} changes its selection.<br>
* When catching the event, the state is not applied to the {@code UIRadioButton} yet.<br>
* Cancelling the event will prevent the value to be changed.
*/
public static class SelectEvent extends ValueChange<UIRadioButton, UIRadioButton>
{
public SelectEvent(UIRadioButton component)
{
super(component, getSelected(component), component);
}
}
}
|
[
"ordinastie@hotmail.com"
] |
ordinastie@hotmail.com
|
0d2d2170ef14459f03e11a612844f3629c60b644
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/82/org/apache/commons/math/util/ResizableDoubleArray_discardFrontElements_409.java
|
454a3310ddd1bff266a0e466ac85b4ae913c97c6
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,208
|
java
|
org apach common math util
variabl length link doubl arrai doublearrai implement automat
handl expand contract intern storag arrai element
ad remov
intern storag arrai start capac determin
code initi capac initialcapac code properti set constructor
initi capac ad element
link add element addel append element end arrai
open entri end intern storag arrai
arrai expand size expand arrai depend
code expans mode expansionmod code code expans factor expansionfactor code properti
code expans mode expansionmod code determin size arrai
multipli code expans factor expansionfactor code multipl mode
expans addit addit mode code expans factor expansionfactor code
storag locat ad code expans mode expansionmod code
multipl mode code expans factor expansionfactor code
link add element roll addelementrol method add element end
intern storag arrai adjust usabl window
intern arrai forward posit effect make
element repeat activ method
activ link discard front element discardfrontel effect orphan
storag locat begin intern storag arrai
reclaim storag time method activ size
intern storag arrai compar number address
element code num element numel code properti differ
larg intern arrai contract size
code num element numel code determin intern
storag arrai larg depend code expans mode expansionmod code
code contract factor contractionfactor code properti code expans mode expansionmod code
code multipl mode code contract trigger
ratio storag arrai length code num element numel code exce
code contract factor contractionfactor code code expans mode expansionmod code
code addit mode code number excess storag locat
compar code contract factor contractionfactor code
avoid cycl expans contract
code expans factor expansionfactor code exce
code contract factor contractionfactor code constructor mutat
properti enforc requir throw illeg argument except illegalargumentexcept
violat
version revis date
resiz doubl arrai resizabledoublearrai doubl arrai doublearrai serializ
discard code code initi element arrai
arrai element invok
code discard front element discardfrontel code element
discard leav arrai throw illeg argument except illegalargumentexcept
exce num element numel
param number element discard front arrai
illeg argument except illegalargumentexcept greater num element numel
discard front element discardfrontel
discard extrem element discardextremeel
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
ce22444219ffead407a411d38c39c17ff03d0cd1
|
8824e13d43d2227a2ea0155633ef0da3eb75249d
|
/java-docs/2110/2017fall/ass1/send/Question1c.java
|
7a9bcda22e1df7bf3de99b4901023005407864b3
|
[] |
no_license
|
qianjinpeixun/Rest20171123
|
a441ee1725c9209e98bf0b626a23b19881edceda
|
dc87f54c61bee0a1c7cb1012918022252aa81dae
|
refs/heads/master
| 2021-08-30T11:28:15.092410
| 2017-12-17T18:15:22
| 2017-12-17T18:15:22
| 111,836,087
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,460
|
java
|
import java.util.ArrayList;
import java.util.Scanner;
/*
* This class is for the CSCI 2110 Computer Science III Data Structures and
* Algorithms ASSIGNMENT NO. 1 Question 1c
*
* This class reuses the question1a and question1b's algorithm to get the
* execution time according to different grid size.
*
*/
public class Question1c {
public static void main(String[] args) {
ArrayList<String> l = new ArrayList<>();
l.clear();
long startTime, endTime, executionTime;
// calculate the lattice paths with two directions
for (int i = 1; i < 13; i++) {
l.clear();
startTime = System.currentTimeMillis();
Question1a.findPath(i);
endTime = System.currentTimeMillis();
executionTime = endTime - startTime;
System.out.println("Question 1A executionTime for Lattice Paths (n=" + i + "): " + executionTime + " milliseconds");
}
System.out.println("\n\n");
// calculate the lattice paths with three directions
for (int i = 1; i < 8; i++) {
l.clear();
startTime = System.currentTimeMillis();
Question1b.findPath(i);
endTime = System.currentTimeMillis();
executionTime = endTime - startTime;
System.out.println("Queston 1B executionTime for Lattice Paths with diagonal (n=" + i + "): " + executionTime + " milliseconds");
}
}
}
|
[
"jin.qian.canada@gmail.com"
] |
jin.qian.canada@gmail.com
|
6a9629ac7ff3c6bb76cf8474ca52fc43fd67f60d
|
3822efd9117b0c107f59add27bd843439898d481
|
/src/main/java/com/gmail/mosoft521/jcpcmf/ch03Phaser/p037Phaser_test1_1/extthread/ThreadA.java
|
aed5bc27663afa5185046840d02ce3ab208db1fd
|
[] |
no_license
|
mosoft521/JCPCMF
|
27e06778982703ec272db8e4188a2ff38ee74682
|
5d3493a08049c0771961eb6619f3bf556658d567
|
refs/heads/master
| 2020-06-15T14:17:57.028105
| 2017-08-23T01:03:33
| 2017-08-23T01:03:33
| 75,286,460
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 433
|
java
|
package com.gmail.mosoft521.jcpcmf.ch03Phaser.p037Phaser_test1_1.extthread;
import com.gmail.mosoft521.jcpcmf.ch03Phaser.p037Phaser_test1_1.tools.PrintTools;
import java.util.concurrent.Phaser;
public class ThreadA extends Thread {
private Phaser phaser;
public ThreadA(Phaser phaser) {
super();
this.phaser = phaser;
}
public void run() {
PrintTools.methodA();
}
}
|
[
"mosoft521@gmail.com"
] |
mosoft521@gmail.com
|
13c4c69a0a3264ff2cb7aa99a8c185e82b0e3caf
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/8/org/apache/commons/math3/util/ResizableDoubleArray_getContractionCriteria_730.java
|
1ee8172bd288d6c841901cd004b6e5378163594c
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,688
|
java
|
org apach common math3 util
variabl length link doubl arrai doublearrai implement automat
handl expand contract intern storag arrai element
ad remov
import note usag assum thread safe
method code
qualifi drop major releas
intern storag arrai start capac determin
code initi capac initialcapac properti set constructor
initi capac ad element
link add element addel append element end arrai
open entri end intern storag arrai
arrai expand size expand arrai depend
code expans mode expansionmod code expans factor expansionfactor properti
code expans mode expansionmod determin size arrai
multipli code expans factor expansionfactor
link expans mode expansionmod multipl expans addit
link expans mode expansionmod addit code expans factor expansionfactor storag
locat ad
code expans mode expansionmod code multipl
code expans factor expansionfactor
link add element roll addelementrol method add element end
intern storag arrai adjust usabl window
intern arrai forward posit effect make
element repeat activ method
activ link discard front element discardfrontel effect orphan
storag locat begin intern storag arrai
reclaim storag time method activ size
intern storag arrai compar number address
element code num element numel properti differ
larg intern arrai contract size
code num element numel determin intern
storag arrai larg depend code expans mode expansionmod
code contract factor contractionfactor properti code expans mode expansionmod
code multipl contract trigger
ratio storag arrai length code num element numel exce
code contract factor contractionfactor code expans mode expansionmod
code addit number excess storag locat
compar code contract factor contractionfactor
avoid cycl expans contract
code expans factor expansionfactor exce code contract factor contractionfactor
constructor mutat properti enforc
requir throw code math illeg argument except mathillegalargumentexcept
violat
version
resiz doubl arrai resizabledoublearrai doubl arrai doublearrai serializ
contract criteria defin intern arrai contract
store number element element arrai
code expans mode expansionmod code code multipl mode code
contract trigger ratio storag arrai length
code num element numel code exce code contract factor contractionfactor code
code expans mode expansionmod code code addit mode code
number excess storag locat compar
code contract factor contractionfactor code
contract criteria reclaim memori
deprec link contract criterion getcontractioncriterion
deprec
contract criteria getcontractioncriteria
contract criterion getcontractioncriterion
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
926925faa41bbc3dbd9338212b0471f8b7c92d01
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/aj/ab/src/main/java/org.wp.ab/util/DateTimeUtils.java
|
6acce9fe86ad62d963f0a3654275b9531ed7b9d9
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 5,540
|
java
|
package org.wp.ab.util;
import android.text.format.DateUtils;
import org.wp.ab.R;
import org.wp.ab.WordPress;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class DateTimeUtils {
private DateTimeUtils() {
throw new AssertionError();
}
/*
* see http://drdobbs.com/java/184405382
*/
private static final ThreadLocal<DateFormat> ISO8601Format = new ThreadLocal<DateFormat>() {
@Override
protected DateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
}
};
/*
* converts a date to a relative time span ("8h", "3d", etc.) - similar to
* DateUtils.getRelativeTimeSpanString but returns shorter result
*/
public static String javaDateToTimeSpan(final Date date) {
if (date == null)
return "";
long passedTime = date.getTime();
long currentTime = System.currentTimeMillis();
// return "now" if less than a minute has elapsed
long secondsSince = (currentTime - passedTime) / 1000;
if (secondsSince < 60)
return WordPress.getContext().getString(R.string.reader_timespan_now);
// less than an hour (ex: 12m)
long minutesSince = secondsSince / 60;
if (minutesSince < 60)
return Long.toString(minutesSince) + "m";
// less than a day (ex: 17h)
long hoursSince = minutesSince / 60;
if (hoursSince < 24)
return Long.toString(hoursSince) + "h";
// less than a week (ex: 5d)
long daysSince = hoursSince / 24;
if (daysSince < 7)
return Long.toString(daysSince) + "d";
// less than a year old, so return day/month without year (ex: Jan 30)
if (daysSince < 365)
return DateUtils.formatDateTime(WordPress.getContext(), passedTime, DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL);
// date is older, so include year (ex: Jan 30, 2013)
return DateUtils.formatDateTime(WordPress.getContext(), passedTime, DateUtils.FORMAT_ABBREV_ALL);
}
/*
* converts an ISO8601 date to a Java date
*/
public static Date iso8601ToJavaDate(final String strDate) {
try {
DateFormat formatter = ISO8601Format.get();
return formatter.parse(strDate);
} catch (ParseException e) {
return null;
}
}
/*
* converts a Java date to ISO8601
*/
public static String javaDateToIso8601(Date date) {
if (date==null)
return "";
DateFormat formatter = ISO8601Format.get();
return formatter.format(date);
}
/*
* returns the current UTC date
*/
public static Date nowUTC() {
Date dateTimeNow = new Date();
return localDateToUTC(dateTimeNow);
}
public static Date localDateToUTC(Date dtLocal) {
if (dtLocal==null)
return null;
TimeZone tz = TimeZone.getDefault();
int currentOffsetFromUTC = tz.getRawOffset() + (tz.inDaylightTime(dtLocal) ? tz.getDSTSavings() : 0);
return new Date(dtLocal.getTime() - currentOffsetFromUTC);
}
/*
* routines to return a diff between two dates - always return a positive number
*/
public static int daysBetween(Date dt1, Date dt2) {
long hrDiff = hoursBetween(dt1, dt2);
if (hrDiff == 0) {
return 0;
}
return (int) (hrDiff / 24);
}
public static int hoursBetween(Date dt1, Date dt2) {
long minDiff = minutesBetween(dt1, dt2);
if (minDiff == 0) {
return 0;
}
return (int) (minDiff / 60);
}
public static int minutesBetween(Date dt1, Date dt2) {
long msDiff = millisecondsBetween(dt1, dt2);
if (msDiff==0)
return 0;
return (int)(msDiff / 60000);
}
public static int secondsBetween(Date dt1, Date dt2) {
long msDiff = millisecondsBetween(dt1, dt2);
if (msDiff == 0) {
return 0;
}
return (int)(msDiff / 1000);
}
public static long millisecondsBetween(Date dt1, Date dt2) {
if (dt1==null || dt2==null)
return 0;
return Math.abs(dt1.getTime() - dt2.getTime());
}
public static long iso8601ToTimestamp(final String strDate) {
Date date = iso8601ToJavaDate(strDate);
if (date==null)
return 0;
return (date.getTime() / 1000);
}
public static boolean isSameYear(Date dt1, Date dt2) {
if (dt1 == null || dt2 == null) {
return false;
}
return dt1.getYear() == dt2.getYear();
}
public static boolean isSameMonthAndYear(Date dt1, Date dt2) {
if (dt1 == null || dt2 == null) {
return false;
}
return dt1.getYear() == dt2.getYear()
&& dt1.getMonth() == dt2.getMonth();
}
/*
* routines involving Unix timestamps (GMT assumed)
*/
public static Date timestampToDate(long timeStamp) {
return new java.util.Date(timeStamp*1000);
}
public static String timestampToIso8601Str(long timestamp) {
return javaDateToIso8601(timestampToDate(timestamp));
}
public static String timestampToTimeSpan(long timeStamp) {
Date dtGmt = timestampToDate(timeStamp);
return javaDateToTimeSpan(dtGmt);
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e51f3d4e92d11600e387181ed9c6244338d29859
|
fa51687f6aa32d57a9f5f4efc6dcfda2806f244d
|
/jdk8-src/src/main/java/com/sun/org/apache/xerces/internal/dom/events/EventImpl.java
|
48589fc9600c46bd912f57e1d3f8d50bf4b0e5a9
|
[] |
no_license
|
yida-lxw/jdk8
|
44bad6ccd2d81099bea11433c8f2a0fc2e589eaa
|
9f69e5f33eb5ab32e385301b210db1e49e919aac
|
refs/heads/master
| 2022-12-29T23:56:32.001512
| 2020-04-27T04:14:10
| 2020-04-27T04:14:10
| 258,988,898
| 0
| 1
| null | 2020-10-13T21:32:05
| 2020-04-26T09:21:22
|
Java
|
UTF-8
|
Java
| false
| false
| 4,366
|
java
|
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2002,2004 The Apache Software Foundation.
*
* 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 com.sun.org.apache.xerces.internal.dom.events;
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventTarget;
/**
* EventImpl is an implementation of the basic "generic" DOM Level 2 Event
* object. It may be subclassed by more specialized event sets.
* Note that in our implementation, events are re-dispatchable (dispatch
* clears the stopPropagation and preventDefault flags before it starts);
* I believe that is the DOM's intent but I don't see an explicit statement
* to this effect.
*
* @xerces.internal
*/
public class EventImpl implements Event {
public String type = null;
public EventTarget target;
public EventTarget currentTarget;
public short eventPhase;
public boolean initialized = false, bubbles = true, cancelable = false;
public boolean stopPropagation = false, preventDefault = false;
protected long timeStamp = System.currentTimeMillis();
/**
* The DOM doesn't deal with constructors, so instead we have an
* initializer call to set most of the read-only fields. The
* others are set, and reset, by the event subsystem during dispatch.
* <p>
* Note that init() -- and the subclass-specific initWhatever() calls --
* may be reinvoked. At least one initialization is required; repeated
* initializations overwrite the event with new values of their
* parameters.
*/
public void initEvent(String eventTypeArg, boolean canBubbleArg,
boolean cancelableArg) {
type = eventTypeArg;
bubbles = canBubbleArg;
cancelable = cancelableArg;
initialized = true;
}
/**
* @return true iff this Event is of a class and type which supports
* bubbling. In the generic case, this is True.
*/
public boolean getBubbles() {
return bubbles;
}
/**
* @return true iff this Event is of a class and type which (a) has a
* Default Behavior in this DOM, and (b)allows cancellation (blocking)
* of that behavior. In the generic case, this is False.
*/
public boolean getCancelable() {
return cancelable;
}
/**
* @return the Node (EventTarget) whose EventListeners are currently
* being processed. During capture and bubble phases, this may not be
* the target node.
*/
public EventTarget getCurrentTarget() {
return currentTarget;
}
/**
* @return the current processing phase for this event --
* CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE. (There may be
* an internal DEFAULT_PHASE as well, but the users won't see it.)
*/
public short getEventPhase() {
return eventPhase;
}
/**
* @return the EventTarget (Node) to which the event was originally
* dispatched.
*/
public EventTarget getTarget() {
return target;
}
/**
* @return event name as a string
*/
public String getType() {
return type;
}
public long getTimeStamp() {
return timeStamp;
}
/**
* Causes exit from in-progress event dispatch before the next
* currentTarget is selected. Replaces the preventBubble() and
* preventCapture() methods which were present in early drafts;
* they may be reintroduced in future levels of the DOM.
*/
public void stopPropagation() {
stopPropagation = true;
}
/**
* Prevents any default processing built into the target node from
* occurring.
*/
public void preventDefault() {
preventDefault = true;
}
}
|
[
"yida@caibeike.com"
] |
yida@caibeike.com
|
66a74d430432acafb68b2e903a06817060bde109
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.27.0/sources/kotlin/reflect/jvm/internal/structure/h.java
|
4f4f1ced917b70ac76253d8e159c42f761052059
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
package kotlin.reflect.jvm.internal.structure;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.i;
import kotlin.reflect.jvm.internal.impl.load.java.structure.e;
import kotlin.reflect.jvm.internal.impl.name.f;
import kotlin.reflect.jvm.internal.structure.d.a;
@i(bne = {1, 1, 15}, bnf = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0003\n\u0002\u0010 \n\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\u001b\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004\u0012\n\u0010\u0005\u001a\u0006\u0012\u0002\b\u00030\u0006¢\u0006\u0002\u0010\u0007J\u000e\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00010\nH\u0016R\u0014\u0010\u0005\u001a\u0006\u0012\u0002\b\u00030\u0006X\u0004¢\u0006\u0004\n\u0002\u0010\b¨\u0006\u000b"}, bng = {"Lkotlin/reflect/jvm/internal/structure/ReflectJavaArrayAnnotationArgument;", "Lkotlin/reflect/jvm/internal/structure/ReflectJavaAnnotationArgument;", "Lkotlin/reflect/jvm/internal/impl/load/java/structure/JavaArrayAnnotationArgument;", "name", "Lkotlin/reflect/jvm/internal/impl/name/Name;", "values", "", "(Lorg/jetbrains/kotlin/name/Name;[Ljava/lang/Object;)V", "[Ljava/lang/Object;", "getElements", "", "descriptors.runtime"})
/* compiled from: ReflectJavaAnnotationArguments.kt */
public final class h extends d implements e {
private final Object[] values;
public h(f fVar, Object[] objArr) {
kotlin.jvm.internal.i.f(objArr, "values");
super(fVar);
this.values = objArr;
}
public List<d> bxj() {
Object[] objArr = this.values;
Collection arrayList = new ArrayList(objArr.length);
for (Object obj : objArr) {
a aVar = d.fAF;
if (obj == null) {
kotlin.jvm.internal.i.bnJ();
}
arrayList.add(aVar.a(obj, null));
}
return (List) arrayList;
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
94485c7e8549d400a99f259a7a37703d30a215fd
|
0acabd81d062e9b34ab172249ce3180bf55b526a
|
/src/main/java/com/huaxu/core/middleware/hystrix/GreetController.java
|
07ad15818b0ab2f6bab7fe58052b7275e9a60554
|
[] |
no_license
|
BlHole/core
|
445f87c12a4c47f42aa0548b2a24342109d5b713
|
97441613c9c9e39738af22c7188c6b01e9044c17
|
refs/heads/master
| 2022-05-30T12:39:44.207637
| 2020-04-01T10:21:10
| 2020-04-01T10:21:10
| 229,370,125
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,558
|
java
|
package com.huaxu.core.middleware.hystrix;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/greet")
public class GreetController {
@HystrixCommand(fallbackMethod = "onError",
commandProperties = {
@HystrixProperty(name = "execution.isolation.strategy", value = "THREAD"),
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000"),
@HystrixProperty(name = "circuitBreaker.enabled", value = "true"),
// 至少有3个请求才进行熔断错误比率计算
/**
* 设置在一个滚动窗口中,打开断路器的最少请求数。
比如:如果值是20,在一个窗口内(比如10秒),收到19个请求,即使这19个请求都失败了,断路器也不会打开。
*/
@HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "2"),
// 熔断器工作时间,超过这个时间,先放一个请求进去,成功的话就关闭熔断,失败就再等一段时间
@HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "5000")},
threadPoolProperties = {
@HystrixProperty(name = "coreSize", value = "5"),
// @HystrixProperty(name = "maximumSize", value = "5"),
@HystrixProperty(name = "maxQueueSize", value = "10")
})
@RequestMapping("/sayHello")
public String sayHello(String name) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "Hello, " + name;
}
@HystrixCommand
@RequestMapping("/sayHi")
public String sayHi(String name) {
if (StringUtils.isEmpty(name)) {
throw new RuntimeException("name不能为空");
}
return "Good morning, " + name;
}
/**
* 如果fallback方法的参数和原方法参数个数不一致,则会出现FallbackDefinitionException: fallback method wasn't found
*/
public String onError(String name) {
return "Error!!!" + name;
}
}
|
[
"tshy0425@hotmail.com"
] |
tshy0425@hotmail.com
|
f678043afe53b22f7a82b49d1bd3cd5dd99b8ca7
|
293af93207a07cea4c437478322f032d04ef5f5d
|
/app/src/main/java/com/eshop/mvp/http/entity/home/BrandBean.java
|
af3acce9f46e3b2251b5440627bd8122790f6424
|
[] |
no_license
|
thinking123/yiqi-android-pro
|
1918f861678ea64a90fab63d0532a7df85c0af09
|
7c67c1fe1c28699565abd75ef0918810d8587c65
|
refs/heads/master
| 2020-06-24T11:47:17.849026
| 2019-04-24T02:25:19
| 2019-04-24T02:25:19
| 198,954,139
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 299
|
java
|
package com.eshop.mvp.http.entity.home;
/**
* @Author shijun
* @Data 2019/1/20
* @Package com.eshop.mvp.http.entity.category
**/
public class BrandBean {
public String brandImg;
public String brandName;
public String brandZm;
public int id;
public int appClassId;
}
|
[
"1294873004@qq.com"
] |
1294873004@qq.com
|
ce02ce0ebb8545cac933c8705bbc593e69f77653
|
a80b14012b0b654f44895e3d454cccf23f695bdb
|
/shiro/example/shiro-example-chapter23-app2/src/main/java/com/github/zhangkaitao/shiro/chapter23/app2/web/controller/HelloController.java
|
1cf13736b347916efcad9ac81cde117b1f289979
|
[] |
no_license
|
azhi365/lime-java
|
7a9240cb5ce88aefeb57baeb1283872b549bcab9
|
11b326972d0a0b6bb010a4328f374a3249ee4520
|
refs/heads/master
| 2023-03-31T19:08:28.736443
| 2018-03-02T14:40:29
| 2018-03-02T14:40:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,325
|
java
|
package org.walnuts.study.shiro.chapter23.app2.web.controller;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* <p>User: Zhang Kaitao
* <p>Date: 14-3-13
* <p>Version: 1.0
*/
@Controller
public class HelloController {
@RequestMapping("/hello")
public String hello() {
return "success";
}
@RequestMapping(value = "/attr", method = RequestMethod.POST)
public String setAttr(
@RequestParam("key") String key, @RequestParam("value") String value) {
SecurityUtils.getSubject().getSession().setAttribute(key, value);
return "success";
}
@RequestMapping(value = "/attr", method = RequestMethod.GET)
public String getAttr(
@RequestParam("key") String key, Model model) {
model.addAttribute("value", SecurityUtils.getSubject().getSession().getAttribute(key));
return "success";
}
@RequestMapping("/role2")
@RequiresRoles("role2")
public String role2() {
return "success";
}
}
|
[
"yangzhi365@163.com"
] |
yangzhi365@163.com
|
fc66b108e38c2351262bddd24b8f6dfedede6a69
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/app/zenly/locator/core/widget/C3269g.java
|
dd6491bb24cdfd23b2d71163e3201e9bf46c5708
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,615
|
java
|
package app.zenly.locator.core.widget;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView.C1069g;
import androidx.recyclerview.widget.RecyclerView.C1071i;
import androidx.recyclerview.widget.RecyclerView.C1085v;
import app.zenly.locator.R;
import app.zenly.locator.core.widget.SingleAdapter.Delegate;
/* renamed from: app.zenly.locator.core.widget.g */
public class C3269g extends SingleAdapter<C3272c> {
/* renamed from: i */
private C1069g f9120i;
/* renamed from: j */
private final C1071i f9121j = new C3271b();
/* renamed from: app.zenly.locator.core.widget.g$a */
static class C3270a implements Delegate<C3272c> {
/* renamed from: a */
final /* synthetic */ int f9122a;
C3270a(int i) {
this.f9122a = i;
}
/* renamed from: a */
public void bindViewHolder(C3272c cVar) {
cVar.f9124a.setText(this.f9122a);
}
public C3272c createViewHolder(ViewGroup viewGroup) {
return new C3272c(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.list_item_section, viewGroup, false));
}
}
/* renamed from: app.zenly.locator.core.widget.g$b */
class C3271b extends C1071i {
C3271b() {
}
/* renamed from: a */
public void mo5419a() {
C3269g.this.m10377a();
}
/* renamed from: b */
public void mo5423b(int i, int i2) {
C3269g.this.m10377a();
}
/* renamed from: c */
public void mo5424c(int i, int i2) {
C3269g.this.m10377a();
}
}
/* renamed from: app.zenly.locator.core.widget.g$c */
static class C3272c extends C1085v {
/* renamed from: a */
final TextView f9124a;
C3272c(View view) {
super(view);
this.f9124a = (TextView) view.findViewById(R.id.title);
}
}
private C3269g(Delegate<C3272c> delegate, C1069g gVar) {
super(delegate);
if (gVar != null) {
this.f9120i = gVar;
gVar.registerAdapterDataObserver(this.f9121j);
}
m10377a();
}
/* renamed from: a */
public static C3269g m10376a(int i, C1069g gVar) {
return new C3269g(new C3270a(i), gVar);
}
/* access modifiers changed from: private */
/* renamed from: a */
public void m10377a() {
C1069g gVar = this.f9120i;
mo9717a(gVar != null && gVar.getItemCount() > 0);
}
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
f506621c0f578c130eb9ef2fef2372026c888151
|
504af7ab9ab44c4da89063070260f28aeaa50d22
|
/src/main/java/com/example/cloudwrite/service/KeyResultService.java
|
33dcab3844ecdc4d553c75c275672511e12943f7
|
[] |
no_license
|
jfspps/CloudWrite
|
bb2f491400e18c4d59a0ebde1c1a8105e18bc11c
|
ece561d27c0724c0721404f547fb2c52f10524bb
|
refs/heads/main
| 2023-04-03T14:34:12.366415
| 2021-04-22T21:07:28
| 2021-04-22T21:07:28
| 351,545,727
| 1
| 0
| null | 2021-04-07T15:54:43
| 2021-03-25T19:01:46
|
Java
|
UTF-8
|
Java
| false
| false
| 163
|
java
|
package com.example.cloudwrite.service;
import com.example.cloudwrite.model.KeyResult;
public interface KeyResultService extends BaseService<KeyResult, Long>{
}
|
[
"jfsapps@gmail.com"
] |
jfsapps@gmail.com
|
d4d7bf9d798d8118860470e9fb17fa45d3d0e187
|
bc1c0a13a42e5ed91368acaa439c9a617389cbf6
|
/src/main/java/com/example/bddspring1584290293/DemoApplication.java
|
2321ab10dcc2b4a76a3327873ced895216329d88
|
[] |
no_license
|
cb-kubecd/bdd-spring-1584290293
|
35a7f4b03347e9c0b620e553f7af9f3f803146b2
|
e773eb7b3b126d8b998f269ef0855d622f42a15a
|
refs/heads/master
| 2021-03-24T02:29:43.428375
| 2020-03-15T16:38:42
| 2020-03-15T16:38:42
| 247,507,225
| 0
| 0
| null | 2020-03-15T16:49:12
| 2020-03-15T16:38:45
|
Makefile
|
UTF-8
|
Java
| false
| false
| 320
|
java
|
package com.example.bddspring1584290293;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
|
[
"cjxd-bot@cloudbees.com"
] |
cjxd-bot@cloudbees.com
|
d632fae2c5d8798c17b324e2bee5a8625160f6b6
|
18a0ec2e1d773787b26cd3f7005626b82ce22307
|
/wala/joana.wala.flowless/test/ParseStringTest.java
|
a135ecc9ced95d93d1d477fbef74611ca6a4bec6
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
joana-team/joana
|
97eac211aa4e22f63dd0a638601bae1bb3ce3a91
|
d49d82b5892f9331d37432d02d090f28feab56ea
|
refs/heads/master
| 2022-01-20T03:44:17.606135
| 2021-12-13T14:19:22
| 2021-12-13T14:19:22
| 6,942,297
| 69
| 29
| null | 2021-08-23T11:55:28
| 2012-11-30T16:47:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,124
|
java
|
/**
* This file is part of the Joana IFC project. It is developed at the
* Programming Paradigms Group of the Karlsruhe Institute of Technology.
*
* For further details on licensing please read the information at
* http://joana.ipd.kit.edu or contact the authors.
*/
import org.antlr.runtime.ANTLRStringStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import edu.kit.joana.wala.flowless.spec.FlowLessLexer;
import edu.kit.joana.wala.flowless.spec.FlowLessParser;
import edu.kit.joana.wala.flowless.spec.ast.IFCStmt;
public class ParseStringTest {
public static void main(String[] argv) throws RecognitionException {
final IFCStmt stmt = runParserOnText("!{b,b} & !{d,a} & !{a,a} => a.f2.f3 -!> \result");
System.out.println(stmt.toString());
}
private static IFCStmt runParserOnText(String inputTxt) throws RecognitionException {
ANTLRStringStream sstream = new ANTLRStringStream(inputTxt);
FlowLessLexer lexer = new FlowLessLexer(sstream);
FlowLessParser parser = new FlowLessParser(new CommonTokenStream(lexer));
return parser.ifc_stmt();
}
}
|
[
"juergen.graf@gmail.com"
] |
juergen.graf@gmail.com
|
e1a9e6163714aa8dd8c4eb337a3ef2b5548bf936
|
f14f7698769ec34cd07f3ed125cbb19b0baa7256
|
/src/main/java/com/robertx22/age_of_exile/database/data/stats/types/reduced_req/FlatIncreasedReq.java
|
641f5a8fbbde8c9a40dc0c4345255c6180f3fa80
|
[] |
no_license
|
K-YOUTH/Age-of-Exile
|
93cc2b6fdb66e6fff380bd25b7d70de7c7543a71
|
f826c49d9636a45f4df9483a321cc931f8fcf450
|
refs/heads/master
| 2022-12-09T15:25:40.931776
| 2020-09-05T12:05:16
| 2020-09-05T12:05:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,663
|
java
|
package com.robertx22.age_of_exile.database.data.stats.types.reduced_req;
import com.robertx22.age_of_exile.database.data.stats.Stat;
import com.robertx22.age_of_exile.database.data.stats.StatScaling;
import com.robertx22.age_of_exile.database.data.stats.name_regex.StatNameRegex;
import com.robertx22.age_of_exile.database.data.stats.types.core_stats.Dexterity;
import com.robertx22.age_of_exile.database.data.stats.types.core_stats.base.BaseCoreStat;
import com.robertx22.age_of_exile.saveclasses.ExactStatData;
import com.robertx22.age_of_exile.uncommon.enumclasses.Elements;
public class FlatIncreasedReq extends Stat {
BaseCoreStat statReq;
public FlatIncreasedReq(BaseCoreStat statReq) {
this.statReq = statReq;
}
@Override
public StatNameRegex getStatNameRegex() {
return StatNameRegex.BASIC;
}
@Override
public StatScaling getScaling() {
return Dexterity.INSTANCE.getScaling();
}
public float getModifiedRequirement(Stat stat, float req, ExactStatData data) {
if (stat == statReq) {
return req + data.getAverageValue();
}
return req;
}
@Override
public boolean IsPercent() {
return false;
}
@Override
public Elements getElement() {
return Elements.Physical;
}
@Override
public String locDescForLangFile() {
return "Alters stat requirements of this item.";
}
@Override
public String locNameForLangFile() {
return statReq.locNameForLangFile() + " Requirement";
}
@Override
public String GUID() {
return statReq.GUID() + "_flat_stat_req";
}
}
|
[
"treborx555@gmail.com"
] |
treborx555@gmail.com
|
e41c3669db6c227d357d1ea8d5d556712dcc026b
|
a840a5e110b71b728da5801f1f3e591f6128f30e
|
/src/main/java/com/google/security/zynamics/binnavi/debug/connection/interfaces/ClientReader.java
|
d7ab1276626368ff33c8ac33ab66b15b19f8c420
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
tpltnt/binnavi
|
0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4
|
598c361d618b2ca964d8eb319a686846ecc43314
|
refs/heads/master
| 2022-10-20T19:38:30.080808
| 2022-07-20T13:01:37
| 2022-07-20T13:01:37
| 107,143,332
| 0
| 0
|
Apache-2.0
| 2023-08-20T11:22:53
| 2017-10-16T15:02:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,729
|
java
|
/*
Copyright 2011-2016 Google Inc. 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.
*/
package com.google.security.zynamics.binnavi.debug.connection.interfaces;
import java.io.IOException;
/**
* Interface that must be implemented by all classes that want to read from the debug client.
*/
public interface ClientReader {
/**
* Returns the number of bytes that can be read from this input stream without blocking.
*
* @return The number of bytes that can be read from this input stream without blocking.
*
* @throws IOException If an I/O error occurs.
*/
int available() throws IOException;
/**
* Reads a single byte from the debug client.
*
* @return The read byte.
*
* @throws IOException If an I/O error occurs.
*/
int read() throws IOException;
/**
* Reads a number of bytes from the debug client.
*
* @param data Destination buffer.
* @param offset Offset at which to start storing bytes.
* @param length Maximum number of bytes to read.
*
* @return The number of bytes read, or -1 if the end of the stream has been reached.
*
* @throws IOException If an I/O error occurs.
*/
int read(byte[] data, int offset, int length) throws IOException;
}
|
[
"cblichmann@google.com"
] |
cblichmann@google.com
|
252cc8147710042f0d36c563ccd175793cfba67b
|
0ac81427c71066c3a01c1bcc1725e90d2d2e9869
|
/src/com/osfac/dmt/workbench/ui/zoom/ZoomPreviousPlugIn.java
|
f9ebe9c99ffd1490642cba418c6e87ee720dd14f
|
[] |
no_license
|
bboseko/DMTDesktop
|
ffd42e20a46ee55b01380a7c6a3b21ba3cde6171
|
bd2ca1b9652968468b87beec8c713bf790c6ac37
|
refs/heads/master
| 2021-01-25T12:08:34.910462
| 2015-06-25T10:27:30
| 2015-06-25T10:27:30
| 15,994,871
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,309
|
java
|
package com.osfac.dmt.workbench.ui.zoom;
import com.vividsolutions.jts.util.Assert;
import com.osfac.dmt.I18N;
import com.osfac.dmt.workbench.WorkbenchContext;
import com.osfac.dmt.workbench.plugin.AbstractPlugIn;
import com.osfac.dmt.workbench.plugin.EnableCheck;
import com.osfac.dmt.workbench.plugin.EnableCheckFactory;
import com.osfac.dmt.workbench.plugin.MultiEnableCheck;
import com.osfac.dmt.workbench.plugin.PlugInContext;
import com.osfac.dmt.workbench.ui.LayerViewPanel;
import com.osfac.dmt.workbench.ui.Viewport;
import com.osfac.dmt.workbench.ui.images.IconLoader;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
public class ZoomPreviousPlugIn extends AbstractPlugIn {
public ZoomPreviousPlugIn() {
}
public boolean execute(PlugInContext context) throws Exception {
reportNothingToUndoYet(context);
Viewport viewport = context.getLayerViewPanel().getViewport();
Assert.isTrue(viewport.getZoomHistory().hasPrev());
viewport.getZoomHistory().setAdding(false);
try {
viewport.zoom(viewport.getZoomHistory().prev());
} finally {
viewport.getZoomHistory().setAdding(true);
}
return true;
}
public MultiEnableCheck createEnableCheck(
final WorkbenchContext workbenchContext) {
EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext);
return new MultiEnableCheck().add(checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck())
.add(new EnableCheck() {
public String check(JComponent component) {
LayerViewPanel layerViewPanel = workbenchContext.getLayerViewPanel();
return (layerViewPanel == null || //[UT] 20.10.2005 not quite the error mesg
!layerViewPanel.getViewport()
.getZoomHistory().hasPrev())
? I18N.get("ui.zoom.ZoomPreviousPlugIn.already-at-start") : null;
}
});
}
public ImageIcon getIcon() {
//return IconLoaderFamFam.icon("application_side_contract.png");
return IconLoader.icon("Left.gif");
}
}
|
[
"Bokanga@Bokanga-PC"
] |
Bokanga@Bokanga-PC
|
c0e8204457395acdb63837605208dc821d9adf94
|
7248ba73671b3f22bb5f1bdb1b7358684bee8c62
|
/jeeopen-web/jeeopen-admin/src/main/java/com/jeeopen/web/modules/sys/controller/LoginController.java
|
179ac7ebbc115297faded63cc6946cf28a223067
|
[] |
no_license
|
wangpf2011/jeeopen
|
4b4bd37f621f326817cb2d0a84d0a57f00e564d3
|
31fa29bd61d35fa39451972649bef8da85320624
|
refs/heads/master
| 2022-12-02T12:10:09.767069
| 2019-06-30T15:00:24
| 2019-06-30T15:00:24
| 194,417,626
| 1
| 0
| null | 2022-11-16T10:35:33
| 2019-06-29T15:00:01
|
CSS
|
UTF-8
|
Java
| false
| false
| 3,185
|
java
|
package com.jeeopen.web.modules.sys.controller;
import com.jeeopen.web.security.shiro.credential.RetryLimitHashedCredentialsMatcher;
import com.jeeopen.web.security.shiro.exception.RepeatAuthenticationException;
import com.jeeopen.web.security.shiro.filter.authc.FormAuthenticationFilter;
import com.jeeopen.web.security.shiro.realm.UserRealm;
import com.jeeopen.web.utils.LoginLogUtils;
import com.jeeopen.web.utils.UserUtils;
import com.jeeopen.common.mvc.controller.BaseController;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.ExcessiveAttemptsException;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.util.WebUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping("${jeeopen.admin.url.prefix}")
public class LoginController extends BaseController {
@Autowired
private RetryLimitHashedCredentialsMatcher retryLimitHashedCredentialsMatcher;
@RequestMapping(value = "/login")
public ModelAndView login(HttpServletRequest request, HttpServletRequest response, Model model) {
// 我的电脑有缓存问题
UserRealm.Principal principal = UserUtils.getPrincipal(); // 如果已经登录,则跳转到管理首页
if (principal != null && !principal.isMobileLogin()) {
return new ModelAndView("redirect:/admin");
}
String useruame = WebUtils.getCleanParam(request, FormAuthenticationFilter.DEFAULT_USERNAME_PARAM);
//boolean rememberMe = WebUtils.isTrue(request, FormAuthenticationFilter.DEFAULT_REMEMBER_ME_PARAM);
// boolean mobile = WebUtils.isTrue(request, FormAuthenticationFilter.DEFAULT_MOBILE_PARAM);
String exception = (String) request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
// String message = (String) request.getAttribute(FormAuthenticationFilter.DEFAULT_MESSAGE_ERROR_PARAM);
// useruame = "admin";
// 是否开启验证码
if (RepeatAuthenticationException.class.getName().equals(exception)
|| retryLimitHashedCredentialsMatcher.isShowCaptcha(useruame)) { // 重复认证异常加入验证码。
model.addAttribute("showCaptcha", "1");
} else {
model.addAttribute("showCaptcha", "0");
}
// 强制登陆跳转
if (ExcessiveAttemptsException.class.getName().equals(exception)
|| retryLimitHashedCredentialsMatcher.isForceLogin(useruame)) { // 重复认证异常加入验证码。
// model.addAttribute("showCaptcha", "1");
}
return new ModelAndView("modules/sys/login/login");
}
@RequestMapping("/logout")
public ModelAndView logout() {
try {
Subject subject = SecurityUtils.getSubject();
if (subject != null && subject.isAuthenticated()) {
LoginLogUtils.recordLogoutLoginLog(UserUtils.getUser().getUsername(),"退出成功");
subject.logout();
}
return new ModelAndView("modules/sys/login/login");
} catch (Exception e) {
e.printStackTrace();
}
return new ModelAndView("modules/sys/login/index");
}
}
|
[
"wangpf2011@163.com"
] |
wangpf2011@163.com
|
1144eeef4fafa052c69d3cc6b543b16ffae32d6b
|
2b4332d86e57a2f05a3e10cafad8ce30bf92e7d0
|
/Sources/com/webobjects/webservices/support/xml/WOEnterpriseObjectDeserializer.java
|
a06cd4b2691aa30ebd8c57e2b654488be4d6aa56
|
[] |
no_license
|
rkiddy/Orange
|
7b600492957be4c5db03544b940ed86c6ed16d2b
|
167f48021144e5bea576276b2d30901b663c2b3d
|
refs/heads/master
| 2016-09-03T07:28:34.880134
| 2012-07-14T04:21:59
| 2012-07-14T04:21:59
| 2,116,939
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package com.webobjects.webservices.support.xml;
/**
* WOEnterpriseObjectDeserializer deserializes instances of classes implementing EOEnterpriseObject. Users must register a separate WOEnterpriseObjectDeserializer for every class implementing WOEnterpriseObjectDeserializer which is not a subclass of EOGenericRecord or EOCustomRecord.
* See Also:Serialized Form
*/
public class WOEnterpriseObjectDeserializer extends org.apache.axis.encoding.DeserializerImpl implements org.apache.axis.encoding.Deserializer, com.webobjects.webservices.support.xml.WOSoapConstants{
public WOEnterpriseObjectDeserializer(){
//TODO codavaj!!
}
protected java.lang.Object mergeProperties(java.lang.Object subject, com.webobjects.webservices.support.xml.WOStringKeyMap properties, java.lang.String keyPathPrefix, com.webobjects.webservices.support.xml.WOEnterpriseObjectSerializationStrategy strategy){
return null; //TODO codavaj!!
}
public void onEndElement(java.lang.String namespace, java.lang.String localName, org.apache.axis.encoding.DeserializationContext context) throws org.xml.sax.SAXException{
return; //TODO codavaj!!
}
public org.apache.axis.message.SOAPHandler onStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context) throws org.xml.sax.SAXException{
return null; //TODO codavaj!!
}
public void onStartElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context) throws org.xml.sax.SAXException{
return; //TODO codavaj!!
}
/**
* Set the name of the class to which an element will be deserialized.
*/
public void setEntityName(java.lang.Object name) throws org.xml.sax.SAXException{
return; //TODO codavaj!!
}
/**
* Set the globalID of the object to be instantiated.
*/
public void setGlobalID(java.lang.Object gid) throws org.xml.sax.SAXException{
return; //TODO codavaj!!
}
public void setProperties(java.lang.Object map) throws org.xml.sax.SAXException{
return; //TODO codavaj!!
}
}
|
[
"ray@ganymede.org"
] |
ray@ganymede.org
|
a0f59e501866adba945736b00d07dd0c5248f180
|
be28a7b64a4030f74233a79ebeba310e23fe2c3a
|
/generated-tests/qmosa/tests/s1027/80_wheelwebtool/evosuite-tests/wheel/asm/FieldWriter_ESTest_scaffolding.java
|
45417fae4b37fffb331ba67c05a0d661897fde23
|
[
"MIT"
] |
permissive
|
blindsubmissions/icse19replication
|
664e670f9cfcf9273d4b5eb332562a083e179a5f
|
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
|
refs/heads/master
| 2020-03-27T06:12:34.631952
| 2018-08-25T11:19:56
| 2018-08-25T11:19:56
| 146,074,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,774
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Aug 24 17:15:47 GMT 2018
*/
package wheel.asm;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class FieldWriter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "wheel.asm.FieldWriter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/80_wheelwebtool");
java.lang.System.setProperty("user.home", "/home/ubuntu");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "ubuntu");
java.lang.System.setProperty("user.timezone", "Etc/UTC");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FieldWriter_ESTest_scaffolding.class.getClassLoader() ,
"wheel.asm.FieldVisitor",
"wheel.asm.ClassVisitor",
"wheel.asm.Attribute",
"wheel.asm.MethodWriter",
"wheel.asm.ClassReader",
"wheel.asm.Item",
"wheel.asm.AnnotationWriter",
"wheel.asm.ByteVector",
"wheel.asm.AnnotationVisitor",
"wheel.asm.FieldWriter",
"wheel.asm.ClassWriter",
"wheel.asm.Type",
"wheel.asm.MethodVisitor"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FieldWriter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"wheel.asm.FieldWriter",
"wheel.asm.ClassReader",
"wheel.asm.ClassWriter",
"wheel.asm.ByteVector",
"wheel.asm.Item",
"wheel.asm.Attribute",
"wheel.asm.AnnotationWriter",
"wheel.asm.Label",
"wheel.asm.MethodWriter"
);
}
}
|
[
"my.submission.blind@gmail.com"
] |
my.submission.blind@gmail.com
|
252c9006dff5e004a4ff5c08d701b87065807132
|
0b93651bf4c4be26f820702985bd41089026e681
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201802/CreativeWrapperServiceInterfacegetCreativeWrappersByStatementResponse.java
|
9b8f83d17e3f6fd80863c64709fbfab72f398358
|
[
"Apache-2.0"
] |
permissive
|
cmcewen-postmedia/googleads-java-lib
|
adf36ccaf717ab486e982b09d69922ddd09183e1
|
75724b4a363dff96e3cc57b7ffc443f9897a9da9
|
refs/heads/master
| 2021-10-08T16:50:38.364367
| 2018-12-14T22:10:58
| 2018-12-14T22:10:58
| 106,611,378
| 0
| 0
|
Apache-2.0
| 2018-12-14T22:10:59
| 2017-10-11T21:26:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,300
|
java
|
// Copyright 2018 Google Inc. 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.
package com.google.api.ads.dfp.jaxws.v201802;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getCreativeWrappersByStatementResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getCreativeWrappersByStatementResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://www.google.com/apis/ads/publisher/v201802}CreativeWrapperPage" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "getCreativeWrappersByStatementResponse")
public class CreativeWrapperServiceInterfacegetCreativeWrappersByStatementResponse {
protected CreativeWrapperPage rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link CreativeWrapperPage }
*
*/
public CreativeWrapperPage getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link CreativeWrapperPage }
*
*/
public void setRval(CreativeWrapperPage value) {
this.rval = value;
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
489096baaa08f9e4dfca963c6d51d75866c60026
|
cdb8c9b262c191744985f684257d1ae79c22562c
|
/app/src/main/java/com/hsic/sy/doorsale/task/PrintTask.java
|
19c7f496f60bda75df0e4a01c580997ad9833e3d
|
[] |
no_license
|
ttttmmmmjjjj/syall
|
6b6c027636f0fbd56bfc70ebad02adc6f9cf7e9a
|
dcb6c84b42c4f732ccfa54c0e8e9aa03b9fe18a0
|
refs/heads/master
| 2021-01-02T16:12:16.694595
| 2019-04-28T07:26:26
| 2019-04-28T07:26:59
| 239,697,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,267
|
java
|
package com.hsic.sy.doorsale.task;
import android.app.ProgressDialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import com.hsic.sy.bll.PrintUtils;
import java.io.IOException;
import java.io.OutputStream;
import java.util.UUID;
/**
* Created by Administrator on 2018/8/15.
*/
public class PrintTask extends AsyncTask<Void, Void, String> {
private Context context = null;
private String msg;
private BluetoothAdapter bluetoothAdapter = BluetoothAdapter
.getDefaultAdapter();
private boolean isConnection = false;
private BluetoothDevice device = null;
private static BluetoothSocket bluetoothSocket = null;
private static OutputStream outputStream;
private static final UUID uuid = UUID
.fromString("00001101-0000-1000-8000-00805F9B34FB");
SharedPreferences deviceSetting;
String bluetoothadd = "";// 蓝牙MAC
private ProgressDialog dialog;
public PrintTask(Context context, String msg) {
this.context = context;
this.msg = msg;
deviceSetting = context.getSharedPreferences("DeviceSetting", 0);
bluetoothadd = deviceSetting.getString("BlueToothAdd", "");// 蓝牙MAC
dialog = new ProgressDialog(context);
}
@Override
protected void onPreExecute() {
super.onPreExecute();
dialog.setMessage("正在打印信息");
dialog.setCancelable(false);
dialog.show();
}
@Override
protected String doInBackground(Void... voids) {
String s = "";
try {
int pCount = 0;
pCount = Integer.parseInt("1");
//测试(最新测试)
String Intret = connectBT();
if (Intret.equals("0")) {
} else {
return "-1";
}
// printMsg(msg, false);
PrintUtils.setOutputStream(outputStream);
PrintUtils.selectCommand(PrintUtils.RESET);
PrintUtils.selectCommand(PrintUtils.LINE_SPACING_DEFAULT);
PrintUtils.selectCommand(PrintUtils.ALIGN_CENTER);
PrintUtils.printText("美食餐厅\n\n");
PrintUtils.selectCommand(PrintUtils.DOUBLE_HEIGHT_WIDTH);
PrintUtils.printText("桌号:1号桌\n\n");
PrintUtils.selectCommand(PrintUtils.NORMAL);
PrintUtils.selectCommand(PrintUtils.ALIGN_LEFT);
PrintUtils.printText(PrintUtils.printTwoData("订单编号", "201507161515\n"));
PrintUtils.printText(PrintUtils.printTwoData("点菜时间", "2016-02-16 10:46\n"));
PrintUtils.printText(PrintUtils.printTwoData("上菜时间", "2016-02-16 11:46\n"));
PrintUtils.printText(PrintUtils.printTwoData("人数:2人", "收银员:张三\n"));
PrintUtils.printText("--------------------------------\n");
PrintUtils.selectCommand(PrintUtils.BOLD);
PrintUtils.printText(PrintUtils.printThreeData("项目", "数量", "金额\n"));
PrintUtils.printText("--------------------------------\n");
PrintUtils.selectCommand(PrintUtils.BOLD_CANCEL);
PrintUtils.printText(PrintUtils.printThreeData("面", "1", "0.00\n"));
PrintUtils.printText(PrintUtils.printThreeData("米饭", "1", "6.00\n"));
PrintUtils.printText(PrintUtils.printThreeData("铁板烧", "1", "26.00\n"));
PrintUtils.printText(PrintUtils.printThreeData("一个测试", "1", "226.00\n"));
PrintUtils.printText(PrintUtils.printThreeData("牛肉面啊啊", "1", "2226.00\n"));
PrintUtils.printText(PrintUtils.printThreeData("牛肉面啊啊啊牛肉面啊啊啊", "888", "98886.00\n"));
PrintUtils.printText("--------------------------------\n");
PrintUtils.printText(PrintUtils.printTwoData("合计", "53.50\n"));
PrintUtils.printText(PrintUtils.printTwoData("抹零", "3.50\n"));
PrintUtils.printText("--------------------------------\n");
PrintUtils.printText(PrintUtils.printTwoData("应收", "50.00\n"));
PrintUtils.printText("--------------------------------\n");
PrintUtils.selectCommand(PrintUtils.ALIGN_LEFT);
PrintUtils.printText("备注:不要辣、不要香菜");
PrintUtils.printText("\n\n\n\n\n");
} catch (Exception ex) {
ex.toString();
}
return s;
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
dialog.setCancelable(true);
dialog.dismiss();
finish();
}
private void printMsg(String Data, boolean charactor) {
try {
String msg = "订单条形码\n" + Data+"\n\n";
byte[] data = msg.getBytes("gbk");
if (charactor) {
outputStream.write(0x1c);
outputStream.write(0x21);
outputStream.write(4);
} else {
outputStream.write(0x1c);
outputStream.write(0x21);
outputStream.write(2);
}
outputStream.write(data, 0, data.length);
} catch (Exception ex) {
}
}
public String connectBT() {
String log = "connectBT()";
// 先检查该设备是否支持蓝牙
if (bluetoothAdapter == null) {
return "1";// 该设备没有蓝牙功能
} else {
// 检查蓝牙是否打开
boolean b = bluetoothAdapter.isEnabled();
if (!bluetoothAdapter.isEnabled()) {
// 若没打开,先打开蓝牙
bluetoothAdapter.enable();
System.out.print("蓝牙未打开");
return "2";// 蓝牙未打开,程序强制打开蓝牙
} else {
try {
this.device = bluetoothAdapter
.getRemoteDevice(bluetoothadd);
if (!this.isConnection) {
bluetoothSocket = this.device
.createRfcommSocketToServiceRecord(uuid);
bluetoothSocket.connect();
outputStream = bluetoothSocket.getOutputStream();
this.isConnection = true;
}
} catch (Exception ex) {
System.out.print("远程获取设备出现异常" + ex.toString());
return "3";// 获取设备出现异常
}
}
return "0";// 连接成功
}
}
private void finish() {
try {
if (bluetoothSocket != null) {
bluetoothSocket.close();
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
if (outputStream != null) {
outputStream.close();
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|
[
"ttttmmmmjjjj@sina.com"
] |
ttttmmmmjjjj@sina.com
|
d216513658a63da1a6bd68804cae232fda0a9930
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Math-5/org.apache.commons.math3.complex.Complex/BBC-F0-opt-100/17/org/apache/commons/math3/complex/Complex_ESTest_scaffolding.java
|
1d5d8d2746e91f0354d8520884451445b9c8f487
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 5,756
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 08:51:48 GMT 2021
*/
package org.apache.commons.math3.complex;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Complex_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math3.complex.Complex";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Complex_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math3.util.Precision",
"org.apache.commons.math3.exception.util.ExceptionContextProvider",
"org.apache.commons.math3.exception.util.ArgUtils",
"org.apache.commons.math3.exception.MathArithmeticException",
"org.apache.commons.math3.complex.Complex",
"org.apache.commons.math3.exception.NumberIsTooSmallException",
"org.apache.commons.math3.util.FastMath$ExpIntTable",
"org.apache.commons.math3.util.FastMath$lnMant",
"org.apache.commons.math3.exception.NotPositiveException",
"org.apache.commons.math3.util.FastMath$ExpFracTable",
"org.apache.commons.math3.exception.MathIllegalArgumentException",
"org.apache.commons.math3.util.FastMath$CodyWaite",
"org.apache.commons.math3.complex.ComplexField",
"org.apache.commons.math3.util.MathUtils",
"org.apache.commons.math3.exception.MathIllegalNumberException",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.complex.ComplexField$LazyHolder",
"org.apache.commons.math3.util.FastMath",
"org.apache.commons.math3.FieldElement",
"org.apache.commons.math3.exception.util.Localizable",
"org.apache.commons.math3.exception.util.ExceptionContext",
"org.apache.commons.math3.exception.NullArgumentException",
"org.apache.commons.math3.Field",
"org.apache.commons.math3.exception.NotFiniteNumberException",
"org.apache.commons.math3.util.FastMathLiteralArrays"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Complex_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.math3.complex.Complex",
"org.apache.commons.math3.util.FastMath",
"org.apache.commons.math3.util.FastMathLiteralArrays",
"org.apache.commons.math3.util.FastMath$ExpIntTable",
"org.apache.commons.math3.util.FastMath$ExpFracTable",
"org.apache.commons.math3.util.FastMath$lnMant",
"org.apache.commons.math3.util.Precision",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.complex.ComplexField",
"org.apache.commons.math3.complex.ComplexField$LazyHolder",
"org.apache.commons.math3.util.MathUtils",
"org.apache.commons.math3.util.FastMath$CodyWaite",
"org.apache.commons.math3.exception.MathIllegalArgumentException",
"org.apache.commons.math3.exception.MathIllegalNumberException",
"org.apache.commons.math3.exception.NumberIsTooSmallException",
"org.apache.commons.math3.exception.NotPositiveException",
"org.apache.commons.math3.exception.util.ExceptionContext",
"org.apache.commons.math3.exception.util.ArgUtils",
"org.apache.commons.math3.exception.NullArgumentException"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4166fd255fa36585d0ae3f28c8d70b5e300f9428
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project55/src/main/java/org/gradle/test/performance55_1/Production55_80.java
|
751225f05f04b0c65de569c8ebe4ada7b58ee022
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package org.gradle.test.performance55_1;
public class Production55_80 extends org.gradle.test.performance15_1.Production15_80 {
private final String property;
public Production55_80() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
de04e9525104089d1dfb07e8f76b9ded5e182b2e
|
2712e31319b0c733bcab285415e55a427288406e
|
/eclipse/src/main/java/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
|
f623ad1ce9f37dc1f4743f4e961dab24959e51ab
|
[
"WTFPL"
] |
permissive
|
mo79571830/eide
|
8ba031a432cab62e1045b8ff61961d21cfc94f7d
|
5d6470f82def645c17b5cebe03184ddc1ff67e62
|
refs/heads/master
| 2022-03-22T23:46:56.299439
| 2019-05-08T20:20:08
| 2019-05-08T20:20:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,471
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S Moller - Contributions for
* Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 405104 - [1.8][compiler][codegen] Implement support for serializeable lambdas
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.classfmt;
import org.eclipse.jdt.internal.compiler.ast.ASTNode;
public interface ClassFileConstants {
int AccDefault = 0;
/*
* Modifiers
*/
int AccPublic = 0x0001;
int AccPrivate = 0x0002;
int AccProtected = 0x0004;
int AccStatic = 0x0008;
int AccFinal = 0x0010;
int AccSynchronized = 0x0020;
int AccVolatile = 0x0040;
int AccBridge = 0x0040;
int AccTransient = 0x0080;
int AccVarargs = 0x0080;
int AccNative = 0x0100;
int AccInterface = 0x0200;
int AccAbstract = 0x0400;
int AccStrictfp = 0x0800;
int AccSynthetic = 0x1000;
int AccAnnotation = 0x2000;
int AccEnum = 0x4000;
/**
* From classfile version 52 (compliance 1.8 up), meaning that a formal parameter is mandated
* by a language specification, so all compilers for the language must emit it.
*/
int AccMandated = 0x8000;
/**
* Other VM flags.
*/
int AccSuper = 0x0020;
/**
* Extra flags for types and members attributes (not from the JVMS, should have been defined in ExtraCompilerModifiers).
*/
int AccAnnotationDefault = ASTNode.Bit18; // indicate presence of an attribute "DefaultValue" (annotation method)
int AccDeprecated = ASTNode.Bit21; // indicate presence of an attribute "Deprecated"
int Utf8Tag = 1;
int IntegerTag = 3;
int FloatTag = 4;
int LongTag = 5;
int DoubleTag = 6;
int ClassTag = 7;
int StringTag = 8;
int FieldRefTag = 9;
int MethodRefTag = 10;
int InterfaceMethodRefTag = 11;
int NameAndTypeTag = 12;
int MethodHandleTag = 15;
int MethodTypeTag = 16;
int InvokeDynamicTag = 18;
int ConstantMethodRefFixedSize = 5;
int ConstantClassFixedSize = 3;
int ConstantDoubleFixedSize = 9;
int ConstantFieldRefFixedSize = 5;
int ConstantFloatFixedSize = 5;
int ConstantIntegerFixedSize = 5;
int ConstantInterfaceMethodRefFixedSize = 5;
int ConstantLongFixedSize = 9;
int ConstantStringFixedSize = 3;
int ConstantUtf8FixedSize = 3;
int ConstantNameAndTypeFixedSize = 5;
int ConstantMethodHandleFixedSize = 4;
int ConstantMethodTypeFixedSize = 3;
int ConstantInvokeDynamicFixedSize = 5;
// JVMS 4.4.8
int MethodHandleRefKindGetField = 1;
int MethodHandleRefKindGetStatic = 2;
int MethodHandleRefKindPutField = 3;
int MethodHandleRefKindPutStatic = 4;
int MethodHandleRefKindInvokeVirtual = 5;
int MethodHandleRefKindInvokeStatic = 6;
int MethodHandleRefKindInvokeSpecial = 7;
int MethodHandleRefKindNewInvokeSpecial = 8;
int MethodHandleRefKindInvokeInterface = 9;
int MAJOR_VERSION_1_1 = 45;
int MAJOR_VERSION_1_2 = 46;
int MAJOR_VERSION_1_3 = 47;
int MAJOR_VERSION_1_4 = 48;
int MAJOR_VERSION_1_5 = 49;
int MAJOR_VERSION_1_6 = 50;
int MAJOR_VERSION_1_7 = 51;
int MAJOR_VERSION_1_8 = 52;
int MINOR_VERSION_0 = 0;
int MINOR_VERSION_1 = 1;
int MINOR_VERSION_2 = 2;
int MINOR_VERSION_3 = 3;
int MINOR_VERSION_4 = 4;
// JDK 1.1 -> 1.8, comparable value allowing to check both major/minor version at once 1.4.1 > 1.4.0
// 16 unsigned bits for major, then 16 bits for minor
long JDK1_1 = ((long)ClassFileConstants.MAJOR_VERSION_1_1 << 16) + ClassFileConstants.MINOR_VERSION_3; // 1.1. is 45.3
long JDK1_2 = ((long)ClassFileConstants.MAJOR_VERSION_1_2 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_3 = ((long)ClassFileConstants.MAJOR_VERSION_1_3 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_4 = ((long)ClassFileConstants.MAJOR_VERSION_1_4 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_5 = ((long)ClassFileConstants.MAJOR_VERSION_1_5 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_6 = ((long)ClassFileConstants.MAJOR_VERSION_1_6 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_7 = ((long)ClassFileConstants.MAJOR_VERSION_1_7 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK1_8 = ((long)ClassFileConstants.MAJOR_VERSION_1_8 << 16) + ClassFileConstants.MINOR_VERSION_0;
/*
* cldc1.1 is 45.3, but we modify it to be different from JDK1_1.
* In the code gen, we will generate the same target value as JDK1_1
*/
long CLDC_1_1 = ((long)ClassFileConstants.MAJOR_VERSION_1_1 << 16) + ClassFileConstants.MINOR_VERSION_4;
// jdk level used to denote future releases: optional behavior is not enabled for now, but may become so. In order to enable these,
// search for references to this constant, and change it to one of the official JDT constants above.
long JDK_DEFERRED = Long.MAX_VALUE;
int INT_ARRAY = 10;
int BYTE_ARRAY = 8;
int BOOLEAN_ARRAY = 4;
int SHORT_ARRAY = 9;
int CHAR_ARRAY = 5;
int LONG_ARRAY = 11;
int FLOAT_ARRAY = 6;
int DOUBLE_ARRAY = 7;
// Debug attributes
int ATTR_SOURCE = 0x1; // SourceFileAttribute
int ATTR_LINES = 0x2; // LineNumberAttribute
int ATTR_VARS = 0x4; // LocalVariableTableAttribute
int ATTR_STACK_MAP_TABLE = 0x8; // Stack map table attribute
int ATTR_STACK_MAP = 0x10; // Stack map attribute: cldc
int ATTR_TYPE_ANNOTATION = 0x20; // type annotation attribute (jsr 308)
int ATTR_METHOD_PARAMETERS = 0x40; // method parameters attribute (jep 118)
// See java.lang.invoke.LambdaMetafactory constants - option bitflags when calling altMetaFactory()
int FLAG_SERIALIZABLE = 0x01;
int FLAG_MARKERS = 0x02;
int FLAG_BRIDGES = 0x04;
}
|
[
"202983447@qq.com"
] |
202983447@qq.com
|
c47f35b4dc48701c9b9d48b53215e8938d01b451
|
b6b79f4c55b4e64d7b36875861dae8f40b8ae987
|
/src/minecraft/net/minecraft/block/BlockEndPortal.java
|
6c894b8a27336c91ed106f3d71c43740642aaff9
|
[] |
no_license
|
darkboat/Void-Client
|
20270a1c5596a9b89ae153a31efdd418a19fb921
|
55cd92f2007ecdf543c591b3c319115723150f44
|
refs/heads/master
| 2023-08-11T19:06:14.318268
| 2021-09-16T19:10:26
| 2021-09-16T19:10:26
| 401,742,562
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,815
|
java
|
package net.minecraft.block;
import java.util.List;
import java.util.Random;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityEndPortal;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockEndPortal extends BlockContainer
{
protected BlockEndPortal(Material materialIn)
{
super(materialIn);
this.setLightLevel(1.0F);
}
/**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*/
public TileEntity createNewTileEntity(World worldIn, int meta)
{
return new TileEntityEndPortal();
}
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
{
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
}
public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
{
return side == EnumFacing.DOWN ? super.shouldSideBeRendered(worldIn, pos, side) : false;
}
/**
* Add all collision boxes of this Block to the list that intersect with the given mask.
*/
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity)
{
}
/**
* Used to determine ambient occlusion and culling when rebuilding chunks for render
*/
public boolean isOpaqueCube()
{
return false;
}
public boolean isFullCube()
{
return false;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 0;
}
/**
* Called When an Entity Collided with the Block
*/
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
if (entityIn.ridingEntity == null && entityIn.riddenByEntity == null && !worldIn.isRemote)
{
entityIn.travelToDimension(1);
}
}
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
}
public Item getItem(World worldIn, BlockPos pos)
{
return null;
}
/**
* Get the MapColor for this Block and the given BlockState
*/
public MapColor getMapColor(IBlockState state)
{
return MapColor.blackColor;
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
7db8da00e7465f8718cea3e358f9c86400cd8aed
|
e2a4b0c419e10d5b1d26b6044f086053b12d65eb
|
/tags/sandbox/src/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java
|
fe515d46fe8aad7ec25ec558e66ad6b069311f58
|
[
"Apache-2.0"
] |
permissive
|
JLLeitschuh/commons-vfs
|
a2a05ec1f234520f4cb50b2ba2e4a83cc1225a10
|
459418c3dc06c36fc2eac8e0630e82d33593aa2f
|
refs/heads/master
| 2021-01-02T21:07:39.360603
| 2015-01-11T23:11:44
| 2015-01-11T23:11:44
| 239,800,971
| 0
| 0
| null | 2020-11-17T18:51:51
| 2020-02-11T15:49:20
| null |
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
/*
* Copyright 2002-2005 The Apache Software Foundation.
*
* 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 org.apache.commons.vfs.provider.gzip;
import org.apache.commons.vfs.FileName;
import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.FileSystemException;
import org.apache.commons.vfs.FileSystemOptions;
import org.apache.commons.vfs.provider.compressed.CompressedFileFileSystem;
import java.util.Collection;
/**
* Filesytem to handle compressed files using the gzip method
*
* @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
* @version $Revision$ $Date$
*/
public class GzipFileSystem extends CompressedFileFileSystem
{
protected GzipFileSystem(FileName rootName, FileObject parentLayer, FileSystemOptions fileSystemOptions) throws FileSystemException
{
super(rootName, parentLayer, fileSystemOptions);
}
protected FileObject createFile(FileName name) throws FileSystemException
{
return new GzipFileObject(name, getParentLayer(), this);
}
protected void addCapabilities(final Collection caps)
{
caps.addAll(GzipFileProvider.capabilities);
}
}
|
[
"bayard@13f79535-47bb-0310-9956-ffa450edef68"
] |
bayard@13f79535-47bb-0310-9956-ffa450edef68
|
4d6db30012bbae2bae34e4a371c1a199a13604d9
|
0907c886f81331111e4e116ff0c274f47be71805
|
/sources/com/google/android/gms/common/api/internal/zach.java
|
981cd5382c1840a055ae6e57689a190d206ce337
|
[
"MIT"
] |
permissive
|
Minionguyjpro/Ghostly-Skills
|
18756dcdf351032c9af31ec08fdbd02db8f3f991
|
d1a1fb2498aec461da09deb3ef8d98083542baaf
|
refs/heads/Android-OS
| 2022-07-27T19:58:16.442419
| 2022-04-15T07:49:53
| 2022-04-15T07:49:53
| 415,272,874
| 2
| 0
|
MIT
| 2021-12-21T10:23:50
| 2021-10-09T10:12:36
|
Java
|
UTF-8
|
Java
| false
| false
| 895
|
java
|
package com.google.android.gms.common.api.internal;
import android.os.RemoteException;
import com.google.android.gms.common.Feature;
import com.google.android.gms.common.api.internal.TaskApiCall;
import com.google.android.gms.tasks.TaskCompletionSource;
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
final class zach extends TaskApiCall<A, ResultT> {
private final /* synthetic */ TaskApiCall.Builder zaa;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
zach(TaskApiCall.Builder builder, Feature[] featureArr, boolean z) {
super(featureArr, z);
this.zaa = builder;
}
/* access modifiers changed from: protected */
public final void doExecute(A a2, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException {
this.zaa.zaa.accept(a2, taskCompletionSource);
}
}
|
[
"66115754+Minionguyjpro@users.noreply.github.com"
] |
66115754+Minionguyjpro@users.noreply.github.com
|
9465d5ca81fb2634bd66555763114047e72f0b01
|
5741045375dcbbafcf7288d65a11c44de2e56484
|
/reddit-decompilada/org/jcodec/codecs/mpeg4/es/DecoderConfig.java
|
7c575922f01a29b8aff9e444886274f0bad880b4
|
[] |
no_license
|
miarevalo10/ReporteReddit
|
18dd19bcec46c42ff933bb330ba65280615c281c
|
a0db5538e85e9a081bf268cb1590f0eeb113ed77
|
refs/heads/master
| 2020-03-16T17:42:34.840154
| 2018-05-11T10:16:04
| 2018-05-11T10:16:04
| 132,843,706
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,604
|
java
|
package org.jcodec.codecs.mpeg4.es;
import java.nio.ByteBuffer;
public class DecoderConfig extends NodeDescriptor {
private int avgBitrate;
private int bufSize;
private int maxBitrate;
private int objectType;
public static int tag() {
return 4;
}
public DecoderConfig(int i, int i2) {
super(i, i2);
}
public DecoderConfig(int i, int i2, int i3, int i4, Descriptor... descriptorArr) {
super(tag(), descriptorArr);
this.objectType = i;
this.bufSize = i2;
this.maxBitrate = i3;
this.avgBitrate = i4;
}
protected void parse(ByteBuffer byteBuffer) {
this.objectType = byteBuffer.get() & 255;
byteBuffer.get();
this.bufSize = ((byteBuffer.get() & 255) << 16) | (byteBuffer.getShort() & 65535);
this.maxBitrate = byteBuffer.getInt();
this.avgBitrate = byteBuffer.getInt();
super.parse(byteBuffer);
}
protected void doWrite(ByteBuffer byteBuffer) {
byteBuffer.put((byte) this.objectType);
byteBuffer.put((byte) 21);
byteBuffer.put((byte) (this.bufSize >> 16));
byteBuffer.putShort((short) this.bufSize);
byteBuffer.putInt(this.maxBitrate);
byteBuffer.putInt(this.avgBitrate);
super.doWrite(byteBuffer);
}
public int getObjectType() {
return this.objectType;
}
public int getBufSize() {
return this.bufSize;
}
public int getMaxBitrate() {
return this.maxBitrate;
}
public int getAvgBitrate() {
return this.avgBitrate;
}
}
|
[
"mi.arevalo10@uniandes.edu.co"
] |
mi.arevalo10@uniandes.edu.co
|
d638c67cc2678002132f49e802df4a482a3eccc6
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/tinker/a/a/i.java
|
8b010be5881324b5fcba0d153b1761bb99ce9993
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,574
|
java
|
package com.tencent.tinker.a.a;
import com.tencent.tinker.a.a.a.a;
import com.tencent.tinker.a.a.b.d;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.zip.Adler32;
public final class i
{
static final short[] AxX = new short[0];
public final t AxY = new t();
private final i.f AxZ = new i.f(this, (byte)0);
private final i.g Aya = new i.g(this, (byte)0);
private final i.h Ayb = new i.h(this, (byte)0);
private final i.d Ayc = new i.d(this, (byte)0);
private final i.b Ayd = new i.b(this, (byte)0);
private final i.c Aye = new i.c(this, (byte)0);
private final i.a Ayf = new i.a(this, (byte)0);
private int Ayg = 0;
public ByteBuffer aEY;
private byte[] nTL = null;
public i(int paramInt)
{
this.aEY = ByteBuffer.wrap(new byte[paramInt]);
this.aEY.order(ByteOrder.LITTLE_ENDIAN);
this.AxY.fileSize = paramInt;
}
public i(InputStream paramInputStream)
{
this.aEY = ByteBuffer.wrap(d.c(paramInputStream, 0));
this.aEY.order(ByteOrder.LITTLE_ENDIAN);
t localt = this.AxY;
i.e locale = a(localt.Ays);
paramInputStream = locale.Rr(8);
int j = i;
if (paramInputStream.length == 8)
{
j = i;
if (paramInputStream[0] == 100)
{
j = i;
if (paramInputStream[1] == 101)
{
j = i;
if (paramInputStream[2] == 120)
{
j = i;
if (paramInputStream[3] == 10)
{
if (paramInputStream[7] == 0)
break label262;
j = i;
}
}
}
}
}
while (j != 13)
{
throw new j("Unexpected magic: " + Arrays.toString(paramInputStream));
label262: String str = (char)paramInputStream[4] + (char)paramInputStream[5] + (char)paramInputStream[6];
if (str.equals("036"))
{
j = 14;
}
else
{
j = i;
if (str.equals("035"))
j = 13;
}
}
localt.gai = locale.aEY.getInt();
localt.nTL = locale.Rr(20);
localt.fileSize = locale.aEY.getInt();
j = locale.aEY.getInt();
if (j != 112)
throw new j("Unexpected header: 0x" + Integer.toHexString(j));
j = locale.aEY.getInt();
if (j != 305419896)
throw new j("Unexpected endian tag: 0x" + Integer.toHexString(j));
localt.AyL = locale.aEY.getInt();
localt.AyM = locale.aEY.getInt();
localt.Ayz.off = locale.aEY.getInt();
if (localt.Ayz.off == 0)
throw new j("Cannot merge dex files that do not contain a map");
localt.Ayt.size = locale.aEY.getInt();
localt.Ayt.off = locale.aEY.getInt();
localt.Ayu.size = locale.aEY.getInt();
localt.Ayu.off = locale.aEY.getInt();
localt.Ayv.size = locale.aEY.getInt();
localt.Ayv.off = locale.aEY.getInt();
localt.Ayw.size = locale.aEY.getInt();
localt.Ayw.off = locale.aEY.getInt();
localt.Ayx.size = locale.aEY.getInt();
localt.Ayx.off = locale.aEY.getInt();
localt.Ayy.size = locale.aEY.getInt();
localt.Ayy.off = locale.aEY.getInt();
localt.lgV = locale.aEY.getInt();
localt.AyN = locale.aEY.getInt();
localt.a(Rm(localt.Ayz.off));
localt.dRV();
}
private static void hV(int paramInt1, int paramInt2)
{
if ((paramInt1 < 0) || (paramInt1 >= paramInt2))
throw new IndexOutOfBoundsException("index:" + paramInt1 + ", length=" + paramInt2);
}
public final i.e Rm(int paramInt)
{
if ((paramInt < 0) || (paramInt >= this.aEY.capacity()))
throw new IllegalArgumentException("position=" + paramInt + " length=" + this.aEY.capacity());
ByteBuffer localByteBuffer = this.aEY.duplicate();
localByteBuffer.order(ByteOrder.LITTLE_ENDIAN);
localByteBuffer.position(paramInt);
localByteBuffer.limit(this.aEY.capacity());
return new i.e(this, "temp-section", localByteBuffer, (byte)0);
}
public final int Rn(int paramInt)
{
hV(paramInt, this.AxY.Ayu.size);
int i = this.AxY.Ayu.off;
return this.aEY.getInt(i + paramInt * 4);
}
public final i.e a(t.a parama)
{
int i = parama.off;
if ((i < 0) || (i >= this.aEY.capacity()))
throw new IllegalArgumentException("position=" + i + " length=" + this.aEY.capacity());
ByteBuffer localByteBuffer = this.aEY.duplicate();
localByteBuffer.order(ByteOrder.LITTLE_ENDIAN);
localByteBuffer.position(i);
localByteBuffer.limit(i + parama.byteCount);
return new i.e(this, "section", localByteBuffer, (byte)0);
}
public final void dRw()
{
Rm(12).write(rs(true));
i.e locale = Rm(8);
Adler32 localAdler32 = new Adler32();
byte[] arrayOfByte = new byte[8192];
ByteBuffer localByteBuffer = this.aEY.duplicate();
localByteBuffer.limit(localByteBuffer.capacity());
localByteBuffer.position(12);
while (localByteBuffer.hasRemaining())
{
int i = Math.min(8192, localByteBuffer.remaining());
localByteBuffer.get(arrayOfByte, 0, i);
localAdler32.update(arrayOfByte, 0, i);
}
locale.writeInt((int)localAdler32.getValue());
}
public final byte[] rs(boolean paramBoolean)
{
byte[] arrayOfByte1;
if ((this.nTL != null) && (!paramBoolean))
arrayOfByte1 = this.nTL;
while (true)
{
return arrayOfByte1;
MessageDigest localMessageDigest;
try
{
localMessageDigest = MessageDigest.getInstance("SHA-1");
arrayOfByte1 = new byte[8192];
ByteBuffer localByteBuffer = this.aEY.duplicate();
localByteBuffer.limit(localByteBuffer.capacity());
localByteBuffer.position(32);
while (localByteBuffer.hasRemaining())
{
int i = Math.min(8192, localByteBuffer.remaining());
localByteBuffer.get(arrayOfByte1, 0, i);
localMessageDigest.update(arrayOfByte1, 0, i);
}
}
catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
{
throw new AssertionError();
}
byte[] arrayOfByte2 = localMessageDigest.digest();
this.nTL = arrayOfByte2;
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.tinker.a.a.i
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
c2605cc160e57c8bc3b280b22961eeef534bea34
|
13829e060e524d9fd9a7dbd4fca6a05ecf815908
|
/app/src/main/java/com/ofal/ihsan/oppomonitoring/view/base/NoActionBarConfig.java
|
02b6995812a13554a1156d7eedf1305ce054d71f
|
[] |
no_license
|
ihsanab31/MentoringOppo
|
a418d27c3d3f4a46b98d2aef9b0c14feb7efdc3c
|
dc7f26a3fae63360eb0d1065d323c8b6622fc153
|
refs/heads/master
| 2020-03-18T23:24:03.888223
| 2018-06-06T21:26:23
| 2018-06-06T21:26:23
| 135,399,982
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package com.ofal.ihsan.oppomonitoring.view.base;
import android.support.v7.app.AppCompatActivity;
import android.view.WindowManager;
/**
* Created by
* Name : Ihsan Abdurahman
* Email : ihsanab31@gmail.com
* WA : 0878253827096
* on Sunday, 19-11-2017
* ------------------------------
* This class for fullscreen
*/
public class NoActionBarConfig extends AppCompatActivity {
public NoActionBarConfig() {}
public void fullScreen(AppCompatActivity appCompatActivity){
appCompatActivity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
|
[
"ihsanab31@gmail.com"
] |
ihsanab31@gmail.com
|
0263e0e46c57086f99be490f5a081bba61c11d40
|
0baf7677c04ba49ebbb77bf87d0b89e5d0fa59a8
|
/cayenne-server/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/TextNode.java
|
afd0f47168ee56295bd01976c8ed07d40825ac97
|
[
"Apache-2.0"
] |
permissive
|
DalavanCloud/cayenne
|
7e7a664c16cff954f14fe9c4121c639a175cd617
|
77ba4b7d0906bf47e2136a8cbe0c0f128ecad6d6
|
refs/heads/master
| 2020-04-29T10:18:24.244156
| 2019-03-15T04:35:57
| 2019-03-15T04:35:57
| 176,057,472
| 1
| 0
| null | 2019-03-17T04:47:48
| 2019-03-17T04:47:47
| null |
UTF-8
|
Java
| false
| false
| 1,509
|
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.cayenne.access.sqlbuilder.sqltree;
import org.apache.cayenne.access.sqlbuilder.QuotingAppendable;
/**
* @since 4.2
*/
public class TextNode extends Node {
private final CharSequence text;
public TextNode(CharSequence text) {
this.text = text;
}
@Override
public QuotingAppendable append(QuotingAppendable buffer) {
return buffer.append(text);
}
@Override
public Node copy() {
return new TextNode(text);
}
public CharSequence getText() {
return text;
}
}
|
[
"stariy95@gmail.com"
] |
stariy95@gmail.com
|
38c36f636f1e9da7ecaee0c017f09414ce607013
|
8810972d0375c0a853e3a66bd015993932be9fad
|
/modelicaml/org.openmodelica.modelicaml.editor.xtext.statetransitionguardexpression/src/org/openmodelica/modelicaml/editor/xtext/state/scoping/StatetransitionguardexpressionScopeProvider.java
|
6bfea4e61a591388bc6e0c828363a0059e2e1404
|
[] |
no_license
|
OpenModelica/MDT
|
275ffe4c61162a5292d614cd65eb6c88dc58b9d3
|
9ffbe27b99e729114ea9a4b4dac4816375c23794
|
refs/heads/master
| 2020-09-14T03:35:05.384414
| 2019-11-27T22:35:04
| 2019-11-27T23:08:29
| 222,999,464
| 3
| 2
| null | 2019-11-27T23:08:31
| 2019-11-20T18:15:27
|
Java
|
WINDOWS-1252
|
Java
| false
| false
| 2,105
|
java
|
/*
* This file is part of OpenModelica.
*
* Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
* c/o Linköpings universitet, Department of Computer and Information Science,
* SE-58183 Linköping, Sweden.
*
* All rights reserved.
*
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
* OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
*
* The OpenModelica software and the Open Source Modelica
* Consortium (OSMC) Public License (OSMC-PL) are obtained
* from OSMC, either from the above address,
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or
* http://www.openmodelica.org, and in the OpenModelica distribution.
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
*
* This program is distributed WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
*
* See the full OSMC Public License conditions for more details.
*
* Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-now
*
* Contributors:
* Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adaptations
* Parham Vasaiely, EADS Innovation Works / Hamburg University of Applied Sciences 2009-2011, implementation of simulation plugins
*/
package org.openmodelica.modelicaml.editor.xtext.state.scoping;
import org.openmodelica.modelicaml.editor.xtext.model.scoping.ModeleditorScopeProvider;
/**
* This class contains custom scoping description.
*
* see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping
* on how and when to use it
*
*/
public class StatetransitionguardexpressionScopeProvider extends ModeleditorScopeProvider {
}
|
[
"wschamai"
] |
wschamai
|
17f6177235bbaf82f513ce3b50f19fc2857d96cc
|
6419a212e9ec9354edf09626f75e89d46d06e6ab
|
/fs_searcher/src/mediaSearch/com/funshion/search/media/chgWatcher/MediaExportHelper.java
|
1a3e4eb5d1c5495444a4e62834293c8b8330a215
|
[] |
no_license
|
liyiwei0405/fs
|
7c51d031e0059e77348a9b8c7b628fa7498b0af8
|
759355c537780105fd6cd9005ee9d4799805614f
|
refs/heads/master
| 2020-05-18T13:28:02.707640
| 2014-03-07T10:30:08
| 2014-03-07T10:30:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,225
|
java
|
package com.funshion.search.media.chgWatcher;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import com.funshion.search.DatumFile;
import com.funshion.search.ChgExportFS;
import com.funshion.search.ExportChgHelper;
import com.funshion.search.utils.ConfigReader;
import com.funshion.search.utils.LineWriter;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
/**
* @author liying
*/
public class MediaExportHelper extends ExportChgHelper{
public static final List<String> relateVideoTypes = new ArrayList<String>();
public Map<Integer, List<Integer>> mediaToRelatedVideos;
static{
relateVideoTypes.add("m_yugao");
relateVideoTypes.add("m_jingbian");
relateVideoTypes.add("m_kandian");
relateVideoTypes.add("m_zixun");
relateVideoTypes.add("m_yuanchuang");
relateVideoTypes.add("m_teji");
relateVideoTypes.add("m_zongyi");
}
final int rotateItvSeconds;
final int rotateAtHour;
private int totalExpDayOfyear = -1;
MediaExportHelper(ConfigReader cr, ChgExportFS fs) throws IOException{
super(cr, fs);
this.rotateItvSeconds = cr.getInt("rotateItvSeconds", 600);
//rotateAtHour, if valid value is set, the indexes will be total rotate at this hour,
//if valid value is set, rotateItvSeconds will be overrided
rotateAtHour = cr.getInt("rotateAtHour", -1);
if(rotateAtHour > -1){
log.warn("rotate at hour %s, and rotateItvSeconds disabled", this.rotateAtHour);
}
}
public void doExport(boolean totalExport, DatumFile dFile) throws Exception{
int tot = 0;
File tmpFile = fs.prepareTmpFile();
LineWriter lw = newLineWriter(tmpFile);
MongoExportHelper mongoExp = new MongoExportHelper();
try{
DBObject queryObject = new BasicDBObject("publishflag", "published");
DBObject fieldObject = new BasicDBObject("videoid", true).append("types", true).append("video_media_ids", true).append("_id", false);
DBCursor cur = mongoExp.query(queryObject, fieldObject);
this.mediaToRelatedVideos = genRelatedVideoMap(cur);
MysqlExportHelper mysqlExp = new MysqlExportHelper(lw);
long st = System.currentTimeMillis();
mysqlExp.export(this.mediaToRelatedVideos);
tot += mysqlExp.getExportNum();
long ed = System.currentTimeMillis();
log.info("export Video use ms %s", (ed - st));
lw.close();
if(tot > 0){
if(!tmpFile.renameTo(dFile.file)){
log.error("can not rename tmp file to %s", dFile.file);
throw new Exception("we can not rename tmpFile '"+ tmpFile.getCanonicalPath() + "' to '" + dFile.file.getCanonicalFile() + "'");
}
dFile.md5Bytes();
log.info("new chg gen ok: %s", dFile);
if(dFile.isMain){
fs.switchChgDir(dFile);
}else{
fs.putDatumFile(dFile);
}
}else{
tmpFile.delete();
log.info("export 0 records! for %s", (totalExport ? "totalExport" : "updateExport"));
}
}finally{
if(lw != null){
lw.close();
}
mongoExp.destroy();
}
}
@SuppressWarnings("rawtypes")
private Map<Integer, List<Integer>> genRelatedVideoMap(DBCursor cur){
log.info("generating map..");
Map<Integer, List<Integer>> mediaToRelatedVideos = new HashMap<Integer, List<Integer>>();
while(cur.hasNext()){
DBObject dbObject = cur.next();
boolean containRelatedType = false;
Object oTypes = dbObject.get("types");
if(oTypes != null && oTypes instanceof List){
List types = (List) oTypes;
for(Object oType : types){
if(oType != null && oType instanceof String){
String type = (String) oType;
if(MediaExportHelper.relateVideoTypes.contains(type)){
containRelatedType = true;
break;
}
}
}
}
if(containRelatedType){
Object oVideoId = dbObject.get("videoid");
if(oVideoId instanceof Number){
Integer videoId = (Integer)oVideoId;
Object oVideoMediaIds = dbObject.get("video_media_ids");
if(oVideoMediaIds != null){
if(oVideoMediaIds instanceof List){//相关media列表是一个list
List videoMediaIds = (List) oVideoMediaIds;
for(Object oMediaId : videoMediaIds){
if(oMediaId != null && oMediaId instanceof Number){
Integer mediaId = (Integer)oMediaId;
List<Integer> videoIds;
if(!mediaToRelatedVideos.containsKey(mediaId)){
videoIds = new ArrayList<Integer>();
mediaToRelatedVideos.put(mediaId, videoIds);
}else{
videoIds = mediaToRelatedVideos.get(mediaId);
}
videoIds.add(videoId);
}
else{
log.error("mediaid not a number: %s", String.valueOf(oMediaId));
}
}
}else if(oVideoMediaIds instanceof Integer){//相关media列表是一个integer
Integer mediaId = (Integer)oVideoMediaIds;
List<Integer> videoIds;
if(!mediaToRelatedVideos.containsKey(mediaId)){
videoIds = new ArrayList<Integer>();
mediaToRelatedVideos.put(mediaId, videoIds);
}else{
videoIds = mediaToRelatedVideos.get(mediaId);
}
videoIds.add(videoId);
}
else{//相关media列表是其他
log.error("related media not null and not list or number, videoid: %s, data type: %s", String.valueOf(oVideoId), oVideoMediaIds.getClass());
}
}
}else{
log.error("videoid not a number: %s", String.valueOf(oVideoId));
}
}
}
return mediaToRelatedVideos;
}
protected boolean needTotalExport() {
if(lastTotalExportTime == 0){//do total-index at startup
return true;
}else{
if(rotateAtHour > -1){//at this hour to all-export
Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int day = c.get(Calendar.DAY_OF_YEAR);
if(hour == this.rotateAtHour && (totalExpDayOfyear != day)){
totalExpDayOfyear = day;
return true;
}
}else{//set not daily total-rotate, then check rotate inteval
long hasPassedSeconds = (System.currentTimeMillis() - lastTotalExportTime) / 1000;
if(hasPassedSeconds > this.rotateItvSeconds){
return true;
}
}
return false;
}
}
protected boolean needUpdate() {
return false;
}
}
|
[
"liyw@funshion.com"
] |
liyw@funshion.com
|
2a6d45b38e41a92e9d4e6225f4b701e69bcc64c5
|
f5f143087f35fa67fa4c54cad106a32e1fb45c0e
|
/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java
|
57b7dd7a7df7e51e181bb6aeceb3bbf896fe6f71
|
[] |
no_license
|
SiverDX/SWFCopyValues
|
03b665b8f4ae3a2a22f360ea722813eeb52b4ef0
|
d146d8dcf6d1f7a69aa0471f85b852e64cad02f7
|
refs/heads/master
| 2022-07-29T06:56:55.446686
| 2021-12-04T09:48:48
| 2021-12-04T09:48:48
| 324,795,135
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,436
|
java
|
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
import com.jpexs.decompiler.flash.abc.avm2.model.operations.LShiftAVM2Item;
import com.jpexs.decompiler.flash.ecma.EcmaScript;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.TranslateStack;
import java.util.List;
/**
*
* @author JPEXS
*/
public class LShiftIns extends InstructionDefinition {
public LShiftIns() {
super(0xa5, "lshift", new int[]{}, true);
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) {
int value2 = EcmaScript.toInt32(lda.operandStack.pop()) & 0x1F;
int value1 = EcmaScript.toInt32(lda.operandStack.pop());
int value3 = value1 << value2;
lda.operandStack.push(value3);
return true;
}
@Override
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
GraphTargetItem v2 = stack.pop();
GraphTargetItem v1 = stack.pop();
stack.push(new LShiftAVM2Item(ins, localData.lineStartInstruction, v1, v2));
}
@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 2;
}
@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 1;
}
}
|
[
"kai.zahn@yahoo.de"
] |
kai.zahn@yahoo.de
|
88f3f839d2bc1329932161af02f1e6fe207dc97c
|
8bc54d94c6904e7d2144cdcd5f1a097451a79a5a
|
/service-component/service-auth/src/main/java/com/cloud/auth/service/impl/ResourceServiceImpl.java
|
0bedc3c4f4c7b43b477ada2b575e3c9a5ae42682
|
[] |
no_license
|
zhuwj921/spring-cloud-framework
|
565597825e3e55d645d991b7e14b0cf8ed0c162f
|
df82fbb74195571c3878cd03dcebb830c94cef35
|
refs/heads/master
| 2022-07-25T01:57:39.044341
| 2022-07-23T15:44:17
| 2022-07-23T15:44:17
| 118,253,375
| 76
| 54
| null | 2020-12-06T14:50:50
| 2018-01-20T15:09:00
|
Java
|
UTF-8
|
Java
| false
| false
| 491
|
java
|
package com.cloud.auth.service.impl;
import com.cloud.auth.entity.Resource;
import com.cloud.auth.mapper.ResourceMapper;
import com.cloud.auth.service.IResourceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author zhuwj
* @since 2022-05-15
*/
@Service
public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> implements IResourceService {
}
|
[
"774623096@qq.com"
] |
774623096@qq.com
|
c93e12d69af5beb49c4444d7493d01e34925df65
|
fba267c46432986cddf6f92576731d5cefaff9d0
|
/src/main/java/com/xinhu/wealth/jgt/model/dto/yunyiDTO/TraResYunYiDTO.java
|
0d02747efcda674e234590a0dc14db4753b97e34
|
[] |
no_license
|
wyt-hero/123456
|
b8bb5bd83f29501f1632b4c3c3d1add325236531
|
5b11d94743396bdf871024849a8b8339b7f959a8
|
refs/heads/master
| 2022-12-02T04:44:44.871345
| 2020-08-20T01:22:46
| 2020-08-20T01:22:46
| 288,873,244
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
package com.xinhu.wealth.jgt.model.dto.yunyiDTO;
import lombok.Data;
/**
* @author wyt
* @data 2020/4/2 20:52
* 4.5 基金账户确认结果查询
*/
@Data
public class TraResYunYiDTO {
private String InstitutionMarking;//机构标识
private String InvestorCode;//客户号
private String TransactionAccountID;//交易账号
private String TAAccountID;//基金帐号
private String Oserialno;//申报编号
private String Appserialno;//申请单编号
private String Fdate;//日期
private String PageIndex;//页码编号
private String RowSize ;//每页数量
}
|
[
"admin@example.com"
] |
admin@example.com
|
596f75c36afc636719fe468ea8aa09b9b960d5ca
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/40/org/apache/commons/math/distribution/CauchyDistribution_CauchyDistribution_65.java
|
845669b8fffe058520dad4259bd4adef99fab372
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
org apach common math distribut
implement cauchi distribut
href http wikipedia org wiki cauchi distribut cauchi distribut wikipedia
href http mathworld wolfram cauchi distribut cauchydistribut html cauchi distribut math world mathworld
chang concret
version
cauchi distribut cauchydistribut abstract continu distribut abstractcontinuousdistribut
creat cauchi distribut median scale
param median median distribut
param scale scale paramet distribut
cauchi distribut cauchydistribut median scale
median scale default invers absolut accuraci
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
06a6769b016e35ac6ba44912adbe5beedd2b3c5d
|
95b3397fd148b1f5fba08ef8c9d34f59f0b7cd99
|
/app/src/main/java/com/jinshan/application/entity/SearchEntity.java
|
778510a585a8c8a9aaa1396ab8c57dcf7036d597
|
[] |
no_license
|
wpf-191514617/jinshanapp
|
4f344370a7ce5dfc004cc22f753fe3ea103a794b
|
79f82a4c89e1fa2dad05a62cfe65d225f8b82cbb
|
refs/heads/master
| 2020-04-28T10:59:35.834485
| 2019-03-12T14:04:50
| 2019-03-12T14:04:50
| 175,220,606
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
package com.jinshan.application.entity;
import java.util.List;
public class SearchEntity {
public String title;
public List<ProductEntity> entityList;
}
|
[
"15291967179@163.com"
] |
15291967179@163.com
|
f4eb107b9817eec013e0a4e9b3302cb135d7d7c0
|
964601fff9212bec9117c59006745e124b49e1e3
|
/matos-android/src/main/java/android/widget/Button.java
|
a69eb53a6bb71adc99eb1d0a3a362425773b0d1d
|
[
"Apache-2.0"
] |
permissive
|
vadosnaprimer/matos-profiles
|
bf8300b04bef13596f655d001fc8b72315916693
|
fb27c246911437070052197aa3ef91f9aaac6fc3
|
refs/heads/master
| 2020-05-23T07:48:46.135878
| 2016-04-05T13:14:42
| 2016-04-05T13:14:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,158
|
java
|
package android.widget;
/*
* #%L
* Matos
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2010 - 2014 Orange SA
* %%
* 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.
* #L%
*/
@com.francetelecom.rd.stubs.annotation.ClassDone(0)
public class Button
extends TextView{
// Constructors
public Button(android.content.Context arg1){
super((android.content.Context) null);
}
public Button(android.content.Context arg1, android.util.AttributeSet arg2){
super((android.content.Context) null);
}
public Button(android.content.Context arg1, android.util.AttributeSet arg2, int arg3){
super((android.content.Context) null);
}
}
|
[
"pierre.cregut@orange.com"
] |
pierre.cregut@orange.com
|
ac70ffdb80126b70a7212383a16459cc89e955d6
|
06d4c28ab6b5c2ba906e8628e3e69b8ce14773be
|
/Project_Auction/7拍卖/AuctionSys/src/auction/ss/controller/ProductRenewServlet.java
|
8744a158ff39800143388d5424601ed98e262b4c
|
[] |
no_license
|
Jars20/JavaEE
|
0e29792cde2ae110d8222a82e20080b4f09c597a
|
0a3012248bcddfe47387932208a4678734a5d150
|
refs/heads/master
| 2022-12-31T01:16:51.214140
| 2020-08-17T05:50:37
| 2020-08-17T05:50:37
| 274,058,103
| 0
| 0
| null | 2020-10-13T23:43:15
| 2020-06-22T06:31:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,420
|
java
|
package auction.ss.controller;
import auction.ss.dao.IProductDao;
import auction.ss.dao.impl.ProductDaoImpl;
import auction.ss.entity.Product;
import auction.ss.service.Impl.ProductServiceImpl;
import auction.ss.service.ProductService;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
/**
* @author WM
* @date 2020/7/11 3:31 下午
* 描述信息:
*/
@WebServlet(name = "ProductRenewServlet", urlPatterns = "/renewProdcuct.do")
public class ProductRenewServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("进入商品修改页面");
ProductService productService = new ProductServiceImpl();
request.setCharacterEncoding("UTF-8");
//构造更新过的product
String name = request.getParameter("name");
Double basePrice = Double.valueOf(request.getParameter("basePrice"));
Double lowPrice = Double.valueOf(request.getParameter("lowPrice"));
String startTime = request.getParameter("startTime");
String finaTime = request.getParameter("finaTime");
String description = request.getParameter("description");
// System.out.println("request中传来的数据"+name+" "+basePrice+" "+lowPrice+" "+lowPrice+" "+startTime+" "+finaTime+" "+description);
HttpSession session=request.getSession();
Product productOrg = (Product)session.getAttribute("productRenew");
Product product = new Product(productOrg.getId(),name,description,lowPrice,basePrice,startTime,finaTime,productOrg.getHighPriceTemp(),productOrg.getOnSell(),productOrg.getSoldOrNot());
try {
productService.renewProduct(product);
} catch (SQLException | ParseException e) {
e.printStackTrace();
}
// request.setAttribute("message","renewSuccess");
response.sendRedirect("search_product.do");
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
}
|
[
"you@example.com"
] |
you@example.com
|
3708cb462884e4ff5abe0f5a533753c9cd159860
|
2007d40464b86debe8cbb363999c28e98290feb5
|
/src/test/java/TestGeoIpLocal.java
|
bcaf27225293584fc65467b050a06d7003762fd9
|
[] |
no_license
|
vangogh-ken/selenium-x-forwarded-for
|
83a2ec9c3427f0d9a39326dcbbee170372de00a7
|
e3f6b25d6e4d6e65504c9357a9155533c727bb46
|
refs/heads/master
| 2021-06-20T10:08:31.599245
| 2017-07-26T05:35:10
| 2017-07-26T05:35:10
| 98,199,362
| 0
| 0
| null | 2017-07-24T14:23:28
| 2017-07-24T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
import org.apache.http.HeaderElement;
import org.apache.http.message.BasicHeaderElement;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.seploid.blog.x_forwarded_for.ui.driver.BrowserType;
import org.seploid.blog.x_forwarded_for.ui.driver.DeviceType;
import org.seploid.blog.x_forwarded_for.ui.driver.DriverManager;
import java.util.ArrayList;
import java.util.List;
public class TestGeoIpLocal {
WebDriver driver;
@Test
public void testFirefox() {
// preparing
String expectedResult = "81.133.75.58";
List<HeaderElement> headerElements = new ArrayList<HeaderElement>();
headerElements.add(new BasicHeaderElement("X-Forwarded-For", expectedResult));
// opening geo ip
driver = DriverManager.getWebDriverWithCustomHeaderLocal(BrowserType.FIREFOX, DeviceType.NEXUS5_ANDROID4, headerElements);
driver.get("http://ru.smart-ip.net/geoip");
String actualResult = driver.findElement(By.id("hostname")).getAttribute("value");
Assert.assertEquals("Incorrect!", expectedResult, actualResult);
}
@Test
public void testChrome() {
// preparing
String expectedResult = "81.133.75.58";
List<HeaderElement> headerElements = new ArrayList<HeaderElement>();
headerElements.add(new BasicHeaderElement("X-Forwarded-For", expectedResult));
// opening geo ip
driver = DriverManager.getWebDriverWithCustomHeaderLocal(BrowserType.CHROME, DeviceType.NEXUS5_ANDROID4, headerElements);
driver.get("http://ru.smart-ip.net/geoip");
String actualResult = driver.findElement(By.id("hostname")).getAttribute("value");
Assert.assertEquals("Incorrect!", expectedResult, actualResult);
}
@After
public void tearDown() {
driver.close();
driver.quit();
}
}
|
[
"user.name"
] |
user.name
|
d605f1c93a18eec080283ea75db348eca145c8b6
|
587124198d4b31f256b751eeb101a65f1a4dd896
|
/desktop/setup-console/src/main/java/com/intel/mtwilson/setup/model/Cluster.java
|
46d9d1dd047951581d50a54fa226ecbe02c7847f
|
[
"BSD-3-Clause"
] |
permissive
|
opencit/opencit
|
2a66386bcb8a503ab45c129dd4c2159400539bcb
|
069bb5082becd0da7435675f569b46d2178b70ac
|
refs/heads/release-cit-2.2
| 2021-05-24T01:48:03.262565
| 2019-11-20T01:24:36
| 2019-11-20T01:24:36
| 56,611,216
| 46
| 29
|
NOASSERTION
| 2021-03-22T23:48:17
| 2016-04-19T15:57:26
|
Java
|
UTF-8
|
Java
| false
| false
| 433
|
java
|
/*
* Copyright (C) 2012 Intel Corporation
* All rights reserved.
*/
package com.intel.mtwilson.setup.model;
/**
*
* @author jbuhacoff
*/
public class Cluster {
private String[] endpoints; // public hostnames or IP addresses (for example the load balancers); for non-load-balanced clusters this is the same as members
private String[] members; // each hostnames or IP addresses of each member instance of the cluster
}
|
[
"jonathan.buhacoff@intel.com"
] |
jonathan.buhacoff@intel.com
|
fd0e92a9f2a0280611c2dfd0665a5a3d2ea4ed38
|
62e334192393326476756dfa89dce9f0f08570d4
|
/tk_code/galaxy-search/search-server/src/main/java/com/ht/galaxy/controller/HiveController.java
|
06485ad2dac447499424069bed5dfe422f257bb7
|
[] |
no_license
|
JellyB/code_back
|
4796d5816ba6ff6f3925fded9d75254536a5ddcf
|
f5cecf3a9efd6851724a1315813337a0741bd89d
|
refs/heads/master
| 2022-07-16T14:19:39.770569
| 2019-11-22T09:22:12
| 2019-11-22T09:22:12
| 223,366,837
| 1
| 2
| null | 2022-06-30T20:21:38
| 2019-11-22T09:15:50
|
Java
|
UTF-8
|
Java
| false
| false
| 2,889
|
java
|
package com.ht.galaxy.controller;
import com.ht.galaxy.common.Event;
import com.ht.galaxy.service.HiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* @author gaoyuchao
* @create 2018-07-03 18:12
*/
@RestController
public class HiveController {
@Autowired
private HiveService hiveService;
@RequestMapping("/bj/active/type")
public Map<String,List> select(@RequestParam("startTime") String startTime,
@RequestParam("endTime") String endTime,
@RequestParam("mode") String mode,
@RequestParam("type") String type) throws Exception{
return hiveService.selectType(startTime,endTime,mode,type);
}
@RequestMapping("/bj/active/sum")
public List select(@RequestParam("startTime") String startTime,
@RequestParam("endTime") String endTime,
@RequestParam("mode") String mode) throws Exception{
return hiveService.selectMode(startTime,endTime,mode);
}
@PostMapping("/bj/active/event")
public Map<String,List> select(@RequestParam("startTime") String startTime,
@RequestParam("endTime") String endTime,
@RequestParam("mode") String mode,
@RequestParam("sign") String sign,
@RequestBody Event event) throws Exception{
return hiveService.selectEvent(startTime,endTime,mode,sign,event);
}
@RequestMapping("/bj/active/real/sum")
public int selectSum(@RequestParam("mode") String mode) throws Exception{
return hiveService.selectSum(mode);
}
@RequestMapping("/bj/active/real/real")
public List selectSumReal(@RequestParam("time") String time,
@RequestParam("mode") String mode) throws Exception{
return hiveService.selectSumReal(time, mode);
}
@RequestMapping("/bj/active/selectAll")
public List selectAll(@RequestParam("startTime") String startTime,
@RequestParam("endTime") String endTime,
@RequestParam("mode") String mode,
@RequestParam("type") String type) throws Exception{
return hiveService.selectAll(startTime, endTime, mode, type);
}
@RequestMapping("/bj/active/terminal")
public Map<String,List> selectTerminal(@RequestParam("startTime") String startTime,
@RequestParam("endTime") String endTime,
@RequestParam("mode") String mode,
@RequestParam("terminal") String terminal) throws Exception {
return hiveService.selectTerminal(startTime, endTime, mode, terminal);
}
}
|
[
"jelly_b@126.com"
] |
jelly_b@126.com
|
fe6f2168372c061e77aa0e06dc669d0dc36b0dae
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-12667-3-8-Single_Objective_GGA-WeightedSum/org/xwiki/model/reference/AttachmentReference_ESTest.java
|
267d2941b00ee86f8fa2cab14719203e26c47638
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,259
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Mar 30 18:15:48 UTC 2020
*/
package org.xwiki.model.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
import org.xwiki.model.reference.AttachmentReference;
import org.xwiki.model.reference.DocumentReference;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AttachmentReference_ESTest extends AttachmentReference_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
DocumentReference documentReference0 = mock(DocumentReference.class, new ViolatedAssumptionAnswer());
AttachmentReference attachmentReference0 = new AttachmentReference("VZ\"nf-GI0o3_2tQr7", documentReference0);
DocumentReference documentReference1 = mock(DocumentReference.class, new ViolatedAssumptionAnswer());
AttachmentReference attachmentReference1 = new AttachmentReference((String) null, documentReference1);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
6bbf2f2d10b5d538689a6ff9f7f59ffb6d7bf1ed
|
1e671aad06682da80282dd83dece1937239a848f
|
/demo/src/com/zhaoqy/app/demo/menu/cloud/item/FileItem.java
|
1bb6a0b49017bfc3a00355a39efd3509570fc22a
|
[] |
no_license
|
zhaoqingyue/EclipseStudy
|
548671318b074c833d3e12b8dc6379a85e122576
|
f2238125e55333a7651fec546f39fd23dee0197e
|
refs/heads/master
| 2020-04-04T03:24:09.966018
| 2018-11-01T12:41:11
| 2018-11-01T12:41:11
| 155,712,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.zhaoqy.app.demo.menu.cloud.item;
public class FileItem
{
public int fileIconRes;
public String fileName;
public String fileMsg;
public FileItem(int fileIconRes, String fileName, String fileMsg)
{
this.fileIconRes = fileIconRes;
this.fileName = fileName;
this.fileMsg = fileMsg;
}
}
|
[
"1023755730@qq.com"
] |
1023755730@qq.com
|
947e2a692cbffaf6fdbbc4641fdc9d16deee74a7
|
045d09449f73c1fcdd2027c63ab66689438127aa
|
/chapter_001/src/test/java/ru/job4j/loop/MortgageTest.java
|
06cd396a763ec34b1b54255ad00dfcf7d691a699
|
[
"Apache-2.0"
] |
permissive
|
staskorobeynikov/job4j
|
d2d7783f362ffec3d1adbdc400f155514f6af3d2
|
b95a745fb7e6e33decc64df4828f497272a76206
|
refs/heads/master
| 2023-05-24T20:50:59.679469
| 2022-03-02T15:25:34
| 2022-03-02T15:25:34
| 224,664,472
| 3
| 1
|
Apache-2.0
| 2023-05-23T20:10:40
| 2019-11-28T13:55:59
|
Java
|
UTF-8
|
Java
| false
| false
| 671
|
java
|
package ru.job4j.loop;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
public class MortgageTest {
@Test
public void when1Year() {
Mortgage mortgage = new Mortgage();
int year = mortgage.year(1000, 1200, 1);
assertThat(year, is(1));
}
@Test
public void when2Year() {
Mortgage mortgage = new Mortgage();
int year = mortgage.year(100, 120, 50);
assertThat(year, is(2));
}
@Test
public void whenXYear() {
Mortgage mortgage = new Mortgage();
int year = mortgage.year(50000, 20000, 30);
assertThat(year, is(6));
}
}
|
[
"stas.korobeinikov@mail.ru"
] |
stas.korobeinikov@mail.ru
|
9d260e9eb061732bf772577f3ce01645da1b550b
|
6ffae9d9fc04edb1c1d8fe39d2e6f0c01e39e443
|
/EIUM/src/main/java/com/myspring/eium/wm/wm_p0005/controller/WM_P0005ControllerImpl.java
|
d4487463d25fd01cad1f4e6ddc238eb98ff324f2
|
[] |
no_license
|
rexypark/Spring
|
8b5c3e1bb49164762e3f71d5112b35e19c5bb734
|
dd2a19b280742c1d0e718acb1a75ed7265c0c2c1
|
refs/heads/master
| 2022-12-23T09:59:21.396716
| 2020-02-27T10:13:35
| 2020-02-27T10:13:35
| 239,946,239
| 0
| 0
| null | 2022-12-16T09:43:37
| 2020-02-12T06:52:19
|
Java
|
UTF-8
|
Java
| false
| false
| 3,209
|
java
|
package com.myspring.eium.wm.wm_p0005.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.myspring.eium.login.vo.LoginVO;
import com.myspring.eium.wm.wm_p0005.service.WM_P0005ServiceImpl;
import com.myspring.eium.wm.wm_p0005.vo.WM_P0005VO;
@Controller
public class WM_P0005ControllerImpl implements WM_P0005Controller{
private static final Logger logger = LoggerFactory.getLogger(WM_P0005ControllerImpl.class);
@Autowired
WM_P0005ServiceImpl WM_P0005Service;
@Autowired
WM_P0005VO WM_P0005VO;
@Override
@RequestMapping(value = "/wm/p0005/searchInit.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView searchInit(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("wm/wm_p0005/p0005");
return mav;
}
@Override
@RequestMapping(value = "/wm/p0005/searchList.do", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public Map searchList(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
HttpSession session = request.getSession();
LoginVO loginvo = new LoginVO();
loginvo = (LoginVO)session.getAttribute("login");
Map<String, Object> accessMap = new HashMap<String, Object>();
ArrayList<String> accessRange = new ArrayList<String>();
accessRange = (ArrayList<String>) session.getAttribute("access_range");
accessMap = (Map<String, Object>) session.getAttribute("accessnum");
int n = (Integer) accessMap.get("M032");
System.out.println(accessRange.get(n));
System.out.println("사원코드"+loginvo.getEmployee_code());
System.out.println("부서코드"+loginvo.getDepartment_code());
Map<String, Object> searchMap = new HashMap<String, Object>();
Map<String, Object> resultMap = new HashMap<String, Object>();
searchMap.put("access_range", accessRange.get(n));
searchMap.put("Semployee_code",loginvo.getEmployee_code());
searchMap.put("Sdepartment_code", loginvo.getDepartment_code());
searchMap.put("date", request.getParameter("date"));
searchMap.put("date2", request.getParameter("date2"));
searchMap.put("SiteList", request.getParameter("SiteList"));
searchMap.put("DeptList", request.getParameter("DeptList"));
searchMap.put("Employee_Select", request.getParameter("Employee_Select"));
searchMap.put("p_text", request.getParameter("p_text"));
List<WM_P0005VO> data = WM_P0005Service.searchList(searchMap);
resultMap.put("Data", data);
return resultMap;
}
}
|
[
"hotboa3091@naver.com"
] |
hotboa3091@naver.com
|
a4680b29ef8259943d2cda4e32b693e4691ef34c
|
49cbccf46f6326ecbba3aa539e07a7a1c3513137
|
/khem-joelib/src/main/java/joelib2/feature/types/atomlabel/AbstractVanDerWaalsVolume.java
|
880d71a67781a45b6b3261b7254ce7d6b7d3951b
|
[
"Apache-2.0"
] |
permissive
|
ggreen/khem
|
1bbd4b3c1990c884a4f8daa73bfd281dbf49d951
|
966a6858d0dd0a9776db7805ee6b21a7304bbcc6
|
refs/heads/master
| 2021-01-02T22:45:40.833322
| 2018-06-27T13:51:04
| 2018-06-27T13:51:04
| 31,036,095
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,018
|
java
|
///////////////////////////////////////////////////////////////////////////////
//Filename: $RCSfile: AbstractVanDerWaalsVolume.java,v $
//Purpose: TODO description.
//Language: Java
//Compiler: JDK 1.5
//Created: Jan 28, 2005
//Authors: Joerg Kurt Wegner
//Version: $Revision: 1.3 $
// $Date: 2005/02/17 16:48:31 $
// $Author: wegner $
//
// Copyright OELIB: OpenEye Scientific Software, Santa Fe,
// U.S.A., 1999,2000,2001
// Copyright JOELIB/JOELib2: Dept. Computer Architecture, University of
// Tuebingen, Germany, 2001,2002,2003,2004,2005
// Copyright JOELIB/JOELib2: ALTANA PHARMA AG, Konstanz, Germany,
// 2003,2004,2005
//
//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 version 2 of the License.
//
//This program 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.
///////////////////////////////////////////////////////////////////////////////
package joelib2.feature.types.atomlabel;
import joelib2.data.BasicElementHolder;
import joelib2.molecule.Atom;
/**
* TODO description.
*
* @.author wegnerj
* @.license GPL
* @.cvsversion $Revision: 1.3 $, $Date: 2005/02/17 16:48:31 $
*/
public class AbstractVanDerWaalsVolume
{
//~ Methods ////////////////////////////////////////////////////////////////
public static double calculate(Atom atom)
{
return BasicElementHolder.instance().correctedVdwRad(atom
.getAtomicNumber(), AtomHybridisation.getIntValue(atom));
}
}
///////////////////////////////////////////////////////////////////////////////
//END OF FILE.
///////////////////////////////////////////////////////////////////////////////
|
[
"ggreen@pivotal.io"
] |
ggreen@pivotal.io
|
7305fb2f6703eb13e86c2e7604f6d681fd86dc85
|
0dcd633de13f79941bb3f67e2b72a856ff944011
|
/MyBatisGenerator插件的使用/src/main/java/org/lint/DAO/EcsShopConfigMapper.java
|
6d3c74a13f3fff6da4b1e8487310a4dea849393e
|
[] |
no_license
|
lintsGitHub/StudyMyBatisExample
|
07666f4a94c05cfb9e92af790d9eefff25e50ced
|
d160472cc481e3843183647086e9e956643f9c9e
|
refs/heads/master
| 2020-04-05T02:12:51.335275
| 2019-02-17T06:14:46
| 2019-02-17T06:14:46
| 156,468,204
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
package org.lint.DAO;
import java.util.List;
import org.lint.Entity.EcsShopConfig;
public interface EcsShopConfigMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ecs_shop_config
*
* @mbg.generated
*/
int deleteByPrimaryKey(Short id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ecs_shop_config
*
* @mbg.generated
*/
int insert(EcsShopConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ecs_shop_config
*
* @mbg.generated
*/
EcsShopConfig selectByPrimaryKey(Short id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ecs_shop_config
*
* @mbg.generated
*/
List<EcsShopConfig> selectAll();
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ecs_shop_config
*
* @mbg.generated
*/
int updateByPrimaryKey(EcsShopConfig record);
}
|
[
"2145604059@qq.com"
] |
2145604059@qq.com
|
e344e3dfff6006748443a23d71bfb3f43fdfe8b1
|
a15f8e4c24f061a73384a8a4e3fa6e01c2c06c4c
|
/twitter4j-stream/src/main/java/twitter4j/StreamImplementation.java
|
569e99a53b8d79a39ca8a1c95b0fcf1e40cf5053
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
Sanchay-Sethi/twitter4j
|
c443a8a1646845fff81f3d969056d92496047f95
|
c2b13065aab449c72c298ec28e77ba45db16cb0d
|
refs/heads/master
| 2020-08-11T20:44:39.280343
| 2013-11-21T03:31:18
| 2013-11-21T03:31:18
| 214,624,174
| 0
| 0
|
Apache-2.0
| 2019-10-12T10:03:14
| 2019-10-12T10:03:14
| null |
UTF-8
|
Java
| false
| false
| 415
|
java
|
package twitter4j;
import java.io.IOException;
/**
* @author Yusuke Yamamoto - yusuke at mac.com
* @since Twitter4J 2.1.8
*/
interface StreamImplementation {
void next(StreamListener[] listeners, RawStreamListener[] rawStreamListeners) throws TwitterException;
void close() throws IOException;
void onException(Exception ex, StreamListener[] listeners, RawStreamListener[] rawStreamListeners);
}
|
[
"yusuke@mac.com"
] |
yusuke@mac.com
|
f6bbee3d053a340f7e70e56ed1506b967bcf9569
|
5076d14c853effaa65be6103fa4d47e246b3ca27
|
/src/main/java/com/tyc/service/impl/TblAttuploadServiceImpl.java
|
9f616b6446be6eccb62a1426cc8f0726d858c604
|
[] |
no_license
|
Tang5566/family_service_platform
|
cea82017c5517518e0f501f19491da0591a5ab25
|
2b02d39198ae0ef8baa33456a81ab79a28370aba
|
refs/heads/master
| 2023-03-06T14:20:38.861485
| 2021-02-23T13:56:37
| 2021-02-23T13:56:37
| 341,571,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 511
|
java
|
package com.tyc.service.impl;
import com.tyc.bean.TblAttupload;
import com.tyc.mapper.TblAttuploadMapper;
import com.tyc.service.TblAttuploadService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 附件 服务实现类
* </p>
*
* @author tyc
* @since 2021-02-20
*/
@Service
public class TblAttuploadServiceImpl extends ServiceImpl<TblAttuploadMapper, TblAttupload> implements TblAttuploadService {
}
|
[
"1213859735@qq.com"
] |
1213859735@qq.com
|
57a58c997a02476a708cdf0e1453dd27fa0c8bd5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_01fc990b407c1b479c32efe3b14c8f1a7dc91c61/AuthorParserCSV/25_01fc990b407c1b479c32efe3b14c8f1a7dc91c61_AuthorParserCSV_t.java
|
49841044b0fc1f0ece68416406f1d08487b130de
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,124
|
java
|
package net.kurochenko.ispub.upload;
import au.com.bytecode.opencsv.CSVReader;
import net.kurochenko.ispub.author.form.Author;
import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* User: kurochenko
* Date: 7/9/11
* Time: 8:12 PM
*/
public class AuthorParserCSV implements AuthorParser {
@Override
public Collection<Author> parse(InputStream fileIS) throws IOException {
if (fileIS == null) {
throw new IllegalArgumentException("Input Stream is null");
}
List<Author> authors = new ArrayList<Author>();
CSVReader reader = new CSVReader(new InputStreamReader(fileIS, "UTF-8"), ',', '"');
String [] line;
Author author = null;
while ((line = reader.readNext()) != null) {
author = new Author();
author.setName(line[AuthorCSVColumnNumbers.NAME.getColumnNumber()]);
author.setSurname(line[AuthorCSVColumnNumbers.SURNAME.getColumnNumber()]);
authors.add(author);
}
return authors;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
6374bcc2cd2b65b383dde26ad457bf31c367d1c5
|
dfb8b54fa16a4c0532b7863723c661258f21f2bb
|
/src/main/java/com/tong/thinking/chapter19/s10/p610/Category.java
|
3addcfc67f6516b5562cb75f4138496d106ee870
|
[] |
no_license
|
Tong-c/javaBasic
|
86c52e2bb5b9e0eabe7f77ed675cda999cc32255
|
6cfb9e0e8f43d74fd5c2677cd251fec3cce799c4
|
refs/heads/master
| 2021-06-01T11:53:53.672254
| 2021-01-05T03:58:10
| 2021-01-05T03:58:10
| 130,291,741
| 2
| 0
| null | 2020-10-13T02:37:08
| 2018-04-20T01:28:16
|
Java
|
UTF-8
|
Java
| false
| false
| 848
|
java
|
package com.tong.thinking.chapter19.s10.p610;
import com.tong.thinking.chapter19.s10.p609.Input;
import java.util.EnumMap;
import static com.tong.thinking.chapter19.s10.p609.Input.*;
public enum Category {
MONEY(NICKEL, DIME, QUARTER, DOLLAR),
ITEM_SELECTION(TOOTHPASTE, CHIPS, SODA, SOAP),
QUIT_TRANSACTION(ABORT_TRANSACTION),
SHUT_DOWN(STOP);
private Input[] values;
Category(Input... types) {
values = types;
}
private static EnumMap<Input, Category> categories = new EnumMap<Input, Category>(Input.class);
static {
for (Category c : Category.class.getEnumConstants()) {
for (Input type : c.values) {
categories.put(type, c);
}
}
}
public static Category categorize(Input input) {
return categories.get(input);
}
}
|
[
"1972376180@qq.com"
] |
1972376180@qq.com
|
2e9adb5da7d97e2cdadd9e5472d778393eba3c97
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/modules/order-management/warehousing/testsrc/de/hybris/platform/warehousing/util/BaseSourcingIntegrationTest.java
|
1442f5646cef28f158ce47ab3d750c05ce61a089
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 5,022
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.warehousing.util;
import de.hybris.platform.core.model.order.AbstractOrderEntryModel;
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.ordersplitting.model.WarehouseModel;
import de.hybris.platform.store.BaseStoreModel;
import de.hybris.platform.warehousing.data.sourcing.SourcingResult;
import de.hybris.platform.warehousing.data.sourcing.SourcingResults;
import de.hybris.platform.warehousing.model.SourcingConfigModel;
import de.hybris.platform.warehousing.returns.service.RestockConfigService;
import de.hybris.platform.warehousing.sourcing.SourcingService;
import de.hybris.platform.warehousing.util.models.Addresses;
import de.hybris.platform.warehousing.util.models.Asns;
import de.hybris.platform.warehousing.util.models.AtpFormulas;
import de.hybris.platform.warehousing.util.models.BaseStores;
import de.hybris.platform.warehousing.util.models.DeliveryModes;
import de.hybris.platform.warehousing.util.models.Orders;
import de.hybris.platform.warehousing.util.models.PointsOfService;
import de.hybris.platform.warehousing.util.models.Products;
import de.hybris.platform.warehousing.util.models.StockLevels;
import de.hybris.platform.warehousing.util.models.Users;
import de.hybris.platform.warehousing.util.models.Warehouses;
import javax.annotation.Resource;
import java.util.Map;
import java.util.Optional;
import com.google.common.collect.Lists;
import org.junit.After;
import org.junit.Before;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class BaseSourcingIntegrationTest extends BaseWarehousingIntegrationTest
{
@Resource
protected SourcingService sourcingService;
@Resource
protected Orders orders;
@Resource
protected BaseStores baseStores;
@Resource
protected Warehouses warehouses;
@Resource
protected Addresses addresses;
@Resource
protected StockLevels stockLevels;
@Resource
protected DeliveryModes deliveryModes;
@Resource
protected PointsOfService pointsOfService;
@Resource
protected Products products;
@Resource
protected Users users;
@Resource
protected Asns asns;
@Resource
protected AtpFormulas atpFormulas;
@Resource
protected RestockConfigService restockConfigService;
public BaseSourcingIntegrationTest() {
}
@Before
public void setupShopper()
{
users.Nancy();
}
@Before
public void setupBaseStore()
{
baseStores.NorthAmerica().setPointsOfService(Lists.newArrayList( //
pointsOfService.Boston(), //
pointsOfService.Montreal_Downtown() //
));
saveAll();
}
@After
public void resetFactors()
{
modelService.remove(baseStores.NorthAmerica().getSourcingConfig());
}
/**
* Assert that the sourcing result selected the correct warehouse and sourced the correct quantity.
*
* @param results
* @param expectedWarehouse
* @param expectedAllocation
*/
protected void assertSourcingResultContents(final SourcingResults results, final WarehouseModel expectedWarehouse,
final Map<ProductModel, Long> expectedAllocation)
{
final Optional<SourcingResult> sourcingResult = results.getResults().stream()
.filter(result -> result.getWarehouse().getCode().equals(expectedWarehouse.getCode())).findFirst();
assertTrue("No sourcing result with warehouse " + expectedWarehouse.getCode(), sourcingResult.isPresent());
assertEquals(expectedWarehouse.getCode(), sourcingResult.get().getWarehouse().getCode());
assertTrue(sourcingResult.get().getAllocation().entrySet().stream().allMatch(
result -> expectedAllocation.get(result.getKey().getProduct()).equals(result.getValue())
));
}
/**
* Sets the sourcing factors to use.
* @param baseStore
* @param allocation
* @param distance
* @param priority
*/
protected void setSourcingFactors(final BaseStoreModel baseStore, final int allocation, final int distance, final int priority, final int score)
{
final SourcingConfigModel sourcingConfig = baseStore.getSourcingConfig();
sourcingConfig.setDistanceWeightFactor(distance);
sourcingConfig.setAllocationWeightFactor(allocation);
sourcingConfig.setPriorityWeightFactor(priority);
sourcingConfig.setScoreWeightFactor(score);
modelService.save(sourcingConfig);
}
/**
* refresh order.
* @param order
* @return
*/
protected OrderModel refreshOrder(OrderModel order)
{
final AbstractOrderEntryModel orderEntry = order.getEntries().get(0);
//Refresh consignment entries to update quantityShipped
orderEntry.getConsignmentEntries().stream().forEach(entry -> modelService.refresh(entry));
return order;
}
}
|
[
"juan.gonzalez.working@gmail.com"
] |
juan.gonzalez.working@gmail.com
|
003c7ba86dfc322740ec94911e3314f31bf688d0
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/5/230.java
|
21d2464c61d2ea66c62bd24898564ba2b92e93cd
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,021
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int i;
int j;
int l1;
int l0;
int js = 0;
double jg;
double bl;
char[][] a = new char[2][501];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
bl = Double.parseDouble(tempVar);
}
for (i = 0;i < 2;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a[i] = tempVar2.charAt(0);
}
}
l0 = String.valueOf(a[0]).length();
l1 = String.valueOf(a[1]).length();
if (l1 != l0)
{
System.out.print("error");
return 0;
}
for (j = 0;j < 2;j++)
{
for (i = 0;i < l1;i++)
{
if ((a[j][i] != 'A') && (a[j][i] != 'T') && (a[j][i] != 'C') && (a[j][i] != 'G'))
{
System.out.print("error");
return 0;
}
}
}
for (i = 0;i < l1;i++)
{
if (a[0][i] == a[1][i])
{
js++;
}
}
jg = 1.0 * js / l1;
if (jg > bl)
{
System.out.print("yes");
}
else
{
System.out.print("no");
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
5def8a1bac19cd32f6017b7a610dd038c67d24e0
|
7b7abb32d5391062c3a52d5d8b8a4cd50244631c
|
/src/test/java/com/weihui/cashdesk/action/CreatePreAuthTradeOpt.java
|
068c2a9bd9c47a92f9b592f307c508bfe019f058
|
[] |
no_license
|
shuiyou/cashdesk
|
f6cf8dff3b33392ee516ed65533ce3e61fa8feb2
|
4762645ae1b0503d772936387203803ea0102499
|
refs/heads/master
| 2023-04-27T22:02:20.347130
| 2021-05-10T09:45:58
| 2021-05-10T09:45:58
| 365,992,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,574
|
java
|
package com.weihui.cashdesk.action;
import java.util.HashMap;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import com.weihui.cashdesk.utils.BasePage;
public class CreatePreAuthTradeOpt {
private WebDriver driver = null;
private BasePage drawPage = null;
public CreatePreAuthTradeOpt(WebDriver driver) {
this.driver = driver;
}
/**
* @param data
* @return void
* @throws Exception
* @Title: 预授权
* @Description: 基本户余额支付
* @author: Lin
* @throws:
* @date Apr 13, 2017 4:33:22 PM
* @version: V1.0
*/
public void tradeByBasic(HashMap<String, String> hashMap) {
try {
new PayTypeOpt(driver).basicAccountPayType();
drawPage = new BasePage(driver, "普通账户", hashMap);
drawPage.type("预授权支付密码");
drawPage.click("预授权完成支付");
} catch (NoSuchElementException e) {
throw new AssertionError("测试流程所必需的元素定位失败,用例被迫终止");
}
}
/**
* @param data
* @return void
* @throws Exception
* @Title: 预授权
* @Description: 存钱罐余额支付
* @author: Lin
* @throws:
* @date Apr 13, 2017 4:33:22 PM
* @version: V1.0
*/
public void tradeBySavingPot(HashMap<String, String> hashMap) {
try {
drawPage = new BasePage(driver, "存钱罐账户", hashMap);
new PayTypeOpt(driver).savindPotPayType();
drawPage.type("预授权支付密码");
drawPage.click("预授权完成支付");
} catch (NoSuchElementException e) {
throw new AssertionError("测试流程所必需的元素定位失败,用例被迫终止");
}
}
/**
* @param data
* @return void
* @throws Exception
* @Title: 预授权
* @Description: 托管银行余额支付
* @author: Lin
* @throws:
* @date Apr 13, 2017 4:33:22 PM
* @version: V1.0
*/
public void tradeByHostingBank(HashMap<String, String> hashMap) {
try {
drawPage = new BasePage(driver, "银行账户", hashMap);
new PayTypeOpt(driver).bankAccountType();
drawPage.type("预授权支付密码");
drawPage.click("预授权完成支付");
} catch (NoSuchElementException e) {
throw new AssertionError("测试流程所必需的元素定位失败,用例被迫终止");
}
}
}
|
[
"hanxiaodi@magfin.cn"
] |
hanxiaodi@magfin.cn
|
8af4fe21183fb212f2182e5fe13cc04b2b5e2a9d
|
a23b277bd41edbf569437bdfedad22c2d7733dbe
|
/topcoder/SpeedTyper.java
|
387bd2c1c896f06ee9c1f1dc828f6f62962c0c74
|
[] |
no_license
|
alexandrofernando/java
|
155ed38df33ae8dae641d327be3c6c355b28082a
|
a783407eaba29a88123152dd5b2febe10eb7bf1d
|
refs/heads/master
| 2021-01-17T06:49:57.241130
| 2019-07-19T11:34:44
| 2019-07-19T11:34:44
| 52,783,678
| 1
| 0
| null | 2017-07-03T21:46:00
| 2016-02-29T10:38:28
|
Java
|
UTF-8
|
Java
| false
| false
| 369
|
java
|
public class SpeedTyper {
public String lettersToPractice(String letters, int[] times) {
String result = "";
int average = times[times.length - 1] / times.length;
for (int i = 0; i < times.length; i++) {
int keyTime = (i == 0) ? times[0] : (times[i] - times[i - 1]);
if (keyTime > average) {
result += letters.charAt(i);
}
}
return result;
}
}
|
[
"alexandrofernando@gmail.com"
] |
alexandrofernando@gmail.com
|
83355e5e35b7565bedfdcbc7d694f43b61fd7a12
|
e3b8f34aadb00dacb492b85d2f4491892e0c2d76
|
/src/main/gen/com/intellij/xtext/language/psi/XtextUnorderedGroup.java
|
9af30347b0cd5de27357b990ec21fff7c8dceb97
|
[] |
no_license
|
pakhopav/XtextPlugin
|
fd75ccc1c5462c63828dfc2598f8edb2f1a5af18
|
cf9770959c71ac066a85fca6a9308c32c0a0f4d1
|
refs/heads/main
| 2023-07-01T00:26:54.888990
| 2021-08-12T07:03:43
| 2021-08-12T07:03:43
| 394,963,718
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 402
|
java
|
// This is a generated file. Not intended for manual editing.
package com.intellij.xtext.language.psi;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface XtextUnorderedGroup extends PsiElement {
@NotNull
XtextGroup getGroup();
@Nullable
XtextUnorderedGroupSuffix1 getUnorderedGroupSuffix1();
}
|
[
"pavel.pakhomov.99@gmail.com"
] |
pavel.pakhomov.99@gmail.com
|
0e5149cbdb3d81d61749fec7e7370c7a5b18669d
|
a0e5858528a288b97aa32fb0f2170d6ed9226885
|
/emp-duty/web/src/main/java/com/taiji/emp/duty/feign/CalenSettingClient.java
|
ba1e2f02c2d1a9deb9797d63e02300bfc0150c32
|
[] |
no_license
|
rauldoblem/nangang
|
f0a0f0c816c7de915c352cc467b2e6716c87a310
|
e48cadeaf5245c42b7e9a21f28903f4f4e8b6996
|
refs/heads/master
| 2020-08-11T04:01:12.891437
| 2019-06-25T13:42:57
| 2019-06-25T13:42:57
| 214,486,888
| 0
| 0
| null | 2019-10-11T16:51:17
| 2019-10-11T16:51:17
| null |
UTF-8
|
Java
| false
| false
| 252
|
java
|
package com.taiji.emp.duty.feign;
import org.springframework.cloud.netflix.feign.FeignClient;
@FeignClient(value = "base-server-zuul/micro-emp-duty",path = "api/calenSetting")
public interface CalenSettingClient extends ICalenSettingRestService {
}
|
[
"18151950796@163.com"
] |
18151950796@163.com
|
42af3d22041ba247e82bd77fd5d27e9063782bb1
|
78bf514b661c1bce5d72e20affc9238a766f838f
|
/onlineleasing-interactive-website/src/main/java/com/sbm/module/onlineleasing/interactive/website/shop/biz/impl/ShopServiceImpl.java
|
18458881da1ab73743fbe1b6381504fcb9439a26
|
[] |
no_license
|
superbrandmall/microservice
|
5938e6661b4edd6fd6f08d52c11059690a4f2ed4
|
de932bd84b07295b186fb8d3e92d44523b391891
|
refs/heads/master
| 2021-07-01T23:36:21.102536
| 2019-03-27T05:30:07
| 2019-03-27T05:30:07
| 115,712,051
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,376
|
java
|
package com.sbm.module.onlineleasing.interactive.website.shop.biz.impl;
import com.sbm.module.common.biz.impl.CommonServiceImpl;
import com.sbm.module.onlineleasing.base.shop.biz.ITOLShopService;
import com.sbm.module.onlineleasing.interactive.website.shop.biz.IShopService;
import com.sbm.module.onlineleasing.interactive.website.shop.domain.Shop;
import com.sbm.module.onlineleasing.interactive.website.shop.domain.ShopQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class ShopServiceImpl extends CommonServiceImpl implements IShopService {
@Autowired
private ITOLShopService shopService;
@Override
@Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
public Page<Shop> findAll(ShopQuery query, Pageable pageable) {
return shopService.findAll(query.findAll(), pageable).map(e -> new Shop(e.getCode(), e.getBrandCode(), e.getMallCode(), e.getBuildingCode(), e.getFloorCode(),
e.getUnit(), e.getShopName(), e.getArea(), e.getState(), e.getHdState(), e.getHdCode(), e.getShopState(), e.getContractExpireDate(), e.getSubType()));
}
}
|
[
"295322187@qq.com"
] |
295322187@qq.com
|
4da7fddd265934b449127cbf7c396459462ebd9c
|
25d18752369ef15c14ee416511adabaa1950d305
|
/support/cas-server-support-oidc/src/main/java/org/apereo/cas/oidc/dynareg/OidcClientRegistrationResponse.java
|
37053eac42c326a9486072d7cd07ae687b4d81aa
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
zou23cn/cas
|
f37378c7b3f91ac61b47bc0763a24573a34cb908
|
55d1cfe11a863a7881642c37081e5cf0dd9e0c4a
|
refs/heads/master
| 2023-08-08T07:04:18.201328
| 2018-05-08T21:12:01
| 2018-05-08T21:12:01
| 132,698,878
| 1
| 0
|
Apache-2.0
| 2019-09-22T03:54:18
| 2018-05-09T03:50:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,240
|
java
|
package org.apereo.cas.oidc.dynareg;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.extern.slf4j.Slf4j;
import java.io.Serializable;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
/**
* This is {@link OidcClientRegistrationResponse}.
*
* @author Misagh Moayyed
* @since 5.1.0
*/
@Slf4j
@Getter
@Setter
public class OidcClientRegistrationResponse implements Serializable {
private static final long serialVersionUID = 1436206039117219598L;
@JsonProperty("client_id")
private String clientId;
@JsonProperty("client_secret")
private String clientSecret;
@JsonProperty("client_name")
private String clientName;
@JsonProperty("application_type")
private String applicationType;
@JsonProperty("subject_type")
private String subjectType;
@JsonProperty("grant_types")
private List<String> grantTypes;
@JsonProperty("response_types")
private List<String> responseTypes;
@JsonProperty("redirect_uris")
private List<String> redirectUris;
@JsonProperty("request_object_signing_alg")
private String requestObjectSigningAlg;
@JsonProperty("token_endpoint_auth_method")
private String tokenEndpointAuthMethod;
}
|
[
"mmoayyed@unicon.net"
] |
mmoayyed@unicon.net
|
1738b9e139211a9c57607538f053bf54a0fd1185
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes7.dex_source_from_JADX/com/facebook/feed/rows/sections/hidden/ui/FeedHiddenUnitActionItemView.java
|
ad38dc644d6a38d03f6751244a8d9c729420753b
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,817
|
java
|
package com.facebook.feed.rows.sections.hidden.ui;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.facebook.widget.CustomFrameLayout;
/* compiled from: Unable to instantiate methods getter for */
public class FeedHiddenUnitActionItemView extends CustomFrameLayout {
private TextView f21470a = ((TextView) c(2131561918));
private ImageView f21471b = ((ImageView) c(2131561917));
private ProgressBar f21472c = ((ProgressBar) c(2131561916));
public FeedHiddenUnitActionItemView(Context context) {
super(context);
setContentView(2130904303);
}
public final FeedHiddenUnitActionItemView m24138a(boolean z) {
int i;
int i2 = 8;
ProgressBar progressBar = this.f21472c;
if (z) {
i = 0;
} else {
i = 8;
}
progressBar.setVisibility(i);
ImageView imageView = this.f21471b;
if (!z) {
i2 = 0;
}
imageView.setVisibility(i2);
return this;
}
public void setSelected(boolean z) {
super.setSelected(z);
m24138a(z);
}
public void setEnabled(boolean z) {
super.setEnabled(z);
this.f21470a.setEnabled(z);
}
public final FeedHiddenUnitActionItemView m24137a(String str) {
this.f21470a.setText(str);
return this;
}
public final FeedHiddenUnitActionItemView m24136a(Drawable drawable) {
this.f21471b.setImageDrawable(drawable);
return this;
}
public void setOnClickListener(OnClickListener onClickListener) {
this.f21470a.setOnClickListener(onClickListener);
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
1f7596ca176d2387af43d4c7c3b491a031d2126b
|
1b50fe1118a908140b6ba844a876ed17ad026011
|
/core/src/main/java/org/narrative/network/core/narrative/rewards/UserActivityReward.java
|
55abd23504b59d36f8358892c02bf2bff74cb499
|
[
"MIT"
] |
permissive
|
jimador/narrative
|
a6df67a502a913a78cde1f809e6eb5df700d7ee4
|
84829f0178a0b34d4efc5b7dfa82a8929b5b06b5
|
refs/heads/master
| 2022-04-08T13:50:30.489862
| 2020-03-07T15:12:30
| 2020-03-07T15:12:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,661
|
java
|
package org.narrative.network.core.narrative.rewards;
import org.narrative.common.persistence.OID;
import org.narrative.common.persistence.hibernate.IntegerEnumType;
import org.narrative.network.core.narrative.rewards.dao.UserActivityRewardDAO;
import org.narrative.network.core.narrative.wallet.WalletTransaction;
import org.narrative.network.core.narrative.wallet.WalletTransactionType;
import org.narrative.network.core.user.User;
import org.narrative.network.core.user.services.UserRef;
import org.narrative.network.shared.daobase.NetworkDAOImpl;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.Proxy;
import org.hibernate.annotations.Type;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* Date: 2019-05-13
* Time: 14:59
*
* @author jonmark
*/
@Getter
@Setter
@Entity
@Proxy
@FieldNameConstants
@NoArgsConstructor
@Table(uniqueConstraints = {
@UniqueConstraint(name = "userActivityReward_user_period_uidx", columnNames = {UserActivityReward.FIELD__USER__COLUMN, UserActivityReward.FIELD__PERIOD__COLUMN})
})
public class UserActivityReward implements RewardTransactionRef<UserActivityRewardDAO>, RewardPeriodRef, UserRef {
public static final BigDecimal FOUNDERS_BONUS_MULTIPLIER = new BigDecimal("1.1");
// jw: since we will be inserting the records into this table via sql from ItemHourTrendingStats, let's just use an auto-increment PK:
// https://thoughts-on-java.org/hibernate-tips-use-auto-incremented-column-primary-key/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = Fields.oid, updatable = false, nullable = false, insertable = false)
private OID oid;
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@ForeignKey(name = "fk_userActivityReward_user")
private User user;
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@ForeignKey(name = "fk_userActivityReward_period")
private RewardPeriod period;
@ManyToOne(fetch = FetchType.EAGER)
@ForeignKey(name = "fk_userActivityReward_transaction")
private WalletTransaction transaction;
@NotNull
@Type(type = IntegerEnumType.TYPE)
private UserActivityBonus bonus;
// jw: represents the number of activity points this user accrued over the period, ultimately adjusted by their bonus and founder status
private long points;
public void applyBonus(UserActivityBonus bonus) {
assert !bonus.isNone() : "Should never apply the " + UserActivityBonus.NONE + " bonus!";
assert bonus.getBonusMultiplier()!=null : "Should always have a bonus multiplier! bonus/" + bonus;
setBonus(bonus);
BigDecimal points = BigDecimal.valueOf(getPoints());
points = points.multiply(bonus.getBonusMultiplier()).setScale(0, RoundingMode.HALF_UP);
setPoints(points.longValueExact());
}
@Override
@Transient
public WalletTransactionType getExpectedTransactionType() {
return WalletTransactionType.ACTIVITY_REWARD;
}
public static UserActivityRewardDAO dao() {
return NetworkDAOImpl.getDAO(UserActivityReward.class);
}
}
|
[
"brian@narrative.org"
] |
brian@narrative.org
|
cdc7dec29cc8592b9c09add6329f5e81db02ba42
|
8dc84558f0058d90dfc4955e905dab1b22d12c08
|
/third_party/robolectric/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/ShadowContentProviderResult.java
|
fa6db38ace7e0e3d7252ff03de0961cde2c00370
|
[
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] |
permissive
|
meniossin/src
|
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
|
44f73f7e76119e5ab415d4593ac66485e65d700a
|
refs/heads/master
| 2022-12-16T20:17:03.747113
| 2020-09-03T10:43:12
| 2020-09-03T10:43:12
| 263,710,168
| 1
| 0
|
BSD-3-Clause
| 2020-05-13T18:20:09
| 2020-05-13T18:20:08
| null |
UTF-8
|
Java
| false
| false
| 1,012
|
java
|
package org.robolectric.shadows;
import android.content.ContentProviderResult;
import android.net.Uri;
import java.lang.reflect.Field;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
@Implements(ContentProviderResult.class)
public class ShadowContentProviderResult {
@RealObject ContentProviderResult realResult;
@Implementation
public void __constructor__(Uri uri)
throws SecurityException, NoSuchFieldException, IllegalArgumentException,
IllegalAccessException {
Field field = realResult.getClass().getField("uri");
field.setAccessible(true);
field.set(realResult, uri);
}
@Implementation
public void __constructor__(int count)
throws SecurityException, NoSuchFieldException, IllegalArgumentException,
IllegalAccessException {
Field field = realResult.getClass().getField("count");
field.setAccessible(true);
field.set(realResult, count);
}
}
|
[
"arnaud@geometry.ee"
] |
arnaud@geometry.ee
|
03df79c98b17fff8d4e9a46608e13dbfefff9a2d
|
c173832fd576d45c875063a1a480672fbd59ca04
|
/seguridad/tags/release-1.0/modulos/apps/LOCALGIS-Workbench/src/main/java/com/geopista/ui/plugin/io/dxf/reader/DxfEntitySet.java
|
82ae42f0123d5199fb1ae334c792a6e7858a06b2
|
[] |
no_license
|
jormaral/allocalgis
|
1308616b0f3ac8aa68fb0820a7dfa89d5a64d0e6
|
bd5b454b9c2e8ee24f70017ae597a32301364a54
|
refs/heads/master
| 2021-01-16T18:08:36.542315
| 2016-04-12T11:43:18
| 2016-04-12T11:43:18
| 50,914,723
| 0
| 0
| null | 2016-02-02T11:04:27
| 2016-02-02T11:04:27
| null |
ISO-8859-1
|
Java
| false
| false
| 3,101
|
java
|
/*
*
* Este codigo se distribuye bajo licencia GPL
* de GNU. Para obtener una cópia integra de esta
* licencia acude a www.gnu.org.
*
* Este software se distribuye "como es". AGIL
* solo pretende desarrollar herramientas para
* la promoción del GIS Libre.
* AGIL no se responsabiliza de las perdidas económicas o de
* información derivadas del uso de este software.
*/
package com.geopista.ui.plugin.io.dxf.reader;
import java.util.*;
/**
* A set of DXF entities. Needed for SECTION ENTITIES, BLOCK, INSERT,
* POLYLINE.
*
* @version 1.03beta0 (January 1999)
*/
public class DxfEntitySet implements DxfConvertable, DxfEntityCollector {
protected Vector entities = new Vector(); // array to hold entities
protected DxfEntityCounter counter = new DxfEntityCounter(); // counter for entities
/**
* Convert this entity set using the given DxfConverter.
* @param converter the DXF converter
* @param dxf DXF file for references
* @param collector collector for results
*/
public void convert(DxfConverter converter, DxfFile dxf, Object collector) {
converter.convert(this, dxf, collector);
}
/**
* Add an entity to the set.
* @param entity entity to add
* @return <code>true</code> if the entity is added<br>
* <code>false</code> if entity is a terminator
*/
public boolean addEntity(DxfEntity entity) {
if (entity instanceof DxfENDSEC) {
// this is the end
return false;
}
entities.addElement(entity);
counter.add(entity);
return true;
}
/**
* Get a BLOCK with the given name.
* @return the BLOCK or <code>null</code>
*/
public DxfEntity getBlock(String name) {
for (Enumeration e = entities.elements(); e.hasMoreElements(); ) {
DxfEntity ent = (DxfEntity)e.nextElement();
if (ent.isBlockNamed(name)) {
return ent;
}
}
/* nothing found */
return null;
}
/**
* Get the number of entities collected here.
* @return number of entities
*/
public final int getNrOfEntities() {
return entities.size();
}
/**
* Return an enumeration of entities.
* @return enumeration of collected entities
*/
public Enumeration getEntities() {
return entities.elements();
}
/**
* Get a Enumeration of collected entity types.
* @return enumeration of collected entity types
*/
public Enumeration getCollectedEntityTypes() {
return counter.getEntityNames();
}
/**
* Get the number of entities for a given type.
* @param entType entity type (as got from getCollectedEntityTypes)
* @return number of entities of this type collected here
*/
public int getNumberOf(String entType) {
return counter.getCount(entType);
}
/**
* Get a special entity.
* @param index index of entity to return
*/
public DxfEntity getEntity(int index) {
return (DxfEntity)entities.elementAt(index);
}
}
|
[
"jorge.martin@cenatic.es"
] |
jorge.martin@cenatic.es
|
a0f51be239971087959233daf64b497dbc79b5ee
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/com_idamob_tinkoff_android/source/ru/tcsbank/mb/ui/activities/ac.java
|
fe6b456515170c3501e4c95ac60d4c2f164c60bb
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 447
|
java
|
package ru.tcsbank.mb.ui.activities;
import android.net.Uri;
import ru.tcsbank.mb.ui.f.k;
import rx.e;
public final class ac
extends k<ag>
{
final ru.tcsbank.mb.model.al.a a;
public ac(ru.tcsbank.mb.model.al.a paramA)
{
super(ag.class);
this.a = paramA;
}
public final void a(Uri paramUri)
{
((ag)o()).a(true);
a(e.a(new ad(this, paramUri)).c(rx.g.a.d()).a(rx.a.b.a.a()).a(new ae(this), new af(this)));
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
e032f2a111ac9a5ba7810d952b6fd0cbd60dcd96
|
7151ed12a9a17f65eb9f7542639d7367fec8be7d
|
/q1-service/src/main/java/com/zd/school/plartform/basedevice/service/Impl/BaseGatewayServiceImpl.java
|
60bd211d1c96a6d17aa0b3282d497441dd7c7ccf
|
[] |
no_license
|
zzk-huitu/Q1_Project
|
edac5f1e206ff28703f320872348d3d2ed474875
|
80a58942459d2dd144a2e13e72afee9f2f37b7b4
|
refs/heads/master
| 2021-04-18T22:51:43.719151
| 2018-04-03T00:11:05
| 2018-04-03T00:11:05
| 126,920,800
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,076
|
java
|
package com.zd.school.plartform.basedevice.service.Impl;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.hibernate.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.zd.core.service.BaseServiceImpl;
import com.zd.core.util.BeanUtils;
import com.zd.core.util.StringUtils;
import com.zd.core.util.TLVUtils;
import com.zd.school.control.device.model.PtGateway;
import com.zd.school.control.device.model.TLVModel;
import com.zd.school.plartform.basedevice.dao.BaseGatewayDao;
import com.zd.school.plartform.basedevice.service.BaseGatewayService;
import com.zd.school.plartform.system.model.SysUser;
/**
* 网关表
*
* @author hucy
*
*/
@Service
@Transactional
public class BaseGatewayServiceImpl extends BaseServiceImpl<PtGateway> implements BaseGatewayService {
@Resource
public void setBaseGatewayDao(BaseGatewayDao dao) {
this.dao = dao;
}
private static Logger logger = Logger.getLogger(BaseGatewayServiceImpl.class);
@Override
public PtGateway doUpdateEntity(PtGateway entity, SysUser currentUser) {
// 先拿到已持久化的实体
PtGateway perEntity = this.get(entity.getUuid());
try {
BeanUtils.copyPropertiesExceptNull(perEntity, entity);
perEntity.setUpdateTime(new Date()); // 设置修改时间
perEntity.setUpdateUser(currentUser.getXm()); // 设置修改人的中文名
entity = this.merge(perEntity);// 执行修改方法
return entity;
} catch (IllegalAccessException e) {
logger.error(e.getMessage());
return null;
} catch (InvocationTargetException e) {
logger.error(e.getMessage());
return null;
}
}
@Override
public PtGateway doAddEntity(PtGateway entity, SysUser currentUser) {
try {
Integer orderIndex = this.getDefaultOrderIndex(entity);
PtGateway perEntity = new PtGateway();
perEntity.setCreateUser(currentUser.getXm());
perEntity.setOrderIndex(orderIndex);
// perEntity.setPriceValue(entity.getPriceValue());
// perEntity.setPriceStatus(entity.getPriceStatus());
BeanUtils.copyPropertiesExceptNull(entity, perEntity);
// 持久化到数据库
entity = this.merge(entity);
return entity;
} catch (IllegalAccessException e) {
logger.error(e.getMessage());
return null;
} catch (InvocationTargetException e) {
logger.error(e.getMessage());
return null;
}
}
/**
* 设置网关参数 若设置失败,自动进入异常捕获返回出错信息。
*/
@Override
public void doSetGatewayParam(HttpServletRequest request, TLVModel tlvs, String userCh) {
// TODO Auto-generated method stub
byte[] result = null;
PtGateway perEntity = this.get(tlvs.getUuid());
result = TLVUtils.encode(tlvs.getTlvs());
perEntity.setNetParam(result);
perEntity.setGatewayIP(request.getParameter("gatewayIP"));
perEntity.setNetgatewayIp(request.getParameter("netGatewayIp"));
perEntity.setGatewayMask(request.getParameter("gatewayMask"));
perEntity.setGatewayMac(request.getParameter("gatewayMac"));
//不能更改服务器参数
//perEntity.setFrontServerIP(request.getParameter("frontServerIP"));
//perEntity.setFrontServerPort(Integer.parseInt(request.getParameter("frontServerPort")));
//perEntity.setFrontServerStatus(Integer.parseInt(request.getParameter("frontServerStatus")));
perEntity.setUpdateUser(userCh);
perEntity.setUpdateTime(new Date());
this.merge(perEntity);
}
/**
* 处理单个网关数据
*/
@Override
public void doUpdateBaseHighParam(TLVModel tlvs, String xm) {
// TODO Auto-generated method stub
byte[] baseResult = null;
baseResult = TLVUtils.encode(tlvs.getTlvs().subList(0, 2));
byte[] advResult = null;
advResult = TLVUtils.encode(tlvs.getTlvs().subList(2, 3));
PtGateway perEntity = this.get(tlvs.getUuid());
// 将entity中不为空的字段动态加入到perEntity中去。
perEntity.setUpdateUser(xm);
perEntity.setUpdateTime(new Date());
perEntity.setBaseParam(baseResult);
perEntity.setAdvParam(advResult);
this.merge(perEntity);// 执行修改方法
}
/**
* 批量处理勾选的网关列表
*/
@Override
public void doUpdateBaseHighParamToIds(TLVModel tlvs, String gatewayIds, String xm) {
if(StringUtils.isEmpty(gatewayIds)){
gatewayIds=tlvs.getUuid();
}else if(!gatewayIds.contains(tlvs.getUuid())){
gatewayIds=tlvs.getUuid()+","+gatewayIds;
}
byte[] baseResult =TLVUtils.encode(tlvs.getTlvs().subList(0, 2));
byte[] advResult =TLVUtils.encode(tlvs.getTlvs().subList(2, 3));
String hql="update PtGateway a set a.baseParam = ?,a.advParam=?,a.updateTime=?,a.updateUser=? where a.uuid in ('"+gatewayIds.replace(",", "','")+"')";
Query query = this.getSession().createQuery(hql);
query.setBinary(0, baseResult);
query.setBinary(1, advResult);
query.setDate(2, new Date());
query.setString(3, xm);
query.executeUpdate();
// for(int ){
// // TODO Auto-generated method stub
// PtGateway perEntity = this.get(tlvs.getUuid());
//
// // 将entity中不为空的字段动态加入到perEntity中去。
// perEntity.setUpdateUser(xm);
// perEntity.setUpdateTime(new Date());
//
//
// perEntity.setBaseParam(baseResult);
// perEntity.setAdvParam(advResult);
// this.merge(perEntity);// 执行修改方法
// }
}
/**
* 批量处理当前服务器下所有网关数据
*/
@Override
public void doUpdateBaseHighParamToAll(TLVModel tlvs, String xm) {
// TODO Auto-generated method stub
PtGateway perEntity = this.get(tlvs.getUuid());
String frontServerId=perEntity.getFrontserverId();
byte[] baseResult =TLVUtils.encode(tlvs.getTlvs().subList(0, 2));
byte[] advResult =TLVUtils.encode(tlvs.getTlvs().subList(2, 3));
String hql="update PtGateway a set a.baseParam = ?,a.advParam=?,a.updateTime=?,a.updateUser=? where a.isDelete=0 and a.frontserverId=?";
Query query = this.getSession().createQuery(hql);
query.setBinary(0, baseResult);
query.setBinary(1, advResult);
query.setDate(2, new Date());
query.setString(3, xm);
query.setString(4, frontServerId);
query.executeUpdate();
}
/**
* 批量设置前置服务器
*/
@Override
public void doUpdateBatchFront(PtGateway entity, String xm) {
// TODO Auto-generated method stub
String uuids[] =entity.getUuid().split(",");
String hql="update PtGateway a set a.frontserverId = ?,a.updateTime=?,a.updateUser=? where a.uuid in (:ids)";
Query query = this.getSession().createQuery(hql);
query.setString(0, entity.getFrontserverId());
query.setDate(1, new Date());
query.setString(2, xm);
query.setParameterList("ids", uuids);
query.executeUpdate();
// PtGateway ptGateway=null;
// for (int i = 0; i < uuids.length; i++) {
// ptGateway=this.get(uuid[i]);
// ptGateway.setFrontserverId(entity.getFrontserverId());
// ptGateway.setUpdateUser(xm);
// ptGateway.setUpdateTime(new Date());
// this.merge(ptGateway);
// }
}
}
|
[
"540323699@qq.com"
] |
540323699@qq.com
|
0fa11d59b31077a554da612da87d78b6b2484b1e
|
834184ae7fb5fc951ec4ca76d0ab4d74224817a0
|
/src/main/java/com/nswt/schema/BZSSendSet.java
|
7117158f5a7fe426096c593b356e70d33b832b3e
|
[] |
no_license
|
mipcdn/NswtOldPF
|
3bf9974be6ffbc32b2d52ef2e39adbe495185c7e
|
fe7be46f12b3874a7f19967c0808870d8e465f5a
|
refs/heads/master
| 2020-08-09T16:44:47.585700
| 2017-01-11T13:26:37
| 2017-01-11T13:26:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
package com.nswt.schema;
import com.nswt.framework.orm.SchemaSet;
public class BZSSendSet extends SchemaSet {
public BZSSendSet() {
this(10,0);
}
public BZSSendSet(int initialCapacity) {
this(initialCapacity,0);
}
public BZSSendSet(int initialCapacity,int capacityIncrement) {
super(initialCapacity,capacityIncrement);
TableCode = BZSSendSchema._TableCode;
Columns = BZSSendSchema._Columns;
NameSpace = BZSSendSchema._NameSpace;
InsertAllSQL = BZSSendSchema._InsertAllSQL;
UpdateAllSQL = BZSSendSchema._UpdateAllSQL;
FillAllSQL = BZSSendSchema._FillAllSQL;
DeleteSQL = BZSSendSchema._DeleteSQL;
}
protected SchemaSet newInstance(){
return new BZSSendSet();
}
public boolean add(BZSSendSchema aSchema) {
return super.add(aSchema);
}
public boolean add(BZSSendSet aSet) {
return super.add(aSet);
}
public boolean remove(BZSSendSchema aSchema) {
return super.remove(aSchema);
}
public BZSSendSchema get(int index) {
BZSSendSchema tSchema = (BZSSendSchema) super.getObject(index);
return tSchema;
}
public boolean set(int index, BZSSendSchema aSchema) {
return super.set(index, aSchema);
}
public boolean set(BZSSendSet aSet) {
return super.set(aSet);
}
}
|
[
"18611949252@163.como"
] |
18611949252@163.como
|
3ffa52c9c8b2a6384155dc9a522e07e33bc16eae
|
95c14adc382890aec7a4f042d8dc1f1e302829f1
|
/src/test/java/abstractclass/gamecharacter/AxeWarriorTest.java
|
e95052438c196f58accf1031da20909d2828969d
|
[] |
no_license
|
kovacseni/training-solutions
|
fdfbc0b113beea226346dc57abe4404beb855464
|
834e4f86fc8d403249913256a64918250d3434ed
|
refs/heads/master
| 2023-04-18T04:03:41.893938
| 2021-05-05T20:00:44
| 2021-05-05T20:00:44
| 308,728,317
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package abstractclass.gamecharacter;
import org.junit.jupiter.api.Test;
import java.util.Random;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class AxeWarriorTest {
@Test
public void creation() {
Random random = new Random(123);
Character character = new AxeWarrior(new Point(5, 10), random);
assertEquals(100, character.getHitPoint());
assertTrue(character.isAlive());
assertEquals(5L, character.getPosition().getX());
assertEquals(10L, character.getPosition().getY());
}
@Test
public void secondaryAttack() {
Random random = new Random(123);
Character offender = new AxeWarrior(new Point(0, 0), random);
Character defender = new AxeWarrior(new Point(0, 0), random);
offender.secondaryAttack(defender);
assertEquals(100, offender.getHitPoint());
assertTrue(defender.getHitPoint() >= 80);
}
}
|
[
"kovacseni@gmail.com"
] |
kovacseni@gmail.com
|
2e707c9022c5f6e69df00c3ec082867cf3d11893
|
b667342eeb51567c41df8c3bdcb0228ccde6e02d
|
/src/main/java/com/sigma/domain/ResultadoEmisiones.java
|
646a8d12ed828342fa87bf6e47ca6d2c3d8eaa30
|
[] |
no_license
|
MIJAEL888/Sigma.Monitoreo
|
7b4c31dabd3f740449c8fb93cf19bbc6fc9211b9
|
96f63fe330a246c16d654955809044024b8830bd
|
refs/heads/master
| 2022-12-12T20:51:11.300922
| 2019-07-13T07:42:33
| 2019-07-13T07:42:33
| 196,598,587
| 0
| 0
| null | 2022-12-04T02:48:05
| 2019-07-12T15:00:56
|
Java
|
UTF-8
|
Java
| false
| false
| 4,471
|
java
|
package com.sigma.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
/**
* A ResultadoEmisiones.
*/
@Entity
@Table(name = "resultado_emisiones")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ResultadoEmisiones implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "tipo_equipo")
private String tipoEquipo;
@Column(name = "combustible")
private String combustible;
@Column(name = "consumo")
private Float consumo;
@Column(name = "hora_por_mes")
private Float horaPorMes;
@Column(name = "altura")
private Float altura;
@Column(name = "diametro")
private Float diametro;
@Column(name = "seccion")
private String seccion;
@ManyToOne
@JsonIgnoreProperties("resultadoEmisiones")
private Resultado resultado;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTipoEquipo() {
return tipoEquipo;
}
public ResultadoEmisiones tipoEquipo(String tipoEquipo) {
this.tipoEquipo = tipoEquipo;
return this;
}
public void setTipoEquipo(String tipoEquipo) {
this.tipoEquipo = tipoEquipo;
}
public String getCombustible() {
return combustible;
}
public ResultadoEmisiones combustible(String combustible) {
this.combustible = combustible;
return this;
}
public void setCombustible(String combustible) {
this.combustible = combustible;
}
public Float getConsumo() {
return consumo;
}
public ResultadoEmisiones consumo(Float consumo) {
this.consumo = consumo;
return this;
}
public void setConsumo(Float consumo) {
this.consumo = consumo;
}
public Float getHoraPorMes() {
return horaPorMes;
}
public ResultadoEmisiones horaPorMes(Float horaPorMes) {
this.horaPorMes = horaPorMes;
return this;
}
public void setHoraPorMes(Float horaPorMes) {
this.horaPorMes = horaPorMes;
}
public Float getAltura() {
return altura;
}
public ResultadoEmisiones altura(Float altura) {
this.altura = altura;
return this;
}
public void setAltura(Float altura) {
this.altura = altura;
}
public Float getDiametro() {
return diametro;
}
public ResultadoEmisiones diametro(Float diametro) {
this.diametro = diametro;
return this;
}
public void setDiametro(Float diametro) {
this.diametro = diametro;
}
public String getSeccion() {
return seccion;
}
public ResultadoEmisiones seccion(String seccion) {
this.seccion = seccion;
return this;
}
public void setSeccion(String seccion) {
this.seccion = seccion;
}
public Resultado getResultado() {
return resultado;
}
public ResultadoEmisiones resultado(Resultado resultado) {
this.resultado = resultado;
return this;
}
public void setResultado(Resultado resultado) {
this.resultado = resultado;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ResultadoEmisiones)) {
return false;
}
return id != null && id.equals(((ResultadoEmisiones) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "ResultadoEmisiones{" +
"id=" + getId() +
", tipoEquipo='" + getTipoEquipo() + "'" +
", combustible='" + getCombustible() + "'" +
", consumo=" + getConsumo() +
", horaPorMes=" + getHoraPorMes() +
", altura=" + getAltura() +
", diametro=" + getDiametro() +
", seccion='" + getSeccion() + "'" +
"}";
}
}
|
[
"mijael888@gmail.com"
] |
mijael888@gmail.com
|
582234506e5d6cb22b04c44668045025f39c4fe5
|
8191bea395f0e97835735d1ab6e859db3a7f8a99
|
/f737922a0ddc9335bb0fc2f3ae5ffe93_source_from_JADX/com/google/android/gms/common/internal/f.java
|
856bb310e225a32a4a8bef7068417a49c123aa27
|
[] |
no_license
|
msmtmsmt123/jadx-1
|
5e5aea319e094b5d09c66e0fdb31f10a3238346c
|
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
|
refs/heads/master
| 2021-05-08T19:21:27.870459
| 2017-01-28T04:19:54
| 2017-01-28T04:19:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.google.android.gms.common.internal;
import agh;
import agi;
import agi$a;
import android.content.Context;
import android.os.IBinder;
import android.view.View;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.ab.a;
public final class f extends agi<ab> {
private static final f j6;
static {
j6 = new f();
}
private f() {
super("com.google.android.gms.common.ui.SignInButtonCreatorImpl");
}
private View DW(Context context, int i, int i2, Scope[] scopeArr) {
try {
SignInButtonConfig signInButtonConfig = new SignInButtonConfig(i, i2, scopeArr);
return (View) agh.j6(((ab) j6(context)).j6(agh.j6((Object) context), signInButtonConfig));
} catch (Throwable e) {
throw new agi$a("Could not get button with size " + i + " and color " + i2, e);
}
}
public static View j6(Context context, int i, int i2, Scope[] scopeArr) {
return j6.DW(context, i, i2, scopeArr);
}
public /* synthetic */ Object DW(IBinder iBinder) {
return j6(iBinder);
}
public ab j6(IBinder iBinder) {
return a.j6(iBinder);
}
}
|
[
"eggfly@qq.com"
] |
eggfly@qq.com
|
2d7835cee273e7566a1001383febb64b745d0adf
|
af53d7d6fd0991ffca216111efee96d66a594af2
|
/gateway/src/main/java/com/jason/cloud/gateway/UserLoginFilter.java
|
5ee825ff7f732ef4ddf158be424db1643beb8d3f
|
[] |
no_license
|
jason009/cloud
|
acf3c694d1e7f4b867ed0d9d72f2dc25b9af5b25
|
cae4e0e706663680001c9c677514ae090d36880b
|
refs/heads/master
| 2020-04-29T01:21:30.848433
| 2019-04-01T15:12:04
| 2019-04-01T15:12:04
| 175,727,597
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package com.jason.cloud.gateway;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
@Component
public class UserLoginFilter extends ZuulFilter {
@Override
public String filterType() {
return "pre";
}
@Override
public int filterOrder() {
return 0;
}
@Override
public boolean shouldFilter() {
return true;
}
@Override
public Object run() throws ZuulException {
RequestContext requestContext = RequestContext.getCurrentContext();
HttpServletRequest httpServletRequest = requestContext.getRequest();
String token = httpServletRequest.getParameter("token");
if(token == null){
requestContext.setSendZuulResponse(false);
requestContext.setResponseStatusCode(401);
}
return null;
}
}
|
[
"you@example.com"
] |
you@example.com
|
cde4d5e8e7a20fde0e66d65932002b794eeb5774
|
09832253bbd9c7837d4a380c7410bd116d9d8119
|
/vediowise study/1.Anisul haq/Tutorials/src/Video_86_to_100/Video92StaticMethod.java
|
289fd6b8c4ce107ca23086ed5a46bd246b4aae51
|
[] |
no_license
|
shshetu/Java
|
d892ae2725f8ad0acb2d98f5fd4e6ca2b1ce171e
|
51bddc580432c74e0339588213ef9aa0d384169a
|
refs/heads/master
| 2020-04-11T21:25:12.588859
| 2019-04-02T05:41:00
| 2019-04-02T05:41:00
| 162,104,906
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 519
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Video_86_to_100;
/**
*
* @author shshe
*/
public class Video92StaticMethod {
//Creating a Non static method
void display1(){
System.out.println("I am non static method!");
}
//Creating a static method
static void display2(){
System.out.println("I am static method!");
}
}
|
[
"shshetu2017@gmail.com"
] |
shshetu2017@gmail.com
|
9457fe977c35e98d943fcf415e5f75e9c2dcd356
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_2f8658b16650588852343dba65da53f9b69dcc61/PathHelper/7_2f8658b16650588852343dba65da53f9b69dcc61_PathHelper_s.java
|
8fa1caad2056d1cc165a04ead0f38c2e7b93b3c2
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,200
|
java
|
package hrider.io;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Copyright (C) 2012 NICE Systems ltd.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.
*
* @author Igor Cher
* @version %I%, %G%
* <p/>
* This class is a helper class to work with path's.
*/
public class PathHelper {
//region Constants
public final static String FILE_SEPARATOR = "/";
public final static String LINE_SEPARATOR = System.getProperty("line.separator");
private final static Log logger = Log.getLogger(PathHelper.class);
private final static Pattern ENV_VAR = Pattern.compile("((?<=\\$\\{)[a-zA-Z_0-9]*(?=\\}))");
//endregion
//region Constructor
private PathHelper() {
}
//endregion
//region Public Methods
/**
* Gets current folder of the executing process.
*
* @return A path to the current folder.
*/
public static String getCurrentFolder() {
return getParent(new File(".").getAbsolutePath());
}
/**
* Removes extension from the file path.
*
* @param path The path to remove extension.
* @return A new path if the provided path contained extension or an original path otherwise.
*/
public static String getPathWithoutExtension(String path) {
String normalisedPath = expand(path);
int index = normalisedPath.lastIndexOf('.');
if (index != -1) {
normalisedPath = normalisedPath.substring(0, index);
}
return normalisedPath;
}
public static String getFileNameWithoutExtension(String path) {
String leaf = getLeaf(path);
int index = leaf.lastIndexOf('.');
if (index != -1) {
leaf = leaf.substring(0, index);
}
return leaf;
}
public static String getFileExtension(String path) {
int index = path.lastIndexOf('.');
if (index != -1) {
return path.substring(index);
}
return null;
}
/**
* Removes media from the provided path. For example D://some_path/some_folder -> some_path/some_folder
*
* @param path The path to remove the media.
* @return A new path if the provided path contained media or an original path otherwise.
*/
public static String getPathWithoutMedia(String path) {
String normalisedPath = expand(path);
int index = normalisedPath.indexOf(':' + FILE_SEPARATOR);
if (index != -1) {
normalisedPath = normalisedPath.substring(index + 1 + FILE_SEPARATOR.length());
}
return normalisedPath;
}
public static String expand(String path) {
String expandedPath = path;
if (expandedPath != null) {
Matcher matcher = ENV_VAR.matcher(expandedPath);
while (matcher.find()) {
String envVar = matcher.group();
String expVar = System.getenv(envVar);
if (expVar != null) {
expandedPath = expandedPath.replace(String.format("${%s}", envVar), expVar);
}
expVar = System.getProperty(envVar);
if (expVar != null) {
expandedPath = expandedPath.replace(String.format("${%s}", envVar), expVar);
}
}
}
return normalise(expandedPath);
}
public static String append(String path1, String path2) {
StringBuilder path = new StringBuilder();
if (path1 != null) {
String normalisedPath = expand(path1);
path.append(normalisedPath);
if (!normalisedPath.endsWith(FILE_SEPARATOR)) {
path.append(FILE_SEPARATOR);
}
}
if (path2 != null) {
String normalisedPath = expand(path2);
if (path.length() > 0) {
if (normalisedPath.startsWith(FILE_SEPARATOR)) {
path.append(normalisedPath.substring(FILE_SEPARATOR.length()));
}
else {
path.append(normalisedPath);
}
}
else {
path.append(normalisedPath);
}
}
return path.toString();
}
public static String getParent(String path) {
if (path != null) {
String normalisedPath = expand(path);
if (normalisedPath.endsWith(FILE_SEPARATOR)) {
normalisedPath = normalisedPath.substring(0, normalisedPath.length() - FILE_SEPARATOR.length());
}
int index = normalisedPath.lastIndexOf(FILE_SEPARATOR);
if (index != -1) {
return normalisedPath.substring(0, index);
}
}
return null;
}
public static String getLeaf(String path) {
if (path != null) {
String normalisedPath = expand(path);
if (normalisedPath.endsWith(FILE_SEPARATOR)) {
normalisedPath = normalisedPath.substring(0, normalisedPath.length() - FILE_SEPARATOR.length());
}
int index = normalisedPath.lastIndexOf(FILE_SEPARATOR);
if (index != -1) {
return normalisedPath.substring(index + 1);
}
}
return null;
}
public static String normalise(String path) {
if (path != null) {
String normalizedPath = path;
try {
normalizedPath = normalizedPath.replace("\\", FILE_SEPARATOR);
if (!normalizedPath.startsWith("file:")) {
if (normalizedPath.startsWith(FILE_SEPARATOR)) {
normalizedPath = "file:" + normalizedPath;
}
else {
normalizedPath = "file:/" + normalizedPath;
}
}
URI uri = new URI(normalizedPath);
normalizedPath = uri.getPath();
}
catch (URISyntaxException e) {
logger.warn(e, "Path is not valid URI: '%s'", normalizedPath);
}
if (normalizedPath.startsWith(FILE_SEPARATOR)) {
normalizedPath = normalizedPath.substring(FILE_SEPARATOR.length());
}
return normalizedPath;
}
return null;
}
//endregion
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3a924dd36cae6fe49081dc47d1cf79b95ea4b44d
|
1bbc8836f50cdf42923242f483d4f4433a633d04
|
/src/main/java/org/squiddev/cctweaks/lua/lib/socket/SocketPoller.java
|
4923cfe1feb05b83fdcab97d8a280e2ebab876f3
|
[
"MIT"
] |
permissive
|
I-Enderlord-I/CCTweaks-Lua
|
4152a70f456cb2f7951953a76504c934dfc67962
|
cdc36e8db66539d77ca536f4eab6e36f03ccd35b
|
refs/heads/master
| 2020-03-30T10:46:44.905981
| 2018-01-13T19:07:26
| 2018-01-13T19:07:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,228
|
java
|
package org.squiddev.cctweaks.lua.lib.socket;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import org.squiddev.cctweaks.lua.Config;
import org.squiddev.cctweaks.lua.ThreadBuilder;
import org.squiddev.cctweaks.lua.TweaksLogger;
import java.io.IOException;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.util.concurrent.*;
public class SocketPoller implements Runnable {
private static final ExecutorService threads = ThreadBuilder.createThread("Socket", Config.APIs.Socket.threads, ThreadBuilder.LOW_PRIORITY);
private static final ThreadFactory pollerFactory = ThreadBuilder.getFactory("Socket Poller", ThreadBuilder.LOW_PRIORITY);
private static final EventLoopGroup group = new NioEventLoopGroup(Config.APIs.Socket.nettyThreads, ThreadBuilder.getFactory("Netty", ThreadBuilder.LOW_PRIORITY));
private static final Object lock = new Object();
private static SocketPoller read;
private static SocketPoller connect;
private final int flag;
private final ConcurrentLinkedQueue<SocketAction> channels = new ConcurrentLinkedQueue<SocketAction>();
private final Selector selector;
private static final class SocketAction {
final SocketChannel channel;
final Runnable runnable;
private SocketAction(SocketChannel channel, Runnable runnable) {
this.channel = channel;
this.runnable = runnable;
}
}
private SocketPoller(int flag) {
this.flag = flag;
Selector selector = null;
try {
selector = Selector.open();
} catch (IOException e) {
TweaksLogger.error("Cannot run SocketPoller: sockets will not work as expected", e);
}
this.selector = selector;
if (selector == null) return;
pollerFactory.newThread(this).start();
}
@Override
public void run() {
while (true) {
try {
// Add all new sockets
while (true) {
SocketAction action = channels.poll();
if (action == null) break;
SocketChannel channel = action.channel;
if (channel != null && channel.isOpen()) {
channel.register(selector, flag, action.runnable);
}
}
// Wait for something
selector.select();
// Queue which ones we've had a changed state
for (SelectionKey key : selector.selectedKeys()) {
if ((key.readyOps() & flag) != 0) {
key.cancel();
((Runnable) key.attachment()).run();
}
}
} catch (IOException e) {
TweaksLogger.error("Error in SocketPoller: running another iteration", e);
}
}
}
public void add(SocketChannel channel, Runnable action) {
channels.offer(new SocketAction(channel, action));
if (selector != null) selector.wakeup();
}
public static SocketPoller getRead() {
if (read == null) {
synchronized (lock) {
if (read == null) read = new SocketPoller(SelectionKey.OP_READ);
}
}
return read;
}
public static SocketPoller getConnect() {
if (connect == null) {
synchronized (lock) {
if (connect == null) connect = new SocketPoller(SelectionKey.OP_CONNECT);
}
}
return connect;
}
public static <T> Future<T> submit(Callable<T> task) {
return threads.submit(task);
}
public static EventLoopGroup group() {
return group;
}
}
|
[
"bonzoweb@hotmail.co.uk"
] |
bonzoweb@hotmail.co.uk
|
e82dc6765c039eaeeb86ec4ad87762122f04985f
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/bazaar8.apk-decompiled/sources/c/e/a/a/S.java
|
afc7d3018c509364990296b92274fe00972aa695
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 183
|
java
|
package c.e.a.a;
import com.google.android.exoplayer2.Format;
/* compiled from: RendererCapabilities */
public interface S {
int a(Format format);
int f();
int o();
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
2a0c210f7295f1bf8168c5703ac4f2858f44ed10
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201402/cm/BiddingStrategyErrorReason.java
|
b0f189a7dd83ac1e4fcf74c93cad3248248befea
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,726
|
java
|
/**
* BiddingStrategyErrorReason.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201402.cm;
public class BiddingStrategyErrorReason implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected BiddingStrategyErrorReason(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _DUPLICATE_NAME = "DUPLICATE_NAME";
public static final java.lang.String _CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = "CANNOT_CHANGE_BIDDING_STRATEGY_TYPE";
public static final java.lang.String _CANNOT_DELETE_ASSOCIATED_STRATEGY = "CANNOT_DELETE_ASSOCIATED_STRATEGY";
public static final java.lang.String _BIDDING_STRATEGY_NOT_SUPPORTED = "BIDDING_STRATEGY_NOT_SUPPORTED";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final BiddingStrategyErrorReason DUPLICATE_NAME = new BiddingStrategyErrorReason(_DUPLICATE_NAME);
public static final BiddingStrategyErrorReason CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = new BiddingStrategyErrorReason(_CANNOT_CHANGE_BIDDING_STRATEGY_TYPE);
public static final BiddingStrategyErrorReason CANNOT_DELETE_ASSOCIATED_STRATEGY = new BiddingStrategyErrorReason(_CANNOT_DELETE_ASSOCIATED_STRATEGY);
public static final BiddingStrategyErrorReason BIDDING_STRATEGY_NOT_SUPPORTED = new BiddingStrategyErrorReason(_BIDDING_STRATEGY_NOT_SUPPORTED);
public static final BiddingStrategyErrorReason UNKNOWN = new BiddingStrategyErrorReason(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static BiddingStrategyErrorReason fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
BiddingStrategyErrorReason enumeration = (BiddingStrategyErrorReason)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static BiddingStrategyErrorReason fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BiddingStrategyErrorReason.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201402", "BiddingStrategyError.Reason"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
11cfc5c3c681043a508109f635d04dc1e56c40bb
|
e5fd02c03d1da3025b10e21b1777968c8217be9f
|
/Cotizador/src/org/tempuri/Engine_Service.java
|
da88c1f68890a88f67bae7c776d2843fc7ecd2cf
|
[] |
no_license
|
luisitocaiza17/JavaProcesoBatch
|
3d2069c6ed8e4358a47b34d42237b0e42a876812
|
69be7df9522c53c68d70ed980f0826de3e860653
|
refs/heads/master
| 2020-04-21T02:52:52.344661
| 2019-02-05T16:04:17
| 2019-02-05T16:04:17
| 169,267,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 559
|
java
|
/**
* Engine_Service.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.tempuri;
public interface Engine_Service extends javax.xml.rpc.Service {
public java.lang.String getBasicHttpBinding_EngineAddress();
public org.tempuri.Engine_PortType getBasicHttpBinding_Engine() throws javax.xml.rpc.ServiceException;
public org.tempuri.Engine_PortType getBasicHttpBinding_Engine(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
}
|
[
"luisito_caiza17"
] |
luisito_caiza17
|
8fa50d84e0108b988ff6c749fa509345e0552f79
|
b837638333999ad32afc57daf9afffb45f75fb72
|
/sources/p000a/p001a/p002a/p003a/p022i/p024b/C0855s.java
|
cd57f151fd9de2c92f47bdbe8e95522fce54fa95
|
[] |
no_license
|
FresBlueMan/ikortv
|
e2c1e5a36bd263de161b9fb59805080c34201032
|
a7e3f8cb28422d02ca93e4cc6147d2aa2c0d4da1
|
refs/heads/master
| 2021-10-12T04:05:28.424545
| 2019-02-01T16:17:11
| 2019-02-01T16:17:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 742
|
java
|
package p000a.p001a.p002a.p003a.p022i.p024b;
import p000a.p001a.p002a.p003a.C0159n;
import p000a.p001a.p002a.p003a.C0916s;
import p000a.p001a.p002a.p003a.p004a.C0006h;
import p000a.p001a.p002a.p003a.p005b.C0019c;
import p000a.p001a.p002a.p003a.p021h.C0097b;
import p000a.p001a.p002a.p003a.p022i.p023a.C0100f;
import p000a.p001a.p002a.p003a.p034n.C0157e;
@Deprecated
/* compiled from: HttpAuthenticator */
/* renamed from: a.a.a.a.i.b.s */
public class C0855s extends C0100f {
public C0855s(C0097b c0097b) {
super(c0097b);
}
/* renamed from: c */
public boolean m1668c(C0159n c0159n, C0916s c0916s, C0019c c0019c, C0006h c0006h, C0157e c0157e) {
return m273b(c0159n, c0916s, c0019c, c0006h, c0157e);
}
}
|
[
"morpig2@gmail.com"
] |
morpig2@gmail.com
|
751b865c0ecabde7f9f1ba4fce3445df20dd3cc0
|
c82bfe5797f1104a6c3fa59762fd065b089489ea
|
/src/test/java/ch/ethz/idsc/sophus/crv/subdiv/HermiteSubdivisionsTest.java
|
110e61302007f053bea7b44dce3d7473470f6008
|
[] |
no_license
|
etarakci-hvl/owl
|
208f6bf6be98717dbdd62ab369dd654bdbf4343a
|
60790bdb31741b8368001e892a941bded7fcbfb9
|
refs/heads/master
| 2022-03-02T00:22:24.167829
| 2019-11-17T09:15:23
| 2019-11-17T09:15:23
| 279,145,425
| 1
| 0
| null | 2020-07-12T20:47:38
| 2020-07-12T20:47:37
| null |
UTF-8
|
Java
| false
| false
| 4,115
|
java
|
// code by jph
package ch.ethz.idsc.sophus.crv.subdiv;
import ch.ethz.idsc.sophus.lie.rn.RnBiinvariantMean;
import ch.ethz.idsc.sophus.lie.rn.RnExponential;
import ch.ethz.idsc.sophus.lie.rn.RnGroup;
import ch.ethz.idsc.sophus.lie.se2.Se2BiinvariantMean;
import ch.ethz.idsc.sophus.lie.se2.Se2Group;
import ch.ethz.idsc.sophus.lie.se2c.Se2CoveringExponential;
import ch.ethz.idsc.sophus.math.Do;
import ch.ethz.idsc.sophus.math.TensorIteration;
import ch.ethz.idsc.tensor.RealScalar;
import ch.ethz.idsc.tensor.Tensor;
import ch.ethz.idsc.tensor.Tensors;
import ch.ethz.idsc.tensor.alg.ConstantArray;
import ch.ethz.idsc.tensor.alg.Reverse;
import ch.ethz.idsc.tensor.pdf.NormalDistribution;
import ch.ethz.idsc.tensor.pdf.RandomVariate;
import ch.ethz.idsc.tensor.pdf.UniformDistribution;
import ch.ethz.idsc.tensor.sca.Chop;
import junit.framework.TestCase;
public class HermiteSubdivisionsTest extends TestCase {
public void testStringReverseRn() {
Tensor cp1 = RandomVariate.of(NormalDistribution.standard(), 7, 2, 3);
Tensor cp2 = cp1.copy();
cp2.set(Tensor::negate, Tensor.ALL, 1);
for (HermiteSubdivisions hermiteSubdivisions : HermiteSubdivisions.values()) {
HermiteSubdivision hermiteSubdivision = hermiteSubdivisions.supply(RnGroup.INSTANCE, RnExponential.INSTANCE, RnBiinvariantMean.INSTANCE);
TensorIteration ti1 = hermiteSubdivision.string(RealScalar.ONE, cp1);
TensorIteration ti2 = hermiteSubdivision.string(RealScalar.ONE, Reverse.of(cp2));
for (int count = 0; count < 3; ++count) {
Tensor result1 = ti1.iterate();
Tensor result2 = Reverse.of(ti2.iterate());
result2.set(Tensor::negate, Tensor.ALL, 1);
Chop._12.requireClose(result1, result2);
}
}
}
public void testStringReverseSe2() {
Tensor cp1 = RandomVariate.of(UniformDistribution.unit(), 7, 2, 3);
Tensor cp2 = cp1.copy();
cp2.set(Tensor::negate, Tensor.ALL, 1);
for (HermiteSubdivisions hermiteSubdivisions : HermiteSubdivisions.values()) {
HermiteSubdivision hermiteSubdivision = hermiteSubdivisions.supply( //
Se2Group.INSTANCE, Se2CoveringExponential.INSTANCE, Se2BiinvariantMean.LINEAR);
TensorIteration ti1 = hermiteSubdivision.string(RealScalar.ONE, cp1);
TensorIteration ti2 = hermiteSubdivision.string(RealScalar.ONE, Reverse.of(cp2));
for (int count = 0; count < 3; ++count) {
Tensor result1 = ti1.iterate();
Tensor result2 = Reverse.of(ti2.iterate());
result2.set(Tensor::negate, Tensor.ALL, 1);
Chop._12.requireClose(result1, result2);
}
}
}
public void testSe2ConstantReproduction() {
Tensor control = ConstantArray.of(Tensors.fromString("{{2, 3, 1}, {0, 0, 0}}"), 10);
for (HermiteSubdivisions hermiteSubdivisions : HermiteSubdivisions.values()) {
HermiteSubdivision hermiteSubdivision = hermiteSubdivisions.supply( //
Se2Group.INSTANCE, Se2CoveringExponential.INSTANCE, Se2BiinvariantMean.LINEAR);
TensorIteration tensorIteration = hermiteSubdivision.string(RealScalar.ONE, control);
Tensor iterate = Do.of(tensorIteration::iterate, 2);
Chop._13.requireAllZero(iterate.get(Tensor.ALL, 1));
}
}
public void testSe2LinearReproduction() {
Tensor pg = Tensors.vector(1, 2, 3);
Tensor pv = Tensors.vector(.3, -.2, -.1);
Tensor control = Tensors.empty();
for (int count = 0; count < 10; ++count) {
control.append(Tensors.of(pg, pv));
pg = Se2Group.INSTANCE.element(pg).combine(Se2CoveringExponential.INSTANCE.exp(pv));
}
control = control.unmodifiable();
for (HermiteSubdivisions hermiteSubdivisions : HermiteSubdivisions.values()) {
HermiteSubdivision hermiteSubdivision = hermiteSubdivisions.supply( //
Se2Group.INSTANCE, Se2CoveringExponential.INSTANCE, Se2BiinvariantMean.LINEAR);
TensorIteration tensorIteration = hermiteSubdivision.string(RealScalar.ONE, control);
Tensor iterate = Do.of(tensorIteration::iterate, 2);
for (Tensor rv : iterate.get(Tensor.ALL, 1))
Chop._13.requireClose(pv, rv);
}
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
efbfa915c6f90f13c784cdbfbf2beb13c855b937
|
da8fac5eaf6c40e593768fff9ab9f9a9567a2808
|
/tlatools/org.lamport.tlatools/test/tlc2/TraceExpressionSpecSafetyTest.java
|
1bf3f2d681390211c18fcd5d552a035f4f6c5857
|
[
"MIT"
] |
permissive
|
tlaplus/tlaplus
|
dd02971ea1fface9a4e6642d0b433291ad462db4
|
baf6f1b4000ba72cd4ac2704d07c60ea2ae8343b
|
refs/heads/master
| 2023-09-03T17:39:23.238115
| 2023-08-28T00:28:30
| 2023-08-28T02:46:40
| 50,906,927
| 2,214
| 203
|
MIT
| 2023-09-05T21:38:47
| 2016-02-02T08:48:27
|
Java
|
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
/*******************************************************************************
* Copyright (c) 2020 Microsoft Research. All rights reserved.
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Contributors:
* Markus Alexander Kuppe - initial API and implementation
******************************************************************************/
package tlc2;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
import tla2sany.semantic.ExternalModuleTable;
import tlc2.output.EC;
import tlc2.tool.Action;
import tlc2.tool.StateVec;
import tlc2.tool.impl.SpecProcessor;
import tlc2.tool.impl.Tool;
import tlc2.util.Vect;
import tlc2.value.IValue;
import tlc2.value.impl.BoolValue;
import tlc2.value.impl.IntValue;
import util.TLAConstants;
import util.UniqueString;
public abstract class TraceExpressionSpecSafetyTest extends TraceExpressionSpecTest {
private static final String TE_SPEC_TEST = "TESpecTest";
public TraceExpressionSpecSafetyTest(final String mode) {
super(TE_SPEC_TEST, "TESpecSafetyTest.cfg", mode, EC.ExitStatus.VIOLATION_SAFETY);
}
@Override
protected void doTest(final Tool tool, final String id) {
final SpecProcessor specProcessor = tool.getSpecProcessor();
Action[] actions = tool.getActions();
assertEquals(1, actions.length);
// Assert that one invariant exists.
final Action[] invariants = specProcessor.getInvariants();
assertEquals(1, invariants.length);
// Assert there exists one init-predicate
Vect<Action> initPred = specProcessor.getInitPred();
assertEquals(1, initPred.size());
// Assert there exists a next-state relation
assertNotNull(specProcessor.getNextPred());
// Assert the trace
StateVec sv = tool.getInitStates();
assertEquals(1, sv.size());
assertTrue(tool.isGoodState(sv.first()));
assertTrue(tool.isInModel(sv.first()));
assertTrue(tool.isValid(invariants[0], sv.first()));
Map<UniqueString, IValue> vals = sv.first().getVals();
assertEquals(IntValue.gen(0), vals.get(UniqueString.of("x")));
assertEquals(BoolValue.ValFalse, vals.get(UniqueString.of("y")));
sv = tool.getNextStates(actions[0], sv.first());
assertEquals(1, sv.size());
assertTrue(tool.isGoodState(sv.first()));
assertTrue(tool.isInModel(sv.first()));
assertTrue(tool.isValid(invariants[0], sv.first()));
vals = sv.first().getVals();
assertEquals(IntValue.gen(1), vals.get(UniqueString.of("x")));
assertEquals(BoolValue.ValTrue, vals.get(UniqueString.of("y")));
sv = tool.getNextStates(actions[0], sv.first());
assertEquals(1, sv.size());
assertTrue(tool.isGoodState(sv.first()));
assertTrue(tool.isInModel(sv.first()));
assertTrue(tool.isValid(invariants[0], sv.first()));
vals = sv.first().getVals();
assertEquals(IntValue.gen(2), vals.get(UniqueString.of("x")));
assertEquals(BoolValue.ValFalse, vals.get(UniqueString.of("y")));
sv = tool.getNextStates(actions[0], sv.first());
assertEquals(1, sv.size());
assertTrue(tool.isGoodState(sv.first()));
assertTrue(tool.isInModel(sv.first()));
assertFalse(tool.isValid(invariants[0], sv.first()));
vals = sv.first().getVals();
assertEquals(IntValue.gen(3), vals.get(UniqueString.of("x")));
assertEquals(BoolValue.ValTrue, vals.get(UniqueString.of("y")));
assertNotNull(tool.getModelConfig().getAlias());
assertFalse(tool.getModelConfig().getCheckDeadlock());
}
}
|
[
"tlaplus.net@lemmster.de"
] |
tlaplus.net@lemmster.de
|
3dd41f677e74269ead30dbb734c77f9732d202b9
|
60231321ae07d564d4245ba7182b5ffd455da7a5
|
/JavaProgramming/src/ch07/exam02/Parent.java
|
c20d62fbeb4ffb10c620ab50d78e2e5e0e8be7c3
|
[] |
no_license
|
JeongSemi/TestRepository
|
1fc7b1b86e75adcf72f5584389bde2311b5c647f
|
3e16625c5802302f505a507f89bf187265269061
|
refs/heads/master
| 2021-01-20T00:45:51.856815
| 2017-08-29T05:26:45
| 2017-08-29T05:26:45
| 89,182,167
| 0
| 0
| null | null | null | null |
ISO-8859-7
|
Java
| false
| false
| 212
|
java
|
package ch07.exam02;
public class Parent {
//Field
String lastName="±θ";
//Constructor
Parent(String lastName){
this.lastName=lastName;
}
//Method
void sound(){
System.out.println("ΗγΗγ");
}
}
|
[
"wjdtpa2@gmail.com"
] |
wjdtpa2@gmail.com
|
dbe99ce4af14d1e2ccabc41c98e7d7d0ce1c1a1c
|
d25f397ca2be6ba8a5dd66e3c9ee9d76221b81e1
|
/Hero_Attributes/src/main/java/net/sf/anathema/hero/attributes/sheet/content/AttributesContent.java
|
d92ad5eee7c38321666ad6e0e4595cf7b13bc58d
|
[] |
no_license
|
secondsun/anathema
|
0cb7b065d064360fd61d96e00be29ccd231e34a3
|
072692084654a141322842ba739883e7cb8deccd
|
refs/heads/master
| 2021-01-15T17:41:41.659592
| 2013-08-23T16:27:50
| 2013-08-23T16:27:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 882
|
java
|
package net.sf.anathema.hero.attributes.sheet.content;
import net.sf.anathema.hero.model.Hero;
import net.sf.anathema.hero.sheet.pdf.content.AbstractSubBoxContent;
import net.sf.anathema.lib.resources.Resources;
import java.util.List;
public class AttributesContent extends AbstractSubBoxContent {
private AttributesPrintModel attributeModel;
public AttributesContent(Hero hero, Resources resources) {
super(resources);
this.attributeModel = new AttributesPrintModel(hero);
}
public int getTraitMaximum() {
return attributeModel.getTraitMaximum();
}
@Override
public String getHeaderKey() {
return "Attributes";
}
public List<PrintAttributeGroup> getAttributeGroups() {
PrintAttributeIterator iterator = new PrintAttributeIterator(getResources(), attributeModel);
attributeModel.iterate(iterator);
return iterator.groups;
}
}
|
[
"sandra.sieroux@googlemail.com"
] |
sandra.sieroux@googlemail.com
|
c8f217957a963f804d623edc972f812ff7c417da
|
74fa4023d7846a0dab608b00f9b6f0974130340e
|
/das-20200116/java/src/main/java/com/aliyun/das20200116/models/DescribeDiagnosticReportListRequest.java
|
a8cca545243f44138d3e80acbf13f41a0c32ee5c
|
[
"Apache-2.0"
] |
permissive
|
plusxp/alibabacloud-sdk
|
b36811a6df7d5697800ae0f7be22b73bd43d203e
|
3b7dcc63434bf6df6342c54fcd2ae933486a1c92
|
refs/heads/master
| 2023-03-10T10:05:44.907699
| 2021-02-28T11:28:00
| 2021-02-28T11:28:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,111
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.das20200116.models;
import com.aliyun.tea.*;
public class DescribeDiagnosticReportListRequest extends TeaModel {
@NameInMap("Uid")
public String uid;
@NameInMap("accessKey")
public String accessKey;
@NameInMap("signature")
public String signature;
@NameInMap("timestamp")
public String timestamp;
@NameInMap("__context")
public String context;
@NameInMap("skipAuth")
public String skipAuth;
@NameInMap("UserId")
public String userId;
@NameInMap("DBInstanceId")
public String DBInstanceId;
@NameInMap("PageNo")
public String pageNo;
@NameInMap("PageSize")
public String pageSize;
@NameInMap("StartTime")
public String startTime;
@NameInMap("EndTime")
public String endTime;
public static DescribeDiagnosticReportListRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeDiagnosticReportListRequest self = new DescribeDiagnosticReportListRequest();
return TeaModel.build(map, self);
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
865b02cb94a15320dd2333771b6ef7bf81d4c70c
|
be1f88b1b9f7c1b37f66b2c9fc6eb359a8ab28d4
|
/src/main/java/br/com/livedeploy/config/DateTimeFormatConfiguration.java
|
b5d2ababc3ca9c57328ce748f8b17c43a4a704a0
|
[] |
no_license
|
geovafc/live-deploy
|
4f84c69aeaa752a07c1053731f7b6120f1d8a0be
|
2ac426fd7f8845305aefa9378becf6413e0bffe3
|
refs/heads/main
| 2023-03-21T07:08:57.590864
| 2021-03-17T00:10:13
| 2021-03-17T00:10:13
| 348,524,663
| 0
| 0
| null | 2021-03-17T00:10:14
| 2021-03-16T23:48:53
|
Java
|
UTF-8
|
Java
| false
| false
| 724
|
java
|
package br.com.livedeploy.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Configure the converters to use the ISO format for dates by default.
*/
@Configuration
public class DateTimeFormatConfiguration implements WebMvcConfigurer {
@Override
public void addFormatters(FormatterRegistry registry) {
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(registry);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
4900ed53ccfc523f060961044b956f9dba8bfac8
|
d818ce8298eb7711afc99a8e83a46e3125aea766
|
/src/cn/ucaner/pattern/structure/proxy/staticProxy/RealSuject.java
|
df0542451900345fd6190318b9ca3cde9d671bd6
|
[
"Apache-2.0"
] |
permissive
|
wuwu955/java-patterns
|
551ce7e2cdedf973552d7ada7fee2696fb2fa865
|
52fae1ec4a6499404f83ec2ce5c30488e63eda2e
|
refs/heads/master
| 2022-12-17T03:47:25.796949
| 2020-09-29T10:13:52
| 2020-09-29T10:13:52
| 271,801,763
| 0
| 0
| null | 2020-06-12T13:12:47
| 2020-06-12T13:12:46
| null |
UTF-8
|
Java
| false
| false
| 714
|
java
|
/**
* <html>
* <body>
* <P> Copyright 1994 JsonInternational</p>
* <p> All rights reserved.</p>
* <p> Created on 19941115</p>
* <p> Created by Jason</p>
* </body>
* </html>
*/
package cn.ucaner.pattern.structure.proxy.staticProxy;
/**
* @Package:cn.ucaner.pattern.structure.proxy.staticProxy
* @ClassName:RealSuject
* @Description: <p> 代理模式真实类</p>
* @Author: -
* @CreatTime:2017年10月26日 下午1:47:02
* @Modify By:
* @ModifyTime:
* @Modify marker:
* @version V1.0
*/
public class RealSuject implements Subject {
@Override
public void request() {
System.out.println("*** static proxy do request !By Jason ***");
}
}
|
[
"jasonandy@hotmail.com"
] |
jasonandy@hotmail.com
|
512b5b22fb5985d0cb8a47cc3138a06d647d7e43
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_779b4f8e545611d233e4f5238449856d7adc4122/LdapPrincipal/17_779b4f8e545611d233e4f5238449856d7adc4122_LdapPrincipal_s.java
|
003e2460b235d5385b24c0e64b2f04825c7af299
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,562
|
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.directory.server.core;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.security.Principal;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.apache.directory.shared.util.Strings;
/**
* An alternative X500 user implementation that has access to the distinguished
* name of the principal as well as the String representation.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public final class LdapPrincipal implements Principal, Cloneable, Externalizable
{
private static final long serialVersionUID = 3906650782395676720L;
/** the normalized distinguished name of the principal */
private Dn dn;
/** the no name anonymous user whose Dn is the empty String */
public static final LdapPrincipal ANONYMOUS = new LdapPrincipal();
/** the authentication level for this principal */
private AuthenticationLevel authenticationLevel;
/** The userPassword
* @todo security risk remove this immediately
* The field is transient to avoid being serialized
*/
transient private byte[] userPassword;
/**
* Creates a new LDAP/X500 principal without any group associations. Keep
* this package friendly so only code in the package can create a
* trusted principal.
*
* @param dn the normalized distinguished name of the principal
* @param authenticationLevel the authentication level for this principal
*/
public LdapPrincipal( Dn dn, AuthenticationLevel authenticationLevel )
{
this.dn = dn;
if ( ! dn.isNormalized() )
{
throw new IllegalStateException( I18n.err( I18n.ERR_436 ) );
}
this.authenticationLevel = authenticationLevel;
this.userPassword = null;
}
/**
* Creates a new LDAP/X500 principal without any group associations. Keep
* this package friendly so only code in the package can create a
* trusted principal.
*
* @param dn the normalized distinguished name of the principal
* @param authenticationLevel the authentication level for this principal
* @param userPassword The user password
*/
public LdapPrincipal( Dn dn, AuthenticationLevel authenticationLevel, byte[] userPassword )
{
this.dn = dn;
this.authenticationLevel = authenticationLevel;
this.userPassword = new byte[ userPassword.length ];
System.arraycopy( userPassword, 0, this.userPassword, 0, userPassword.length );
}
/**
* Creates a principal for the no name anonymous user whose Dn is the empty
* String.
*/
public LdapPrincipal()
{
dn = new Dn();
authenticationLevel = AuthenticationLevel.NONE;
userPassword = null;
}
/**
* Gets a reference to the distinguished name of this
* principal as a {@link org.apache.directory.shared.ldap.model.name.Dn}.
*
* @return the distinguished name of the principal as a {@link org.apache.directory.shared.ldap.model.name.Dn}
*/
public Dn getDNRef()
{
return dn;
}
/**
* Gets a cloned copy of the normalized distinguished name of this
* principal as a {@link org.apache.directory.shared.ldap.model.name.Dn}.
*
* @return the cloned distinguished name of the principal as a {@link org.apache.directory.shared.ldap.model.name.Dn}
*/
public Dn getDN()
{
return dn;
}
/**
* Returns the normalized distinguished name of the principal as a String.
*/
public String getName()
{
return dn.getNormName();
}
/**
* Gets the authentication level associated with this LDAP principle.
*
* @return the authentication level
*/
public AuthenticationLevel getAuthenticationLevel()
{
return authenticationLevel;
}
/**
* Returns string representation of the normalized distinguished name
* of this principal.
*/
public String toString()
{
return "['" + dn.getName() + "', '" + Strings.utf8ToString(userPassword) +"']'";
}
public byte[] getUserPassword()
{
return userPassword;
}
public void setUserPassword( byte[] userPassword )
{
this.userPassword = new byte[ userPassword.length ];
System.arraycopy( userPassword, 0, this.userPassword, 0, userPassword.length );
}
/**
* Clone the object. This is done so that we don't store the
* password in a LdapPrincipal more than necessary.
*/
public Object clone() throws CloneNotSupportedException
{
LdapPrincipal clone = (LdapPrincipal)super.clone();
if ( userPassword != null )
{
clone.setUserPassword( userPassword );
}
return clone;
}
/**
* @see Externalizable#readExternal(ObjectInput)
*
* @param in The stream from which the LdapPrincipal is read
* @throws IOException If the stream can't be read
* @throws ClassNotFoundException If the LdapPrincipal can't be created
*/
public void readExternal( ObjectInput in ) throws IOException , ClassNotFoundException
{
// Read the name
dn = (Dn)in.readObject();
// read the authentication level
int level = in.readInt();
authenticationLevel = AuthenticationLevel.getLevel( level );
}
/**
* Note: The password won't be written !
*
* @see Externalizable#readExternal(ObjectInput)
*
* @param out The stream in which the LdapPrincipal will be serialized.
*
* @throws IOException If the serialization fail
*/
public void writeExternal( ObjectOutput out ) throws IOException
{
// Write the name
if ( dn == null )
{
out.writeObject( Dn.EMPTY_DN );
}
else
{
out.writeObject( dn );
}
// write the authentication level
if ( authenticationLevel == null )
{
out.writeInt( AuthenticationLevel.NONE.getLevel() );
}
else
{
out.writeInt( authenticationLevel.getLevel() );
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
83b911e67d4236f60b234428c8b823ec4b906a3d
|
4c7be0cb9748c2bb8571c48090b299f8c8278797
|
/app/dal/src/main/java/com/dzjk/ams/dal/dao/AccountRepaySerialDAO.java
|
1a0f459915d31d344e70eb06f4857bc7c29e24a4
|
[] |
no_license
|
ZuoShouShiJie/ams
|
ff71f5b495968556b3b608e0929ca60adbcd673c
|
fd5e791e6ce8719cbcb26b933dc10f24316916ac
|
refs/heads/master
| 2020-03-29T04:40:59.433436
| 2018-09-20T03:02:29
| 2018-09-20T03:02:50
| 149,542,480
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,809
|
java
|
package com.dzjk.ams.dal.dao;
import java.util.Map;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.dzjk.ams.dal.dataobject.AccountRepaySerialDO;
import com.dzjk.ams.dal.mapper.AccountRepaySerialDOMapper;
/**
* The Table AMS_ACCOUNT_REPAY_SERIAL.
* AMS_ACCOUNT_REPAY_SERIAL
*/
@Repository("ams.AccountRepaySerialDAO")
public class AccountRepaySerialDAO{
@Autowired
private AccountRepaySerialDOMapper accountRepaySerialDOMapper;
/**
* desc:插入表:AMS_ACCOUNT_REPAY_SERIAL.<br/>
* descSql = SELECT LAST_INSERT_ID() INSERT INTO AMS_ACCOUNT_REPAY_SERIAL( ID ,BO_ID ,ORG_ID ,STATUS ,USER_ID ,CREATED_BY ,PERIOD_NUM ,REPAY_TIME ,REPAY_TYPE ,UPDATED_BY ,CREATED_TIME ,REPAY_AMOUNT ,REPAY_STATUS ,UPDATED_TIME ,SERIAL_NUMBER ,CAPITAL_AMOUNT ,INTEREST_AMOUNT )VALUES( #{id,jdbcType=BIGINT} , #{boId,jdbcType=VARCHAR} , #{orgId,jdbcType=BIGINT} , #{status,jdbcType=VARCHAR} , #{userId,jdbcType=VARCHAR} , #{createdBy,jdbcType=VARCHAR} , #{periodNum,jdbcType=VARCHAR} , #{repayTime,jdbcType=TIMESTAMP} , #{repayType,jdbcType=VARCHAR} , #{updatedBy,jdbcType=VARCHAR} , #{createdTime,jdbcType=TIMESTAMP} , #{repayAmount,jdbcType=DECIMAL} , #{repayStatus,jdbcType=VARCHAR} , #{updatedTime,jdbcType=TIMESTAMP} , #{serialNumber,jdbcType=VARCHAR} , #{capitalAmount,jdbcType=DECIMAL} , #{interestAmount,jdbcType=DECIMAL} )
* @param entity entity
* @return Long
*/
public Long insert(AccountRepaySerialDO entity){
return accountRepaySerialDOMapper.insert(entity);
}
/**
* desc:更新表:AMS_ACCOUNT_REPAY_SERIAL.<br/>
* descSql = UPDATE AMS_ACCOUNT_REPAY_SERIAL SET BO_ID = #{boId,jdbcType=VARCHAR} ,STATUS = #{status,jdbcType=VARCHAR} ,USER_ID = #{userId,jdbcType=VARCHAR} ,CREATED_BY = #{createdBy,jdbcType=VARCHAR} ,PERIOD_NUM = #{periodNum,jdbcType=VARCHAR} ,REPAY_TIME = #{repayTime,jdbcType=TIMESTAMP} ,REPAY_TYPE = #{repayType,jdbcType=VARCHAR} ,UPDATED_BY = #{updatedBy,jdbcType=VARCHAR} ,CREATED_TIME = #{createdTime,jdbcType=TIMESTAMP} ,REPAY_AMOUNT = #{repayAmount,jdbcType=DECIMAL} ,REPAY_STATUS = #{repayStatus,jdbcType=VARCHAR} ,UPDATED_TIME = #{updatedTime,jdbcType=TIMESTAMP} ,SERIAL_NUMBER = #{serialNumber,jdbcType=VARCHAR} ,CAPITAL_AMOUNT = #{capitalAmount,jdbcType=DECIMAL} ,INTEREST_AMOUNT = #{interestAmount,jdbcType=DECIMAL} WHERE ID = #{id,jdbcType=BIGINT} AND ORG_ID = #{orgId,jdbcType=BIGINT}
* @param entity entity
* @return Long
*/
public Long update(AccountRepaySerialDO entity){
return accountRepaySerialDOMapper.update(entity);
}
/**
* desc:根据主键删除数据:AMS_ACCOUNT_REPAY_SERIAL.<br/>
* descSql = DELETE FROM AMS_ACCOUNT_REPAY_SERIAL WHERE ID = #{id,jdbcType=BIGINT} AND ORG_ID = #{orgId,jdbcType=BIGINT}
* @param id id
* @param orgId orgId
* @return Long
*/
public Long deleteByPrimary(Long id,Long orgId){
Map<String,Object> params=new HashMap<String,Object>();
params.put("id",id);
params.put("orgId",orgId);
return accountRepaySerialDOMapper.deleteByPrimary(params);
}
/**
* desc:根据主键获取数据:AMS_ACCOUNT_REPAY_SERIAL.<br/>
* descSql = SELECT * FROM AMS_ACCOUNT_REPAY_SERIAL WHERE ID = #{id,jdbcType=BIGINT} AND ORG_ID = #{orgId,jdbcType=BIGINT}
* @param id id
* @param orgId orgId
* @return AccountRepaySerialDO
*/
public AccountRepaySerialDO getByPrimary(Long id,Long orgId){
Map<String,Object> params=new HashMap<String,Object>();
params.put("id",id);
params.put("orgId",orgId);
return accountRepaySerialDOMapper.getByPrimary(params);
}
}
|
[
"1079728294@qq.com"
] |
1079728294@qq.com
|
43280d2d2361d161bafcf66a66c05c954ac689a4
|
326c758417e1d3de91b5d9f648bda597aada75ca
|
/wayn-mall/src/main/java/com/wayn/mall/controller/admin/SeckillManagerController.java
|
48dfb256630428ea6c762d9e70d84ef2b4889829
|
[
"Apache-2.0"
] |
permissive
|
bluemapleleaf/waynboot-sso
|
4bd0f57303a3c50222e687a7c5328326552bdcb3
|
4637281e0fb742d10602e0e6e0539f3114e0ecb9
|
refs/heads/master
| 2023-06-07T00:52:36.456179
| 2021-07-04T11:01:13
| 2021-07-04T11:01:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,385
|
java
|
package com.wayn.mall.controller.admin;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wayn.mall.constant.Constants;
import com.wayn.mall.controller.base.BaseController;
import com.wayn.mall.core.entity.Seckill;
import com.wayn.mall.core.entity.vo.SeckillVO;
import com.wayn.mall.core.service.SeckillService;
import com.wayn.mall.redis.RedisCache;
import com.wayn.mall.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
@Controller
@RequestMapping("admin/seckill")
public class SeckillManagerController extends BaseController {
private static final String PREFIX = "admin/seckill";
@Autowired
private SeckillService seckillService;
@Autowired
private RedisCache redisCache;
@GetMapping
public String index(HttpServletRequest request) {
request.setAttribute("path", "seckill");
return PREFIX + "/seckill";
}
/**
* 列表
*/
@GetMapping("/list")
@ResponseBody
public IPage list(SeckillVO seckillVO, HttpServletRequest request) {
Page<Seckill> page = getPage(request);
return seckillService.selectPage(page, seckillVO);
}
@ResponseBody
@PostMapping("/save")
public R save(@RequestBody Seckill seckill) {
boolean save = seckillService.save(seckill);
if (save) {
// 库存预热
redisCache.setCacheObject(Constants.SECKILL_GOODS_STOCK_KEY + seckill.getSeckillId(), seckill.getSeckillNum());
}
return R.result(save);
}
@ResponseBody
@PostMapping("/update")
public R update(@RequestBody Seckill seckill) {
seckill.setUpdateTime(new Date());
boolean update = seckillService.updateById(seckill);
if (update) {
// 库存预热
redisCache.setCacheObject(Constants.SECKILL_GOODS_STOCK_KEY + seckill.getSeckillId(), seckill.getSeckillNum());
}
return R.result(update);
}
/**
* 详情
*/
@GetMapping("/{id}")
@ResponseBody
public R Info(@PathVariable("id") Long id) {
return R.success().add("data", seckillService.getById(id));
}
}
|
[
"1669738430@qq.com"
] |
1669738430@qq.com
|
cbd4fe13a817fbbf5c36edf7f597b9b8e38aafdd
|
062fa4f7f890198a53ad03ee849c10b4a0cc8826
|
/classes-dex2jar_source_from_jdcore/android/support/v7/preference/UnPressableLinearLayout.java
|
55eb3e7630174999f72856fdd60fd2c333d91bd7
|
[] |
no_license
|
Biu-G/combostuck
|
e721e24015379f6bfa4f4222ff49a5826e5b1991
|
57fed26a45e238f36ba056b3960ff05f882eb55f
|
refs/heads/master
| 2020-07-03T21:30:07.489769
| 2019-11-06T17:27:47
| 2019-11-06T17:27:47
| 202,056,117
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package android.support.v7.preference;
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.util.AttributeSet;
import android.widget.LinearLayout;
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public class UnPressableLinearLayout
extends LinearLayout
{
public UnPressableLinearLayout(Context paramContext)
{
this(paramContext, null);
}
public UnPressableLinearLayout(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
protected void dispatchSetPressed(boolean paramBoolean) {}
}
|
[
"htlzkahsy@gmail.com"
] |
htlzkahsy@gmail.com
|
626739b0ea67b619218f00027b837eedc2e3cc28
|
87901d9fd3279eb58211befa5357553d123cfe0c
|
/bin/platform/ext/impex/testsrc/de/hybris/platform/impex/jalo/PLA_12772_Test.java
|
50aa42b381c47ee787bc5161b8353802aa1b7092
|
[] |
no_license
|
prafullnagane/learning
|
4d120b801222cbb0d7cc1cc329193575b1194537
|
02b46a0396cca808f4b29cd53088d2df31f43ea0
|
refs/heads/master
| 2020-03-27T23:04:17.390207
| 2014-02-27T06:19:49
| 2014-02-27T06:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,780
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.impex.jalo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import de.hybris.platform.core.Registry;
import de.hybris.platform.core.Tenant;
import de.hybris.platform.impex.jalo.imp.ImpExImportReader;
import de.hybris.platform.impex.jalo.imp.MultiThreadedImpExImportReader;
import de.hybris.platform.impex.jalo.imp.MultiThreadedImportProcessor;
import de.hybris.platform.jalo.Item;
import de.hybris.platform.testframework.HybrisJUnit4Test;
import de.hybris.platform.util.CSVReader;
import de.hybris.platform.util.config.ConfigIntf;
import de.hybris.platform.util.threadpool.PoolableThread;
import de.hybris.platform.util.threadpool.ThreadPool;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.junit.Test;
/**
* Tests worker thread leakage due to unsafe abort upon global workers pool being exhausted...
*/
public class PLA_12772_Test extends HybrisJUnit4Test
{
@Test
public void testBehaviourOnExhaustedGlobalPool() throws ImpExException
{
doTest();
}
@Test
public void testMultipleTimes() throws ImpExException
{
for (int i = 0; i < 100; i++)
{
doTest();
}
}
private void doTest() throws ImpExException
{
final ThreadPool pool = createWorkerThreadPool(); // use pool of our own to avoid race conditions with cronjob and others
try
{
final int max = pool.getMaxActive();
// start first job using almost all workers ( max - 2 ( reader + result proc ) - 3 ( rest for next run ) )
final MultiThreadedImporter importer1 = createImporter(max - 5, createTestCSV(1000, 0), pool);
Item last1;
last1 = importer1.importNext(); // this starts importing
Thread.yield();
assertTrue(pool.getNumActive() > 0);
// start next job trying to get more workers than possible
final MultiThreadedImporter importer2 = createImporter(10, createTestCSV(1000, 1000), pool);
Item last2;
last2 = importer2.importNext(); // this starts importing as well
// now try to consume both
do
{
if (last1 != null)
{
last1 = importer1.importNext();
}
if (last2 != null)
{
last2 = importer2.importNext();
}
}
while (last1 != null || last2 != null);
assertEquals("still got used workers", 0, waitForWorkerToReturnToPoolAndGetUsedNow(pool, 30));
}
finally
{
pool.close();
}
}
private int waitForWorkerToReturnToPoolAndGetUsedNow(final ThreadPool pool, final int maxSeconds)
{
final long maxWait = System.currentTimeMillis() + (maxSeconds * 1000);
int usedNow = pool.getNumActive();
while (usedNow > 0 && System.currentTimeMillis() < maxWait)
{
try
{
Thread.sleep(100);
}
catch (final InterruptedException e)
{
Thread.currentThread().interrupt();
break;
}
usedNow = pool.getNumActive();
}
return usedNow;
}
ThreadPool createWorkerThreadPool()
{
final Tenant tenant = Registry.getCurrentTenantNoFallback();
final ConfigIntf cfg = tenant.getConfig();
final int poolSize = cfg.getInt("workers.maxthreads", 64);
final ThreadPool ret = new ThreadPool(tenant.getTenantID(), poolSize);
final GenericObjectPool.Config config = new GenericObjectPool.Config();
config.maxActive = poolSize;
config.maxIdle = poolSize;
config.maxWait = -1;
config.whenExhaustedAction = GenericObjectPool.WHEN_EXHAUSTED_FAIL;
config.testOnBorrow = true;
config.testOnReturn = true;
config.timeBetweenEvictionRunsMillis = 30 * 1000; // keep idle threads for at most 30 sec
ret.setConfig(config);
return ret;
}
MultiThreadedImporter createImporter(final int workers, final String lines, final ThreadPool threadPool) throws ImpExException
{
final MultiThreadedImporter importer = new MultiThreadedImporter(new CSVReader(lines))
{
@Override
protected de.hybris.platform.impex.jalo.imp.ImpExImportReader createImportReader(final CSVReader csvReader)
{
return new MultiThreadedImpExImportReader(csvReader)
{
@Override
protected PoolableThread tryToBorrowThread(final ThreadPool tp)
{
return super.tryToBorrowThread(threadPool);
}
};
}
@Override
protected ImpExImportReader createImportReaderForNextPass()
{
final MultiThreadedImpExImportReader currentReader = (MultiThreadedImpExImportReader) getReader();
final MultiThreadedImpExImportReader reader = new MultiThreadedImpExImportReader(//
getDumpHandler().getReaderOfLastDump(), //
getDumpHandler().getWriterOfCurrentDump(), //
currentReader.getDocumentIDRegistry(), //
(MultiThreadedImportProcessor) currentReader.getImportProcessor(), //
currentReader.getValidationMode())
{
@Override
protected PoolableThread tryToBorrowThread(final ThreadPool tp)
{
return super.tryToBorrowThread(threadPool);
}
};
reader.setMaxThreads(getMaxThreads());
reader.setIsSecondPass();
reader.setLocale(currentReader.getLocale());
reader.setLogFilter(getLogFilter());
return reader;
}
};
importer.setMaxThreads(workers);
return importer;
}
String createTestCSV(final int lines, final int offset)
{
final StringBuilder sb = new StringBuilder();
sb.append("INSERT_UPDATE Title; code[unique=true]").append('\n');
for (int i = 0; i < lines; i++)
{
sb.append("; ttt-").append(i + offset).append(';').append('\n');
}
return sb.toString();
}
}
|
[
"admin1@neev31.(none)"
] |
admin1@neev31.(none)
|
b0a987c1420c2b08f6a26dd4e6a2558b9b6675d6
|
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
|
/src/main/java/com/huawei/ace/systemplugin/httpaccess/CheckParamUtils.java
|
eb7a50de24d80183961dbbc9cc05dc5aadd4349d
|
[] |
no_license
|
yearsyan/Harmony-OS-Java-class-library
|
d6c135b6a672c4c9eebf9d3857016995edeb38c9
|
902adac4d7dca6fd82bb133c75c64f331b58b390
|
refs/heads/main
| 2023-06-11T21:41:32.097483
| 2021-06-24T05:35:32
| 2021-06-24T05:35:32
| 379,816,304
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,806
|
java
|
package com.huawei.ace.systemplugin.httpaccess;
import com.huawei.ace.systemplugin.httpaccess.data.RequestData;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class CheckParamUtils {
private static final Set<String> FETCH_METHOD = new HashSet(Arrays.asList("OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE"));
private static final int MAX_PATH_LENGTH = 4096;
private static final Set<String> RESPONSE_TYPE = new HashSet(Arrays.asList("text", "json"));
private static final Set<String> UPLOAD_METHOD = new HashSet(Arrays.asList("POST", "PUT"));
private static <T> boolean checkNull(T t) {
return t == null;
}
public static boolean checkDownloadRequest(RequestData requestData) {
return isValidUrl(requestData.getUrl()) && (checkEmptyString(requestData.getData()) && checkEmptyString(requestData.getMethod()) && checkEmptyString(requestData.getResponseType()) && checkNull(requestData.getFiles()) && checkEmptyString(requestData.getToken()));
}
public static boolean checkFetchRequest(RequestData requestData) {
return isValidUrl(requestData.getUrl()) && (checkEmptyString(requestData.getFileName()) && checkEmptyString(requestData.getDescription()) && checkNull(requestData.getFiles()) && checkEmptyString(requestData.getToken())) && (FETCH_METHOD.contains(requestData.getMethod()) || "".equals(requestData.getMethod())) && (RESPONSE_TYPE.contains(requestData.getResponseType()) || "".equals(requestData.getResponseType()));
}
public static boolean checkUploadRequest(RequestData requestData) {
return isValidUrl(requestData.getUrl()) && (checkEmptyString(requestData.getFileName()) && checkEmptyString(requestData.getDescription()) && checkEmptyString(requestData.getResponseType()) && checkEmptyString(requestData.getToken())) && isValidUploadFile(requestData.getFiles()) && (UPLOAD_METHOD.contains(requestData.getMethod()) || "".equals(requestData.getMethod()));
}
public static boolean checkOnDownloadCompleteRequest(RequestData requestData) {
boolean z;
try {
if (Long.parseLong(requestData.getToken()) >= 0) {
z = true;
return !(!checkEmptyString(requestData.getFileName()) && checkEmptyString(requestData.getDescription()) && checkEmptyString(requestData.getResponseType()) && checkNull(requestData.getFiles()) && checkEmptyString(requestData.getMethod()) && checkEmptyString(requestData.getResponseType()) && checkEmptyString(requestData.getUrl()) && checkEmptyString(requestData.getData())) && z;
}
} catch (NumberFormatException unused) {
}
z = false;
if (!(!checkEmptyString(requestData.getFileName()) && checkEmptyString(requestData.getDescription()) && checkEmptyString(requestData.getResponseType()) && checkNull(requestData.getFiles()) && checkEmptyString(requestData.getMethod()) && checkEmptyString(requestData.getResponseType()) && checkEmptyString(requestData.getUrl()) && checkEmptyString(requestData.getData()))) {
}
}
private static boolean isValidUrl(String str) {
if (str == null) {
return false;
}
return str.startsWith("http") || str.startsWith("https");
}
/* JADX WARNING: Removed duplicated region for block: B:7:0x0014 */
/* Code decompiled incorrectly, please refer to instructions dump. */
private static boolean isValidUploadFile(java.util.List<com.huawei.ace.systemplugin.httpaccess.data.FormFileData> r3) {
/*
r0 = 0
if (r3 == 0) goto L_0x002f
int r1 = r3.size()
if (r1 != 0) goto L_0x000a
goto L_0x002f
L_0x000a:
java.util.Iterator r3 = r3.iterator()
L_0x000e:
boolean r1 = r3.hasNext()
if (r1 == 0) goto L_0x002d
java.lang.Object r1 = r3.next()
com.huawei.ace.systemplugin.httpaccess.data.FormFileData r1 = (com.huawei.ace.systemplugin.httpaccess.data.FormFileData) r1
java.lang.String r1 = r1.getUri()
int r2 = r1.length()
if (r2 <= 0) goto L_0x002c
int r1 = r1.length()
r2 = 4096(0x1000, float:5.74E-42)
if (r1 <= r2) goto L_0x000e
L_0x002c:
return r0
L_0x002d:
r3 = 1
return r3
L_0x002f:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.ace.systemplugin.httpaccess.CheckParamUtils.isValidUploadFile(java.util.List):boolean");
}
private static boolean checkEmptyString(String str) {
return "".equals(str);
}
}
|
[
"yearsyan@gmail.com"
] |
yearsyan@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.