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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
af8049352a481994ba2050e0619533666defaf58
|
a170c2cebbe8f02cfc344125e60ba22c5f23e2d2
|
/src/main/java/com/ifelze/myfi/repository/PersistenceAuditEventRepository.java
|
e5fbba3e5bd194f3792af616828c432f3da1cbf7
|
[] |
no_license
|
Ifelze/myfi2
|
f108930fa6116316fbe92a9fef4f4cccbd8dc0ea
|
04b0034dc4ca16e2b89f531da4609a966443c3de
|
refs/heads/master
| 2021-01-13T16:00:21.945542
| 2017-01-17T01:47:15
| 2017-01-17T01:47:15
| 76,757,437
| 0
| 1
| null | 2020-09-18T15:55:17
| 2016-12-18T01:53:31
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,007
|
java
|
package com.ifelze.myfi.repository;
import com.ifelze.myfi.domain.PersistentAuditEvent;
import java.time.LocalDateTime;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* Spring Data JPA repository for the PersistentAuditEvent entity.
*/
public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> {
List<PersistentAuditEvent> findByPrincipal(String principal);
List<PersistentAuditEvent> findByAuditEventDateAfter(LocalDateTime after);
List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, LocalDateTime after);
List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principle, LocalDateTime after, String type);
Page<PersistentAuditEvent> findAllByAuditEventDateBetween(LocalDateTime fromDate, LocalDateTime toDate, Pageable pageable);
}
|
[
"naga@ifelze.com"
] |
naga@ifelze.com
|
72ab7b7c4732d26324241a07f7a9ade41d1f615c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/26/26_168412888b7e915892503b66d376a4cd22e21a33/PolarityController/26_168412888b7e915892503b66d376a4cd22e21a33_PolarityController_t.java
|
d8b62cd8627bafbdea876b5f515ccb32429f158d
|
[] |
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,621
|
java
|
package com.avricot.prediction.web.controller.polarity;
import java.util.List;
import javax.inject.Inject;
import org.bson.types.ObjectId;
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.avricot.prediction.model.candidat.Candidat;
import com.avricot.prediction.model.tweet.Tweet;
import com.avricot.prediction.report.Polarity;
import com.avricot.prediction.repository.candidat.CandidatRespository;
import com.avricot.prediction.repository.tweet.TweetRepository;
@Controller
@RequestMapping("/")
public class PolarityController {
@Inject
private TweetRepository tweetRepository;
@Inject
private CandidatRespository candidatRespository;
@RequestMapping(method = RequestMethod.GET)
public String home() {
return "home";
}
@ResponseBody
@RequestMapping(value = "polarity", method = RequestMethod.GET)
public TweetAndCandidat getRandomTweet() {
TweetAndCandidat tweetAndCandidat = new TweetAndCandidat();
List<Tweet> findByChecked = tweetRepository.getTweetNotChecked(20);
int i = (int) (Math.random() * 20L);
tweetAndCandidat.tweet = findByChecked.get(i);
tweetAndCandidat.candidat = candidatRespository.findOne(tweetAndCandidat.tweet.getCandidatId());
return tweetAndCandidat;
}
@ResponseBody
@RequestMapping(value = "addPolarity", method = RequestMethod.POST)
public void addPolarity(final String tweetId, final String val) {
Tweet findOne = tweetRepository.findOne(new ObjectId(tweetId));
Polarity p = null;
if (val.equals("positive")) {
p = Polarity.POSITIVE;
} else if (val.equals("negative")) {
p = Polarity.NEGATIVE;
} else if (val.equals("neutral")) {
p = Polarity.NEUTRAL;
} else if (val.equals("invalid")) {
p = Polarity.INVALID;
} else if (val.equals("not_french")) {
p = Polarity.NOT_FRENCH;
}
// findOne.setChecked(true);
// findOne.setPolarity(p);
// tweetRepository.save(findOne);
updateTweets(p, findOne.getValue(), findOne.getCandidatId());
}
private void updateTweets(Polarity polarity, String value, ObjectId candidatId) {
List<Tweet> findByValueAndCandidatId = tweetRepository.findByValueAndCandidatId(value, candidatId);
for (Tweet t : findByValueAndCandidatId) {
t.setChecked(true);
t.setPolarity(polarity);
tweetRepository.save(t);
}
}
private class TweetAndCandidat {
public Tweet tweet;
public Candidat candidat;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
2b0f6b5afbeed109e95b97a19a4d5651c729195d
|
dde8511e6d72078f7ae09cb786eae78aa9d93947
|
/src/main/java/org/eel/kitchen/jsonschema/syntax/PatternSyntaxChecker.java
|
6648da9204cc21e9e7da4976626a57b2c244d294
|
[] |
no_license
|
gitgrimbo/json-schema-validator
|
7d6fd6804f5d02d5d63f355b747e7aae577717d6
|
0ada3e4a2dc90bae0064f360afefed67dfbbbd6b
|
refs/heads/master
| 2021-01-15T22:24:04.926227
| 2012-09-01T15:00:16
| 2012-09-01T15:00:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,843
|
java
|
/*
* Copyright (c) 2012, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.eel.kitchen.jsonschema.syntax;
import com.fasterxml.jackson.databind.JsonNode;
import org.eel.kitchen.jsonschema.report.ValidationMessage;
import org.eel.kitchen.jsonschema.util.NodeType;
import org.eel.kitchen.jsonschema.util.RhinoHelper;
import java.util.List;
/**
* Syntax validator for the {@code pattern} keyword
*/
public final class PatternSyntaxChecker
extends SimpleSyntaxChecker
{
private static final PatternSyntaxChecker instance
= new PatternSyntaxChecker();
public static PatternSyntaxChecker getInstance()
{
return instance;
}
private PatternSyntaxChecker()
{
super("pattern", NodeType.STRING);
}
@Override
void checkValue(final ValidationMessage.Builder msg,
final List<ValidationMessage> messages, final JsonNode schema)
{
final String value = schema.get(keyword).textValue();
if (RhinoHelper.regexIsValid(value))
return;
msg.setMessage("pattern is not a valid ECMA 262 regex")
.addInfo("found", value);
messages.add(msg.build());
}
}
|
[
"fgaliegue@gmail.com"
] |
fgaliegue@gmail.com
|
2362cc801b2bfe67403ad7fd4c02c8dca8ca6527
|
ed3bccd412e16b54d0fec06454408bc13c420e0d
|
/HTOAWork/src/com/ht/controller/student/StuRepSetController.java
|
6682fec12cfac8c0c5f04b96087e59fd2583c986
|
[] |
no_license
|
Hholz/HTOAWork
|
387978548874d1660c559b30b97b9570956b47dd
|
bacafc4e291e4e9f68bfded90bf3698c704c874c
|
refs/heads/master
| 2021-01-12T05:23:07.621967
| 2017-01-03T12:44:51
| 2017-01-03T12:44:51
| 77,915,150
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,172
|
java
|
package com.ht.controller.student;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ht.annotation.SystemControllerLog;
import com.ht.popj.dailyWork.Noticetype;
import com.ht.popj.finance.FinanceFeestandard;
import com.ht.popj.student.StuRepSet;
import com.ht.service.student.StuRepSetService;
import com.ht.util.ResultMessage;
@Controller
@RequestMapping("/student/StuRepSet")
public class StuRepSetController {
@Autowired
StuRepSetService sturepsetService;
@RequestMapping("/sturepsetList")
@SystemControllerLog(description = "进入打分模板信息页面")
public String noticeList(Model model){
return "/student/StuRepSet";
}
@RequestMapping("/sturepsetListJson")
@SystemControllerLog(description = "返回打分模板表json数据")
public @ResponseBody ResultMessage noticeTypeListJson(int limit, int offset,StuRepSet sturepset){
ResultMessage rm = new ResultMessage();
List<StuRepSet> list = new ArrayList<>();
//计算页数
int pageCount = (int)Math.ceil(offset/(limit*1.0));
PageHelper.startPage(pageCount+1, limit);//该页数是从1开始(当前页数,一页显示的条数)
list = sturepsetService.selectStuRepSet(sturepset);
// 取分页信息
PageInfo<StuRepSet> pageInfo = new PageInfo<StuRepSet>(list);
long total = pageInfo.getTotal(); //获取总记录数
rm.setTotal((int)total);
rm.setRows(list);
return rm;
}
@RequestMapping("/addStuRepSet")
@SystemControllerLog(description = "新增打分模板")
public @ResponseBody int addStuRepSet(StuRepSet sturepset){
sturepset.setCreateTime(new Date());
if(sturepset != null){
int count = sturepsetService.insertStuRepSet(sturepset);
return count;
}
return 0;
}
@RequestMapping(value="/stuRepSet/{id}",method = RequestMethod.PUT)
@SystemControllerLog(description = "修改打分模板")
public @ResponseBody int updateStuRepSet(StuRepSet sturepset){
sturepset.setUpdateTime(new Date());
if(sturepset != null){
int count = sturepsetService.updateStuRepSet(sturepset);
return count;
}
return 0;
}
@RequestMapping(value="/stuRepSet/{id}",method = RequestMethod.DELETE)
@SystemControllerLog(description = "删除打分模板")
public @ResponseBody int deleteStuRepSet(@PathVariable("id") Integer id){
int count = sturepsetService.deleteStuRepSet(id);
return count;
}
@RequestMapping("/findAll")
public @ResponseBody List<StuRepSet> getAll(Model model){
List<StuRepSet> list = new ArrayList<StuRepSet>();
list = sturepsetService.selectStuRepSet(new StuRepSet());
return list;
}
}
|
[
"h_holz@qq.com"
] |
h_holz@qq.com
|
763efa7544ce2dc22bd4813e4dd02cbb3f5bdebe
|
470e669e6e217bc04702b89883b0fdc397b82aef
|
/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfoEntry.java
|
cdc06cb2dfc0c78de2dcd7bdd61871c8dc8eedf3
|
[
"OLDAP-2.8",
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
mchoma/directory-server
|
9b6fdc7ab08e0c4e15348908357402f22d4c1ca6
|
1399b77e0205b8b5dd8f67fe188f8fc99979ca8e
|
refs/heads/master
| 2021-03-30T21:19:27.176358
| 2018-01-23T07:20:36
| 2018-01-23T07:20:36
| 124,422,178
| 0
| 0
|
Apache-2.0
| 2018-03-08T17:10:00
| 2018-03-08T16:59:41
|
Java
|
UTF-8
|
Java
| false
| false
| 7,033
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.directory.shared.kerberos.components;
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import org.apache.directory.api.asn1.Asn1Object;
import org.apache.directory.api.asn1.EncoderException;
import org.apache.directory.api.asn1.ber.tlv.BerValue;
import org.apache.directory.api.asn1.ber.tlv.TLV;
import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
import org.apache.directory.api.util.Strings;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.shared.kerberos.KerberosConstants;
import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Provides encryption info information sent to the client.
*
* The ASN.1 grammar for this structure is :
* <pre>
* ETYPE-INFO-ENTRY ::= SEQUENCE {
* etype [0] Int32,
* salt [1] OCTET STRING OPTIONAL
* }
* </pre>
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class ETypeInfoEntry implements Asn1Object
{
/** The logger */
private static final Logger LOG = LoggerFactory.getLogger( ETypeInfoEntry.class );
/** Speedup for logs */
private static final boolean IS_DEBUG = LOG.isDebugEnabled();
/** The encryption type */
private EncryptionType etype;
/** The salt */
private byte[] salt;
// Storage for computed lengths
private int etypeTagLength;
private int saltTagLength;
private int etypeInfoEntrySeqLength;
/**
* Creates a new instance of ETypeInfoEntry.
*
* @param etype the Encryption type
* @param salt the salt
*/
public ETypeInfoEntry( EncryptionType etype, byte[] salt )
{
this.etype = etype;
this.salt = salt;
}
/**
* Creates a new instance of ETypeInfoEntry.
*/
public ETypeInfoEntry()
{
}
/**
* Returns the salt.
*
* @return The salt.
*/
public byte[] getSalt()
{
return salt;
}
/**
* @param salt the salt to set
*/
public void setSalt( byte[] salt )
{
this.salt = salt;
}
/**
* Returns the {@link EncryptionType}.
*
* @return The {@link EncryptionType}.
*/
public EncryptionType getEType()
{
return etype;
}
/**
* @param encryptionType the encryptionType to set
*/
public void setEType( EncryptionType etype )
{
this.etype = etype;
}
/**
* Compute the ETYPE-INFO-ENTRY length
* <pre>
* ETYPE-INFO-ENTRY :
*
* 0x30 L1 ETYPE-INFO-ENTRY sequence
* |
* +--> 0xA0 L2 etype tag
* | |
* | +--> 0x02 L2-1etype (int)
* |
* +--> 0xA1 L3 salt tag
* |
* +--> 0x04 L3-1 salt (OCTET STRING)
*
* where L1 = L2 + lenght(0xA0) + length(L2) +
* L3 + lenght(0xA1) + length(L3)
* and
* L2 = L2-1 + length(0x02) + length( L2-1)
* L3 = L3-1 + length(0x04) + length( L3-1)
* </pre>
*/
public int computeLength()
{
// Compute the etype. The Length will always be contained in 1 byte
int etypeLength = BerValue.getNbBytes( etype.getValue() );
etypeTagLength = 1 + TLV.getNbBytes( etypeLength ) + etypeLength;
etypeInfoEntrySeqLength = 1 + TLV.getNbBytes( etypeTagLength ) + etypeTagLength;
// Compute the salt
if ( salt != null )
{
saltTagLength = 1 + TLV.getNbBytes( salt.length ) + salt.length;
etypeInfoEntrySeqLength += 1 + TLV.getNbBytes( saltTagLength ) + saltTagLength;
}
return 1 + TLV.getNbBytes( etypeInfoEntrySeqLength ) + etypeInfoEntrySeqLength;
}
/**
* Encode the ETYPE-INFO-ENTRY message to a PDU.
* <pre>
* ETYPE-INFO-ENTRY :
*
* 0x30 LL
* 0xA1 LL
* 0x02 0x01 etype
* 0xA2 LL
* 0x04 LL salt
* </pre>
* @param buffer The buffer where to put the PDU. It should have been allocated
* before, with the right size.
* @return The constructed PDU.
*/
public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
{
if ( buffer == null )
{
throw new EncoderException( I18n.err( I18n.ERR_148 ) );
}
try
{
// The ETYPE-INFO-ENTRY SEQ Tag
buffer.put( UniversalTag.SEQUENCE.getValue() );
buffer.put( TLV.getBytes( etypeInfoEntrySeqLength ) );
// The etype, first the tag, then the value
buffer.put( ( byte ) KerberosConstants.ETYPE_INFO_ENTRY_ETYPE_TAG );
buffer.put( TLV.getBytes( etypeTagLength ) );
BerValue.encode( buffer, etype.getValue() );
// The salt, first the tag, then the value, if salt is not null
if ( salt != null )
{
buffer.put( ( byte ) KerberosConstants.ETYPE_INFO_ENTRY_SALT_TAG );
buffer.put( TLV.getBytes( saltTagLength ) );
BerValue.encode( buffer, salt );
}
}
catch ( BufferOverflowException boe )
{
LOG.error( I18n.err( I18n.ERR_145, 1 + TLV.getNbBytes( etypeInfoEntrySeqLength )
+ etypeInfoEntrySeqLength, buffer.capacity() ) );
throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
}
if ( IS_DEBUG )
{
LOG.debug( "ETYPE-INFO-ENTRY encoding : {}", Strings.dumpBytes( buffer.array() ) );
LOG.debug( "ETYPE-INFO-ENTRY initial value : {}", toString() );
}
return buffer;
}
/**
* @see Object#toString()
*/
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append( "ETYPE-INFO-ENTRY : {\n" );
sb.append( " etype: " ).append( etype ).append( '\n' );
if ( salt != null )
{
sb.append( " salt: " ).append( Strings.dumpBytes( salt ) ).append( '\n' );
}
sb.append( "}\n" );
return sb.toString();
}
}
|
[
"elecharny@apache.org"
] |
elecharny@apache.org
|
ba86624e285bec14820d274e7fcc46f931d3beb5
|
7c0d4bbeb65a58e2ae80191258c76960de691390
|
/poc/SpaceWeatherSWD/SpaceWeatherSWD/SpaceWeatherSWD-Application/src/main/java/br/inpe/climaespacial/swd/acquisition/providers/DateTimeProvider.java
|
26760df40959a6fd5f9ae44e46ef690f0f7f62da
|
[] |
no_license
|
guilhermebotossi/upmexmples
|
92d53f2a04d4fe53cc0bf8ead0788983d7c28a0a
|
77d90477c85456b223c21e4e9a77f761be4fa861
|
refs/heads/master
| 2022-12-07T12:25:32.599139
| 2019-11-26T23:45:48
| 2019-11-26T23:45:48
| 35,224,927
| 0
| 0
| null | 2022-11-24T09:17:43
| 2015-05-07T14:31:30
|
Java
|
UTF-8
|
Java
| false
| false
| 156
|
java
|
package br.inpe.climaespacial.swd.acquisition.providers;
import java.time.ZonedDateTime;
public interface DateTimeProvider {
ZonedDateTime getNow();
}
|
[
"guilhermebotossi@gmail.com"
] |
guilhermebotossi@gmail.com
|
ddec401a1e55267f32c421ac360e9b4ef9f1ee7d
|
7d169e796639b01c6b652f12effa1d59951b8345
|
/src/java/javay/test/xml/JDomDemo.java
|
38e04d0dd0f40f50caaad014a4c3d31733fc929f
|
[
"Apache-2.0"
] |
permissive
|
dubenju/javay
|
65555744a895ecbd345df07e5537072985095e3b
|
29284c847c2ab62048538c3973a9fb10090155aa
|
refs/heads/master
| 2021-07-09T23:44:55.086890
| 2020-07-08T13:03:50
| 2020-07-08T13:03:50
| 47,082,846
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package javay.test.xml;
import java.io.IOException;
import java.util.List;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
/**
* @author Alexia
*
* JDOM 解析XML文档
*
*/
public class JDomDemo implements XmlDocument {
public void parserXml(String fileName) {
SAXBuilder builder = new SAXBuilder();
try {
Document document = builder.build(fileName);
Element users = document.getRootElement();
List userList = users.getChildren("user");
for (int i = 0; i < userList.size(); i++) {
Element user = (Element) userList.get(i);
List userInfo = user.getChildren();
for (int j = 0; j < userInfo.size(); j++) {
System.out.println(((Element) userInfo.get(j)).getName()
+ ":" + ((Element) userInfo.get(j)).getValue());
}
System.out.println();
}
} catch (JDOMException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"dubenju@163.com"
] |
dubenju@163.com
|
5b39e31fa139214c33c37feed8f2d4def5f72b6c
|
772b9a2489fab0b98c9b67622a4feb913e70e6be
|
/app/src/main/java/com/hkm/baidumap/demo/LayersDemo.java
|
9a61e01f89e2da023d96dde8b76fb0298b96d357
|
[
"MIT"
] |
permissive
|
jjhesk/BaibuMapGradle
|
6d1e63f4c0d8b7c78ed30509223b78b7ca73ac15
|
ca7c7092504f0771ecd4cf6a5c51a2d4c9ac84af
|
refs/heads/master
| 2020-03-29T13:41:02.855871
| 2015-04-15T10:08:12
| 2015-04-15T10:08:12
| 33,986,732
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package com.hkm.baidumap.demo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.RadioButton;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.MapView;
import com.hkm.baidumap.R;
/**
* 演示地图图层显示的控制方法
*/
public class LayersDemo extends Activity {
/**
* MapView 是地图主控件
*/
private MapView mMapView;
private BaiduMap mBaiduMap;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_layers);
mMapView = (MapView) findViewById(R.id.bmapView);
mBaiduMap = mMapView.getMap();
}
/**
* 设置底图显示模式
*
* @param view
*/
public void setMapMode(View view) {
boolean checked = ((RadioButton) view).isChecked();
switch (view.getId()) {
case R.id.normal:
if (checked)
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
break;
case R.id.statellite:
if (checked)
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_SATELLITE);
break;
}
}
/**
* 设置是否显示交通图
*
* @param view
*/
public void setTraffic(View view) {
mBaiduMap.setTrafficEnabled(((CheckBox) view).isChecked());
}
/**
* 设置是否显示百度热力图
*
* @param view
*/
public void setBaiduHeatMap(View view) {
mBaiduMap.setBaiduHeatMapEnabled(((CheckBox) view).isChecked());
}
@Override
protected void onPause() {
// MapView的生命周期与Activity同步,当activity挂起时需调用MapView.onPause()
mMapView.onPause();
super.onPause();
}
@Override
protected void onResume() {
// MapView的生命周期与Activity同步,当activity恢复时需调用MapView.onResume()
mMapView.onResume();
super.onResume();
}
@Override
protected void onDestroy() {
// MapView的生命周期与Activity同步,当activity销毁时需调用MapView.destroy()
mMapView.onDestroy();
super.onDestroy();
}
}
|
[
"jobhesk@gmail.com"
] |
jobhesk@gmail.com
|
4094666fef9ba7908bea7864313ad07d76479e22
|
846a7668ac964632bdb6db639ab381be11c13b77
|
/android/tools/tradefederation/core/src/com/android/tradefed/device/PackageInfo.java
|
1f114d41f923cfabf88bd1b1d2e4fea57cc49e5b
|
[] |
no_license
|
BPI-SINOVOIP/BPI-A64-Android8
|
f2900965e96fd6f2a28ced68af668a858b15ebe1
|
744c72c133b9bf5d2e9efe0ab33e01e6e51d5743
|
refs/heads/master
| 2023-05-21T08:02:23.364495
| 2020-07-15T11:27:51
| 2020-07-15T11:27:51
| 143,945,191
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,502
|
java
|
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tradefed.device;
import java.util.HashMap;
import java.util.Map;
/**
* Container for an application's package info parsed from device.
*/
public class PackageInfo {
// numeric flag constants. Copied from
// frameworks/base/core/java/android/content/pm/ApplicationInfo.java
private static final int FLAG_UPDATED_SYSTEM_APP = 1 << 7;
private static final int FLAG_SYSTEM = 1 << 0;
// string flag constants. Used for newer platforms
private static final String FLAG_UPDATED_SYSTEM_APP_TEXT = " UPDATED_SYSTEM_APP ";
private static final String FLAG_SYSTEM_TEXT = " SYSTEM ";
private final String mPackageName;
private boolean mIsSystemApp;
private boolean mIsUpdatedSystemApp;
private Map<String, String> mAttributes = new HashMap<String, String>();
PackageInfo(String pkgName) {
mPackageName = pkgName;
}
/**
* Returns <code>true</code> if this is a system app that has been updated.
*/
public boolean isUpdatedSystemApp() {
return mIsUpdatedSystemApp;
}
/**
* Returns <code>true</code> if this is a system app.
*/
public boolean isSystemApp() {
return mIsSystemApp;
}
/**
* Returns the package name of the application.
*/
public String getPackageName() {
return mPackageName;
}
/**
* Returns the version name of the application.
* Note: this will return <code>null</code> if 'versionName' attribute was not found, such as
* on froyo devices.
*/
public String getVersionName() {
return mAttributes.get("versionName");
}
void setIsUpdatedSystemApp(boolean isUpdatedSystemApp) {
mIsUpdatedSystemApp = isUpdatedSystemApp;
}
void addAttribute(String name, String value) {
mAttributes.put(name, value);
if (name.equals("pkgFlags") || name.equals("flags")) {
// do special handling of pkgFlags, which can be either hex or string form depending on
// device OS version
if (!parseFlagsAsInt(value)) {
parseFlagsAsString(value);
}
}
}
private void parseFlagsAsString(String flagString) {
mIsSystemApp = flagString.contains(FLAG_SYSTEM_TEXT);
mIsUpdatedSystemApp = flagString.contains(FLAG_UPDATED_SYSTEM_APP_TEXT);
}
private boolean parseFlagsAsInt(String value) {
try {
int flags = Integer.decode(value);
mIsSystemApp = (flags & FLAG_SYSTEM) != 0;
// note: FLAG_UPDATED_SYSTEM_APP never seems to be set. Rely on parsing hidden system
// packages
mIsUpdatedSystemApp = (flags & FLAG_UPDATED_SYSTEM_APP) != 0;
return true;
} catch (NumberFormatException e) {
// not an int, fall through
}
return false;
}
}
|
[
"mingxin.android@gmail.com"
] |
mingxin.android@gmail.com
|
06376e240905ba543e64f89b0bfdb85790226fd0
|
ba005c6729aed08554c70f284599360a5b3f1174
|
/lib/selenium-server-standalone-3.4.0/org/openqa/grid/internal/listeners/SelfHealingProxy.java
|
d0b2509cff54f042f66b3630e03df6b143baad7c
|
[] |
no_license
|
Viral-patel703/Testyourbond-aut0
|
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
|
784ab7a3df33d0efbd41f3adadeda22844965a56
|
refs/heads/master
| 2020-08-09T00:27:26.261661
| 2017-11-07T10:12:05
| 2017-11-07T10:12:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 436
|
java
|
package org.openqa.grid.internal.listeners;
import java.util.List;
import org.openqa.grid.common.exception.RemoteException;
public abstract interface SelfHealingProxy
{
public abstract void startPolling();
public abstract void stopPolling();
public abstract void addNewEvent(RemoteException paramRemoteException);
public abstract void onEvent(List<RemoteException> paramList, RemoteException paramRemoteException);
}
|
[
"VIRUS-inside@users.noreply.github.com"
] |
VIRUS-inside@users.noreply.github.com
|
2375addb9aecfae6d16daa85e5fc70150be177c9
|
c3d086357565983997d3d4c1c6890266e5607c97
|
/data/apachexmlrpc/apachexmlrpc-3.0/xmlrpc-3.0/client/src/main/java/org/apache/xmlrpc/client/XmlRpcHttpTransport.java
|
a14d6ba02ed9e3281afce7861d9885ee9bc01243
|
[
"MIT"
] |
permissive
|
hrahmadi71/MultiRefactor
|
39ab0f4900f27e2b021e48af590f767495f01077
|
99a15c96d045aa0b798d3d364ecb49153361a5a9
|
refs/heads/master
| 2022-11-25T14:27:37.678256
| 2020-07-27T02:58:13
| 2020-07-27T02:58:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,876
|
java
|
package org.apache.xmlrpc.client;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import org.apache.xmlrpc.util.HttpUtil;
import org.xml.sax.SAXException;
/** Abstract base implementation of an HTTP transport. Base class for the
* concrete implementations, like {@link org.apache.xmlrpc.client.XmlRpcSunHttpTransport},
* or {@link org.apache.xmlrpc.client.XmlRpcCommonsTransport}.
*/
public abstract class XmlRpcHttpTransport extends XmlRpcStreamTransport {
protected class ByteArrayReqWriter implements ReqWriter {
private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteArrayReqWriter(XmlRpcRequest pRequest)
throws XmlRpcException, IOException, SAXException {
new ReqWriterImpl(pRequest).write(baos);
}
protected int getContentLength() {
return baos.size();
}
public void write(OutputStream pStream) throws IOException {
try {
baos.writeTo(pStream);
pStream.close();
pStream = null;
} finally {
if (pStream != null) { try { pStream.close(); } catch (Throwable ignore) {} }
}
}
}
private String userAgent;
/** The user agent string.
*/
public static final String USER_AGENT = "Apache XML RPC 3.0";
protected XmlRpcHttpTransport(XmlRpcClient pClient, String pUserAgent) {
super(pClient);
userAgent = pUserAgent;
}
protected String getUserAgent() { return userAgent; }
protected abstract void setRequestHeader(String pHeader, String pValue);
protected void setCredentials(XmlRpcHttpClientConfig pConfig)
throws XmlRpcClientException {
String auth;
try {
auth = HttpUtil.encodeBasicAuthentication(pConfig.getBasicUserName(),
pConfig.getBasicPassword(),
pConfig.getBasicEncoding());
} catch (UnsupportedEncodingException e) {
throw new XmlRpcClientException("Unsupported encoding: " + pConfig.getBasicEncoding(), e);
}
if (auth != null) {
setRequestHeader("Authorization", "Basic " + auth);
}
}
protected void setContentLength(int pLength) {
setRequestHeader("Content-Length", Integer.toString(pLength));
}
protected void setCompressionHeaders(XmlRpcHttpClientConfig pConfig) {
if (pConfig.isGzipCompressing()) {
setRequestHeader("Content-Encoding", "gzip");
}
if (pConfig.isGzipRequesting()) {
setRequestHeader("Accept-Encoding", "gzip");
}
}
protected void initHttpHeaders(XmlRpcRequest pRequest) throws XmlRpcClientException {
XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
setRequestHeader("Content-Type", "text/xml");
setRequestHeader("User-Agent", getUserAgent());
setCredentials(config);
setCompressionHeaders(config);
}
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException {
initHttpHeaders(pRequest);
return super.sendRequest(pRequest);
}
protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig) {
return !pConfig.isEnabledForExtensions()
|| !pConfig.isContentLengthOptional();
}
protected ReqWriter newReqWriter(XmlRpcRequest pRequest)
throws XmlRpcException, IOException, SAXException {
final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
if (isUsingByteArrayOutput(config)) {
ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest);
setContentLength(reqWriter.getContentLength());
if (isCompressingRequest(config)) {
return new GzipReqWriter(reqWriter);
}
return reqWriter;
} else {
return super.newReqWriter(pRequest);
}
}
}
|
[
"40020843@eeecs.qub.ac.uk"
] |
40020843@eeecs.qub.ac.uk
|
4bed1e4983f2d54337090e967989a22c6e6f886b
|
c76401b04444443a6943d9cd25313daca354b2e8
|
/ged-domain/src/main/java/br/com/ged/domain/LayoutLoginEnum.java
|
1285f1affb29cd980137ab63133e3d138d7919c1
|
[] |
no_license
|
gedocweb/ged-prefeitura
|
1a2cf11ebf5ae71bada8b09bdeac7996599219b9
|
32b4a8c15f48ac241fabf85bba1cb8e7bf004503
|
refs/heads/master
| 2020-04-15T00:05:15.315112
| 2016-11-04T14:31:20
| 2016-11-04T14:31:20
| 68,115,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 775
|
java
|
package br.com.ged.domain;
public enum LayoutLoginEnum implements ConfigLayoutCliente{
PRATIKA("logo_pratika.png","padding-left: 32%;","500px","250px"),
SOLUCAO("logo_solucao.png","padding-left: 32%;","500px","250px");
private String nomeImage;
private String styleCss;
private String width;
private String height;
private LayoutLoginEnum (String nomeImagem, String styleCss, String width, String height){
this.nomeImage = nomeImagem;
this.styleCss = styleCss;
this.width = width;
this.height = height;
}
public String getNomeImage() {
return nomeImage;
}
public String getStyleCss() {
return styleCss;
}
public String getWidth() {
return width;
}
public String getHeight() {
return height;
}
}
|
[
"pedroaugusto.gti@gmail.com"
] |
pedroaugusto.gti@gmail.com
|
2438643f90727368797018646a250248d19f42ad
|
cb2c0eb3000e3ae78ca60ac150e29beae6e0b77c
|
/IOCPROJ74_100pcode_wish/src/test/java/com/nt/beans/BeanConfugration.java
|
1b6d325102ada0b7171787d4c8791fe1d2f849bb
|
[] |
no_license
|
papupanda/Spring
|
4e167c3c5232460cc0189c08227a329cbf536662
|
b54c9534b3e8e0795024c42d0738fc26ce3f0359
|
refs/heads/master
| 2022-12-21T22:14:05.763765
| 2020-03-09T18:35:20
| 2020-03-09T18:35:20
| 246,110,246
| 0
| 0
| null | 2022-12-16T02:34:47
| 2020-03-09T18:19:46
|
Java
|
UTF-8
|
Java
| false
| false
| 579
|
java
|
package com.nt.beans;
import java.util.Calendar;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan(basePackages="com.nt.beans")
public class BeanConfugration {
public BeanConfugration(){
System.out.println("BeanConfugration.0 param constructor");
}
@Bean(name="cal")
public Calendar createCalender() {
System.out.println("BeanConfugration.createCalender()");
return Calendar.getInstance();
}//method
}//class
|
[
"satyaranjanpanda993@gmail.com"
] |
satyaranjanpanda993@gmail.com
|
88805591e7e413071c1d02ef2b308090ffb23700
|
6d40ffc505568fd4b34e87783e832cf78530d3de
|
/core/src/main/java/org/axonframework/messaging/StreamUtils.java
|
d5bcf0c7d5ad09b977714332155104ddf127d50d
|
[
"Apache-2.0"
] |
permissive
|
jenniferlawl/AxonFramework
|
0a6dbd5fd850190d5d8e5917404818f2119d0f87
|
8fdc4093bc99b6258299b2dbc7106e711f8c1779
|
refs/heads/master
| 2021-08-18T16:59:16.827620
| 2017-11-23T09:47:01
| 2017-11-23T09:47:01
| 111,807,786
| 1
| 0
| null | 2017-11-23T12:38:58
| 2017-11-23T12:38:58
| null |
UTF-8
|
Java
| false
| false
| 2,211
|
java
|
/*
* Copyright (c) 2010-2017. Axon Framework
* 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.axonframework.messaging;
import org.axonframework.eventsourcing.eventstore.TrackingEventStream;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.function.Consumer;
import java.util.stream.Stream;
import static java.util.Spliterator.*;
import static java.util.stream.StreamSupport.stream;
/**
* Utility class for working with Streams.
*/
public abstract class StreamUtils {
/**
* Convert the given {@code messageStream} to a regular java {@link Stream} of messages. Note that the returned
* stream will block during iteration if the end of the stream is reached so take heed of this in production code.
*
* @param messageStream the input {@link TrackingEventStream}
* @return the output {@link Stream} after conversion
*/
public static <M extends Message<?>> Stream<M> asStream(MessageStream<M> messageStream) {
Spliterator<M> spliterator =
new Spliterators.AbstractSpliterator<M>(Long.MAX_VALUE, DISTINCT | NONNULL | ORDERED) {
@Override
public boolean tryAdvance(Consumer<? super M> action) {
try {
action.accept(messageStream.nextAvailable());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return false;
}
return true;
}
};
return stream(spliterator, false);
}
private StreamUtils() {
}
}
|
[
"buijze@gmail.com"
] |
buijze@gmail.com
|
0c1196c710471802ecbcb47ad49d03037b0a9076
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/src/com/jshx/zcaqgcs/entity/CerSafEng.java
|
2b0b11679f05d6907474d4d00f0744aa198a9742
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,585
|
java
|
package com.jshx.zcaqgcs.entity;
import java.sql.Blob;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import com.jshx.core.base.entity.BaseModel;
/**
* 实体类模板(目前仅适配MS-SQLServer数据库)
* @author
*
*/
@SuppressWarnings("serial")
@Entity
@Table(name="CER_SAF_ENG")
public class CerSafEng extends BaseModel
{
/**
* 部门代码
*/
private String deptId;
/**
* 删除标记
*/
private Integer delFlag;
/**
* 所在区域id
*/
private String areaId;
/**
* 所在区域名称
*/
private String areaName;
/**
* 企业id
*/
private String companyId;
/**
* 企业名称
*/
private String companyName;
/**
* 姓名
*/
private String saftyName;
/**
* 性别
*/
private String sex;
/**
* 职位
*/
private String position;
/**
* 文化程度
*/
private String education;
/**
* 电话
*/
private String tele;
/**
* 身份证
*/
private String idCard;
/**
* 地址
*/
private String address;
/**
* 职称
*/
private String jobTitle;
/**
* 首次领证时间
*/
private Date firstLicense;
/**
* 合格证号
*/
private String certificateNo;
/**
* 证书有效期
*/
private Date certificaateValid;
public CerSafEng(){
}
public CerSafEng(String id, String areaName,String companyName, String saftyName, String idCard, String certificateNo,String createUserID){
this.id = id;
this.areaName=areaName;
this.companyName = companyName;
this.saftyName = saftyName;
this.idCard = idCard;
this.certificateNo = certificateNo;
this.createUserID=createUserID;
}
@Column
public String getDeptId()
{
return deptId;
}
public void setDeptId(String deptId)
{
this.deptId = deptId;
}
@Column
public Integer getDelFlag()
{
return delFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
@Column(name="AREA_ID")
public String getAreaId()
{
return this.areaId;
}
public void setAreaId(String areaId)
{
this.areaId = areaId;
}
@Column(name="AREA_NAME")
public String getAreaName()
{
return this.areaName;
}
public void setAreaName(String areaName)
{
this.areaName = areaName;
}
@Column(name="COMPANY_ID")
public String getCompanyId()
{
return this.companyId;
}
public void setCompanyId(String companyId)
{
this.companyId = companyId;
}
@Column(name="COMPANY_NAME")
public String getCompanyName()
{
return this.companyName;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
@Column(name="SAFTY_NAME")
public String getSaftyName()
{
return this.saftyName;
}
public void setSaftyName(String saftyName)
{
this.saftyName = saftyName;
}
@Column(name="SEX")
public String getSex()
{
return this.sex;
}
public void setSex(String sex)
{
this.sex = sex;
}
@Column(name="POSITION")
public String getPosition()
{
return this.position;
}
public void setPosition(String position)
{
this.position = position;
}
@Column(name="EDUCATION")
public String getEducation()
{
return this.education;
}
public void setEducation(String education)
{
this.education = education;
}
@Column(name="TELE")
public String getTele()
{
return this.tele;
}
public void setTele(String tele)
{
this.tele = tele;
}
@Column(name="ID_CARD")
public String getIdCard()
{
return this.idCard;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
@Column(name="ADDRESS")
public String getAddress()
{
return this.address;
}
public void setAddress(String address)
{
this.address = address;
}
@Column(name="JOB_TITLE")
public String getJobTitle()
{
return this.jobTitle;
}
public void setJobTitle(String jobTitle)
{
this.jobTitle = jobTitle;
}
@Column(name="FIRST_LICENSE")
public Date getFirstLicense()
{
return this.firstLicense;
}
public void setFirstLicense(Date firstLicense)
{
this.firstLicense = firstLicense;
}
@Column(name="CERTIFICATE_NO")
public String getCertificateNo()
{
return this.certificateNo;
}
public void setCertificateNo(String certificateNo)
{
this.certificateNo = certificateNo;
}
@Column(name="CERTIFICAATE_VALID")
public Date getCertificaateValid()
{
return this.certificaateValid;
}
public void setCertificaateValid(Date certificaateValid)
{
this.certificaateValid = certificaateValid;
}
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
08f5f76d7455c4c5d04a87652d867c674944917b
|
59cf0f731703b58e7833e94735c59a165ac94454
|
/src/main/java/com/labbol/smeri/api/test/orig/support/OrigModifyLogWrapper.java
|
b43d60df7e843cedb0b9b2c58b90255ca1b3a07f
|
[] |
no_license
|
labbolframework/smeri_tms_sdk
|
ae152477733f476d6e5d74c9974d15fc53b2bf26
|
9e42732e14b483eb6bbbca5b585edb253a1b7033
|
refs/heads/master
| 2021-04-22T17:26:35.435168
| 2020-05-10T10:49:32
| 2020-05-10T10:49:32
| 249,864,925
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 513
|
java
|
/**
*
*/
package com.labbol.smeri.api.test.orig.support;
/**
* @author PengFei
*
*/
public class OrigModifyLogWrapper {
private OrigModifyLog origModifyLog;
public OrigModifyLogWrapper() {
}
public OrigModifyLogWrapper(OrigModifyLog origModifyLog) {
this.origModifyLog = origModifyLog;
}
public OrigModifyLog getOrigModifyLog() {
return origModifyLog;
}
public void setOrigModifyLog(OrigModifyLog origModifyLog) {
this.origModifyLog = origModifyLog;
}
}
|
[
"yl1430834495@163.com"
] |
yl1430834495@163.com
|
fb15686289a0078c3dbb1ce753993d271136b88a
|
642f1f62abb026dee2d360a8b19196e3ccb859a1
|
/web-cx/src/main/java/com/sun3d/why/controller/yket/FavoriteController.java
|
4aaa851dacbf58c6db2a9809c5cbf39ee23f94df
|
[] |
no_license
|
P79N6A/alibaba-1
|
f6dacf963d56856817b211484ca4be39f6dd9596
|
6ec48f26f16d51c8a493b0eee12d90775b6eaf1d
|
refs/heads/master
| 2020-05-27T08:34:26.827337
| 2019-05-25T07:50:12
| 2019-05-25T07:50:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,877
|
java
|
package com.sun3d.why.controller.yket;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.sun3d.why.common.ProjectConst;
import com.sun3d.why.common.Result;
import com.sun3d.why.enumeration.FavoriteEnum;
import com.sun3d.why.enumeration.RSKeyEnum;
import com.sun3d.why.exception.UserReadableException;
import com.sun3d.why.model.CmsTerminalUser;
import com.sun3d.why.model.bean.yket.YketFavoriteKey;
import com.sun3d.why.service.FavoriteService;
@Controller
@RequestMapping("/common")
public class FavoriteController {
@Autowired
FavoriteService favoriteService;
@Autowired
HttpSession session;
@ExceptionHandler(UserReadableException.class)
@ResponseBody
public Result handleUserReadableException(HttpServletRequest request, UserReadableException e) {
return Result.Error().setVal(RSKeyEnum.msg, e.getMessage());
}
@RequestMapping(value = "/favorite", method = RequestMethod.POST)
@ResponseBody
public Result favorite(String objectId, String favoriteType,String userId) {
CmsTerminalUser user = (CmsTerminalUser) session.getAttribute(ProjectConst.FRONT_SESSION_KEY);
if(user==null && StringUtils.isEmpty(userId)){
return Result.Unlogin();
}
YketFavoriteKey record = new YketFavoriteKey();
record.setFavoriteType(FavoriteEnum.COURSE.getIndex());
record.setObjectId(objectId);
record.setUserId(user!=null?user.getUserId():userId);
return this.favoriteService.favorite(record);
}
}
|
[
"comalibaba@163.com"
] |
comalibaba@163.com
|
c4df1fcd8e3c94919f803584ed07171947ce22ce
|
3bc2ab5ad5ae71e96aa4805b3e6a1cc7b396f8ce
|
/java/java-tests/testData/inspection/dataFlow/fixture/SuperCallMayChangeFields.java
|
36ffed84162e8b7257bb1ab96caabb1dadc29093
|
[
"Apache-2.0"
] |
permissive
|
fatherican/intellij-community
|
12c333fdac55face5be81ea501bbabc9faf53cc5
|
3934fe7ca9d879affd200a60c95fd2d3b487fff5
|
refs/heads/master
| 2021-09-06T19:19:51.702321
| 2018-02-09T02:32:43
| 2018-02-09T02:34:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
class Base {
void foo() {}
void bar() { foo(); }
}
class Test extends Base {
private String string;
void foo() {
string = "";
}
protected void bar() {
string = <warning descr="Assigning 'null' argument to non-annotated field">null</warning>;
super.bar();
if (string != null)
super.bar();
}
}
|
[
"peter@jetbrains.com"
] |
peter@jetbrains.com
|
d6fd9305b207fcdd8c51035442fc9c2178c50c9e
|
7853a4e017e1885307ec4d5f39361e9cdf7ee15e
|
/bundles/sirix-xquery/src/test/java/org/sirix/xquery/function/sdb/trx/AuthorNameTest.java
|
ca55af71548bc808425194d174e257ab97b61ca2
|
[
"BSD-3-Clause"
] |
permissive
|
JohannesLichtenberger/sirix
|
a211d56eabdb26fbfab9151f63e4f8d012c2b107
|
710b8c8507e287ec42edd0a6476b3a630524b9f2
|
refs/heads/master
| 2022-05-11T21:07:00.794840
| 2022-04-09T13:34:37
| 2022-04-09T13:34:37
| 126,385,599
| 1
| 0
|
BSD-3-Clause
| 2021-08-21T20:37:33
| 2018-03-22T19:31:01
|
Java
|
UTF-8
|
Java
| false
| false
| 3,697
|
java
|
package org.sirix.xquery.function.sdb.trx;
import org.brackit.xquery.XQuery;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.sirix.JsonTestHelper;
import org.sirix.access.Databases;
import org.sirix.access.ResourceConfiguration;
import org.sirix.access.User;
import org.sirix.service.json.shredder.JsonShredder;
import org.sirix.xquery.SirixCompileChain;
import org.sirix.xquery.SirixQueryContext;
import org.sirix.xquery.json.BasicJsonDBStore;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.UUID;
public class AuthorNameTest {
@Before
public void setUp() {
JsonTestHelper.deleteEverything();
}
@After
public void tearDown() {
JsonTestHelper.closeEverything();
}
@Test
public void test() throws IOException {
try (final var database = JsonTestHelper.getDatabase(JsonTestHelper.PATHS.PATH1.getFile())) {
database.createResource(ResourceConfiguration.newBuilder("mydoc.jn").build());
try (final var manager = database.openResourceManager("mydoc.jn"); final var wtx = manager.beginNodeTrx()) {
wtx.insertSubtreeAsFirstChild(JsonShredder.createStringReader("[\"bla\", \"blubb\"]"));
}
}
try (final var database = Databases.openJsonDatabase(JsonTestHelper.PATHS.PATH1.getFile(),
new User("johannes", UUID.randomUUID()));
final var manager = database.openResourceManager("mydoc.jn");
final var wtx = manager.beginNodeTrx()) {
wtx.moveTo(2);
wtx.setStringValue("blabla").commit();
}
try (final var database = Databases.openJsonDatabase(JsonTestHelper.PATHS.PATH1.getFile(),
new User("moshe", UUID.randomUUID()));
final var manager = database.openResourceManager("mydoc.jn");
final var wtx = manager.beginNodeTrx()) {
wtx.moveTo(2);
wtx.setStringValue("blablabla").commit();
}
try (final var database = Databases.openJsonDatabase(JsonTestHelper.PATHS.PATH1.getFile(),
new User("carolin", UUID.randomUUID()));
final var manager = database.openResourceManager("mydoc.jn");
final var wtx = manager.beginNodeTrx()) {
wtx.moveTo(2);
wtx.remove().commit();
}
// Initialize query context and store.
try (final BasicJsonDBStore store = BasicJsonDBStore.newBuilder()
.location(JsonTestHelper.PATHS.PATH1.getFile().getParent())
.build();
final SirixQueryContext ctx = SirixQueryContext.createWithJsonStore(store);
final SirixCompileChain chain = SirixCompileChain.createWithJsonStore(store)) {
// Use XQuery to load a JSON database/resource.
query(ctx, chain, "sdb:author-name(jn:doc('json-path1','mydoc.jn', 1))", "admin");
query(ctx, chain, "sdb:author-name(jn:doc('json-path1','mydoc.jn', 2))", "johannes");
query(ctx, chain, "sdb:author-name(jn:doc('json-path1','mydoc.jn', 3))", "moshe");
query(ctx, chain, "sdb:author-name(jn:doc('json-path1','mydoc.jn', 4))", "carolin");
}
}
private void query(SirixQueryContext ctx, SirixCompileChain chain, String openQueryRevisionOne, String author)
throws IOException {
try (final var out = new ByteArrayOutputStream(); final var printWriter = new PrintWriter(out)) {
new XQuery(chain, openQueryRevisionOne).serialize(ctx, printWriter);
Assert.assertEquals(author, out.toString());
}
}
}
|
[
"johannes.lichtenberger@unitedplanet.de"
] |
johannes.lichtenberger@unitedplanet.de
|
5ca8746c270beb0e69d7a05ed8ef05ba64a146be
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/RxJava/2016/8/SingleObserver.java
|
2c684d749b056af3d8a2cefe823c474bf7bf0e88
|
[] |
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,484
|
java
|
/**
* Copyright 2016 Netflix, 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 io.reactivex;
import io.reactivex.disposables.Disposable;
/**
* Provides a mechanism for receiving push-based notifications.
* <p>
* After a SingleSubscriber calls a {@link Single}'s {@link Single#subscribe subscribe} method,
* first the Single calls {@link #onSubscribe(Disposable)} with a {@link Disposable} that allows
* cancelling the sequence at any time, then the
* {@code Single} calls only one of the SingleSubscriber's {@link #onSuccess} and {@link #onError} methods to provide
* notifications.
*
* @see <a href="http://reactivex.io/documentation/observable.html">ReactiveX documentation: Observable</a>
* @param <T>
* the type of item the SingleSubscriber expects to observe
* @since 2.0
*/
public interface SingleObserver<T> {
/**
* Provides the SingleObserver with the means of cancelling (disposing) the
* connection (channel) with the Single in both
* synchronous (from within {@code onSubscribe(Disposable)} itself) and asynchronous manner.
* @param d the Disposable instance whose {@link Disposable#dispose()} can
* be called anytime to cancel the connection
* @since 2.0
*/
void onSubscribe(Disposable d);
/**
* Notifies the SingleSubscriber with a single item and that the {@link Single} has finished sending
* push-based notifications.
* <p>
* The {@link Single} will not call this method if it calls {@link #onError}.
*
* @param value
* the item emitted by the Single
*/
void onSuccess(T value);
/**
* Notifies the SingleSubscriber that the {@link Single} has experienced an error condition.
* <p>
* If the {@link Single} calls this method, it will not thereafter call {@link #onSuccess}.
*
* @param e
* the exception encountered by the Single
*/
void onError(Throwable e);
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
654e84aa9a2cd61bafb28771b4b7efdc4a351dfa
|
3e9d6316cfab53df656a44fedd019aa84b8403a6
|
/DomeOS/src/main/java/org/domeos/framework/api/controller/global/DomeosController.java
|
f2e4eccd06ceab0f0c6504e043d9e489092bcdf9
|
[
"Apache-2.0"
] |
permissive
|
xiaolezheng/server
|
405b84e80dc577707176320a961f57b7d514d44f
|
68d49bc222be511b3bc0ba2c1079a6f8d02ee204
|
refs/heads/release-0.4
| 2020-06-23T20:05:16.318515
| 2016-11-17T01:57:40
| 2016-11-17T01:57:40
| 74,638,134
| 0
| 0
| null | 2016-11-24T04:34:49
| 2016-11-24T04:34:48
| null |
UTF-8
|
Java
| false
| false
| 988
|
java
|
package org.domeos.framework.api.controller.global;
import org.domeos.basemodel.HttpResponseTemp;
import org.domeos.basemodel.ResultStat;
import org.domeos.framework.api.controller.ApiController;
import org.domeos.global.GlobalConstant;
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;
/**
* Created by feiliu206363 on 2016/1/18.
*/
@Controller
@RequestMapping("/api/global")
public class DomeosController extends ApiController {
@ResponseBody
@RequestMapping(value = "/version", method = RequestMethod.GET)
HttpResponseTemp<?> version() {
return ResultStat.OK.wrap("0.4");
}
@ResponseBody
@RequestMapping(value = "/database", method = RequestMethod.GET)
HttpResponseTemp<?> database() {
return ResultStat.OK.wrap(GlobalConstant.DATABASETYPE);
}
}
|
[
"feiliu206363@sohu-inc.com"
] |
feiliu206363@sohu-inc.com
|
c0ea907bf8af561aa2541b93b7427128c2b99ed4
|
6e927f9e3c94c595f2d0afae9061bd51c94f6016
|
/modules/SignServer-Common/src/main/java/org/signserver/common/SODSignResponse.java
|
dcace425adc7ef4ba6a5004f195a8cc22b7be1c6
|
[] |
no_license
|
sunkuet02/document-signer
|
6e00241c91275e5af9b4b9fb10058acb600ce9d4
|
290b9df328f551296b9c8f40cbcec039a297c837
|
refs/heads/master
| 2021-01-12T15:28:08.550806
| 2016-11-10T10:43:01
| 2016-11-10T10:43:01
| 71,790,785
| 3
| 0
| null | 2016-11-10T08:22:49
| 2016-10-24T13:16:25
|
Java
|
UTF-8
|
Java
| false
| false
| 2,128
|
java
|
/*************************************************************************
* *
* SignServer: The OpenSource Automated Signing Server *
* *
* This software 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 any later version. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.signserver.common;
import java.security.cert.Certificate;
import java.util.Collection;
import org.signserver.server.archive.Archivable;
/** Response used for a signed SO(d) from the MRTD SOD Signer. Used for ePassports.
* This is not located in the mrtdsod module package because it has to be available at startup to map urls.
*
* @author Markus Kilås
* @version $Id: SODSignResponse.java 2841 2012-10-16 08:31:40Z netmackan $
*/
public class SODSignResponse extends GenericSignResponse {
private static final long serialVersionUID = 2L;
/**
* Default constructor used during serialization
*/
public SODSignResponse() {
this.tag = RequestAndResponseManager.RESPONSETYPE_SODSIGNRESPONSE;
}
/**
* Creates a SODSignResponse, works as a simple VO.
*
* @see org.signserver.common.ProcessRequest
*/
public SODSignResponse(int requestID, byte[] processedData,
Certificate signerCertificate,
String archiveId, Collection<? extends Archivable> archivables) {
super(requestID, processedData, signerCertificate, archiveId, archivables);
this.tag = RequestAndResponseManager.RESPONSETYPE_SODSIGNRESPONSE;
}
}
|
[
"sunkuet02@gmail.com"
] |
sunkuet02@gmail.com
|
b6b1c47250923dfa21895cbca573a6e1a4d567eb
|
bdb880513a6d1333b3251e8986fbaa9411b049e8
|
/.svn/pristine/b6/b6b1c47250923dfa21895cbca573a6e1a4d567eb.svn-base
|
0074b0ff98abe82acef99eb6d22be7d6521985b4
|
[] |
no_license
|
wang-shun/qmt
|
fe937cffe59781815fdefccdfa88362cef68b113
|
c3c2e6a1bd9b4f3d852a698f64b6831b977093d1
|
refs/heads/master
| 2020-04-12T23:23:29.066091
| 2018-12-17T12:51:58
| 2018-12-17T12:51:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
package com.lesports.qmt.sbd.cache;
import com.lesports.qmt.sbd.api.dto.TPlayer;
import com.lesports.repository.LeCrudRepository;
/**
* User: ellios
* Time: 15-6-17 : 下午11:20
*/
public interface TPlayerCache extends LeCrudRepository<TPlayer, Long> {
}
|
[
"ryan@192.168.3.101"
] |
ryan@192.168.3.101
|
|
21c4c5bb34ff1738b0f855cb21b0ffad560a7cd4
|
8350af19ec48687f4669475fa0403a2f340bf748
|
/com.tyrfing.games.tyrlib3/src/com/tyrfing/games/tyrlib3/view/gui/layout/Layouter.java
|
78270aa503711eccca07a1ccfc46b3d400b9c138
|
[
"MIT"
] |
permissive
|
TyrfingX/TyrLib
|
cba252f507be5f0670e4b9bac79cf0f7e8d4ddae
|
f08e34f8cd9cc5514ba5297b5f69c692f8832099
|
refs/heads/master
| 2021-06-05T10:36:23.620234
| 2017-08-27T22:24:48
| 2017-08-27T22:24:48
| 5,216,810
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
package com.tyrfing.games.tyrlib3.view.gui.layout;
import com.tyrfing.games.tyrlib3.Media;
import com.tyrfing.games.tyrlib3.model.math.Vector2F;
public class Layouter {
public static Vector2F absoluteToRelative(Vector2F absolute) {
Vector2F screenSize = Media.CONTEXT.getScreenSize();
Vector2F relative = new Vector2F(absolute.x / screenSize.x, absolute.y / screenSize.y);
return relative;
}
public static Vector2F restrict(Vector2F size, Vector2F max) {
Vector2F screenSize = Media.CONTEXT.getScreenSize();
Vector2F restricted = new Vector2F(size);
if (max.x > 0 && screenSize.x * size.x > max.x ) restricted.x = max.x / screenSize.x;
if (max.y > 0 && screenSize.y * size.y > max.y ) restricted.y = max.y / screenSize.y;
return restricted;
}
public static float restrictX(float value, float max) {
Vector2F screenSize = Media.CONTEXT.getScreenSize();
if (screenSize.x * value > max ) value = max / screenSize.x;
return value;
}
public static float restrictY(float value, float max) {
Vector2F screenSize = Media.CONTEXT.getScreenSize();
if (screenSize.y * value > max ) value = max / screenSize.y;
return value;
}
public static Vector2F fitRatio(float width) {
Vector2F screenSize = Media.CONTEXT.getScreenSize();
float ratio = screenSize.x / screenSize.y;
float height = width * ratio;
return new Vector2F(width, height);
}
}
|
[
"saschamueller@gmx.net"
] |
saschamueller@gmx.net
|
cb430dd9ab036bf1d7722156903012813a632191
|
4fe2c53331821145967b4c4f005f571f2652ae36
|
/app/src/main/java/com/jfkj/im/okhttp/ResponseBodyInterceptor.java
|
9622edca2693e376150ace53556a2651a2741fb5
|
[] |
no_license
|
woyl/iyouVipAndroid
|
9fbb7145c61e7bba3a4e4a891058b51df1d8fee6
|
8e8b7746dd828e2438e35ad221a1b2af8eb66ad3
|
refs/heads/master
| 2022-11-24T23:16:57.952701
| 2020-07-30T06:15:42
| 2020-07-30T06:15:42
| 283,685,369
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,180
|
java
|
package com.jfkj.im.okhttp;
import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.GzipSource;
/**
* <pre>
* Description:
* @author : ys
* @date : 2019/12/23
* </pre>
*/
public abstract class ResponseBodyInterceptor implements Interceptor {
@NotNull
@Override
public Response intercept(@NotNull Chain chain) throws IOException {
Request request = chain.request();
String url = request.url().toString();
Response response = chain.proceed(request);
ResponseBody responseBody = response.body();
if (responseBody != null) {
long contentLength = responseBody.contentLength();
BufferedSource source = responseBody.source();
source.request(Long.MAX_VALUE);
Buffer buffer = source.getBuffer();
if ("gzip".equals(response.headers().get("Content-Encoding"))) {
GzipSource gzippedResponseBody = new GzipSource(buffer.clone());
buffer = new Buffer();
buffer.writeAll(gzippedResponseBody);
}
MediaType contentType = responseBody.contentType();
Charset charset;
if (contentType == null || contentType.charset(StandardCharsets.UTF_8) == null) {
charset = StandardCharsets.UTF_8;
} else {
charset = contentType.charset(StandardCharsets.UTF_8);
}
if (charset != null && contentLength != 0L) {
try {
return intercept(response,url, buffer.clone().readString(charset));
} catch (JSONException e) {
e.printStackTrace();
}
}
}
return response;
}
abstract Response intercept(@NotNull Response response, String url, String body) throws IOException, JSONException;
}
|
[
"676051397@qq.com"
] |
676051397@qq.com
|
bbbd81344df214373d8d43d7e5cbe2478da6221b
|
4338f491e44da2efdca5cd4ec2fbe3cccb85084f
|
/app/src/main/java/com/android/romatecamera/MainActivity.java
|
e80f82cbf5950a723997e330814d5029381fd8bf
|
[] |
no_license
|
wangchao1994/AndroidRomateCamera
|
1ed471f56ebec0afa13bb2f422e032f6a95e524f
|
6d52e854ac92b3d9e12a5510df35aa0ed5701a44
|
refs/heads/master
| 2020-03-21T04:21:57.264154
| 2018-06-27T02:28:44
| 2018-06-27T02:28:44
| 138,104,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,225
|
java
|
package com.android.romatecamera;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.android.librarycamera.materialcamera.MaterialCamera;
import java.io.File;
import java.text.DecimalFormat;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private static final int CAMERA_RQ = 6969;
private static final int PERMISSION_RQ = 84;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initView();
checkPermissionS();
}
private void checkPermissionS() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_DENIED){
ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},PERMISSION_RQ);
}
}
private void initView() {
findViewById(R.id.launchCamera).setOnClickListener(this);
findViewById(R.id.launchCameraStillshot).setOnClickListener(this);
findViewById(R.id.launchFromFragment).setOnClickListener(this);
findViewById(R.id.launchFromFragmentSupport).setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.launchFromFragment:
Intent intent = new Intent(this, FragmentActivity.class);
startActivity(intent);
break;
case R.id.launchFromFragmentSupport:
Intent intent_support = new Intent(this, FragmentActivity.class);
intent_support.putExtra("support", true);
startActivity(intent_support);
break;
}
File saveDir = null;
if (ContextCompat.checkSelfPermission(this,Manifest.permission.WRITE_EXTERNAL_STORAGE)
== PackageManager.PERMISSION_DENIED){
saveDir = new File(Environment.getExternalStorageDirectory(),"RomateCamera");
saveDir.mkdirs();
}
MaterialCamera materialCamera =
new MaterialCamera(this)
.saveDir(saveDir)
.showPortraitWarning(true)
.allowRetry(true)
.defaultToFrontFacing(true)
.allowRetry(true)
.autoSubmit(false)
.labelConfirm(R.string.mcam_use_video);
if (view.getId() == R.id.launchCameraStillshot)
materialCamera
.stillShot() // launches the Camera in stillshot mode
.labelConfirm(R.string.mcam_use_stillshot);
materialCamera.start(CAMERA_RQ);
}
private String readableFileSize(long size) {
if (size <= 0) return size + " B";
final String[] units = new String[] {"B", "KB", "MB", "GB", "TB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return new DecimalFormat("#,##0.##").format(size / Math.pow(1024, digitGroups))
+ " "
+ units[digitGroups];
}
private String fileSize(File file) {
return readableFileSize(file.length());
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
// Received recording or error from MaterialCamera
if (requestCode == CAMERA_RQ) {
if (resultCode == RESULT_OK) {
final File file = new File(data.getData().getPath());
Toast.makeText(
this,
String.format("Saved to: %s, size: %s", file.getAbsolutePath(), fileSize(file)),
Toast.LENGTH_LONG)
.show();
} else if (data != null) {
Exception e = (Exception) data.getSerializableExtra(MaterialCamera.ERROR_EXTRA);
if (e != null) {
e.printStackTrace();
Toast.makeText(this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (grantResults[0] != PackageManager.PERMISSION_GRANTED) {
// Sample was denied WRITE_EXTERNAL_STORAGE permission
Toast.makeText(
this,
"Videos will be saved in a cache directory instead of an external storage directory since permission was denied.",
Toast.LENGTH_LONG)
.show();
}
}
}
|
[
"wchao0829@163.com"
] |
wchao0829@163.com
|
b0630f6082e9c3c415fb2029fa3d86823b26d90b
|
75b0f2fceb9d1786d64cac831326354d431a8a32
|
/com/planet_ink/coffee_mud/Commands/NoSounds.java
|
a8ee5895eb7f63e279fa4c9b259c709b9ca5ed86
|
[
"Apache-2.0"
] |
permissive
|
thierrylach/CoffeeMud
|
f41857a8106706530c794d377bfb81b6458a847a
|
83101f209d8875ec2bbaf6c623d520a30cd3cc8d
|
refs/heads/master
| 2022-09-20T17:14:07.782102
| 2022-08-29T22:07:57
| 2022-08-29T22:07:57
| 113,072,543
| 0
| 0
| null | 2017-12-04T17:20:51
| 2017-12-04T17:20:51
| null |
UTF-8
|
Java
| false
| false
| 2,549
|
java
|
package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2022 Bo Zimmerman
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.
*/
public class NoSounds extends StdCommand
{
public NoSounds()
{
}
private final String[] access=I(new String[]{"NOSOUNDS","NOMSP"});
@Override
public String[] getAccessWords()
{
return access;
}
@Override
public boolean execute(final MOB mob, final List<String> commands, final int metaFlags)
throws java.io.IOException
{
if(!mob.isMonster())
{
if((mob.isAttributeSet(MOB.Attrib.SOUND))
||(mob.session().getClientTelnetMode(Session.TELNET_MSP)))
{
mob.setAttribute(MOB.Attrib.SOUND,false);
mob.session().changeTelnetMode(Session.TELNET_MSP,false);
mob.session().setClientTelnetMode(Session.TELNET_MSP,false);
mob.tell(L("MSP Sound/Music disabled.\n\r"));
}
else
mob.tell(L("MSP Sound/Music already disabled.\n\r"));
}
return false;
}
@Override
public boolean canBeOrdered()
{
return true;
}
@Override
public boolean securityCheck(final MOB mob)
{
return super.securityCheck(mob)&&(!CMSecurity.isDisabled(CMSecurity.DisFlag.MSP));
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
4ba678fa2e2def420a41c040bfe4bb7988bef143
|
c096a03908fdc45f29574578b87662e20c1f12d4
|
/com/src/main/java/lip/com/google/android/gms/tagmanager/cz.java
|
042f33646c4c55e996ac22b310377817789353e8
|
[] |
no_license
|
aboaldrdaaa2/Myappt
|
3762d0572b3f0fb2fbb3eb8f04cb64c6506c2401
|
38f88b7924c987ee9762894a7a5b4f8feb92bfff
|
refs/heads/master
| 2020-03-30T23:55:13.551721
| 2018-10-05T13:41:24
| 2018-10-05T13:41:24
| 151,718,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,171
|
java
|
package lip.com.google.android.gms.tagmanager;
import com.google.android.gms.tagmanager.l.a;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
class cz<K, V> implements k<K, V> {
private final Map<K, V> ahX = new HashMap();
private final int ahY;
private final a<K, V> ahZ;
private int aia;
cz(int i, a<K, V> aVar) {
this.ahY = i;
this.ahZ = aVar;
}
public synchronized void e(K k, V v) {
if (k == null || v == null) {
throw new NullPointerException("key == null || value == null");
}
this.aia += this.ahZ.sizeOf(k, v);
if (this.aia > this.ahY) {
Iterator it = this.ahX.entrySet().iterator();
while (it.hasNext()) {
Entry entry = (Entry) it.next();
this.aia -= this.ahZ.sizeOf(entry.getKey(), entry.getValue());
it.remove();
if (this.aia <= this.ahY) {
break;
}
}
}
this.ahX.put(k, v);
}
public synchronized V get(K key) {
return this.ahX.get(key);
}
}
|
[
"aboaldrdaaa2@gmail.com"
] |
aboaldrdaaa2@gmail.com
|
2fe7c82960afde30a152f94c5106848c3a5de12a
|
7f489af1b494d9f4439ae9dbae14b4a109bef41b
|
/log-cache-proxy/src/test/java/am/ik/lab/LogCacheUiApplicationTests.java
|
2eb3d0c174eb5a08fb9490ce4c5dc92f51554cb7
|
[] |
no_license
|
making/log-cache-ui
|
36448356bb2f903c1ed3962dd82abb19c7c9fb2f
|
7e0d8ad919f73bdea6d65ad04856137eb1e73881
|
refs/heads/master
| 2021-05-17T16:15:28.734598
| 2020-05-09T13:26:47
| 2020-05-09T13:26:59
| 250,866,181
| 4
| 1
| null | 2021-01-12T20:19:19
| 2020-03-28T18:29:10
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 214
|
java
|
package am.ik.lab;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class LogCacheUiApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"tmaki@pivotal.io"
] |
tmaki@pivotal.io
|
147f4be1efafa03ea0ec254e3fcec5de69cdb2c3
|
0ea271177f5c42920ac53cd7f01f053dba5c14e4
|
/5.3.5/sources/org/telegram/customization/fetch/request/Header.java
|
23f6c9636ce3e6d33d5c9718374d3669e37ab46c
|
[] |
no_license
|
alireza-ebrahimi/telegram-talaeii
|
367a81a77f9bc447e729b2ca339f9512a4c2860e
|
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
|
refs/heads/master
| 2020-03-21T13:44:29.008002
| 2018-12-09T10:30:29
| 2018-12-09T10:30:29
| 138,622,926
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
package org.telegram.customization.fetch.request;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
public final class Header {
private final String header;
private final String value;
public Header(@NonNull String header, @Nullable String value) {
if (header == null) {
throw new NullPointerException("header cannot be null");
} else if (header.contains(":")) {
throw new IllegalArgumentException("header may not contain ':'");
} else {
if (value == null) {
value = "";
}
this.header = header;
this.value = value;
}
}
@NonNull
public String getHeader() {
return this.header;
}
@NonNull
public String getValue() {
return this.value;
}
public String toString() {
return this.header + ":" + this.value;
}
}
|
[
"alireza.ebrahimi2006@gmail.com"
] |
alireza.ebrahimi2006@gmail.com
|
44449885ae7f70f6bd3368dc07608e0b1b25e3cc
|
36838dfcd53c4d2c73b9a6b0b7a8a28e4a331517
|
/android/support/v4/c/a/b.java
|
954a1ca2e3f3c849519ab7e1a5aa597bf6daee68
|
[] |
no_license
|
ShahmanTeh/MiFit-Java
|
fbb2fd578727131b9ac7150b86c4045791368fe8
|
93bdf88d39423893b294dec2f5bf54708617b5d0
|
refs/heads/master
| 2021-01-20T13:05:10.408158
| 2016-02-03T21:02:55
| 2016-02-03T21:02:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
package android.support.v4.c.a;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
class b implements c {
b() {
}
public void a(Drawable drawable) {
}
public void a(Drawable drawable, float f, float f2) {
}
public void a(Drawable drawable, int i) {
}
public void a(Drawable drawable, int i, int i2, int i3, int i4) {
}
public void a(Drawable drawable, ColorStateList colorStateList) {
}
public void a(Drawable drawable, Mode mode) {
}
public void a(Drawable drawable, boolean z) {
}
public boolean b(Drawable drawable) {
return false;
}
}
|
[
"kasha_malaga@hotmail.com"
] |
kasha_malaga@hotmail.com
|
7f4d6ce797acdd40b1ebe32c9158f87a9b23650e
|
cdaf7220b6dc073a4d913ce1dc073b5eae154605
|
/backend/webplatform/src/main/java/ar/com/jmc/webplatform/base/util/exception/GenerationTimerException.java
|
09b14b90bbde43851ba0a03b3d86bbd3c9d0a5e4
|
[] |
no_license
|
jmcarrascal/webplatform
|
67913ee36e740b02a95cf6c46ea74b036ffb92d8
|
137a96ef466b22b442289124b06e74ffa0704312
|
refs/heads/master
| 2021-01-10T20:15:33.077473
| 2014-05-04T22:43:55
| 2014-05-04T22:43:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 439
|
java
|
package ar.com.jmc.webplatform.base.util.exception;
public class GenerationTimerException extends Exception {
private static final long serialVersionUID = 5541322902511080453L;
private int intError;
public GenerationTimerException(int intErrNo) {
intError = intErrNo;
}
GenerationTimerException(String strMessage) {
super(strMessage);
}
public String toString() {
return "ApplicationException[" + intError + "]";
}
}
|
[
"jmcarrascal@gmail.com"
] |
jmcarrascal@gmail.com
|
b0095423ac06e6d9b84dc9dc9e7bc475f5dc20f5
|
86a284303cf5d2d86fcc6101b46b6aaa403f3374
|
/base-core/src/com/lj/base/core/util/DesUtils.java
|
67348c1a84595cdc6a30b3ee7679da282f70162f
|
[] |
no_license
|
wo510751575/base
|
b84278fb880a79b4c9cd106279d3a2ee214b2494
|
3e1bd5f2678a43c129defe57b99de50727f43c0d
|
refs/heads/master
| 2022-12-20T04:57:12.405471
| 2019-08-27T03:21:22
| 2019-08-27T03:21:22
| 203,961,153
| 0
| 0
| null | 2022-12-16T11:17:50
| 2019-08-23T08:50:57
|
Java
|
UTF-8
|
Java
| false
| false
| 4,206
|
java
|
package com.lj.base.core.util;
/**
* Copyright © 2017-2020 All rights reserved.
*
* Licensed under the 深圳市扬恩科技 License, Version 1.0 (the "License");
*
*/
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
/**
*
*
* 类说明:DES安全编码组件
*
*
* <p>
* 详细描述:
*
* @Company: 扬恩科技有限公司
* @author 彭阳
*
* CreateDate: 2017年7月1日
*/
public abstract class DesUtils{
/**
* DES加密
*/
public static final String ALGORITHM_DES = "DES";
/**
* DESede加密
*/
public static final String ALGORITHM_DESEDE = "DESede";
/**
* Blowfish加密
*/
public static final String ALGORITHM_BLOWFISH = "Blowfish";
/**
* 方法说明:转换密钥.
*
* @param key the key
* @param ALGORITHM the algorithm
* @return the key
* @throws Exception the exception
* @author 彭阳
* CreateDate: 2017年7月1日
*/
private static Key toKey(byte[] key , String ALGORITHM) throws Exception {
AssertUtils.notNullAndEmpty(key);
DESKeySpec dks = new DESKeySpec(key);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM);
SecretKey secretKey = keyFactory.generateSecret(dks);
// 当使用其他对称加密算法时,如AES、Blowfish等算法时,用下述代码替换上述三行代码
// SecretKey secretKey = new SecretKeySpec(key, ALGORITHM);
return secretKey;
}
/**
* 方法说明:解密.
*
* @param data the data
* @param key the key
* @param ALGORITHM the algorithm
* @return the byte[]
* @throws Exception the exception
* @author 彭阳
* CreateDate: 2017年7月1日
*/
public static byte[] decrypt(byte[] data, String key, String ALGORITHM) throws Exception {
AssertUtils.notNullAndEmpty(data);
AssertUtils.notNullAndEmpty(key);
Key k = toKey(key.getBytes(),ALGORITHM);
Cipher cipher = Cipher.getInstance(ALGORITHM);
cipher.init(Cipher.DECRYPT_MODE, k);
return cipher.doFinal(data);
}
/**
* 方法说明:加密.
*
* @param data the data
* @param key the key
* @param ALGORITHM the algorithm
* @return the byte[]
* @throws Exception the exception
* @author 彭阳
* CreateDate: 2017年7月1日
*/
public static byte[] encrypt(byte[] data, String key, String ALGORITHM) throws Exception {
AssertUtils.notNullAndEmpty(data);
AssertUtils.notNullAndEmpty(key);
Key k = toKey(key.getBytes(),ALGORITHM);
Cipher cipher = Cipher.getInstance(ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE, k);
return cipher.doFinal(data);
}
/**
* 方法说明:生成密钥.
*
* @param ALGORITHM the algorithm
* @return the string
* @throws Exception the exception
* @author 彭阳
* CreateDate: 2017年7月1日
*/
public static String initKey( String ALGORITHM) throws Exception {
return initKey(null,ALGORITHM);
}
/**
* 方法说明:生成密钥.
*
* @param seed the seed
* @param ALGORITHM the algorithm
* @return the string
* @throws Exception the exception
* @author 彭阳
* CreateDate: 2017年7月1日
*/
public static String initKey(String seed, String ALGORITHM) throws Exception {
SecureRandom secureRandom = null;
if (seed != null) {
secureRandom = new SecureRandom(Base64Utils.decode(seed));
} else {
secureRandom = new SecureRandom();
}
KeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);
kg.init(secureRandom);
SecretKey secretKey = kg.generateKey();
return Base64Utils.encode(secretKey.getEncoded());
}
/**
* The main method.
*
* @param args the args
*/
public static void main(String args []){
System.out.println("start");
try {
System.out.println(encrypt("1".getBytes(), "123456781",DesUtils.ALGORITHM_DES));
System.out.println(new String(decrypt(encrypt("1".getBytes(), "123456781",DesUtils.ALGORITHM_DES),"12345678",DesUtils.ALGORITHM_DES)));
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("end");
}
}
|
[
"37724558+wo510751575@users.noreply.github.com"
] |
37724558+wo510751575@users.noreply.github.com
|
4308c39791a208dab7915cedaa70be8d10aa37e3
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/viewmodel/component/ba.java
|
85d1151c05fa067f9acefc0ca990211cde8d1e7b
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package com.tencent.mm.plugin.finder.viewmodel.component;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ui.component.UIComponent;
import kotlin.Metadata;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/finder/viewmodel/component/FinderTextStatusTipsBubbleUIC;", "Lcom/tencent/mm/ui/component/UIComponent;", "activity", "Landroidx/appcompat/app/AppCompatActivity;", "(Landroidx/appcompat/app/AppCompatActivity;)V", "fragment", "Landroidx/fragment/app/Fragment;", "(Landroidx/fragment/app/Fragment;)V", "checkShowTips", "", "anchor", "Landroid/view/View;", "plugin-finder_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class ba
extends UIComponent
{
public ba(AppCompatActivity paramAppCompatActivity)
{
super(paramAppCompatActivity);
AppMethodBeat.i(338370);
AppMethodBeat.o(338370);
}
public ba(Fragment paramFragment)
{
super(paramFragment);
AppMethodBeat.i(338382);
AppMethodBeat.o(338382);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.plugin.finder.viewmodel.component.ba
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
9948ec00d87bb75b6768f3ba8a53f3fdcbb17722
|
5066cf4951a6dd3103bf4d5b265da0ff9b2b78c5
|
/src/main/java/com/tinkerpop/blueprints/pgm/impls/sail/impls/LinkedDataSailGraph.java
|
07c0674a3369159d650e2424fc72c7c4c91d9d8d
|
[
"BSD-3-Clause"
] |
permissive
|
bkrolikowski/blueprints
|
a74f48c308e9954f43b660f123634210b34e43a7
|
0c99ed588c11cbdfa186cf0d8b77ecdf0f53ce4f
|
refs/heads/master
| 2021-01-16T19:17:10.505185
| 2010-09-13T16:36:26
| 2010-09-13T16:36:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 723
|
java
|
package com.tinkerpop.blueprints.pgm.impls.sail.impls;
import com.tinkerpop.blueprints.pgm.impls.sail.SailGraph;
import net.fortytwo.linkeddata.sail.LinkedDataSail;
import net.fortytwo.ripple.Ripple;
import net.fortytwo.ripple.URIMap;
import org.openrdf.sail.Sail;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class LinkedDataSailGraph extends SailGraph {
public LinkedDataSailGraph(SailGraph storageGraph) {
try {
Ripple.initialize();
final Sail sail = new LinkedDataSail(storageGraph.getRawGraph(), new URIMap());
this.startSail(sail);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
}
}
|
[
"okrammarko@gmail.com"
] |
okrammarko@gmail.com
|
3f9fdeacaed74d0b61b765823d512c6449362e5c
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/io/atomix/core/idgenerator/IdGeneratorTest.java
|
77b257811db7546bc3b6780edcdd1a729e203cea
|
[] |
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
| 4,011
|
java
|
/**
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.atomix.core.idgenerator;
import io.atomix.core.AbstractPrimitiveTest;
import io.atomix.core.idgenerator.impl.DelegatingAtomicIdGenerator;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.junit.Assert;
import org.junit.Test;
/**
* Unit test for {@code AtomixIdGenerator}.
*/
public class IdGeneratorTest extends AbstractPrimitiveTest {
/**
* Tests generating IDs.
*/
@Test
public void testNextId() throws Throwable {
AtomicIdGenerator idGenerator1 = atomix().atomicIdGeneratorBuilder("testNextId").withProtocol(protocol()).build();
AtomicIdGenerator idGenerator2 = atomix().atomicIdGeneratorBuilder("testNextId").withProtocol(protocol()).build();
Assert.assertEquals(1, idGenerator1.nextId());
Assert.assertEquals(2, idGenerator1.nextId());
Assert.assertEquals(3, idGenerator1.nextId());
CompletableFuture<Long> future21 = idGenerator1.async().nextId();
CompletableFuture<Long> future22 = idGenerator1.async().nextId();
CompletableFuture<Long> future23 = idGenerator1.async().nextId();
Assert.assertEquals(Long.valueOf(6), future23.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(5), future22.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(4), future21.get(30, TimeUnit.SECONDS));
Assert.assertEquals(1001, idGenerator2.nextId());
Assert.assertEquals(1002, idGenerator2.nextId());
Assert.assertEquals(1003, idGenerator2.nextId());
}
/**
* Tests generating IDs.
*/
@Test
public void testNextIdBatchRollover() throws Throwable {
DelegatingAtomicIdGenerator idGenerator1 = new DelegatingAtomicIdGenerator(atomix().atomicCounterBuilder("testNextIdBatchRollover").withProtocol(protocol()).build().async(), 2);
DelegatingAtomicIdGenerator idGenerator2 = new DelegatingAtomicIdGenerator(atomix().atomicCounterBuilder("testNextIdBatchRollover").withProtocol(protocol()).build().async(), 2);
CompletableFuture<Long> future11 = idGenerator1.nextId();
CompletableFuture<Long> future12 = idGenerator1.nextId();
CompletableFuture<Long> future13 = idGenerator1.nextId();
Assert.assertEquals(Long.valueOf(1), future11.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(2), future12.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(3), future13.get(30, TimeUnit.SECONDS));
CompletableFuture<Long> future21 = idGenerator2.nextId();
CompletableFuture<Long> future22 = idGenerator2.nextId();
CompletableFuture<Long> future23 = idGenerator2.nextId();
Assert.assertEquals(Long.valueOf(5), future21.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(6), future22.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(7), future23.get(30, TimeUnit.SECONDS));
CompletableFuture<Long> future14 = idGenerator1.nextId();
CompletableFuture<Long> future15 = idGenerator1.nextId();
CompletableFuture<Long> future16 = idGenerator1.nextId();
Assert.assertEquals(Long.valueOf(4), future14.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(9), future15.get(30, TimeUnit.SECONDS));
Assert.assertEquals(Long.valueOf(10), future16.get(30, TimeUnit.SECONDS));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
dd1cdb30a7c1faad07536fc1fe7a10ae0b9c0fb5
|
bb7f944f4fe14358a1f84898f3a0b12cf1590c9a
|
/android/support/v4/app/NotificationManagerCompatEclair.java
|
5f06cfe5c02c140047682a7a633dd3a8ea6480c1
|
[] |
no_license
|
snehithraj27/Pedometer-Android-Application
|
0c53fe02840920c0449baeb234eda4b43b6cf8b6
|
e0d93eda0b5943b6ab967d38f7aa3240d2501dfb
|
refs/heads/master
| 2020-03-07T01:28:11.432466
| 2018-03-28T18:54:59
| 2018-03-28T18:54:59
| 127,184,714
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
package android.support.v4.app;
import android.app.Notification;
import android.app.NotificationManager;
class NotificationManagerCompatEclair
{
static void cancelNotification(NotificationManager paramNotificationManager, String paramString, int paramInt)
{
paramNotificationManager.cancel(paramString, paramInt);
}
public static void postNotification(NotificationManager paramNotificationManager, String paramString, int paramInt, Notification paramNotification)
{
paramNotificationManager.notify(paramString, paramInt, paramNotification);
}
}
/* Location: /Users/snehithraj/Desktop/a/dex2jar-2.0/classes-dex2jar.jar!/android/support/v4/app/NotificationManagerCompatEclair.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"snehithraj27@users.noreply.github.com"
] |
snehithraj27@users.noreply.github.com
|
c070b93b9395ac253a9ccfd383840ca01f4471c5
|
cf64ff59a0292500d65d69fcfb0b42d7e4dba9d8
|
/samples/excel/build/src/excel/XlOartVerticalOverflow.java
|
5c5b7e2078cc0ceef1e267883999e2fbf102ef86
|
[
"BSD-2-Clause"
] |
permissive
|
nosdod/CDWriterJava
|
0bb3db2e68278c445b78afc665731e058dc42ea4
|
7146689889d8d50d7162b21ea0b98fc5c2364306
|
refs/heads/main
| 2023-09-06T01:32:33.614647
| 2021-11-23T15:14:42
| 2021-11-23T15:14:42
| 431,142,538
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package excel ;
import com4j.*;
/**
*/
public enum XlOartVerticalOverflow {
/**
* <p>
* The value of this constant is 0
* </p>
*/
xlOartVerticalOverflowOverflow, // 0
/**
* <p>
* The value of this constant is 1
* </p>
*/
xlOartVerticalOverflowClip, // 1
/**
* <p>
* The value of this constant is 2
* </p>
*/
xlOartVerticalOverflowEllipsis, // 2
}
|
[
"mark.dodson@dodtech.co.uk"
] |
mark.dodson@dodtech.co.uk
|
f9f6aa188182fce64eac2bcf245f6aa183f7aaf1
|
ab0f79892c8bdb34cf9b192295248dd65342a4e1
|
/cz/msebera/android/httpclient/HttpConnection.java
|
3fb039486872cbb3dba01e54d38341f10fa5b446
|
[] |
no_license
|
jozn/Salam
|
0dac7ce3fd8f8473a7124b5a0a23dd7c13b5798a
|
322282e55bff78094745f787d1463b1ec5f6248c
|
refs/heads/master
| 2021-01-20T03:22:24.212781
| 2016-02-04T11:23:27
| 2016-02-04T11:23:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 309
|
java
|
package cz.msebera.android.httpclient;
import java.io.Closeable;
import java.io.IOException;
public interface HttpConnection extends Closeable {
void close() throws IOException;
boolean isOpen();
boolean isStale();
void setSocketTimeout(int i);
void shutdown() throws IOException;
}
|
[
"grayhat@kimo.com"
] |
grayhat@kimo.com
|
43d345585a349b17a6df2c6dc36be5cadc13d937
|
c79701d0001adc1d0a36169b991d2cb16d3ab59b
|
/app/src/main/java/com/meidp/butterknifedemo/http/HttpCallBack.java
|
cc12f87fdc7037c587a2474e60baf5657a6b1b3b
|
[] |
no_license
|
wxianing/ButterknifeCommentAdapterDemo
|
b268833fa894ae9fec5cbeac07418eed587a7775
|
af1f16d95a5e06b56fce8e71feaa4679c11dfa92
|
refs/heads/master
| 2021-01-12T13:44:06.248517
| 2016-09-25T11:07:02
| 2016-09-25T11:07:02
| 69,159,326
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.meidp.butterknifedemo.http;
import com.android.volley.VolleyError;
/**
* Package:com.meidp.crmim.http
* 作 用:
* Author:wxianing
* 时 间:2016/6/18
*/
public abstract class HttpCallBack {
public void onSuccess(String result) {
}
public void onError(VolleyError volleyError) {
}
}
|
[
"wxianing@163.com"
] |
wxianing@163.com
|
0ec6a85afcf4dcf7aca3d43579fd04f825687d1e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_23b60bc6a53096a11978713f48cad19bd720fd35/SearchResultActivity/8_23b60bc6a53096a11978713f48cad19bd720fd35_SearchResultActivity_t.java
|
992701dcc14737ed857998288e68cd487819e3da
|
[] |
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
| 4,743
|
java
|
package ua.avtopoisk.activites;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;
import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.Extra;
import domain.Car;
import parsers.AvtopoiskParser;
import ua.avtopoisk.CarAdapter;
import ua.avtopoisk.R;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Search result activity. List of cars returned by parser
*
* @author ibershadskiy <a href="mailto:iBersh20@gmail.com">Ilya Bershadskiy</a>
* @since 12.10.12
*/
@EActivity(R.layout.search_result)
public class SearchResultActivity extends ListActivity {
private ProgressDialog progressDialog;
@Extra(SearchActivity.BRAND_ID_KEY)
int brandId;
@Extra(SearchActivity.MODEL_ID_KEY)
int modelId;
@Extra(SearchActivity.REGION_ID_KEY)
int regionId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progressDialog = ProgressDialog.show(this, "", getString(R.string.dlg_progress_data_loading), true);
}
@AfterViews
protected void init() {
new SearchAsyncTask().execute(getListView());
}
@Override
protected void onDestroy() {
if (progressDialog != null) {
progressDialog.dismiss();
}
super.onDestroy();
}
private class SearchAsyncTask extends AsyncTask<ListView, Void, Void> {
private static final String HEADER = "header";
private static final String PRICE = "price";
private static final String IMAGE = "image";
private static final String CITY = "city";
private static final String DATE_POSTED = "datePosted";
private static final String ENGINE_DESC = "engineDesc";
private ListView listView;
private ArrayList<HashMap<String, Object>> items;
@Override
protected Void doInBackground(ListView... lv) {
this.listView = lv[0];
AvtopoiskParser parser = new AvtopoiskParser();
ArrayList<Car> cars = null;
try {
cars = parser.parse(brandId, modelId, regionId);
} catch (IOException e) {
Log.e(listView.getContext().getString(R.string.app_name), e.getMessage());
}
if (cars == null) {
return null;
}
items = new ArrayList<HashMap<String, Object>>();
for (Car car : cars) {
final HashMap<String, Object> hm = new HashMap<String, Object>();
String header = car.getYear() + "' " + car.getBrand() + " " + car.getModel();
hm.put(HEADER, header);
hm.put(PRICE, Long.valueOf(car.getPrice() / 100).toString() + " $");
hm.put(CITY, car.getCity());
hm.put(DATE_POSTED, car.getDatePosted());
hm.put(ENGINE_DESC, car.getEngineDesc());
URL url;
Bitmap bmp = null;
if (!car.getImageUrl().contains("no_foto")) { //if no photo default image will be loaded in adapter
try {
url = new URL(car.getImageUrl());
bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch (Exception e) {
Log.e(listView.getContext().getString(R.string.app_name), e.getMessage());
}
}
hm.put(IMAGE, bmp);
items.add(hm);
}
return null;
}
@Override
protected void onPostExecute(Void result) {
CarAdapter adapter = new CarAdapter(listView.getContext(),
items, R.layout.cars_list_item,
new String[]{HEADER, PRICE, IMAGE, CITY, DATE_POSTED, ENGINE_DESC},
new int[]{R.id.car_info_header, R.id.price, R.id.img, R.id.city, R.id.date_posted, R.id.engine_desc},
IMAGE);
listView.setAdapter(adapter);
progressDialog.dismiss();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
49fe5e63bdb399e16e9d7ff959f082c3d18e24b5
|
2a1f6afb809b5d3347bd1a4521d2f876665cc2ca
|
/demo/j2cl/src/main/java/org/treblereel/mvp/view/components/ButtonDropdown_BinderImpl_TemplateImpl.java
|
40ac0dcdfb1a0bcde800594934e317c68f7e1c0c
|
[
"Apache-2.0"
] |
permissive
|
treblereel/gwtbootstrap3
|
8ddab0f20a2222be79c44894f202194b4bae6606
|
f362536b6a0dc4994db5d1bab5bd2d69e49123b4
|
refs/heads/master
| 2022-04-30T20:20:58.179484
| 2022-03-31T04:33:55
| 2022-03-31T04:33:55
| 190,029,044
| 9
| 0
|
Apache-2.0
| 2022-03-31T04:33:55
| 2019-06-03T15:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 4,187
|
java
|
package org.treblereel.mvp.view.components;
/*
* #%L
* GwtBootstrap3
* %%
* Copyright (C) 2013 - 2021 GwtBootstrap3
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/**
* This class is generated from org.treblereel.mvp.view.components.ButtonDropdown_BinderImpl.Template, do not edit manually
*/
public class ButtonDropdown_BinderImpl_TemplateImpl implements org.treblereel.mvp.view.components.ButtonDropdown_BinderImpl.Template {
/**
* @Template("<b:ButtonGroup>\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\" text=\"...\" type=\"...\" toggleCaret=\"true|false\"/>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>")
*/
public org.gwtproject.safehtml.shared.SafeHtml html1(
) {
StringBuilder sb = new java.lang.StringBuilder();
sb.append("<b:ButtonGroup>\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\" text=\"...\" type=\"...\" toggleCaret=\"true|false\"/>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>");
return new org.gwtproject.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(sb.toString());
}
/**
* @Template("<b:ButtonGroup>\\n \\s\\s<b:Button>Split Dropdown</b:Button>\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\"/>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 3</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>")
*/
public org.gwtproject.safehtml.shared.SafeHtml html2(
) {
StringBuilder sb = new java.lang.StringBuilder();
sb.append("<b:ButtonGroup>\\n \\s\\s<b:Button>Split Dropdown</b:Button>\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\"/>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 3</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>");
return new org.gwtproject.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(sb.toString());
}
/**
* @Template("<b:ButtonGroup dropUp=\"true\">\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\">Dropup</b:Button>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 3</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>")
*/
public org.gwtproject.safehtml.shared.SafeHtml html3(
) {
StringBuilder sb = new java.lang.StringBuilder();
sb.append("<b:ButtonGroup dropUp=\"true\">\\n \\s\\s<b:Button dataToggle=\"DROPDOWN\">Dropup</b:Button>\\n \\s\\s<b:DropDownMenu>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 1</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 2</b:AnchorListItem>\\n \\s\\s\\s\\s<b:AnchorListItem>Item 3</b:AnchorListItem>\\n \\s\\s</b:DropDownMenu>\\n </b:ButtonGroup>");
return new org.gwtproject.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(sb.toString());
}
}
|
[
"chani.liet@gmail.com"
] |
chani.liet@gmail.com
|
f1a5d418add11ea63289445e4832795628dc1d32
|
70cbaeb10970c6996b80a3e908258f240cbf1b99
|
/WiFi万能钥匙dex1-dex2jar.jar.src/com/lantern/analytics/c/d.java
|
38623cb70cbb5aa27f5b4dad51d9de304b887fb6
|
[] |
no_license
|
nwpu043814/wifimaster4.2.02
|
eabd02f529a259ca3b5b63fe68c081974393e3dd
|
ef4ce18574fd7b1e4dafa59318df9d8748c87d37
|
refs/heads/master
| 2021-08-28T11:11:12.320794
| 2017-12-12T03:01:54
| 2017-12-12T03:01:54
| 113,553,417
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,368
|
java
|
package com.lantern.analytics.c;
import com.bluefay.b.h;
import org.json.JSONException;
import org.json.JSONObject;
public final class d
{
public String a;
public String b;
public String c;
public String d;
public String e;
public int f;
public String g;
public final String toString()
{
JSONObject localJSONObject = new JSONObject();
try
{
if (this.a != null) {
localJSONObject.put("exceptionClassName", this.a);
}
if (this.b != null) {
localJSONObject.put("exceptionMessage", this.b);
}
if (this.c != null) {
localJSONObject.put("throwFileName", this.c);
}
if (this.d != null) {
localJSONObject.put("throwClassName", this.d);
}
if (this.e != null) {
localJSONObject.put("throwMethodName", this.e);
}
localJSONObject.put("throwLineNumber", String.valueOf(this.f));
if (this.g != null) {
localJSONObject.put("stackTrace", this.g);
}
}
catch (JSONException localJSONException)
{
for (;;)
{
h.c(localJSONException.getMessage());
}
}
return localJSONObject.toString();
}
}
/* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/lantern/analytics/c/d.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"lianh@jumei.com"
] |
lianh@jumei.com
|
666c837b312e87eb948c915612999886738186fd
|
e32ac5f355aaef9ff8cf5e7be8f0416a2e5a221d
|
/objectos-comuns-cnab/src/main/java/br/com/objectos/comuns/cnab/HeaderRemessa.java
|
408579708fcc9ed90928f707a5c306f1fd459c24
|
[
"Apache-2.0"
] |
permissive
|
gustavomel0/objectos-comuns-parent
|
0b5c1123a1f077f320e4117291da9fb503e41174
|
5e10fd95e04c42808e9d968756731db22da80237
|
refs/heads/master
| 2021-01-18T11:14:52.915072
| 2012-12-07T10:17:31
| 2012-12-07T10:17:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,486
|
java
|
/*
* Copyright 2012 Objectos, Fábrica de Software LTDA.
*
* 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 br.com.objectos.comuns.cnab;
import java.util.Map;
/**
* @author marcio.endo@objectos.com.br (Marcio Endo)
*/
public class HeaderRemessa extends AbstractRegistroRemessa<HeaderRemessa> {
HeaderRemessa(Banco banco, Map<CnabKey<?, ?>, Object> map) {
super(banco, map);
}
public static Builder paraBanco(Banco banco) {
return new Builder(banco);
}
@Override
RemessaSpec getSpec(Modelo modelo) {
return modelo.getHeaderRemessaSpec();
}
public static class Builder extends AbstractBuilder<Builder, HeaderRemessa> {
public Builder(Banco banco) {
super(banco);
}
@Override
public HeaderRemessa build() {
return new HeaderRemessa(banco, map);
}
@Override
Builder getSelf() {
return this;
}
@Override
public String toString() {
return build().toString();
}
}
}
|
[
"marcio.endo@objectos.com.br"
] |
marcio.endo@objectos.com.br
|
6deb0669cf99df952865b03cb33f2c74f9d708b8
|
22404b15877a87cf74094c0cc0f0edd3ce2c352f
|
/core/samples/anyframe-sample-sockjs/src/main/java/com/anyframe/sample/websocket/web/MovieSocketJSController.java
|
360592a3a38b4dce9bc401bd2c7b5dd9a6227bb7
|
[] |
no_license
|
switchover/anyframe-java-core
|
451853230a21ff89c5109cf6a4ee9361fb7cefc1
|
c2a2b2033b787ffd84126259512e32b863cb99ac
|
refs/heads/master
| 2020-06-04T03:04:07.409285
| 2018-04-06T05:26:59
| 2018-04-06T05:26:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,087
|
java
|
/*
* Copyright 2008-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.anyframe.sample.websocket.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* This MovieSocketJSController class is a Movie List Controller through SocketJS
*
* @author Seongjong Yoon
*/
@Controller
public class MovieSocketJSController {
@RequestMapping("sockJSMovieFinder.do")
public String getList() throws Exception {
return "core/moviefinder/movie/sockjslist";
}
}
|
[
"anyframe@samsung.com"
] |
anyframe@samsung.com
|
585ff9f87a7ffdcfbd008c36d9db15428b9142b2
|
ffee96d08ef70627194dcb8b73a2fdabbe6aa4f9
|
/src/main/java/de/ropemc/api/wrapper/net/minecraft/client/model/ModelBox.java
|
f289672c05010b0d15edd45964a2b6f6cc90fc02
|
[
"MIT"
] |
permissive
|
RopeMC/RopeMC
|
0db2b4dd78a1842708de69e2455b7e0f60e9b9c9
|
b464fb9a67e410355a6a498f2d6a2d3b0d022b3d
|
refs/heads/master
| 2021-07-09T18:04:37.632199
| 2019-01-02T21:48:17
| 2019-01-02T21:48:17
| 103,042,886
| 11
| 1
|
MIT
| 2018-11-24T16:06:35
| 2017-09-10T16:07:39
|
Java
|
UTF-8
|
Java
| false
| false
| 350
|
java
|
package de.ropemc.api.wrapper.net.minecraft.client.model;
import de.ropemc.api.wrapper.net.minecraft.client.renderer.WorldRenderer;
import de.ropemc.api.wrapper.WrappedClass;
@WrappedClass("net.minecraft.client.model.ModelBox")
public interface ModelBox {
void render(WorldRenderer var0, float var1);
ModelBox setBoxName(String var0);
}
|
[
"jan@bebendorf.eu"
] |
jan@bebendorf.eu
|
853f7b6bbb371650c557b12f5ae3c161cf8de1a6
|
1a4770c215544028bad90c8f673ba3d9e24f03ad
|
/second/quark/src/main/java/com/loc/dd.java
|
ea1cf9b3367db16de756c18622f05896337c17d8
|
[] |
no_license
|
zhang1998/browser
|
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
|
4eee43a9d36ebb4573537eddb27061c67d84c7ba
|
refs/heads/master
| 2021-05-03T06:32:24.361277
| 2018-02-10T10:35:36
| 2018-02-10T10:35:36
| 120,590,649
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 224
|
java
|
package com.loc;
import com.uc.apollo.impl.SettingsConst;
/* compiled from: ProGuard */
final class dd {
boolean a = false;
String b = SettingsConst.FALSE;
boolean c = false;
int d = 5;
dd() {
}
}
|
[
"2764207312@qq.com"
] |
2764207312@qq.com
|
49b43b57026c82996b0b15adf7137d58c5f8ab4f
|
8c085f12963e120be684f8a049175f07d0b8c4e5
|
/castor/tags/TAG_1_0_1/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/FailureType.java
|
f4fa2f0d4f7b3e938be6a500b12c782918893e16
|
[] |
no_license
|
alam93mahboob/castor
|
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
|
974f853be5680427a195a6b8ae3ce63a65a309b6
|
refs/heads/master
| 2020-05-17T08:03:26.321249
| 2014-01-01T20:48:45
| 2014-01-01T20:48:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,391
|
java
|
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 0.9.5.2</a>, using an XML
* Schema.
* $Id$
*/
package org.exolab.castor.tests.framework.testDescriptor;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class FailureType.
*
* @version $Revision$ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
*/
public class FailureType implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* internal content storage
*/
private boolean _content;
/**
* keeps track of state for field: _content
*/
private boolean _has_content;
/**
* Field _exception
*/
private java.lang.String _exception;
//----------------/
//- Constructors -/
//----------------/
public FailureType() {
super();
} //-- org.exolab.castor.tests.framework.testDescriptor.FailureType()
//-----------/
//- Methods -/
//-----------/
/**
* Method deleteContent
*/
public void deleteContent()
{
this._has_content= false;
} //-- void deleteContent()
/**
* Returns the value of field 'content'. The field 'content'
* has the following description: internal content storage
*
* @return the value of field 'content'.
*/
public boolean getContent()
{
return this._content;
} //-- boolean getContent()
/**
* Returns the value of field 'exception'.
*
* @return the value of field 'exception'.
*/
public java.lang.String getException()
{
return this._exception;
} //-- java.lang.String getException()
/**
* Method hasContent
*/
public boolean hasContent()
{
return this._has_content;
} //-- boolean hasContent()
/**
* Method isValid
*/
public boolean isValid()
{
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
} //-- boolean isValid()
/**
* Method marshal
*
* @param out
*/
public void marshal(java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, out);
} //-- void marshal(java.io.Writer)
/**
* Method marshal
*
* @param handler
*/
public void marshal(org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, handler);
} //-- void marshal(org.xml.sax.ContentHandler)
/**
* Sets the value of field 'content'. The field 'content' has
* the following description: internal content storage
*
* @param content the value of field 'content'.
*/
public void setContent(boolean content)
{
this._content = content;
this._has_content = true;
} //-- void setContent(boolean)
/**
* Sets the value of field 'exception'.
*
* @param exception the value of field 'exception'.
*/
public void setException(java.lang.String exception)
{
this._exception = exception;
} //-- void setException(java.lang.String)
/**
* Method unmarshalFailureType
*
* @param reader
*/
public static java.lang.Object unmarshalFailureType(java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
return (org.exolab.castor.tests.framework.testDescriptor.FailureType) Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.FailureType.class, reader);
} //-- java.lang.Object unmarshalFailureType(java.io.Reader)
/**
* Method validate
*/
public void validate()
throws org.exolab.castor.xml.ValidationException
{
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
} //-- void validate()
}
|
[
"wguttmn@b24b0d9a-6811-0410-802a-946fa971d308"
] |
wguttmn@b24b0d9a-6811-0410-802a-946fa971d308
|
4f6cb21d5576d2787ea6313502eb9959ee3ea76d
|
67803251fd48047ebb3aa77513a01e7d9cf3ba5f
|
/mama-buy-trade-service/src/main/java/com/njupt/swg/mamabuytradeservice/product/entity/SkuPropertyOption.java
|
bd4c6d8c917788ed1e77dbb70234322d03234fee
|
[] |
no_license
|
hai0378/mama-buy
|
8fdd57fad1925cb4e0a1a636f8151f75c5c2933f
|
2967898a1808fc9065cfd53a6b0d1ebbebe3a7f0
|
refs/heads/master
| 2020-04-14T17:26:53.175233
| 2018-12-30T08:48:00
| 2018-12-30T08:48:00
| 163,980,685
| 1
| 0
| null | 2019-01-03T14:05:01
| 2019-01-03T14:05:00
| null |
UTF-8
|
Java
| false
| false
| 347
|
java
|
package com.njupt.swg.mamabuytradeservice.product.entity;
import lombok.Data;
import java.util.Date;
@Data
public class SkuPropertyOption {
private Long id;
private Long skuId;
private Long propertyId;
private Long propertyOptionId;
private Byte enableFlag;
private Date createTime;
private Date updateTime;
}
|
[
"317758022@qq.com"
] |
317758022@qq.com
|
e57ff1bf67091b663b04843155672625dcf68063
|
e673dade43f5afcec5374af20f2411e1da10d982
|
/src/main/java/net/sourceforge/jaad/mp4/MP4Exception.java
|
388d20f1a65ba9241868ccd0d60d902db051735c
|
[
"CC-PDDC",
"LicenseRef-scancode-public-domain"
] |
permissive
|
candrews/JAADec
|
ab946f02f62d0d66408c6609a86d828c9f2c7ed4
|
970a87d256d383da7ddb9f3a14d313dc7cef3774
|
refs/heads/master
| 2023-04-07T00:05:15.407668
| 2016-06-13T19:48:50
| 2016-06-14T14:33:23
| 60,644,703
| 0
| 1
|
NOASSERTION
| 2023-04-03T23:29:32
| 2016-06-07T20:37:04
|
Java
|
UTF-8
|
Java
| false
| false
| 175
|
java
|
package net.sourceforge.jaad.mp4;
import java.io.IOException;
public class MP4Exception extends IOException {
public MP4Exception(String message) {
super(message);
}
}
|
[
"keeneraustin@yahoo.com"
] |
keeneraustin@yahoo.com
|
82d6ee36aa32ea16248e6d9a57c434b490d66f69
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_4f8b7c68a6298ce4a2d61001f667c9363dd9d28e/RowId/21_4f8b7c68a6298ce4a2d61001f667c9363dd9d28e_RowId_t.java
|
155f9066a33df4648cbb5f2006865c89aabfa303
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,908
|
java
|
package com.vaadin.addon.sqlcontainer;
import java.io.Serializable;
/**
* RowId represents identifiers of a single database result set row.
*
* The data structure of a RowId is an Object array which contains the values of
* the primary key columns of the identified row. This allows easy equals()
* -comparison of RowItems.
*/
public class RowId implements Serializable {
private static final long serialVersionUID = -3161778404698901258L;
protected Object[] id;
/**
* Prevent instantiation without required parameters.
*/
@SuppressWarnings("unused")
private RowId() {
}
public RowId(Object[] id) {
if (id == null) {
throw new IllegalArgumentException("id parameter must not be null!");
}
this.id = id;
}
public Object[] getId() {
return id;
}
@Override
public int hashCode() {
int result = 31;
for (Object o : id) {
result += o.hashCode();
}
return result;
}
@Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof RowId)) {
return false;
}
Object[] compId = ((RowId) obj).getId();
if (id.length != compId.length) {
return false;
}
for (int i = 0; i < id.length; i++) {
if (!id[i].equals(compId[i])) {
return false;
}
}
return true;
}
@Override
public String toString() {
StringBuffer s = new StringBuffer();
for (int i = 0; i < id.length; i++) {
s.append(id[i].toString());
if (i < id.length - 1) {
s.append("/");
}
}
return s.toString();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
225bb536b48a87124bd5dcf26fcb5a6568c32877
|
98c9d4575781bfbd26fa20673ba5a216c4a06429
|
/src/main/java/com/minshang/erp/modules/base/service/mybatis/IUserRoleService.java
|
1a19d57ec698f2336bb7f3e47c3f9d268c1d5068
|
[] |
no_license
|
JackLuhan/minshang_back
|
e06e21899b142a489715fa8110cfad5874992ad8
|
f54c6a36798005012029d96b355ba9518a33aef3
|
refs/heads/master
| 2020-04-13T17:50:56.929733
| 2019-01-10T16:38:03
| 2019-01-10T16:38:03
| 163,357,735
| 1
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 840
|
java
|
package com.minshang.erp.modules.base.service.mybatis;
import com.minshang.erp.modules.base.entity.Role;
import com.minshang.erp.modules.base.entity.UserRole;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import java.util.List;
/**
* @author houyi
*/
@CacheConfig(cacheNames = "userRole")
public interface IUserRoleService extends IService<UserRole> {
/**
* 通过用户id获取
* @param userId
* @return
*/
@Cacheable(key = "#userId")
List<Role> findByUserId(String userId);
/**
* 通过用户id获取用户角色关联的部门数据
* @param userId
* @return
*/
@Cacheable(key = "'depIds:'+#userId")
List<String> findDepIdsByUserId(String userId);
}
|
[
"1317406121@qq.com"
] |
1317406121@qq.com
|
51ac59b6be5e4996acbeb60f7195ecabb768a0ba
|
1b13df3f71db708a032952bd969b7935af0f0c42
|
/jigs-server/src/java/com/jigsforjava/i18n/I18nConfiguration.java
|
98e10d028805044026e82ee54031512457688e17
|
[] |
no_license
|
tfredrich/JigsForJava
|
a94ffe320df0325631b6fa948772348c530056af
|
ff806f1da0806a203066045b507ae0b7f6f9a176
|
refs/heads/master
| 2020-05-20T10:24:43.480692
| 2010-04-21T17:40:55
| 2010-04-21T17:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,931
|
java
|
/*
Copyright 2005 Strategic Gains, 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 com.jigsforjava.i18n;
import com.jigsforjava.util.Configuration;
/**
* @author Todd Fredrich
* @since Feb 16, 2005
* @version $Revision: 1.1 $
*/
public class I18nConfiguration
extends Configuration
{
// PROTOCOL: CONSTANTS
private final static String PROPERTIES_FILE_NAME = "I18n.properties";
private final static String RESOURCE_BUNDLE_BASE_NAME_KEY = "i18n.resourceBundleBaseName";
private final static String RESOURCE_BUNDLE_BASE_NAME_DEFAULT = "I18nResourceBundle";
// PROTOCOL: VARIABLES
private static I18nConfiguration instance = null;
// PROTOCOL: CONFIGURATION
public I18nConfiguration()
{
super();
}
/**
* Gets the PropertiesFileName attribute of the ApplicationProperties
* object
*
* @return The PropertiesFileName value
*/
protected String getPropertiesFileName()
{
return PROPERTIES_FILE_NAME;
}
/**
* Gets the singleton instance of the I18nConfiguration class.
*
* @return A reference to the singleton instance of I18nConfiguration.
*/
public static I18nConfiguration getInstance()
{
if (instance == null)
{
instance = new I18nConfiguration();
}
return instance;
}
// PROTOCOL: ACCESSING
/**
* @return
*/
public String getResourceBundleName()
{
return getStringProperty(RESOURCE_BUNDLE_BASE_NAME_KEY, RESOURCE_BUNDLE_BASE_NAME_DEFAULT);
}
}
|
[
"tfredrich@gmail.com"
] |
tfredrich@gmail.com
|
5a6e1bb4e9be73238bbf115cd253b75d30fca999
|
629762c6acaccb50d45d6910e6934c3fedd6c07d
|
/jzkj-biz-admin/src/main/java/com/jzkj/modules/shop/controller/HelpTypeController.java
|
e14c853eeb6a5d24ace3dae9620361862a3c5b81
|
[] |
no_license
|
13141498695/jzkj-master
|
d361911242ff14bdc948531a9c7d543b32140525
|
07437c45f06fdbdfe0dfd056f3a1edafc60554e7
|
refs/heads/master
| 2022-07-29T22:58:04.856913
| 2019-09-20T09:33:46
| 2019-09-20T09:33:46
| 209,749,996
| 0
| 0
| null | 2022-07-06T20:42:22
| 2019-09-20T09:07:26
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,665
|
java
|
package com.jzkj.modules.shop.controller;
import com.jzkj.common.platform.utils.Query;
import com.jzkj.common.platform.utils.R;
import com.jzkj.common.utils.PageUtils;
import com.jzkj.modules.shop.entity.HelpTypeEntity;
import com.jzkj.modules.shop.service.HelpTypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* Controller
*
* @author zhangbin
* @email 939961241@qq.com
* @date 2018-11-07 10:09:54
*/
@Controller
@RequestMapping("helptype")
public class HelpTypeController {
@Autowired
private HelpTypeService helpTypeService;
/**
* 查看列表
*/
@RequestMapping("/list")
@RequiresPermissions("helptype:list")
@ResponseBody
public R list(@RequestParam Map<String, Object> params) {
//查询列表数据
Query query = new Query(params);
List<HelpTypeEntity> helpTypeList = helpTypeService.queryList(query);
int total = helpTypeService.queryTotal(query);
PageUtils pageUtil = new PageUtils(helpTypeList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
/**
* 查看信息
*/
@RequestMapping("/info/{id}")
@RequiresPermissions("helptype:info")
@ResponseBody
public R info(@PathVariable("id") Integer id) {
HelpTypeEntity helpType = helpTypeService.queryObject(id);
return R.ok().put("helpType", helpType);
}
/**
* 保存
*/
@RequestMapping("/save")
@RequiresPermissions("helptype:save")
@ResponseBody
public R save(@RequestBody HelpTypeEntity helpType) {
helpTypeService.save(helpType);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@RequiresPermissions("helptype:update")
@ResponseBody
public R update(@RequestBody HelpTypeEntity helpType) {
helpTypeService.update(helpType);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
@RequiresPermissions("helptype:delete")
@ResponseBody
public R delete(@RequestBody Integer[]ids) {
helpTypeService.deleteBatch(ids);
return R.ok();
}
/**
* 查看所有列表
*/
@RequestMapping("/queryAll")
@ResponseBody
public R queryAll(@RequestParam Map<String, Object> params) {
List<HelpTypeEntity> list = helpTypeService.queryList(params);
return R.ok().put("list", list);
}
}
|
[
"123456"
] |
123456
|
6758ae7eb04414e21e801f7ec48f0b013f50b293
|
de8b590c72c1ca28ac07e206ce87f5e2c50449be
|
/src/main/java/org/wilson/world/interview/InterviewBalanceMatcher.java
|
9cb2a5886fafe33d69a74e1f6c8b76c2768eea3a
|
[] |
no_license
|
liumiaowilson/world
|
a513bfaacc94cbcf5b88c1a2ce5426944c7f83b4
|
818ee21b67edbf4961424d9d474110ac8201f591
|
refs/heads/master
| 2020-04-06T05:50:52.671982
| 2017-08-05T00:02:21
| 2017-08-05T00:02:21
| 62,312,015
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package org.wilson.world.interview;
import org.wilson.world.quiz.QuizBalanceMatcher;
public class InterviewBalanceMatcher extends QuizBalanceMatcher {
@SuppressWarnings("rawtypes")
@Override
public Class getQuizClass() {
return InterviewQuiz.class;
}
}
|
[
"mialiu@ebay.com"
] |
mialiu@ebay.com
|
c629c747f1080d7e74b166b28a09c4b40d3a0fd4
|
dc81649732414dee4d552a240b25cb3d055799b1
|
/src/test/java/org/assertj/core/util/IterableUtil_nonNullElementsIn_Test.java
|
c3720215ce9be92e5cb4bba94bbe3950b85fe2ad
|
[
"Apache-2.0"
] |
permissive
|
darkliang/assertj-core
|
e40de697a5ac19db7a652178963a523dfe6f89ff
|
4a25dab7b99f292d158dc8118ac84dc7b4933731
|
refs/heads/integration
| 2021-05-16T23:22:49.013854
| 2020-05-31T12:36:31
| 2020-05-31T12:36:31
| 250,513,505
| 1
| 0
|
Apache-2.0
| 2020-06-02T09:25:54
| 2020-03-27T11:11:36
|
Java
|
UTF-8
|
Java
| false
| false
| 1,850
|
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.
*
* Copyright 2012-2020 the original author or authors.
*/
package org.assertj.core.util;
import static org.assertj.core.util.Lists.newArrayList;
import static org.assertj.core.api.Assertions.*;
import java.util.*;
import org.junit.jupiter.api.Test;
/**
* Tests for <code>{@link IterableUtil#nonNullElementsIn(Iterable)}</code>.
*
* @author Joel Costigliola
* @author Alex Ruiz
*/
public class IterableUtil_nonNullElementsIn_Test {
@Test
public void should_return_empty_List_if_given_Iterable_is_null() {
Collection<?> c = null;
assertThat(IterableUtil.nonNullElementsIn(c)).isEmpty();
}
@Test
public void should_return_empty_List_if_given_Iterable_has_only_null_elements() {
Collection<String> c = new ArrayList<>();
c.add(null);
assertThat(IterableUtil.nonNullElementsIn(c)).isEmpty();
}
@Test
public void should_return_empty_List_if_given_Iterable_is_empty() {
Collection<String> c = new ArrayList<>();
assertThat(IterableUtil.nonNullElementsIn(c)).isEmpty();
}
@Test
public void should_return_a_list_without_null_elements() {
List<String> c = newArrayList("Frodo", null, "Sam", null);
List<String> nonNull = IterableUtil.nonNullElementsIn(c);
assertThat(nonNull.toArray()).isEqualTo(new String[] { "Frodo", "Sam" });
}
}
|
[
"joel.costigliola@gmail.com"
] |
joel.costigliola@gmail.com
|
af3eb31e0efd7f6374bf490330bf5c3f515cfb9d
|
fa05c531ef51a7c387f9e77884ccb446b82860ec
|
/src/ru/progwards/java1/lessons/io1/CharFilter.java
|
f78c26fb0eeb5db3af2529ae187f272275582d90
|
[] |
no_license
|
creatermc/java1
|
2c91e8567aaba8aecb3aed0ff8452e436f09ed74
|
185c09c9510b44a9cee97c299af86f9e83238b4e
|
refs/heads/master
| 2023-01-30T05:01:42.940902
| 2023-01-23T12:49:35
| 2023-01-23T12:49:35
| 280,398,689
| 0
| 0
| null | 2020-07-17T10:42:50
| 2020-07-17T10:42:50
| null |
UTF-8
|
Java
| false
| false
| 2,274
|
java
|
package ru.progwards.java1.lessons.io1;
/*Создать статический метод public static void filterFile(String inFileName, String outFileName, String filter),
в котором прочитать файл inFileName и удалить символы, содержащиеся в String filter, результат записать в выходной файл.
В случае возникновения ошибки, пробросить стандартное исключение выше, корректно закрыв все ресурсы
Например файл содержит:
Java — строго типизированный объектно-ориентированный язык программирования, разработанный компанией Sun Microsystems
(в последующем приобретённой компанией Oracle).
obscene = " -,.()"
Должен выдать результат:
Javaстроготипизированныйобъектноориентированныйязыкпрограммированияразработанный
компаниейSunMicrosystemsвпоследующемприобретённойкомпаниейOracle */
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class CharFilter {
public static void filterFile(String inFileName, String outFileName, String filter) {
try {
//чтение файла
FileReader reader = new FileReader(inFileName);
Scanner scanner = new Scanner(reader);
//чтение фильтра
FileReader filt = new FileReader(filter);
Scanner filtScan = new Scanner(filt);
//запись в новый файл с применение фильтра
FileWriter in = new FileWriter(outFileName);
in.close();
filt.close();
scanner.close();
filtScan.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
public static void main(String[] args) throws IOException {
filterFile("src\\doc.txt", "src\\filterOut.txt", "src\\filter.txt");
}
}
|
[
"abirme@yandex.ru"
] |
abirme@yandex.ru
|
71692945a9cbf0d04a7c874124a5d44f7943e80a
|
35348f6624d46a1941ea7e286af37bb794bee5b7
|
/Ghidra/Framework/Project/src/main/java/ghidra/framework/model/DomainFileFilter.java
|
f57d3b456988d398071355ad72c71956c7a866b4
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
StarCrossPortal/ghidracraft
|
7af6257c63a2bb7684e4c2ad763a6ada23297fa3
|
a960e81ff6144ec8834e187f5097dfcf64758e18
|
refs/heads/master
| 2023-08-23T20:17:26.250961
| 2021-10-22T00:53:49
| 2021-10-22T00:53:49
| 359,644,138
| 80
| 19
|
Apache-2.0
| 2021-10-20T03:59:55
| 2021-04-20T01:14:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,077
|
java
|
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* 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 ghidra.framework.model;
/**
* Interface to indicate whether a domain file should be included in a list or
* set of domain files.
*/
public interface DomainFileFilter {
/**
* Tests whether or not the specified domain file should be
* included in a domain file list.
*
* @param df The domain file to be tested
* @return <code>true</code> if and only if <code>df</code>
*
*/
public boolean accept(DomainFile df);
}
|
[
"46821332+nsadeveloper789@users.noreply.github.com"
] |
46821332+nsadeveloper789@users.noreply.github.com
|
ad2355d2c4ce97d6c7b21cff1d9561c90f968b53
|
ecdf387e88421ff8ebb49100ca0d5661aa7273c7
|
/TianjianERP/src/com/matech/audit/service/rectify/VoucherTable.java
|
dd343e00c3c093dd7989a6c398d313c680c5a80f
|
[] |
no_license
|
littletanker/mt-TianjianERP
|
1a9433ff8bad1aebceec5bdd721544e88d73e247
|
ef0378918a72a321735ab4745455f6ebe5e04576
|
refs/heads/master
| 2021-01-18T17:11:33.639821
| 2013-09-04T09:01:24
| 2013-09-04T09:01:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,071
|
java
|
package com.matech.audit.service.rectify;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2005</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class VoucherTable {
private int autoid; // ��� ���������
private String accpackageid; // ���ױ�� ��session �� request �еõ�
private String projectID;
private int voucherid; // ƾ֤��� ���������
private String typeid; // ƾ֤���� "��"
private String vchdate; // �������� ��ǰ����(ϵͳʱ��)
private String filluser; // �Ƶ��� ��ǰ�û���¼��
private String audituser; // ����� null
private String keepuser; // ������ null
private String director; // ��� null
private int affixcount; // �������� 1
private String description; // ��ע ����
private String doubtuserid; // ���Ա null
private String property; // ����
public VoucherTable() {
}
public String getAccpackageid() {
return accpackageid;
}
public void setAccpackageid(String accpackageid) {
this.accpackageid = accpackageid;
}
public int getAffixcount() {
return affixcount;
}
public void setAffixcount(int affixcount) {
this.affixcount = affixcount;
}
public String getAudituser() {
return audituser;
}
public void setAudituser(String audituser) {
this.audituser = audituser;
}
public int getAutoid() {
return autoid;
}
public void setAutoid(int autoid) {
this.autoid = autoid;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getDoubtuserid() {
return doubtuserid;
}
public void setDoubtuserid(String doubtuserid) {
this.doubtuserid = doubtuserid;
}
public String getFilluser() {
return filluser;
}
public void setFilluser(String filluser) {
this.filluser = filluser;
}
public String getKeepuser() {
return keepuser;
}
public void setKeepuser(String keepuser) {
this.keepuser = keepuser;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getTypeid() {
return typeid;
}
public void setTypeid(String typeid) {
this.typeid = typeid;
}
public String getVchdate() {
return vchdate;
}
public void setVchdate(String vchdate) {
this.vchdate = vchdate;
}
public int getVoucherid() {
return voucherid;
}
public String getProjectID() {
return projectID;
}
public void setVoucherid(int voucherid) {
this.voucherid = voucherid;
}
public void setProjectID(String projectID) {
this.projectID = projectID;
}
}
|
[
"smartken0824@gmail.com"
] |
smartken0824@gmail.com
|
555714b41888ef2ab0baa1c17540d96c8367fd03
|
74a53525e0cdad6b2f2f30ed6eb5ad56842b5292
|
/app/src/main/java/Classes/actions/ActionEnableFreedom.java
|
ab32acb752b8c078aa9d34ad911587e5889736ba
|
[] |
no_license
|
Leoxinghai/Citiville
|
28ed8b29323ebe124b581f6fa73dea491abbe01f
|
e788cef3c52d5ff8bbd38155573533c7c06c4475
|
refs/heads/master
| 2021-01-18T17:27:02.763391
| 2017-03-31T09:19:12
| 2017-03-31T09:19:12
| 86,801,515
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,691
|
java
|
package Classes.actions;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
import android.graphics.*;
import com.xiyu.util.Array;
import com.xiyu.util.Dictionary;
import Classes.*;
public class ActionEnableFreedom extends NPCAction
{
protected boolean m_isFreeAgent ;
protected boolean m_reset ;
public ActionEnableFreedom (NPC param1 ,boolean param2 ,boolean param3 =false )
{
super(param1);
this.m_isFreeAgent = param2;
this.m_reset = param3;
return;
}//end
public void update (double param1 )
{
super.update(param1);
m_npc.isFreeAgent = this.m_isFreeAgent;
if (this.m_reset)
{
m_npc.getStateMachine().removeAllStates();
}
else
{
m_npc.getStateMachine().removeState(this);
}
return;
}//end
}
|
[
"leoxinghai@hotmail.com"
] |
leoxinghai@hotmail.com
|
74722010f2d7a3412ccc006424d0cf235c7976a4
|
72f2ca80eee3562473f287fbc2a701776528cf2b
|
/bridge/src/main/java/com/iluwatar/bridge/MagicWeaponImpl.java
|
bd2a3b8d7564cdd7605ed4c2249fefa776b35d06
|
[
"MIT"
] |
permissive
|
JalalSordo/java-design-patterns
|
79d8dd1d1401d5a58e9d7c77ca67a8fe9837d8fe
|
6176f134c4b1d4e58d85089f80c21e6715dc2025
|
refs/heads/master
| 2022-12-03T14:07:24.813797
| 2015-09-11T19:56:11
| 2015-09-11T19:56:11
| 42,330,452
| 0
| 1
|
MIT
| 2022-11-24T06:23:32
| 2015-09-11T20:24:50
|
Java
|
UTF-8
|
Java
| false
| false
| 215
|
java
|
package com.iluwatar.bridge;
/**
*
* MagicWeaponImpl
*
*/
public abstract class MagicWeaponImpl {
public abstract void wieldImp();
public abstract void swingImp();
public abstract void unwieldImp();
}
|
[
"iluwatar@gmail.com"
] |
iluwatar@gmail.com
|
cf486dc787b92f55d0ce249f9686d98d0981f607
|
59e6dc1030446132fb451bd711d51afe0c222210
|
/platform-integration/platform-automated-test-suite/1.2.0/org.wso2.carbon.automation.platform.test.scenarios/src/main/java/org/wso2/carbon/automation/platform/scenarios/GenerateTestNgXml.java
|
bd639d626da676c54d14c60bbc12785da6dd4b80
|
[] |
no_license
|
Alsan/turing-chunk07
|
2f7470b72cc50a567241252e0bd4f27adc987d6e
|
e9e947718e3844c07361797bd52d3d1391d9fb5e
|
refs/heads/master
| 2020-05-26T06:20:24.554039
| 2014-02-07T12:02:53
| 2014-02-07T12:02:53
| 38,284,349
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,653
|
java
|
/*
*Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
*WSO2 Inc. licenses this file to you under the Apache License,
*Version 2.0 (the "License"); you may not use this file except
*in compliance with the License.
*You may obtain a copy of the License at
*
*http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing,
*software distributed under the License is distributed on an
*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
*KIND, either express or implied. See the License for the
*specific language governing permissions and limitations
*under the License.
*/
package org.wso2.carbon.automation.platform.scenarios;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class GenerateTestNgXml {
private static final Log log = LogFactory.getLog(GenerateTestNgXml.class);
public void generateXml(String name, String suiteXml) {
try {
File file = new File(System.getProperty("automation.settings.location") + File.separator + name + ".xml");
if (file.createNewFile()) {
log.info("Suite XML is created");
} else {
log.info("Suite XML already exists.");
}
FileWriter fstream = new FileWriter(file);
BufferedWriter out = new BufferedWriter(fstream);
out.write(suiteXml);
out.close();
} catch (IOException e) {
log.error(e.getMessage());
}
}
}
|
[
"malaka@wso2.com"
] |
malaka@wso2.com
|
0af922e07674fe6d43edb06b5b1050b14fa7352a
|
aea01bdb46ac63f9039a2ad086b7f81baba32ef9
|
/web/src/main/java/com/archives/pojo/BorrowReminder.java
|
27063f78a018030113ad7cd4c127bdf7757db114
|
[] |
no_license
|
gaofeng4623/SysArchives
|
a187c6d43cae7d3ef3c4eb35fde2d464e8515e2b
|
3bd582f11bf1e1dfd576c4218a9a4e41577317df
|
refs/heads/master
| 2021-07-12T09:10:42.779501
| 2017-09-01T09:13:49
| 2017-09-01T09:13:52
| 107,104,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,998
|
java
|
package com.archives.pojo;
import java.util.Date;
/**
* 催还通知表
* @author zfn
*
*/
public class BorrowReminder {
private Integer id;
private String borrowId;//借阅单主表
private String empId;//借阅人id
private String sendEmpId;//发送人id
private String sendEmpName;//发送人姓名
private Date sendDate;//发送时间
private String expireDate;//预计归还时间
private String depName;//借阅部门
private String employeeName;
private String status;//0已借阅1已归还
private String formNo;//借阅单号
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getBorrowId() {
return borrowId;
}
public void setBorrowId(String borrowId) {
this.borrowId = borrowId;
}
public String getEmpId() {
return empId;
}
public void setEmpId(String empId) {
this.empId = empId;
}
public String getSendEmpId() {
return sendEmpId;
}
public void setSendEmpId(String sendEmpId) {
this.sendEmpId = sendEmpId;
}
public String getSendEmpName() {
return sendEmpName;
}
public void setSendEmpName(String sendEmpName) {
this.sendEmpName = sendEmpName;
}
public Date getSendDate() {
return sendDate;
}
public void setSendDate(Date sendDate) {
this.sendDate = sendDate;
}
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
public String getDepName() {
return depName;
}
public void setDepName(String depName) {
this.depName = depName;
}
public String getEmployeeName() {
return employeeName;
}
public void setEmployeeName(String employeeName) {
this.employeeName = employeeName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getFormNo() {
return formNo;
}
public void setFormNo(String formNo) {
this.formNo = formNo;
}
}
|
[
"gaofen_888@163.com"
] |
gaofen_888@163.com
|
a802cfc64af38fdd80d9e3c2b069b2cec6ca7582
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/google/android/gms/auth/api/signin/SignInAccount.java
|
b20c97539a2b9229ff8aa9d21becd07cc498fb4e
|
[] |
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
| 4,584
|
java
|
package com.google.android.gms.auth.api.signin;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.text.TextUtils;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.common.internal.safeparcel.zzb;
import com.google.android.gms.common.internal.zzx;
import org.json.JSONObject;
public class SignInAccount implements SafeParcelable {
public static final Creator<SignInAccount> CREATOR = new zzf();
public final int f6397a;
public String f6398b;
public String f6399c;
public String f6400d;
public String f6401e;
public Uri f6402f;
public GoogleSignInAccount f6403g;
public String f6404h;
public String f6405i;
SignInAccount(int i, String str, String str2, String str3, String str4, Uri uri, GoogleSignInAccount googleSignInAccount, String str5, String str6) {
this.f6397a = i;
this.f6400d = zzx.a(str3, "Email cannot be empty.");
this.f6401e = str4;
this.f6402f = uri;
this.f6398b = str;
this.f6399c = str2;
this.f6403g = googleSignInAccount;
this.f6404h = zzx.a(str5);
this.f6405i = str6;
}
private static SignInAccount m12088a(zze com_google_android_gms_auth_api_signin_zze, String str, String str2, String str3, Uri uri, String str4, String str5) {
String str6 = null;
if (com_google_android_gms_auth_api_signin_zze != null) {
str6 = com_google_android_gms_auth_api_signin_zze.zzmC();
}
return new SignInAccount(2, str6, str, str2, str3, uri, null, str4, str5);
}
public static SignInAccount m12089a(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
JSONObject jSONObject = new JSONObject(str);
Object optString = jSONObject.optString("photoUrl", null);
SignInAccount a = m12088a(zze.zzbI(jSONObject.optString("providerId", null)), jSONObject.optString("tokenId", null), jSONObject.getString("email"), jSONObject.optString("displayName", null), !TextUtils.isEmpty(optString) ? Uri.parse(optString) : null, jSONObject.getString("localId"), jSONObject.optString("refreshToken"));
a.f6403g = GoogleSignInAccount.m12068a(jSONObject.optString("googleSignInAccount"));
return a;
}
private JSONObject m12090j() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("email", m12092b());
if (!TextUtils.isEmpty(this.f6401e)) {
jSONObject.put("displayName", this.f6401e);
}
if (this.f6402f != null) {
jSONObject.put("photoUrl", this.f6402f.toString());
}
if (!TextUtils.isEmpty(this.f6398b)) {
jSONObject.put("providerId", this.f6398b);
}
if (!TextUtils.isEmpty(this.f6399c)) {
jSONObject.put("tokenId", this.f6399c);
}
if (this.f6403g != null) {
jSONObject.put("googleSignInAccount", this.f6403g.m12078i());
}
if (!TextUtils.isEmpty(this.f6405i)) {
jSONObject.put("refreshToken", this.f6405i);
}
jSONObject.put("localId", m12094f());
return jSONObject;
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
public final SignInAccount m12091a(GoogleSignInAccount googleSignInAccount) {
this.f6403g = googleSignInAccount;
return this;
}
public final String m12092b() {
return this.f6400d;
}
public int describeContents() {
return 0;
}
public final GoogleSignInAccount m12093e() {
return this.f6403g;
}
public final String m12094f() {
return this.f6404h;
}
public final String m12095h() {
return m12090j().toString();
}
public void writeToParcel(Parcel parcel, int i) {
int a = zzb.m12237a(parcel);
zzb.m12241a(parcel, 1, this.f6397a);
zzb.m12247a(parcel, 2, this.f6398b, false);
zzb.m12247a(parcel, 3, this.f6399c, false);
zzb.m12247a(parcel, 4, this.f6400d, false);
zzb.m12247a(parcel, 5, this.f6401e, false);
zzb.m12245a(parcel, 6, (Parcelable) this.f6402f, i, false);
zzb.m12245a(parcel, 7, (Parcelable) this.f6403g, i, false);
zzb.m12247a(parcel, 8, this.f6404h, false);
zzb.m12247a(parcel, 9, this.f6405i, false);
zzb.m12258c(parcel, a);
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
8b352c87787c1184526f58f1ac024a15cd1c9fae
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_61d780843b3f3b46f876f754ec57c85e14c41e4b/MockWebServiceConnection/11_61d780843b3f3b46f876f754ec57c85e14c41e4b_MockWebServiceConnection_t.java
|
13f3af738cbf4796badbb72395280da5720208de
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,608
|
java
|
/**
* Copyright 2009-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.javacrumbs.springws.test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import net.javacrumbs.springws.test.util.DefaultXmlUtil;
import net.javacrumbs.springws.test.util.XmlUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.ws.FaultAwareWebServiceMessage;
import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.WebServiceMessageFactory;
import org.springframework.ws.context.DefaultMessageContext;
import org.springframework.ws.context.MessageContext;
import org.springframework.ws.server.EndpointInterceptor;
import org.springframework.ws.transport.WebServiceConnection;
/**
* Mock WS connection that instead of actually calling the WS uses {@link RequestProcessor}s
* to validate all the requests and generate responses.
* @author Lukas Krecan
*
*/
public class MockWebServiceConnection implements WebServiceConnection {
private final URI uri;
private WebServiceMessage request;
private List<RequestProcessor> requestProcessors;
private List<EndpointInterceptor> interceptors = Collections.emptyList();
private XmlUtil xmlUtil = DefaultXmlUtil.getInstance();
protected final Log logger = LogFactory.getLog(getClass());
public MockWebServiceConnection(URI uri) {
this.uri = uri;
}
/**
* Stores the message.
*/
public void send(WebServiceMessage message) throws IOException {
request = message;
}
/**
* Generates mock response
*/
public WebServiceMessage receive(WebServiceMessageFactory messageFactory) throws IOException {
DefaultMessageContext messageContext = new DefaultMessageContext(request, messageFactory);
boolean callRequestProcessors = handleRequest(messageContext);
if (callRequestProcessors)
{
WebServiceMessage response = generateResponse(messageFactory);
messageContext.setResponse(response);
}
handleResponse(messageContext);
return messageContext.getResponse();
}
/**
* Iterates over all interceptors. If one of them returns false, false is returned. True is returned otherwise.
* @param messageContext
* @return
* @throws IOException
*/
protected boolean handleRequest(MessageContext messageContext) throws IOException {
for (EndpointInterceptor interceptor:interceptors)
{
try {
if (!interceptor.handleRequest(messageContext, null))
{
return false;
}
} catch (Exception e) {
throw new IOException("Unexpected exception",e);
}
}
return true;
}
/**
* Processes response using interceptors.
* @param messageContext
* @throws IOException
*/
protected void handleResponse(MessageContext messageContext) throws IOException {
if (!interceptors.isEmpty())
{
boolean hasFault = hasFault(messageContext);
for (EndpointInterceptor interceptor:interceptors)
{
try {
if (!hasFault)
{
if (!interceptor.handleResponse(messageContext, null)) return;
}
else
{
if (!interceptor.handleFault(messageContext, null)) return;
}
} catch (Exception e) {
throw new IOException("Unexpected exception",e);
}
}
}
}
/**
* Returns true if the message has fault.
* @param messageContext
* @return
*/
protected boolean hasFault(MessageContext messageContext) {
boolean hasFault = false;
WebServiceMessage response = messageContext.getResponse();
if (response instanceof FaultAwareWebServiceMessage) {
hasFault = ((FaultAwareWebServiceMessage) response).hasFault();
}
return hasFault;
}
/**
* Calls all request processors. If a processor returns <code>null</code>, the next processor is called. If all processor return <code>null</code>
* {@link MockWebServiceConnection#handleResponseNotFound} method is called. In default implementation it throws {@link NoResponseGeneratorSpecifiedException}.
* @param messageFactory
* @return
* @throws IOException
*/
protected WebServiceMessage generateResponse(WebServiceMessageFactory messageFactory) throws IOException {
WebServiceMessage response = null;
if (requestProcessors!=null)
{
for (RequestProcessor responseGenerator: requestProcessors)
{
response = responseGenerator.processRequest(uri, messageFactory, request);
if (response!=null)
{
return response;
}
}
}
return handleResponseNotFound(messageFactory);
}
/**
* Throws {@link NoResponseGeneratorSpecifiedException}. Can be overrriden.
* @param messageFactory
* @return
*/
protected WebServiceMessage handleResponseNotFound(WebServiceMessageFactory messageFactory) {
throw new NoResponseGeneratorSpecifiedException("No response found for request. Please, log category \"net.javacrumbs.springws.test.lookup\" on DEBUG level to find out the reasons. ");
}
public void close() throws IOException {
}
public String getErrorMessage() throws IOException {
return null;
}
public URI getUri() throws URISyntaxException {
return uri;
}
public boolean hasError() throws IOException {
return false;
}
public WebServiceMessage getRequest() {
return request;
}
public XmlUtil getXmlUtil() {
return xmlUtil;
}
public void setXmlUtil(XmlUtil xmlUtil) {
this.xmlUtil = xmlUtil;
}
public Collection<RequestProcessor> getRequestProcessors() {
return requestProcessors;
}
public void setRequestProcessors(List<RequestProcessor> responseGenerators) {
this.requestProcessors = responseGenerators;
}
public List<EndpointInterceptor> getInterceptors() {
return interceptors;
}
public void setInterceptors(List<EndpointInterceptor> interceptors) {
this.interceptors = interceptors;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
91adf5bbbc4390bb6a7c2fbc71128d02a16e769a
|
434a45b826a2b46dc64ad1562c8236224c6b1884
|
/AndroidStudioProjects/StarWars/app/src/main/java/es/saladillo/alejandro/starwars/Adaptador.java
|
3602490d29b963c65c0d4d92aed2670c4df3cf16
|
[] |
no_license
|
SoulApps/CrossPlatformLearning
|
66c42b1cb09d69e97c3a1668502b0dd9cc139625
|
c80d0893621e85b426f0e17410f69e5f825dfa12
|
refs/heads/master
| 2021-04-27T06:05:36.794382
| 2017-12-06T18:17:26
| 2017-12-06T18:17:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,793
|
java
|
package es.saladillo.alejandro.starwars;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.ArrayList;
import es.saladillo.alejandro.starwars.models.Film;
/**
* Created by Alejandro on 06/02/2017.
*/
public class Adaptador extends ArrayAdapter<Film> {
private ArrayList<Film> peliculas;
public Adaptador(Context context, ArrayList<Film> peliculas) {
super(context, R.layout.fila);
this.peliculas = peliculas;
}
public void setPeliculas(ArrayList<Film> peliculas) {
this.peliculas = peliculas;
super.clear();
super.addAll(peliculas);
}
private static class ViewHolder {
private final TextView lblInfo;
public ViewHolder(View view) {
lblInfo = (TextView) view.findViewById(R.id.lblInfo);
}
public void bind(Film pelicula) {
lblInfo.setText(pelicula.getTitle());
}
}
@NonNull
@Override
public View getView(int position, View convertView, @NonNull ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.fila, parent, false);
holder = new ViewHolder(convertView);
convertView.setTag(holder);
}
else
holder = (ViewHolder) convertView.getTag();
onBindViewHolder(holder, position);
return convertView;
}
private void onBindViewHolder(ViewHolder holder, int position) {
Film pelicula = peliculas.get(position);
holder.bind(pelicula);
}
}
|
[
"alejandrosanchezgalvin@gmail.com"
] |
alejandrosanchezgalvin@gmail.com
|
a0706866edea3aa7b5a08a0637fb515c00068841
|
cbde503c151471defe730f413f8c449ef670a33f
|
/src/com/qiYang/jpush/ReceiverTypeEnum.java
|
db53684ed10e46d44f216c3bb4fdd2b786f98d23
|
[] |
no_license
|
scorpiopapa/xiaozhang
|
4dd5f7d52bbf4e628cfb0381bcc585c23ddcf1be
|
5e80931795e198908bfd8debce79271b2895a783
|
refs/heads/master
| 2021-01-10T20:29:15.784526
| 2014-08-31T12:54:29
| 2014-08-31T12:54:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 398
|
java
|
package com.qiYang.jpush;
public enum ReceiverTypeEnum {
// 指定的 IMEI。此时必须指定 appKeys。
IMEI(1),
// 指定的 tag。
TAG(2),
// 指定的 alias。
ALIAS(3),
// 对指定appkeys 的所有用户推送消息。
APPKEYS(4);
private final int value;
private ReceiverTypeEnum(final int value) {
this.value = value;
}
public int value() {
return this.value;
}
}
|
[
"liliang2005@gmail.com"
] |
liliang2005@gmail.com
|
61fa1b9d274f48752edfbccd5d362234675c7121
|
d84a968e843dc267aeaf79005cdf91be051efe35
|
/Mage.Sets/src/mage/cards/s/SasayaOrochiAscendant.java
|
7b59af4008235d3426dd1473538ce778184b4acc
|
[
"MIT"
] |
permissive
|
lzybluee/MageX
|
da7a630a65baa56546e4687f9c1f13ae106ff265
|
fc36104bc8e6aebb147d9aca7ce49477dbf9d315
|
refs/heads/master
| 2022-11-27T03:36:53.892274
| 2021-10-10T23:04:18
| 2021-10-10T23:04:18
| 115,675,633
| 1
| 0
|
MIT
| 2022-11-16T12:23:35
| 2017-12-29T01:58:13
|
Java
|
UTF-8
|
Java
| false
| false
| 7,461
|
java
|
package mage.cards.s;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
import mage.abilities.costs.common.RevealHandSourceControllerCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.ManaEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceColor;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterLandCard;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.permanent.PermanentIdPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TokenImpl;
import mage.players.Player;
import java.util.List;
import java.util.UUID;
/**
* @author LevelX2
*/
public final class SasayaOrochiAscendant extends CardImpl {
public SasayaOrochiAscendant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SNAKE);
this.subtype.add(SubType.MONK);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
this.flipCard = true;
this.flipCardName = "Sasaya's Essence";
// Reveal your hand: If you have seven or more land cards in your hand, flip Sasaya, Orochi Ascendant.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SasayaOrochiAscendantFlipEffect(), new RevealHandSourceControllerCost()));
}
public SasayaOrochiAscendant(final SasayaOrochiAscendant card) {
super(card);
}
@Override
public SasayaOrochiAscendant copy() {
return new SasayaOrochiAscendant(this);
}
}
class SasayaOrochiAscendantFlipEffect extends OneShotEffect {
public SasayaOrochiAscendantFlipEffect() {
super(Outcome.Benefit);
this.staticText = "If you have seven or more land cards in your hand, flip {this}";
}
public SasayaOrochiAscendantFlipEffect(final SasayaOrochiAscendantFlipEffect effect) {
super(effect);
}
@Override
public SasayaOrochiAscendantFlipEffect copy() {
return new SasayaOrochiAscendantFlipEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.getHand().count(new FilterLandCard(), game) > 6) {
new FlipSourceEffect(new SasayasEssence()).apply(game, source);
}
return true;
}
return false;
}
}
class SasayasEssence extends TokenImpl {
SasayasEssence() {
super("Sasaya's Essence", "");
addSuperType(SuperType.LEGENDARY);
cardType.add(CardType.ENCHANTMENT);
color.setGreen(true);
// Whenever a land you control is tapped for mana, for each other land you control with the same name, add one mana of any type that land produced.
this.addAbility(new TapForManaAllTriggeredManaAbility(
new SasayasEssenceManaEffect(),
new FilterControlledLandPermanent(), SetTargetPointer.PERMANENT));
}
public SasayasEssence(final SasayasEssence token) {
super(token);
}
@Override
public SasayasEssence copy() {
return new SasayasEssence(this);
}
}
class SasayasEssenceManaEffect extends ManaEffect {
public SasayasEssenceManaEffect() {
super();
this.staticText = "for each other land you control with the same name, add one mana of any type that land produced";
}
public SasayasEssenceManaEffect(final SasayasEssenceManaEffect effect) {
super(effect);
}
@Override
public SasayasEssenceManaEffect copy() {
return new SasayasEssenceManaEffect(this);
}
@Override
public List<Mana> getNetMana(Game game, Ability source) {
return null;
}
@Override
public Mana produceMana(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Mana mana = (Mana) this.getValue("mana");
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (controller != null && mana != null && permanent != null) {
Mana newMana = new Mana();
FilterPermanent filter = new FilterLandPermanent();
filter.add(Predicates.not(new PermanentIdPredicate(permanent.getId())));
filter.add(new NamePredicate(permanent.getName()));
int count = game.getBattlefield().countAll(filter, controller.getId(), game);
if (count > 0) {
Choice choice = new ChoiceColor(true);
choice.getChoices().clear();
choice.setMessage("Pick the type of mana to produce");
if (mana.getBlack() > 0) {
choice.getChoices().add("Black");
}
if (mana.getRed() > 0) {
choice.getChoices().add("Red");
}
if (mana.getBlue() > 0) {
choice.getChoices().add("Blue");
}
if (mana.getGreen() > 0) {
choice.getChoices().add("Green");
}
if (mana.getWhite() > 0) {
choice.getChoices().add("White");
}
if (mana.getColorless() > 0) {
choice.getChoices().add("Colorless");
}
if (!choice.getChoices().isEmpty()) {
for (int i = 0; i < count; i++) {
choice.clearChoice();
if (choice.getChoices().size() == 1) {
choice.setChoice(choice.getChoices().iterator().next());
} else {
if (!controller.choose(outcome, choice, game)) {
return null;
}
}
switch (choice.getChoice()) {
case "Black":
newMana.increaseBlack();
break;
case "Blue":
newMana.increaseBlue();
break;
case "Red":
newMana.increaseRed();
break;
case "Green":
newMana.increaseGreen();
break;
case "White":
newMana.increaseWhite();
break;
case "Colorless":
newMana.increaseColorless();
break;
}
}
}
}
return newMana;
}
return null;
}
}
|
[
"lzybluee@gmail.com"
] |
lzybluee@gmail.com
|
f9c2da95746fe02f095fa7a7ebd33bcb8d3a452f
|
afcca25fdcbaaa4bdd08babcf234dcdecf21b6f6
|
/quasar-sika-design-server/quasar-sika-design-server-core/src/main/java/com/quasar/sika/design/server/common/system/service/impl/SystemServiceImpl.java
|
8b0fe8c9485c9e5ed263c0ac74a0640a554e4297
|
[
"MIT"
] |
permissive
|
Auntie233/quasar-sika-design
|
cd12faedaeb1f24c6e6de8462ce0d692a2e62a9c
|
a4463dbcf4ed19cbc8453d7d6161f92b85d9d076
|
refs/heads/main
| 2023-07-05T10:43:23.726149
| 2021-08-23T09:04:48
| 2021-08-23T09:04:48
| 399,025,717
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 155
|
java
|
package com.quasar.sika.design.server.common.system.service.impl;
/**
* @author daiqi
* @create 2021-01-06 23:08
*/
public class SystemServiceImpl {
}
|
[
"466608943@qq.com"
] |
466608943@qq.com
|
2804cdd81aed8ba64df46c3596466a3621f46491
|
8228efa27043e0a236ca8003ec0126012e1fdb02
|
/L2JOptimus_Core/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMammon.java
|
97d872c26feeb5dff3a29fca6e396dc4975e9d02
|
[] |
no_license
|
wan202/L2JDeath
|
9982dfce14ae19a22392955b996b42dc0e8cede6
|
e0ab026bf46ac82c91bdbd048a0f50dc5213013b
|
refs/heads/master
| 2020-12-30T12:35:59.808276
| 2017-05-16T18:57:25
| 2017-05-16T18:57:25
| 91,397,726
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,960
|
java
|
package net.sf.l2j.gameserver.handler.admincommandhandlers;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.instancemanager.AutoSpawnManager;
import net.sf.l2j.gameserver.instancemanager.AutoSpawnManager.AutoSpawnInstance;
import net.sf.l2j.gameserver.instancemanager.SevenSigns;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
/**
* Admin Command Handler for Mammon NPCs
* @author Tempy
*/
public class AdminMammon implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_mammon_find",
"admin_mammon_respawn",
};
@Override
public boolean useAdminCommand(String command, Player activeChar)
{
if (command.startsWith("admin_mammon_find"))
{
int teleportIndex = -1;
try
{
teleportIndex = Integer.parseInt(command.substring(18));
}
catch (Exception NumberFormatException)
{
activeChar.sendMessage("Usage: //mammon_find [teleportIndex] (1 / 2)");
return false;
}
if (!SevenSigns.getInstance().isSealValidationPeriod())
{
activeChar.sendMessage("The competition period is currently in effect.");
return true;
}
if (teleportIndex == 1)
{
final AutoSpawnInstance blackSpawnInst = AutoSpawnManager.getInstance().getAutoSpawnInstance(SevenSigns.MAMMON_BLACKSMITH_ID, false);
if (blackSpawnInst != null)
{
final Npc[] blackInst = blackSpawnInst.getNPCInstanceList();
if (blackInst.length > 0)
{
final int x1 = blackInst[0].getX(), y1 = blackInst[0].getY(), z1 = blackInst[0].getZ();
activeChar.sendMessage("Blacksmith of Mammon: " + x1 + " " + y1 + " " + z1);
activeChar.teleToLocation(x1, y1, z1, 0);
}
}
else
activeChar.sendMessage("Blacksmith of Mammon isn't registered.");
}
else if (teleportIndex == 2)
{
final AutoSpawnInstance merchSpawnInst = AutoSpawnManager.getInstance().getAutoSpawnInstance(SevenSigns.MAMMON_MERCHANT_ID, false);
if (merchSpawnInst != null)
{
final Npc[] merchInst = merchSpawnInst.getNPCInstanceList();
if (merchInst.length > 0)
{
final int x2 = merchInst[0].getX(), y2 = merchInst[0].getY(), z2 = merchInst[0].getZ();
activeChar.sendMessage("Merchant of Mammon: " + x2 + " " + y2 + " " + z2);
activeChar.teleToLocation(x2, y2, z2, 0);
}
}
else
activeChar.sendMessage("Merchant of Mammon isn't registered.");
}
else
activeChar.sendMessage("Invalid parameter '" + teleportIndex + "' for //mammon_find.");
}
else if (command.startsWith("admin_mammon_respawn"))
{
if (!SevenSigns.getInstance().isSealValidationPeriod())
{
activeChar.sendMessage("The competition period is currently in effect.");
return true;
}
final AutoSpawnInstance merchSpawnInst = AutoSpawnManager.getInstance().getAutoSpawnInstance(SevenSigns.MAMMON_MERCHANT_ID, false);
if (merchSpawnInst != null)
{
long merchRespawn = AutoSpawnManager.getInstance().getTimeToNextSpawn(merchSpawnInst);
activeChar.sendMessage("The Merchant of Mammon will respawn in " + (merchRespawn / 60000) + " minute(s).");
}
else
activeChar.sendMessage("Merchant of Mammon isn't registered.");
final AutoSpawnInstance blackSpawnInst = AutoSpawnManager.getInstance().getAutoSpawnInstance(SevenSigns.MAMMON_BLACKSMITH_ID, false);
if (blackSpawnInst != null)
{
long blackRespawn = AutoSpawnManager.getInstance().getTimeToNextSpawn(blackSpawnInst);
activeChar.sendMessage("The Blacksmith of Mammon will respawn in " + (blackRespawn / 60000) + " minute(s).");
}
else
activeChar.sendMessage("Blacksmith of Mammon isn't registered.");
}
return true;
}
@Override
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
}
|
[
"wande@DESKTOP-DM71DUV"
] |
wande@DESKTOP-DM71DUV
|
ef7f852bd62b4995f492208d967948b41929998b
|
99a8722d0d16e123b69e345df7aadad409649f6c
|
/jpa/deferred/src/main/java/example/repo/Customer1222Repository.java
|
4ede2a45cd9278fd2065a2735966cf7a0a41a046
|
[
"Apache-2.0"
] |
permissive
|
spring-projects/spring-data-examples
|
9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7
|
c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff
|
refs/heads/main
| 2023-09-01T14:17:56.622729
| 2023-08-22T16:51:10
| 2023-08-24T19:48:04
| 16,381,571
| 5,331
| 3,985
|
Apache-2.0
| 2023-08-25T09:02:19
| 2014-01-30T15:42:43
|
Java
|
UTF-8
|
Java
| false
| false
| 284
|
java
|
package example.repo;
import example.model.Customer1222;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface Customer1222Repository extends CrudRepository<Customer1222, Long> {
List<Customer1222> findByLastName(String lastName);
}
|
[
"ogierke@pivotal.io"
] |
ogierke@pivotal.io
|
02d50de77e2c69bec4573b8e7dc18588da021f35
|
94d91903819947c4fb2598af40cf53344304dbac
|
/wssmall_1.2.0/.svn/pristine/9a/9ad3c40818c5ad544035a146fcefae4ceba95523.svn-base
|
ec063348e676317bbaf23028e7eee03eca766a76
|
[] |
no_license
|
lichao20000/Union
|
28175725ad19733aa92134ccbfb8c30570f4795a
|
a298de70065c5193c98982dacc7c2b3e2d4b5d86
|
refs/heads/master
| 2023-03-07T16:24:58.933965
| 2021-02-22T12:34:05
| 2021-02-22T12:34:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
package params.regions.req;
import com.ztesoft.api.ApiRuleException;
import params.ZteRequest;
/**
*
* @author wui
* 省市县静态数据
*
*
*
*/
public class RegionReq extends ZteRequest {
private String region_id;
public String getRegion_id() {
return region_id;
}
public void setRegion_id(String region_id) {
this.region_id = region_id;
}
@Override
public void check() throws ApiRuleException {
// TODO Auto-generated method stub
}
@Override
public String getApiMethodName() {
// TODO Auto-generated method stub
return null;
}
}
|
[
"hxl971230.outlook.com"
] |
hxl971230.outlook.com
|
|
1beb6016212bee033fe388cc3001144986067de4
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module1594_public/tests/unittests/src/java/module1594_public_tests_unittests/a/IFoo3.java
|
3cd493f369f352482359224915f662240fd7a8ac
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 876
|
java
|
package module1594_public_tests_unittests.a;
import javax.rmi.ssl.*;
import java.awt.datatransfer.*;
import java.beans.beancontext.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public interface IFoo3<H> extends module1594_public_tests_unittests.a.IFoo2<H> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
String getName();
void setName(String s);
H get();
void set(H e);
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
530c4e0c3bee001fe7b2ffbb679f1622c6d690c7
|
bb3b21fe8105e14ae413745848a7cb23626b8d5c
|
/src/main/java/be/yildizgames/module/window/BaseWindowEngine.java
|
1f7f03a79a8fbfbd6a62d9ef01db1e3a11889eff
|
[
"MIT"
] |
permissive
|
fossabot/module-window
|
93ae1ff2fa739e49e677a976a34f1a331c8c90d0
|
a14da2b3a43267c93235d0ef59125e878e8eeaa6
|
refs/heads/master
| 2020-04-18T07:17:07.146442
| 2018-12-26T17:51:55
| 2018-12-26T17:51:55
| 167,354,671
| 0
| 0
| null | 2019-01-24T11:13:44
| 2019-01-24T11:13:43
| null |
UTF-8
|
Java
| false
| false
| 2,340
|
java
|
/*
* This file is part of the Yildiz-Engine project, licenced under the MIT License (MIT)
*
* Copyright (c) 2018 Grégory Van den Borre
*
* More infos available: https://www.yildiz-games.be
*
* 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 be.yildizgames.module.window;
import be.yildizgames.module.window.dummy.DummyWindowEngineProvider;
import be.yildizgames.module.window.input.WindowInputListener;
import java.util.ServiceLoader;
/**
* Window engine.
*
* @author Grégory Van den Borre
*/
public interface BaseWindowEngine extends WindowEngine {
/**
* Update the window wrapping the game viewports.
*/
void updateWindow();
/**
* Delete the resources used when loading the engine.
*/
void deleteLoadingResources();
/**
* @return The handle of this window.
*/
WindowHandle getHandle();
/**
* Add an input listener to retrieve input event from this window.
*
* @param listener Listener to add.
*/
void registerInput(WindowInputListener listener);
static BaseWindowEngine getEngine() {
ServiceLoader<WindowEngineProvider> provider = ServiceLoader.load(WindowEngineProvider.class);
return provider.findFirst().orElseGet(DummyWindowEngineProvider::new).getEngine();
}
}
|
[
"vandenborre.gregory@hotmail.fr"
] |
vandenborre.gregory@hotmail.fr
|
579b43969d7a50d852cfc8b9b5502720d51e959f
|
eebf046f3861f1f6e928aa1af785f45367a1cb99
|
/app/src/main/java/com/bumptech/glide/load/data/BufferedOutputStream.java
|
ec4441f63af5bed5cf65f96bafa18d7e72360e0f
|
[] |
no_license
|
AndroidTVDeveloper/TVLauncher-Sony
|
5cbff163627993f3c55ec40cdfa949cbafad2ae6
|
abe3b6fa43b006b76dcd13677cae2afd07fae108
|
refs/heads/master
| 2021-02-07T03:55:25.371409
| 2020-02-29T15:00:56
| 2020-02-29T15:00:56
| 243,980,541
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,751
|
java
|
package com.bumptech.glide.load.data;
import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool;
import java.io.IOException;
import java.io.OutputStream;
public final class BufferedOutputStream extends OutputStream {
private ArrayPool arrayPool;
private byte[] buffer;
private int index;
private final OutputStream out;
public BufferedOutputStream(OutputStream out2, ArrayPool arrayPool2) {
this(out2, arrayPool2, 65536);
}
BufferedOutputStream(OutputStream out2, ArrayPool arrayPool2, int bufferSize) {
this.out = out2;
this.arrayPool = arrayPool2;
this.buffer = (byte[]) arrayPool2.get(bufferSize, byte[].class);
}
public void write(int b) throws IOException {
byte[] bArr = this.buffer;
int i = this.index;
this.index = i + 1;
bArr[i] = (byte) b;
maybeFlushBuffer();
}
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
public void write(byte[] b, int initialOffset, int length) throws IOException {
int writtenSoFar = 0;
do {
int remainingToWrite = length - writtenSoFar;
int currentOffset = initialOffset + writtenSoFar;
if (this.index != 0 || remainingToWrite < this.buffer.length) {
int totalBytesToWriteToBuffer = Math.min(remainingToWrite, this.buffer.length - this.index);
System.arraycopy(b, currentOffset, this.buffer, this.index, totalBytesToWriteToBuffer);
this.index += totalBytesToWriteToBuffer;
writtenSoFar += totalBytesToWriteToBuffer;
maybeFlushBuffer();
} else {
this.out.write(b, currentOffset, remainingToWrite);
return;
}
} while (writtenSoFar < length);
}
public void flush() throws IOException {
flushBuffer();
this.out.flush();
}
private void flushBuffer() throws IOException {
int i = this.index;
if (i > 0) {
this.out.write(this.buffer, 0, i);
this.index = 0;
}
}
private void maybeFlushBuffer() throws IOException {
if (this.index == this.buffer.length) {
flushBuffer();
}
}
/* JADX INFO: finally extract failed */
public void close() throws IOException {
try {
flush();
this.out.close();
release();
} catch (Throwable th) {
this.out.close();
throw th;
}
}
private void release() {
byte[] bArr = this.buffer;
if (bArr != null) {
this.arrayPool.put(bArr);
this.buffer = null;
}
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
7b7755e891ca1ba68489c1a491a5e0c0257b9638
|
82be361ba40d06e2b797908a11a695ce3c631ca8
|
/docs/thay_tung/org/apache/ojb/broker/util/GUID.java
|
5cad813f5519925f431534a6b6b888aba9b613a5
|
[] |
no_license
|
phamtuanchip/ch-cnttk2
|
ac01dfded36d7216a616c40e7eb432a2fd1f6bc5
|
3b67c28b8b7b1d58071d5c2305c6be36fce9ac9a
|
refs/heads/master
| 2021-01-16T18:30:34.161841
| 2017-01-21T14:46:05
| 2017-01-21T14:46:05
| 32,536,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,711
|
java
|
package org.apache.ojb.broker.util;
/* Copyright 2002-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.Serializable;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.rmi.server.UID;
/**
* simple GUID (Globally Unique ID) implementation.
* A GUID is composed of two parts:
* 1. The IP-Address of the local machine.
* 2. A java.rmi.server.UID
*
* @author Thomas Mahler
* @version $Id: GUID.java,v 1.7.2.1 2005/12/21 22:27:47 tomdz Exp $
*/
public class GUID implements Serializable
{
static final long serialVersionUID = -6163239155380515945L; /**
* holds the hostname of the local machine.
*/
private static String localIPAddress;
/**
* String representation of the GUID
*/
private String guid;
/**
* compute the local IP-Address
*/
static
{
try
{
localIPAddress = InetAddress.getLocalHost().getHostAddress();
}
catch (UnknownHostException e)
{
localIPAddress = "localhost";
}
}
/**
* public no args constructor.
*/
public GUID()
{
UID uid = new UID();
StringBuffer buf = new StringBuffer();
buf.append(localIPAddress);
buf.append(":");
buf.append(uid.toString());
guid = buf.toString();
}
/**
* public constructor.
* The caller is responsible to feed a globally unique
* String into the theGuidString parameter
* @param theGuidString a globally unique String
*/
public GUID(String theGuidString)
{
guid = theGuidString;
}
/**
* returns the String representation of the GUID
*/
public String toString()
{
return guid;
}
/**
* @see java.lang.Object#equals(Object)
*/
public boolean equals(Object obj)
{
if (obj instanceof GUID)
{
if (guid.equals(((GUID) obj).guid))
{
return true;
}
}
return false;
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
return guid.hashCode();
}
}
|
[
"phamtuanchip@gmail.com"
] |
phamtuanchip@gmail.com
|
23322d2d85efa27e854d987bffb8ccc14ae2d07d
|
41e407fbce3e10ddd61217c3acbaf04ade3294b0
|
/jOOQ/src/main/java/org/jooq/MergeNotMatchedValuesStep14.java
|
23eb97395e91baa4fdce3fe225000782573456c1
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
pierrecarre/jOOQ-jdk5
|
ad65b1eb77e89924cf6f5cad5e346440e1bc67ad
|
ce46c54fff7ebf4753c37c120c5d64b4d35f9690
|
refs/heads/master
| 2021-01-21T09:50:02.647487
| 2014-01-22T16:44:38
| 2014-01-22T16:44:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,846
|
java
|
/**
* Copyright (c) 2009-2013, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.0:
* -----------------------------------------------------------------------------
* 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.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq;
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.HSQLDB;
// ...
// ...
// ...
import java.util.Collection;
import javax.annotation.Generated;
/**
* This type is used for the {@link Merge}'s DSL API.
* <p>
* Example: <code><pre>
* DSLContext create = DSL.using(configuration);
*
* create.mergeInto(table)
* .using(select)
* .on(condition)
* .whenMatchedThenUpdate()
* .set(field1, value1)
* .set(field2, value2)
* .whenNotMatchedThenInsert(field1, field2)
* .values(value1, value2)
* .execute();
* </pre></code>
*
* @author Lukas Eder
*/
@Generated("This class was generated using jOOQ-tools")
public interface MergeNotMatchedValuesStep14<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> {
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@Support({ CUBRID, HSQLDB })
MergeNotMatchedWhereStep<R> values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14);
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@Support({ CUBRID, HSQLDB })
MergeNotMatchedWhereStep<R> 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, Field<T12> value12, Field<T13> value13, Field<T14> value14);
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@Support({ CUBRID, HSQLDB })
MergeNotMatchedWhereStep<R> values(Collection<?> values);
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
90d5e17d54d36f23b46ba9f6d0be396cc748e871
|
c94f888541c0c430331110818ed7f3d6b27b788a
|
/baasdt/java/src/main/java/com/antgroup/antchain/openapi/baasdt/models/ListIpCodeserviceproviderResponse.java
|
8bc46b043dffde9eb1df8db31519a2096c995221
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
alipay/antchain-openapi-prod-sdk
|
48534eb78878bd708a0c05f2fe280ba9c41d09ad
|
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
|
refs/heads/master
| 2023-09-03T07:12:04.166131
| 2023-09-01T08:56:15
| 2023-09-01T08:56:15
| 275,521,177
| 9
| 10
|
MIT
| 2021-03-25T02:35:20
| 2020-06-28T06:22:14
|
PHP
|
UTF-8
|
Java
| false
| false
| 1,860
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.baasdt.models;
import com.aliyun.tea.*;
public class ListIpCodeserviceproviderResponse extends TeaModel {
// 请求唯一ID,用于链路跟踪和问题排查
@NameInMap("req_msg_id")
public String reqMsgId;
// 结果码,一般OK表示调用成功
@NameInMap("result_code")
public String resultCode;
// 异常信息的文本描述
@NameInMap("result_msg")
public String resultMsg;
// 服务商列表
@NameInMap("service_provider_list")
public java.util.List<ServiceProvider> serviceProviderList;
public static ListIpCodeserviceproviderResponse build(java.util.Map<String, ?> map) throws Exception {
ListIpCodeserviceproviderResponse self = new ListIpCodeserviceproviderResponse();
return TeaModel.build(map, self);
}
public ListIpCodeserviceproviderResponse setReqMsgId(String reqMsgId) {
this.reqMsgId = reqMsgId;
return this;
}
public String getReqMsgId() {
return this.reqMsgId;
}
public ListIpCodeserviceproviderResponse setResultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
public String getResultCode() {
return this.resultCode;
}
public ListIpCodeserviceproviderResponse setResultMsg(String resultMsg) {
this.resultMsg = resultMsg;
return this;
}
public String getResultMsg() {
return this.resultMsg;
}
public ListIpCodeserviceproviderResponse setServiceProviderList(java.util.List<ServiceProvider> serviceProviderList) {
this.serviceProviderList = serviceProviderList;
return this;
}
public java.util.List<ServiceProvider> getServiceProviderList() {
return this.serviceProviderList;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
dc1dfaeda01ee029bda12abff13cc590747f4f86
|
3bcaebf7d69eaab5e4086568440b2ca56219b50d
|
/src/main/java/com/tinyolo/cxml/parsing/demo/jaxb/fulfill/XadesOCSPRefs.java
|
afd206ca3f67cfc8d26ae735151497a4524b4bbf
|
[] |
no_license
|
augustine-d-nguyen/cxml-parsing-demo
|
2a419263b091b32e70fa84312b55d8217e691ac6
|
3cc169ee0392d88bbf0e03f0791a15287a8eba97
|
refs/heads/master
| 2023-01-18T19:07:27.094598
| 2020-11-20T14:52:52
| 2020-11-20T14:52:52
| 314,490,660
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,811
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.11.20 at 08:08:13 PM ICT
//
package com.tinyolo.cxml.parsing.demo.jaxb.fulfill;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"xadesOCSPRef"
})
@XmlRootElement(name = "xades:OCSPRefs")
public class XadesOCSPRefs {
@XmlElement(name = "xades:OCSPRef", required = true)
protected List<XadesOCSPRef> xadesOCSPRef;
/**
* Gets the value of the xadesOCSPRef 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 xadesOCSPRef property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getXadesOCSPRef().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link XadesOCSPRef }
*
*
*/
public List<XadesOCSPRef> getXadesOCSPRef() {
if (xadesOCSPRef == null) {
xadesOCSPRef = new ArrayList<XadesOCSPRef>();
}
return this.xadesOCSPRef;
}
}
|
[
"augustine.d.nguyen@outlook.com"
] |
augustine.d.nguyen@outlook.com
|
9908fe4d45be2e4861de369e35b1505f763ef1ea
|
dd2fc4f75ddc5989e404b32eb553ae474f25aad9
|
/test/src/main/java/com/test/PropertiesFileFilter.java
|
3172f6aae76f1a3b8fb2c53e798f00161b557ca3
|
[] |
no_license
|
orangeevan/qx
|
792ad4a43e6a190f28920931ac9c769cf84a9588
|
d67262ab3733151a732151d1e0d7a745683ca15f
|
refs/heads/master
| 2023-06-04T03:38:27.332823
| 2021-06-28T06:23:25
| 2021-06-28T06:23:25
| 380,889,825
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 321
|
java
|
package com.test;
import java.io.File;
import java.io.FileFilter;
/**
* @author: yuen.cy
* @description:
* @since 10:24 2021/6/25
*/
public class PropertiesFileFilter implements FileFilter {
@Override
public boolean accept(File pathname) {
return pathname.getName().contains("properties");
}
}
|
[
"494926093@qq.com"
] |
494926093@qq.com
|
61fb8b10d894871e4eb52548e371159aeb723c9d
|
917ad7031dbdf555ea82e05d0d70f29c64a44a6f
|
/곽병문/homework/java_homework/homework09/ListMain.java
|
d5c6e0b3c109b7c0885c7282dc2fadd32093602f
|
[] |
no_license
|
qrtz7950/bit
|
9bd001e224ed1cfd649a24768e594b6230e87529
|
42d2c8a62aa4f273d66497bb6538c3b84a2f44b7
|
refs/heads/master
| 2020-03-22T04:40:24.844031
| 2018-10-18T04:18:24
| 2018-10-18T04:18:24
| 139,512,969
| 1
| 2
| null | 2018-07-03T03:49:07
| 2018-07-03T01:32:48
| null |
UHC
|
Java
| false
| false
| 1,504
|
java
|
package kr.co.mlec.homework.homework09;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class ListMain {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
List<String> id = new ArrayList<String>();
List<String> pw = new ArrayList<String>();
id.add("aaa");
pw.add("1111");
id.add("bbb");
pw.add("2222");
id.add("ccc");
pw.add("3333");
System.out.println("패스워드 변경서비스입니다");
System.out.print("아이디를 입력하세요 : ");
String iid = s.nextLine();
if(!id.contains(iid)) {
System.out.println("입력하신 아이다[" + iid + "]는 존재하지 않습니다.");
System.out.println("서비스를 종료합니다");
System.exit(0);
}
System.out.print("현재 패스워드를 입력하세요 : ");
String ppw = s.nextLine();
String str = pw.get(id.indexOf(iid));
if(!str.equals(ppw)) {
System.out.println("입력하신 비밀번호가 틀렸습니다.");
System.out.println("서비스를 종료합니다");
System.exit(0);
}
System.out.print("변경할 패스워드를 입력하세요 : ");
ppw = s.nextLine();
pw.remove(id.indexOf(iid));
pw.add(id.indexOf(iid),ppw);
System.out.println("패스워드가 수정되었습니다.");
System.out.println("< 회원 목록 출력 >");
for(int i=0; i<id.size(); i++) {
System.out.println("ID : " + id.get(i) + ", PassWord : " + pw.get(i));
}
s.close();
}
}
|
[
"bmkwak22@gmail.com"
] |
bmkwak22@gmail.com
|
59d8a9ea393fa99c1cbc11455d2d8a40a699d5ab
|
77fb90c41fd2844cc4350400d786df99e14fa4ca
|
/f/g/org/org/util/Preconditions.java
|
834ea855f908babe99e7213d2e86e76ccd0e09cd
|
[] |
no_license
|
highnes7/umaang_decompiled
|
341193b25351188d69b4413ebe7f0cde6525c8fb
|
bcfd90dffe81db012599278928cdcc6207632c56
|
refs/heads/master
| 2020-06-19T07:47:18.630455
| 2019-07-12T17:16:13
| 2019-07-12T17:16:13
| 196,615,053
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,853
|
java
|
package f.g.org.org.util;
public final class Preconditions
{
public Preconditions() {}
public static Object append(Object paramObject)
{
if (paramObject != null) {
return paramObject;
}
throw new NullPointerException();
}
public static void checkArgument(boolean paramBoolean)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.append(paramBoolean);
}
public static void checkArgument(boolean paramBoolean, Object paramObject)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkArgument(paramBoolean, paramObject);
}
public static void checkArgument(boolean paramBoolean, String paramString, Object... paramVarArgs)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkArgument(paramBoolean, paramString, paramVarArgs);
}
public static Object checkNotNull(Object paramObject1, Object paramObject2)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkNotNull(paramObject1, paramObject2);
return paramObject1;
}
public static Object checkNotNull(Object paramObject, String paramString, Object... paramVarArgs)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkNotNull(paramObject, paramString, paramVarArgs);
return paramObject;
}
public static void checkState(boolean paramBoolean)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.set(paramBoolean);
}
public static void checkState(boolean paramBoolean, Object paramObject)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkState(paramBoolean, paramObject);
}
public static void checkState(boolean paramBoolean, String paramString, Object... paramVarArgs)
{
f.g.org.org.codehaus.libs.objectweb.asm.asm.Preconditions.checkState(paramBoolean, paramString, paramVarArgs);
}
}
|
[
"highnes.7@gmail.com"
] |
highnes.7@gmail.com
|
e0d3c0ee250bb503ecc0417179f6857e6caa744f
|
d3ea6608d81ddc8e1b51f42b7fbec5e6fa1914b6
|
/kie-wb-common-stunner/kie-wb-common-stunner-core/kie-wb-common-stunner-commons/kie-wb-common-stunner-core-common/src/main/java/org/kie/workbench/common/stunner/core/rule/impl/violations/CardinalityMinRuleViolation.java
|
9cbd0b0268faa605181e44d53802317a18c3b66a
|
[
"Apache-2.0"
] |
permissive
|
Princeon/kie-wb-common
|
63a781e62cd5257d4fde065d68041de5825b35de
|
865fc3a0c34577a9bca895dc230bbe28f4eead38
|
refs/heads/master
| 2021-01-11T00:04:13.063827
| 2016-10-12T15:08:54
| 2016-10-12T15:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,575
|
java
|
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.workbench.common.stunner.core.rule.impl.violations;
import org.jboss.errai.common.client.api.annotations.MapsTo;
import org.jboss.errai.common.client.api.annotations.Portable;
@Portable
public class CardinalityMinRuleViolation extends AbstractCardinalityRuleViolation {
public CardinalityMinRuleViolation( @MapsTo( "target" ) String target,
@MapsTo( "candidate" ) String candidate,
@MapsTo( "restrictedOccurrences" ) Integer restrictedOccurrences,
@MapsTo( "currentOccurrences" ) Integer currentOccurrences ) {
super( target, candidate, restrictedOccurrences, currentOccurrences );
}
@Override
public String getMessage() {
return " Labels ['" + target + "'] require a minimum '" + restrictedOccurrences + "' of '" + candidate + "' roles. Found '" + currentOccurrences + "'.";
}
}
|
[
"manstis@users.noreply.github.com"
] |
manstis@users.noreply.github.com
|
e68e799d27277245d6ea0da5075fcd2cfb47797c
|
9233d3bebc35d34e9e772b955e7349acc1a1499d
|
/src/core/ipc/repeatServer/processors/SystemRequestProcessor.java
|
a09259e842b5b8bf5065cc046d9697f8f30e6996
|
[
"Apache-2.0"
] |
permissive
|
repeats/Repeat
|
6ea2f8b33e4b66604638a10c2a7152f7adb7b268
|
6e91d22d38b79a7321e42446348c6206a548b950
|
refs/heads/master
| 2023-09-05T21:06:06.617333
| 2023-06-18T18:16:18
| 2023-06-18T18:16:18
| 67,899,304
| 1,047
| 83
|
Apache-2.0
| 2020-07-08T03:57:46
| 2016-09-10T23:19:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,070
|
java
|
package core.ipc.repeatServer.processors;
import java.util.List;
import argo.jdom.JsonNode;
import core.ipc.repeatServer.MainMessageSender;
/**
* This class represents the message processor for any system action.
*
* A received message from the lower layer (central processor) will have the following JSON contents:
* {
* "device": must be 'system',
* "action": action depending on the type parsed by lower layer,
* "parameters": parameters for this action
* }
*
* The possible actions for system_host are:
* 1) Keep alive : keep this connection alive. If this is not received frequently, the system will terminate connection to client
*
* The possible actions for system client are:
* 1) identify(name) : identify the client system as the remote compiler for a certain language.
*
* @author HP Truong
*
*/
public class SystemRequestProcessor extends AbstractMessageProcessor {
private final ServerMainProcessor holder;
protected SystemRequestProcessor(MainMessageSender messageSender, ServerMainProcessor holder) {
super(messageSender);
this.holder = holder;
}
@Override
public boolean process(String type, long id, JsonNode content) {
if (!verifyMessageContent(content)) {
getLogger().warning("Error in verifying message content " + content);
return false;
}
String device = content.getStringValue("device");
String action = content.getStringValue("action");
List<JsonNode> paramNodes = content.getArrayNode("parameters"); // Unused
if (IpcMessageType.identify(type) == IpcMessageType.SYSTEM_HOST) {
if (action.equals("keep_alive")) {
return success(type, id);
}
} else if (IpcMessageType.identify(type) == IpcMessageType.SYSTEM_CLIENT) {
if (action.equals("identify")) {
if (paramNodes.size() != 2) {
getLogger().warning("Unexpected identity to have " + paramNodes.size() + " parameters.");
return false;
}
String name;
JsonNode nameNode = paramNodes.get(0);
if (!nameNode.isStringValue()) {
getLogger().warning("Identity must be a string.");
return false;
}
int port;
JsonNode portNode = paramNodes.get(1);
if (!portNode.isStringValue()) {
getLogger().warning("Port number must be a parsable string.");
return false;
} else {
try {
port = Integer.parseInt(portNode.getStringValue());
} catch (NumberFormatException e) {
getLogger().warning("Port number must be a number.");
return false;
}
}
name = nameNode.getStringValue();
boolean identified = TaskProcessorManager.identifyProcessor(name, port, holder.getTaskProcessor());
holder.setLocalClientProcessor(identified);
return success(type, id);
}
}
getLogger().warning("Unsupported operation [" + device + ", " + action + "]");
return false;
}
@Override
protected boolean verifyMessageContent(JsonNode content) {
return content.isStringValue("device") &&
content.getStringValue("device").startsWith("system") &&
content.isStringValue("action") &&
content.isArrayNode("parameters");
}
}
|
[
"hptruong93@gmail.com"
] |
hptruong93@gmail.com
|
6529e609dbeff6d5adf635c6b9d86a7a01df8d76
|
1d632f13be2f4105db473cb38e65da1d3629f1c5
|
/app/src/main/java/com/shiwaixiangcun/customer/ui/MainActivity.java
|
ff7aac530cca48cf26a242522bbdf8559c9d0ebc
|
[] |
no_license
|
dengjiaping/swxc_customer
|
cbcaeeb684e23b0b373a300b84e450110b93c546
|
9130fa79cb4ec82bae7c1d4848ad7d4707cf1ba3
|
refs/heads/master
| 2021-08-14T16:18:52.302545
| 2017-11-16T06:03:45
| 2017-11-16T06:03:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 415
|
java
|
package com.shiwaixiangcun.customer.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.shiwaixiangcun.customer.R;
/**
* @author Administrator
*/
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"827938508@qq.com"
] |
827938508@qq.com
|
fc535248f97cbba1afe6b40faff881c337057c96
|
7c46a44f1930b7817fb6d26223a78785e1b4d779
|
/soap/src/java/com/zimbra/soap/admin/message/GetCosRequest.java
|
7bf687a4a8bd8d6b8fa2d8a4506c3160d40ca670
|
[] |
no_license
|
Zimbra/zm-mailbox
|
20355a191c7174b1eb74461a6400b0329907fb02
|
8ef6538e789391813b65d3420097f43fbd2e2bf3
|
refs/heads/develop
| 2023-07-20T15:07:30.305312
| 2023-07-03T06:44:00
| 2023-07-06T10:09:53
| 85,609,847
| 67
| 128
| null | 2023-09-14T10:12:10
| 2017-03-20T18:07:01
|
Java
|
UTF-8
|
Java
| false
| false
| 1,804
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012, 2013, 2014, 2016 Synacor, Inc.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software Foundation,
* version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.soap.admin.message;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.zimbra.common.soap.AdminConstants;
import com.zimbra.soap.type.AttributeSelectorImpl;
import com.zimbra.soap.admin.type.CosSelector;
/**
* @zm-api-command-auth-required true
* @zm-api-command-admin-auth-required true
* @zm-api-command-description Get Class Of Service (COS)
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name=AdminConstants.E_GET_COS_REQUEST)
public class GetCosRequest extends AttributeSelectorImpl {
/**
* @zm-api-field-description COS
*/
@XmlElement(name=AdminConstants.E_COS)
private CosSelector cos;
public GetCosRequest() {
}
public GetCosRequest(CosSelector cos) {
this.cos = cos;
}
public void setCos(CosSelector cos) {
this.cos = cos;
}
public CosSelector getCos() { return cos; }
}
|
[
"shriram.vishwanathan@synacor.com"
] |
shriram.vishwanathan@synacor.com
|
abc33b2a7b8899fd8b15c2c9812d90f7beae4a3b
|
a0b3e77790630ac4de591c9105e2b1d4e3bd9c8f
|
/jrap-core/src/main/java/com/jingrui/jrap/attachment/impl/DefaultContentTypeFilter.java
|
eda2c95e91b0f981935cc3872c1563b3aed6124f
|
[] |
no_license
|
IvanStephenYuan/JRAP_Lease
|
799c0b1a88fecb0b7d4b9ab73f8da9b47ce19fdb
|
4b4b08d4c23e9181718374eb77676095d3a298dc
|
refs/heads/master
| 2022-12-23T07:54:57.213203
| 2019-06-11T07:43:48
| 2019-06-11T07:43:48
| 174,286,707
| 3
| 5
| null | 2022-12-16T09:43:59
| 2019-03-07T06:39:02
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,094
|
java
|
/*
* #{copyright}#
*/
package com.jingrui.jrap.attachment.impl;
import java.util.HashMap;
import java.util.Map;
import com.jingrui.jrap.attachment.ContentTypeFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 默认的文件过滤器.
*
* @author xiaohua
*
*/
public class DefaultContentTypeFilter implements ContentTypeFilter {
private Map<String, String> extMaps = new HashMap<>();
private Logger logger = LoggerFactory.getLogger(getClass());
public DefaultContentTypeFilter() {
init();
}
private void init() {
// image
extMaps.put("png", "image/png");
extMaps.put("gif", "image/gif");
extMaps.put("bmp", "image/bmp");
extMaps.put("ico", "image/x-ico");
extMaps.put("jpeg", "image/jpeg");
extMaps.put("jpg", "image/jpeg");
// 压缩文件
extMaps.put("zip", "application/zip");
extMaps.put("rar", "application/x-rar");
// doc
extMaps.put("pdf", "application/pdf");
extMaps.put("ppt", "application/vnd.ms-powerpoint");
extMaps.put("xls", "application/vnd.ms-excel");
extMaps.put("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
extMaps.put("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
extMaps.put("doc", "application/msword");
extMaps.put("doc", "application/wps-office.doc");
extMaps.put("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
extMaps.put("txt", "text/plain");
// 视频
extMaps.put("mp4", "video/mp4");
extMaps.put("flv", "video/x-flv");
}
public boolean isAccept(String orginalName, String contentType) {
String ext = null;
try {
ext = orginalName.substring(orginalName.lastIndexOf('.') + 1);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return extMaps.get(ext) != null
&& extMaps.get(ext).equals(contentType);
}
}
|
[
"Ivan.Stphen.Y@gmail.com"
] |
Ivan.Stphen.Y@gmail.com
|
09d1a493eec71bc03ea0ff65f0cadb0384283621
|
8f4f48fc4a5276d38b0fc654c149d929f9a91527
|
/app/src/main/java/com/scmsw/kingofactivity/view/UpdateMoneyDialog.java
|
b60b0a7ba6fb4f5579d98f00071174374ca5b431
|
[] |
no_license
|
oldwangdeview/kingofactivity
|
ce8d9d02aa9c9a28080a17ef01768ddb3b7024c8
|
cd4e3eeba176a5a441428528b3b0bef8b9a192ab
|
refs/heads/master
| 2020-06-07T18:29:08.510564
| 2019-06-21T09:37:28
| 2019-06-21T09:37:28
| 193,071,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,143
|
java
|
package com.scmsw.kingofactivity.view;
import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.scmsw.kingofactivity.R;
import com.scmsw.kingofactivity.interfice.UpdateMoney_DIalog_ClickLister;
import com.scmsw.kingofactivity.util.UIUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 任务详情修改PK金
*/
public class UpdateMoneyDialog extends Dialog {
/**
* 绑定Dialog标签
*/
private Object tag;
public interface OnRightClickListener {
void onRightClick(Object args);
}
public Object getTag() {
return tag;
}
public void setTag(Object tag) {
this.tag = tag;
}
/**
* 设置弹框默认风格
*/
private UpdateMoneyDialog(@NonNull Context context) {
super(context, R.style.tipsDialogStyle);
}
public UpdateMoneyDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
}
public TipsDialog setContent(String newContent) {
TipsDialog.Builder builder = (TipsDialog.Builder) getTag();
return builder.setContentView(newContent).build();
}
/**
* 创建Dialog
*
* @author fengzhen
* @version v1.0, 2018/3/29
*/
public static class Builder {
@BindView(R.id.btn_right_dialog_ok)
Button right_btn;
@BindView(R.id.input_editext)
EditText input_text;
private UpdateMoneyDialog dialog;
private View layout;
UpdateMoney_DIalog_ClickLister mlister;
private Context mContext;
public Builder(@NonNull Context context) {
this.mContext = context;
dialog = new UpdateMoneyDialog(context);
dialog.setTag(this);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layout = inflater.inflate(R.layout.dialog_updatemoney, null);
dialog.addContentView(layout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
ButterKnife.bind(this, layout);
}
public UpdateMoneyDialog build() {
right_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(mlister!=null){
String data = input_text.getText().toString().trim();
mlister.click(v,data,0,"");
}
}
});
dialog.setContentView(layout);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(false);
return dialog;
}
public Builder setcliklistrer(UpdateMoney_DIalog_ClickLister mlister){
this.mlister = mlister;
return this;
}
}
}
|
[
"yanke@siankeji.com"
] |
yanke@siankeji.com
|
ed74852f3e42c55d780b54a8f4863df1604e7a5a
|
8e0026111d2b8fa50f89d9d0750ecbba4baa0f49
|
/ieee.odm.test/src/org/ieee/odm/bpa/BPA07C_Test.java
|
c96a0fad22c3e964aa9b35630d0c4c7f9b589429
|
[] |
no_license
|
InterPSS-Project/ipss-odm
|
27204514189976bd1b4d0e920537cb5a5abf2f0e
|
147f209e7e106aca908ed916ff9b9f393c525fe1
|
refs/heads/master
| 2022-11-03T23:54:16.005750
| 2022-10-28T23:48:50
| 2022-10-28T23:48:50
| 11,950,747
| 3
| 7
| null | 2018-06-09T02:41:44
| 2013-08-07T13:36:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,627
|
java
|
/*
* @(#)IEEECDF_ODMTest.java
*
* Copyright (C) 2008 www.interpss.org
*
* This program 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 program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* @Author Mike Zhou
* @Version 1.0
* @Date 02/01/2008
*
* Revision History
* ================
*
*/
package org.ieee.odm.bpa;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileOutputStream;
import org.ieee.odm.adapter.IODMAdapter;
import org.ieee.odm.adapter.bpa.BPAAdapter;
import org.ieee.odm.adapter.psse.PSSEAdapter;
import org.ieee.odm.model.aclf.AclfModelParser;
import org.junit.Test;
public class BPA07C_Test {
@Test
public void bpaTestCase() throws Exception {
IODMAdapter adapter = new BPAAdapter();
// IODMAdapter adapter =new PSSEV30Adapter();
assertTrue(adapter.parseInputFile("testdata/bpa/07c-dc2load.dat"));
AclfModelParser parser = (AclfModelParser)adapter.getModel();
// parser.stdout();
String xml=parser.toXmlDoc();
FileOutputStream out=new FileOutputStream(new File("07c_BPA_ODM_0607.xml"));
out.write(xml.getBytes());
out.flush();
out.close();
}
}
|
[
"mike@interpss.org"
] |
mike@interpss.org
|
9d52709dd4132ae630895cde3afc2c34b1c27475
|
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
|
/modules/activiti-engine/src/test/java/org/activiti/engine/test/pvm/activities/While.java
|
b3ef2bc641686ea715e84be2db520cd701f2e18a
|
[] |
no_license
|
jpjyxy/Activiti-activiti-5.16.4
|
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
|
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
|
refs/heads/master
| 2022-12-24T14:51:08.868694
| 2017-04-14T14:05:00
| 2017-04-14T14:05:00
| 191,682,921
| 0
| 0
| null | 2022-12-16T04:24:04
| 2019-06-13T03:15:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,941
|
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.
*/
package org.activiti.engine.test.pvm.activities;
import org.activiti.engine.impl.pvm.PvmTransition;
import org.activiti.engine.impl.pvm.delegate.ActivityBehavior;
import org.activiti.engine.impl.pvm.delegate.ActivityExecution;
/**
* @author Tom Baeyens
*/
public class While implements ActivityBehavior
{
String variableName;
int from;
int to;
public While(String variableName, int from, int to)
{
this.variableName = variableName;
this.from = from;
this.to = to;
}
public void execute(ActivityExecution execution)
throws Exception
{
PvmTransition more = execution.getActivity().findOutgoingTransition("more");
PvmTransition done = execution.getActivity().findOutgoingTransition("done");
Integer value = (Integer)execution.getVariable(variableName);
if (value == null)
{
execution.setVariable(variableName, from);
execution.take(more);
}
else
{
value = value + 1;
if (value < to)
{
execution.setVariable(variableName, value);
execution.take(more);
}
else
{
execution.take(done);
}
}
}
}
|
[
"905280842@qq.com"
] |
905280842@qq.com
|
d0508acd865724f000625aa530384fa8385c7225
|
d34cc4c5d65f4b20b1948250ef392f8ad12ae8ab
|
/pingoygou-parent/pinyougou-manager-web/src/main/java/com/pinyougou/Controller/GoodsController.java
|
5b523b20666583785206d32c0e18cc56c0f89f68
|
[] |
no_license
|
emperwang/MyDianShang
|
adb9eb5b7d889243cd934f1473d8562baf04c6c1
|
33bd55e747c926ff2b1c9bc920d69fa0742b205c
|
refs/heads/master
| 2022-06-23T11:56:44.690920
| 2019-06-07T04:55:48
| 2019-06-07T04:55:48
| 159,009,246
| 1
| 0
| null | 2022-06-21T01:08:40
| 2018-11-25T07:42:44
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,395
|
java
|
package com.pinyougou.Controller;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.pinyougou.service.GoodsService;
import com.pinyougou.viewEntity.GoodsView;
import com.pinyougou.viewEntity.PageResult;
import com.pinyougou.viewEntity.Result;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.dubbo.config.annotation.Reference;
import com.pinyougou.pojo.TbGoods;
/**
* controller
* @author Administrator
*
*/
@RestController
@RequestMapping("/goods")
public class GoodsController {
@Reference
private GoodsService goodsService;
/**
* 返回全部列表
* @return
*/
@RequestMapping("/findAll.do")
public List<TbGoods> findAll(){
return goodsService.findAll();
}
/**
* 返回全部列表
* @return
*/
@RequestMapping("/findPage.do")
public PageResult findPage(int page, int rows){
return goodsService.findPage(page, rows);
}
/**
* 增加
* @param string
* @return
*/
@RequestMapping("/add.do")
public Result add(@RequestBody String string){
GoodsView goods = JSON.parseObject(string, GoodsView.class);
//获取当前登陆的用户
String sellerId = SecurityContextHolder.getContext().getAuthentication().getName();
goods.getGoods().setSellerId(sellerId);
try {
goodsService.add(goods);
return new Result(true, "增加成功");
} catch (Exception e) {
e.printStackTrace();
return new Result(false, "增加失败");
}
}
/**
* 修改
* @param goods
* @return
*/
@RequestMapping("/update.do")
public Result update(@RequestBody String goods){
GoodsView goodsView = JSON.parseObject(goods, GoodsView.class);
//获取当前登陆的用户
String sellerId = SecurityContextHolder.getContext().getAuthentication().getName();
//判断操作的商品是否是当前用户的
if (!sellerId.equals(goodsView.getGoods().getSellerId())){
return new Result(false, "非法操作");
}
try {
goodsService.update(goodsView);
return new Result(true, "修改成功");
} catch (Exception e) {
e.printStackTrace();
return new Result(false, "修改失败");
}
}
/**
* 获取实体
* @param id
* @return
*/
@RequestMapping("/findOne.do")
public GoodsView findOne(Long id){
return goodsService.findOne(id);
}
/**
* 批量删除
* @param ids
* @return
*/
@RequestMapping("/delete.do")
public Result delete(Long [] ids){
try {
goodsService.delete(ids);
return new Result(true, "删除成功");
} catch (Exception e) {
e.printStackTrace();
return new Result(false, "删除失败");
}
}
/**
* 查询+分页
* @param
* @param page
* @param rows
* @return
*/
@RequestMapping("/search.do")
public PageResult search(@RequestBody TbGoods goods, int page, int rows ){
return goodsService.findPage(goods, page, rows);
}
/**
* 更新goods的审核状态
* @param ids
* @param status
* @return
*/
@RequestMapping("/updateGoodsStatus.do")
public Result updateGoodsStatus(Long[] ids,String status){
try {
goodsService.updateGoodsStatus(ids,status);
return new Result(true,"更新成功");
}catch (Exception e){
return new Result(false,"更新失败");
}
}
}
|
[
"544094478@qq.com"
] |
544094478@qq.com
|
6134e464a5beb93e81e4c1d7398665bb62b441f3
|
354f9bb6cba05fe1837f4409a5c3b41ecd443791
|
/testprograms/gello-compilersource/Compiler/src/org/gello/grammar/node/TElse.java
|
009d85b018e46b01314f2b565162d5cc3375f60e
|
[] |
no_license
|
ingoha/pwdt-ss10
|
915fe8279657a4f7e0de6750fded85d3a0165a12
|
fb40efa326cdda9051a28a09ce55b4d531e72813
|
refs/heads/master
| 2016-08-07T10:22:31.482185
| 2010-06-24T08:18:52
| 2010-06-24T08:18:52
| 32,255,798
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.gello.grammar.node;
import org.gello.grammar.analysis.*;
@SuppressWarnings("nls")
public final class TElse extends Token
{
public TElse()
{
super.setText("else");
}
public TElse(int line, int pos)
{
super.setText("else");
setLine(line);
setPos(pos);
}
@Override
public Object clone()
{
return new TElse(getLine(), getPos());
}
public void apply(Switch sw)
{
((Analysis) sw).caseTElse(this);
}
@Override
public void setText(@SuppressWarnings("unused") String text)
{
throw new RuntimeException("Cannot change TElse text.");
}
}
|
[
"ingoha@users.noreply.github.com"
] |
ingoha@users.noreply.github.com
|
e16e6442074973d937158c7e4fbd54cd0a81cd87
|
4ffe52e64a313d9938616d48f95abbe7cfa82af8
|
/app/src/main/java/com/Euspacetech/bakery/model/Billing_Details.java
|
49c90479e0163e12f2b14b0a83667d208b83f097
|
[] |
no_license
|
AkashInkar/Bakery
|
7a66fbb0ed416b378a396357425d25ddfe1b7514
|
5eef578f6028804da905f7c982cfc407eb0b4e70
|
refs/heads/master
| 2020-05-02T12:08:55.875080
| 2019-03-28T06:12:31
| 2019-03-28T06:12:31
| 177,951,271
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,771
|
java
|
package com.Euspacetech.bakery.model;
public class Billing_Details {
public String b_id;
public String shop_id;
public String order_no;
public String item_name;
public String item_count;
public String total_items;
public String grand_total;
public String created_at;
public Billing_Details(String order_no, String item_name, String item_count) {
this.order_no = order_no;
this.item_name = item_name;
this.item_count = item_count;
}
public String getB_id() {
return b_id;
}
public void setB_id(String b_id) {
this.b_id = b_id;
}
public String getShop_id() {
return shop_id;
}
public void setShop_id(String shop_id) {
this.shop_id = shop_id;
}
public String getOrder_no() {
return order_no;
}
public void setOrder_no(String order_no) {
this.order_no = order_no;
}
public String getItem_name() {
return item_name;
}
public void setItem_name(String item_name) {
this.item_name = item_name;
}
public String getItem_count() {
return item_count;
}
public void setItem_count(String item_count) {
this.item_count = item_count;
}
public String getTotal_items() {
return total_items;
}
public void setTotal_items(String total_items) {
this.total_items = total_items;
}
public String getGrand_total() {
return grand_total;
}
public void setGrand_total(String grand_total) {
this.grand_total = grand_total;
}
public String getCreated_at() {
return created_at;
}
public void setCreated_at(String created_at) {
this.created_at = created_at;
}
}
|
[
"you@example.com"
] |
you@example.com
|
425d33b93563876c1159aeddcc46702f3e8fbf06
|
72617c12c2f40ef484a150f5ea522ec59c4fef6e
|
/src/main/java/auctionsniper/ui/Column.java
|
9c5296da865fb7c7861a140bfe133824b908f82e
|
[
"Apache-2.0"
] |
permissive
|
skinny85/goos-book-code
|
29593ae492fdb7aebbf34396f5f752d9236c54d6
|
aa779d4eb12158f84ecc16ed7481fc63bc03127b
|
refs/heads/master
| 2021-01-10T03:22:22.507317
| 2019-10-31T06:32:07
| 2019-10-31T06:32:07
| 49,369,445
| 47
| 15
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 988
|
java
|
package auctionsniper.ui;
import auctionsniper.SniperSnapshot;
public enum Column {
ITEM_IDENTIFIER("Item") {
@Override
public Object valueIn(SniperSnapshot snapshot) {
return snapshot.itemId;
}
},
LAST_PRICE("Last Price") {
@Override
public Object valueIn(SniperSnapshot snapshot) {
return snapshot.lastPrice;
}
},
LAST_BID("Last Bid") {
@Override
public Object valueIn(SniperSnapshot snapshot) {
return snapshot.lastBid;
}
},
SNIPER_STATE("State") {
@Override
public Object valueIn(SniperSnapshot snapshot) {
return SnipersTableModel.textFor(snapshot.state);
}
};
public final String name;
private Column(String name) {
this.name = name;
}
public abstract Object valueIn(SniperSnapshot snapshot);
public static Column at(int offset) {
return values()[offset];
}
}
|
[
"adamruka85@gmail.com"
] |
adamruka85@gmail.com
|
af28329efbc051c86ea8879738247d8cd37ae96b
|
53a98b301db9ffbc166db4edb0d6cf4e4a81b7b5
|
/src/main/java/com/emc/mongoose/base/logging/ShutdownCallbackRegistryImpl.java
|
b20036a3e37d6d52da30707d1fad7828c2b05a64
|
[
"MIT"
] |
permissive
|
emc-mongoose/mongoose-base
|
004f5044e958aac8e5b246729f8710133df3700c
|
fb02df88bfe3b0e720a4bcd9319b88a6d4c63d09
|
refs/heads/master
| 2023-07-28T12:03:09.934368
| 2023-07-17T23:41:25
| 2023-07-17T23:41:25
| 175,399,579
| 4
| 4
|
MIT
| 2023-07-17T23:41:27
| 2019-03-13T10:36:44
|
Java
|
UTF-8
|
Java
| false
| false
| 792
|
java
|
package com.emc.mongoose.base.logging;
import org.apache.logging.log4j.core.util.Cancellable;
import org.apache.logging.log4j.core.util.ShutdownCallbackRegistry;
public final class ShutdownCallbackRegistryImpl implements ShutdownCallbackRegistry {
@Override
public final Cancellable addShutdownCallback(final Runnable callback) {
return new CancellableImpl(callback);
}
private static final class CancellableImpl implements Cancellable {
private final Runnable callback;
public CancellableImpl(final Runnable callback) {
this.callback = callback;
}
@Override
public final void cancel() {}
@Override
public final void run() {
if (callback != null) {
System.out.println("Shutdown callback + \"" + callback + "\" run...");
callback.run();
}
}
}
}
|
[
"andrey.kurilov@emc.com"
] |
andrey.kurilov@emc.com
|
2dbfbf11a93dddddbbe856c6e1bd78348c7bf8cf
|
806baaac446f64fb143563310e305713ff2882e6
|
/src/boletin_19/Boletin_19.java
|
1e0be01af293e6374b7c22d56334d710a714c246
|
[] |
no_license
|
javipichu/Boletin_19
|
3f8a55a16f154e55d30cefe8fff3c4e79a2a52ef
|
6a21f8658bcfc712dd4b15c7caba296b442b35ff
|
refs/heads/master
| 2020-04-18T02:37:25.382799
| 2019-02-18T10:30:18
| 2019-02-18T10:30:18
| 167,169,752
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 535
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package boletin_19;
/**
*
* @author jalvarezotero
*/
public class Boletin_19 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
NumerosRand nRand = new NumerosRand();
nRand.arrayAleatorio();
System.out.println("*****");
nRand.arrayReves();
}
}
|
[
"you@example.com"
] |
you@example.com
|
86e5bf774e5fbc01014f86035b3b1c69028c78a2
|
de7b67d4f8aa124f09fc133be5295a0c18d80171
|
/workspace_java-src/java-src-test/src/sun/io/CharToByteCp278.java
|
918ac00f9bdc0f8f7482993148e661181139844e
|
[] |
no_license
|
lin-lee/eclipse_workspace_test
|
adce936e4ae8df97f7f28965a6728540d63224c7
|
37507f78bc942afb11490c49942cdfc6ef3dfef8
|
refs/heads/master
| 2021-05-09T10:02:55.854906
| 2018-01-31T07:19:02
| 2018-01-31T07:19:02
| 119,460,523
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 753
|
java
|
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package sun.io;
import sun.nio.cs.ext.IBM278;
/**
* Tables and data to convert Unicode to Cp278
*
* @author ConverterGenerator tool
* @version >= JDK1.1.6
*/
public class CharToByteCp278 extends CharToByteSingleByte {
private final static IBM278 nioCoder = new IBM278();
public String getCharacterEncoding() {
return "Cp278";
}
public CharToByteCp278() {
super.mask1 = 0xFF00;
super.mask2 = 0x00FF;
super.shift = 8;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
}
}
|
[
"lilin@lvmama.com"
] |
lilin@lvmama.com
|
c4cd1c32a7ae1d8e9ae49e22eb2a4bde50856220
|
7363aa5bfd1406af5094e50a8f2a4077f509897a
|
/firefly-common/src/test/java/test/utils/json/compiler/TestCompiler.java
|
170362adecda04629845c2945805b20059e59a82
|
[] |
no_license
|
oidwuhaihua/firefly
|
b3078b8625574ecf227ae7494aa75d073cc77e3d
|
87f60b4a1bfdc6a2c730adc97de471e86e4c4d8c
|
refs/heads/master
| 2021-01-21T05:29:15.914195
| 2017-02-10T16:35:14
| 2017-02-10T16:35:14
| 83,196,072
| 3
| 0
| null | 2017-02-26T09:05:57
| 2017-02-26T09:05:57
| null |
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
package test.utils.json.compiler;
import static org.hamcrest.Matchers.is;
import java.util.ArrayList;
import java.util.LinkedList;
import org.junit.Assert;
import org.junit.Test;
import test.utils.json.CollectionObj;
import test.utils.json.Group;
import test.utils.json.SimpleObj;
import com.firefly.utils.json.Parser;
import com.firefly.utils.json.compiler.DecodeCompiler;
import com.firefly.utils.json.compiler.EncodeCompiler;
import com.firefly.utils.json.parser.CollectionParser;
import com.firefly.utils.json.support.ParserMetaInfo;
import com.firefly.utils.json.support.SerializerMetaInfo;
public class TestCompiler {
@Test
public void test() {
SerializerMetaInfo[] s = EncodeCompiler.compile(Group.class);
ParserMetaInfo[] p = DecodeCompiler.compile(Group.class);
for (int i = 0; i < p.length; i++) {
Assert.assertThat(p[i].getPropertyNameString(), is(s[i].getPropertyNameString()));
System.out.println(p[i].getPropertyNameString());
}
}
@Test
public void test2() {
ParserMetaInfo[] pp = DecodeCompiler.compile(CollectionObj.class);
ParserMetaInfo p = pp[0];
Assert.assertThat(p.getType().getName(), is(ArrayList.class.getName()));
Parser parser = p.getParser();
if(parser instanceof CollectionParser) {
CollectionParser colp = (CollectionParser) parser;
p = colp.getElementMetaInfo();
Assert.assertThat(p.getType().getName(), is(LinkedList.class.getName()));
}
parser = p.getParser();
if(parser instanceof CollectionParser) {
CollectionParser colp = (CollectionParser) parser;
p = colp.getElementMetaInfo();
Assert.assertThat(p.getType().getName(), is(SimpleObj.class.getName()));
}
}
public static void main(String[] args) {
ParserMetaInfo[] pp = DecodeCompiler.compile(CollectionObj.class);
ParserMetaInfo p = pp[0];
test(p);
}
public static void test(ParserMetaInfo p) {
System.out.println(p.getType());
Parser parser = p.getParser();
if(parser instanceof CollectionParser) {
CollectionParser colp = (CollectionParser) parser;
test(colp.getElementMetaInfo());
}
}
}
|
[
"qptkk@163.com"
] |
qptkk@163.com
|
cec8c581f353e499c6af222db1f83eb6a19fac6d
|
a3e0cdfd506d0f3b780d1135359e4f55f9af92ad
|
/teavm-platform/src/main/java/org/teavm/platform/plugin/MetadataProviderTransformer.java
|
f8d25aadf4256c4798851601f56e4f7104e50589
|
[
"Apache-2.0"
] |
permissive
|
RuedigerMoeller/teavm
|
739948602544c98443313e51c9c429a69a1824a6
|
70338531f58999f3080ff1578960112633ca0c01
|
refs/heads/master
| 2023-06-14T18:19:51.946286
| 2014-10-09T13:36:44
| 2014-10-09T13:36:44
| 24,997,400
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,532
|
java
|
/*
* Copyright 2014 Alexey Andreev.
*
* 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.teavm.platform.plugin;
import org.teavm.javascript.ni.GeneratedBy;
import org.teavm.model.*;
import org.teavm.platform.metadata.MetadataProvider;
/**
*
* @author Alexey Andreev
*/
class MetadataProviderTransformer implements ClassHolderTransformer {
@Override
public void transformClass(ClassHolder cls, ClassReaderSource innerSource) {
for (MethodHolder method : cls.getMethods()) {
AnnotationReader providerAnnot = method.getAnnotations().get(MetadataProvider.class.getName());
if (providerAnnot == null) {
continue;
}
AnnotationHolder genAnnot = new AnnotationHolder(GeneratedBy.class.getName());
genAnnot.getValues().put("value", new AnnotationValue(ValueType.object(
MetadataProviderNativeGenerator.class.getName())));
method.getAnnotations().add(genAnnot);
}
}
}
|
[
"konsoletyper@gmail.com"
] |
konsoletyper@gmail.com
|
0aab97ec1b9d53de118b25e8994240a0bb70185c
|
ce6722230fc0fb17fd1e9b651d1e50fb398ae3c3
|
/h2/src/main/org/h2/value/ValueEnum.java
|
2dc4f4027753d9a1bdc9c920d945a0461866c1a3
|
[] |
no_license
|
jack870601/107-SE-HW1
|
879dc1a7779a888ede38a76cee96e1502b38dd30
|
fbc945246230250ce18d671552a1bbc90f1b33f7
|
refs/heads/master
| 2020-04-09T07:25:33.678377
| 2018-12-05T04:00:09
| 2018-12-05T04:00:09
| 160,155,030
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,559
|
java
|
/*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.value;
import java.util.Locale;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
public class ValueEnum extends ValueEnumBase {
private enum Validation {
DUPLICATE,
EMPTY,
INVALID,
VALID
}
private final String[] enumerators;
private ValueEnum(final String[] enumerators, final int ordinal) {
super(enumerators[ordinal], ordinal);
this.enumerators = enumerators;
}
/**
* Check for any violations, such as empty
* values, duplicate values.
*
* @param enumerators the enumerators
*/
public static void check(final String[] enumerators) {
switch (validate(enumerators)) {
case VALID:
return;
case EMPTY:
throw DbException.get(ErrorCode.ENUM_EMPTY);
case DUPLICATE:
throw DbException.get(ErrorCode.ENUM_DUPLICATE,
toString(enumerators));
default:
throw DbException.get(ErrorCode.INVALID_VALUE_2,
toString(enumerators));
}
}
private static void check(final String[] enumerators, final Value value) {
check(enumerators);
if (validate(enumerators, value) != Validation.VALID) {
throw DbException.get(ErrorCode.ENUM_VALUE_NOT_PERMITTED,
toString(enumerators), value.toString());
}
}
@Override
protected int compareSecure(final Value v, final CompareMode mode) {
return Integer.compare(getInt(), v.getInt());
}
/**
* Create an ENUM value from the provided enumerators
* and value.
*
* @param enumerators the enumerators
* @param value a value
* @return the ENUM value
*/
public static ValueEnum get(final String[] enumerators, int value) {
check(enumerators, ValueInt.get(value));
return new ValueEnum(enumerators, value);
}
public static ValueEnum get(final String[] enumerators, String value) {
check(enumerators, ValueString.get(value));
final String cleanLabel = sanitize(value);
for (int i = 0; i < enumerators.length; i++) {
if (cleanLabel.equals(sanitize(enumerators[i]))) {
return new ValueEnum(enumerators, i);
}
}
throw DbException.get(ErrorCode.GENERAL_ERROR_1, "Unexpected error");
}
public String[] getEnumerators() {
return enumerators;
}
/**
* Evaluates whether a valid ENUM can be constructed
* from the provided enumerators and value.
*
* @param enumerators the enumerators
* @param value the value
* @return whether a valid ENUM can be constructed from the provided values
*/
public static boolean isValid(final String enumerators[], final Value value) {
return validate(enumerators, value).equals(Validation.VALID);
}
private static String sanitize(final String label) {
return label == null ? null : label.trim().toUpperCase(Locale.ENGLISH);
}
private static String[] sanitize(final String[] enumerators) {
if (enumerators == null || enumerators.length == 0) {
return null;
}
final String[] clean = new String[enumerators.length];
for (int i = 0; i < enumerators.length; i++) {
clean[i] = sanitize(enumerators[i]);
}
return clean;
}
private static String toString(final String[] enumerators) {
String result = "(";
for (int i = 0; i < enumerators.length; i++) {
result += "'" + enumerators[i] + "'";
if (i < enumerators.length - 1) {
result += ", ";
}
}
result += ")";
return result;
}
private static Validation validate(final String[] enumerators) {
final String[] cleaned = sanitize(enumerators);
if (cleaned == null || cleaned.length == 0) {
return Validation.EMPTY;
}
for (int i = 0; i < cleaned.length; i++) {
if (cleaned[i] == null || cleaned[i].equals("")) {
return Validation.EMPTY;
}
if (i < cleaned.length - 1) {
for (int j = i + 1; j < cleaned.length; j++) {
if (cleaned[i].equals(cleaned[j])) {
return Validation.DUPLICATE;
}
}
}
}
return Validation.VALID;
}
private static Validation validate(final String[] enumerators, final Value value) {
final Validation validation = validate(enumerators);
if (!validation.equals(Validation.VALID)) {
return validation;
}
if (DataType.isStringType(value.getType())) {
final String cleanLabel = sanitize(value.getString());
for (String enumerator : enumerators) {
if (cleanLabel.equals(sanitize(enumerator))) {
return Validation.VALID;
}
}
return Validation.INVALID;
} else {
final int ordinal = value.getInt();
if (ordinal < 0 || ordinal >= enumerators.length) {
return Validation.INVALID;
}
return Validation.VALID;
}
}
}
|
[
"jack870601@gmail.com"
] |
jack870601@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.