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
61275f127f863b37912d1263fe07e9ecc0da7e87
7ce61f8f7175542e4059506351669b048dfe7307
/app/src/main/java/com/tenone/gamebox/view/utils/OnScrollHelper.java
26b5005bb37daf62f26f9b064f2875b95e4891d4
[]
no_license
chanphy/GameBox
5f894124c529658ef0b056ac1e179e9f7a9bcc3b
81b8b0d234d177fd63b8918e4e70baef205041dd
refs/heads/master
2020-05-18T04:54:21.242966
2018-10-09T03:01:55
2018-10-09T03:01:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,113
java
package com.tenone.gamebox.view.utils; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.AbsListView; import android.widget.ListView; import com.tenone.gamebox.mode.listener.OnScrollStateListener; import com.tenone.gamebox.mode.mode.OnScrollState; import com.tenone.gamebox.view.custom.RefreshLayout; import java.util.Vector; public class OnScrollHelper { private static OnScrollHelper instance; private boolean changed = false; public OnScrollHelper() { listeners = new Vector<OnScrollStateListener>(); } public static OnScrollHelper getInstance() { if (instance == null) { synchronized (OnScrollHelper.class) { if (instance == null) { instance = new OnScrollHelper(); } } } return instance; } private Vector<OnScrollStateListener> listeners; public synchronized void registerOnScrollWatcher(OnScrollStateListener listener) { if (listener == null) { throw new NullPointerException(); } if (!listeners.contains( listener )) { listeners.addElement( listener ); } } public synchronized void deleteObserver(OnScrollStateListener listener) { listeners.removeElement( listener ); } @SuppressWarnings("deprecation") public void onScrollStateUpdate(Object object) { /* if (object instanceof ListView) { ((ListView) object).setOnScrollListener( new AbsListView.OnScrollListener() { private boolean fromTouch; @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) { fromTouch = true; } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { resultAbsListViewOnScroll( view, firstVisibleItem, visibleItemCount, totalItemCount, fromTouch ); } } ); } if (object instanceof RefreshLayout) { ((RefreshLayout) object).setOnScrollListener( new RefreshLayout.OnScrollListener() { private boolean fromTouch; @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) { fromTouch = true; } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { resultAbsListViewOnScroll( view, firstVisibleItem, visibleItemCount, totalItemCount, fromTouch ); } } ); } if (object instanceof RecyclerView) { ((RecyclerView) object).addOnScrollListener( new RecyclerView.OnScrollListener() { private boolean fromTouch; public void onScrollStateChanged(RecyclerView recyclerView, int newState) { fromTouch = newState == RecyclerView.SCROLL_STATE_DRAGGING; } public void onScrolled(RecyclerView recyclerView, int dx, int dy) { if (!fromTouch) { return; } if (dy >= 0) { update( OnScrollState.SCROLL_DOWN ); } else { update( OnScrollState.SCROLL_UP ); } } } ); }*/ } private int lastScrollY, mTouchY, lastVisibleItem; private void resultAbsListViewOnScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount, boolean fromTouch) { if (!fromTouch) { return; } final int tempY = getFirstViewScrollY( view ); if (lastScrollY == tempY) { return; } lastScrollY = tempY; View childAt = view.getChildAt( 0 ); OnScrollState scrollState = OnScrollState.SCROLL_NO; int[] location = new int[2]; childAt.getLocationOnScreen( location ); if (firstVisibleItem != lastVisibleItem) { if (firstVisibleItem > lastVisibleItem) { // ("向上滑动"); scrollState = OnScrollState.SCROLL_DOWN; } else if (firstVisibleItem < lastVisibleItem) { // ("向下滑动"); scrollState = OnScrollState.SCROLL_UP; } lastVisibleItem = firstVisibleItem; mTouchY = location[1]; } else { if (mTouchY > location[1]) { // ("->向上滑动"); scrollState = OnScrollState.SCROLL_DOWN; } else if (mTouchY < location[1]) { // ("->向下滑动"); scrollState = OnScrollState.SCROLL_UP; } else { // ("->未滑动"); scrollState = OnScrollState.SCROLL_NO; } mTouchY = location[1]; } update( scrollState ); } public synchronized boolean hasChanged() { return changed; } protected synchronized void setChanged() { changed = true; } protected synchronized void clearChanged() { changed = false; } public void notifyObservers(OnScrollState state) { Object[] arrLocal; synchronized (this) { if (!hasChanged()) return; arrLocal = listeners.toArray(); clearChanged(); } for (int i = arrLocal.length - 1; i >= 0; i--) ((OnScrollStateListener) arrLocal[i]).onScrollState( state ); } private void update(OnScrollState state) { setChanged(); notifyObservers( state ); } private int getFirstViewScrollY(AbsListView view) { View c = view.getChildAt( 0 );//第一个可见的view if (c == null) { return 0; } int top = c.getTop() + view.getPaddingTop(); return -top; } }
[ "871878482@qq.com" ]
871878482@qq.com
7b2d235597bbc7f15bc4eb931052dd810dceeaf4
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13544-6-3-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/display/internal/DocumentContentDisplayer_ESTest.java
ae4270147936a38b9b96dbd0ae33f681f0f24aa3
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
/* * This file was automatically generated by EvoSuite * Tue Jan 21 23:31:08 UTC 2020 */ package org.xwiki.display.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DocumentContentDisplayer_ESTest extends DocumentContentDisplayer_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3a85aa7a84726b43d68a0a3e43701f3c4a592533
c0f29b1b34f72e1f1435a043d1ed870c3e8d3729
/Chapter5/MedianOfDataStream.java
a37cd0910707d15d997a244a415bd42c113da866
[]
no_license
wylu/Offer
5f6ea50bd9aa930d8982e84f4a583f64bdf39783
995d0c64318f4b996339f6790d44b4db6327db0b
refs/heads/master
2020-04-05T04:19:07.286519
2019-01-13T07:31:42
2019-01-13T07:31:42
156,546,329
0
0
null
null
null
null
UTF-8
Java
false
false
706
java
package Offer.Chapter5; import java.util.PriorityQueue; public class MedianOfDataStream { private int count = 0; private PriorityQueue<Integer> minHeap = new PriorityQueue<>(); private PriorityQueue<Integer> maxHeap = new PriorityQueue<>(16, (o1, o2) -> o2 - o1); public void insert(Integer num){ if (count % 2 == 0){ maxHeap.offer(num); minHeap.offer(maxHeap.poll()); }else { minHeap.offer(num); maxHeap.offer(minHeap.poll()); } count++; } public Double getMedian(){ return (count % 2 == 0) ? (maxHeap.peek() + minHeap.peek()) / 2.0 : 1.0 * minHeap.peek(); } }
[ "158677478@qq.com" ]
158677478@qq.com
a5170fe5e1d1d494ef92287e2a0724c310e5e4e3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/shardingjdbc--sharding-jdbc/4964a2b9b79f9ef87b8488fe2dace215f9316c6c/after/MySQLPreparedStatementForTowParametersTest.java
c3b5d9b35f12b587edcf03a560f4a8302f4052f3
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,487
java
/* * Copyright 1999-2015 dangdang.com. * <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 * * 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. * </p> */ package com.dangdang.ddframe.rdb.sharding.parser.mysql; import com.dangdang.ddframe.rdb.sharding.api.fixture.ShardingRuleMockBuilder; import com.dangdang.ddframe.rdb.sharding.constants.DatabaseType; import com.dangdang.ddframe.rdb.sharding.parser.AbstractBaseParseTest; import com.dangdang.ddframe.rdb.sharding.parser.result.merger.MergeContext; import com.dangdang.ddframe.rdb.sharding.parser.result.router.ConditionContext; import com.dangdang.ddframe.rdb.sharding.parser.result.router.Table; import com.dangdang.ddframe.rdb.sharding.parser.sql.parser.SQLParserEngine; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import java.util.Arrays; import java.util.Collection; @RunWith(Parameterized.class) public final class MySQLPreparedStatementForTowParametersTest extends AbstractBaseParseTest { public MySQLPreparedStatementForTowParametersTest(final String testCaseName, final String sql, final String expectedSQL, final Collection<Table> expectedTables, final Collection<ConditionContext> expectedConditionContext, final MergeContext expectedMergeContext) { super(testCaseName, sql, expectedSQL, expectedTables, expectedConditionContext, expectedMergeContext); } @Parameters(name = "{0}") public static Collection<Object[]> dataParameters() { return AbstractBaseParseTest.dataParameters("com/dangdang/ddframe/rdb/sharding/parser/mysql/prepared_statement/two_params/"); } @Test public void assertParse() { new SQLParserEngine(DatabaseType.MySQL, getSql(), new ShardingRuleMockBuilder().addShardingColumns("user_id").addShardingColumns("order_id").addShardingColumns("state") .addAutoIncrementColumn("order", "order_id").build(), Arrays.<Object>asList(1, 2)).parseStatement(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
963f95ddaf80e37c34abeccea2e5700335ab8644
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/5fab9eab1ef3ccd4e42c62a71c5e9e21d01b506c/before/SQLEvalVisitorImpl.java
3dd9210bcf14a61df9bbe75685250a58cc2e4a79
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,091
java
/* * Copyright 1999-2011 Alibaba Group Holding Ltd. * * 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.alibaba.druid.sql.visitor; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLCaseExpr; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; import com.alibaba.druid.sql.ast.expr.SQLHexExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLInListExpr; import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLNullExpr; import com.alibaba.druid.sql.ast.expr.SQLNumberExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr; import com.alibaba.druid.sql.visitor.functions.Function; public class SQLEvalVisitorImpl extends SQLASTVisitorAdapter implements SQLEvalVisitor { private List<Object> parameters = new ArrayList<Object>(); private Map<String, Function> functions = new HashMap<String, Function>(); private int variantIndex = -1; private boolean markVariantIndex = true; public SQLEvalVisitorImpl(){ this(new ArrayList<Object>(1)); } public SQLEvalVisitorImpl(List<Object> parameters){ this.parameters = parameters; } public List<Object> getParameters() { return parameters; } public void setParameters(List<Object> parameters) { this.parameters = parameters; } public boolean visit(SQLCharExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public int incrementAndGetVariantIndex() { return ++variantIndex; } public int getVariantIndex() { return variantIndex; } public boolean visit(SQLVariantRefExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public boolean visit(SQLBinaryOpExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public boolean visit(SQLIntegerExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public boolean visit(SQLNumberExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public boolean visit(SQLHexExpr x) { return SQLEvalVisitorUtils.visit(this, x); } @Override public boolean visit(SQLCaseExpr x) { return SQLEvalVisitorUtils.visit(this, x); } @Override public boolean visit(SQLInListExpr x) { return SQLEvalVisitorUtils.visit(this, x); } @Override public boolean visit(SQLNullExpr x) { return SQLEvalVisitorUtils.visit(this, x); } @Override public boolean visit(SQLMethodInvokeExpr x) { return SQLEvalVisitorUtils.visit(this, x); } @Override public boolean visit(SQLQueryExpr x) { return SQLEvalVisitorUtils.visit(this, x); } public boolean isMarkVariantIndex() { return markVariantIndex; } public void setMarkVariantIndex(boolean markVariantIndex) { this.markVariantIndex = markVariantIndex; } @Override public Function getFunction(String funcName) { return functions.get(funcName); } @Override public void registerFunction(String funcName, Function function) { functions.put(funcName, function); } public boolean visit(SQLIdentifierExpr x) { return SQLEvalVisitorUtils.visit(this, x); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
41ef2e9d2d32ac36e0c1e4dfb93001fe2058c04d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_4a7e1e131e16bc6f80889c1dd5e31556598a7021/JoinLinesAction/12_4a7e1e131e16bc6f80889c1dd5e31556598a7021_JoinLinesAction_s.java
0343f89ba7765c4280a5ab317f0c4b2d4faf3480
[]
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
5,060
java
/******************************************************************************* * Copyright (c) 2007 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 * * Contributors: * Benjamin Muskalla - initial API and implementation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=41573 *******************************************************************************/ package org.eclipse.ui.texteditor; import java.util.ResourceBundle; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextSelection; /** * Action for joining two or more lines together by deleting the * line delimiters and trimming the whitespace between them. * * @since 3.3 */ public class JoinLinesAction extends TextEditorAction { private String fJoint= null; /** * Creates a line joining action. * * @param bundle the resource bundle for UI strings * @param prefix the prefix for the property keys into <code>bundle</code> * @param editor the editor * @param joint the string to put between the lines */ public JoinLinesAction(ResourceBundle bundle, String prefix, ITextEditor editor, String joint) { super(bundle, prefix, editor); Assert.isLegal(joint != null); fJoint= joint; update(); } /* * @see org.eclipse.jface.action.Action#run() */ public void run() { ITextEditor editor= getTextEditor(); if (editor == null) return; if (!validateEditorInputState()) return; IDocument document= getDocument(editor); if (document == null) return; ITextSelection selection= getSelection(editor); if (selection == null) return; int startLine= selection.getStartLine(); int endLine= selection.getEndLine(); try { joinLines(document, startLine, endLine); } catch (BadLocationException e) { // should not happen } } /** * Returns the editor's document. * * @param editor the editor * @return the editor's document */ private static IDocument getDocument(ITextEditor editor) { IDocumentProvider documentProvider= editor.getDocumentProvider(); if (documentProvider == null) return null; IDocument document= documentProvider.getDocument(editor.getEditorInput()); if (document == null) return null; return document; } /** * Returns the editor's selection. * * @param editor the editor * @return the editor's selection */ private static ITextSelection getSelection(ITextEditor editor) { ISelectionProvider selectionProvider= editor.getSelectionProvider(); if (selectionProvider == null) return null; ISelection selection= selectionProvider.getSelection(); if (!(selection instanceof ITextSelection)) return null; return (ITextSelection) selection; } /* * @see org.eclipse.ui.texteditor.TextEditorAction#update() */ public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); setEnabled(editor.isEditable()); } /** * Joins several text lines to one line. * * @param document the document * @param startLine the start line * @param endLine the end line * @throws BadLocationException */ private void joinLines(IDocument document, int startLine, int endLine) throws BadLocationException { if (startLine == document.getNumberOfLines() - 1) { // do nothing because we are in the last line return; } if (startLine == endLine) endLine++; // append join with the next line StringBuffer buffer= new StringBuffer(); for (int line= startLine; line <= endLine; line++) { buffer.append(trim(document, line, line == startLine)); if (line != endLine) buffer.append(fJoint); } int startLineOffset= document.getLineOffset(startLine); int endLineOffset= document.getLineOffset(endLine) + document.getLineLength(endLine); document.replace(startLineOffset, endLineOffset - startLineOffset, buffer.toString()); } private String trim(IDocument document, int line, boolean ignoreLeadingWhitespace) throws BadLocationException { int lineOffset= document.getLineOffset(line); int lineLength= document.getLineLength(line); lineLength= lineLength - document.getLineDelimiter(line).length(); if (!ignoreLeadingWhitespace) return document.get(lineOffset, lineLength).trim(); while (lineLength > 0 && Character.isWhitespace(document.getChar(lineOffset + lineLength - 1))) lineLength--; return document.get(lineOffset, lineLength); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
91383f596709106eed3451ee4103b9d70bdffaa5
a0568cfecfcbe5f33ed3cd207acf6ee443e2098b
/sepa/pain/pain014/src/main/java/com/xml2j/sepa2016/pain/pain014/DiscountAmountAndType1.java
0094888700f826824113e6a753757c5adfdc0544
[]
no_license
lolkedijkstra/xml2j-springdata-samples
a3863ccefd3ccb0b9347221e02cd26afa1217f7e
179792fe31f56842c10419a08982822e8bd21db8
refs/heads/master
2020-03-14T07:42:35.992497
2018-04-29T19:13:14
2018-04-29T19:13:14
131,487,603
0
0
null
null
null
null
UTF-8
Java
false
false
4,077
java
package com.xml2j.sepa2016.pain.pain014; /****************************************************************************** ----------------------------------------------------------------------------- XML2J XSD to Java code generator ----------------------------------------------------------------------------- This code was generated using XML2J code generator. Version: 2.5.0 Project home: XML2J https://github.com/lolkedijkstra/ Module: PAIN014 Generation date: Sun Apr 29 21:09:44 CEST 2018 Author: XML2J-GEN ******************************************************************************/ import com.xml2j.util.Printer; import com.xml2j.util.Compare; import com.xml2j.xml.core.ComplexDataType; import com.xml2j.xml.core.TypeAllocator; /** * DiscountAmountAndType1 data class. * * This class provides getters and setters for embedded attributes and elements. * Any complex data structure can be navigated by using the element getter methods. * */ public class DiscountAmountAndType1 extends ComplexDataType { /** * serial version UID */ private static final long serialVersionUID = 1L; /** * Constructor for DiscountAmountAndType1. * * @param elementName the name of the originating XML tag * @param parent the parent data */ public DiscountAmountAndType1(String elementName, ComplexDataType parent) { super(elementName, parent); } /** * Allocator class. * * This class implements the generic allocator interface that is used by the framework. * The allocator is used by the framework to instantiate type DiscountAmountAndType1. */ static class Allocator implements TypeAllocator<DiscountAmountAndType1> { /** * method for getting a new instance of type DiscountAmountAndType1. * * @param elementName the name of the originating XML tag * @param parent the parent data * @return new instance */ public DiscountAmountAndType1 newInstance(String elementName, ComplexDataType parent) { return new DiscountAmountAndType1(elementName, parent); } } /** instance of allocator class for this data class. */ private static Allocator allocator = new Allocator(); /** * Get Allocator for this data class. * This method is used by the handler class. * * @return instance of Allocator */ static public Allocator getAllocator() { return allocator; } /** element item for Tp element. * @serial */ private DiscountAmountType1Choice m_tp = null; /** element item for Amt element. * @serial */ private ActiveOrHistoricCurrencyAndAmount m_amt = null; /** * Get the embedded Tp element. * @return the item. */ public DiscountAmountType1Choice getTp() { return m_tp; } /** * This method sets (overwrites) the element Tp. * @param data the item that needs to be added. */ void setTp(DiscountAmountType1Choice data) { m_tp = data; } /** * Get the embedded Amt element. * @return the item. */ public ActiveOrHistoricCurrencyAndAmount getAmt() { return m_amt; } /** * This method sets (overwrites) the element Amt. * @param data the item that needs to be added. */ void setAmt(ActiveOrHistoricCurrencyAndAmount data) { m_amt = data; } /** * This method compares this and that. * @return true if this and that are the same, false otherwise. */ public boolean equals(Object that) { if (!super.equals(that)) return false; DiscountAmountAndType1 t = (DiscountAmountAndType1)that; if (!Compare.equals(m_tp, t.m_tp)) return false; if (!Compare.equals(m_amt, t.m_amt)) return false; return true; } /** * Printing method, prints the XML element to a Printer. * This method prints an XML fragment starting from DiscountAmountAndType1. * * @param out the Printer that the element is printed to * @see com.xml2j.util.Printer */ protected void printElements(Printer out) { super.printElements(out); if (m_tp != null) { m_tp.print(out); } if (m_amt != null) { m_amt.print(out); } } }
[ "lolkedijkstra@gmail.com" ]
lolkedijkstra@gmail.com
a468dde704b1eaf93e7e0d16aaa8220fa7b94b02
b0696ef108563896de77326113661175b4e8b400
/app/src/main/java/com/aier/environment/activity/SearchForAddFriendActivity.java
f4fedbc4d54b900b4b58cdfe71032768c928a67d
[]
no_license
xiaohualaila/ChangSanjiaoEnvironment
513c82e76e4bc78a446724beec60f3532ce8cdc1
fe84bec7ea301e32f06d1c02ca7d9af3b1f09277
refs/heads/master
2020-08-24T07:20:30.555339
2019-11-08T10:09:35
2019-11-08T10:09:35
216,782,598
1
0
null
null
null
null
UTF-8
Java
false
false
8,039
java
package com.aier.environment.activity; import android.content.Context; import android.content.Intent; import android.graphics.BitmapFactory; import android.os.Bundle; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.aier.environment.JGApplication; import com.aier.environment.R; import com.aier.environment.dialog.LoadDialog; import com.aier.environment.model.InfoModel; import com.aier.environment.utils.ToastUtil; import com.aier.environment.utils.photochoose.SelectableRoundedImageView; import java.io.File; import cn.jpush.im.android.api.JMessageClient; import cn.jpush.im.android.api.callback.GetUserInfoCallback; import cn.jpush.im.android.api.model.UserInfo; /** * Created by ${chenyn} on 2017/3/13. */ public class SearchForAddFriendActivity extends BaseActivity implements View.OnClickListener { private EditText mEt_searchUser; private Button mBtn_search; private LinearLayout mSearch_result; private SelectableRoundedImageView mSearch_header; private TextView mSearch_name; private Button mSearch_addBtn; private ImageView mIv_clear; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_search_for_add_friend); initView(); initListener(); } private void initListener() { mEt_searchUser.addTextChangedListener(new TextChange()); mBtn_search.setOnClickListener(this); mSearch_result.setOnClickListener(this); mSearch_addBtn.setOnClickListener(this); mIv_clear.setOnClickListener(this); } private void initView() { mEt_searchUser = (EditText) findViewById(R.id.et_searchUser); mBtn_search = (Button) findViewById(R.id.btn_search); mSearch_result = (LinearLayout) findViewById(R.id.search_result); mSearch_header = (SelectableRoundedImageView) findViewById(R.id.search_header); mSearch_name = (TextView) findViewById(R.id.search_name); mSearch_addBtn = (Button) findViewById(R.id.search_addBtn); mIv_clear = (ImageView) findViewById(R.id.iv_clear); mBtn_search.setEnabled(false); Intent intent = getIntent(); if (intent.getFlags() == 2) { initTitle(true, true, "发起单聊", "", false, ""); mSearch_addBtn.setVisibility(View.GONE); } else { initTitle(true, true, "添加好友", "", false, ""); } } @Override public void onClick(View v) { final Intent intent = new Intent(); switch (v.getId()) { case R.id.btn_search: hintKbTwo(); String searchUserName = mEt_searchUser.getText().toString(); if (!TextUtils.isEmpty(searchUserName)) { LoadDialog.show(this); JMessageClient.getUserInfo(searchUserName, new GetUserInfoCallback() { @Override public void gotResult(int responseCode, String responseMessage, UserInfo info) { LoadDialog.dismiss(SearchForAddFriendActivity.this); if (responseCode == 0) { InfoModel.getInstance().friendInfo = info; mSearch_result.setVisibility(View.VISIBLE); //已经是好友则不显示"加好友"按钮 if (info.isFriend()) { mSearch_addBtn.setVisibility(View.GONE); //如果是发起单聊.那么不能显示加好友按钮 } else if (!info.isFriend() && getIntent().getFlags() != 2) { mSearch_addBtn.setVisibility(View.VISIBLE); } //这个接口会在本地寻找头像文件,不存在就异步拉取 File avatarFile = info.getAvatarFile(); if (avatarFile != null) { mSearch_header.setImageBitmap(BitmapFactory.decodeFile(avatarFile.getAbsolutePath())); InfoModel.getInstance().setBitmap(BitmapFactory.decodeFile(avatarFile.getAbsolutePath())); } else { mSearch_header.setImageResource(R.drawable.rc_default_portrait); InfoModel.getInstance().setBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.rc_default_portrait)); } mSearch_name.setText(TextUtils.isEmpty(info.getNickname()) ? info.getUserName() : info.getNickname()); } else { ToastUtil.shortToast(SearchForAddFriendActivity.this, "该用户不存在"); mSearch_result.setVisibility(View.GONE); } } }); } break; case R.id.search_result: //详细资料 if (InfoModel.getInstance().isFriend()) { //已经是好友 intent.setClass(SearchForAddFriendActivity.this, FriendInfoActivity.class); intent.putExtra("addFriend", true); intent.putExtra("targetId", InfoModel.getInstance().friendInfo.getUserName()); //直接发起单聊 } else if (getIntent().getFlags() == 2){ intent.setClass(SearchForAddFriendActivity.this, GroupNotFriendActivity.class); intent.putExtra(JGApplication.TARGET_ID, InfoModel.getInstance().friendInfo.getUserName()); intent.putExtra(JGApplication.TARGET_APP_KEY, InfoModel.getInstance().friendInfo.getAppKey()); }else { //添加好友 intent.setClass(SearchForAddFriendActivity.this, SearchFriendInfoActivity.class); } startActivity(intent); break; case R.id.search_addBtn: //添加申请 intent.setClass(SearchForAddFriendActivity.this, VerificationActivity.class); startActivity(intent); break; case R.id.iv_clear: mEt_searchUser.setText(""); break; } } private class TextChange implements TextWatcher { @Override public void afterTextChanged(Editable arg0) { } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } @Override public void onTextChanged(CharSequence cs, int start, int before, int count) { boolean feedback = mEt_searchUser.getText().length() > 0; if (feedback) { mIv_clear.setVisibility(View.VISIBLE); mBtn_search.setEnabled(true); } else { mIv_clear.setVisibility(View.GONE); mBtn_search.setEnabled(false); } } } private void hintKbTwo() { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive() && getCurrentFocus() != null) { if (getCurrentFocus().getWindowToken() != null) { imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } } } }
[ "380129462@qq.com" ]
380129462@qq.com
9d34744e0a1688c81106fad5865c6a9b26595c6f
344fc02677e88f9c2988c5014d417a86b9d74f71
/android/app/src/main/java/com/reactnativehooktesta_6003/MainActivity.java
f2820952154156ab031e9b19c0b50896f67c5535
[]
no_license
narenderChatha/testHookApp
52a2094267603aa73b596578dd3556a81c12eb31
70ae6b305d111e59ff68a42f1520c2a61ef81c35
refs/heads/master
2022-12-17T12:21:33.693305
2019-07-16T08:53:21
2019-07-16T08:53:21
197,159,343
0
0
null
2022-12-09T18:30:54
2019-07-16T09:05:45
Python
UTF-8
Java
false
false
908
java
package com.reactnativehooktesta_6003; import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivityDelegate; import com.facebook.react.ReactRootView; import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "reactnativehooktesta_6003"; } @Override protected ReactActivityDelegate createReactActivityDelegate() { return new ReactActivityDelegate(this, getMainComponentName()) { @Override protected ReactRootView createRootView() { return new RNGestureHandlerEnabledRootView(MainActivity.this); } }; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
c9f2f357614468028e5f008311fdbd13e4109289
22cd38be8bf986427361079a2f995f7f0c1edeab
/src/main/java/core/erp/hat/service/impl/HATE0050Dao.java
93072dd8e2a1e0dfd0a4a1ae850e6d57f2841d3a
[]
no_license
shaorin62/MIS
97f51df344ab303c85acb2e7f90bb69944f85e0f
a188b02a73f668948246c133cd202fe091aa29c7
refs/heads/master
2021-04-05T23:46:52.422434
2018-03-09T06:41:04
2018-03-09T06:41:04
124,497,033
0
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
/** * core.erp.hrm.service.impl.HATE0050Dao.java - <Created by Code Template generator> */ package core.erp.hat.service.impl; import java.util.Map; import org.springframework.stereotype.Repository; import core.ifw.cmm.dataaccess.CmmBaseDAO; /** * <pre> * HATE0050Dao - 연장근로현황 프로그램 데이터처리 DAO 클래스 * </pre> * * @author 김칠석 * @since 2016.09.09 * @version 1.0 * * <pre> * == Modification Information == * Date Modifier Comment * ==================================================== * 2016.09.09 김칠석 Initial Created. * ==================================================== * </pre> * * Copyright INBUS.(C) All right reserved. */ @Repository("HATE0050Dao") public class HATE0050Dao extends CmmBaseDAO { /** * <pre> * 연장근로현황의 요일정보 조회 * </pre> * @param paramMap - 조회 파라미터 * @return 자격사항 데이터 목록 * @throws Exception - 처리시 발생한 예외 */ @SuppressWarnings("rawtypes") public Object processSEARCH00(Map searchVo) throws Exception { return list("HATE0050.SEARCH00", searchVo); } /** * <pre> * 연장근로현황 조회 * </pre> * @param paramMap - 조회 파라미터 * @return 자격사항 데이터 목록 * @throws Exception - 처리시 발생한 예외 */ @SuppressWarnings("rawtypes") public Object processSEARCH01(Map searchVo) throws Exception { return list("HATE0050.SEARCH01", searchVo); } }
[ "imosh@nate.com" ]
imosh@nate.com
801929e8c26493ed875a688774512aa87f07d903
22b533fe0c04e96226c81a3a6559e671543bb1f1
/src/main/java/org/tinymediamanager/ui/tvshows/panels/tvshow/TvShowCastPanel.java
f88341492eddf09022e12db8f7e89bd2e5c0d2f5
[ "Apache-2.0" ]
permissive
kenti-lan/tinyPornManager
ff392f6ad12e54d1718d8eb2d33878a18c850993
d53b0ada8d0211f5d52a887945ce0428f5a65591
refs/heads/dev
2023-08-21T23:09:57.934985
2021-10-07T16:17:17
2021-10-07T16:17:17
432,666,109
1
0
Apache-2.0
2021-11-28T09:11:04
2021-11-28T09:11:04
null
UTF-8
Java
false
false
4,630
java
/* * Copyright 2012 - 2020 Manuel Laggner * * 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.tinymediamanager.ui.tvshows.panels.tvshow; import static org.tinymediamanager.core.Constants.ACTORS; import java.awt.Font; import java.beans.PropertyChangeListener; import java.util.ResourceBundle; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import org.tinymediamanager.core.UTF8Control; import org.tinymediamanager.core.entities.Person; import org.tinymediamanager.ui.TmmFontHelper; import org.tinymediamanager.ui.components.ActorImageLabel; import org.tinymediamanager.ui.components.PersonTable; import org.tinymediamanager.ui.components.TmmLabel; import org.tinymediamanager.ui.components.table.TmmTable; import org.tinymediamanager.ui.tvshows.TvShowSelectionModel; import ca.odell.glazedlists.BasicEventList; import ca.odell.glazedlists.EventList; import ca.odell.glazedlists.GlazedLists; import ca.odell.glazedlists.ObservableElementList; import net.miginfocom.swing.MigLayout; /** * The Class TvShowCastPanel, to display the cast for this tv show. * * @author Manuel Laggner */ public class TvShowCastPanel extends JPanel { private static final long serialVersionUID = 2374973082749248956L; /** @wbp.nls.resourceBundle messages */ private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("messages", new UTF8Control()); private final TvShowSelectionModel selectionModel; private EventList<Person> actorEventList = null; /** * UI elements */ private TmmTable tableActors; private ActorImageLabel lblActorImage; /** * Instantiates a new tv show cast panel. * * @param model * the selection model */ public TvShowCastPanel(TvShowSelectionModel model) { selectionModel = model; actorEventList = GlazedLists.threadSafeList(new ObservableElementList<>(new BasicEventList<>(), GlazedLists.beanConnector(Person.class))); initComponents(); lblActorImage.enableLightbox(); lblActorImage.setCacheUrl(true); // install the propertychangelistener PropertyChangeListener propertyChangeListener = propertyChangeEvent -> { String property = propertyChangeEvent.getPropertyName(); Object source = propertyChangeEvent.getSource(); // react on selection/change of a TV show if (source.getClass() != TvShowSelectionModel.class) { return; } if ("selectedTvShow".equals(property) || ACTORS.equals(property)) { actorEventList.clear(); actorEventList.addAll(selectionModel.getSelectedTvShow().getActors()); if (!actorEventList.isEmpty()) { tableActors.getSelectionModel().setSelectionInterval(0, 0); } } }; selectionModel.addPropertyChangeListener(propertyChangeListener); // selectionlistener for the selected actor tableActors.getSelectionModel().addListSelectionListener(arg0 -> { if (!arg0.getValueIsAdjusting()) { int selectedRow = tableActors.convertRowIndexToModel(tableActors.getSelectedRow()); if (selectedRow >= 0 && selectedRow < actorEventList.size()) { Person actor = actorEventList.get(selectedRow); lblActorImage.setActor(selectionModel.getSelectedTvShow(), actor); } else { lblActorImage.setImageUrl(""); } } }); } private void initComponents() { setLayout(new MigLayout("", "[][400lp,grow][150lp,grow]", "[200lp,grow][grow]")); { JLabel lblActorsT = new TmmLabel(BUNDLE.getString("metatag.actors")); TmmFontHelper.changeFont(lblActorsT, Font.BOLD); add(lblActorsT, "cell 0 0,aligny top"); lblActorImage = new ActorImageLabel(); add(lblActorImage, "cell 2 0,grow"); tableActors = new PersonTable(actorEventList); JScrollPane scrollPaneActors = new JScrollPane(tableActors); tableActors.configureScrollPane(scrollPaneActors); scrollPaneActors.setViewportView(tableActors); add(scrollPaneActors, "cell 1 0 1 2,grow"); } } }
[ "manuel.laggner@gmail.com" ]
manuel.laggner@gmail.com
a09db2ac0553699c4029abb142f250f32e3a9ff2
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A92s_10_0_0/src/main/java/com/android/server/IColorCustomCommonManager.java
1c53249f04087b38bab2014bd08db59e2c7eed79
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
146
java
package com.android.server; import android.common.IOppoCommonFeature; public interface IColorCustomCommonManager extends IOppoCommonFeature { }
[ "dstmath@163.com" ]
dstmath@163.com
d408306ea5600ab7a0149cc75c0c459f7795081e
54d2953f37bf1094f77e5978b45f14d25942eee8
/runtime/opaeum-runtime-core/opaeum-runtime-hibernate/src/test/generated-java/org/opaeum/runtime/bpm/request/taskrequest/taskrequestregion/active/region1/Reserved.java
a9d2074211035cfd4e04a0d43b92470b59e699f5
[]
no_license
opaeum/opaeum
7d30c2fc8f762856f577c2be35678da9890663f7
a517c2446577d6a961c1fcdcc9d6e4b7a165f33d
refs/heads/master
2022-07-14T00:35:23.180202
2016-01-01T15:23:11
2016-01-01T15:23:11
987,891
2
2
null
2022-06-29T19:45:00
2010-10-14T19:11:53
Java
UTF-8
Java
false
false
2,728
java
package org.opaeum.runtime.bpm.request.taskrequest.taskrequestregion.active.region1; import java.util.Set; import javax.persistence.Transient; import org.opaeum.runtime.bpm.request.TaskRequest; import org.opaeum.runtime.bpm.request.TaskRequestToken; import org.opaeum.runtime.bpm.request.taskrequest.taskrequestregion.ReservedToSuspended; import org.opaeum.runtime.bpm.request.taskrequest.taskrequestregion.active.Region1; import org.opaeum.runtime.domain.CancelledEvent; import org.opaeum.runtime.domain.OutgoingEvent; import org.opaeum.runtime.domain.TriggerMethod; import org.opaeum.runtime.statemachines.StateActivation; public class Reserved<SME extends TaskRequest> extends StateActivation<SME, TaskRequestToken<SME>> { static public String ID = "252060@_Q6NAcIoaEeCPduia_-NbFw"; @Transient private ReservedToInProgress<SME> ReservedToInProgress; @Transient private ReservedToReady<SME> ReservedToReady; @Transient private ReservedToSuspended<SME> ReservedToSuspended; /** Constructor for Reserved * * @param region */ public Reserved(Region1<SME> region) { super(ID,region); } public SME getBehaviorExecution() { SME result = (SME)super.getBehaviorExecution(); return result; } public Set<CancelledEvent> getCancelledEvents() { Set result = getBehaviorExecution().getCancelledEvents(); return result; } public String getHumanName() { String result = "Reserved"; return result; } public Set<OutgoingEvent> getOutgoingEvents() { Set result = getBehaviorExecution().getOutgoingEvents(); return result; } public ReservedToInProgress<SME> getReservedToInProgress() { return this.ReservedToInProgress; } public ReservedToReady<SME> getReservedToReady() { return this.ReservedToReady; } public ReservedToSuspended<SME> getReservedToSuspended() { return this.ReservedToSuspended; } public TriggerMethod[] getTriggerMethods() { TriggerMethod[] result = new TriggerMethod[]{new TriggerMethod(false,"Revoked","Revoked"),new TriggerMethod(false,"Suspended","Suspended"),new TriggerMethod(false,"Started","Started")}; return result; } public boolean onCompletion() { boolean result = false; return result; } public void onEntry(TaskRequestToken token) { super.onEntry(token); getStateMachineExecution().setHistory(ID); } public void setReservedToInProgress(ReservedToInProgress<SME> ReservedToInProgress) { this.ReservedToInProgress=ReservedToInProgress; } public void setReservedToReady(ReservedToReady<SME> ReservedToReady) { this.ReservedToReady=ReservedToReady; } public void setReservedToSuspended(ReservedToSuspended<SME> ReservedToSuspended) { this.ReservedToSuspended=ReservedToSuspended; } }
[ "ampieb@gmail.com" ]
ampieb@gmail.com
f67b8493bc316d8caec8ac04e1e223db7ddb2182
c20af69f7b2b0c3f41d0ad62a8a76e560e0e0b2c
/basex-core/src/main/java/org/basex/query/value/item/Int.java
40cd8a20fe272c7f2918df2d02635fe12086becf
[ "BSD-3-Clause" ]
permissive
ehsan-keshavarzian/basex
6159254877d1e7b627c8e0c8daea5600ced109bf
1a1da05853de12fed51675317bf3b0a641c98078
refs/heads/master
2021-08-23T02:57:05.929847
2017-12-02T18:18:28
2017-12-02T18:18:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,841
java
package org.basex.query.value.item; import java.math.*; import org.basex.query.*; import org.basex.query.util.collation.*; import org.basex.query.value.type.*; import org.basex.util.*; /** * Integer item ({@code xs:int}, {@code xs:integer}, {@code xs:short}, etc.). * * @author BaseX Team 2005-17, BSD License * @author Christian Gruen */ public final class Int extends ANum { /** Maximum values. */ public static final Int MAX; /** Value 0. */ public static final Int ZERO; /** Value 1. */ public static final Int ONE; /** Constant values. */ private static final Int[] INTSS; /** Integer value. */ private final long value; // caches the first 128 integers static { final int nl = 128; INTSS = new Int[nl]; for(int n = 0; n < nl; n++) INTSS[n] = new Int(n); MAX = get(Long.MAX_VALUE); ZERO = INTSS[0]; ONE = INTSS[1]; } /** * Constructor. * @param value value */ private Int(final long value) { this(value, AtomType.ITR); } /** * Constructor. * @param value value * @param type item type */ public Int(final long value, final Type type) { super(type); this.value = value; } /** * Returns an instance of this class. * @param value value * @return instance */ public static Int get(final long value) { return value >= 0 && value < INTSS.length ? INTSS[(int) value] : new Int(value); } /** * Returns an instance of this class. * @param value value * @param type item type * @return instance */ public static Int get(final long value, final Type type) { return type == AtomType.ITR ? get(value) : new Int(value, type); } @Override public byte[] string() { return value == 0 ? Token.ZERO : Token.token(value); } @Override public boolean bool(final InputInfo ii) { return value != 0; } @Override public long itr() { return value; } @Override public float flt() { return value; } @Override public double dbl() { return value; } @Override public Item test(final QueryContext qc, final InputInfo ii) { return value == qc.focus.pos ? this : null; } @Override public BigDecimal dec(final InputInfo ii) { return BigDecimal.valueOf(value); } @Override public Int abs() { return value < 0 ? get(-value) : this; } @Override public Int ceiling() { return this; } @Override public Int floor() { return this; } @Override public ANum round(final int scale, final boolean even) { final long v = rnd(scale, even); return v == value ? this : get(v); } /** * Returns a rounded value. * @param s scale * @param e half-to-even flag * @return result */ private long rnd(final int s, final boolean e) { long v = value; if(s >= 0 || v == 0) return v; if(s < -15) return Dec.get(new BigDecimal(v)).round(s, e).itr(); long f = 1; final int c = -s; for(long i = 0; i < c; i++) f = (f << 3) + (f << 1); final boolean n = v < 0; final long a = n ? -v : v, m = a % f, d = m << 1; v = a - m; if(e ? d > f || d == f && v % (f << 1) != 0 : n ? d > f : d >= f) v += f; return n ? -v : v; } @Override public boolean eq(final Item it, final Collation coll, final StaticContext sc, final InputInfo ii) throws QueryException { return it instanceof Int ? value == ((Int) it).value : it.type != AtomType.DEC ? value == it.dbl(ii) : it.eq(this, coll, sc, ii); } @Override public int diff(final Item it, final Collation coll, final InputInfo ii) throws QueryException { if(it instanceof Int) return Long.compare(value, ((Int) it).value); final double n = it.dbl(ii); return Double.isNaN(n) ? UNDEF : value < n ? -1 : value > n ? 1 : 0; } @Override public Object toJava() { switch((AtomType) type) { case BYT: return (byte) value; case SHR: case UBY: return (short) value; case INT: case USH: return (int) value; case LNG: case UIN: return value; default: return new BigInteger(toString()); } } @Override public boolean equals(final Object obj) { if(this == obj) return true; if(!(obj instanceof Int)) return false; final Int i = (Int) obj; return type == i.type && value == i.value; } /** * Converts the given item to a long primitive. * @param item item to be converted * @param info input info * @return long value * @throws QueryException query exception */ public static long parse(final Item item, final InputInfo info) throws QueryException { final byte[] value = item.string(info); final long l = Token.toLong(value); if(l != Long.MIN_VALUE || Token.eq(Token.trim(value), Token.MINLONG)) return l; throw AtomType.ITR.castError(item, info); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
35d1dae794e41119805ad70a43898cf862b7b249
6f649ef39ce23adb0b1cc6d3e55b7e6bdc0afc50
/src/native/com/stmtnode/primitive/type/WrapTypeNativeNode.java
0e1d733cb076bdc0a309478281b6d4a93ceadac7
[]
no_license
bernardobreder/stmtnode-shell
d23042ffeb5e1df26486158bdc50dfd653c3f2a0
23102ada1723d352aee659a7cfdc43be4a3e38f1
refs/heads/master
2021-05-09T05:28:15.804390
2018-02-19T22:03:06
2018-02-19T22:03:06
119,310,635
0
0
null
null
null
null
UTF-8
Java
false
false
217
java
package com.stmtnode.primitive.type; public abstract class WrapTypeNativeNode extends TypeNativeNode { public final TypeNativeNode type; public WrapTypeNativeNode(TypeNativeNode type) { this.type = type; } }
[ "bernardobreder@gmail.com" ]
bernardobreder@gmail.com
915f23da6ec525e6e21d2b07c4a13aa46c19de28
f2d980ea8ad3d8502f6211f5e7960b63549603de
/iso3166-integration/iso3166-client/src/main/java/org/sistcoop/iso3166/admin/client/Config.java
fdf9211e3598fd3e716b36e367dad84c5c5d57e6
[ "MIT" ]
permissive
sistcoop/iso3166
ef5e97a74d8abbfbbc30dd592b8ff064626a8773
c04db942624cff8d7da3d113e84f5a8a05d6354f
refs/heads/master
2021-01-22T12:17:17.519082
2015-11-25T17:55:58
2015-11-25T17:55:58
32,942,148
0
0
null
null
null
null
UTF-8
Java
false
false
196
java
package org.sistcoop.iso3166.admin.client; /** * @author rodrigo.sasaki@icarros.com.br */ public class Config { public final static String name = "name"; private Config() { } }
[ "carlosthe19916@gmail.com" ]
carlosthe19916@gmail.com
022ab507cf950e9dbfd5257df2b49f0236cc8075
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/2512/digits_313d572e_000.java
4c8995a11c07ec5d4e15f4d6915012208963d02f
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,747
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_313d572e_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_313d572e_000 mainClass = new digits_313d572e_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj given = new IntObj (), digit10 = new IntObj (), digit9 = new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 = new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 = new IntObj (), digit2 = new IntObj (), digit1 = new IntObj (); output += (String.format ("\nEnter an interger > ")); given.value = scanner.nextInt (); if (given.value >= 1 && given.value < 10) { digit10.value = given.value % 10; output += (String.format ("\n%d\nThat's all, have a nice day!\n", digit10.value)); } if (given.value >= 10 && given.value < 100) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; output += (String.format ("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value)); } if (given.value >= 100 && given.value < 1000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; output += (String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value)); } if (given.value >= 1000 && given.value < 10000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value) / 100000000 % 10; digit7.value = (given.value / 1000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value)); } if (given.value >= 10000 && given.value < 100000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value)); } if (given.value >= 100000 && given.value < 1000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value)); } if (given.value >= 1000000 && given.value < 10000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value)); } if (given.value >= 10000000 && given.value < 100000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value)); } if (given.value >= 100000000 && given.value < 1000000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value)); } if (given.value >= 1000000000 && given.value < 10000000000L) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; digit1.value = (given.value / 1000000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value, digit1.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
7975de4c64a39530f032a72b1543b64e5c2a0862
cb762d4b0f0ea986d339759ba23327a5b6b67f64
/src/web/com/joymain/jecs/fi/webapp/action/FiFundbookBalanceFormController.java
c64304fa0835f2acbf53b7ee74e1cfd6eb7fb895
[ "Apache-2.0" ]
permissive
lshowbiz/agnt_ht
c7d68c72a1d5fa7cd0e424eabb9159d3552fe9dc
fd549de35cb12a2e3db1cd9750caf9ce6e93e057
refs/heads/master
2020-08-04T14:24:26.570794
2019-10-02T03:04:13
2019-10-02T03:04:13
212,160,437
0
0
null
null
null
null
UTF-8
Java
false
false
2,743
java
package com.joymain.jecs.fi.webapp.action; import java.util.Locale; import java.math.BigDecimal; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.ServletRequestDataBinder; import org.apache.commons.lang.StringUtils; import com.joymain.jecs.webapp.action.BaseFormController; import com.joymain.jecs.fi.model.FiFundbookBalance; import com.joymain.jecs.fi.service.FiFundbookBalanceManager; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; public class FiFundbookBalanceFormController extends BaseFormController { private FiFundbookBalanceManager fiFundbookBalanceManager = null; public void setFiFundbookBalanceManager(FiFundbookBalanceManager fiFundbookBalanceManager) { this.fiFundbookBalanceManager = fiFundbookBalanceManager; } public FiFundbookBalanceFormController() { setCommandName("fiFundbookBalance"); setCommandClass(FiFundbookBalance.class); } protected Object formBackingObject(HttpServletRequest request) throws Exception { String fbbId = request.getParameter("fbbId"); FiFundbookBalance fiFundbookBalance = null; if (!StringUtils.isEmpty(fbbId)) { fiFundbookBalance = fiFundbookBalanceManager.getFiFundbookBalance(fbbId); } else { fiFundbookBalance = new FiFundbookBalance(); } return fiFundbookBalance; } public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { if (log.isDebugEnabled()) { log.debug("entering 'onSubmit' method..."); } FiFundbookBalance fiFundbookBalance = (FiFundbookBalance) command; boolean isNew = (fiFundbookBalance.getFbbId() == null); Locale locale = request.getLocale(); String key=null; String strAction = request.getParameter("strAction"); if ("deleteFiFundbookBalance".equals(strAction) ) { fiFundbookBalanceManager.removeFiFundbookBalance(fiFundbookBalance.getFbbId().toString()); key="fiFundbookBalance.delete"; }else{ fiFundbookBalanceManager.saveFiFundbookBalance(fiFundbookBalance); key="fiFundbookBalance.update"; } return new ModelAndView(getSuccessView()); } protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) { // TODO Auto-generated method stub // binder.setAllowedFields(allowedFields); // binder.setDisallowedFields(disallowedFields); // binder.setRequiredFields(requiredFields); super.initBinder(request, binder); } }
[ "727736571@qq.com" ]
727736571@qq.com
450d1590ebff11356c008cb1e1841e9135924742
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/airbnb/android/lib/fragments/paymentinfo/payout/PayoutCurrencyFragment$$Icepick.java
d03c3eb2effc90a4befb209dd8940edcc4902af8
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
1,121
java
package com.airbnb.android.lib.fragments.paymentinfo.payout; import android.os.Bundle; import com.airbnb.android.core.models.PayoutInfoType; import com.airbnb.android.lib.fragments.paymentinfo.payout.PayoutCurrencyFragment; import icepick.Bundler; import icepick.Injector.Helper; import icepick.Injector.Object; import java.util.HashMap; import java.util.Map; public class PayoutCurrencyFragment$$Icepick<T extends PayoutCurrencyFragment> extends Object<T> { private static final Map<String, Bundler<?>> BUNDLERS = new HashMap(); /* renamed from: H */ private static final Helper f9579H = new Helper("com.airbnb.android.lib.fragments.paymentinfo.payout.PayoutCurrencyFragment$$Icepick.", BUNDLERS); public void restore(T target, Bundle state) { if (state != null) { target.payoutInfoType = (PayoutInfoType) f9579H.getParcelable(state, "payoutInfoType"); super.restore(target, state); } } public void save(T target, Bundle state) { super.save(target, state); f9579H.putParcelable(state, "payoutInfoType", target.payoutInfoType); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
c1e6c79bb63c507b37c0113ccad87d52a9c24f39
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_18a2bf634aece0029993ee4c7fbe15e8d883c0c9/ActionManager/14_18a2bf634aece0029993ee4c7fbe15e8d883c0c9_ActionManager_s.java
e66dcaa638321c4f94417d37f9ad58f66ed05c42
[]
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
6,392
java
package com.chalcodes.weaponm.gui.action; import java.awt.event.KeyEvent; import java.util.HashSet; import java.util.Set; import javax.swing.AbstractAction; import javax.swing.AbstractButton; import javax.swing.Action; import javax.swing.JMenu; import javax.swing.JMenuBar; import bibliothek.gui.dock.common.CControl; import bibliothek.gui.dock.common.menu.SingleCDockableListMenuPiece; import bibliothek.gui.dock.facile.menu.RootMenuPiece; import com.chalcodes.weaponm.database.DatabaseManager; import com.chalcodes.weaponm.event.Event; import com.chalcodes.weaponm.event.EventListener; import com.chalcodes.weaponm.event.EventSupport; import com.chalcodes.weaponm.event.EventType; import com.chalcodes.weaponm.gui.Gui; import com.chalcodes.weaponm.gui.Strings; import com.chalcodes.weaponm.network.NetworkManager; /** * Maintains collections of actions and UI elements that are enabled and * disabled in response to events. Also generates the main window's menu bar. * * @author <a href="mailto:kjkrum@gmail.com">Kevin Krumwiede</a> */ public class ActionManager implements EventListener { // private static final Logger log = // LoggerFactory.getLogger(ActionManager.class.getSimpleName()); private final JMenuBar menuBar = new JMenuBar(); private final Set<AbstractAction> enableOnLoad = new HashSet<AbstractAction>(); // disable on unload private final Set<JMenu> enableOnLoadMenus = new HashSet<JMenu>(); // because AbstractAction and JMenu have no ancestor in common that includes setEnabled(...) private final Set<AbstractAction> enableOnConnect = new HashSet<AbstractAction>(); // disable on disconnect private final Set<AbstractAction> disableOnConnect = new HashSet<AbstractAction>(); // enable on disconnect public ActionManager(Gui gui, EventSupport eventSupport, DatabaseManager dbm, NetworkManager network, CControl dockControl) { populateMenuBar(gui, eventSupport, dbm, network, dockControl); eventSupport.addEventListener(this, EventType.DB_OPENED); eventSupport.addEventListener(this, EventType.DB_CLOSED); eventSupport.addEventListener(this, EventType.NET_CONNECTED); eventSupport.addEventListener(this, EventType.NET_DISCONNECTED); } public JMenuBar getMenuBar() { return menuBar; } private void populateMenuBar(Gui gui, EventSupport eventSupport, DatabaseManager dbm, NetworkManager network, CControl dockControl) { final JMenu dbMenu = new JMenu(); setText(dbMenu, "MENU_DATABASE"); dbMenu.add(new OpenDatabaseAction(gui, dbm)); dbMenu.add(new NewDatabaseAction(gui, dbm)); AbstractAction saveAction = new SaveDatabaseAction(gui, dbm); enableOnLoad.add(saveAction); dbMenu.add(saveAction); AbstractAction closeAction = new CloseDatabaseAction(gui); enableOnLoad.add(closeAction); dbMenu.add(closeAction); menuBar.add(dbMenu); final JMenu viewMenu = new JMenu(); setText(viewMenu, "MENU_VIEW"); final SingleCDockableListMenuPiece piece = new SingleCDockableListMenuPiece(dockControl); final RootMenuPiece root = new RootMenuPiece(viewMenu) { @Override protected void updateEnabled() { // do nothing } }; root.setDisableWhenEmpty(false); root.add(piece); //viewMenu.addSeparator(); // TODO save/load layout actions // multiple perspectives? per database or global? enableOnLoadMenus.add(viewMenu); menuBar.add(viewMenu); final JMenu netMenu = new JMenu(); setText(netMenu, "MENU_NETWORK"); enableOnLoadMenus.add(netMenu); AbstractAction connectAction = new ConnectAction(dbm, network); disableOnConnect.add(connectAction); netMenu.add(connectAction); AbstractAction disconnectAction = new DisconnectAction(network); enableOnConnect.add(disconnectAction); netMenu.add(disconnectAction); netMenu.addSeparator(); AbstractAction optionsAction = new ShowLoginOptionsDialogAction(gui, dbm); disableOnConnect.add(optionsAction); netMenu.add(optionsAction); menuBar.add(netMenu); final JMenu weaponMenu = new JMenu(); setText(weaponMenu, "MENU_WEAPON"); weaponMenu.add(new ShowAboutDialogAction(gui)); weaponMenu.add(new ShowCreditsWindowAction(gui)); weaponMenu.add(new WebsiteAction()); weaponMenu.addSeparator(); weaponMenu.add(new ExitAction(gui)); menuBar.add(weaponMenu); } @Override public void onEvent(Event event) { switch(event.getType()) { case DB_OPENED: for(AbstractAction action : enableOnLoad) { action.setEnabled(true); } for(JMenu menu : enableOnLoadMenus) { menu.setEnabled(true); } break; case DB_CLOSED: //log.debug("handling DB_CLOSED"); for(AbstractAction action : enableOnLoad) { action.setEnabled(false); } for(JMenu menu : enableOnLoadMenus) { //log.debug("disabling {}", menu); menu.setEnabled(false); } break; case NET_CONNECTED: for(AbstractAction action : enableOnConnect) { action.setEnabled(true); } for(AbstractAction action : disableOnConnect) { action.setEnabled(false); } break; case NET_DISCONNECTED: for(AbstractAction action : enableOnConnect) { action.setEnabled(false); } for(AbstractAction action : disableOnConnect) { action.setEnabled(true); } break; } } /** * Sets the text and keyboard mnemonic for an action. * * @param action the action * @param key a key constant from {@link com.chalcodes.weaponm.gui.Strings} */ static void setText(AbstractAction action, String key) { String raw = Strings.getString(key); String stripped = raw.replace("_", ""); action.putValue(Action.NAME, stripped); int idx = raw.indexOf('_'); if(idx != -1 && idx < stripped.length()) { action.putValue(Action.MNEMONIC_KEY, KeyEvent.getExtendedKeyCodeForChar(stripped.charAt(idx))); } } /** * Sets the text and keyboard mnemonic for a button, menu, or menu item. * * @param button the button * @param key a key constant from {@link com.chalcodes.weaponm.gui.Strings} */ static void setText(AbstractButton button, String key) { String raw = Strings.getString(key); String stripped = raw.replace("_", ""); button.setText(stripped); int idx = raw.indexOf('_'); if(idx != -1 && idx < stripped.length()) { button.setMnemonic(stripped.charAt(idx)); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1d9b96f85fba0a12e7165603cd02305a65d78ea8
0584934e400a5a799ce5547b90372fc64d014a1a
/yymz/src/com/model/Message.java
b66437caf537421005db4aa65fcdc195ec0fe47a
[]
no_license
chenkingDu/hospitalappointment
07d97de7af63395f9c4b477158794b027a9584d0
7eb5f76b163376b0d713208c73deb03c188a6060
refs/heads/master
2022-01-05T21:15:25.059706
2019-05-09T13:41:19
2019-05-09T13:41:19
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,597
java
package com.model; /** * ÁôÑÔʵÌå·â×°Àà * */ public class Message implements java.io.Serializable{ private int id; private String name; private String title; private String content; private String time; private int nameId; public Message() { super(); } public Message(int id, String name, String title, String content, String time, int nameId) { super(); this.id = id; this.name = name; this.title = title; this.content = content; this.time = time; this.nameId = nameId; } public int getNameId() { return nameId; } public void setNameId(int nameId) { this.nameId = nameId; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() {return name; } public void setName(String name) { this.name = name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return "Message [id=" + id + ", name=" + name + ", title=" + title + ", content=" + content + ", time=" + time + ", nameId=" + nameId + "]"; } }
[ "you@example.com" ]
you@example.com
9b097ec395a962bfb687aadc95db30f8a518588d
0889521f422166404e325d3716e0b6ddbdef8ff1
/src/main/java/com/pinpinbox/android/Views/HeaderScroll/scrollable/ColorRandomizer.java
92285a4ccd30be9662e95b7c01eef216afbec50d
[]
no_license
pinpinbox/app
8efac19291b0d243ee305971cb43944878334adf
a32914264de932e73f762396a10143149f2ea670
refs/heads/master
2021-06-30T01:49:40.132026
2019-04-03T08:06:51
2019-04-03T08:06:51
115,250,997
1
0
null
null
null
null
UTF-8
Java
false
false
590
java
package com.pinpinbox.android.Views.HeaderScroll.scrollable; import android.os.SystemClock; import java.util.Random; /** * Created by vmage on 2016/8/17. */ public class ColorRandomizer { private final Random mRandom; private final int[] mColors; private final int mMax; public ColorRandomizer(int[] colors) { this.mRandom = new Random(SystemClock.elapsedRealtime()); this.mColors = colors; this.mMax = mColors.length - 1; } public int next() { final int index = mRandom.nextInt(mMax); return mColors[index]; } }
[ "k57764328@vmage.com.tw" ]
k57764328@vmage.com.tw
85632fad8203fc3db1368a8b4ac2edc026a0540e
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_392/Testnull_39152.java
8a9cd7972c96aa7a15ddf724a19c097f2ad3ed95
[]
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
308
java
package org.gradle.test.performancenull_392; import static org.junit.Assert.*; public class Testnull_39152 { private final Productionnull_39152 production = new Productionnull_39152("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
22551fb90f83722e2dc110873b69983d44aaa8fa
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/ice-20201109/src/main/java/com/aliyun/ice20201109/models/ListSmartJobsRequest.java
ad48744b9f75a9bcb25f6b843729e0bdf749807e
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
2,106
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ice20201109.models; import com.aliyun.tea.*; public class ListSmartJobsRequest extends TeaModel { @NameInMap("JobState") public String jobState; @NameInMap("JobType") public String jobType; @NameInMap("MaxResults") public Long maxResults; @NameInMap("NextToken") public String nextToken; @NameInMap("PageNo") public Long pageNo; @NameInMap("PageSize") public Long pageSize; @NameInMap("SortBy") public String sortBy; public static ListSmartJobsRequest build(java.util.Map<String, ?> map) throws Exception { ListSmartJobsRequest self = new ListSmartJobsRequest(); return TeaModel.build(map, self); } public ListSmartJobsRequest setJobState(String jobState) { this.jobState = jobState; return this; } public String getJobState() { return this.jobState; } public ListSmartJobsRequest setJobType(String jobType) { this.jobType = jobType; return this; } public String getJobType() { return this.jobType; } public ListSmartJobsRequest setMaxResults(Long maxResults) { this.maxResults = maxResults; return this; } public Long getMaxResults() { return this.maxResults; } public ListSmartJobsRequest setNextToken(String nextToken) { this.nextToken = nextToken; return this; } public String getNextToken() { return this.nextToken; } public ListSmartJobsRequest setPageNo(Long pageNo) { this.pageNo = pageNo; return this; } public Long getPageNo() { return this.pageNo; } public ListSmartJobsRequest setPageSize(Long pageSize) { this.pageSize = pageSize; return this; } public Long getPageSize() { return this.pageSize; } public ListSmartJobsRequest setSortBy(String sortBy) { this.sortBy = sortBy; return this; } public String getSortBy() { return this.sortBy; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4826419c9f4ec7005f84e16de412b3bf9766ec72
4aa1c944d82c5cb064a8593907f1e46307de2bae
/forest-core/src/test/java/com/dtflys/test/interceptor/PostHeadInterceptor.java
7c5460fdc696c82030b2080102a16a869e91cdf5
[ "MIT" ]
permissive
leesonwei/forest
9343d93ebf56f468b98059b48ce155d5b0b2b793
3c2cce8031d55b7ad500d8438b9bc3cc0000d3bf
refs/heads/master
2023-04-12T21:57:32.941432
2021-04-22T08:31:18
2021-04-22T08:31:18
359,704,271
1
0
MIT
2021-04-22T01:34:30
2021-04-20T06:12:33
Java
UTF-8
Java
false
false
789
java
package com.dtflys.test.interceptor; import com.dtflys.forest.exceptions.ForestRuntimeException; import com.dtflys.forest.http.ForestRequest; import com.dtflys.forest.http.ForestResponse; import com.dtflys.forest.interceptor.Interceptor; public class PostHeadInterceptor implements Interceptor { @Override public boolean beforeExecute(ForestRequest request) { request.addHeader("accessToken", "11111111"); return true; } @Override public void onSuccess(Object data, ForestRequest request, ForestResponse response) { } @Override public void onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) { } @Override public void afterExecute(ForestRequest request, ForestResponse response) { } }
[ "jun.gong@thebeastshop.com" ]
jun.gong@thebeastshop.com
2325af83126139ad7f05e5aaf92231bc923a943b
3bcaebf7d69eaab5e4086568440b2ca56219b50d
/src/main/java/com/tinyolo/cxml/parsing/demo/jaxb/cxml/SubscriptionChangeMessage.java
b34749a11a5db70dc9470b7050dcc01d484b4535
[]
no_license
augustine-d-nguyen/cxml-parsing-demo
2a419263b091b32e70fa84312b55d8217e691ac6
3cc169ee0392d88bbf0e03f0791a15287a8eba97
refs/heads/master
2023-01-18T19:07:27.094598
2020-11-20T14:52:52
2020-11-20T14:52:52
314,490,660
0
0
null
null
null
null
UTF-8
Java
false
false
2,576
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 // See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2020.11.20 at 08:07:34 PM ICT // package com.tinyolo.cxml.parsing.demo.jaxb.cxml; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "subscription" }) @XmlRootElement(name = "SubscriptionChangeMessage") public class SubscriptionChangeMessage { @XmlAttribute(name = "type", required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String type; @XmlElement(name = "Subscription", required = true) protected List<Subscription> subscription; /** * Gets the value of the type property. * * @return * possible object is * {@link String } * */ public String getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link String } * */ public void setType(String value) { this.type = value; } /** * Gets the value of the subscription property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the subscription property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubscription().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Subscription } * * */ public List<Subscription> getSubscription() { if (subscription == null) { subscription = new ArrayList<Subscription>(); } return this.subscription; } }
[ "augustine.d.nguyen@outlook.com" ]
augustine.d.nguyen@outlook.com
c15c52abdb01f94a469168753f7e058ed0beff71
a3418358d121842106540b57e871cadc3c7c024c
/vietpage_trunk/tomcat.8080/work/Tomcat/localhost/_/org/apache/jsp/jsp/layout/RightSideAds_jsp.java
cc5c1659e606f7871f6037d5ec84c90b0d80d160
[]
no_license
kientv80/vietpage_trunk
7591b82d93dcd039682fd550a0e74ca7a863b9d3
4827bb88df18346da4a1127ba32392112a023da2
refs/heads/master
2021-01-19T18:33:12.405982
2017-04-15T17:54:17
2017-04-15T17:54:17
88,364,422
0
0
null
null
null
null
UTF-8
Java
false
false
3,589
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.40 * Generated at: 2014-01-10 06:57:06 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp.jsp.layout; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class RightSideAds_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; static { _jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(4); _jspx_dependants.put("/WEB-INF/custom-tags.tld", Long.valueOf(1389336987213L)); _jspx_dependants.put("/WEB-INF/struts-tags.tld", Long.valueOf(1385006053243L)); _jspx_dependants.put("/WEB-INF/tiles-jsp.tld", Long.valueOf(1385006054786L)); _jspx_dependants.put("/WEB-INF/c.tld", Long.valueOf(1385006053262L)); } private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<!-- <a href=\"home\"><img alt=\"\" src=\"/images/vietpage/right_ads.png\"/></a> -->\r\n"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "kientv@vng.com.vn" ]
kientv@vng.com.vn
d9570395165c04c591a3c8f941fe5eaa79f58b6e
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/core/common/formathtml/src/test/java/code/formathtml/BeanCustLgNamesFailImpl.java
5aef7414ae5fee520449bc59f04bd2ca312fb1eb
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
670
java
package code.formathtml; import code.expressionlanguage.analyze.errors.AnalysisMessages; import code.expressionlanguage.options.KeyWords; import code.formathtml.errors.RendAnalysisMessages; import code.formathtml.errors.RendKeyWords; import code.maths.montecarlo.DefaultGenerator; import code.sml.Element; public final class BeanCustLgNamesFailImpl extends TestedBeanCustLgNames { public BeanCustLgNamesFailImpl() { super(DefaultGenerator.oneElt()); } @Override public void buildAliases(Element _elt, String _lg, RendKeyWords _rkw, KeyWords _kw, RendAnalysisMessages _rMess, AnalysisMessages _mess) { _rkw.setValueRadio(""); } }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
fe205a4862a4c8d0e33135b556e58e5d231d6421
2b7bdecf211f8aea7948602953dba1297e75015a
/api/src/main/java/org/jboss/marshalling/ChainingClassExternalizerFactory.java
aaf97b8d7fc0447eaf731c3c9ddd0beb70e335a7
[ "Apache-2.0" ]
permissive
jboss-remoting/jboss-marshalling
0fa4846df3435a6ea2d4fffed826f94b6e3ffc4c
e62e127fac12dae958083c9626fe3606335f49d6
refs/heads/main
2023-08-31T21:52:29.492800
2023-08-16T16:58:02
2023-08-16T17:30:07
1,861,618
28
57
Apache-2.0
2023-09-12T11:27:31
2011-06-07T19:27:42
Java
UTF-8
Java
false
false
3,106
java
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.jboss.marshalling; import java.util.Collection; import java.util.Iterator; /** * A class externalizer factory that tries each delegate externalizer factory in sequence, returning the first match. */ public class ChainingClassExternalizerFactory implements ClassExternalizerFactory { private final ClassExternalizerFactory[] externalizerFactories; /** * Construct a new instance. * * @param factories a collection of factories to use */ public ChainingClassExternalizerFactory(final Collection<ClassExternalizerFactory> factories) { externalizerFactories = factories.toArray(new ClassExternalizerFactory[factories.size()]); } /** * Construct a new instance. * * @param factories a collection of factories to use */ public ChainingClassExternalizerFactory(final Iterable<ClassExternalizerFactory> factories) { this(factories.iterator()); } /** * Construct a new instance. * * @param factories a sequence of factories to use */ public ChainingClassExternalizerFactory(final Iterator<ClassExternalizerFactory> factories) { externalizerFactories = unroll(factories, 0); } /** * Construct a new instance. * * @param factories an array of factories to use */ public ChainingClassExternalizerFactory(final ClassExternalizerFactory[] factories) { externalizerFactories = factories.clone(); } private static ClassExternalizerFactory[] unroll(final Iterator<ClassExternalizerFactory> iterator, final int i) { if (iterator.hasNext()) { final ClassExternalizerFactory factory = iterator.next(); final ClassExternalizerFactory[] array = unroll(iterator, i + 1); array[i] = factory; return array; } else { return new ClassExternalizerFactory[i]; } } /** {@inheritDoc} This implementation tries each nested externalizer factory in order until a match is found. */ public Externalizer getExternalizer(final Class<?> type) { for (ClassExternalizerFactory externalizerFactory : externalizerFactories) { final Externalizer externalizer = externalizerFactory.getExternalizer(type); if (externalizer != null) { return externalizer; } } return null; } }
[ "david.lloyd@redhat.com" ]
david.lloyd@redhat.com
b45c81e616c3e44d27e6c12c22f8f059055f3943
b118a9cb23ae903bc5c7646b262012fb79cca2f2
/src/com/estrongs/android/pop/app/FileContentProvider.java
9f8bdcda4936d3a44749dc32cd02dcd5da2012f4
[]
no_license
secpersu/com.estrongs.android.pop
22186c2ea9616b1a7169c18f34687479ddfbb6f7
53f99eb4c5b099d7ed22d70486ebe179e58f47e0
refs/heads/master
2020-07-10T09:16:59.232715
2015-07-05T03:24:29
2015-07-05T03:24:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,759
java
package com.estrongs.android.pop.app; import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; import android.database.MatrixCursor; import android.database.MatrixCursor.RowBuilder; import android.net.Uri; import android.os.ParcelFileDescriptor; import com.estrongs.android.util.bc; import java.io.File; import java.io.FileNotFoundException; public class FileContentProvider extends ContentProvider { public static Uri a(String paramString) { try { String str = Uri.fromFile(new File(paramString)).toString(); str = "content://com.estrongs.files" + str.substring("file://".length()); paramString = str; } catch (Exception localException) { for (;;) { if (paramString.startsWith("/")) { paramString = "content://com.estrongs.files" + paramString; } else { paramString = "content://com.estrongs.files" + "/" + paramString; } } } return Uri.parse(paramString); } private String a(Uri paramUri) { if (!paramUri.toString().startsWith("content://com.estrongs.files")) { return null; } return paramUri.getPath(); } public int delete(Uri paramUri, String paramString, String[] paramArrayOfString) { return 0; } public String getType(Uri paramUri) { return bc.S(a(paramUri)); } public Uri insert(Uri paramUri, ContentValues paramContentValues) { return null; } public boolean onCreate() { return true; } public ParcelFileDescriptor openFile(Uri paramUri, String paramString) { try { paramString = a(paramUri); if (paramString != null) { paramUri = new File(paramString); if (paramUri.exists()) { return ParcelFileDescriptor.open(paramUri, 268435456); } } } catch (Exception paramString) { throw new FileNotFoundException("Failed to find uri: " + paramUri.toString()); } throw new FileNotFoundException("No file found: " + paramString); } public Cursor query(Uri paramUri, String[] paramArrayOfString1, String paramString1, String[] paramArrayOfString2, String paramString2) { paramString1 = a(paramUri); if (paramArrayOfString1 != null) { paramUri = paramArrayOfString1; if (paramArrayOfString1.length != 0) {} } else { paramUri = new String[7]; paramUri[0] = "_data"; paramUri[1] = "mime_type"; paramUri[2] = "_display_name"; paramUri[3] = "_size"; paramUri[4] = "date_modified"; paramUri[5] = "album"; paramUri[6] = "artist"; } paramArrayOfString2 = new MatrixCursor(paramUri); if (paramString1 == null) { return paramArrayOfString2; } File localFile = new File(paramString1); if ((!localFile.exists()) || (localFile.isDirectory())) { return paramArrayOfString2; } paramString2 = paramArrayOfString2.newRow(); int i = paramString1.lastIndexOf(File.separatorChar) + 1; if (i >= paramString1.length()) { throw new RuntimeException("No file name specified: ".concat(paramString1)); } String str; long l1; long l2; if (i > 0) { paramArrayOfString1 = paramString1.substring(i); str = bc.S(paramString1); l1 = localFile.length(); l2 = localFile.lastModified(); int j = paramUri.length; i = 0; label185: if (i >= j) { break label366; } localFile = paramUri[i]; if (!localFile.equals("_data")) { break label229; } paramString2.add(paramString1); } for (;;) { i += 1; break label185; paramArrayOfString1 = paramString1; break; label229: if (localFile.equals("mime_type")) { paramString2.add(str); } else if (localFile.equals("_display_name")) { paramString2.add(paramArrayOfString1); } else if (localFile.equals("_size")) { if (l1 >= 0L) { paramString2.add(Long.valueOf(l1)); } else { paramString2.add(null); } } else if (localFile.equals("date_modified")) { if (l2 >= 0L) { paramString2.add(Long.valueOf(l2)); } else { paramString2.add(Long.valueOf(l2)); } } else { paramString2.add(null); } } label366: return paramArrayOfString2; } public int update(Uri paramUri, ContentValues paramContentValues, String paramString, String[] paramArrayOfString) { return 0; } } /* Location: * Qualified Name: com.estrongs.android.pop.app.FileContentProvider * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
08afaf92c9cff03629e6e961425f2002c7227d51
2e53b1e78ceb2014acb99dfbdd4e5af671da7971
/app/src/main/java/com/zxing/decoding/CaptureActivityHandler.java
5bcedf6c1db57edd8c46f17ac32af26f2b6f05cd
[]
no_license
hs5240leihuang/MrrckApplication
7960cb2278a1a8098c5bc908b3c5d7b241869c5d
aef126d4876e3e45b0984c1b829c38aa326ba598
refs/heads/master
2021-01-12T02:47:13.236711
2017-01-05T11:13:11
2017-01-05T11:14:05
78,102,342
0
0
null
null
null
null
UTF-8
Java
false
false
4,411
java
/* * Copyright (C) 2008 ZXing authors * * 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.zxing.decoding; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import com.google.zxing.BarcodeFormat; import com.google.zxing.Result; import com.meiku.dev.R; import com.zxing.CaptureActivity; import com.zxing.camera.CameraManager; import com.zxing.view.ViewfinderResultPointCallback; import java.util.Vector; /** * This class handles all the messaging which comprises the state machine for * capture. * * @author dswitkin@google.com (Daniel Switkin) */ public final class CaptureActivityHandler extends Handler { private static final String TAG = CaptureActivityHandler.class .getSimpleName(); private final CaptureActivity activity; private final DecodeThread decodeThread; private State state; private enum State { PREVIEW, SUCCESS, DONE } public CaptureActivityHandler(CaptureActivity activity, Vector<BarcodeFormat> decodeFormats, String characterSet) { this.activity = activity; decodeThread = new DecodeThread(activity, decodeFormats, characterSet, new ViewfinderResultPointCallback(activity.getViewfinderView())); decodeThread.start(); state = State.SUCCESS; // Start ourselves capturing previews and decoding. CameraManager.get().startPreview(); restartPreviewAndDecode(); } @Override public void handleMessage(Message message) { switch (message.what) { case R.id.auto_focus: Log.d(TAG, "auto_focus"); // Log.d(TAG, "Got auto-focus message"); // When one auto focus pass finishes, start another. This is the // closest thing to // continuous AF. It does seem to hunt a bit, but I'm not sure what // else to do. if (state == State.PREVIEW) { CameraManager.get().requestAutoFocus(this, R.id.auto_focus); } break; case R.id.restart_preview: Log.d(TAG, "Got restart preview message"); restartPreviewAndDecode(); break; case R.id.decode_succeeded: Log.d(TAG, "Got decode succeeded message"); state = State.SUCCESS; Bundle bundle = message.getData(); Bitmap barcode = bundle == null ? null : (Bitmap) bundle .getParcelable(DecodeThread.BARCODE_BITMAP); activity.handleDecode((Result) message.obj, barcode); break; case R.id.decode_failed: Log.d(TAG, "decode_failed"); // We're decoding as fast as possible, so when one decode fails, // start another. state = State.PREVIEW; CameraManager.get().requestPreviewFrame(decodeThread.getHandler(), R.id.decode); break; case R.id.return_scan_result: Log.d(TAG, "Got return scan result message"); activity.setResult(Activity.RESULT_OK, (Intent) message.obj); activity.finish(); break; case R.id.launch_product_query: Log.d(TAG, "Got product query message"); String url = (String) message.obj; Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); activity.startActivity(intent); break; } } public void quitSynchronously() { state = State.DONE; CameraManager.get().stopPreview(); Message quit = Message.obtain(decodeThread.getHandler(), R.id.quit); quit.sendToTarget(); try { decodeThread.join(); } catch (InterruptedException e) { // continue } // Be absolutely sure we don't send any queued up messages removeMessages(R.id.decode_succeeded); removeMessages(R.id.decode_failed); } private void restartPreviewAndDecode() { if (state == State.SUCCESS) { state = State.PREVIEW; CameraManager.get().requestPreviewFrame(decodeThread.getHandler(), R.id.decode); CameraManager.get().requestAutoFocus(this, R.id.auto_focus); activity.drawViewfinder(); } } }
[ "837851174@qq.com" ]
837851174@qq.com
fee8b3ad838834e664a887e501529e23c3fc47c8
404a189c16767191ffb172572d36eca7db5571fb
/dao/test/java/gov/georgia/dhr/dfcs/sacwis/dao/.svn/text-base/SpringDaoConfigurationTest.java.svn-base
150758b8a581124b901a262a868896f8a598fc68
[]
no_license
tayduivn/training
648a8e9e91194156fb4ffb631749e6d4bf2d0590
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
refs/heads/master
2021-06-13T16:20:41.293097
2017-05-08T21:37:59
2017-05-08T21:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
/** * Created on Mar 24, 2006 at 1:41:34 PM by Michael K. Werle */ package gov.georgia.dhr.dfcs.sacwis.dao; import java.io.PrintWriter; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Savepoint; import java.sql.Statement; import java.util.Map; import javax.sql.DataSource; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.springframework.context.support.ClassPathXmlApplicationContext; public class SpringDaoConfigurationTest extends TestCase { public SpringDaoConfigurationTest(String string) { super(string); } public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new SpringDaoConfigurationTest("testSpringDaoConfigration")); return suite; } protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testSpringDaoConfigration() { //noinspection ResultOfObjectAllocationIgnored new ClassPathXmlApplicationContext(new String[] {"test-spring-dao-context.xml", "dao-context.xml"}); } }
[ "lgeddam@gmail.com" ]
lgeddam@gmail.com
7dc860dd33c4654f14469f947b5af45f9ba58e6c
9a34629ec4782406a3692fe7f85e7588838f5e49
/app/src/main/java/com/example/amr/mazegame/Levels/LevelTwo.java
c9918b6e86c0fd4ff0e5c6d53659d480e202845a
[]
no_license
amremaish/MazeGame
a431a1214f8a3a91a262b2c56ee69e83a8e405b8
05dce9b162666eb26ff87d06f45bb2c5403d14c2
refs/heads/master
2020-11-23T22:15:50.386299
2019-12-13T13:33:51
2019-12-13T13:33:51
227,843,625
0
0
null
null
null
null
UTF-8
Java
false
false
6,840
java
package com.example.amr.mazegame.Levels; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.widget.TextView; import com.example.amr.mazegame.Activities.ActivityLevel; import com.example.amr.mazegame.Activities.LevelSelector; import com.example.amr.mazegame.Managers.SoundManager; import com.example.amr.mazegame.Managers.ref; import com.example.amr.mazegame.MazeCreator.GameView; import com.example.amr.mazegame.R; import com.example.amr.mazegame.Util; import java.util.ArrayList; import java.util.Collections; import java.util.Random; /** * Created by Amr on 02/02/2018. */ public class LevelTwo { private int NumbersXY[][] = { {35, 4}, {28, 18}, {16, 23}, {2, 28} }; // X , Y , ( slow = 0 , speed = 1) , Taken private int SlowAndSpeedXY[][] = { {12, 2, 1, 0}, {34, 10, 1, 0}, {21, 1, 0, 0}, {1, 12, 0, 0} }; private Bitmap SpeedUpImg, SlowDownImg; private int TILE_WIDTH; private GameView game; private ArrayList<Integer> OriginalNumbers; private int Answer; public LevelTwo(GameView game) { this.game = game; this.TILE_WIDTH = game.getTileWidth(); initializing(); initializeAssets(); } private void initializeAssets() { // text TextView levelName = (TextView) ActivityLevel.ActivityLevel.findViewById(R.id.levelName); levelName.setText("المرحلة 2 متوسط المستوى رقم"+" " +(GameView.levelCounter+1) ); // sound SoundManager.stopAllBackground(); SoundManager.background2 = SoundManager.Loader(true, 60, R.raw.background2); SoundManager.background2.start(); } public void initializing() { OriginalNumbers = new ArrayList<>(); SpeedUpImg = BitmapFactory.decodeResource(ActivityLevel.ActivityLevel.getResources(), R.drawable.speedup); SlowDownImg = BitmapFactory.decodeResource(ActivityLevel.ActivityLevel.getResources(), R.drawable.slowdown); // scale SpeedUpImg = Bitmap.createScaledBitmap(SpeedUpImg, TILE_WIDTH * 3, TILE_WIDTH * 3, false); SlowDownImg = Bitmap.createScaledBitmap(SlowDownImg, TILE_WIDTH * 3, TILE_WIDTH * 3, false); generateQuestionAndAnswer(); } private void generateQuestionAndAnswer() { int n1 = new Random().nextInt(5) + 1; int n2 = new Random().nextInt(5) + 1; // set Question TextView Question = (TextView) ActivityLevel.ActivityLevel.findViewById(R.id.Quesion); int signR = new Random().nextInt(2); char sign = ((signR == 0) ? '+' : '-'); // swap two number to insure n1 > n2 if (n2 > n1){ int temp = n1 ; n1 = n2 ; n2 = temp ; } Question.setText(n1 + " "+sign+" "+ n2 + " = ?"); if (sign == '-') { OriginalNumbers.add(n1 - n2); Answer = n1 - n2; } else { OriginalNumbers.add(n1 + n2); Answer = n1 + n2; } boolean freq[] = new boolean[11] ; freq[Answer] = true ; for (int i = 0; i < NumbersXY.length - 1; i++) { int n = 0 ; while (true) { n = new Random().nextInt(10) + 1; if (!freq[n]){ break; } } freq[n]= true; OriginalNumbers.add(n); } Collections.shuffle(OriginalNumbers); } public void Update(Canvas canvas) { if (GameView.FINISH) return; // draw images for (int i = 0; i < SlowAndSpeedXY.length; i++) { if (SlowAndSpeedXY[i][3] == 1) continue; Bitmap bitmap = ((SlowAndSpeedXY[i][2] == 1) ? SpeedUpImg : SlowDownImg); canvas.drawBitmap(bitmap, SlowAndSpeedXY[i][0] * TILE_WIDTH, SlowAndSpeedXY[i][1] * TILE_WIDTH, new Paint()); } SlowAndSpeedCollision(); // --------------------------------------------------------- // draw numbers Paint pt = new Paint(); pt.setColor(Color.parseColor(ref.number_color)); pt.setFakeBoldText(true); pt.setTextSize(TILE_WIDTH * 3); for (int i = 0; i < NumbersXY.length; i++) { canvas.drawText(OriginalNumbers.get(i) + "", NumbersXY[i][0] * TILE_WIDTH, NumbersXY[i][1] * TILE_WIDTH, pt); } NumberCollision(); } private void SlowAndSpeedCollision() { for (int i = 0; i < SlowAndSpeedXY.length; i++) { int NumX = SlowAndSpeedXY[i][0] * TILE_WIDTH; int NumY = SlowAndSpeedXY[i][1] * TILE_WIDTH; if (game.getLastPlayerX() > NumX - TILE_WIDTH * 2 && game.getLastPlayerX() < NumX + TILE_WIDTH * 2.5 && game.getLastPlayerY() > NumY - TILE_WIDTH * 2&& game.getLastPlayerY() < NumY + TILE_WIDTH * 2.5 && SlowAndSpeedXY[i][3] == 0) { if (SlowAndSpeedXY[i][2] == 1) { SoundManager.speed_up.start(); game.setPlayerSpeed(0.2f); } else { SoundManager.slow_down.start(); game.setPlayerSpeed(0.1f); } SlowAndSpeedXY[i][3] = 1; } } } private void NumberCollision() { int chosenNumber = -1; for (int i = 0; i < NumbersXY.length; i++) { int NumX = NumbersXY[i][0] * TILE_WIDTH; int NumY = NumbersXY[i][1] * TILE_WIDTH; if (game.getLastPlayerX() > NumX - TILE_WIDTH && game.getLastPlayerX() < NumX + TILE_WIDTH + TILE_WIDTH && game.getLastPlayerY() > NumY - TILE_WIDTH && game.getLastPlayerY() < NumY + TILE_WIDTH + TILE_WIDTH) { chosenNumber = OriginalNumbers.get(i); break; } } if (chosenNumber == -1) { return; } if (chosenNumber == Answer) { Util.OpenDialog(ActivityLevel.ActivityLevel, "أحسنت أجابة صحيحة ", false); SoundManager.win.start(); } else { Util.OpenDialog(ActivityLevel.ActivityLevel, "أخطأت.. الإجابة الصحيحة هى " + Answer, false); SoundManager.loss.start(); } if (GameView.levelCounter == 4){ LevelSelector.SELECTED_LEVEL = 3 ; GameView.levelCounter = 0 ; } else { LevelSelector.SELECTED_LEVEL = 2; } GameView.levelCounter++; GameView.FINISH = true; game.setWorkOnceForLvl(false); } }
[ "you@example.com" ]
you@example.com
572ee5c968a2513154d98ff8de8720bea1b292f1
b4be6ce60105b72d01e32754d07782d141b201b1
/baymax-dsp/baymax-dsp-data/baymax-dsp-data-sys/src/main/java/com/info/baymax/dsp/data/sys/entity/security/RoleResourceRef.java
1eac6d3aae76583118e7d8d6a8df327a9b76ba9a
[]
no_license
cgb-datav/woven-dsp
62a56099987cc2e08019aceb6e914e538607ca28
b0b2ebd6af3ac42b71d6d9eedc5c6dfa9bd4e316
refs/heads/master
2023-08-28T02:55:19.375074
2021-07-05T04:02:57
2021-07-05T04:02:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,931
java
package com.info.baymax.dsp.data.sys.entity.security; import com.info.baymax.common.persistence.mybatis.type.bool.BooleanVsIntegerTypeHandler; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.apache.ibatis.type.JdbcType; import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.Comment; import tk.mybatis.mapper.annotation.ColumnType; import javax.persistence.*; import java.io.Serializable; @Data @EqualsAndHashCode(callSuper = false) @ApiModel @Entity @Table(name = "ref_role_resource", indexes = {@Index(columnList = "roleId")}) @Comment("角色资源目录关联信息表") public class RoleResourceRef implements Serializable { private static final long serialVersionUID = -4066909154102918575L; @Id @ApiModelProperty(value = "角色ID") @Comment("角色ID") @Column(length = 50, nullable = false) @ColumnType(jdbcType = JdbcType.VARCHAR) private String roleId; @Id @ApiModelProperty(value = "资源目录ID") @Comment("资源目录ID") @Column(length = 50, nullable = false) @ColumnType(jdbcType = JdbcType.VARCHAR) private String resourceId; @ApiModelProperty("资源目录类型:schema_dir,dataset_dir,datasource_dir,standard_dir,flow_dir,fileset_dir") @Comment("资源目录类型:schema_dir,dataset_dir,datasource_dir,standard_dir,flow_dir,fileset_dir") @Column(length = 20) @ColumnType(jdbcType = JdbcType.VARCHAR) private String resType; @ApiModelProperty(value = "是否是全选状态:false-否(半选中),true-是,默认0") @Comment("是否是全选状态:false-否(半选中),true-是,默认0") @Column(length = 2) @ColumnType(jdbcType = JdbcType.BOOLEAN, typeHandler = BooleanVsIntegerTypeHandler.class) @ColumnDefault("false") protected Boolean halfSelect; @ApiModelProperty("计数器") @Comment("计数器") @Column(length = 11) @ColumnType(jdbcType = JdbcType.INTEGER) @ColumnDefault("1") private Integer counter; public RoleResourceRef() { } public RoleResourceRef(String roleId) { this.roleId = roleId; } public RoleResourceRef(String roleId, String resourceId) { this.roleId = roleId; this.resourceId = resourceId; } public RoleResourceRef(String roleId, String resourceId, String resType, Boolean halfSelect) { this.roleId = roleId; this.resourceId = resourceId; this.resType = resType; this.halfSelect = halfSelect; } public RoleResourceRef(String roleId, String resourceId, String resType, Boolean halfSelect, Integer counter) { this.roleId = roleId; this.resourceId = resourceId; this.resType = resType; this.halfSelect = halfSelect; this.counter = counter; } }
[ "760374564@qq.com" ]
760374564@qq.com
f5812efb894d51a432d8640f4c60f5f6b652fa98
404a189c16767191ffb172572d36eca7db5571fb
/core/src/java/gov/georgia/dhr/dfcs/sacwis/core/lookup/codestables/Cconunit.java
ab478ce0257d85982ff3ee42f5d266fd1fd7580f
[]
no_license
tayduivn/training
648a8e9e91194156fb4ffb631749e6d4bf2d0590
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
refs/heads/master
2021-06-13T16:20:41.293097
2017-05-08T21:37:59
2017-05-08T21:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package gov.georgia.dhr.dfcs.sacwis.core.lookup.codestables; public interface Cconunit { public static final String CCONUNIT = "CCONUNIT"; public static final String CCONUNIT_ACN = "ACN"; public static final String CCONUNIT_APC = "APC"; public static final String CCONUNIT_BAT = "BAT"; public static final String CCONUNIT_DA2 = "DA2"; public static final String CCONUNIT_DAY = "DAY"; public static final String CCONUNIT_DEL = "DEL"; public static final String CCONUNIT_HAL = "HAL"; public static final String CCONUNIT_HOU = "HOU"; public static final String CCONUNIT_MLZ = "MLZ"; public static final String CCONUNIT_ONE = "ONE"; public static final String CCONUNIT_SES = "SES"; public static final String CCONUNIT_STU = "STU"; public static final String CCONUNIT_SUB = "SUB"; public static final String CCONUNIT_XXX = "XXX"; }
[ "lgeddam@gmail.com" ]
lgeddam@gmail.com
7bd03e527b2212759d4567e11e10e7adddc31faf
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project72/src/main/java/org/gradle/test/performance72_4/Production72_396.java
a75cac0dc6bf64e4e8b2d6e4f272db4243eac743
[]
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
305
java
package org.gradle.test.performance72_4; public class Production72_396 extends org.gradle.test.performance16_4.Production16_396 { private final String property; public Production72_396() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
3d381fcf3205a907b93d81c28093675628010ff8
e6c5205c9e4d0d81095f7a764a7a2df002d60830
/src/org/apache/ctakes/typesystem/type/textsem/MedicationRouteModifier_Type.java
efc10db9f49447d7a97fc0e8eada427dfff2857a
[ "Apache-2.0" ]
permissive
harryhoch/DeepPhe
796009a6f583bd7f0032d26300cad8692b0d7a6d
fe8c2d2c79ec53bb048235816535901bee961090
refs/heads/master
2020-12-26T03:22:44.606278
2015-05-22T15:21:45
2015-05-22T15:21:45
50,454,055
0
0
null
2016-01-26T19:39:54
2016-01-26T19:39:54
null
UTF-8
Java
false
false
2,203
java
/* First created by JCasGen Mon May 11 11:00:52 EDT 2015 */ package org.apache.ctakes.typesystem.type.textsem; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; /** Means by which the medication was taken or administered. Value set includes Topical, Enteral_Oral, Parenteral_Intravenous, Other, undetermined, etc. * Updated by JCasGen Mon May 11 11:00:52 EDT 2015 * @generated */ public class MedicationRouteModifier_Type extends Modifier_Type { /** @generated * @return the generator for this type */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (MedicationRouteModifier_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = MedicationRouteModifier_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new MedicationRouteModifier(addr, MedicationRouteModifier_Type.this); MedicationRouteModifier_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new MedicationRouteModifier(addr, MedicationRouteModifier_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = MedicationRouteModifier.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.ctakes.typesystem.type.textsem.MedicationRouteModifier"); /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public MedicationRouteModifier_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); } }
[ "tseytlin@pitt.edu" ]
tseytlin@pitt.edu
d54269569ab9b3037e2a29aa842d5c6104ba4045
7a0c1b9cc078ba129438fe916a174d5a60b9a178
/guvnor-ala/guvnor-ala-spi/src/main/java/org/guvnor/ala/pipeline/events/PipelineEventListener.java
62b6420576f00327a43b33252782cacfc278af3b
[ "Apache-2.0" ]
permissive
wmedvede/guvnor
055cb4c7647ca02f8c0a719ea9997ddad263087e
ce1e9cb7a99e0c129b18932d914347d32955c327
refs/heads/master
2021-01-15T11:38:41.315703
2017-04-19T15:40:33
2017-04-19T15:40:33
38,826,828
0
1
null
2015-07-09T14:54:13
2015-07-09T14:54:13
null
UTF-8
Java
false
false
1,742
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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.guvnor.ala.pipeline.events; /* * Pipeline Event Listener covering all the pipeline stages and errors. * You can provide and attach different implementations to use as hook points * to trigger custom code. */ public interface PipelineEventListener { /* * Event emmited before executing the pipeline */ void beforePipelineExecution( final BeforePipelineExecutionEvent bpee ); /* * Event emmited after the pipeline execution finish */ void afterPipelineExecution( final AfterPipelineExecutionEvent apee ); /* * Event emmited before each pipeline stage execution */ void beforeStageExecution( final BeforeStageExecutionEvent bsee ); /* * Event emmited on an error inside a pipeline stage */ void onStageError( final OnErrorStageExecutionEvent oesee ); /* * Event emmited after each pipeline stage execution */ void afterStageExecution( final AfterStageExecutionEvent asee ); /* * Event emmited on an error inside the pipeline */ void onPipelineError( final OnErrorPipelineExecutionEvent oepee ); }
[ "alexandre.porcelli@gmail.com" ]
alexandre.porcelli@gmail.com
cb7f017d30b0a6afc58d00fc32ed83f60b5867a1
922746e28e43f54a086d1cdcff2cfe426b173dd7
/wang/src/main/java/com/jc/system/portal/domain/Portal.java
63301f3d0693fd23174dd008d27cda26b3cb912d
[]
no_license
wtfc/springboot-shyt
f934161c6cdf37ba99515257ffba7f8d50822b5c
1b67918f7a129ffef16ca61be0738c241029866f
refs/heads/master
2020-04-09T05:24:39.017913
2018-12-02T17:42:27
2018-12-02T17:42:27
160,063,362
0
0
null
null
null
null
UTF-8
Java
false
false
2,458
java
package com.jc.system.portal.domain; import com.jc.foundation.domain.BaseBean; import com.jc.system.dic.IDicManager; import com.jc.system.dic.impl.DicManagerImpl; /** * @title GOA2.0 * @description 实体类 * @author * @version 2014-06-13 */ public class Portal extends BaseBean{ private static final long serialVersionUID = 1L; private String portalName; /*门户名称*/ private String portalStatus; /*门户状态portalstatus_2-禁用portalstatus_1-启用*/ private Long portalmenuId; /**/ private Integer sequence; /*排序号*/ private String portalType; /*门户类型 ptype_org 机构 ptype_dept 部门 ptype_user 个人*/ private Long roleId; /*角色ID*/ private Long deptId; /*部门ID*/ private Long userId; /**/ private Long organId; /**/ private String roleIds; /*角色IDS*/ public String getPortalName(){ return portalName; } public void setPortalName(String portalName){ this.portalName = portalName; } public String getPortalStatus(){ return portalStatus; } public void setPortalStatus(String portalStatus){ this.portalStatus = portalStatus; } public String getPortalStatusValue(){ IDicManager dicManager = new DicManagerImpl(); return dicManager.getDic("portal_status", portalStatus).getValue(); } public Long getPortalmenuId(){ return portalmenuId; } public void setPortalmenuId(Long portalmenuId){ this.portalmenuId = portalmenuId; } public Integer getSequence(){ return sequence; } public void setSequence(Integer sequence){ this.sequence = sequence; } public String getPortalType() { return portalType; } public void setPortalType(String portalType) { this.portalType = portalType; } public String getPortalTypeValue(){ IDicManager dicManager = new DicManagerImpl(); return dicManager.getDic("portal_type", portalType).getValue(); } public Long getRoleId() { return roleId; } public void setRoleId(Long roleId) { this.roleId = roleId; } public Long getDeptId() { return deptId; } public void setDeptId(Long deptId) { this.deptId = deptId; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public Long getOrganId() { return organId; } public void setOrganId(Long organId) { this.organId = organId; } public String getRoleIds() { return roleIds; } public void setRoleIds(String roleIds) { this.roleIds = roleIds; } }
[ "1226105567@qq.com" ]
1226105567@qq.com
37b735ff45ada40436f9d194a051a3317bb9f56b
8c464d3d87a28d90bf024fd39af56abc795283f9
/jiangling_eqis5.2.1_oracle/src/main/java/com/ambition/improve/entity/ProblemDescrible.java
dc32e75567e55eb0da79a011c8428ddd9e3124f7
[]
no_license
laonanhai481580/WeChat-Java
1a074276bf1fd62afb1f150a94ea4bde585f5ce2
047eb09b8562cb1e1659eae928f5e49c5b623625
refs/heads/master
2020-04-13T07:56:19.288005
2018-12-27T06:56:00
2018-12-27T06:56:00
163,067,001
1
0
null
null
null
null
UTF-8
Java
false
false
1,457
java
package com.ambition.improve.entity; import java.util.List; import javax.persistence.Entity; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import com.ambition.product.base.IdEntity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * * 类名:问题描述维护 * <p>amb</p> * <p>厦门安必兴信息科技有限公司</p> * <p>功能说明:</p> * @author LPF * @version 1.00 2016年10月11日 发布 */ @Entity @Table(name = "IMP_PROBLEM_DESCRIBLE") @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) public class ProblemDescrible extends IdEntity{ private static final long serialVersionUID = 1L; private String defectionType;//不良类型 private String model;//机种 @OneToMany(mappedBy="problemDescrible") @OrderBy("defectionPhenomenonName") List<DefectionPhenomenon> defectionPhenomenons;//不良现象 public String getDefectionType() { return defectionType; } public void setDefectionType(String defectionType) { this.defectionType = defectionType; } public List<DefectionPhenomenon> getDefectionPhenomenons() { return defectionPhenomenons; } public void setDefectionPhenomenons( List<DefectionPhenomenon> defectionPhenomenons) { this.defectionPhenomenons = defectionPhenomenons; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } }
[ "1198824455@qq.com" ]
1198824455@qq.com
69491ac4587d781deca74a54fc2f13df4ae27b28
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/Interview/.leetcode/hard/k-inverse-pairs-array.java
120ce9f2413a03dd25d7a61a1b41ba4c0b4bdc02
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
3,172
java
/** * Given two integers n and k, find how many different arrays consist of numbers * from 1 to n such that there are exactly k inverse pairs. * * We define an inverse pair as following: For ith and jth element in the array, * if i < j and a[i] > a[j] then it's an inverse pair; Otherwise, it's not. * * Since the answer may be very large, the answer should be modulo 109 + 7. * * Example 1: Input: n = 3, k = 0 Output: 1 Explanation: Only the array [1,2,3] * which consists of numbers from 1 to 3 has exactly 0 inverse pair. Example 2: * Input: n = 3, k = 1 Output: 2 Explanation: The array [1,3,2] and [2,1,3] have * exactly 1 inverse pair. Note: The integer n is in the range [1, 1000] and k * is in the range [0, 1000]. */ public class Solution { public int kInversePairs(int n, int k) { int[] dp = new int[k + 1]; int M = 1000000007; for (int i = 1; i <= n; i++) { int[] temp = new int[k + 1]; temp[0] = 1; for (int j = 1; j <= k; j++) { int val = (dp[j] + M - ((j - i) >= 0 ? dp[j - i] : 0)) % M; temp[j] = (temp[j - 1] + val) % M; } dp = temp; } return ((dp[k] + M - (k > 0 ? dp[k - 1] : 0)) % M); } } // approach memo (slow) /** * if we know the number of inverse pairs (say x) in any arbitrary array b with * some n items, we can add a new element n+1 (max at this moment) to this array b * at a position p * steps from the right, such that x + p = k to generate an array with a total * of k inverse pairs. */ public class Solution { Integer[][] memo = new Integer[1001][1001]; public int kInversePairs(int n, int k) { if (n == 0) return 0; if (k == 0) return 1; if (memo[n][k] != null) return memo[n][k]; int inv = 0; for (int i = 0; i <= Math.min(k, n - 1); i++) inv = (inv + kInversePairs(n - 1, k - i)) % 1000000007; memo[n][k] = inv; return inv; } } // approach dp (slow) public class Solution { public int kInversePairs(int n, int k) { int[][] dp = new int[n + 1][k + 1]; for (int i = 1; i <= n; i++) { for (int j = 0; j <= k; j++) { if (j == 0) dp[i][j] = 1; else { for (int p = 0; p <= Math.min(j, i - 1); p++) dp[i][j] = (dp[i][j] + dp[i - 1][j - p]) % 1000000007; } } } return dp[n][k]; } } // approach dp (sums), fine public class Solution { public int kInversePairs(int n, int k) { int[][] dp = new int[n + 1][k + 1]; int M = 1000000007; for (int i = 1; i <= n; i++) { for (int j = 0; j <= k; j++) { if (j == 0) dp[i][j] = 1; else { int val = (dp[i - 1][j] + M - ((j - i) >= 0 ? dp[i - 1][j - i] : 0)) % M; dp[i][j] = (dp[i][j - 1] + val) % M; } } } return ((dp[n][k] + M - (k > 0 ? dp[n][k - 1] : 0)) % M); } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
e9a39d9432339b837f92f148a0c431ed43e8df7b
eb18a638fce93fd99805625dd7ca7c49ea48507d
/discovery-plugin-strategy-starter-service/src/main/java/com/nepxion/discovery/plugin/strategy/service/aop/FeignStrategyInterceptor.java
83235939cc8c0a608b3951c185048f2c4c48cf2b
[ "Apache-2.0" ]
permissive
cxxichen/Discovery
873cf2b35c5251eb2e916b58fcc02ed270d18e94
d67108db98a2f6a6492a4db2a23fc0938c65c0fe
refs/heads/master
2020-08-11T06:33:26.191245
2019-10-11T07:01:55
2019-10-11T07:01:55
214,510,511
1
0
Apache-2.0
2019-10-11T19:04:31
2019-10-11T19:04:31
null
UTF-8
Java
false
false
6,818
java
package com.nepxion.discovery.plugin.strategy.service.aop; /** * <p>Title: Nepxion Discovery</p> * <p>Description: Nepxion Discovery</p> * <p>Copyright: Copyright (c) 2017-2050</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @version 1.0 */ import feign.RequestInterceptor; import feign.RequestTemplate; import java.util.Collection; import java.util.Enumeration; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.context.request.ServletRequestAttributes; import com.nepxion.discovery.common.constant.DiscoveryConstant; import com.nepxion.discovery.plugin.strategy.constant.StrategyConstant; import com.nepxion.discovery.plugin.strategy.service.adapter.FeignStrategyInterceptorAdapter; import com.nepxion.discovery.plugin.strategy.service.route.ServiceStrategyRouteFilter; public class FeignStrategyInterceptor extends AbstractStrategyInterceptor implements RequestInterceptor { private static final Logger LOG = LoggerFactory.getLogger(FeignStrategyInterceptor.class); @Autowired(required = false) private List<FeignStrategyInterceptorAdapter> feignStrategyInterceptorAdapterList; @Autowired private ServiceStrategyRouteFilter serviceStrategyRouteFilter; @Value("${" + StrategyConstant.SPRING_APPLICATION_STRATEGY_TRACE_ENABLED + ":false}") protected Boolean strategyTraceEnabled; public FeignStrategyInterceptor(String contextRequestHeaders, String businessRequestHeaders) { super(contextRequestHeaders, businessRequestHeaders); LOG.info("----------- Feign Intercept Information ----------"); LOG.info("Feign desires to intercept customer headers are {}", requestHeaderList); LOG.info("--------------------------------------------------"); } @Override public void apply(RequestTemplate requestTemplate) { interceptInputHeader(); applyInnerHeader(requestTemplate); applyOuterHeader(requestTemplate); if (CollectionUtils.isNotEmpty(feignStrategyInterceptorAdapterList)) { for (FeignStrategyInterceptorAdapter feignStrategyInterceptorAdapter : feignStrategyInterceptorAdapterList) { feignStrategyInterceptorAdapter.apply(requestTemplate); } } interceptOutputHeader(requestTemplate); } private void applyInnerHeader(RequestTemplate requestTemplate) { requestTemplate.header(DiscoveryConstant.N_D_SERVICE_GROUP, pluginAdapter.getGroup()); if (strategyTraceEnabled) { requestTemplate.header(DiscoveryConstant.N_D_SERVICE_TYPE, pluginAdapter.getServiceType()); requestTemplate.header(DiscoveryConstant.N_D_SERVICE_ID, pluginAdapter.getServiceId()); requestTemplate.header(DiscoveryConstant.N_D_SERVICE_ADDRESS, pluginAdapter.getHost() + ":" + pluginAdapter.getPort()); requestTemplate.header(DiscoveryConstant.N_D_SERVICE_VERSION, pluginAdapter.getVersion()); requestTemplate.header(DiscoveryConstant.N_D_SERVICE_REGION, pluginAdapter.getRegion()); } } private void applyOuterHeader(RequestTemplate requestTemplate) { ServletRequestAttributes attributes = serviceStrategyContextHolder.getRestAttributes(); if (attributes == null) { return; } HttpServletRequest previousRequest = attributes.getRequest(); Enumeration<String> headerNames = previousRequest.getHeaderNames(); if (headerNames == null) { return; } while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); String headerValue = previousRequest.getHeader(headerName); boolean isHeaderContains = isHeaderContainsExcludeInner(headerName.toLowerCase()); if (isHeaderContains) { requestTemplate.header(headerName, headerValue); } } Map<String, Collection<String>> headers = requestTemplate.headers(); if (CollectionUtils.isEmpty(headers.get(DiscoveryConstant.N_D_VERSION))) { String routeVersion = serviceStrategyRouteFilter.getRouteVersion(); if (StringUtils.isNotEmpty(routeVersion)) { requestTemplate.header(DiscoveryConstant.N_D_VERSION, routeVersion); } } if (CollectionUtils.isEmpty(headers.get(DiscoveryConstant.N_D_REGION))) { String routeRegion = serviceStrategyRouteFilter.getRouteRegion(); if (StringUtils.isNotEmpty(routeRegion)) { requestTemplate.header(DiscoveryConstant.N_D_REGION, routeRegion); } } if (CollectionUtils.isEmpty(headers.get(DiscoveryConstant.N_D_ADDRESS))) { String routeAddress = serviceStrategyRouteFilter.getRouteAddress(); if (StringUtils.isNotEmpty(routeAddress)) { requestTemplate.header(DiscoveryConstant.N_D_ADDRESS, routeAddress); } } if (CollectionUtils.isEmpty(headers.get(DiscoveryConstant.N_D_VERSION_WEIGHT))) { String routeVersionWeight = serviceStrategyRouteFilter.getRouteVersionWeight(); if (StringUtils.isNotEmpty(routeVersionWeight)) { requestTemplate.header(DiscoveryConstant.N_D_VERSION_WEIGHT, routeVersionWeight); } } if (CollectionUtils.isEmpty(headers.get(DiscoveryConstant.N_D_REGION_WEIGHT))) { String routeRegionWeight = serviceStrategyRouteFilter.getRouteRegionWeight(); if (StringUtils.isNotEmpty(routeRegionWeight)) { requestTemplate.header(DiscoveryConstant.N_D_REGION_WEIGHT, routeRegionWeight); } } } private void interceptOutputHeader(RequestTemplate requestTemplate) { if (!interceptDebugEnabled) { return; } System.out.println("------- Intercept Output Header Information ------"); Map<String, Collection<String>> headers = requestTemplate.headers(); for (Map.Entry<String, Collection<String>> entry : headers.entrySet()) { String headerName = entry.getKey(); boolean isHeaderContains = isHeaderContains(headerName.toLowerCase()); if (isHeaderContains) { Collection<String> headerValue = entry.getValue(); System.out.println(headerName + "=" + headerValue); } } System.out.println("--------------------------------------------------"); } }
[ "1394997@qq.com" ]
1394997@qq.com
641865550468bb6b47dad913399309b8e6ce129b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_03d948606e372dc79e8a4f991099a837ac009262/LeastFrequentKeyValueBenchmark/23_03d948606e372dc79e8a4f991099a837ac009262_LeastFrequentKeyValueBenchmark_s.java
f0cbf458bb9606c642969897a3fc30b0d6522b26
[]
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
3,542
java
/** * Copyright (c) 2012-2012 Malhar, Inc. All rights reserved. */ package com.malhartech.lib.algo; import com.malhartech.api.OperatorConfiguration; import com.malhartech.dag.TestSink; import com.malhartech.lib.util.MutableInteger; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import junit.framework.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * Performance tests for {@link com.malhartech.lib.algo.LeastFrequentKeyValue}<p> * */ public class LeastFrequentKeyValueBenchmark { private static Logger log = LoggerFactory.getLogger(LeastFrequentKeyValueBenchmark.class); /** * Test node logic emits correct results */ @Test @SuppressWarnings("SleepWhileInLoop") @Category(com.malhartech.PerformanceTestCategory.class) public void testNodeProcessing() throws Exception { LeastFrequentKeyValue<String, Integer> oper = new LeastFrequentKeyValue<String, Integer>(); TestSink matchSink = new TestSink(); oper.least.setSink(matchSink); oper.setup(new OperatorConfiguration()); oper.beginWindow(); HashMap<String, Integer> amap = new HashMap<String, Integer>(1); HashMap<String, Integer> bmap = new HashMap<String, Integer>(1); HashMap<String, Integer> cmap = new HashMap<String, Integer>(1); int atot1 = 0; int btot1 = 0; int ctot1 = 0; int atot2 = 0; int btot2 = 0; int ctot2 = 0; int numTuples = 10000000; for (int j = 0; j < numTuples; j++) { atot1 = 5; btot1 = 3; ctot1 = 6; amap.put("a", 1); bmap.put("b", 2); cmap.put("c", 4); for (int i = 0; i < atot1; i++) { oper.data.process(amap); } for (int i = 0; i < btot1; i++) { oper.data.process(bmap); } for (int i = 0; i < ctot1; i++) { oper.data.process(cmap); } atot2 = 4; btot2 = 3; ctot2 = 10; amap.put("a", 5); bmap.put("b", 4); cmap.put("c", 3); for (int i = 0; i < atot2; i++) { oper.data.process(amap); } for (int i = 0; i < btot2; i++) { oper.data.process(bmap); } for (int i = 0; i < ctot2; i++) { oper.data.process(cmap); } } oper.endWindow(); Assert.assertEquals("number emitted tuples", 3, matchSink.collectedTuples.size()); int vcount; for (Object o: matchSink.collectedTuples) { HashMap<String, HashMap<Integer, Integer>> omap = (HashMap<String, HashMap<Integer, Integer>>)o; for (Map.Entry<String, HashMap<Integer, Integer>> e: omap.entrySet()) { String key = e.getKey(); if (key.equals("a")) { vcount = e.getValue().get(5); Assert.assertEquals("Key \"a\" has value ", numTuples * 4, vcount); } else if (key.equals("b")) { vcount = e.getValue().get(2); Assert.assertEquals("Key \"a\" has value ", numTuples * 3, vcount); vcount = e.getValue().get(4); Assert.assertEquals("Key \"a\" has value ", numTuples * 3, vcount); } else if (key.equals("c")) { vcount = e.getValue().get(4); Assert.assertEquals("Key \"a\" has value ", numTuples * 6, vcount); } } } log.debug(String.format("\nBenchmarked %d tuples", numTuples * (atot1 + atot2 + btot1 + btot2 + ctot1 + ctot2))); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8f9adece1043d27b434d32f0b9a9d369b62044ff
3de949a9dd87dc20bc0a36bcdb1b2c3f537419de
/ch02/src/main/java/twoStop/ThreadB.java
d0e4e37424ddb54051a697f4ac2ab0c7b7ec56fc
[]
no_license
dengqz/mythread
b7a019be40f65503d3bd27d9b763b08573f8f551
6221d7c7e8f1cad8306f393ccd56f7d3f7bf8934
refs/heads/master
2020-03-19T06:38:42.712887
2018-08-21T08:21:27
2018-08-21T08:21:27
136,042,171
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package twoStop; /** * @author : Cheese * @date : 2018/6/8 * @description : TODO */ public class ThreadB extends Thread { private Service service; public ThreadB(Service service){ super(); this.service=service; } @Override public void run() { service.methodB(); } }
[ "872114581@qq.com" ]
872114581@qq.com
a44cc09d25c9e21141cc78b106ea8b4512061fa6
2bc2890c53e4524cb0af271ddaf68e2b6dfce4cf
/HowtoUpload/src/reddy/tutorial/classes/inheritance/itemp/JavaEmp.java
484ee01aa966bfd91c28f4327cdec55c2d8fa808
[]
no_license
aneesh5168/howtoUpload
1e918a9f4b0f6de2fc3ace9ab412eef3a966883b
da13de2ecb74de8a0e078d249274ba4dd7c033c5
refs/heads/master
2021-01-23T21:02:40.414467
2017-07-08T18:01:47
2017-07-08T18:01:47
90,672,347
0
0
null
null
null
null
UTF-8
Java
false
false
803
java
package reddy.tutorial.classes.inheritance.itemp; import reddy.tutorial.classes.inheritance.Kickable; import reddy.tutorial.classes.inheritance.Swimmable; public class JavaEmp extends ITEmployee implements Swimmable, Kickable { public JavaEmp(int empId, String name) { super(empId, name); } @Override public void vehcile() { System.out.println("Java Vechicle"); } @Override public String tieColor() { // TODO Auto-generated method stub return "tie color is javawhite"; } public String ObjectConceptKnow(){ return "very good knowledge"; } @Override public void swimming() { System.out.println(" i am java Guy who is bad at swimming"); } @Override public void kick() { System.out.println(" Good kicker"); } }
[ "HP@HP-PC" ]
HP@HP-PC
5091ec4fc511695f49508c1bd06c16cf9e591cca
04e80a25d4cb0d783434d056ca2b6b37bf8c5729
/CreditoGrupalUtilitario/src/main/java/utilitario/comun/FechaTiempo.java
1a868d8ca025446f9a91c4faed30e1b8805641c4
[]
no_license
FyGIntegracionContinua/CIOFF
bfbd2040de503bacc44e376899bddcd4e3db9fd6
20c63dbc01fea60a426ebd49227efb7b8c413567
refs/heads/master
2021-01-15T11:03:31.184075
2017-08-18T20:12:05
2017-08-18T20:12:05
99,607,645
0
1
null
null
null
null
UTF-8
Java
false
false
3,422
java
package utilitario.comun; /** * clase que contiene los tiempos trancurridos * @author rmontellano * @version 4.17 */ public class FechaTiempo { /**hora en que se asigna solicitus*/ private int horaAlta; /** horas trancurridas desde que se envio el correo*/ private int horasTranscurridas; /** dias trancurridos desde que se envio el correo*/ private int diasTranscurridos; /**meses trnacurridos desde que se envia el correo*/ private int mesesTranscurridos; /**años trancurridos desde que se envio el correo*/ private int yearsTrancurridos; /**intervalo de tiempo inicial de horario habil 8*/ private int intervaloInicial; /**intervalo de tiempo final de horario habil 20*/ private int intervaloFinal; /**Estus de la tarea*/ private String estatusTarea; /** * @return the horasTranscurridas */ public int getHorasTranscurridas() { return horasTranscurridas; } /** * @param horasTranscurridas the horasTranscurridas to set */ public void setHorasTranscurridas(int horasTranscurridas) { this.horasTranscurridas = horasTranscurridas; } /** * @return the diasTranscurridos */ public int getDiasTranscurridos() { return diasTranscurridos; } /** * @param diasTranscurridos the diasTranscurridos to set */ public void setDiasTranscurridos(int diasTranscurridos) { this.diasTranscurridos = diasTranscurridos; } /** * @return the mesesTranscurridos */ public int getMesesTranscurridos() { return mesesTranscurridos; } /** * @param mesesTranscurridos the mesesTranscurridos to set */ public void setMesesTranscurridos(int mesesTranscurridos) { this.mesesTranscurridos = mesesTranscurridos; } /** * @return the yearsTrancurridos */ public int getYearsTrancurridos() { return yearsTrancurridos; } /** * @param yearsTrancurridos the yearsTrancurridos to set */ public void setYearsTrancurridos(int yearsTrancurridos) { this.yearsTrancurridos = yearsTrancurridos; } /** * @return the horaAlta */ public int getHoraAlta() { return horaAlta; } /** * @param horaAlta the horaAlta to set */ public void setHoraAlta(int horaAlta) { this.horaAlta = horaAlta; } /** * @return the intervaloInicial */ public int getIntervaloInicial() { return intervaloInicial; } /** * @param intervaloInicial the intervaloInicial to set */ public void setIntervaloInicial(int intervaloInicial) { this.intervaloInicial = intervaloInicial; } /** * @return the intervaloFinal */ public int getIntervaloFinal() { return intervaloFinal; } /** * @param intervaloFinal the intervaloFinal to set */ public void setIntervaloFinal(int intervaloFinal) { this.intervaloFinal = intervaloFinal; } /** * @return the estatusTarea */ public String getEstatusTarea() { return estatusTarea; } /** * @param estatusTarea the estatusTarea to set */ public void setEstatusTarea(String estatusTarea) { this.estatusTarea = estatusTarea; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return "horaAlta:" + horaAlta + "\thorasTranscurridas: " + horasTranscurridas + "\tdiasTranscurridos:" + diasTranscurridos + "\tmesesTranscurridos: " + mesesTranscurridos + "\tyearsTrancurridos:" + yearsTrancurridos + "\tintervaloInicial:" + intervaloInicial + "\tintervaloFinal:" + intervaloFinal + "\testatusTarea:" + estatusTarea; } }
[ "christian.lopez@fygsolutions.com" ]
christian.lopez@fygsolutions.com
6637afe7b387ce284e6f23ca2f81f288455012ab
f1aa49fe74a7a3fc50b3bc2adf8bfacf0d9a060b
/src/main/java/be/vdab/servlets/docenten/ZoekenServlet.java
193a6e7f26fdd91954c77e3a112a70b3b03dd4df
[]
no_license
Micsolmic/fietsacademy
496e7a8eb9ce5e73c29e9f9f9aae74df0cd6b7c6
106996702074b6c7b4a5d1e71fa6aedbcbed6d6b
refs/heads/master
2021-08-24T06:58:27.316474
2017-12-08T14:22:09
2017-12-08T14:22:09
111,848,216
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,870
java
package be.vdab.servlets.docenten; import java.io.IOException; import java.util.Collections; 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 be.vdab.services.DocentService; // enkele imports ... @WebServlet("/docenten/zoeken.htm") public class ZoekenServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static final String VIEW = "/WEB-INF/JSP/docenten/zoeken.jsp"; private final transient DocentService docentService = new DocentService(); private static final String REDIRECT_URL = "%s/docenten/zoeken.htm?id=%d"; @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getQueryString() != null) { try { docentService.read(Long.parseLong(request.getParameter("id"))) .ifPresent(docent -> request.setAttribute("docent", docent)); } catch (NumberFormatException ex) { request.setAttribute("fouten", Collections.singletonMap("id", "tik een getal")); // singletonMap maakt intern een Map met één entry (key=id, // value=tik een getal) en geeft die Map terug als returnwaarde } } request.getRequestDispatcher(VIEW).forward(request, response); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { long id = Long.parseLong(request.getParameter("id")); if (request.getParameter("verwijderen") == null) { bijnamenToevoegen(request, response, id); } else { bijnamenVerwijderen(request, response, id); } } private void bijnamenVerwijderen(HttpServletRequest request, HttpServletResponse response, long id) throws IOException { String[] bijnamen = request.getParameterValues("bijnaam"); if (bijnamen != null) { docentService.bijnamenVerwijderen(id, bijnamen); } response.sendRedirect(response.encodeRedirectURL(String.format(REDIRECT_URL, request.getContextPath(), id))); } private void bijnamenToevoegen(HttpServletRequest request, HttpServletResponse response, long id) throws IOException, ServletException { String bijnaam = request.getParameter("bijnaam"); if (bijnaam == null || bijnaam.isEmpty()) { request.setAttribute("fouten", Collections.singletonMap("bijnaam", "verplicht")); docentService.read(id).ifPresent(docent -> request.setAttribute("docent", docent)); request.getRequestDispatcher(VIEW).forward(request, response); } else { docentService.bijnaamToevoegen(id, bijnaam); response.sendRedirect( response.encodeRedirectURL(String.format(REDIRECT_URL, request.getContextPath(), id))); } } }
[ "johndoe@example.com" ]
johndoe@example.com
d9d848420e591f139af2cae536c9529f3fed9ba7
c95b2512abfd6bb04491ea41bf47844868fa4244
/Algorithms4ed/src/st/SequentialSearchSET.java
6fffc8d2cb1adc88372cf7c68047d6c05e5e31ff
[]
no_license
zalacer/projects-tn
bf318562cbda745affac9cbd7ad9d24b867468f0
08108c8d5c2e9581651cb7291fd7ed29b7a32eea
refs/heads/master
2020-05-21T22:16:05.797533
2018-07-18T18:13:15
2018-07-18T18:13:15
29,801,935
3
0
null
null
null
null
UTF-8
Java
false
false
4,753
java
package st; import static v.ArrayUtils.*; import java.util.Iterator; import ds.Stack; // based on st.SequentialSearchSTX for ex3502 public class SequentialSearchSET<X> implements UnorderedSET<X> { private int n = 0; // number of keys private Node first; // the linked list of key-value pairs private Class<?> xclass = null; // class of X private class Node { private X x; private Node next; public Node(X x, Node next) { this.x = x; this.next = next; } } public SequentialSearchSET(){} public SequentialSearchSET(X[] xa) { if (xa == null || xa.length == 0) return; xclass = xa.getClass().getComponentType(); int n = xa.length; int c = 0; X[] ta = ofDim(xa.getClass().getComponentType(), n); for (int i = 0; i < n; i++) if (xa[c] != null) ta[c] = xa[c]; if (c == 0) return; ta = take(ta,c); n = ta.length; for (int i = 0; i < n; i++) add(ta[i]); } public int size() { return n; } public boolean isEmpty() { return size() == 0; } public boolean contains(X x) { if (x == null) throw new NullPointerException("argument to contains() is null"); return get(x); } private boolean get(X x) { if (x == null) throw new NullPointerException("argument to get() is null"); for (Node node = first; node != null; node = node.next) if (x.equals(node.x)) return true; return false; } public void add(X x) { if (x == null) throw new NullPointerException("add: argument is null"); if (xclass == null) xclass = x.getClass(); for (Node node = first; node != null; node = node.next) if (x.equals(node.x)) return; first = new Node(x,first); n++; } public void delete(X x) { if (x == null) throw new NullPointerException("delete: argument is null"); if (first == null) return; if (first.x.equals(x)) { first = first.next; n--; return; } Node node = first, p; while (node.next != null) { p = node; node = node.next; if (x.equals(node.x)) { p.next = node.next; n--; node = null; return; } } } public Iterator<X> iterator() { Stack<X> stack = new Stack<X>(); for (Node node = first; node != null; node = node.next) stack.push(node.x); return stack.iterator(); } public SequentialSearchSET<X> union(SequentialSearchSET<X> that) { if (that == null) return null; SequentialSearchSET<X> set = new SequentialSearchSET<>(); for (X x : this) { set.add(x); } for (X x : that) { set.add(x); } return set; } public SequentialSearchSET<X> intersection(SequentialSearchSET<X> that) { if (that == null) return null; SequentialSearchSET<X> set = new SequentialSearchSET<>(); if (this.size() < that.size()) { for (X x : this) { if (that.contains(x)) set.add(x); } } else for (X x : that) { if (this.contains(x)) set.add(x); } return set; } @Override public int hashCode() { int h = 0; Iterator<X> it = iterator(); while (it.hasNext()) { X x = it.next(); h += x == null ? 0 : x.hashCode(); } return h; } @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SequentialSearchSET other = (SequentialSearchSET) obj; if (size() != other.size()) return false; Iterator<X> it = iterator(); while (it.hasNext()) if (!other.contains(it.next())) return false; return true; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("("); Iterator<X> it = iterator(); while (it.hasNext()) sb.append(it.next()+","); sb.replace(sb.length()-1, sb.length(),")"); return sb.toString(); } public static void main(String[] args) { System.out.println("SequentialSearchSET demo:"); SequentialSearchSET<Integer> set1 = new SequentialSearchSET<>(); for (int i = 1; i < 11; i++) for (int j = 0; j < i; j++) set1.add(i); System.out.println("set1 = "+set1); SequentialSearchSET<Integer> set2 = new SequentialSearchSET<>(); for (int i = 6; i < 16; i++) for (int j = 0; j < i; j++) set2.add(i); System.out.println("set2 = "+set2); SequentialSearchSET<Integer> union1 = set1.union(set2); System.out.println("set1 union set2 = "+union1); for (int i = 1; i < 16; i++) assert union1.contains(i); SequentialSearchSET<Integer> intersection1 = set1.intersection(set2); System.out.println("set1 intersect set2 = "+intersection1); for (int i = 6; i < 11; i++) assert intersection1.contains(i); } }
[ "tris.nefzger@gmail.com" ]
tris.nefzger@gmail.com
bfe16de83df8068b3705f9711754de5b7f222960
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_48_buggy/mutated/254/Token.java
72373991db0c2c70cc158c2765f40d769f88ba66
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,879
java
package org.jsoup.parser; import org.jsoup.helper.Validate; import org.jsoup.nodes.Attribute; import org.jsoup.nodes.Attributes; /** * Parse tokens for the Tokeniser. */ abstract class Token { TokenType type; private Token() { } static class Doctype extends Token { final StringBuilder name = new StringBuilder(); final StringBuilder publicIdentifier = new StringBuilder(); final StringBuilder systemIdentifier = new StringBuilder(); boolean forceQuirks = false; Doctype() { type = TokenType.Doctype; } String getName() { return name.toString(); } String getPublicIdentifier() { return publicIdentifier.toString(); } public String getSystemIdentifier() { return systemIdentifier.toString(); } public boolean isForceQuirks() { return forceQuirks; } } static abstract class Tag extends Token { protected String tagName; private String pendingAttributeName; private String pendingAttributeValue; boolean selfClosing = false; Attributes attributes = new Attributes(); // todo: allow nodes to not have attributes void newAttribute() { if (pendingAttributeName != null) { if (pendingAttributeValue == null) pendingAttributeValue = ""; Attribute attribute = new Attribute(pendingAttributeName, pendingAttributeValue); attributes.put(attribute); } pendingAttributeName = null; pendingAttributeValue = null; } void finaliseTag() { // finalises for emit if (pendingAttributeName != null) { // todo: check if attribute name exists; if so, drop and error newAttribute(); } } String name() { Validate.isFalse(tagName.length() == 0); return tagName; } Tag name(String name) { tagName = name; return this; } boolean isSelfClosing() { return selfClosing; } @SuppressWarnings({"TypeMayBeWeakened"}) Attributes getAttributes() { return attributes; } // these appenders are rarely hit in not null state-- caused by null chars. void appendTagName(String append) { tagName = tagName == null ? append : tagName.concat(append); } void appendTagName(char append) { appendTagName(String.valueOf(append)); } void appendAttributeName(String append) { pendingAttributeName = pendingAttributeName == null ? append : pendingAttributeName.concat(append); } void appendAttributeName(char append) { appendAttributeName(String.valueOf(append)); } void appendAttributeValue(String append) { pendingAttributeValue = pendingAttributeValue == null ? pendingAttributeName : pendingAttributeValue.concat(append); } void appendAttributeValue(char append) { appendAttributeValue(String.valueOf(append)); } } static class StartTag extends Tag { StartTag() { super(); type = TokenType.StartTag; } StartTag(String name) { this(); this.tagName = name; } StartTag(String name, Attributes attributes) { this(); this.tagName = name; this.attributes = attributes; } @Override public String toString() { return "<" + name() + " " + attributes.toString() + ">"; } } static class EndTag extends Tag{ EndTag() { super(); type = TokenType.EndTag; } EndTag(String name) { this(); this.tagName = name; } @Override public String toString() { return "</" + name() + " " + attributes.toString() + ">"; } } static class Comment extends Token { final StringBuilder data = new StringBuilder(); Comment() { type = TokenType.Comment; } String getData() { return data.toString(); } @Override public String toString() { return "<!--" + getData() + "-->"; } } static class Character extends Token { private final String data; Character(String data) { type = TokenType.Character; this.data = data; } String getData() { return data; } @Override public String toString() { return getData(); } } static class EOF extends Token { EOF() { type = Token.TokenType.EOF; } } boolean isDoctype() { return type == TokenType.Doctype; } Doctype asDoctype() { return (Doctype) this; } boolean isStartTag() { return type == TokenType.StartTag; } StartTag asStartTag() { return (StartTag) this; } boolean isEndTag() { return type == TokenType.EndTag; } EndTag asEndTag() { return (EndTag) this; } boolean isComment() { return type == TokenType.Comment; } Comment asComment() { return (Comment) this; } boolean isCharacter() { return type == TokenType.Character; } Character asCharacter() { return (Character) this; } boolean isEOF() { return type == TokenType.EOF; } enum TokenType { Doctype, StartTag, EndTag, Comment, Character, EOF } }
[ "justinwm@163.com" ]
justinwm@163.com
bed123ad4048c8590928b1b54a69a23ed66219ec
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/emas-devops-20191204/src/main/java/com/aliyun/emas_devops20191204/models/TriggerPipelineShrinkRequest.java
6107d3adcddb896f446bb39cdcb5ed65040b6dba
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,120
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.emas_devops20191204.models; import com.aliyun.tea.*; public class TriggerPipelineShrinkRequest extends TeaModel { @NameInMap("PipelineId") @Validation(required = true) public String pipelineId; @NameInMap("RuntimeEnvVariables") public String runtimeEnvVariablesShrink; public static TriggerPipelineShrinkRequest build(java.util.Map<String, ?> map) throws Exception { TriggerPipelineShrinkRequest self = new TriggerPipelineShrinkRequest(); return TeaModel.build(map, self); } public TriggerPipelineShrinkRequest setPipelineId(String pipelineId) { this.pipelineId = pipelineId; return this; } public String getPipelineId() { return this.pipelineId; } public TriggerPipelineShrinkRequest setRuntimeEnvVariablesShrink(String runtimeEnvVariablesShrink) { this.runtimeEnvVariablesShrink = runtimeEnvVariablesShrink; return this; } public String getRuntimeEnvVariablesShrink() { return this.runtimeEnvVariablesShrink; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7a082d89d8aea7d2766bea25929330010848dc92
e58a67e35dc304bc2f12b29fc30a6f2232c22fb2
/guvnor-ng/guvnor-editors/guvnor-guided-dtable-editor/guvnor-guided-dtable-editor-api/src/main/java/org/kie/guvnor/guided/dtable/model/conversion/ConversionMessageType.java
867444008e7f002cadde71d745201afa86e50718
[ "Apache-2.0" ]
permissive
jsvitak/guvnor
5dae69f5775ba4c2946e38ad8ce41c86f89a63a0
56f6d6fb0c970d27f1179e2a4923569d6134e7c6
refs/heads/master
2021-01-16T22:49:47.978385
2013-02-21T16:05:56
2013-02-21T16:06:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package org.kie.guvnor.guided.dtable.model.conversion; /** * Types of message */ import org.jboss.errai.common.client.api.annotations.Portable; @Portable public enum ConversionMessageType { INFO, WARNING, ERROR }
[ "michael.anstis@gmail.com" ]
michael.anstis@gmail.com
4fce7f754d0b42ad49e33246e8e5d64b062efb69
b45a057b52344497f800d247c8aca9ec890c2714
/holly-chains-mobile/src/main/java/com/bt/chains/service/ValidationService.java
c39bd2ac2c6a7973ee23795fa8aced43e1c4cf67
[]
no_license
scorpiopapa/game-hollychains
8f6269663dddf7749066c30583a6eab01e4c5b95
fc39e8b21d379dc8a89083913e2ef2a407de6368
refs/heads/master
2020-06-02T01:27:10.053166
2014-09-27T09:40:08
2014-09-27T09:40:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,876
java
package com.bt.chains.service; import java.util.Date; import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bt.chains.bean.domain.User; import com.bt.chains.bean.domain.UserAuth; import com.bt.chains.bean.domain.UserProp; import com.bt.chains.constant.DBConstants; import com.bt.chains.constant.ErrorCodeConstants; import com.bt.chains.exception.RequestException; import com.bt.chains.mapper.UserMapper; import com.bt.chains.util.DBUtils; @Service public class ValidationService { private final static Logger log = LoggerFactory.getLogger(ValidationService.class); @Autowired private UserMapper userMapper; public void validateBindStatus(int userId) throws RequestException{ User user = userMapper.selectUser(userId); if(user == null){ throw new RequestException(ErrorCodeConstants.USER_NOEXISTS, ErrorCodeConstants.USER_NOEXISTS_MSG); } } public UserAuth validateBindDevice(int userId, String code) throws RequestException { validateBindStatus(userId); UserAuth userAuth = userMapper.selectUserAuth(userId); if(userAuth == null){ throw new RequestException(ErrorCodeConstants.INVALID_MIGRATE, ErrorCodeConstants.INVALID_MIGRATE_MSG); } Date createDate = userAuth.getCreateDate(); Date expireDate = DateUtils.addDays(createDate, DBConstants.codeExpired.expiredDate); Date today = DBUtils.getCurrentTimestamp(); if(today.compareTo(expireDate) >= 0){ //过期 throw new RequestException(ErrorCodeConstants.CODE_EXPIRED, ErrorCodeConstants.CODE_EXPIRED_MSG); } if(!userAuth.getCode().equalsIgnoreCase(code)){ throw new RequestException(ErrorCodeConstants.CODE_MISMATCH, ErrorCodeConstants.CODE_MISMATCH_MSG); } return userAuth; } /** * 判断宝石是否充足 * @throws RequestException */ public void validateGem(int userId, int gemNumber) throws RequestException { User user = userMapper.selectUser(userId); int specialMoney = user.getSpecialMoney(); if(specialMoney < gemNumber){ throw new RequestException(ErrorCodeConstants.NOT_ENOUGH_GEM, ErrorCodeConstants.NOT_ENOUGH_GEM_MSG); } } /** * 判断武器制造券是否充足 * @throws RequestException */ public void validateWeaponSecurities(int userId, int number) throws RequestException { //获取用户武器制造券个数 UserProp up = new UserProp(); up.setUserId(userId); up.setPropType("3"); int count = userMapper.queryUserPropCount(up); int weaponSecurities = 0; if(count > 0){ weaponSecurities = userMapper.queryUserPropNum(userId, "3"); } if(weaponSecurities < number){ throw new RequestException(ErrorCodeConstants.NOT_ENOUGH_WEAPON_SECURITIES, ErrorCodeConstants.NOT_ENOUGH_WEAPON_SECURITIES_MSG); } } }
[ "liliang2005@gmail.com" ]
liliang2005@gmail.com
8df88853c6c4339a270c2fd307f96ec93cef6b02
fc204738b5d6fd6514a18d20d63a08ac2a298d84
/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/jaxb/v201502/Predicate.java
cae8130e6bdfb57ed109e7672c25f1990bb06f33
[ "Apache-2.0" ]
permissive
rudraSharva/googleads-java-lib
8ad14c6e8510a48e703d2c8232c5765ed8943c9d
2c558fcc5662a8b65082f312f09f0b31c014cb31
refs/heads/master
2021-01-17T12:05:29.608803
2015-06-10T17:55:35
2015-06-10T17:55:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,608
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.06.10 at 09:15:07 AM PDT // package com.google.api.ads.adwords.lib.jaxb.v201502; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for Predicate complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Predicate"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="field" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="operator" type="{https://adwords.google.com/api/adwords/cm/v201502}Predicate.Operator"/&gt; * &lt;element name="values" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Predicate", propOrder = { "field", "operator", "values" }) public class Predicate { @XmlElement(required = true) protected String field; @XmlElement(required = true) @XmlSchemaType(name = "string") protected PredicateOperator operator; @XmlElement(required = true, nillable = true) protected List<String> values; /** * Gets the value of the field property. * * @return * possible object is * {@link String } * */ public String getField() { return field; } /** * Sets the value of the field property. * * @param value * allowed object is * {@link String } * */ public void setField(String value) { this.field = value; } /** * Gets the value of the operator property. * * @return * possible object is * {@link PredicateOperator } * */ public PredicateOperator getOperator() { return operator; } /** * Sets the value of the operator property. * * @param value * allowed object is * {@link PredicateOperator } * */ public void setOperator(PredicateOperator value) { this.operator = value; } /** * Gets the value of the values property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the values property. * * <p> * For example, to add a new item, do as follows: * <pre> * getValues().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getValues() { if (values == null) { values = new ArrayList<String>(); } return this.values; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
a254656496f94a4ea383524f5aa7bdd104eb3994
f0a6419979c85219c241fe95eb518d64336e118d
/Mytest/src/sorts/Sorts.java
1087cfba3c8e368ba0cac9eaaaf027b759640714
[]
no_license
Dwti/adhoc
e47f5fe4147de8325e0122e3d5ffeb397c2e9971
e155a36c5f9ac3fc2f97d8af31ab63361af685a4
refs/heads/master
2020-03-13T06:20:52.847919
2018-04-25T12:20:33
2018-04-25T12:20:33
131,002,669
0
0
null
null
null
null
GB18030
Java
false
false
6,454
java
package sorts; public class Sorts { public Sorts() { } /* * 快速排序 * 思想:通过一趟排序将待排序记录分割成独立的两部分,其中一部分记录的关键字均比另一部分关键字小, * 则分别对这两部分继续进行排序,直到整个序列有序。 * 时间复杂度:平均nlog2n,最好:nlog2n,最坏n^2 * 空间复杂度:nlog2n * 稳定性:不稳定 */ int[] quickSort(int []a,int low,int hight){ if(low<hight) { int middle=getMiddle(a, low, hight); quickSort(a, 0, middle-1); quickSort(a, middle+1, hight); } return a; } int getMiddle(int a[],int low,int hight){ int temp=a[low];//创建一个临时的变量,存放找出的基准数 while(low<hight) { while(low<hight && temp<=a[hight]) { hight--; } a[low]=a[hight]; while(low<hight && temp>=a[low]) { low++; } a[hight]=a[low]; } a[low]=temp; return hight; } /*冒泡排序 * 思路:在要排序的一组数中,对当前还未排好序的范围内的全部数,自上而下对相邻的两个数依次进行比较和调整, * 让较大的数往下沉,较小的往上冒。即:每当两相邻的数比较后发现它们的排序与排序要求相反时,就将它们互换。 * 时间复杂度:平均n^2,最好:n,最坏n^2 * 空间复杂度:1 * 稳定性:稳定 * */ int [] bubbleSort(int []a){ for(int i=0;i<a.length;i++) { for(int j=0;j<a.length-1-i;j++) { int temp; if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } return a; } /*选择排序 * 思路:在要排序的一组数中,选出最小(或者最大)的一个数与第1个位置的数交换; * 然后在剩下的数当中再找最小(或者最大)的与第2个位置的数交换, * 依次类推,直到第n-1个元素(倒数第二个数)和第n个元素(最后一个数)比较为止。 * 时间复杂度:平均n^2,最好:n^2,最坏n^2 * 空间复杂度:1 * 稳定性:不稳定 * */ int[] selectSort(int []a) { int temp; int index; for(int i=0;i<a.length;i++) { temp=a[i]; index=i; for(int j=i+1;j<a.length;j++) { if(a[j]<temp) { temp=a[j]; index=j; } } a[index]=a[i]; a[i]=temp; } return null; } int[] selectSort1(int []a) { int index; int temp; for(int i=0;i<a.length;i++) { temp=a[i]; for(int j=i+1;j<a.length;j++){ if(a[j]<temp) { index=j; } } } return null; } /*堆排序 * 思路:初始时把要排序的n个数的序列看作是一棵顺序存储的二叉树(一维数组存储二叉树) * ,调整它们的存储序,使之成为一个堆,将堆顶元素输出,得到n 个元素中最小(或最大)的元素, * 这时堆的根节点的数最小(或者最大)。然后对前面(n-1)个元素重新调整使之成为堆, * 输出堆顶元素,得到n 个元素中次小(或次大)的元素。 * 依此类推,直到只有两个节点的堆,并对它们作交换,最后得到有n个节点的有序序列。称这个过程为堆排序。 * 时间复杂度:平均nlog2n,最好:nlog2n,最坏nlog2n * 空间复杂度:1 * 稳定性:不稳定 * * */ //1.建立堆,交换堆顶与最后一个叶子节点 int[] heapSort(int []a) { //循环创建堆 for(int i=0;i<a.length-1;i++) { buildMaxHeap(a,a.length-1-i); //交换堆顶和最后一个元素 swap(a,0,a.length-1-i); } return a; } //交换的方法 private void swap(int[] a, int i, int j) { int temp=a[i]; a[i]=a[j]; a[j]=temp; } //创建大顶堆,从0到lastIndex建立大顶堆 private void buildMaxHeap(int[] a, int lastIndex) { //从lastIndex处节点的父节点开始 for(int i=(lastIndex-1)/2;i>=0;i--) { //k用来保存正在判断的节点 int k=i; //如果当前K节点的子节点存在 while(k*2+1<=lastIndex) { //K节点的左子节点的索引 int biggerIndex=k*2+1; //如果biggerIndex小于lastIndex,说明K节点存在右子节点,即biggerIndex+1代表的k节点的右子节点 if(biggerIndex<lastIndex) { //如果右子节点大于左子几点 if(a[biggerIndex]<a[biggerIndex+1]) { //biggerIndex这时候应该记录较大自己点的索引,biggerIndex这时候需要+1 biggerIndex=biggerIndex+1; } } //如果k节点的值小于较大节点的值,就交换他们 if(a[k]<a[biggerIndex]) { swap(a, k, biggerIndex); //将biggerIndex覆值给k,开始while循环的下一次循环,重新保证k节点的值大于其左右子节点的值 k=biggerIndex; }else { break; } } } } /*直接插入排序 * 思路:将一个记录插入到已排序好的有序表中,从而得到一个新,记录数增1的有序表。 * 即:先将序列的第1个记录看成是一个有序的子序列,然后从第2个记录逐个进行插入,直至整个序列有序为止。 * 要点:设立哨兵,作为临时存储和判断数组边界之用。 * 时间复杂度:平均n^2,最好:n,最坏n^2 * 空间复杂度:1 * 稳定性:稳定 * */ int []insertSort(int []a){ int temp;//需要插入的数 for(int i=1;i<a.length;i++) { temp=a[i]; int j=i-1;//已经排好序的元素的个数 while(j>=0&&a[j]>temp) { a[j+1]=a[j]; j--; } a[j+1]=temp; } return a; } /*shell排序 * 思路:将整个待排序的记录序列分割成为若干子序列分别进行直接插入排序, * 待整个序列中的记录“基本有序”时,再对全体记录进行依次直接插入排序。 * 时间复杂度:平均n^2,最好:n,最坏n^ * 空间复杂度:1 * 稳定性:不稳定 * * */ int [] shellSort(int a[]) { //d是增量 int d=a.length/2; //如果d大于1 while(d>=1) { //对按照增量分的组,进行插入排序 shellInsertSort(a,d); //对细分的组再次分组 d=d/2; } return a; } private void shellInsertSort(int[] a, int d) { for(int i=d;i<a.length;i++) { if(a[i]<a[i-d]) { int j; int temp=a[i]; a[i]=a[i-d]; //通过循环,逐个后移一位找到要插入的位置。 for( j=i-d;j>=0&&temp<a[j];j=j-d) { a[j+d]=a[j]; } a[j+d]=temp; } } } }
[ "sunpeng@yanxiu.com" ]
sunpeng@yanxiu.com
eee1ce82ec7b40f828dcf10218b4205cd390ed48
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/20/org/jfree/chart/plot/XYPlot_getDomainAxisForDataset_3148.java
77291f2f5d58ed509afb58c6457b3152b53adb8c
[]
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
5,530
java
org jfree chart plot gener plot data form pair plot data link dataset xydataset code plot xyplot code make link item render xyitemrender draw point plot render chart type produc link org jfree chart chart factori chartfactori method creat pre configur chart plot xyplot plot axi plot valueaxisplot return domain axi dataset param index dataset index axi axi valueaxi domain axi dataset getdomainaxisfordataset index index index dataset count getdatasetcount illeg argument except illegalargumentexcept index index bound axi valueaxi axi valueaxi integ axi index axisindex integ dataset domain axi map datasettodomainaxismap integ index axi index axisindex axi valueaxi domain axi getdomainaxi axi index axisindex intvalu axi valueaxi domain axi getdomainaxi axi valueaxi
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
c0bcfc616caf40658e7ff9a384329ec2deda4b92
725252036d9ea34b58cd340623441065057314c9
/spring-cloud/gateway/src/main/java/org/wyyt/springcloud/gateway/controller/RouteController.java
14cff9f564c565744464ee2e7d164328b08ad7b1
[]
no_license
ZhangNingPegasus/middleware
7fd7565cd2aac0fee026b5696c9b5021ab753119
46428f43c31523786c03f10ee00949f6bc13ce19
refs/heads/master
2023-06-26T17:55:57.485006
2021-08-01T03:10:29
2021-08-01T03:10:29
303,567,345
4
3
null
null
null
null
UTF-8
Java
false
false
1,813
java
package org.wyyt.springcloud.gateway.controller; import org.springframework.cloud.gateway.route.RouteDefinition; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.wyyt.springcloud.gateway.anno.Auth; import org.wyyt.springcloud.gateway.entity.BaseEntity; import org.wyyt.springcloud.gateway.service.DynamicRouteService; import org.wyyt.tool.rpc.Result; import reactor.core.publisher.Mono; import java.util.List; import java.util.stream.Collectors; /** * the controller of Dynamic Routing * <p> * * @author Ning.Zhang(Pegasus) * ***************************************************************** * Name Action Time Description * * Ning.Zhang Initialize 02/14/2021 Initialize * * ***************************************************************** */ @RestController @RequestMapping("route") public class RouteController { private final DynamicRouteService dynamicRouteService; public RouteController(final DynamicRouteService dynamicRouteService) { this.dynamicRouteService = dynamicRouteService; } @Auth @PostMapping("refresh") public synchronized Mono<Result<Void>> refresh(final Mono<BaseEntity> data) { return data.flatMap(d -> { this.dynamicRouteService.refresh(); return Mono.just(Result.ok()); }); } @Auth @PostMapping(value = "listRoutes") public Mono<Result<List<String>>> listRoutes(final Mono<BaseEntity> data) { return data.flatMap(d -> Mono.just(Result.ok(this.dynamicRouteService.listRouteDefinition().values().stream().map(RouteDefinition::toString).collect(Collectors.toList())))); } }
[ "349409664@qq.com" ]
349409664@qq.com
2a8225d72426874420874222fef51639a31919b6
8361bf5c73adddfbc45a1078a1f8344277c1c9f9
/src/org/minima/system/input/functions/send.java
c01e2e7df8eb0dd24224018c3eeb6fadd8619378
[ "Apache-2.0" ]
permissive
glowkeeper/Minima
c4ee472afe8f373a0e4f7e6003ffb95958c483d8
aa503faf971f1baa9cd0fbc3dbb7d24e4291e432
refs/heads/master
2023-07-12T00:56:59.811620
2021-08-16T16:13:21
2021-08-16T16:13:21
265,194,447
0
0
Apache-2.0
2020-05-19T08:48:24
2020-05-19T08:48:23
null
UTF-8
Java
false
false
1,221
java
package org.minima.system.input.functions; import org.minima.system.brains.ConsensusHandler; import org.minima.system.input.CommandFunction; import org.minima.utils.messages.Message; public class send extends CommandFunction{ public send() { super("send"); setHelp("[amount] [address] (tokenid|tokenid statevars)", "Send Minima or Tokens to a certain address.", ""); } @Override public void doFunction(String[] zInput) throws Exception { //The details String amount = zInput[1]; String address = zInput[2]; String tokenid = "0x00"; String state = ""; //Is token ID Specified.. if(zInput.length>3) { tokenid = zInput[3]; } //Are the state vars specified if(zInput.length>4) { state = zInput[4]; } //Create a message Message sender = getResponseMessage(ConsensusHandler.CONSENSUS_CREATETRANS); sender.addString("address", address); sender.addString("amount", amount); sender.addString("tokenid", tokenid); sender.addString("state", state); //Send it to the miner.. getMainHandler().getConsensusHandler().PostMessage(sender); } @Override public CommandFunction getNewFunction() { // TODO Auto-generated method stub return new send(); } }
[ "patrickcerri@gmail.com" ]
patrickcerri@gmail.com
46a0f58db0e89b60aa7b86d04111c4fa2ce7bd4b
8020f160665d98adf3dd36621283aa0faa56fcb1
/src/main/java/com/isa/spring/boot/actuator/services/counter/ServiceWithCounterImpl.java
fe03086fba3b1dd64e08c590617867b4b9ce72d3
[]
no_license
isaolmez/spring-boot-actuator-samples
7b8d063b1526c6f0466aa9186641721e8fc2fe0b
faaa0a7861bed3a3c31e5cc593155d3bbff5a667
refs/heads/master
2021-01-19T17:44:02.368783
2017-04-15T10:17:52
2017-04-15T10:17:52
88,339,171
1
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.isa.spring.boot.actuator.services.counter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.metrics.CounterService; import org.springframework.stereotype.Service; @Service public class ServiceWithCounterImpl implements ServiceWithCounter { private final CounterService counterService; @Autowired public ServiceWithCounterImpl(CounterService counterService) { this.counterService = counterService; } @Override public String get() { counterService.increment("customCounter"); return "Hello"; } }
[ "isaolmez@gmail.com" ]
isaolmez@gmail.com
33b03872ccb0c7a6db2a9a29ea0555d01c3e2304
1e892b9303b3bb5b714966f6f3c6b4ede103517c
/src/main/java/com/arun/interviewquedtions/BiDecimalExample.java
cbe75cbc32e17cd896ea2910f5e07ebd7115c06d
[]
no_license
arun786/JavaWS
6dcd377f5c7a6a2fcdf503d79ec702fecc559394
efda643bba971fe238d4b8049eebba214d5d93dc
refs/heads/master
2020-06-13T03:11:50.711247
2017-07-13T07:22:31
2017-07-13T07:22:31
75,457,209
0
0
null
null
null
null
UTF-8
Java
false
false
1,130
java
package com.arun.interviewquedtions; import java.math.BigDecimal; public class BiDecimalExample { public static void main(String[] args) { /* for financial calculation we should be using bigdecimal */ double amount1 = 4.15; double amount2 = 5.16; System.out.println("the difference between 2 will be " + (amount2 - amount1)); /* * o/p will be the difference between 2 will be 1.0099999999999998 */ BigDecimal amount3 = new BigDecimal("4.15"); BigDecimal amount4 = new BigDecimal("5.16"); System.out.println("the difference will be as " + amount4.subtract(amount3)); /* * o/p will be the difference will be as 1.01, its better to use * Bigdecimal */ /* * But if we use overloaded constructor for BigDecimal, we will have the * same problem */ BigDecimal amount5 = new BigDecimal(4.15); BigDecimal amount6 = new BigDecimal(5.16); System.out.println("the difference will be as " + amount6.subtract(amount5)); /* * o/p will be the difference will be as * 1.0099999999999997868371792719699442386627197265625 */ } }
[ "adwiti1975@gmail.com" ]
adwiti1975@gmail.com
1e24473e38eb0640498a6722543c61ed6e49cac6
03fd5c6b56ab31115216802841fe663926409fed
/lrecyclerview/src/main/java/com/baigu/lrecyclerview/progressindicator/indicators/BallTrianglePathIndicator.java
f74f8118aa12e681588c68f8b27911e4eef04087
[]
no_license
wbq501/tby
dccfe8637edbd0f8db1a179293ba6e044168febd
db881aed32ee9f19131e04f6b257d4bc8b116c8b
refs/heads/master
2020-03-18T13:56:00.487498
2018-06-22T03:37:33
2018-06-22T03:37:33
134,817,745
0
0
null
null
null
null
UTF-8
Java
false
false
3,082
java
package com.baigu.lrecyclerview.progressindicator.indicators; import android.animation.ValueAnimator; import android.graphics.Canvas; import android.graphics.Paint; import android.view.animation.LinearInterpolator; import com.baigu.lrecyclerview.progressindicator.Indicator; import java.util.ArrayList; /** * Created by Jack on 2015/10/19. */ public class BallTrianglePathIndicator extends Indicator { float[] translateX=new float[3],translateY=new float[3]; @Override public void draw(Canvas canvas, Paint paint) { paint.setStrokeWidth(3); paint.setStyle(Paint.Style.STROKE); for (int i = 0; i < 3; i++) { canvas.save(); canvas.translate(translateX[i], translateY[i]); canvas.drawCircle(0, 0, getWidth() / 10, paint); canvas.restore(); } } @Override public ArrayList<ValueAnimator> onCreateAnimators() { ArrayList<ValueAnimator> animators=new ArrayList<>(); float startX=getWidth()/5; float startY=getWidth()/5; for (int i = 0; i < 3; i++) { final int index=i; ValueAnimator translateXAnim= ValueAnimator.ofFloat(getWidth()/2,getWidth()-startX,startX,getWidth()/2); if (i==1){ translateXAnim= ValueAnimator.ofFloat(getWidth()-startX,startX,getWidth()/2,getWidth()-startX); }else if (i==2){ translateXAnim= ValueAnimator.ofFloat(startX,getWidth()/2,getWidth()-startX,startX); } ValueAnimator translateYAnim= ValueAnimator.ofFloat(startY,getHeight()-startY,getHeight()-startY,startY); if (i==1){ translateYAnim= ValueAnimator.ofFloat(getHeight()-startY,getHeight()-startY,startY,getHeight()-startY); }else if (i==2){ translateYAnim= ValueAnimator.ofFloat(getHeight()-startY,startY,getHeight()-startY,getHeight()-startY); } translateXAnim.setDuration(2000); translateXAnim.setInterpolator(new LinearInterpolator()); translateXAnim.setRepeatCount(-1); addUpdateListener(translateXAnim,new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { translateX [index]= (float) animation.getAnimatedValue(); postInvalidate(); } }); translateYAnim.setDuration(2000); translateYAnim.setInterpolator(new LinearInterpolator()); translateYAnim.setRepeatCount(-1); addUpdateListener(translateYAnim,new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { translateY [index]= (float) animation.getAnimatedValue(); postInvalidate(); } }); animators.add(translateXAnim); animators.add(translateYAnim); } return animators; } }
[ "749937855@qq.com" ]
749937855@qq.com
96e3cd1b11189896fbc2adad390e5d7e69bb11cd
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_374/Testnull_37393.java
084db0801c9a02f789e93684c4960a16a2cab250
[]
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
308
java
package org.gradle.test.performancenull_374; import static org.junit.Assert.*; public class Testnull_37393 { private final Productionnull_37393 production = new Productionnull_37393("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4101b06a3a92457ae3473d5a14867868f35f7235
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/android/support/v7/widget/helper/ItemTouchUIUtil.java
10a71aaa2e06f3546fa4b4e1f5249a1fbeb671ae
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
867
java
package android.support.v7.widget.helper; import android.graphics.Canvas; import android.support.v7.widget.RecyclerView; import android.view.View; public abstract interface ItemTouchUIUtil { public abstract void clearView(View paramView); public abstract void onDraw(Canvas paramCanvas, RecyclerView paramRecyclerView, View paramView, float paramFloat1, float paramFloat2, int paramInt, boolean paramBoolean); public abstract void onDrawOver(Canvas paramCanvas, RecyclerView paramRecyclerView, View paramView, float paramFloat1, float paramFloat2, int paramInt, boolean paramBoolean); public abstract void onSelected(View paramView); } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: android.support.v7.widget.helper.ItemTouchUIUtil * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
62bad1bf28af8d951821ca926b9f60daa355b82e
5c5e27be24ebc9727fa0bffe6ed17425156e06a3
/eomcs-java-io/src/main/java/com/eomcs/io/ex10/Exam04_1.java
4b0d0351c3c5670c0927b00f868dcf107aafc58c
[]
no_license
top9148/eomcs-java
c49afc0e1303333e87967d148e6be7db47676a6c
b2d72450b249ae1ca02565db2957cb7b7c75a04a
refs/heads/master
2020-06-17T11:32:26.840763
2019-05-23T08:31:17
2019-05-23T08:31:17
195,911,452
1
0
null
2019-07-09T01:41:50
2019-07-09T01:41:50
null
UTF-8
Java
false
false
927
java
// Java I/O API 사용하기 - serialize와 transient 변경자 package com.eomcs.io.ex10; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.ObjectOutputStream; public class Exam04_1 { public static void main(String[] args) throws Exception { FileOutputStream fileOut = new FileOutputStream("temp/test9_5.data"); BufferedOutputStream bufOut = new BufferedOutputStream(fileOut); ObjectOutputStream out = new ObjectOutputStream(bufOut); Score s = new Score(); s.name = "홍길동"; s.kor = 99; s.eng = 80; s.math = 92; s.compute(); out.writeObject(s); out.close(); } } // 용어 정리! // Serialize : 객체 ===> 바이트 배열 (marshalling 이라고도 부른다.) // Deserialize : 바이트 배열 ===> 객체 (unmarshalling 이라고도 부른다.) //
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
c276dcc608c426e29625e852f5fbe1fdf6ccaab0
95861400cdb5bd544ac570de0c1d414bbed3773d
/src/main/java/com/github/bartimaeusnek/cropspp/crops/cpp/MagicModifierCrop.java
077519400c9239846136f2cb278836b7dda2dc86
[ "BSD-3-Clause", "MIT" ]
permissive
bartimaeusnek/crops-plus-plus
8b741bbdf206141155ada102d4de0cab249c9a3d
7bebadcf8f52c997314aac9f49ff46b1dc9c1e9b
refs/heads/master
2023-01-07T11:59:41.926003
2020-04-17T15:53:37
2020-04-17T15:53:37
111,786,656
3
6
NOASSERTION
2020-10-22T03:22:25
2017-11-23T09:01:23
Java
UTF-8
Java
false
false
2,484
java
package com.github.bartimaeusnek.cropspp.crops.cpp; import com.github.bartimaeusnek.cropspp.ConfigValues; import com.github.bartimaeusnek.cropspp.crops.TC.PrimordialPearlBerryCrop; import com.github.bartimaeusnek.cropspp.items.CppItems; import ic2.api.crops.ICropTile; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import java.util.Collections; import java.util.List; public class MagicModifierCrop extends PrimordialPearlBerryCrop { public MagicModifierCrop() { super(); } @Override public String name() { return "Magical Nightshade"; } @Override public int tier() { return 13; } @Override public boolean canCross(ICropTile crop) { return crop.getSize() == this.maxSize(); } @Override public ItemStack getSeeds(ICropTile crop) { return crop.generateSeeds(crop.getCrop(), crop.getGrowth(), crop.getGain(), crop.getResistance(), crop.getScanLevel()); } @Override public List<String> getCropInformation() { return Collections.singletonList("Needs a block of Ichorium below to fully mature."); } @Override public int growthDuration(ICropTile crop) { if (ConfigValues.debug) return 1; else { return ConfigValues.PrimordialBerryGroth / 16; } } @Override public float dropGainChance() { return (float) ((float) ((Math.pow(0.95, (float) tier())) * ConfigValues.BerryGain) * (ConfigValues.PrimordialBerryGain * 1.5)); } @Override public int getEmittedLight(ICropTile crop) { if (crop.getSize() == 4) return 4; else return 0; } @Override public boolean canGrow(ICropTile crop) { boolean ret = false; if (crop.getSize() < 3) ret = true; else if ((crop.getSize() == 3 && crop.isBlockBelow("blockIchorium")) || (crop.getSize() == 3 && !OreDictionary.doesOreNameExist("blockIchorium"))) ret = true; return ret; } @Override public byte getSizeAfterHarvest(ICropTile crop) { return 1; } @Override public ItemStack getDisplayItem() { return new ItemStack(CppItems.Modifier, 1, 1); } @Override public ItemStack getGain(ICropTile crop) { return new ItemStack(CppItems.Modifier, 1, 1); } @Override public String discoveredBy() { return "bartimaeusnek"; } }
[ "33183715+bartimaeusnek@users.noreply.github.com" ]
33183715+bartimaeusnek@users.noreply.github.com
1b27593d6a12570d795caeefbc208162571198b9
6e949d17adc95460425f043d5b70cb14bd13ef95
/service-fishing/src/main/java/com/tongzhu/fishing/redis/DistributedLockTemplate.java
a5ae3334bd41870a62e47f8e1515b6bf1a5d813b
[]
no_license
HuangRicher/tree
ca1397d6a74eb5d8e49697934c1077beb415d704
88d314cac28d3eea820addcd392ff2d01a74f320
refs/heads/master
2020-05-21T06:08:50.365919
2019-05-15T05:49:39
2019-05-15T05:49:39
185,935,338
0
0
null
null
null
null
UTF-8
Java
false
false
642
java
package com.tongzhu.fishing.redis; import java.util.concurrent.TimeUnit; /** * 分布式锁操作模板 */ public interface DistributedLockTemplate { /** * 使用分布式锁,使用锁默认超时时间。 * * @param callback * @return */ public <T> T lock(DistributedLockCallback<T> callback); /** * 使用分布式锁。自定义锁的超时时间 * * @param callback * @param leaseTime 锁超时时间。超时后自动释放锁。 * @param timeUnit * @return */ public <T> T lock(DistributedLockCallback<T> callback, long leaseTime, TimeUnit timeUnit); }
[ "huangweibiao@instoms.cn" ]
huangweibiao@instoms.cn
e75ffc0615f6bbee64cdd5a9ee404a17b1208e62
a0157465927eeac3296deac94ab3f45db50f365f
/modules/base/impl/src/main/java/org/picketlink/internal/el/ELEvaluationContext.java
a93afca3018ca41fd5389b1c2c154848a18505b8
[ "Apache-2.0" ]
permissive
gastaldi/picketlink
cb988192862e4d5976beb1603e6373432423f76a
99f125c10cd1bf950573d5002e89b63f482b47cf
refs/heads/master
2021-01-18T02:02:22.448040
2014-11-07T16:12:35
2014-11-07T16:12:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,269
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This 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 2.1 of * the License, or (at your option) any later version. * * This software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.picketlink.internal.el; import org.picketlink.Identity; import org.picketlink.idm.PartitionManager; /** * <p>{@link java.lang.ThreadLocal} used to share a execution context when invoking EL functions defined by {@link ELFunctionMethods}.</p> * * TODO: check if EL does not provide something similar so we can avoid this. * * @author Pedro Igor */ class ELEvaluationContext { private static final ThreadLocal<ELEvaluationContext> evaluationContext = new ThreadLocal<ELEvaluationContext>() { @Override protected ELEvaluationContext initialValue() { return new ELEvaluationContext(); } }; private Identity identity; private PartitionManager partitionManager; static ELEvaluationContext get() { return evaluationContext.get(); } static void release() { evaluationContext.remove(); } void setIdentity(Identity identity) { this.identity = identity; } Identity getIdentity() { return identity; } void setPartitionManager(PartitionManager partitionManager) { this.partitionManager = partitionManager; } PartitionManager getPartitionManager() { return this.partitionManager; } }
[ "pigor.craveiro@gmail.com" ]
pigor.craveiro@gmail.com
a23606dde1bc05397c9f985466303200f943e371
ddb071fe1e067fe73a4856ee76dc548bc5682263
/core/src/test/java/com/globalmentor/net/HTTPTest.java
3a03f7922b085a0ea9ef00a711d367f73695a598
[]
no_license
globalmentor/globalmentor-base
058b7b13d44fa8c1772fdb8d6621f0e0897e3b8e
b2b390565ff907ffa438cb4253edc3e6c417a06a
refs/heads/main
2023-08-17T23:55:33.728310
2023-08-09T14:09:46
2023-08-09T14:09:46
184,111,774
0
0
null
null
null
null
UTF-8
Java
false
false
3,032
java
/* * Copyright © 2022 GlobalMentor, Inc. <https://www.globalmentor.com/> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.globalmentor.net; import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; /** * Tests of {@link HTTP}. * @author Garret Wilson */ public class HTTPTest { /** @see HTTP.ResponseClass#forStatusCode(int) */ @Test void testResponseClassForStatusCode() { assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(-123)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(-1)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(0)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(1)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(50)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(99)); assertThat(HTTP.ResponseClass.forStatusCode(100), is(HTTP.ResponseClass.INFORMATIONAL)); assertThat(HTTP.ResponseClass.forStatusCode(101), is(HTTP.ResponseClass.INFORMATIONAL)); assertThat(HTTP.ResponseClass.forStatusCode(123), is(HTTP.ResponseClass.INFORMATIONAL)); assertThat(HTTP.ResponseClass.forStatusCode(199), is(HTTP.ResponseClass.INFORMATIONAL)); assertThat(HTTP.ResponseClass.forStatusCode(200), is(HTTP.ResponseClass.SUCCESSFUL)); assertThat(HTTP.ResponseClass.forStatusCode(299), is(HTTP.ResponseClass.SUCCESSFUL)); assertThat(HTTP.ResponseClass.forStatusCode(300), is(HTTP.ResponseClass.REDIRECTION)); assertThat(HTTP.ResponseClass.forStatusCode(399), is(HTTP.ResponseClass.REDIRECTION)); assertThat(HTTP.ResponseClass.forStatusCode(400), is(HTTP.ResponseClass.CLIENT_ERROR)); assertThat(HTTP.ResponseClass.forStatusCode(499), is(HTTP.ResponseClass.CLIENT_ERROR)); assertThat(HTTP.ResponseClass.forStatusCode(500), is(HTTP.ResponseClass.SERVER_ERROR)); assertThat(HTTP.ResponseClass.forStatusCode(599), is(HTTP.ResponseClass.SERVER_ERROR)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(600)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(699)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(999)); assertThrows(IllegalArgumentException.class, () -> HTTP.ResponseClass.forStatusCode(1000)); } }
[ "garret@globalmentor.com" ]
garret@globalmentor.com
e76f2dad709cb1a43d650dbe9fc65b0ac1b10579
5e46b24b22e845872a3cb739915fcdd591fff11a
/shells/security-speed-shell/src/main/java/org/xipki/security/speed/p11/cmd/SpeedP11ECKeyGenCmd.java
9e98c1ad350b25e7cbb1a9cdd76adbb87b652d38
[ "Apache-2.0" ]
permissive
burakkoprulu/xipki
18a3b2a33d207c9e4b70a2e392684140d5a93857
6c0981909bd5acf565ca46415442b7aab2bdad37
refs/heads/master
2020-03-08T08:54:33.086528
2018-04-03T15:53:26
2018-04-03T15:53:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,577
java
/* * * Copyright (c) 2013 - 2018 Lijun Liao * * 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.xipki.security.speed.p11.cmd; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.Completion; import org.apache.karaf.shell.api.action.Option; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.xipki.common.LoadExecutor; import org.xipki.console.karaf.completer.ECCurveNameCompleter; import org.xipki.security.speed.p11.P11ECKeyGenLoadTest; /** * TODO. * @author Lijun Liao * @since 2.0.0 */ @Command(scope = "xi", name = "speed-ec-gen-p11", description = "performance test of PKCS#11 EC key generation") @Service // CHECKSTYLE:SKIP public class SpeedP11ECKeyGenCmd extends SpeedP11Action { @Option(name = "--curve", required = true, description = "EC curve name\n(required)") @Completion(ECCurveNameCompleter.class) private String curveName; @Override protected LoadExecutor getTester() throws Exception { return new P11ECKeyGenLoadTest(getSlot(), curveName); } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
d9bc838c0f37bd7e7fb13319c287702f6e71ba13
a7830300e4d87f2662268e01592febccb7193dfc
/app/src/main/java/jurgen/example/myloader/MainActivity.java
1de961859bb919a74267c1aa11059bffd16c5d49
[]
no_license
jurgenirgo/MyLoader
18a6212ba9a83a09fddd3685f3629cef215427df
4d651949bec5eafda22164aae368d228cad80555
refs/heads/master
2020-07-10T11:17:48.758604
2019-08-25T05:33:50
2019-08-25T05:33:50
204,250,860
0
0
null
null
null
null
UTF-8
Java
false
false
6,613
java
package jurgen.example.myloader; import android.Manifest; import android.annotation.SuppressLint; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.LoaderManager; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loader; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.Toast; import java.util.ResourceBundle; public class MainActivity extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor>, AdapterView.OnItemClickListener { public static final String TAG = "ContactApp"; ListView lvContact; ProgressBar progressBar; private ContactAdapter mAdapter; private final int CONTACT_REQUEST_CODE = 101; private final int CALL_REQUEST_CODE = 102; private final int CONTACT_LOAD = 110; private final int CONTACT_SELECT = 120; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lvContact = findViewById(R.id.lv_contact); progressBar = findViewById(R.id.progress_bar); lvContact.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.GONE); mAdapter = new ContactAdapter(MainActivity.this, null, true); lvContact.setAdapter(mAdapter); lvContact.setOnItemClickListener(this); if (PermissionManager.isGranted(this, Manifest.permission.READ_CONTACTS)) { getSupportLoaderManager().initLoader(CONTACT_LOAD, null, this); } else { PermissionManager.check(this, Manifest.permission.READ_CONTACTS, CONTACT_REQUEST_CODE); } } @Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { CursorLoader mCursorLoader = null; if (id == CONTACT_LOAD) { progressBar.setVisibility(View.VISIBLE); String[] projectionFields = new String[]{ ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.PHOTO_URI}; mCursorLoader = new CursorLoader(MainActivity.this, ContactsContract.Contacts.CONTENT_URI, projectionFields, ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1", null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " ASC"); } else if (id == CONTACT_SELECT) { String[] phoneProjectionFields = new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER}; mCursorLoader = new CursorLoader(MainActivity.this, ContactsContract.CommonDataKinds.Phone.CONTENT_URI, phoneProjectionFields, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ? AND " + ContactsContract.CommonDataKinds.Phone.TYPE + " = " + ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE + " AND " + ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER + "=1", new String[]{args.getString("id")}, null); } return mCursorLoader; } @SuppressLint("MissingPermission") @Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { Log.d(TAG, "LoadFinished"); if (loader.getId() == CONTACT_LOAD) { if (data.getCount() > 0) { lvContact.setVisibility(View.VISIBLE); mAdapter.swapCursor(data); } progressBar.setVisibility(View.GONE); } else if (loader.getId() == CONTACT_SELECT) { String contactNumber = null; if (data.moveToFirst()) { contactNumber = data.getString(data.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); } if (PermissionManager.isGranted(this, Manifest.permission.CALL_PHONE)) { Intent dialIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + contactNumber)); startActivity(dialIntent); } else { PermissionManager.check(this, Manifest.permission.CALL_PHONE, CALL_REQUEST_CODE); } } } @Override public void onLoaderReset(Loader<Cursor> loader) { if (loader.getId() == CONTACT_LOAD) { progressBar.setVisibility(View.GONE); mAdapter.swapCursor(null); Log.d(TAG, "LoaderReset"); } } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Cursor cursor = (Cursor) parent.getAdapter().getItem(position); long mContactId = cursor.getLong(0); Log.d(TAG, "Position : " + position + " " + mContactId); getPhoneNumber(String.valueOf(mContactId)); } private void getPhoneNumber(String contactID) { Bundle bundle = new Bundle(); bundle.putString("id", contactID); getSupportLoaderManager().restartLoader(CONTACT_SELECT, bundle, this); } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == CONTACT_REQUEST_CODE) { if (grantResults.length > 0) { if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { getSupportLoaderManager().initLoader(CONTACT_LOAD, null, this); Toast.makeText(this, "Contact permission diterima", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(this, "Contact permission ditolak", Toast.LENGTH_SHORT).show(); } } } else if (requestCode == CALL_REQUEST_CODE) { if (grantResults.length > 0) { if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { Toast.makeText(this, "Call permission diterima", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(this, "Call permission ditolak", Toast.LENGTH_SHORT).show(); } } } } }
[ "jurgenirgof@gmail.com" ]
jurgenirgof@gmail.com
fff2925c0586fdf56d8a36e31ccbab787ac40a3d
476a204391833c3b270c05fa54bad859ba395c9a
/src/main/java/it/smartcommunitylab/gamification/tnsmartweek/web/FormController.java
757b9c48d0244d414dc18587ba316e930368e2e8
[ "Apache-2.0" ]
permissive
smartcommunitylab/demo-scw-game
4643357ed7a020231642ad9311104ad19b81643d
9fb9b7fa3af5fef185faee9b9dce993c590b872d
refs/heads/master
2022-12-22T20:57:13.334462
2018-04-11T13:55:32
2018-04-11T13:55:32
126,174,773
0
0
Apache-2.0
2022-12-14T20:34:04
2018-03-21T12:24:51
Java
UTF-8
Java
false
false
2,594
java
package it.smartcommunitylab.gamification.tnsmartweek.web; import java.util.List; import java.util.Map; import javax.validation.Valid; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import it.smartcommunitylab.gamification.tnsmartweek.service.DataManager; import it.smartcommunitylab.gamification.tnsmartweek.service.GameEngineClient; @Controller @ConfigurationProperties(prefix = "form") public class FormController { private static final Logger logger = LogManager.getLogger(FormController.class); private String googleKey; private List<String> teams; @Autowired private GameEngineClient engineClient; @RequestMapping("/") public String form(Map<String, Object> model) { model.put("trip", new Trip()); model.put("teams", teams); model.put("googleKey", googleKey); return "form"; } @PostMapping("/submission") public String process(@Valid @ModelAttribute Trip trip, BindingResult errors, Model model, RedirectAttributes redirectAttrs) { if (!errors.hasErrors()) { logger.info("trip for team {}: participants: {}, distance: {}", trip.getSelectedTeam(), trip.getParticipants(), trip.getDistance()); engineClient.formAction(trip.getSelectedTeam(), trip.getParticipants(), DataManager.convertToMeters(trip.getDistance())); } else { logger.info("Validation errors during form submission"); model.addAttribute("teams", teams); model.addAttribute("googleKey", googleKey); return "form"; } redirectAttrs.addFlashAttribute("submission", true); return "redirect:/"; } public String getGoogleKey() { return googleKey; } public void setGoogleKey(String googleKey) { this.googleKey = googleKey; } public List<String> getTeams() { return teams; } public void setTeams(List<String> teams) { this.teams = teams; } }
[ "mirko.perillo@gmail.com" ]
mirko.perillo@gmail.com
8c12cb0abcae237265d0516167d85c2f5c1a2855
11622501f403df318ad5436cbda22b3454ca2358
/tusharroy/src/main/java/com/interview/tusharroy/tree/ConstructFullTreeFromPreOrderPostOrder.java
5e3587092f44cd84d75822a97177cee744812ec2
[]
no_license
aanush/copy-of-mission-peace
fe13d6bcfb84c1657e15e578643eb93945a5a047
4da7e551bea04b7335cece08f73f598bf579b438
refs/heads/master
2020-03-14T14:02:48.514727
2018-04-30T21:00:25
2018-04-30T21:00:25
131,645,343
0
0
null
null
null
null
UTF-8
Java
false
false
1,675
java
package com.interview.tusharroy.tree; /** * http://www.geeksforgeeks.org/full-and-complete-binary-tree-from-given-preorder-and-postorder-traversals/ * Full tree is a tree with all nodes with either 0 or 2 child. Never has 1 child. * Test cases * Empty tree * Tree with big on left side * Tree with big on right side */ public class ConstructFullTreeFromPreOrderPostOrder { public static void main(String args[]) { ConstructFullTreeFromPreOrderPostOrder cft = new ConstructFullTreeFromPreOrderPostOrder(); int preorder[] = {1, 2, 3, 6, 7, 8, 9}; int postorder[] = {2, 6, 8, 9, 7, 3, 1}; Node root = cft.constructTree(preorder, postorder); TreeTraversals tt = new TreeTraversals(); tt.inOrder(root); tt.preOrder(root); tt.postOrder(root); } public Node constructTree(int preorder[], int postorder[]) { return constructTree(preorder, postorder, 0, postorder.length - 2, 0); } private Node constructTree(int preorder[], int postorder[], int low, int high, int index) { if (low > high || index >= preorder.length - 1) { Node node = new Node(); node.data = preorder[index]; return node; } Node node = new Node(); node.data = preorder[index]; int i = 0; for (i = low; i <= high; i++) { if (preorder[index + 1] == postorder[i]) { break; } } node.left = constructTree(preorder, postorder, low, i - 1, index + 1); node.right = constructTree(preorder, postorder, i + 1, high - 1, index + i - low + 2); return node; } }
[ "anish.anushang@outlook.com" ]
anish.anushang@outlook.com
e85a092372cca214a9f87bbecc95d9882ee58b26
f10bb9304d2683d2808335187d9977a5d9439480
/src/main/java/es/mityc/javasign/xml/refs/ObjectToSign.java
e1d81d5f9854bf858f177fb50018a74b76e04fce
[]
no_license
douglascrp/MITyCLibXADES-sinadura
4daacd52c4c4b51beb6a832a2cc8d9d96bb38fb0
f1602fe5077f708ef5d851b85c722cba8c95b7bb
refs/heads/master
2020-03-25T01:11:41.772525
2018-08-11T13:45:51
2018-08-11T13:45:51
142,208,769
0
0
null
null
null
null
UTF-8
Java
false
false
2,907
java
/** * LICENCIA LGPL: * * Esta librería es Software Libre; Usted puede redistribuirlo y/o modificarlo * bajo los términos de la GNU Lesser General Public License (LGPL) * tal y como ha sido publicada por la Free Software Foundation; o * bien la versión 2.1 de la Licencia, o (a su elección) cualquier versión posterior. * * Esta librería se distribuye con la esperanza de que sea útil, pero SIN NINGUNA * GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o ADECUACIÓN A UN * PROPÓSITO PARTICULAR. Consulte la GNU Lesser General Public License (LGPL) para más * detalles * * Usted debe recibir una copia de la GNU Lesser General Public License (LGPL) * junto con esta librería; si no es así, escriba a la Free Software Foundation Inc. * 51 Franklin Street, 5º Piso, Boston, MA 02110-1301, USA. * */ package es.mityc.javasign.xml.refs; import java.net.URI; import es.mityc.firmaJava.libreria.xades.elementos.xades.ObjectIdentifier; /** * Contiene un objeto que se firmará e información de apoyo. * * @author Ministerio de Industria, Turismo y Comercio * @version 1.0 */ public class ObjectToSign { private AbstractObjectToSign objectToSign; private String id; // Información adicional private String description = null; private ObjectIdentifier objectIdentifier = null; private ExtraObjectData extraData = null; /** * Permite pasar un objeto a firmar, junto con la información sobre dicho objeto a firmar. * * @param objectToSign .- Objeto a firmar * @param desc .- Descripción del objeto a firmar * @param id .- Objecto identificador del objeto descrito * @param mimeType .- Tipo MIME del objeto descrito * @param encoding .- Codificación en la firma del objeto descrito */ public ObjectToSign(AbstractObjectToSign objectToSign, String desc, ObjectIdentifier id, String mimeType, URI encoding) { this.objectToSign = objectToSign; this.description = desc; this.objectIdentifier = id; this.extraData = new ExtraObjectData(mimeType, encoding); } public void setObjectToSign(AbstractObjectToSign objectToSign) { this.objectToSign = objectToSign; } public AbstractObjectToSign getObjectToSign() { return this.objectToSign; } public String getDescription() { return description; } public void setDescription(String descripcion) { this.description = descripcion; } public ObjectIdentifier getObjectIdentifier() { return objectIdentifier; } public void setObjectIdentifier(ObjectIdentifier identificador) { this.objectIdentifier = identificador; } public String getMimeType() { return extraData.getMimeType(); } public URI getEncoding() { return extraData.getEncoding(); } public String getId() { return id; } public void setId(String id) { this.id = id; } }
[ "13552393+guszylk@users.noreply.github.com" ]
13552393+guszylk@users.noreply.github.com
b45b990c2c18f5912997416d82ba706c2098477b
490e2dfba14f8ee1fef5f6f9f87b29bd1cf947c8
/aliyun-java-sdk-rds/src/main/java/com/aliyuncs/rds/model/v20140815/DescribeSQLDiagnosisListResponse.java
69cb578bb5218ae66d6d56cf2aabd618f1620b9c
[ "Apache-2.0" ]
permissive
qiuxiaolan/aliyun-openapi-java-sdk
256af327f2109bb81112c5bf65ef6512a783f541
06b689398fcc04f59f2ace574b029d8b309db8a4
refs/heads/master
2021-07-01T18:53:44.077695
2017-09-22T15:35:30
2017-09-22T15:35:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,597
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 com.aliyuncs.rds.model.v20140815; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.rds.transform.v20140815.DescribeSQLDiagnosisListResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DescribeSQLDiagnosisListResponse extends AcsResponse { private String requestId; private List<SQLDiag> sQLDiagList; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public List<SQLDiag> getSQLDiagList() { return this.sQLDiagList; } public void setSQLDiagList(List<SQLDiag> sQLDiagList) { this.sQLDiagList = sQLDiagList; } public static class SQLDiag { private String sQLDiagId; private String startTime; private String endTime; private Integer status; private Integer progress; public String getSQLDiagId() { return this.sQLDiagId; } public void setSQLDiagId(String sQLDiagId) { this.sQLDiagId = sQLDiagId; } public String getStartTime() { return this.startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return this.endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public Integer getStatus() { return this.status; } public void setStatus(Integer status) { this.status = status; } public Integer getProgress() { return this.progress; } public void setProgress(Integer progress) { this.progress = progress; } } @Override public DescribeSQLDiagnosisListResponse getInstance(UnmarshallerContext context) { return DescribeSQLDiagnosisListResponseUnmarshaller.unmarshall(this, context); } }
[ "ling.wu@alibaba-inc.com" ]
ling.wu@alibaba-inc.com
72cdcd688d5b1eb9b94966711ce9a3536093c81a
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/kylin/learning/4993/ContentReader.java
0a372ac2d0d126a71d1245f758d14cdb5ac34bb4
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
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.kylin.common.persistence; import java.io.DataInputStream; import java.io.IOException; import org.apache.commons.io.IOUtils; public class ContentReader<T extends RootPersistentEntity> { final private Serializer<T> serializer; public ContentReader(Serializer<T> serializer) { this.serializer = serializer; } public T readContent(RawResource res) throws IOException { if (res == null) return null; DataInputStream din = new DataInputStream(res.content()); try { T r = serializer.deserialize(din); if (r != null) { r.setLastModified(res.lastModified()); } return r; } finally { IOUtils.closeQuietly(din); IOUtils.closeQuietly(res.content()); } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
5deaee12e5a296a7fbfc698663d8830ba27819f7
e77a541a6e5d48f830d48a7338ff4aceef8d15f6
/core/src/main/java/org/kuali/kra/service/impl/NotificationModuleRoleServiceImpl.java
ddca6628f618c92cb478bc6987e9f962ac4a73e9
[]
no_license
r351574nc3/kc-release
a9c4f78b922005ecbfbc9aba36366e0c90f72857
d5b9ad58e906dbafa553de777207ef5cd4addc54
refs/heads/master
2021-01-02T15:33:46.583309
2012-03-17T05:38:02
2012-03-17T05:38:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,283
java
/* * Copyright 2005-2010 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php * * 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.kuali.kra.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.collections.CollectionUtils; import org.kuali.kra.common.notification.bo.NotificationModuleRole; import org.kuali.kra.service.NotificationModuleRoleService; import org.kuali.rice.kns.service.BusinessObjectService; public class NotificationModuleRoleServiceImpl implements NotificationModuleRoleService { private BusinessObjectService businessObjectService; @Override public List<NotificationModuleRole> getModuleRolesByModuleName(String moduleName) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put("moduleCode", moduleName); List<NotificationModuleRole> moduleRoles = (List<NotificationModuleRole>)getBusinessObjectService().findMatching(NotificationModuleRole.class, fieldValues); return moduleRoles; } @Override public String getModuleRolesForAjaxCall(String moduleName) { String resultStr = ""; List<NotificationModuleRole> moduleRoles = getModuleRolesByModuleName(moduleName); if (CollectionUtils.isNotEmpty(moduleRoles)) { for (NotificationModuleRole moduleRole : moduleRoles) { resultStr += moduleRole.getRoleName() + ","; } } return resultStr; } public BusinessObjectService getBusinessObjectService() { return businessObjectService; } public void setBusinessObjectService(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; } }
[ "r351574nc3@gmail.com" ]
r351574nc3@gmail.com
bfba5cad128dc9e8c8760035c3dbd6e29312e0eb
21bf8f27dc5d1e3d70c9346528b66e529cae2270
/src/main/java/com/example/testexample/TestExampleApplication.java
1bfdb303ffd15088397a63ef81681ee93b726db1
[]
no_license
IVZ2020/Test_PST_Labs
2229f9e92075c76cd4960ed5a1431ffd1aa96208
9ce2c851b7b2a66fcdc6691397e493ba64014583
refs/heads/master
2023-08-01T10:56:08.644195
2021-09-17T11:32:21
2021-09-17T11:32:21
407,511,553
0
0
null
null
null
null
UTF-8
Java
false
false
802
java
package com.example.testexample; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan(basePackages = { "com.example.testexample.configuration"} ) public class TestExampleApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { return builder.sources(TestExampleApplication.class); } public static void main(String[] args) { SpringApplication.run(TestExampleApplication.class, args); } }
[ "you@example.com" ]
you@example.com
52acb9dd41a0ac1dad5bdbe36e51a637b14a355d
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/form/ExcuteListByApp.java
5a6eee63240d7ae0a7605fa1c4e1ab593dfd4b1c
[ "BSD-3-Clause" ]
permissive
fancylou/o2oa
713529a9d383de5d322d1b99073453dac79a9353
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
refs/heads/master
2020-03-25T00:07:41.775230
2018-08-02T01:40:40
2018-08-02T01:40:40
143,169,936
0
0
BSD-3-Clause
2018-08-01T14:49:45
2018-08-01T14:49:44
null
UTF-8
Java
false
false
2,207
java
package com.x.cms.assemble.control.jaxrs.form; import java.util.List; import javax.servlet.http.HttpServletRequest; import com.x.base.core.cache.ApplicationCache; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.http.ActionResult; import com.x.base.core.http.EffectivePerson; import com.x.base.core.utils.SortTools; import com.x.cms.assemble.control.Business; import com.x.cms.assemble.control.WrapTools; import com.x.cms.assemble.control.factory.FormFactory; import com.x.cms.core.entity.element.Form; import net.sf.ehcache.Element; public class ExcuteListByApp extends ExcuteBase { @SuppressWarnings("unchecked") protected ActionResult<List<WrapOutSimpleForm>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String appId ) throws Exception { ActionResult<List<WrapOutSimpleForm>> result = new ActionResult<>(); List<WrapOutSimpleForm> wraps = null; String cacheKey = ApplicationCache.concreteCacheKey( "appId", appId ); Element element = cache.get(cacheKey); if ((null != element) && ( null != element.getObjectValue()) ) { wraps = (List<WrapOutSimpleForm>) element.getObjectValue(); result.setData(wraps); } else { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); if (!business.formEditAvailable( request, effectivePerson )) { throw new Exception("person{name:" + effectivePerson.getName() + "} 用户没有查询全部表单模板的权限!"); } FormFactory formFactory = business.getFormFactory(); List<String> ids = formFactory.listByAppId(appId);// 获取指定应用的所有表单模板列表 List<Form> formList = formFactory.list(ids); wraps = WrapTools.formsimple_wrapout_copier.copy(formList);// 将所有查询出来的有状态的对象转换为可以输出的过滤过属性的对象 SortTools.desc( wraps, "createTime" ); cache.put(new Element( cacheKey, wraps )); result.setData(wraps); } catch (Throwable th) { th.printStackTrace(); result.error(th); } } return result; } }
[ "caixiangyi2004@126.com" ]
caixiangyi2004@126.com
37be60cb66da043700ce60f009dd4767e50fd8b3
0f5b8ccd8275b2d5dfa947fe6688862706997fc4
/runescape-client/src/main/java/osrs/class388.java
2f0b60f878e775679864e7af028b3e2b571a802f
[]
no_license
Sundar-Gandu/MeteorLite
6a653c4bb0458562e47088e1d859d8eb7a171460
f415bf93af2a771f920f261690eec4c7ff1b62c2
refs/heads/main
2023-08-31T17:40:57.071420
2021-10-26T07:56:40
2021-10-26T07:56:40
400,632,896
0
1
null
null
null
null
UTF-8
Java
false
false
485
java
package osrs; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; @ObfuscatedName("nb") public interface class388 { @ObfuscatedName("l") @ObfuscatedSignature( descriptor = "(Ljava/lang/Object;Lot;I)V", garbageValue = "804166773" ) void vmethod6815(Object var1, Buffer var2); @ObfuscatedName("q") @ObfuscatedSignature( descriptor = "(Lot;I)Ljava/lang/Object;", garbageValue = "1421946597" ) Object vmethod6822(Buffer var1); }
[ "therealnull@gmail.com" ]
therealnull@gmail.com
b069845457451eab87601b5cb99b9d2bcea5655a
87ca1b89a4c892a42c7b9f3a61fbed6e54c48362
/one-java-agent-plugin/src/main/java/com/alibaba/oneagent/service/ComponentManager.java
9ca5b0bccce9686fefc603d687360f6953a8f5e1
[ "Apache-2.0" ]
permissive
shensi199312/one-java-agent
ab77c95720de71ef7d40eeb2e1bcdd0a54fe88a7
cdfaa5f70b2192fdda129e5b364f99d85de57ef6
refs/heads/master
2023-03-07T07:16:48.628524
2021-02-20T09:39:01
2021-02-20T09:39:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package com.alibaba.oneagent.service; /** * * @author hengyunabc 2020-12-17 * */ public interface ComponentManager { public <T> T getComponent(Class<T> clazz); public void initComponents(); public void startComponents(); public void stopComponents(); }
[ "hengyunabc@gmail.com" ]
hengyunabc@gmail.com
e5f0ace12ebc47ea91f8eedb436d6fea28f00196
73364c57427e07e90d66692a3664281d5113177e
/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/EmailController.java
ce59a592ccab1d8651215cb6367f5d2b718cb9d0
[ "BSD-3-Clause" ]
permissive
abyot/sun-pmt
4681f008804c8a7fc7a75fe5124f9b90df24d44d
40add275f06134b04c363027de6af793c692c0a1
refs/heads/master
2022-12-28T09:54:11.381274
2019-06-10T15:47:21
2019-06-10T15:47:21
55,851,437
0
1
BSD-3-Clause
2022-12-16T12:05:12
2016-04-09T15:21:22
Java
UTF-8
Java
false
false
6,222
java
package org.hisp.dhis.webapi.controller; /* * Copyright (c) 2004-2017, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 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. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 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. */ import org.hisp.dhis.dxf2.webmessage.WebMessageException; import org.hisp.dhis.dxf2.webmessage.WebMessageUtils; import org.hisp.dhis.email.Email; import org.hisp.dhis.email.EmailService; import org.hisp.dhis.setting.SystemSettingManager; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.webapi.mvc.annotation.ApiVersion; import org.hisp.dhis.common.DhisApiVersion; import org.hisp.dhis.webapi.service.WebMessageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Set; /** * @author Halvdan Hoem Grelland <halvdanhg@gmail.com> */ @Controller @RequestMapping( value = EmailController.RESOURCE_PATH ) @ApiVersion( { DhisApiVersion.DEFAULT, DhisApiVersion.ALL } ) public class EmailController { public static final String RESOURCE_PATH = "/email"; private static final String SMTP_ERROR = "SMTP server not configured"; private static final String EMAIL_DISABLED = "Email message notifications disabled"; //-------------------------------------------------------------------------- // Dependencies //-------------------------------------------------------------------------- @Autowired private EmailService emailService; @Autowired private CurrentUserService currentUserService; @Autowired private SystemSettingManager systemSettingManager; @Autowired private WebMessageService webMessageService; @RequestMapping( value = "/test", method = RequestMethod.POST ) public void sendTestEmail( HttpServletResponse response, HttpServletRequest request ) throws WebMessageException { checkEmailSettings(); String userEmail = currentUserService.getCurrentUser().getEmail(); boolean userEmailConfigured = userEmail != null && !userEmail.isEmpty(); if ( !userEmailConfigured ) { throw new WebMessageException( WebMessageUtils.conflict( "Could not send test email, no email configured for current user" ) ); } emailService.sendTestEmail(); webMessageService.send( WebMessageUtils.ok( "Test email was sent to " + userEmail ), response, request ); } @RequestMapping( value = "/notification", method = RequestMethod.POST ) public void sendSystemNotificationEmail( @RequestBody Email email, HttpServletResponse response, HttpServletRequest request ) throws WebMessageException { checkEmailSettings(); boolean systemNotificationEmailValid = systemSettingManager.systemNotificationEmailValid(); if ( !systemNotificationEmailValid ) { throw new WebMessageException( WebMessageUtils.conflict( "Could not send email, system notification email address not set or not valid" ) ); } emailService.sendSystemEmail( email ); webMessageService.send( WebMessageUtils.ok( "System notification email sent" ), response, request ); } @PreAuthorize( "hasRole('ALL') or hasRole('F_SEND_EMAIL')" ) @RequestMapping( value = "/notification", method = RequestMethod.POST, produces = "application/json" ) public void sendEmailNotification( @RequestParam Set<String> recipients, @RequestParam String message, @RequestParam ( defaultValue = "DHIS 2" ) String subject, HttpServletResponse response, HttpServletRequest request ) throws WebMessageException { checkEmailSettings(); emailService.sendEmail( subject, message, recipients ); webMessageService.send( WebMessageUtils.ok( "Email sent" ), response, request ); } // --------------------------------------------------------------------- // Supportive methods // --------------------------------------------------------------------- private void checkEmailSettings() throws WebMessageException { if ( !emailService.emailEnabled() ) { throw new WebMessageException( WebMessageUtils.error( EMAIL_DISABLED ) ); } if ( !emailService.emailConfigured() ) { throw new WebMessageException( WebMessageUtils.error( SMTP_ERROR ) ); } } }
[ "abyota@gmail.com" ]
abyota@gmail.com
0c3f356bb920ebd6f82bb5e78dbfa42bae8a9062
5e0ef2dcc9362096fe10e7b5c663ee07affedbd8
/src/main/java/com/iqmsoft/controller/entity/ExampleEntityViewConstants.java
61846b8d753dabde24d095e5e9a4538546dfc046
[]
no_license
Murugar2021/ThymeLeafMVC
425ffa03eb9f621926387bbdb1e3df0ee7bc54c5
7baf196b2832da8fe33eb14dc9ee8abec72e0be9
refs/heads/main
2023-05-23T07:39:08.462477
2021-06-15T14:22:01
2021-06-15T14:22:01
377,189,684
0
0
null
null
null
null
UTF-8
Java
false
false
1,969
java
/** * The MIT License (MIT) * <p> * Copyright (c) 2017 the original author or authors. * <p> * 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: * <p> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p> * 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 com.iqmsoft.controller.entity; /** * Constants for the example entity view controllers. * * @author Bernardo Mart&iacute;nez Garrido */ public final class ExampleEntityViewConstants { /** * Form bean parameter name. */ public static final String BEAN_FORM = "form"; /** * Entities parameter name. */ public static final String PARAM_ENTITIES = "entities"; /** * Name for the entity form. */ public static final String VIEW_ENTITY_FORM = "entity/form"; /** * Name for the entities view. */ public static final String VIEW_ENTITY_LIST = "entity/list"; /** * Private constructor to avoid initialization. */ private ExampleEntityViewConstants() { super(); } }
[ "davanon2014@gmail.com" ]
davanon2014@gmail.com
4b54ffa57ffbc460a21f8b0e577b52ab7894ef45
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/android/j/jo.java
97e1a7bde500979edfda6cc8ece85a1c7a599cb5
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,072
java
package com.instagram.android.j; import android.widget.ListView; import android.widget.Toast; import com.facebook.z; import com.instagram.common.j.a.b; import com.instagram.ui.widget.refresh.RefreshableListView; final class jo extends com.instagram.common.j.a.a<com.instagram.android.feed.g.a.a> { jo(jq paramjq) {} public final void a() { jq.a(a, true); if (a.getListViewSafe() != null) { ((RefreshableListView)a.getListViewSafe()).setIsLoading(true); } } public final void a(b<com.instagram.android.feed.g.a.a> paramb) { if (a.isVisible()) { if (a.getListViewSafe() != null) { a.getListViewSafe().setVisibility(8); } Toast.makeText(a.getActivity(), z.could_not_refresh_feed, 0).show(); } } public final void b() { jq.a(a, false); if (a.getListViewSafe() != null) { ((RefreshableListView)a.getListViewSafe()).setIsLoading(false); } } } /* Location: * Qualified Name: com.instagram.android.j.jo * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
fc16773ba75d6b73fd529425490ce8ce97ada90a
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/gui/cadastro/sistemaparametro/InserirFeriadoAction.java
af32d0ce5ab06627a0ee7894c0e89a62a4a7a4b1
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
ISO-8859-2
Java
false
false
3,401
java
package gcom.gui.cadastro.sistemaparametro; import gcom.cadastro.geografico.Municipio; import gcom.cadastro.geografico.MunicipioFeriado; import gcom.cadastro.sistemaparametro.NacionalFeriado; import gcom.fachada.Fachada; import gcom.gui.ActionServletException; import gcom.gui.GcomAction; import gcom.seguranca.acesso.usuario.Usuario; import gcom.util.filtro.ParametroSimples; import gcom.util.tabelaauxiliar.abreviada.FiltroTabelaAuxiliarAbreviada; import java.util.Collection; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * [UC0534] INSERIR FERIADO * * @author Kássia Albuquerque * @date 12/01/2007 */ public class InserirFeriadoAction extends GcomAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { ActionForward retorno = actionMapping.findForward("telaSucesso"); InserirFeriadoActionForm inserirFeriadoActionForm = (InserirFeriadoActionForm) actionForm; HttpSession sessao = httpServletRequest.getSession(false); Fachada fachada = Fachada.getInstancia(); String municipio = inserirFeriadoActionForm.getIdMunicipio(); Usuario usuarioLogado = (Usuario)sessao.getAttribute(Usuario.USUARIO_LOGADO); if (municipio != null && !municipio.trim().equals("")) { FiltroTabelaAuxiliarAbreviada filtroMunicipio = new FiltroTabelaAuxiliarAbreviada(); filtroMunicipio.adicionarParametro(new ParametroSimples(FiltroTabelaAuxiliarAbreviada.ID, municipio)); Collection colecaoMunicipio = fachada.pesquisar(filtroMunicipio, Municipio.class.getName()); if (colecaoMunicipio == null || colecaoMunicipio.isEmpty()) { inserirFeriadoActionForm.setIdMunicipio(""); throw new ActionServletException("atencao.municipio_inexistente"); } } MunicipioFeriado municipioFeriado = null; NacionalFeriado nacionalFeriado = null; String nomeFeriado = null; String tipoFeriado = null; if (municipio != null && !municipio.trim().equals("")) { municipioFeriado = new MunicipioFeriado(); inserirFeriadoActionForm.setFormValuesMunicipal( municipioFeriado); nomeFeriado= "Municipal"; tipoFeriado= "2"; } else { nacionalFeriado = new NacionalFeriado(); inserirFeriadoActionForm.setFormValuesNacional( nacionalFeriado); nomeFeriado = "Nacional"; tipoFeriado= "1"; } //Inserir na base de dados Feriado Integer idFeriado = fachada.inserirFeriado(nacionalFeriado, municipioFeriado,usuarioLogado); sessao.setAttribute("caminhoRetornoVoltar", "/gsan/exibirFiltrarFeriadoAction.do"); //Monta a página de sucesso montarPaginaSucesso(httpServletRequest, "Feriado "+ nomeFeriado + " de código " + idFeriado +" inserido com sucesso.", "Inserir outro Feriado","exibirInserirFeriadoAction.do?menu=sim", "exibirAtualizarFeriadoAction.do?tipoFeriado="+tipoFeriado+"&idRegistroInseridoAtualizar="+ idFeriado,"Atualizar Feriado Inserido"); sessao.removeAttribute("InserirFeriadoActionForm"); return retorno; } }
[ "piagodinho@gmail.com" ]
piagodinho@gmail.com
5da4d54a09788e75ab9dfa116f6f6a04cc3f9ed1
93a82eebc89db6e905bb52505870be1cc689566d
/viewdemo/baseutils/src/androidTest/java/com/zero/baseutils/ExampleInstrumentedTest.java
f5bd68d74e664a2c84688672630a3a55e68bfd84
[]
no_license
zcwfeng/zcw_android_demo
78cdc86633f01babfe99972b9fde52a633f65af9
f990038fd3643478dbf4f65c03a70cd2f076f3a0
refs/heads/master
2022-07-27T05:32:09.421349
2022-03-14T02:56:41
2022-03-14T02:56:41
202,998,648
15
8
null
null
null
null
UTF-8
Java
false
false
784
java
package com.zero.baseutils; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.zero.baseutils.test", appContext.getPackageName()); } }
[ "zcwfeng@126.com" ]
zcwfeng@126.com
acb235e8e3ef885c372f1bba61143a7132f2a945
d523206fce46708a6fe7b2fa90e81377ab7b6024
/com/google/android/gms/internal/zzfl.java
967f29129eb5e25aa1a4e4bec07d44239e229fb5
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
3,616
java
package com.google.android.gms.internal; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.provider.CalendarContract.Events; import android.text.TextUtils; import com.google.android.gms.R.string; import com.google.android.gms.ads.internal.zzp; import java.util.Map; @zzha public class zzfl extends zzfr { private final Context mContext; private String zzBU; private long zzBV; private long zzBW; private String zzBX; private String zzBY; private final Map<String, String> zzxc; public zzfl(zzjn paramzzjn, Map<String, String> paramMap) { super(paramzzjn, "createCalendarEvent"); this.zzxc = paramMap; this.mContext = paramzzjn.zzhx(); zzez(); } private String zzai(String paramString) { if (TextUtils.isEmpty((CharSequence)this.zzxc.get(paramString))) { return ""; } return (String)this.zzxc.get(paramString); } private long zzaj(String paramString) { paramString = (String)this.zzxc.get(paramString); if (paramString == null) { return -1L; } try { long l = Long.parseLong(paramString); return l; } catch (NumberFormatException paramString) {} return -1L; } private void zzez() { this.zzBU = zzai("description"); this.zzBX = zzai("summary"); this.zzBV = zzaj("start_ticks"); this.zzBW = zzaj("end_ticks"); this.zzBY = zzai("location"); } Intent createIntent() { Intent localIntent = new Intent("android.intent.action.EDIT").setData(CalendarContract.Events.CONTENT_URI); localIntent.putExtra("title", this.zzBU); localIntent.putExtra("eventLocation", this.zzBY); localIntent.putExtra("description", this.zzBX); if (this.zzBV > -1L) { localIntent.putExtra("beginTime", this.zzBV); } if (this.zzBW > -1L) { localIntent.putExtra("endTime", this.zzBW); } localIntent.setFlags(268435456); return localIntent; } public void execute() { if (this.mContext == null) { zzal("Activity context is not available."); return; } if (!zzp.zzbx().zzN(this.mContext).zzdi()) { zzal("This feature is not available on the device."); return; } AlertDialog.Builder localBuilder = zzp.zzbx().zzM(this.mContext); localBuilder.setTitle(zzp.zzbA().zzf(R.string.create_calendar_title, "Create calendar event")); localBuilder.setMessage(zzp.zzbA().zzf(R.string.create_calendar_message, "Allow Ad to create a calendar event?")); localBuilder.setPositiveButton(zzp.zzbA().zzf(R.string.accept, "Accept"), new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramAnonymousDialogInterface = zzfl.this.createIntent(); zzp.zzbx().zzb(zzfl.zza(zzfl.this), paramAnonymousDialogInterface); } }); localBuilder.setNegativeButton(zzp.zzbA().zzf(R.string.decline, "Decline"), new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { zzfl.this.zzal("Operation denied by user."); } }); localBuilder.create().show(); } } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/internal/zzfl.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
9083032b13b878275ea18faac9b0c1779819cd86
47f8505fc7be7c9db8c12c0b29c08d7f0fb918d4
/src/main/java/com/gyoomi/ConvertSortedListtoBinarySearchTree/Solution.java
69d86903dfb777f490b619fcc66811fcdc17e545
[]
no_license
gyoomi/leetcode
83384c9344bd24cb34cfd4772b24457e407714c8
b2f19bafe5e3bb897fa7a56aaaf6a94976e762ff
refs/heads/master
2020-05-24T10:53:54.393113
2019-12-20T10:27:15
2019-12-20T10:27:15
187,236,700
0
1
null
null
null
null
UTF-8
Java
false
false
1,221
java
/** * Copyright © 2019, Glodon Digital Supplier BU. * <p> * All Rights Reserved. */ package com.gyoomi.ConvertSortedListtoBinarySearchTree; import java.util.ArrayList; import java.util.List; /** * The description of class * * @author Leon * @date 2019-10-17 9:09 */ public class Solution { public TreeNode sortedListToBST(ListNode head) { ArrayList<Integer> list = new ArrayList<>(); while (head != null) { list.add(head.val); head = head.next; } return convertListToTree(list, 0, list.size()); } private TreeNode convertListToTree(List<Integer> list, int l, int r) { if (l >= r) { return null; } int mid = (l + r) / 2; TreeNode root = new TreeNode(list.get(mid)); root.left = convertListToTree(list, l, mid); root.right = convertListToTree(list, mid + 1, r); return root; } public class ListNode { int val; ListNode next; ListNode(int x) { val = x; } } public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } }
[ "gyoomi0709@foxmail.com" ]
gyoomi0709@foxmail.com
2550de62ed298162dc8bff9ef4cc78acd20234d7
eef372565ca7a8ed8a9a0faeb79338a4edc8f094
/PTN_Client(2015)/src/com/nms/ui/ptn/business/dialog/cespath/modal/CesPortInfo.java
3be0e6055a533820efe057c5322efece6b874ecc
[]
no_license
ptn2017/ptn2017
f42db27fc54c1fe5938407467b395e6b0a8721f7
7090e2c64b2ea7f38e530d58247dfba4b2906b9a
refs/heads/master
2021-09-04T08:12:08.639049
2018-01-17T07:24:44
2018-01-17T07:24:44
112,810,000
0
0
null
null
null
null
UTF-8
Java
false
false
1,815
java
package com.nms.ui.ptn.business.dialog.cespath.modal; import com.nms.db.bean.equipment.port.PortInst; import com.nms.db.bean.equipment.port.PortStmTimeslot; import com.nms.ui.frame.ViewDataObj; import com.nms.ui.manager.ExceptionManage; import com.nms.ui.manager.UiUtil; public class CesPortInfo extends ViewDataObj{ /** * */ private static final long serialVersionUID = -5538055075904852789L; private PortInst e1PortInst; private PortStmTimeslot portStmTimeSlot; public PortInst getE1PortInst() { return e1PortInst; } public void setE1PortInst(PortInst e1PortInst) { this.e1PortInst = e1PortInst; } public PortStmTimeslot getPortStmTimeSlot() { return portStmTimeSlot; } public void setPortStmTimeSlot(PortStmTimeslot portStmTimeSlot) { this.portStmTimeSlot = portStmTimeSlot; } @SuppressWarnings("unchecked") @Override public void putObjectProperty() { try { if(this.e1PortInst != null ) { this.getClientProperties().put("id", this.e1PortInst); this.getClientProperties().put("name", this.e1PortInst.getPortName()); // this.getClientProperties().put("ces_sendjtwo", "-"); // this.getClientProperties().put("ces_sendvfive", "-"); } if(this.portStmTimeSlot != null) { this.getClientProperties().put("id", this.portStmTimeSlot); this.getClientProperties().put("name", this.portStmTimeSlot.getTimeslotnumber()); this.getClientProperties().put("ces_sendjtwo", this.portStmTimeSlot.getSendjtwo() ); if(null!= this.portStmTimeSlot.getSendvfive() && !"0".equals(this.portStmTimeSlot.getSendvfive())){ getClientProperties().put("ces_sendvfive", UiUtil.getCodeById(Integer.parseInt(this.portStmTimeSlot.getSendvfive())).getCodeName()); } } } catch (Exception e) { ExceptionManage.dispose(e,this.getClass()); } } }
[ "a18759149@qq.com" ]
a18759149@qq.com
db5975d29dcb832a049a821911e2cfb1cb16de37
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava7/Foo167.java
e9dccca0641c788471682ad515d5aaf4a3e6051d
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package applicationModulepackageJava7; public class Foo167 { public void foo0() { new applicationModulepackageJava7.Foo166().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
0ca06965cdb7603a8a0e3e0200df9bcdb7358d7b
7c76db8235ca9aeff01ec0431aa3c9f733756cb0
/src/main/java/singleton/ThreadSafeDoubleLockingSingleton.java
a5784fe8c94a72391c5d98aa1598005191f297a9
[]
no_license
jezhische/TrainingTasks
f98e94617b8c280ae3f715d66b350e37265d1aa8
03c1241bf76878248d24aef796006439b91f7dfd
refs/heads/master
2020-05-21T19:52:09.674832
2017-08-22T01:56:23
2017-08-22T01:56:23
62,608,297
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package singleton; /** * Created by Ежище on 23.11.2016. * http://info.javarush.ru/translation/2013/09/14/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F-Singleton-%D0%BE%D0%B4%D0%B8%D0%BD%D0%BE%D1%87%D0%BA%D0%B0-%D0%BD%D0%B0%D0%B8%D0%B1%D0%BE%D0%BB%D0%B5%D0%B5-%D1%80%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8-%D0%B2-%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D0%B0%D1%85-.html * Дополнительная проверка для гарантии, что будет создан только один экземпляр класса Singleton. */ public class ThreadSafeDoubleLockingSingleton { private static ThreadSafeDoubleLockingSingleton instance; private ThreadSafeDoubleLockingSingleton(){} public static synchronized ThreadSafeDoubleLockingSingleton getInstanceUsingDoubleLocking(){ if(instance == null){ synchronized (ThreadSafeSingleton.class) { if(instance == null){ instance = new ThreadSafeDoubleLockingSingleton(); } } } return instance; } }
[ "jezhische@gmail.com" ]
jezhische@gmail.com
783f5bbd34a76cacb98aa7dbb30b042e3eda2228
51aef8e206201568d04fb919bf54a3009c039dcf
/trunk/src/com/jme/util/export/binary/modules/BinaryFragmentProgramStateModule.java
e9ea4084d206323b2c057a0081b3bc228a76dd5d
[]
no_license
lihak/fairytale-soulfire-svn-to-git
0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81
a85eb3fc6f4edf30fef9201902fcdc108da248e4
refs/heads/master
2021-02-11T15:25:47.199953
2015-12-28T14:48:14
2015-12-28T14:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
/* * Copyright (c) 2003-2008 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the name of 'jMonkeyEngine' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * 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 com.jme.util.export.binary.modules; import com.jme.scene.state.FragmentProgramState; import com.jme.system.DisplaySystem; import com.jme.util.export.InputCapsule; import com.jme.util.export.Savable; import com.jme.util.export.binary.BinaryLoaderModule; public class BinaryFragmentProgramStateModule implements BinaryLoaderModule { public String getKey() { return FragmentProgramState.class.getName(); } public Savable load(InputCapsule inputCapsule) { return DisplaySystem.getDisplaySystem().getRenderer().createFragmentProgramState(); } }
[ "you@example.com" ]
you@example.com
e097e33b004cbe9d521a466f00f4eda2a2a77e2c
ab8a34e5b821dde7b09abe37c838de046846484e
/twilio/sample-code-master/preview/acc_security/service/update-default/update-default.7.x.java
cd18fd747f19b6cfcf5a8d2137372bae552425b3
[]
no_license
sekharfly/twilio
492b599fff62618437c87e05a6c201d6de94527a
a2847e4c79f9fbf5c53f25c8224deb11048fe94b
refs/heads/master
2020-03-29T08:39:00.079997
2018-09-21T07:20:24
2018-09-21T07:20:24
149,721,431
0
1
null
null
null
null
UTF-8
Java
false
false
645
java
// Install the Java helper library from twilio.com/docs/java/install import com.twilio.Twilio; import com.twilio.rest.preview.accSecurity.Service; public class Example { // Find your Account Sid and Token at twilio.com/console public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; public static final String AUTH_TOKEN = "your_auth_token"; public static void main(String[] args) { Twilio.init(ACCOUNT_SID, AUTH_TOKEN); Service service = Service.updater("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .setName("name").update(); System.out.println(service.getName()); } }
[ "sekharfly@gmail.com" ]
sekharfly@gmail.com
cfb1776ebe30e460cac07122a479fa02d72e50b7
ab2c087f4536eadde15017c06391a2bd89a7a9ff
/dev-beginner-group-admin/src/main/java/com/jojoldu/beginner/admin/sns/Sns.java
ebfb93a738e0cc694f54cd374f282cf12781d1ca
[]
no_license
munifico/dev-beginner-group
3558e5f293657e2fcf9a222b66fac53277ce3659
f7467a31a83310d11f55c9e2415b7cf349eb429d
refs/heads/master
2023-03-17T22:13:09.324749
2018-10-27T08:48:43
2018-10-27T08:48:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package com.jojoldu.beginner.admin.sns; import lombok.AllArgsConstructor; import lombok.Getter; /** * Created by jojoldu@gmail.com on 17/06/2018 * Blog : http://jojoldu.tistory.com * Github : https://github.com/jojoldu */ @Getter @AllArgsConstructor public enum Sns { TELEGRAM("Telegram", "telegram"), FACEBOOK("Facebook", "facebook"), BLOG("Blog", "blog"); private String prefix; private String tag; public String createTitle(String title){ return "["+prefix+"] "+title; } public String createUrl(String url){ return url+"/#ref="+tag; } }
[ "jojoldu@gmail.com" ]
jojoldu@gmail.com
f45bccdbf911bb177ef689c5e037866acbb32af7
f7295dfe3c303e1d656e7dd97c67e49f52685564
/smali/org/apache/http/impl/cookie/RFC2109Spec.java
4220c4408a86851b27f2edf83fcc1c2d0c8986f9
[]
no_license
Eason-Chen0452/XiaoMiGame
36a5df0cab79afc83120dab307c3014e31f36b93
ba05d72a0a0c7096d35d57d3b396f8b5d15729ef
refs/heads/master
2022-04-14T11:08:31.280151
2020-04-14T08:57:25
2020-04-14T08:57:25
255,541,211
0
1
null
null
null
null
UTF-8
Java
false
false
1,693
java
package org.apache.http.impl.cookie; import java.util.List; import org.apache.http.Header; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.MalformedCookieException; import org.apache.http.util.CharArrayBuffer; @Deprecated public class RFC2109Spec extends CookieSpecBase { public RFC2109Spec() { throw new RuntimeException("Stub!"); } public RFC2109Spec(String[] paramArrayOfString, boolean paramBoolean) { throw new RuntimeException("Stub!"); } protected void formatCookieAsVer(CharArrayBuffer paramCharArrayBuffer, Cookie paramCookie, int paramInt) { throw new RuntimeException("Stub!"); } public List<Header> formatCookies(List<Cookie> paramList) { throw new RuntimeException("Stub!"); } protected void formatParamAsVer(CharArrayBuffer paramCharArrayBuffer, String paramString1, String paramString2, int paramInt) { throw new RuntimeException("Stub!"); } public int getVersion() { throw new RuntimeException("Stub!"); } public Header getVersionHeader() { throw new RuntimeException("Stub!"); } public List<Cookie> parse(Header paramHeader, CookieOrigin paramCookieOrigin) throws MalformedCookieException { throw new RuntimeException("Stub!"); } public void validate(Cookie paramCookie, CookieOrigin paramCookieOrigin) throws MalformedCookieException { throw new RuntimeException("Stub!"); } } /* Location: C:\Users\Administrator\Desktop\apk\dex2jar\classes-dex2jar.jar!\org\apache\http\impl\cookie\RFC2109Spec.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "chen_guiq@163.com" ]
chen_guiq@163.com
b30f27a7129510304281ecbd03435ec965169e30
502ea93de54a1be3ef42edb0412a2bf4bc9ddbef
/sources/com/google/ads/mediation/C2784e.java
421f0350ad0c77fd98f6bc428f9f3dc3d6e42192
[]
no_license
dovanduy/MegaBoicotApk
c0852af0773be1b272ec907113e8f088addb0f0c
56890cb9f7afac196bd1fec2d1326f2cddda37a3
refs/heads/master
2020-07-02T04:28:02.199907
2019-08-08T20:44:49
2019-08-08T20:44:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,033
java
package com.google.ads.mediation; import com.google.android.gms.internal.ads.C3987mk; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @Deprecated /* renamed from: com.google.ads.mediation.e */ public class C2784e { /* renamed from: com.google.ads.mediation.e$a */ public static final class C2785a extends Exception { public C2785a(String str) { super(str); } } @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) /* renamed from: com.google.ads.mediation.e$b */ public @interface C2786b { /* renamed from: a */ String mo9669a(); /* renamed from: b */ boolean mo9670b() default true; } /* renamed from: a */ public void mo9668a(Map<String, String> map) throws C2785a { Field[] fields; StringBuilder sb; String str; HashMap hashMap = new HashMap(); for (Field field : getClass().getFields()) { C2786b bVar = (C2786b) field.getAnnotation(C2786b.class); if (bVar != null) { hashMap.put(bVar.mo9669a(), field); } } if (hashMap.isEmpty()) { C3987mk.m17435e("No server options fields detected. To suppress this message either add a field with the @Parameter annotation, or override the load() method."); } for (Entry entry : map.entrySet()) { Field field2 = (Field) hashMap.remove(entry.getKey()); if (field2 != null) { try { field2.set(this, entry.getValue()); } catch (IllegalAccessException unused) { String str2 = (String) entry.getKey(); sb = new StringBuilder(49 + String.valueOf(str2).length()); sb.append("Server option \""); sb.append(str2); str = "\" could not be set: Illegal Access"; } catch (IllegalArgumentException unused2) { String str3 = (String) entry.getKey(); sb = new StringBuilder(43 + String.valueOf(str3).length()); sb.append("Server option \""); sb.append(str3); str = "\" could not be set: Bad Type"; } } else { String str4 = (String) entry.getKey(); String str5 = (String) entry.getValue(); StringBuilder sb2 = new StringBuilder(31 + String.valueOf(str4).length() + String.valueOf(str5).length()); sb2.append("Unexpected server option: "); sb2.append(str4); sb2.append(" = \""); sb2.append(str5); sb2.append("\""); C3987mk.m17429b(sb2.toString()); } } StringBuilder sb3 = new StringBuilder(); for (Field field3 : hashMap.values()) { if (((C2786b) field3.getAnnotation(C2786b.class)).mo9670b()) { String str6 = "Required server option missing: "; String valueOf = String.valueOf(((C2786b) field3.getAnnotation(C2786b.class)).mo9669a()); C3987mk.m17435e(valueOf.length() != 0 ? str6.concat(valueOf) : new String(str6)); if (sb3.length() > 0) { sb3.append(", "); } sb3.append(((C2786b) field3.getAnnotation(C2786b.class)).mo9669a()); } } if (sb3.length() > 0) { String str7 = "Required server option(s) missing: "; String valueOf2 = String.valueOf(sb3.toString()); throw new C2785a(valueOf2.length() != 0 ? str7.concat(valueOf2) : new String(str7)); } return; sb.append(str); C3987mk.m17435e(sb.toString()); } }
[ "pablo.valle.b@gmail.com" ]
pablo.valle.b@gmail.com
51cbd2b2620d1d4ddfcf365069812a0ed1c09829
d72f01aff3c6a91f11162fe9e178d271f36c0bc8
/app/src/main/java/client/ui/display/Trip/schedule_trip/p20210410/FindPassengerForm.java
3f68530247d14077e7fbe8f5634187366f40e472
[]
no_license
herbuy/rideshare-android
dafef4a1dccfb9bd7aabd8b6448e5166453814f2
a86be71b02efb964c6f64311454506c12a7e7952
refs/heads/master
2023-04-13T05:47:56.542684
2021-04-28T10:59:44
2021-04-28T10:59:44
362,433,647
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
package client.ui.display.Trip.schedule_trip.p20210410; import android.content.Context; import android.view.ViewGroup; import client.ui.display.Trip.schedule_trip.p20210410.microinteractions.change_car_info.ChangeCarInfoTrigger; import client.ui.display.Trip.schedule_trip.p20210410.microinteractions.change_fuel_contribution.ChangeFuelContributionTrigger; import client.ui.display.Trip.schedule_trip.p20210410.microinteractions.change_seat_count.ChangeSeatCountTrigger; import client.ui.display.Trip.schedule_trip.steps.SetDestinationInfo; import core.businessmessages.toServer.ParamsForScheduleTrip; public class FindPassengerForm extends FindTravelMateForm { public FindPassengerForm(Context context) { super(context); } @Override protected void addMoreTriggers(ViewGroup viewGroup) { viewGroup.addView(new ChangeCarInfoTrigger(context).getView()); //viewGroup.addView(new ChangeCarModelTrigger(context).getView()); //viewGroup.addView(new ChangeCarRegNumTrigger(context).getView()); viewGroup.addView(new ChangeSeatCountTrigger(context, "Seats available").getView()); viewGroup.addView(new ChangeFuelContributionTrigger(context).getView()); } }
[ "herbuy@gmail.com" ]
herbuy@gmail.com
db403f529699873119a509c0d811d53d3509d9f8
4c8d7b570e63c20ccfc7f9138937c253a97a305c
/src/main/java/com/sudoplay/mc/kor/core/registry/service/injection/strategy/parameter/ConfigurationParameterStrategy.java
b5ad43e720cfb3268ded5b961989c87c9430acba
[ "Apache-2.0" ]
permissive
codetaylor/kor-lib
9f807bfff6e9550b9cc095e2edbb92ccc0dcff46
6b1cd9a9653263d38b2557cbac3da6ebc3919d80
refs/heads/master
2020-12-24T11:33:05.153851
2017-11-01T18:47:23
2017-11-01T18:47:23
73,030,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,736
java
package com.sudoplay.mc.kor.core.registry.service.injection.strategy.parameter; import com.sudoplay.mc.kor.core.config.text.IConfigurationService; import com.sudoplay.mc.kor.spi.registry.injection.KorTextConfig; import net.minecraftforge.common.config.Configuration; import java.io.File; import java.lang.reflect.Parameter; /** * Created by codetaylor on 11/5/2016. */ public class ConfigurationParameterStrategy implements IParameterStrategy<Configuration> { private IConfigurationService service; public ConfigurationParameterStrategy( IConfigurationService service ) { this.service = service; } @Override public boolean isValidParameter(Parameter parameter) { KorTextConfig annotation = parameter.getAnnotation(KorTextConfig.class); boolean hasCorrectAnnotation = annotation != null; boolean isCorrectType = Configuration.class.isAssignableFrom(parameter.getType()); return hasCorrectAnnotation && isCorrectType; } @Override public Configuration getParameterInstance(Parameter parameter) { KorTextConfig annotation = parameter.getAnnotation(KorTextConfig.class); String file = annotation.file(); String path = annotation.path(); String filename = (path.length() > 0) ? new File(path, file).getPath() : new File(file).getPath(); Configuration configuration = this.service.get(filename); if (configuration == null) { // config wasn't loaded throw new IllegalStateException(String.format( "Unable to inject configuration file [%s] because it hasn't been loaded, " + "make sure it is loaded during the module's OnLoadConfigurationsEvent event.", filename )); } return configuration; } }
[ "jason@codetaylor.com" ]
jason@codetaylor.com
292eefb3c26c07b509a8475258f38eaebafca887
a4f182c714397b2097f20498497c9539fa5a527f
/app/src/main/java/com/lzyyd/hsq/qrcode/camera/AutoFocusManager.java
99a9250b5ce12e658e6c59ac5c10729156232937
[]
no_license
lilinkun/lzy
de36d9804603c293ffcb62c64c50afea88679192
80a646a16cf605795940449108fd848c0b0ecd17
refs/heads/master
2023-02-19T06:15:51.089562
2021-01-13T08:52:30
2021-01-13T08:52:30
288,416,310
0
0
null
null
null
null
UTF-8
Java
false
false
4,251
java
/* * Copyright (C) 2012 ZXing authors * * 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.lzyyd.hsq.qrcode.camera; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.hardware.Camera; import android.os.AsyncTask; import android.preference.PreferenceManager; import android.util.Log; import com.lzyyd.hsq.qrcode.android.PreferencesActivity; import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.RejectedExecutionException; /** * 自动聚焦 * @author qichunjie * */ final class AutoFocusManager implements Camera.AutoFocusCallback { private static final String TAG = AutoFocusManager.class.getSimpleName(); private static final long AUTO_FOCUS_INTERVAL_MS = 2000L; private static final Collection<String> FOCUS_MODES_CALLING_AF; static { FOCUS_MODES_CALLING_AF = new ArrayList<String>(2); FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_AUTO); FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_MACRO); } private boolean stopped; private boolean focusing; private final boolean useAutoFocus; private final Camera camera; private AsyncTask<?,?,?> outstandingTask; AutoFocusManager(Context context, Camera camera) { this.camera = camera; SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = sharedPrefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true) && FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); } @Override public synchronized void onAutoFocus(boolean success, Camera theCamera) { focusing = false; autoFocusAgainLater(); } @SuppressLint("NewApi") private synchronized void autoFocusAgainLater() { if (!stopped && outstandingTask == null) { AutoFocusTask newTask = new AutoFocusTask(); try { newTask.execute(); outstandingTask = newTask; } catch (RejectedExecutionException ree) { Log.w(TAG, "Could not request auto focus", ree); } } } synchronized void start() { if (useAutoFocus) { outstandingTask = null; if (!stopped && !focusing) { try { camera.autoFocus(this); focusing = true; } catch (RuntimeException re) { // Have heard RuntimeException reported in Android 4.0.x+; continue? Log.w(TAG, "Unexpected exception while focusing", re); // Try again later to keep cycle going autoFocusAgainLater(); } } } } private synchronized void cancelOutstandingTask() { if (outstandingTask != null) { if (outstandingTask.getStatus() != AsyncTask.Status.FINISHED) { outstandingTask.cancel(true); } outstandingTask = null; } } synchronized void stop() { stopped = true; if (useAutoFocus) { cancelOutstandingTask(); // Doesn't hurt to call this even if not focusing try { camera.cancelAutoFocus(); } catch (RuntimeException re) { // Have heard RuntimeException reported in Android 4.0.x+; continue? Log.w(TAG, "Unexpected exception while cancelling focusing", re); } } } private final class AutoFocusTask extends AsyncTask<Object, Object, Object> { @Override protected Object doInBackground(Object... voids) { try { Thread.sleep(AUTO_FOCUS_INTERVAL_MS); } catch (InterruptedException e) { // continue } start(); return null; } } }
[ "294561531@qq.com" ]
294561531@qq.com
fc19548e6dfa3e1cec445ae80d392277ace6c5be
d33574802593c6bb49d44c69fc51391f7dc054af
/ShipLinx/src/main/java/com/meritconinc/shiplinx/carrier/ups/ws/ratews/proxy/ErrorDetailType.java
b32dba8164cbfe6f61eeb4f66bcdb702fd93faa5
[]
no_license
mouadaarab/solushipalertmanagement
96734a0ff238452531be7f4d12abac84b88de214
eb4cf67a7fbf54760edd99dc51efa12d74fa058e
refs/heads/master
2021-12-06T06:09:15.559467
2015-10-06T09:00:54
2015-10-06T09:00:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,323
java
package com.meritconinc.shiplinx.carrier.ups.ws.ratews.proxy; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ErrorDetailType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ErrorDetailType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Severity" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="PrimaryErrorCode" type="{http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1}CodeType"/> * &lt;element name="MinimumRetrySeconds" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Location" type="{http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1}LocationType" minOccurs="0"/> * &lt;element name="SubErrorCode" type="{http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1}CodeType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="AdditionalInformation" type="{http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1}AdditionalInfoType" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ErrorDetailType", namespace = "http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1", propOrder = { "severity", "primaryErrorCode", "minimumRetrySeconds", "location", "subErrorCode", "additionalInformation" }) public class ErrorDetailType { @XmlElement(name = "Severity", required = true) protected String severity; @XmlElement(name = "PrimaryErrorCode", required = true) protected CodeType primaryErrorCode; @XmlElement(name = "MinimumRetrySeconds") protected String minimumRetrySeconds; @XmlElement(name = "Location") protected LocationType location; @XmlElement(name = "SubErrorCode") protected List<CodeType> subErrorCode; @XmlElement(name = "AdditionalInformation") protected List<AdditionalInfoType> additionalInformation; /** * Gets the value of the severity property. * * @return * possible object is * {@link String } * */ public String getSeverity() { return severity; } /** * Sets the value of the severity property. * * @param value * allowed object is * {@link String } * */ public void setSeverity(String value) { this.severity = value; } /** * Gets the value of the primaryErrorCode property. * * @return * possible object is * {@link CodeType } * */ public CodeType getPrimaryErrorCode() { return primaryErrorCode; } /** * Sets the value of the primaryErrorCode property. * * @param value * allowed object is * {@link CodeType } * */ public void setPrimaryErrorCode(CodeType value) { this.primaryErrorCode = value; } /** * Gets the value of the minimumRetrySeconds property. * * @return * possible object is * {@link String } * */ public String getMinimumRetrySeconds() { return minimumRetrySeconds; } /** * Sets the value of the minimumRetrySeconds property. * * @param value * allowed object is * {@link String } * */ public void setMinimumRetrySeconds(String value) { this.minimumRetrySeconds = value; } /** * Gets the value of the location property. * * @return * possible object is * {@link LocationType } * */ public LocationType getLocation() { return location; } /** * Sets the value of the location property. * * @param value * allowed object is * {@link LocationType } * */ public void setLocation(LocationType value) { this.location = value; } /** * Gets the value of the subErrorCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the subErrorCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubErrorCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CodeType } * * */ public List<CodeType> getSubErrorCode() { if (subErrorCode == null) { subErrorCode = new ArrayList<CodeType>(); } return this.subErrorCode; } /** * Gets the value of the additionalInformation property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the additionalInformation property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAdditionalInformation().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AdditionalInfoType } * * */ public List<AdditionalInfoType> getAdditionalInformation() { if (additionalInformation == null) { additionalInformation = new ArrayList<AdditionalInfoType>(); } return this.additionalInformation; } }
[ "harikrishnan.r@mitosistech.com" ]
harikrishnan.r@mitosistech.com
968c8670bbbcd887e881793193239ecfd847be3f
128da67f3c15563a41b6adec87f62bf501d98f84
/com/emt/proteus/duchampopt/stream_read.java
da8c7b71531b21e15fc3341166bf81538702d7fb
[]
no_license
Creeper20428/PRT-S
60ff3bea6455c705457bcfcc30823d22f08340a4
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
refs/heads/master
2020-03-26T03:59:25.725508
2018-08-12T16:05:47
2018-08-12T16:05:47
73,244,383
0
0
null
null
null
null
UTF-8
Java
false
false
2,506
java
/* */ package com.emt.proteus.duchampopt; /* */ /* */ import com.emt.proteus.runtime.api.Env; /* */ import com.emt.proteus.runtime.api.Frame; /* */ import com.emt.proteus.runtime.api.Function; /* */ import com.emt.proteus.runtime.api.ImplementedFunction; /* */ /* */ public final class stream_read extends ImplementedFunction /* */ { /* */ public static final int FNID = 3022; /* 11 */ public static final Function _instance = new stream_read(); /* 12 */ public final Function resolve() { return _instance; } /* */ /* 14 */ public stream_read() { super("stream_read", 3, false); } /* */ /* */ public int execute(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 18 */ return call(paramInt1, paramInt2, paramInt3); /* */ } /* */ /* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4) /* */ { /* 23 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 24 */ paramInt4 += 2; /* 25 */ paramInt3--; /* 26 */ int j = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 27 */ paramInt4 += 2; /* 28 */ paramInt3--; /* 29 */ int k = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 30 */ paramInt4 += 2; /* 31 */ paramInt3--; /* 32 */ int m = call(i, j, k); /* 33 */ paramFrame.setI32(paramInt1, m); /* 34 */ return paramInt4; /* */ } /* */ /* */ public static int call(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 39 */ int i = 0; /* */ /* */ /* */ /* */ /* */ try /* */ { /* 46 */ if (paramInt1 != 1) { /* */ break label53; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 56 */ i = com.emt.proteus.runtime.api.SystemLibrary.fread(paramInt2, 1, paramInt3, com.emt.proteus.runtime.api.MainMemory.getI32Aligned(1792)) == paramInt3 ? 0 : 107; /* */ /* */ /* */ break label60; /* */ /* */ label53: /* */ /* 63 */ i = 1; /* */ /* */ /* */ label60: /* */ /* */ /* 69 */ int j = i; return j; /* */ } /* */ finally {} /* */ } /* */ } /* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/stream_read.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "kimjoey79@gmail.com" ]
kimjoey79@gmail.com
15abad8a5721cc66c140db742c0b6b59d2c5c1d6
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/6169cf7a3eaaef7222f6ac51b4a7fc0261dceb00/after/RearrangementResult7.java
052a8d24a7c35c0238058e4aceb9df507f95f361
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
390
java
import java.util.Comparator; public class RearrangementTest7 { Comparator c = new Comparator() { public int compare(Object o, Object o1) { return 0; //To change body of implemented methods use Options | File Templates. } public boolean equals(Object o) { return false; //To change body of implemented methods use Options | File Templates. } }; int f; }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com