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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cddb9150325e488b48304b6bb4040b0ecd05a0d2
|
cec0c2fa585c3f788fc8becf24365e56bce94368
|
/it/unimi/dsi/fastutil/doubles/AbstractDouble2FloatSortedMap.java
|
aa0cdba3c90c4e7420e1717176efad0c3d511c95
|
[] |
no_license
|
maksym-pasichnyk/Server-1.16.3-Remapped
|
358f3c4816cbf41e137947329389edf24e9c6910
|
4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e
|
refs/heads/master
| 2022-12-15T08:54:21.236174
| 2020-09-19T16:13:43
| 2020-09-19T16:13:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,035
|
java
|
/* */ package it.unimi.dsi.fastutil.doubles;
/* */
/* */ import it.unimi.dsi.fastutil.floats.AbstractFloatCollection;
/* */ import it.unimi.dsi.fastutil.floats.FloatCollection;
/* */ import it.unimi.dsi.fastutil.floats.FloatIterator;
/* */ import it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator;
/* */ import java.util.Collection;
/* */ import java.util.Comparator;
/* */ import java.util.Iterator;
/* */ import java.util.Set;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class AbstractDouble2FloatSortedMap
/* */ extends AbstractDouble2FloatMap
/* */ implements Double2FloatSortedMap
/* */ {
/* */ private static final long serialVersionUID = -1773560792952436569L;
/* */
/* */ public DoubleSortedSet keySet() {
/* 45 */ return new KeySet();
/* */ }
/* */
/* */ protected class KeySet
/* */ extends AbstractDoubleSortedSet {
/* */ public boolean contains(double k) {
/* 51 */ return AbstractDouble2FloatSortedMap.this.containsKey(k);
/* */ }
/* */
/* */ public int size() {
/* 55 */ return AbstractDouble2FloatSortedMap.this.size();
/* */ }
/* */
/* */ public void clear() {
/* 59 */ AbstractDouble2FloatSortedMap.this.clear();
/* */ }
/* */
/* */ public DoubleComparator comparator() {
/* 63 */ return AbstractDouble2FloatSortedMap.this.comparator();
/* */ }
/* */
/* */ public double firstDouble() {
/* 67 */ return AbstractDouble2FloatSortedMap.this.firstDoubleKey();
/* */ }
/* */
/* */ public double lastDouble() {
/* 71 */ return AbstractDouble2FloatSortedMap.this.lastDoubleKey();
/* */ }
/* */
/* */ public DoubleSortedSet headSet(double to) {
/* 75 */ return AbstractDouble2FloatSortedMap.this.headMap(to).keySet();
/* */ }
/* */
/* */ public DoubleSortedSet tailSet(double from) {
/* 79 */ return AbstractDouble2FloatSortedMap.this.tailMap(from).keySet();
/* */ }
/* */
/* */ public DoubleSortedSet subSet(double from, double to) {
/* 83 */ return AbstractDouble2FloatSortedMap.this.subMap(from, to).keySet();
/* */ }
/* */
/* */ public DoubleBidirectionalIterator iterator(double from) {
/* 87 */ return new AbstractDouble2FloatSortedMap.KeySetIterator(AbstractDouble2FloatSortedMap.this.double2FloatEntrySet().iterator(new AbstractDouble2FloatMap.BasicEntry(from, 0.0F)));
/* */ }
/* */
/* */ public DoubleBidirectionalIterator iterator() {
/* 91 */ return new AbstractDouble2FloatSortedMap.KeySetIterator(Double2FloatSortedMaps.fastIterator(AbstractDouble2FloatSortedMap.this));
/* */ }
/* */ }
/* */
/* */
/* */
/* */ protected static class KeySetIterator
/* */ implements DoubleBidirectionalIterator
/* */ {
/* */ protected final ObjectBidirectionalIterator<Double2FloatMap.Entry> i;
/* */
/* */
/* */ public KeySetIterator(ObjectBidirectionalIterator<Double2FloatMap.Entry> i) {
/* 104 */ this.i = i;
/* */ }
/* */
/* */ public double nextDouble() {
/* 108 */ return ((Double2FloatMap.Entry)this.i.next()).getDoubleKey();
/* */ }
/* */
/* */ public double previousDouble() {
/* 112 */ return ((Double2FloatMap.Entry)this.i.previous()).getDoubleKey();
/* */ }
/* */
/* */ public boolean hasNext() {
/* 116 */ return this.i.hasNext();
/* */ }
/* */
/* */ public boolean hasPrevious() {
/* 120 */ return this.i.hasPrevious();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public FloatCollection values() {
/* 138 */ return (FloatCollection)new ValuesCollection();
/* */ }
/* */
/* */ protected class ValuesCollection
/* */ extends AbstractFloatCollection {
/* */ public FloatIterator iterator() {
/* 144 */ return new AbstractDouble2FloatSortedMap.ValuesIterator(Double2FloatSortedMaps.fastIterator(AbstractDouble2FloatSortedMap.this));
/* */ }
/* */
/* */ public boolean contains(float k) {
/* 148 */ return AbstractDouble2FloatSortedMap.this.containsValue(k);
/* */ }
/* */
/* */ public int size() {
/* 152 */ return AbstractDouble2FloatSortedMap.this.size();
/* */ }
/* */
/* */ public void clear() {
/* 156 */ AbstractDouble2FloatSortedMap.this.clear();
/* */ }
/* */ }
/* */
/* */
/* */
/* */ protected static class ValuesIterator
/* */ implements FloatIterator
/* */ {
/* */ protected final ObjectBidirectionalIterator<Double2FloatMap.Entry> i;
/* */
/* */
/* */ public ValuesIterator(ObjectBidirectionalIterator<Double2FloatMap.Entry> i) {
/* 169 */ this.i = i;
/* */ }
/* */
/* */ public float nextFloat() {
/* 173 */ return ((Double2FloatMap.Entry)this.i.next()).getFloatValue();
/* */ }
/* */
/* */ public boolean hasNext() {
/* 177 */ return this.i.hasNext();
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\i\\unimi\dsi\fastutil\doubles\AbstractDouble2FloatSortedMap.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
a0bead9c2ac63efef315d83cb4bb305bfabf81bd
|
bbfa56cfc81b7145553de55829ca92f3a97fce87
|
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/impl/IfcAnnotationFillAreaImpl.java
|
3a5eda5830a75cea56fcd86ec718a6571e816c18
|
[] |
no_license
|
patins1/raas4emf
|
9e24517d786a1225344a97344777f717a568fdbe
|
33395d018bc7ad17a0576033779dbdf70fa8f090
|
refs/heads/master
| 2021-08-16T00:27:12.859374
| 2021-07-30T13:01:48
| 2021-07-30T13:01:48
| 87,889,951
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,400
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package IFC2X3.impl;
import IFC2X3.IFC2X3Package;
import IFC2X3.IfcAnnotationFillArea;
import IFC2X3.IfcCurve;
import java.util.Collection;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Ifc Annotation Fill Area</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link IFC2X3.impl.IfcAnnotationFillAreaImpl#getOuterBoundary <em>Outer Boundary</em>}</li>
* <li>{@link IFC2X3.impl.IfcAnnotationFillAreaImpl#getInnerBoundaries <em>Inner Boundaries</em>}</li>
* </ul>
* </p>
*
* @generated
*/
@XmlType(name = "IfcAnnotationFillArea")
@XmlRootElement(name = "IfcAnnotationFillAreaElement")
public class IfcAnnotationFillAreaImpl extends IfcGeometricRepresentationItemImpl implements IfcAnnotationFillArea {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IfcAnnotationFillAreaImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return IFC2X3Package.eINSTANCE.getIfcAnnotationFillArea();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IfcCurve getOuterBoundary() {
return (IfcCurve)eGet(IFC2X3Package.eINSTANCE.getIfcAnnotationFillArea_OuterBoundary(), true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOuterBoundary(IfcCurve newOuterBoundary) {
eSet(IFC2X3Package.eINSTANCE.getIfcAnnotationFillArea_OuterBoundary(), newOuterBoundary);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public EList<IfcCurve> getInnerBoundaries() {
return (EList<IfcCurve>)eGet(IFC2X3Package.eINSTANCE.getIfcAnnotationFillArea_InnerBoundaries(), true);
}
} //IfcAnnotationFillAreaImpl
|
[
"patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e"
] |
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
|
aa858912850ad77f9044f908fa16ddb2f65e4eae
|
8be3aa9490194dd71f318ff61dee0ff7a0ceeb0c
|
/Selenium1/src/Selenium_Basic.java
|
2b7e81a2d8d275a35fad99065c71d32911eabacf
|
[] |
no_license
|
vchavda/sandbox
|
4f5e91f8e7214313a5a728101193c4136e35b64a
|
5e5d69f41d065a2171a56b7975bd31e71e89e0a0
|
refs/heads/master
| 2020-05-24T17:35:37.493010
| 2019-05-18T18:16:16
| 2019-05-18T18:16:16
| 187,389,025
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,144
|
java
|
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Selenium_Basic {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver","C:\\\\Selenium\\geckodriver\\geckodriver-v0.17.0-win64\\geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();
String baseUrl = "http://google.com";
//-- open google --//
driver.get(baseUrl);
//-- find the search field it will return you the WebElement--//
WebElement searchbox = driver.findElement(By.className("gsfi"));
//-- use the WebElement and type the search text --//
searchbox.sendKeys("Kilimanjaro");
//-- find the search button and click on it --//
/* WebElement GoogleSearchButton = driver.findElement(By.name("btnK"));
GoogleSearchButton.click();
*/
// you can shorten the above by this line
driver.findElement(By.name("btnK")).click();;
//-- find the Wikipedia link and click on it --//
driver.findElement(By.linkText("Mount Kilimanjaro - Wikipedia")).click();
}
}
|
[
"="
] |
=
|
54d8240a7575958c93c718c662399696289205fb
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Core/PresentationCore,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/windows/media/animation/IKeyFrameAnimation.java
|
5d4b47423a181e776689b9fb6ac8c422cfe33136
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,819
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.windows.media.animation;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
// Import section
import system.collections.IList;
import system.collections.IListImplementation;
/**
* The base .NET class managing System.Windows.Media.Animation.IKeyFrameAnimation, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Implements {@link IJCOBridgeReflected}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Media.Animation.IKeyFrameAnimation" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Media.Animation.IKeyFrameAnimation</a>
*/
public interface IKeyFrameAnimation extends IJCOBridgeReflected {
/**
* Fully assembly qualified name: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
*/
public static final String assemblyFullName = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
/**
* Assembly name: PresentationCore
*/
public static final String assemblyShortName = "PresentationCore";
/**
* Qualified class name: System.Windows.Media.Animation.IKeyFrameAnimation
*/
public static final String className = "System.Windows.Media.Animation.IKeyFrameAnimation";
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link IKeyFrameAnimation}, a cast assert is made to check if types are compatible.
*/
public static IKeyFrameAnimation ToIKeyFrameAnimation(IJCOBridgeReflected from) throws Throwable {
JCOBridge bridge = JCOBridgeInstance.getInstance("PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
JCType classType = bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
NetType.AssertCast(classType, from);
return new IKeyFrameAnimationImplementation(from.getJCOInstance());
}
/**
* Returns the reflected Assembly name
*
* @return A {@link String} representing the Fullname of reflected Assembly
*/
public String getJCOAssemblyName();
/**
* Returns the reflected Class name
*
* @return A {@link String} representing the Fullname of reflected Class
*/
public String getJCOClassName();
/**
* Returns the reflected Class name used to build the object
*
* @return A {@link String} representing the name used to allocated the object
* in CLR context
*/
public String getJCOObjectName();
/**
* Returns the instantiated class
*
* @return An {@link Object} representing the instance of the instantiated Class
*/
public Object getJCOInstance();
/**
* Returns the instantiated class Type
*
* @return A {@link JCType} representing the Type of the instantiated Class
*/
public JCType getJCOType();
// Methods section
// Properties section
public IList getKeyFrames() throws Throwable;
public void setKeyFrames(IList KeyFrames) throws Throwable;
// Instance Events section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
3b6217f3beea4c83c6883ba59c7c41476cf9587a
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/WJRealm.java
|
e8e6f5da840e4b77a299f38d257ee6382af0ff3c
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,789
|
java
|
2
https://raw.githubusercontent.com/lixiangwudi/service/master/src/main/java/com/example/lx/shiro/WJRealm.java
package com.example.lx.shiro;
import com.example.lx.entity.User;
import com.example.lx.service.UserService;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author lixiang
* @Date 2020/5/10 16:21
* @Version 1.0
*/
public class WJRealm extends AuthorizingRealm {
@Autowired
private UserService userService;
// 简单重写获取授权信息方法
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
SimpleAuthorizationInfo s = new SimpleAuthorizationInfo();
return s;
}
// 获取认证信息,即根据 token 中的用户名从数据库中获取密码、盐等并返回
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
String userName = token.getPrincipal().toString();
User user = userService.getByName(userName);
String passwordInDB = user.getPassword();
String salt = user.getSalt();
SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(userName, passwordInDB, ByteSource.Util.bytes(salt), getName());
return authenticationInfo;
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
e91f5cce17f69008767c97be902f3dcaedf819bb
|
ece060a3336546aaeb31d075d14b19e425f6a240
|
/DDBackbone/src/com/iztek/dd/IsiKazanci/domain/Insanlar.java
|
74eb2e3cc3edd03f95b00afd2c1de230b2cff0ff
|
[] |
no_license
|
fatihalgan/Demirdokum
|
fdf106fb63e3ba093968d2d38aae1ce20e0b7378
|
277d0b479c9b3085f38ff29b0671ce7b6d841611
|
refs/heads/master
| 2021-01-01T05:24:43.219006
| 2016-05-06T20:51:17
| 2016-05-06T20:51:17
| 58,234,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,954
|
java
|
package com.iztek.dd.IsiKazanci.domain;
import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import com.thoughtworks.xstream.XStream;
public class Insanlar {
private HashMap insanlar = new HashMap();
/**
* @return Returns the insanlar.
*/
private static Insanlar instance = null;
private Insanlar(){
}
public void addInsan(String aktiviteTuru,InsandanIsiKazanci insan){
insanlar.put(aktiviteTuru,insan);
}
public static Insanlar getInstance(){
if(instance==null) instance = new Insanlar();
return instance;
}
public void serializeSelfToXml(HashMap h){
XStream xStream = new XStream();
xStream.alias("Insanlar",HashMap.class);
//String xml = xStream.toXML(insanlar);
String xml = xStream.toXML(h);
System.out.println(xml);
try {
FileOutputStream fos = new FileOutputStream("xml/InsanlardanIsiKazanci.xml");
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write(xml.getBytes());
bos.close();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public HashMap loadInsanlardanIsiKazanci() {
XStream xstream = new XStream();
xstream.alias("Insanlar", HashMap.class);
HashMap insanlar = null;
try {
insanlar = (HashMap) xstream.fromXML(new FileReader(
"xml/InsanlardanIsiKazanci.xml"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return insanlar;
}
public InsandanIsiKazanci getInsan(String aktiviteTuru) {
Collection col = insanlar.keySet();
Iterator it = col.iterator();
while(it.hasNext()) {
InsandanIsiKazanci insan = (InsandanIsiKazanci)it.next();
if(insan.getAktiviteTuru().equals(aktiviteTuru)) return insan;
}
return null;
}
}
|
[
"fatih.algan@gmail.com"
] |
fatih.algan@gmail.com
|
1d00beddec594974dd685cf7ed823796cc8d97e9
|
0c21777557f347ae4ac1b3197d1f7c28e05aed1b
|
/com/ad4screen/sdk/client/a.java
|
d6f80aece8e2babf43c2ec0ca124c7ae209e7473
|
[] |
no_license
|
dmisuvorov/HappyFresh.Android
|
68421b90399b72523f398aabbfd30b61efaeea1f
|
242c5b0c006e7825ed34da57716d2ba9d1371d65
|
refs/heads/master
| 2020-04-29T06:47:34.143095
| 2016-01-11T06:24:16
| 2016-01-11T06:24:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,278
|
java
|
package com.ad4screen.sdk.client;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
import com.ad4screen.sdk.A4SService;
import com.ad4screen.sdk.Log;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
public abstract class a<I>
{
private final Context a;
private final Handler b;
private final Queue<a<I>> c = new LinkedList();
private I d;
private boolean e;
private boolean f;
private boolean g;
private final ServiceConnection h = new ServiceConnection()
{
public void onServiceConnected(ComponentName paramAnonymousComponentName, IBinder paramAnonymousIBinder)
{
Log.debug("Connected to A4SService");
a.a(a.this, a.this.b(paramAnonymousIBinder));
a.a(a.this, false);
a.a(a.this, new a.a("onServiceConnected")
{
public void a(I paramAnonymous2I)
throws RemoteException
{
a.this.a(paramAnonymous2I);
}
});
a.a(a.this);
a.b(a.this);
}
public void onServiceDisconnected(ComponentName paramAnonymousComponentName)
{
Log.debug("Disconnected from A4SService");
a.a(a.this, null);
}
};
private final Runnable i = new Runnable()
{
public void run()
{
Log.debug("Unbinding from A4SService");
if (a.c(a.this) != null) {
a.e(a.this).unbindService(a.d(a.this));
}
a.a(a.this, null);
a.b(a.this, false);
}
};
public a(Context paramContext)
{
this.a = paramContext.getApplicationContext();
this.b = new Handler(Looper.getMainLooper());
}
private void a(Runnable paramRunnable)
{
if (Thread.currentThread() == this.b.getLooper().getThread())
{
paramRunnable.run();
return;
}
this.b.post(paramRunnable);
}
private void b()
{
d();
if ((this.d == null) && (!this.e))
{
Log.debug("Binding to A4SService");
Intent localIntent = new Intent(this.a, A4SService.class);
if (this.a.bindService(localIntent, this.h, 1)) {
this.e = true;
}
}
else
{
return;
}
Log.error("Could not bind to A4SService, please check your AndroidManifest.xml");
}
private void b(a<I> parama)
{
a.a(parama, this.d);
}
private void c()
{
if (!this.f)
{
this.b.postDelayed(this.i, 10000L);
this.f = true;
}
}
private void d()
{
if (this.g) {
return;
}
this.b.removeCallbacks(this.i);
this.f = false;
}
private void e()
{
Iterator localIterator = this.c.iterator();
while (localIterator.hasNext()) {
a.a((a)localIterator.next(), this.d);
}
this.c.clear();
}
public void a()
{
this.g = true;
this.c.clear();
if (!this.f)
{
this.b.post(this.i);
this.f = true;
}
this.a.stopService(new Intent(this.a, A4SService.class));
}
public void a(final a<I> parama)
{
if (this.g) {
return;
}
a(new Runnable()
{
public void run()
{
a.f(a.this);
if (a.c(a.this) == null)
{
a.g(a.this).offer(parama);
return;
}
a.a.a(parama, a.c(a.this));
a.b(a.this);
}
});
}
protected abstract void a(I paramI)
throws RemoteException;
protected abstract I b(IBinder paramIBinder);
public static abstract class a<I>
{
private final String a;
public a(String paramString)
{
this.a = paramString;
}
private final void b(I paramI)
{
Log.verbose("Sending '" + this.a + "' command");
try
{
a(paramI);
return;
}
catch (RemoteException paramI)
{
Log.error("Error while sending '" + this.a + "' command", paramI);
}
}
public abstract void a(I paramI)
throws RemoteException;
}
}
/* Location: /Users/michael/Downloads/dex2jar-2.0/HappyFresh.jar!/com/ad4screen/sdk/client/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"michael@MJSTONE-MACBOOK.local"
] |
michael@MJSTONE-MACBOOK.local
|
c4c7d6001f42bd5e6f1ca442dda0cda0c57bacec
|
c53eff0794037b9dde61cfe31d972f6d07799338
|
/Mage.Sets/src/mage/cards/c/CruelEntertainment.java
|
e15e42784813831f8186b8f37419381f80e5972b
|
[] |
no_license
|
theelk801/mage
|
0cd1c942c54e204db03a7e1603c4250c58a65f9f
|
9a59d801200f327d9f01b4086d0e979d263c095d
|
refs/heads/master
| 2022-11-11T13:02:45.533594
| 2018-04-24T12:35:37
| 2018-04-24T12:35:37
| 98,135,127
| 3
| 0
| null | 2018-04-24T12:35:38
| 2017-07-24T00:54:07
|
Java
|
UTF-8
|
Java
| false
| false
| 4,088
|
java
|
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.turn.TurnMod;
import mage.players.Player;
import mage.target.TargetPlayer;
/**
*
* @author LevelX2
*/
public class CruelEntertainment extends CardImpl {
public CruelEntertainment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}");
// Choose target player and another target player. The first player controls the second player during the second player's next turn, and the second player controls the first player during the first player's next turn.
this.getSpellAbility().addEffect(new CruelEntertainmentEffect());
this.getSpellAbility().addTarget(new TargetPlayer(2));
}
public CruelEntertainment(final CruelEntertainment card) {
super(card);
}
@Override
public CruelEntertainment copy() {
return new CruelEntertainment(this);
}
}
class CruelEntertainmentEffect extends OneShotEffect {
public CruelEntertainmentEffect() {
super(Outcome.Detriment);
this.staticText = "Choose target player and another target player. The first player controls the second player"
+ " during the second player's next turn, and the second player controls the first player during the first player's next turn";
}
public CruelEntertainmentEffect(final CruelEntertainmentEffect effect) {
super(effect);
}
@Override
public CruelEntertainmentEffect copy() {
return new CruelEntertainmentEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player1 = game.getPlayer(getTargetPointer().getFirst(game, source));
Player player2 = null;
if (getTargetPointer().getTargets(game, source).size() > 1) {
player2 = game.getPlayer(getTargetPointer().getTargets(game, source).get(1));
}
if (player1 != null && player2 != null) {
game.getState().getTurnMods().add(new TurnMod(player1.getId(), player2.getId()));
game.getState().getTurnMods().add(new TurnMod(player2.getId(), player1.getId()));
return true;
}
return false;
}
}
|
[
"ludwig.hirth@online.de"
] |
ludwig.hirth@online.de
|
57e2ad03cc96c134588ccb9feada2c721cfb04e2
|
5741045375dcbbafcf7288d65a11c44de2e56484
|
/reddit-decompilada/kotlin/reflect/jvm/internal/impl/load/java/lazy/descriptors/LazyJavaScope$allDescriptors$1.java
|
37b33760508cd96b2c2f00f66895e43a4e0572ef
|
[] |
no_license
|
miarevalo10/ReporteReddit
|
18dd19bcec46c42ff933bb330ba65280615c281c
|
a0db5538e85e9a081bf268cb1590f0eeb113ed77
|
refs/heads/master
| 2020-03-16T17:42:34.840154
| 2018-05-11T10:16:04
| 2018-05-11T10:16:04
| 132,843,706
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,331
|
java
|
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
import java.util.List;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Lambda;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope.Companion;
/* compiled from: LazyJavaScope.kt */
final class LazyJavaScope$allDescriptors$1 extends Lambda implements Function0<List<? extends DeclarationDescriptor>> {
final /* synthetic */ LazyJavaScope f38414a;
LazyJavaScope$allDescriptors$1(LazyJavaScope lazyJavaScope) {
this.f38414a = lazyJavaScope;
super(0);
}
public final /* synthetic */ Object invoke() {
LazyJavaScope lazyJavaScope = this.f38414a;
DescriptorKindFilter descriptorKindFilter = DescriptorKindFilter.f26113c;
Companion companion = MemberScope.f32953f;
return lazyJavaScope.m38388a(descriptorKindFilter, Companion.m27788a(), (LookupLocation) NoLookupLocation.f32683m);
}
}
|
[
"mi.arevalo10@uniandes.edu.co"
] |
mi.arevalo10@uniandes.edu.co
|
42d873c587391738c285faf3a8530f0c45c8e4b0
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/ecf/1199.java
|
0c23c177781275327275a441fa9c0298b83c5449
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 4,721
|
java
|
/****************************************************************************
* Copyright (c) 2008 Versant Corp. 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:
* Versant Corp. - initial API and implementation
*****************************************************************************/
package org.eclipse.ecf.discovery.ui.model.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.ecf.discovery.ui.model.INetwork;
import org.eclipse.ecf.discovery.ui.model.ItemProviderWithStatusLineAdapter;
import org.eclipse.ecf.discovery.ui.model.ModelPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link org.eclipse.ecf.discovery.ui.model.INetwork} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class INetworkItemProvider extends ItemProviderWithStatusLineAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public INetworkItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public List getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Collection getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(ModelPackage.Literals.INETWORK__HOSTS);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EStructuralFeature getChildFeature(Object object, Object child) {
return super.getChildFeature(object, child);
}
/**
* This returns INetwork.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object getImage(Object object) {
//$NON-NLS-1$
return overlayImage(object, getResourceLocator().getImage("full/obj16/INetwork"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getText(Object object) {
//$NON-NLS-1$
return getString("_UI_INetwork_type");
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch(notification.getFeatureID(INetwork.class)) {
case ModelPackage.INETWORK__HOSTS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ResourceLocator getResourceLocator() {
return DiscoveryEditPlugin.INSTANCE;
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
c550f0bf080af579ae01af0e3226c4d99c1da7f1
|
00bd364e419b5c915b1c4d08158504495ea80fc9
|
/view/MicSeatLayout.java
|
a71755e2b4dc6e1d3f5fc825a36d1747d3581333
|
[] |
no_license
|
fajuary/ArcheryApp
|
ed3bd1ceb7036d1cae8d4c15fa000488f1104e04
|
5e88eb7d7ac1bc6caaa7f91be26cae474ced3143
|
refs/heads/master
| 2020-04-04T18:17:41.299410
| 2018-11-05T03:55:05
| 2018-11-05T03:55:05
| 156,157,841
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,700
|
java
|
package com.fajuary.archeryapp.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import com.fajuary.archeryapp.utils.DensityUtil;
/**
* @author zhangpengfei
* @date 2018/11/3
*/
public class MicSeatLayout extends ViewGroup {
private static final int rowsNum = 4;
private final int itemWidth;
private final int itemHeight;
public MicSeatLayout(Context context) {
this(context, null);
}
public MicSeatLayout(Context context, AttributeSet attrs) {
super(context, attrs);
itemWidth = DensityUtil.dip2px(context, 72);
itemHeight = DensityUtil.dip2px(context, 72);
initView(context);
}
private void initView(Context mContext) {
for (int count = 2 * rowsNum, i = 0; i < count; i++) {
boolean isLeft = i < rowsNum;
MicSeatView mic = new MicSeatView(mContext, isLeft);
mic.setSelfRole(MicSeatView.MIC);
addView(mic);
}
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int childCount = getChildCount();
int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(itemWidth, MeasureSpec.EXACTLY);
int childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(itemHeight, MeasureSpec.EXACTLY);
for (int i = 0; i < childCount; i++) {
View view = getChildAt(i);
view.measure(childWidthMeasureSpec, childHeightMeasureSpec);
}
/**
* 最后设置的为真实值 前面的都是测量模式
*/
setMeasuredDimension(widthMeasureSpec, MeasureSpec.makeMeasureSpec(itemHeight * rowsNum, MeasureSpec.EXACTLY));
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
int childCount = getChildCount();
int parentWidth = getMeasuredWidth();
for (int i = 0; i < childCount; i++) {
View view = getChildAt(i);
if (i < rowsNum) {
/**
* 小于四个的时候 布局在左边 top为第几个高度
* 宽度为itemWidth
* top加itemHeight
*/
view.layout(0, i * itemHeight, itemWidth, (i + 1) * itemHeight);
} else {
/**
* 多余4个为右边的
* 左边为父布局宽度-每一个宽度
*/
view.layout(parentWidth - itemWidth,
(i % rowsNum) * itemHeight,
parentWidth, (i % rowsNum + 1) * itemHeight);
}
}
}
}
|
[
"18242312549@163.com"
] |
18242312549@163.com
|
1216a350d72399bbcee4d5648f52a482fb0ffc8d
|
0a664cecaede225e0b062d7245de4c7364ab15f3
|
/org.emftext.commons.antlr3_4_0/src/org/antlr/runtime3_4_0/tree/TreeFilter.java
|
6b5f6f3111b0d2e1c4459dcb43dce75fb063616c
|
[] |
no_license
|
lesleytong/XMU-from-hexiao
|
95188c546c45fde9c8349dd7620ab6a0676dd942
|
d24ee350ac7f74a7e925769145ed6e0f57d7ab8d
|
refs/heads/master
| 2021-07-02T10:43:04.370583
| 2020-11-11T02:12:40
| 2020-11-11T02:12:40
| 228,829,472
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,105
|
java
|
/*
[The "BSD license"]
Copyright (c) 2005-2009 Terence Parr
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 org.antlr.runtime3_4_0.tree;
import org.antlr.runtime3_4_0.RecognitionException;
import org.antlr.runtime3_4_0.RecognizerSharedState;
import org.antlr.runtime3_4_0.TokenStream;
/**
Cut-n-paste from material I'm not using in the book anymore (edit later
to make sense):
Now, how are we going to test these tree patterns against every
subtree in our original tree? In what order should we visit nodes?
For this application, it turns out we need a simple ``apply once''
rule application strategy and a ``down then up'' tree traversal
strategy. Let's look at rule application first.
As we visit each node, we need to see if any of our patterns match. If
a pattern matches, we execute the associated tree rewrite and move on
to the next node. In other words, we only look for a single rule
application opportunity (we'll see below that we sometimes need to
repeatedly apply rules). The following method applies a rule in a @cl
TreeParser (derived from a tree grammar) to a tree:
here is where weReferenced code/walking/patterns/TreePatternMatcher.java
It uses reflection to lookup the appropriate rule within the generated
tree parser class (@cl Simplify in this case). Most of the time, the
rule will not match the tree. To avoid issuing syntax errors and
attempting error recovery, it bumps up the backtracking level. Upon
failure, the invoked rule immediately returns. If you don't plan on
using this technique in your own ANTLR-based application, don't sweat
the details. This method boils down to ``call a rule to match a tree,
executing any embedded actions and rewrite rules.''
At this point, we know how to define tree grammar rules and how to
apply them to a particular subtree. The final piece of the tree
pattern matcher is the actual tree traversal. We have to get the
correct node visitation order. In particular, we need to perform the
scalar-vector multiply transformation on the way down (preorder) and
we need to reduce multiply-by-zero subtrees on the way up (postorder).
To implement a top-down visitor, we do a depth first walk of the tree,
executing an action in the preorder position. To get a bottom-up
visitor, we execute an action in the postorder position. ANTLR
provides a standard @cl TreeVisitor class with a depth first search @v
visit method. That method executes either a @m pre or @m post method
or both. In our case, we need to call @m applyOnce in both. On the way
down, we'll look for @r vmult patterns. On the way up,
we'll look for @r mult0 patterns.
*/
public class TreeFilter extends TreeParser {
public interface fptr {
public void rule() throws RecognitionException;
}
protected TokenStream originalTokenStream;
protected TreeAdaptor originalAdaptor;
public TreeFilter(TreeNodeStream input) {
this(input, new RecognizerSharedState());
}
public TreeFilter(TreeNodeStream input, RecognizerSharedState state) {
super(input, state);
originalAdaptor = input.getTreeAdaptor();
originalTokenStream = input.getTokenStream();
}
public void applyOnce(Object t, fptr whichRule) {
if ( t==null ) return;
try {
// share TreeParser object but not parsing-related state
state = new RecognizerSharedState();
input = new CommonTreeNodeStream(originalAdaptor, t);
((CommonTreeNodeStream)input).setTokenStream(originalTokenStream);
setBacktrackingLevel(1);
whichRule.rule();
setBacktrackingLevel(0);
}
catch (RecognitionException e) { ; }
}
public void downup(Object t) {
TreeVisitor v = new TreeVisitor(new CommonTreeAdaptor());
TreeVisitorAction actions = new TreeVisitorAction() {
public Object pre(Object t) { applyOnce(t, topdown_fptr); return t; }
public Object post(Object t) { applyOnce(t, bottomup_fptr); return t; }
};
v.visit(t, actions);
}
fptr topdown_fptr = new fptr() {
public void rule() throws RecognitionException {
topdown();
}
};
fptr bottomup_fptr = new fptr() {
public void rule() throws RecognitionException {
bottomup();
}
};
// methods the downup strategy uses to do the up and down rules.
// to override, just define tree grammar rule topdown and turn on
// filter=true.
public void topdown() throws RecognitionException {;}
public void bottomup() throws RecognitionException {;}
}
|
[
"10242@DESKTOP-EJ087RD"
] |
10242@DESKTOP-EJ087RD
|
2932f563031cef561f0ff8bb081b789e70f0da4c
|
985c21b0edcb062bda7812f7531ace31fc0da6d5
|
/main/numerics/src/boofcv/numerics/optimization/wrap/CachedNumericalGradientLineFunction.java
|
cadc07b69f4856370ab92d3c38c2c2389f48ea1f
|
[
"Apache-2.0"
] |
permissive
|
siarheidevel/BoofCV
|
2408c39e035d2046d74cf3bd6bf993a0eee2d501
|
07d4f9dee7f5e1704a547da43bab2c502e3bb5d3
|
refs/heads/master
| 2021-01-15T22:29:56.944693
| 2012-11-07T01:18:39
| 2012-11-07T01:18:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,144
|
java
|
/*
* Copyright (c) 2011-2012, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://www.boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package boofcv.numerics.optimization.wrap;
import boofcv.numerics.optimization.functions.FunctionNtoN;
import boofcv.numerics.optimization.functions.FunctionNtoS;
import boofcv.numerics.optimization.functions.FunctionStoS;
import boofcv.numerics.optimization.functions.GradientLineFunction;
import boofcv.numerics.optimization.impl.NumericalDerivativeForward;
import boofcv.numerics.optimization.impl.NumericalGradientForward;
/**
* Numerically computes the gradient and line derivative. Results are cached independently for function output,
* gradient, and line derivative.
*
* @author Peter Abeles
*/
// todo use already computed function value for gradient and derivative computation
public class CachedNumericalGradientLineFunction implements GradientLineFunction {
// number of parameters
protected int N;
// description of line search
protected double []start;
protected double []direction;
// has the output already been computed at the current position
protected boolean cachedFunction;
protected boolean cachedGradient;
protected boolean cachedDerivative;
// current input parameters
protected double[] currentInput;
// current gradient and function output
protected double[] currentGradient;
protected double currentOutput;
protected double currentStep;
protected double currentDerivative;
// input functions
protected FunctionNtoS function;
protected FunctionNtoN gradient;
protected FunctionStoS lineDerivative;
public CachedNumericalGradientLineFunction(FunctionNtoS function ) {
this.function = function;
this.N = function.getN();
this.gradient = new NumericalGradientForward(function);
FunctionStoS lineFunction = new LineFunction();
this.lineDerivative = new NumericalDerivativeForward(lineFunction);
currentInput = new double[N];
currentGradient = new double[N];
}
@Override
public void setLine(double[] start, double[] direction) {
this.start = start;
this.direction = direction;
}
@Override
public void setInput(double x) {
for( int i = 0; i < N; i++ ) {
currentInput[i] = start[i] + x*direction[i];
}
currentStep = x;
cachedFunction = false;
cachedGradient = false;
cachedDerivative = false;
}
@Override
public int getN() {
return N;
}
@Override
public void setInput(double[] x) {
System.arraycopy(x,0,currentInput,0,N);
currentStep = Double.NaN; // force a hard failure if functions are not called in the right order
cachedFunction = false;
cachedGradient = false;
cachedDerivative = false;
}
@Override
public double computeFunction() {
if( cachedFunction )
return currentOutput;
currentOutput = function.process(currentInput);
cachedFunction = true;
return currentOutput;
}
@Override
public void computeGradient(double[] gradient) {
if( !cachedGradient ) {
cachedGradient = true;
this.gradient.process(currentInput,currentGradient);
}
System.arraycopy(currentGradient, 0, gradient, 0, N);
}
@Override
public double computeDerivative() {
if( !cachedDerivative ) {
cachedDerivative = true;
currentDerivative = lineDerivative.process(currentStep);
}
return currentDerivative;
}
private class LineFunction implements FunctionStoS
{
double point[];
private LineFunction() {
point = new double[N];
}
@Override
public double process(double x) {
for( int i = 0; i < N; i++ ) {
point[i] = start[i] + x*direction[i];
}
return function.process(point);
}
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
81d33371266a3621d2acf6237db0bff0b22a24c3
|
d7f49c80d4dc7231cb2fa7cbf3d596e92074ef5f
|
/spring-boot-base-configuration/src/main/java/xyz/vaith/springbootbaseconfiguration/SpringBootBaseConfigurationApplication.java
|
43f2b2f619b9afdcca069195ec7bf88e112c6030
|
[] |
no_license
|
vaithwee/spring-boot-examples
|
b15b030108dc6c6ef56266e9ccf1472694dc69fd
|
f0aacb1958a4d3e5250ab58a25da1d86f1ae05db
|
refs/heads/master
| 2022-07-03T09:37:35.083831
| 2019-10-15T02:04:51
| 2019-10-15T02:04:51
| 192,441,800
| 0
| 0
| null | 2022-06-21T01:30:40
| 2019-06-18T01:17:47
|
Java
|
UTF-8
|
Java
| false
| false
| 732
|
java
|
package xyz.vaith.springbootbaseconfiguration;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
public class SpringBootBaseConfigurationApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootBaseConfigurationApplication.class, args);
//start application without banner
/*
SpringApplicationBuilder builder = new SpringApplicationBuilder(SpringBootBaseConfigurationApplication.class);
builder.bannerMode(Banner.Mode.OFF).run(args);
*/
}
}
|
[
"vaithwee@yeah.net"
] |
vaithwee@yeah.net
|
804d41c7dfa8122d7851f6223fcaaed570e5d22c
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Spring/Spring4782.java
|
9ea2fef1694fd173ef9d6cd3abe2d8bd36c5a5cf
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 536
|
java
|
private static long checkedLongValue(Number number, Class<? extends Number> targetClass) {
BigInteger bigInt = null;
if (number instanceof BigInteger) {
bigInt = (BigInteger) number;
}
else if (number instanceof BigDecimal) {
bigInt = ((BigDecimal) number).toBigInteger();
}
// Effectively analogous to JDK 8's BigInteger.longValueExact()
if (bigInt != null && (bigInt.compareTo(LONG_MIN) < 0 || bigInt.compareTo(LONG_MAX) > 0)) {
raiseOverflowException(number, targetClass);
}
return number.longValue();
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
1504832a459ace78342624ccd719d2e345f108db
|
3603377ca4d3dea04cac1e879aad245396fc3eaf
|
/src/org/zaproxy/zap/network/ZapPostMethod.java
|
dbea17c29f10d5668a500f1d5f2f28a291915c00
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
binarymist/zaproxy
|
81ed31aec002664a36c67885a7bcdae4449db38b
|
e4ee7a9997490a2093afa2599434b810d9445694
|
refs/heads/develop
| 2020-03-31T15:09:50.680893
| 2018-10-09T10:39:57
| 2018-10-09T10:39:57
| 152,326,770
| 2
| 0
|
Apache-2.0
| 2018-10-09T21:58:03
| 2018-10-09T21:58:02
| null |
UTF-8
|
Java
| false
| false
| 2,117
|
java
|
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2013 ZAP development team
*
* 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.zaproxy.zap.network;
import java.io.IOException;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpConnection;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpState;
import org.apache.commons.httpclient.methods.PostMethod;
/**
* An HTTP POST method implementation that ignores malformed HTTP response header lines.
*
* @see PostMethod
*/
public class ZapPostMethod extends PostMethod {
public ZapPostMethod() {
super();
}
public ZapPostMethod(String uri) {
super(uri);
}
/**
* {@inheritDoc}
*
* <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
*/
/*
* Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
* header parser (ZapHttpParser#parseHeaders(InputStream, String)).
*/
@Override
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
getResponseHeaderGroup().clear();
Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
// Wire logging moved to HttpParser
getResponseHeaderGroup().setHeaders(headers);
}
}
|
[
"thc202@gmail.com"
] |
thc202@gmail.com
|
9ac7ddfff969423b7be7894313acc63ace226e2e
|
d2d0d5d88319042071a4aae9d55a1c6e5a50cd67
|
/legacy/dependency-checking/src/main/java/com/paralun/app/MainApp.java
|
713476cdc3f7ad51dd9e56783a276910334876ec
|
[] |
no_license
|
paralun/belajar-spring-framework
|
b78106e6eaf6cd7fb81af3575cc526fa1645721a
|
182a7afde528e52d6f827ed9f92f3ebc88f05122
|
refs/heads/master
| 2023-02-09T04:56:46.703886
| 2023-01-29T13:54:29
| 2023-01-29T13:54:29
| 74,141,057
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 532
|
java
|
/*
* Copyright (c) 2016 | James Kusmambang
* Source : https://github.com/paralun
*/
package com.paralun.app;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class MainApp {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("dependency-checking.xml");
Customer customer = (Customer) context.getBean("customer");
System.out.println(customer);
}
}
|
[
"kusmambang@gmail.com"
] |
kusmambang@gmail.com
|
1cc9b5c621bbaeb40fb8df7fd21c24743ba9dcf7
|
d381092dd5f26df756dc9d0a2474b253b9e97bfb
|
/impe3/impe3-samples/src/test/java/com/isotrol/impe3/samples/component/CalculatorComponentTest.java
|
de4ac52aa66b456feb3ab23567355236e51e0734
|
[] |
no_license
|
isotrol-portal3/portal3
|
2d21cbe07a6f874fff65e85108dcfb0d56651aab
|
7bd4dede31efbaf659dd5aec72b193763bfc85fe
|
refs/heads/master
| 2016-09-15T13:32:35.878605
| 2016-03-07T09:50:45
| 2016-03-07T09:50:45
| 39,732,690
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,640
|
java
|
/**
* This file is part of Port@l
* Port@l 3.0 - Portal Engine and Management System
* Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com
*
* Port@l is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Port@l is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Port@l. If not, see <http://www.gnu.org/licenses/>.
*/
package com.isotrol.impe3.samples.component;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.isotrol.impe3.core.component.ComponentDefinition;
import com.isotrol.impe3.core.component.ComponentType;
import com.isotrol.impe3.core.modules.ModuleDefinition;
import com.isotrol.impe3.samples.calculator.CalculatorComponentModule;
/**
* Tests for Calculator Component Module
* @author Andres Rodriguez
*/
public class CalculatorComponentTest {
/**
* Definition
*/
@Test
public void definition() {
ModuleDefinition<CalculatorComponentModule> md = ModuleDefinition.of(CalculatorComponentModule.class);
ComponentDefinition<?> cd = md.getComponentProvisions().values().iterator().next().getComponent();
assertEquals(ComponentType.VISUAL, cd.getComponentType());
}
}
|
[
"isotrol-portal@portal.isotrol.com"
] |
isotrol-portal@portal.isotrol.com
|
b3b4d76ad31f8e1d8f5b6332849cde126899f403
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/dbeaver/2015/8/CassandraIndex.java
|
43f1b1c5ad159e176593fa11b26d53fa41a3cc87
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,579
|
java
|
/*
* Copyright (C) 2010-2015 Serge Rieder
* serge@jkiss.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.ext.nosql.cassandra.model;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTableIndex;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.rdb.DBSIndexType;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* CassandraIndex
*/
public class CassandraIndex extends JDBCTableIndex<CassandraKeyspace, CassandraColumnFamily>
{
private CassandraIndexColumn column;
public CassandraIndex(
CassandraColumn column)
{
super(column.getTable().getContainer(), column.getTable(), column.getIndexName(), new DBSIndexType(column.getIndexType(), column.getIndexType()), true);
this.column = new CassandraIndexColumn(this, column);
}
@NotNull
@Override
public CassandraDataSource getDataSource()
{
return getTable().getDataSource();
}
@Nullable
@Override
public String getDescription()
{
return null;
}
@Override
@Property(viewable = true, order = 4)
public boolean isUnique()
{
return false;
}
@Property(viewable = false, order = 5)
public Object getIndexOptions()
{
return column.getTableColumn().getIndexOptions();
}
@Override
public List<CassandraIndexColumn> getAttributeReferences(DBRProgressMonitor monitor)
{
return Collections.singletonList(column);
}
@Override
public String getFullQualifiedName()
{
return DBUtils.getFullQualifiedName(getDataSource(),
getTable().getSchema(),
this);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
43beb571daed0be612c2a5dfbe3014857dd10df9
|
eca99e2af37ede85f4c291ea886d05357305d011
|
/app/src/main/java/com/cadyd/app/utils/VolleyErrorHelper.java
|
74b0678817def873b3ee2120799091d078958e2d
|
[] |
no_license
|
Brave-wan/cadyd
|
302fc5f47cdb246ab1ad88f585adcaa87518e080
|
7fb26a29a8609520c7be8b72016c1ecccf5872ca
|
refs/heads/master
| 2020-07-29T14:15:44.080887
| 2016-11-14T03:40:31
| 2016-11-14T03:40:31
| 73,664,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,084
|
java
|
package com.cadyd.app.utils;
import android.content.Context;
import com.android.volley.*;
import com.cadyd.app.R;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.HashMap;
import java.util.Map;
/**
* 网络请求异常提示
*
* @author wcy
*/
public class VolleyErrorHelper {
/**
* Returns appropriate message which is to be displayed to the user against
* the specified error object.
*
* @param error
* @param context
* @return
*/
public static String getMessage(Object error, Context context) {
if (error instanceof TimeoutError) {
return context.getResources().getString(R.string.generic_server_down);
} else if (isServerProblem(error)) {
return handleServerError(error, context);
} else if (isNetworkProblem(error)) {
return context.getResources().getString(R.string.no_internet);
}
return context.getResources().getString(R.string.generic_error);
}
/**
* Determines whether the error is related to network
*
* @param error
* @return
*/
private static boolean isNetworkProblem(Object error) {
return (error instanceof NetworkError) || (error instanceof NoConnectionError);
}
/**
* Determines whether the error is related to server
*
* @param error
* @return
*/
private static boolean isServerProblem(Object error) {
return (error instanceof ServerError) || (error instanceof AuthFailureError);
}
/**
* Handles the server error, tries to determine whether to show a stock
* message or to show a message retrieved from the server.
*
* @param err
* @param context
* @return
*/
private static String handleServerError(Object err, Context context) {
VolleyError error = (VolleyError) err;
NetworkResponse response = error.networkResponse;
if (response != null) {
switch (response.statusCode) {
case 404:
case 422:
case 401:
try {
// server might return error like this { "error":
// "Some error occured" }
// Use "Gson" to parse the result
HashMap<String, String> result = new Gson().fromJson(new String(response.data), new TypeToken<Map<String, String>>() {
}.getType());
if (result != null && result.containsKey("error")) {
return result.get("error");
}
} catch (Exception e) {
e.printStackTrace();
}
// invalid request
return error.getMessage();
default:
return context.getResources().getString(R.string.generic_server_down);
}
}
return context.getResources().getString(R.string.generic_error);
}
}
|
[
"185214487@qq.com"
] |
185214487@qq.com
|
6233ad04ee37655a3392578a32a0739d72af6858
|
c191e2ebc0d4c0fb74f94c8b26d3983cdc02fe69
|
/src/main/java/com/robertx22/age_of_exile/database/data/spells/components/actions/TeleportCasterToSightAction.java
|
41842e368c4214d17ad4393ed362dbacdf55de86
|
[] |
no_license
|
RobertSkalko/Age-of-Exile
|
c734ca05c49fd87fa2837727df397b24ed550cb9
|
a7572c25779c094089e62b08e4ae3ff718af6b59
|
refs/heads/master
| 2022-07-23T07:41:53.016747
| 2022-02-08T17:38:56
| 2022-02-08T17:38:56
| 280,625,711
| 58
| 32
| null | 2022-02-13T05:41:21
| 2020-07-18T09:38:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,391
|
java
|
package com.robertx22.age_of_exile.database.data.spells.components.actions;
import com.robertx22.age_of_exile.database.data.spells.components.MapHolder;
import com.robertx22.age_of_exile.database.data.spells.map_fields.MapField;
import com.robertx22.age_of_exile.database.data.spells.spell_classes.SpellCtx;
import com.robertx22.library_of_exile.utils.EntityUtils;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector3d;
import java.util.Arrays;
import java.util.Collection;
public class TeleportCasterToSightAction extends SpellAction {
public TeleportCasterToSightAction() {
super(Arrays.asList(MapField.DISTANCE));
}
@Override
public void tryActivate(Collection<LivingEntity> targets, SpellCtx ctx, MapHolder data) {
Double distance = data.getOrDefault(MapField.DISTANCE, 10D);
RayTraceResult ray = ctx.caster.pick(distance, 0.0F, false);
Vector3d pos = ray.getLocation();
EntityUtils.setLoc(ctx.caster, pos, ctx.caster.yRot, ctx.caster.xRot);
}
public MapHolder create(Double distance) {
MapHolder c = new MapHolder();
c.put(MapField.DISTANCE, distance);
c.type = GUID();
this.validate(c);
return c;
}
@Override
public String GUID() {
return "tp_caster_in_dir";
}
}
|
[
"treborx555@gmail.com"
] |
treborx555@gmail.com
|
e52db22762a30748a9d674edd0579e2482b11e2c
|
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
|
/Contoh Project/video walp/com/google/android/gms/internal/ads/asu.java
|
1e5386781fa23cd9130b191631eb57e48fa4a621
|
[] |
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
| 368
|
java
|
package com.google.android.gms.internal.ads;
import android.os.IInterface;
public abstract interface asu
extends IInterface
{
public abstract void a(asr paramasr);
}
/* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.ads.asu
* JD-Core Version: 0.7.0.1
*/
|
[
"irfan.rozal44@gmail.com"
] |
irfan.rozal44@gmail.com
|
8707cbd9f45fdb4a366d9abf36dcff9404289a41
|
91297ffb10fb4a601cf1d261e32886e7c746c201
|
/java.preprocessorbridge/src/org/netbeans/modules/java/preprocessorbridge/spi/JavaSourceUtilImpl.java
|
26c75e59e2548a2812981c75af72d3c9f6f5e69d
|
[] |
no_license
|
JavaQualitasCorpus/netbeans-7.3
|
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
|
60018fd982f9b0c9fa81702c49980db5a47f241e
|
refs/heads/master
| 2023-08-12T09:29:23.549956
| 2019-03-16T17:06:32
| 2019-03-16T17:06:32
| 167,005,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,468
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*
* Portions Copyrighted 2008 Sun Microsystems, Inc.
*/
package org.netbeans.modules.java.preprocessorbridge.spi;
import java.io.IOException;
import org.netbeans.modules.java.preprocessorbridge.JavaSourceUtilImplAccessor;
import org.openide.filesystems.FileObject;
/**
* SPI interface provided by java.source to java.preprocessorbridge, used by JavaSourceUtil
* @author Tomas Zezula
* @since 1.5
*/
public abstract class JavaSourceUtilImpl {
static {
JavaSourceUtilImplAccessor.setInstance(new MyAccessor());
}
private static final String EXPECTED_PACKAGE = "org.netbeans.modules.java.source"; //NOI18N
protected JavaSourceUtilImpl () {
super ();
final String implPackage = this.getClass().getPackage().getName();
if (!EXPECTED_PACKAGE.equals(implPackage)) {
throw new IllegalArgumentException ();
}
}
protected abstract long createTaggedCompilationController (FileObject file, long currenTag, Object[] out) throws IOException;
private static class MyAccessor extends JavaSourceUtilImplAccessor {
@Override
public long createTaggedCompilationController(JavaSourceUtilImpl spi, FileObject fo, long currentTag, Object[] out) throws IOException {
assert spi != null;
return spi.createTaggedCompilationController(fo, currentTag, out);
}
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
717277af4905f39c8e17ae8b6a8db3505f7d801c
|
7e78adcea1601955621da5d15f2dcb6631a1d13e
|
/java-metrics-demo/src/main/java/metrics1/MetricSet1.java
|
8841acb8de8ef28a0465e96a8f2b096dc683b68a
|
[] |
no_license
|
zacscoding/java_example
|
fe0a8628fe274e6d150a606941d1e869650796b3
|
482c54f516edeb2d9dee436ce00ba33b3f1c038c
|
refs/heads/master
| 2021-05-14T12:34:34.541865
| 2019-11-28T15:38:41
| 2019-11-28T15:38:41
| 116,410,667
| 1
| 2
| null | 2020-03-04T22:14:20
| 2018-01-05T17:36:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,719
|
java
|
package metrics1;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* https://github.com/elastic/apm-agent-java/blob/master/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricSet.java
*/
/**
* A metric set is a collection of metrics which have the same tags.
* <p>
* A metric set corresponds to one document per {@link co.elastic.apm.agent.report.ReporterConfiguration#metricsInterval
* metrics_interval} in Elasticsearch. An alternative would be to have one document per metric but having one document
* for all metrics with the same tags saves disk space.
* </p>
* Example of some serialized metric sets:
* <pre>
* {"metricset":{"timestamp":1545047730692000,"samples":{"jvm.gc.alloc":{"value":24089200.0}}}}
* {"metricset":{"timestamp":1545047730692000,"tags":{"name":"G1 Young Generation"},"samples":{"jvm.gc.time":{"value":0.0},"jvm.gc.count":{"value":0.0}}}}
* {"metricset":{"timestamp":1545047730692000,"tags":{"name":"G1 Old Generation"}, "samples":{"jvm.gc.time":{"value":0.0},"jvm.gc.count":{"value":0.0}}}}
* </pre>
*/
public class MetricSet1 {
private final Map<String, String> tags;
private final ConcurrentMap<String, DoubleSupplier> samples = new ConcurrentHashMap<>();
public MetricSet1(Map<String, String> tags) {
this.tags = tags;
}
public void add(String name, DoubleSupplier metric) {
samples.putIfAbsent(name, metric);
}
DoubleSupplier get(String name) {
return samples.get(name);
}
public Map<String, String> getTags() {
return tags;
}
public Map<String, DoubleSupplier> getSamples() {
return samples;
}
}
|
[
"zaccoding725@gmail.com"
] |
zaccoding725@gmail.com
|
b2271020b97535277f3fb8d0f4facd5141cbb280
|
1e72397b20742f6d5daee415d8af969f61d0c693
|
/src/Array/ShortestUnsortedContinuousSubarray_581/Solution.java
|
b1565fd447b03dadc3266164aeee6aa705b63b94
|
[] |
no_license
|
PetrVakulenko/Algorithms
|
4ff23efffdb4a8e810952ca9fe93d213b82ae314
|
914babe3610a265bc75e72499360ac4e9bb2d9f3
|
refs/heads/master
| 2021-06-23T09:58:13.782566
| 2020-11-03T11:25:27
| 2020-11-03T11:25:27
| 129,219,141
| 0
| 3
| null | 2020-10-24T15:48:46
| 2018-04-12T08:32:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,388
|
java
|
package Array.ShortestUnsortedContinuousSubarray_581;
import java.util.Arrays;
/**
581. Shortest Unsorted Continuous Subarray
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order,
then the whole array will be sorted in ascending order, too.
You need to find the shortest such subarray and output its length.
Example 1:
Input: [2, 6, 4, 8, 10, 9, 15]
Output: 5
Explanation: You need to sort [6, 4, 8, 10, 9] in ascending order to make the whole array sorted in ascending order.
Note:
Then length of the input array is in range [1, 10,000].
The input array may contain duplicates, so ascending order here means <=.
*/
public class Solution {
public int findUnsortedSubarray(int[] nums) {
if (nums.length < 2) return 0;
int[] nums1 = Arrays.copyOf(nums, nums.length);
Arrays.sort(nums1);
int result = nums.length, i = 0, j = nums.length - 1;
while (i <= j) {
if (i == j && nums[i] == nums1[i]) {
result--;
break;
}
if (nums[i] == nums1[i]) {
i++;
}
if (nums[j] == nums1[j]) {
j--;
}
if (nums[i] != nums1[i] && nums[j] != nums1[j]) break;
}
return result - i - (nums.length - 1 - j);
}
}
|
[
"vakulenkopetya@gmail.com"
] |
vakulenkopetya@gmail.com
|
ed6f6dc03e9ab075a9172378956554363153edd8
|
1ed0e7930d6027aa893e1ecd4c5bba79484b7c95
|
/keiji/source/java/com/vungle/publisher/oy.java
|
cce6fe6146f86761335944e6aced6f6a32c32c13
|
[] |
no_license
|
AnKoushinist/hikaru-bottakuri-slot
|
36f1821e355a76865057a81221ce2c6f873f04e5
|
7ed60c6d53086243002785538076478c82616802
|
refs/heads/master
| 2021-01-20T05:47:00.966573
| 2017-08-26T06:58:25
| 2017-08-26T06:58:25
| 101,468,394
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,269
|
java
|
package com.vungle.publisher;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import com.vungle.log.Logger;
import javax.inject.Inject;
import javax.inject.Singleton;
import twitter4j.TwitterResponse;
/* compiled from: vungle */
public final class oy extends ne<jk<?, ?, ?>> {
@Inject
a k;
@Inject
com.vungle.publisher.agg.a l;
@Inject
com.vungle.publisher.op.a m;
@Inject
com.vungle.publisher.ob.a n;
private op o;
private ob p;
/* compiled from: vungle */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[Orientation.values().length];
static {
try {
a[Orientation.autoRotate.ordinal()] = 1;
} catch (NoSuchFieldError e) {
}
try {
a[Orientation.matchVideo.ordinal()] = 2;
} catch (NoSuchFieldError e2) {
}
}
}
@Singleton
/* compiled from: vungle */
public static class a extends mr<oy> {
@Singleton
/* compiled from: vungle */
public static class a {
@Inject
a a;
@Inject
a() {
}
public final a a(oy oyVar) {
this.a.a = oyVar;
return this.a;
}
}
@Inject
a() {
}
public final void onEvent(w wVar) {
boolean z;
com.vungle.publisher.jl.a aVar = wVar.a;
Logger.v(Logger.EVENT_TAG, "cta click event: " + aVar);
oy oyVar = (oy) this.a;
try {
String s = ((jk) oyVar.a).s();
Logger.v(Logger.AD_TAG, "call to action destination " + s);
if (s != null) {
Intent a = agp.a("android.intent.action.VIEW", Uri.parse(s));
a.addFlags(268435456);
oyVar.g.a(new x(oyVar.a, aVar));
oyVar.b.startActivity(a);
}
z = true;
} catch (Throwable e) {
oyVar.h.a(Logger.AD_TAG, "error loading call-to-action URL " + null, e);
z = false;
}
oyVar.a(z, true);
}
public final void onEvent(ai aiVar) {
Logger.v(Logger.EVENT_TAG, "postRoll.onRepeat()");
((oy) this.a).d();
}
public final void onEvent(av avVar) {
Logger.v(Logger.EVENT_TAG, "video.onCancel()");
((oy) this.a).c();
}
public final void onEvent(aw awVar) {
Logger.v(Logger.EVENT_TAG, "video.onNext()");
((oy) this.a).c();
}
public final void onEvent(ah ahVar) {
Logger.v(Logger.EVENT_TAG, "postRoll.onCancel()");
((oy) this.a).a(true, false);
}
}
public final /* synthetic */ void a(FullScreenAdActivity fullScreenAdActivity, cj cjVar, n nVar, Bundle bundle) {
int i = 10;
boolean z = true;
jk jkVar = (jk) cjVar;
try {
Logger.d(Logger.AD_TAG, "create video ad");
fullScreenAdActivity.getWindow().setBackgroundDrawable(new ColorDrawable(-16777216));
super.a(fullScreenAdActivity, jkVar, nVar, bundle);
jj u = jkVar.u();
Orientation orientation = nVar.getOrientation();
switch (AnonymousClass1.a[orientation.ordinal()]) {
case TwitterResponse.READ /*1*/:
Logger.d(Logger.AD_TAG, "ad orientation " + orientation);
break;
default:
boolean z2 = (u.g == null || u.n == null || u.n.intValue() <= u.g.intValue()) ? false : true;
if (!z2) {
if (u.g == null || u.n == null || u.g.intValue() <= u.n.intValue()) {
z = false;
}
if (!z) {
Logger.d(Logger.AD_TAG, "ad orientation " + orientation + " (unknown) --> auto-rotate");
break;
}
Logger.d(Logger.AD_TAG, "ad orientation " + orientation + " (portrait)");
i = 7;
break;
}
Logger.d(Logger.AD_TAG, "ad orientation " + orientation + " (landscape)");
i = 6;
break;
break;
}
fullScreenAdActivity.setRequestedOrientation(i);
com.vungle.publisher.op.a aVar = this.m;
op opVar = (op) fullScreenAdActivity.getFragmentManager().findFragmentByTag("videoFragment");
if (opVar == null) {
opVar = (op) aVar.a.get();
}
String s = jkVar.s();
jj u2 = jkVar.u();
if (u2 != null) {
opVar.b = nVar;
opVar.e = u2;
opVar.H = s;
} else {
opVar = null;
}
this.o = opVar;
if (jkVar instanceof eo) {
ep p = ((eo) jkVar).p();
if (p != null) {
this.p = (ob) this.n.a(fullScreenAdActivity, (String) jkVar.w(), p.j.a(p.B().toURI().toString()), nVar);
}
}
if ("postRollFragment".equals(this.f)) {
c();
} else {
d();
}
} catch (Throwable e) {
this.h.a(Logger.AD_TAG, "error playing video ad", e);
a(false, false);
}
}
@Inject
oy() {
}
protected final mr<?> a() {
return this.k.a(this);
}
protected final afx<?> b() {
com.vungle.publisher.agg.a aVar = this.l;
aVar.a.a((cj) (jk) this.a);
return aVar.a;
}
final void c() {
if (this.p == null) {
a(true, false);
return;
}
this.g.a(new aj());
a(this.p);
}
final void d() {
if (this.o == null) {
c();
} else {
a(this.o);
}
}
}
|
[
"09f713c@sigaint.org"
] |
09f713c@sigaint.org
|
dccab70b6851426d7792b82b6e526074f04c368b
|
10d77fabcbb945fe37e15ae438e360a89a24ea05
|
/graalvm/transactions/fork/narayana/ArjunaJTA/spi/src/test/java/io/narayana/spi/util/XADSWrapperObjectFactory.java
|
f0e5b1305ad1779ec3f7c8c7e02f8f51ae889716
|
[
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0"
] |
permissive
|
nmcl/scratch
|
1a881605971e22aa300487d2e57660209f8450d3
|
325513ea42f4769789f126adceb091a6002209bd
|
refs/heads/master
| 2023-03-12T19:56:31.764819
| 2023-02-05T17:14:12
| 2023-02-05T17:14:12
| 48,547,106
| 2
| 1
|
Apache-2.0
| 2023-03-01T12:44:18
| 2015-12-24T15:02:58
|
Java
|
UTF-8
|
Java
| false
| false
| 6,033
|
java
|
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, 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 io.narayana.spi.util;
import javax.naming.*;
import javax.naming.spi.ObjectFactory;
import javax.sql.XADataSource;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
public class XADSWrapperObjectFactory implements ObjectFactory {
private static Map<String, String> jdbcDrivers = new HashMap<String, String>() {{
put("org.postgresql.Driver", "org.postgresql.xa.PGXADataSource");
put("org.h2.Driver", "org.h2.jdbcx.JdbcDataSource");
put("oracle.jdbc.driver.OracleDriver", "oracle.jdbc.xa.client.OracleXADataSource");
put("com.microsoft.sqlserver.jdbc.SQLServerDriver", "com.microsoft.sqlserver.jdbc.SQLServerXADataSource"); // no setPassword
put("com.mysql.jdbc.Driver", "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource");
put("com.ibm.db2.jcc.DB2Driver", "com.ibm.db2.jcc.DB2XADataSource"); // for DB2 version 8.2 // no setPassword
put("com.sybase.jdbc3.jdbc.SybDriver", "com.sybase.jdbc3.jdbc.SybXADataSource"); // no setPassword
}};
@Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
Reference ref = (Reference)obj;
XADataSource xads = getXADataSource(
getStringProperty(ref, "binding"),
getStringProperty(ref, "driver"),
getStringProperty(ref, "databaseName"),
getStringProperty(ref, "host"),
getIntegerProperty(ref, "port", 0),
getStringProperty(ref, "username"),
getStringProperty(ref, "password")
);
return xads;
}
public static Reference getReference(String className, String binding,
String driver, String databaseName,
String host, Integer port,
String userName, String password) throws NamingException {
Reference ref = new Reference(className, XADSWrapperObjectFactory.class.getName(), null);
ref.add(new StringRefAddr("binding", binding));
ref.add(new StringRefAddr("driver", driver));
ref.add(new StringRefAddr("databaseName", databaseName));
ref.add(new StringRefAddr("host", host));
ref.add(new StringRefAddr("port", port.toString()));
ref.add(new StringRefAddr("username", userName));
ref.add(new StringRefAddr("password", password));
return ref;
}
public static XADSWrapper getXADataSource(String binding, String driver, String databaseName, String host, Integer port, String userName, String password)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
XADSWrapper wrapper;
String xaDSClassName = jdbcDrivers.get(driver);
if (xaDSClassName == null)
throw new RuntimeException("JDBC2 driver " + driver + " not recognised");
wrapper = new XADSWrapper(binding, driver, databaseName, host, port, xaDSClassName, userName, password);
if( driver.equals("org.h2.Driver")) {
wrapper.setProperty("URL", databaseName);
} else {
wrapper.setProperty("databaseName", databaseName);
wrapper.setProperty("serverName", host);
wrapper.setProperty("portNumber", port);
}
if (driver.equals("oracle.jdbc.driver.OracleDriver")) {
wrapper.setProperty("driverType", "thin");
} else if( driver.equals("com.microsoft.sqlserver.jdbc.SQLServerDriver")) {
wrapper.setProperty("sendStringParametersAsUnicode", false);
} else if( driver.equals("com.mysql.jdbc.Driver")) {
// Note: MySQL XA only works on InnoDB tables.
// set 'default-storage-engine=innodb' in e.g. /etc/my.cnf
// so that the 'CREATE TABLE ...' statments behave correctly.
// doing this config on a per connection basis instead is
// possible but would require lots of code changes :-(
wrapper.setProperty("pinGlobalTxToPhysicalConnection", true); // Bad Things happen if you forget this bit.
} else if( driver.equals("com.ibm.db2.jcc.DB2Driver")) {
wrapper.setProperty("driverType", 4);
} else if( driver.equals("org.h2.Driver")) {
wrapper.setProperty("URL", databaseName);
}
return wrapper;
}
private String getStringProperty(Reference ref, String propName) {
RefAddr addr = ref.get(propName);
return (addr == null ? null : (String)addr.getContent());
}
private Integer getIntegerProperty(Reference ref, String propName, int defValue) {
RefAddr addr = ref.get(propName);
if (addr == null)
return defValue;
Object content = addr.getContent();
return (content == null ? defValue : Integer.parseInt(content.toString()));
}
}
|
[
"mlittle@redhat.com"
] |
mlittle@redhat.com
|
ab5ba4090003c5b8764912c2379e23e050fa218c
|
7aa02f902ad330c70b0b34ec2d4eb3454c7a3fc1
|
/com/google/android/gms/internal/om.java
|
81672751af2501a8d4cbdcfb0589b62234d37853
|
[] |
no_license
|
hisabimbola/andexpensecal
|
5e42c7e687296fae478dfd39abee45fae362bc5b
|
c47e6f0a1a6e24fe1377d35381b7e7e37f1730ee
|
refs/heads/master
| 2021-01-19T15:20:25.262893
| 2016-08-11T16:00:49
| 2016-08-11T16:00:49
| 100,962,347
| 1
| 0
| null | 2017-08-21T14:48:33
| 2017-08-21T14:48:33
| null |
UTF-8
|
Java
| false
| false
| 2,347
|
java
|
package com.google.android.gms.internal;
import java.nio.ByteBuffer;
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class om {
private final ok f7264a;
private final SecureRandom f7265b;
public om(ok okVar, SecureRandom secureRandom) {
this.f7264a = okVar;
this.f7265b = secureRandom;
}
static void m6354a(byte[] bArr) {
for (int i = 0; i < bArr.length; i++) {
bArr[i] = (byte) (bArr[i] ^ 68);
}
}
public byte[] m6355a(String str) {
try {
byte[] a = this.f7264a.m5613a(str, false);
if (a.length != 32) {
throw new on(this);
}
byte[] bArr = new byte[16];
ByteBuffer.wrap(a, 4, 16).get(bArr);
m6354a(bArr);
return bArr;
} catch (Throwable e) {
throw new on(this, e);
}
}
public byte[] m6356a(byte[] bArr, String str) {
if (bArr.length != 16) {
throw new on(this);
}
try {
byte[] a = this.f7264a.m5613a(str, false);
if (a.length <= 16) {
throw new on(this);
}
ByteBuffer allocate = ByteBuffer.allocate(a.length);
allocate.put(a);
allocate.flip();
byte[] bArr2 = new byte[16];
a = new byte[(a.length - 16)];
allocate.get(bArr2);
allocate.get(a);
Key secretKeySpec = new SecretKeySpec(bArr, "AES");
Cipher instance = Cipher.getInstance("AES/CBC/PKCS5Padding");
instance.init(2, secretKeySpec, new IvParameterSpec(bArr2));
return instance.doFinal(a);
} catch (Throwable e) {
throw new on(this, e);
} catch (Throwable e2) {
throw new on(this, e2);
} catch (Throwable e22) {
throw new on(this, e22);
} catch (Throwable e222) {
throw new on(this, e222);
} catch (Throwable e2222) {
throw new on(this, e2222);
} catch (Throwable e22222) {
throw new on(this, e22222);
} catch (Throwable e222222) {
throw new on(this, e222222);
}
}
}
|
[
"m.ravinther@yahoo.com"
] |
m.ravinther@yahoo.com
|
4d33d74d846ffa56ebfdda05a4a9e78087e36691
|
405593b55c729173429047cd3a4cdc16ca232f4d
|
/src/main/java/org/onvif/ver10/schema/OSDPosConfigurationExtension.java
|
4e0473de0eb609938c49fac399154f5afb9dd943
|
[] |
no_license
|
spullara/onvif
|
70b40a0afed501cb25056e71f07976dcb82e6034
|
140a2c1145e0cfd7438cda2dd4a80bfcf181ae16
|
refs/heads/master
| 2021-01-13T17:12:01.313515
| 2017-02-13T22:55:02
| 2017-02-13T22:55:02
| 81,877,818
| 12
| 12
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,711
|
java
|
package org.onvif.ver10.schema;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>Java class for OSDPosConfigurationExtension complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="OSDPosConfigurationExtension">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OSDPosConfigurationExtension", propOrder = {
"any"
})
public class OSDPosConfigurationExtension {
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the any 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 any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"spullara@wavefront.com"
] |
spullara@wavefront.com
|
d95e802d3ecc894f08df069ad192312449aaaf82
|
b34161fabe9092a35f36d225e6b2240ed0128e19
|
/app/src/main/java/com/bolong/bochetong/activity/CityActivity.java
|
4e33fa65fd3668c8736801781e44032a0bb46a00
|
[] |
no_license
|
gengpengxiang/Bochetong
|
e8d671007f6fd34e4f255a6ee1d5ac78ad928ed8
|
48b6863fbf00178e391107328322d8253a158aae
|
refs/heads/master
| 2019-07-12T01:04:44.899196
| 2017-11-17T08:57:34
| 2017-11-17T08:57:34
| 92,235,248
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,139
|
java
|
package com.bolong.bochetong.activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bolong.bochetong.adapter.CityAdapter;
import com.bolong.bochetong.bean2.City;
import com.bolong.bochetong.bean2.MsgEvent;
import com.bolong.bochetong.utils.HttpUtils;
import com.bolong.bochetong.utils.LocationUtil;
import com.bolong.bochetong.utils.Param;
import com.google.gson.Gson;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.IOException;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
import static com.bolong.bochetong.utils.LocationUtil.ACTION_LOCATION_NEW;
import static com.bolong.bochetong.utils.LocationUtil.ACTION_LOCATION_SECOND;
public class CityActivity extends BaseActivity {
@BindView(R.id.tv_current_city)
TextView tvCurrentCity;
@BindView(R.id.tv_location)
TextView tvLocation;
@BindView(R.id.mRecyclerView)
RecyclerView mRecyclerView;
@BindView(R.id.iv_location)
ImageView ivLocation;
private Unbinder unbind;
private int ACTION_CITYS = 236592;
public static final int ACTION_CITY_SELECTED = 236603;
private CityAdapter adapter;
private City city;
private String currentCityName;
@Override
public void onBaseCreate(Bundle bundle) {
setContentViewId(R.layout.activity_city);
unbind = ButterKnife.bind(this);
EventBus.getDefault().register(this);
getCitys();
Intent intent = getIntent();
if(intent!=null){
currentCityName = intent.getStringExtra("currentCity");
tvCurrentCity.setText(currentCityName);
ivLocation.setVisibility(View.VISIBLE);
}
}
@Override
public void initView() {
setTitle("选择城市");
//LocationUtil.start(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
unbind.unbind();
//LocationUtil.stop();
EventBus.getDefault().unregister(this);
}
@OnClick(R.id.tv_location)
public void onViewClicked() {
LocationUtil.start(this);
}
public void getCitys() {
HttpUtils.post(Param.GETCITYS, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
Log.e("失败", "onFailure");
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String jsonDatas = response.body().string();
Log.e("城市", jsonDatas);
EventBus.getDefault().post(new MsgEvent(ACTION_CITYS, jsonDatas));
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void updateUI(MsgEvent event) {
if (event.getAction() == ACTION_CITYS) {
String content = event.getStr();
Gson gson = new Gson();
city = gson.fromJson(content, City.class);
adapter = new CityAdapter(city.getContent());
adapter.setOnItemClickLitener(new CityAdapter.OnItemClickLitener() {
@Override
public void onItemClick(View view, int position) {
EventBus.getDefault().post(new MsgEvent(ACTION_CITY_SELECTED,city.getContent().get(position)));
finish();
}
});
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));
mRecyclerView.setAdapter(adapter);
}
if (event.getAction() == ACTION_LOCATION_NEW) {
String cityName = event.getStr();
tvCurrentCity.setText(cityName);
ivLocation.setVisibility(View.VISIBLE);
//LocationUtil.stop();
}
}
}
|
[
"15612770087@163.com"
] |
15612770087@163.com
|
c3051d0fc91f988a1545bc291c9422e56289ff12
|
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
|
/src/main/java/com/alipay/api/response/AlipayOpenMiniPublicRelationBindResponse.java
|
7ed61cc9afec203ca5f456bf74427c07b6c10993
|
[
"Apache-2.0"
] |
permissive
|
1755616537/alipay-sdk-java-all
|
a7ebd46213f22b866fa3ab20c738335fc42c4043
|
3ff52e7212c762f030302493aadf859a78e3ebf7
|
refs/heads/master
| 2023-02-26T01:46:16.159565
| 2021-02-02T01:54:36
| 2021-02-02T01:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.mini.public.relation.bind response.
*
* @author auto create
* @since 1.0, 2019-12-18 10:27:19
*/
public class AlipayOpenMiniPublicRelationBindResponse extends AlipayResponse {
private static final long serialVersionUID = 7391133977741811338L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
6f39ebfc5680ae9e1327fb163b883660e6ba244f
|
670a4ddcbe9e47c12e6b0779f3d4047d4ec01e9a
|
/src/test/java/org/hibernate/auction/test/CategoryItemTest.java
|
60512f38abe16f496b6758a7c04cb841bb439781
|
[] |
no_license
|
rusakovichma/hibernate-practice
|
f663ecd9814d4b3a53c928e7ef79fff6a7043da9
|
7c500baaff2cf80a7002e92e21867270400a1f5f
|
refs/heads/master
| 2021-05-30T06:00:59.845264
| 2015-11-27T16:00:32
| 2015-11-27T16:00:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,183
|
java
|
package org.hibernate.auction.test;
import junit.framework.*;
import junit.textui.TestRunner;
import org.hibernate.auction.model.*;
import org.hibernate.auction.persistence.HibernateUtil;
import java.util.*;
import org.apache.log4j.Level;
import org.hibernate.*;
import org.hibernate.auction.util.LogHelper;
public class CategoryItemTest extends TestCaseWithData {
public CategoryItemTest(String x) throws Exception {
super(x);
}
protected void setUp() throws Exception {
LogHelper.disableLogging();
super.setUp();
initData();
LogHelper.setLogging("org.hibernate.SQL", Level.DEBUG);
}
protected void tearDown() throws Exception {
HibernateUtil.closeSession();
super.tearDown();
}
// ********************************************************** //
public void testCompositeQuery() throws Exception {
System.out.println("********** testCompositeQuery **********");
// Query for Category and all categorized Items (three tables joined)
HibernateUtil.beginTransaction();
Session s = HibernateUtil.getSession();
Query q = s.createQuery("select c from Category as c left join fetch c.categorizedItems as ci join fetch ci.item as i");
Collection result = new HashSet(q.list());
assertTrue(result.size() == 2);
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
// Check initialization (should be eager fetched)
for (Iterator it = result.iterator(); it.hasNext();) {
Category cat = (Category) it.next();
for (Iterator it2 = cat.getCategorizedItems().iterator(); it2.hasNext();) {
assertTrue(it2.next() != null);
}
}
}
public void testDeletionFromItem() throws Exception {
System.out.println("********** testDeletionFromItem **********");
// Delete all links for auctionFour by clearing collection
HibernateUtil.beginTransaction();
Session s = HibernateUtil.getSession();
Item i = (Item) s.get(Item.class, auctionFour.getId());
i.getCategorizedItems().clear();
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
// Check deletion
HibernateUtil.beginTransaction();
s = HibernateUtil.getSession();
CategorizedItem catItem = (CategorizedItem) s.get(CategorizedItem.class,
new CategorizedItem.Id(carsLuxury.getId(), auctionFour.getId()));
assertTrue(catItem == null);
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
}
public void testDeletionFromCategory() throws Exception {
System.out.println("********** testDeletionFromCategory **********");
// Delete all links for auctionFour by clearing collection
HibernateUtil.beginTransaction();
Session s = HibernateUtil.getSession();
Category c = (Category) s.get(Category.class, carsSUV.getId());
c.getCategorizedItems().clear();
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
// Check deletion
HibernateUtil.beginTransaction();
s = HibernateUtil.getSession();
CategorizedItem catItem = (CategorizedItem) s.get(CategorizedItem.class,
new CategorizedItem.Id(carsSUV.getId(), auctionThree.getId()));
assertTrue(catItem == null);
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
}
/**
* -- session.get() It always hit the database and return the real object,
* an object that represent the database row, not proxy. If no row found ,
* it return null.
*/
public void testGetCategory() throws Exception {
System.out.println("********** testGetCategory **********");
HibernateUtil.beginTransaction();
Session s = HibernateUtil.getSession();
Category luxCars = (Category) s.get(Category.class, carsLuxury.getId());
Category luxStortCars = new Category("Lux sport cars");
luxStortCars.setParentCategory(luxCars);
//In session.get(), Hibernate will hit the database to retrieve the
//luxCars object and put it as a reference to luxStortCars.
//
//However, this save process is extremely high demand,
//there may be thousand or million transactions per hour,
//do you think is this necessary to hit the database to retrieve
//the luxCars object everything save a luxStortCars record?
//After all you just need the luxCars Id as a reference to luxStortCars.
s.save(luxStortCars);
assertNotNull(luxStortCars.getId());
//It will always return null , if the identity value is not found in database.
Category someCategory = (Category) s.get(Category.class, 666l);
assertNull(someCategory);
}
/**
* -- session.load() It will always return a “proxy” (Hibernate term)
* without hitting the database. In Hibernate, proxy is an object with the
* given identifier value, its properties are not initialized yet, it just
* look like a temporary fake object. If no row found , it will throws an
* ObjectNotFoundException.
*
*/
public void testLoadCategory() throws Exception {
System.out.println("********** testLoadCategory **********");
HibernateUtil.beginTransaction();
Session s = HibernateUtil.getSession();
//In session.load(), Hibernate will not hit the database
//(no select statement in output) to retrieve the uxCars object,
//it will return a uxCars proxy object – a fake object with given
//identify value. In this scenario, a proxy object is enough for
//to save a stock transaction record.
Category luxCars = (Category) s.load(Category.class, carsLuxury.getId());
Category luxStortCars = new Category("Lux sport cars");
luxStortCars.setParentCategory(luxCars);
s.save(luxStortCars);
assertNotNull(luxStortCars.getId());
//it will always return a proxy object with the given identity value,
//even the identity value is not exists in database.
//However, when you try to initialize a proxy by retrieve it’s
//properties from database, it will hit the database with select
//statement. If no row is found, a ObjectNotFoundException will throw.
Category someCategory = (Category) s.load(Category.class, 666l);
try {
someCategory.getName();
fail("ObjectNotFoundException must be thrown");
} catch (ObjectNotFoundException ex) {
assertTrue(ex.getMessage().contains("No row with the given identifier exists"));
}
}
// ********************************************************** //
public static Test suite() {
return new TestSuite(CategoryItemTest.class);
}
public static void main(String[] args) throws Exception {
TestRunner.run(suite());
}
}
|
[
"mikhail.complete@gmail.com"
] |
mikhail.complete@gmail.com
|
d734b799a41ff53c421aed7b948e4caed256129f
|
a5ae5e37d196fd3fd14bed5da9677d62d9803ce5
|
/jOOQ/src/main/java/org/jooq/InsertValuesStep11.java
|
dec38676fb0345a1276d934aca784ddfa773f5e0
|
[
"Apache-2.0"
] |
permissive
|
srinivaskarre/jOOQ
|
ae6262a412e70e90e89837c3a1bc52c7ec110c46
|
dfe0464c4367a4d6914ff20a68221c7a4487442d
|
refs/heads/master
| 2020-09-14T16:51:12.753079
| 2019-11-21T13:53:23
| 2019-11-21T13:53:23
| 223,186,678
| 1
| 0
|
NOASSERTION
| 2019-11-21T13:59:11
| 2019-11-21T13:59:10
| null |
UTF-8
|
Java
| false
| false
| 3,019
|
java
|
/*
* 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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
import java.util.Collection;
/**
* This type is used for the {@link Insert}'s DSL API.
* <p>
* Example: <code><pre>
* using(configuration)
* .insertInto(table, field1, field2, field3, .., field10, field11)
* .values(valueA1, valueA2, valueA3, .., valueA10, valueA11)
* .values(valueB1, valueB2, valueB3, .., valueB10, valueB11)
* .onDuplicateKeyUpdate()
* .set(field1, value1)
* .set(field2, value2)
* .execute();
* </pre></code>
*
* @author Lukas Eder
*/
public interface InsertValuesStep11<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> extends InsertOnDuplicateStep<R> {
/**
* Add values to the insert statement.
*/
@Support
InsertValuesStep11<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11);
/**
* Add values to the insert statement.
*/
@Support
InsertValuesStep11<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11);
/**
* Add values to the insert statement.
*/
@Support
InsertValuesStep11<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> values(Collection<?> values);
/**
* Use a <code>SELECT</code> statement as the source of values for the
* <code>INSERT</code> statement
* <p>
* This variant of the <code>INSERT .. SELECT</code> statement expects a
* select returning exactly as many fields as specified previously in the
* <code>INTO</code> clause:
* {@link DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field)}
*/
@Support
InsertOnDuplicateStep<R> select(Select<? extends Record11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> select);
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
210baa6b13c1e92113c1e56ea502b372fb6da60b
|
e980f7a728c7c4762db296b9e48c503c9605def8
|
/app/src/main/java/com/sty/ne/screen/adapter/pixel/Utils.java
|
458e10eb4515832effddb48f83774a1c94e7c3fd
|
[] |
no_license
|
tianyalu/NeScreenAdapterPixel
|
6bc7804a1b676538245683e9f6824c68737ff7d4
|
8df92afffc131dc676e753866ee568fbea208cb0
|
refs/heads/master
| 2020-08-20T05:02:53.580451
| 2019-10-19T02:16:45
| 2019-10-19T02:16:45
| 215,984,319
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,354
|
java
|
package com.sty.ne.screen.adapter.pixel;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.WindowManager;
/**
* Created by tian on 2019/10/18.
*/
public class Utils {
private static volatile Utils utils;
//这里是设计稿参考宽高
// private static final float STANDARD_WIDTH = 720;
// private static final float STANDARD_HEIGHT = 1280;
private static final float STANDARD_WIDTH = 1080;
private static final float STANDARD_HEIGHT = 1920;
//这里是屏幕先上宽高
private int mDisplayWidth;
private int mDisplayHeight;
private Utils(Context context) {
//获取屏幕的宽高
if(mDisplayWidth == 0 || mDisplayHeight == 0) {
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
if(manager != null) {
DisplayMetrics displayMetrics = new DisplayMetrics();
manager.getDefaultDisplay().getMetrics(displayMetrics);
if(displayMetrics.widthPixels > displayMetrics.heightPixels) {
//横屏
mDisplayWidth = displayMetrics.heightPixels;
mDisplayHeight = displayMetrics.widthPixels;
}else { //竖屏
mDisplayWidth = displayMetrics.widthPixels;
mDisplayHeight = displayMetrics.heightPixels - getStatusBarHeight(context);
}
}
}
}
public int getStatusBarHeight(Context context) {
int resID = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
if(resID > 0) {
return context.getResources().getDimensionPixelSize(resID);
}
return 0;
}
public static Utils getInstance(Context context) {
if(utils == null) {
synchronized (Utils.class) {
if(utils == null) {
utils = new Utils(context.getApplicationContext());
}
}
}
return utils;
}
//获取水平方向上的缩放比例
public float getHorizontalScale() {
return mDisplayWidth / STANDARD_WIDTH;
}
//获取竖直方向上的缩放比例
public float getVerticalScale() {
return mDisplayHeight / STANDARD_HEIGHT;
}
}
|
[
"styzf@qq.com"
] |
styzf@qq.com
|
c3bbc40b0249dd408af81005126651fd873546a1
|
71cbe0607ed77a86649e1de8ec8ab8df1fefb1c3
|
/src/main/java/com/jieweifu/controllers/ImageController.java
|
72491cf75d42939a488677252dad5be3434a4761
|
[] |
no_license
|
surick/cms
|
8b542ca627c7e0a27bf6cc6d187603806594b11d
|
8de9b0eb8ef79834e6ef37a9bd497c341eaf8732
|
refs/heads/master
| 2020-04-07T20:15:10.135569
| 2019-05-16T09:40:07
| 2019-05-16T09:40:07
| 158,681,070
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,276
|
java
|
package com.jieweifu.controllers;
import com.baidu.ueditor.ActionEnter;
import com.froala.editor.Image;
import com.froala.editor.image.ImageOptions;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
/**
* @author Jin
* @date 2018/11/26
*/
@Controller("Image")
@RequestMapping("image")
public class ImageController {
@Value("${custom.upload.dir}")
private String uploadPath;
@RequestMapping("config")
public void config(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("application/json");
String rootPath = request.getSession().getServletContext().getRealPath("/");
try {
String exec = new ActionEnter(request, rootPath).exec();
PrintWriter writer = response.getWriter();
writer.write(exec);
writer.flush();
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
@PostMapping("upload")
@ResponseBody
public Map<Object, Object> upload(HttpServletRequest request,
@RequestParam(value = "height", defaultValue = "300") Integer height,
@RequestParam(value = "width", defaultValue = "300") Integer width,
@RequestParam(value = "keepAspectRatio", defaultValue = "false") boolean keepAspectRatio,
@RequestParam(value = "onlyThumb", defaultValue = "false") boolean onlyThumb,
@RequestParam(value = "noThumb", defaultValue = "false") boolean noThumb) {
ImageOptions options = new ImageOptions();
options.setResize(width, height, keepAspectRatio);
if (onlyThumb) {
options.setOnlyThumb(true);
}
if (noThumb) {
options = null;
}
return uploadImage(request, uploadPath, options);
}
private Map<Object, Object> uploadImage(HttpServletRequest request, String path, ImageOptions options) {
Map<Object, Object> responseData = new HashMap<>(3);
try {
Image.upload(request, path, options).forEach((key, value) -> responseData.put(key, value));
} catch (Exception e) {
e.printStackTrace();
responseData.put("error", e.toString());
}
responseData.put("url", "http://127.0.0.1/images/" + responseData.get("link"));
return responseData;
}
@PostMapping("delete")
@ResponseBody
public String delete(HttpServletRequest request, @RequestParam String src) {
try {
Image.delete(request, src);
} catch (Exception e) {
e.printStackTrace();
}
return "success";
}
}
|
[
"jk103@qq.com"
] |
jk103@qq.com
|
57747e3514a75c74c1073595e769b09ef2a3a56c
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/morph/p1733ad/utils/CardRedesignUtils.java
|
b70263f422c6cc6d7054ec5c1fd7d67e70b45c55
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,375
|
java
|
package com.zhihu.android.morph.p1733ad.utils;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.LinearLayout;
import androidx.core.content.ContextCompat;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.R;
import com.zhihu.android.abcenter.AbCenter;
import com.zhihu.android.app.event.ThemeChangedEvent;
import com.zhihu.android.base.util.DisplayUtils;
import com.zhihu.android.base.util.RxBus;
import com.zhihu.android.p945ad.C9180g;
import kotlin.Metadata;
import kotlin.TypeCastException;
import kotlin.p2243e.p2245b.C32569u;
import p2189io.reactivex.p2205a.p2207b.AndroidSchedulers;
import p2189io.reactivex.p2231i.Schedulers;
@Metadata
/* renamed from: com.zhihu.android.morph.ad.utils.CardRedesignUtils */
/* compiled from: CardRedesignUtils.kt */
public final class CardRedesignUtils {
public static final CardRedesignUtils INSTANCE = new CardRedesignUtils();
private CardRedesignUtils() {
}
public static final View addDivider(Context context, View view) {
C32569u.m150519b(context, C6969H.m41409d("G6A8CDB0EBA28BF"));
C32569u.m150519b(view, C6969H.m41409d("G6A8CDB0EBA3EBF1FEF0B87"));
try {
if (!C32569u.m150517a((Object) "1", (Object) AbCenter.getStaticValue(C6969H.m41409d("G6887C725AD35A626F00B80"), "0"))) {
return view;
}
if (view.getParent() != null) {
ViewParent parent = view.getParent();
if (parent != null) {
((ViewGroup) parent).removeView(view);
} else {
throw new TypeCastException(C6969H.m41409d("G6796D916FF33AA27E8018408F0E083D46890C15AAB3FEB27E900DD46E7E9CF977D9AC51FFF31A52DF401994CBCF3CAD27ECDE313BA278C3BE91B80"));
}
}
if (!(!C32569u.m150517a((Object) "0", (Object) AbCenter.getStaticValue(C6969H.m41409d("G7D90C525BE34A828F40AC2"), "0")))) {
return view;
}
View view2 = new View(context);
view2.setBackgroundColor(ContextCompat.getColor(context, R.color.GBK09B));
INSTANCE.registThemeLisener(context, view2);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.height = DisplayUtils.m87171b(context, 0.5f);
layoutParams.setMargins(DisplayUtils.m87171b(context, 16.0f), 0, DisplayUtils.m87171b(context, 16.0f), 0);
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -2);
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setOrientation(1);
linearLayout.addView(view, layoutParams2);
linearLayout.addView(view2, layoutParams);
return linearLayout;
} catch (Exception e) {
C9180g.m54583a(e);
return view;
}
}
@SuppressLint({"CheckResult"})
private final void registThemeLisener(Context context, View view) {
RxBus.m86979a().mo84369b(ThemeChangedEvent.class).subscribeOn(Schedulers.m148537b()).observeOn(AndroidSchedulers.m147557a()).subscribe(new CardRedesignUtils$registThemeLisener$1(view, context), CardRedesignUtils$registThemeLisener$2.INSTANCE);
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
8dc557597b6582f541cbd74d3bb50a41d766d67f
|
11fb574a1cc92b2c81da5f347786f581313a417e
|
/sf-autoaop/src/main/java/cn/sf/auto/aop/config/FetchEnableExcpReturnParam.java
|
759bbe2557717f2eda2af54524113657ad46703e
|
[] |
no_license
|
nigel1000/sf-code
|
9f30aec4d9fea45d56aa1c563f4857951b67649f
|
387ca985895e6de764c012c8dacec631e85d787e
|
refs/heads/master
| 2021-01-12T01:25:05.815327
| 2018-07-31T09:08:46
| 2018-07-31T09:08:46
| 78,382,915
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,335
|
java
|
package cn.sf.auto.aop.config;
import cn.sf.auto.aop.constants.ReturnConfig;
import cn.sf.bean.constants.LogString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
import java.util.Arrays;
import java.util.Map;
/**
* Created by nijianfeng on 17/6/23.
*/
@Slf4j
public class FetchEnableExcpReturnParam implements ImportBeanDefinitionRegistrar {
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
Map<String, Object> map = importingClassMetadata.getAnnotationAttributes(EnableExcpReturn.class.getName(), false);
AnnotationAttributes enableAop = AnnotationAttributes.fromMap(map);
ReturnConfig.returnTypes = enableAop.getClassArray("returnTypes");
ReturnConfig.methodNames = enableAop.getStringArray("methodNames");
log.info(LogString.initPre+" EnableAop param fetch:" +
"returnTypes->" + Arrays.toString(ReturnConfig.returnTypes) + ";" +
"methodNames->" + Arrays.toString(ReturnConfig.methodNames)
);
}
}
|
[
"xiaodangjia@gov.cn"
] |
xiaodangjia@gov.cn
|
5c808fd169bf7d95e344213b54eece938dd403ce
|
5f89dd6e2bbf62cedb06b14d3ee5516bec3c7cc6
|
/src/test/java/org/contentmine/norma/NormaFixtureRunner.java
|
53ee84d6987362930fd18cd2d6d61998d53ce30f
|
[
"Apache-2.0"
] |
permissive
|
petermr/normami
|
d0dd99703e0e502f8a08c3d74373cae480119116
|
17b64f3d3dabf250d077af602345363983d24137
|
refs/heads/master
| 2022-07-13T13:49:36.468815
| 2019-09-02T13:03:00
| 2019-09-02T13:03:00
| 130,284,486
| 1
| 3
|
Apache-2.0
| 2022-06-24T02:14:46
| 2018-04-19T23:50:37
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,719
|
java
|
package org.contentmine.norma;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.contentmine.cproject.args.DefaultArgProcessor;
import org.contentmine.cproject.files.CProject;
import org.contentmine.cproject.files.CTree;
import org.contentmine.cproject.util.CMineTestFixtures;
import org.contentmine.norma.NormaArgProcessor;
import org.contentmine.norma.pubstyle.util.XMLCleaner;
import org.junit.Assert;
/** avoids horrible static test runner.
*
* @author pm286
*
*/
public class NormaFixtureRunner {
private static final Logger LOG = Logger.getLogger(NormaFixtureRunner.class);
static {
LOG.setLevel(Level.DEBUG);
}
public NormaFixtureRunner() {
}
private static File shtmlFile;
public void copyToTargetRunTidyTransformWithStylesheetSymbolRoot(File from, File projectDir, String abb) {
copyToTargetRunTidyTransformWithStylesheetSymbol(from, projectDir, abb+"2html");
}
public void copyToTargetRunTidyTransformWithStylesheetSymbol(File from, File projectDir, String symbol) {
LOG.trace(projectDir+": tidy fulltext.html to fulltext.xhtml");
CMineTestFixtures.cleanAndCopyDir(from, projectDir);
String args = "--project "+projectDir+" -i fulltext.html -o fulltext.xhtml --html jsoup";
DefaultArgProcessor argProcessor = new NormaArgProcessor(args);
argProcessor.runAndOutput();
CProject project = new CProject(projectDir);
CTree ctree0 = project.getOrCreateCTreeList().get(0);
File xhtmlFile = ctree0.getExistingFulltextXHTML();
if (xhtmlFile != null) {
Assert.assertTrue("xhtml: ", xhtmlFile.exists());
LOG.trace("convert xhtml to html Symbol: "+symbol);
args = "--project "+projectDir+" -i fulltext.xhtml -o scholarly.html --transform "+symbol;
argProcessor = new NormaArgProcessor(args);
argProcessor.runAndOutput();
shtmlFile = ctree0.getExistingScholarlyHTML();
Assert.assertNotNull("failed convert using: "+symbol, shtmlFile);
Assert.assertTrue("shtml: ", shtmlFile.exists());
}
}
public void tidyTransformAndClean(File from, File projectDir, String abb) throws IOException {
// This passes a static variable!!! What was I thinking???
copyToTargetRunTidyTransformWithStylesheetSymbolRoot(from, projectDir, abb);
if (shtmlFile != null) {
XMLCleaner cleaner = XMLCleaner.createCleaner(shtmlFile);
cleaner.removeCommonEmptyElements();
String cleanedXml = cleaner.getElement().toXML();
File file = new File(projectDir, "cleaned.html");
FileUtils.write(file, cleanedXml);
cleaner.removeXMLNSNamespace();
FileUtils.write(new File(projectDir, "cleaned.xml"), cleaner.getElement().toXML());
}
}
}
|
[
"peter.murray.rust@googlemail.com"
] |
peter.murray.rust@googlemail.com
|
03d22ce604cc4c965870449109e97c37ca15a9be
|
ed485890395b0adc7b6544986c5cbdb5098caaaa
|
/src/main/java/com/qinfei/qferp/controller/media1/MediaType1Controller.java
|
dcf139b115ad89bfd981c87e83ddeb651bef2517
|
[] |
no_license
|
xeon-ye/croa
|
ef44a2a3815badd216cd93d829d810d84ef34ffc
|
fc3806685f9b4676fcaa9cec940f902c4bfcff7f
|
refs/heads/master
| 2023-02-23T13:21:18.820765
| 2021-01-28T11:01:37
| 2021-01-28T11:01:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
package com.qinfei.qferp.controller.media1;
import com.qinfei.core.ResponseData;
import com.qinfei.qferp.entity.media1.MediaType1;
import com.qinfei.qferp.service.media1.IMediaType1Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* @CalssName MediaType1Controller
* @Description 媒体类型接口1
* @Author xuxiong
* @Date 2019/6/26 0026 17:14
* @Version 1.0
*/
@Slf4j
@Controller
@RequestMapping("/mediaType1")
@Api(description = "媒体类型接口1")
public class MediaType1Controller {
@Autowired
private IMediaType1Service mediaType1Service;
@GetMapping("/{plateId}")
@ResponseBody
@ApiOperation(value = "根据媒体板块ID查询媒体类型列表", notes = "根据媒体板块ID查询媒体类型列表", response = ResponseData.class)
public List<MediaType1> listByPlateId(@PathVariable("plateId") Integer plateId) {
return mediaType1Service.listByPlateId(plateId);
}
}
|
[
"649681131@qq.com"
] |
649681131@qq.com
|
994a4dff1f0b42526ab9cc736dd803540107b895
|
5d7c8d78e72ae3ea6e61154711fdd23248c19614
|
/sources/com/yunos/tvtaobao/biz/request/item/TakeOutGetGaodeDistanceRequest.java
|
0556d9d7c48748340ca2220ea2ab4c6645c50d90
|
[] |
no_license
|
activeliang/tv.taobao.android
|
8058497bbb45a6090313e8445107d987d676aff6
|
bb741de1cca9a6281f4c84a6d384333b6630113c
|
refs/heads/master
| 2022-11-28T10:12:53.137874
| 2020-08-06T05:43:15
| 2020-08-06T05:43:15
| 285,483,760
| 7
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,123
|
java
|
package com.yunos.tvtaobao.biz.request.item;
import com.alibaba.sdk.android.oss.common.OSSHeaders;
import com.yunos.tvtaobao.biz.request.base.BaseHttpRequest;
import java.util.Map;
import java.util.TreeMap;
public class TakeOutGetGaodeDistanceRequest extends BaseHttpRequest {
private String appKey = "aee2300ce283a15d48d6e484bce6ab9a";
private String destination;
private String origin;
public TakeOutGetGaodeDistanceRequest(String org2, String dest) {
this.origin = org2;
this.destination = dest;
}
public String resolveResult(String result) throws Exception {
return result;
}
/* access modifiers changed from: protected */
public Map<String, String> getAppData() {
Map<String, String> params = new TreeMap<>();
params.put("key", this.appKey);
params.put(OSSHeaders.ORIGIN, this.origin);
params.put("destination", this.destination);
return params;
}
/* access modifiers changed from: protected */
public String getHttpDomain() {
return "http://restapi.amap.com/v4/direction/bicycling";
}
}
|
[
"activeliang@gmail.com"
] |
activeliang@gmail.com
|
733cc81c8543bc5f293e190ca9af9f18008d10e1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_facc8420f0303171b79900cf2c6003339b3aa146/PreviewPanel/2_facc8420f0303171b79900cf2c6003339b3aa146_PreviewPanel_t.java
|
094dedffd402f345f80a3e61f64290027c454637
|
[] |
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,488
|
java
|
package net.ishchenko.omfp;
import com.sun.pdfview.PDFFile;
import com.sun.pdfview.PDFPage;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
/**
* Created by IntelliJ IDEA.
* User: Max
* Date: 10.04.2010
* Time: 1:00:28
*/
public class PreviewPanel extends JPanel {
private int pageCounter;
private PDFFile pdffile;
private Image pageImage;
private Image deviceImage;
private int pageX;
private int pageY;
private int pageWidth;
private int pageHeight;
private final Object lock = new Object();
private static final String HINT = "Hint: use your mouse wheel, or arrow buttons to scroll the document";
private Rectangle2D hintBounds;
public PreviewPanel(File documentFile, File deviceFile) throws IOException {
FileChannel channel = new RandomAccessFile(documentFile, "r").getChannel();
pdffile = new PDFFile(channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()));
if (deviceFile != null) {
deviceImage = ImageIO.read(deviceFile);
parseCoordinateFromDevice(deviceFile);
setPreferredSize(new Dimension(deviceImage.getWidth(null), deviceImage.getHeight(null)));
} else {
deviceImage = createImage(1, 1);
PDFPage firstPage = pdffile.getPage(1, true);
pageWidth = Math.round(firstPage.getWidth() * 1.5f);
pageHeight = Math.round(firstPage.getHeight() * 1.5f);
setPreferredSize(new Dimension(pageWidth, pageHeight));
}
addListeners();
paginate(1);
}
private void parseCoordinateFromDevice(File deviceFile) {
String deviceName = deviceFile.getName();
String coordinates = deviceName.substring(deviceName.indexOf("--") + 2, deviceName.indexOf("."));
for (String dimension : coordinates.split("-")) {
if (dimension.startsWith("x")) {
pageX = Integer.parseInt(dimension.substring(1));
} else if (dimension.startsWith("y")) {
pageY = Integer.parseInt(dimension.substring(1));
} else if (dimension.startsWith("w")) {
pageWidth = Integer.parseInt(dimension.substring(1));
} else if (dimension.startsWith("h")) {
pageHeight = Integer.parseInt(dimension.substring(1));
}
}
}
@Override
protected void paintComponent(Graphics g) {
if (deviceImage != null) {
g.drawImage(deviceImage, 0, 0, null);
}
g.drawImage(pageImage, pageX, pageY, null);
if (hintBounds == null) {
hintBounds = g.getFontMetrics().getStringBounds(HINT, g);
}
g.setColor(Color.WHITE);
g.fillRect(10, 3, (int) hintBounds.getWidth() + 20, (int) hintBounds.getHeight() + 10);
g.setColor(Color.BLACK);
g.drawRect(10, 3, (int) hintBounds.getWidth() + 20, (int) hintBounds.getHeight() + 10);
g.drawString(HINT, 20, 20);
}
private void addListeners() {
addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent e) {
if (e.getWheelRotation() == -1) {
if (pageCounter > 1) {
paginate(-1);
}
} else {
if (pageCounter < pdffile.getNumPages()) {
paginate(1);
}
}
}
});
getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "paginate_up");
getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "paginate_up");
getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "paginate_down");
getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "paginate_down");
getActionMap().put("paginate_up", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
if (pageCounter > 1) {
paginate(-1);
}
}
});
getActionMap().put("paginate_down", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
paginate(1);
}
});
}
/**
* Is invoked from EDT only
*/
private void paginate(final int increment) {
if (!SwingUtilities.isEventDispatchThread()) {
throw new IllegalStateException();
}
pageCounter += increment;
final int counter = pageCounter;
//kekeke
new Thread(new Runnable() {
public void run() {
synchronized (lock) {
pageImage = pdffile.getPage(counter, true).getImage(pageWidth, pageHeight, null, null, true, true);
}
repaint(pageX, pageY, pageWidth, pageHeight);
}
}).start();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ef83df5e3aabd33c2303afe204d548ccec3329ba
|
3c73a700a7d89b1028f6b5f907d4d0bbe640bf9a
|
/android/src/main/kotlin/lib/org/bouncycastle/jce/provider/JCEElGamalPublicKey.java
|
16914c234a29ba00040dc9778d947b49ea03e72e
|
[] |
no_license
|
afterlogic/flutter_crypto_stream
|
45efd60802261faa28ab6d10c2390a84231cf941
|
9d5684d5a7e63d3a4b2168395d454474b3ca4683
|
refs/heads/master
| 2022-11-02T02:56:45.066787
| 2021-03-25T17:45:58
| 2021-03-25T17:45:58
| 252,140,910
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,974
|
java
|
package lib.org.bouncycastle.jce.provider;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigInteger;
import javax.crypto.interfaces.DHPublicKey;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.DHPublicKeySpec;
import lib.org.bouncycastle.asn1.ASN1Integer;
import lib.org.bouncycastle.asn1.oiw.ElGamalParameter;
import lib.org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
import lib.org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import lib.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
import lib.org.bouncycastle.crypto.params.ElGamalPublicKeyParameters;
import lib.org.bouncycastle.jcajce.provider.asymmetric.util.JcajceUtilKeyUtil;
import lib.org.bouncycastle.jce.interfaces.ElGamalPublicKey;
import lib.org.bouncycastle.jce.spec.ElGamalParameterSpec;
import lib.org.bouncycastle.jce.spec.ElGamalPublicKeySpec;
public class JCEElGamalPublicKey
implements ElGamalPublicKey, DHPublicKey
{
static final long serialVersionUID = 8712728417091216948L;
private BigInteger y;
private ElGamalParameterSpec elSpec;
JCEElGamalPublicKey(
ElGamalPublicKeySpec spec)
{
this.y = spec.getY();
this.elSpec = new ElGamalParameterSpec(spec.getParams().getP(), spec.getParams().getG());
}
JCEElGamalPublicKey(
DHPublicKeySpec spec)
{
this.y = spec.getY();
this.elSpec = new ElGamalParameterSpec(spec.getP(), spec.getG());
}
JCEElGamalPublicKey(
ElGamalPublicKey key)
{
this.y = key.getY();
this.elSpec = key.getParameters();
}
JCEElGamalPublicKey(
DHPublicKey key)
{
this.y = key.getY();
this.elSpec = new ElGamalParameterSpec(key.getParams().getP(), key.getParams().getG());
}
JCEElGamalPublicKey(
ElGamalPublicKeyParameters params)
{
this.y = params.getY();
this.elSpec = new ElGamalParameterSpec(params.getParameters().getP(), params.getParameters().getG());
}
JCEElGamalPublicKey(
BigInteger y,
ElGamalParameterSpec elSpec)
{
this.y = y;
this.elSpec = elSpec;
}
JCEElGamalPublicKey(
SubjectPublicKeyInfo info)
{
ElGamalParameter params = ElGamalParameter.getInstance(info.getAlgorithm().getParameters());
ASN1Integer derY = null;
try
{
derY = (ASN1Integer)info.parsePublicKey();
}
catch (IOException e)
{
throw new IllegalArgumentException("invalid info structure in DSA public key");
}
this.y = derY.getValue();
this.elSpec = new ElGamalParameterSpec(params.getP(), params.getG());
}
public String getAlgorithm()
{
return "ElGamal";
}
public String getFormat()
{
return "X.509";
}
public byte[] getEncoded()
{
return JcajceUtilKeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(OIWObjectIdentifiers.elGamalAlgorithm, new ElGamalParameter(elSpec.getP(), elSpec.getG())), new ASN1Integer(y));
}
public ElGamalParameterSpec getParameters()
{
return elSpec;
}
public DHParameterSpec getParams()
{
return new DHParameterSpec(elSpec.getP(), elSpec.getG());
}
public BigInteger getY()
{
return y;
}
private void readObject(
ObjectInputStream in)
throws IOException, ClassNotFoundException
{
this.y = (BigInteger)in.readObject();
this.elSpec = new ElGamalParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject());
}
private void writeObject(
ObjectOutputStream out)
throws IOException
{
out.writeObject(this.getY());
out.writeObject(elSpec.getP());
out.writeObject(elSpec.getG());
}
}
|
[
"princesakenny98@gmail.com"
] |
princesakenny98@gmail.com
|
8e41c9bc84e095bd2c9c09f24490b4ab61bec274
|
8bb7d22ceda349e7d5e29d290af4f0247ee03e85
|
/src/com/apexsoft/system/security/MyLoginUrlAuthenticationEntryPoint.java
|
335be924ba2413ade0ebd4459b0505d81d6691e6
|
[] |
no_license
|
liuxiaochen0625/springmvc
|
72c3d08e4ae69065edf40a31e4451a4b3c4e9626
|
78082620390e844d2667a8f61686456567d26122
|
refs/heads/master
| 2021-01-10T08:45:14.648862
| 2016-03-25T07:22:29
| 2016-03-25T07:22:29
| 54,702,206
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 870
|
java
|
package com.apexsoft.system.security;
import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
/**
* 如果用户请求受保护的HTTP请求,但是他们没有认证, AuthenticationEntryPoint 就会被调用。
* 类处理将对应响应发送给用户,这样验证就可以开始了。
* Spring Security提供了三个具体实现:
* LoginUrlAuthenticationEntryPoint 对应表单认证,
* BasicProcessingFilterEntryPoint 对应HTTP基本认证过程,
* CasProcessingFilterEntryPoint 对应JA-SIG中心认证服务(CAS)登录
* function
* @author zlzhang
* 2013-12-10下午04:25:23
*/
public class MyLoginUrlAuthenticationEntryPoint extends LoginUrlAuthenticationEntryPoint{
public MyLoginUrlAuthenticationEntryPoint(String loginFormUrl){
super(loginFormUrl);
}
}
|
[
"liuxiaoqiang_0625@163.com"
] |
liuxiaoqiang_0625@163.com
|
809cc464de5ec58028c27f3da4f3ed22b84fb98f
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/star_lg2dsu660.java
|
7dc29db3097aa3e0f864e991ad6176eadc7ff16e
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
// This file is automatically generated.
package adila.db;
/*
* LG Optimus 2X
*
* DEVICE: star
* MODEL: LG-SU660
*/
final class star_lg2dsu660 {
public static final String DATA = "LG|Optimus 2X|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
267f1fa28d329b22bf1a8cbc9e99285ae572e9f3
|
0a62d4a114bd29be992cdab2f29ae46b1f3d8be9
|
/mustella/src/main/java/marmotinni/DispatchMouseEvent.java
|
d8e26a9016444eee78e3f20ee56638f8d50a9583
|
[
"MPL-1.1",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"CC-BY-2.5",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CC-BY-3.0"
] |
permissive
|
apache/royale-asjs
|
5f579577a67f45fedc7e6223564ed39eaf8e6f7c
|
84e10833141192c567770325c172087732dd8c35
|
refs/heads/develop
| 2023-08-01T15:12:01.437650
| 2023-07-24T09:33:44
| 2023-07-24T09:33:44
| 10,095,585
| 335
| 143
|
Apache-2.0
| 2023-09-05T17:13:38
| 2013-05-16T07:00:17
|
ActionScript
|
UTF-8
|
Java
| false
| false
| 6,856
|
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 marmotinni;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.RemoteWebElement;
import org.xml.sax.Attributes;
/**
* DispatchMouseEvent
*
* Dispatch mouse event
*/
public class DispatchMouseEvent extends TestStep {
/**
* Dispatch a mouse event
*/
@Override
protected void doStep()
{
Double x;
Double y;
if (hasLocal)
{
StringBuilder script = new StringBuilder();
insertTargetScript(script, target);
script.append("return target.element.getBoundingClientRect().left");
if (TestStep.showScripts)
System.out.println(script);
Object any = ((JavascriptExecutor)webDriver).executeScript(script.toString());
if (any instanceof Long)
x = ((Long)any).doubleValue();
else if (any instanceof Double)
x = (Double)any;
else
{
System.out.println("x is not Long or Double");
x = 0.0;
}
script = new StringBuilder();
insertTargetScript(script, target);
script.append("return target.element.getBoundingClientRect().top");
if (TestStep.showScripts)
System.out.println(script);
any = ((JavascriptExecutor)webDriver).executeScript(script.toString());
if (any instanceof Long)
y = ((Long)any).doubleValue();
else if (any instanceof Double)
y = (Double)any;
else
{
System.out.println("y is not Long or Double");
y = 0.0;
}
x += localX;
y += localY;
}
else
{
x = stageX;
y = stageY;
}
// find top-most element
StringBuilder script = new StringBuilder();
script.append("var all = document.all;");
script.append("var n = all.length;");
script.append("for(var i=n-1;i>=0;i--) { ");
script.append(" var e = all[i];");
script.append(" var bounds = e.getBoundingClientRect();");
script.append(" if (" + x + " >= bounds.left && " + x + " <= bounds.right && " + y + " >= bounds.top && " + y + " <= bounds.bottom) {");
script.append(" if (!e.id) e.id = Math.random().toString();");
script.append(" return e;");
script.append(" }");
script.append("};");
script.append("return null;");
if (TestStep.showScripts)
System.out.println(script);
RemoteWebElement mouseTarget = (RemoteWebElement)((JavascriptExecutor)webDriver).executeScript(script.toString());
//System.out.println("mouseTarget: " + mouseTarget.getTagName() + " " + mouseTarget.getAttribute("id"));
String actualId = mouseTarget.getAttribute("id");
script = new StringBuilder();
script.append("var e = document.createEvent('MouseEvent');");
script.append("e.initMouseEvent(\"" + type.toLowerCase() + "\", true, false, window, " + delta + ", " + x + ", " + y + ", " + localX + ", " + localY + ", " + ctrlKey + ", false, " + shiftKey + ", false, " + type.equals("mouseDown") + ", " + relatedObject + ");");
script.append("document.getElementById('" + actualId + "').dispatchEvent(e);");
if (TestStep.showScripts)
System.out.println(script);
try
{
((JavascriptExecutor)webDriver).executeScript(script.toString());
}
catch (Exception e1)
{
TestOutput.logResult("Exception thrown in DispatchMouseEvent.");
testResult.doFail (e1.getMessage());
}
}
/**
* The object that should receive the mouse event
*/
public String target;
/**
* The type/name of the event
*/
public String type;
/**
* The ctrlKey property on the MouseEvent (optional)
*/
public boolean ctrlKey;
/**
* The delta property on the MouseEvent (optional)
*/
public int delta;
private boolean hasLocal;
private boolean hasStage;
/**
* The localX property on the MouseEvent (optional)
* Either set stageX/stageY or localX/localY, but not both.
*/
public double localX;
/**
* The localY property on the MouseEvent (optional)
* Either set stageX/stageY or localX/localY, but not both.
*/
public double localY;
/**
* The stageX property on the MouseEvent (optional)
* Either set stageX/stageY or localX/localY, but not both.
*/
public double stageX;
/**
* The stageY property on the MouseEvent (optional)
* Either set stageX/stageY or localX/localY, but not both.
*/
public double stageY;
/**
* The shiftKey property on the MouseEvent (optional)
*/
public boolean shiftKey;
/**
* The relatedObject property on the MouseEvent (optional)
*/
public String relatedObject;
/**
* customize string representation
*/
@Override
public String toString()
{
String s = "DispatchMouseEvent: target = ";
s += target;
if (hasLocal)
{
s += ", localX = " + Double.toString(localX);
s += ", localY = " + Double.toString(localY);
}
if (hasStage)
{
s += ", stageX = " + Double.toString(stageX);
s += ", stageY = " + Double.toString(stageY);
}
if (shiftKey)
s += ", shiftKey = true";
if (ctrlKey)
s += ", ctrlKey = true";
if (relatedObject != null)
s += ", relatedObject = " + relatedObject;
if (delta != 0)
s += ", delta = " + Integer.toString(delta);
return s;
}
@Override
public void populateFromAttributes(Attributes attributes)
{
target = attributes.getValue("target");
type = attributes.getValue("type");
String value = attributes.getValue("localX");
if (value != null)
{
localX = Double.parseDouble(value);
hasLocal = true;
}
value = attributes.getValue("localY");
if (value != null)
{
localY = Double.parseDouble(value);
hasLocal = true;
}
value = attributes.getValue("stageX");
if (value != null)
{
stageX = Double.parseDouble(value);
hasStage = true;
}
value = attributes.getValue("stageY");
if (value != null)
{
stageY = Double.parseDouble(value);
hasStage = true;
}
}
}
|
[
"aharui@apache.org"
] |
aharui@apache.org
|
bc4b6814a8fe2eed42fe4355d3cc147247f745d9
|
31d8b1144a8e9db8aab5d86f5e20cfb3364a3b91
|
/hello-world/src/main/java/com/yicj/study/HelloApplication.java
|
c8636b4a945146dc04ebff139571172b669133be
|
[] |
no_license
|
yichengjie/spring-cloud-alibaba-study
|
a9acd0d3cb3e56984cb6ed520cb81bc6aa59960d
|
537c20d5bc978521238c218fda8e52beebb02d1b
|
refs/heads/master
| 2022-12-29T17:45:23.979392
| 2020-10-21T13:10:36
| 2020-10-21T13:10:36
| 300,810,554
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 484
|
java
|
package com.yicj.study;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Source;
@EnableBinding(Source.class)
@SpringBootApplication
public class HelloApplication {
public static void main(String[] args) {
SpringApplication.run(HelloApplication.class,args) ;
}
}
|
[
"626659321@qq.com"
] |
626659321@qq.com
|
56bbda661d1af4e4bfe928aeea0aeebdc2fcec7b
|
63f4098a9f3c02d14735c49e1d2a7734f61e574f
|
/core/containers/glassfish/src/main/java/org/codehaus/cargo/container/glassfish/GlassFish4xRemoteContainer.java
|
ccee97cdf5b6b47fae67df4ed5cb0b5c477bc466
|
[] |
no_license
|
psiroky/cargo
|
225bfd3a1c01703c7d3adf7246334f4180f19ed9
|
d2e327183f712c4faa2f6682a4483b787e29ae45
|
refs/heads/master
| 2021-01-24T22:52:03.535382
| 2015-04-02T23:54:37
| 2015-04-03T18:35:06
| 33,377,037
| 0
| 0
| null | 2015-04-03T18:36:20
| 2015-04-03T18:36:20
| null |
UTF-8
|
Java
| false
| false
| 2,196
|
java
|
/*
* ========================================================================
*
* Codehaus CARGO, copyright 2004-2011 Vincent Massol.
*
* 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.codehaus.cargo.container.glassfish;
import org.codehaus.cargo.container.ContainerCapability;
import org.codehaus.cargo.container.configuration.RuntimeConfiguration;
import org.codehaus.cargo.container.glassfish.internal.GlassFish4xContainerCapability;
/**
* GlassFish 4.x remote container.
*
*/
public class GlassFish4xRemoteContainer extends GlassFish3xRemoteContainer
{
/**
* Unique container id.
*/
public static final String ID = "glassfish4x";
/**
* the Capability of the JOnAS container.
*/
private ContainerCapability capability = new GlassFish4xContainerCapability();
/**
* Constructor.
*
* @param configuration the configuration to associate to this container.
*/
public GlassFish4xRemoteContainer(RuntimeConfiguration configuration)
{
super(configuration);
}
/**
* {@inheritDoc}
*
* @see org.codehaus.cargo.container.Container#getCapability()
*/
public ContainerCapability getCapability()
{
return capability;
}
/**
* {@inheritDoc}
*
* @see org.codehaus.cargo.container.Container#getId()
*/
public String getId()
{
return ID;
}
/**
* {@inheritDoc}
*
* @see org.codehaus.cargo.container.Container#getName()
*/
public String getName()
{
return "GlassFish 4.x Remote";
}
}
|
[
"psiroky@redhat.com"
] |
psiroky@redhat.com
|
d70e359fc59b437be7e5535a7027295721fd88b2
|
583d2ecccc93567ecfc424f90204e238558ee281
|
/mail/src/main/java/net/sf/ahtutils/mail/content/XmlMimeContentCreator.java
|
dc46b64be0865713ad30b7f62fde70b23d4fd757
|
[] |
no_license
|
pkay1412/utils
|
4dd4bd2c93c6ec75856713fb09748682e10b8e54
|
dfed3b5317c7e1e4c178d33aa7f00c110ad05c80
|
refs/heads/master
| 2021-01-21T02:41:15.087460
| 2016-01-19T15:40:25
| 2016-01-19T15:40:25
| 49,944,435
| 0
| 0
| null | 2016-01-19T12:15:11
| 2016-01-19T10:16:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,022
|
java
|
package net.sf.ahtutils.mail.content;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import net.sf.ahtutils.xml.mail.Attachment;
import net.sf.ahtutils.xml.mail.Image;
import net.sf.ahtutils.xml.mail.Mail;
import net.sf.exlp.util.xml.JaxbUtil;
import org.apache.commons.lang.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class XmlMimeContentCreator extends AbstractMimeContentCreator
{
final static Logger logger = LoggerFactory.getLogger(XmlMimeContentCreator.class);
private MimeMessage message;
public XmlMimeContentCreator(MimeMessage message)
{
this.message=message;
}
public void createContent(Mail mail) throws MessagingException
{
JaxbUtil.info(mail);
Multipart mpAlternative = new MimeMultipart("alternative");
mpAlternative.addBodyPart(createTxt(mail));
if(!mail.isSetAttachment() && !mail.isSetImage())
{
message.setContent(mpAlternative);
}
else
{
Multipart mixed = new MimeMultipart("mixed");
MimeBodyPart wrap = new MimeBodyPart();
wrap.setContent(mpAlternative); // HERE'S THE KEY
mixed.addBodyPart(wrap);
for(Attachment attachment : mail.getAttachment())
{
mixed.addBodyPart(createBinary(attachment));
}
for(Image image : mail.getImage())
{
logger.warn("Untested here");
mixed.addBodyPart(createImage(image));
}
message.setContent(mixed);
}
}
private MimeBodyPart createTxt(Mail mail) throws MessagingException
{
MimeBodyPart txt = new MimeBodyPart();
if(mail.isSetAttachment())
{
txt.setContent(mail.getExample()+SystemUtils.LINE_SEPARATOR, "text/plain; charset=\"ISO-8859-1\"");
}
else
{
txt.setContent(mail.getExample(), "text/plain; charset=\"ISO-8859-1\"");
}
return txt;
}
}
|
[
"t.kisner@web.de"
] |
t.kisner@web.de
|
06336b7b3db7f1815d44d10010ebef58b922318f
|
c54062a41a990c192c3eadbb9807e9132530de23
|
/solutions/iowritebytes/src/test/java/iowritebytes/StringToBytesTest.java
|
ae32f1a66ec97c5d749af6a7faf31cc6a25efdb7
|
[] |
no_license
|
Training360/strukturavalto-java-public
|
0d76a9dedd7f0a0a435961229a64023931ec43c7
|
82d9b3c54437dd7c74284f06f9a6647ec62796e3
|
refs/heads/master
| 2022-07-27T15:07:57.915484
| 2021-12-01T08:57:06
| 2021-12-01T08:57:06
| 306,286,820
| 13
| 115
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 949
|
java
|
package iowritebytes;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
public class StringToBytesTest {
@TempDir
public File folder;
@Test
public void testWriteAsBytes() throws IOException {
List<String> words = List.of("John", "_notes", "_Does not matter", "Jack", "Jane");
Path path = new File(folder, "word.dat").toPath();
StringToBytes stringToBytes = new StringToBytes();
stringToBytes.writeAsBytes(words, path);
byte[] bytes = readBytes(path);
byte[] content = "JohnJackJane".getBytes();
assertArrayEquals(content, bytes);
}
private byte[] readBytes(Path path) throws IOException {
return Files.readAllBytes(path);
}
}
|
[
"viczian.istvan@gmail.com"
] |
viczian.istvan@gmail.com
|
b8e0bdaaf8eab19bd03c82744f000ccaf9f176d2
|
21bd00ed8590be829b9c55f2785c674de2be78de
|
/backend_Lep/src/main/java/org/sid/BackendLepApplication.java
|
3de0c5666498a20dd0f43c03046ab647bd0f97e3
|
[] |
no_license
|
abousow123/LEBALMA
|
37334415e4d6ebd8b01e179c28a5cc60cd6b0722
|
1bc4c488bd5b7c817b6082b23e441a1074cc6578
|
refs/heads/master
| 2021-06-30T05:33:06.801998
| 2019-01-15T08:51:12
| 2019-01-15T08:51:12
| 152,511,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 974
|
java
|
package org.sid;
import java.util.Date;
import org.sid.bo.Pret;
import org.sid.dao.ClientRepository;
import org.sid.dao.PretRepository;
import org.sid.dao.VersementRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class BackendLepApplication implements CommandLineRunner{
@Autowired
public PretRepository pretRest ;
@Autowired
public ClientRepository clientRepository;
@Autowired
private VersementRepository versementRepository ;
public static void main(String[] args) {
SpringApplication.run(BackendLepApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
// TODO Auto-generated method stub
//pretRest.save(new Pret(60000, new Date(), clientRepository.getOne(1234567))) ;
}
}
|
[
"abousow798@gmail.com"
] |
abousow798@gmail.com
|
dc21097dcc10e0a98be1b87b29dee4fb341e1860
|
52fbe7a7ed03593c05356c469bdb858c68d391d0
|
/src/main/java/org/demo/business/service/impl/OrderTransServiceImpl.java
|
a439dc8806636ab70c1001c991317d66c0dd5d8a
|
[] |
no_license
|
altansenel/maven-project
|
4d165cb10da24159f58d083f4d5e4442ab3265b2
|
0f2e392553e5fb031235c9df776a4a01b077c349
|
refs/heads/master
| 2016-08-12T05:51:51.359531
| 2016-02-25T07:26:28
| 2016-02-25T07:26:28
| 52,504,851
| 0
| 0
| null | null | null | null |
ISO-8859-13
|
Java
| false
| false
| 3,112
|
java
|
/*
* Created on 24 Žub 2016 ( Time 16:36:11 )
* Generated by Telosys Tools Generator ( version 2.1.1 )
*/
package org.demo.business.service.impl;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.demo.bean.OrderTrans;
import org.demo.bean.jpa.OrderTransEntity;
import java.util.Date;
import java.util.List;
import org.demo.business.service.OrderTransService;
import org.demo.business.service.mapping.OrderTransServiceMapper;
import org.demo.data.repository.jpa.OrderTransJpaRepository;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* Implementation of OrderTransService
*/
@Component
@Transactional
public class OrderTransServiceImpl implements OrderTransService {
@Resource
private OrderTransJpaRepository orderTransJpaRepository;
@Resource
private OrderTransServiceMapper orderTransServiceMapper;
public OrderTrans findById(Integer id) {
OrderTransEntity orderTransEntity = orderTransJpaRepository.findOne(id);
return orderTransServiceMapper.mapOrderTransEntityToOrderTrans(orderTransEntity);
}
public List<OrderTrans> findAll() {
Iterable<OrderTransEntity> entities = orderTransJpaRepository.findAll();
List<OrderTrans> beans = new ArrayList<OrderTrans>();
for(OrderTransEntity orderTransEntity : entities) {
beans.add(orderTransServiceMapper.mapOrderTransEntityToOrderTrans(orderTransEntity));
}
return beans;
}
public OrderTrans save(OrderTrans orderTrans) {
return update(orderTrans) ;
}
public OrderTrans create(OrderTrans orderTrans) {
OrderTransEntity orderTransEntity = orderTransJpaRepository.findOne(orderTrans.getId());
if( orderTransEntity != null ) {
throw new IllegalStateException("already.exists");
}
orderTransEntity = new OrderTransEntity();
orderTransServiceMapper.mapOrderTransToOrderTransEntity(orderTrans, orderTransEntity);
OrderTransEntity orderTransEntitySaved = orderTransJpaRepository.save(orderTransEntity);
return orderTransServiceMapper.mapOrderTransEntityToOrderTrans(orderTransEntitySaved);
}
public OrderTrans update(OrderTrans orderTrans) {
OrderTransEntity orderTransEntity = orderTransJpaRepository.findOne(orderTrans.getId());
orderTransServiceMapper.mapOrderTransToOrderTransEntity(orderTrans, orderTransEntity);
OrderTransEntity orderTransEntitySaved = orderTransJpaRepository.save(orderTransEntity);
return orderTransServiceMapper.mapOrderTransEntityToOrderTrans(orderTransEntitySaved);
}
public void delete(Integer id) {
orderTransJpaRepository.delete(id);
}
public OrderTransJpaRepository getOrderTransJpaRepository() {
return orderTransJpaRepository;
}
public void setOrderTransJpaRepository(OrderTransJpaRepository orderTransJpaRepository) {
this.orderTransJpaRepository = orderTransJpaRepository;
}
public OrderTransServiceMapper getOrderTransServiceMapper() {
return orderTransServiceMapper;
}
public void setOrderTransServiceMapper(OrderTransServiceMapper orderTransServiceMapper) {
this.orderTransServiceMapper = orderTransServiceMapper;
}
}
|
[
"altan.senel@gunessigorta.com.tr"
] |
altan.senel@gunessigorta.com.tr
|
648a847bcd87dcc5e00af116633b14256f221c62
|
51c7fdc0612f439af9572b174c051d8e8cdf1d65
|
/src/main/java/net/simpleframework/module/news/web/page/NewsCommentHandler.java
|
a2a110edf604c1136f4a09725d40667a48e395b6
|
[] |
no_license
|
xieyang/simple-module-news-web
|
7b72bca2fc5f8868749236008b485e5b8172eea0
|
4ff6f351b9c060ec148e4e4ff96cbcd74d47f0fa
|
refs/heads/master
| 2020-12-26T10:46:47.231947
| 2013-11-28T08:48:21
| 2013-11-28T08:48:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,169
|
java
|
package net.simpleframework.module.news.web.page;
import java.util.Date;
import java.util.Map;
import net.simpleframework.ado.query.DataQueryUtils;
import net.simpleframework.ado.query.IDataQuery;
import net.simpleframework.common.ID;
import net.simpleframework.common.coll.KVMap;
import net.simpleframework.module.common.content.AbstractComment;
import net.simpleframework.module.news.INewsCommentService;
import net.simpleframework.module.news.INewsContextAware;
import net.simpleframework.module.news.News;
import net.simpleframework.module.news.NewsComment;
import net.simpleframework.mvc.JavascriptForward;
import net.simpleframework.mvc.component.ComponentParameter;
import net.simpleframework.mvc.component.ext.comments.ctx.CommentCtxHandler;
/**
* Licensed under the Apache License, Version 2.0
*
* @author 陈侃(cknet@126.com, 13910090885) https://github.com/simpleframework
* http://www.simpleframework.net
*/
public class NewsCommentHandler extends CommentCtxHandler<NewsComment> implements INewsContextAware {
@Override
public ID getOwnerId(final ComponentParameter cp) {
final News news = getNews(cp);
return news != null ? news.getId() : null;
}
@Override
public Map<String, Object> getFormParameters(final ComponentParameter cp) {
final KVMap kv = (KVMap) super.getFormParameters(cp);
final ID newsId = getOwnerId(cp);
if (newsId != null) {
kv.add("newsId", newsId);
}
return kv;
}
@Override
protected INewsCommentService getBeanService() {
return context.getCommentService();
}
@Override
public IDataQuery<?> comments(final ComponentParameter cp) {
final ID newsId = getOwnerId(cp);
if (newsId == null) {
return DataQueryUtils.nullQuery();
}
return getBeanService().queryByContent(newsId);
}
@Override
public JavascriptForward deleteComment(final ComponentParameter cp, final Object id) {
final JavascriptForward js = super.deleteComment(cp, id);
updateComments(cp);
return js;
}
@Override
public JavascriptForward addComment(final ComponentParameter cp) {
final INewsCommentService service = getBeanService();
final NewsComment comment = service.createBean();
final ID newsId = getOwnerId(cp);
if (newsId != null) {
comment.setContentId(newsId);
}
comment.setCreateDate(new Date());
comment.setUserId(cp.getLoginId());
comment.setContent(cp.getParameter(PARAM_COMMENT));
final AbstractComment parent = service.getBean(cp.getParameter(PARAM_PARENTID));
if (parent != null) {
comment.setParentId(parent.getId());
}
service.insert(comment);
updateComments(cp);
return super.addComment(cp);
}
protected void updateComments(final ComponentParameter cp) {
final News news = getNews(cp);
if (news != null) {
news.setComments(getBeanService().queryByContent(news).getCount());
news.setLastCommentDate(new Date());
context.getNewsService().update(new String[] { "comments", "lastCommentDate" }, news);
}
}
protected News getNews(final ComponentParameter cp) {
return context.getNewsService().getBean(cp.getParameter("newsId"));
}
}
|
[
"cknet@126.com"
] |
cknet@126.com
|
5ca96b9acae0030b04dd67dd5d1dbf087bb5a4df
|
c79a207f5efdc03a2eecea3832b248ca8c385785
|
/com.googlecode.jinahya/ocap-api/1.1.2/src/main/java/javax/tv/service/navigation/ServiceDetailsSIChangeEvent.java
|
95de8af3be97b47659ee023a01367abc753e0511
|
[] |
no_license
|
jinahya/jinahya
|
977e51ac2ad0af7b7c8bcd825ca3a576408f18b8
|
5aef255b49da46ae62fb97bffc0c51beae40b8a4
|
refs/heads/master
| 2023-07-26T19:08:55.170759
| 2015-12-02T07:32:18
| 2015-12-02T07:32:18
| 32,245,127
| 2
| 1
| null | 2023-07-12T19:42:46
| 2015-03-15T04:34:19
|
Java
|
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
/*
* @(#)ServiceDetailsSIChangeEvent.java 1.3 00/10/09
*
* Copyright 1998-2000 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*/
package javax.tv.service.navigation;
import javax.tv.service.*;
/**
* A <code>ServiceDetailsSIChangeEvent</code> notifies an
* <code>SIChangeListener</code> of changes to a
* <code>ServiceDetails</code>.
*
* @see ServiceDetails
* @see ServiceDetails
*/
public abstract class ServiceDetailsSIChangeEvent
extends SIChangeEvent {
/**
* Constructs a <code>ServiceDetailsSIChangeEvent</code>.
*
* @param service The <code>ServiceDetails</code> in which the
* change occurred.
*
* @param type The type of change that occurred.
*
* @param e The <code>SIElement</code> that changed.
*/
public ServiceDetailsSIChangeEvent(ServiceDetails service,
SIChangeType type, SIElement e) {
super(null,null,null);
}
/**
* Reports the <code>ServiceDetails</code> that generated the
* event. It will be identical to the object returned by the
* <code>getSource()</code> method.
*
* @return The <code>ServiceDetails</code> that generated the
* event.
*/
public ServiceDetails getServiceDetails() {
return null;
}
}
|
[
"onacit@e3df469a-503a-0410-a62b-eff8d5f2b914"
] |
onacit@e3df469a-503a-0410-a62b-eff8d5f2b914
|
aacd4be454027b3f8049b55fadcd06ca4da73519
|
32b62f4d752f42291388e9e22d2a2aa1e6cf37b6
|
/src/main/java/austeretony/oxygen_core/client/ClientDataManager.java
|
9949c5dc050ebaac335976ac175499e33631b653
|
[] |
no_license
|
AustereTony-MCMods/Oxygen-Core
|
a1fa6d2e8fcd571f27be7af7c2bf86be1898148a
|
e467f247d2d649fd361cee204fc88482402f7a35
|
refs/heads/master
| 2021-08-15T05:07:56.424901
| 2020-06-22T19:09:42
| 2020-06-22T19:09:42
| 178,548,315
| 10
| 8
| null | 2020-05-29T13:50:16
| 2019-03-30T11:13:01
|
Java
|
UTF-8
|
Java
| false
| false
| 419
|
java
|
package austeretony.oxygen_core.client;
import austeretony.oxygen_core.common.EnumActivityStatus;
import austeretony.oxygen_core.common.main.OxygenMain;
import austeretony.oxygen_core.common.network.server.SPSetActivityStatus;
public class ClientDataManager {
public void changeActivityStatusSynced(EnumActivityStatus status) {
OxygenMain.network().sendToServer(new SPSetActivityStatus(status));
}
}
|
[
"anton.zh-off@yandex.ru"
] |
anton.zh-off@yandex.ru
|
ec0f0b0963f4b3ebda8cc31294cc5ec12c71e3a1
|
1248854bf3924bdad8754137760f7cb30c65eff5
|
/ups-cart-cli/src/main/java/org/jboss/aerogear/unifiedpush/utils/StringPicker.java
|
2f25420ffe13ca89626d3251d060f2c7b5c6c0a2
|
[
"Apache-2.0"
] |
permissive
|
AdamSaleh/aerogear-testing-tools
|
506371aec49179d28fedfcb6149e7bf8b449c698
|
3e103757d3de69ba89bce99389aa0bef5f4ee63e
|
refs/heads/master
| 2021-01-22T06:44:09.099199
| 2014-09-26T15:12:14
| 2014-09-26T15:12:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,554
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* 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.aerogear.unifiedpush.utils;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
/**
* @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a>
*
*/
public class StringPicker implements Picker<String> {
public Set<String> pick(Set<String> elements, int count) throws IllegalArgumentException {
if (elements.size() > count) {
throw new IllegalArgumentException("count of elements to choose is bigger then the size of the set to choose from");
}
List<String> list = new LinkedList<String>(elements);
Collections.shuffle(list);
return new HashSet<String>(list.subList(0, count));
}
}
|
[
"smikloso@redhat.com"
] |
smikloso@redhat.com
|
1e335d6fd9741bf3e0c14bbf5e8438f373188663
|
5c0e9aa1c3a03a0c172c4ed93929ed3a6ed9c3de
|
/src/main/java/com/oldguy/example/modules/sys/dao/entities/UserGroup.java
|
f6349ffcd41ac79545c7df71a1e204298865f849
|
[] |
no_license
|
oldguys/ActivitiDemo
|
71a66f95c1f4dbf7ef60b7f5eccab98829759a14
|
2329f41422ebd6717ab5d059356e74b53098257d
|
refs/heads/master
| 2022-06-02T12:21:09.287362
| 2019-05-24T03:15:14
| 2019-05-24T03:15:14
| 167,945,634
| 38
| 35
| null | 2022-05-20T20:54:35
| 2019-01-28T10:45:41
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 776
|
java
|
package com.oldguy.example.modules.sys.dao.entities;
import com.oldguy.example.modules.common.dao.entities.BaseEntity;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
/**
* @Date: 2019/1/13 0013
* @Author: ren
* @Description:
*/
@Entity
public class UserGroup extends BaseEntity {
private String groupSequence;
private String groupName;
public String getGroupSequence() {
return groupSequence;
}
public void setGroupSequence(String groupSequence) {
this.groupSequence = groupSequence;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
}
|
[
"916812040@qq.com"
] |
916812040@qq.com
|
49df52a1ac03539767e752a4dbb5874798dfac88
|
a62018f4f1cf2792a6b3bd8ed33e157d08621346
|
/ETL/.JETEmitters/src/org/talend/designer/codegen/translators/internet/momandjms/TMomOutputFinallyJava.java
|
884a4a199821d3770b4e30f7080eaf9f317e643a
|
[] |
no_license
|
tomasmalio/ssdBusinessIntelligence
|
0f9d0445871040cc82a17c24982c0d8ed77e1eb1
|
3e701522f3c5a88d0be38ada47831b1c6d767032
|
refs/heads/master
| 2020-03-19T05:33:48.732868
| 2018-06-09T19:30:47
| 2018-06-09T19:30:47
| 135,944,013
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,356
|
java
|
package org.talend.designer.codegen.translators.internet.momandjms;
import org.talend.core.model.process.INode;
import org.talend.designer.codegen.config.CodeGeneratorArgument;
import org.talend.core.model.process.ElementParameterParser;
import java.util.List;
public class TMomOutputFinallyJava
{
protected static String nl;
public static synchronized TMomOutputFinallyJava create(String lineSeparator)
{
nl = lineSeparator;
TMomOutputFinallyJava result = new TMomOutputFinallyJava();
nl = null;
return result;
}
public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + NL + "\tif(resourceMap.get(\"finish_";
protected final String TEXT_3 = "\") == null){" + NL + "\t\tif(resourceMap.get(\"session_";
protected final String TEXT_4 = "\") != null){" + NL + "\t\t\t((javax.jms.Session)resourceMap.get(\"session_";
protected final String TEXT_5 = "\")).rollback();" + NL + "\t \t";
protected final String TEXT_6 = NL + "\t \t\tif(resourceMap.get(\"producer_";
protected final String TEXT_7 = "\") != null){" + NL + "\t\t \t\t((javax.jms.MessageProducer)resourceMap.get(\"producer_";
protected final String TEXT_8 = "\")).close();" + NL + "\t\t\t\t}" + NL + " \t \t \t((javax.jms.Session)resourceMap.get(\"session_";
protected final String TEXT_9 = "\")).close();" + NL + " \t \t \tif(resourceMap.get(\"connection_";
protected final String TEXT_10 = "\") != null){" + NL + "\t \t \t((javax.jms.Connection)resourceMap.get(\"connection_";
protected final String TEXT_11 = "\")).close();" + NL + "\t \t }" + NL + "\t\t\t";
protected final String TEXT_12 = NL + "\t\t}" + NL + "\t}";
protected final String TEXT_13 = NL;
public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(TEXT_1);
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
boolean isUseExistConnection = ("true").equals(ElementParameterParser.getValue(node, "__USE_CONNECTION__"));
String cid = node.getUniqueName();
String serverType=ElementParameterParser.getValue(node, "__SERVER__");
boolean transacted = "true".equals(ElementParameterParser.getValue(node, "__IS_TRANSACTED__"));
String connectionComponentName = ElementParameterParser.getValue(node, "__CONNECTION__");
List<? extends INode> commitNodes=node.getProcess().getNodesOfType("tMomCommit");
List<? extends INode> rollBackNodes=node.getProcess().getNodesOfType("tMomRollback");
boolean isCommitRollback = false;
for(INode cNode:commitNodes){
String cNodeName = ElementParameterParser.getValue(cNode,"__CONNECTION__");
if(cid.equals(cNodeName) || (isUseExistConnection && connectionComponentName.equals(cNodeName))){
isCommitRollback = true;
break;
}
}
if(!isCommitRollback){
for(INode rNode:rollBackNodes){
String rNodeName = ElementParameterParser.getValue(rNode,"__CONNECTION__");
if(cid.equals(rNodeName) || (isUseExistConnection && connectionComponentName.equals(rNodeName))){
isCommitRollback = true;
break;
}
}
}
if (isUseExistConnection) {
for (INode pNode : node.getProcess().getNodesOfType("tMomConnection")) {
if (pNode.getUniqueName().equals(connectionComponentName)) {
transacted = "true".equals(ElementParameterParser.getValue(pNode, "__IS_TRANSACTED__"));
serverType=ElementParameterParser.getValue(pNode, "__SERVER__");
}
}
}
if((("ActiveMQ").equals(serverType)) && !isCommitRollback && transacted){
stringBuffer.append(TEXT_2);
stringBuffer.append(cid);
stringBuffer.append(TEXT_3);
stringBuffer.append(cid);
stringBuffer.append(TEXT_4);
stringBuffer.append(cid);
stringBuffer.append(TEXT_5);
if(!isUseExistConnection){
stringBuffer.append(TEXT_6);
stringBuffer.append(cid);
stringBuffer.append(TEXT_7);
stringBuffer.append(cid);
stringBuffer.append(TEXT_8);
stringBuffer.append(cid);
stringBuffer.append(TEXT_9);
stringBuffer.append(cid);
stringBuffer.append(TEXT_10);
stringBuffer.append(cid);
stringBuffer.append(TEXT_11);
}
stringBuffer.append(TEXT_12);
}
stringBuffer.append(TEXT_13);
return stringBuffer.toString();
}
}
|
[
"tomasmalio@gmail.com"
] |
tomasmalio@gmail.com
|
fa8e613b385451da80ec36ccbe0198e30d56ca75
|
eef4e120557321ef6536479bf0c1ae99a69daf6e
|
/src/main/java/com/example/dao/UtiFactorMapper.java
|
d2348ea24bbc464dbc2b57dfd8cbe2bdf8fed28a
|
[] |
no_license
|
18753377299/MavenSSM
|
9d5bcb7d233ca9782bb1fb2f33d1f054425a8f97
|
5e88d40c4da237b4f3aa6de90f05668acbf83e50
|
refs/heads/master
| 2022-12-26T12:09:53.302420
| 2021-06-03T10:59:01
| 2021-06-03T10:59:01
| 163,417,840
| 0
| 0
| null | 2022-12-16T09:48:36
| 2018-12-28T14:15:39
|
Java
|
UTF-8
|
Java
| false
| false
| 895
|
java
|
package com.example.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.example.vo.UtiFactor;
public interface UtiFactorMapper {
int deleteByPrimaryKey(@Param("riskModel") String riskModel, @Param("factorNo") String factorNo, @Param("dangerType") String dangerType);
int insert(UtiFactor record);
int insertSelective(UtiFactor record);
UtiFactor selectByPrimaryKey(@Param("riskModel") String riskModel, @Param("factorNo") String factorNo, @Param("dangerType") String dangerType);
int updateByPrimaryKeySelective(UtiFactor record);
int updateByPrimaryKey(UtiFactor record);
/**
* @author liqiankun
* @date 创建时间:20190723
* @version 1.0
* @parameter
* @since 查询出UtiFactor的集合
* @return
* */
public List<UtiFactor> getUtiFactorList(Map<String, String> map);
}
|
[
"1733856225@qq.com"
] |
1733856225@qq.com
|
1f1dfe81e733aa55ec32bd4ef4bf665f8bc85110
|
c911cec851122d0c6c24f0e3864cb4c4def0da99
|
/com/google/android/gms/signin/internal/zzg.java
|
3c09f1e5093401e208339661c426182f54d0e621
|
[] |
no_license
|
riskyend/PokemonGo_RE_0.47.1
|
3a468ad7b6fbda5b4f8b9ace30447db2211fc2ed
|
2ca0c6970a909ae5e331a2430f18850948cc625c
|
refs/heads/master
| 2020-01-23T22:04:35.799795
| 2016-11-19T01:01:46
| 2016-11-19T01:01:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,899
|
java
|
package com.google.android.gms.signin.internal;
import android.accounts.Account;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzg
implements Parcelable.Creator<RecordConsentRequest>
{
static void zza(RecordConsentRequest paramRecordConsentRequest, Parcel paramParcel, int paramInt)
{
int i = zzb.zzaq(paramParcel);
zzb.zzc(paramParcel, 1, paramRecordConsentRequest.mVersionCode);
zzb.zza(paramParcel, 2, paramRecordConsentRequest.getAccount(), paramInt, false);
zzb.zza(paramParcel, 3, paramRecordConsentRequest.zzCj(), paramInt, false);
zzb.zza(paramParcel, 4, paramRecordConsentRequest.zzmb(), false);
zzb.zzI(paramParcel, i);
}
public RecordConsentRequest zzgD(Parcel paramParcel)
{
String str = null;
int j = zza.zzap(paramParcel);
int i = 0;
Object localObject2 = null;
Object localObject1 = null;
if (paramParcel.dataPosition() < j)
{
int k = zza.zzao(paramParcel);
Object localObject3;
switch (zza.zzbM(k))
{
default:
zza.zzb(paramParcel, k);
localObject3 = localObject2;
localObject2 = localObject1;
localObject1 = localObject3;
}
for (;;)
{
localObject3 = localObject2;
localObject2 = localObject1;
localObject1 = localObject3;
break;
i = zza.zzg(paramParcel, k);
localObject3 = localObject1;
localObject1 = localObject2;
localObject2 = localObject3;
continue;
localObject3 = (Account)zza.zza(paramParcel, k, Account.CREATOR);
localObject1 = localObject2;
localObject2 = localObject3;
continue;
localObject3 = (Scope[])zza.zzb(paramParcel, k, Scope.CREATOR);
localObject2 = localObject1;
localObject1 = localObject3;
continue;
str = zza.zzp(paramParcel, k);
localObject3 = localObject1;
localObject1 = localObject2;
localObject2 = localObject3;
}
}
if (paramParcel.dataPosition() != j) {
throw new zza.zza("Overread allowed size end=" + j, paramParcel);
}
return new RecordConsentRequest(i, (Account)localObject1, (Scope[])localObject2, str);
}
public RecordConsentRequest[] zzjr(int paramInt)
{
return new RecordConsentRequest[paramInt];
}
}
/* Location: /Users/mohamedtajjiou/Downloads/Rerverse Engeneering/dex2jar-2.0/com.nianticlabs.pokemongo_0.47.1-2016111700_minAPI19(armeabi-v7a)(nodpi)_apkmirror.com (1)-dex2jar.jar!/com/google/android/gms/signin/internal/zzg.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030"
] |
mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030
|
4d8f3b49e20a61544cc4037aeadb5da62c7e52be
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/cms-20190101/src/main/java/com/aliyun/cms20190101/models/PutLogMonitorResponseBody.java
|
9fd2e7d5e6c34b40ecd8bf0c28b79be162ab9e22
|
[
"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,864
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cms20190101.models;
import com.aliyun.tea.*;
public class PutLogMonitorResponseBody extends TeaModel {
/**
* <p>The name of the Log Service Logstore.</p>
*/
@NameInMap("Code")
public String code;
@NameInMap("LogId")
public String logId;
/**
* <p>The ID of the request.</p>
*/
@NameInMap("Message")
public String message;
/**
* <p>For more information about common request parameters, see [Common parameters](~~199331~~).</p>
*/
@NameInMap("RequestId")
public String requestId;
@NameInMap("Success")
public Boolean success;
public static PutLogMonitorResponseBody build(java.util.Map<String, ?> map) throws Exception {
PutLogMonitorResponseBody self = new PutLogMonitorResponseBody();
return TeaModel.build(map, self);
}
public PutLogMonitorResponseBody setCode(String code) {
this.code = code;
return this;
}
public String getCode() {
return this.code;
}
public PutLogMonitorResponseBody setLogId(String logId) {
this.logId = logId;
return this;
}
public String getLogId() {
return this.logId;
}
public PutLogMonitorResponseBody setMessage(String message) {
this.message = message;
return this;
}
public String getMessage() {
return this.message;
}
public PutLogMonitorResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public PutLogMonitorResponseBody setSuccess(Boolean success) {
this.success = success;
return this;
}
public Boolean getSuccess() {
return this.success;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f9ca6d0300365c861cfcee84d6cecc3b9942b7c5
|
d494f28985ac0145f8c39f92bb250e9fb2db9857
|
/app/src/main/java/zrock/application/engine/app/plugin/AppsPackNames.java
|
33459d7c0e53fe6aa54d21f0642a28c6ad0c7cbc
|
[
"MIT"
] |
permissive
|
dotfeng/ZROCK_APPLICATION
|
88ca94989ca67b0e176f0200bb4bad0ab5cc71d2
|
30b3a9de139c3a80625cb1b7d0c5d604396f6d94
|
refs/heads/master
| 2022-04-04T20:08:00.172537
| 2020-02-16T22:58:05
| 2020-02-16T22:58:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,329
|
java
|
package zrock.application.engine.app.plugin;
import zrock.application.R;
public class AppsPackNames {
//DREAMME APPLICATION
public static final String DREAMME = "com.dreamme";
public static final String ASEPMO = "com.asepmo";
public static final String ONTRICK = "com.ontrick";
public static final String ANDROWEB = "com.androweb";
public static final String TRACKME = "com.trackme";
public static final String MONEYCHARGER = "com.money.charger";
public static final String TKRAMAT = "com.tkramat";
public static final String FIRDAUSCITY = "com.firdaus.city";
//MEDIA SOCIAL
public static final String FACEBOOK = "com.facebook.katana";
public static final String FACEBOOK_MESSENGER = "com.facebook.orca";
public static final String FACEBOOK_LITE = "com.facebook.lite";
public static final String FACEBOOK_MENTIONS = "com.facebook.Mentions";
public static final String FACEBOOK_GROUPS = "com.facebook.groups";
public static final String FACEBOOK_PAGES_MANAGER = "com.facebook.pages.app";
public static final String MSQRD = "me.msqrd.android";
public static final String WHATSAPP = "com.whatsapp";
public static final String VIBER = "com.viber.voip";
public static final String TELEGRAM = "org.telegram.messenger";
public static final String GOOGLE = "com.google.android.googlequicksearchbox";
public static final String CHROME = "com.android.chrome";
public static final String GOOGLE_DRIVE = "com.google.android.apps.docs";
public static final String GOOGLE_TRANSLATE = "com.google.android.apps.translate";
public static final String GOOGLE_CALENDAR = "com.google.android.calendar";
public static final String GMAIL = "com.google.android.gm";
public static final String YOUTUBE = "com.google.android.youtube";
public static final String GOOGLE_MAPS = "com.google.android.apps.maps";
public static final String GOOGLE_DOCS = "com.google.android.apps.docs.editors.docs";
public static final String GOOGLE_SHEETS = "com.google.android.apps.docs.editors.sheets";
public static final String HANGOUTS = "com.google.android.talk";
public static final String GOOGLE_ALLO = "com.google.android.apps.fireball";
public static final String CLEAN_MASTER = "com.cleanmaster.mguard";
public static final String UBER = "com.ubercab";
public static final String LYFT = "me.lyft.android";
public static final String DUBSMASH = "com.mobilemotion.dubsmash";
public static final String SNAPCHAT = "com.snapchat.android";
public static final String NETFLIX = "com.netflix.mediaclient";
public static final String QUORA = "com.quora.android";
public static final String LINKEDIN = "com.linkedin.android";
public static final String PINTEREST = "com.pinterest";
public static final String TUMBLR = "com.tumblr";
//ROOT TOOLS
public static final String TERMUX = "com.termux";
public static final String TERMINAL_EMULATOR = "jackpal.androidterm";
public static final String EXPOSED_FRAMEWORK = "de.robv.android.xposed.installer";
public static final String VIPER4ANDROID = "com.vipercn.viper4android_v2";
//SUPERSU
public static final String SUPERSU = "eu.chainfire.supersu";
public static final String KINGOUSER = "kingoroot.supersu";
public static final String MAGISK = "com.topojhonwu.magisk";
}
|
[
"asepmo.story@gmail.com"
] |
asepmo.story@gmail.com
|
e24e7c8cd6c214ac64d96f2b6bd1831791a7802d
|
7569f9a68ea0ad651b39086ee549119de6d8af36
|
/cocoon-2.1.9/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/Renderer.java
|
fd5e46a51c6cd41e8ab9be09e1bae5a35b2b5a49
|
[
"Apache-2.0"
] |
permissive
|
tpso-src/cocoon
|
844357890f8565c4e7852d2459668ab875c3be39
|
f590cca695fd9930fbb98d86ae5f40afe399c6c2
|
refs/heads/master
| 2021-01-10T02:45:37.533684
| 2015-07-29T18:47:11
| 2015-07-29T18:47:11
| 44,549,791
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,687
|
java
|
/*
* Copyright 1999-2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.portal.layout.renderer;
import java.util.Iterator;
import org.apache.avalon.framework.component.Component;
import org.apache.cocoon.portal.PortalService;
import org.apache.cocoon.portal.layout.Layout;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
/**
* A renderer is responsible for rendering a layout object.
*
* @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
* @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
*
* @version CVS $Id: Renderer.java 30932 2004-07-29 17:35:38Z vgritsenko $
*/
public interface Renderer
extends Component {
String ROLE = Renderer.class.getName();
/**
* Stream out raw layout
*/
void toSAX(Layout layout, PortalService service, ContentHandler handler)
throws SAXException;
/**
* Return the aspects required for this renderer.
* This method always returns an iterator even if no descriptions are
* available.
*/
Iterator getAspectDescriptions();
}
|
[
"ms@tpso.com"
] |
ms@tpso.com
|
2aad9418de11cb34ecac01d8ef3684c9af96daf5
|
0582327e7630566f156e844f7ee909c091c9830b
|
/src/main/java/org/codelibs/fione/h2o/bindings/pojos/ModelParametersFoldAssignmentScheme.java
|
d219a133f253fde3318f5ad489497f7e5b3739ac
|
[
"Apache-2.0"
] |
permissive
|
codelibs/fione
|
54ffd0660539bf9779fde2482236f857c2603abb
|
6ff2bf2a2eb62e4f242fb42ce1939bf2807bbd56
|
refs/heads/master
| 2023-08-24T07:28:33.234367
| 2023-05-20T13:14:44
| 2023-05-20T13:14:44
| 229,847,242
| 13
| 1
|
Apache-2.0
| 2022-04-24T09:03:26
| 2019-12-24T01:20:10
|
Java
|
UTF-8
|
Java
| false
| false
| 759
|
java
|
/*
* Copyright 2012-2023 CodeLibs Project and the Others.
*
* 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.codelibs.fione.h2o.bindings.pojos;
public enum ModelParametersFoldAssignmentScheme {
AUTO, Modulo, Random, Stratified,
}
|
[
"shinsuke@apache.org"
] |
shinsuke@apache.org
|
0a2dc55dc85fa6e79dd548d1d7e732e7ed2f0d77
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/ActiveMQ/942_1.java
|
cc739610164122f11eed938cebbad299a96fcf7c
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
//,temp,AMQ4563Test.java,97,117,temp,AMQ4563Test.java,74,95
//,3
public class xxx {
@Test(timeout = 60000)
public void testSelectingOnActiveMQMessageID() throws Exception {
ActiveMQAdmin.enableJMSFrameTracing();
assertTrue(brokerService.isPersistent());
Connection connection = createAMQConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination = session.createQueue(name.getMethodName());
MessageProducer p = session.createProducer(destination);
TextMessage message = session.createTextMessage();
String messageText = "Hello sent at " + new java.util.Date().toString();
message.setText(messageText);
p.send(message);
// Restart broker.
restartBroker(connection, session);
String selector = "JMSMessageID = '" + message.getJMSMessageID() + "'";
LOG.info("Using selector: {}", selector);
int messagesReceived = readAllMessages(name.getMethodName(), selector);
assertEquals(1, messagesReceived);
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
32e95a0f5ff07e5b6301e13b4a0a6a88130fd7af
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/PMD/rev5929-6296/right-trunk-6296/src/net/sourceforge/pmd/util/viewer/gui/ASTPanel.java
|
75e77c74e78f7fe274a92f2e79000154a995b698
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,987
|
java
|
package net.sourceforge.pmd.util.viewer.gui;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.LinkedList;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.util.viewer.gui.menu.ASTNodePopupMenu;
import net.sourceforge.pmd.util.viewer.model.ASTModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModel;
import net.sourceforge.pmd.util.viewer.model.ViewerModelEvent;
import net.sourceforge.pmd.util.viewer.model.ViewerModelListener;
import net.sourceforge.pmd.util.viewer.util.NLS;
public class ASTPanel extends JPanel implements ViewerModelListener, TreeSelectionListener {
private ViewerModel model;
private JTree tree;
public ASTPanel(ViewerModel model) {
this.model = model;
init();
}
private void init() {
model.addViewerModelListener(this);
setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), NLS.nls("AST.PANEL.TITLE")));
setLayout(new BorderLayout());
tree = new JTree((TreeNode) null);
tree.addTreeSelectionListener(this);
tree.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) {
TreePath path = tree.getClosestPathForLocation(e.getX(), e.getY());
tree.setSelectionPath(path);
JPopupMenu menu = new ASTNodePopupMenu(model, (Node) path.getLastPathComponent());
menu.show(tree, e.getX(), e.getY());
}
}
});
add(new JScrollPane(tree), BorderLayout.CENTER);
}
public void viewerModelChanged(ViewerModelEvent e) {
switch (e.getReason()) {
case ViewerModelEvent.CODE_RECOMPILED:
tree.setModel(new ASTModel(model.getRootNode()));
break;
case ViewerModelEvent.NODE_SELECTED:
if (e.getSource() != this) {
LinkedList<Node> list = new LinkedList<Node>();
for (Node n = (Node) e.getParameter(); n != null; n = n.jjtGetParent()) {
list.addFirst(n);
}
TreePath path = new TreePath(list.toArray());
tree.setSelectionPath(path);
tree.scrollPathToVisible(path);
}
break;
default:
break;
}
}
public void valueChanged(TreeSelectionEvent e) {
model.selectNode((Node) e.getNewLeadSelectionPath().getLastPathComponent(), this);
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
0b3eef3200cb2788a9c2be2ee992750628e039a1
|
b6e0241c63ed72285a50667b9391c5da3d51a730
|
/libnetwork/src/main/java/tim/com/libnetwork/network/okhttp/RequestBuilder.java
|
ae58ed80dc9883883761dc884fd348dcb8a3c85b
|
[] |
no_license
|
tim343Team/base
|
321a19cb93c1c64ac9e414cba9100335588c2303
|
48908557325c25ba6efc7eff84b5f5517d3e91ba
|
refs/heads/master
| 2023-06-09T09:31:27.349807
| 2023-06-03T15:04:35
| 2023-06-03T15:04:35
| 239,918,743
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 638
|
java
|
package tim.com.libnetwork.network.okhttp;
import java.io.File;
import java.util.Map;
/**
* ${description}
*
* @author weiqiliu
* @version 1.0 2020/4/13
*/
public abstract class RequestBuilder {
protected String url;
protected Map<String, String> params;
protected Map<String, String> headers;
public abstract RequestBuilder url(String url);
public abstract RequestCall build();
public abstract RequestBuilder addParams(String key, String val);
public abstract RequestBuilder addHeader(String key, String val);
public abstract RequestBuilder addFile(String name, String filename, File file);
}
|
[
"“liuweiqitim@gmail.com”"
] |
“liuweiqitim@gmail.com”
|
ac3d472c5d7e63d0f097085680323c89f979f35e
|
fea21b14689de093cf3d5119e31dce33c5a95684
|
/src/main/java/com/marlonquenoran/ecommerce/service/UploadFileService.java
|
4542355e78362fdf1e002fac61ff135462615150
|
[] |
no_license
|
Marlon1004/tienda-licores
|
f76072cd7bc1441a45b46c597471720d84c2882a
|
7796736ee50f29df1e74005193f2fb933c917d8a
|
refs/heads/main
| 2023-04-18T01:23:52.627624
| 2021-04-25T20:05:21
| 2021-04-25T20:05:21
| 360,777,749
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 801
|
java
|
package com.marlonquenoran.ecommerce.service;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@Service
public class UploadFileService {
private String folder="images//";
public String saveImage(MultipartFile file) throws IOException {
if (!file.isEmpty()) {
byte [] bytes= file.getBytes();
Path path=Paths.get(folder+file.getOriginalFilename());
Files.write(path, bytes);
return file.getOriginalFilename();
}
return "default.jpg";
}
public void deleteimage(String nombre) {
String ruta="images//";
File file=new File(ruta+nombre);
file.delete();
}
}
|
[
"you@example.com"
] |
you@example.com
|
90ddcbffbd9a98703351bcb1676ca1c6a11d7d65
|
6a1514aa5a8ffd3873d990002ca6336241d9ec75
|
/attemper-config/src/main/java/com/github/attemper/config/base/service/ApiLogService.java
|
db0ee7514b27295b123f15bda373c22aa16398e0
|
[
"MIT"
] |
permissive
|
xpwdm2020/attemper
|
d8310faa66b80b8c1514113ef88d5188b3391623
|
4f2796fd0f8d69f9faf5b2305b7784f9ae19ed2f
|
refs/heads/master
| 2022-11-24T05:06:50.276473
| 2020-07-31T08:00:22
| 2020-07-31T08:00:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package com.github.attemper.config.base.service;
import com.github.attemper.config.base.annotation.MultiDataSource;
import com.github.attemper.config.base.dao.ApiLogMapper;
import com.github.attemper.config.base.entity.ApiLog;
import org.apache.commons.lang.StringUtils;
import org.camunda.bpm.engine.impl.cfg.IdGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class ApiLogService {
@Autowired
private IdGenerator idGenerator;
@Autowired
private ApiLogMapper mapper;
@Transactional
@Async
@MultiDataSource
public void save(ApiLog apiLog){
if (StringUtils.length(apiLog.getParam()) > 2000) {
apiLog.setParam(apiLog.getParam().substring(0, 2000));
}
if (StringUtils.length(apiLog.getResult()) > 2000) {
apiLog.setResult(apiLog.getResult().substring(0, 2000));
}
if (StringUtils.length(apiLog.getMsg()) > 2000) {
apiLog.setMsg(apiLog.getMsg().substring(0, 2000));
}
apiLog.setId(idGenerator.getNextId());
mapper.add(apiLog);
}
}
|
[
"820704815@qq.com"
] |
820704815@qq.com
|
406a855a6e8cf19189acb36553d30bde9793128a
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--dubbo/35cde9f740ead031b74b725611442f548a811f6f/after/AbstractInvoker.java
|
7b916af959f7fddf859b4d60b6966c5e62c96840
|
[] |
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
| 5,302
|
java
|
/*
* Copyright 1999-2011 Alibaba Group.
*
* 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.dubbo.rpc.protocol;
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.Version;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.RpcContext;
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.Invocation;
import com.alibaba.dubbo.rpc.Result;
import com.alibaba.dubbo.rpc.RpcInvocation;
import com.alibaba.dubbo.rpc.RpcResult;
/**
* AbstractInvoker.
*
* @author qian.lei
* @author william.liangf
*/
public abstract class AbstractInvoker<T> implements Invoker<T> {
protected final Logger logger = LoggerFactory.getLogger(getClass());
private final Class<T> type;
private final URL url;
private final Map<String, String> attachment;
private volatile boolean available = true;
private volatile boolean destroyed = false;
public AbstractInvoker(Class<T> type, URL url){
this(type, url, (Map<String, String>) null);
}
public AbstractInvoker(Class<T> type, URL url, String[] keys) {
this(type, url, convertAttachment(url, keys));
}
public AbstractInvoker(Class<T> type, URL url, Map<String, String> attachment) {
if (type == null)
throw new IllegalArgumentException("service type == null");
if (url == null)
throw new IllegalArgumentException("service url == null");
this.type = type;
this.url = url;
this.attachment = attachment == null ? null : Collections.unmodifiableMap(attachment);
}
private static Map<String, String> convertAttachment(URL url, String[] keys) {
if (keys == null || keys.length == 0) {
return null;
}
Map<String, String> attachment = new HashMap<String, String>();
for (String key : keys) {
String value = url.getParameter(key);
if (value != null && value.length() > 0) {
attachment.put(key, value);
}
}
return attachment;
}
public Class<T> getInterface() {
return type;
}
public URL getUrl() {
return url;
}
public boolean isAvailable() {
return available;
}
protected void setAvailable(boolean available) {
this.available = available;
}
public void destroy() {
if (isDestroyed()) {
return;
}
destroyed = true;
setAvailable(false);
}
public boolean isDestroyed() {
return destroyed;
}
public String toString() {
return getInterface() + " -> " + getUrl()==null?" ":getUrl().toString();
}
public Result invoke(Invocation inv) throws RpcException {
if(destroyed) {
throw new RpcException("Rpc invoker for service " + this + " on consumer " + NetUtils.getLocalHost()
+ " use dubbo version " + Version.getVersion()
+ " is DESTROYED, can not be invoked any more!");
}
RpcInvocation invocation = (RpcInvocation) inv;
invocation.setInvoker(this);
Map<String, String> attachments = new HashMap<String, String>();
if (attachment != null && attachment.size() > 0) {
attachments.putAll(attachment);
}
Map<String, String> context = RpcContext.getContext().getAttachments();
if (context != null) {
attachments.putAll(context);
}
if (invocation.getAttachments() != null) {
attachments.putAll(invocation.getAttachments());
}
invocation.setAttachments(attachments);
try {
return doInvoke(invocation);
} catch (InvocationTargetException e) { // biz exception
Throwable te = e.getTargetException();
if (te == null) {
return new RpcResult(e);
} else {
if (te instanceof RpcException) {
((RpcException) te).setCode(RpcException.BIZ_EXCEPTION);
}
return new RpcResult(te);
}
} catch (RpcException e) {
if (e.isBiz()) {
return new RpcResult(e);
} else {
throw e;
}
} catch (Throwable e) {
return new RpcResult(e);
}
}
protected abstract Result doInvoke(Invocation invocation) throws Throwable;
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
f51c208680e35820db632414aaa604cace768f98
|
cebcbce25584aafde76140f967bfee12fc4c8687
|
/src/main/java/uk/q3c/krail/i18n/Messages_de.java
|
d34a335c367cdee6a44b5f8e1baaf7c5f8b9a989
|
[] |
no_license
|
kidaak/krail
|
cb8ac4cf1c97622313ddaf9dd632b79af17c5337
|
5873957a93fce676c3d4451b915912b7295355ec
|
refs/heads/master
| 2021-01-16T20:58:42.166622
| 2015-08-09T22:42:47
| 2015-08-09T22:42:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,538
|
java
|
/*
* Copyright (C) 2013 David Sowerby
*
* 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 uk.q3c.krail.i18n;
/**
* The base for the resource bundle of {@link Messages_de}. The separation between them is arbitrary, but helps break
* down
* what could other wise be long lists, and only one of them needs to look up parameter values:
* <ol>
* <li>{@link Labels} : short, usually one or two words, no parameters, generally used as captions
* <li>{@link Descriptions} : longer, typically several words, no parameters, generally used in tooltips
* <li>{@link Messages_de} : contains parameters, typically used for user messages.
*
* @author David Sowerby 3 Aug 2013
*/
public class Messages_de extends Messages {
@Override
protected void loadMap() {
put(MessageKey.Invalid_URI, "{0} ist keine gültige Seite");
put(MessageKey.Service_not_Started, "Der Service {0} kann nicht benutzt werden bis er gestartet ist");
put(MessageKey.Locale_Change, "Sprache und Land nach {0} geändert");
}
}
|
[
"david.sowerby@virgin.net"
] |
david.sowerby@virgin.net
|
023dc3f145f840a775c922ddd31b024095dd6764
|
604e715c03b75cd33d3795b1fb652b501a84c6d1
|
/Mobile App/HeartRateMonitor/sources/com/google/appinventor/components/common/EndedStatus.java
|
d23f046971e521479ddccd9204690cbc9a6f3cfd
|
[] |
no_license
|
aish21/CE3002-Sensors-Lab
|
902ad691acd208e30e47a40c799bfcb5731bfc86
|
eb0c9cf0f3d3a9b5d63336057ff95c0a00ec3507
|
refs/heads/main
| 2023-08-18T19:25:04.338391
| 2021-10-11T08:21:57
| 2021-10-11T08:21:57
| 415,335,117
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.google.appinventor.components.common;
import java.util.HashMap;
import java.util.Map;
public enum EndedStatus implements OptionList<Integer> {
IncomingRejected(1),
IncomingEnded(2),
OutgoingEnded(3);
private static final Map<Integer, EndedStatus> lookup = null;
private final int value;
static {
int i;
lookup = new HashMap();
for (EndedStatus status : values()) {
lookup.put(status.toUnderlyingValue(), status);
}
}
private EndedStatus(int status) {
this.value = status;
}
public Integer toUnderlyingValue() {
return Integer.valueOf(this.value);
}
public static EndedStatus fromUnderlyingValue(Integer status) {
return lookup.get(status);
}
}
|
[
"aish.akshu@gmail.com"
] |
aish.akshu@gmail.com
|
4c86caceeac9ab5b8c4646741175e8707062ae51
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/videox/fragment/liveroom/functional_division/top_info/p2090a/OnAnchorNetChangeEvent.java
|
3ba1fb20a0cd05431a5ec8e51a1a08585b18dd68
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package com.zhihu.android.videox.fragment.liveroom.functional_division.top_info.p2090a;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.zhmlv.p2139a.MLBQuality;
import kotlin.Metadata;
import kotlin.p2243e.p2245b.C32569u;
@Metadata
/* renamed from: com.zhihu.android.videox.fragment.liveroom.functional_division.top_info.a.a */
/* compiled from: OnAnchorNetChangeEvent.kt */
public final class OnAnchorNetChangeEvent {
/* renamed from: a */
private final MLBQuality f99025a;
public OnAnchorNetChangeEvent(MLBQuality fVar) {
C32569u.m150519b(fVar, C6969H.m41409d("G7896D416B624B2"));
this.f99025a = fVar;
}
/* renamed from: a */
public final MLBQuality mo119922a() {
return this.f99025a;
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
353b5b09ece9fda0e9c5a6fffd016e1f9733dd93
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/23/23_020cebd3e2d24caaf9b32898876108de5a6f7ef8/ContextNameCheckUtility/23_020cebd3e2d24caaf9b32898876108de5a6f7ef8_ContextNameCheckUtility_s.java
|
96a68b9b0c326df2c8bfadef511a4b00f48b01f1
|
[] |
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
| 2,794
|
java
|
/**
* Copyright (C) 2011 (nick @ objectdefinitions.com)
*
* This file is part of JTimeseries.
*
* JTimeseries is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* JTimeseries 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 JTimeseries. If not, see <http://www.gnu.org/licenses/>.
*/
package com.od.jtimeseries.ui.util;
import com.od.jtimeseries.util.identifiable.Identifiable;
import com.od.jtimeseries.util.identifiable.IdentifiablePathUtils;
import javax.swing.*;
import java.awt.*;
/**
* Created by IntelliJ IDEA.
* User: Nick Ebbutt
* Date: 30/03/11
* Time: 06:13
*/
public class ContextNameCheckUtility {
/**
* @return String valid name, or null if User cancelled request for new name
*/
public static String getNameFromUser(Component parent, Identifiable targetContext, String text, String title, String defaultName) {
Object userInput = JOptionPane.showInputDialog(SwingUtilities.windowForComponent(parent), text, title, JOptionPane.QUESTION_MESSAGE, null, null, defaultName);
String result = null;
if ( userInput != null) {
result = userInput.toString();
result = result.trim();
result = result.length() == 0 ? defaultName : result;
result = checkName(parent, targetContext, result);
}
return result;
}
/**
* Check the suggested name is valid, and not a duplicate of an existing identifiable within this targetContext
* If required, prompt the user for an alternative name
* @return String valid name, or null if User cancelled request for new name
*/
public static String checkName(Component parentComponent, Identifiable targetContext, String name) {
String nameProblem = IdentifiablePathUtils.checkId(name);
if ( nameProblem != null) {
name = getNameFromUser(parentComponent, targetContext, nameProblem + ", please correct the name", "Invalid Name", name);
} else if ( targetContext.contains(name) ) {
name = getNameFromUser(parentComponent, targetContext, "Duplicate name, please choose another", "Duplicate Name", name + "_copy");
}
return name;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1ce23424352ecba1a2a604b636eaa588f1ce7f0e
|
426040f19e4ab0abb5977e8557451cfd94bf6c2d
|
/apks/aldi/src/com/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory.java
|
d1fe3461d0cd04126d956411833096e6c2545a29
|
[] |
no_license
|
kmille/android-pwning
|
0e340965f4c27dfc9df6ecadddd124448e6cec65
|
e82b96d484e618fe8b2c3f8ff663e74f793541b8
|
refs/heads/master
| 2020-05-09T17:22:54.876992
| 2020-04-06T18:04:16
| 2020-04-06T18:04:16
| 181,300,145
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,441
|
java
|
package com.google.gson.internal.bind;
import com.google.gson.Gson;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonSerializer;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.internal.ConstructorConstructor;
import com.google.gson.internal.ObjectConstructor;
import com.google.gson.reflect.TypeToken;
public final class JsonAdapterAnnotationTypeAdapterFactory
implements TypeAdapterFactory
{
private final ConstructorConstructor constructorConstructor;
public JsonAdapterAnnotationTypeAdapterFactory(ConstructorConstructor paramConstructorConstructor)
{
this.constructorConstructor = paramConstructorConstructor;
}
public final <T> TypeAdapter<T> create(Gson paramGson, TypeToken<T> paramTypeToken)
{
JsonAdapter localJsonAdapter = (JsonAdapter)paramTypeToken.getRawType().getAnnotation(JsonAdapter.class);
if (localJsonAdapter == null) {
return null;
}
return getTypeAdapter(this.constructorConstructor, paramGson, paramTypeToken, localJsonAdapter);
}
final TypeAdapter<?> getTypeAdapter(ConstructorConstructor paramConstructorConstructor, Gson paramGson, TypeToken<?> paramTypeToken, JsonAdapter paramJsonAdapter)
{
Object localObject = paramConstructorConstructor.get(TypeToken.get(paramJsonAdapter.value())).construct();
if ((localObject instanceof TypeAdapter))
{
paramConstructorConstructor = (TypeAdapter)localObject;
}
else if ((localObject instanceof TypeAdapterFactory))
{
paramConstructorConstructor = ((TypeAdapterFactory)localObject).create(paramGson, paramTypeToken);
}
else
{
boolean bool = localObject instanceof JsonSerializer;
if ((!bool) && (!(localObject instanceof JsonDeserializer)))
{
paramConstructorConstructor = new StringBuilder("Invalid attempt to bind an instance of ");
paramConstructorConstructor.append(localObject.getClass().getName());
paramConstructorConstructor.append(" as a @JsonAdapter for ");
paramConstructorConstructor.append(paramTypeToken.toString());
paramConstructorConstructor.append(". @JsonAdapter value must be a TypeAdapter, TypeAdapterFactory, JsonSerializer or JsonDeserializer.");
throw new IllegalArgumentException(paramConstructorConstructor.toString());
}
JsonDeserializer localJsonDeserializer = null;
if (bool) {
paramConstructorConstructor = (JsonSerializer)localObject;
} else {
paramConstructorConstructor = null;
}
if ((localObject instanceof JsonDeserializer)) {
localJsonDeserializer = (JsonDeserializer)localObject;
}
paramConstructorConstructor = new TreeTypeAdapter(paramConstructorConstructor, localJsonDeserializer, paramGson, paramTypeToken, null);
}
paramGson = paramConstructorConstructor;
if (paramConstructorConstructor != null)
{
paramGson = paramConstructorConstructor;
if (paramJsonAdapter.nullSafe()) {
paramGson = paramConstructorConstructor.nullSafe();
}
}
return paramGson;
}
}
/* Location: /home/kmille/projects/android-pwning/apks/aldi/ALDI TALK_v6.2.1_apkpure.com-dex2jar.jar!/com/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"christian.schneider@androidloves.me"
] |
christian.schneider@androidloves.me
|
2b2c6a2ad740f476aa827a387216a6b423250982
|
dd90264bbfb79700d1d32effc207b555c29f3bcf
|
/2018-work/fiance_miscroservice/miscroservice_user/src/main/java/com/finace/miscroservice/user/entity/Account.java
|
42ec1a04cc5f41c84259095e1c965913b248c0bc
|
[] |
no_license
|
tomzhang/other_workplace
|
8cead3feda7e9f067412da8252d83da56a000b51
|
9b5beaf4ed3586e6037bd84968c6a407a8635e16
|
refs/heads/master
| 2020-04-22T22:18:23.913665
| 2019-01-26T03:36:19
| 2019-01-26T03:36:19
| 170,703,419
| 1
| 0
| null | 2019-02-14T14:23:21
| 2019-02-14T14:23:20
| null |
UTF-8
|
Java
| false
| false
| 2,041
|
java
|
package com.finace.miscroservice.user.entity;
/**
* Created by hyf on 2018/3/7.
*/
public class Account extends BaseEntity {
private int id;
/**
* account.user_id
* 用户名称
*/
private int userId;
/**
* account.hongbao
*
*/
private double hongbao;
/**
* account.total
* 资金总额
*/
private double total;
/**
* account.use_money
*
*/
private double useMoney;
/**
* account.no_use_money
*
*/
private double noUseMoney;
/**
* account.collection
*
*/
private double collection;
public Account() {
}
public Account(int id, int userId, double hongbao, double total, double useMoney, double noUseMoney, double collection) {
this.id = id;
this.userId = userId;
this.hongbao = hongbao;
this.total = total;
this.useMoney = useMoney;
this.noUseMoney = noUseMoney;
this.collection = collection;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public double getHongbao() {
return hongbao;
}
public void setHongbao(double hongbao) {
this.hongbao = hongbao;
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public double getUseMoney() {
return useMoney;
}
public void setUseMoney(double useMoney) {
this.useMoney = useMoney;
}
public double getNoUseMoney() {
return noUseMoney;
}
public void setNoUseMoney(double noUseMoney) {
this.noUseMoney = noUseMoney;
}
public double getCollection() {
return collection;
}
public void setCollection(double collection) {
this.collection = collection;
}
}
|
[
"Pj879227577"
] |
Pj879227577
|
5cd238e3d64950245bee8f6b83260b5680733010
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/validation/retrofit2/adapter/rxjava2/MaybeWithSchedulerTest.java
|
1f41c01338c52104f8e51cbe6f960fea53fa160f
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,423
|
java
|
/**
* Copyright (C) 2016 Square, Inc.
*
* 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 retrofit2.adapter.rxjava2;
import io.reactivex.Maybe;
import io.reactivex.schedulers.TestScheduler;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.Response;
import retrofit2.http.GET;
public final class MaybeWithSchedulerTest {
@Rule
public final MockWebServer server = new MockWebServer();
@Rule
public final RecordingMaybeObserver.Rule observerRule = new RecordingMaybeObserver.Rule();
interface Service {
@GET("/")
Maybe<String> body();
@GET("/")
Maybe<Response<String>> response();
@GET("/")
Maybe<Result<String>> result();
}
private final TestScheduler scheduler = new TestScheduler();
private MaybeWithSchedulerTest.Service service;
@Test
public void bodyUsesScheduler() {
server.enqueue(new MockResponse());
RecordingMaybeObserver<Object> observer = observerRule.create();
service.body().subscribe(observer);
observer.assertNoEvents();
scheduler.triggerActions();
observer.assertAnyValue();
}
@Test
public void responseUsesScheduler() {
server.enqueue(new MockResponse());
RecordingMaybeObserver<Object> observer = observerRule.create();
service.response().subscribe(observer);
observer.assertNoEvents();
scheduler.triggerActions();
observer.assertAnyValue();
}
@Test
public void resultUsesScheduler() {
server.enqueue(new MockResponse());
RecordingMaybeObserver<Object> observer = observerRule.create();
service.result().subscribe(observer);
observer.assertNoEvents();
scheduler.triggerActions();
observer.assertAnyValue();
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
b5915deb0ef0f21f086ad202a8435fd259808355
|
1e99f7453bdc738ed130e51d3e76aac30a0077da
|
/SlideshowFX-ui-controls/src/main/java/com/twasyl/slideshowfx/ui/controls/PluginFileButton.java
|
0ab15a308e3fd2416d2914cff184247f55962fcc
|
[
"Apache-2.0"
] |
permissive
|
xylo/SlideshowFX
|
f1aa88d1579229056220e8629c5990b2c2944efb
|
5ea6e2cfd459bff746d4c863a98dc5dfb4b59523
|
refs/heads/master
| 2020-06-22T19:00:44.640683
| 2016-11-05T17:23:31
| 2016-11-05T17:23:31
| 74,581,125
| 0
| 0
| null | 2016-11-23T13:50:42
| 2016-11-23T13:50:41
| null |
UTF-8
|
Java
| false
| false
| 7,470
|
java
|
package com.twasyl.slideshowfx.ui.controls;
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.Tooltip;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.scene.text.TextAlignment;
import java.io.*;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Implementation of a {@link ToggleButton} representing a file of a plugin. The button has a CSS class named
* {@code plugin-file-button}.
*
* @author Thierry Wasylczenko
* @version 1.0
* @since SlideshowFX 1.1
*/
public class PluginFileButton extends ToggleButton {
private static Logger LOGGER = Logger.getLogger(PluginFileButton.class.getName());
private static final double BUTTON_SIZE = 80;
private final File pluginFile;
private final String label;
private final String version;
private final String description;
public PluginFileButton(final File pluginFile) {
this.pluginFile = pluginFile;
final Attributes manifestAttributes = this.getManifestAttributes();
final Node icon = this.buildIconNode(manifestAttributes);
this.label = this.getManifestAttributeValue(manifestAttributes, "Setup-Wizard-Label", this.pluginFile.getName());
this.version = this.getManifestAttributeValue(manifestAttributes, "Bundle-Version", "");
this.description = this.getManifestAttributeValue(manifestAttributes, "Bundle-Description", "");
this.setPrefSize(BUTTON_SIZE, BUTTON_SIZE);
this.setMinSize(BUTTON_SIZE, BUTTON_SIZE);
this.setMaxSize(BUTTON_SIZE, BUTTON_SIZE);
this.getStyleClass().add("plugin-file-button");
final VBox graphics = new VBox(2);
graphics.setAlignment(Pos.CENTER);
if(icon != null) {
graphics.getChildren().add(icon);
} else {
graphics.getChildren().add(getLabelNode());
}
graphics.getChildren().add(getVersionNode());
this.setGraphic(graphics);
this.selectedProperty().addListener((selectedValue, oldSelected, newSelected) -> {
final StringBuilder tooltipText = new StringBuilder(label).append(":\n")
.append(description).append(".\n");
if(newSelected) tooltipText.append("Will be installed");
else tooltipText.append("Will not be installed");
tooltipText.append('.');
Tooltip tooltip = this.getTooltip();
if(tooltip == null) {
tooltip = new Tooltip();
this.setTooltip(tooltip);
}
tooltip.setText(tooltipText.toString());
});
}
protected Text getVersionNode() {
final Text versionElement = new Text(this.version);
versionElement.getStyleClass().add("text");
versionElement.setWrappingWidth(75);
versionElement.setTextAlignment(TextAlignment.CENTER);
return versionElement;
}
protected Text getLabelNode() {
final Text labelElement = new Text(this.label);
labelElement.getStyleClass().add("text");
labelElement.setWrappingWidth(75);
labelElement.setTextAlignment(TextAlignment.CENTER);
return labelElement;
}
/**
* Get the file associated to this button.
* @return The file associated to this button.
*/
public File getFile() {
return this.pluginFile;
}
/**
* Get the label of this plugin.
* @return The label of this plugin.
*/
public String getLabel() { return this.label; }
/**
* Get the attributes contained in the {@code MANIFEST.MF} of the plugin.
* @return The attributes contained in the {@code MANIFEST.MF} file of the plugin.
*/
protected final Attributes getManifestAttributes() {
Attributes manifestAttributes = null;
try {
final JarFile jarFile = new JarFile(this.pluginFile);
final Manifest manifest = jarFile.getManifest();
manifestAttributes = manifest.getMainAttributes();
} catch(IOException ex) {
LOGGER.log(Level.WARNING, "Can not extract manifest attributes", ex);
}
return manifestAttributes;
}
/**
* Get the value of an attribute stored within a collection of {@code attributes}. If the value is {@code null} or
* empty, the default value will be returned.
* @param attributes The whole collection of attributes.
* @param name The name of the attribute to retrieve the value for.
* @param defaultValue The default value to return if the original value is {@code null} or empty.
* @return The value of the attribute.
*/
protected final String getManifestAttributeValue(final Attributes attributes, final String name, final String defaultValue) {
final String value = attributes.getValue(name);
if(value == null || value.isEmpty()) return defaultValue;
else return value;
}
/**
* Get the icon of the plugin stored within the JAR file as an array of bytes. If no icon is present, an empty array
* is returned.
* @param plugin The JAR file of the plugin.
* @return The icon of the plugin.
*/
protected final byte[] getIconFromJar(final File plugin) {
final ByteArrayOutputStream iconOut = new ByteArrayOutputStream();
try {
final JarFile jarFile = new JarFile(plugin);
final JarEntry icon = jarFile.getJarEntry("META-INF/icon.png");
if(icon != null) {
final InputStream iconIn = jarFile.getInputStream(icon);
final byte[] buffer = new byte[512];
int numberOfBytesRead;
while ((numberOfBytesRead = iconIn.read(buffer)) != -1) {
iconOut.write(buffer, 0, numberOfBytesRead);
}
iconOut.flush();
iconOut.close();
}
} catch(IOException ex) {
LOGGER.log(Level.WARNING, "Can not the icon from JAR", ex);
}
return iconOut.toByteArray();
}
/**
* Create the {@code Node} that will contain the icon of the plugin.
* @param attributes The manifest attributes of the plugin JAR file.
* @return The element containing the icon of the plugin.
*/
protected final Node buildIconNode(final Attributes attributes) {
Node icon = null;
final byte[] iconFromJar = this.getIconFromJar(this.pluginFile);
if(iconFromJar != null && iconFromJar.length > 0) {
final ByteArrayInputStream input = new ByteArrayInputStream(iconFromJar);
final Image image = new Image(input, 50, 50, true, true);
icon = new ImageView(image);
} else {
final String fontIconName = this.getManifestAttributeValue(attributes, "Setup-Wizard-Icon-Name", "");
if(!fontIconName.isEmpty()) {
icon = new FontAwesomeIconView(FontAwesomeIcon.valueOf(fontIconName));
((FontAwesomeIconView) icon).setGlyphSize(50);
}
}
return icon;
}
}
|
[
"thierry.wasylczenko@gmail.com"
] |
thierry.wasylczenko@gmail.com
|
0c853bda91f55c6db9a8fc99616d0a8348228fb0
|
2474744df850fd4d170a65ef78e1202aea89d8b8
|
/jehc-bmodules-model/src/main/java/jehc/bmodules/bmodel/BOrderPay.java
|
edc7417034f385c84f6b5c4e2a1a3ecd19a8e1d0
|
[] |
no_license
|
cgb-extjs-gwt/jehc
|
073c98ba8d25c8cf0ffa769bf09788e01bae375b
|
69112cc9b79c96bb258fc472f22c946f8c5a2008
|
refs/heads/master
| 2023-04-27T08:04:06.440924
| 2018-08-24T08:53:24
| 2018-08-24T08:53:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
package jehc.bmodules.bmodel;
import java.io.Serializable;
import jehc.xtmodules.xtcore.base.BaseEntity;
/**
* b_order_pay 基础订单支付
* 2016-03-22 16:47:52 邓纯杰
*/
public class BOrderPay extends BaseEntity implements Serializable{
private static final long serialVersionUID = 1L;
private String b_order_pay_id;/**订单支付编号**/
private String b_order_id;/**订单编号**/
private double b_order_pay_money = 0.00;/**支付金额**/
private String b_member_id;/**支付人**/
private String b_order_pay_ctime;/**创建时间**/
private String b_order_pay_isall;/**是否全额支付0是1否**/
private String xt_userinfo_id;/**平台创建人**/
private String b_seller_id;/**卖家或商家操作者**/
public void setB_order_pay_id(String b_order_pay_id){
this.b_order_pay_id=b_order_pay_id;
}
public String getB_order_pay_id(){
return b_order_pay_id;
}
public void setB_order_id(String b_order_id){
this.b_order_id=b_order_id;
}
public String getB_order_id(){
return b_order_id;
}
public void setB_order_pay_money(double b_order_pay_money){
this.b_order_pay_money=b_order_pay_money;
}
public double getB_order_pay_money(){
return b_order_pay_money;
}
public void setB_member_id(String b_member_id){
this.b_member_id=b_member_id;
}
public String getB_member_id(){
return b_member_id;
}
public void setB_order_pay_ctime(String b_order_pay_ctime){
this.b_order_pay_ctime=b_order_pay_ctime;
}
public String getB_order_pay_ctime(){
return b_order_pay_ctime;
}
public void setB_order_pay_isall(String b_order_pay_isall){
this.b_order_pay_isall=b_order_pay_isall;
}
public String getB_order_pay_isall(){
return b_order_pay_isall;
}
public void setXt_userinfo_id(String xt_userinfo_id){
this.xt_userinfo_id=xt_userinfo_id;
}
public String getXt_userinfo_id(){
return xt_userinfo_id;
}
public void setB_seller_id(String b_seller_id){
this.b_seller_id=b_seller_id;
}
public String getB_seller_id(){
return b_seller_id;
}
}
|
[
"244831954@qq.com"
] |
244831954@qq.com
|
622a8ab052d2b2d13287256c04860da286aa56dd
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/insightfullogic/java8/answers/chapter9/ArtistAnalyzerTest.java
|
1f7796e8ca2ecbde0a9cd55ccd75fd240a79ef5c
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 612
|
java
|
package com.insightfullogic.java8.answers.chapter9;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
public class ArtistAnalyzerTest {
private final ArtistAnalyzer analyser;
public ArtistAnalyzerTest(ArtistAnalyzer analyser) {
this.analyser = analyser;
}
@Test
public void largerGroupsAreLarger() {
assertLargerGroup(true, "The Beatles", "John Coltrane");
}
@Test
public void smallerGroupsArentLarger() {
assertLargerGroup(false, "John Coltrane", "The Beatles");
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
8252ddd59896a34dd708858ee366442e205a8983
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE329_Not_Using_Random_IV_with_CBC_Mode/CWE329_Not_Using_Random_IV_with_CBC_Mode__basic_13.java
|
43019f9d55165a4f8c7f2119152328fc3def741c
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,494
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE329_Not_Using_Random_IV_with_CBC_Mode__basic_13.java
Label Definition File: CWE329_Not_Using_Random_IV_with_CBC_Mode__basic.label.xml
Template File: point-flaw-13.tmpl.java
*/
/*
* @description
* CWE: 329 Not using random IV with CBC Mode
* Sinks:
* GoodSink: use random iv
* BadSink : use hardcoded iv
* Flow Variant: 13 Control flow: if(IO.STATIC_FINAL_FIVE==5) and if(IO.STATIC_FINAL_FIVE!=5)
*
* */
package testcases.CWE329_Not_Using_Random_IV_with_CBC_Mode;
import testcasesupport.*;
import javax.servlet.http.*;
import java.io.*;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import java.security.SecureRandom;
public class CWE329_Not_Using_Random_IV_with_CBC_Mode__basic_13 extends AbstractTestCase
{
public void bad() throws Throwable
{
if (IO.STATIC_FINAL_FIVE == 5)
{
byte[] text = "asdf".getBytes("UTF-8");
byte[] initializationVector =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
keyGenerator.init(128);
SecretKey key = keyGenerator.generateKey();
/* FLAW: hardcoded initialization vector used */
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
IvParameterSpec ivParameterSpec = new IvParameterSpec(initializationVector);
cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec);
IO.writeLine(IO.toHex(cipher.doFinal(text)));
}
}
/* good1() changes IO.STATIC_FINAL_FIVE==5 to IO.STATIC_FINAL_FIVE!=5 */
private void good1() throws Throwable
{
if (IO.STATIC_FINAL_FIVE != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
byte[] text = "asdf".getBytes("UTF-8");
KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
keyGenerator.init(128);
SecretKey key = keyGenerator.generateKey();
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
int blockSize = cipher.getBlockSize();
byte[] initializationVector = new byte[blockSize];
SecureRandom secureRandom = new SecureRandom();
secureRandom.nextBytes(initializationVector);
/* FIX: using cryptographically secure pseudo-random number as initialization vector */
IvParameterSpec ivParameterSpec = new IvParameterSpec(initializationVector);
cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec);
IO.writeLine(IO.toHex(cipher.doFinal(text)));
}
}
/* good2() reverses the bodies in the if statement */
private void good2() throws Throwable
{
if (IO.STATIC_FINAL_FIVE == 5)
{
byte[] text = "asdf".getBytes("UTF-8");
KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
keyGenerator.init(128);
SecretKey key = keyGenerator.generateKey();
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
int blockSize = cipher.getBlockSize();
byte[] initializationVector = new byte[blockSize];
SecureRandom secureRandom = new SecureRandom();
secureRandom.nextBytes(initializationVector);
/* FIX: using cryptographically secure pseudo-random number as initialization vector */
IvParameterSpec ivParameterSpec = new IvParameterSpec(initializationVector);
cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec);
IO.writeLine(IO.toHex(cipher.doFinal(text)));
}
}
public void good() throws Throwable
{
good1();
good2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
c09d834c077b90d45d650a4b7478f93ddd495c8b
|
49a38c6f17bd30467d31acabbcbc1f2241f85b5b
|
/src/Trial.java
|
624ef02bbaaab927d4625e0e2459501075ab4a3e
|
[] |
no_license
|
ssiedu/Programming-Basics-02-02-21
|
a9ab650e5367878ecc9a30b275bc97af2eee6384
|
a9644ed3971fdf5fa433ef2e9be5c72090d56963
|
refs/heads/master
| 2023-03-11T16:06:01.983419
| 2021-02-11T11:27:46
| 2021-02-11T11:27:46
| 335,265,845
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
public class Trial {
public static void main(String[] args) {
System.out.println("Hello from main method of Trial Class.....!!!!");
System.out.println("Hello "+args[0]);
System.out.println("Welcome To Learn "+args[1]);
}
}
|
[
"manojs121@rediffmail.com"
] |
manojs121@rediffmail.com
|
bae93374fc8e4b0446448586c2d99df831d2ef7e
|
f792281aed4a5690239468f6c94df8e44139d8e9
|
/spring-boot-autoconfigure/src/test/java/com/example/springbootautoconfigure/SpringBootAutoconfigureApplicationTests.java
|
777b7a306e09a5d1f7154412f891622b2db7bc9a
|
[] |
no_license
|
rahulsrivastava243/SpringBoot-MicroServices-Sync
|
2222795de82321489b96ec8269c021de8124aac6
|
2c46d969b44eedecb86cdd656b1b05eccab9c1fe
|
refs/heads/main
| 2023-01-24T03:15:04.476401
| 2020-11-27T10:11:50
| 2020-11-27T10:11:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 244
|
java
|
package com.example.springbootautoconfigure;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringBootAutoconfigureApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"sasubramanian_md@hotmail.com"
] |
sasubramanian_md@hotmail.com
|
cfc26d11a18b462ec5fee75d3021fd869b8729ae
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes4.dex_source_from_JADX/com/facebook/analytics/config/TriState_IsStaticMapLoggingEnabledGatekeeperAutoProvider.java
|
cbc0cd8cb162ab4d5b7d6b6ade99a7373a43ae67
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 427
|
java
|
package com.facebook.analytics.config;
import com.facebook.common.util.TriState;
import com.facebook.gk.GatekeeperStoreImplMethodAutoProvider;
import com.facebook.inject.AbstractProvider;
/* compiled from: void */
public class TriState_IsStaticMapLoggingEnabledGatekeeperAutoProvider extends AbstractProvider<TriState> {
public Object get() {
return GatekeeperStoreImplMethodAutoProvider.a(this).a(1033);
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
55722678370a78095e4a3d0e0f7973743451f234
|
40383e66d89723ac349d368a4ea226c670ac6f18
|
/src/main/java/br/com/wlsnprogramming/maratona/bean/comunicacao/ComunicacaoTesteCincoBean.java
|
8b53ecadd8a93dfc4d36e853001ce5199cae9a8c
|
[] |
no_license
|
welsonlimawlsn/jsf
|
1cec98cd24b96e1f93076fb5e9aced63179c58cd
|
c9bd3cb464b3ca1ff28e8160d5641aaaf3e4034b
|
refs/heads/master
| 2020-03-15T22:27:38.503789
| 2018-05-06T20:32:22
| 2018-05-06T20:32:22
| 132,373,809
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,468
|
java
|
package br.com.wlsnprogramming.maratona.bean.comunicacao;
import br.com.wlsnprogramming.maratona.model.Estudante;
import javax.faces.event.ActionEvent;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
import java.io.Serializable;
@Named
@ViewScoped
public class ComunicacaoTesteCincoBean implements Serializable {
private String nome;
private String sobrenome;
private Estudante estudante = new Estudante();
private Estudante estudante2;
public void execute(){
System.out.println("Método execute: " + nome);
System.out.println("Método execute: " + sobrenome);
System.out.println("Método execute: " + estudante2);
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
System.out.println("Veio do setPropertyActionListener: " + nome);
this.nome = nome;
}
public String getSobrenome() {
return sobrenome;
}
public void setSobrenome(String sobrenome) {
System.out.println("Veio do setPropertyActionListener: " + sobrenome);
this.sobrenome = sobrenome;
}
public Estudante getEstudante() {
return estudante;
}
public void setEstudante(Estudante estudante) {
this.estudante = estudante;
}
public Estudante getEstudante2() {
return estudante2;
}
public void setEstudante2(Estudante estudante2) {
this.estudante2 = estudante2;
}
}
|
[
"welsonlimawlsn@gmail.com"
] |
welsonlimawlsn@gmail.com
|
dc404a9d9ef1f626ce4c7f470212994b82106f7c
|
7a637e9654f3b6720d996e9b9003f53e40f94814
|
/aylson-manage/src/main/java/com/aylson/dc/cfdb/controller/IncomeSetController.java
|
1a0d6e4c0883ac7a6a67cee2284d2675728f2632
|
[] |
no_license
|
hemin1003/aylson-parent
|
118161fc9f7a06b583aa4edd23d36bdd6e000f33
|
1a2a4ae404705871717969449370da8531028ff9
|
refs/heads/master
| 2022-12-26T14:12:19.452615
| 2019-09-20T01:58:40
| 2019-09-20T01:58:40
| 97,936,256
| 161
| 103
| null | 2022-12-16T07:38:18
| 2017-07-21T10:30:03
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,012
|
java
|
package com.aylson.dc.cfdb.controller;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.aylson.core.easyui.EasyuiDataGridJson;
import com.aylson.core.frame.controller.BaseController;
import com.aylson.core.frame.domain.Result;
import com.aylson.core.frame.domain.ResultCode;
import com.aylson.dc.cfdb.search.IncomeSetSearch;
import com.aylson.dc.cfdb.service.IncomeSetService;
import com.aylson.dc.cfdb.vo.IncomeSetVo;
import com.aylson.dc.sys.common.SessionInfo;
import com.aylson.utils.DateUtil2;
import com.aylson.utils.UUIDUtils;
/**
* 提现金额配置
* @author Minbo
*/
@Controller
@RequestMapping("/cfdb/incomeSet")
public class IncomeSetController extends BaseController {
protected static final Logger logger = Logger.getLogger(IncomeSetController.class);
@Autowired
private IncomeSetService incomeSetService;
/**
* 后台-首页
* @return
*/
@RequestMapping(value = "/admin/toIndex", method = RequestMethod.GET)
public String toIndex() {
return "/jsp/cfdb/admin/incomeSet/index";
}
/**
* 获取列表
* @return list
*/
@RequestMapping(value = "/admin/list", method = RequestMethod.GET)
@ResponseBody
public EasyuiDataGridJson list(IncomeSetSearch incomeSetSearch){
EasyuiDataGridJson result = new EasyuiDataGridJson();//页面DataGrid结果集
try{
incomeSetSearch.setIsPage(true);
List<IncomeSetVo> list = this.incomeSetService.getList(incomeSetSearch);
result.setTotal(this.incomeSetService.getRowCount(incomeSetSearch));
result.setRows(list);
return result;
}catch(Exception e){
logger.error(e.getMessage(), e);
return null;
}
}
/**
* 后台-添加页面
* @param incomeSetVo
* @return
*/
@RequestMapping(value = "/admin/toAdd", method = RequestMethod.GET)
public String toAdd(IncomeSetVo incomeSetVo) {
this.request.setAttribute("incomeSetVo", incomeSetVo);
return "/jsp/cfdb/admin/incomeSet/add";
}
/**
* 后台-添加保存
* @param incomeSetVo
* @return
*/
@RequestMapping(value = "/admin/add", method = RequestMethod.POST)
@ResponseBody
public Result add(IncomeSetVo incomeSetVo) {
Result result = new Result();
try{
SessionInfo sessionInfo = (SessionInfo)this.request.getSession().getAttribute("sessionInfo");
incomeSetVo.setId(UUIDUtils.create());
String cTime = DateUtil2.getCurrentLongDateTime();
incomeSetVo.setCreatedBy(sessionInfo.getUser().getUserName() + "/" + sessionInfo.getUser().getRoleName());
incomeSetVo.setCreateDate(cTime);
incomeSetVo.setUpdateDate(cTime);
Boolean flag = this.incomeSetService.add(incomeSetVo);
if(flag){
result.setOK(ResultCode.CODE_STATE_200, "操作成功");
}else{
result.setError(ResultCode.CODE_STATE_4006, "操作失败");
}
}catch(Exception e){
logger.error(e.getMessage(), e);
result.setError(ResultCode.CODE_STATE_500, e.getMessage());
}
return result;
}
/**
* 后台-编辑页面
* @param id
* @return
*/
@RequestMapping(value = "/admin/toEdit", method = RequestMethod.GET)
public String toEdit(String id) {
if(id != null){
IncomeSetVo incomeSetVo = this.incomeSetService.getById(id);
this.request.setAttribute("incomeSetVo", incomeSetVo);
}
return "/jsp/cfdb/admin/incomeSet/add";
}
/**
* 后台-编辑保存
* @param incomeSetVo
* @return
*/
@RequestMapping(value = "/admin/update", method = RequestMethod.POST)
@ResponseBody
public Result update(IncomeSetVo incomeSetVo) {
Result result = new Result();
try {
SessionInfo sessionInfo = (SessionInfo)this.request.getSession().getAttribute("sessionInfo");
incomeSetVo.setUpdatedBy(sessionInfo.getUser().getUserName() + "/" + sessionInfo.getUser().getRoleName());
incomeSetVo.setUpdateDate(DateUtil2.getCurrentLongDateTime());
Boolean flag = this.incomeSetService.edit(incomeSetVo);
if(flag){
result.setOK(ResultCode.CODE_STATE_200, "操作成功");
}else{
result.setError(ResultCode.CODE_STATE_4006, "操作失败");
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
result.setError(ResultCode.CODE_STATE_500, e.getMessage());
}
return result;
}
/**
* 根据id删除
* @param id
* @return
*/
@RequestMapping(value = "/admin/deleteById", method = RequestMethod.POST)
@ResponseBody
public Result deleteById(String id) {
Result result = new Result();
try{
Boolean flag = this.incomeSetService.deleteById(id);
if(flag){
result.setOK(ResultCode.CODE_STATE_200, "删除成功");
}else{
result.setError(ResultCode.CODE_STATE_4006, "删除失败");
}
}catch(Exception e){
logger.error(e.getMessage(), e);
result.setError(ResultCode.CODE_STATE_500, e.getMessage());
}
return result;
}
}
|
[
"hemin_it@163.com"
] |
hemin_it@163.com
|
99b752757ca5fda57959dfdff5967dcdf78c8aa0
|
746572ba552f7d52e8b5a0e752a1d6eb899842b9
|
/JDK8Source/src/main/java/java/awt/DisplayMode.java
|
edcd9db607e97293c9ac52acf8b3de6c9774fdd0
|
[] |
no_license
|
lobinary/Lobinary
|
fde035d3ce6780a20a5a808b5d4357604ed70054
|
8de466228bf893b72c7771e153607674b6024709
|
refs/heads/master
| 2022-02-27T05:02:04.208763
| 2022-01-20T07:01:28
| 2022-01-20T07:01:28
| 26,812,634
| 7
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,599
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.awt;
import java.lang.annotation.Native;
/**
* The <code>DisplayMode</code> class encapsulates the bit depth, height,
* width, and refresh rate of a <code>GraphicsDevice</code>. The ability to
* change graphics device's display mode is platform- and
* configuration-dependent and may not always be available
* (see {@link GraphicsDevice#isDisplayChangeSupported}).
* <p>
* For more information on full-screen exclusive mode API, see the
* <a href="https://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
* Full-Screen Exclusive Mode API Tutorial</a>.
*
* <p>
* <code> DisplayMode </code>类封装了<code> GraphicsDevice </code>的位深度,高度,宽度和刷新率。
* 更改图形设备显示模式的能力取决于平台和配置,并且可能不会始终可用(请参阅{@link GraphicsDevice#isDisplayChangeSupported})。
* <p>
* 有关全屏独占模式API的更多信息,请参阅
* <a href="https://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
* 全屏独占模式API教程</a>。
*
*
* @see GraphicsDevice
* @see GraphicsDevice#isDisplayChangeSupported
* @see GraphicsDevice#getDisplayModes
* @see GraphicsDevice#setDisplayMode
* @author Michael Martak
* @since 1.4
*/
public final class DisplayMode {
private Dimension size;
private int bitDepth;
private int refreshRate;
/**
* Create a new display mode object with the supplied parameters.
* <p>
* 使用提供的参数创建新的显示模式对象。
*
*
* @param width the width of the display, in pixels
* @param height the height of the display, in pixels
* @param bitDepth the bit depth of the display, in bits per
* pixel. This can be <code>BIT_DEPTH_MULTI</code> if multiple
* bit depths are available.
* @param refreshRate the refresh rate of the display, in hertz.
* This can be <code>REFRESH_RATE_UNKNOWN</code> if the
* information is not available.
* @see #BIT_DEPTH_MULTI
* @see #REFRESH_RATE_UNKNOWN
*/
public DisplayMode(int width, int height, int bitDepth, int refreshRate) {
this.size = new Dimension(width, height);
this.bitDepth = bitDepth;
this.refreshRate = refreshRate;
}
/**
* Returns the height of the display, in pixels.
* <p>
* 返回显示的高度(以像素为单位)。
*
*
* @return the height of the display, in pixels
*/
public int getHeight() {
return size.height;
}
/**
* Returns the width of the display, in pixels.
* <p>
* 返回显示的宽度(以像素为单位)。
*
*
* @return the width of the display, in pixels
*/
public int getWidth() {
return size.width;
}
/**
* Value of the bit depth if multiple bit depths are supported in this
* display mode.
* <p>
* 在此显示模式下支持多个位深度时,位深度的值。
*
*
* @see #getBitDepth
*/
@Native public final static int BIT_DEPTH_MULTI = -1;
/**
* Returns the bit depth of the display, in bits per pixel. This may be
* <code>BIT_DEPTH_MULTI</code> if multiple bit depths are supported in
* this display mode.
*
* <p>
* 返回显示的位深度,以像素为单位。如果在此显示模式下支持多个位深度,则可以是<code> BIT_DEPTH_MULTI </code>。
*
*
* @return the bit depth of the display, in bits per pixel.
* @see #BIT_DEPTH_MULTI
*/
public int getBitDepth() {
return bitDepth;
}
/**
* Value of the refresh rate if not known.
* <p>
* 未知的刷新率值。
*
*
* @see #getRefreshRate
*/
@Native public final static int REFRESH_RATE_UNKNOWN = 0;
/**
* Returns the refresh rate of the display, in hertz. This may be
* <code>REFRESH_RATE_UNKNOWN</code> if the information is not available.
*
* <p>
* 返回显示器的刷新率,单位为赫兹。如果信息不可用,可以是<code> REFRESH_RATE_UNKNOWN </code>。
*
*
* @return the refresh rate of the display, in hertz.
* @see #REFRESH_RATE_UNKNOWN
*/
public int getRefreshRate() {
return refreshRate;
}
/**
* Returns whether the two display modes are equal.
* <p>
* 返回两个显示模式是否相等。
*
*
* @return whether the two display modes are equal
*/
public boolean equals(DisplayMode dm) {
if (dm == null) {
return false;
}
return (getHeight() == dm.getHeight()
&& getWidth() == dm.getWidth()
&& getBitDepth() == dm.getBitDepth()
&& getRefreshRate() == dm.getRefreshRate());
}
/**
* {@inheritDoc}
* <p>
* {@inheritDoc}
*
*/
public boolean equals(Object dm) {
if (dm instanceof DisplayMode) {
return equals((DisplayMode)dm);
} else {
return false;
}
}
/**
* {@inheritDoc}
* <p>
* {@inheritDoc}
*/
public int hashCode() {
return getWidth() + getHeight() + getBitDepth() * 7
+ getRefreshRate() * 13;
}
}
|
[
"919515134@qq.com"
] |
919515134@qq.com
|
51c1c8f4b35d3cf019e7752c7b1babb52658fded
|
bf56a9f096f5a12c21cc0a18b5355eaed5c9a6c2
|
/hdcloud-visual/data-hdcloud-bank-account-bill/src/main/java/com/hodo/iiot/group2/data/hdcloud/bank/account/bill/service/impl/cambodia/HdBankRecordCambodiaServiceImpl.java
|
e466b508377630366046dad0a951279d9a75b43b
|
[] |
no_license
|
chaochenzhengCSDN/hdcloud
|
9724078c8295bdb98d89dd0409270c0ae2e574e1
|
ad7f812835812e3b5fd078c103ff0012697a283f
|
refs/heads/master
| 2022-12-15T03:35:09.932170
| 2020-09-20T13:22:59
| 2020-09-20T13:22:59
| 297,081,316
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,314
|
java
|
/*
* Copyright (c) 2018-2025, hodo 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 pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: 江苏红豆工业互联网有限公司
*/
package
com.hodo.iiot.group2.data.hdcloud.bank.account.bill.service.impl.cambodia;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hodo.iiot.group2.data.hdcloud.bank.account.bill.entity.HdBankRecord;
import com.hodo.iiot.group2.data.hdcloud.bank.account.bill.mapper.cambodia.HdBankRecordCambodiaMapper;
import com.hodo.iiot.group2.data.hdcloud.bank.account.bill.service.HdBankRecordService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* bank_account
*
* @author dq
* @date 2019-10-29 15:37:59
*/
@Service
public class HdBankRecordCambodiaServiceImpl extends ServiceImpl<HdBankRecordCambodiaMapper, HdBankRecord>
implements HdBankRecordService {
@Override
public List<HdBankRecord> getHdBankRecordList(String moneyStart, String moneyEnd, String companyName,
String startTime, String endTime, String page, String limit,
Integer tenantId, Map<String, Object> params, String num,
String accountId) {
return baseMapper.getHdBankRecordList(moneyStart,moneyEnd,companyName,startTime,endTime,page,limit,
tenantId,params,num,accountId);
}
@Override
public List<HdBankRecord> getAllBankRecord(String moneyStart, String moneyEnd, String companyName,
String startTime, String endTime, Integer tenantId,
Map<String, Object> params, String num, String accountId) {
return baseMapper.getAllBankRecord( moneyStart, moneyEnd, companyName,
startTime, endTime, tenantId,
params, num, accountId);
}
@Override
public List<String> selectDistinctString(String str, String param, String val, Integer tenantId) {
return baseMapper.selectDistinctString(str,param,val,tenantId);
}
@Override
public String otherVal(String moneyStart, String moneyEnd, String companyName, String startTime, String endTime, Integer tenantId, Map<String, Object> params, String num, String accountId) {
return baseMapper.otherval( moneyStart, moneyEnd, companyName,
startTime, endTime, tenantId,
params, num, accountId);
}
}
|
[
"1325520624@qq.com"
] |
1325520624@qq.com
|
7e19a94dbd6dc7d3eecd8db006e10bf3e3fe228d
|
f0aa9a166111eeb6480973f7fb9a0de7e787052c
|
/src/main/java/com/liyang/domain/teamobjective/TeamObjectiveTO.java
|
c540307daac1f8f0062440f88c318039f1de0922
|
[] |
no_license
|
pronebel/dafengbaodai
|
2e7835c6556039b293270293317e8e657b5c200b
|
add3cc3b79d38c66244e414184fac7d4df0a0a3f
|
refs/heads/master
| 2021-09-09T10:24:06.073492
| 2018-03-15T06:20:44
| 2018-03-15T06:20:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,821
|
java
|
package com.liyang.domain.teamobjective;
import java.util.Date;
public class TeamObjectiveTO {
private Integer id;
private String stateCode;
private Double autoObjective;
private Double lifeObjective;
private Double autoCompletion;
private Double lifeCompletion;
private Integer aotoNum;
private Integer lifeNum;
// private Boolean autoFinished;
// private Boolean lifeFinished;
private String illustration;
private String period;
private Date periodTime;
private Integer teamId;
private String teamLabel;
// private TeamBean team;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getStateCode() {
return stateCode;
}
public void setStateCode(String stateCode) {
this.stateCode = stateCode;
}
public Double getAutoObjective() {
return autoObjective;
}
public void setAutoObjective(Double autoObjective) {
this.autoObjective = autoObjective;
}
public Double getLifeObjective() {
return lifeObjective;
}
public void setLifeObjective(Double lifeObjective) {
this.lifeObjective = lifeObjective;
}
public Double getAutoCompletion() {
return autoCompletion;
}
public void setAutoCompletion(Double autoCompletion) {
this.autoCompletion = autoCompletion;
}
public Double getLifeCompletion() {
return lifeCompletion;
}
public void setLifeCompletion(Double lifeCompletion) {
this.lifeCompletion = lifeCompletion;
}
// public Boolean getAutoFinished() {
// return autoFinished;
// }
// public void setAutoFinished(Boolean autoFinished) {
// this.autoFinished = autoFinished;
// }
// public Boolean getLifeFinished() {
// return lifeFinished;
// }
// public void setLifeFinished(Boolean lifeFinished) {
// this.lifeFinished = lifeFinished;
// }
public String getIllustration() {
return illustration;
}
public void setIllustration(String illustration) {
this.illustration = illustration;
}
public String getPeriod() {
return period;
}
public void setPeriod(String period) {
this.period = period;
}
public Integer getTeamId() {
return teamId;
}
public void setTeamId(Integer teamId) {
this.teamId = teamId;
}
public Date getPeriodTime() {
return periodTime;
}
public void setPeriodTime(Date periodTime) {
this.periodTime = periodTime;
}
public String getTeamLabel() {
return teamLabel;
}
public void setTeamLabel(String teamLabel) {
this.teamLabel = teamLabel;
}
public Integer getAotoNum() {
return aotoNum;
}
public void setAotoNum(Integer aotoNum) {
this.aotoNum = aotoNum;
}
public Integer getLifeNum() {
return lifeNum;
}
public void setLifeNum(Integer lifeNum) {
this.lifeNum = lifeNum;
}
// public TeamBean getTeam() {
// return team;
// }
// public void setTeam(TeamBean team) {
// this.team = team;
// }
}
|
[
"18860469557@163.com"
] |
18860469557@163.com
|
f775cc4ba78efc4286e1a075a380f7111610cc6d
|
d5f09c7b0e954cd20dd613af600afd91b039c48a
|
/sources/com/tencent/mm/opensdk/diffdev/a/g.java
|
6023331dc30f32aa68fe1afb7297d172f5f365af
|
[] |
no_license
|
t0HiiBwn/CoolapkRelease
|
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
|
a6a2b03e32cde0e5163016e0078391271a8d33ab
|
refs/heads/main
| 2022-07-29T23:28:35.867734
| 2021-03-26T11:41:18
| 2021-03-26T11:41:18
| 345,290,891
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 488
|
java
|
package com.tencent.mm.opensdk.diffdev.a;
public enum g {
UUID_EXPIRED(402),
UUID_CANCELED(403),
UUID_SCANED(404),
UUID_CONFIRM(405),
UUID_KEEP_CONNECT(408),
UUID_ERROR(500);
private int code;
private g(int i) {
this.code = i;
}
public final int getCode() {
return this.code;
}
@Override // java.lang.Enum, java.lang.Object
public final String toString() {
return "UUIDStatusCode:" + this.code;
}
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
5c655781b99a616d71cffda32fb81bf6942433fe
|
cba0312884356e2149c6865a9ce1647407dcf6a1
|
/app/src/main/java/com/yc/gtv/presenter/ExtensionPresenter.java
|
965fc2e20e0ce81c24ae54752ee3053870cfd3fc
|
[] |
no_license
|
edcedc/Gtv
|
5a9a9b02c6f7c3b3c2cd6c6f06ad26b79f9e9037
|
e7edfdd3d4e4b0498711a4496b96376e39246b7c
|
refs/heads/master
| 2020-04-08T11:14:35.398835
| 2019-07-12T08:09:52
| 2019-07-12T08:09:52
| 159,298,500
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,946
|
java
|
package com.yc.gtv.presenter;
import com.lzy.okgo.model.Response;
import com.yc.gtv.bean.BaseResponseBean;
import com.yc.gtv.bean.DataBean;
import com.yc.gtv.callback.Code;
import com.yc.gtv.controller.CloudApi;
import com.yc.gtv.view.impl.ExtensionContract;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
/**
* Created by edison on 2018/11/22.
*/
public class ExtensionPresenter extends ExtensionContract.Presenter{
@Override
public void onRequest() {
CloudApi.userGetMyPromotionStatist()
.doOnSubscribe(new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
mView.showLoading();
}
})
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<Response<BaseResponseBean<DataBean>>>() {
@Override
public void onSubscribe(Disposable d) {
mView.addDisposable(d);
}
@Override
public void onNext(Response<BaseResponseBean<DataBean>> baseResponseBeanResponse) {
if (baseResponseBeanResponse.body().code == Code.CODE_SUCCESS){
DataBean data = baseResponseBeanResponse.body().data;
if (data != null){
mView.setData(data);
}
}
}
@Override
public void onError(Throwable e) {
mView.onError(e);
}
@Override
public void onComplete() {
mView.hideLoading();
}
});
}
@Override
public void onQueryAPPAgreement() {
CloudApi.commonQueryAPPAgreement(4)
.doOnSubscribe(new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
mView.showLoading();
}
})
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<Response<BaseResponseBean<DataBean>>>() {
@Override
public void onSubscribe(Disposable d) {
mView.addDisposable(d);
}
@Override
public void onNext(Response<BaseResponseBean<DataBean>> baseResponseBeanResponse) {
if (baseResponseBeanResponse.body().code == Code.CODE_SUCCESS){
DataBean data = baseResponseBeanResponse.body().data;
if (data != null){
String remark = data.getContext();
mView.setAgreement(remark);
}
}
}
@Override
public void onError(Throwable e) {
mView.onError(e);
}
@Override
public void onComplete() {
mView.hideLoading();
}
});
}
@Override
public void onUserGetViewTimesAtToday() {
CloudApi.userGetViewTimesAtToday()
.doOnSubscribe(new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
}
})
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<Response<BaseResponseBean<DataBean>>>() {
@Override
public void onSubscribe(Disposable d) {
mView.addDisposable(d);
}
@Override
public void onNext(Response<BaseResponseBean<DataBean>> baseResponseBeanResponse) {
if (baseResponseBeanResponse.body().code == Code.CODE_SUCCESS) {
DataBean data = baseResponseBeanResponse.body().data;
if (data != null) {
mView.onUserAnonymousViewTimesAtToday(data);
}
}
}
@Override
public void onError(Throwable e) {
mView.onError(e);
}
@Override
public void onComplete() {
}
});
}
}
|
[
"501807647@qq.com"
] |
501807647@qq.com
|
6c4496f7e08242ea3195d86983e8f8e063c4dd08
|
5126ac74da0fca4dc8c70f0a02dbde8edbc3d011
|
/1982-COMMONLIB-FRONTCONTR/src/portal/com/eje/portal/generico_appid/EnumAppId.java
|
452a13f82a8b9f52dbe838882f9847dd4fd64ca6
|
[] |
no_license
|
franciscovillegas/1982-COMMONLIBS
|
be834b52bfa4fee132544b567359c5d71730c053
|
17c30a811f0bc2348b033b8ef2be9d91fa5c9517
|
refs/heads/master
| 2020-06-13T05:46:12.017269
| 2019-06-30T20:10:58
| 2019-06-30T20:10:58
| 194,552,549
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,359
|
java
|
package portal.com.eje.portal.generico_appid;
/**
* Los AppId, sin acciones, ver, modificar, etc, más el modulo o zona, aquellos que solo se identifica la zona, con el tiempo se le irán agregando otros verbos a la misma zona
*
* @author Pancho
* @since 17-05-2019
* */
public enum EnumAppId {
ADM (EnumAppIdAtributo.ADM , "Administrador de la plataforma, funciona para todos los módulos"),
ADM_BENEFICIOS (EnumAppIdAtributo.ADM , "administrar Beneficios", true),
ADM_CLAVE (EnumAppIdAtributo.ADM , "Administrador de Cambios Clave", true),
ADM_CP (EnumAppIdAtributo.ADM , "Administrador Control de Procesos", true),
ADM_GP (EnumAppIdAtributo.ADM , "Gestor de Procesos", true),
ADM_MASTER (EnumAppIdAtributo.ADM , "Administrador Maestro Personal", true),
ADM_OS (EnumAppIdAtributo.ADM , "Administrador de Estructura Organizacional"),
ADM_SOLVAC (EnumAppIdAtributo.ADM , "Administrador Solicitudes de Vacaciones", true),
ADM_TRACK (EnumAppIdAtributo.ADM , "Informacion de Tracking"),
ANEX (EnumAppIdAtributo.ADM , "Anexos", true),
CERT (EnumAppIdAtributo.ADM , "Certificados", true),
DF (EnumAppIdAtributo.ADM , "Gestion", true),
GGD_ADM (EnumAppIdAtributo.ADM , "Administrador de GGD"),
MIESTRUC_LIKEBOSS (EnumAppIdAtributo.ADM , "Puede ver la estructura dependiente"),
MIS (EnumAppIdAtributo.ADM , "RRHH MIS"),
PARTICIPA_ADM (EnumAppIdAtributo.ADM , "Participa Adm."),
PRFL_CAPACITACION (EnumAppIdAtributo.VER , "Capacitación"),
PRFL_CAPACITACION_ADM (EnumAppIdAtributo.ADM , "Capacitación admin"),
PRFL_AMONESTA (EnumAppIdAtributo.VER , "WF amonestaciones"),
PRFL_WFDOTACION (EnumAppIdAtributo.VER , "WF de dotación"),
PRFL_EGRESO (EnumAppIdAtributo.VER , "WF de Egreso"),
PRFL_FPERSONA (EnumAppIdAtributo.VER , "WF de ficha"),
PRFL_RELLAB_ADM (EnumAppIdAtributo.VER , "Relaciones Laborares Adm."),
PRFL_RELLAB_FORMS (EnumAppIdAtributo.VER , "Relaciones Laborares usuario"),
PRFL_TRASLD (EnumAppIdAtributo.VER , "WF de Traslado"),
PUB (EnumAppIdAtributo.ADM , "Publicación", true),
PUB_DIA (EnumAppIdAtributo.ADM , "Diario Mural", true),
PUB_NOT (EnumAppIdAtributo.ADM , "Noticias", true),
PUB_REV (EnumAppIdAtributo.ADM , "Revista Institucional", true),
SH (EnumAppIdAtributo.VER , "Atributo de logeo, permite logearse"),
SID (EnumAppIdAtributo.VER , "Sistema SID", true),
TRASP (EnumAppIdAtributo.ADM, "Administrador de Traspasos", true),
USERADM (EnumAppIdAtributo.ADM, "Usuario con privilegio de adm", true),
VIG (EnumAppIdAtributo.ADM, "Vigilantes", true),
WFV (EnumAppIdAtributo.VER, "WF Vacaciones", true),
PRFL_QSMSELECCION (EnumAppIdAtributo.VER, "Permite acceder a QSMSELECCIÓN."),
PRFL_WFINGRESO (EnumAppIdAtributo.VER, "WF de Ingreso"),
PRFL_GGD (EnumAppIdAtributo.VER, "GGD gestión del desempeño"),
PRFL_ADM_VERIF_DATOS_PERS (EnumAppIdAtributo.ADM, "Adm. de Verificación de datos personales"),
TABLE_FACTORIA_ADM (EnumAppIdAtributo.ADM, "Adm de table factoría"),
TABLE_BUSCADOR_ADM (EnumAppIdAtributo.ADM, "Adm de table buscador"),
TABLE_BLOG (EnumAppIdAtributo.VER, "Ver table blog"),
TABLE_BLOG_ADM (EnumAppIdAtributo.ADM, "Adm de table blog"),
MOD_DATOS_PERSONALES (EnumAppIdAtributo.ADM, "Modificar los datos personales"),
PERFILADOR_ADM (EnumAppIdAtributo.ADM, "Adm Perfiles de Peoplemanager");
private EnumAppIdAtributo atributo;
private String descripcion;
private boolean deprecate;
EnumAppId(EnumAppIdAtributo atrib, String descripcion) {
this.atributo = atrib;
this.descripcion = descripcion;
this.deprecate = false;
}
EnumAppId(EnumAppIdAtributo atrib, String descripcion, boolean deprecate) {
this.atributo = atrib;
this.descripcion = descripcion;
this.deprecate = deprecate;
}
@Override
public String toString() {
return this.name();
}
public String getAppId() {
// TODO Auto-generated method stub
return super.toString().toLowerCase();
}
public String getDescripcion() {
return descripcion;
}
public boolean isDeprecate() {
return this.deprecate;
}
public EnumAppIdAtributo getAtributo() {
return atributo;
}
}
|
[
"francisco.villegas@peoplemanager.cl"
] |
francisco.villegas@peoplemanager.cl
|
94d0a4d7a3ce2d9b86c22d3807f4640682dd0be1
|
f49938f5b919818fc46084b6c78d182aad54e4f5
|
/src/main/java/org/cloud/zblog/service/impl/NovelInfoServiceImpl.java
|
ac8d11cda678a8c3aca7ca14375f4aadbb0e412f
|
[] |
no_license
|
davidddw/zblog
|
05c6a1fe13e99ac03c959898d651c6d1639f9e89
|
3d718cda1e461e4f93861b5f990561efd0646a26
|
refs/heads/master
| 2020-03-30T01:33:14.617932
| 2018-09-28T12:33:51
| 2018-09-28T12:33:51
| 150,566,167
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,514
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 d05660@163.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.cloud.zblog.service.impl;
import com.github.pagehelper.PageHelper;
import org.cloud.zblog.mapper.NovelChapterMapper;
import org.cloud.zblog.mapper.NovelInfoMapper;
import org.cloud.zblog.model.NovelChapter;
import org.cloud.zblog.model.NovelInfo;
import org.cloud.zblog.service.INovelInfoService;
import org.cloud.zblog.utils.FileUtil;
import org.cloud.zblog.utils.PropertiesUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* Created by d05660ddw on 2017/3/6.
*/
@Service
public class NovelInfoServiceImpl extends ServiceImpl<NovelInfoMapper, NovelInfo> implements INovelInfoService {
@Autowired
private NovelInfoMapper novelInfoMapper;
@Autowired
private NovelChapterMapper novelChapterMapper;
@Override
public long saveOrUpdateNovelInfo(NovelInfo novelInfo) {
Long id = novelInfo.getId();
if (id != null) {
return novelInfoMapper.updateByPrimaryKey(novelInfo);
} else {
return novelInfoMapper.insert(novelInfo);
}
}
@Override
public List<NovelInfo> getAllByOrder(String condition, String orderColumn, String orderDir, int startIndex, int pageSize) {
int pageNum = startIndex / pageSize + 1;
PageHelper.startPage(pageNum, pageSize);
return novelInfoMapper.selectAllOrderBy(condition, orderColumn, orderDir);
}
@Override
public int deleteSafetyById(Long id) {
List<Long> longList = new ArrayList<>();
for(NovelChapter novelChapter : novelChapterMapper.selectChaptersByNovelId(id)) {
longList.add(novelChapter.getId());
}
//批量删除数据库
novelChapterMapper.deleteByBatch(longList);
String uploadPath = PropertiesUtil.getConfigBykey("uploadPath");
FileUtil.delete(uploadPath + "/novel/" + id);
return novelInfoMapper.deleteByPrimaryKey(id);
}
@Override
public List<NovelInfo> getAllNovel(int pageNum, int pageSize) {
PageHelper.startPage(pageNum, pageSize);
return novelInfoMapper.selectAll();
}
@Override
public long getCountByCondition(String condition, NovelInfo novelInfo) {
return novelInfoMapper.selectCountByCondition(condition, novelInfo);
}
}
|
[
"d05660@163.com"
] |
d05660@163.com
|
c49df088af54984afd2689fb3406dfb2a12511ea
|
2c55167b086b19933d5a28e03c9d210dc26caf4c
|
/commercetools-models/src/main/java/io/sphere/sdk/inventory/commands/updateactions/ChangeQuantity.java
|
82b86dc2f334c59da197c20b3d8cd1bc79ea30dc
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
commercetools/commercetools-jvm-sdk
|
02a1b6162aff245dce35a2e17b41c5fc8481cf33
|
9268215185628611ad12502cb9c844e8b65c2944
|
refs/heads/master
| 2023-08-31T20:04:34.331396
| 2023-08-11T07:43:29
| 2023-08-11T07:43:29
| 20,855,247
| 46
| 50
|
NOASSERTION
| 2023-08-11T09:27:43
| 2014-06-15T12:46:24
|
Java
|
UTF-8
|
Java
| false
| false
| 747
|
java
|
package io.sphere.sdk.inventory.commands.updateactions;
import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.inventory.InventoryEntry;
/**
* Changes the absolute quantity.
*
* {@doc.gen intro}
*
* {@include.example io.sphere.sdk.inventory.commands.InventoryEntryUpdateCommandIntegrationTest#changeQuantity()}
*/
public final class ChangeQuantity extends UpdateActionImpl<InventoryEntry> {
private final Long quantity;
private ChangeQuantity(final Long quantity) {
super("changeQuantity");
this.quantity = quantity;
}
public long getQuantity() {
return quantity;
}
public static ChangeQuantity of(final long quantity) {
return new ChangeQuantity(quantity);
}
}
|
[
"michael.schleichardt@commercetools.de"
] |
michael.schleichardt@commercetools.de
|
06dc56a556fe1e33ea0cb8b2735fa4bf98ee4d5e
|
df4a0a989966893d130d1f1769474819fd626893
|
/app/src/main/java/com/example/exoplayertest/base/BaseApplication.java
|
2e9d948cf878566a9418270a36783ed338d4d505
|
[] |
no_license
|
sksaikia/ReelsReplica
|
5047c3505334d589d575ee10f1037265a32b9e42
|
083f0c5a4e5a332e74811209d9fcc1cd94f4a3e8
|
refs/heads/main
| 2023-02-06T06:49:19.484367
| 2020-12-31T12:01:34
| 2020-12-31T12:01:34
| 325,610,160
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package com.example.exoplayertest.base;
import android.app.Activity;
import android.app.Application;
import com.example.exoplayertest.di.components.DaggerAppComponent;
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import javax.inject.Inject;
import dagger.android.AndroidInjector;
import dagger.android.DispatchingAndroidInjector;
import dagger.android.HasActivityInjector;
public class BaseApplication extends Application implements HasActivityInjector {
@Inject
DispatchingAndroidInjector<Activity> dispatchingAndroidInjector;
@Override
public AndroidInjector<Activity> activityInjector() {
return dispatchingAndroidInjector;
}
@Override
public void onCreate() {
super.onCreate();
DaggerAppComponent.builder().application(this).build().inject(this);
}
}
|
[
"saikiasourav48@gmail.com"
] |
saikiasourav48@gmail.com
|
a4ec99de38a4edc15c372c65ac6062a829e42197
|
08c88fa7c2e6eb5019dbb59447d0a5a975359d1a
|
/basic/08_map/src/main/java/com/yangbingdong/algo/basic/map/Map.java
|
110c1081fd109e3716d0ce7786243c4cc66c1bae
|
[] |
no_license
|
masteranthoneyd/algo-java
|
f7ac4a33d90d141a07f14497302ea12d94f723e1
|
b33a18341b2b6f3813632cfc11832260439f54a4
|
refs/heads/master
| 2023-06-30T01:46:39.885358
| 2021-07-27T09:34:06
| 2021-07-27T09:34:06
| 365,136,097
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 246
|
java
|
package com.yangbingdong.algo.basic.map;
/**
* @author <a href="mailto:yangbingdong1994@gmail.com">yangbingdong</a>
* @since
*/
public interface Map<K, V> {
void put(K k, V v);
V get(K k);
int size();
void remove(K k);
}
|
[
"yangbingdong1994@gmail.com"
] |
yangbingdong1994@gmail.com
|
3356c19a029b64ecb3d5868ab898ff0cc5f0de02
|
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
|
/hybris/bin/modules/messagecenter/messagecentercsocc/src/de/hybris/platform/messagecentercsocc/constants/MessagecentercsoccConstants.java
|
e5490ec7a2333c8ac0c854b8fb80b2e108df91c1
|
[] |
no_license
|
shaikshakeeb785/hybrisNew
|
c753ac45c6ae264373e8224842dfc2c40a397eb9
|
228100b58d788d6f3203333058fd4e358621aba1
|
refs/heads/master
| 2023-08-15T06:31:59.469432
| 2021-09-03T09:02:04
| 2021-09-03T09:02:04
| 402,680,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 655
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.messagecentercsocc.constants;
/**
* Global class for all messagecentercsocc constants. You can add global constants for your extension into this class.
*/
@SuppressWarnings(
{ "deprecation", "squid:CallToDeprecatedMethod" })
public final class MessagecentercsoccConstants extends GeneratedMessagecentercsoccConstants
{
public static final String EXTENSIONNAME = "messagecentercsocc";
private MessagecentercsoccConstants()
{
//empty to avoid instantiating this constant class
}
// implement here constants used by this extension
}
|
[
"sauravkr82711@gmail.com"
] |
sauravkr82711@gmail.com
|
53e6cdac50fb62f790884309e2be7e221c8ca7c2
|
8bc8e94e7d9d2a6c6aaae2a03b1280a1baa5dd23
|
/src/apple/coreservices/opaque/FSEventStreamRef.java
|
64fcd9d3da1ba43435ea70d36f8ea2e23d2c2f1e
|
[] |
no_license
|
VadimZharkov/natj-mac-example
|
fd5eb814371bde26d7b77c54edbeebb3fa667851
|
94af6b2c1d01fb3f9ebd28550d5996fe49fe3ddc
|
refs/heads/master
| 2020-06-22T00:09:07.333774
| 2019-07-18T12:44:25
| 2019-07-18T12:44:25
| 197,585,255
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,069
|
java
|
/*
Copyright 2014-2016 Intel Corporation
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 apple.coreservices.opaque;
import org.moe.natj.c.CRuntime;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.impl.OpaquePtrImpl;
@Generated
@Runtime(CRuntime.class)
public interface FSEventStreamRef extends ConstFSEventStreamRef {
@Generated
static class Impl extends OpaquePtrImpl implements FSEventStreamRef {
@Generated
protected Impl(Pointer peer) {
super(peer);
}
}
}
|
[
"vadim.zharkov@gmail.com"
] |
vadim.zharkov@gmail.com
|
a7ae10a0cf504b5b6533388e0056eaabe64ee746
|
e7f49b18f53d8b4d4ff35281d7109e6526d95737
|
/112. Path Sum/first/PathSum.java
|
b4953cdeb957433a5a29e4057fdd3047740a6522
|
[] |
no_license
|
yhtsao/leetcode
|
bffd2926c19982802f3373a29722cc1af70fbcdd
|
e06af8b652e584b8b9b1400332d974eef247372b
|
refs/heads/master
| 2020-03-19T15:58:22.584771
| 2018-12-03T03:34:55
| 2018-12-03T03:34:55
| 136,693,933
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 379
|
java
|
package first;
import common.TreeNode;
public class PathSum {
public boolean hasPathSum(TreeNode root, int sum) {
if (root == null) return false;
if (sum - root.val == 0 && root.left == null && root.right == null) return true;
boolean ret = hasPathSum(root.left, sum - root.val) | hasPathSum(root.right, sum - root.val);
return ret;
}
}
|
[
"konve123.am99@gmail.com"
] |
konve123.am99@gmail.com
|
4523c45c1966e4146778f956da9eb5b6be528244
|
29196e2d4adfb14ddd7c2ca8c1e60f8c10c26dad
|
/src/main/java/it/tesoro/fatture/NaturaSpesaTipo.java
|
ac3e679a9976c243b3c9eb8598fcee9ac7b6fe7e
|
[] |
no_license
|
unica-open/siacbilitf
|
bbeef5ceca40e9fb83d5b1176e7f54e8d84592bf
|
85f3254c05c719a0016fe55cea1a105bcb6b89b2
|
refs/heads/master
| 2021-01-06T14:51:17.786934
| 2020-03-03T13:27:47
| 2020-03-03T13:27:47
| 241,366,581
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,071
|
java
|
/*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
package it.tesoro.fatture;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for naturaSpesaTipo.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="naturaSpesaTipo">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="CO"/>
* <enumeration value="CA"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "naturaSpesaTipo")
@XmlEnum
public enum NaturaSpesaTipo {
/**
* Spesa Corrente o classificazione equivalente (es. spesa per beni di consumo)
*
*/
CO,
/**
* Conto Capitale o classificazione equivalente (es. spesa per investimento)
*
*/
CA;
public String value() {
return name();
}
public static NaturaSpesaTipo fromValue(String v) {
return valueOf(v);
}
}
|
[
"barbara.malano@csi.it"
] |
barbara.malano@csi.it
|
ae47734a0734fda107f532918c756b1ab7bb5715
|
dcc9d08eef435a18b71374468b745d3a7460ce17
|
/netty-demo/src/main/java/com/baoge/server/Server.java
|
9d7c4914877ba60fd803140094471db90001e05d
|
[] |
no_license
|
Shaoxubao/dubbo-all-study
|
64f3079ac552232b9348d12a601af6a278ab78f0
|
4fd1de12f50576a0b6320b3cdba5de820d4a1123
|
refs/heads/main
| 2023-07-14T13:33:40.714193
| 2021-08-23T15:09:54
| 2021-08-23T15:09:54
| 303,340,040
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,014
|
java
|
package com.baoge.server;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFactory;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.ChannelGroupFuture;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
/**
* Copyright 2018-2028 Baoge All Rights Reserved.
* Author: Shao Xu Bao <xubao_shao@163.com>
* Date: 2020/10/14
*/
public class Server {
private ChannelFactory factory;
public static ChannelGroup channelGroup = new DefaultChannelGroup();
public void start() {
// NioServerSocketChannelFactory用于创建基于NIO的服务端
// ServerSocketChannel。本身包含2种线程,boss线程和worker线程。
// 每个ServerSocketChannel会都会拥有自己的boss线程,
// 当一个连接被服务端接受(accepted),
// boss线程就会将接收到的Channel传递给一个worker线程处理,
// 而worker线程以非阻塞的方式为一个或多个Channel提供非阻塞的读写
factory = new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(), // boss线程池
Executors.newCachedThreadPool(), // worker线程池
8); // worker线程数
// ServerBootstrap用于帮助服务器启动
ServerBootstrap bootstrap = new ServerBootstrap(factory);
// 没有child.前缀,则该选项是为ServerSocketChannel设置
bootstrap.setOption("reuseAddress", true);
// 有child.前缀,则该选项是为Channel设置
// bootstrap.setOption("child.tcpNoDelay", true);
// bootstrap.setOption("child.keepAlive", true);
// 对每一个连接(channel),server都会调用
// ChannelPipelineFactory为该连接创建一个ChannelPipeline
ServerChannelPipelineFactory channelPipelineFactory = new ServerChannelPipelineFactory();
bootstrap.setPipelineFactory(channelPipelineFactory);
// 这里绑定服务端监听的IP和端口
Channel channel = bootstrap.bind(new InetSocketAddress("127.0.0.1", 8000));
Server.channelGroup.add(channel);
System.out.println("Server is started...");
}
public void stop() {
// ChannelGroup为其管理的Channels提供一系列的批量操作
// 关闭的Channel会自动从ChannelGroup中移除
ChannelGroupFuture channelGroupFuture = Server.channelGroup.close();
channelGroupFuture.awaitUninterruptibly();
factory.releaseExternalResources();
System.out.println("Server is stopped.");
}
public static void main(String[] args) throws Exception {
Server server = new Server();
server.start();
Thread.sleep(300 * 1000);
server.stop();
}
}
|
[
"shaoxubao-sz@fangdd.com"
] |
shaoxubao-sz@fangdd.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.