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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0337b0d7931bfc277f50c5b460a2412611b64f32 | 4277f4cf6dbace9c7743d1cd280e61789f6f96a1 | /java/com/polis/gameserver/pathfinding/utils/BinaryNodeHeap.java | b0cd1f6d6f10e7d9387829b5d0817fff813d23d7 | [] | no_license | polis77/polis_server_h5 | cad220828de29e5b5a2267e2870095145d56179d | 7e8789baa7255065962b5fdaa1aa7f379d74ff84 | refs/heads/master | 2021-01-23T21:53:34.935991 | 2017-02-25T07:35:03 | 2017-02-25T07:35:03 | 83,112,850 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,376 | java | /*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.polis.gameserver.pathfinding.utils;
import com.polis.gameserver.pathfinding.geonodes.GeoNode;
/**
* @author -Nemesiss-
*/
public class BinaryNodeHeap
{
private final GeoNode[] _list;
private int _size;
public BinaryNodeHeap(int size)
{
_list = new GeoNode[size + 1];
_size = 0;
}
public void add(GeoNode n)
{
_size++;
int pos = _size;
_list[pos] = n;
while (pos != 1)
{
int p2 = pos / 2;
if (_list[pos].getCost() <= _list[p2].getCost())
{
GeoNode temp = _list[p2];
_list[p2] = _list[pos];
_list[pos] = temp;
pos = p2;
}
else
{
break;
}
}
}
public GeoNode removeFirst()
{
GeoNode first = _list[1];
_list[1] = _list[_size];
_list[_size] = null;
_size--;
int pos = 1;
int cpos;
int dblcpos;
GeoNode temp;
while (true)
{
cpos = pos;
dblcpos = cpos * 2;
if ((dblcpos + 1) <= _size)
{
if (_list[cpos].getCost() >= _list[dblcpos].getCost())
{
pos = dblcpos;
}
if (_list[pos].getCost() >= _list[dblcpos + 1].getCost())
{
pos = dblcpos + 1;
}
}
else if (dblcpos <= _size)
{
if (_list[cpos].getCost() >= _list[dblcpos].getCost())
{
pos = dblcpos;
}
}
if (cpos != pos)
{
temp = _list[cpos];
_list[cpos] = _list[pos];
_list[pos] = temp;
}
else
{
break;
}
}
return first;
}
public boolean contains(GeoNode n)
{
if (_size == 0)
{
return false;
}
for (int i = 1; i <= _size; i++)
{
if (_list[i].equals(n))
{
return true;
}
}
return false;
}
public boolean isEmpty()
{
return _size == 0;
}
}
| [
"policelazo@gmail.com"
] | policelazo@gmail.com |
1ca658f3d4700415059a4f5aef67b38e4b6827af | d223db75fc58daa583d180973611834eccc53190 | /src/main/java/com/skilrock/lms/dge/beans/DrawManagerBean.java | 7a60af919fadc378c494089f424d54149c64fa47 | [] | no_license | gouravSkilrock/NumbersGame | c1d6665afccee9218f1b53c1eee6fbcc95841bd0 | bbc8af08e436fd51c5dbb01b5b488d80235a0442 | refs/heads/master | 2021-01-20T15:04:59.198617 | 2017-05-09T07:00:29 | 2017-05-09T07:00:29 | 90,712,376 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,622 | java | package com.skilrock.lms.dge.beans;
import java.io.Serializable;
public class DrawManagerBean implements Serializable{
private static final long serialVersionUID = 1L;
private String autoDrawSec;
private String currDrawId;
private String currDrawTime;
private String currFreezeTime;
private String currNoOfTicket;
private String gameName;
private String lastDrawTime;
private String lastNoOfTicket;
private String lastNoOfWinner;
private String lastWinSymbol;
private String performStatus;
private String currDrawName;
private String lastMachineResult;
public String getAutoDrawSec() {
return autoDrawSec;
}
public String getCurrDrawId() {
return currDrawId;
}
public String getCurrDrawTime() {
return currDrawTime;
}
public String getCurrFreezeTime() {
return currFreezeTime;
}
public String getCurrNoOfTicket() {
return currNoOfTicket;
}
public String getGameName() {
return gameName;
}
public String getLastDrawTime() {
return lastDrawTime;
}
public String getLastNoOfTicket() {
return lastNoOfTicket;
}
public String getLastNoOfWinner() {
return lastNoOfWinner;
}
public String getLastWinSymbol() {
return lastWinSymbol;
}
public void setAutoDrawSec(String autoDrawSec) {
this.autoDrawSec = autoDrawSec;
}
public void setCurrDrawId(String currDrawId) {
this.currDrawId = currDrawId;
}
public void setCurrDrawTime(String currDrawTime) {
this.currDrawTime = currDrawTime;
}
public void setCurrFreezeTime(String currFreezeTime) {
this.currFreezeTime = currFreezeTime;
}
public void setCurrNoOfTicket(String currNoOfTicket) {
this.currNoOfTicket = currNoOfTicket;
}
public void setGameName(String gameName) {
this.gameName = gameName;
}
public void setLastDrawTime(String lastDrawTime) {
this.lastDrawTime = lastDrawTime;
}
public void setLastNoOfTicket(String lastNoOfTicket) {
this.lastNoOfTicket = lastNoOfTicket;
}
public void setLastNoOfWinner(String lastNoOfWinner) {
this.lastNoOfWinner = lastNoOfWinner;
}
public void setLastWinSymbol(String lastWinSymbol) {
this.lastWinSymbol = lastWinSymbol;
}
public String getPerformStatus() {
return performStatus;
}
public void setPerformStatus(String performStatus) {
this.performStatus = performStatus;
}
public String getCurrDrawName() {
return currDrawName;
}
public void setCurrDrawName(String currDrawName) {
this.currDrawName = currDrawName;
}
public String getLastMachineResult() {
return lastMachineResult;
}
public void setLastMachineResult(String lastMachineResult) {
this.lastMachineResult = lastMachineResult;
}
}
| [
"anuj.sharma@skilrock.com"
] | anuj.sharma@skilrock.com |
7a636cad245d198b9bbcf899d9f06f6b19d2be03 | d34befad9f71b5fc30d5bd539e6926afff6275fc | /softuni_spring_project/src/main/java/anilux/anilux_spring_mvc/domain/view_models/AnimeViewModel.java | ec09af10c5cfceed5c4458757e31ab19ec35a61f | [] | no_license | ste4o26/softuni_anilux_project | 28a17785ab5a1a9fd13ae84d349ce097766234b8 | 63bf6c89f120249138ffa336996a6cc6babf71a8 | refs/heads/master | 2023-04-09T20:13:35.463468 | 2021-04-25T10:17:38 | 2021-04-25T10:17:38 | 353,470,456 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package anilux.anilux_spring_mvc.domain.view_models;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class AnimeViewModel extends BaseViewModel{
private String imageThumbnailUrl;
private String name;
private Integer likes;
}
| [
"36564989+ste4o26@users.noreply.github.com"
] | 36564989+ste4o26@users.noreply.github.com |
d2b2467263e7a275a9f9a7b97fc3d1f2193495d3 | aa9d5ff23a74402dc42197f15ceebf3bb89607e6 | /base/src/org/pentanet/process/GenerateInvoiceCourses.java | 42052831a98ae7ee8843e1ef06714454e35ba079 | [] | no_license | vcappugi/ADESVENCA | ca4f2ef25a9bce7e633185936adc9154b9ea1829 | 92f9fa4556ee99b6961e4a8a66801bfa18d78086 | refs/heads/master | 2020-03-21T20:30:01.448421 | 2018-06-28T22:16:00 | 2018-06-28T22:16:00 | 139,011,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,343 | java | package org.pentanet.process;
import org.compiere.process.SvrProcess;
import org.compiere.util.*;
import org.compiere.apps.ADialog;
import org.compiere.util.Env;
import org.pentanet.model.X_HR_CompetitorCourses;
import org.pentanet.model.X_HR_TakenCourses;
import org.pentanet.model.X_HR_TakenCourses_Line;
import org.pentanet.model.X_HR_TakenCourses_par;
import java.util.*;
import java.sql.*;
import java.text.*;
public class GenerateInvoiceCourses extends SvrProcess{
@Override
protected void prepare() {
// TODO Auto-generated method stub
}
@Override
protected String doIt() throws Exception {
String sql= "SELECT id_activity, max(HR_TakenCourses_par_id) FROM HR_TakenCourses_par WHERE processed = 'N' GROUP BY id_activity";
PreparedStatement pstmt = DB.prepareStatement (sql,get_TrxName());
ResultSet rs = pstmt.executeQuery ();
while (rs.next ())
{
//Buscar en la Tabla par
X_HR_TakenCourses_par tcp = new X_HR_TakenCourses_par(getCtx(), rs.getInt(2), get_TrxName());
//Nueva Cabecera de Cursos Realizados
X_HR_TakenCourses tc = new X_HR_TakenCourses(getCtx(), 0, null);
tc.setValue(tcp.getValue());
tc.setName(tcp.getName());
tc.setC_BPartner_ID(tcp.getBPartner_Institute());
tc.setEndCourse(tcp.getEndCourse());
tc.setStartCourse(tcp.getStartCourse());
tc.setC_Country_ID(tcp.getC_Country_ID());
tc.setC_Region_ID(tcp.getC_Region_ID());
tc.setC_City_ID(tcp.getC_City_ID());
tc.setHR_Courses_ID(tcp.getID_Activity());
tc.save();
//ADialog.warn(0, null,"id udm" + tcp.getValue());
//Cargar Proveedores
String sqlp= "SELECT bpartner_provider, max(HR_TakenCourses_par_id), sum(costamt) FROM HR_TakenCourses_par WHERE id_activity = " + rs.getInt(1) + " group by bpartner_provider";
PreparedStatement pstmtp = DB.prepareStatement (sqlp,get_TrxName());
ResultSet rsp = pstmtp.executeQuery ();
while (rsp.next ())
{
//ADialog.warn(0, null,"id udm" + rsp.getInt(3));
//Buscar en la Tabla par
X_HR_TakenCourses_par tcpl = new X_HR_TakenCourses_par(getCtx(), rsp.getInt(2), get_TrxName());
//Nueva Cabecera de Cursos Realizados
X_HR_TakenCourses_Line tcl = new X_HR_TakenCourses_Line(getCtx(), 0, null);
tcl.setHR_TakenCourses_ID(tc.getHR_TakenCourses_ID());
tcl.setC_BPartner_ID(tcpl.getBPartner_Provider());
int sc = DB.getSQLValue(null,"SELECT HR_ServicesCourses_ID FROM HR_ServicesCourses WHERE m_product_exp_id =" + tcpl.getM_Product_Exp_ID());
tcl.setHR_ServicesCourses_ID(sc);
tcl.setCostAmt(rsp.getBigDecimal(3));
tcl.save();
//Cargar Empleados del curso
String sqle= "SELECT HR_TakenCourses_par_id FROM HR_TakenCourses_par WHERE id_activity = " + rs.getInt(1) + " AND bpartner_provider = "+ tcpl.getBPartner_Provider() +" :: varchar ";
PreparedStatement pstmte = DB.prepareStatement (sqle,get_TrxName());
ResultSet rse = pstmte.executeQuery ();
while (rse.next ())
{
//ADialog.warn(0, null,"id udm" + rsp.getInt(3));
//Buscar en la Tabla par
X_HR_TakenCourses_par tcpe = new X_HR_TakenCourses_par(getCtx(), rse.getInt(1), get_TrxName());
//Nueva Cabecera de Cursos Realizados
X_HR_CompetitorCourses tcc = new X_HR_CompetitorCourses(getCtx(), 0, null);
tcc.setHR_TakenCourses_ID(tc.getHR_TakenCourses_ID());
tcc.setHR_TakenCourses_Line_ID(tcl.getHR_TakenCourses_Line_ID());
tcc.setC_BPartner_ID(tcpe.getBPartner_Employee());
int cc = DB.getSQLValue(null,"SELECT C_Activity_ID FROM workedtime_activity("+ tcpe.getBPartner_Employee() +")");
tcc.setC_Activity_ID(cc);
boolean cost = DB.getSQLValueString(null,"SELECT IsCost FROM workedtime_activity("+ tcpe.getBPartner_Employee() +")") == "Y" ? true : false;
tcc.setIsCost(cost);
tcc.save();
}
pstmte.close();
rse.close();
}
pstmtp.close();
rsp.close();
} // Registros de Cursos realizado Par
return "Listo....";
}
} | [
"vcappugi@gmail.com"
] | vcappugi@gmail.com |
fb0f1a40ea7d2b2a6825af8527405aab43046f48 | 277bf3a0d3587808141942d0f0d42882e7b3cd8f | /ProjectSourceCode /Apache Commons Math v3.5/src/test/java/org/apache/commons/math3/linear/MatrixDimensionMismatchExceptionTest.java | 3e6acd74d19fc4019617c8f898eaa80d735aa837 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-public-domain",
"Unlicense"
] | permissive | yashgolwala/Software_Measurement_Team_M | d1b13389651dacbc8f735dc87a7d0992829c8909 | 3d2aef4c0711b7a02155a42ca6b08bb6c2693d4c | refs/heads/master | 2020-06-11T11:19:32.815146 | 2019-06-26T03:45:15 | 2019-06-26T03:45:15 | 193,592,231 | 0 | 0 | Unlicense | 2019-06-25T16:17:29 | 2019-06-24T22:57:31 | HTML | UTF-8 | Java | false | false | 129 | java | version https://git-lfs.github.com/spec/v1
oid sha256:9aa9a7a54ba7271e1999cbc547a721d54f0962f5010829ee5ca80e05a63d9569
size 1421
| [
"golwalayash@gmail.com"
] | golwalayash@gmail.com |
5b91514d1d3d736dd3bad0d4db25fc6be1ef110d | 9a710a86af1a5fe5ff04564481622f731247b6be | /src/main/java/metrics/FMeasure.java | ce76dee1c4b5ac87fe106bd057a1c70af5ed1520 | [] | no_license | phantomDai/FastJsonTester | c26bedf98ec1d669c33587290d0f307eae39df7f | 9ce1ad1a06e6149d9175adb4e4dd3046553622db | refs/heads/master | 2022-12-22T02:40:56.768960 | 2021-03-17T02:51:58 | 2021-03-17T02:51:58 | 221,404,061 | 1 | 1 | null | 2019-11-14T11:43:24 | 2019-11-13T08:01:03 | Java | UTF-8 | Java | false | false | 205 | java | package metrics;
import java.util.ArrayList;
import java.util.List;
/**
* @author GN
* @description Record the values of the F-measure
* @date 2019/11/13
*/
public class FMeasure extends Measure {
} | [
"daihepeng@sina.cn"
] | daihepeng@sina.cn |
59aedf35021b6529c49cb07799f8b98723729729 | 3fd5c650e79da86d127b121c61160c2291c77828 | /2015-6-1-runescape-bots/me.rabrg.spider/src/me/rabrg/rat/node/EatNode.java | 800de26f21e738a5d134268bdb6d4c4bcc2803d0 | [] | no_license | jxofficial/rs-scripts-project-archive | dd85145de99e49616113efb2763900f09a0061d6 | de8a460577761126135ec1d1d8e2223d9b0a26d9 | refs/heads/master | 2021-10-28T03:50:16.517017 | 2019-04-21T20:49:12 | 2019-04-21T20:49:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 820 | java | package me.rabrg.rat.node;
import org.dreambot.api.methods.Calculations;
import org.dreambot.api.methods.MethodContext;
import org.dreambot.api.methods.skills.Skill;
import org.dreambot.api.wrappers.items.Item;
public final class EatNode extends Node {
public EatNode(final MethodContext ctx) {
super(ctx);
}
private int nextHeal = Calculations.random(12, 43);
@Override
public boolean validate() {
return ctx.getSkills().getBoostedLevels(Skill.HITPOINTS) <= nextHeal;
}
@Override
public int execute() {
final Item food = ctx.getInventory().get("Tuna");
if (food != null) {
food.interact("Eat");
nextHeal = Calculations.random(12, 43);
} else {
ctx.getTabs().logout();
}
return Calculations.random(900, 1200);
}
@Override
public String getName() {
return "Eating food";
}
}
| [
"rabrg96@gmail.com"
] | rabrg96@gmail.com |
1fc96d1998dfd7fcc0cbaac7adfe37811649370e | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/challenge/p1086ui/DetailDecoration.java | a3d45256274597b97ea66bd2cffe89fb51a38e63 | [] | 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 | 1,962 | java | package com.p280ss.android.ugc.aweme.challenge.p1086ui;
import android.graphics.Rect;
import android.support.p029v7.widget.GridLayoutManager;
import android.support.p029v7.widget.GridLayoutManager.C1241a;
import android.support.p029v7.widget.RecyclerView;
import android.support.p029v7.widget.RecyclerView.C1272h;
import android.support.p029v7.widget.RecyclerView.C1273i;
import android.support.p029v7.widget.RecyclerView.C1290s;
import android.view.View;
import kotlin.jvm.internal.C7573i;
/* renamed from: com.ss.android.ugc.aweme.challenge.ui.DetailDecoration */
public final class DetailDecoration extends C1272h {
/* renamed from: a */
private final int f62619a;
private DetailDecoration(int i) {
this.f62619a = i;
}
public DetailDecoration(int i, int i2) {
this(i);
}
public final void getItemOffsets(Rect rect, View view, RecyclerView recyclerView, C1290s sVar) {
C7573i.m23587b(rect, "outRect");
C7573i.m23587b(view, "view");
C7573i.m23587b(recyclerView, "parent");
C7573i.m23587b(sVar, "state");
C1273i layoutManager = recyclerView.getLayoutManager();
if (!(layoutManager instanceof GridLayoutManager)) {
layoutManager = null;
}
GridLayoutManager gridLayoutManager = (GridLayoutManager) layoutManager;
if (gridLayoutManager != null) {
C1241a aVar = gridLayoutManager.f4721g;
if (aVar != null) {
int f = RecyclerView.m5892f(view);
int i = gridLayoutManager.f4716b;
if (aVar.mo5386a(f) == 1) {
int a = aVar.mo5387a(f, i);
rect.left = (this.f62619a * a) / i;
rect.right = this.f62619a - (((a + 1) * this.f62619a) / i);
if (aVar.mo5390c(f, i) > 0) {
rect.top = this.f62619a;
}
}
}
}
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
8226907042304c7eae8253539eb7eaac19752a68 | b27cc44f6fbf6b55b276354cf7fb4b0fda003416 | /src/main/java/sagex/remote/SagexServlet.java | a27f9ed0323e4987b74daa73692d3630b76bc31c | [
"Apache-2.0"
] | permissive | JREkiwi/sagetv-sagex-api | bdb7d472d8d6d5aa2c5a04a5b3c7b290a6b1fd75 | 239952ee331cc2668f88d7407b7e81eb1d772295 | refs/heads/master | 2021-09-08T15:46:57.636109 | 2018-03-10T21:32:42 | 2018-03-10T21:32:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,821 | java | package sagex.remote;
import sagex.plugin.impl.SagexConfiguration;
import sagex.remote.api.ApiHandler;
import sagex.remote.media.MediaHandler;
import sagex.remote.rmi.SageRMIServer;
import sagex.remote.services.SSJSServiceHandler;
import sagex.util.ILog;
import sagex.util.LogProvider;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
public class SagexServlet extends HttpServlet {
public static final String DEBUG_ATTRIBUTE = "SagexServlet.debug";
private static final long serialVersionUID = 1L;
public interface SageHandler {
void handleRequest(String args[], HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException;
}
private static ILog log = LogProvider.getLogger(SagexServlet.class);
private static boolean initialized = false;
private static Map<String, SageHandler> sageHandlers = new HashMap<String, SageHandler>();
private static Map<String, Object> staticData = new HashMap<String, Object>();
static SagexConfiguration config = new SagexConfiguration();
public SagexServlet() {
log.info("Sage Remote API Servlet for Jetty is loaded.");
}
@Override
protected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
enableCORS("*","*","*", request, response);
String accessControlRequestHeaders = request.getHeader("Access-Control-Request-Headers");
if (accessControlRequestHeaders != null) {
response.addHeader("Access-Control-Allow-Headers", accessControlRequestHeaders);
}
String accessControlRequestMethod = request.getHeader("Access-Control-Request-Method");
if (accessControlRequestMethod != null) {
response.addHeader("Access-Control-Allow-Methods", accessControlRequestMethod);
}
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
log.debug("Handling remote request: " + req.getPathInfo() + (req.getQueryString() != null ? ("?" + req.getQueryString()) : ""));
if ("true".equals(req.getParameter("_debug")) || req.getPathInfo().contains(".debug.")) {
req.setAttribute(DEBUG_ATTRIBUTE, true);
}
//if (config.getBoolean(SagexConfiguration.PROP_ENABLE_CORS, true))
enableCORS("*", "*", "*", req, resp);
resp.addHeader("X-SagexCors", String.valueOf(config.getBoolean(SagexConfiguration.PROP_ENABLE_CORS, true)));
try {
try {
if (req.getAttribute(DEBUG_ATTRIBUTE) != null) {
log.debug("BEGIN DEBUG: " + req.getPathInfo() + "?" + req.getQueryString());
for (Enumeration<String> e = req.getHeaderNames(); e.hasMoreElements(); ) {
String n = e.nextElement();
log.debug(String.format("REQ HEADER: %s=%s\n", n, req.getHeader(n)));
}
log.debug("END DEBUG");
}
} catch (Throwable t) {
t.printStackTrace();
}
// /command/arg1/arg2/.../
// 0 -
// 1 - command
// 2 - arg1
String args[] = req.getPathInfo().split("/");
if (args == null || args.length < 2) {
resp.sendError(404, "No Sage Handler Specified.");
return;
}
SageHandler sh = sageHandlers.get(args[1]);
if (sh == null) {
StringBuilder sb = new StringBuilder();
sb.append("Invalid Handler: " + args[1] + ". Valid handlers are ");
for (String s : sageHandlers.keySet()) {
sb.append(s).append(", ");
}
sb.append(".");
sb.append("The parameter '&_debug=true' will enable extra debug information in the logs");
resp.sendError(404, sb.toString());
return;
}
sh.handleRequest(args, req, resp);
} catch (Throwable t) {
log.warn("Failed to process Sage Handler!", t);
if (!resp.isCommitted()) {
resp.sendError(500, "Sage Servlet Failed: " + t.getMessage());
}
} finally {
}
}
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
if (!initialized) {
initServices(config.getClass().getName());
}
}
@Override
public void destroy() {
log = null;
initialized = false;
sageHandlers.clear();
staticData.clear();
super.destroy();
}
/**
* Static area for putting arbitrary data
*
* @return
*/
public static Map<String, Object> getUserData() {
return staticData;
}
/**
* Initialize the Sage Remote Service Handlers
*
* @param serverType - String containing 'jetty' for jetty, or null, for nielm
*/
public static void initServices(String serverType) {
initialized = true;
log.info("Remote API Servlet initializing.");
if (config.getBoolean(SagexConfiguration.PROP_ENABLE_HTTP, true)) {
// register our known handlers
sageHandlers.put(MediaHandler.SERVLET_PATH, new MediaHandler());
// This API handler handles json, nielm, and xml
sageHandlers.put(ApiHandler.SAGE_RPC_PATH, new ApiHandler());
// server side javascript service (ssjs)
sageHandlers.put(SSJSServiceHandler.SERVLET_PATH, new SSJSServiceHandler());
try {
// hack for now to register the Phoenix apis... need to do this dynamically
sageHandlers.put("phoenix", (SageHandler) Class.forName("sagex.phoenix.remote.PhoenixAPIHander").newInstance());
} catch (Throwable t) {
log.warn("Failed to load the Phoenix API Handler", t);
}
try {
// hack for now to register the Phoenix apis... need to do this dynamically
sageHandlers.put("streaming", (SageHandler) Class.forName("sagex.phoenix.remote.streaming.PhoenixStreamingHandler").newInstance());
} catch (Throwable t) {
log.warn("Failed to load the Phoenix API Handler", t);
}
log.info("Registered Handlers.");
// check if the RMI server is running... it may already be running
if (config.getBoolean(SagexConfiguration.PROP_ENABLE_RMI, true) && !SageRMIServer.getInstance().isRunning()) {
SageRMIServer.getInstance().startServer();
}
} else {
log.info("Sagex Rest Services are disabled.");
}
}
private static void enableCORS(String origin, String methods, String headers, HttpServletRequest request, HttpServletResponse response) {
String host = request.getHeader("Origin");
if (host==null) {
host = request.getHeader("Host");
}
response.addHeader("Access-Control-Allow-Origin", host);
response.addHeader("Access-Control-Request-Method", methods);
response.addHeader("Access-Control-Allow-Headers", headers);
response.addHeader("Access-Control-Allow-Credentials", "true");
}
}
| [
"sean.stuckless@gmail.com"
] | sean.stuckless@gmail.com |
2826435ac05ca96a30081ba568ca3c5552e8bd1d | ce55e10448040cf27b4abccc9fb2b46e83ffb434 | /trunk/tcga-qc/TCGA-Core/binfs/gatk/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/IndelType.java | ee8b01d7db8969247ca6333e41439d6173b2becb | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | NCIP/tcga-sandbox-v1 | 0518dee6ee9e31a48c6ebddd1c10d20dca33c898 | c8230c07199ddaf9d69564480ff9124782525cf5 | refs/heads/master | 2021-01-19T04:07:08.906026 | 2013-05-29T18:00:15 | 2013-05-29T18:00:15 | 87,348,860 | 1 | 7 | null | null | null | null | UTF-8 | Java | false | false | 1,892 | java | package org.broadinstitute.sting.gatk.walkers.annotator;
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
import org.broadinstitute.sting.utils.codecs.vcf.VCFHeaderLineType;
import org.broadinstitute.sting.utils.codecs.vcf.VCFInfoHeaderLine;
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.ExperimentalAnnotation;
import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
import org.broadinstitute.sting.utils.IndelUtils;
import java.util.*;
/**
* Created by IntelliJ IDEA.
* User: delangel
* Date: Mar 11, 2011
* Time: 11:47:33 AM
* To change this template use File | Settings | File Templates.
*/
public class IndelType implements InfoFieldAnnotation, ExperimentalAnnotation {
public Map<String, Object> annotate(RefMetaDataTracker tracker, ReferenceContext ref, Map<String, AlignmentContext> stratifiedContexts, VariantContext vc) {
int run;
if ( vc.isIndel() && vc.isBiallelic() ) {
String type="";
ArrayList<Integer> inds = IndelUtils.findEventClassificationIndex(vc, ref);
for (int k : inds) {
type = type+ IndelUtils.getIndelClassificationName(k)+".";
}
Map<String, Object> map = new HashMap<String, Object>();
map.put(getKeyNames().get(0), String.format("%s", type));
return map;
} else {
return null;
}
}
public List<String> getKeyNames() { return Arrays.asList("IndelType"); }
public List<VCFInfoHeaderLine> getDescriptions() { return Arrays.asList(new VCFInfoHeaderLine("IndelType", 1, VCFHeaderLineType.String, "Indel type description")); }
}
| [
"reillysm@mail.nih.gov"
] | reillysm@mail.nih.gov |
cbbdaed2c3722fb6be1d3e2b9944231da9ca8706 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-dyvmsapi/src/main/java/com/aliyuncs/dyvmsapi/transform/v20170525/ReportVoipProblemsResponseUnmarshaller.java | bf9fb7dd2576cdffb5ec93f87fa713820be55b7d | [
"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,365 | 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.dyvmsapi.transform.v20170525;
import com.aliyuncs.dyvmsapi.model.v20170525.ReportVoipProblemsResponse;
import com.aliyuncs.transform.UnmarshallerContext;
public class ReportVoipProblemsResponseUnmarshaller {
public static ReportVoipProblemsResponse unmarshall(ReportVoipProblemsResponse reportVoipProblemsResponse, UnmarshallerContext _ctx) {
reportVoipProblemsResponse.setRequestId(_ctx.stringValue("ReportVoipProblemsResponse.RequestId"));
reportVoipProblemsResponse.setCode(_ctx.stringValue("ReportVoipProblemsResponse.Code"));
reportVoipProblemsResponse.setModule(_ctx.stringValue("ReportVoipProblemsResponse.Module"));
reportVoipProblemsResponse.setMessage(_ctx.stringValue("ReportVoipProblemsResponse.Message"));
return reportVoipProblemsResponse;
}
} | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
6331c842acce52975da24b40a1ff74f7293dd61e | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/029984ce10237129dafb4d8058511296ba0698d8/before/GithubTest.java | 9c31f35640814b8d125538226496af0291e09673 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,355 | java | /*
* Copyright 2000-2013 JetBrains s.r.o.
*
* 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.jetbrains.plugins.github.test;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.PlatformTestCase;
import com.intellij.testFramework.UsefulTestCase;
import com.intellij.testFramework.VfsTestUtil;
import com.intellij.testFramework.fixtures.IdeaProjectTestFixture;
import com.intellij.testFramework.fixtures.IdeaTestFixtureFactory;
import git4idea.DialogManager;
import git4idea.Notificator;
import git4idea.commands.GitHttpAuthService;
import git4idea.commands.GitHttpAuthenticator;
import git4idea.config.GitConfigUtil;
import git4idea.config.GitVcsSettings;
import git4idea.remote.GitHttpAuthTestService;
import git4idea.repo.GitRepository;
import git4idea.test.GitExecutor;
import git4idea.test.GitTestUtil;
import git4idea.test.TestDialogManager;
import git4idea.test.TestNotificator;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.github.GithubAuthData;
import org.jetbrains.plugins.github.GithubSettings;
import static org.junit.Assume.assumeNotNull;
/**
* <p>The base class for JUnit platform tests of the github plugin.<br/>
* Extend this test to write a test on GitHub which has the following features/limitations:
* <ul>
* <li>This is a "platform test case", which means that IDEA [almost] production platform is set up before the test starts.</li>
* <li>Project base directory is the root of everything. </li>
* </ul></p>
* <p>All tests inherited from this class are required to have a login and a password to access the Github server.
* They are set up in System properties: <br/>
* <code>-Dtest.github.login=mylogin<br/>
* -Dtest.github.password=mypassword</code>
* </p>
*
* @author Kirill Likhodedov
*/
public abstract class GithubTest extends UsefulTestCase {
@NotNull protected Project myProject;
@NotNull protected VirtualFile myProjectRoot;
@NotNull protected GitVcsSettings myGitSettings;
@NotNull protected GithubSettings myGitHubSettings;
@NotNull private GitHttpAuthTestService myHttpAuthService;
@NotNull protected TestDialogManager myDialogManager;
@NotNull protected TestNotificator myNotificator;
@NotNull private IdeaProjectTestFixture myProjectFixture;
@NotNull protected GithubAuthData myAuth;
@NotNull protected String myHost;
@NotNull protected String myLogin1;
@NotNull protected String myLogin2;
@NotNull protected String myPassword;
@SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors", "UnusedDeclaration"})
protected GithubTest() {
PlatformTestCase.initPlatformLangPrefix();
GitTestUtil.setDefaultBuiltInServerPort();
}
protected void createProjectFiles() {
VfsTestUtil.createFile(myProjectRoot, "file.txt", "file.txt content");
VfsTestUtil.createFile(myProjectRoot, "file", "file content");
VfsTestUtil.createFile(myProjectRoot, "folder/file1", "file1 content");
VfsTestUtil.createFile(myProjectRoot, "folder/file2", "file2 content");
VfsTestUtil.createFile(myProjectRoot, "folder/empty_file");
VfsTestUtil.createFile(myProjectRoot, "folder/dir/file3", "file3 content");
VfsTestUtil.createDir (myProjectRoot, "folder/empty_folder");
}
protected void checkNotification(@NotNull NotificationType type, @Nullable String title, @Nullable String content) {
Notification actualNotification = myNotificator.getLastNotification();
assertNotNull("No notification was shown", actualNotification);
if (title != null) {
assertEquals("Notification has wrong title (content: " + actualNotification.getContent() + ")", title, actualNotification.getTitle());
}
if (content != null) {
assertEquals("Notification has wrong content", content, actualNotification.getContent());
}
assertEquals("Notification has wrong type", type, actualNotification.getType());
}
protected void registerHttpAuthService() {
GitHttpAuthTestService myHttpAuthService = (GitHttpAuthTestService)ServiceManager.getService(GitHttpAuthService.class);
myHttpAuthService.register(new GitHttpAuthenticator() {
@NotNull
@Override
public String askPassword(@NotNull String url) {
return myPassword;
}
@NotNull
@Override
public String askUsername(@NotNull String url) {
return myLogin1;
}
@Override
public void saveAuthData() {
}
@Override
public void forgetPassword() {
}
});
}
// workaround: user on test server got "" as username, so git can't generate default identity
protected void setGitIdentity(VirtualFile root) {
try {
GitConfigUtil.setValue(myProject, root, "user.name", "Github Test");
GitConfigUtil.setValue(myProject, root, "user.email", "githubtest@jetbrains.com");
}
catch (VcsException e) {
e.printStackTrace();
}
}
@Override
protected void setUp() throws Exception {
final String host = System.getenv("idea.test.github.host");
final String login1 = System.getenv("idea.test.github.login1");
final String login2 = System.getenv("idea.test.github.login2");
final String password = System.getenv("idea.test.github.password1");
// TODO change to assert when a stable Github testing server is ready
assumeNotNull(host);
assumeNotNull(login1);
assumeNotNull(password);
super.setUp();
myProjectFixture = IdeaTestFixtureFactory.getFixtureFactory().createFixtureBuilder(getTestName(true)).getFixture();
myProjectFixture.setUp();
myProject = myProjectFixture.getProject();
myProjectRoot = myProject.getBaseDir();
myGitSettings = GitVcsSettings.getInstance(myProject);
myGitSettings.getAppSettings().setPathToGit(GitExecutor.GIT_EXECUTABLE);
myHost = host;
myLogin1 = login1;
myLogin2 = login2;
myPassword = password;
myAuth = GithubAuthData.createBasicAuth(host, login1, password);
myGitHubSettings = GithubSettings.getInstance();
myGitHubSettings.setAuthData(myAuth, false);
myDialogManager = (TestDialogManager)ServiceManager.getService(DialogManager.class);
myNotificator = (TestNotificator)ServiceManager.getService(myProject, Notificator.class);
myHttpAuthService = (GitHttpAuthTestService)ServiceManager.getService(GitHttpAuthService.class);
}
@Override
protected void tearDown() throws Exception {
myHttpAuthService.cleanup();
myDialogManager.cleanup();
myNotificator.cleanup();
myProjectFixture.tearDown();
super.tearDown();
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
6218512c7695f75d4d97efbfc8f7958c68d5437a | 03ec6a37b303b32b21b4765c9431bd43c43856fb | /logistics/src/test/java/com/incito/logistics/testcase/sendgoods/SendGoodsPage_039_Clear_All_Volume_Test.java | 395cdb95f61a72ea59ecbdd472c92d607b21e4c7 | [] | no_license | TriciaChen/web-logistics-standard | 126ffa9993b0999dd8f7d28dcca794dded411766 | 415f26862c8161af90e71e259714d86f8a8480ab | refs/heads/master | 2021-01-18T09:57:38.447730 | 2015-01-13T06:13:23 | 2015-01-13T06:21:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,528 | java | package com.incito.logistics.testcase.sendgoods;
import java.util.Map;
import org.testng.ITestContext;
import org.testng.annotations.Test;
import com.incito.logistics.pages.SendGoodsPage;
import com.incito.logistics.pages.pageshelper.SendGoodsPageHelper;
import com.incito.logistics.plugins.father.SendGoodsFather;
/**
* @author xy-incito-wy
* @Description 测试用例:发布货源,所有的输入合法有效,然后清空按钮
* */
public class SendGoodsPage_039_Clear_All_Volume_Test extends SendGoodsFather {
@Test(dataProvider = "data")
public void clearTest(ITestContext context, Map<String, String> data) {
SendGoodsFather.sendGoodsParpare(context, seleniumUtil);
SendGoodsPageHelper.typeGoodsInfo(seleniumUtil, SendGoodsPage.SGP_BUTTON_LIGHTGOODS, SendGoodsPage.SGP_BUTTON_GOODSDATE3,
data.get("SGP_INPUT_GOODSORIGINALCITY"), data.get("SGP_INPUT_GOODSRECEIPTCITY"), data.get("SGP_INPUT_GOODSNAME"), data.get("SGP_INPUT_GOODSDETAILS"),
data.get("SGP_INPUT_VOLUME"), data.get("SGP_INPUT_COUNT"), data.get("SGP_INPUT_CARLENGTH"), data.get("SGP_INPUT_CARTYPE"),
data.get("SGP_INPUT_INFOFARE"),data.get("SGP_INPUT_UNITPRICE"),data.get("SGP_SELECT_UNITNAME"),data.get("SGP_INPUT_ALLPRICE"), data.get("SGP_INPUT_DECLAREVALUE"), data.get("SGP_INPUT_INSTRUCTION"));
SendGoodsPageHelper.enterPage(seleniumUtil, SendGoodsPage.SGP_BUTTON_RESET);
SendGoodsPageHelper.enterPage(seleniumUtil, SendGoodsPage.SGP_BUTTON_SEND);
SendGoodsPageHelper.checkSendStatus(seleniumUtil);
}
}
| [
"398733146@qq.com"
] | 398733146@qq.com |
f6129557f32f9c681945b995102200714ce84dd5 | 11ed2e3e853eaea0b3dc4c95e7cd06c8787e3a48 | /src/main/java/gov/step/app/domain/Fee.java | 94471d33184ea8f6ea912da1d5139f21e5e761cf | [] | no_license | JCN-DEV/master | 3337a51dac56c61b75e4a31fea440ef36f6698c1 | f9c456fde8c1f682cff851b3bcd0c9051f53da0d | refs/heads/master | 2021-01-11T15:35:51.197579 | 2017-02-11T06:53:19 | 2017-02-11T06:53:19 | 81,628,866 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,415 | java | package gov.step.app.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.elasticsearch.annotations.Document;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;
/**
* A Fee.
*/
@Entity
@Table(name = "fee")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "fee")
public class Fee implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(name = "fee_id")
private String feeId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFeeId() {
return feeId;
}
public void setFeeId(String feeId) {
this.feeId = feeId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Fee fee = (Fee) o;
if ( ! Objects.equals(id, fee.id)) return false;
return true;
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "Fee{" +
"id=" + id +
", feeId='" + feeId + "'" +
'}';
}
}
| [
"rana@devlead"
] | rana@devlead |
dda36e9844c66b2e7031163ec1b511919419561a | 4e8d52f594b89fa356e8278265b5c17f22db1210 | /WebServiceArtifacts/SiteConnectService/org/opentravel/ota/_2003/_05/AirTripDirectionType.java | 9fd988b9ad602e1a4be779a430190d2a5a7b1ef7 | [] | no_license | ouniali/WSantipatterns | dc2e5b653d943199872ea0e34bcc3be6ed74c82e | d406c67efd0baa95990d5ee6a6a9d48ef93c7d32 | refs/heads/master | 2021-01-10T05:22:19.631231 | 2015-05-26T06:27:52 | 2015-05-26T06:27:52 | 36,153,404 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,293 | java |
package org.opentravel.ota._2003._05;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for AirTripDirectionType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="AirTripDirectionType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
* <enumeration value="Outbound"/>
* <enumeration value="Return"/>
* <enumeration value="All"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "AirTripDirectionType")
@XmlEnum
public enum AirTripDirectionType {
@XmlEnumValue("Outbound")
OUTBOUND("Outbound"),
@XmlEnumValue("Return")
RETURN("Return"),
@XmlEnumValue("All")
ALL("All");
private final String value;
AirTripDirectionType(String v) {
value = v;
}
public String value() {
return value;
}
public static AirTripDirectionType fromValue(String v) {
for (AirTripDirectionType c: AirTripDirectionType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"ouni_ali@yahoo.fr"
] | ouni_ali@yahoo.fr |
d16796f71abbf278e533b9489dd93931402db9bb | cc86ac888b2c8499866d4848607c15c5e23bcfaf | /roncoo-pay-service-point/src/main/java/com/roncoo/pay/service/point/aip/impl/RpPointAccountQueryServiceImpl.java | 8ac447d98af5234e8e8b46a5d860afc7f42ccb15 | [] | no_license | flylee85/roncoo-pay-dubbo | 612b753ac8e25b374872913b53d8244e18961fa9 | e204fd7697d230d73431e9d8db8b5a881e227827 | refs/heads/master | 2021-04-26T22:23:05.151440 | 2018-02-24T06:28:38 | 2018-02-24T06:28:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,176 | java | /*
* ====================================================================
* 龙果学院: www.roncoo.com (微信公众号:RonCoo_com)
* 超级教程系列:《微服务架构的分布式事务解决方案》视频教程
* 讲师:吴水成(水到渠成),840765167@qq.com
* 课程地址:http://www.roncoo.com/course/view/7ae3d7eddc4742f78b0548aa8bd9ccdb
* ====================================================================
*/
package com.roncoo.pay.service.point.aip.impl;
import com.roncoo.pay.common.core.enums.PublicStatusEnum;
import com.roncoo.pay.common.core.exception.BizException;
import com.roncoo.pay.common.core.page.PageBean;
import com.roncoo.pay.common.core.page.PageParam;
import com.roncoo.pay.common.core.utils.DateUtils;
import com.roncoo.pay.service.point.api.RpPointAccountQueryService;
import com.roncoo.pay.service.point.dao.RpPointAccountDao;
import com.roncoo.pay.service.point.entity.RpPointAccount;
import com.roncoo.pay.service.point.exceptions.PointBizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @类功能说明: 账户查询service实现类
* @类修改者:
* @修改日期:
* @修改说明:
* @公司名称:广州领课网络科技有限公司(龙果学院:www.roncoo.com)
* @作者:zh
* @创建时间:2016-5-18 上午11:14:10
* @版本:V1.0
*/
@Service("rpPointAccountQueryService")
public class RpPointAccountQueryServiceImpl implements RpPointAccountQueryService {
@Autowired
private RpPointAccountDao rpPointAccountDao;
private static final Logger LOG = LoggerFactory.getLogger(RpPointAccountQueryServiceImpl.class);
/**
* 根据用户编号编号获取账户信息
*
* @param userNo
* 用户编号
* @return
*/
@Override
public RpPointAccount getAccountByUserNo(String userNo) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("userNo", userNo);
LOG.info("根据用户编号查询账户信息");
RpPointAccount account = this.rpPointAccountDao.getBy(map);
if (account == null) {
throw PointBizException.ACCOUNT_NOT_EXIT;
}
// 不是同一天直接清0
if (!DateUtils.isSameDayWithToday(account.getEditTime())) {
account.setEditTime(new Date());
rpPointAccountDao.update(account);
}
return account;
}
/**
* 根据参数分页查询账户.
*
* @param pageParam
* 分页参数.
* @param params
* 查询参数,可以为null.
* @return AccountList.
* @throws BizException
*/
@Override
public PageBean queryAccountListPage(PageParam pageParam, Map<String, Object> params) {
return rpPointAccountDao.listPage(pageParam, params);
}
/**
* 获取所有账户
* @return
*/
@Override
public List<RpPointAccount> listAll(){
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("status", PublicStatusEnum.ACTIVE.name());
return rpPointAccountDao.listBy(paramMap);
}
} | [
"xieshengrong@live.com"
] | xieshengrong@live.com |
7c70b3e223db05a2de8de07ff813b9797a7ae37e | 088cad7c00db1e05ad2ab219e393864f3bf7add6 | /classes/bwg.java | d186e384d2fd74b7acde8fb841e9054ced04f030 | [] | no_license | devidwfreitas/com-santander-app.7402 | 8e9f344f5132b1c602d80929f1ff892293f4495d | e9a92b20dc3af174f9b27ad140643b96fb78f04d | refs/heads/main | 2023-05-01T09:33:58.835056 | 2021-05-18T23:54:43 | 2021-05-18T23:54:43 | 368,692,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,074 | java | import java.util.ArrayList;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONException;
class bwg implements bnp<Integer> {
bwg(bvy parambvy, ArrayList paramArrayList, JSONArray paramJSONArray) {}
public Object a(Integer paramInteger) {
return this.a.get(paramInteger.intValue());
}
public Iterator<Integer> a() {
int i = this.a.size();
return new bwh(this, new bpw<Integer>(Integer.valueOf(0)), i);
}
public void a(Integer paramInteger, Object paramObject, bnq parambnq) {
try {
this.b.put(paramInteger.intValue(), paramObject);
return;
} catch (JSONException jSONException) {
paramObject = jSONException.getLocalizedMessage();
Object object = paramObject;
if (paramObject == null)
object = "Error staging object.";
parambnq.a(new bhp((String)object));
return;
}
}
}
/* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\bwg.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"devid.wfreitas@gmail.com"
] | devid.wfreitas@gmail.com |
817309b840ee56d2871e0419c21870b253dc169a | b3a694913d943bdb565fbf828d6ab8a08dd7dd12 | /sources/p213q/p217b/p218a/p231b/p251g/p256e/C2440fa.java | bdd8a17b1f7cb71c2a1a333bcf85518c9db200b2 | [] | no_license | v1ckxy/radar-covid | feea41283bde8a0b37fbc9132c9fa5df40d76cc4 | 8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a | refs/heads/master | 2022-12-06T11:29:19.567919 | 2020-08-29T08:00:19 | 2020-08-29T08:00:19 | 294,198,796 | 1 | 0 | null | 2020-09-09T18:39:43 | 2020-09-09T18:39:43 | null | UTF-8 | Java | false | false | 1,026 | java | package p213q.p217b.p218a.p231b.p251g.p256e;
/* renamed from: q.b.a.b.g.e.fa */
public final class C2440fa implements C2457ga {
/* renamed from: a */
public static final C2758y1<Boolean> f6529a;
/* renamed from: b */
public static final C2758y1<Boolean> f6530b;
static {
C2486i2 i2Var = new C2486i2(C2774z1.m6581a("com.google.android.gms.measurement"));
f6529a = C2758y1.m6560a(i2Var, "measurement.service.configurable_service_limits", true);
f6530b = C2758y1.m6560a(i2Var, "measurement.client.configurable_service_limits", true);
C2758y1.m6558a(i2Var, "measurement.id.service.configurable_service_limits", 0);
}
/* renamed from: a */
public final boolean mo7650a() {
return true;
}
/* renamed from: b */
public final boolean mo7651b() {
return ((Boolean) f6529a.mo8113b()).booleanValue();
}
/* renamed from: c */
public final boolean mo7652c() {
return ((Boolean) f6530b.mo8113b()).booleanValue();
}
}
| [
"josemmoya@outlook.com"
] | josemmoya@outlook.com |
fe697f429bd0b01236801c7ad4f88d70a08ef7a6 | 08945e7ed2157b674aa99cd33318b2f0f70b6d51 | /OnlineTraining/src/wrapperclasses/AutoBoxing.java | ae0f063fa7d502df6adfe417ff7a6893bb7b9ef9 | [] | no_license | nagarjunreddykasu/seleniumonline | 356ce7c02ccd72cf0b00ecb256fece7eb38b19cd | 7ca5db51d16554c27f519f37cf2b9ccbecb97fbe | refs/heads/master | 2023-06-16T18:57:12.490681 | 2021-07-12T10:51:17 | 2021-07-12T10:51:17 | 333,145,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package wrapperclasses;
public class AutoBoxing {
public static void main(String[] args) {
int a=20; //primitive
Integer i=Integer.valueOf(a);//converting int to Integer explicitly
Integer j=a; //Autoboxing
System.out.println(a+"\t"+i+"\t"+j);
double d=20.75;
Double db=d;
}
}
| [
"nagarjun.sdet@gmail.com"
] | nagarjun.sdet@gmail.com |
63f83f48fbe5cbec96ffe96f99645f7e716fad44 | 58dc95ed1ee4b6bb7c4c79d836b51bde59e069ca | /src/main/java/io/dummymaker/generator/simple/string/NameGenerator.java | 7413f24aff3b2cc75fcb3489a9e0ee07d2a903a0 | [
"MIT"
] | permissive | morristech/dummymaker | f5f03c9e08a71a5fba2c784dc531555cf903b2b1 | fdff8ebf116e90026994b38c8b3c08a8420a3550 | refs/heads/master | 2023-03-12T13:45:55.840611 | 2020-12-18T20:37:29 | 2020-12-18T20:37:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,083 | java | package io.dummymaker.generator.simple.string;
import io.dummymaker.bundle.IBundle;
import io.dummymaker.bundle.impl.FemaleNameBundle;
import io.dummymaker.bundle.impl.MaleNameBundle;
import io.dummymaker.generator.IGenerator;
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.ThreadLocalRandom;
import java.util.regex.Pattern;
import static java.util.regex.Pattern.CASE_INSENSITIVE;
/**
* Generates names male and female as a string
*
* @author GoodforGod
* @since 26.05.2017
*/
public class NameGenerator implements IGenerator<String> {
private final Pattern pattern = Pattern.compile("name|assignee|employe|worker", CASE_INSENSITIVE);
private final IBundle maleBundle = new MaleNameBundle();
private final IBundle femaleBundle = new FemaleNameBundle();
@Override
public @NotNull String generate() {
return ThreadLocalRandom.current().nextBoolean()
? maleBundle.random()
: femaleBundle.random();
}
@Override
public @NotNull Pattern pattern() {
return pattern;
}
}
| [
"goodforgod.dev@gmail.com"
] | goodforgod.dev@gmail.com |
12772f2dd39b4850c1c8512d2221f322408ab62c | ceeacb5157b67b43d40615daf5f017ae345816db | /generated/sdk/network/azure-resourcemanager-network-generated/src/main/java/com/azure/resourcemanager/network/generated/models/DdosProtectionPlans.java | 4df99c64241c1d2ded38ce630e6ed4be909cc60b | [
"LicenseRef-scancode-generic-cla"
] | no_license | ChenTanyi/autorest.java | 1dd9418566d6b932a407bf8db34b755fe536ed72 | 175f41c76955759ed42b1599241ecd876b87851f | refs/heads/ci | 2021-12-25T20:39:30.473917 | 2021-11-07T17:23:04 | 2021-11-07T17:23:04 | 218,717,967 | 0 | 0 | null | 2020-11-18T14:14:34 | 2019-10-31T08:24:24 | Java | UTF-8 | Java | false | false | 7,911 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.generated.models;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
/** Resource collection API of DdosProtectionPlans. */
public interface DdosProtectionPlans {
/**
* Deletes the specified DDoS protection plan.
*
* @param resourceGroupName The name of the resource group.
* @param ddosProtectionPlanName The name of the DDoS protection plan.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void deleteByResourceGroup(String resourceGroupName, String ddosProtectionPlanName);
/**
* Deletes the specified DDoS protection plan.
*
* @param resourceGroupName The name of the resource group.
* @param ddosProtectionPlanName The name of the DDoS protection plan.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void delete(String resourceGroupName, String ddosProtectionPlanName, Context context);
/**
* Gets information about the specified DDoS protection plan.
*
* @param resourceGroupName The name of the resource group.
* @param ddosProtectionPlanName The name of the DDoS protection plan.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified DDoS protection plan.
*/
DdosProtectionPlan getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName);
/**
* Gets information about the specified DDoS protection plan.
*
* @param resourceGroupName The name of the resource group.
* @param ddosProtectionPlanName The name of the DDoS protection plan.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified DDoS protection plan.
*/
Response<DdosProtectionPlan> getByResourceGroupWithResponse(
String resourceGroupName, String ddosProtectionPlanName, Context context);
/**
* Gets all DDoS protection plans in a subscription.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all DDoS protection plans in a subscription.
*/
PagedIterable<DdosProtectionPlan> list();
/**
* Gets all DDoS protection plans in a subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all DDoS protection plans in a subscription.
*/
PagedIterable<DdosProtectionPlan> list(Context context);
/**
* Gets all the DDoS protection plans in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all the DDoS protection plans in a resource group.
*/
PagedIterable<DdosProtectionPlan> listByResourceGroup(String resourceGroupName);
/**
* Gets all the DDoS protection plans in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all the DDoS protection plans in a resource group.
*/
PagedIterable<DdosProtectionPlan> listByResourceGroup(String resourceGroupName, Context context);
/**
* Gets information about the specified DDoS protection plan.
*
* @param id the resource ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified DDoS protection plan.
*/
DdosProtectionPlan getById(String id);
/**
* Gets information about the specified DDoS protection plan.
*
* @param id the resource ID.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified DDoS protection plan.
*/
Response<DdosProtectionPlan> getByIdWithResponse(String id, Context context);
/**
* Deletes the specified DDoS protection plan.
*
* @param id the resource ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void deleteById(String id);
/**
* Deletes the specified DDoS protection plan.
*
* @param id the resource ID.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void deleteByIdWithResponse(String id, Context context);
/**
* Begins definition for a new DdosProtectionPlan resource.
*
* @param name resource name.
* @return the first stage of the new DdosProtectionPlan definition.
*/
DdosProtectionPlan.DefinitionStages.Blank define(String name);
}
| [
"actions@github.com"
] | actions@github.com |
3b3ab56686ee91c9f1e1627916d9c919a49641be | 91c3bfc476a5bd4da03fcd84adc852cc830a70de | /OWLTools-Sim/src/main/java/owltools/sim2/preprocessor/NullSimPreProcessor.java | f830369cfd6b9029e6e24662179a13b0ad629887 | [] | permissive | VirtualFlyBrain/owltools | 7a6439c9a9b6460acc7d080e104c3ae39d345605 | fc5c7f86322ac773d09f1bce37c39e95326e605c | refs/heads/master | 2023-06-22T16:04:04.629851 | 2017-04-05T20:12:42 | 2017-04-05T20:22:44 | 87,724,961 | 0 | 0 | BSD-3-Clause | 2023-06-19T18:04:03 | 2017-04-09T17:06:28 | Web Ontology Language | UTF-8 | Java | false | false | 226 | java | package owltools.sim2.preprocessor;
/**
* uses ClassAssertions to determine view property
*
* @author cjm
*
*/
public class NullSimPreProcessor extends LCSEnabledSimPreProcessor {
public void preprocess() {
}
}
| [
"hdietze@lbl.gov"
] | hdietze@lbl.gov |
2e05898f37ddd3744a48c9a7f02015d17e97e787 | 6d7d75827be7f99f699d508c2febac861b146bfb | /easybuy-common/src/main/java/com/easybuy/pojo/EasyUITreeNode.java | 04ce6e4bcb9cdf5aca2d236b616bd4fb07a6051d | [] | no_license | EvanLeung08/easybuy | 482bda13efef3f478fe4161a9928c89aacd19fa8 | 741a995ce3b2b329cb9922dd9e20b3cd39167c3f | refs/heads/master | 2021-05-30T23:13:05.222840 | 2016-04-07T16:54:31 | 2016-04-07T16:54:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package com.easybuy.pojo;
public class EasyUITreeNode {
private long id;
private String text;
private String state;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}
| [
"10856214@163.com"
] | 10856214@163.com |
cf4ecfbae82c1b7ef35a9669af569b7c615901fe | 55d48cf4d1b9f70fe4ad431cd2fa356b8bb8cfd5 | /1_trainee/001_base_syntax/3_data_type/src/main/java/ru/nik66/condition/Point.java | f068b11772342dc9d1f3a6ab4e13f71bc38151af | [
"Apache-2.0"
] | permissive | Nikbstar/nkotkin-job4j | 57834a7069bed60213f2f955e5ed5529b4936f08 | 21886bbe99b4f50c2d6fefeccac2781753c3f452 | refs/heads/master | 2018-12-21T06:30:43.254684 | 2018-12-09T13:18:44 | 2018-12-09T13:18:44 | 112,478,822 | 3 | 0 | Apache-2.0 | 2018-03-30T14:52:14 | 2017-11-29T13:29:19 | Java | UTF-8 | Java | false | false | 680 | java | package ru.nik66.condition;
/**
* Point class.
*/
public class Point {
/**
* x coordinate.
*/
private int x;
/**
* y coordinate.
*/
private int y;
/**
* Constructor with coordinates.
* @param x x coordinate.
* @param y y coordinate.
*/
public Point(int x, int y) {
this.x = x;
this.y = y;
}
/**
* The method calculates distance from this point to another.
* @param point another point.
* @return distance between points.
*/
public double distanceTo(Point point) {
return Math.sqrt(Math.pow(this.x - point.x, 2) + Math.pow(this.y - point.y, 2));
}
}
| [
"nikbstar@gmail.com"
] | nikbstar@gmail.com |
33a0777d7acb584cf515be572dad3de340e8c3e5 | 9ca84d47c7ca578271d459626f484eb30c865fc6 | /src/sorting/ImplementSelectionSort.java | fa636974b9485b7bad3ef5047f5bf3f115ea5995 | [] | no_license | PeopleNTechJavaSelenium/project9November2018 | a6c0896114957a4654f0d2c6731ac9b2051e3609 | abcf694969ef8da8cc900d2f5bc02eec6025679c | refs/heads/master | 2020-04-11T19:22:18.113379 | 2018-12-16T19:02:29 | 2018-12-16T19:02:29 | 162,031,625 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 903 | java | package sorting;
public class ImplementSelectionSort {
public static void main(String[] args) {
//initialize unsorted array
int[] array = {9, 7, 8, 6, 4, 1, 5};
System.out.println("Before sorting");
for (int n = 0; n < array.length; n++) {
System.out.println(array[n]);
}
for (int j = 0; j <= array.length-1; j++) {
int min = j;
for (int i = j + 1; i < array.length; i++) {
if (array[i] < array[min]) {
min = i;
}
}
//swapping
int temp = array[min];
array[min] = array[j];
array[j] = temp;
}
System.out.println("After sorting");
//print sorted array
for (int n = 0; n < array.length; n++) {
System.out.println(array[n]);
}
}
}
| [
"rahmanww@gmail.com"
] | rahmanww@gmail.com |
7a1160f3759cdb539bb25f32759a28de1d2b31e6 | 8e6a9e135c7ebd4f7384d28b35c3a549f55b769c | /src/com/phone/shadu/ShaDuMain.java | cda84d98a94587d98e09c0e3b315da9a62ef3cf7 | [] | no_license | yue31313/AppQuanXian | 909cce481fb8d030fe5b9879314712466f52a6c5 | f27dad4e77eb3c2469c068b6cf7a8dfeb7e42ea3 | refs/heads/master | 2021-06-26T09:32:01.871471 | 2017-09-11T12:27:06 | 2017-09-11T12:27:11 | 103,132,914 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,465 | java | package com.phone.shadu;
import com.example.phonesafe.R;
import com.example.phonesafe.phonesafeone;
import com.phoensafe.fangdao.PhoneSafeActivity;
import com.phone.SMScheck.Sms_main;
import com.phoneshow.dophoneTab;
import com.yarin.android.FileManager.FileManager;
import android.app.ActionBar.Tab;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.gesture.GestureOverlayView;
import android.view.GestureDetector.OnGestureListener;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.widget.TabHost;
import android.widget.Toast;
public class ShaDuMain extends TabActivity implements OnGestureListener{
GestureDetector detector;
int i=0;
TabHost tab;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
tab=getTabHost();
Resources res=getResources();
TabHost.TabSpec spec;
spec=tab.newTabSpec("tab_1").setIndicator("杀毒",res.getDrawable(R.drawable.shield_item_icon_open_audio)).setContent(new Intent(this,phoneShaduList.class));
tab.addTab(spec);
spec=tab.newTabSpec("tab_2").setIndicator("通话",res.getDrawable(R.drawable.shield_item_icon_open_audio)).setContent(new Intent(this,phonesafeone.class));
tab.addTab(spec);
spec=tab.newTabSpec("tab_5").setIndicator("防盗",res.getDrawable(R.drawable.shield_item_icon_open_audio)).setContent(new Intent(this,PhoneSafeActivity.class));
tab.addTab(spec);
spec=tab.newTabSpec("tab_3").setIndicator("电话管理",res.getDrawable(R.drawable.shield_item_icon_call_phone)).setContent(new Intent(this,dophoneTab.class));
tab.addTab(spec);
spec=tab.newTabSpec("tab_3").setIndicator("文件管理",res.getDrawable(R.drawable.icon)).setContent(new Intent(this,FileManager.class));
tab.addTab(spec);
spec=tab.newTabSpec("tab_4").setIndicator("短信",res.getDrawable(R.drawable.shield_item_icon_access_sms)).setContent(new Intent(this,Sms_main.class));
tab.addTab(spec);
tab.setCurrentTab(1);
detector=new GestureDetector(this, this);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
// TODO Auto-generated method stub
return detector.onTouchEvent(event);
}
@Override
public boolean onDown(MotionEvent arg0) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2,
float arg3) {
// TODO Auto-generated method stub
if(arg0.getX()-arg1.getX()>=20){
i=tab.getCurrentTab();
if(i<=2){
tab.setCurrentTab(i++);
Toast.makeText(getApplicationContext(), "向左 ", 1000).show();
return true;
}
}
if(arg1.getX()-arg0.getX()>=20){
i=tab.getCurrentTab();
if(i>=1){
tab.setCurrentTab(i--);
Toast.makeText(getApplicationContext(), "xiangyou", 1000).show();
return true;
}
}
return false;
}
@Override
public void onLongPress(MotionEvent arg0) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "changan", 1000).show();
}
@Override
public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,
float arg3) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onShowPress(MotionEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public boolean onSingleTapUp(MotionEvent arg0) {
// TODO Auto-generated method stub
return false;
}
}
| [
"313134555@qq.com"
] | 313134555@qq.com |
3637e8ac09f3de57d66fd5da30efa39f76c0cd5b | 0ceafc2afe5981fd28ce0185e0170d4b6dbf6241 | /AlgoKit (3rdp)/Code-store v1.0/yaal/archive/2014.10/2014.10.04 - Single Round Match 635/SimilarRatingGraph.java | 798cb30c3aa092edd8899c58de126acaf6b821cd | [] | no_license | brainail/.happy-coooding | 1cd617f6525367133a598bee7efb9bf6275df68e | cc30c45c7c9b9164095905cc3922a91d54ecbd15 | refs/heads/master | 2021-06-09T02:54:36.259884 | 2021-04-16T22:35:24 | 2021-04-16T22:35:24 | 153,018,855 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,304 | java | package net.egork;
import net.egork.misc.ArrayUtils;
public class SimilarRatingGraph {
public double maxLength(int[] _date, int[] _rating) {
long[] date = ArrayUtils.asLong(_date);
long[] rating = ArrayUtils.asLong(_rating);
double answer = 0;
for (int l = 1; l < date.length - 1; l++) {
for (int i = 0; i + l < date.length - 1; i++) {
int j = i + l;
if ((date[i + 1] - date[i]) * (rating[j + 1] - rating[j]) != (date[j + 1] - date[j]) * (rating[i + 1] - rating[i])) {
continue;
}
long a = date[i + 1] - date[i];
long b = date[j + 1] - date[j];
double length = Math.max(Math.hypot(date[i + 1] - date[i], rating[i + 1] - rating[i]), Math.hypot(date[j + 1] - date[j], rating[j + 1] - rating[j]));
for (int k = 1; j + k < date.length; k++) {
if (j + k == date.length - 1 || a * (date[j + k + 1] - date[j + k]) != b * (date[i + k + 1] - date[i + k]) ||
a * (rating[j + k + 1] - rating[j + k]) != b * (rating[i + k + 1] - rating[i + k]))
{
i = i + k - 1;
answer = Math.max(answer, length);
break;
}
length += Math.max(Math.hypot(date[i + k + 1] - date[i + k], rating[i + k + 1] - rating[i + k]), Math.hypot(date[j + k + 1] - date[j + k], rating[j + k + 1] - rating[j + k]));
}
}
}
return answer;
}
}
| [
"wsemirz@gmail.com"
] | wsemirz@gmail.com |
dc153b2f0da64ffe5769a133e8896a375af0ef64 | d93a47a7c64fae6e5fa62184ca95f7831c3c20ed | /src/com/wenjing/dao/HotTourlineMapper.java | ac01060e6df603c6037fb471c9918a72c7996ff8 | [] | no_license | cfy202/intertrips | b5ace01f0c7f7ab4f9753be4f3ab5d457102d263 | f3810e8018b5c3f15c2f72b281e9a462fe0d4cb0 | refs/heads/master | 2020-04-29T11:37:20.753331 | 2019-12-04T03:12:11 | 2019-12-04T03:12:11 | 176,105,219 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,799 | java | /**
*
*/
package com.wenjing.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.wenjing.entity.HotTourline;
/**
* 类说明
* @author xiejin
* @date 2015-8-21
* @date 2015-8-21 上午10:58:47
*/
public interface HotTourlineMapper {
/**
* 根据主键删除
* 参数:主键
* 返回:删除个数
*/
int deleteByPrimaryKey(String id);
/**
* 插入,空属性也会插入
* 参数:pojo对象
* 返回:删除个数
*/
int insert(HotTourline record);
/**
* 插入,空属性不会插入
* 参数:pojo对象
* 返回:删除个数
*/
int insertSelective(HotTourline record);
/**
* 根据主键查询
* 参数:查询条件,主键值
* 返回:对象
*/
HotTourline selectByPrimaryKey(String id);
/**
* 根据主键修改,空值条件不会修改成null
* 参数:1.要修改成的值
* 返回:成功修改个数
*/
int updateByPrimaryKeySelective(HotTourline record);
/**
* 根据主键修改,空值条件会修改成null
* 参数:1.要修改成的值
* 返回:成功修改个数
*/
int updateByPrimaryKey(HotTourline record);
/**
* 根据销售中心id和线路Id删除热卖线路
* @author Sevens
* 时间2015-8-21
* @param costNumber
* @param tourlineId
* @return
*/
int deleteBycostnumberAnaTourlineId(@Param("costNumber")String costNumber,@Param("tourlineId")String tourlineId);
/**
*
* @author Sevens
* 时间2015-8-21
* @param costNumber
* @return
*/
List<HotTourline> findByCostnumber(String costNumber);
}
| [
"cfy871222@163.com"
] | cfy871222@163.com |
6763e1535e8598f795a83dbd8556607c6ee4e03a | f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9 | /src/main/java/com/alipay/api/domain/PayContractBaseDTO.java | c3580eb3868f1a8e9ed05919446e9b81f39174ab | [
"Apache-2.0"
] | permissive | XuYingJie-cmd/alipay-sdk-java-all | 0887fa02f857dac538e6ea7a72d4d9279edbe0f3 | dd18a679f7543a65f8eba2467afa0b88e8ae5446 | refs/heads/master | 2023-07-15T23:01:02.139231 | 2021-09-06T07:57:09 | 2021-09-06T07:57:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,401 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 付款条件基础信息DTO
*
* @author auto create
* @since 1.0, 2021-01-29 14:46:44
*/
public class PayContractBaseDTO extends AlipayObject {
private static final long serialVersionUID = 1614116294593344187L;
/**
* 合约号
*/
@ApiField("agreement_no")
private String agreementNo;
/**
* 合约来源,集采平台:acep
*/
@ApiField("agreement_source")
private String agreementSource;
/**
* 业务产品码
*/
@ApiField("biz_pd_code")
private String bizPdCode;
/**
* 幂等号
*/
@ApiField("idempotent_no")
private String idempotentNo;
/**
* 供应商蚂蚁2088账号
*/
@ApiField("ip_role_id")
private String ipRoleId;
/**
* 供应商来源
*/
@ApiField("ip_role_source")
private String ipRoleSource;
/**
* 端产品码
*/
@ApiField("pd_code")
private String pdCode;
/**
* 签约产品码
*/
@ApiField("sales_product_code")
private String salesProductCode;
public String getAgreementNo() {
return this.agreementNo;
}
public void setAgreementNo(String agreementNo) {
this.agreementNo = agreementNo;
}
public String getAgreementSource() {
return this.agreementSource;
}
public void setAgreementSource(String agreementSource) {
this.agreementSource = agreementSource;
}
public String getBizPdCode() {
return this.bizPdCode;
}
public void setBizPdCode(String bizPdCode) {
this.bizPdCode = bizPdCode;
}
public String getIdempotentNo() {
return this.idempotentNo;
}
public void setIdempotentNo(String idempotentNo) {
this.idempotentNo = idempotentNo;
}
public String getIpRoleId() {
return this.ipRoleId;
}
public void setIpRoleId(String ipRoleId) {
this.ipRoleId = ipRoleId;
}
public String getIpRoleSource() {
return this.ipRoleSource;
}
public void setIpRoleSource(String ipRoleSource) {
this.ipRoleSource = ipRoleSource;
}
public String getPdCode() {
return this.pdCode;
}
public void setPdCode(String pdCode) {
this.pdCode = pdCode;
}
public String getSalesProductCode() {
return this.salesProductCode;
}
public void setSalesProductCode(String salesProductCode) {
this.salesProductCode = salesProductCode;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
bc18d50fe417e3c342613ff110147df56430f494 | 516fb367430d4c1393f4cd726242618eca862bda | /sources/com/helpshift/support/g.java | 8b2bdc9ce8729e728b20d423cb6371c96d3f2937 | [] | no_license | cmFodWx5YWRhdjEyMTA5/Gaana2 | 75d6d6788e2dac9302cff206a093870e1602921d | 8531673a5615bd9183c9a0466325d0270b8a8895 | refs/heads/master | 2020-07-22T15:46:54.149313 | 2019-06-19T16:11:11 | 2019-06-19T16:11:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,636 | java | package com.helpshift.support;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import com.helpshift.support.h.d;
import com.helpshift.support.model.FaqSearchIndex;
import com.helpshift.support.search.a.b;
import com.helpshift.util.l;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.json.JSONArray;
import org.json.JSONException;
public final class g {
private static FaqSearchIndex a;
private final String b = "fullIndex.db";
private Context c;
private SharedPreferences d;
public g(Context context) {
this.c = context;
this.d = context.getSharedPreferences("HSJsonData", 0);
}
private JSONArray j(String str) throws JSONException {
return new JSONArray(this.d.getString(str, "[]"));
}
private String k(String str) {
return this.d.getString(str, "");
}
private Integer l(String str) {
return a(str, 0);
}
private Integer a(String str, int i) {
return Integer.valueOf(this.d.getInt(str, i));
}
public Float a(String str) {
return Float.valueOf(this.d.getFloat(str, 0.0f));
}
public boolean b(String str) {
return this.d.contains(str);
}
public Boolean c(String str) {
return Boolean.valueOf(this.d.getBoolean(str, false));
}
private Long m(String str) {
return Long.valueOf(this.d.getLong(str, 0));
}
private void a(String str, JSONArray jSONArray) {
Editor edit = this.d.edit();
edit.putString(str, jSONArray.toString());
edit.apply();
}
private void a(String str, String str2) {
Editor edit = this.d.edit();
edit.putString(str, str2);
edit.apply();
}
private void a(String str, Integer num) {
Editor edit = this.d.edit();
edit.putInt(str, num.intValue());
edit.apply();
}
private void a(String str, Boolean bool) {
Editor edit = this.d.edit();
edit.putBoolean(str, bool.booleanValue());
edit.apply();
}
private void a(String str, Long l) {
Editor edit = this.d.edit();
edit.putLong(str, l.longValue());
edit.apply();
}
/* Access modifiers changed, original: protected */
public void a() {
new d().b();
this.c.deleteFile("tfidf.db");
Editor edit = this.d.edit();
edit.clear();
edit.apply();
}
/* Access modifiers changed, original: protected */
public String b() {
return k("apiKey");
}
/* Access modifiers changed, original: protected */
public void d(String str) {
a("apiKey", str);
}
/* Access modifiers changed, original: protected */
public String c() {
return k("domain");
}
/* Access modifiers changed, original: protected */
public void e(String str) {
a("domain", str);
}
/* Access modifiers changed, original: protected */
public String d() {
return k("appId");
}
/* Access modifiers changed, original: protected */
public void f(String str) {
a("appId", str);
}
/* Access modifiers changed, original: protected */
public String e() {
return k("libraryVersion");
}
/* Access modifiers changed, original: protected */
public void g(String str) {
a("libraryVersion", str);
}
/* Access modifiers changed, original: protected */
public String f() {
return k("applicationVersion");
}
/* Access modifiers changed, original: protected */
public void h(String str) {
a("applicationVersion", str);
}
/* Access modifiers changed, original: protected */
public int g() {
return l("reviewCounter").intValue();
}
/* Access modifiers changed, original: protected */
public void a(int i) {
a("reviewCounter", Integer.valueOf(i));
}
/* Access modifiers changed, original: protected */
public int h() {
return l("launchReviewCounter").intValue();
}
/* Access modifiers changed, original: protected */
public void b(int i) {
a("launchReviewCounter", Integer.valueOf(i));
}
/* Access modifiers changed, original: protected */
public JSONArray i() throws JSONException {
return j("cachedImages");
}
/* Access modifiers changed, original: protected */
public void a(JSONArray jSONArray) {
a("cachedImages", jSONArray);
}
/* Access modifiers changed, original: protected */
public void a(FaqSearchIndex faqSearchIndex) {
a = faqSearchIndex;
try {
ObjectOutputStream objectOutputStream = new ObjectOutputStream(this.c.openFileOutput("fullIndex.db", 0));
objectOutputStream.writeObject(faqSearchIndex);
objectOutputStream.flush();
objectOutputStream.close();
m();
} catch (Exception e) {
l.a("HelpShiftDebug", "store index", e);
}
}
/* Access modifiers changed, original: protected */
public void j() throws IOException, ClassCastException, ClassNotFoundException {
if (a == null) {
ObjectInputStream objectInputStream = new ObjectInputStream(this.c.openFileInput("fullIndex.db"));
a = (FaqSearchIndex) objectInputStream.readObject();
objectInputStream.close();
}
}
/* Access modifiers changed, original: protected */
public FaqSearchIndex k() {
return a;
}
/* Access modifiers changed, original: protected */
public Boolean l() {
return c("dbFlag");
}
/* Access modifiers changed, original: protected */
public void m() {
a("dbFlag", Boolean.valueOf(true));
}
/* Access modifiers changed, original: protected */
public void n() {
a("dbFlag", Boolean.valueOf(false));
}
/* Access modifiers changed, original: protected */
public void o() {
a = null;
b.b().a();
this.c.deleteFile("fullIndex.db");
n();
}
/* Access modifiers changed, original: 0000 */
public long p() {
return m("lastErrorReportedTime").longValue();
}
/* Access modifiers changed, original: 0000 */
public void a(long j) {
a("lastErrorReportedTime", Long.valueOf(j));
}
/* Access modifiers changed, original: 0000 */
public boolean q() {
return a == null;
}
public String i(String str) {
return this.d.getString(str, "");
}
}
| [
"master@master.com"
] | master@master.com |
ec8c13063a9a0deb8912481d7c200e4786399a49 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/76/207.java | 99ec8d40d07cbd17a655ce4633dc73dbf3486e50 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,577 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int i;
int j;
int k;
int h;
int l;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
int[] a = new int[10001];
int[] b = new int[10001];
int[] c = new int[10001];
for (j = 0;j < 10001;j++)
{
c[j] = 0;
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
(a[i]) = Integer.parseInt(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead(" ");
if (tempVar3 != null)
{
(b[i]) = Integer.parseInt(tempVar3);
}
if (i > 0)
{
if (b[i] > b[i - 1])
{
k = b[i];
}
}
else
{
k = b[0];
}
for (j = (a[i]);j < b[i];j++)
{
c[j] = 1;
}
}
for (j = 0;j <= 10001;j++)
{
if (c[j] == 1)
{
h = j;
for (j = j;j <= k;j++)
{
if (j == k - 1)
{
System.out.printf("%d %d",h,k);
//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:
goto x;
}
if (c[j] == 0)
{
System.out.print("no");
//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:
goto x;
}
}
}
}
//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:
x:
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
d777b4876d1afd0ef610e72ca21700d6e18fea9e | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13141-5-19-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/web/SaveAction_ESTest.java | 06f570094d540e3d23dd0be4515f65304279bc0a | [] | 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 | 544 | java | /*
* This file was automatically generated by EvoSuite
* Mon Jan 20 00:09:26 UTC 2020
*/
package com.xpn.xwiki.web;
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 SaveAction_ESTest extends SaveAction_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
feb81e3bcbc28c74ecddeaece6536da71fa91d96 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_6ab26962a1448ec32bc8fb9caed16e272d0f2c15/Game/13_6ab26962a1448ec32bc8fb9caed16e272d0f2c15_Game_s.java | 97ebf05392d489624452ba82ab2fc7248e917680 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,080 | java | package org.drooms.api;
import java.io.File;
import java.io.InputStream;
import java.util.Collection;
import java.util.Map;
/**
* Represents a certain type of game, with its own rules and constraints.
*/
public interface Game {
/**
* Build the playground from an input stream. Specific instructions on how
* to structure this file will come from implementations of this class.
*
* @param name
* Name for the new playground.
* @param s
* Stream in question.
* @return Playground constructed from that stream.
*/
public Playground buildPlayground(final String name, final InputStream source);
/**
* Build the playground from a file. Specific instructions on how
* to structure this file will come from implementations of this class.
*
* @param name
* Name for the new playground.
* @param f
* File in question.
* @return Playground constructed from that file.
*/
@Deprecated
public Playground buildPlayground(final String name, final File source);
/**
* Add a custom listener to the game. Will be used next time {@link #play(Playground, Collection, File)} is called.
*
* @param listener
* Listener in question.
* @return True if added.
*/
public boolean addListener(GameProgressListener listener);
/**
* Retrieve the main report of this game, detailing the progress of the
* game.
*
* @return The report. Null when game not played before.
*/
public GameProgressListener getReport();
/**
* Initialize the game and play it through. Will throw an exception in case
* of a repeated call of this method on the same class instance. May throw {@link IllegalStateException} if
* {@link #setContext(Object)} wasn't
* called first.
*
* @param playground
* The playground on which this game will be played out.
* @param players
* A list of players to participate in the game.
* @param reportFolder
* Where to output data, if necessary.
* @return Points gained by each player.
*/
public Map<Player, Integer> play(Playground playground, Collection<Player> players, File reportFolder);
/**
* Remove a previously {@link #addListener(GameProgressListener)}ed listener. This listener will not for any
* subsequent calls to {@link #play(Playground, Collection, File)}.
*
* @param listener
* Listener in question.
* @return True if removed.
*/
public boolean removeListener(GameProgressListener listener);
/**
* Sets the context for this game. The context should provide properties
* that the game should use to decide various situations.
*
* @param context
* Where do we load the game properties from.
*/
public void setContext(InputStream context);
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
8a71af001a294f684e7f93f8f1d106b9a2acc008 | 5efc61cf2e85660d4c809662e34acefe27e57338 | /jasperreports-5.6.0/src/net/sf/jasperreports/data/cache/IndexColumnValueIterator.java | f334cd22aed974b64b9de65c7f80ef9701cfb1d4 | [
"Apache-2.0",
"LGPL-3.0-only"
] | permissive | ferrinsp/kbellfireapp | b2924c0a18fcf93dd6dc33168bddf8840f811326 | 751cc81026f27913e31f5b1f14673ac33cbf2df1 | refs/heads/master | 2022-12-22T10:01:39.525208 | 2019-06-22T15:33:58 | 2019-06-22T15:33:58 | 135,739,120 | 0 | 1 | Apache-2.0 | 2022-12-15T23:23:53 | 2018-06-01T16:14:53 | Java | UTF-8 | Java | false | false | 1,601 | java | /*
* JasperReports - Free Java Reporting Library.
* Copyright (C) 2001 - 2013 Jaspersoft Corporation. All rights reserved.
* http://www.jaspersoft.com
*
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms apply:
*
* This program is part of JasperReports.
*
* JasperReports 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.
*
* JasperReports 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 JasperReports. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.jasperreports.data.cache;
/**
* @author Lucian Chirita (lucianc@users.sourceforge.net)
* @version $Id: IndexColumnValueIterator.java 5878 2013-01-07 20:23:13Z teodord $
*/
public abstract class IndexColumnValueIterator implements ColumnValuesIterator
{
private final int size;
protected int currentIndex;
public IndexColumnValueIterator(int size)
{
this.size = size;
this.currentIndex = -1;
}
public void moveFirst()
{
this.currentIndex = -1;
}
public boolean next()
{
if (currentIndex + 1 >= size)
{
return false;
}
++currentIndex;
return true;
}
}
| [
"ferrinsp@gmail.com"
] | ferrinsp@gmail.com |
23720c822f00ed4ec9d8f02e1938627570b81ba5 | 75f783d1960f90b8c76fa6277da5b2f8c0bae7aa | /marathon-core/src/main/java/net/sourceforge/marathon/display/EditorConsole.java | 8ab6a3be6c9b6105ff5e7ed2f0543f56009d5aa4 | [
"Apache-2.0"
] | permissive | paul-hammant/MarathonManV4 | 572d1de4ccf67c4a7b2779cc0fff2ace24aeee06 | 5df4650ae1cdd24a2a077e2cfb96695538864845 | refs/heads/master | 2023-08-27T10:36:39.310075 | 2016-06-30T05:13:31 | 2016-06-30T05:13:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,240 | java | /*******************************************************************************
* Copyright 2016 Jalian Systems Pvt. Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package net.sourceforge.marathon.display;
import net.sourceforge.marathon.runtime.api.AbstractFileConsole;
public class EditorConsole extends AbstractFileConsole {
private IDisplayView display;
public EditorConsole(IDisplayView display) {
this.display = display;
}
public void writeScriptOut(char cbuf[], int off, int len) {
display.getOutputPane().append(String.valueOf(cbuf, off, len), IStdOut.SCRIPT_OUT);
writeToFile(String.valueOf(cbuf, off, len));
}
public void writeScriptErr(char cbuf[], int off, int len) {
display.getOutputPane().append(String.valueOf(cbuf, off, len), IStdOut.SCRIPT_ERR);
writeToFile(String.valueOf(cbuf, off, len));
}
public void writeStdOut(char cbuf[], int off, int len) {
char[] buf = new char[len];
for (int i = off; i < off + len; i++) {
buf[i - off] = cbuf[i];
}
display.getOutputPane().append(String.valueOf(cbuf, off, len), IStdOut.STD_OUT);
writeToFile(String.valueOf(cbuf, off, len));
}
public void writeStdErr(char cbuf[], int off, int len) {
char[] buf = new char[len];
for (int i = off; i < off + len; i++) {
buf[i - off] = cbuf[i];
}
display.getOutputPane().append(String.valueOf(cbuf, off, len), IStdOut.STD_ERR);
writeToFile(String.valueOf(cbuf, off, len));
}
public void clear() {
display.getOutputPane().clear();
}
}
| [
"dakshinamurthy.karra@jaliansystems.com"
] | dakshinamurthy.karra@jaliansystems.com |
ec60ef1415c2396020c77573943cebdfb90bddc0 | 9b7d908e682fd948c52a816bf7aea40add6f880f | /cache2k-core/src/main/java/org/cache2k/core/SingleProviderResolver.java | eea439ba5e720d5fcfc69661b9f732cc199ed278 | [
"Apache-2.0"
] | permissive | jhx-zc/cache2k | d875bc838da2cfa54476310cb1ecc22e8ba43427 | de549b457982583e86cb75ddd6f6220839ff4630 | refs/heads/master | 2023-06-17T22:36:14.293822 | 2021-07-22T10:17:58 | 2021-07-22T10:17:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,088 | java | package org.cache2k.core;
/*
* #%L
* cache2k core implementation
* %%
* Copyright (C) 2000 - 2021 headissue GmbH, Munich
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.ServiceLoader;
/**
* Loads singletons of service provider implementations.
*
* @author Jens Wilke
*/
public class SingleProviderResolver {
private static final Map<Class, Object> PROVIDERS = new HashMap<Class, Object>();
/**
* Return a provider for this interface.
*
* @param c the provider interface that is implemented
* @param <T> type of provider interface
*
* @return instance of the provider, never null
* @throws java.lang.LinkageError if there is a problem instantiating the provider
* or no provider was specified
*/
public static <T> T resolveMandatory(Class<T> c) {
T obj = resolve(c);
if (obj == null) {
Error err = new LinkageError("No implementation found for: " + c.getName());
throw err;
}
return obj;
}
/**
* Return a provider for this interface.
*
* @param c the provider interface that is implemented
* @param <T> type of provider interface
*
* @return instance of the provider or {@code null} if not found
* @throws java.lang.LinkageError if there is a problem instantiating the provider
*/
public static <T> T resolve(Class<T> c) {
return resolve(c, null);
}
/**
* Return a provider for this interface.
*
* @param c the provider interface that is implemented
* @param defaultImpl if no provider is found, instantiate the default implementation
* @param <T> type of provider interface
*
* @return instance of the provider or {@code null} if not found
* @throws java.lang.LinkageError if there is a problem instantiating the provider
*/
@SuppressWarnings("unchecked")
public static synchronized <T> T resolve(Class<T> c, Class<? extends T> defaultImpl) {
if (PROVIDERS.containsKey(c)) {
return (T) PROVIDERS.get(c);
}
T impl = null;
Iterator<T> it = ServiceLoader.load(c).iterator();
if (it.hasNext()) {
impl = it.next();
}
if (impl == null && defaultImpl != null) {
try {
impl = defaultImpl.getConstructor().newInstance();
} catch (Exception ex) {
Error err = new LinkageError("Error instantiating " + c.getName(), ex);
err.printStackTrace();
throw err;
}
}
PROVIDERS.put(c, impl);
return impl;
}
}
| [
"jw_github@headissue.com"
] | jw_github@headissue.com |
f0cc6d57cb10759221d159e55918a5ca85e20b65 | b96817be9c54acaeed3503d6940500a133a8e7af | /streams/src/main/java/streams/MatchStream.java | 4f8abb8024040cb8c922e26d2d8565eeefd66095 | [] | no_license | anbarasupr/java | 3072fe76652205e163e7e1e3fe9848e80ecf11a6 | e0cd42c6b9d1b675047ab178a9012509e37d6671 | refs/heads/master | 2023-07-11T11:49:56.153323 | 2023-06-22T15:09:47 | 2023-06-22T15:09:47 | 193,373,509 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,299 | java | package streams;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
public class MatchStream {
public static void main(String args[]) {
List<Employee> employees = new ArrayList<>();
employees.add(new Employee("Sachin Tendulkar", 41, 1));
employees.add(new Employee("Sachin Tendulkar", 36, 2));
employees.add(new Employee("MS Dhoni", 34, 3));
employees.add(new Employee("Rahul Dravid", 40, 4));
employees.add(new Employee("Lokesh Rahul", 25, 5));
employees.add(new Employee("Sourav Ganguly", 40, 6));
List<Employee> employees2 = new ArrayList<>();
employees2.add(new Employee("Sachin Tendulkar", 41, 11));
employees2.add(new Employee("MS Dhoni", 34, 12));
List<Employee> employees3 = new ArrayList<>();
employees3.add(new Employee("Sachin Tendulkar", 41, 1));
employees3.add(new Employee("MS Dhoni", 34, 3));
// v5(employees);
// v7(employees, employees2);
// v8(employees);
v9(employees, employees3);
}
public static void v1(List<Employee> employees) {
boolean isPresent = employees.stream().anyMatch(
employee -> employee.getName().equalsIgnoreCase("Sachin Tendulkar") && employee.getAge() == 41);
System.out.println("isPresent: " + isPresent);
}
public static void v2(List<Employee> employees) {
List<Employee> result = employees.stream()
.filter(employee -> (employee.getName().equalsIgnoreCase("Sachin Tendulkar") && employee.getAge() == 36)
|| (employee.getName().equalsIgnoreCase("Rahul Dravid") && employee.getAge() == 40))
.collect(Collectors.toList());
System.out.println("result: " + result);
}
public static void v3(List<Employee> employees) {
List<Employee> listToFind = Arrays.asList(new Employee("Sachin Tendulkar", 36, 2),
new Employee("Rahul Dravid", 40, 4));
boolean isPresent = employees.containsAll(listToFind);
System.out.println("isPresent: " + isPresent);
}
public static void v4(List<Employee> employees) {
Predicate<Employee> p1 = e -> e.getName().equals("Sachin Tendulkar") && e.getAge() == 36;
Predicate<Employee> p2 = e -> e.getName().equals("Rahul Dravid") && e.getAge() == 40;
final boolean isFound = employees.stream().filter(p1.or(p2)).findAny().isPresent();
System.out.println("isFound: " + isFound);
}
// dynamic predicates
public static void v5(List<Employee> employees) {
Predicate<Employee> ageLowerBoundPredicate = p -> p.getAge() >= 40;
Predicate<Employee> ageUpperBoundPredicate = p -> p.getAge() < 45;
Predicate<Employee> hasComputerPred = p -> p.getName().contains("ul");
List<Predicate<Employee>> predicates = Arrays.asList(ageLowerBoundPredicate, ageUpperBoundPredicate,
hasComputerPred);
List<Employee> filteredPeople = employees.stream().filter(p -> predicates.stream().allMatch(f -> f.test(p)))
.limit(5).collect(Collectors.toList());
System.out.println("filteredPeople: " + filteredPeople);
}
public static void v6(List<Employee> employees, List<Employee> employees2) {
boolean anyMatch = employees.stream().anyMatch(employees2::contains);
System.out.println("anyMatch: " + anyMatch);
anyMatch = employees2.stream().allMatch(employees::contains);
System.out.println("anyMatch: " + anyMatch);
anyMatch = employees.stream().anyMatch(new HashSet<>(employees2)::contains);
System.out.println("anyMatch: " + anyMatch);
anyMatch = !Collections.disjoint(employees, employees2); // Return true if 2 specified list have no common
// elements
System.out.println("anyMatch: " + anyMatch);
}
public static void v7(List<Employee> listOne, List<Employee> listTwo) {
List<Employee> listOneList = listOne.stream()
.filter(one -> listTwo.stream().peek(e -> System.out.println(e))
.anyMatch(two -> one.getName().equals(two.getName()) && two.getAge() == one.getAge()))
.collect(Collectors.toList());
System.out.println("listOneList: " + listOneList);
List<Employee> result = new ArrayList<Employee>();
for (Employee one : listOne) {
for (Employee two : listTwo) {
if (one.getName().equals(two.getName()) && one.getAge() == two.getAge()) {
result.add(one);
}
}
}
System.out.println("oldWayList: " + result);
}
public static void v8(List<Employee> listOne) {
listOne.add(new Employee("Sachin Tendulkar", 36, 2));
listOne.stream().distinct().forEach(System.out::println);
}
public static void v9(List<Employee> listOne, List<Employee> listTwo) {
// You need to override equals() method in Employee class. contains() method
// you will uses the equals() method to evaluate if two objects are the same
List<Employee> listCommon = listTwo.stream().filter(e -> listOne.contains(e)).collect(Collectors.toList());
System.out.println("listCommon: " + listCommon);
}
}
@AllArgsConstructor
@ToString
@EqualsAndHashCode
class Employee {
public Employee(String name, int age) {
super();
this.name = name;
this.age = age;
}
@Getter
@Setter
private String name;
@Getter
@Setter
private int age;
@Getter
@Setter
private int id;
}
| [
"anbarasu.2013@gmail.com"
] | anbarasu.2013@gmail.com |
a4d1f7de47246947b8eaf44bffcfe25ae83fffbf | 31d88c6f08f10abeb3f70eea7f92e52124f48b8c | /extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelRoutesCollector.java | 8f63cea888dcceaab58b3341f4c1359bf17575a5 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | alex01t/camel-quarkus | 7ac701b90f8ff6e16eeec4a933ce1a5486647216 | ea2b52c09bad81b6cc1af5cb9d09983a34af0ebf | refs/heads/master | 2020-12-28T16:38:28.161614 | 2020-02-04T17:11:07 | 2020-02-04T17:11:07 | 238,408,765 | 0 | 0 | Apache-2.0 | 2020-02-05T09:08:48 | 2020-02-05T09:07:33 | null | UTF-8 | Java | false | false | 4,257 | 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.camel.quarkus.core;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.camel.CamelContext;
import org.apache.camel.ExtendedCamelContext;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.main.RoutesCollector;
import org.apache.camel.model.RoutesDefinition;
import org.apache.camel.model.rest.RestsDefinition;
import org.apache.camel.spi.PackageScanResourceResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CamelRoutesCollector implements RoutesCollector {
private static final Logger LOGGER = LoggerFactory.getLogger(CamelRoutesCollector.class);
private final RegistryRoutesLoader registryRoutesLoader;
private final XmlRoutesLoader xmlRoutesLoader;
public CamelRoutesCollector(RegistryRoutesLoader registryRoutesLoader, XmlRoutesLoader xmlRoutesLoader) {
this.registryRoutesLoader = registryRoutesLoader;
this.xmlRoutesLoader = xmlRoutesLoader;
}
public RegistryRoutesLoader getRegistryRoutesLoader() {
return registryRoutesLoader;
}
public XmlRoutesLoader getXmlRoutesLoader() {
return xmlRoutesLoader;
}
@Override
public List<RoutesBuilder> collectRoutesFromRegistry(
CamelContext camelContext,
String excludePattern,
String includePattern) {
return registryRoutesLoader.collectRoutesFromRegistry(camelContext, excludePattern, includePattern);
}
@Override
public List<RoutesDefinition> collectXmlRoutesFromDirectory(CamelContext camelContext, String directory) {
List<RoutesDefinition> answer = new ArrayList<>();
PackageScanResourceResolver resolver = camelContext.adapt(ExtendedCamelContext.class).getPackageScanResourceResolver();
for (String part : directory.split(",")) {
LOGGER.info("Loading additional Camel XML routes from: {}", part);
try {
for (InputStream is : resolver.findResources(part)) {
answer.add(xmlRoutesLoader.loadRoutesDefinition(camelContext, is));
}
} catch (FileNotFoundException e) {
LOGGER.debug("No XML routes found in {}. Skipping XML routes detection.", part);
} catch (Exception e) {
throw RuntimeCamelException.wrapRuntimeException(e);
}
}
return answer;
}
@Override
public List<RestsDefinition> collectXmlRestsFromDirectory(CamelContext camelContext, String directory) {
List<RestsDefinition> answer = new ArrayList<>();
PackageScanResourceResolver resolver = camelContext.adapt(ExtendedCamelContext.class).getPackageScanResourceResolver();
for (String part : directory.split(",")) {
LOGGER.info("Loading additional Camel XML rests from: {}", part);
try {
for (InputStream is : resolver.findResources(part)) {
answer.add(xmlRoutesLoader.loadRestsDefinition(camelContext, is));
}
} catch (FileNotFoundException e) {
LOGGER.debug("No XML rests found in {}. Skipping XML rests detection.", part);
} catch (Exception e) {
throw RuntimeCamelException.wrapRuntimeException(e);
}
}
return answer;
}
}
| [
"lburgazzoli@users.noreply.github.com"
] | lburgazzoli@users.noreply.github.com |
8783adec9c88c3e8e1566b3f8b175270c7bc54a7 | 458da577ea06ca9f5116fd6ae3c7b75fea03de3e | /SkillAPI/src/com/sucy/skill/command/admin/CmdReload.java | e333f1d66da9668492554d283621016c0e085a98 | [] | no_license | LGCMcLovin/SkillAPI | 19689aead87bef870cc3ae4640f3c990dfc3e644 | 82d991c429d38fabcec23f18910a0b59a7c2d2bf | refs/heads/master | 2020-12-25T15:40:52.699659 | 2014-06-08T09:50:27 | 2014-06-08T09:50:27 | 30,385,127 | 0 | 0 | null | 2015-09-24T02:32:17 | 2015-02-05T23:55:12 | Java | UTF-8 | Java | false | false | 954 | java | package com.sucy.skill.command.admin;
import com.rit.sucy.commands.ConfigurableCommand;
import com.rit.sucy.commands.IFunction;
import com.sucy.skill.SkillAPI;
import com.sucy.skill.language.CommandNodes;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
/**
* Command to reload the plugin data
*/
public class CmdReload implements IFunction {
/**
* Executes the command
*
* @param command owning command
* @param plugin plugin reference
* @param sender sender of the command
* @param args arguments
*/
@Override
public void execute(ConfigurableCommand command, Plugin plugin, CommandSender sender, String[] args) {
plugin.getServer().getPluginManager().disablePlugin(plugin);
plugin.getServer().getPluginManager().enablePlugin(plugin);
sender.sendMessage(((SkillAPI) plugin).getMessage(CommandNodes.COMPLETE + CommandNodes.RELOAD, true));
}
}
| [
"steven_sucy@yahoo.com"
] | steven_sucy@yahoo.com |
a05330ff3d05bb7eb932254cb494bcf4a8c8cf21 | c4623aa95fb8cdd0ee1bc68962711c33af44604e | /src/android/support/v7/widget/GridLayoutManager$a.java | a6da3eba3f11511213794f86e42e9d56a1134988 | [] | no_license | reverseengineeringer/com.yelp.android | 48f7f2c830a3a1714112649a6a0a3110f7bdc2b1 | b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8 | refs/heads/master | 2021-01-19T02:07:25.997811 | 2016-07-19T16:37:24 | 2016-07-19T16:37:24 | 38,555,675 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,459 | java | package android.support.v7.widget;
import android.util.SparseIntArray;
public abstract class GridLayoutManager$a
{
final SparseIntArray a;
private boolean b;
public abstract int a(int paramInt);
int a(int paramInt1, int paramInt2)
{
int i;
if (!b) {
i = b(paramInt1, paramInt2);
}
int j;
do
{
return i;
j = a.get(paramInt1, -1);
i = j;
} while (j != -1);
paramInt2 = b(paramInt1, paramInt2);
a.put(paramInt1, paramInt2);
return paramInt2;
}
public void a()
{
a.clear();
}
int b(int paramInt)
{
int i = 0;
int j = a.size() - 1;
while (i <= j)
{
int k = i + j >>> 1;
if (a.keyAt(k) < paramInt) {
i = k + 1;
} else {
j = k - 1;
}
}
paramInt = i - 1;
if ((paramInt >= 0) && (paramInt < a.size())) {
return a.keyAt(paramInt);
}
return -1;
}
public int b(int paramInt1, int paramInt2)
{
int n = a(paramInt1);
if (n == paramInt2) {
return 0;
}
int j;
int i;
if ((b) && (a.size() > 0))
{
j = b(paramInt1);
if (j >= 0)
{
i = a.get(j) + a(j);
j += 1;
}
}
for (;;)
{
if (j < paramInt1)
{
int k = a(j);
int m = i + k;
if (m == paramInt2) {
i = 0;
}
for (;;)
{
j += 1;
break;
i = k;
if (m <= paramInt2) {
i = m;
}
}
}
if (i + n > paramInt2) {
break;
}
return i;
j = 0;
i = 0;
}
}
public int c(int paramInt1, int paramInt2)
{
int n = a(paramInt1);
int k = 0;
int i = 0;
int j = 0;
int m;
if (k < paramInt1)
{
m = a(k);
j += m;
if (j == paramInt2)
{
j = i + 1;
i = 0;
}
}
for (;;)
{
m = k + 1;
k = i;
i = j;
j = k;
k = m;
break;
if (j > paramInt2)
{
j = i + 1;
i = m;
continue;
paramInt1 = i;
if (j + n > paramInt2) {
paramInt1 = i + 1;
}
return paramInt1;
}
else
{
m = j;
j = i;
i = m;
}
}
}
}
/* Location:
* Qualified Name: android.support.v7.widget.GridLayoutManager.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
0ff4fba1fab28a72dccab1793d968ce27ebb6dd8 | 0f0603535d370ee0377a27f04f2735a4e305e88f | /GeeksForGeeks_Strings/ReverseStringUsingRecursion.java | f2103ac7b55b370b63220d9bd69672a787db3dc1 | [] | no_license | ishu2/DS-and-Algorithms | a35f6983222f15c3273328bf74bfe79ff3261b96 | 3b400915ed011144e8d577e95a485e0a23f1e90c | refs/heads/master | 2022-01-16T11:08:51.979218 | 2017-10-10T06:26:34 | 2017-10-10T06:26:34 | 106,179,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 495 | java | package GeeksForGeeks_Strings;
import java.util.Scanner;
public class ReverseStringUsingRecursion {
public static String reverseString(String str)
{
if(str.length()==0)
{
return "";
}
String res=reverseString(str.substring(1));
res+=str.charAt(0);
return res;
}
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
System.out.println("Enter a string :");
String str=s.next();
String res=reverseString(str);
System.out.println(res);
}
}
| [
"rathiishita123@gmail.com"
] | rathiishita123@gmail.com |
807a64e85ce860f260ae689928dc5ffa250137b6 | 2845d612ec420ffed49191af3a8cd4e1e7258cfa | /kuangjia/paChong/day2-itcast-crawler-job/src/main/java/cn/itcast/job/task/MathSalary.java | dc6c67f04bc402ad6d452af5d11548a95062c17c | [] | no_license | shuyangxiaobao/Java | d618c6b727efcbd3a857a33817720a1c941d2933 | 6510e0d89cbd18e2f59b0cccfe1812807eb2a5af | refs/heads/master | 2022-07-09T03:52:59.986247 | 2021-04-09T07:14:11 | 2021-04-09T07:14:11 | 234,865,674 | 1 | 1 | null | 2022-06-21T04:16:10 | 2020-01-19T08:28:25 | HTML | UTF-8 | Java | false | false | 2,114 | java | package cn.itcast.job.task;
public class MathSalary {
/**
* 获取薪水范围
*
* @param salaryStr
* @return
*/
public static Integer[] getSalary(String salaryStr) {
//声明存放薪水范围的数组
Integer[] salary = new Integer[2];
//"500/天"
//0.8-1.2万/月
//5-8千/月
//5-6万/年
String date = salaryStr.substring(salaryStr.length() - 1, salaryStr.length());
//如果是按天,则直接乘以240进行计算
if (!"月".equals(date) && !"年".equals(date)) {
salaryStr = salaryStr.substring(0, salaryStr.length() - 2);
salary[0] = salary[1] = str2Num(salaryStr, 240);
return salary;
}
String unit = salaryStr.substring(salaryStr.length() - 3, salaryStr.length() - 2);
String[] salarys = salaryStr.substring(0, salaryStr.length() - 3).split("-");
salary[0] = mathSalary(date, unit, salarys[0]);
salary[1] = mathSalary(date, unit, salarys[1]);
return salary;
}
//根据条件计算薪水
private static Integer mathSalary(String date, String unit, String salaryStr) {
Integer salary = 0;
//判断单位是否是万
if ("万".equals(unit)) {
//如果是万,薪水乘以10000
salary = str2Num(salaryStr, 10000);
} else {
//否则乘以1000
salary = str2Num(salaryStr, 1000);
}
//判断时间是否是月
if ("月".equals(date)) {
//如果是月,薪水乘以12
salary = str2Num(salary.toString(), 12);
}
return salary;
}
private static int str2Num(String salaryStr, int num) {
try {
// 把字符串转为小数,必须用Number接受,否则会有精度丢失的问题
Number result = Float.parseFloat(salaryStr) * num;
return result.intValue();
} catch (Exception e) {
}
return 0;
}
}
| [
"825065886@qq.com"
] | 825065886@qq.com |
ddfe4f7f314e9b1192928200ec18e5f613bdf716 | 762170be6d907a6deaac2713124341b27d263310 | /trunk/hava-common/hava-debug/src/main/java/edu/gatech/hava/debug/IDebugNodeProvider.java | dc7c24146ac490ee038e2404f651026179547a99 | [] | no_license | chris-martin/hava | b5cbf47463db76541869b137caa974a166976b6c | a6ed1e7ddde5aafec33506f2d11a05f18001fb27 | refs/heads/master | 2021-01-01T19:51:23.814017 | 2013-05-21T06:18:19 | 2013-05-21T06:18:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,053 | java | package edu.gatech.hava.debug;
import java.util.List;
import edu.gatech.hava.engine.HException;
/**
* A provider of {@link HDebugObject}s.
*/
public interface IDebugNodeProvider {
/**
* @return a list of {@link HDebugObject}s, each representing
* some variable which was calculated.
*/
List<HDebugObject> getTopLevelVariables();
/**
* @return true if the Hava execution that produced the debug
* objects threw some exception, false otherwise
*/
boolean hasError();
/**
* This returns the variable most closely associated with the
* exception. May be null.
*
* @return one of the debug objects returned by
* {@link #getTopLevelVariables()}
*/
HDebugReference getErrorVariable();
/**
* @return The exception thrown by the Hava engine, if such an
* exception exists. If hasError() returns true, this
* must not be null.
*/
HException getException();
}
| [
"ch.martin@gmail.com"
] | ch.martin@gmail.com |
74629917f8a48aaab90daaacb52d0b5181984138 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/20/20_8ead47dcdda0e5e4884b87018da104384bb1d163/CheckerBoard/20_8ead47dcdda0e5e4884b87018da104384bb1d163_CheckerBoard_t.java | 974f0f9a711b20be3fb2343c9e1d785843b279f2 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,617 | java | package seg.project.checkers;
import java.util.ArrayList;
public class CheckerBoard {
private CheckerSquare[][] grid;
private ArrayList<CheckerSquare> redPieces;
private ArrayList<CheckerSquare> blackPieces;
public CheckerBoard(){
redPieces = new ArrayList<CheckerSquare>(12);
blackPieces = new ArrayList<CheckerSquare>(12);
grid = new CheckerSquare[8][8];
for(int i =0; i < 8;i++){
for(int u = 0;u<8;u++){
if(i%2==0){
if(u%2!=0)
if(i>=5){
grid[i][u]= new CheckerSquare(this,i,u,false);
redPieces.add(grid[i][u]);
}
else if(i <3){
grid[i][u] = new CheckerSquare(this,i,u,true);
blackPieces.add(grid[i][u]);
}
}
else{
if(u%2 == 0){
if(i>=5){
grid[i][u]= new CheckerSquare(this,i,u,false);
redPieces.add(grid[i][u]);
}else if(i <3){
grid[i][u] = new CheckerSquare(this,i,u,true);
blackPieces.add(grid[i][u]);
}
}
}
}
}
}
/*
for(int i =0; i < 8;i++){
for(int u = 0;u<8;u++){
CheckerSquare temp = new CheckerSquare(this,i,u, false, false);
temp.setIcon(new ImageIcon(temp.getImage()));
grid[i][u]= temp;
add(temp);
}
}
fillGameBoard();
}
private void fillGameBoard(){
}
@Override
public void actionPerformed(ActionEvent arg0) {
// I will fill this out
}
*/
public boolean validateMove(int oldX, int oldY, int newX, int newY) {
boolean red = (grid[newX][newY].isBlack());
boolean piece = grid[newX][newY] == null;
if (red || red != piece)
return false;
/*
* If this is a valid non-jump move, then make the move and return true.
* Making the move requires: (0) picking up the piece, (1) putting it
* down on the new square, and (2) promoting it to a new king if necessary.
*/
if (isValidNonjump(oldX, oldY, newX, newY)) {
piece = grid[oldX][oldY] == null;
grid[newX][newY]= grid[oldY][oldX];
grid[oldX][oldY] = null;
crownKing(newX, newY);
return true;
}
/*
* If this is a valid jump move, then make the move and return true.
* Making the move requires: (0) picking up the piece, (1) putting it
* down on the new square, and (2) promoting the new piece to a king if necessary
*/
if (isValidjump(oldX, oldY, newX, newY)) {
piece = grid[oldX][oldY] == null;
grid[newX][newY]= grid[oldY][oldX];
grid[oldX][oldY] = null;
crownKing(newX, newY);
return true;
}
// The move is invalid, so return false
return false;
/*
* Make sure to check: 1. the move is diagonal 2. it is only one square
* if it is a move 3. a friendly piece is not in the way 4. If it is a
* jump 5. If a piece blocks the jump
*/
}
private boolean isValidNonjump(int oldX, int oldY, int newX, int newY) {
int xPos = newX - oldX;
int yPos = newY - oldY;
// Return false if the move is not a move to an adjacent row and column,
if (Math.abs(xPos) != 1)
return false;
if (Math.abs(yPos) != 1)
return false;
if(grid[oldX][oldY] == null)
return false;
if(grid[newX][newY] != null)
return false;
// Return true if this is a King
if (grid[oldX][oldY].isKing())
return true;
// The piece is not a king. Return value of the piece moves forward
return ((!grid[oldX][oldY].isBlack()) && xPos < 0)
|| (grid[oldX][oldY].isBlack() && xPos > 0);
}
private boolean isValidjump(int oldX, int oldY, int newX, int newY) {
int xPos = newX - oldX;
int yPos = newY - oldY;
//........................................
if(grid[oldX][oldY] == null)
return false;
// Return true if this is a King which can go in any direction
if (grid[oldX][oldY].isKing())
return true;
// The piece is not a king. Return value of the piece moves forward
return ((!grid[oldX][oldY].isBlack()) && yPos > 0)
|| (grid[oldX][oldY].isBlack() && yPos < 0);
}
private void crownKing(int newX, int newY){
if ((newX == 7) && !grid[newX][newY].isBlack()) {
grid[newX][newY].setKing(true);
return;
}
if ((newX == 0) && grid[newX][newY].isBlack()) {
grid[newX][newY].setKing(true);
return;
}
}
public boolean performMove(int oldX, int oldY, int newX, int newY, boolean black){
// Fill me out
if(oldX == newX && oldY == newY){
CheckerSquare square = grid[oldX][oldY];
if(square == null)
return false;
if((black && !square.isBlack()) || (!black && square.isBlack()))
return false;
square.setPieceSelected(!square.isPieceSelected());
return true;
}
if(isValidNonjump(oldX, oldY, newX, newY)){
CheckerSquare square = grid[oldX][oldY];
if(square == null)
return false;
if((black && !square.isBlack()) || (!black && square.isBlack()))
return false;
grid[newX][newY] = square;
square.setxPos(newX);
square.setyPos(newY);
square.setPieceSelected(false);
this.crownKing(newX, newX);
grid[oldX][oldY]=null;
return true;
}
// Preform all moves
return false;
}
public void removePiece(int x, int y) {
if (grid[x][y]!= null) {
grid[x][y] = null;
} else
throw new NullPointerException("No piece Found");
}
public ArrayList<CheckerSquare> getBlackPieces() {
return blackPieces;
}
public ArrayList<CheckerSquare> getRedPieces() {
return redPieces;
}
public CheckerSquare[][] getGrid() {
// TODO Auto-generated method stub
return grid;
}
// Old generation code
/*
*
*/
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
12989140e0c72a96d511d764d82af3ce88cf8251 | 90a1032ea0fd69847b51b741485778a3bdea7a5f | /bats-optimizer/src/main/java/org/apache/calcite/rex/LogicVisitor.java | 6a8c427f7fa15e4e96856960a8a42ae905b1b0bd | [
"Apache-2.0"
] | permissive | zouyanjian/Bats | 40c60340757f555475366cb87c7dd8a2c6641ffa | da07df23d6388ba8b11005585366b188a6784a21 | refs/heads/master | 2022-05-18T16:33:51.400657 | 2022-04-24T10:56:32 | 2022-04-24T10:56:32 | 198,460,305 | 0 | 0 | Apache-2.0 | 2022-04-24T10:56:33 | 2019-07-23T15:40:08 | Java | UTF-8 | Java | false | false | 5,085 | 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.calcite.rex;
import org.apache.calcite.plan.RelOptUtil.Logic;
import com.google.common.collect.Iterables;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
/**
* Visitor pattern for traversing a tree of {@link RexNode} objects.
*/
public class LogicVisitor implements RexBiVisitor<Logic, Logic> {
private final RexNode seek;
private final Collection<Logic> logicCollection;
/** Creates a LogicVisitor. */
private LogicVisitor(RexNode seek, Collection<Logic> logicCollection) {
this.seek = seek;
this.logicCollection = logicCollection;
}
/** Finds a suitable logic for evaluating {@code seek} within a list of
* expressions.
*
* <p>Chooses a logic that is safe (that is, gives the right
* answer) with the fewest possibilities (that is, we prefer one that
* returns [true as true, false as false, unknown as false] over one that
* distinguishes false from unknown).
*/
public static Logic find(Logic logic, List<RexNode> nodes,
RexNode seek) {
final Set<Logic> set = EnumSet.noneOf(Logic.class);
final LogicVisitor visitor = new LogicVisitor(seek, set);
for (RexNode node : nodes) {
node.accept(visitor, logic);
}
// Convert FALSE (which can only exist within LogicVisitor) to
// UNKNOWN_AS_TRUE.
if (set.remove(Logic.FALSE)) {
set.add(Logic.UNKNOWN_AS_TRUE);
}
switch (set.size()) {
case 0:
throw new IllegalArgumentException("not found: " + seek);
case 1:
return Iterables.getOnlyElement(set);
default:
return Logic.TRUE_FALSE_UNKNOWN;
}
}
public static void collect(RexNode node, RexNode seek, Logic logic,
List<Logic> logicList) {
node.accept(new LogicVisitor(seek, logicList), logic);
// Convert FALSE (which can only exist within LogicVisitor) to
// UNKNOWN_AS_TRUE.
Collections.replaceAll(logicList, Logic.FALSE, Logic.UNKNOWN_AS_TRUE);
}
public Logic visitCall(RexCall call, Logic logic) {
final Logic arg0 = logic;
switch (call.getKind()) {
case IS_NOT_NULL:
case IS_NULL:
logic = Logic.TRUE_FALSE_UNKNOWN;
break;
case IS_TRUE:
case IS_NOT_TRUE:
logic = Logic.UNKNOWN_AS_FALSE;
break;
case IS_FALSE:
case IS_NOT_FALSE:
logic = Logic.UNKNOWN_AS_TRUE;
break;
case NOT:
logic = logic.negate2();
break;
case CASE:
logic = Logic.TRUE_FALSE_UNKNOWN;
break;
}
switch (logic) {
case TRUE:
switch (call.getKind()) {
case AND:
break;
default:
logic = Logic.TRUE_FALSE_UNKNOWN;
}
}
for (RexNode operand : call.getOperands()) {
operand.accept(this, logic);
}
return end(call, arg0);
}
private Logic end(RexNode node, Logic arg) {
if (node.equals(seek)) {
logicCollection.add(arg);
}
return arg;
}
public Logic visitInputRef(RexInputRef inputRef, Logic arg) {
return end(inputRef, arg);
}
public Logic visitLocalRef(RexLocalRef localRef, Logic arg) {
return end(localRef, arg);
}
public Logic visitLiteral(RexLiteral literal, Logic arg) {
return end(literal, arg);
}
public Logic visitOver(RexOver over, Logic arg) {
return end(over, arg);
}
public Logic visitCorrelVariable(RexCorrelVariable correlVariable,
Logic arg) {
return end(correlVariable, arg);
}
public Logic visitDynamicParam(RexDynamicParam dynamicParam, Logic arg) {
return end(dynamicParam, arg);
}
public Logic visitRangeRef(RexRangeRef rangeRef, Logic arg) {
return end(rangeRef, arg);
}
public Logic visitFieldAccess(RexFieldAccess fieldAccess, Logic arg) {
return end(fieldAccess, arg);
}
public Logic visitSubQuery(RexSubQuery subQuery, Logic arg) {
if (!subQuery.getType().isNullable()) {
if (arg == Logic.TRUE_FALSE_UNKNOWN) {
arg = Logic.TRUE_FALSE;
}
}
return end(subQuery, arg);
}
@Override public Logic visitTableInputRef(RexTableInputRef ref, Logic arg) {
return end(ref, arg);
}
@Override public Logic visitPatternFieldRef(RexPatternFieldRef ref, Logic arg) {
return end(ref, arg);
}
}
// End LogicVisitor.java
| [
"zhh200910@gmail.com"
] | zhh200910@gmail.com |
f4d75fbf7c74a5588f35fb80be019a63316171b9 | 8246da9a0ea49ef6e70bfb6bc05148fb6134ed89 | /dianping2/src/main/java/android/support/v4/app/FragmentManager.java | 6dc522b4e4dd830813b07e7b47c2711dd03129fc | [] | no_license | hezhongqiang/Dianping | 2708824e30339e1abfb85e028bd27778e26adb56 | b1a4641be06857fcf65466ce04f3de6b0b6f05ef | refs/heads/master | 2020-05-29T08:48:38.251791 | 2016-01-13T08:09:05 | 2016-01-13T08:09:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,746 | java | package android.support.v4.app;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.StringRes;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.List;
public abstract class FragmentManager
{
public static final int POP_BACK_STACK_INCLUSIVE = 1;
public static void enableDebugLogging(boolean paramBoolean)
{
FragmentManagerImpl.DEBUG = paramBoolean;
}
public abstract void addOnBackStackChangedListener(OnBackStackChangedListener paramOnBackStackChangedListener);
public abstract FragmentTransaction beginTransaction();
public abstract void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString);
public abstract boolean executePendingTransactions();
public abstract Fragment findFragmentById(@IdRes int paramInt);
public abstract Fragment findFragmentByTag(String paramString);
public abstract BackStackEntry getBackStackEntryAt(int paramInt);
public abstract int getBackStackEntryCount();
public abstract Fragment getFragment(Bundle paramBundle, String paramString);
public abstract List<Fragment> getFragments();
public abstract boolean isDestroyed();
@Deprecated
public FragmentTransaction openTransaction()
{
return beginTransaction();
}
public abstract void popBackStack();
public abstract void popBackStack(int paramInt1, int paramInt2);
public abstract void popBackStack(String paramString, int paramInt);
public abstract boolean popBackStackImmediate();
public abstract boolean popBackStackImmediate(int paramInt1, int paramInt2);
public abstract boolean popBackStackImmediate(String paramString, int paramInt);
public abstract void putFragment(Bundle paramBundle, String paramString, Fragment paramFragment);
public abstract void removeOnBackStackChangedListener(OnBackStackChangedListener paramOnBackStackChangedListener);
public abstract Fragment.SavedState saveFragmentInstanceState(Fragment paramFragment);
public static abstract interface BackStackEntry
{
public abstract CharSequence getBreadCrumbShortTitle();
@StringRes
public abstract int getBreadCrumbShortTitleRes();
public abstract CharSequence getBreadCrumbTitle();
@StringRes
public abstract int getBreadCrumbTitleRes();
public abstract int getId();
public abstract String getName();
}
public static abstract interface OnBackStackChangedListener
{
public abstract void onBackStackChanged();
}
}
/* Location: C:\Users\xuetong\Desktop\dazhongdianping7.9.6\ProjectSrc\classes-dex2jar.jar
* Qualified Name: android.support.v4.app.FragmentManager
* JD-Core Version: 0.6.0
*/ | [
"xuetong@dkhs.com"
] | xuetong@dkhs.com |
6e538c2b5393dafac05affe637f28e4e0da8ff8c | 7984576eaf3bd12abbf54047362556b590606d92 | /bitcamp-java-basic/src/main/java/design_pattern/observer2/after/v1/CharacterCountListener.java | 46af9702a9d64a85b0c5c3a80457e3a5adfa0c9b | [] | no_license | kimyubeen/bitcamp-java-20190527 | 69f8b9006666626781fd6a6c08c139ca6d5453ab | 0fffc655da22d41e1bee9bcc15c90faa69bf4fcd | refs/heads/master | 2020-06-13T20:14:24.632751 | 2019-11-07T02:46:16 | 2019-11-07T02:46:16 | 194,775,333 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | package design_pattern.observer2.after.v1;
public class CharacterCountListener implements CharacterListener {
int count = 0;
@Override
public void readed(int ch) {
count++;
}
@Override
public void displayResult() {
System.out.printf("총 문자 개수 : %d\n", count);
}
}
| [
"ybkim9606@naver.com"
] | ybkim9606@naver.com |
52fecc0821a72813df8430f1c68c3d5f5ddc26b3 | 8aa3af205655793a1e68046122cf081f0bc44dfe | /src/main/java/cn/dreampie/function/user/UserValidator.java | f262aadbf591e4a1647e22add25009a0af7db50f | [] | no_license | Dreampie/dreampie | 17b4b4a485810584086cb3bc3661a803c1894685 | 1cf30e3d3e398edc1826faf54da0133b57cce39f | refs/heads/master | 2023-03-31T15:22:55.757841 | 2014-09-18T02:44:55 | 2014-09-18T02:44:55 | 19,423,097 | 15 | 13 | null | null | null | null | UTF-8 | Java | false | false | 7,184 | java | package cn.dreampie.function.user;
import cn.dreampie.common.plugin.shiro.hasher.Hasher;
import cn.dreampie.common.plugin.shiro.hasher.HasherUtils;
import cn.dreampie.common.utils.SubjectUtils;
import cn.dreampie.common.utils.ValidateUtils;
import cn.dreampie.common.web.thread.ThreadLocalUtil;
import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;
/**
* Created by wangrenhui on 2014/6/10.
*/
public class UserValidator {
public static class addFollowingValidator extends Validator {
@Override
protected void validate(Controller c) {
boolean idEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("follower.id"));
if (idEmpty) addError("idMsg", "联系人参数异常");
if (!idEmpty && !ValidateUtils.me().isPositiveNumber(c.getPara("follower.id")))
addError("idMsg", "联系人参数异常");
if (!idEmpty) {
Follower con = Follower.dao.findById(c.getPara("follower.id"));
if (ValidateUtils.me().isNullOrEmpty(con))
addError("idMsg", "联系人不存在");
}
boolean introEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("follower.intro"));
if (introEmpty) addError("introMsg", "备注不能为空");
if (!introEmpty && !ValidateUtils.me().isLength(c.getPara("follower.intro"), 3, 240))
addError("introMsg", "备注长度为3-240个字符");
}
@Override
protected void handleError(Controller c) {
c.keepModel(Follower.class);
c.keepPara();
c.setAttr("state", "failure");
if (ThreadLocalUtil.isJson())
c.renderJson();
else
c.forwardAction("/user/follower?" + c.getRequest().getQueryString());
}
}
public static class deleteFollowingValidator extends Validator {
@Override
protected void validate(Controller c) {
boolean idEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("follower.id"));
if (idEmpty) addError("idMsg", "联系人参数异常");
if (!idEmpty && !ValidateUtils.me().isPositiveNumber(c.getPara("follower.id")))
addError("idMsg", "联系人参数异常");
if (!idEmpty) {
Follower con = Follower.dao.findById(c.getPara("follower.id"));
if (ValidateUtils.me().isNullOrEmpty(con))
addError("idMsg", "联系人不存在");
}
}
@Override
protected void handleError(Controller c) {
c.keepModel(Follower.class);
c.keepPara();
c.setAttr("state", "failure");
if (ThreadLocalUtil.isJson())
c.renderJson();
else
c.forwardAction("/user/following?" + c.getRequest().getQueryString());
}
}
public static class UpdateIntroValidator extends Validator {
@Override
protected void validate(Controller c) {
boolean idEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("follower.id"));
if (idEmpty) addError("idMsg", "联系人参数异常");
if (!idEmpty && !ValidateUtils.me().isPositiveNumber(c.getPara("follower.id")))
addError("idMsg", "联系人参数异常");
if (!idEmpty) {
Follower con = Follower.dao.findById(c.getPara("follower.id"));
if (ValidateUtils.me().isNullOrEmpty(con))
addError("idMsg", "联系人不存在");
}
boolean introEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("follower.intro"));
if (introEmpty) addError("introMsg", "备注不能为空");
if (!introEmpty && !ValidateUtils.me().isLength(c.getPara("follower.intro"), 3, 240))
addError("introMsg", "备注长度为3-240个字符");
}
@Override
protected void handleError(Controller c) {
c.keepModel(Follower.class);
c.keepPara();
c.setAttr("state", "failure");
if (ThreadLocalUtil.isJson())
c.renderJson();
else
c.forwardAction("/user/following?" + c.getRequest().getQueryString());
}
}
public static class UpdatePwdValidator extends Validator {
@Override
protected void validate(Controller c) {
boolean idEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("user.id"));
if (idEmpty) addError("user_idMsg", "账户编号丢失");
if (!idEmpty && !ValidateUtils.me().isPositiveNumber(c.getPara("user.id")))
addError("user_idMsg", "账户编号必须为数字");
if (ValidateUtils.me().isNullOrEmpty(User.dao.findBy("`user`.id=" + c.getPara("user.id"))))
addError("user_idMsg", "账户不存在");
boolean userEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("user.username"));
if (userEmpty) addError("user_usernameMsg", "账户丢失");
if (!userEmpty && !ValidateUtils.me().isUsername(c.getPara("user.username")))
addError("user_usernameMsg", "账户为英文字母 、数字和下划线长度为5-18");
boolean passwordEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("user.password"));
if (passwordEmpty) addError("user_passwordMsg", "密码不能为空");
if (!passwordEmpty && !ValidateUtils.me().isPassword(c.getPara("user.password")))
addError("user_passwordMsg", "密码为英文字母 、数字和下划线长度为5-18");
if (!passwordEmpty && !c.getPara("user.password").equals(c.getPara("repassword")))
addError("repasswordMsg", "重复密码不匹配");
boolean oldpasswordEmpty = ValidateUtils.me().isNullOrEmpty(c.getPara("oldpassword"));
if (oldpasswordEmpty) addError("user_oldpasswordMsg", "原始密码不能为空");
if (!oldpasswordEmpty && !ValidateUtils.me().isPassword(c.getPara("oldpassword")))
addError("user_oldpasswordMsg", "密码为英文字母 、数字和下划线长度为5-18");
if (!oldpasswordEmpty) {
User user = SubjectUtils.me().getUser();
if (user.getStr("hasher").equals(Hasher.DEFAULT.value())) {
boolean match = HasherUtils.me().match(c.getPara("oldpassword"), user.getStr("password"), Hasher.DEFAULT);
if (!match) {
addError("user_oldpasswordMsg", "原始密码不匹配");
}
} else {
addError("user_oldpasswordMsg", "不支持的加密方式");
}
}
}
@Override
protected void handleError(Controller c) {
c.keepModel(User.class);
c.keepPara();
c.setAttr("state", "failure");
if (ThreadLocalUtil.isJson())
c.renderJson();
else
c.forwardAction("/user/center");
}
}
}
| [
"wangrenhui1990@gmail.com"
] | wangrenhui1990@gmail.com |
e80118ed0edd4d44bc105f4a89fa505d676401bc | 9b62a49653d5ef7e2ce8bc9b15ae7fbbcd058cd3 | /src/main/java/com/zbkj/crmeb/store/vo/StoreProductRelationCountVo.java | 1cc2968407b3e0dc41f3724809899d191ea88a5f | [] | no_license | 123guo789/E-commerce-marketing-system | cfcc00d11e0f645f30e3b3c465b4a907dd7ab5bc | 14241e0777e86cd15404811bb397f820ffb4dfd9 | refs/heads/master | 2023-05-30T19:43:39.276634 | 2021-06-16T13:07:54 | 2021-06-16T13:07:54 | 363,798,792 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 802 | java | package com.zbkj.crmeb.store.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 商品点赞和收藏表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_store_product_relation")
@ApiModel(value="StoreProductRelationCountVo对象", description="商品点赞和收藏数量")
public class StoreProductRelationCountVo implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "商品ID")
private Integer productId;
@ApiModelProperty(value = "数量")
private Integer count;
}
| [
"321458547@qq.com"
] | 321458547@qq.com |
98abc2da7263aa101745c7a937a9b734854b36ae | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/library/api/client/knowncontent/ContentMetadataTest.java | 165f064f37497e9c448695f806528acc02ab8bc6 | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | Java | false | false | 3,923 | java | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.feed.library.api.client.knowncontent;
import static com.google.common.truth.Truth.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.annotation.Config;
import org.chromium.components.feed.core.proto.ui.stream.StreamStructureProto.OfflineMetadata;
import org.chromium.components.feed.core.proto.ui.stream.StreamStructureProto.RepresentationData;
import org.chromium.testing.local.LocalRobolectricTestRunner;
/** Tests for {@link ContentMetadata}. */
@RunWith(LocalRobolectricTestRunner.class)
@Config(manifest = Config.NONE)
public class ContentMetadataTest {
private static final String TITLE = "title";
private static final String SNIPPET = "snippet";
private static final String FAVICON_URL = "favicon.com";
private static final String IMAGE_URL = "image.com";
private static final String PUBLISHER = "publisher";
private static final String URL = "url.com";
private static final long TIME_PUBLISHED = 6L;
private static final RepresentationData REPRESENTATION_DATA =
RepresentationData.newBuilder()
.setUri(URL)
.setPublishedTimeSeconds(TIME_PUBLISHED)
.build();
private static final RepresentationData REPRESENTATION_DATA_NO_URL =
REPRESENTATION_DATA.toBuilder().clearUri().build();
private static final RepresentationData REPRESENTATION_DATA_NO_TIME_PUBLISHED =
REPRESENTATION_DATA.toBuilder().clearPublishedTimeSeconds().build();
private static final OfflineMetadata OFFLINE_METADATA = OfflineMetadata.newBuilder()
.setFaviconUrl(FAVICON_URL)
.setImageUrl(IMAGE_URL)
.setPublisher(PUBLISHER)
.setSnippet(SNIPPET)
.setTitle(TITLE)
.build();
private static final OfflineMetadata OFFLINE_METADATA_NO_TITLE =
OFFLINE_METADATA.toBuilder().clearTitle().build();
@Test
public void testMaybeCreate() {
ContentMetadata created =
ContentMetadata.maybeCreateContentMetadata(OFFLINE_METADATA, REPRESENTATION_DATA);
assertThat(created.getTitle()).isEqualTo(TITLE);
assertThat(created.getSnippet()).isEqualTo(SNIPPET);
assertThat(created.getFaviconUrl()).isEqualTo(FAVICON_URL);
assertThat(created.getImageUrl()).isEqualTo(IMAGE_URL);
assertThat(created.getPublisher()).isEqualTo(PUBLISHER);
assertThat(created.getUrl()).isEqualTo(URL);
assertThat(created.getTimePublished()).isEqualTo(TIME_PUBLISHED);
}
@Test
public void testMaybeCreate_noUrl() {
assertThat(ContentMetadata.maybeCreateContentMetadata(
OFFLINE_METADATA, REPRESENTATION_DATA_NO_URL))
.isNull();
}
@Test
public void testMaybeCreate_noTitle() {
assertThat(ContentMetadata.maybeCreateContentMetadata(
OFFLINE_METADATA_NO_TITLE, REPRESENTATION_DATA))
.isNull();
}
@Test
public void testMaybeCreate_noTimePublished() {
assertThat(ContentMetadata
.maybeCreateContentMetadata(
OFFLINE_METADATA, REPRESENTATION_DATA_NO_TIME_PUBLISHED)
.getTimePublished())
.isEqualTo(ContentMetadata.UNKNOWN_TIME_PUBLISHED);
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
f578ac25d48e64cd53928dee9849e534959fc0fa | 31003c198586cd07d313bba268f15e2c5fe1c652 | /wow-excel-poi/src/main/java/com/github/nekolr/read/ExcelReadContext.java | 86b6542a55b8ccf1b345f657dfcc225eff3ad35c | [
"MIT"
] | permissive | nekolr/wow-excel | 44525b419ed1162b3dac8c6ae08ec8dbf75ae78c | 65c0235a256630c6cb70849f4f88384a23573597 | refs/heads/master | 2023-07-26T18:05:01.432045 | 2021-09-11T02:14:38 | 2021-09-11T02:14:38 | 260,608,411 | 3 | 0 | MIT | 2021-05-30T01:30:18 | 2020-05-02T03:46:09 | Java | UTF-8 | Java | false | false | 3,821 | java | package com.github.nekolr.read;
import com.github.nekolr.annotation.Excel;
import com.github.nekolr.Constants;
import com.github.nekolr.convert.DefaultDataConverter;
import com.github.nekolr.metadata.DataConverter;
import com.github.nekolr.metadata.ExcelBean;
import com.github.nekolr.read.listener.*;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 读上下文
*
* @param <R> 使用 @Excel 注解的类类型
*/
@Getter
@Setter
public class ExcelReadContext<R> {
/**
* sheet 名称
*/
private String sheetName;
/**
* sheet 坐标
*/
private Integer sheetAt;
/**
* 是否读所有的 sheet,默认否
*/
private boolean allSheets = Constants.ALL_SHEETS_DISABLED;
/**
* 是否保存读取的结果,默认保存
*/
private boolean saveResult = Constants.SAVE_RESULT_ENABLED;
/**
* 数据的行号(是数据开始的行号,不是表头开始的行号)
*/
private int rowNum = Constants.DEFAULT_ROW_NUM;
/**
* 数据的列号
*/
private int colNum = Constants.DEFAULT_COL_NUM;
/**
* workbook
*/
private Workbook workbook;
/**
* Excel 文件
* <p>
* 如果输入流和文件都不为空,优先使用文件
*/
private File file;
/**
* Excel 输入流
*/
private InputStream inputStream;
/**
* 是否使用流式 reader,默认否
*/
private boolean streamingReaderEnabled = Constants.STREAMING_READER_DISABLED;
/**
* 文档密码
*/
private String password;
/**
* 使用 Excel 注解的类
*
* @see Excel
*/
private Class<R> excelClass;
/**
* Excel 注解的元数据
*
* @see Excel
*/
private ExcelBean excel;
/**
* 读 sheet 监听器集合
*/
private List<ExcelSheetReadListener<R>> sheetReadListeners = new ArrayList<>();
/**
* 读行监听器集合
*/
private List<ExcelRowReadListener<R>> rowReadListeners = new ArrayList<>();
/**
* 读单元格监听器集合
*/
private List<ExcelCellReadListener> cellReadListeners = new ArrayList<>();
/**
* 读空单元格监听器集合
*/
private List<ExcelEmptyCellReadListener> emptyCellReadListeners = new ArrayList<>();
/**
* 结果监听器
*/
private ExcelReadResultListener<R> readResultListener;
/**
* 数据转换器集合
*/
private Map<Class<? extends DataConverter>, DataConverter> converterCache = new HashMap<>();
public ExcelReadContext() {
// 添加默认的数据转换器
this.converterCache.put(DefaultDataConverter.class, new DefaultDataConverter());
}
/**
* 添加读监听器
*
* @param readListener 读监听器
* @return 读上下文
*/
@SuppressWarnings("unchecked")
public ExcelReadContext<R> addListener(ExcelReadListener readListener) {
if (readListener instanceof ExcelSheetReadListener) {
this.sheetReadListeners.add((ExcelSheetReadListener<R>) readListener);
}
if (readListener instanceof ExcelRowReadListener) {
this.rowReadListeners.add((ExcelRowReadListener<R>) readListener);
}
if (readListener instanceof ExcelCellReadListener) {
this.cellReadListeners.add((ExcelCellReadListener) readListener);
}
if (readListener instanceof ExcelEmptyCellReadListener) {
this.emptyCellReadListeners.add((ExcelEmptyCellReadListener) readListener);
}
return this;
}
}
| [
"excalibll@163.com"
] | excalibll@163.com |
4fa894f7c6bff2fb96cd5a2359a39e0af135ec9c | aadce671c213fbd6f75637d8fd8fa6efef7c56ae | /everything-simple/src/main/java/com/daltao/simple/DeadLoop.java | 4119857500d7f7de61ba7a19a88c656a3869fc19 | [] | no_license | taodaling/everything | 424d891af2567a07c5c8fcce32c77e2f73139776 | 0c6fc7456dac8eb6b1a09e1ee5674030b0e3c8c2 | refs/heads/master | 2022-06-22T01:24:25.819000 | 2020-06-18T10:32:18 | 2020-06-18T10:32:18 | 156,957,505 | 0 | 0 | null | 2022-06-10T19:57:14 | 2018-11-10T07:15:45 | Java | UTF-8 | Java | false | false | 301 | java | package com.daltao.simple;
import java.util.HashMap;
import java.util.WeakHashMap;
public class DeadLoop {
public static void main(String[] args) {
WeakHashMap map = new WeakHashMap();
while(true) {
map.put(new Object(), new Object());
}
}
}
| [
"taodaling@gmail.com"
] | taodaling@gmail.com |
9f7ab015092252bb1ad5c27ff46a5f00e03f5ccc | 971109fdb2b844fd9d22ddf9998fd9e33b49fe2b | /donation/src/main/java/me/piebridge/donation/WechatTask.java | aab27cb4c4f6166ec29fab7baf106ecbab886445 | [
"WTFPL"
] | permissive | XiaoQin0000/Brevent | 8229e218d5907125b9ea65fd95f3d205a323be19 | 83109f18d4a73568dcb1b580572f493f5c1a7690 | refs/heads/master | 2020-09-20T05:21:40.713645 | 2017-06-12T06:14:05 | 2017-06-12T06:14:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,501 | java | package me.piebridge.donation;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.os.AsyncTask;
import android.util.ArrayMap;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Map;
/**
* wechat QrCode task
* <p>
* Created by thom on 2017/2/13.
*/
class WechatTask extends AsyncTask<String, Void, Boolean>
implements DialogInterface.OnCancelListener {
private final WeakReference<DonateActivity> mReference;
WechatTask(DonateActivity activity) {
mReference = new WeakReference<>(activity);
}
@Override
protected Boolean doInBackground(String... params) {
DonateActivity donateActivity = mReference.get();
String link = params[0];
File path = new File(params[1]);
PackageManager packageManager = donateActivity.getPackageManager();
Intent launcher = packageManager.getLaunchIntentForPackage(donateActivity.getPackageName());
BitmapDrawable drawable = (BitmapDrawable) packageManager.resolveActivity(launcher, 0)
.activityInfo.loadIcon(packageManager);
Resources resources = donateActivity.getResources();
drawable = DonateActivity.cropDrawable(resources, drawable,
resources.getDimensionPixelSize(android.R.dimen.app_icon_size));
Bitmap bitmap;
try {
bitmap = createCode(link, drawable.getBitmap());
} catch (WriterException e) {
// do nothing
return false;
}
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
FileOutputStream fos = new FileOutputStream(path)
) {
bitmap.compress(Bitmap.CompressFormat.PNG, 0, bos);
fos.write(bos.toByteArray());
fos.flush();
bitmap.recycle();
return true;
} catch (IOException e) {
// do nothing
return false;
}
}
private Bitmap createCode(String content, Bitmap logo) throws WriterException {
int logoSize = Math.max(logo.getWidth(), logo.getHeight());
int size = logoSize * 0x5;
Map<EncodeHintType, Object> hints = new ArrayMap<>(0x2);
hints.put(EncodeHintType.MARGIN, 0x2);
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
BitMatrix matrix = new QRCodeWriter().encode(content, BarcodeFormat.QR_CODE,
size, size, hints);
int width = matrix.getWidth();
int height = matrix.getHeight();
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
int left = (width - logo.getWidth()) / 2;
int top = (height - logo.getHeight()) / 2;
int leftEnd = left + logo.getWidth();
int topEnd = top + logo.getHeight();
for (int x = 0; x < width; ++x) {
for (int y = 0; y < height; ++y) {
if ((x >= left && x < leftEnd) && (y >= top && y < topEnd)) {
bitmap.setPixel(x, y, Color.WHITE);
} else {
bitmap.setPixel(x, y, matrix.get(x, y) ? Color.DKGRAY : Color.WHITE);
}
}
}
Canvas canvas = new Canvas(bitmap);
canvas.drawBitmap(logo, left, top, null);
canvas.save();
canvas.restore();
return bitmap;
}
@Override
protected void onPostExecute(Boolean param) {
DonateActivity donateActivity = mReference.get();
if (donateActivity != null) {
donateActivity.hideDonateDialog();
if (!isCancelled() && Boolean.TRUE.equals(param)) {
donateActivity.copyQrCodeAndDonate();
} else {
donateActivity.hideWechat();
}
}
}
@Override
public void onCancel(DialogInterface dialog) {
cancel(false);
}
} | [
"liudongmiao@gmail.com"
] | liudongmiao@gmail.com |
80635db571b2d420dba4831a1a81d56929521dde | 2915c1da9fe2f19edc3f2f1f236f6483e344f865 | /src/main/java/com/siwoo/application/learning/common/Guitarist.java | ed5501b0d88ebc236fec9e5a3cae5078d68b115e | [] | no_license | Siwoo-Kim/spring5 | 63b0c8d86a8356c0cd3922b3155eb511f485c0fb | c504e4ec548ae03b62820453ed2fc8ca1d067878 | refs/heads/master | 2020-04-11T01:12:39.313257 | 2018-03-17T23:31:54 | 2018-03-17T23:31:54 | 124,316,664 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 235 | java | package com.siwoo.application.learning.common;
public class Guitarist extends Singer {
private static final String lyric = "너 때매 못살아~";
@Override
public void sing() {
System.out.println(lyric);
}
}
| [
"skim327@myseneca.ca"
] | skim327@myseneca.ca |
1e2fe720234ec6db6aa7f462848d16b0b47cd893 | 4e901fe60bd645307913ef2b945153ab61fdf2fa | /src/main/java/jclp/vdm/zip/ZipVdmEntry.java | c1e6bc5d1deb5a66ef470517f8562b12a9b89143 | [
"Apache-2.0"
] | permissive | phylame/jclp | baef8d456595908c26b36425ca9cf7b24404a82a | e0ca497bae2ae804ec89f654c1be42c59254f997 | refs/heads/master | 2021-01-25T11:03:59.557553 | 2017-09-11T07:25:53 | 2017-09-11T07:25:53 | 93,912,334 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,747 | java | /*
* Copyright 2017 Peng Wan <phylame@163.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 jclp.vdm.zip;
import jclp.vdm.VdmEntry;
import java.util.zip.ZipEntry;
class ZipVdmEntry implements VdmEntry {
ZipEntry entry;
ZipVdmReader reader;
ZipVdmWriter writer;
ZipVdmEntry(ZipEntry entry, ZipVdmReader reader) {
this.entry = entry;
this.reader = reader;
}
ZipVdmEntry(ZipEntry entry, ZipVdmWriter writer) {
this.entry = entry;
this.writer = writer;
}
@Override
public String getName() {
return entry.getName();
}
@Override
public String getComment() {
return entry.getComment();
}
@Override
public long lastModified() {
return entry.getTime();
}
@Override
public boolean isDirectory() {
return entry.isDirectory();
}
@Override
public String toString() {
return reader != null
? "zip:file:/" + reader.getName().replace('\\', '/') + "!" + entry
: entry.toString();
}
@Override
public int hashCode() {
return entry.hashCode();
}
}
| [
"phylame@163.com"
] | phylame@163.com |
6be3c81f959c20230e54450079d779763eb96a7f | 3e5ffd5de1b836ebfe14c4da335a90f2df3f52f3 | /jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/publish/service/AppService.java | aa2ea974f7fc845543b25450635d71cd89576c1a | [
"MIT"
] | permissive | wanddy/activiti-jeecg-boot | a6ca34e12e9dcaa852e00eced3303d76d080207a | c158aa1fec38c09ddd66fb5360326eeaa21b6076 | refs/heads/main | 2023-08-25T15:06:50.421885 | 2021-11-03T09:20:09 | 2021-11-03T09:20:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,295 | java | package org.jeecg.modules.publish.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.jeecg.modules.publish.base.BaseService;
import org.jeecg.modules.publish.entity.App;
import org.jeecg.modules.publish.entity.AppVersion;
import org.jeecg.modules.publish.exception.MyException;
import org.jeecg.modules.publish.vo.AppUploadVo;
import org.jeecg.modules.publish.vo.AppVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.stream.Collectors;
/**
* app 服务类
*
* @author: dongjb
* @date: 2021/6/6
*/
@Service
@Transactional(rollbackFor = Exception.class)
@AllArgsConstructor
public class AppService extends BaseService<App> {
private final AppVersionService appVersionService;
private final FileSystemStorageService storageService;
public List<AppVo> getList() {
List<App> list = super.list(new LambdaQueryWrapper<App>().orderByDesc(App::getUpdateTime));
return list.stream().map(app -> {
AppVo appVo = app.toBean(AppVo.class);
AppVersion appVersion = appVersionService.getById(app.getCurrentVersionId());
appVo.setCurrentVersion(appVersion);
return appVo;
}).collect(Collectors.toList());
}
public AppVo selectById(int id) {
App app = super.getById(id);
if (app == null) {
throw new MyException("未找到该app");
}
List<AppVersion> appVersions = appVersionService.selectByApp(id);
AppVo appVo = app.toBean(AppVo.class);
appVo.setVersions(appVersions);
int downloadCount = appVersions.stream().mapToInt(AppVersion::getDownloadCount).sum();
appVo.setDownloadCount(downloadCount);
return appVo;
}
public App selectByPackageName(String packageName) {
return super.getOne(new LambdaQueryWrapper<App>().eq(App::getPackageName, packageName));
}
public AppVersion selectLatestByPackageName(String packageName) {
App app = selectByPackageName(packageName);
AppVersion appVersion = appVersionService.getById(app.getCurrentVersionId());
appVersion.setIcon(null);
appVersion.setDownloadUrl("appVersions/downloadApk/" + app.getCurrentVersionId());
return appVersion;
}
public void uploadApk(AppUploadVo appUploadVo, MultipartFile file) {
if (!ObjectUtils.allNotNull(appUploadVo.getPackageName(), appUploadVo.getName(), appUploadVo.getVersionName(), appUploadVo.getVersionCode())) {
throw new MyException("应用名、包名、版本不能为空");
}
//若没有app则新增
App app = selectByPackageName(appUploadVo.getPackageName());
if (app == null) {
app = new App();
app.setName(appUploadVo.getName());
app.setPackageName(appUploadVo.getPackageName());
app.setShortCode(RandomStringUtils.randomAlphabetic(4).toLowerCase());
super.save(app);
}
//新增版本
String filename = String.format("%s@%s_%s.apk", appUploadVo.getName(), appUploadVo.getVersionName(), RandomStringUtils.randomAlphabetic(5));
AppVersion appVersion = appUploadVo.toBean(AppVersion.class);
appVersion.setAppId(app.getId());
appVersion.setSize(file.getSize() / 1024);
appVersion.setDownloadUrl(filename);
appVersionService.save(appVersion);
//更新app中currentId
app.setCurrentVersionId(appVersion.getId());
super.updateById(app);
storageService.store(file, filename);
}
public AppVo selectByShortCode(String shortCode) {
App app = super.getOne(new LambdaQueryWrapper<App>().eq(App::getShortCode, shortCode));
if ((app == null)) {
throw new MyException("该app不存在");
}
AppVo appVo = app.toBean(AppVo.class);
AppVersion appVersion = appVersionService.getById(app.getCurrentVersionId());
appVo.setCurrentVersion(appVersion);
return appVo;
}
}
| [
"dongjb@asiainfo.com"
] | dongjb@asiainfo.com |
7522e6cded33fde7fd4dca1bb1bd1e670c93c525 | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /csplugins/trunk/toronto/jm/cy3-stateless-taskfactory/impl/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/cyannotator/create/cImageAnnotationPanel.java | d1cfd1e8a02c8571a9f9b5c3bd4e802196090df5 | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 921 | java | package org.cytoscape.ding.impl.cyannotator.create;
public class cImageAnnotationPanel extends javax.swing.JPanel {
/** Creates new form ImageAnnotation */
public cImageAnnotationPanel() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jFileChooser1 = new javax.swing.JFileChooser();
setLayout(null);
add(jFileChooser1);
jFileChooser1.setBounds(0, 0, 465, 396);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JFileChooser jFileChooser1;
// End of variables declaration//GEN-END:variables
}
| [
"jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
f4699b8261eb38b3a31bdc1fe7d916b447cf280b | 699e78193475606f89f284a00a82954845d30b44 | /app/src/androidTest/java/tr/com/mertkolgu/androidstoringdata/ExampleInstrumentedTest.java | 62982751f9d9ddf36e06528b3f57d5a270b20a0b | [] | no_license | mertkolgu/Android-StoringData | 354291c9014362201b5d73082cd11f79cefd2827 | b06a3738ec0e77e37854d88c123b7a5c985e0882 | refs/heads/master | 2020-09-08T17:29:30.649824 | 2019-11-16T07:08:51 | 2019-11-16T07:08:51 | 221,196,236 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 786 | java | package tr.com.mertkolgu.androidstoringdata;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("tr.com.mertkolgu.androidstoringdata", appContext.getPackageName());
}
}
| [
"mertkolgu@outlook.com"
] | mertkolgu@outlook.com |
e0d9ba94f34f38f9e75dda556d12ed754ac8b7c1 | 573a66e4f4753cc0f145de8d60340b4dd6206607 | /JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362855/quickfix-1.2.0/quickfix/src/java/src/org/quickfix/field/CashSettlAgentAcctNum.java | 20a1c59c78c0ff5d2fb1c54f6aa786945e01501b | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | mkaouer/Code-Smells-Detection-in-JavaScript | 3919ec0d445637a7f7c5f570c724082d42248e1b | 7130351703e19347884f95ce6d6ab1fb4f5cfbff | refs/heads/master | 2023-03-09T18:04:26.971934 | 2022-03-23T22:04:28 | 2022-03-23T22:04:28 | 73,915,037 | 8 | 3 | null | 2023-02-28T23:00:07 | 2016-11-16T11:47:44 | null | UTF-8 | Java | false | false | 288 | java | package org.quickfix.field;
import org.quickfix.StringField;
import java.util.Date;
public class CashSettlAgentAcctNum extends StringField
{
public CashSettlAgentAcctNum()
{
super(184);
}
public CashSettlAgentAcctNum(String data)
{
super(184, data);
}
}
| [
"mmkaouer@umich.edu"
] | mmkaouer@umich.edu |
476a557d5b677c1693cdff229ff1eb84fc46d1d3 | ac392f1cadd4979813a810f87041efdae3ca4832 | /spring-batch-example/src/main/java/com/vther/spring/batch/ch10/retry/template/CountRetryListener.java | 2ad6588f58b04919c5d54f3c5c8753205b1a39a4 | [] | no_license | vther/spring-batch | 234356b7823e89e4d13df0d34a61175547dd69b7 | 8ace01e90c82851c45e975aabfd924874090b86e | refs/heads/master | 2021-01-19T19:22:23.505823 | 2017-04-18T15:49:58 | 2017-04-18T15:49:58 | 88,414,256 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 864 | java | package com.vther.spring.batch.ch10.retry.template;
import org.springframework.retry.RetryCallback;
import org.springframework.retry.RetryContext;
import org.springframework.retry.RetryListener;
public class CountRetryListener implements RetryListener {
@Override
public <T> boolean open(RetryContext context, RetryCallback<T> callback) {
System.out.println("CountRetryListener.open()");
return true;
}
@Override
public <T> void close(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
System.out.println("CountRetryListener.close()");
}
@Override
public <T> void onError(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
CountHelper.increment();
System.out.println("CountRetryListener.onError(),times=" + CountHelper.getCount());
}
}
| [
"vther@qq.com"
] | vther@qq.com |
4a660eb6ffec08e4970a839ecf5c03ffa1848030 | 70b88c112d774f424a6b98708ad5167a1f3fb42b | /src/main/java/mcjty/hologui/api/IGuiComponentRegistry.java | 4c351c76e9c06b9187957349f3b200ff3faf8d51 | [
"MIT"
] | permissive | Darkstrumn/HoloGui | fcd2aa26260380ec40301016e8cefd02752da823 | bc6f420a34d2c8df2efdcc918dc4c15152a0a0f6 | refs/heads/master | 2020-04-28T03:40:50.900436 | 2019-03-11T05:25:48 | 2019-03-11T05:25:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,371 | java | package mcjty.hologui.api;
import mcjty.hologui.api.components.*;
import net.minecraft.util.ResourceLocation;
/**
* Use this interface to create basic components for a gui. Typically you call this in
* your IGuiTile.createGui() implementation.
*
* All gui's work in a screen resolution of 8x8. You can use coordinates like 3.5 or 4.1 for
* precise position control. The 'width' and 'height' of a component are only used for
* components that can be interacted with. They have no effect on rendering.
*/
public interface IGuiComponentRegistry {
/**
* Create a button which shows an icon instead of text
*/
IIconButton iconButton(double x, double y, double w, double h);
/**
* An icon with no interaction
*/
IIcon icon(double x, double y, double w, double h);
/**
* An icon cycle button supporting multiple values.
*/
IIconChoice iconChoice(double x, double y, double w, double h);
/**
* An icon toggle button supporting two icons.
*/
IIconToggle iconToggle(double x, double y, double w, double h);
/**
* Create a number label. This cannot be interacted with
*/
INumber number(double x, double y, double w, double h);
/**
* Create a panel that can itself hold other components
*/
IPanel panel(double x, double y, double w, double h);
/**
* Create a non-interactable itemstack display
*/
IStackIcon stackIcon(double x, double y, double w, double h);
/**
* Create an interactible itemstack display
*/
IStackToggle stackToggle(double x, double y, double w, double h);
/**
* Just text
*/
IText text(double x, double y, double w, double h);
/**
* A text button
*/
IButton button(double x, double y, double w, double h);
/**
* A set of inventory slots
*/
ISlots slots(double x, double y, double w, double h);
/**
* A set of inventory slots for the player
*/
IPlayerSlots playerSlots(double x, double y, double w, double h);
/**
* One of the standard icons
*/
IImage image(Icons icon);
/**
* An icon from the standard icons palette
*/
IImage image(int u, int v);
/**
* The resource location and dimension to use for this icon.
*/
IImage image(ResourceLocation image, int w, int h);
}
| [
"mcjty1@gmail.com"
] | mcjty1@gmail.com |
001e6de9a25fb24aea46f45c6d6c757363fc0c2c | 1be6e27b6ad97d3b3559d815140426018335dcc1 | /gajigaksek-backend/src/main/java/com/gjgs/gjgs/dummy/lecture/CouponDummy.java | 86088d768cadeb815b020952bd7021e1077627bb | [] | no_license | JoeCP17/gjgs | 0711cff1f19193e07a5500891a4d65410e504834 | 5c5365de794e9bfc20257dc436161b8bd42ce119 | refs/heads/master | 2023-08-29T04:55:38.010327 | 2021-11-08T08:08:13 | 2021-11-08T08:08:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,039 | java | package com.gjgs.gjgs.dummy.lecture;
import com.gjgs.gjgs.modules.coupon.entity.Coupon;
import com.gjgs.gjgs.modules.coupon.repositories.CouponRepository;
import com.gjgs.gjgs.modules.coupon.repositories.MemberCouponRepository;
import com.gjgs.gjgs.modules.lecture.dtos.create.CreateLecture;
import com.gjgs.gjgs.modules.lecture.entity.Lecture;
import com.gjgs.gjgs.modules.member.entity.Member;
import com.gjgs.gjgs.modules.member.entity.MemberCoupon;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import java.text.DecimalFormat;
import java.util.List;
import java.util.UUID;
import static java.time.LocalDateTime.now;
import static java.util.stream.Collectors.toList;
@Component
@RequiredArgsConstructor
@Profile("dev")
public class CouponDummy {
private final CouponRepository couponRepository;
private final MemberCouponRepository memberCouponRepository;
public void createAcceptLectureCoupon(Lecture lecture) {
StringBuffer buffer = new StringBuffer();
DecimalFormat decimalFormat = new DecimalFormat("###,###");
couponRepository.save(Coupon.builder()
.lecture(lecture)
.serialNumber(UUID.randomUUID().toString())
.discountPrice(2000)
.chargeCount(20)
.remainCount(20)
.receivePeople(0)
.available(true)
.title(buffer.append(lecture.getTitle())
.append(" ").append(decimalFormat.format(2000))
.append(" 원 할인 쿠폰")
.toString())
.issueDate(now())
.closeDate(now().plusDays(30L))
.build());
}
private CreateLecture.CouponDto getCouponDto() {
return CreateLecture.CouponDto.builder()
.couponPrice(1000).couponCount(10)
.build();
}
public void giveCoupon(Member leader) {
List<Coupon> allCoupons = couponRepository.findAll();
List<MemberCoupon> memberCouponList = allCoupons.stream()
.map(coupon -> MemberCoupon.of(leader, coupon.getDiscountPrice(), coupon.getSerialNumber()))
.collect(toList());
memberCouponRepository.saveAll(memberCouponList);
}
public void createCoupon(Member member) {
Coupon coupon = couponRepository.save(Coupon.builder()
.serialNumber(UUID.randomUUID().toString())
.discountPrice(1500)
.title("서비스 런칭 기념 감사 쿠폰")
.remainCount(10)
.chargeCount(10)
.available(true)
.issueDate(now())
.closeDate(now().plusDays(30))
.receivePeople(0)
.build());
MemberCoupon memberCoupon = MemberCoupon.of(member, coupon.getDiscountPrice(), coupon.getSerialNumber());
member.addCoupon(memberCoupon);
}
}
| [
"cjs1863@gmail.com"
] | cjs1863@gmail.com |
4e5b37399a5faa65a69d13eacd859d1c520a04e9 | 8b9190a8c5855d5753eb8ba7003e1db875f5d28f | /sources/com/facebook/react/views/view/ReactDrawableHelper.java | b82e5a2f2dcc9d31d4eed33fd5193de26bc865a9 | [] | no_license | stevehav/iowa-caucus-app | 6aeb7de7487bd800f69cb0b51cc901f79bd4666b | e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044 | refs/heads/master | 2020-12-29T10:25:28.354117 | 2020-02-05T23:15:52 | 2020-02-05T23:15:52 | 238,565,283 | 21 | 3 | null | null | null | null | UTF-8 | Java | false | false | 3,099 | java | package com.facebook.react.views.view;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
import android.util.TypedValue;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.SoftAssertions;
import com.facebook.react.uimanager.ViewProps;
public class ReactDrawableHelper {
private static final TypedValue sResolveOutValue = new TypedValue();
@TargetApi(21)
public static Drawable createDrawableFromJSDescription(Context context, ReadableMap readableMap) {
int i;
ColorDrawable colorDrawable;
String string = readableMap.getString("type");
if ("ThemeAttrAndroid".equals(string)) {
String string2 = readableMap.getString("attribute");
SoftAssertions.assertNotNull(string2);
int identifier = context.getResources().getIdentifier(string2, "attr", "android");
if (identifier == 0) {
throw new JSApplicationIllegalArgumentException("Attribute " + string2 + " couldn't be found in the resource list");
} else if (!context.getTheme().resolveAttribute(identifier, sResolveOutValue, true)) {
throw new JSApplicationIllegalArgumentException("Attribute " + string2 + " couldn't be resolved into a drawable");
} else if (Build.VERSION.SDK_INT >= 21) {
return context.getResources().getDrawable(sResolveOutValue.resourceId, context.getTheme());
} else {
return context.getResources().getDrawable(sResolveOutValue.resourceId);
}
} else if (!"RippleAndroid".equals(string)) {
throw new JSApplicationIllegalArgumentException("Invalid type for android drawable: " + string);
} else if (Build.VERSION.SDK_INT >= 21) {
if (readableMap.hasKey(ViewProps.COLOR) && !readableMap.isNull(ViewProps.COLOR)) {
i = readableMap.getInt(ViewProps.COLOR);
} else if (context.getTheme().resolveAttribute(16843820, sResolveOutValue, true)) {
i = context.getResources().getColor(sResolveOutValue.resourceId);
} else {
throw new JSApplicationIllegalArgumentException("Attribute colorControlHighlight couldn't be resolved into a drawable");
}
if (!readableMap.hasKey("borderless") || readableMap.isNull("borderless") || !readableMap.getBoolean("borderless")) {
colorDrawable = new ColorDrawable(-1);
} else {
colorDrawable = null;
}
return new RippleDrawable(new ColorStateList(new int[][]{new int[0]}, new int[]{i}), (Drawable) null, colorDrawable);
} else {
throw new JSApplicationIllegalArgumentException("Ripple drawable is not available on android API <21");
}
}
}
| [
"steve@havelka.co"
] | steve@havelka.co |
33b9d49ce95fb6b57bd5b3cdd7d814a525734314 | 90d4870d9a2c132b7b10b4ff6f5bf78a18ac994b | /com/shaded/fasterxml/jackson/databind/jsontype/impl/AsPropertyTypeDeserializer.java | 33165ee4a0545096ed8248771e6a91b053704222 | [
"Apache-2.0",
"MIT"
] | permissive | junpengwang/fire2.5.2 | 399aa13b6c326d97aa2c9c8dd72bef03464ad6cc | f82ed93de0da5f8d454a9b20c08533a916fc0db4 | refs/heads/master | 2016-09-13T16:33:27.944146 | 2016-05-25T12:44:52 | 2016-05-25T12:44:52 | 59,662,156 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,631 | java | /* */ package com.shaded.fasterxml.jackson.databind.jsontype.impl;
/* */
/* */ import com.shaded.fasterxml.jackson.annotation.JsonTypeInfo.As;
/* */ import com.shaded.fasterxml.jackson.core.JsonParser;
/* */ import com.shaded.fasterxml.jackson.core.JsonProcessingException;
/* */ import com.shaded.fasterxml.jackson.core.JsonToken;
/* */ import com.shaded.fasterxml.jackson.core.util.JsonParserSequence;
/* */ import com.shaded.fasterxml.jackson.databind.BeanProperty;
/* */ import com.shaded.fasterxml.jackson.databind.DeserializationContext;
/* */ import com.shaded.fasterxml.jackson.databind.JavaType;
/* */ import com.shaded.fasterxml.jackson.databind.JsonDeserializer;
/* */ import com.shaded.fasterxml.jackson.databind.jsontype.TypeDeserializer;
/* */ import com.shaded.fasterxml.jackson.databind.jsontype.TypeIdResolver;
/* */ import com.shaded.fasterxml.jackson.databind.util.TokenBuffer;
/* */ import java.io.IOException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class AsPropertyTypeDeserializer
/* */ extends AsArrayTypeDeserializer
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public AsPropertyTypeDeserializer(JavaType paramJavaType, TypeIdResolver paramTypeIdResolver, String paramString, boolean paramBoolean, Class<?> paramClass)
/* */ {
/* 31 */ super(paramJavaType, paramTypeIdResolver, paramString, paramBoolean, paramClass);
/* */ }
/* */
/* */ public AsPropertyTypeDeserializer(AsPropertyTypeDeserializer paramAsPropertyTypeDeserializer, BeanProperty paramBeanProperty) {
/* 35 */ super(paramAsPropertyTypeDeserializer, paramBeanProperty);
/* */ }
/* */
/* */ public TypeDeserializer forProperty(BeanProperty paramBeanProperty)
/* */ {
/* 40 */ if (paramBeanProperty == this._property) {
/* 41 */ return this;
/* */ }
/* 43 */ return new AsPropertyTypeDeserializer(this, paramBeanProperty);
/* */ }
/* */
/* */ public JsonTypeInfo.As getTypeInclusion()
/* */ {
/* 48 */ return JsonTypeInfo.As.PROPERTY;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Object deserializeTypedFromObject(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
/* */ throws IOException, JsonProcessingException
/* */ {
/* 60 */ JsonToken localJsonToken = paramJsonParser.getCurrentToken();
/* 61 */ if (localJsonToken == JsonToken.START_OBJECT) {
/* 62 */ localJsonToken = paramJsonParser.nextToken();
/* 63 */ } else { if (localJsonToken == JsonToken.START_ARRAY)
/* */ {
/* */
/* */
/* */
/* */
/* */
/* */
/* 71 */ return _deserializeTypedUsingDefaultImpl(paramJsonParser, paramDeserializationContext, null); }
/* 72 */ if (localJsonToken != JsonToken.FIELD_NAME) {
/* 73 */ return _deserializeTypedUsingDefaultImpl(paramJsonParser, paramDeserializationContext, null);
/* */ }
/* */ }
/* 76 */ TokenBuffer localTokenBuffer = null;
/* 78 */ for (;
/* 78 */ localJsonToken == JsonToken.FIELD_NAME; localJsonToken = paramJsonParser.nextToken()) {
/* 79 */ String str = paramJsonParser.getCurrentName();
/* 80 */ paramJsonParser.nextToken();
/* 81 */ if (this._typePropertyName.equals(str)) {
/* 82 */ return _deserializeTypedForId(paramJsonParser, paramDeserializationContext, localTokenBuffer);
/* */ }
/* 84 */ if (localTokenBuffer == null) {
/* 85 */ localTokenBuffer = new TokenBuffer(null);
/* */ }
/* 87 */ localTokenBuffer.writeFieldName(str);
/* 88 */ localTokenBuffer.copyCurrentStructure(paramJsonParser);
/* */ }
/* 90 */ return _deserializeTypedUsingDefaultImpl(paramJsonParser, paramDeserializationContext, localTokenBuffer);
/* */ }
/* */
/* */
/* */
/* */ protected final Object _deserializeTypedForId(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext, TokenBuffer paramTokenBuffer)
/* */ throws IOException, JsonProcessingException
/* */ {
/* 98 */ String str = paramJsonParser.getText();
/* 99 */ JsonDeserializer localJsonDeserializer = _findDeserializer(paramDeserializationContext, str);
/* 100 */ if (this._typeIdVisible) {
/* 101 */ if (paramTokenBuffer == null) {
/* 102 */ paramTokenBuffer = new TokenBuffer(null);
/* */ }
/* 104 */ paramTokenBuffer.writeFieldName(paramJsonParser.getCurrentName());
/* 105 */ paramTokenBuffer.writeString(str);
/* */ }
/* 107 */ if (paramTokenBuffer != null) {
/* 108 */ paramJsonParser = JsonParserSequence.createFlattened(paramTokenBuffer.asParser(paramJsonParser), paramJsonParser);
/* */ }
/* */
/* 111 */ paramJsonParser.nextToken();
/* */
/* 113 */ return localJsonDeserializer.deserialize(paramJsonParser, paramDeserializationContext);
/* */ }
/* */
/* */
/* */
/* */
/* */ protected Object _deserializeTypedUsingDefaultImpl(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext, TokenBuffer paramTokenBuffer)
/* */ throws IOException, JsonProcessingException
/* */ {
/* 122 */ JsonDeserializer localJsonDeserializer = _findDefaultImplDeserializer(paramDeserializationContext);
/* 123 */ if (localJsonDeserializer != null) {
/* 124 */ if (paramTokenBuffer != null) {
/* 125 */ paramTokenBuffer.writeEndObject();
/* 126 */ paramJsonParser = paramTokenBuffer.asParser(paramJsonParser);
/* */
/* 128 */ paramJsonParser.nextToken();
/* */ }
/* 130 */ return localJsonDeserializer.deserialize(paramJsonParser, paramDeserializationContext);
/* */ }
/* */
/* 133 */ Object localObject = TypeDeserializer.deserializeIfNatural(paramJsonParser, paramDeserializationContext, this._baseType);
/* 134 */ if (localObject != null) {
/* 135 */ return localObject;
/* */ }
/* */
/* 138 */ if (paramJsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
/* 139 */ return super.deserializeTypedFromAny(paramJsonParser, paramDeserializationContext);
/* */ }
/* 141 */ throw paramDeserializationContext.wrongTokenException(paramJsonParser, JsonToken.FIELD_NAME, "missing property '" + this._typePropertyName + "' that is to contain type id (for class " + baseTypeName() + ")");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Object deserializeTypedFromAny(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
/* */ throws IOException, JsonProcessingException
/* */ {
/* 156 */ if (paramJsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
/* 157 */ return super.deserializeTypedFromArray(paramJsonParser, paramDeserializationContext);
/* */ }
/* 159 */ return deserializeTypedFromObject(paramJsonParser, paramDeserializationContext);
/* */ }
/* */ }
/* Location: /Users/junpengwang/Downloads/Download/firebase-client-android-2.5.2.jar!/com/shaded/fasterxml/jackson/databind/jsontype/impl/AsPropertyTypeDeserializer.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"wangjunpeng@wilddog.com"
] | wangjunpeng@wilddog.com |
6da62343b0ccc28de33318c3988ee53e5e9a0cce | 6d36213d2afb8e54315cd4c2a8e13d08c3870f5e | /src/LC1401_1500/LC1423.java | 0c5aaf915add6dab64d1b7792d92783d25acec29 | [] | no_license | sksaikia/LeetCode | 04823f569e1f23af2c87195d9c0ce1f82732fff9 | 27aacd711e198248c09939b6112e7df5ca9e7f8c | refs/heads/main | 2023-04-13T02:33:39.888735 | 2021-05-04T13:24:00 | 2021-05-04T13:24:00 | 325,792,959 | 7 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,144 | java | package LC1401_1500;
public class LC1423 {
// cardPoints = [1,2,3,4,5,6,1] , k=3
// left[] = {0,1,3,6}
// right[] = {0,1,7,12}
// left 0 + right 3 = 0+12 = 12
// left 1 + right 2 = 1 + 7 = 8
// left 2 + right 1 = 3 + 1 = 4
// left 3 + right 0 = 6 + 0 = 6
public int maxScore(int[] cardPoints, int k) {
int[] left = new int[k+1];
int[] right = new int[k+1];
int ans = 0;
left[0] = 0;
right[0] = 0;
left[1] = cardPoints[0];
right[1] = cardPoints[cardPoints.length-1];
for(int i=1;i<=k;i++){
left[i] = left[i-1] + cardPoints[i-1];
}
for(int i=1;i<=k;i++)
right[i] = right[i-1] + cardPoints[cardPoints.length-i];
// for(int c:left)
// System.out.print(c + " ");
// System.out.println();
// for(int c:right)
// System.out.print(c + " ");
// System.out.println();
for(int i=0;i<=k;i++){
ans = Math.max(ans , left[i]+right[k-i]);
// System.out.print(ans + " ");
}
return ans ;
}
}
| [
"saikiasourav48@gmail.com"
] | saikiasourav48@gmail.com |
b29243171ad90fba008c01908409cf2f0b19cecd | 67df195332de56d313fbe1ea5b75729ba5e03b1f | /app/src/main/java/com/easyway/demomvp/OnLoginListener.java | cbc7db4432bf49736970fc66d3fca022cd46c00d | [] | no_license | hanks7/demoMvp | 3743324d43ae6fea02ffcb70a0ebee05cdd3f5cc | c37ca1d152ce6271c1607b31117bb601caea61a2 | refs/heads/master | 2020-07-18T14:15:25.544688 | 2019-09-04T08:27:19 | 2019-09-04T08:27:19 | 206,261,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 174 | java | package com.easyway.demomvp;
import com.easyway.demomvp.model.LoginData;
public interface OnLoginListener {
void loginSucess(LoginData data);
void loginFail();
}
| [
"474664736@qq.com"
] | 474664736@qq.com |
5886208582a17152b16fb8ca56edd750a4bcb246 | a1d3aa27bfec92ef6c53c47135063a5b37eb79c4 | /BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/storage/TimestampToLong.java | 57a976a816fed2457da6b8dce745299e6d1eccd6 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | 1ekrem/sailfish-core | 661159ca9c56a025302d6795c4e702568a588482 | b6051b1eb72b2bde5731a7e645f9ea4b8f92c514 | refs/heads/master | 2020-05-01T16:36:15.334838 | 2018-12-29T12:28:57 | 2018-12-29T13:33:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,929 | java | /******************************************************************************
* Copyright 2009-2018 Exactpro (Exactpro Systems Limited)
*
* 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.exactpro.sf.storage;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Date;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.type.LongType;
import org.hibernate.usertype.UserType;
public class TimestampToLong implements UserType, Serializable{
/**
*
*/
private static final long serialVersionUID = -6302440546874233292L;
@Override
public Object assemble(Serializable cached, Object obj) throws HibernateException {
return cached;
}
@Override
public Object deepCopy(Object obj) throws HibernateException {
if (obj == null) return null;
Date orig = (Date) obj;
return new Timestamp(orig.getTime());
}
@Override
public Serializable disassemble(Object obj) throws HibernateException {
return (Serializable) obj;
}
@Override
public boolean equals(Object a, Object b) throws HibernateException {
return a.equals(b);
}
@Override
public int hashCode(Object obj) throws HibernateException {
return obj.hashCode();
}
@Override
public boolean isMutable() {
return false;
}
@Override
public Object nullSafeGet(ResultSet ps, String[] names, SessionImplementor s, Object owner)
throws HibernateException, SQLException {
Long value = LongType.INSTANCE.nullSafeGet(ps, names[0], s);
return new Timestamp(value);
}
@Override
public void nullSafeSet(PreparedStatement ps, Object value, int index, SessionImplementor s)
throws HibernateException, SQLException {
if (value == null)
LongType.INSTANCE.set(ps, 0L, index, s);
else
LongType.INSTANCE.set(ps, ((Date) value).getTime(), index, s);
}
@Override
public Object replace(Object original, Object target, Object owner) throws HibernateException {
return original;
}
@Override
public Class<?> returnedClass() {
return Timestamp.class;
}
@Override
public int[] sqlTypes() {
return new int[] { java.sql.Types.BIGINT };
}
}
| [
"nikita.smirnov@exactprosystems.com"
] | nikita.smirnov@exactprosystems.com |
6ee880307c8b0b5732c9cd70c180c54645610b45 | 13c371fffd8c0ecd5e735755e7337a093ac00e30 | /com/planet_ink/coffee_mud/WebMacros/HTTPstatusInfo.java | 00d9e82085a4485873b473685bf0afbc56e2b675 | [
"Apache-2.0"
] | permissive | z3ndrag0n/CoffeeMud | e6b0c58953e47eb58544039b0781e4071a016372 | 50df765daee37765e76a1632a04c03f8a96d8f40 | refs/heads/master | 2020-09-15T10:27:26.511725 | 2019-11-18T15:41:42 | 2019-11-18T15:41:42 | 223,416,916 | 1 | 0 | Apache-2.0 | 2019-11-22T14:09:54 | 2019-11-22T14:09:53 | null | UTF-8 | Java | false | false | 1,905 | java | package com.planet_ink.coffee_mud.WebMacros;
import com.planet_ink.coffee_web.interfaces.*;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2002-2019 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class HTTPstatusInfo extends StdWebMacro
{
@Override
public String name()
{
return "HTTPstatusInfo";
}
@Override
public String runMacro(final HTTPRequest httpReq, final String parm, final HTTPResponse httpResp)
{
if(httpReq.getRequestObjects().get("SYSTEM_HTTP_STATUS_INFO")!=null)
return (String)httpReq.getRequestObjects().get("SYSTEM_HTTP_STATUS_INFO");
return "";
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
0185de7ece199d1ae2b2228fc8672a0f28b7a4a3 | 03c808fb4985a347bc2ac4721dd5e88f72621c4b | /src/main/java/com/univocity/parsers/tsv/TsvWriterSettings.java | abb7acead0f0197ba9d1f118fe78d38d9584a145 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | WillwoTechnologies/univocity-parsers | 7d3eb852dd3148e3e0bf54ae3936e9745b01fe4e | 2ff848f4383ef62eeb233cfe8d4d11e27435335b | refs/heads/master | 2020-05-20T23:12:47.489062 | 2015-10-26T16:32:21 | 2015-10-26T16:32:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,790 | java | /*******************************************************************************
* Copyright 2014 uniVocity Software Pty Ltd
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.univocity.parsers.tsv;
import com.univocity.parsers.common.*;
import java.util.*;
/**
* This is the configuration class used by the TSV writer ({@link TsvWriter})
*
* <p>It does not offer additional configuration options on top of the ones provided by the {@link CommonWriterSettings}</p>
*
* @see com.univocity.parsers.tsv.TsvWriter
* @see com.univocity.parsers.tsv.TsvFormat
* @see com.univocity.parsers.common.CommonWriterSettings
*
* @author uniVocity Software Pty Ltd - <a href="mailto:parsers@univocity.com">parsers@univocity.com</a>
*
*/
public class TsvWriterSettings extends CommonWriterSettings<TsvFormat> {
private boolean lineJoiningEnabled = false;
/**
* Identifies whether values containing line endings should have the line separator written using
* the escape character (defined by {@link TsvFormat#getEscapeChar()} followed by the actual line separator character
* instead of other characters such as the standard letters 'n' and 'r'
*
* When line joining is disabled (the default), the {@link TsvWriter} will convert new line characters into
* sequences containing the escape character (typically '\') followed by characters 'n' or 'r'.
* No matter how many line separators the values written contain, the will be escaped and the entire output
* of a record will be written into a single line of text. For example, '\n' and '\r' characters will be
* written as: {@code '\'+'n'} and {@code '\'+'r'}.
*
* If line joining is enabled, the {@link TsvWriter} will convert line new line characters into sequences
* containing the escape character, followed by characters '\n', '\r' or both.
* A new line of text will be generated for each line separator found in the value to be written, "marking" the end
* of each line with the escape character to indicate the record continues on the next line. For example, '\n' and '\r'
* characters will be written as: {@code '\'+'\n'} and {@code '\'+'\r'}.
*
* @return {@code true} if line joining is enabled, otherwise {@code false}
*/
public boolean isLineJoiningEnabled() {
return lineJoiningEnabled;
}
/**
* Defines how the writer should handle the escaping of line separators.
* Values containing line endings should be escaped and the line separator characters can be written using
* the escape character (defined by {@link TsvFormat#getEscapeChar()} followed by the actual line separator character
* instead of other characters such as the standard letters 'n' and 'r'
*
* When line joining is disabled (the default), the {@link TsvWriter} will convert new line characters into
* sequences containing the escape character (typically '\') followed by characters 'n' or 'r'.
* No matter how many line separators the values written contain, the will be escaped and the entire output
* of a record will be written into a single line of text. For example, '\n' and '\r' characters will be
* written as: {@code '\'+'n'} and {@code '\'+'r'}.
*
* If line joining is enabled, the {@link TsvWriter} will convert line new line characters into sequences
* containing the escape character, followed by characters '\n', '\r' or both.
* A new line of text will be generated for each line separator found in the value to be written, "marking" the end
* of each line with the escape character to indicate the record continues on the next line. For example, '\n' and '\r'
* characters will be written as: {@code '\'+'\n'} and {@code '\'+'\r'}.
*
* @param lineJoiningEnabled a flag indicating whether or not to enable line joining.
*/
public void setLineJoiningEnabled(boolean lineJoiningEnabled) {
this.lineJoiningEnabled = lineJoiningEnabled;
}
/**
* Returns the default TsvFormat.
* @return and instance of TsvFormat configured to produce TSV outputs.
*/
@Override
protected TsvFormat createDefaultFormat() {
return new TsvFormat();
}
@Override
protected void addConfiguration(Map<String, Object> out) {
super.addConfiguration(out);
}
}
| [
"jbax@univocity.com"
] | jbax@univocity.com |
2851f5f1d8914e63df5b2c6d057e5669432fb1ba | c42531b0f0e976dd2b11528504e349d5501249ae | /Teeside/MHSystems/app/src/main/java/com/mh/systems/teesside/web/models/forecast/Wind.java | 3ae4ff58a6a81bc1b26118103c52f0a1c12aace3 | [
"MIT"
] | permissive | Karan-nassa/MHSystems | 4267cc6939de7a0ff5577c22b88081595446e09e | a0e20f40864137fff91784687eaf68e5ec3f842c | refs/heads/master | 2021-08-20T05:59:06.864788 | 2017-11-28T08:02:39 | 2017-11-28T08:02:39 | 112,189,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 809 | java |
package com.mh.systems.teesside.web.models.forecast;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Wind {
@SerializedName("speed")
@Expose
private Double speed;
@SerializedName("deg")
@Expose
private Double deg;
/**
*
* @return
* The speed
*/
public Double getSpeed() {
return speed;
}
/**
*
* @param speed
* The speed
*/
public void setSpeed(Double speed) {
this.speed = speed;
}
/**
*
* @return
* The deg
*/
public Double getDeg() {
return deg;
}
/**
*
* @param deg
* The deg
*/
public void setDeg(Double deg) {
this.deg = deg;
}
}
| [
"karan@ucreate.co.in"
] | karan@ucreate.co.in |
63904a8b77376ebd0f1dd68634075e33c1a3df2c | 40a6d17d2fd7bd7f800d5562d8bb9a76fb571ab4 | /pxlab/src/main/java/de/pxlab/pxl/display/Nothing.java | ced8f2934e09e4aaa5202bedddf168d233aa8e92 | [
"MIT"
] | permissive | manuelgentile/pxlab | cb6970e2782af16feb1f8bf8e71465ebc48aa683 | c8d29347d36c3e758bac4115999fc88143c84f87 | refs/heads/master | 2021-01-13T02:26:40.208893 | 2012-08-08T13:49:53 | 2012-08-08T13:49:53 | 5,121,970 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 810 | java | package de.pxlab.pxl.display;
import de.pxlab.pxl.*;
/**
* Does not show anything but is 'visible' which means that its show() methods
* are called!. It may be used to preserve screen content and provide a new set
* of Display object parameters. This MUST be JustInTime in order to prevent
* back buffer creation.
*
* @author H. Irtel
* @version 0.1.0
*/
/*
*
* 2005/05/04
*/
public class Nothing extends Display {
public Nothing() {
setTitleAndTopic("Empty Display", CLEAR_DSP | EXP);
JustInTime.set(1);
}
public boolean isGraphic() {
return false;
}
protected int create() {
int s1 = enterDisplayElement(new EmptyDisplayElement(), group[0]);
defaultTiming(0);
JustInTime.set(1);
return s1;
}
protected void computeGeometry() {
}
}
| [
"manuelgentile@gmail.com"
] | manuelgentile@gmail.com |
fb779180c3caa0fa06d7946b550ffde3f72c8daa | 9ad0aa646102f77501efde94d115d4ff8d87422f | /LeetCode/java/src/brick_wall/Solution.java | 2c4e7dd27f621f3758da2b514b46306dfb7245ef | [] | no_license | xiaotdl/CodingInterview | cb8fc2b06bf587c83a9683d7b2cb80f5f4fd34ee | 514e25e83b0cc841f873b1cfef3fcc05f30ffeb3 | refs/heads/master | 2022-01-12T05:18:48.825311 | 2022-01-05T19:41:32 | 2022-01-05T19:41:32 | 56,419,795 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 839 | java | package brick_wall;
import java.util.*;
/**
* Created by Xiaotian on 5/5/18.
*/
class Solution {
// tag: hash
// time: O(n), n: number of bricks
// space: O(k), k: sum of bricks
public int leastBricks(List<List<Integer>> wall) {
Map<Integer, Integer> m = new HashMap<>(); // spacePos2cnt
for (List<Integer> bricks : wall) {
int spacePos = 0;
for (int i = 0; i < bricks.size(); i++) { // row of bricks
if (i == bricks.size() - 1) continue;
spacePos += bricks.get(i);
m.put(spacePos, m.getOrDefault(spacePos, 0) + 1);
}
}
int maxSpaceCnt = 0;
for (int spaceCnt : m.values()) {
maxSpaceCnt = Math.max(maxSpaceCnt, spaceCnt);
}
return wall.size() - maxSpaceCnt;
}
}
| [
"xiaotdl@gmail.com"
] | xiaotdl@gmail.com |
4fc876482d6ec07b839c94bc2712c1672e8261a8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_2c97e823710c58bac80e61b11ecbfc8dd3b59813/TristateCheckBox/10_2c97e823710c58bac80e61b11ecbfc8dd3b59813_TristateCheckBox_s.java | 115deb89e5293b72890eb664ee0675a5ca98d04b | [] | 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,927 | java | /*
* @(#)TristateCheckBoxEx.java 5/20/2011
*
* Copyright 2002 - 2011 JIDE Software Inc. All rights reserved.
*/
package com.jidesoft.swing;
import com.jidesoft.plaf.UIDefaultsLookup;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* TristateCheckBox is a check box with three states - selected, unselected and mixed (a.k.a partial selected state).
* Internally it uses a new class called {@link TristateButtonModel} to store the 3rd mixed state information.
* <p/>
* The mixed state uses a different check icon. Instead of a checked sign in the selected state as in a regular check
* box, we use a square sign to indicate the mixed state. On different L&Fs, it might look different. TristateCheckBox
* supports most of the standard L&Fs such as Windows L&F, Metal L&F, Motif L&F, Nimbus L&F, Aqua L&F etc. For most
* L&Fs, we use a new UIDefault "TristateCheckBox.icon" to paint in three different states. However for Aqua L&F, we
* actually leveraged a client property provided by Apple to display the icon for the mixed state (refer to Radar
* #8930094 at http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate4LeopardUpdate9RN/ResolvedIssues/ResolvedIssues.html).
* To make it extensible for other L&Fs who might provide a built-in mixed state for check box, we support two types of
* customizations.
* <pre>
* <ul>
* <li>using client property as Aqua. You can define your own client properties and use UIDefaults to tell us how
* to set it. For example: </li>
* "TristateCheckBox.icon", null,
* "TristateCheckBox.setMixed.clientProperty", new Object[]{"JButton.selectedState", "indeterminate"},
* "TristateCheckBox.clearMixed.clientProperty", new Object[]{"JButton.selectedState", null},
* </ul>using component name. Some Synth-based L&Fs use component name to define style. If so, you can use the
* following two UIDefaults. For example: </li>
* "TristateCheckBox.setMixed.componentName", "HalfSelected",
* "TristateCheckBox.clearMixed.componentName", "",
* </pre>
* The correct listener for state change is ActionListener. It will be fired when the state is changed. The ItemListener
* is only fired when changing from selected state to unselected state or vice versa. Only ActionListener will be fired
* for all three states.
*/
public class TristateCheckBox extends JCheckBox implements ActionListener {
public static final int STATE_UNSELECTED = 0;
public static final int STATE_SELECTED = 1;
public static final int STATE_MIXED = 2;
public TristateCheckBox(String text, Icon icon) {
super(text, icon);
}
public TristateCheckBox(String text) {
this(text, null);
}
public TristateCheckBox() {
this(null);
}
@Override
protected void init(String text, Icon icon) {
model = createButtonModel();
setModel(model);
addActionListener(this);
super.init(text, icon);
}
/**
* Creates the button model. In this case, it is always a TristateButtonModel.
*
* @return TristateButtonModel
*/
protected ButtonModel createButtonModel() {
return new TristateButtonModel();
}
@Override
public void updateUI() {
super.updateUI();
if (isMixed()) {
adjustMixedIcon();
}
else {
restoreMixedIcon();
}
}
protected void adjustMixedIcon() {
setIcon(UIManager.getIcon("TristateCheckBox.icon"));
}
protected void restoreMixedIcon() {
setIcon(null);
}
/**
* Checks if the check box is in mixed selection state.
*
* @return true or false.
*/
public boolean isMixed() {
return getState() == STATE_MIXED;
}
/**
* Sets the check box to mixed selection state.
*
* @param b true or false. True means mixed state. False means unselected state.
*/
public void setMixed(boolean b) {
if (b) {
setState(STATE_MIXED);
}
else {
setState(STATE_UNSELECTED);
}
}
/**
* Gets the selection state. It could be one of the three states as defined - {@link #STATE_SELECTED}, {@link
* #STATE_UNSELECTED} and {@link #STATE_MIXED}.
*
* @return one of the three selection states.
*/
public int getState() {
if (model instanceof TristateButtonModel)
return ((TristateButtonModel) model).getState();
else {
throw new IllegalStateException("TristateButtonModel is required for TristateCheckBox");
}
}
/**
* Sets the selection state. It could be one of the three states as defined - {@link #STATE_SELECTED}, {@link
* #STATE_UNSELECTED} and {@link #STATE_MIXED}.
*
* @param state one of the three selection states.
*/
public void setState(int state) {
if (model instanceof TristateButtonModel) {
int old = ((TristateButtonModel) model).getState();
if (old != state) ((TristateButtonModel) model).setState(state);
stateUpdated(state);
}
else {
throw new IllegalStateException("TristateButtonModel is required for TristateCheckBox");
}
}
@Override
public void actionPerformed(ActionEvent e) {
stateUpdated(getState());
}
/**
* This method is called when the selection state changes.
*
* @param state the new selection state.
*/
protected void stateUpdated(int state) {
if (state == STATE_MIXED) {
adjustMixedIcon();
Object cp = UIDefaultsLookup.get("TristateCheckBox.setMixed.clientProperty");
if (cp != null) {
putClientProperty(((Object[]) cp)[0], ((Object[]) cp)[1]); // for Aqua L&F
}
String name = UIDefaultsLookup.getString("TristateCheckBox.setMixed.componentName");
if (name != null) {
setName(name); // for Synthetica
}
}
else {
restoreMixedIcon();
Object cp = UIDefaultsLookup.get("TristateCheckBox.clearMixed.clientProperty");
if (cp != null) {
putClientProperty(((Object[]) cp)[0], ((Object[]) cp)[1]); // for Aqua L&F
}
String name = UIDefaultsLookup.getString("TristateCheckBox.clearMixed.componentName");
if (name != null) {
setName(name); // for Synthetica
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
f876b20ef16e706ecdfd0a519ddd11b024eaf478 | 677d33925e5f8f677f257695202b28cb0ba96a0b | /src/main/java/ru/wkn/server/model/datasource/dao/DaoTool.java | f651554aaf041755bb70e374aa3fd8115e3a386a | [] | no_license | Vaysman/TimekeepingSystem | 2f7b910ee40cb337617ec98f15e44060dcedfa82 | 9c42ca1c9d12fabbd8839bbcb66f31954166e4f9 | refs/heads/master | 2020-03-14T22:14:07.617519 | 2018-05-02T06:45:28 | 2018-05-02T06:45:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,820 | java | package ru.wkn.server.model.datasource.dao;
import org.hibernate.Query;
import org.hibernate.Session;
import ru.wkn.server.model.datasource.HibernateUtil;
import ru.wkn.server.model.datasource.dao.persistent.PersistentException;
import java.util.ArrayList;
import java.util.List;
class DaoTool<T> {
private Class<T> typeClass;
public DaoTool(Class<T> typeClass) {
this.typeClass = typeClass;
}
private void closeSession(Session session) {
if (session != null && session.isOpen()) {
session.close();
}
}
Object createObject(Object newInstance) throws PersistentException {
Session session = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.save(newInstance);
session.getTransaction().commit();
} catch (Exception e) {
throw new PersistentException("Ошибка при создании: ", e);
} finally {
closeSession(session);
}
return newInstance;
}
T read(Integer id) throws PersistentException {
Session session = null;
T object;
try {
session = HibernateUtil.getSessionFactory().openSession();
object = (T) session.load(typeClass, id);
} catch (Exception e) {
throw new PersistentException("Ошибка при чтении: ", e);
} finally {
closeSession(session);
}
return object;
}
List<T> read(String s1, String s2, Integer id) throws PersistentException {
Session session = null;
List<T> ts;
try {
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
Query query = session.createQuery(s1).setInteger(s2, id);
ts = query.list();
session.getTransaction().commit();
} catch (Exception e) {
throw new PersistentException("Ошибка при чтении: ", e);
} finally {
closeSession(session);
}
return ts;
}
void update(Object transientObject) throws PersistentException {
Session session = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.update(transientObject);
session.getTransaction().commit();
} catch (Exception e) {
throw new PersistentException("Ошибка при обновлении: ", e);
} finally {
closeSession(session);
}
}
void delete(Object persistentObject) throws PersistentException {
Session session = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.delete(persistentObject);
session.getTransaction().commit();
} catch (Exception e) {
throw new PersistentException("Ошибка при удалении: ", e);
} finally {
closeSession(session);
}
}
List<T> getAll() throws PersistentException {
Session session = null;
List<T> ts;
try {
if (HibernateUtil.getSessionFactory() != null) {
session = HibernateUtil.getSessionFactory().openSession();
}
if (session != null) {
ts = session.createCriteria(typeClass).list();
return ts;
}
} catch (Exception e) {
throw new PersistentException("Ошибка при чтении: ", e);
} finally {
closeSession(session);
}
return new ArrayList<>();
}
}
| [
"pickalov.artyom@yandex.ru"
] | pickalov.artyom@yandex.ru |
cfe168b6e633e116dc0299562b733b41c8883263 | a36dce4b6042356475ae2e0f05475bd6aed4391b | /2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/EJSFinderAccumulatorResourceBean.java | 30374198bdc23a2194d6b7aa7eec0d7bac4f8bf8 | [] | no_license | ildar66/WSAD_NRI | b21dbee82de5d119b0a507654d269832f19378bb | 2a352f164c513967acf04d5e74f36167e836054f | refs/heads/master | 2020-12-02T23:59:09.795209 | 2017-07-01T09:25:27 | 2017-07-01T09:25:27 | 95,954,234 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 133 | java | package com.hps.july.persistence;
/**
* EJSFinderAccumulatorResourceBean
*/
public interface EJSFinderAccumulatorResourceBean {
}
| [
"ildar66@inbox.ru"
] | ildar66@inbox.ru |
a57c6d2e94d2d3af1fa0d1f3c5fb7c2713ff2952 | 5a27b5b60efa90ef0979f345adfad51300969726 | /VavLibraryP1/src/main/java/com/vav/cn/gcm/GcmListener.java | d4eb39b466ffd959518756591fef0a10281d33d0 | [] | no_license | imalpasha/v_androidsdk | 306f3a4a50b966d9f9c6a72b4875cad3bcb6d456 | 9a8fd44f1199a06bd5c784d23d6eabdc644366d3 | refs/heads/master | 2021-05-11T01:44:38.742410 | 2018-01-21T13:50:24 | 2018-01-21T13:50:24 | 118,338,714 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 266 | java | package com.vav.cn.gcm;
import android.content.Intent;
/**
* Created by Handrata Samsul on 2/10/2016.
*/
public interface GcmListener {
public abstract void onRegistrationSucceed(Intent intent);
public abstract void onRegistrationError();
}
| [
"imalpasha@gmail.com"
] | imalpasha@gmail.com |
aa0747cada4c4782f0e4f5acf82ab0dd9e726477 | f187903c48deb817386cc91e8c176d106bf79c68 | /components/src/com/google/appinventor/components/runtime/errors/UnknownFileHandleError.java | dd9ca8872ca802c4d44d272d66ec3bd1827cf719 | [] | no_license | deadlyziner/AppInventor | 33bbfe6c8bdd320c70aba214ba05b30a45bc3302 | 92b44b2800e3edb11d5278803403afc8105a6f29 | refs/heads/master | 2020-05-29T13:47:26.830119 | 2013-02-26T16:01:27 | 2013-02-26T16:01:27 | 8,067,496 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 523 | java | // -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the MIT License https://raw.github.com/mit-cml/app-inventor/master/mitlicense.txt
package com.google.appinventor.components.runtime.errors;
import com.google.appinventor.components.annotations.SimpleObject;
/**
* Runtime error indicating an unknown file handle.
*
*/
@SimpleObject
public class UnknownFileHandleError extends RuntimeError {
}
| [
"deadlyziner@gmail.com"
] | deadlyziner@gmail.com |
19b32092f1639808e753c4c189e7ce22838053d7 | f10a7a255151c627eb1953e029de75b215246b4a | /quickfixj-core/src/main/java/quickfix/field/SideMultiLegReportingType.java | 1b2dee4eb93753afee5e8c98dad58bad2e8b39a8 | [
"BSD-2-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | niepoo/quickfixj | 579f57f2e8fb8db906c6f916355da6d78bb86ecb | f8e255c3e86e36d7551b8661c403672e69070ca1 | refs/heads/master | 2021-01-18T05:29:51.369160 | 2016-10-16T23:31:34 | 2016-10-16T23:31:34 | 68,493,032 | 0 | 0 | null | 2016-09-18T03:18:20 | 2016-09-18T03:18:20 | null | UTF-8 | Java | false | false | 1,371 | java | /* Generated Java Source File */
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact ask@quickfixengine.org if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.field;
import quickfix.IntField;
public class SideMultiLegReportingType extends IntField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 752;
public static final int SINGLE_SECURITY = 1;
public static final int INDIVIDUAL_LEG_OF_A_MULTI_LEG_SECURITY = 2;
public static final int MULTI_LEG_SECURITY = 3;
public SideMultiLegReportingType() {
super(752);
}
public SideMultiLegReportingType(int data) {
super(752, data);
}
}
| [
"niepoo123@gmail.com"
] | niepoo123@gmail.com |
6f8e346f98e1af8622f6590fce0d3eed9a7fab50 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/shortvideo/util/C41529al.java | 73777429ad404f790922265a75843dab1ebcfa69 | [] | 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 | 446 | java | package com.p280ss.android.ugc.aweme.shortvideo.util;
import android.content.Context;
import com.p280ss.android.ugc.aweme.base.utils.C6900g;
/* renamed from: com.ss.android.ugc.aweme.shortvideo.util.al */
final class C41529al {
/* renamed from: a */
static boolean m132279a(Context context) {
try {
return C6900g.m21454b().mo16943d();
} catch (Exception unused) {
return false;
}
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
0f119d92405b3ea7d2ad94cef4fc248d468a8ac7 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-81b-3-21-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/linear/EigenDecompositionImpl_ESTest_scaffolding.java | c6fda298ddd07d561226c45c81b4d9826735667e | [] | 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 | 2,535 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 13:17:39 UTC 2020
*/
package org.apache.commons.math.linear;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class EigenDecompositionImpl_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.linear.EigenDecompositionImpl";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EigenDecompositionImpl_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.linear.AnyMatrix",
"org.apache.commons.math.MathRuntimeException",
"org.apache.commons.math.linear.InvalidMatrixException",
"org.apache.commons.math.linear.RealVector",
"org.apache.commons.math.linear.RealMatrix",
"org.apache.commons.math.MathException",
"org.apache.commons.math.MaxIterationsExceededException",
"org.apache.commons.math.linear.EigenDecomposition",
"org.apache.commons.math.linear.EigenDecompositionImpl",
"org.apache.commons.math.linear.DecompositionSolver",
"org.apache.commons.math.ConvergenceException"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a19d6f3f8aba7073ef54ec7d7e9c2cf91fc1b10b | 7570e250953a48bc8455ee96cf580b4596e0ef13 | /hazelcast/src/main/java/com/hazelcast/core/PartitionService.java | 2dc1083a1a01bdb31d4463d85a60550808c5d6fc | [
"Apache-2.0"
] | permissive | cgchamath/hazelcast-3.0.1 | adc3cb1ebbc4330de91efdb2e0083266da7df67d | d3280e3e2f7b7aa481f5e5bb4e3f139433f4d33b | refs/heads/master | 2021-01-01T06:50:28.230445 | 2014-07-11T09:51:55 | 2014-07-11T09:51:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,599 | java | /*
* Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.core;
import java.util.Set;
/**
* PartitionService allows to query {@link Partition}s
* and attach/detach {@link MigrationListener}s to listen partition migration events.
*
* @see Partition
* @see MigrationListener
*/
public interface PartitionService {
/**
* Returns all partitions.
*
* @return all partitions
*/
Set<Partition> getPartitions();
/**
* Returns partition which given key belongs to.
*
* @param key key
* @return partition which given key belongs to
*/
Partition getPartition(Object key);
/**
* @param migrationListener listener
* @return returns registration id.
*/
String addMigrationListener(MigrationListener migrationListener);
/**
* @param registrationId Id of listener registration.
* @return true if registration is removed, false otherwise
*/
boolean removeMigrationListener(final String registrationId);
}
| [
"chamathg@gmail.com"
] | chamathg@gmail.com |
97edd3db9c1c8f9913d6ea03a944ff78de739b75 | ba8f38367c03e5e18432277f8d6b058afee9636a | /src/br/UFSC/GRIMA/application/entities/streams/InterfaceStateType.java | d7f4eedcc2b61a3b3e6206999b07efdccceb2527 | [] | no_license | jucsr/sottosopra | 3e6884bed58c75b5de9a89ecdd59c85721e800f3 | fab40a4195721c3c4b20a35aaa66846745b7e4e3 | refs/heads/master | 2020-03-31T00:14:00.463827 | 2015-12-01T16:47:32 | 2015-12-01T16:47:32 | 41,388,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,217 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// 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: 2014.12.10 at 04:30:05 PM BRST
//
package br.UFSC.GRIMA.application.entities.streams;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* The enable/disabled state of the interface
*
*
* <p>Java class for InterfaceStateType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="InterfaceStateType">
* <simpleContent>
* <restriction base="<urn:mtconnect.org:MTConnectStreams:1.3>EventType">
* </restriction>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InterfaceStateType")
public class InterfaceStateType
extends EventType
{
}
| [
"pilarrmeister@gmail.com"
] | pilarrmeister@gmail.com |
9f0703b4c134bbad88b4abc7d50fbdf1a48fcb7f | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-12798-86-3-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java | 01802b7c63f61a8329bdeeead878c751ed31fbcf | [] | 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 | 459 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 18:43:32 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
773d58f6bebfd58875adafc196966f394c0665c3 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.socialplatform-base/sources/com/oculus/panelapp/messenger/BuildConfig.java | f160d2e0ba410be3bcfd80b271e2006c13f3580f | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 399 | java | package com.oculus.panelapp.messenger;
public final class BuildConfig {
public static final String APPLICATION_ID = "com.oculus.panelapp.messenger";
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1";
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
e07a93041b2e8a01029a84e323e78bad850a3a18 | c82d571091bf9555ef16fd8cd10928a59124e8a8 | /src/main/java/netty/hiya/hello/NettyOio.java | 1df3d33c939036608827a4b5f903b3a4c6ed81cb | [] | no_license | 13802706376/HIYA_CORE_CODES_6ISA_HiyaNettyPro | 55993eeda4a22be3d6acc75504eb60cf32349728 | 65d36097bed54b8dcd1958a0e584e9319138ed59 | refs/heads/master | 2020-04-08T08:35:38.158443 | 2018-11-27T12:14:56 | 2018-11-27T12:14:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,737 | java | package netty.hiya.hello;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.oio.OioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.oio.OioServerSocketChannel;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
public class NettyOio
{
public void server(int port) throws Exception
{
final ByteBuf buf = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer("Hi!\r\n", Charset.forName("UTF-8")));
EventLoopGroup group = new OioEventLoopGroup();
try
{
ServerBootstrap b = new ServerBootstrap(); // 1
b.group(group) // 2
.channel(OioServerSocketChannel.class).localAddress(new InetSocketAddress(port)).childHandler(new ChannelInitializer<SocketChannel>()
{// 3
@Override
public void initChannel(SocketChannel ch) throws Exception
{
ch.pipeline().addLast(new ChannelInboundHandlerAdapter()
{ // 4
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception
{
ctx.writeAndFlush(buf.duplicate()).addListener(ChannelFutureListener.CLOSE);// 5
}
});
}
});
ChannelFuture f = b.bind().sync(); // 6
f.channel().closeFuture().sync();
} finally
{
group.shutdownGracefully().sync(); // 7
}
}
} | [
"caozhijun@caozhijun-book"
] | caozhijun@caozhijun-book |
fd358f1b55a8a22afbdeeab5e5343b3b9e92cdd7 | 7b73756ba240202ea92f8f0c5c51c8343c0efa5f | /classes5/com/tencent/device/qfind/BlePeerInfo.java | a59c72e74de3b37c33f3f0f95ae3ece5c46b72a9 | [] | no_license | meeidol-luo/qooq | 588a4ca6d8ad579b28dec66ec8084399fb0991ef | e723920ac555e99d5325b1d4024552383713c28d | refs/heads/master | 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,001 | java | package com.tencent.device.qfind;
import com.tencent.mobileqq.app.soso.SosoInterface.SosoLbsInfo;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.List;
public class BlePeerInfo
{
public static final String a = "0000feba-0000-1000-8000-00805f9b34fb";
private static int g = 1000000000;
public int a;
public long a;
public SosoInterface.SosoLbsInfo a;
public List a;
public boolean a;
public byte[] a;
public int b;
public long b;
public String b;
public boolean b;
public byte[] b;
public int c;
public String c;
public int d;
public int e;
public int f;
static
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
public BlePeerInfo()
{
g += 1;
this.jdField_c_of_type_Int = g;
}
public static void a(byte[] paramArrayOfByte, BlePeerInfo paramBlePeerInfo)
{
try
{
paramBlePeerInfo.jdField_a_of_type_JavaUtilList = new ArrayList();
paramArrayOfByte = ByteBuffer.wrap(paramArrayOfByte).order(ByteOrder.LITTLE_ENDIAN);
int j;
int i;
if (paramArrayOfByte.remaining() > 2)
{
j = paramArrayOfByte.get();
if (j == 0) {
return;
}
i = j;
switch (paramArrayOfByte.get())
{
}
}
for (;;)
{
paramArrayOfByte.position(j + paramArrayOfByte.position() - 1);
break;
while (i >= 2)
{
paramBlePeerInfo.jdField_a_of_type_JavaUtilList.add(String.format("%08x-0000-1000-8000-00805f9b34fb", new Object[] { Short.valueOf(paramArrayOfByte.getShort()) }));
i = (byte)(i - 2);
}
if (j > 10)
{
if (j > 11) {
paramArrayOfByte.get(new byte[j - 1 - 10]);
}
paramBlePeerInfo.jdField_a_of_type_Int = paramArrayOfByte.getInt();
paramBlePeerInfo.jdField_a_of_type_ArrayOfByte = new byte[6];
paramArrayOfByte.get(paramBlePeerInfo.jdField_a_of_type_ArrayOfByte);
break;
}
paramArrayOfByte.position(j + paramArrayOfByte.position() - 1);
break;
if (j > 2)
{
try
{
if (paramArrayOfByte.getShort() != 513) {
break;
}
paramBlePeerInfo.f = paramArrayOfByte.getShort();
paramBlePeerInfo.e = paramArrayOfByte.getShort();
}
catch (Exception localException) {}
break;
}
paramArrayOfByte.position(j + paramArrayOfByte.position() - 1);
break;
return;
}
return;
}
catch (Throwable paramArrayOfByte) {}
}
public String a()
{
return this.jdField_c_of_type_JavaLangString.replaceAll(":", "") + "0000";
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\tencent\device\qfind\BlePeerInfo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
0ab321d225089d5f51f67e10de16adcd73bcdcac | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /java/java-impl/src/com/intellij/slicer/JavaSliceUsageCellRenderer.java | 7570a05a00991f561927019875553a05f906590c | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Java | false | false | 1,006 | java | /*
* Copyright 2000-2016 JetBrains s.r.o.
*
* 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.intellij.slicer;
import com.intellij.usages.TextChunk;
import org.jetbrains.annotations.NotNull;
class JavaSliceUsageCellRenderer extends SliceUsageCellRendererBase {
@Override
public void customizeCellRendererFor(@NotNull SliceUsage sliceUsage) {
for (TextChunk chunk : sliceUsage.getText()) {
append(chunk.getText(), chunk.getSimpleAttributesIgnoreBackground());
}
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
af65f6df4d99824456618b0036907147e9f30040 | ba3c46da825758dfe85792ce0c66038e6c71ec4a | /vole-modules/vole-ssoclient/src/test/java/com/github/vole/ssoclient/VoleSsoclientApplicationTests.java | 28f6ff3da29b769e1bf6a6ac921339629b55a87f | [
"Apache-2.0"
] | permissive | ScottGlenn2/vole | 0d3f2692480074d117bd1c321979def096b9342e | 30a1124fa0b3526a9d938c020344b964c256e208 | refs/heads/master | 2021-05-17T11:36:47.119134 | 2020-05-04T05:17:11 | 2020-05-04T05:17:11 | 250,758,653 | 0 | 0 | null | 2020-03-28T09:42:01 | 2020-03-28T09:42:01 | null | UTF-8 | Java | false | false | 358 | java | package com.github.vole.ssoclient;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class VoleSsoclientApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"61444803@qq.com"
] | 61444803@qq.com |
7043fee342fb36218d24f6db6c1136f47aed6a35 | 0f1f95e348b389844b916c143bb587aa1c13e476 | /bboss-core-entity/src/org/frameworkset/http/HttpRange.java | a6b9bac9dd3f72bd29296b32bdb7e3a4dd578308 | [
"Apache-2.0"
] | permissive | bbossgroups/bboss | 78f18f641b18ea6dd388a1f2b28e06c4950b07c3 | 586199b68a8275aa59b76af10f408fec03dc93de | refs/heads/master | 2023-08-31T14:48:12.040505 | 2023-08-29T13:05:46 | 2023-08-29T13:05:46 | 2,780,369 | 269 | 151 | null | 2016-04-04T13:25:20 | 2011-11-15T14:01:02 | Java | UTF-8 | Java | false | false | 7,740 | java | package org.frameworkset.http;
import com.frameworkset.util.BaseSimpleStringUtil;
import org.frameworkset.util.Assert;
import org.frameworkset.util.ObjectUtils;
import java.util.*;
public abstract class HttpRange {
private static final String BYTE_RANGE_PREFIX = "bytes=";
/**
* Return the start of the range given the total length of a representation.
*
* @param length
* the length of the representation
* @return the start of this range for the representation
*/
public abstract long getRangeStart(long length);
/**
* Return the end of the range (inclusive) given the total length of a
* representation.
*
* @param length
* the length of the representation
* @return the end of the range for the representation
*/
public abstract long getRangeEnd(long length);
/**
* Create an {@code HttpRange} from the given position to the end.
*
* @param firstBytePos
* the first byte position
* @return a byte range that ranges from {@code firstPos} till the end
* @see <a href="http://tools.ietf.org/html/rfc7233#section-2.1">Byte
* Ranges</a>
*/
public static HttpRange createByteRange(long firstBytePos) {
return new ByteRange(firstBytePos, null);
}
/**
* Create a {@code HttpRange} from the given fist to last position.
*
* @param firstBytePos
* the first byte position
* @param lastBytePos
* the last byte position
* @return a byte range that ranges from {@code firstPos} till
* {@code lastPos}
* @see <a href="http://tools.ietf.org/html/rfc7233#section-2.1">Byte
* Ranges</a>
*/
public static HttpRange createByteRange(long firstBytePos, long lastBytePos) {
return new ByteRange(firstBytePos, lastBytePos);
}
/**
* Create an {@code HttpRange} that ranges over the last given number of
* bytes.
*
* @param suffixLength
* the number of bytes for the range
* @return a byte range that ranges over the last {@code suffixLength}
* number of bytes
* @see <a href="http://tools.ietf.org/html/rfc7233#section-2.1">Byte
* Ranges</a>
*/
public static HttpRange createSuffixRange(long suffixLength) {
return new SuffixByteRange(suffixLength);
}
/**
* Parse the given, comma-separated string into a list of {@code HttpRange}
* objects.
* <p>
* This method can be used to parse an {@code Range} header.
*
* @param ranges
* the string to parse
* @return the list of ranges
* @throws IllegalArgumentException
* if the string cannot be parsed
*/
public static List<HttpRange> parseRanges(String ranges) {
if (!BaseSimpleStringUtil.hasLength(ranges)) {
return Collections.emptyList();
}
if (!ranges.startsWith(BYTE_RANGE_PREFIX)) {
throw new IllegalArgumentException("Range '" + ranges + "' does not start with 'bytes='");
}
ranges = ranges.substring(BYTE_RANGE_PREFIX.length());
String[] tokens = ranges.split(",\\s*");
List<HttpRange> result = new ArrayList<HttpRange>(tokens.length);
for (String token : tokens) {
result.add(parseRange(token));
}
return result;
}
private static HttpRange parseRange(String range) {
Assert.hasLength(range, "Range String must not be empty");
int dashIdx = range.indexOf('-');
if (dashIdx > 0) {
long firstPos = Long.parseLong(range.substring(0, dashIdx));
if (dashIdx < range.length() - 1) {
Long lastPos = Long.parseLong(range.substring(dashIdx + 1, range.length()));
return new ByteRange(firstPos, lastPos);
} else {
return new ByteRange(firstPos, null);
}
} else if (dashIdx == 0) {
long suffixLength = Long.parseLong(range.substring(1));
return new SuffixByteRange(suffixLength);
} else {
throw new IllegalArgumentException("Range '" + range + "' does not contain \"-\"");
}
}
/**
* Return a string representation of the given list of {@code HttpRange}
* objects.
* <p>
* This method can be used to for an {@code Range} header.
*
* @param ranges
* the ranges to create a string of
* @return the string representation
*/
public static String toString(Collection<HttpRange> ranges) {
Assert.notEmpty(ranges, "Ranges Collection must not be empty");
StringBuilder builder = new StringBuilder(BYTE_RANGE_PREFIX);
for (Iterator<HttpRange> iterator = ranges.iterator(); iterator.hasNext();) {
HttpRange range = iterator.next();
builder.append(range);
if (iterator.hasNext()) {
builder.append(", ");
}
}
return builder.toString();
}
/**
* Represents an HTTP/1.1 byte range, with a first and optional last
* position.
*
* @see <a href="http://tools.ietf.org/html/rfc7233#section-2.1">Byte
* Ranges</a>
* @see HttpRange#createByteRange(long)
* @see HttpRange#createByteRange(long, long)
*/
private static class ByteRange extends HttpRange {
private final long firstPos;
private final Long lastPos;
public ByteRange(long firstPos, Long lastPos) {
assertPositions(firstPos, lastPos);
this.firstPos = firstPos;
this.lastPos = lastPos;
}
private void assertPositions(long firstBytePos, Long lastBytePos) {
if (firstBytePos < 0) {
throw new IllegalArgumentException("Invalid first byte position: " + firstBytePos);
}
if (lastBytePos != null && lastBytePos < firstBytePos) {
throw new IllegalArgumentException("firstBytePosition=" + firstBytePos
+ " should be less then or equal to lastBytePosition=" + lastBytePos);
}
}
@Override
public long getRangeStart(long length) {
return this.firstPos;
}
@Override
public long getRangeEnd(long length) {
if (this.lastPos != null && this.lastPos < length) {
return this.lastPos;
} else {
return length - 1;
}
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ByteRange)) {
return false;
}
ByteRange otherRange = (ByteRange) other;
return (this.firstPos == otherRange.firstPos
&& ObjectUtils.nullSafeEquals(this.lastPos, otherRange.lastPos));
}
@Override
public int hashCode() {
return (ObjectUtils.nullSafeHashCode(this.firstPos) * 31 + ObjectUtils.nullSafeHashCode(this.lastPos));
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(this.firstPos);
builder.append('-');
if (this.lastPos != null) {
builder.append(this.lastPos);
}
return builder.toString();
}
}
/**
* Represents an HTTP/1.1 suffix byte range, with a number of suffix bytes.
*
* @see <a href="http://tools.ietf.org/html/rfc7233#section-2.1">Byte
* Ranges</a>
* @see HttpRange#createSuffixRange(long)
*/
private static class SuffixByteRange extends HttpRange {
private final long suffixLength;
public SuffixByteRange(long suffixLength) {
if (suffixLength < 0) {
throw new IllegalArgumentException("Invalid suffix length: " + suffixLength);
}
this.suffixLength = suffixLength;
}
@Override
public long getRangeStart(long length) {
if (this.suffixLength < length) {
return length - this.suffixLength;
} else {
return 0;
}
}
@Override
public long getRangeEnd(long length) {
return length - 1;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SuffixByteRange)) {
return false;
}
SuffixByteRange otherRange = (SuffixByteRange) other;
return (this.suffixLength == otherRange.suffixLength);
}
@Override
public int hashCode() {
return ObjectUtils.hashCode(this.suffixLength);
}
@Override
public String toString() {
return "-" + this.suffixLength;
}
}
}
| [
"yin-bp@163.com"
] | yin-bp@163.com |
8c132f0b7486d21fe734595e83689ca3c3ad770c | 84970532a142ab4b397b9b5ac511565868a8fcad | /Robot/app/src/main/java/com/hrg/robot/Robot.java | 5a331e952b1486e29c18063c45ea486f1810f8f0 | [] | no_license | feelinghappy/job | 822f8bdea8a39630faa14f93763a633e69ccebe7 | c36a64c332971c0dd03ee2aca72655b6a4835f27 | refs/heads/master | 2021-01-23T09:16:49.775093 | 2018-04-04T01:40:00 | 2018-04-04T01:40:00 | 102,575,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,300 | java | package com.hrg.robot;
import android.os.Parcelable;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by liutao on 2017/9/24.
*/
public class Robot implements Parcelable {
private String uid;
private String name;
private String status;//<online/offline> 当前离在线状态, 字符串串
private String type;//<desktop/ground> 机器器⼈人类型,字符串串
private String electricity;//<0~1>当前电量量, 浮点型
private String currentUser;//<uid> 当前正在与机器器⼈人交互的⽤用户, 字符串串
private String monitor;//<true/false>机器器⼈人监控状态, bool值true可被监控, false不不⾏行行
private String fanState;//<high/low/off>⻛风扇状态, 字符串串
private String control;//<command> 控制指令, 字符串串, ⻅见下⾯面说明
private AirBox airBox; //空气盒子
public Robot() {
}
@Override
public String toString() {
return "Robot{" +
"uid='" + uid + '\'' +
", name='" + name + '\'' +
", status='" + status + '\'' +
", type='" + type + '\'' +
", electricity='" + electricity + '\'' +
", currentUser='" + currentUser + '\'' +
", monitor='" + monitor + '\'' +
", fanState='" + fanState + '\'' +
", control='" + control + '\'' +
", airBox=" + airBox +
'}';
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getElectricity() {
return electricity;
}
public void setElectricity(String electricity) {
this.electricity = electricity;
}
public String getMonitor() {
return monitor;
}
public void setMonitor(String monitor) {
this.monitor = monitor;
}
public String getCurrentUser() {
return currentUser;
}
public void setCurrentUser(String currentUser) {
this.currentUser = currentUser;
}
public String getFanState() {
return fanState;
}
public void setFanState(String fanState) {
this.fanState = fanState;
}
public String getControl() {
return control;
}
public void setControl(String control) {
this.control = control;
}
public AirBox getAirBox() {
return airBox;
}
public void setAirBox(AirBox airBox) {
this.airBox = airBox;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.uid);
dest.writeString(this.name);
dest.writeString(this.status);
dest.writeString(this.type);
dest.writeString(this.electricity);
dest.writeString(this.currentUser);
dest.writeString(this.monitor);
dest.writeString(this.fanState);
dest.writeString(this.control);
dest.writeParcelable(this.airBox, flags);
}
protected Robot(Parcel in) {
this.uid = in.readString();
this.name = in.readString();
this.status = in.readString();
this.type = in.readString();
this.electricity = in.readString();
this.currentUser = in.readString();
this.monitor = in.readString();
this.fanState = in.readString();
this.control = in.readString();
this.airBox = in.readParcelable(AirBox.class.getClassLoader());
}
public static final Creator<Robot> CREATOR = new Creator<Robot>() {
@Override
public Robot createFromParcel(Parcel source) {
return new Robot(source);
}
@Override
public Robot[] newArray(int size) {
return new Robot[size];
}
};
}
| [
"15821426810@126.com"
] | 15821426810@126.com |
9ea232bafe7e023350a44e24f6538fa4bac4b4c6 | 5b94a1004c8a7678d355b71bd2daa0970bc4c027 | /src/org/prom5/framework/models/hlprocess/expr/operator/HLMinusOperator.java | c6af061eba3870b6ed0b285982da64c806a6c0c0 | [] | no_license | Ghazibenslama/SMD-master | 2bed3f99810e83dbde492f3ae372d161b3886530 | a7312e8dd367234046ba5fae1c5790ef9f303a8a | refs/heads/master | 2020-05-17T20:06:07.313487 | 2018-07-18T02:33:28 | 2018-07-18T02:33:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,339 | java | /***********************************************************
* This software is part of the ProM package *
* http://www.processmining.org/ *
* *
* Copyright (c) 2003-2007 TU/e Eindhoven *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by Eindhoven University of Technology *
* Department of Information Systems *
* http://is.tm.tue.nl *
* *
**********************************************************/
package org.prom5.framework.models.hlprocess.expr.operator;
import java.util.List;
import javax.swing.tree.DefaultMutableTreeNode;
import org.prom5.framework.models.hlprocess.att.HLNumericValue;
import org.prom5.framework.models.hlprocess.expr.HLExpressionElement;
import org.prom5.framework.models.hlprocess.expr.HLExpressionOperand;
import org.prom5.framework.models.hlprocess.expr.HLExpressionOperator;
import org.prom5.framework.models.hlprocess.expr.operand.HLValueOperand;
/**
* Numeric - operator.
* <p>Requires at least two numeric input operands to be evaluated.
*/
public class HLMinusOperator extends HLExpressionOperator {
/**
* Default constructor.
*/
public HLMinusOperator() {
minNumberInputs = 2;
}
/*
* (non-Javadoc)
* @see org.processmining.framework.models.hlprocess.expr.HLExpressionOperator#evaluateOperands(java.util.List)
*/
protected HLExpressionOperand evaluateOperands(List<HLExpressionOperand> operands) {
// expression tree is ordered: second and following operands will be substracted from the first one
HLExpressionOperand first = operands.remove(0);
int result = 0;
if (first.getValue() instanceof HLNumericValue) {
result = ((HLNumericValue) first.getValue()).getValue();
} else {
// TODO: better raise an exception and write error output
return null;
}
// now substract remaining
for (HLExpressionOperand op : operands) {
if (op.getValue() instanceof HLNumericValue) {
result = result - ((HLNumericValue) op.getValue()).getValue();
} else {
// TODO: better raise an exception and write error output
return null;
}
}
return new HLValueOperand(new HLNumericValue(result));
}
/*
* (non-Javadoc)
* @see org.processmining.framework.models.hlprocess.expr.HLExpressionElement#toString()
*/
public String toString() {
return "-";
}
/*
* (non-Javadoc)
* @see org.processmining.framework.models.hlprocess.expr.HLDataExpressionElement#hasMaxNumberInputs()
*/
public boolean hasMaxNumberInputs() {
return false;
}
/*
* (non-Javadoc)
* @see org.processmining.framework.models.hlprocess.expr.HLExpressionElement#evaluateToString()
*/
public String evaluateToString() {
String result = "";
for (int i=0; i<getExpressionNode().getChildCount(); i++) {
HLExpressionElement childExpr = (HLExpressionElement) ((DefaultMutableTreeNode)
getExpressionNode().getChildAt(i)).getUserObject();
if (result == "") {
result = result + childExpr.evaluateToString();
} else {
result = result + " - " + childExpr.evaluateToString();
}
}
return result;
}
}
| [
"zandrea418@gmail.com"
] | zandrea418@gmail.com |
59652f1dbfc893da118b2c1567b075df1d7a5df6 | cabb1be82ece5b6bfe1df3b368182d2aad61360e | /rx/internal/operators/CompletableOnSubscribeMergeArray.java | 62018061101b3d2a82d3ba404ae53971a56d1fdf | [] | no_license | sooraj2102/nagarro_hack_app | 4f1d7c488c1acf7439081b1c379db044d4f9966b | 3c7de860e75018fea2572ae06b3bdd2f7bf8b907 | refs/heads/master | 2021-07-01T12:56:33.829341 | 2020-10-01T09:56:23 | 2020-10-01T09:56:23 | 148,969,210 | 0 | 3 | null | 2020-10-01T09:56:24 | 2018-09-16T06:18:35 | Java | UTF-8 | Java | false | false | 2,909 | java | package rx.internal.operators;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import rx.Completable;
import rx.Completable.OnSubscribe;
import rx.CompletableSubscriber;
import rx.Subscription;
import rx.plugins.RxJavaHooks;
import rx.subscriptions.CompositeSubscription;
public final class CompletableOnSubscribeMergeArray
implements Completable.OnSubscribe
{
final Completable[] sources;
public CompletableOnSubscribeMergeArray(Completable[] paramArrayOfCompletable)
{
this.sources = paramArrayOfCompletable;
}
public void call(CompletableSubscriber paramCompletableSubscriber)
{
CompositeSubscription localCompositeSubscription = new CompositeSubscription();
AtomicInteger localAtomicInteger = new AtomicInteger(1 + this.sources.length);
AtomicBoolean localAtomicBoolean = new AtomicBoolean();
paramCompletableSubscriber.onSubscribe(localCompositeSubscription);
Completable[] arrayOfCompletable = this.sources;
int i = arrayOfCompletable.length;
int j = 0;
Completable localCompletable;
if (j < i)
{
localCompletable = arrayOfCompletable[j];
if (!localCompositeSubscription.isUnsubscribed());
}
do
{
return;
if (localCompletable == null)
{
localCompositeSubscription.unsubscribe();
NullPointerException localNullPointerException = new NullPointerException("A completable source is null");
if (localAtomicBoolean.compareAndSet(false, true))
{
paramCompletableSubscriber.onError(localNullPointerException);
return;
}
RxJavaHooks.onError(localNullPointerException);
}
localCompletable.unsafeSubscribe(new CompletableSubscriber(localCompositeSubscription, localAtomicBoolean, paramCompletableSubscriber, localAtomicInteger)
{
public void onCompleted()
{
if ((this.val$wip.decrementAndGet() == 0) && (this.val$once.compareAndSet(false, true)))
this.val$s.onCompleted();
}
public void onError(Throwable paramThrowable)
{
this.val$set.unsubscribe();
if (this.val$once.compareAndSet(false, true))
{
this.val$s.onError(paramThrowable);
return;
}
RxJavaHooks.onError(paramThrowable);
}
public void onSubscribe(Subscription paramSubscription)
{
this.val$set.add(paramSubscription);
}
});
j++;
break;
}
while ((localAtomicInteger.decrementAndGet() != 0) || (!localAtomicBoolean.compareAndSet(false, true)));
paramCompletableSubscriber.onCompleted();
}
}
/* Location: /home/satyam/AndroidStudioProjects/app/dex2jar-0.0.9.15/classes-dex2jar.jar
* Qualified Name: rx.internal.operators.CompletableOnSubscribeMergeArray
* JD-Core Version: 0.6.0
*/ | [
"srjshingari@gmail.com"
] | srjshingari@gmail.com |
b1a3f9b595a5d34f255e9e84e7836e66f5ba6246 | 5e2cab8845e635b75f699631e64480225c1cf34d | /modules/core/org.jowidgets.common/src/main/java/org/jowidgets/common/types/EllipsisMode.java | 3753e74f6c2e39fa9f8a4bf7db62719f33db48cf | [
"BSD-3-Clause"
] | permissive | alec-liu/jo-widgets | 2277374f059500dfbdb376333743d5507d3c57f4 | a1dde3daf1d534cb28828795d1b722f83654933a | refs/heads/master | 2022-04-18T02:36:54.239029 | 2018-06-08T13:08:26 | 2018-06-08T13:08:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,093 | java | /*
* Copyright (c) 2015, MGrossmann
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the jo-widgets.org nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL jo-widgets.org BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.jowidgets.common.types;
public enum EllipsisMode {
/**
* The default mode will be used depending on the used spi implementation
*/
DEFAULT,
/**
* No ellipses will be used if text is to long
*/
DISABLED,
/**
* Ellipses will be added at the left side
*/
LEFT,
/**
* Ellipses will be added at the right side
*/
RIGHT,
/**
* Ellipses will be added at the center of the text
*/
CENTER;
}
| [
"herrgrossmann@users.noreply.github.com"
] | herrgrossmann@users.noreply.github.com |
be47f388f116ac60038eb6b8a6e751d18a8f4102 | b62c76ab304eaa5d4cfb1d7cddd13dce4a99e258 | /library/logBack/logback-1.1.3/logback-access/src/main/java/ch/qos/logback/access/filter/StatisticalView.java | ec74716f347afff3bdb49207ec0b0fb34e3154c4 | [
"MIT"
] | permissive | cscfa/bartleby | 9fc069ff2fe1e0023355d8d70897b25e1b5f08a2 | 62a00d8710afc9c698d3336649d8da0fcf79f355 | refs/heads/master | 2021-01-01T19:30:51.933368 | 2015-06-27T23:10:10 | 2015-06-27T23:10:10 | 35,576,368 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 923 | java | /**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* or (per the licensee's choosing)
*
* under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation.
*/
package ch.qos.logback.access.filter;
public interface StatisticalView {
long getTotal();
long getLastMinuteCount();
double getMinuteAverage();
long getLastHoursCount();
double getHourlyAverage();
long getLastDaysCount();
double getDailyAverage();
long getLastWeeksCount();
double getWeeklyAverage();
long getLastMonthsCount();
double getMonthlyAverage();
}
| [
"matthieu.vallance@cscfa.fr"
] | matthieu.vallance@cscfa.fr |
4416a01dc8b673cfbd9bf79a6f3b66f420f1706c | 7b82d70ba5fef677d83879dfeab859d17f4809aa | /tmp/sys/kisso/src/main/java/com/baomidou/kisso/exception/ExpiredTokenException.java | e6567a4cdb6ce4a74529a7f60723b0cc396bb61d | [
"Apache-2.0"
] | permissive | apollowesley/jun_test | fb962a28b6384c4097c7a8087a53878188db2ebc | c7a4600c3f0e1b045280eaf3464b64e908d2f0a2 | refs/heads/main | 2022-12-30T20:47:36.637165 | 2020-10-13T18:10:46 | 2020-10-13T18:10:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,241 | java | /**
* Copyright (c) 2011-2020, hubin (jobob@qq.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <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.baomidou.kisso.exception;
import com.baomidou.kisso.security.token.Token;
/**
* <p>
* SSO Token 失效异常
* </p>
*
* @author hubin
* @since 2017-07-17
*/
public class ExpiredTokenException extends KissoException {
private static final long serialVersionUID = -5959543783324224864L;
private Token token;
public ExpiredTokenException(String msg) {
super(msg);
}
public ExpiredTokenException(Token token, String msg, Throwable t) {
super(msg, t);
this.token = token;
}
public String token() {
return this.token.getToken();
}
}
| [
"wujun728@hotmail.com"
] | wujun728@hotmail.com |
9e0f9eede5ec327971e7349fb06ac4edf8b8d18f | 1b33bb4e143b18de302ccd5f107e3490ea8b31aa | /learn.java/src/main/java/oc/p/_8/_4_FunctionalProgramming/workingWithAdvancedStreamPipelineConcepts/collectingResults/collectors/mapping/Mapping.java | 8671fe5f16b7b29b8b752e0e3f5650740fad58ee | [] | no_license | cip-git/learn | db2e4eb297e36db475c734a89d18e98819bdd07f | b6d97f529ed39f25e17b602c00ebad01d7bc2d38 | refs/heads/master | 2022-12-23T16:39:56.977803 | 2022-12-18T13:57:37 | 2022-12-18T13:57:37 | 97,759,022 | 0 | 1 | null | 2020-10-13T17:06:36 | 2017-07-19T20:37:29 | Java | UTF-8 | Java | false | false | 1,490 | java | package oc.p._8._4_FunctionalProgramming.workingWithAdvancedStreamPipelineConcepts.collectingResults.collectors.mapping;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.stream.Collectors.*;
/**
* static <T,U,A,R> Collector<T,?,R> mapping(Function<? super T,? extends U> mapper, Collector<? super U,A,R> downstream)
* Adapts a Collector accepting elements of type U to one accepting elements of type T by
* applying a mapping function to each input element before accumulation.
*/
class Mapping {
static Stream<String> stream;
static void init() {
stream = Stream.of("lions", "tigers", "bears");
}
static void m() {
init();
final List<String> collect = stream.collect(mapping(String::toUpperCase, toList()));
collect.forEach(System.out::println);
}
static void m2(){
init();
final Map<String, String> collect = stream.collect(mapping(String::toUpperCase, toMap(Function.identity(), String::toLowerCase)));
System.out.println(collect);
}
static void m3(){
init();
final Map<Integer, String> map = stream.collect(mapping(String::toUpperCase, toMap(String::length, Function.identity(), (s, s2) -> s + " " + s2)));
System.out.println(map);
}
public static void main(String[] args) {
// m();
// m2();
m3();
}
}
| [
"ciprian.dorin.tanase@ibm.com"
] | ciprian.dorin.tanase@ibm.com |
1c9fd5fd28cc0759dd4177dc2feab8b3559d7146 | 4c2e8b9d64dce94ec74fa2a4951a926f42db7f7a | /src/by/it/_classwork_/jd01_02/TaskC.java | e4ff51f19d7d96cf91e8acb1918309df86cf6342 | [] | no_license | NorthDragons/JD2021-02-24 | 7ffa5d4fc6d0984563a0af192fc34b921327c52a | 14bc46e536a1352dca08585ed03309e1e11e52e5 | refs/heads/master | 2023-04-01T16:44:33.325159 | 2021-04-23T14:59:25 | 2021-04-23T14:59:25 | 344,739,064 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,501 | java | package by.it._classwork_.jd01_02;
import java.util.Arrays;
import java.util.Scanner;
public class TaskC {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[][] a = step1(n);
System.out.println(Arrays.deepToString(a));
int[][] resultArray = step3(a);
System.out.println(Arrays.deepToString(resultArray));
}
private static int[][] step1(int n) {
int[][] array = new int[n][n];
boolean min;
boolean max;
do {
max = false;
min = false;
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[i].length; j++) {
array[i][j] = -n + (int) (Math.random() * (2 * n + 1));
if (array[i][j] == n) {
max = true;
}
if (array[i][j] == -n) {
min = true;
}
}
}
} while (!max || !min);
return array;
}
private static int[][] step3(int[][] array) {
int max = Integer.MIN_VALUE;
for (int[] row : array) {
for (int element : row) {
if (element > max) {
max = element;
}
}
}
boolean[] delRow = new boolean[array.length];
boolean[] delCol = new boolean[array[0].length];
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[i].length; j++) {
if (array[i][j] == max) {
delRow[i] = true;
delCol[j] = true;
}
}
}
int rows = getCountFalse(delRow);
int cols = getCountFalse(delCol);
int[][] resultArray = new int[rows][cols];
for (int i = 0, ir = 0; i < array.length; i++) {
if (!delRow[i]) {
for (int j = 0, jr = 0; j < array[i].length; j++) {
if (!delCol[j]) {
resultArray[ir][jr++] = array[i][j];
}
}
ir++;
}
}
return resultArray;
}
private static int getCountFalse(boolean[] delRow) {
int count = 0;
for (boolean delete : delRow) {
if (!delete) {
count++;
}
}
return count;
}
}
| [
"akhmelev@gmail.com"
] | akhmelev@gmail.com |
64725fc7c59f8b45b49118056a1f3d08b6d7abbb | 22b1f967750c313d8a2e6fc255fd3bca9f13c290 | /PremiumCN/124_BinaryTreeMaximumPathSum.java | 7683eea1a222b949a73709a95d26a2aa669f1798 | [
"MIT"
] | permissive | robin-qu/Leetcode | 333e997f1779fe41cbd4b0e057631454c1f37d13 | 9178287a7cc8fac7adb0e9bfd8d4771cd151d4a6 | refs/heads/master | 2021-06-24T18:49:25.879307 | 2021-01-21T05:28:20 | 2021-01-21T05:28:20 | 178,751,405 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,220 | java | /**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
* this.left = left;
* this.right = right;
* }
* }
*/
class Solution {
public int maxPathSum(TreeNode root) {
if (root == null) {
return Integer.MIN_VALUE;
}
int leftMax = maxPathSum(root.left);
int rightMax = maxPathSum(root.right);
int leftFromRoot = Math.max(0, maxFromRoot(root.left));
int rightFromRoot = Math.max(0, maxFromRoot(root.right));
int curr = root.val + leftFromRoot + rightFromRoot;
return Math.max(curr, Math.max(leftMax, rightMax));
}
private int maxFromRoot(TreeNode root) {
if (root == null) {
return Integer.MIN_VALUE;
}
int left = Math.max(0, maxFromRoot(root.left));
int right = Math.max(0, maxFromRoot(root.right));
return root.val + Math.max(left, right);
}
} | [
"hongbinqu9@gmail.com"
] | hongbinqu9@gmail.com |
abcd42afb251ca1383211f9935a0799735af6361 | 883b7801d828a0994cae7367a7097000f2d2e06a | /python/experiments/projects/O2-Czech-Republic-proxima-platform/real_error_dataset/1/165/HadoopFileSystem.java | e2e796264598fe04fc30e6c65e04ed89e7143580 | [] | no_license | pombredanne/styler | 9c423917619912789289fe2f8982d9c0b331654b | f3d752d2785c2ab76bacbe5793bd8306ac7961a1 | refs/heads/master | 2023-07-08T05:55:18.284539 | 2020-11-06T05:09:47 | 2020-11-06T05:09:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,436 | java | /**
* Copyright 2017-2020 O2 Czech Republic, a.s.
*
* 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 cz.o2.proxima.direct.hadoop;
import cz.o2.proxima.direct.bulk.FileSystem;
import cz.o2.proxima.direct.bulk.NamingConvention;
import cz.o2.proxima.direct.bulk.Path;
import cz.o2.proxima.util.ExceptionUtils;
import java.net.URI;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.function.Consumer;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.apache.hadoop.fs.LocatedFileStatus;
import org.apache.hadoop.fs.RemoteIterator;
/** A {@link FileSystem} implementation for hadoop. */
class HadoopFileSystem implements FileSystem {
private final HadoopDataAccessor accessor;
private final NamingConvention namingConvention;
private transient org.apache.hadoop.fs.FileSystem fs = null;
HadoopFileSystem(HadoopDataAccessor accessor) {
this(accessor, accessor.getNamingConvention());
}
HadoopFileSystem(HadoopDataAccessor accessor, NamingConvention namingConvention) {
this.accessor = accessor;
this.namingConvention = namingConvention;
}
@Override
public URI getUri() {
return accessor.getUri();
}
@Override
public Stream<Path> list(long minTs, long maxTs) {
RemoteIterator<LocatedFileStatus> iterator =
ExceptionUtils.uncheckedFactory(
() -> fs().listFiles(new org.apache.hadoop.fs.Path(getUri()), true));
Spliterator<LocatedFileStatus> spliterator = asSpliterator(iterator);
return StreamSupport.stream(spliterator, false)
.filter(f -> f.isFile())
.map(f -> f.getPath().toUri().toString().substring(getUri().toString().length()))
.filter(name -> namingConvention.isInRange(name, minTs, maxTs))
.map(name -> HadoopPath.of(this, accessor.getUri() + name, accessor));
}
private Spliterator<LocatedFileStatus> asSpliterator(RemoteIterator<LocatedFileStatus> iterator) {
return new Spliterators.AbstractSpliterator<LocatedFileStatus>(-1, 0) {
@Override
public boolean tryAdvance(Consumer<? super LocatedFileStatus> consumer) {
if (ExceptionUtils.uncheckedFactory(() -> iterator.hasNext())) {
consumer.accept(ExceptionUtils.uncheckedFactory(iterator::next));
return true;
}
return false;
}
};
}
@Override
public Path newPath(long ts) {
String path = getUri() + namingConvention.nameOf(ts);
return HadoopPath.of(this, path, accessor);
}
private org.apache.hadoop.fs.FileSystem fs() {
if (fs == null) {
fs = accessor.getFs();
}
return fs;
}
@Override
public int hashCode() {
return getUri().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof HadoopFileSystem) {
HadoopFileSystem other = (HadoopFileSystem) obj;
return other.getUri().equals(getUri());
}
return false;
}
}
| [
"fer.madeiral@gmail.com"
] | fer.madeiral@gmail.com |
6bb430b571c0dc941dc81111a07bbf311952a219 | 3c73a700a7d89b1028f6b5f907d4d0bbe640bf9a | /android/src/main/kotlin/lib/org/bouncycastle/jce/spec/OpenSSHPrivateKeySpec.java | 6058addb3f0f9c6eb78f637cca1ef350c4e2b687 | [] | no_license | afterlogic/flutter_crypto_stream | 45efd60802261faa28ab6d10c2390a84231cf941 | 9d5684d5a7e63d3a4b2168395d454474b3ca4683 | refs/heads/master | 2022-11-02T02:56:45.066787 | 2021-03-25T17:45:58 | 2021-03-25T17:45:58 | 252,140,910 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,725 | java | package lib.org.bouncycastle.jce.spec;
import java.security.spec.EncodedKeySpec;
import lib.org.bouncycastle.crypto.util.OpenSSHPrivateKeyUtil;
/**
* OpenSSHPrivateKeySpec holds and encoded OpenSSH private key.
* The format of the key can be either ASN.1 or OpenSSH.
*/
public class OpenSSHPrivateKeySpec
extends EncodedKeySpec
{
private final String format;
/**
* Accept an encoded key and determine the format.
* <p>
* The encoded key should be the Base64 decoded blob between the "---BEGIN and ---END" markers.
* This constructor will endeavour to find the OpenSSH format magic value. If it can not then it
* will default to ASN.1. It does not attempt to validate the ASN.1
* <p>
* Example:
* OpenSSHPrivateKeySpec privSpec = new OpenSSHPrivateKeySpec(rawPriv);
* <p>
* KeyFactory kpf = KeyFactory.getInstance("RSA", "BC");
* PrivateKey prk = kpf.generatePrivate(privSpec);
* <p>
* OpenSSHPrivateKeySpec rcPrivateSpec = kpf.getKeySpec(prk, OpenSSHPrivateKeySpec.class);
*
* @param encodedKey The encoded key.
*/
public OpenSSHPrivateKeySpec(byte[] encodedKey)
{
super(encodedKey);
if (encodedKey[0] == 0x30) // DER SEQUENCE
{
format = "ASN.1";
}
else if (encodedKey[0] == 'o')
{
format = "OpenSSH";
}
else
{
throw new IllegalArgumentException("unknown byte encoding");
}
}
/**
* Return the format, either OpenSSH for the OpenSSH propriety format or ASN.1.
*
* @return the format OpenSSH or ASN.1
*/
public String getFormat()
{
return format;
}
}
| [
"princesakenny98@gmail.com"
] | princesakenny98@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.