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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c0553839efe766727a09ffbf9c88bae065fee6ec
|
62774e6de56acf8c4d4d014f1f5ee709feef6502
|
/employeeRegistry/src/main/java/domain/model/service/EmployeeRegisterServiceModel.java
|
e4220f9032075c932d318146c9e706417e022024
|
[] |
no_license
|
Chris-Mk/Hibernate
|
35a9c42679ad6d20925c96d6d3929ad86649f700
|
eb338734c0136d5292e06f7ab2688e4fda31d93c
|
refs/heads/master
| 2023-07-24T00:20:36.222180
| 2023-07-19T19:29:16
| 2023-07-19T19:29:16
| 205,900,454
| 0
| 0
| null | 2023-07-19T19:29:18
| 2019-09-02T16:56:37
|
Java
|
UTF-8
|
Java
| false
| false
| 983
|
java
|
package domain.model.service;
import java.math.BigDecimal;
public class EmployeeRegisterServiceModel {
private String firstName;
private String lastName;
private String position;
private BigDecimal salary;
private int age;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
|
[
"[email protected]"
] | |
ca46dde27aabea938f09e84330f88e5370852d05
|
1f29f7842e30d6265fb9dbb302fe9414755e7403
|
/src/main/java/com/eurodyn/okstra/ArtLeistungserbringerPflegeType.java
|
3b273f88debeeae381fce880c29859d94f37f9b2
|
[] |
no_license
|
dpapageo/okstra-2018-classes
|
b4165aea3c84ffafaa434a3a1f8cf0fff58de599
|
fb908eabc183725be01c9f93d39268bb8e630f59
|
refs/heads/master
| 2021-03-26T00:22:28.205974
| 2020-03-16T09:16:31
| 2020-03-16T09:16:31
| 247,657,881
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,657
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.03.09 at 04:49:50 PM EET
//
package com.eurodyn.okstra;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Art_Leistungserbringer_PflegeType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Art_Leistungserbringer_PflegeType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}AbstractFeatureType">
* <sequence>
* <element name="Kennung" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Langtext" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Art_Leistungserbringer_PflegeType", propOrder = {
"kennung",
"langtext"
})
public class ArtLeistungserbringerPflegeType
extends AbstractFeatureType
{
@XmlElement(name = "Kennung", required = true)
protected String kennung;
@XmlElement(name = "Langtext", required = true)
protected String langtext;
/**
* Gets the value of the kennung property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getKennung() {
return kennung;
}
/**
* Sets the value of the kennung property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setKennung(String value) {
this.kennung = value;
}
/**
* Gets the value of the langtext property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLangtext() {
return langtext;
}
/**
* Sets the value of the langtext property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLangtext(String value) {
this.langtext = value;
}
}
|
[
"[email protected]"
] | |
3a596a4e769cdb0600f062f0db19bf42f3c748d9
|
1f2693e57a8f6300993aee9caa847d576f009431
|
/myfaces-csi/myfaces-skins/examples/src/main/java/org/apache/myfaces/examples/listexample/TreeTable.java
|
a2ac7b93d932dd065af2ed2039ce8d027348c4db
|
[] |
no_license
|
mr-sobol/myfaces-csi
|
ad80ed1daadab75d449ef9990a461d9c06d8c731
|
c142b20012dda9c096e1384a46915171bf504eb8
|
refs/heads/master
| 2021-01-10T06:11:13.345702
| 2009-01-05T09:46:26
| 2009-01-05T09:46:26
| 43,557,323
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,419
|
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.myfaces.examples.listexample;
import java.io.Serializable;
import org.apache.myfaces.custom.tree.DefaultMutableTreeNode;
import org.apache.myfaces.custom.tree.model.DefaultTreeModel;
/**
* <p>
* Bean holding the tree hierarchy.
* </p>
*
* @author <a href="mailto:[email protected]">David Le Strat</a>
*/
public class TreeTable implements Serializable
{
/**
* serial id for serialisation versioning
*/
private static final long serialVersionUID = 1L;
private DefaultTreeModel treeModel;
/**
* @param treeModel The treeModel.
*/
public TreeTable(DefaultTreeModel treeModel)
{
this.treeModel = treeModel;
}
/**
* <p>
* Default constructor.
* </p>
*/
public TreeTable()
{
DefaultMutableTreeNode root = new DefaultMutableTreeNode(new TreeItem(
1, "XY", "9001", "XY 9001"));
DefaultMutableTreeNode a = new DefaultMutableTreeNode(new TreeItem(2,
"A", "9001", "A 9001"));
root.insert(a);
DefaultMutableTreeNode b = new DefaultMutableTreeNode(new TreeItem(3,
"B", "9001", "B 9001"));
root.insert(b);
DefaultMutableTreeNode c = new DefaultMutableTreeNode(new TreeItem(4,
"C", "9001", "C 9001"));
root.insert(c);
DefaultMutableTreeNode node = new DefaultMutableTreeNode(new TreeItem(
5, "a1", "9002", "a1 9002"));
a.insert(node);
node = new DefaultMutableTreeNode(new TreeItem(6, "a2", "9002",
"a2 9002"));
a.insert(node);
node = new DefaultMutableTreeNode(new TreeItem(7, "a3", "9002",
"a3 9002"));
a.insert(node);
node = new DefaultMutableTreeNode(
new TreeItem(8, "b", "9002", "b 9002"));
b.insert(node);
a = node;
node = new DefaultMutableTreeNode(new TreeItem(9, "x1", "9003",
"x1 9003"));
a.insert(node);
node = new DefaultMutableTreeNode(new TreeItem(9, "x2", "9003",
"x2 9003"));
a.insert(node);
this.treeModel = new DefaultTreeModel(root);
}
/**
* @return Returns the treeModel.
*/
public DefaultTreeModel getTreeModel()
{
return treeModel;
}
/**
* @param treeModel The treeModel to set.
*/
public void setTreeModel(DefaultTreeModel treeModel)
{
this.treeModel = treeModel;
}
}
|
[
"lu4242@ea1d4837-9632-0410-a0b9-156113df8070"
] |
lu4242@ea1d4837-9632-0410-a0b9-156113df8070
|
1e7312074b2b97a44d925ed2dfeed275892e6300
|
9e8f669d216211ed25cd7208d25f918d8031a335
|
/CCMS/src/main/java/com/kh/ccms/skill/controller/CommentSController.java
|
7e497057c1f181e4d2dab73a26aac4d8e33ac98e
|
[] |
no_license
|
CleverCodeMonkeys/ALLIT
|
d3ce6dfde79a975a09de1e1877b71ca177ca4e6b
|
6aa7823e66b7409f8ed5bcc1f7f237600a21d585
|
refs/heads/master
| 2020-03-24T23:11:33.771249
| 2018-08-08T09:03:38
| 2018-08-08T09:03:38
| 143,122,443
| 0
| 0
| null | 2018-08-08T09:03:39
| 2018-08-01T07:50:20
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,182
|
java
|
package com.kh.ccms.skill.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttribute;
import com.kh.ccms.member.model.vo.Member;
import com.kh.ccms.skill.model.exception.SkillException;
import com.kh.ccms.skill.model.service.CommentSService;
import com.kh.ccms.skill.model.vo.CommentS;
import com.kh.ccms.skill.model.vo.Skill;
@Controller
public class CommentSController
{
@Autowired
CommentSService commentSService;
@RequestMapping(value="skill/commentSInsert.comm")
public String commentInsert(CommentS comment, Model model, @SessionAttribute(name = "m", required= false) Member m,
Skill skill)
{
int result;
System.out.println(comment);
if(m == null) {
model.addAttribute("msg", "로그인 해주세요.").addAttribute("loc", "/");
return "common/msg";
}
comment.setWriter_id(m.getId());
try {
result = commentSService.commentSInsert(comment);
} catch (Exception e) {
throw new SkillException("error");
}
String loc = "/";
String msg = "";
if(result > 0)
{
loc = "/skill/skillOneView.ski?no=" + skill.getBoard_id();
msg = "댓글 등록 성공";
} else {
msg = "댓글 등록 실패!!";
}
model.addAttribute("msg", msg).addAttribute("loc", loc);
return "common/msg";
}
@RequestMapping(value="skill/commentSUpdat.comm")
public String commentUpdate(@RequestParam("co") String comment, @RequestParam("bo") int comment_id ,Model model, Skill skill)
{
int result;
CommentS co = new CommentS();
co.setComment_content(comment);
co.setComment_id(comment_id);
try {
result = commentSService.commentSUpdate(co);
} catch (Exception e) {
throw new SkillException("error");
}
String loc = "/";
String msg = "";
if(result < 0)
{
loc = "/skill/skill.ski";
msg = "수정 오류";
}
model.addAttribute("msg", msg).addAttribute("loc", loc);
return "common/msg";
}
@RequestMapping(value="skill/commentSDelete.comm")
public String commentDelete(@RequestParam("no") int comment_id, @RequestParam("bo") int board_id, Model model, Skill skill)
{
int result = 0;
try{
result = commentSService.commentSDelete(comment_id);
} catch (Exception e) {
}
String loc = "/";
String msg = "";
try{
if(result > 0)
{
msg = "댓글 삭제 성공!";
loc = "/skill/skillOneView.ski?no=" + board_id;
} else {
msg = "삭제 실패!";
}
} catch (Exception e) {
msg = "댓글이 있으면 삭제가 불가능합니다.";
}
model.addAttribute("loc", loc).addAttribute("msg", msg);
return "common/msg";
}
}
|
[
"user2@KH_H"
] |
user2@KH_H
|
2d04b122f31077d7334f9214e3b2da88d4f038a1
|
f5f5d836c9a2fb7636d02283ccc6753678c273ad
|
/Enox Server/src/com/rs/game/minigames/PuroPuro.java
|
5334191d03e008d97ab03b8d29cb3cbb2d8c0cb0
|
[] |
no_license
|
gnmmarechal/EnoxScapeReloaded
|
3a48c1925fef1bfb7969230f4258a65ae21c7bf2
|
ae9639be756b4adb139faa00553adf3e26c488fe
|
refs/heads/master
| 2020-04-22T12:54:40.777755
| 2019-06-28T20:46:34
| 2019-06-28T20:46:34
| 170,389,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 173
|
java
|
package com.rs.game.minigames;
import com.rs.game.player.controlers.Controler;
public class PuroPuro extends Controler {
@Override
public void start() {
}
}
|
[
"[email protected]"
] | |
3607e286fadd12f9b7a939a27e2f6ad3bd9f35f8
|
db535dfca5cf4759fc627ce1a2a7b930ee123cd5
|
/library-info-app/src/main/java/ru/nchernetsov/domain/Book.java
|
3367e73e5e6e24412598e372ce12a0df24e27d85
|
[] |
no_license
|
ChernetsovNG/otus_spring_2018_06
|
d84944d7ac477a266dd57f6d21f870acd2275879
|
52832f97daaeeeaabdff9463abd7f6bb2141d405
|
refs/heads/master
| 2020-03-21T18:48:32.915226
| 2018-11-29T20:06:49
| 2018-11-29T20:06:49
| 138,914,397
| 0
| 0
| null | 2018-11-05T11:20:08
| 2018-06-27T17:44:45
|
Java
|
UTF-8
|
Java
| false
| false
| 3,078
|
java
|
package ru.nchernetsov.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
@Document(collection = "books")
public class Book {
@Id
private String bookId;
@Indexed(unique = true)
private String title;
@DBRef
private List<Author> authors = new ArrayList<>();
@DBRef
private List<Genre> genres = new ArrayList<>();
@DBRef
private List<Comment> comments = new ArrayList<>();
public Book() {
this.bookId = UUID.randomUUID().toString();
}
public Book(String title) {
this();
this.title = title;
}
public Book(String title, List<Author> authors, List<Genre> genres) {
this();
this.title = title;
this.authors = authors;
this.genres = genres;
}
public void addGenre(Genre genre) {
genres.add(genre);
}
public void addComment(Comment comment) {
comments.add(comment);
}
public String getBookId() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId = bookId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<Author> getAuthors() {
return Collections.unmodifiableList(authors);
}
public void setAuthors(List<Author> authors) {
this.authors = authors;
}
public List<Genre> getGenres() {
return Collections.unmodifiableList(genres);
}
public void setGenres(List<Genre> genres) {
this.genres = genres;
}
public List<Comment> getComments() {
return Collections.unmodifiableList(comments);
}
public List<String> getCommentsIds() {
return comments.stream().map(Comment::getId).collect(Collectors.toList());
}
public void setComments(List<Comment> comments) {
this.comments = comments;
}
public void removeComment(String commentText) {
for (Comment comment : comments) {
if (comment.getComment().equals(commentText)) {
comments.remove(comment);
break;
}
}
}
public void deleteAuthorByName(String name) {
for (Author author : authors) {
if (author.getName().equals(name)) {
authors.remove(author);
break;
}
}
}
public void deleteGenreByName(String name) {
for (Genre genre : genres) {
if (genre.getName().equals(name)) {
genres.remove(genre);
break;
}
}
}
@Override
public String toString() {
return "Book{" +
"title='" + title + '\'' +
'}';
}
}
|
[
"[email protected]"
] | |
1f5373436f497f014954ce53584a18ef5422cb54
|
fb5452e16d2518b472470c29852a193eae0e13f2
|
/MultiProtocolDownloader/src/main/java/com/vaani/downloader/protocolhelper/TrustAllX509TrustManager.java
|
513a54a1eb11ab83651738f886548535ea1456d4
|
[] |
no_license
|
kinshuk4/KodingProbs
|
50af302b9eee9f8e358057360c8c16792b615830
|
9d060b3bbae3f8c53ec57f7b025dfe65050321a3
|
refs/heads/master
| 2022-12-05T00:55:27.018919
| 2018-12-13T17:13:31
| 2019-02-14T17:13:31
| 78,401,566
| 0
| 0
| null | 2022-11-24T05:28:29
| 2017-01-09T06:47:13
|
Java
|
UTF-8
|
Java
| false
| false
| 703
|
java
|
package com.vaani.downloader.protocolhelper;
import javax.net.ssl.X509TrustManager;
import java.security.cert.X509Certificate;
/**
* DO NOT USE IN PRODUCTION!!!!
*
* This class will simply trust everything that comes along.
*
* @author frank
*
*/
public class TrustAllX509TrustManager implements X509TrustManager {
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
public void checkClientTrusted(java.security.cert.X509Certificate[] certs,
String authType) {
}
public void checkServerTrusted(java.security.cert.X509Certificate[] certs,
String authType) {
}
}
|
[
"[email protected]"
] | |
de3a68c0091dd9b6fcc29cb9533fc6dbc1dcf587
|
879c7c01b1d3cd98fbc40768001ebcd3c94bcc52
|
/src/combit/ListLabel24/Dom/PropertyPrintableArea.java
|
6c44db6f840198620d666927da2025c2c8294469
|
[] |
no_license
|
Javonet-io-user/7d825c3a-6d32-4c9b-9e58-43c503f77adb
|
c63f350b2754ef6c7fbdf42c9b8fa2a7ab45faf8
|
e5826d95ac9e013f9907aa75e16cec840d6ef276
|
refs/heads/master
| 2020-04-21T08:01:21.991093
| 2019-02-06T13:06:19
| 2019-02-06T13:06:19
| 169,407,296
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,906
|
java
|
package combit.ListLabel24.Dom;
import Common.Activation;
import static Common.JavonetHelper.Convert;
import static Common.JavonetHelper.getGetObjectName;
import static Common.JavonetHelper.getReturnObjectName;
import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation;
import Common.JavonetHelper;
import com.javonet.Javonet;
import com.javonet.JavonetException;
import com.javonet.JavonetFramework;
import com.javonet.api.NObject;
import com.javonet.api.NEnum;
import com.javonet.api.keywords.NRef;
import com.javonet.api.keywords.NOut;
import com.javonet.api.NControlContainer;
import java.util.concurrent.atomic.AtomicReference;
import java.util.Iterator;
import java.lang.*;
import combit.ListLabel24.Dom.*;
public class PropertyPrintableArea extends DomItem {
protected NObject javonetHandle;
/** GetProperty */
public PropertyReadOnlySize getExtent() {
try {
Object res = javonetHandle.<NObject>get("Extent");
if (res == null) return null;
return new PropertyReadOnlySize((NObject) res);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
return null;
}
}
/** GetProperty */
public PropertyReadOnlySize getOffset() {
try {
Object res = javonetHandle.<NObject>get("Offset");
if (res == null) return null;
return new PropertyReadOnlySize((NObject) res);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
return null;
}
}
public PropertyPrintableArea(NObject handle) {
super(handle);
this.javonetHandle = handle;
}
public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}
static {
try {
Activation.initializeJavonet();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}
}
|
[
"[email protected]"
] | |
484ab1d0a91186ed50190c00c3d1be30d6b5b1d0
|
c9e1a187d3dc446722739560fb8aa1b39cd00ff8
|
/src/main/java/usecases/api/teleportplayerstolobby/TeleportPlayersToLobby.java
|
b20a140f46eaca836b967ecfd32d688ddc26c0e3
|
[] |
no_license
|
SimonAtelier/VillagerHockey
|
b047103958a296cbc8e5e608b9d082448937f7b5
|
02b9168946a2445a18b7ed72031eb58ec137b5e2
|
refs/heads/master
| 2021-07-12T08:29:47.734324
| 2021-05-15T20:12:44
| 2021-05-15T20:12:44
| 121,252,224
| 0
| 2
| null | 2021-05-15T20:12:45
| 2018-02-12T13:50:55
|
Java
|
UTF-8
|
Java
| false
| false
| 460
|
java
|
package usecases.api.teleportplayerstolobby;
import java.util.List;
import java.util.UUID;
import entities.Location;
import gateways.GameGateway;
public interface TeleportPlayersToLobby {
void execute(String game, TeleportPlayersToLobbyResponse response);
void setGameGateway(GameGateway gameGateway);
public interface TeleportPlayersToLobbyResponse {
void presentLocation(List<UUID> players, Location location);
}
}
|
[
"[email protected]"
] | |
fdeb0ed196d8bb215f9e55195f0308aab71344b3
|
59c4077b97d90098eb0d19948982276ac8f87658
|
/day10/容器1/src/cn/imcore/test/Person.java
|
7aa700825181307c7a9634b84c9f5ebf1f76c8af
|
[] |
no_license
|
sonyi/java
|
4b267e9cb554bb51f3770149f070ec812388cb8b
|
fbe2c2f7ae36bbbb4333bd567fb063daf507c8fc
|
refs/heads/master
| 2021-01-01T16:30:36.907998
| 2014-05-25T15:13:11
| 2014-05-25T15:13:11
| 19,110,091
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
package cn.imcore.test;
public class Person {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return name + " " + age;
}
}
|
[
"wxy15105957760"
] |
wxy15105957760
|
55cffe7fc276eda6f0337a6270addc43075e96fe
|
4e9c06ff59fe91f0f69cb3dd80a128f466885aea
|
/src/o/abb.java
|
b4b78fd1c35889345f9af4bdd418d6524ffebb2d
|
[] |
no_license
|
reverseengineeringer/com.eclipsim.gpsstatus2
|
5ab9959cc3280d2dc96f2247c1263d14c893fc93
|
800552a53c11742c6889836a25b688d43ae68c2e
|
refs/heads/master
| 2021-01-17T07:26:14.357187
| 2016-07-21T03:33:07
| 2016-07-21T03:33:07
| 63,834,134
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
package o;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
public final class abb
extends di<abb>
{
public Map<Integer, Double> aLp = new HashMap(4);
public final String toString()
{
HashMap localHashMap = new HashMap();
Iterator localIterator = aLp.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
String str = String.valueOf(localEntry.getKey());
localHashMap.put(String.valueOf(str).length() + 6 + "metric" + str, localEntry.getValue());
}
return ˎ(localHashMap);
}
}
/* Location:
* Qualified Name: o.abb
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
f4951bd6ab8a4d771d7fdf3c03db93a1a14cb179
|
416ed26975cc93982e9895da5f2f447383bc5d9f
|
/main/boofcv-geo/test/boofcv/alg/geo/robust/TestGenerateHomographyLinear.java
|
63fde8f7abb1ba4e86d2553b62a21ecb634ce23d
|
[
"LicenseRef-scancode-takuya-ooura",
"Apache-2.0"
] |
permissive
|
jmankhan/BoofCV
|
4cb99fbe19afcd35197003fc967c998e9c4875de
|
afbb6b1bf360092b3ee6e3ed5d0d2f9710d0e2da
|
refs/heads/SNAPSHOT
| 2021-01-20T03:29:46.088886
| 2017-05-06T18:13:40
| 2017-05-06T18:13:40
| 89,549,111
| 1
| 0
| null | 2017-04-27T02:54:45
| 2017-04-27T02:54:45
| null |
UTF-8
|
Java
| false
| false
| 3,146
|
java
|
/*
* Copyright (c) 2011-2017, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package boofcv.alg.geo.robust;
import boofcv.struct.geo.AssociatedPair;
import georegression.struct.homography.Homography2D_F64;
import georegression.struct.point.Point2D_F64;
import georegression.transform.homography.HomographyPointOps_F64;
import org.ddogleg.fitting.modelset.ModelFitter;
import org.ddogleg.fitting.modelset.ModelGenerator;
import org.junit.Test;
import java.util.List;
import java.util.Random;
/**
* @author Peter Abeles
*/
public class TestGenerateHomographyLinear implements ModelTestingInterface<Homography2D_F64,AssociatedPair>
{
Random rand = new Random(234);
@Test
public void fitModel() {
StandardModelFitterTests<Homography2D_F64,AssociatedPair> alg =
new StandardModelFitterTests<Homography2D_F64,AssociatedPair>(this,4) {
@Override
public ModelFitter<Homography2D_F64,AssociatedPair> createAlg() {
return new GenerateHomographyLinear(true);
}
};
alg.allTest();
}
@Test
public void modelGenerator() {
StandardModelGeneratorTests<Homography2D_F64,AssociatedPair> alg =
new StandardModelGeneratorTests<Homography2D_F64,AssociatedPair>(this,4) {
@Override
public ModelGenerator<Homography2D_F64,AssociatedPair> createAlg() {
return new GenerateHomographyLinear(true);
}
@Override
public Homography2D_F64 createModelInstance() {
return new Homography2D_F64();
}
};
alg.allTest();
}
@Override
public Homography2D_F64 createRandomModel() {
Homography2D_F64 model = new Homography2D_F64();
model.a11 = rand.nextDouble();
model.a12 = rand.nextDouble();
model.a13 = rand.nextDouble();
model.a21 = rand.nextDouble();
model.a22 = rand.nextDouble();
model.a23 = rand.nextDouble();
model.a31 = rand.nextDouble();
model.a32 = rand.nextDouble();
model.a33 = rand.nextDouble();
return model;
}
@Override
public AssociatedPair createRandomPointFromModel(Homography2D_F64 transform) {
AssociatedPair ret = new AssociatedPair();
ret.p1.x = rand.nextDouble()*10;
ret.p1.y = rand.nextDouble()*10;
HomographyPointOps_F64.transform(transform, ret.p1, ret.p2);
return ret;
}
@Override
public boolean doPointsFitModel(Homography2D_F64 transform, List<AssociatedPair> dataSet) {
Point2D_F64 expected = new Point2D_F64();
for( AssociatedPair p : dataSet ) {
HomographyPointOps_F64.transform(transform, p.p1, expected);
if( expected.distance(p.p2) > 0.01 )
return false;
}
return true;
}
}
|
[
"[email protected]"
] | |
fd026d6965b8858b04590b80bf140fb4fd310221
|
9310225eb939f9e4ac1e3112190e6564b890ac63
|
/sitestats/sitestats-api/src/java/org/sakaiproject/sitestats/api/SummaryVisitsTotals.java
|
7cac3dca30085971ef748b6ae19648e5f65e1f37
|
[
"ECL-2.0"
] |
permissive
|
deemsys/version-1.0
|
89754a8acafd62d37e0cdadf680ddc9970e6d707
|
cd45d9b7c5633915a18bd75723c615037a4eb7a5
|
refs/heads/master
| 2020-06-04T10:47:01.608886
| 2013-06-15T11:01:28
| 2013-06-15T11:01:28
| 10,705,153
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,718
|
java
|
/**
* $URL: https://source.sakaiproject.org/svn/sitestats/branches/sitestats-2.3.x/sitestats-api/src/java/org/sakaiproject/sitestats/api/SummaryVisitsTotals.java $
* $Id: SummaryVisitsTotals.java 72172 2009-09-23 00:48:53Z [email protected] $
*
* Copyright (c) 2006-2009 The Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.osedu.org/licenses/ECL-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.sakaiproject.sitestats.api;
public interface SummaryVisitsTotals {
public double getLast30DaysVisitsAverage();
public void setLast30DaysVisitsAverage(double last30DaysVisitsAverage);
public double getLast365DaysVisitsAverage();
public void setLast365DaysVisitsAverage(double last365DaysVisitsAverage);
public double getLast7DaysVisitsAverage();
public void setLast7DaysVisitsAverage(double last7DaysVisitsAverage);
public double getPercentageOfUsersThatVisitedSite();
public void setPercentageOfUsersThatVisitedSite(double percentageOfUsersThatVisitedSite);
public long getTotalUniqueVisits();
public void setTotalUniqueVisits(long totalUniqueVisits);
public int getTotalUsers();
public void setTotalUsers(int totalUsers);
public long getTotalVisits();
public void setTotalVisits(long totalVisits);
}
|
[
"[email protected]"
] | |
edfeccd62e5eb71cdce6116f85d3239f86fc7d17
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_fa13482fa4c8ed6c3ce864305d740b0080668b93/UserManager/31_fa13482fa4c8ed6c3ce864305d740b0080668b93_UserManager_s.java
|
8ff1b76ff24985ea00e8488ddce7636fe82f7a11
|
[] |
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
| 499
|
java
|
package com.exadel.borsch.managers;
import com.exadel.borsch.dao.User;
import java.util.List;
import java.util.UUID;
/**
* @author Andrey Zhilka
*/
public interface UserManager {
User getUserById(UUID userId);
User getUserByName(String name);
void deleteUserById(UUID userId);
void updateUser(User toUpdate);
User getUserByHash(String hashId);
void deleteUserByHash(String hashId);
void addUsers(List<User> toAdd);
List<User> getAllUsers();
}
|
[
"[email protected]"
] | |
3b63ae6f9496d730b0a216f61b836f7adb3292aa
|
1c5e8605c1a4821bc2a759da670add762d0a94a2
|
/src/dahua/fdc/basedata/StandardIndexEnum.java
|
48e5fe986382544f533bf4ab47140e080281fcf4
|
[] |
no_license
|
shxr/NJG
|
8195cfebfbda1e000c30081399c5fbafc61bb7be
|
1b60a4a7458da48991de4c2d04407c26ccf2f277
|
refs/heads/master
| 2020-12-24T06:51:18.392426
| 2016-04-25T03:09:27
| 2016-04-25T03:09:27
| 19,804,797
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,708
|
java
|
/**
* output package name
*/
package com.kingdee.eas.fdc.basedata;
import java.util.Map;
import java.util.List;
import java.util.Iterator;
import com.kingdee.util.enums.StringEnum;
/**
* output class name
*/
public class StandardIndexEnum extends StringEnum
{
public static final String MAN_VALUE = "0MAN";
public static final String BUILDAREA_VALUE = "1BUILDAREA";
public static final String SELLAREA_VALUE = "2SELLAREA";
public static final String CONTAINAREA_VALUE = "3CONTAINAREA";
public static final String CUBAGERATE_VALUE = "4CUBAGERATE";
public static final String PRODUCTRATE_VALUE = "5PRODUCTRATE";
public static final String UNITAREA_VALUE = "6UNITAREA";
public static final String UNITS_VALUE = "7UNITS";
public static final String DOORS_VALUE = "8DOORS";
public static final StandardIndexEnum MAN = new StandardIndexEnum("MAN", MAN_VALUE);
public static final StandardIndexEnum BUILDAREA = new StandardIndexEnum("BUILDAREA", BUILDAREA_VALUE);
public static final StandardIndexEnum SELLAREA = new StandardIndexEnum("SELLAREA", SELLAREA_VALUE);
public static final StandardIndexEnum CONTAINAREA = new StandardIndexEnum("CONTAINAREA", CONTAINAREA_VALUE);
public static final StandardIndexEnum CUBAGERATE = new StandardIndexEnum("CUBAGERATE", CUBAGERATE_VALUE);
public static final StandardIndexEnum PRODUCTRATE = new StandardIndexEnum("PRODUCTRATE", PRODUCTRATE_VALUE);
public static final StandardIndexEnum UNITAREA = new StandardIndexEnum("UNITAREA", UNITAREA_VALUE);
public static final StandardIndexEnum UNITS = new StandardIndexEnum("UNITS", UNITS_VALUE);
public static final StandardIndexEnum DOORS = new StandardIndexEnum("DOORS", DOORS_VALUE);
/**
* construct function
* @param String standardIndexEnum
*/
private StandardIndexEnum(String name, String standardIndexEnum)
{
super(name, standardIndexEnum);
}
/**
* getEnum function
* @param String arguments
*/
public static StandardIndexEnum getEnum(String standardIndexEnum)
{
return (StandardIndexEnum)getEnum(StandardIndexEnum.class, standardIndexEnum);
}
/**
* getEnumMap function
*/
public static Map getEnumMap()
{
return getEnumMap(StandardIndexEnum.class);
}
/**
* getEnumList function
*/
public static List getEnumList()
{
return getEnumList(StandardIndexEnum.class);
}
/**
* getIterator function
*/
public static Iterator iterator()
{
return iterator(StandardIndexEnum.class);
}
}
|
[
"[email protected]"
] | |
e20de0d9733fe94e0749389b9b10f400b4d0687e
|
930c207e245c320b108e9699bbbb036260a36d6a
|
/BRICK-Jackson-JsonLd/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/ICWS_Chilled_Water_Pump_Differential_Pressure_Integration_Time_Setpoint.java
|
7a00274def9f7452c3660dbecee88d8b9bce9ea8
|
[] |
no_license
|
InnovationSE/BRICK-Generated-By-OLGA
|
24d278f543471e1ce622f5f45d9e305790181fff
|
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
|
refs/heads/master
| 2021-07-01T14:13:11.302860
| 2017-09-21T12:44:17
| 2017-09-21T12:44:17
| 104,251,784
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,439
|
java
|
/**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldId;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldType;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldLink;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldPropertyType;
import brick.jsonld.util.RefId;
import brickschema.org.schema._1_0_2.Brick.IChilled_Water_Pump_Differential_Pressure_Integration_Time_Setpoint;
import brickschema.org.schema._1_0_2.Brick.IDifferential_Pressure_Integral_Time_Setpoint;
import brickschema.org.schema._1_0_2.Brick.ICWS_Chilled_Water_Differential_Pressure_Setpoint;
public interface ICWS_Chilled_Water_Pump_Differential_Pressure_Integration_Time_Setpoint extends IChilled_Water_Pump_Differential_Pressure_Integration_Time_Setpoint, IDifferential_Pressure_Integral_Time_Setpoint, ICWS_Chilled_Water_Differential_Pressure_Setpoint {
/**
* @return RefId
*/
@JsonIgnore
public RefId getRefId();
}
|
[
"[email protected]"
] | |
90ce4f88fa8e891b973c26e4a5fef7d6a00e3db8
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/apks_from_phone/data_app_com_monefy_app_lite-2/source/com/dropbox/core/v2/sharing/ListSharedLinksArg.java
|
c2528c15f7fec7977898b4569d38e3d5624cd1cb
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 6,792
|
java
|
package com.dropbox.core.v2.sharing;
import com.dropbox.core.stone.StoneSerializer;
import com.dropbox.core.stone.StoneSerializers;
import com.dropbox.core.stone.StructSerializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import java.util.Arrays;
import java.util.regex.Pattern;
class ListSharedLinksArg
{
protected final String cursor;
protected final Boolean directOnly;
protected final String path;
public ListSharedLinksArg()
{
this(null, null, null);
}
public ListSharedLinksArg(String paramString1, String paramString2, Boolean paramBoolean)
{
if ((paramString1 != null) && (!Pattern.matches("(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)", paramString1))) {
throw new IllegalArgumentException("String 'path' does not match pattern");
}
this.path = paramString1;
this.cursor = paramString2;
this.directOnly = paramBoolean;
}
public static Builder newBuilder()
{
return new Builder();
}
public boolean equals(Object paramObject)
{
if (paramObject == this) {}
do
{
return true;
if (!paramObject.getClass().equals(getClass())) {
break;
}
paramObject = (ListSharedLinksArg)paramObject;
} while (((this.path == paramObject.path) || ((this.path != null) && (this.path.equals(paramObject.path)))) && ((this.cursor == paramObject.cursor) || ((this.cursor != null) && (this.cursor.equals(paramObject.cursor)))) && ((this.directOnly == paramObject.directOnly) || ((this.directOnly != null) && (this.directOnly.equals(paramObject.directOnly)))));
return false;
return false;
}
public String getCursor()
{
return this.cursor;
}
public Boolean getDirectOnly()
{
return this.directOnly;
}
public String getPath()
{
return this.path;
}
public int hashCode()
{
return Arrays.hashCode(new Object[] { this.path, this.cursor, this.directOnly });
}
public String toString()
{
return Serializer.INSTANCE.serialize(this, false);
}
public String toStringMultiline()
{
return Serializer.INSTANCE.serialize(this, true);
}
public static class Builder
{
protected String cursor = null;
protected Boolean directOnly = null;
protected String path = null;
protected Builder() {}
public ListSharedLinksArg build()
{
return new ListSharedLinksArg(this.path, this.cursor, this.directOnly);
}
public Builder withCursor(String paramString)
{
this.cursor = paramString;
return this;
}
public Builder withDirectOnly(Boolean paramBoolean)
{
this.directOnly = paramBoolean;
return this;
}
public Builder withPath(String paramString)
{
if ((paramString != null) && (!Pattern.matches("(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)", paramString))) {
throw new IllegalArgumentException("String 'path' does not match pattern");
}
this.path = paramString;
return this;
}
}
static class Serializer
extends StructSerializer<ListSharedLinksArg>
{
public static final Serializer INSTANCE = new Serializer();
Serializer() {}
public ListSharedLinksArg deserialize(JsonParser paramJsonParser, boolean paramBoolean)
{
Object localObject4 = null;
if (!paramBoolean) {
expectStartObject(paramJsonParser);
}
for (Object localObject1 = readTag(paramJsonParser);; localObject1 = null)
{
if (localObject1 == null)
{
Object localObject3 = null;
Object localObject2 = null;
localObject1 = localObject4;
if (paramJsonParser.getCurrentToken() == JsonToken.FIELD_NAME)
{
localObject4 = paramJsonParser.getCurrentName();
paramJsonParser.nextToken();
if ("path".equals(localObject4))
{
localObject4 = (String)StoneSerializers.nullable(StoneSerializers.string()).deserialize(paramJsonParser);
localObject2 = localObject3;
localObject3 = localObject4;
}
for (;;)
{
localObject4 = localObject3;
localObject3 = localObject2;
localObject2 = localObject4;
break;
if ("cursor".equals(localObject4))
{
localObject4 = (String)StoneSerializers.nullable(StoneSerializers.string()).deserialize(paramJsonParser);
localObject3 = localObject2;
localObject2 = localObject4;
}
else if ("direct_only".equals(localObject4))
{
localObject1 = (Boolean)StoneSerializers.nullable(StoneSerializers.boolean_()).deserialize(paramJsonParser);
localObject4 = localObject2;
localObject2 = localObject3;
localObject3 = localObject4;
}
else
{
skipValue(paramJsonParser);
localObject4 = localObject2;
localObject2 = localObject3;
localObject3 = localObject4;
}
}
}
localObject1 = new ListSharedLinksArg(localObject2, localObject3, (Boolean)localObject1);
if (!paramBoolean) {
expectEndObject(paramJsonParser);
}
return localObject1;
}
throw new JsonParseException(paramJsonParser, "No subtype found that matches tag: \"" + (String)localObject1 + "\"");
}
}
public void serialize(ListSharedLinksArg paramListSharedLinksArg, JsonGenerator paramJsonGenerator, boolean paramBoolean)
{
if (!paramBoolean) {
paramJsonGenerator.writeStartObject();
}
if (paramListSharedLinksArg.path != null)
{
paramJsonGenerator.writeFieldName("path");
StoneSerializers.nullable(StoneSerializers.string()).serialize(paramListSharedLinksArg.path, paramJsonGenerator);
}
if (paramListSharedLinksArg.cursor != null)
{
paramJsonGenerator.writeFieldName("cursor");
StoneSerializers.nullable(StoneSerializers.string()).serialize(paramListSharedLinksArg.cursor, paramJsonGenerator);
}
if (paramListSharedLinksArg.directOnly != null)
{
paramJsonGenerator.writeFieldName("direct_only");
StoneSerializers.nullable(StoneSerializers.boolean_()).serialize(paramListSharedLinksArg.directOnly, paramJsonGenerator);
}
if (!paramBoolean) {
paramJsonGenerator.writeEndObject();
}
}
}
}
|
[
"[email protected]"
] | |
22851d77d48eccd588c3c7f703fe1822467f15c8
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_8eb8eed712bae385ecfe6c81d500cb8a1b6a6a0c/E4Dialog/25_8eb8eed712bae385ecfe6c81d500cb8a1b6a6a0c_E4Dialog_s.java
|
0e048a1d194841755ae5d48d03e7c6e7aa0f8813
|
[] |
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,170
|
java
|
/**
* Copyright 2004-2013 Riccardo Solmi. All rights reserved.
* This file is part of the Whole Platform.
*
* The Whole Platform is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Whole Platform is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the Whole Platform. If not, see <http://www.gnu.org/licenses/>.
*/
package org.whole.lang.e4.ui.dialogs;
import static org.whole.lang.e4.ui.api.IUIConstants.*;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.e4.core.commands.ECommandService;
import org.eclipse.e4.core.commands.EHandlerService;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.bindings.EBindingService;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.bindings.keys.KeySequence;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.whole.lang.e4.ui.actions.ActionRegistry;
import org.whole.lang.e4.ui.actions.E4KeyHandler;
import org.whole.lang.e4.ui.api.IUIProvider;
import org.whole.lang.e4.ui.handler.HandlersBehavior;
import org.whole.lang.e4.ui.menu.JFaceMenuBuilder;
import org.whole.lang.e4.ui.menu.PopupMenuProvider;
import org.whole.lang.e4.ui.util.E4Utils;
import org.whole.lang.e4.ui.viewers.E4GraphicalViewer;
import org.whole.lang.model.IEntity;
import org.whole.lang.queries.reflect.QueriesTemplateManager;
import org.whole.lang.reflect.ReflectionFactory;
/**
* @author Enrico Persiani
*/
@SuppressWarnings("restriction")
public class E4Dialog extends Dialog {
protected E4GraphicalViewer viewer;
protected ActionRegistry actionRegistry;
protected IUIProvider<IMenuManager> contextMenuProvider;
@Inject
public E4Dialog(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {
super(shell);
}
@Inject IEclipseContext context;
@Inject ESelectionService selectionService;
@Inject EHandlerService handlerService;
@Inject ECommandService commandService;
@Inject EModelService modelService;
@Inject MApplication application;
@Inject EBindingService bindingService;
@Override
protected Control createDialogArea(Composite parent) {
//FIXME workaround due to an eclipse compatibility layer bug
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=386329
// safely delete the following line of code as soon as the compatibility layer is removed
context = context.getParent();
selectionService = context.get(ESelectionService.class);
handlerService = context.get(EHandlerService.class);
bindingService = context.get(EBindingService.class);
IEntity entity = QueriesTemplateManager.instance().create("FileArtifact generator");
viewer = new E4GraphicalViewer(parent);
viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
selectionService.setSelection(E4Utils.createSelectionBindings(event));
}
});
viewer.getControl().addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
}
@Override
public void focusGained(FocusEvent e) {
context.set(E4GraphicalViewer.class, viewer);
}
});
viewer.setKeyHandler(new E4KeyHandler());
viewer.setContents(entity);
viewer.setInteractive(entity, true, true, true);
viewer.flush();
ReflectionFactory.getHistoryManager(entity).setHistoryEnabled(true);
context.set(E4GraphicalViewer.class, viewer);
actionRegistry = createActionRegistry();
HandlersBehavior.registerHandlers(handlerService);
contextMenuProvider = new PopupMenuProvider<IContributionItem, IMenuManager>(new JFaceMenuBuilder(context, actionRegistry));
viewer.setContextMenu(new ContextMenuProvider(viewer) {
@Override
public void buildContextMenu(IMenuManager menuManager) {
contextMenuProvider.populate(menuManager);
}
});
return parent;
}
protected ActionRegistry createActionRegistry() {
ActionRegistry actionRegistry = new ActionRegistry(context, getShell());
IAction undoAction = actionRegistry.getAction(EDIT_UNDO);
ParameterizedCommand command = commandService.createCommand(EDIT_UNDO, null);
viewer.getKeyHandler().put((KeySequence) bindingService.getBestSequenceFor(command), true, undoAction);
IAction redoAction = actionRegistry.getAction(EDIT_REDO);
command = commandService.createCommand(EDIT_REDO, null);
viewer.getKeyHandler().put((KeySequence) bindingService.getBestSequenceFor(command), true, redoAction);
IAction deleteAction = actionRegistry.getAction(EDIT_DELETE);
command = commandService.createCommand(EDIT_DELETE, null);
viewer.getKeyHandler().put((KeySequence) bindingService.getBestSequenceFor(command), true, deleteAction);
return actionRegistry;
}
}
|
[
"[email protected]"
] | |
db4754b4d57347f99d0fe1b777bd3ee2cdccb923
|
2937e29ae02d953807d924d27fd832a11c7ac6ee
|
/java-project2-server/src28/main/java/com/eomcs/lms/ServerApp.java
|
ff65a64c908ac8d96e9b5901e252dd8a457723fe
|
[] |
no_license
|
jeonjinwook/bitcamp-java-2018-12
|
ebbcc5732bd42fa3547b74d6591e415aac4c63de
|
d6bd2e2721bb18ce7be7bdc24f30cdd6f0073dfc
|
refs/heads/master
| 2021-08-06T18:46:42.587398
| 2019-10-23T14:00:25
| 2019-10-23T14:00:25
| 163,650,666
| 0
| 0
| null | 2020-04-30T12:44:13
| 2018-12-31T08:00:39
|
Java
|
UTF-8
|
Java
| false
| false
| 10,464
|
java
|
// 28단계: Log4J 1.x 적용하기
// => 애플리케이션을 실행하는 중에 내부 상태를 확인할 목적으로
// 기록을 남기는 것을 로깅(logging)이라 한다.
// => 로깅은 애플리케이션을 실행하는 콘솔창으로 출력할 수도 있고,
// 파일이나 네트웍으로도 출력할 수 있다.
// => 보통 실무에서는 파일로 기록을 남긴다.
// => 로깅 작업을 도와주는 대표적인 라이브러리가 log4j 이다.
// 출력 레벨에 따라 로깅을 조절할 수 있어 편리한다.
//
// 작업
// 1) log4j 1.x 라이브러리를 추가한다.
// => mvnrepository.com 에서 log4j 검색
// => build.gradle 에 라이브러리 추가한다.
// => gradle eclipse 실행한다.
// => 이클립스 프로젝트 갱신한다.
// 2) Log4J 설정 파일 준비한다.
// => CLASSPATH 루트 패키지에 log4j.properties 파일을 생성한다.
// 예) src/main/resources/log4j.properties
// 3) Mybatis에서 사용할 로깅 라이브러리 지정하기
// => SqlSessionFactory 객체를 생성할 때 어떤 로깅 라이브러리를 사용할 지 지정한다.
// => MybatisConfig.java 에서 SqlSessionFactory 생성하는 메서드 안에 다음 코드 추가한다.
// LogFactory.useLog4JLogging();
// Log4J 설정법
// => CLASSPATh 루트 패키지에 log4j.properties 이름으로 설정 파일을 둔다.
// 1) 출력 등급 설정
// => log4j.rootLogger=DEBUG, ...
// - rootLogger 에 설정하면 모든 클래스에 대해 적용된다.
// => log4j.logger.com.eomcs.lms.service = ERROR
// - com.eomcs.lms.service 패키지에 대해서서는 ERROR 레벨을 적용한다.
// - 즉 rootLogger 에 기본 출력 등급을 설정하고,
// 특정 패키지 전체나 특정 클래스에 대해 등급을 바꿀 때 사용한다.
// => 다음과 같이 등급을 조절할 수 있다.
// rootLogger = DEBUF
// com.eomcs.lms.dao = ERROR
// com.eomcs.lms.service = FATAL
// com.eomcs.lms.handler = INFO
// 따로 지정하지 않으면 rootLogger의 출력 등급을 적용한다.
// => 등급
// FATAL : 애플리케이션을 중지할 만큼 치명적인 오류일 경우 ex) DBMS 연결안됨.
// ERROR : 계속 애플리케이션을 실행해도 되는 오류일 경우 es) 날짜 형식이 잘못되어 형변환 오류가 발생
// WARN : 잠재적인 위험을 안고 있는 경우. 예) 서버와의 소켓 연결을 close() 하지 못햇을 때,
// INFO : 애플리케이션의 주요 실행 정보. 예) 어떤 IP의 클라이언트의 정속 정보
// DEBUG : 애플리케이션의 내부 실행 상태를 추적해 볼 수 있는 정보.
// 예) Mybatis가 실행하는 SQL, SQL을 실행할 때 in-parameter에 설정되는 값.
// TRACE : 디버그 보다 더 상세한 정보
// 예) IoC 컨테이너가 생성한 객체 목록
//
// => 등급에 따른 출력제어
// FATAL > ERROR > WARN > INFO > DEBUG > TRACE
// - 지정된 등급 이상의 로그는 모두 출력된다.
// - 즉 INFO 등급의 로그만 출력하도록 했으면,
// INFO 보다 큰 레벨(WARN, DRROR, FATAL)의 로그도
//
// 2) 출력 담당자 지정
// => 어디로 출력한 것인지 지정한다.
// => log4j.rootLogger=출력등급, 담당자이름
// log4j.appender.담당자이름=담당자가 출력하기 위해 사용할 도구(패키지명을 포함한 클래스명)
// 예)
// log4j.rootLogger=DEBUG, A
// log4j.appender.A=org.apache.log4j.ConsoleAppender
// => 출력도구
// org.apache.log4j.ConsoleAppender : 콘솔 창으로 출력. 즉 System.out/System.err 객체를 사용하여 출력
// org.apache.log4j.Fileappender : 지정한 파일로 출력.
// org.apache.log4j.net.SocketAppender : 네트워크의 다른 컴퓨터로 출력
// 3) 출력 형식 지정
// => 출력할 문자열의 형식을 지정할 수 있다.
// => log4j.appender.담당자명.layout=출력형식을 다룰 클래스(패키지명을 포함)
// 예) log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
// => 출력 형식을 다룰 클래스
// - org.apache.log4j.SimpleLayout : 단순 문자열 출력.
// - org.apache.log4j.HTMLLayout : HTML 태그로 출력.
// - org.apache.log4j.PatternLayout : 설정 파일에 지정된 형식에 맞춰 출력
// - org.apache.log4j.xml.XMLLayout : XML 태그로 출력.
// 4) 출력 형식의 패턴 설정하기
// => PatternLayout을 사용하여 출력할 때 설정하는 방법.
// => 문법
// %p - 출력 등급. 예) FATAL, ERROR, WARN, INFO, DEBUG, TRACE
// %자릿수p - 출력 문자열의 자릿수를 지정할 수 있다.
// %t - 스레드 이름. 서버인 경우 동시에 여러 클라이언트가 요청을 한다.
// 따라서 클라이언트 요청을 처리하는 스레드가 다를 수 있다.
// %m - 로그 메세지.
// %n - 줄 바꿈 명령
// %d{yyyy-MM-dd HH:mm:ss} - 년-월-일 시간:분:초 를 출력.
// %c - 분류명 출력. 분류명을 따로 지정하지 않으면 클래스명이 사용된다.
// %C - 클래스명 출력
// %C{개수} - 클래스명을 포함하여 패키지명 개수 지정할 수 있다.
// %M - 로그를 출력하는 메서드명.
//
// Log4j를 코드에서 사용하기
// 1) 특정 클래스로 로그 남기기
// Logger logger = LogManager.getLogger(클래스 타입);
// 2) 특정 분류명으로 로그 남기기
// => 여러 클래스의 로그를 하나로 묶어 표현하고 싶을 때
// Logger logger = LogManager.getLogger("분류명");
//
package com.eomcs.lms;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.ServerSocket;
import java.net.Socket;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.eomcs.lms.context.RequestMappingHandlerMapping;
import com.eomcs.lms.context.RequestMappingHandlerMapping.RequestMappingHandler;
import com.eomcs.lms.handler.Response;
public class ServerApp {
// Command 객체와 그와 관련된 객체를 보관하고 있는 빈 컨테이너
ApplicationContext iocContainer;
// 클라이언트 요청을 처리할 메서드 정보가 들어 있는 객체
RequestMappingHandlerMapping handlerMapping;
// 보통 클래스에서 사용할 로그 출력 객체는 클래스의 스태틱 멤버로 선언한다.
final static Logger logger = LogManager.getLogger(ServerApp.class);
public void service() {
try (ServerSocket ss = new ServerSocket(8888)) {
logger.info("서버 실행 중...");
// Spring IoC 컨테이너 준비
iocContainer = new AnnotationConfigApplicationContext(AppConfig.class);
printBeans();
// Spring IoC 컨테이너에서 RequestMappingHandlerMapping 객체를 꺼낸다.
// 이 객체에 클라이언트 요청을 처리할 메서드 정보가 들어 있다.
handlerMapping =
(RequestMappingHandlerMapping) iocContainer.getBean(RequestMappingHandlerMapping.class);
while (true) {
new RequestHandlerThread(ss.accept()).start();
} // while
} catch (Exception e) {
e.printStackTrace();
} // try(ServerSocket)
}
public static void main(String[] args) throws Exception {
ServerApp app = new ServerApp();
// App 을 실행한다.
app.service();
}
// 바깥 클래스(ServerApp)의 인스턴스 필드를 사용해야 한다면
// Inner 클래스(non-static nested class)로 정의하라!
//
class RequestHandlerThread extends Thread {
Socket socket;
public RequestHandlerThread(Socket socket) {
this.socket = socket;
}
@Override
public void run() {
logger.info("클라이언트 연결되었음.");
try (Socket socket = this.socket;
BufferedReader in = new BufferedReader(
new InputStreamReader(socket.getInputStream()));
PrintWriter out = new PrintWriter(socket.getOutputStream())) {
// 클라이언트의 요청 읽기
String request = in.readLine();
// 클라이언트에게 응답하기
// => 클라이언트 요청을 처리할 메서드를 꺼낸다.
RequestMappingHandler requestHandler = handlerMapping.get(request);
if (requestHandler == null) {
out.println("실행할 수 없는 명령입니다.");
out.println("!end!");
out.flush();
return;
}
try {
// 클라이언트 요청을 처리할 메서드를 찾았다면 호출한다.
requestHandler.method.invoke(
requestHandler.bean, // 메서드를 호출할 때 사용할 인스턴스
new Response(in, out)); // 메서드 파라미터 값
} catch (Exception e) {
out.printf("실행 오류! : %s\n", e.getMessage());
e.printStackTrace();
}
out.println("!end!");
out.flush();
} catch (Exception e) {
logger.error("명령어 실행 중 오류 발생 : " + e.toString());
StringWriter strWriter = new StringWriter();
PrintWriter out = new PrintWriter(strWriter);
e.printStackTrace(out);
logger.error(strWriter.toString());
}
logger.info("클라이언트와 연결 종료.");
}
}
private void printBeans() {
// 개발하는 동안 참고할 로그는 보통 debug 등급으로 출력한다.
logger.debug("-----------------------------------------------------");
String[] names = iocContainer.getBeanDefinitionNames();
for (String name : names) {
logger.debug(String.format("빈 생성 됨 (객체명=%s, ===> 클래스명=%s)", name,
iocContainer.getBean(name).getClass().getName()));
}
logger.debug("-----------------------------------------------------");
}
}
|
[
"[email protected]"
] | |
1ee3f704d3e8174c1c4937ab38aa11b5120f83d7
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module878/src/main/java/module878packageJava0/Foo3.java
|
eda0a45a19e86270c4cae76ea87a0758ae6a53e4
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 387
|
java
|
package module878packageJava0;
import java.lang.Integer;
public class Foo3 {
Integer int0;
Integer int1;
public void foo0() {
new module878packageJava0.Foo2().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"[email protected]"
] | |
ee10c142510a352fd1f01958982382ad4f9cfad4
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/springframework/boot/actuate/mongo/MongoHealthIndicatorTests.java
|
ebe4e7d61cc8c49f271b6c49cdb0f802f3a7394a
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,616
|
java
|
/**
* Copyright 2012-2018 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 org.springframework.boot.actuate.mongo;
import Status.DOWN;
import Status.UP;
import com.mongodb.MongoException;
import org.bson.Document;
import org.junit.Test;
import org.mockito.BDDMockito;
import org.mockito.Mockito;
import org.springframework.boot.actuate.health.Health;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.data.mongodb.core.MongoTemplate;
/**
* Tests for {@link MongoHealthIndicator}.
*
* @author Christian Dupuis
*/
public class MongoHealthIndicatorTests {
private AnnotationConfigApplicationContext context;
@Test
public void mongoIsUp() {
Document commandResult = Mockito.mock(Document.class);
BDDMockito.given(commandResult.getString("version")).willReturn("2.6.4");
MongoTemplate mongoTemplate = Mockito.mock(MongoTemplate.class);
BDDMockito.given(mongoTemplate.executeCommand("{ buildInfo: 1 }")).willReturn(commandResult);
MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate);
Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(UP);
assertThat(health.getDetails().get("version")).isEqualTo("2.6.4");
Mockito.verify(commandResult).getString("version");
Mockito.verify(mongoTemplate).executeCommand("{ buildInfo: 1 }");
}
@Test
public void mongoIsDown() {
MongoTemplate mongoTemplate = Mockito.mock(MongoTemplate.class);
BDDMockito.given(mongoTemplate.executeCommand("{ buildInfo: 1 }")).willThrow(new MongoException("Connection failed"));
MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate);
Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(DOWN);
assertThat(((String) (health.getDetails().get("error")))).contains("Connection failed");
Mockito.verify(mongoTemplate).executeCommand("{ buildInfo: 1 }");
}
}
|
[
"[email protected]"
] | |
bc9b4cf6be633b7230ff9c50a869308af1d796b0
|
a90a7bfc49b5fe3533857383d3e7e5407fe03f82
|
/xconf-automation-tests/src/test/java/com/comcast/xconf/thucydides/pages/dcm/LogUploadSettingsViewPageObjects.java
|
4530ab67c6323343f25352b5219c01a8adaa018e
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
comcast-icfar/xconfserver
|
d8406f4d3baffd511ec386bef9b6c31e65943e63
|
a13989e16510c734d13a1575f992f8eacca8250b
|
refs/heads/main
| 2023-01-11T19:40:56.417261
| 2020-11-17T20:22:37
| 2020-11-17T20:22:37
| 308,412,315
| 0
| 1
|
NOASSERTION
| 2020-11-18T16:48:16
| 2020-10-29T18:11:58
|
Java
|
UTF-8
|
Java
| false
| false
| 3,178
|
java
|
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
*
* 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.
*
* Author: Stanislav Menshykov
* Created: 3/29/16 10:48 AM
*/
package com.comcast.xconf.thucydides.pages.dcm;
import net.thucydides.core.annotations.findby.FindBy;
import net.thucydides.core.pages.PageObject;
import net.thucydides.core.pages.WebElementFacade;
import org.openqa.selenium.WebDriver;
public class LogUploadSettingsViewPageObjects extends PageObject {
public LogUploadSettingsViewPageObjects(WebDriver webDriver) {
super(webDriver);
}
@FindBy(css = "input#logUploadSettingsName")
private WebElementFacade name;
@FindBy(css = "input#uploadOnReboot")
private WebElementFacade uploadOnReboot;
@FindBy(css = "input#numberOfDays")
private WebElementFacade numberOfDays;
@FindBy(css = "input#settingsAreActive")
private WebElementFacade settingsAreActive;
@FindBy(css = "input#uploadRepository")
private WebElementFacade uploadRepository;
@FindBy(css = "input#scheduleType")
private WebElementFacade scheduleType;
@FindBy(css = "input#cronExpression")
private WebElementFacade cronExpression;
@FindBy(css = "input#timeWindow")
private WebElementFacade timeWindow;
@FindBy(css = "input#expressionL1")
private WebElementFacade expressionL1;
@FindBy(css = "input#expressionL2")
private WebElementFacade expressionL2;
@FindBy(css = "input#expressionL3")
private WebElementFacade expressionL3;
public String getName() {
return name.getValue();
}
public String getUploadOnReboot() {
return uploadOnReboot.getValue();
}
public String getNumberOfDays() {
return numberOfDays.getValue();
}
public String getSettingsAreActive() {
return settingsAreActive.getValue();
}
public String getUploadRepository() {
return uploadRepository.getValue();
}
public String getScheduleType() {
return scheduleType.getValue();
}
public String getCronExpression() {
return cronExpression.getValue();
}
public String getTimeWindow() {
return timeWindow.getValue();
}
public String getExpressionL1() {
return expressionL1.getValue();
}
public String getExpressionL2() {
return expressionL2.getValue();
}
public String getExpressionL3() {
return expressionL3.getValue();
}
}
|
[
"[email protected]"
] | |
0ff4a32e9018e0fd8cfccb3f72b8c6fe9d95bc76
|
14956dbed8ae4fba1d65b9829d9405fcf43ac698
|
/Cyber Security/Capture the Flag Competitions/2020/STACK the Flags/Mobile/Decompiled/sources/b/d/a/a/r/d.java
|
7c7169f6cecfb167d50ff82d58c79102ac6844d9
|
[] |
no_license
|
Hackin7/Programming-Crappy-Solutions
|
ae8bbddad92a48cf70976cec91bf66234c9b4d39
|
ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f
|
refs/heads/master
| 2023-03-21T01:21:00.764957
| 2022-12-28T14:22:33
| 2022-12-28T14:22:33
| 201,292,128
| 12
| 7
| null | 2023-03-05T16:05:34
| 2019-08-08T16:00:21
|
Roff
|
UTF-8
|
Java
| false
| false
| 4,927
|
java
|
package b.d.a.a.r;
import a.b.p.i0;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.Gravity;
import b.d.a.a.j;
public class d extends i0 {
public Drawable q;
public final Rect r;
public final Rect s;
public int t;
public boolean u;
public boolean v;
public d(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public d(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.r = new Rect();
this.s = new Rect();
this.t = 119;
this.u = true;
this.v = false;
TypedArray a2 = f.h(context, attrs, j.ForegroundLinearLayout, defStyle, 0, new int[0]);
this.t = a2.getInt(j.ForegroundLinearLayout_android_foregroundGravity, this.t);
Drawable d2 = a2.getDrawable(j.ForegroundLinearLayout_android_foreground);
if (d2 != null) {
setForeground(d2);
}
this.u = a2.getBoolean(j.ForegroundLinearLayout_foregroundInsidePadding, true);
a2.recycle();
}
public int getForegroundGravity() {
return this.t;
}
public void setForegroundGravity(int foregroundGravity) {
if (this.t != foregroundGravity) {
if ((8388615 & foregroundGravity) == 0) {
foregroundGravity |= 8388611;
}
if ((foregroundGravity & 112) == 0) {
foregroundGravity |= 48;
}
this.t = foregroundGravity;
if (foregroundGravity == 119 && this.q != null) {
this.q.getPadding(new Rect());
}
requestLayout();
}
}
public boolean verifyDrawable(Drawable who) {
return super.verifyDrawable(who) || who == this.q;
}
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
Drawable drawable = this.q;
if (drawable != null) {
drawable.jumpToCurrentState();
}
}
public void drawableStateChanged() {
super.drawableStateChanged();
Drawable drawable = this.q;
if (drawable != null && drawable.isStateful()) {
this.q.setState(getDrawableState());
}
}
public void setForeground(Drawable drawable) {
Drawable drawable2 = this.q;
if (drawable2 != drawable) {
if (drawable2 != null) {
drawable2.setCallback(null);
unscheduleDrawable(this.q);
}
this.q = drawable;
if (drawable != null) {
setWillNotDraw(false);
drawable.setCallback(this);
if (drawable.isStateful()) {
drawable.setState(getDrawableState());
}
if (this.t == 119) {
drawable.getPadding(new Rect());
}
} else {
setWillNotDraw(true);
}
requestLayout();
invalidate();
}
}
public Drawable getForeground() {
return this.q;
}
@Override // a.b.p.i0
public void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
this.v |= changed;
}
public void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
this.v = true;
}
public void draw(Canvas canvas) {
super.draw(canvas);
if (this.q != null) {
Drawable foreground = this.q;
if (this.v) {
this.v = false;
Rect selfBounds = this.r;
Rect overlayBounds = this.s;
int w = getRight() - getLeft();
int h = getBottom() - getTop();
if (this.u) {
selfBounds.set(0, 0, w, h);
} else {
selfBounds.set(getPaddingLeft(), getPaddingTop(), w - getPaddingRight(), h - getPaddingBottom());
}
Gravity.apply(this.t, foreground.getIntrinsicWidth(), foreground.getIntrinsicHeight(), selfBounds, overlayBounds);
foreground.setBounds(overlayBounds);
}
foreground.draw(canvas);
}
}
@TargetApi(21)
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
Drawable drawable = this.q;
if (drawable != null) {
drawable.setHotspot(x, y);
}
}
}
|
[
"[email protected]"
] | |
90f64f1a55e75447264959f6fd599976cead3939
|
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
|
/src/main/java/com/google/android/gms/maps/internal/zzbz.java
|
75bd9793a094d3b4429e6ba30dda556074b5df21
|
[] |
no_license
|
pengju1218/decompiled-apk
|
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
|
b60b54342a8e294486c45b2325fb78155c3c37e6
|
refs/heads/master
| 2022-03-23T02:57:09.115704
| 2019-12-28T23:13:07
| 2019-12-28T23:13:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,836
|
java
|
package com.google.android.gms.maps.internal;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;
import androidx.annotation.Nullable;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.dynamite.DynamiteModule;
public class zzbz {
private static final String TAG = "zzbz";
@SuppressLint({"StaticFieldLeak"})
@Nullable
private static Context zzck;
private static zze zzcl;
/* JADX WARNING: type inference failed for: r1v4, types: [android.os.IInterface] */
/* JADX WARNING: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public static com.google.android.gms.maps.internal.zze zza(android.content.Context r3) {
/*
com.google.android.gms.common.internal.Preconditions.checkNotNull(r3)
com.google.android.gms.maps.internal.zze r0 = zzcl
if (r0 == 0) goto L_0x0008
return r0
L_0x0008:
r0 = 13400000(0xcc77c0, float:1.87774E-38)
int r0 = com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(r3, r0)
if (r0 != 0) goto L_0x005f
java.lang.String r0 = TAG
java.lang.String r1 = "Making Creator dynamically"
android.util.Log.i(r0, r1)
android.content.Context r0 = zzb(r3)
java.lang.ClassLoader r0 = r0.getClassLoader()
java.lang.String r1 = "com.google.android.gms.maps.internal.CreatorImpl"
java.lang.Object r0 = zza(r0, r1)
android.os.IBinder r0 = (android.os.IBinder) r0
if (r0 != 0) goto L_0x002c
r0 = 0
goto L_0x0040
L_0x002c:
java.lang.String r1 = "com.google.android.gms.maps.internal.ICreator"
android.os.IInterface r1 = r0.queryLocalInterface(r1)
boolean r2 = r1 instanceof com.google.android.gms.maps.internal.zze
if (r2 == 0) goto L_0x003a
r0 = r1
com.google.android.gms.maps.internal.zze r0 = (com.google.android.gms.maps.internal.zze) r0
goto L_0x0040
L_0x003a:
com.google.android.gms.maps.internal.zzf r1 = new com.google.android.gms.maps.internal.zzf
r1.<init>(r0)
r0 = r1
L_0x0040:
zzcl = r0
com.google.android.gms.maps.internal.zze r0 = zzcl // Catch:{ RemoteException -> 0x0058 }
android.content.Context r3 = zzb(r3) // Catch:{ RemoteException -> 0x0058 }
android.content.res.Resources r3 = r3.getResources() // Catch:{ RemoteException -> 0x0058 }
com.google.android.gms.dynamic.IObjectWrapper r3 = com.google.android.gms.dynamic.ObjectWrapper.wrap(r3) // Catch:{ RemoteException -> 0x0058 }
int r1 = com.google.android.gms.common.GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE // Catch:{ RemoteException -> 0x0058 }
r0.zza((com.google.android.gms.dynamic.IObjectWrapper) r3, (int) r1) // Catch:{ RemoteException -> 0x0058 }
com.google.android.gms.maps.internal.zze r3 = zzcl
return r3
L_0x0058:
r3 = move-exception
com.google.android.gms.maps.model.RuntimeRemoteException r0 = new com.google.android.gms.maps.model.RuntimeRemoteException
r0.<init>(r3)
throw r0
L_0x005f:
com.google.android.gms.common.GooglePlayServicesNotAvailableException r3 = new com.google.android.gms.common.GooglePlayServicesNotAvailableException
r3.<init>(r0)
throw r3
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.maps.internal.zzbz.zza(android.content.Context):com.google.android.gms.maps.internal.zze");
}
private static <T> T zza(Class<?> cls) {
try {
return cls.newInstance();
} catch (InstantiationException unused) {
String valueOf = String.valueOf(cls.getName());
throw new IllegalStateException(valueOf.length() != 0 ? "Unable to instantiate the dynamic class ".concat(valueOf) : new String("Unable to instantiate the dynamic class "));
} catch (IllegalAccessException unused2) {
String valueOf2 = String.valueOf(cls.getName());
throw new IllegalStateException(valueOf2.length() != 0 ? "Unable to call the default constructor of ".concat(valueOf2) : new String("Unable to call the default constructor of "));
}
}
private static <T> T zza(ClassLoader classLoader, String str) {
try {
return zza(((ClassLoader) Preconditions.checkNotNull(classLoader)).loadClass(str));
} catch (ClassNotFoundException unused) {
String valueOf = String.valueOf(str);
throw new IllegalStateException(valueOf.length() != 0 ? "Unable to find dynamic class ".concat(valueOf) : new String("Unable to find dynamic class "));
}
}
@Nullable
private static Context zzb(Context context) {
Context context2 = zzck;
if (context2 != null) {
return context2;
}
Context zzc = zzc(context);
zzck = zzc;
return zzc;
}
@Nullable
private static Context zzc(Context context) {
try {
return DynamiteModule.load(context, DynamiteModule.PREFER_REMOTE, "com.google.android.gms.maps_dynamite").getModuleContext();
} catch (Exception e) {
Log.e(TAG, "Failed to load maps module, use legacy", e);
return GooglePlayServicesUtil.getRemoteContext(context);
}
}
}
|
[
"[email protected]"
] | |
ddfe17585cfb6d4231215570e83107083c612ae8
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-eflo-controller/src/main/java/com/aliyuncs/eflo_controller/model/v20221215/TagResourcesResponse.java
|
ec4f0fb952089a797e4c4df34bab9fdc41aedfd3
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,310
|
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 com.aliyuncs.eflo_controller.model.v20221215;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.eflo_controller.transform.v20221215.TagResourcesResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class TagResourcesResponse extends AcsResponse {
private String requestId;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
@Override
public TagResourcesResponse getInstance(UnmarshallerContext context) {
return TagResourcesResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"[email protected]"
] | |
bd6eec714941e6f6275f98793d8e5487540f7e17
|
ae5fb8e762559c13d09c0724f95f8e0dbbe6a58d
|
/ext/bundles/org.springframework.web/src/main/java/org/springframework/web/context/support/RequestHandledEvent.java
|
cdb75aef75460860a41587c677154c216f7613ad
|
[
"Apache-2.0"
] |
permissive
|
GIP-RECIA/esco-grouper-ui
|
1b840844aa18ea6a752399b4ba8441fd08766aa1
|
d48ad3cb0a71d5811bbd49f9e6911ee778af1c78
|
refs/heads/master
| 2021-01-10T17:30:30.880810
| 2014-09-02T08:11:55
| 2014-09-02T08:11:55
| 8,556,656
| 0
| 1
| null | 2014-09-02T08:11:55
| 2013-03-04T14:01:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,489
|
java
|
/**
* Copyright (C) 2009 GIP RECIA http://www.recia.fr
* @Author (C) 2009 GIP RECIA <[email protected]>
* @Contributor (C) 2009 SOPRA http://www.sopragroup.com/
* @Contributor (C) 2011 Pierre Legay <[email protected]>
*
* 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 2002-2007 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 org.springframework.web.context.support;
import org.springframework.context.ApplicationEvent;
/**
* Event raised when a request is handled within an ApplicationContext.
*
* <p>Supported by Spring's own FrameworkServlet (through a specific
* ServletRequestHandledEvent subclass), but can also be raised by any
* other web component. Used, for example, by Spring's out-of-the-box
* PerformanceMonitorListener.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since January 17, 2001
* @see ServletRequestHandledEvent
* @see PerformanceMonitorListener
* @see org.springframework.web.servlet.FrameworkServlet
* @see org.springframework.context.ApplicationContext#publishEvent
*/
public class RequestHandledEvent extends ApplicationEvent {
/** Session id that applied to the request, if any */
private String sessionId;
/** Usually the UserPrincipal */
private String userName;
/** Request processing time */
private final long processingTimeMillis;
/** Cause of failure, if any */
private Throwable failureCause;
/**
* Create a new RequestHandledEvent with session information.
* @param source the component that published the event
* @param sessionId the id of the HTTP session, if any
* @param userName the name of the user that was associated with the
* request, if any (usually the UserPrincipal)
* @param processingTimeMillis the processing time of the request in milliseconds
*/
public RequestHandledEvent(Object source, String sessionId, String userName, long processingTimeMillis) {
super(source);
this.sessionId = sessionId;
this.userName = userName;
this.processingTimeMillis = processingTimeMillis;
}
/**
* Create a new RequestHandledEvent with session information.
* @param source the component that published the event
* @param sessionId the id of the HTTP session, if any
* @param userName the name of the user that was associated with the
* request, if any (usually the UserPrincipal)
* @param processingTimeMillis the processing time of the request in milliseconds
* @param failureCause the cause of failure, if any
*/
public RequestHandledEvent(
Object source, String sessionId, String userName, long processingTimeMillis, Throwable failureCause) {
this(source, sessionId, userName, processingTimeMillis);
this.failureCause = failureCause;
}
/**
* Return the processing time of the request in milliseconds.
*/
public long getProcessingTimeMillis() {
return this.processingTimeMillis;
}
/**
* Return the id of the HTTP session, if any.
*/
public String getSessionId() {
return this.sessionId;
}
/**
* Return the name of the user that was associated with the request
* (usually the UserPrincipal).
* @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
*/
public String getUserName() {
return this.userName;
}
/**
* Return whether the request failed.
*/
public boolean wasFailure() {
return (this.failureCause != null);
}
/**
* Return the cause of failure, if any.
*/
public Throwable getFailureCause() {
return this.failureCause;
}
/**
* Return a short description of this event, only involving
* the most important context data.
*/
public String getShortDescription() {
StringBuffer sb = new StringBuffer();
sb.append("session=[").append(this.sessionId).append("]; ");
sb.append("user=[").append(this.userName).append("]; ");
return sb.toString();
}
/**
* Return a full description of this event, involving
* all available context data.
*/
public String getDescription() {
StringBuffer sb = new StringBuffer();
sb.append("session=[").append(this.sessionId).append("]; ");
sb.append("user=[").append(this.userName).append("]; ");
sb.append("time=[").append(this.processingTimeMillis).append("ms]; ");
sb.append("status=[");
if (!wasFailure()) {
sb.append("OK");
}
else {
sb.append("failed: ").append(this.failureCause);
}
sb.append(']');
return sb.toString();
}
public String toString() {
return ("RequestHandledEvent: " + getDescription());
}
}
|
[
"[email protected]"
] | |
eeeda830816a84d929261781f6a7b8252df91286
|
24bc32e0a59c1def4fe5c42110e48e23c39bd288
|
/LeetCode/src/Medium/no18/Solution.java
|
e97f628a28d81f5effb0eb29135bd902d9cc79e3
|
[] |
no_license
|
Sword-Is-Cat/LeetCode
|
01e47108153d816947cad48f4b073a1743dd46c8
|
73b08b0945810fb4b976a2a5d3bc46cefbd923b6
|
refs/heads/master
| 2023-08-30T21:45:58.136842
| 2023-08-29T00:22:35
| 2023-08-29T00:22:35
| 253,831,514
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 765
|
java
|
package Medium.no18;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class Solution {
List<List<Integer>> answer;
int[] num;
Integer[] arr;
public List<List<Integer>> fourSum(int[] nums, int target) {
answer = new ArrayList<>();
arr = new Integer[4];
Arrays.sort(nums);
num = nums;
process(0, -1, 0, target);
return answer;
}
void process(int depth, int index, int sum, int target) {
if (depth == 4) {
if (sum == target)
answer.add(Arrays.asList(arr.clone()));
return;
}
int checkDupl = 1000000001;
for (int i = index + 1; i < num.length; i++) {
if (num[i] == checkDupl)
continue;
checkDupl = num[i];
arr[depth] = num[i];
process(depth + 1, i, sum + num[i], target);
}
}
}
|
[
"[email protected]"
] | |
6db094c016c63fd87c4bd2837fb7c99a2255e9db
|
b1b77bb1ed47586f96d8f2554a65bcbd0c7162cc
|
/NETFLIX/staash/staash-mesh/src/main/java/com/netflix/staash/mesh/InstanceInfo.java
|
860fc2ccf3d297209ff72367b5cb53103fc9fbcf
|
[] |
no_license
|
DanHefrman/stuff
|
b3624d7089909972ee806211666374a261c02d08
|
b98a5c80cfe7041d8908dcfd4230cf065c17f3f6
|
refs/heads/master
| 2023-07-10T09:47:04.780112
| 2021-08-13T09:55:17
| 2021-08-13T09:55:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,317
|
java
|
/*******************************************************************************
* /***
* *
* * Copyright 2013 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 com.netflix.staash.mesh;
import java.util.UUID;
public class InstanceInfo {
private final UUID uuid;
private final String id;
public InstanceInfo(String id, UUID uuid) {
this.uuid = uuid;
this.id = id;
}
public UUID getUuid() {
return uuid;
}
public String getId() {
return id;
}
public String toString() {
return uuid.toString() + "(" + id + ")";
}
}
|
[
"[email protected]"
] | |
a25091a37a03f635f8a0f8c69762d26798f0296b
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__byte_max_add_31.java
|
33bd764da565407d39d80de31d233b134983618d
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,160
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__byte_max_add_31.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-31.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for byte
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 31 Data flow: make a copy of data within the same method
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__byte_max_add_31 extends AbstractTestCase
{
public void bad() throws Throwable
{
byte data_copy;
{
byte data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Byte.MAX_VALUE;
data_copy = data;
}
{
byte data = data_copy;
/* POTENTIAL FLAW: if data == Byte.MAX_VALUE, this will overflow */
byte result = (byte)(data + 1);
IO.writeLine("result: " + result);
}
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
byte data_copy;
{
byte data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
data_copy = data;
}
{
byte data = data_copy;
/* POTENTIAL FLAW: if data == Byte.MAX_VALUE, this will overflow */
byte result = (byte)(data + 1);
IO.writeLine("result: " + result);
}
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
byte data_copy;
{
byte data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Byte.MAX_VALUE;
data_copy = data;
}
{
byte data = data_copy;
/* FIX: Add a check to prevent an overflow from occurring */
if (data < Byte.MAX_VALUE)
{
byte result = (byte)(data + 1);
IO.writeLine("result: " + result);
}
else {
IO.writeLine("data value is too large to perform addition.");
}
}
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"[email protected]"
] | |
d2778e33c2a3498ba448fff8fb0d5545320d89ed
|
68a19507f18acff18aa4fa67d6611f5b8ac8913c
|
/piaoljf/jf-piaol/src/main/java/hgtech/jf/piaol/SetupPiaolApplicationContextHardCoded.java
|
c178c2d23fd2a76f59c42ae1b5789a426878e083
|
[] |
no_license
|
ksksks2222/pl-workspace
|
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
|
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
|
refs/heads/master
| 2021-09-13T08:59:17.177105
| 2018-04-27T09:46:42
| 2018-04-27T09:46:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,754
|
java
|
/**
* @文件名称:DomainSetup.java
* @类路径:hgtech.jfaccount
* @描述:TODO
* @作者:xinglj
* @时间:2014-9-5下午2:48:11
*/
package hgtech.jf.piaol;
import java.util.List;
import hgtech.jf.JfProperty;
import hgtech.jf.tree.TreeUtil;
import hgtech.jf.tree.WithChildren;
import hgtech.jfaccount.JfAccountTypeUK;
import hgtech.jfaccount.JfTradeType;
import hgtech.jfaccount.TradeType;
import hgtech.jfaccount.Domain;
import hgtech.jfaccount.IndustryType;
import hgtech.jfaccount.JfAccountType;
import hgtech.jfaccount.dao.JfAccountTypeDao;
import hgtech.jfcal.model.CalModel;
/**
* @类功能说明:票量网积分的硬编码配置类
* @类修改者:
* @修改日期:2014-9-5下午2:48:11
* @修改说明:
* @公司名称:浙江汇购科技有限公司
* @作者:xinglj
* @创建时间:2014-9-5下午2:48:11
*
*/
public class SetupPiaolApplicationContextHardCoded {
/**
* 这个内部积分系统的单位
*/
public static Domain sysDomain;
//消费类型:成长值、消费
private static TradeType ctGrow, ctConsume;
/**
* 行业类别
*/
public static TradeType ctTravel;
/**
* 成长积分类型
*/
public static JfAccountType accTypeGrow=new JfAccountType();
/**
* 消费积分类型
*/
public static JfAccountType accTypeConsume=new JfAccountType();
/**
* 行业顶级积分类型
*/
private static JfAccountType accTypeTravel;
/**
*
*/
public static JfAccountType topAcctType;
public static JfAccountTypeDao acctTypeHome =new SetupSpiApplicationContext. JfAccountTypeMemDao();
public static CalModel calModel=new CalModel();
private static boolean init=false;
public static void init(){
if(init)
return;
//积分交易类型
JfTradeType.init();
// 消费形态
//travel
ctGrow=new TradeType();
ctGrow.code="grow";
ctGrow.name="成长值";
ctConsume=new TradeType();
ctConsume.code="consume";
ctConsume.name="票豆";
ctTravel =new TradeType();
ctTravel.code="e-ticket";
ctTravel.name="商旅业";
ctConsume.upperType=ctTravel;
ctTravel.getSubList().add(ctConsume);
ctGrow.upperType=ctTravel;
ctTravel.getSubList().add(ctGrow);
// 机构
sysDomain =new Domain();
sysDomain.code="piaol";
sysDomain.name="票量网";
sysDomain.jfRate=1.0f;
sysDomain.type=ctTravel;
sysDomain.ip=JfProperty.getProperties().getProperty("clientip");
topAcctType=acctTypeHome.genAccountTypeTree(acctTypeHome, sysDomain,sysDomain.type);
topAcctType.setName("票量积分");
accTypeGrow=acctTypeHome.get(new JfAccountTypeUK( sysDomain, ctGrow));
accTypeGrow.setName("成长值");
accTypeConsume=acctTypeHome.get(new JfAccountTypeUK(sysDomain, ctConsume));
accTypeConsume.setName("票豆");
accTypeTravel=acctTypeHome.get(new JfAccountTypeUK(sysDomain, ctTravel));
System.out.println("all account types:\n"+acctTypeHome.getEntities());
System.out.println("trade:\n"+TreeUtil.toTreeString(ctTravel, 0));
System.out.println("domain:\n"+TreeUtil.toTreeString(sysDomain, 0));
System.out.println("accounttype:\n"+ TreeUtil.toTreeString(topAcctType, 0));
// rule init
// calModel.project.ruleSet.add(r);
init=true;
}
public static JfAccountType findType(String code){
List<WithChildren<JfAccountType>> list=accTypeTravel.getSubList();
for(WithChildren<JfAccountType> t:list){
JfAccountType account=(JfAccountType)t;
if(account.getCode().equals(code))
return (JfAccountType)account;
}
return null;
}
public static void main(String[] args) {
SetupSpiApplicationContext.init();
}
}
|
[
"[email protected]"
] | |
f5cf9746981b1e7f75f5cc095b7dcc82b69500ca
|
4edafc8c9af7df066df4fa82c1a78143be91beca
|
/cap06/21/cap06/Esercizio3_3.java
|
a1a36cdc96f533fc8c69349dd91781235a279a41
|
[
"MIT"
] |
permissive
|
garganti/info2_oop_unibg
|
be5e84828b757003f7dc4d887bbb503d519d3c1b
|
33a83d29c8701b5fa9ecc97b10cc359db73600cf
|
refs/heads/master
| 2021-08-23T09:45:21.672680
| 2021-06-15T15:19:56
| 2021-06-15T15:19:56
| 83,547,234
| 32
| 16
|
MIT
| 2020-03-05T17:20:18
| 2017-03-01T11:29:13
|
Java
|
ISO-8859-13
|
Java
| false
| false
| 983
|
java
|
package cap06;
import java.util.StringTokenizer;
import prog.io.FileInputManager;
import prog.utili.SequenzaOrdinata;
public class Esercizio3_3 {
public static void main(String[] args) {
FileInputManager java = new FileInputManager("java.txt");
SequenzaOrdinata<String> parole = new SequenzaOrdinata<>();
// leggo le parole nel file che potrebbero essere
// su pił linee
while(true) {
// leggi una linea
String line = java.readLine();
if (line == null) break;
// spezza le parole nella linea line
StringTokenizer st = new StringTokenizer(line);
while(st.hasMoreTokens()) {
// aggiungi la parola
//parole.add(st.nextToken());
// variante, aggiungi il minuscolo solo se non presente
String parola = st.nextToken().toLowerCase();
if (!parole.contains(parola)) {
parole.add(parola);
}
}
}
// chiudiamo il file
java.close();
// ristampa le parole
for(String s: parole) {
System.out.println(s);
}
}
}
|
[
"[email protected]"
] | |
39bb86c27b396ee5093cb14346fa46c683f7e7ce
|
73f62e55b5963d5a6e7a825ae9d1bcc43801e6a4
|
/refactoring-to-patterns/src/main/java/com/uj/study/EncapsulateClasseswithFactory/client/DescriptorClient.java
|
ee5b38632fe37b3096f546c57a82e98b376268bf
|
[] |
no_license
|
unclejet/design-patterns
|
e68fa75871b7ec94b1535b5351984c97a3d07415
|
f3e84145f8b968ea58fb4b5c210fcd9ac19e3498
|
refs/heads/master
| 2022-12-28T02:00:01.982248
| 2020-10-13T23:31:11
| 2020-10-13T23:31:11
| 289,127,943
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 947
|
java
|
package com.uj.study.EncapsulateClasseswithFactory.client;
import com.uj.study.EncapsulateClasseswithFactory.descriptors.AttributeDescriptor;
import java.util.ArrayList;
import java.util.List;
/**
* @author :unclejet
* @date :Created in 2020/9/8 上午6:52
* @description:
* @modified By:
* @version:
*/
public class DescriptorClient {
protected List createAttributeDescriptors() {
List result = new ArrayList();
result.add(AttributeDescriptor.forInteger("remoteId", getClass()));
result.add(AttributeDescriptor.forDate("createdDate", getClass()));
result.add(AttributeDescriptor.forDate("lastChangedDate", getClass()));
result.add(AttributeDescriptor.forInteger("optimisticLockVersion", getClass()));
result.add(AttributeDescriptor.forUser("createdBy", getClass()));
result.add(AttributeDescriptor.forUser("lastChangedBy", getClass()));
return result;
}
}
|
[
"[email protected]"
] | |
2d4b133d9e6a9aad38079c1a682a2d1a96c6e85d
|
d55d17769a21ed3d0bfc41c4eaa8f60711144621
|
/java-advanced/src/main/java/advanced/oop/abstraction/Shape.java
|
75c70b8ff426ca0222c77d790e0de15711b5bf4f
|
[] |
no_license
|
rogers1235/new-project
|
fc42ca0f85c1a606a4196624088230338ddba496
|
b9df64b6f9e2924211fe70b80c8ab923624ec817
|
refs/heads/main
| 2023-08-04T08:28:18.018401
| 2021-09-16T20:22:38
| 2021-09-16T20:22:38
| 407,303,470
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
package advanced.oop.abstraction;
public abstract class Shape {
String color;
// abstract class can have constructor
public Shape(String color) {
System.out.println("Shape constructor called");
this.color = color;
}
// abstract methods
abstract double area();
public abstract String toString();
// concrete method
public String getColor() {
return color;
}
}
|
[
"[email protected]"
] | |
822bf64bdcabbcec08e418f02a654dd4e5b6a138
|
31f63618c7f57253140e333fc21bac2d71bc4000
|
/saflute/src/main/java/org/dbflute/remoteapi/exception/retry/ClientErrorRetryDeterminer.java
|
9e0d2768bd6afe621b49275399baad20b2f04072
|
[
"Apache-2.0"
] |
permissive
|
dbflute-session/memorable-saflute
|
b6507d3a54dad5e9c67539a9178ff74287c0fe2b
|
c5c6cfe19c9dd52c429d160264e1c8e30b4d51c5
|
refs/heads/master
| 2023-03-07T11:02:15.495590
| 2023-02-22T13:20:03
| 2023-02-22T13:20:03
| 50,719,958
| 0
| 1
| null | 2023-02-22T13:20:05
| 2016-01-30T10:26:15
|
Java
|
UTF-8
|
Java
| false
| false
| 836
|
java
|
/*
* Copyright 2015-2017 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 org.dbflute.remoteapi.exception.retry;
/**
* @author jflute
* @since 0.3.4 (2017/09/23 Sutarday)
*/
public interface ClientErrorRetryDeterminer {
boolean ready(ClientErrorRetryResource resource);
}
|
[
"[email protected]"
] | |
2ed145a5cdcefdb52e08838333f8e931d8484c52
|
bcc1eea8bff22eaff586119b511ddf34495eb9b9
|
/crazy-java/10/10.5/PrintStackTraceTest.java
|
9416d20f240904f3e2f65f9c5152b5321cd80286
|
[] |
no_license
|
Alexander360/code-library
|
32dfc55cc5636ce508cb3a9880b40b793f09061f
|
bf943051066cf26fb6b7755e143f41fc48ff47ec
|
refs/heads/master
| 2020-04-10T00:55:28.324576
| 2018-12-06T03:41:04
| 2018-12-06T03:41:04
| 160,700,054
| 1
| 0
| null | 2018-12-06T16:13:55
| 2018-12-06T16:13:54
| null |
GB18030
|
Java
| false
| false
| 750
|
java
|
/**
* Description:
* <br/>网站: <a href="http://www.crazyit.org">疯狂Java联盟</a>
* <br/>Copyright (C), 2001-2016, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee [email protected]
* @version 1.0
*/
class SelfException extends RuntimeException
{
SelfException(){}
SelfException(String msg)
{
super(msg);
}
}
public class PrintStackTraceTest
{
public static void main(String[] args)
{
firstMethod();
}
public static void firstMethod()
{
secondMethod();
}
public static void secondMethod()
{
thirdMethod();
}
public static void thirdMethod()
{
throw new SelfException("自定义异常信息");
}
}
|
[
"[email protected]"
] | |
df43e6a94db6e0b5c316874d6794f6c1b432d90a
|
dcbec0cdd7c337f3572830f30adedee756ce7eae
|
/project-pension-core/src/main/java/com/longjun/cto/framework/sm/pay/web/PayIapReceiptController.java
|
a78b6c87187319dd0ceb19e44de588b6d1899af2
|
[] |
no_license
|
lm568618500/project-pension
|
8c590e7f8eeffab7d3ae21e9610fee2745017c8c
|
68c1fcd1206ea36482c1a21b19368d32c4262a29
|
refs/heads/master
| 2023-03-14T10:13:13.418797
| 2021-03-04T02:38:50
| 2021-03-04T02:38:50
| 330,593,390
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,919
|
java
|
package com.longjun.cto.framework.sm.pay.web;
import org.springframework.beans.factory.annotation.Autowired;
import com.eims.cto.framework.standard.base.StandardBaseController;
import com.longjun.cto.framework.sm.pay.entity.dto.PayIapReceiptDto;
import com.longjun.cto.framework.sm.pay.entity.dto.PayIapReceiptModifyDto;
import com.longjun.cto.framework.sm.pay.entity.model.PayIapReceiptModel;
import com.longjun.cto.framework.sm.pay.entity.view.PayIapReceiptView;
import com.longjun.cto.framework.sm.pay.service.IPayIapReceiptService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.eims.cto.framework.common.base.page.PageUtils;
import com.eims.cto.framework.common.base.ret.ActionResult;
import com.eims.cto.framework.common.base.ret.ApiResult;
/**
* PayIapReceipt Coontroller
* @author yangxuan
* @date 2019-03-31 05:17:12
*/
@RequestMapping("/mgn/sm/pay/payIapReceipt")
@Controller
public class PayIapReceiptController extends StandardBaseController {
@Autowired
IPayIapReceiptService iPayIapReceiptService;
/**
* 列表渲染页面
* @return
*/
@RequestMapping(value = "/payIapReceiptListInit" , method = {RequestMethod.POST , RequestMethod.GET})
public ModelAndView payIapReceiptListInit() {
ModelAndView model = getModelAndView("/mgn/sm/pay/payIapReceipt/payIapReceiptListInit");
return model;
}
/**
* 新增渲染页面
* @return
*/
@RequestMapping(value = "/payIapReceiptAddInit" , method = {RequestMethod.POST , RequestMethod.GET})
public ModelAndView payIapReceiptAddInit() {
ModelAndView model = getModelAndView("/mgn/sm/pay/payIapReceipt/payIapReceiptAddInit");
return model;
}
/**
* 编辑渲染页面
* @return
*/
@RequestMapping(value = "/payIapReceiptEditInit" , method = {RequestMethod.POST , RequestMethod.GET})
public ModelAndView payIapReceiptEditInit() {
ModelAndView model = getModelAndView("/mgn/sm/pay/payIapReceipt/payIapReceiptEditInit");
return model;
}
/**
* 编辑渲染页面
* @return
*/
@RequestMapping(value = "/payIapReceiptShowInit" , method = {RequestMethod.POST , RequestMethod.GET})
public ModelAndView payIapReceiptShowInit(long id) {
ModelAndView model = getModelAndView("/mgn/sm/pay/payIapReceipt/payIapReceiptShowInit");
PayIapReceiptView ret = this.iPayIapReceiptService.findViewById(id);
model.addObject("view", ret);
return model;
}
/**
* 分页查询
* @return
*/
@ResponseBody
@RequestMapping(value = "/getByPage" , method = {RequestMethod.POST ,RequestMethod.GET})
public ActionResult<PageUtils<PayIapReceiptView>> getByPage(PayIapReceiptDto dto){
PageUtils<PayIapReceiptView> ret = this.iPayIapReceiptService.getByPage(dto);
return ActionResult.ok(ret);
}
/**
* 查询View数据
* @return
*/
@ResponseBody
@RequestMapping(value = "/getViewById" , method = {RequestMethod.GET})
public ActionResult<PayIapReceiptView> getViewById(long id){
PayIapReceiptView ret = this.iPayIapReceiptService.findViewById(id);
return ActionResult.ok(ret);
}
/**
* 查询Model数据
* @return
*/
@ResponseBody
@RequestMapping(value = "/getModelById" , method = {RequestMethod.GET})
public ActionResult<PayIapReceiptModel> findModelById(long id){
PayIapReceiptModel ret = this.iPayIapReceiptService.findModelById(id);
return ActionResult.ok(ret);
}
/**
* 停用
* @param id
* @return
*/
@ResponseBody
@RequestMapping(value = "/stop" , method = {RequestMethod.POST})
public ApiResult stop(long id){
Boolean ret = this.iPayIapReceiptService.stop(id);
return ApiResult.instance().ok("ret" , ret);
}
/**
* 开启
* @param id
* @return
*/
@ResponseBody
@RequestMapping(value = "/start" , method = {RequestMethod.POST})
public ApiResult start(long id ){
Boolean ret = this.iPayIapReceiptService.start(id);
return ApiResult.instance().ok("ret" , ret);
}
/**
* 保存
* @param id
* @return
*/
@ResponseBody
@RequestMapping(value = "/saveModel" , method = {RequestMethod.POST})
public ApiResult saveModel(PayIapReceiptModel model){
this.iPayIapReceiptService.saveModel(model);
return ApiResult.instance().ok("ret" , true);
}
/**
* 保存
* @param id
* @return
*/
@ResponseBody
@RequestMapping(value = "/modify" , method = {RequestMethod.POST})
public ApiResult modify(PayIapReceiptModifyDto model){
this.iPayIapReceiptService.modify(model);
return ApiResult.instance().ok("ret" , true);
}
}
|
[
"[email protected]"
] | |
4bfa32852e7d2a27bf658fff1956d6597219084c
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/com/myfitnesspal/feature/challenges/ui/viewmodel/ChallengePrizesViewModel.java
|
80625e69ff2ec4f1a433619661392fa8bf922fb0
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package com.myfitnesspal.feature.challenges.ui.viewmodel;
import com.myfitnesspal.feature.challenges.model.ChallengeImageOutput;
import com.myfitnesspal.feature.challenges.model.ChallengePrize;
import com.myfitnesspal.framework.mvvm.BaseViewModel;
import java.util.List;
public class ChallengePrizesViewModel extends BaseViewModel {
private ChallengeImageOutput bannerImage;
private List<ChallengePrize> challengePrizeList;
public ChallengePrizesViewModel(List<ChallengePrize> list, ChallengeImageOutput challengeImageOutput) {
this.challengePrizeList = list;
this.bannerImage = challengeImageOutput;
}
public List<ChallengePrize> getChallengePrizeList() {
return this.challengePrizeList;
}
public ChallengeImageOutput getBannerImage() {
return this.bannerImage;
}
}
|
[
"[email protected]"
] | |
9009d4527f346af4b8f5fd377a78dfd1c5cbd6dc
|
291b6128af1bedb6e5f9a4821a13f69edff62618
|
/gmall-oms/src/main/java/com/atguigu/gmall/oms/service/impl/OrderReturnReasonServiceImpl.java
|
9b2cd6b89fbe5d30c85bf148bdb6342f76d752e6
|
[
"Apache-2.0"
] |
permissive
|
joedyli/gmall-1010
|
0ae2c4998b610b92e618ac45314a20f7f0046dbb
|
c212da2465bab4b645d3a3fb2dfcc6c447628892
|
refs/heads/master
| 2022-12-21T14:48:17.237114
| 2020-06-04T11:05:06
| 2020-06-04T11:05:06
| 251,473,083
| 2
| 4
|
Apache-2.0
| 2022-12-16T15:36:46
| 2020-03-31T01:47:55
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
package com.atguigu.gmall.oms.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gmall.common.bean.PageResultVo;
import com.atguigu.gmall.common.bean.PageParamVo;
import com.atguigu.gmall.oms.mapper.OrderReturnReasonMapper;
import com.atguigu.gmall.oms.entity.OrderReturnReasonEntity;
import com.atguigu.gmall.oms.service.OrderReturnReasonService;
@Service("orderReturnReasonService")
public class OrderReturnReasonServiceImpl extends ServiceImpl<OrderReturnReasonMapper, OrderReturnReasonEntity> implements OrderReturnReasonService {
@Override
public PageResultVo queryPage(PageParamVo paramVo) {
IPage<OrderReturnReasonEntity> page = this.page(
paramVo.getPage(),
new QueryWrapper<OrderReturnReasonEntity>()
);
return new PageResultVo(page);
}
}
|
[
"[email protected]"
] | |
4f6bf4d10506f1ae3acf48799a2edf81449257fa
|
f715808c953772dd0fbe869e6fb8d410aea574ee
|
/src/test/java/FastTest2.java
|
78c7f61b2ca06f294892605b28dec7d60dbe7550
|
[] |
no_license
|
irof/ParallelTest
|
6a63e34ed359efe7900d3401eda24aeb754f43c9
|
a2929c8ae47ab0f7a5afb055d425a03662dc7b1e
|
refs/heads/master
| 2021-01-22T11:54:39.195836
| 2013-03-09T05:30:59
| 2013-03-09T05:30:59
| 8,665,340
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 230
|
java
|
import org.junit.Test;
public class FastTest2 {
@Test
public void test1() {
// success
}
@Test
public void test2() {
// success
}
@Test
public void test3() {
throw new AssertionError("fail");
}
}
|
[
"[email protected]"
] | |
0845a17bdc2e91142e5d7a62f1a0f9b1ab96246e
|
774b50fe5091754f23ef556c07a4d1aab56efe27
|
/oag/src/main/java/org/oagis/model/v101/TimeToleranceType.java
|
e140e0cef56f3162d278dd8251647a54e73f21a6
|
[] |
no_license
|
otw1248/thirdpartiess
|
daa297c2f44adb1ffb6530f88eceab6b7f37b109
|
4cbc4501443d807121656e47014d70277ff30abc
|
refs/heads/master
| 2022-12-07T17:10:17.320160
| 2022-11-28T10:56:19
| 2022-11-28T10:56:19
| 33,661,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,712
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.04.09 at 05:03:55 PM CST
//
package org.oagis.model.v101;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for TimeToleranceType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="TimeToleranceType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="UnderDuration" type="{http://www.openapplications.org/oagis/10}DurationMeasureType" minOccurs="0"/>
* <element name="OverDuration" type="{http://www.openapplications.org/oagis/10}DurationMeasureType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TimeToleranceType", propOrder = {
"underDuration",
"overDuration"
})
public class TimeToleranceType {
@XmlElement(name = "UnderDuration")
@XmlSchemaType(name = "anySimpleType")
protected String underDuration;
@XmlElement(name = "OverDuration")
@XmlSchemaType(name = "anySimpleType")
protected String overDuration;
/**
* Gets the value of the underDuration property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUnderDuration() {
return underDuration;
}
/**
* Sets the value of the underDuration property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnderDuration(String value) {
this.underDuration = value;
}
/**
* Gets the value of the overDuration property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOverDuration() {
return overDuration;
}
/**
* Sets the value of the overDuration property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOverDuration(String value) {
this.overDuration = value;
}
}
|
[
"[email protected]"
] | |
d9b3e0cb9b863a3108830c888fbfde65fd00cc9b
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/UpdateAKSNodeDaemonSetRequest.java
|
b02cf89ba9bf4c4f3192bf1f31d33967d2cc20dc
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,071
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sofa20190815.models;
import com.aliyun.tea.*;
public class UpdateAKSNodeDaemonSetRequest extends TeaModel {
@NameInMap("Name")
public String name;
@NameInMap("Namespace")
public String namespace;
@NameInMap("Nodes")
public java.util.List<UpdateAKSNodeDaemonSetRequestNodes> nodes;
@NameInMap("OperatorName")
public String operatorName;
@NameInMap("UpdateStrategy")
public String updateStrategy;
@NameInMap("UpdateVersion")
public String updateVersion;
@NameInMap("Workspace")
public String workspace;
public static UpdateAKSNodeDaemonSetRequest build(java.util.Map<String, ?> map) throws Exception {
UpdateAKSNodeDaemonSetRequest self = new UpdateAKSNodeDaemonSetRequest();
return TeaModel.build(map, self);
}
public UpdateAKSNodeDaemonSetRequest setName(String name) {
this.name = name;
return this;
}
public String getName() {
return this.name;
}
public UpdateAKSNodeDaemonSetRequest setNamespace(String namespace) {
this.namespace = namespace;
return this;
}
public String getNamespace() {
return this.namespace;
}
public UpdateAKSNodeDaemonSetRequest setNodes(java.util.List<UpdateAKSNodeDaemonSetRequestNodes> nodes) {
this.nodes = nodes;
return this;
}
public java.util.List<UpdateAKSNodeDaemonSetRequestNodes> getNodes() {
return this.nodes;
}
public UpdateAKSNodeDaemonSetRequest setOperatorName(String operatorName) {
this.operatorName = operatorName;
return this;
}
public String getOperatorName() {
return this.operatorName;
}
public UpdateAKSNodeDaemonSetRequest setUpdateStrategy(String updateStrategy) {
this.updateStrategy = updateStrategy;
return this;
}
public String getUpdateStrategy() {
return this.updateStrategy;
}
public UpdateAKSNodeDaemonSetRequest setUpdateVersion(String updateVersion) {
this.updateVersion = updateVersion;
return this;
}
public String getUpdateVersion() {
return this.updateVersion;
}
public UpdateAKSNodeDaemonSetRequest setWorkspace(String workspace) {
this.workspace = workspace;
return this;
}
public String getWorkspace() {
return this.workspace;
}
public static class UpdateAKSNodeDaemonSetRequestNodes extends TeaModel {
@NameInMap("Data")
public String data;
public static UpdateAKSNodeDaemonSetRequestNodes build(java.util.Map<String, ?> map) throws Exception {
UpdateAKSNodeDaemonSetRequestNodes self = new UpdateAKSNodeDaemonSetRequestNodes();
return TeaModel.build(map, self);
}
public UpdateAKSNodeDaemonSetRequestNodes setData(String data) {
this.data = data;
return this;
}
public String getData() {
return this.data;
}
}
}
|
[
"[email protected]"
] | |
eef5e90014c37a67c290e758de3ef12fa6daf95f
|
533ff159f125813460432c8d43956788e6da045f
|
/Zemose/ZemoseRegionAdminFiles/sources/com/bumptech/glide/manager/Lifecycle.java
|
13ecbd4c26ad59e342b91fa251c5c5ab96aab4f6
|
[] |
no_license
|
AitoApps/AndroidWorks
|
7747b084e84b8ad769f4552e8b2691d9cdec3f06
|
3c6c7d17f085ee3aa714e66f13fec2a4d8663ca3
|
refs/heads/master
| 2022-03-14T10:57:59.215113
| 2019-12-06T17:03:24
| 2019-12-06T17:03:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package com.bumptech.glide.manager;
import android.support.annotation.NonNull;
public interface Lifecycle {
void addListener(@NonNull LifecycleListener lifecycleListener);
void removeListener(@NonNull LifecycleListener lifecycleListener);
}
|
[
"[email protected]"
] | |
9d2362eaed2f120b2923dd11a4064603d6c31ff2
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-109-11-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java
|
6e0e6b39d3c4e5f2e6f5b0f4a5ec444cdf6b2d5b
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 20:13:16 UTC 2020
*/
package org.xwiki.velocity.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"[email protected]"
] | |
bc5b4a6790222cb2f047270198c25a58398c935e
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/google/android/gms/internal/ads/C15848lo.java
|
35c6bb48bde241e1aeb193b22d05a3a4b8be596e
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,707
|
java
|
package com.google.android.gms.internal.ads;
import android.net.Uri;
import com.google.android.gms.common.util.C15334q;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
@C6505uv
/* renamed from: com.google.android.gms.internal.ads.lo */
public class C15848lo<ReferenceT> {
/* renamed from: a */
public ReferenceT f44603a;
/* renamed from: b */
private final Map<String, CopyOnWriteArrayList<C15742hq<? super ReferenceT>>> f44604b = new HashMap();
/* renamed from: a */
public final boolean mo41735a(Uri uri) {
if (!"gmsg".equalsIgnoreCase(uri.getScheme()) || !"mobileads.google.com".equalsIgnoreCase(uri.getHost())) {
return false;
}
mo39809a(uri.getPath(), acl.m45523a(uri));
return true;
}
/* renamed from: a */
private final synchronized void mo39809a(String str, Map<String, String> map) {
if (acd.m45776a(2)) {
String str2 = "Received GMSG: ";
String valueOf = String.valueOf(str);
acd.m45438a(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2));
for (String str3 : map.keySet()) {
String str4 = (String) map.get(str3);
StringBuilder sb = new StringBuilder(String.valueOf(str3).length() + 4 + String.valueOf(str4).length());
sb.append(" ");
sb.append(str3);
sb.append(": ");
sb.append(str4);
acd.m45438a(sb.toString());
}
}
CopyOnWriteArrayList copyOnWriteArrayList = (CopyOnWriteArrayList) this.f44604b.get(str);
if (copyOnWriteArrayList != null) {
Iterator it = copyOnWriteArrayList.iterator();
while (it.hasNext()) {
ago.f40189a.execute(new C15850lq(this, (C15742hq) it.next(), map));
}
}
}
/* renamed from: a */
public final synchronized void mo41734a(String str, C15742hq<? super ReferenceT> hqVar) {
CopyOnWriteArrayList copyOnWriteArrayList = (CopyOnWriteArrayList) this.f44604b.get(str);
if (copyOnWriteArrayList == null) {
copyOnWriteArrayList = new CopyOnWriteArrayList();
this.f44604b.put(str, copyOnWriteArrayList);
}
copyOnWriteArrayList.add(hqVar);
}
/* renamed from: b */
public final synchronized void mo41736b(String str, C15742hq<? super ReferenceT> hqVar) {
CopyOnWriteArrayList copyOnWriteArrayList = (CopyOnWriteArrayList) this.f44604b.get(str);
if (copyOnWriteArrayList != null) {
copyOnWriteArrayList.remove(hqVar);
}
}
/* renamed from: a */
public final synchronized void mo41733a(String str, C15334q<C15742hq<? super ReferenceT>> qVar) {
CopyOnWriteArrayList copyOnWriteArrayList = (CopyOnWriteArrayList) this.f44604b.get(str);
if (copyOnWriteArrayList != null) {
ArrayList arrayList = new ArrayList();
Iterator it = copyOnWriteArrayList.iterator();
while (it.hasNext()) {
C15742hq hqVar = (C15742hq) it.next();
if (qVar.mo38687a(hqVar)) {
arrayList.add(hqVar);
}
}
copyOnWriteArrayList.removeAll(arrayList);
}
}
/* renamed from: d */
public final synchronized void mo41737d() {
this.f44604b.clear();
}
/* access modifiers changed from: 0000 */
/* renamed from: a */
public final /* synthetic */ void mo41732a(C15742hq hqVar, Map map) {
hqVar.mo37744a(this.f44603a, map);
}
}
|
[
"[email protected]"
] | |
06710680b0cb05a026b2d9b66de27c9fbe834f39
|
67155149d575882b0d1b0aa62417fe4e16fd779a
|
/jte-maven-plugin/src/main/java/gg/jte/maven/GeneratorMojo.java
|
28670b48d04547685126897680cd15a1486c9485
|
[
"Apache-2.0"
] |
permissive
|
mitchdennett/jte
|
78f769e9c7441b4d20f58ad4f0b6aecf4c1e909f
|
3b9fc65930d9071e2e56ef5522eda1dd9134da6d
|
refs/heads/master
| 2022-12-18T16:55:13.321202
| 2020-09-14T05:52:26
| 2020-09-14T05:52:26
| 295,399,029
| 0
| 0
| null | 2020-09-14T11:47:18
| 2020-09-14T11:47:17
| null |
UTF-8
|
Java
| false
| false
| 2,321
|
java
|
package gg.jte.maven;
import gg.jte.ContentType;
import gg.jte.TemplateEngine;
import gg.jte.resolve.DirectoryCodeResolver;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import java.nio.file.Path;
import java.util.concurrent.TimeUnit;
import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES;
@Mojo(name = "generate", defaultPhase = GENERATE_SOURCES)
public class GeneratorMojo extends AbstractMojo {
@Parameter(defaultValue = "${project}")
public MavenProject project;
/**
* The directory where template files are located.
*/
@Parameter
public String sourceDirectory;
/**
* Destination directory to store generated templates. Defaults to 'target/generated-sources/jte'.
*/
@Parameter(defaultValue = "${project.build.directory}/generated-sources/jte")
public String targetDirectory;
@Parameter(readonly = true, required = true)
public String contentType;
@Parameter(readonly = true)
public String[] htmlTags;
@Parameter(readonly = true)
public String[] htmlAttributes;
@Override
public void execute() {
long start = System.nanoTime();
Path source = Path.of(sourceDirectory);
Path target = Path.of(targetDirectory);
getLog().info("Generating jte templates found in " + source);
TemplateEngine templateEngine = TemplateEngine.create(new DirectoryCodeResolver(source), target, ContentType.valueOf(contentType));
templateEngine.setHtmlTags(htmlTags);
templateEngine.setHtmlAttributes(htmlAttributes);
int amount;
try {
templateEngine.cleanAll();
amount = templateEngine.generateAll();
} catch (Exception e) {
getLog().error("Failed to generate templates.");
getLog().error(e);
throw e;
}
long end = System.nanoTime();
long duration = TimeUnit.NANOSECONDS.toSeconds(end - start);
getLog().info("Successfully generated " + amount + " jte file" + (amount == 1 ? "" : "s") + " in " + duration + "s to " + target);
project.addCompileSourceRoot(targetDirectory);
}
}
|
[
"[email protected]"
] | |
17c4c9d8f2726de0b18e04a329066022e35983fb
|
2d2a6f4a6ad98b771ddad622d05e6a807f0479cf
|
/src/main/java/com/gypsyengineer/tlsbunny/tls13/test/openssl/client/DoubleClientHello.java
|
b9246cd9ab23c5014858d58dcc86796a32ea5308
|
[
"Apache-2.0"
] |
permissive
|
Tony-Nevermore/tlsbunny
|
6e7a10b7307b3f8e1bd524781a5f69b83f2923b3
|
3d601ff0c5fb84fa08a169442fa62b44dd59715b
|
refs/heads/master
| 2020-03-19T09:32:41.869097
| 2018-06-03T08:58:38
| 2018-06-03T08:58:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,079
|
java
|
package com.gypsyengineer.tlsbunny.tls13.test.openssl.client;
import com.gypsyengineer.tlsbunny.tls13.connection.*;
import com.gypsyengineer.tlsbunny.tls13.connection.action.composite.*;
import com.gypsyengineer.tlsbunny.tls13.test.SystemPropertiesConfig;
public class DoubleClientHello {
public static void main(String[] args) throws Exception {
SystemPropertiesConfig config = SystemPropertiesConfig.load();
Engine.init()
.target(config.host())
.target(config.port())
.send(new OutgoingClientHello())
.require(new IncomingServerHello())
.require(new IncomingChangeCipherSpec())
.require(new IncomingEncryptedExtensions())
.require(new IncomingCertificate())
.require(new IncomingCertificateVerify())
.require(new IncomingFinished())
.run(new OutgoingFinished())
.send(new OutgoingClientHello())
.require(new IncomingAlert())
.connect();
}
}
|
[
"[email protected]"
] | |
4b984875fba4ab0f3682f723183c50278f983da7
|
9d8a38464c6726c58aefb6da20b415dfa546cfdf
|
/src/main/java/design/principle/dependence_inversion/Hum.java
|
ac4446b704bb7bc055124c21301c58a4f92ed189
|
[] |
no_license
|
humwawe/design-pattern
|
124b2b4d3667957f5fc80709358dfbe3c8327e87
|
e80b840ec3ddbc5f7cf91ae50987f94dc56b4355
|
refs/heads/master
| 2020-04-09T13:26:41.417348
| 2018-12-23T14:15:28
| 2018-12-23T14:15:28
| 160,372,349
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package design.principle.dependence_inversion;
/**
* @author hum
*/
public class Hum {
public void setCourse(Course course) {
this.course = course;
}
private Course course;
public void studyCourse() {
course.studyCourse();
}
}
|
[
"[email protected]"
] | |
022bf91f350b5fd8bee66df7324aac0871ab8ad9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_7414aa85d5fc52362533a24e4d063beaa5e4c754/DeviceFileRestServlet/27_7414aa85d5fc52362533a24e4d063beaa5e4c754_DeviceFileRestServlet_t.java
|
8879e660676d89514ae9522dacf6ac3f73b42821
|
[] |
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,110
|
java
|
/*
* Copyright (C) 2010-2012 Stichting Akvo (Akvo Foundation)
*
* This file is part of Akvo FLOW.
*
* Akvo FLOW is free software: you can redistribute it and modify it under the terms of
* the GNU Affero General Public License (AGPL) as published by the Free Software Foundation,
* either version 3 of the License or any later version.
*
* Akvo FLOW 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 Affero General Public License included below for more details.
*
* The full license text can also be seen at <http://www.gnu.org/licenses/agpl.html>.
*/
package org.waterforpeople.mapping.app.web;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import org.json.JSONObject;
import org.waterforpeople.mapping.app.gwt.client.devicefiles.DeviceFilesDto;
import org.waterforpeople.mapping.app.util.DtoMarshaller;
import org.waterforpeople.mapping.app.web.dto.DeviceFileFindRestResponse;
import org.waterforpeople.mapping.app.web.dto.DeviceFileRestRequest;
import org.waterforpeople.mapping.app.web.dto.DeviceFileRestResponse;
import org.waterforpeople.mapping.dao.DeviceFilesDao;
import org.waterforpeople.mapping.domain.Status.StatusCode;
import com.gallatinsystems.device.domain.DeviceFiles;
import com.gallatinsystems.framework.dao.BaseDAO;
import com.gallatinsystems.framework.rest.AbstractRestApiServlet;
import com.gallatinsystems.framework.rest.RestRequest;
import com.gallatinsystems.framework.rest.RestResponse;
public class DeviceFileRestServlet extends AbstractRestApiServlet {
@SuppressWarnings("unused")
private static final Logger log = Logger
.getLogger(DeviceFileRestServlet.class.getName());
DeviceFilesDao dfDao = null;
public DeviceFileRestServlet() {
super();
setMode(JSON_MODE);
dfDao = new DeviceFilesDao();
}
/**
*
*/
private static final long serialVersionUID = -3626408824020380901L;
@Override
protected RestRequest convertRequest() throws Exception {
HttpServletRequest req = getRequest();
RestRequest restRequest = new DeviceFileRestRequest();
restRequest.populateFromHttpRequest(req);
return restRequest;
}
@Override
protected RestResponse handleRequest(RestRequest req) throws Exception {
DeviceFileRestRequest importReq = (DeviceFileRestRequest) req;
if (DeviceFileRestRequest.LIST_DEVICE_FILES_ACTION.equals(importReq
.getAction())) {
List<DeviceFilesDto> dtoList = new ArrayList<DeviceFilesDto>();
String cursor = importReq.getCursor();
List<DeviceFiles> dfList = dfDao.listDeviceFilesByStatus(
StatusCode.valueOf(importReq.getProcessedStatus()), cursor);
for (DeviceFiles instance : dfList) {
DeviceFilesDto dto = new DeviceFilesDto();
DtoMarshaller.copyToDto(instance, dto);
dtoList.add(dto);
}
DeviceFileRestResponse response = new DeviceFileRestResponse();
cursor = BaseDAO.getCursor(dfList);
response.setDtoList(dtoList);
response.setCursor(cursor);
return response;
} else if (DeviceFileRestRequest.FIND_DEVICE_FILE_ACTION
.equals(importReq.getAction())) {
String deviceFileFullPath = importReq.getDeviceFullPath().trim();
Boolean foundFlag = false;
if (deviceFileFullPath != null && !deviceFileFullPath.equals("")) {
DeviceFiles df = dfDao.findByUri(deviceFileFullPath);
DeviceFileFindRestResponse response = new DeviceFileFindRestResponse();
DeviceFilesDto dto=null;
if (df != null) {
dto = new DeviceFilesDto();
DtoMarshaller.copyToDto(df, dto);
foundFlag = true;
}
response.setFoundFlag(foundFlag);
response.setDeviceFile(dto);
return response;
}
}
return null;
}
@Override
protected void writeOkResponse(RestResponse resp) throws Exception {
getResponse().setStatus(200);
getResponse().getWriter().println(new JSONObject(resp).toString());
}
}
|
[
"[email protected]"
] | |
25eefb5cacb80f26cd03e8fd29c1488634513db6
|
ef2defbb5a523d114c32b4824ef29e81334b1604
|
/src/main/java/cn/liuyiyou/java/lang/Something.java
|
d85b4793b29f240309aca4ffe5950323d2a62dbb
|
[] |
no_license
|
liuyiyou/cn.liuyiyou.java
|
daf5c37cadf88596d07f7eb13a9a44c5dce9d813
|
48c71965fb407b201e46c6ff137dc537e34be4c8
|
refs/heads/master
| 2022-12-22T06:54:38.492277
| 2020-05-13T10:11:15
| 2020-05-13T10:11:15
| 110,930,489
| 0
| 0
| null | 2022-12-16T04:30:38
| 2017-11-16T06:07:11
|
Java
|
UTF-8
|
Java
| false
| false
| 407
|
java
|
/**
* 所属项目:cn.liuyiyou.java
* 文件名称:cn.liuyiyou.java.language.Something.java
* 日期: 2017年8月9日下午7:17:24
* Copyright (c) 2017, liuyiyou.cn All Rights Reserved.
*
*/
package cn.liuyiyou.java.lang;
/**
* @author liuyiyou.cn
* @date 2017年8月9日 下午7:17:24
* @version
*/
public class Something {
public int addOne(final int i){
//return ++i;
return 0;
}
}
|
[
"[email protected]"
] | |
76a091dad9a9aa0a7698fffc51f4a25c32d7d98d
|
d370b0fdd1f531a81818751bc5dc44d86ae603a0
|
/flexodesktop/model/flexofoundation/src/main/java/org/openflexo/foundation/dm/JDKRepository.java
|
75ffb64a0c47028db2b8e262f327e619f6cb6c94
|
[] |
no_license
|
bluepimento/openflexo
|
0e06db9817e9eb21f3302da3b705f4c4aed5678c
|
b586b75362ffa4cd11c10397e0c343795ba1dd94
|
refs/heads/master
| 2020-12-24T10:53:49.783246
| 2012-03-02T08:24:06
| 2012-03-02T08:24:06
| 2,553,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,841
|
java
|
/*
* (c) Copyright 2010-2011 AgileBirds
*
* This file is part of OpenFlexo.
*
* OpenFlexo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openflexo.foundation.dm;
import java.io.File;
import java.net.URL;
import java.util.Calendar;
import java.util.Date;
import java.util.Hashtable;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openflexo.foundation.dm.action.ImportJDKEntity;
import org.openflexo.foundation.xml.FlexoDMBuilder;
import org.openflexo.localization.FlexoLocalization;
import org.openflexo.toolbox.Duration;
/**
* Represents a logical group of objects defined in common JDK implementation and used in the project
*
* @author sguerin
*
*/
public class JDKRepository extends DMRepository {
private static final Logger logger = Logger.getLogger(JDKRepository.class.getPackage().getName());
// ==========================================================================
// ============================= Instance variables
// =========================
// ==========================================================================
// ==========================================================================
// ============================= Constructor
// ================================
// ==========================================================================
/**
* Constructor used during deserialization
*/
public JDKRepository(FlexoDMBuilder builder) {
this(builder.dmModel);
initializeDeserialization(builder);
}
/**
* Default constructor
*/
public JDKRepository(DMModel dmModel) {
super(dmModel);
}
@Override
public DMRepositoryFolder getRepositoryFolder() {
return getDMModel().getInternalRepositoryFolder();
}
@Override
public int getOrder() {
return 1;
}
@Override
public String getName() {
return "jdk_repository";
}
@Override
public String getLocalizedName() {
return FlexoLocalization.localizedForKey(getName());
}
@Override
public void setName(String name) {
// Not allowed
}
/**
* @param dmModel
* @return
*/
public static JDKRepository createNewJDKRepository(DMModel dmModel) {
JDKRepository newJDKRepository = new JDKRepository(dmModel);
dmModel.setJDKRepository(newJDKRepository);
LoadableDMEntity.createLoadableDMEntity(dmModel, Integer.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Long.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Short.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Float.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Double.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Character.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Byte.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Boolean.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Integer.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Long.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Short.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Float.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Double.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Character.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Byte.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Boolean.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, Void.TYPE);
LoadableDMEntity.createLoadableDMEntity(dmModel, String.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Vector.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Hashtable.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, File.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, URL.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Date.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Calendar.class);
LoadableDMEntity.createLoadableDMEntity(dmModel, Duration.class);
return newJDKRepository;
}
@Override
public String getFullyQualifiedName() {
return getDMModel().getFullyQualifiedName() + ".JDK";
}
@Override
public boolean isReadOnly() {
return true;
}
@Override
public boolean isDeletable() {
return false;
}
@Override
public boolean isUpdatable() {
return true;
}
@Override
public DMPackage packageForEntity(DMEntity entity) {
String packageName = entity.getEntityPackageName();
if (packageName == null) {
if (entity instanceof JDKPrimitive) {
DMPackage primitivePackage = packages.get("primitives");
if (primitivePackage == null) {
primitivePackage = new DMPackage(getDMModel(), this, "primitives");
packages.put("primitives", primitivePackage);
}
return primitivePackage;
} else {
if (logger.isLoggable(Level.WARNING)) {
logger.warning("No package for entity " + entity.getFullyQualifiedName());
}
}
}
return super.packageForEntity(entity);
}
@Override
protected Vector getSpecificActionListForThatClass() {
Vector returned = super.getSpecificActionListForThatClass();
returned.add(ImportJDKEntity.actionType);
return returned;
}
/**
* Overrides getClassNameKey
*
* @see org.openflexo.foundation.FlexoModelObject#getClassNameKey()
*/
@Override
public String getClassNameKey() {
return getName();
}
}
|
[
"[email protected]"
] | |
e7b9e9134b63b1060b8b35729e356e7b18191a07
|
6af2ba478c7a1ca2e68f75e385a0d9b1ff56cdc6
|
/Day35_JDBC/src/com/tcwgq/demo3/SQLInjection.java
|
182aa5d10811b5be673ba889a9ecbb6c5f288b2b
|
[] |
no_license
|
tcwgq/learn-java-base
|
20f2a8c895cf8719730beada81b069d857a4ac37
|
e483ba3cbe6353dc1e16fded257eecf59321331e
|
refs/heads/master
| 2022-01-10T07:57:49.167924
| 2019-06-16T01:36:59
| 2019-06-16T01:36:59
| 104,757,290
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 900
|
java
|
package com.tcwgq.demo3;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class SQLInjection {
public static void main(String[] args) throws SQLException {
retrieve("张三");// 正常查询
retrieve("'or 1 or'");// SQL注入
}
private static void retrieve(String name) throws SQLException {
String sql = "select id, name, birthday, money from user where name = '" + name + "'";
System.out.println(sql);
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
conn = JDBCUtils.getConnection();
ps = conn.prepareStatement(sql);
rs = ps.executeQuery();
while (rs.next()) {
System.out.println(rs.getInt(1) + "\t" + rs.getString("name") + "\t" + rs.getString("birthday") + "\t"
+ rs.getFloat(4));
}
} finally {
JDBCUtils.free(rs, ps, conn);
}
}
}
|
[
"[email protected]"
] | |
36eaae03e7c0c3a98eee301549110d2fd552352c
|
475fad5e659575eac1bcf07a3f67a0cbe7da827e
|
/src/main/java/com/bytatech/ayoos/appointment/config/SerdeConfig.java
|
c2b7f396b9e89261e1af82fc6eda481a22359a23
|
[] |
no_license
|
tayduivn/APPOINTMENT-MICROSERVICE
|
ff4edcce21df9fd5b54d705db79b887235468313
|
5ef7711245cccfb8649fcfde426fbb07cab6b375
|
refs/heads/master
| 2022-11-17T02:09:06.559617
| 2019-11-06T04:03:15
| 2019-11-06T04:03:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,139
|
java
|
package com.bytatech.ayoos.appointment.config;
import java.util.Collections;
import java.util.Map;
import org.apache.avro.specific.SpecificRecordBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig;
import io.confluent.kafka.streams.serdes.avro.SpecificAvroSerializer;
public class SerdeConfig<T extends SpecificRecordBase> extends SpecificAvroSerializer<T> {
private static Logger log = LoggerFactory.getLogger("Logger SerdeConfig");
@Value("${spring.cloud.stream.schemaRegistryClient.endpoint:}")
private String schemaRegistryEndpoint;
@Override
public void configure(Map<String, ?> serializerConfig, boolean isSerializerForRecordKeys) {
log.info("Schema registry client uri is "+schemaRegistryEndpoint);
log.info("Enter into SerdeConfig " + serializerConfig);
final Map<String, String> serdeConfig = Collections
.singletonMap(AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, "http://35.225.189.219:8081");
super.configure(serdeConfig, isSerializerForRecordKeys);
}
}
|
[
"[email protected]"
] | |
380b2efdfc672d6a68a2532f9242aff0a4e44267
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/pluginsdk/ui/preference/p.java
|
6ae9984a9b076d5414f6254f21ed1fac5524f6b3
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 698
|
java
|
package com.tencent.mm.pluginsdk.ui.preference;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.mm.pluginsdk.ui.o;
final class p
implements View.OnClickListener
{
p(NormalUserHeaderPreference paramNormalUserHeaderPreference) {}
public final void onClick(View paramView)
{
paramView = bgYI).field_username;
o localo = new o(NormalUserHeaderPreference.a(gYI), paramView);
if (com.tencent.mm.storage.k.yx(paramView)) {
com.tencent.mm.storage.k.yz(paramView);
}
localo.aAc();
}
}
/* Location:
* Qualified Name: com.tencent.mm.pluginsdk.ui.preference.p
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
503f13991eb4977eaad79b0ced474436af542a16
|
7df62a93d307a01b1a42bb858d6b06d65b92b33b
|
/src/com/afunms/biosreport/model/DbOracleReportModel.java
|
3d1949af594395428d15ca2494229e3595f90c0d
|
[] |
no_license
|
wu6660563/afunms_fd
|
79ebef9e8bca4399be338d1504faf9630c42a6e1
|
3fae79abad4f3eb107f1558199eab04e5e38569a
|
refs/heads/master
| 2021-01-10T01:54:38.934469
| 2016-01-05T09:16:38
| 2016-01-05T09:16:38
| 48,276,889
| 0
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,066
|
java
|
package com.afunms.biosreport.model;
/**
* Oracle 数据库模板
*
* @author Administrator
*
*/
public class DbOracleReportModel extends BiosReportBaseModel{
public DbOracleReportModel(){
}
public DbOracleReportModel(String ip, String name, String connectivty){
super(ip, name, connectivty);
}
// 缓冲区命中率
private String bufferCache;
// 数据字典命中率
private String dictionaryCache;
// PGA
private String pga;
// sga
private String sga;
// 打开的游标数
private String openCur;
// 内存中的排序
private String memorySort;
public String toString(){
return getClass().getName()
+ "[IP=" + super.getIpAddress()
+ ", aliasName=" + super.getAliasName()
+ ", nodeid=" + super.getNodeid()
+ ", collecttime=" + super.getCollectTime()
+ ", dept=" + super.getDeptName()
+ ", ping=" + super.getAvergeConnectivity()
+ ", bufferCache=" + getBufferCache()
+ ", dictionaryCache=" + getDictionaryCache()
+ ", pga=" + getPga()
+ ", sga=" + getSga()
+ ", openCur=" + getOpenCur()
+ ", memorySort=" + getMemorySort()
+ ", alarmCommon=" + getAlarmCommon()
+ ", alarmSerious=" + getAlarmSerious()
+ ", alarmUrgency=" + getAlarmUrgency();
}
public String getBufferCache() {
return bufferCache;
}
public void setBufferCache(String bufferCache) {
this.bufferCache = get2(bufferCache);
}
public String getDictionaryCache() {
return dictionaryCache;
}
public void setDictionaryCache(String dictionaryCache) {
this.dictionaryCache = get2(dictionaryCache);
}
public String getPga() {
return pga;
}
public void setPga(String pga) {
this.pga = get2(pga);
}
public String getSga() {
return sga;
}
public void setSga(String sga) {
this.sga = get2(sga);
}
public String getOpenCur() {
return openCur;
}
public void setOpenCur(String openCur) {
this.openCur = get2(openCur);
}
public String getMemorySort() {
return memorySort;
}
public void setMemorySort(String memorySort) {
this.memorySort = get2(memorySort);
}
}
|
[
"[email protected]"
] | |
3df5f27e9921bb8db7f85d20580554308999e06e
|
119ac25712822c80d8a525ef952c8fbe5bf1aecc
|
/wanhaohui2/src/main/java/com/wishland/www/wanhaohui2/utils/TimeUtil.java
|
3ee87656e6eadb6fe8e828a7a6998154babac8fb
|
[] |
no_license
|
RightManCode/wishland
|
7c1a3b4a1c545441b6a20b1ab4920122cc79bc98
|
3b673e5a0e7ca33b91466e86ee418a8e88918073
|
refs/heads/master
| 2021-05-09T22:52:11.454551
| 2018-01-24T12:54:39
| 2018-01-24T12:54:39
| 118,765,146
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,373
|
java
|
package com.wishland.www.wanhaohui2.utils;
import android.annotation.SuppressLint;
import java.sql.Time;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/**
* Created by admin on 2017/10/15.
*/
public class TimeUtil {
public static String[] hourarray = new String[]{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"};
public static String[] minutearray = new String[]{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"
, "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"};
/**
* @return ms转换ss
*/
public static String getSeconds() {
long time = new Date(System.currentTimeMillis()).getTime();
int inttime = (int) (time / 1000);
return inttime + "l";
}
public static String encryption(String code) {
LogUtil.e(code);
if (code.isEmpty() || "null".equals(code)) {
return null;
}
if (code.length() > 9) {
String start = code.substring(0, 4);
String end = code.substring(code.length() - 4, code.length());
return start + "**************" + end;
} else {
return code;
}
}
public static List<String> getYearMonthDayHourMinuteSecond() {
List<String> list = new ArrayList<>();
@SuppressLint("SimpleDateFormat") SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
for (int x = 0; x <= 30; x++) {
Calendar c = Calendar.getInstance();
int day = c.get(Calendar.DAY_OF_MONTH) - x;
c.set(Calendar.DAY_OF_MONTH, day);
Date time = c.getTime();
String d = format.format(time);
list.add(d);
}
return list;
}
public static String getyear() {
@SuppressLint("SimpleDateFormat") SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
int day = c.get(Calendar.DAY_OF_MONTH);
c.set(Calendar.DAY_OF_MONTH, day);
Date time = c.getTime();
String year = format.format(time);
return year;
}
public static String judgeString(String str) {
int i = str.indexOf(".");
String substring = str;
if (i != -1) {
substring = str.substring(0, i);
}
return substring;
}
public static Date getSystemDate() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date curDate = new Date(System.currentTimeMillis());//获取当前时间
String str = formatter.format(curDate);
return curDate;
}
/**
* 得到几天前的时间
*
* @param d
* @param day
* @return
*/
public static Date getDateBefore(Date d, int day) {
Calendar now = Calendar.getInstance();
now.setTime(d);
now.set(Calendar.DATE, now.get(Calendar.DATE) - day);
return now.getTime();
}
/**
* 获取当前的年份,整形
*/
public static int getYear() {
Calendar now = Calendar.getInstance();
return now.get(Calendar.YEAR);
}
public static String getSystemDateString() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date curDate = new Date(System.currentTimeMillis());//获取当前时间
String str = formatter.format(curDate);
return str;
}
/**
* 获取当前的小时
*/
public static String getSystemHour() {
Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY);
return String.valueOf(hour);
}
/**
* 获取当前的分钟
*/
public static String getSystemMinute() {
Calendar calendar = Calendar.getInstance();
int minute = calendar.get(Calendar.MINUTE);
return String.valueOf(minute);
}
}
|
[
"[email protected]"
] | |
528295d896ea35d3037eb83f7060549ccb32867d
|
13dfd110df6cccc7ed5ce992ba5e7eadc56a42af
|
/sm-shop-model/src/main/java/com/salesmanager/shop/store/controller/category/facade/CategoryBannerFacade.java
|
7c2c2a696cbb6b5c38eaee969e459a8e68870961
|
[] |
no_license
|
ajaytiwari000/Habbit
|
24ca9455f0200e648640079945a04b01918dac7b
|
1ccff760c0a17515748cdc7c9d133fae71b8d937
|
refs/heads/master
| 2023-03-21T11:32:26.708784
| 2021-03-12T07:38:02
| 2021-03-12T07:38:02
| 265,888,454
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
package com.salesmanager.shop.store.controller.category.facade;
import com.salesmanager.core.model.catalog.category.CategoryBanner;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
public interface CategoryBannerFacade {
void addCategoryBanners(Long id, MultipartFile[] files, String bannerLinkedSkuId);
CategoryBanner getCategoryBannerById(Long categoryBannerId);
void removeCategoryBanner(CategoryBanner categoryBanner, Long categoryId);
List<CategoryBanner> getCategoryBannersByCategoryId(Long categoryId);
}
|
[
"[email protected]"
] | |
6a2438ee874400565d6dea60adaae403b1b79725
|
28e356d56e3682cdaa53a14f2ef22a2dbb9799c0
|
/2.1.06-Solution-LoadA9Patch/desktop/src/com/udacity/gamedev/ninepatch/desktop/DesktopLauncher.java
|
4df698b707d6859fb9ac368851547b8a9e873589
|
[
"MIT"
] |
permissive
|
udacity/ud406
|
31fb5e8ef02f6f78e500ad8998bae38bf4296494
|
191d46352271cc74f4232a3f75db3563c200b1c9
|
refs/heads/master
| 2023-03-28T21:01:07.283156
| 2021-10-21T13:33:06
| 2021-10-21T13:33:06
| 45,005,805
| 60
| 134
|
MIT
| 2023-05-08T19:41:40
| 2015-10-27T00:05:43
|
Java
|
UTF-8
|
Java
| false
| false
| 437
|
java
|
package com.udacity.gamedev.ninepatch.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.udacity.gamedev.ninepatch.NinePatchDemo;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
new LwjglApplication(new NinePatchDemo(), config);
}
}
|
[
"[email protected]"
] | |
792b71501ecb2cae517ca8fedbe085b49620427c
|
ffaac62bd10f9615ef9b8a3740705bfde1c4c59c
|
/src/main/java/es/upm/oeg/librairy/api/builders/BoWPipeBuilder.java
|
5d2677749d1d9a534a2d1e991aa90fd8efb90ec4
|
[
"Apache-2.0"
] |
permissive
|
librairy/api
|
9d1d31cbdacaa895c9c9f75623a6b69d9da54dd0
|
50fb1a4b1c4c37849378aaab6dedcd9fe95c38d0
|
refs/heads/master
| 2021-06-24T01:04:36.318557
| 2021-05-12T16:18:55
| 2021-05-12T16:18:55
| 174,326,322
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,786
|
java
|
package es.upm.oeg.librairy.api.builders;
import cc.mallet.pipe.*;
import cc.mallet.types.Alphabet;
import cc.mallet.types.Instance;
import com.google.common.base.Strings;
import es.upm.oeg.librairy.api.executors.ParallelExecutor;
import org.librairy.service.nlp.facade.model.PoS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @author Badenes Olmedo, Carlos <[email protected]>
*/
public class BoWPipeBuilder implements PipeBuilderI{
private static final Logger LOG = LoggerFactory.getLogger(BoWPipeBuilder.class);
private final Integer size;
public BoWPipeBuilder(Integer size) {
this.size = size;
}
public Pipe build(String pos, Boolean enableTarget, TokenSequenceRemoveStopwords stopWordTokenizer) {
ArrayList pipeList = new ArrayList();
// Read data from File objects
pipeList.add(new Input2CharSequence("UTF-8"));
pipeList.add(new CharSequence2TokenSequence(Pattern.compile("\\S+")));
List<PoS> posList = Strings.isNullOrEmpty(pos) ? Collections.emptyList() : Arrays.asList(pos.split(" ")).stream().map(i -> PoS.valueOf(i.toUpperCase())).collect(Collectors.toList());
pipeList.add(new TokenSequenceRemovePoS(posList));
pipeList.add(new TokenSequenceExpandBoW("="));
pipeList.add(stopWordTokenizer);
pipeList.add(new TokenSequence2FeatureSequence());
// Do the same thing for the "target" field:
// convert a class label string to a Label object,
// which has an index in a Label alphabet.
// pipeList.add(new Target2Label());
if (enableTarget) pipeList.add(new TargetStringToFeatures());
// Now convert the sequence of features to a sparse vector,
// mapping feature IDs to counts.
// pipeList.add(new FeatureSequence2FeatureVector());
// Print out the features and the label
// pipeList.add(new PrintInputAndTarget());
return new SerialPipes(pipeList);
}
/**
* @param cvsIterator
* @param stopWordTokenizer the tokenizer that will be used to write instances
* @param pos
* @param minFreq Reduce words to those that occur more than N times.
* @param docProportionCutoff Remove features that occur in more than (X*100)% of documents. 0.05 is equivalent to IDF of 3.0.
* @return
*/
public void prune(Iterator<Instance> cvsIterator, TokenSequenceRemoveStopwords stopWordTokenizer, String pos, Integer minFreq, Double docProportionCutoff){
ArrayList pipeList = new ArrayList();
Alphabet alphabet = new Alphabet();
// Read data from File objects
pipeList.add(new Input2CharSequence("UTF-8"));
pipeList.add(new CharSequence2TokenSequence(Pattern.compile("\\S+")));
List<PoS> posList = Strings.isNullOrEmpty(pos) ? Collections.emptyList() : Arrays.asList(pos.split(" ")).stream().map(i -> PoS.valueOf(i.toUpperCase())).collect(Collectors.toList());
pipeList.add(new TokenSequenceRemovePoS(posList));
pipeList.add(new TokenSequenceExpandBoW("="));
pipeList.add(stopWordTokenizer);
pipeList.add(new TokenSequence2FeatureSequence(alphabet));
FeatureCountPipe featureCounter = new FeatureCountPipe(alphabet, null);
if (minFreq > 0) pipeList.add(featureCounter);
FeatureDocFreqPipe docCounter = new FeatureDocFreqPipe(alphabet, null);
if (docProportionCutoff < 1.0) pipeList.add(docCounter);
Pipe pipe = new SerialPipes(pipeList);
Instant startProcess = Instant.now();
/**
*
*/
//Iterator<Instance> iterator = pipe.newParallelIteratorFrom(cvsIterator);
Iterator<Instance> iterator = pipe.newIteratorFrom(cvsIterator);
ParallelExecutor executors = new ParallelExecutor();
LOG.info("Getting stats to complete prune actions ..");
int count = 0;
int interval = size < 100? 10 : size/100;
final boolean[] error = {false};
while(iterator.hasNext() && !error[0]){
try{
count++;
if (count % interval == 0) {
LOG.info("Docs analyzed: " + count);
Thread.sleep(10);
}
executors.submit(() -> {
try {
Instance instance = iterator.next();
LOG.debug("Instance: " + instance.getName());
}catch (NoSuchElementException e){
LOG.info("list completed");
}catch (Exception e){
if (e instanceof java.lang.IllegalStateException) error[0] = true;
LOG.error("Instance not handled by pipe: " + e.getMessage(),e);
}
});
}catch (Exception e){
LOG.error("Error reading next instance",e);
break;
}
}
LOG.info("Waiting for finish stats ...");
executors.awaitTermination(1, TimeUnit.MINUTES);
LOG.info("Docs analyzed: " + count);
Instant endProcess = Instant.now();
String durationProcess = ChronoUnit.HOURS.between(startProcess, endProcess) + "hours "
+ ChronoUnit.MINUTES.between(startProcess, endProcess) % 60 + "min "
+ (ChronoUnit.SECONDS.between(startProcess, endProcess) % 60) + "secs "
+ (ChronoUnit.MILLIS.between(startProcess, endProcess) % 60) + "msecs";
LOG.info("Prune stats collected in: " + durationProcess);
if (minFreq > 0) {
List<String> stopWordsByFreq = featureCounter.getPrunedWords(minFreq);
LOG.info(stopWordsByFreq.size() + " words pruned by freq [" + minFreq + "]");
stopWordTokenizer.addStopWords(stopWordsByFreq);
}
if (docProportionCutoff > 0.0) {
List<String> stopWordsByDocFreq = docCounter.getPrunedWords(docProportionCutoff);
LOG.debug("Stopwords: " + stopWordsByDocFreq);
LOG.info(stopWordsByDocFreq.size() + " words pruned by doc-freq [" + docProportionCutoff + "]");
stopWordTokenizer.addStopWords(stopWordsByDocFreq);
}
}
public Pipe buildMinimal() {
ArrayList pipeList = new ArrayList();
// Read data from File objects
pipeList.add(new Input2CharSequence("UTF-8"));
// Regular expression for what constitutes a token.
// This pattern includes Unicode letters, Unicode numbers,
// and the underscore character. Alternatives:
// "\\S+" (anything not whitespace)
// "\\w+" ( A-Z, a-z, 0-9, _ )
// "[\\p{L}\\p{N}_]+|[\\p{P}]+" (a group of only letters and numbers OR
// a group of only punctuation marks)
Pattern tokenPattern =
Pattern.compile("[\\p{L}\\p{N}_]+");
// Tokenize raw strings
pipeList.add(new CharSequence2TokenSequence(tokenPattern));
// pipeList.add(new TokenSequenceRemoveStopwords(false, false));
//
// // Remove tokens that contain non-alphabetic characters
// pipeList.add(new TokenSequenceRemoveNonAlpha(false));
// Rather than storing tokens as strings, convert
// them to integers by looking them up in an alphabet.
pipeList.add(new TokenSequence2FeatureSequence());
// Print out the features and the label
// pipeList.add(new PrintInputAndTarget());
return new SerialPipes(pipeList);
}
}
|
[
"[email protected]"
] | |
d7c9c12735ace1d4db800b8bdbf1625ca3146055
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/ab/a/g/a.java
|
308459d5cd5a1b4645b219f4493abdd38998481b
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,185
|
java
|
package com.tencent.mm.ab.a.g;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory.Options;
import android.widget.ImageView;
import com.tencent.mm.ab.a.c;
import com.tencent.mm.sdk.platformtools.d;
import com.tencent.mm.sdk.platformtools.u;
import java.io.IOException;
public final class a
{
public static Bitmap a(c paramc, int paramInt1, int paramInt2, int paramInt3)
{
if ((paramInt2 <= 0) || (paramInt3 <= 0))
{
if ((paramc != null) && (width > 0) && (width > 0)) {
return d.t(paramInt1, width, height);
}
return d.pk(paramInt1);
}
return d.t(paramInt1, paramInt2, paramInt3);
}
public static Bitmap a(c paramc, String paramString, int paramInt1, int paramInt2)
{
if ((paramInt1 <= 0) || (paramInt2 <= 0))
{
if ((paramc != null) && (width > 0) && (width > 0)) {
return d.v(paramString, width, height);
}
return d.CE(paramString);
}
return d.b(paramString, paramInt2, paramInt1, false);
}
public static Bitmap a(c paramc, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
{
if ((paramInt1 <= 0) || (paramInt2 <= 0))
{
if ((paramc != null) && (width > 0) && (width > 0)) {
return d.decodeByteArray(paramArrayOfByte, width, height);
}
return d.aQ(paramArrayOfByte);
}
return d.decodeByteArray(paramArrayOfByte, paramInt1, paramInt2);
}
public static Bitmap b(c paramc, String paramString, int paramInt1, int paramInt2)
{
int i = 0;
BitmapFactory.Options localOptions = d.CB(paramString);
if ((localOptions != null) && ((outWidth >= outHeight * 2) || (outWidth * 2 <= outHeight)))
{
if ((paramInt1 <= 0) || (paramInt2 <= 0))
{
if ((paramc != null) && (width > 0) && (width > 0)) {
return d.b(paramString, height, width, true);
}
if ((paramc != null) && (paramc.getImageView() != null)) {
paramInt2 = paramc.getImageView().getMeasuredWidth();
}
for (paramInt1 = paramc.getImageView().getMeasuredHeight();; paramInt1 = i)
{
return d.b(paramString, paramInt1, paramInt2, true);
u.w("!56@/B4Tb64lLpJ3W0chKRkeCOp5DLdC+H/lICer7FuuuS+ZnxBq04W21w==", "crop bitmap cant not un set width or height");
paramInt2 = 0;
}
}
return d.b(paramString, paramInt2, paramInt1, true);
}
return d.b(paramString, paramInt2, paramInt1, false);
}
public static Bitmap c(c paramc, String paramString, int paramInt1, int paramInt2)
{
if (((paramInt1 > 0) && (paramInt2 > 0)) || (paramc != null)) {}
try
{
if ((width > 0) && (width > 0)) {
return d.w(paramString, width, height);
}
return d.w(paramString, 0, 0);
}
catch (IOException paramc)
{
u.e("!56@/B4Tb64lLpJ3W0chKRkeCOp5DLdC+H/lICer7FuuuS+ZnxBq04W21w==", "get bitmap from assert failed. :%s", new Object[] { paramc.toString() });
}
paramc = d.w(paramString, paramInt1, paramInt2);
return paramc;
return null;
}
}
/* Location:
* Qualified Name: com.tencent.mm.ab.a.g.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
7d91171080745208376edb62c8c6126df4de0f96
|
a5f2262593cf5cbc4cd13c72efbaf851142513b6
|
/src/controlescolar/controller/alumno/LoginController.java
|
d257078d2a127f4244064c9db6c315b824470e16
|
[] |
no_license
|
HugoLuna5/Control-Escolar
|
8a4f74ce0bcb6cf054ace8893e17707de688ead3
|
ddabe0ce88241152063c519c8c955a203edf95b6
|
refs/heads/master
| 2020-05-19T11:07:16.989511
| 2019-05-05T05:35:34
| 2019-05-05T05:35:34
| 176,040,815
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,835
|
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 controlescolar.controller.alumno;
import controlescolar.controller.admin.AdminLoginController;
import controlescolar.model.Alumno;
import controlescolar.model.Login;
import controlescolar.view.HomeView;
import controlescolar.view.LoginView;
import controlescolar.view.components.Toaster.Toaster;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.prefs.Preferences;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javax.swing.JColorChooser;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
*
* @author hugoluna
*/
public class LoginController implements ActionListener {
//variales globales
private LoginView loginView;
private Toaster toaster;
/***
* Constructor de la clase
* @param loginView
*/
public LoginController(LoginView loginView) {
this.loginView = loginView;
this.loginView.btnEntrar.addActionListener(this);
this.loginView.btnResetPass.addActionListener(this);
this.loginView.btnActionHelp.addActionListener(this);
this.loginView.btnRegistrar.addActionListener(this);
this.loginView.setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == loginView.btnEntrar) {
actionBtnEntrar();
} else if (e.getSource() == loginView.btnRegistrar) {
actionBtnRegister();
} else if (e.getSource() == loginView.btnResetPass) {
actionResetPass();
} else if (e.getSource() == loginView.btnActionHelp) {
actionHelp();
}
}
/***
* Accion pata el boton Entrar
*/
public void actionBtnEntrar() {
//se extrae el texto de los campos en la vista
String numControl = loginView.numField.getText().toString();
String password = loginView.passField.getText().toString();
//inicializar vista para avisos en la vista
toaster = new Toaster(this.loginView.mainContainer);
//validar que no sean vacios los valores
if (!numControl.isEmpty() && !password.isEmpty()) {
Alumno alumno = new Alumno();
alumno.setNumControl(Integer.parseInt(numControl));
alumno.setPassword(password);
/**
* Esperar respuesta de la BD
*
*/
if (new Login().loginAlumn(alumno)) {
toaster.success("¡Genial!", "Has ingresado correctamente");
savePreferences(String.valueOf(alumno.getNumControl()));
this.loginView.setVisible(false);//hacer la vista invisible
//llamar al controlador el cual lanzara la siguiente vista
new HomeController(new Alumno().getData(alumno.getNumControl()), new HomeView());
} else {//en caso de que suceda un error, informarle al usuario que esta pasando
toaster.error("¡Ups ocurrio un error!", "Es posible que los datos no existan en nuestros registros");
}
} else {
toaster.info("¡Ups!.", "Debes llenar los campos para ingresar");
}
}
/***
* Accion del boton registrar
* el cual lanza la interfaz para el Admin
*/
public void actionBtnRegister() {
this.loginView.setVisible(false);
new AdminLoginController(new LoginView());
}
/***
* Accion para resetear la contraseña
*/
public void actionResetPass() {
}
/***
* Accion para solicitar ayuda
*/
public void actionHelp() {
try {
Desktop.getDesktop().browse(new URI("https://google.com"));
} catch (Exception ex) {
Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
}
}
/***
* Guardar los datos de los alumnos en las preferencias
* @param id
*/
public void savePreferences(String id) {
Preferences prefs = Preferences.userNodeForPackage(controlescolar.controller.alumno.LoginController.class);
final String PREF_NAME = "id";
final String PREF_TYPE = "type";
prefs.put(PREF_NAME, id);
prefs.put(PREF_TYPE, "alumno");
}
}
|
[
"[email protected]"
] | |
db4dc79ace47907057a6d64d181e4d10e1a1950b
|
392b98795068164ed0c186a760c72290e5f7bb6a
|
/serenity-browserstack/src/test/java/net/serenitybdd/browserstack/WhenAddingBrowserStackCapabilities.java
|
11d8bd0b960d74785c668ff366806eeb86b6d2e4
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
cuneytcalishkan/serenity-core
|
fd3834fdd1a755552c0d8000541279f29106f936
|
658c2322f69fb926f4293d889abce14ff58ecdb0
|
refs/heads/master
| 2023-05-31T16:41:25.407268
| 2021-07-10T07:29:47
| 2021-07-10T07:29:47
| 384,783,331
| 0
| 0
|
NOASSERTION
| 2021-07-10T20:23:38
| 2021-07-10T20:23:38
| null |
UTF-8
|
Java
| false
| false
| 5,004
|
java
|
package net.serenitybdd.browserstack;
import net.serenitybdd.core.webdriver.OverrideDriverCapabilities;
import net.serenitybdd.core.webdriver.driverproviders.AddCustomDriverCapabilities;
import net.thucydides.core.model.Story;
import net.thucydides.core.model.TestOutcome;
import net.thucydides.core.util.EnvironmentVariables;
import net.thucydides.core.util.MockEnvironmentVariables;
import net.thucydides.core.webdriver.SupportedWebDriver;
//import org.junit.Before;
//import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
public class WhenAddingBrowserStackCapabilities {
EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
private static final TestOutcome SAMPLE_TEST_OUTCOME = TestOutcome.forTestInStory("sample_test", Story.called("Sample story"));
@BeforeEach
public void prepareSession() {
OverrideDriverCapabilities.clear();
}
@Test
public void theBrowserNameShouldBeAddedDirectlyToTheCapability() {
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(capabilities.getBrowserName()).isEqualTo("chrome");
}
@Test
public void theBrowserNameCanBeSpecifiedInTheBrowserStackConfiguration() {
DesiredCapabilities capabilities = new DesiredCapabilities();
environmentVariables.setProperty("browserstack.browserName","IE");
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(capabilities.getBrowserName()).isEqualTo("IE");
}
@Test
public void theBrowserVersionCanBeSpecifiedInTheBrowserStackConfiguration() {
DesiredCapabilities capabilities = new DesiredCapabilities();
environmentVariables.setProperty("browserstack.browserVersion","11.0");
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(capabilities.getCapability("browserVersion")).isEqualTo("11.0");
}
@Test
public void theBrowserNameAndVersionCanBeOverridenAtRunTime() {
DesiredCapabilities capabilities = new DesiredCapabilities();
environmentVariables.setProperty("browserstack.browserName","IE");
environmentVariables.setProperty("browserstack.browserVersion","11.0");
OverrideDriverCapabilities.withProperty("browserstack.browserName").setTo("Chrome");
OverrideDriverCapabilities.withProperty("browserstack.browserVersion").setTo("78");
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(capabilities.getBrowserName()).isEqualTo("Chrome");
assertThat(capabilities.getCapability("browserVersion")).isEqualTo("78");
}
@Test
public void osNameIsAssignedToBrowserStackSection() {
DesiredCapabilities capabilities = new DesiredCapabilities();
environmentVariables.setProperty("browserstack.os","Windows");
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(bstackOptionsFrom(capabilities).get("os")).isEqualTo("Windows");
}
@Test
public void osNameCanBeOverridenAtRuntime() {
DesiredCapabilities capabilities = new DesiredCapabilities();
environmentVariables.setProperty("browserstack.os","Windows");
OverrideDriverCapabilities.withProperty("browserstack.os").setTo("OS X");
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(bstackOptionsFrom(capabilities).get("os")).isEqualTo("OS X");
}
@Test
public void theSessionNameShouldBeTakenFromTheNameOfTheTest() {
// Given
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
AddCustomDriverCapabilities.from(environmentVariables)
.withTestDetails(SupportedWebDriver.REMOTE, SAMPLE_TEST_OUTCOME)
.to(capabilities);
assertThat(bstackOptionsFrom(capabilities).get("sessionName")).isEqualTo("Sample story - Sample test");
}
private Map<String,String> bstackOptionsFrom(DesiredCapabilities capabilities) {
return (Map<String, String>) capabilities.getCapability("bstack:options");
}
}
|
[
"[email protected]"
] | |
3f6d150a1a740afb8e4c0516e845b3c513bf9efb
|
a30a6e8bb02d819d2f3a8455c053845b0a108839
|
/src/main/java/com/senpure/io/support/plugin/intellij/structure/IoStructureViewModel.java
|
f7a15d123139aa946f19614073446edd6bd95d27
|
[] |
no_license
|
senpure/senpure-io-support-plugin-intellij
|
f3a48e49f595213f5afb09e06a849a62fa112b94
|
66f75ca8be127b2fddfeaa6b6b27bd87fc3f4eca
|
refs/heads/master
| 2020-06-04T14:41:51.660119
| 2020-03-30T00:35:23
| 2020-03-30T00:35:23
| 192,065,842
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,035
|
java
|
package com.senpure.io.support.plugin.intellij.structure;
import com.intellij.ide.structureView.StructureViewModel;
import com.intellij.ide.structureView.StructureViewModelBase;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.util.treeView.smartTree.Sorter;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
/**
* IoStructureViewModel
*
* @author senpure
* @time 2019-06-18 20:04:24
*/
public class IoStructureViewModel extends StructureViewModelBase implements
StructureViewModel.ElementInfoProvider {
public IoStructureViewModel(@NotNull PsiFile psiFile) {
super(psiFile, new IoEntityView(psiFile));
}
@NotNull
public Sorter[] getSorters() {
return new Sorter[]{Sorter.ALPHA_SORTER};
}
@Override
public boolean isAlwaysShowsPlus(StructureViewTreeElement element) {
return false;
}
@Override
public boolean isAlwaysLeaf(StructureViewTreeElement element) {
return false;
}
}
|
[
"[email protected]"
] | |
9934b942449665153e39dbf4585b7fb66816c224
|
755da35585bd16e66430289a19eb994d01ed16ef
|
/src/main/java/ch/ethz/idsc/gokart/core/track/TrackConstraint.java
|
2d64a0bdd8d203645a44b38f68d47e9ee923c74e
|
[] |
no_license
|
datahaki/retina
|
001f0ebe89d23a461ee95c946d93c3ba35bbdf25
|
b01b72aae54cca859b1f845748f70aa2c765f947
|
refs/heads/master
| 2020-09-01T08:32:54.658322
| 2019-10-27T12:25:36
| 2019-10-27T12:25:36
| 103,564,223
| 1
| 0
| null | 2018-10-20T02:02:24
| 2017-09-14T17:54:32
|
Matlab
|
UTF-8
|
Java
| false
| false
| 856
|
java
|
// code by mh
package ch.ethz.idsc.gokart.core.track;
import ch.ethz.idsc.tensor.Tensor;
/* package */ abstract class TrackConstraint {
private Tensor controlPointsX = null;
private Tensor controlPointsY = null;
private Tensor radiusControlPoints = null;
protected final void setAll(Tensor controlPointsX, Tensor controlPointsY, Tensor radiusControlPoints) {
this.controlPointsX = controlPointsX;
this.controlPointsY = controlPointsY;
this.radiusControlPoints = radiusControlPoints;
}
public final Tensor getControlPointsX() {
return controlPointsX;
}
public final Tensor getControlPointsY() {
return controlPointsY;
}
public final Tensor getRadiusControlPoints() {
return radiusControlPoints;
}
public abstract void compute(Tensor controlpointsX, Tensor controlpointsY, Tensor radiusControlPoints);
}
|
[
"[email protected]"
] | |
834573dae728e0ea2637717e18cb506fa84cde2e
|
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
|
/projetos/Caduceus/src/tv/floe/caduceus/hadoop/mapreduce/template/ExampleMapper.java
|
4c5449d5628b116063d01941053462e64fa1d1d4
|
[] |
no_license
|
charles-marques/dataset-375
|
29e2f99ac1ba323f8cb78bf80107963fc180487c
|
51583daaf58d5669c69d8208b8c4ed4e009001a5
|
refs/heads/master
| 2023-01-20T07:23:09.445693
| 2020-11-27T22:35:49
| 2020-11-27T22:35:49
| 283,315,149
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,841
|
java
|
package tv.floe.caduceus.hadoop.mapreduce.template;
import java.io.IOException;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;
import org.apache.log4j.Logger;
/**
* This is an example map class based off the original map reduce API.
*
* @author jpatterson
*
*/
public class ExampleMapper extends MapReduceBase implements Mapper<LongWritable, Text, Text, Text>
{
private JobConf configuration;
private final Text key = new Text();
private final Text val = new Text();
private static final Logger logger = Logger.getLogger( ExampleMapper.class );
/**
* The close method is called ONCE after all k/v pairs for the split have been processed.
*
*/
public void close() {
}
/**
*
* The configure method is where we're going to pull in your metdata for the ETL and VAP processes
* from the distributed cache.
*
* We'll plugin in the generic POJO code here.
*
*/
public void configure(JobConf conf) {
this.configuration = conf;
// Basic pojo code here
}
/**
* This is the method called "per line of input" in the source file "split"
*
* Data will come in as a k/v pair of a "LongWritable" and a "Text" value, which from a text file
* will be a line of text where the LongWritable represents the byte offset.
*
*
* @param inkey
* @param value
* @param output
* @param reporter
* @throws IOException
*/
@Override
public void map(LongWritable inkey, Text value, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {
String line = value.toString();
boolean bExampleBadParse = false;
/*
* Here we'd take the line of input text and parse it somehow, generally with POJO
*
* Example:
* YahooStockDataPoint rec = YahooStockDataPoint.parse( line );
*/
// now if we have a valid record we'll push it on through the output collector into the Shuffle phase
if (bExampleBadParse != false) {
// set both parts of the key
key.set( "[key from record or derived key]" );
val.set( "Record data to push the the shuffle" );
// now that its parsed, we send it through the shuffle for sort, onto reducers
output.collect(key, val);
} else {
// reporter.incrCounter( Timeseries_Counters.BAD_PARSE, 1 );
}
}
}
|
[
"[email protected]"
] | |
57844394b2d08b2287dc7536f406eda1c9225bcf
|
27511a2f9b0abe76e3fcef6d70e66647dd15da96
|
/src/com/instagram/y/a/f.java
|
a3c97e1378b7ff2d26a5b17b551200fd78eec356
|
[] |
no_license
|
biaolv/com.instagram.android
|
7edde43d5a909ae2563cf104acfc6891f2a39ebe
|
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
|
refs/heads/master
| 2022-05-09T15:05:05.412227
| 2016-07-21T03:48:36
| 2016-07-21T03:48:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 271
|
java
|
package com.instagram.y.a;
import com.instagram.user.a.q;
public final class f
{
public q a;
public int b;
public int c;
public String d;
}
/* Location:
* Qualified Name: com.instagram.y.a.f
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"[email protected]"
] | |
8d6ed65a87efa028f13bb86cf72863e4093acd52
|
b5a42a88ca0b5a49cad2df872288e67c1e039693
|
/3.JavaMultithreading/src/com/javarush/task/task24/task2409/Util.java
|
a8f355750191d7655d742c2171b4661ad83c194a
|
[] |
no_license
|
ValeriyEmelyanov/JavaRushTasks
|
0104a951e522911c8c6ed6eef05c16a66313bb2c
|
4dd45e71aed4e9fe5dce25a80614bfdc5f9a60fa
|
refs/heads/master
| 2020-06-01T21:27:29.056423
| 2019-12-29T08:21:26
| 2019-12-29T08:21:26
| 190,932,680
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,890
|
java
|
package com.javarush.task.task24.task2409;
import java.util.*;
public class Util {
protected static Collection<Object[]> jeansArray = new LinkedList<>();
static {
jeansArray.add(new Object[]{1, Company.Levis, 34, 6, 150.0});
jeansArray.add(new Object[]{2, Company.Denim, 35, 8, 154.0});
jeansArray.add(new Object[]{3, Company.Colins, 32, 6, 120.0});
jeansArray.add(new Object[]{4, Company.CalvinKleinJeans, 31, 8, 125.0});
}
public static List<Jeans> getAllJeans() {
//add your code here
abstract class AbstractJeans implements Jeans {
private int id;
private int length;
private int size;
private double price;
public AbstractJeans(int id, int length, int size, double price) {
this.id = id;
this.length = length;
this.size = size;
this.price = price;
}
@Override
public int getLength() {
return length;
}
@Override
public int getSize() {
return size;
}
@Override
public int getId() {
return id;
}
@Override
public double getPrice() {
return price;
}
@Override
public String toString() {
Formatter formatter = new Formatter();
return String.format("%s{id=%d, length=%d, size=%d, price=%s}",
//getTM(),
this.getClass().getSimpleName(),
getId(),
getLength(),
getSize(),
//getPrice()
formatter.format(Locale.ENGLISH, "%.1f", getPrice())
);
}
}
class Levis extends AbstractJeans {
public Levis(int id, int length, int size, double price) {
super(id, length, size, price);
}
@Override
public String getTM() {
//return Company.Levis.fullName;
return "Levi's";
}
}
class Denim extends AbstractJeans {
public Denim(int id, int length, int size, double price) {
super(id, length, size, price);
}
@Override
public String getTM() {
//return Company.Denim.fullName;
return "Denim";
}
}
List<Jeans> allJeans = new LinkedList<>();
for (Object[] obj : getJeansArray()) {
int id = (int) obj[0];
final Company company = (Company ) obj[1];
int length = (int) obj[2];
int size = (int) obj[3];
double price = (double) obj[4];
Jeans jeans = null;
if (Company.Levis == company) {
jeans = new Levis(id, length, size, price);
} else
if (Company.Denim == company) {
jeans = new Denim(id, length, size, price);
} else {
jeans = new AbstractJeans(id, length, size, price) {
public String getTM() {
return company.fullName;
}
};
}
allJeans.add(jeans);
}
return allJeans;
}
public static Collection<Object[]> getJeansArray() {
return jeansArray;
}
static enum Company {
Levis ("Levi's"),
Denim("Denim"),
Colins("COLIN'S"),
CalvinKleinJeans("Calvin Klein Jeans");
final String fullName;
Company(String name) {
this.fullName = name;
}
}
}
|
[
"[email protected]"
] | |
33deb637214d9cdc659c7e1de38951c68c8c0194
|
3d69b118e53ac56c01f57f47fe22bf5f6b0a0183
|
/org.erlide.model/src/org/erlide/model/erlang/ErlangToolkitFactory.java
|
b86bf1fc5b2d756f6e03729052d94de330a179ee
|
[] |
no_license
|
xingbei437/erlide
|
88c178fa737b39a5cd46f4030e6d4e02d41ea248
|
ae621300952bf137b36a2aad8ad2ffe72dc6bebd
|
refs/heads/master
| 2020-12-30T17:45:11.993408
| 2013-03-25T10:31:37
| 2013-03-25T10:31:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package org.erlide.model.erlang;
public class ErlangToolkitFactory {
private static volatile ErlangToolkit instance;
public static ErlangToolkit getInstance() {
if (instance == null) {
instance = new ErlangBackendToolkit();
}
return instance;
}
}
|
[
"[email protected]"
] | |
041ef3728167744ee010f531537a06bffc604538
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/29/1270.java
|
53ae19dc667a2ddd7af2cde484772c6db5e61303
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int m;
int i;
int j;
int c;
int a;
int b;
double s;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
m = Integer.parseInt(tempVar);
}
int[] sz = new int[m];
for (i = 0;i < m;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
sz[i] = Integer.parseInt(tempVar2);
}
}
for (i = 0;i < m;i++)
{
s = 0.0;
a = 2;
b = 1;
for (j = 0;j < sz[i];j++)
{
s += ((1.0 * a) / b);
c = a + b;
b = a;
a = c;
c = 0;
}
System.out.printf("%.3lf\n",s);
}
return 0;
}
}
|
[
"[email protected]"
] | |
3aff644bd94786203915ace66eb915858c4e020d
|
b0676f1877c3578568f329f806a50675f2434d1e
|
/streamx-console/streamx-console-service/src/main/java/com/streamxhub/streamx/console/base/properties/StreamXProperties.java
|
a395253a485337f2f59714dcbfe510bfd7061650
|
[
"Apache-2.0"
] |
permissive
|
soaped/streamx
|
49b31343afdb049cf943442cc16db397dd77b034
|
aa8a5b84b91328872280dfed09fb14e832068ce4
|
refs/heads/main
| 2023-05-30T19:22:11.275865
| 2021-06-11T03:04:24
| 2021-06-11T03:04:24
| 370,205,072
| 0
| 0
|
NOASSERTION
| 2021-06-11T03:04:25
| 2021-05-24T02:28:11
|
Java
|
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
/*
* Copyright (c) 2019 The StreamX Project
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.streamxhub.streamx.console.base.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Data
@Configuration
@ConfigurationProperties(prefix = "streamx")
public class StreamXProperties {
private ShiroProperties shiro = new ShiroProperties();
private boolean openAopLog = true;
}
|
[
"[email protected]"
] | |
1ed9f442ec8234e3fb0e50060abf6b4c2e1bc847
|
43ea6b8fd54f76e49f6e8ed8ec443336cf7db8ac
|
/uva/UVa11313_GourmetGames.java
|
1f5ea5c4d242fdf8235c22121ad0d06971081b9e
|
[] |
no_license
|
mirzainayat92/competitive-programming
|
68f6c0a5a10cf8d8f14040a385e22e53d03beb70
|
2d737fb6f69256f62ea5454888f5687f1814ea7b
|
refs/heads/master
| 2020-12-22T20:45:48.789657
| 2018-03-15T03:52:48
| 2018-03-15T03:52:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 747
|
java
|
package uva;
/* USER: 46724 (sfmunera) */
/* PROBLEM: 2288 (11313 - Gourmet Games) */
/* SUBMISSION: 08790587 */
/* SUBMISSION TIME: 2011-04-29 00:37:57 */
/* LANGUAGE: 2 */
import java.util.*;
public class UVa11313_GourmetGames {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
while (T-- > 0) {
int n = in.nextInt();
int m = in.nextInt();
int cnt = 0;
while (n > 1) {
n = n - m + 1;
++cnt;
}
if (n == 1)
System.out.println(cnt);
else
System.out.println("cannot do this");
}
}
}
|
[
"[email protected]"
] | |
fdf3eb000e442b78f0ea67cce077bd44779e53f1
|
0ac05e3da06d78292fdfb64141ead86ff6ca038f
|
/OSWE/oswe/openCRX/rtjar/rt.jar.src/com/sun/org/apache/xpath/internal/functions/FuncStringLength.java
|
82e2ec3399667c024bd7923e57e73cadc841eb56
|
[] |
no_license
|
qoo7972365/timmy
|
31581cdcbb8858ac19a8bb7b773441a68b6c390a
|
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
|
refs/heads/master
| 2023-07-26T12:26:35.266587
| 2023-07-17T12:35:19
| 2023-07-17T12:35:19
| 353,889,195
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,219
|
java
|
/* */ package com.sun.org.apache.xpath.internal.functions;
/* */
/* */ import com.sun.org.apache.xpath.internal.XPathContext;
/* */ import com.sun.org.apache.xpath.internal.objects.XNumber;
/* */ import com.sun.org.apache.xpath.internal.objects.XObject;
/* */ import javax.xml.transform.TransformerException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class FuncStringLength
/* */ extends FunctionDef1Arg
/* */ {
/* */ static final long serialVersionUID = -159616417996519839L;
/* */
/* */ public XObject execute(XPathContext xctxt) throws TransformerException {
/* 47 */ return new XNumber(getArg0AsString(xctxt).length());
/* */ }
/* */ }
/* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/com/sun/org/apache/xpath/internal/functions/FuncStringLength.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"t0984456716"
] |
t0984456716
|
225a0e3c7993377ebaf213c515aeb17ba000347f
|
1cc621f0cf10473b96f10fcb5b7827c710331689
|
/Ex6/Procyon/edu/cg/models/Car/Center.java
|
8abfbf70fdc9e1ee9ea7c0807c07efca35366447
|
[] |
no_license
|
nitaiaharoni1/Introduction-to-Computer-Graphics
|
eaaa16bd2dba5a51f0f7442ee202a04897cbaa1f
|
4467d9f092c7e393d9549df9e10769a4b07cdad4
|
refs/heads/master
| 2020-04-28T22:56:29.061748
| 2019-06-06T18:55:51
| 2019-06-06T18:55:51
| 175,635,562
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,981
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package edu.cg.models.Car;
import com.jogamp.opengl.GL2;
import edu.cg.models.IRenderable;
import edu.cg.models.SkewedBox;
public class Center implements IRenderable
{
private SkewedBox bodyBase;
private SkewedBox backBox;
private SkewedBox frontBox;
private SkewedBox sideBox;
public Center() {
this.bodyBase = new SkewedBox(0.25, 0.013125000000000001, 0.013125000000000001, 0.4, 0.4);
this.backBox = new SkewedBox(0.09375, 0.13125, 0.22968750000000002, 0.1, 0.1);
this.frontBox = new SkewedBox(0.046875, 0.13125, 0.11812500000000001, 0.1, 0.4);
this.sideBox = new SkewedBox(0.15000000000000002, 0.11812500000000001, 0.13125, 0.25, 0.15625);
}
@Override
public void render(final GL2 gl) {
gl.glPushMatrix();
Materials.SetBlackMetalMaterial(gl);
this.bodyBase.render(gl);
Materials.SetRedMetalMaterial(gl);
gl.glTranslated(0.1015625, 0.013125000000000001, 0.0);
this.frontBox.render(gl);
gl.glPopMatrix();
gl.glPushMatrix();
gl.glTranslated(-0.1015625, 0.013125000000000001, 0.0);
gl.glRotated(180.0, 0.0, 1.0, 0.0);
this.frontBox.render(gl);
gl.glPopMatrix();
gl.glPushMatrix();
gl.glTranslated(0.0, 0.013125000000000001, 0.125);
gl.glRotated(90.0, 0.0, 1.0, 0.0);
this.sideBox.render(gl);
gl.glPopMatrix();
gl.glPushMatrix();
gl.glTranslated(0.0, 0.013125000000000001, -0.125);
gl.glRotated(-90.0, 0.0, 1.0, 0.0);
this.sideBox.render(gl);
gl.glPopMatrix();
Materials.SetBlackMetalMaterial(gl);
gl.glPushMatrix();
gl.glTranslated(-0.03125, 0.013125000000000001, 0.0);
this.backBox.render(gl);
gl.glPopMatrix();
}
@Override
public void init(final GL2 gl) {
}
@Override
public void destroy(final GL2 gl) {
}
}
|
[
"[email protected]"
] | |
bca9059bb8405f1abeac61e1ba6a4fc03ef6c7cf
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/16/02/1.java
|
181219a4c064c7843b86e831dbb75d89b2115e68
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,730
|
java
|
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
public class B {
static BufferedReader br;
static StringTokenizer st;
static PrintWriter pw;
public static void main(String[] args) throws Exception {
br = new BufferedReader(new InputStreamReader(System.in));
pw = new PrintWriter(new BufferedWriter(new FileWriter("b.out")));
final int MAX_CASES = readInt();
for(int casenum = 1; casenum <= MAX_CASES; casenum++) {
pw.printf("Case #%d: ", casenum);
String s = nextToken();
boolean[] good = new boolean[s.length()];
int ret = 0;
boolean last = true;
for(int i = 0; i < good.length; i++) {
good[i] = s.charAt(i) == '+';
if(i > 0 && last != good[i]) {
ret++;
}
last = good[i];
}
if(!last) ret++;
pw.println(ret);
}
pw.close();
}
public static int readInt() {
return Integer.parseInt(nextToken());
}
public static long readLong() {
return Long.parseLong(nextToken());
}
public static double readDouble() {
return Double.parseDouble(nextToken());
}
public static String nextToken() {
while(st == null || !st.hasMoreTokens()) {
try {
if(!br.ready()) {
pw.close();
System.exit(0);
}
st = new StringTokenizer(br.readLine());
}
catch(IOException e) {
System.err.println(e);
System.exit(1);
}
}
return st.nextToken();
}
public static String readLine() {
st = null;
try {
return br.readLine();
}
catch(IOException e) {
System.err.println(e);
System.exit(1);
return null;
}
}
}
|
[
"[email protected]"
] | |
2587debc7c72d7d07f817a6cde309013aea7090a
|
9c04f7087ee689ec0d21ccad1210acda85f310be
|
/20170522/TomcatServer/src/top/yunp/ts/models/AbstractModel.java
|
a67fcf10f67de42d16a62942e28ba8990e127791
|
[] |
no_license
|
plter/AndroidLesson20170425
|
69b167dc4c38e4f9cc3cf256859f439be8150ceb
|
aec195511d36a5d971743301be88f5a35dd29bb3
|
refs/heads/master
| 2021-01-20T01:38:01.909702
| 2017-07-27T01:01:48
| 2017-07-27T01:01:48
| 89,308,412
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
package top.yunp.ts.models;
import org.json.JSONObject;
/**
* Created by plter on 5/22/17.
*/
public abstract class AbstractModel {
private JSONObject jsonObject;
public AbstractModel() {
jsonObject = new JSONObject();
}
public AbstractModel(String json) {
this.jsonObject = new JSONObject(json);
}
public JSONObject getJsonObject() {
return jsonObject;
}
@Override
public String toString() {
return getJsonObject().toString();
}
}
|
[
"[email protected]"
] | |
0390ce91d91a7ab18258d0ae66c1e5814e65bfa4
|
5d9128606e288f4a8ede1f39bf0909a97247dbb8
|
/jOOQ-test/examples/org/jooq/examples/sqlserver/adventureworks/dbo/routines/ufnGetContactInformation.java
|
73ed7ba8adf33751b47e653e300e3e3cfc29813b
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
Arbonaut/jOOQ
|
ec62a03a6541444b251ed7f3cdefc22eadf2a03d
|
21fbf50ca6129f1bc20cc6c553d99ba92865d192
|
refs/heads/master
| 2021-01-16T20:32:00.437982
| 2012-11-26T13:28:19
| 2012-11-26T13:28:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,831
|
java
|
/**
* This class is generated by jOOQ
*/
package org.jooq.examples.sqlserver.adventureworks.dbo.routines;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings("all")
public class ufnGetContactInformation extends org.jooq.impl.AbstractRoutine<java.lang.Object> {
private static final long serialVersionUID = -1066240214;
/**
* The procedure parameter <code>dbo.ufnGetContactInformation.RETURN_VALUE</code>
* <p>
* The SQL type of this item (TABLE) could not be mapped.<br/>
* Deserialising this field might not work!
*/
public static final org.jooq.Parameter<java.lang.Object> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.sqlserver.SQLServerDataType.getDefaultDataType("TABLE"));
/**
* The procedure parameter <code>dbo.ufnGetContactInformation.ContactID</code>
*/
public static final org.jooq.Parameter<java.lang.Integer> ContactID = createParameter("ContactID", org.jooq.impl.SQLDataType.INTEGER);
/**
* Create a new routine call instance
*/
public ufnGetContactInformation() {
super("ufnGetContactInformation", org.jooq.examples.sqlserver.adventureworks.dbo.dbo.dbo, org.jooq.util.sqlserver.SQLServerDataType.getDefaultDataType("TABLE"));
setReturnParameter(RETURN_VALUE);
addInParameter(ContactID);
}
/**
* Set the <code>ContactID</code> parameter IN value to the routine
*/
public void setContactID(java.lang.Integer value) {
setValue(org.jooq.examples.sqlserver.adventureworks.dbo.routines.ufnGetContactInformation.ContactID, value);
}
/**
* Set the <code>ContactID</code> parameter to the function
* <p>
* Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement!
*/
public void setContactID(org.jooq.Field<java.lang.Integer> field) {
setField(ContactID, field);
}
}
|
[
"[email protected]"
] | |
0473a926933a86f62cb6f4804d063dc0634143f2
|
4f6c381a861ea0d051f8e837630f1e1e6660ae3d
|
/luna-commons-message/src/main/java/com/luna/message/api/dao/TemplateDAO.java
|
c4383929520a8a60abc2eaa7a98b357efa780c10
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
DAQ121/luna-commons
|
5872b088505c173c5d6a9787c68a2134a373d85a
|
889110e845a5df3f481a180a405ebde425a7de06
|
refs/heads/master
| 2022-11-23T20:16:52.677559
| 2020-07-27T12:13:03
| 2020-07-27T12:13:03
| 282,892,728
| 1
| 0
|
Apache-2.0
| 2020-07-27T12:32:29
| 2020-07-27T12:32:29
| null |
UTF-8
|
Java
| false
| false
| 1,512
|
java
|
package com.luna.message.api.dao;
import org.apache.ibatis.annotations.*;
import com.luna.message.api.entity.TemplateDO;
/**
* @Description templateDO Mapper
* @author MrZhang-YUBO
* @date 2020年1月20日 17:22:27
*/
@Mapper
public interface TemplateDAO {
/**
* 插入
*
* @param templateDO
*/
@Insert("INSERT INTO tb_template (create_time, modified_time, subject, content) VALUES(now(), now(), #{subject}, #{content})")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
void insert(TemplateDO templateDO);
/**
* 删除
*
* @param id
* @return
*/
@Delete("DELETE FROM tb_template WHERE id=#{id}")
int delete(@Param("id") long id);
/**
* 更新内容
*
* @param templateDO
* @return
*/
@Update("UPDATE tb_template SET modified_time=now(), subject=#{subject} content=#{content} WHERE id=#{id}")
int update(TemplateDO templateDO);
/**
* 查找
*
* @param id
* @return
*/
@Select("SELECT id, create_time, modified_time, subject, content FROM tb_template WHERE id=#{id}")
@Results({
@Result(property = "id", column = "id"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "modifiedTime", column = "modified_time"),
@Result(property = "subject", column = "subject"),
@Result(property = "content", column = "content")
})
TemplateDO get(@Param("id") long id);
}
|
[
"[email protected]"
] | |
b9b70724374d4a53affdeca92c222a7c0783ae09
|
26183990a4c6b9f6104e6404ee212239da2d9f62
|
/components/distribution_tool/src/java/tests/com/topcoder/util/distribution/accuracytests/commands/ConvertToPDFCommandTest.java
|
e03bfb0ef596fc0b30ad37d040ca133df59fed44
|
[] |
no_license
|
topcoder-platform/tc-java-components
|
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
|
51b204566eb0df3902624c15f4fb69b5f99dc61b
|
refs/heads/dev
| 2023-08-08T22:09:32.765506
| 2022-02-25T06:23:56
| 2022-02-25T06:23:56
| 138,811,944
| 0
| 8
| null | 2022-02-23T21:06:12
| 2018-06-27T01:10:36
|
Rich Text Format
|
UTF-8
|
Java
| false
| false
| 3,094
|
java
|
/*
* Copyright (C) 2010 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.util.distribution.accuracytests.commands;
import com.topcoder.util.distribution.DistributionScriptCommand;
import com.topcoder.util.distribution.DistributionScriptExecutionContext;
import com.topcoder.util.distribution.accuracytests.TestHelper;
import com.topcoder.util.distribution.commands.CommandExecutionCondition;
import com.topcoder.util.distribution.commands.ConvertToPDFCommand;
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import java.io.File;
import java.util.ArrayList;
/**
* Tests ConvertToPDFCommand class.
*
* @author orange_cloud
* @version 1.0
*/
public class ConvertToPDFCommandTest extends TestCase {
/**
* Instance to test.
*/
private DistributionScriptCommand target;
/**
* <p>Returns the test suite of this class.</p>
*
* @return the test suite of this class.
*/
public static Test suite() {
return new TestSetup(new TestSuite(ConvertToPDFCommandTest.class)) {
/**
* <p>Sets up test environment.</p>
*
* @throws Exception to junit
*/
public void setUp() throws Exception {
TestHelper.clearTemp("test_files/accuracy/pdf");
}
};
}
/**
* <p>Sets up test environment.</p>
*
* @throws Exception to junit
*/
public void setUp() throws Exception {
super.setUp();
}
/**
* <p>Tears down test environment.</p>
*
* @throws Exception to junit
*/
public void tearDown() throws Exception {
super.tearDown();
}
/**
* Tests execute method.
*
* @throws Exception when it occurs deeper
*/
public void testExecute1() throws Exception {
String from = "test_files/accuracy/to_convert.html";
// String to = "test_files/accuracy/pdf/dir/dir/html.pdf";
String to = "test_files/accuracy/pdf/html.pdf";
target = new ConvertToPDFCommand(null, new ArrayList<CommandExecutionCondition>(), from, to);
DistributionScriptExecutionContext context = new DistributionScriptExecutionContext();
target.execute(context);
assertTrue("check that file exists", new File(to).isFile());
// it has to be visually verified after tests completed also
}
/**
* Tests execute method when file is only copied.
*
* @throws Exception when it occurs deeper
*/
public void testExecute2() throws Exception {
String from = "test_files/accuracy/to_convert.pdf";
String to = "test_files/accuracy/pdf/pdf.pdf";
target = new ConvertToPDFCommand(null, new ArrayList<CommandExecutionCondition>(), from, to);
DistributionScriptExecutionContext context = new DistributionScriptExecutionContext();
target.execute(context);
// check result
assertEquals("contents", "not a pdf, actually", TestHelper.readLine(to));
}
}
|
[
"[email protected]"
] | |
3db60508f7af964256c5d2fc16078cd7ff53cfca
|
4e2ece72fa054a7c6c96e2c2a25b47a6e413dab1
|
/ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserController.java
|
c8f10e9700acedbfc66278eb2a018ba25291968c
|
[
"Apache-2.0"
] |
permissive
|
noseparte/hero-kill-web
|
d6099f72eb101b8922a543bc26ac68d78a0cc541
|
b1fac9dbbdc44c87521fe0a24159476853dd9749
|
refs/heads/master
| 2022-06-30T05:55:14.235010
| 2020-03-09T09:08:45
| 2020-03-09T09:08:45
| 245,960,532
| 1
| 2
|
Apache-2.0
| 2022-06-21T02:57:00
| 2020-03-09T06:30:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,021
|
java
|
package com.github.wxiaoqi.security.admin.rest;
import com.github.wxiaoqi.security.admin.biz.MenuBiz;
import com.github.wxiaoqi.security.admin.biz.UserBiz;
import com.github.wxiaoqi.security.admin.entity.Menu;
import com.github.wxiaoqi.security.admin.entity.User;
import com.github.wxiaoqi.security.admin.rpc.service.PermissionService;
import com.github.wxiaoqi.security.admin.vo.FrontUser;
import com.github.wxiaoqi.security.admin.vo.MenuTree;
import com.github.wxiaoqi.security.common.rest.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* ${DESCRIPTION}
*
* @author wanghaobin
* @create 2017-06-08 11:51
*/
@RestController
@RequestMapping("user")
public class UserController extends BaseController<UserBiz,User> {
@Autowired
private PermissionService permissionService;
@Autowired
private MenuBiz menuBiz;
@RequestMapping(value = "/front/info", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<?> getUserInfo(String token) throws Exception {
FrontUser userInfo = permissionService.getUserInfo(token);
if(userInfo==null) {
return ResponseEntity.status(401).body(false);
} else {
return ResponseEntity.ok(userInfo);
}
}
@RequestMapping(value = "/front/menus", method = RequestMethod.GET)
public @ResponseBody
List<MenuTree> getMenusByUsername(String token) throws Exception {
return permissionService.getMenusByUsername(token);
}
@RequestMapping(value = "/front/menu/all", method = RequestMethod.GET)
public @ResponseBody
List<Menu> getAllMenus() throws Exception {
return menuBiz.selectListAll();
}
}
|
[
"[email protected]"
] | |
b9145df954e004ffc5d26ddc1d95042fcf196e5c
|
092c76fcc6c411ee77deef508e725c1b8277a2fe
|
/hybris/bin/ext-accelerator/savedorderforms/src/de/hybris/platform/savedorderforms/constants/SavedorderformsConstants.java
|
8c1ce095d42bde65d9163f2f8e45b62a5779a7d9
|
[
"MIT"
] |
permissive
|
BaggaShivanshu2/hybris-bookstore-tutorial
|
4de5d667bae82851fe4743025d9cf0a4f03c5e65
|
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
|
refs/heads/master
| 2022-11-28T12:15:32.049256
| 2020-08-05T11:29:14
| 2020-08-05T11:29:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 859
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.savedorderforms.constants;
/**
* Global class for all Savedorderforms constants. You can add global constants for your extension into this class.
*/
public final class SavedorderformsConstants extends GeneratedSavedorderformsConstants
{
public static final String EXTENSIONNAME = "savedorderforms";
private SavedorderformsConstants()
{
//empty to avoid instantiating this constant class
}
// implement here constants used by this extension
}
|
[
"[email protected]"
] | |
102a6303c9940eb3b5b3718c4b3a3eaf30522911
|
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
|
/jun_java_plugins/jun_httpclient/src/main/java/com/jun/plugin/okhttp/interceptor/DownloadFileProgressListener.java
|
468b7ef8e618101cc6e3029478d7b92ef8b0b56a
|
[] |
no_license
|
wujun728/jun_java_plugin
|
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
|
e031bc451c817c6d665707852308fc3b31f47cb2
|
refs/heads/master
| 2023-09-04T08:23:52.095971
| 2023-08-18T06:54:29
| 2023-08-18T06:54:29
| 62,047,478
| 117
| 42
| null | 2023-08-21T16:02:15
| 2016-06-27T10:23:58
|
Java
|
UTF-8
|
Java
| false
| false
| 199
|
java
|
package com.jun.plugin.okhttp.interceptor;
/**
*
* @author Wujun
*
*/
public interface DownloadFileProgressListener {
void updateProgress(long downloadLenth, long totalLength, boolean done);
}
|
[
"[email protected]"
] | |
1d9f9552e4e473aa19c219954b1e99fcafc6317f
|
af52d055db2543141f60d412169511846bd60109
|
/src/main/java/org/qortal/network/message/BlockMessage.java
|
b07dc8b1207cbd73a63f48173faab99058c534c5
|
[] |
no_license
|
xyz-sylwia/qortal
|
1f068ebf54c8470664e0f3b3f85d189d312a366e
|
9502444bbca982fbe89100003a4f7d1c3981cda7
|
refs/heads/master
| 2023-09-03T23:19:11.602892
| 2021-11-05T16:31:54
| 2021-11-05T16:31:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,715
|
java
|
package org.qortal.network.message;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.qortal.block.Block;
import org.qortal.data.at.ATStateData;
import org.qortal.data.block.BlockData;
import org.qortal.data.transaction.TransactionData;
import org.qortal.transform.TransformationException;
import org.qortal.transform.block.BlockTransformer;
import org.qortal.utils.Triple;
import com.google.common.primitives.Ints;
public class BlockMessage extends Message {
private static final Logger LOGGER = LogManager.getLogger(BlockMessage.class);
private Block block = null;
private BlockData blockData = null;
private List<TransactionData> transactions = null;
private List<ATStateData> atStates = null;
private int height;
public BlockMessage(Block block) {
super(MessageType.BLOCK);
this.block = block;
this.blockData = block.getBlockData();
this.height = block.getBlockData().getHeight();
}
private BlockMessage(int id, BlockData blockData, List<TransactionData> transactions, List<ATStateData> atStates) {
super(id, MessageType.BLOCK);
this.blockData = blockData;
this.transactions = transactions;
this.atStates = atStates;
this.height = blockData.getHeight();
}
public BlockData getBlockData() {
return this.blockData;
}
public List<TransactionData> getTransactions() {
return this.transactions;
}
public List<ATStateData> getAtStates() {
return this.atStates;
}
public static Message fromByteBuffer(int id, ByteBuffer byteBuffer) throws UnsupportedEncodingException {
try {
int height = byteBuffer.getInt();
Triple<BlockData, List<TransactionData>, List<ATStateData>> blockInfo = BlockTransformer.fromByteBuffer(byteBuffer);
BlockData blockData = blockInfo.getA();
blockData.setHeight(height);
return new BlockMessage(id, blockData, blockInfo.getB(), blockInfo.getC());
} catch (TransformationException e) {
LOGGER.info(String.format("Received garbled BLOCK message: %s", e.getMessage()));
return null;
}
}
@Override
protected byte[] toData() {
if (this.block == null)
return null;
try {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bytes.write(Ints.toByteArray(this.height));
bytes.write(BlockTransformer.toBytes(this.block));
return bytes.toByteArray();
} catch (TransformationException | IOException e) {
return null;
}
}
public BlockMessage cloneWithNewId(int newId) {
BlockMessage clone = new BlockMessage(this.block);
clone.setId(newId);
return clone;
}
}
|
[
"[email protected]"
] | |
1d6065bd176ff06b5805dc9add19672798f56620
|
6dcab17c7dc25b5ab046b73da412b423d1185b58
|
/modules/siddhi-query-api/src/main/java/org/wso2/siddhi/query/api/execution/query/input/stream/InputStream.java
|
85cec1b3bb535b5fd4bd1238a9c5b79c9f4cd27e
|
[
"Apache-2.0"
] |
permissive
|
doubaokun/siddhi
|
bdafcbc48e4e68ead80f7d4c400376c8306da826
|
d9a4cde9d19e2f7644d0844398c2b48919e1db61
|
refs/heads/master
| 2021-01-18T11:57:10.815213
| 2015-05-07T09:44:26
| 2015-05-07T09:44:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,162
|
java
|
/*
* Copyright (c) 2005 - 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.wso2.siddhi.query.api.execution.query.input.stream;
import org.wso2.siddhi.query.api.execution.query.Query;
import org.wso2.siddhi.query.api.execution.query.input.state.StateElement;
import org.wso2.siddhi.query.api.expression.Expression;
import org.wso2.siddhi.query.api.expression.constant.Constant;
import java.util.List;
public abstract class InputStream {
public abstract List<String> getAllStreamIds();
public abstract List<String> getUniqueStreamIds();
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream,
Expression onCompare,
Constant within) {
return new JoinInputStream(leftStream, type, rightStream, onCompare, within, JoinInputStream.EventTrigger.ALL);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream,
Expression onCompare, Constant within,
JoinInputStream.EventTrigger trigger) {
return new JoinInputStream(leftStream, type, rightStream, onCompare, within, trigger);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream,
Constant within,
JoinInputStream.EventTrigger trigger) {
return new JoinInputStream(leftStream, type, rightStream, null, within, trigger);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream,
Expression onCompare,
JoinInputStream.EventTrigger trigger) {
return new JoinInputStream(leftStream, type, rightStream, onCompare, null, trigger);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream,
JoinInputStream.EventTrigger trigger) {
return new JoinInputStream(leftStream, type, rightStream, null, null, trigger);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream, Constant within) {
return new JoinInputStream(leftStream, type, rightStream, null, within, JoinInputStream.EventTrigger.ALL);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream, Expression onCompare) {
return new JoinInputStream(leftStream, type, rightStream, onCompare, null, JoinInputStream.EventTrigger.ALL);
}
public static InputStream joinStream(SingleInputStream leftStream, JoinInputStream.Type type,
SingleInputStream rightStream) {
return new JoinInputStream(leftStream, type, rightStream, null, null, JoinInputStream.EventTrigger.ALL);
}
public static StateInputStream patternStream(StateElement patternElement) {
return new StateInputStream(StateInputStream.Type.PATTERN, patternElement);
}
public static StateInputStream sequenceStream(StateElement sequenceElement) {
return new StateInputStream(StateInputStream.Type.SEQUENCE, sequenceElement);
}
public static BasicSingleInputStream innerStream(String streamId) {
return new BasicSingleInputStream(null, streamId, true);
}
public static BasicSingleInputStream innerStream(String streamReferenceId, String streamId) {
return new BasicSingleInputStream(streamReferenceId, streamId, true);
}
public static BasicSingleInputStream stream(String streamId) {
return new BasicSingleInputStream(null, streamId);
}
public static BasicSingleInputStream stream(String streamReferenceId, String streamId) {
return new BasicSingleInputStream(streamReferenceId, streamId);
}
public static SingleInputStream stream(Query query) {
return new AnonymousInputStream(query);
}
}
|
[
"[email protected]"
] | |
4bcd0b9b7ebc87b2737656985cd868220c352e7f
|
c46304a8d962b6bea66bc6e4ef04b908bdb0dc97
|
/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionMarketData.java
|
581edea141c7aa344749694bf1cc9cdd87a56d80
|
[
"Apache-2.0",
"LicenseRef-scancode-mit-old-style",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.0-or-later"
] |
permissive
|
finmath/finmath-lib
|
93f0f67e7914e76bbdc4e32c6dddce9eba4f50a4
|
b80aba56bdf6b93551d966503d5b399409c36bff
|
refs/heads/master
| 2023-08-04T09:28:21.146535
| 2023-07-26T17:18:45
| 2023-07-26T17:18:45
| 8,832,601
| 459
| 211
|
Apache-2.0
| 2023-07-21T13:28:03
| 2013-03-17T10:00:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,386
|
java
|
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 20.05.2005
*/
package net.finmath.marketdata.model.volatilities;
import net.finmath.time.TimeDiscretization;
/**
* Basic interface to be implemented by classes
* providing swaption market data.
*
* @author Christian Fries
* @version 1.0
*/
public interface SwaptionMarketData {
TimeDiscretization getOptionMaturities();
TimeDiscretization getTenor();
double getSwapPeriodLength();
/**
* Returns the option price of a swaption for a given option maturity and tenor length.
* @param optionMaturity The option maturity.
* @param tenorLength The tenor length.
* @param periodLength The period length of the floating rate period.
* @param strike The strike (swap) rate.
* @return The option price.
*/
double getValue(double optionMaturity, double tenorLength, double periodLength, double strike);
/**
* Returns the option implied volatility of a swaption for a given option maturity and tenor length.
*
* @param optionMaturity The option maturity.
* @param tenorLength The tenor length.
* @param periodLength The period length of the floating rate period.
* @param strike The strike (swap) rate.
* @return The implied volatility.
*/
double getVolatility(double optionMaturity, double tenorLength, double periodLength, double strike);
}
|
[
"[email protected]"
] | |
b4f2427a005976433ba87e0947add7e7328d2896
|
296dc5362d07b906a67378f44813744dfdfb892a
|
/Server/edu.harvard.i2b2.crc/src/server/edu/harvard/i2b2/crc/dao/setfinder/querybuilder/PanelEntry.java
|
ff43de12d73830b29ba04978f4bea18f96fb00bc
|
[] |
no_license
|
tfmorris/i2b2
|
04c60cf02f36c8d97ca4adb5a547d5b6b02082ff
|
c863e35b892ef41469aef7ba9b0a284093e32862
|
refs/heads/master
| 2021-01-20T13:47:49.191738
| 2016-01-11T20:26:05
| 2016-01-11T20:26:05
| 14,435,817
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,315
|
java
|
/*
* Copyright (c) 2006-2007 Massachusetts General Hospital
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the i2b2 Software License v1.0
* which accompanies this distribution.
*
* Contributors:
* Rajesh Kuttan
*/
package edu.harvard.i2b2.crc.dao.setfinder.querybuilder;
/**
* Panel Entry bean class
* $Id: PanelEntry.java,v 1.4 2008/07/21 20:04:21 rk903 Exp $
* @author chris
*/
public class PanelEntry
{
public Integer Panel = 0;
public Integer OldPanel = -1;
public int Invert= 0;;
public long EstPanelSize = 0;
public int Items = 0;
public int AllShort = 0;
public int ForInsert = 0;
public int FirstPanel = 0;
public int totalItemOccurrences = 0;
public String totalItemOccurrencesOperator = "";
public boolean equals(Object o)
{
if ((o!=null)&&(o.getClass().equals(this.getClass())))
{
PanelEntry p = (PanelEntry) o;
if ((this.Panel==p.Panel)&&
(this.Invert==p.Invert)&&
(this.EstPanelSize==p.EstPanelSize)&&
(this.Items==p.Items)&&
(this.AllShort==p.AllShort)&&
(this.ForInsert==p.ForInsert)&&
(this.FirstPanel==p.FirstPanel) &&
(this.totalItemOccurrences == p.totalItemOccurrences))
return true;
else
return false;
}
else
return false;
}
}
|
[
"[email protected]"
] | |
4256f1d73f23f48abe535492fed7e0189d76f8d6
|
06bcb1bf990efad7b17fa48222db0e9725630bd1
|
/app/src/main/java/com/example/shopping/app/RegisterActivity.java
|
93a9d971875860f45ee08ad41072badef18240f1
|
[] |
no_license
|
sasuke39/shoppingapp
|
d6ba2128abc2cb909f23c366932175289cb10f87
|
62d304a10a03d09caf9454329572fc1517787e6d
|
refs/heads/master
| 2022-11-06T03:11:05.669075
| 2020-06-19T09:07:45
| 2020-06-19T09:07:45
| 260,170,297
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,689
|
java
|
package com.example.shopping.app;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;
import androidx.annotation.Nullable;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.shopping.R;
import com.example.shopping.utils.Constants;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import okhttp3.Call;
import static androidx.constraintlayout.widget.Constraints.TAG;
public class RegisterActivity extends Activity implements View.OnClickListener {
private ImageButton ibLoginBack;
private EditText loginName;
private EditText loginPwd;
private ImageButton ibLoginVisible;
private EditText loginPhone;
private Button btnRegister;
private ImageButton ibWeibo;
private ImageButton ibQq;
private ImageButton ibWechat;
/**
* Find the Views in the layout<br />
* <br />
* Auto-created on 2020-05-20 01:04:47 by Android Layout Finder
* (http://www.buzzingandroid.com/tools/android-layout-finder)
*/
private void findViews() {
ibLoginBack = (ImageButton)findViewById( R.id.ib_login_back );
loginName = (EditText)findViewById( R.id.login_name );
loginPwd = (EditText)findViewById( R.id.login_pwd );
ibLoginVisible = (ImageButton)findViewById( R.id.ib_login_visible );
loginPhone = (EditText)findViewById( R.id.login_phone );
btnRegister = (Button)findViewById( R.id.btn_register );
ibWeibo = (ImageButton)findViewById( R.id.ib_weibo );
ibQq = (ImageButton)findViewById( R.id.ib_qq );
ibWechat = (ImageButton)findViewById( R.id.ib_wechat );
ibLoginBack.setOnClickListener( this );
ibLoginVisible.setOnClickListener( this );
btnRegister.setOnClickListener( this );
ibWeibo.setOnClickListener( this );
ibQq.setOnClickListener( this );
ibWechat.setOnClickListener( this );
}
/**
* Handle button click events<br />
* <br />
* Auto-created on 2020-05-20 01:04:47 by Android Layout Finder
* (http://www.buzzingandroid.com/tools/android-layout-finder)
*/
@Override
public void onClick(View v) {
if ( v == ibLoginBack ) {
finish();
// Handle clicks for ibLoginBack
} else if ( v == ibLoginVisible ) {
// Handle clicks for ibLoginVisible
} else if ( v == btnRegister ) {
// Handle clicks for btnLogin
Register();
} else if ( v == ibWeibo ) {
// Handle clicks for ibWeibo
} else if ( v == ibQq ) {
// Handle clicks for ibQq
} else if ( v == ibWechat ) {
// Handle clicks for ibWechat
}
}
private void Register() {
final String name = loginName.getText().toString();
final String pwd = loginPwd.getText().toString();
final String phone = loginPhone.getText().toString();
if (checkStyle(name,pwd,phone)){
System.out.println(name+"==="+pwd+"==="+phone);
String url = Constants.TEST_URL +"medUser/register";
OkHttpUtils
.post()
.url(url)
.addParams("username", name)
.addParams("password", pwd)
.addParams("phone",phone)
.build()
.execute(new StringCallback()
{
/**
* 请求失败 回调
* @param call
* @param e
* @param id
*/
@Override
public void onError(Call call, Exception e, int id) {
Log.e(TAG,"登陆请求失败"+e.getMessage());
}
/**
* 联网成功时
* @param response 请求成功数据
* @param id
*/
@Override
public void onResponse(String response, int id) {
Log.e(TAG,"登陆请求成功!");
ifRegister(response);
}
});
}
}
private void ifRegister(String response) {
JSONObject jsonObject = JSON.parseObject(response);
if (jsonObject.get("code")=="200"){
Toast.makeText(this, Objects.requireNonNull(jsonObject.get("msg")).toString(), Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(this, Objects.requireNonNull(jsonObject.get("msg")).toString(), Toast.LENGTH_SHORT).show();
}
finish();
}
private Boolean checkStyle(String name, String pwd, String phone) {
if (name.length() > 5) {
if (!isSpecialChar(name)){
if (pwd.length()>6&&pwd.length()<20){
if (phone.length()==11){
return true;
}else {
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(this, "密码在6到20之间", Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(this, "姓名不能含有特殊字符", Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(this, "字数请大于5个", Toast.LENGTH_SHORT).show();
}
return false;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
findViews();
}
/**
* 是否含有特殊字符
* @param str
* @return
*/
public static boolean isSpecialChar(String str) {
String regEx = "[ _`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]|\n|\r|\t";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(str);
return m.find();
}
}
|
[
"[email protected]"
] | |
21f8b20002b028f6a3ce335067a4ce52f0932cc3
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/boot/svg/a/a/gn.java
|
4b198ffa5db1ceb9de4764665de8f65e9559ac62
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,503
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public final class gn extends c
{
private final int height = 39;
private final int width = 21;
public final int a(int paramInt, Object[] paramArrayOfObject)
{
switch (paramInt)
{
default:
case 0:
case 1:
case 2:
}
while (true)
{
paramInt = 0;
while (true)
{
return paramInt;
paramInt = 21;
continue;
paramInt = 39;
}
Canvas localCanvas = (Canvas)paramArrayOfObject[0];
paramArrayOfObject = (Looper)paramArrayOfObject[1];
Object localObject1 = c.h(paramArrayOfObject);
Object localObject2 = c.g(paramArrayOfObject);
Object localObject3 = c.k(paramArrayOfObject);
((Paint)localObject3).setFlags(385);
((Paint)localObject3).setStyle(Paint.Style.FILL);
Paint localPaint = c.k(paramArrayOfObject);
localPaint.setFlags(385);
localPaint.setStyle(Paint.Style.STROKE);
((Paint)localObject3).setColor(-16777216);
localPaint.setStrokeWidth(1.0F);
localPaint.setStrokeCap(Paint.Cap.BUTT);
localPaint.setStrokeJoin(Paint.Join.MITER);
localPaint.setStrokeMiter(4.0F);
localPaint.setPathEffect(null);
c.a(localPaint, paramArrayOfObject).setStrokeWidth(1.0F);
localCanvas.saveLayerAlpha(null, 83, 4);
localCanvas.save();
localPaint = c.a((Paint)localObject3, paramArrayOfObject);
localPaint.setColor(-16777216);
localObject3 = c.a((float[])localObject2, -1.0F, 1.224647E-016F, 72.0F, -1.224647E-016F, -1.0F, 72.0F);
((Matrix)localObject1).reset();
((Matrix)localObject1).setValues((float[])localObject3);
localCanvas.concat((Matrix)localObject1);
localCanvas.save();
localObject2 = c.a(localPaint, paramArrayOfObject);
localObject3 = c.a((float[])localObject3, -1.0F, 0.0F, 123.0F, 0.0F, 1.0F, 0.0F);
((Matrix)localObject1).reset();
((Matrix)localObject1).setValues((float[])localObject3);
localCanvas.concat((Matrix)localObject1);
localObject1 = c.l(paramArrayOfObject);
((Path)localObject1).moveTo(72.0F, 68.810799F);
((Path)localObject1).lineTo(68.877548F, 72.0F);
((Path)localObject1).lineTo(51.883453F, 54.64262F);
((Path)localObject1).cubicTo(50.724884F, 53.459286F, 50.71944F, 51.546272F, 51.883453F, 50.35738F);
((Path)localObject1).lineTo(68.877548F, 33.0F);
((Path)localObject1).lineTo(72.0F, 36.189201F);
((Path)localObject1).lineTo(56.030582F, 52.5F);
((Path)localObject1).lineTo(72.0F, 68.810799F);
((Path)localObject1).close();
WeChatSVGRenderC2Java.setFillType((Path)localObject1, 2);
localCanvas.drawPath((Path)localObject1, (Paint)localObject2);
localCanvas.restore();
localCanvas.restore();
localCanvas.restore();
c.j(paramArrayOfObject);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: com.tencent.mm.boot.svg.a.a.gn
* JD-Core Version: 0.6.2
*/
|
[
"[email protected]"
] | |
b45bda36ee5af3f3264b0cb15aaecda85f46782b
|
2b9aae15899a81930a6cae8c6907a9e3ef6e4c0c
|
/mall-order/modules/sdk/src/main/java/com/hjh/mall/order/constants/TransactionType.java
|
d6df8d4cea37230f87c36316de5fd743f55ae453
|
[] |
no_license
|
meiwulang/nosession
|
c0c8ba7f5b0f568a8d6c2330f53113c87dbbd990
|
cbb5624282bb554644f2f4b31dad6c214bb98a8e
|
refs/heads/master
| 2021-08-08T12:44:02.628872
| 2017-11-10T10:04:53
| 2017-11-10T10:04:53
| 93,580,211
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
package com.hjh.mall.order.constants;
/**
* Created by qiuxianxiang on 17/5/11.
*/
public enum TransactionType {
NORMAL(0), // 普通交易,全额付款
DEPOSIT(1) // 预付款交易
;
private int code;
private TransactionType(int code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public static TransactionType getEnum(int code) {
for (TransactionType transactionType: TransactionType.values()) {
if (transactionType.code == code) {
return transactionType;
}
}
throw new IllegalArgumentException("No matching type enum");
}
}
|
[
"[email protected]"
] | |
0b6c6ae82dc33556d172dbcfc4d2b9b1cebf69c9
|
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
|
/TRAVACC_R5/ndcwebservices/src/de/hybris/platform/ndcwebservices/validators/impl/NDCBaggageAllowanceRQFormatValidator.java
|
4b0ebdea5cfec55a6765fefaa5ae4c36f8ef4136
|
[] |
no_license
|
RabeS/model-T
|
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
|
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
|
refs/heads/master
| 2021-07-01T02:13:15.818439
| 2020-09-05T08:33:43
| 2020-09-05T08:33:43
| 147,307,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,016
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.ndcwebservices.validators.impl;
import de.hybris.platform.ndcfacades.ndc.BaggageAllowanceRQ;
import de.hybris.platform.ndcfacades.ndc.ErrorsType;
/**
* This class validates the {@link BaggageAllowanceRQ} based on the constraints defined in its xsd
*
* @deprecated since version 4.0 use {@link NDCRQFormatValidator}
*/
@Deprecated
public class NDCBaggageAllowanceRQFormatValidator extends NDCRQFormatValidator<BaggageAllowanceRQ>
{
@Override
public void validate(final BaggageAllowanceRQ baggageAllowanceRQ, final ErrorsType errorsType)
{
super.validate(baggageAllowanceRQ, errorsType);
}
}
|
[
"[email protected]"
] | |
8288a541302085bd5e85040c22d07f7a635879d7
|
36f18d4cc05ebabea9ac8a362852b5c4e8521e68
|
/src/test/java/WeiredAddTest.java
|
16968f76d5e7a4b2f9aa02e66ec528482efac612
|
[] |
no_license
|
yechanpark/JUnit-Basic
|
c9c97fc361436e2bc06051c956006cfd1359bf82
|
b08e72fc0e1c25434ee3cf5917deeb04f64143e6
|
refs/heads/master
| 2021-06-14T18:16:52.469829
| 2021-02-10T03:03:38
| 2021-02-10T03:03:38
| 89,111,116
| 0
| 0
| null | 2021-02-10T03:03:39
| 2017-04-23T02:02:48
|
Java
|
UTF-8
|
Java
| false
| false
| 839
|
java
|
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class WeiredAddTest {
private int expected;
private int value1;
private int value2;
public WeiredAddTest(int e, int v1, int v2) {
expected = e;
value1 = v1;
value2 = v2;
}
@Test
public void weiredAdd() {
SimpleCalculator calc = new SimpleCalculator();
calc.weiredAdd(value1, value2);
assertEquals(expected, calc.getResult());
}
@Parameters
public static Collection getParameters() {
return Arrays.asList(new Object[][] { { 30, 10, 20 }, { 0, 0, 0 }, { 100, 5, 7 }, { -10, -5, -5 } });
}
}
|
[
"[email protected]"
] | |
95e0a4d404c49b7e1b9f785d31d061ca36fe5dbb
|
228562fd9a8bfa4fe428895c92f14b1488a0eadf
|
/src/main/java/com/diffplug/gradle/pde/PdeAntBuildTask.java
|
6dec328415463feb2ca663bce5684683dd6eb462
|
[
"Apache-2.0"
] |
permissive
|
diffplug/goomph
|
c66ed0e9fefae8e4f2596161c7adc17604f5dfe9
|
e4643aa88a6bff7fd463883abd76131c203f1611
|
refs/heads/main
| 2023-07-20T20:03:12.948823
| 2023-07-12T18:31:06
| 2023-07-12T18:31:06
| 43,491,998
| 126
| 41
|
Apache-2.0
| 2023-07-12T17:46:44
| 2015-10-01T11:07:05
|
Java
|
UTF-8
|
Java
| false
| false
| 2,398
|
java
|
/*
* Copyright (C) 2016-2019 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.diffplug.gradle.pde;
import com.diffplug.common.base.Preconditions;
import com.diffplug.gradle.FileMisc;
import com.diffplug.gradle.eclipserunner.EclipseApp;
import java.util.LinkedHashMap;
import java.util.Map;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction;
/**
* Runs PDE build on an ant file.
*
* Your project must have defined `GOOMPH_PDE_VER`, see
* {@link PdeInstallation#fromProject(org.gradle.api.Project)}
* for details.
*
* ```groovy
* task featureBuild(type: PdeAntBuildTask) {
* antFile(FEATURE + '.xml')
* define('featuredir', FEATURE)
* inputs.dir(FEATURE)
* defineToFile('repodir', buildDir)
* outputs.dir(buildDir)
* }
* ```
*/
public class PdeAntBuildTask extends DefaultTask {
private Object antFile;
/** The directory from which plugins will be pulled, besides the delta pack. */
public void antFile(Object antFile) {
this.antFile = antFile;
}
private Map<String, String> buildProperties = new LinkedHashMap<>();
/** Adds a property to the build properties file. */
public void define(String key, String value) {
buildProperties.put(key, value);
}
/** Adds a property to the build properties file. */
public void defineToFile(String key, Object value) {
buildProperties.put(key, getProject().file(value).getAbsolutePath());
}
@TaskAction
public void build() throws Exception {
Preconditions.checkNotNull(antFile, "antFile must not be null!");
EclipseApp antRunner = new EclipseApp(EclipseApp.AntRunner.ID);
antRunner.addArg("buildfile", getProject().file(antFile).getAbsolutePath());
buildProperties.forEach((key, value) -> {
antRunner.addArg("D" + key + "=" + FileMisc.quote(value));
});
antRunner.runUsing(PdeInstallation.fromProject(getProject()));
}
}
|
[
"[email protected]"
] | |
e5f34e705b97ada234b54597a91ad20280d13749
|
c2f9d69a16986a2690e72718783472fc624ded18
|
/com/whatsapp/b2.java
|
18bfd2c2d9c4fc8a64752e5f56e7dbfc789fb4a1
|
[] |
no_license
|
mithileshongit/WhatsApp-Descompilado
|
bc973e1356eb043661a2efc30db22bcc1392d7f3
|
94a9d0b1c46bb78676ac401572aa11f60e12345e
|
refs/heads/master
| 2021-01-16T20:56:27.864244
| 2015-02-09T04:08:40
| 2015-02-09T04:08:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 708
|
java
|
package com.whatsapp;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
class b2 implements TextWatcher {
final CountryPicker a;
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
b7.a(CountryPicker.b(this.a), charSequence);
CountryPicker.a(this.a).setVisibility(TextUtils.isEmpty(charSequence) ? 8 : 0);
CountryPicker.c(this.a).getFilter().filter(charSequence);
}
b2(CountryPicker countryPicker) {
this.a = countryPicker;
}
public void afterTextChanged(Editable editable) {
}
}
|
[
"[email protected]"
] | |
0676e91ce09091b6a169e37d07030a6a376f50f2
|
dd79cbb44c81a375c4ccbd16aa2abb13d2cf0b0e
|
/app/src/main/java/com/anrongtec/laucher/adapter/VisitorAdapter.java
|
09afd8f3941cc056c19277729fe5103f6610332b
|
[] |
no_license
|
miniPinocchio/LaucherTj
|
42771a2c4194d18c15c856b665cd5babb5a68dc8
|
f9a31fb0a0c40638abcad65d238524f8afa864ad
|
refs/heads/master
| 2021-04-15T09:48:44.732905
| 2018-04-23T02:45:08
| 2018-04-23T02:45:08
| 116,204,112
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,491
|
java
|
package com.anrongtec.laucher.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.anrongtec.laucher.R;
import com.anrongtec.laucher.bean.AppModel;
import java.util.List;
/**
* Created by huiliu on 2018/3/25.
*
* @email [email protected]
* @introduce
*/
public class VisitorAdapter extends RecyclerView.Adapter<VisitorAdapter.VisitorHolder> {
private Context mContext;
private List<AppModel> mModels;
private View.OnClickListener mListener;
public VisitorAdapter(Context context, List<AppModel> models,View.OnClickListener listener) {
mContext = context;
mModels = models;
this.mListener = listener;
}
@Override
public VisitorHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = LayoutInflater.from(mContext).inflate(R.layout.item_main_tab_app, parent, false);
return new VisitorHolder(inflate);
}
@Override
public void onBindViewHolder(VisitorHolder holder, int position) {
final AppModel appModel = mModels.get(position);
holder.iv_tab_app.setImageDrawable(appModel.getLocalIcon());
holder.tv_tab_app.setText(appModel.getAppName());
holder.cb_manager_apps.setVisibility(View.GONE);
holder.rl_main_tab_app.setOnClickListener(mListener);
holder.rl_main_tab_app.setTag(position);
if ("com.android.contacts".equals(appModel.getAppPackName())){
holder.tv_tab_app.setText("电话");
}
}
@Override
public int getItemCount() {
return mModels.size() > 0 ? mModels.size() : 0;
}
class VisitorHolder extends RecyclerView.ViewHolder {
RelativeLayout rl_main_tab_app;
TextView tv_tab_app;
ImageView iv_tab_app;
CheckBox cb_manager_apps;
public VisitorHolder(View itemView) {
super(itemView);
tv_tab_app = (TextView) itemView.findViewById(R.id.tv_main_tab_app);
iv_tab_app = (ImageView) itemView.findViewById(R.id.iv_main_tab_app);
rl_main_tab_app = (RelativeLayout) itemView.findViewById(R.id.rl_main_tab_app);
cb_manager_apps = (CheckBox) itemView.findViewById(R.id.cb_manager_apps);
}
}
}
|
[
"[email protected]"
] | |
3fe0c177599e7e5edb6e11e542626a270f3a0d0a
|
d55fd3ab68565cf8818a4b29b7d4bcc46bb947c6
|
/server/src/main/java/com/autonomous/pm/model/Dto/ResPoi.java
|
e58ee4a03becbb7e0ce6a134b5ffe8f6f3a5ba79
|
[] |
no_license
|
VAIP-foundation/autonomous-driving-control
|
1ed1fe77bf4284e80a2aa0c71c054cde503ec3c3
|
7cbe5aef7fe6a5f018f4780cd6e3ccb7dd2d5006
|
refs/heads/master
| 2023-03-05T23:29:40.470438
| 2021-02-15T07:00:12
| 2021-02-15T07:00:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 621
|
java
|
package com.autonomous.pm.model.Dto;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
@RequiredArgsConstructor
public class ResPoi
{
private Integer idPoi; // POI ID
private String poiCd; // POI 코드
private String poiNm; // POI 명
private Integer poiTy; // POI Type
private Double lng; // 경도
private Double lat; // 위도
private Integer ord; // 순서
private String idGop; // 권역
}
|
[
"[email protected]"
] | |
3639b59040264001efef1e46765b48d1ce2f97f5
|
c8ba78e0ad43666490462972569f91dc0db579b2
|
/cdyoue-sydb-service/src/main/java/com/cdyoue/oddJobs/dto/lgfc/UserActiveness.java
|
f8fff940fa99679f7b7be1daabb9317bd1400e6d
|
[] |
no_license
|
tanhao619/sydb
|
24175dbdf9b26c1b59c7ebe40364410d71d40411
|
21a9dd6024668babffa3c3909993199fbae23ba9
|
refs/heads/master
| 2020-03-09T22:07:36.034408
| 2018-04-11T07:40:08
| 2018-04-11T07:40:08
| 129,026,982
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package com.cdyoue.oddJobs.dto.lgfc;
/**
* Created by tr on 2017/5/27.
*/
public class UserActiveness {
private Integer result;
private UserActivenessData data;
public Integer getResult() {
return result;
}
public void setResult(Integer result) {
this.result = result;
}
public UserActivenessData getData() {
return data;
}
public void setData(UserActivenessData data) {
this.data = data;
}
}
|
[
"[email protected]"
] | |
6715e84a714281a3b45ada1ef4b8d04e95f8cef9
|
f0d25d83176909b18b9989e6fe34c414590c3599
|
/app/src/main/java/com/tencent/tdm/system/TXReceiver.java
|
602c8969abe7b34043356bd2732d3b6a355f40c8
|
[] |
no_license
|
lycfr/lq
|
e8dd702263e6565486bea92f05cd93e45ef8defc
|
123914e7c0d45956184dc908e87f63870e46aa2e
|
refs/heads/master
| 2022-04-07T18:16:31.660038
| 2020-02-23T03:09:18
| 2020-02-23T03:09:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
package com.tencent.tdm.system;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class TXReceiver extends BroadcastReceiver {
private NetworkType LastNet = NetworkType.NETWORK_UNKNOWN;
public void onReceive(Context context, Intent intent) {
NetworkType netType = TXSystem.getInstance().GetNetworkType(context);
if (netType != this.LastNet) {
this.LastNet = netType;
TX.GetInstance().OnNetworkChanged(netType.ordinal(), true);
}
}
}
|
[
"[email protected]"
] | |
5d64e910be37b9bacdd7d3306479fd9f990f082b
|
af4aeab035e4cc297f217653bdbce4ff9a14c400
|
/app/src/main/java/com/coolweather/android/gson/AQI.java
|
3942444ff43c9efb832d48bd079d8c3ad0543e06
|
[
"Apache-2.0"
] |
permissive
|
AaronChe/coolweather
|
917ba43fc018955b6fb801439a133bf00b5a1285
|
a94395ca75508488b576df8144e3a4b47f5ea175
|
refs/heads/master
| 2021-01-20T21:35:00.554446
| 2017-09-03T10:19:43
| 2017-09-03T10:19:43
| 101,770,023
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 284
|
java
|
package com.coolweather.android.gson;
import com.google.gson.annotations.SerializedName;
/**
* Created by Administrator on 2017/9/1 0001.
*/
public class AQI {
public AQICity city;
public class AQICity {
public String aqi;
public String pm25;
}
}
|
[
"[email protected]"
] | |
f31a1d464e38b1ad9b0d0611e8aaabed48a20948
|
a3ac2fb9bc40c9c62824ee6d86d2be4450b8e54e
|
/spring/spring-rest/src/main/java/service/TestService.java
|
42fb6edb6e433fe7d9efe25e992e15981285863d
|
[] |
no_license
|
somyungsub/study-spring
|
452872ef653a742173ecf91eca6462c9759ee78a
|
16877566943f11aa432a28eeb50a62890040e239
|
refs/heads/master
| 2023-01-08T21:26:52.610273
| 2020-12-28T06:55:57
| 2020-12-28T06:55:57
| 136,273,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 953
|
java
|
package service;
import model.Test;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
public class TestService {
public Test findByName(String name) {
System.out.println("findByName ");
String newName = name + "Test ~!! ";
final Test test = new Test();
test.setAge(33);
test.setName(newName);
return test;
}
public List<Test> findAll() {
System.out.println("findAll call");
return Arrays.asList(
new Test("test1", 1),
new Test("test2", 2),
new Test("test3", 3),
new Test("test4", 4)
);
}
public Long create(Test test) {
System.out.println("Create!!");
System.out.println("creaet test : " + test);
return 1L;
}
public void update(Test test) {
System.out.println("Update !!! Create");
}
public void delete(String name) {
System.out.println(" Delete !! Complete");
}
}
|
[
"[email protected]"
] | |
ced91116aadfa2e3ee5c918ac0e5a536a8880fec
|
22fd8d017d42f2f656f6ba751e3ff9feda5b9796
|
/game-utils/src/main/java/com/wjybxx/fastjgame/time/DailyTimeOffset.java
|
f7a369f1cc36c1a880bf5d9be62bf692f7752485
|
[
"Apache-2.0"
] |
permissive
|
phantacix/fastjgame
|
ff7eec17917a40c7e324aee503d073bcd0ec3386
|
5d02bf16943aec044bac4fd40352bde03bf4fccd
|
refs/heads/master
| 2020-06-28T08:02:09.450914
| 2019-07-28T10:58:33
| 2019-07-28T10:58:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,239
|
java
|
/*
* Copyright 2019 wjybxx
*
* 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.wjybxx.fastjgame.time;
import com.wjybxx.fastjgame.utils.TimeUtils;
import org.apache.commons.lang3.StringUtils;
import java.time.LocalTime;
/**
* 每日时间,一天内的时间偏移量。
*
* 时间和分钟,它是相对于00:00的一个时间偏移量。
* 表格格式 HH:mm 或 HH:mm:ss
* 它是一个不可变对象。
*
* @author wjybxx
* @version 1.0
* date - 2019/7/7 22:50
* github - https://github.com/hl845740757
*/
public class DailyTimeOffset implements TimeOffset{
private final LocalTime time;
public DailyTimeOffset(int hour, int min) {
this(hour, min, 0);
}
public DailyTimeOffset(int hour, int min, int sec) {
this(LocalTime.of(hour, min, sec));
}
public DailyTimeOffset(LocalTime time) {
this.time = time;
}
/**
* 转换为相对于00:00的偏移量
* @return offset
*/
@Override
public long toOffset() {
return time.toSecondOfDay() * TimeUtils.SEC;
}
@Override
public String toString() {
return "DailyTimeOffset{" +
"time=" + time +
'}';
}
/**
* 从配置中解析出小时和分钟
* @param confParam 表格配置,HH:mm 或 HH:mm:ss
* @return HourAndMin
*/
public static DailyTimeOffset parseFromConf(String confParam) {
int count = StringUtils.countMatches(confParam, ':');
if (count == 1) {
// count == 1 表示两段
return new DailyTimeOffset(LocalTime.parse(confParam, TimeUtils.HH_MM));
} else if (count == 2){
// count ==2 表示3段
return new DailyTimeOffset(LocalTime.parse(confParam, TimeUtils.HH_MM_SS));
} else {
throw new ConfigFormatException("Unsupported HourAndMin format " + confParam);
}
}
}
|
[
"[email protected]"
] | |
037915529d02e65a76c515366972c0afdf2cab4e
|
69c5154cd8dc8deec7578970e0b597853ec5d53b
|
/src/main/java/com/isuper/base/server/gateway/security/AuthoritiesConstants.java
|
158b3b37e9b4289c0e4a9024da3c9e79354a1f3e
|
[] |
no_license
|
Jimmy3389/gateWayApplication
|
bc8610f11a216507b4445dbe77ee20c4ef29f1f2
|
e132b7597035ba01f7a98a010cdb04df355c6c0e
|
refs/heads/master
| 2020-03-21T15:27:06.394416
| 2018-06-26T09:09:38
| 2018-06-26T09:09:38
| 138,713,169
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 360
|
java
|
package com.isuper.base.server.gateway.security;
/**
* Constants for Spring Security authorities.
*/
public final class AuthoritiesConstants {
public static final String ADMIN = "ROLE_ADMIN";
public static final String USER = "ROLE_USER";
public static final String ANONYMOUS = "ROLE_ANONYMOUS";
private AuthoritiesConstants() {
}
}
|
[
"[email protected]"
] | |
77fc272eb627c1ec0ccc67ec2db1cc6e485796e3
|
19cec4e46813daed035a2e62cc7d04d39636a844
|
/supplier-wechat/src/main/java/me/jiangcai/user/notice/wechat/UserNoticeWechatConfig.java
|
5d6d71eb6fe16c8bb885d2f703e86bb6c8777861
|
[] |
no_license
|
caijiang/user-notice
|
40478a9c355b1530b31545256035bd7b1fc27a62
|
5d83bde628380e19ea0ff384fd4cb19f9a8f82bc
|
refs/heads/master
| 2021-01-15T16:41:52.808343
| 2017-08-18T07:38:54
| 2017-08-18T07:38:54
| 99,719,744
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 863
|
java
|
package me.jiangcai.user.notice.wechat;
import me.jiangcai.user.notice.differentiation.UserNoticeDifferentiationConfig;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
/**
* 使用微信供应商则必须开通差异化
* 同时需要进行初始化
*
* @author CJ
*/
@Configuration
@Import(UserNoticeDifferentiationConfig.class)
@ComponentScan("me.jiangcai.user.notice.wechat.bean")
public class UserNoticeWechatConfig {
public static final String URLTemplateDefine = "wechat_url_template";
public static final String TemplateIdDefine = "wechat_template_id";
public static final String ParameterArrayDefine = "wechat_parameter_array";
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.