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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d07929ea58191bf239233f2ccdf97e3811b63a92
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_1483488_1/java/JcChen/QualifiRound2012C.java
|
ebee9314542055f56fb6cee489ad6e9d8edab93e
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,710
|
java
|
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
public class QualifiRound2012C {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
BufferedReader br = new BufferedReader(new FileReader(args[0]));
PrintWriter pw = new PrintWriter(args[1]);
String line = br.readLine();
System.out.println(line);
int T = Integer.valueOf(line.trim());
for (int i=0; i<T; i++)
{
line = br.readLine();
System.out.println(line);
String[] input = line.trim().split(" ");
int A = Integer.valueOf(input[0]);
int B = Integer.valueOf(input[1]);
long result = 0;
for(int j=A; j<=B; j++)
{
int bit = (int)Math.floor(Math.log10(j));
HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
map.put(j, true);
int pair = (j%10)*(int)Math.pow(10, bit)+ j/10;
while(!map.containsKey(pair))
{
if(j>pair)
{
map.put(pair, true);
pair = (pair%10)*(int)Math.pow(10, bit)+ pair/10;
continue;
}
if(A<=pair && pair<=B)
result++;
pair = (pair%10)*(int)Math.pow(10, bit)+ pair/10;
continue;
}
}
pw.println("Case #"+(i+1)+": "+result);
System.out.println("Case #"+(i+1)+": "+result);
}
pw.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
206e773e77db7612fbe5788bab4bdf69191b293e
|
a636258c60406f8db850d695b064836eaf75338b
|
/src-gen/com/redcarpet/epcg/data/EpcgInsurancetype.java
|
223e1b4ba636b17f975f85bcaef23dce95d1a194
|
[] |
no_license
|
Afford-Solutions/openbravo-payroll
|
ed08af5a581fa41455f4e9b233cb182d787d5064
|
026fee4fe79b1f621959670fdd9ae6dec33d263e
|
refs/heads/master
| 2022-03-10T20:43:13.162216
| 2019-11-07T18:31:05
| 2019-11-07T18:31:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,335
|
java
|
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2008-2011 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
*/
package com.redcarpet.epcg.data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.openbravo.base.structure.ActiveEnabled;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.base.structure.OrganizationEnabled;
import org.openbravo.base.structure.Traceable;
import org.openbravo.model.ad.access.User;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.common.enterprise.Organization;
/**
* Entity class for entity Epcg_Insurancetype (stored in table Epcg_Insurancetype).
*
* NOTE: This class should not be instantiated directly. To instantiate this
* class the {@link org.openbravo.base.provider.OBProvider} should be used.
*/
public class EpcgInsurancetype extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
private static final long serialVersionUID = 1L;
public static final String TABLE_NAME = "Epcg_Insurancetype";
public static final String ENTITY_NAME = "Epcg_Insurancetype";
public static final String PROPERTY_ID = "id";
public static final String PROPERTY_CLIENT = "client";
public static final String PROPERTY_ORGANIZATION = "organization";
public static final String PROPERTY_ACTIVE = "active";
public static final String PROPERTY_CREATIONDATE = "creationDate";
public static final String PROPERTY_CREATEDBY = "createdBy";
public static final String PROPERTY_UPDATED = "updated";
public static final String PROPERTY_UPDATEDBY = "updatedBy";
public static final String PROPERTY_SEARCHKEY = "searchKey";
public static final String PROPERTY_COMMERCIALNAME = "commercialName";
public static final String PROPERTY_DESCRIPTION = "description";
public static final String PROPERTY_DEFAULT = "default";
public static final String PROPERTY_EPCGBPINSURANCELIST = "epcgBpinsuranceList";
public static final String PROPERTY_EPCGCOSTENQUIRYLIST = "epcgCostenquiryList";
public EpcgInsurancetype() {
setDefaultValue(PROPERTY_ACTIVE, true);
setDefaultValue(PROPERTY_DEFAULT, false);
setDefaultValue(PROPERTY_EPCGBPINSURANCELIST, new ArrayList<Object>());
setDefaultValue(PROPERTY_EPCGCOSTENQUIRYLIST, new ArrayList<Object>());
}
@Override
public String getEntityName() {
return ENTITY_NAME;
}
public String getId() {
return (String) get(PROPERTY_ID);
}
public void setId(String id) {
set(PROPERTY_ID, id);
}
public Client getClient() {
return (Client) get(PROPERTY_CLIENT);
}
public void setClient(Client client) {
set(PROPERTY_CLIENT, client);
}
public Organization getOrganization() {
return (Organization) get(PROPERTY_ORGANIZATION);
}
public void setOrganization(Organization organization) {
set(PROPERTY_ORGANIZATION, organization);
}
public Boolean isActive() {
return (Boolean) get(PROPERTY_ACTIVE);
}
public void setActive(Boolean active) {
set(PROPERTY_ACTIVE, active);
}
public Date getCreationDate() {
return (Date) get(PROPERTY_CREATIONDATE);
}
public void setCreationDate(Date creationDate) {
set(PROPERTY_CREATIONDATE, creationDate);
}
public User getCreatedBy() {
return (User) get(PROPERTY_CREATEDBY);
}
public void setCreatedBy(User createdBy) {
set(PROPERTY_CREATEDBY, createdBy);
}
public Date getUpdated() {
return (Date) get(PROPERTY_UPDATED);
}
public void setUpdated(Date updated) {
set(PROPERTY_UPDATED, updated);
}
public User getUpdatedBy() {
return (User) get(PROPERTY_UPDATEDBY);
}
public void setUpdatedBy(User updatedBy) {
set(PROPERTY_UPDATEDBY, updatedBy);
}
public String getSearchKey() {
return (String) get(PROPERTY_SEARCHKEY);
}
public void setSearchKey(String searchKey) {
set(PROPERTY_SEARCHKEY, searchKey);
}
public String getCommercialName() {
return (String) get(PROPERTY_COMMERCIALNAME);
}
public void setCommercialName(String commercialName) {
set(PROPERTY_COMMERCIALNAME, commercialName);
}
public String getDescription() {
return (String) get(PROPERTY_DESCRIPTION);
}
public void setDescription(String description) {
set(PROPERTY_DESCRIPTION, description);
}
public Boolean isDefault() {
return (Boolean) get(PROPERTY_DEFAULT);
}
public void setDefault(Boolean deflt) {
set(PROPERTY_DEFAULT, deflt);
}
@SuppressWarnings("unchecked")
public List<Epcg_Bpinsurance> getEpcgBpinsuranceList() {
return (List<Epcg_Bpinsurance>) get(PROPERTY_EPCGBPINSURANCELIST);
}
public void setEpcgBpinsuranceList(List<Epcg_Bpinsurance> epcgBpinsuranceList) {
set(PROPERTY_EPCGBPINSURANCELIST, epcgBpinsuranceList);
}
@SuppressWarnings("unchecked")
public List<EpcgCostenquiry> getEpcgCostenquiryList() {
return (List<EpcgCostenquiry>) get(PROPERTY_EPCGCOSTENQUIRYLIST);
}
public void setEpcgCostenquiryList(List<EpcgCostenquiry> epcgCostenquiryList) {
set(PROPERTY_EPCGCOSTENQUIRYLIST, epcgCostenquiryList);
}
}
|
[
"rcss@ubuntu-server.administrator"
] |
rcss@ubuntu-server.administrator
|
b9078c6786acfad3a4463358e71b9b049188384f
|
4ddaca5dae1ac44ecbb8030734b4cb77cd16becd
|
/CodingNinjas/LanguageTools/ExtractUniqueCharacter.java
|
1f2382c9ea95f4af415529d11aa854defa65d9c5
|
[
"Apache-2.0"
] |
permissive
|
dgr8akki/DS-Algo-Made-Easy-With-Aakash
|
55aad8cb22226322773871df4be2b53d12ec366a
|
ccb6f6323af47858a6647b72fbde79fe81538eb9
|
refs/heads/develop
| 2021-06-28T06:09:06.239674
| 2020-10-27T14:26:08
| 2020-10-27T14:26:08
| 144,481,699
| 9
| 0
|
Apache-2.0
| 2020-10-05T09:13:49
| 2018-08-12T16:14:25
|
Java
|
UTF-8
|
Java
| false
| false
| 507
|
java
|
package CodingNinjas.LanguageTools;
import java.util.Set;
import java.util.HashSet;
class solution {
public static String uniqueChar(String str) {
StringBuilder builder = new StringBuilder();
Set<Character> set = new HashSet<>();
for (int i = 0; i < str.length(); i++) {
char currentCharacter = str.charAt(i);
if (!set.contains(currentCharacter)) {
builder.append(currentCharacter);
set.add(currentCharacter);
}
}
return builder.toString();
}
}
|
[
"pahujaaakash5@gmail.com"
] |
pahujaaakash5@gmail.com
|
3c42422d02a67b85d560400970a78e7950e4c101
|
198b020a82e4c75365c6aec9aa4a4cac53e5aaa8
|
/wlglpt/src/com/cy/common/bo/HyPcHwxxHdqdMx.java
|
688687472a6c767e4577c7148d6e7a0e3f00b2da
|
[] |
no_license
|
kenjs/Java
|
8cc2a6c4a13bddc12f15d62350f3181acccc48ec
|
8cb9c7c93bc0cfa57d77cf3805044e5fe18778f2
|
refs/heads/master
| 2020-12-14T09:46:07.493930
| 2015-08-19T08:11:59
| 2015-08-19T08:11:59
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,945
|
java
|
package com.cy.common.bo;
import java.io.Serializable;
/**
* The persistent class For HY_PC_HWXX_HDQD_MX is created by tools.
* @author HJH
*/
public class HyPcHwxxHdqdMx implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
private String hdqdDjxh; // 回单清单登记序号
private String hdDjxh; // 回单登记序号
private String jszt; // 接收状态(0 初始,1 发送,2 接收,3 退回)
private String fsGsbm; // 发送公司编码
private String jsGsbm; // 接收公司编码
private String dqztbz;
public HyPcHwxxHdqdMx() {
}
//获取回单清单登记序号
public String getHdqdDjxh() {
return this.hdqdDjxh;
}
//设置回单清单登记序号
public void setHdqdDjxh(String hdqdDjxh) {
this.hdqdDjxh=hdqdDjxh;
}
//获取回单登记序号
public String getHdDjxh() {
return this.hdDjxh;
}
//设置回单登记序号
public void setHdDjxh(String hdDjxh) {
this.hdDjxh=hdDjxh;
}
//获取接收状态(0 初始,1 发送,2 接收,3 退回)
public String getJszt() {
return this.jszt;
}
//设置接收状态(0 初始,1 发送,2 接收,3 退回)
public void setJszt(String jszt) {
this.jszt=jszt;
}
//获取发送公司编码
public String getFsGsbm() {
return this.fsGsbm;
}
//设置发送公司编码
public void setFsGsbm(String fsGsbm) {
this.fsGsbm=fsGsbm;
}
//获取接收公司编码
public String getJsGsbm() {
return this.jsGsbm;
}
//设置接收公司编码
public void setJsGsbm(String jsGsbm) {
this.jsGsbm=jsGsbm;
}
public String getDqztbz() {
return dqztbz;
}
public void setDqztbz(String dqztbz) {
this.dqztbz = dqztbz;
}
}
|
[
"haoyongvv@163.com"
] |
haoyongvv@163.com
|
edf31baa894218afbfc9fe515a3ddd25be206b04
|
783323c7d145114267f8f85275eaf44b6395feea
|
/src/main/java/mentortools/student/Student.java
|
3de688c9f481a2c11cb0eb349adc44873f9492b3
|
[] |
no_license
|
n0rb1v/mentor-tools
|
d2c25c8933182be32a94b20f6c377a699be9a5c1
|
b5d374ca381b64b0ad4df07b384b6e4fdef78039
|
refs/heads/master
| 2023-07-10T18:36:38.890913
| 2021-08-08T21:01:16
| 2021-08-08T21:01:16
| 392,838,504
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 817
|
java
|
package mentortools.student;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import mentortools.trainingclass.Registration;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String email;
private String gituser;
private String memo;
@OneToMany(mappedBy = "student_id") //registration
Set<Registration> registrations = new HashSet<>();
public Student(String name, String email, String gituser, String memo) {
this.name = name;
this.email = email;
this.gituser = gituser;
this.memo = memo;
}
}
|
[
"n0rb1v@gmail.com"
] |
n0rb1v@gmail.com
|
bb4b48491286f1356f04088a814bf310d7da3cf6
|
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
|
/src/za/co/mmagon/jwebswing/plugins/jqxwidgets/editor/JQXEditorOptions.java
|
5a4e2e255e9761f51a22dafadf348fba7db98c9f
|
[] |
no_license
|
jsdelivrbot/JWebMP-CompleteFree
|
c229dd405fe44d6c29ab06eedaecb7a733cbb183
|
d5f020a19165418eb21507204743e596bee2c011
|
refs/heads/master
| 2020-04-10T15:12:35.635284
| 2018-12-10T01:03:58
| 2018-12-10T01:03:58
| 161,101,028
| 0
| 0
| null | 2018-12-10T01:45:25
| 2018-12-10T01:45:25
| null |
UTF-8
|
Java
| false
| false
| 3,557
|
java
|
/*
* Copyright (C) 2017 Marc Magon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* 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 za.co.mmagon.jwebswing.plugins.jqxwidgets.editor;
import za.co.mmagon.jwebswing.plugins.jqxwidgets.JQXDefaultJavaScriptPart;
import za.co.mmagon.jwebswing.htmlbuilder.javascript.JavascriptFunction;
/**
* All the options for the JQXEditor library
* <p>
* @author GedMarc
* @since Mar 4, 2015
* @version 1.0
* <p>
* <p>
*/
public class JQXEditorOptions extends JQXDefaultJavaScriptPart
{
private JavascriptFunction createCommand;// Function null
private Boolean disabled;// Boolean false
private Boolean editable;// Boolean true
private String lineBreak;// String "default"
//private localization Object { "bold": "Bold", "italic": "Italic", "underline": "Underline", "format": "Format Block", "font": "Font Name", "size": "Font Size", "color": "Text Color", "background": "Fill Color", "left": "Align Left", "center": "Align Center", "right": "Align Right", "outdent": "Indent Less", "indent": "Indent More", "ul": "Insert unordered list", "ol": "Insert ordered list", "image": "Insert image", "link": "Insert link", "html": "View source", "clean": "Remove Formatting" }
private String pasteMode;// String "html"
private Boolean rtl;// Boolean false
//stylesheets Array []
private String toolbarPosition;// String "top"
private String tools;// String "bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html"
public JQXEditorOptions()
{
}
public JavascriptFunction getCreateCommand()
{
return createCommand;
}
public void setCreateCommand(JavascriptFunction createCommand)
{
this.createCommand = createCommand;
}
public Boolean getDisabled()
{
return disabled;
}
public void setDisabled(Boolean disabled)
{
this.disabled = disabled;
}
public Boolean getEditable()
{
return editable;
}
public void setEditable(Boolean editable)
{
this.editable = editable;
}
public String getLineBreak()
{
return lineBreak;
}
public void setLineBreak(String lineBreak)
{
this.lineBreak = lineBreak;
}
public String getPasteMode()
{
return pasteMode;
}
public void setPasteMode(String pasteMode)
{
this.pasteMode = pasteMode;
}
public Boolean getRtl()
{
return rtl;
}
public void setRtl(Boolean rtl)
{
this.rtl = rtl;
}
public String getToolbarPosition()
{
return toolbarPosition;
}
public void setToolbarPosition(String toolbarPosition)
{
this.toolbarPosition = toolbarPosition;
}
public String getTools()
{
return tools;
}
public void setTools(String tools)
{
this.tools = tools;
}
}
|
[
"ged_marc@hotmail.com"
] |
ged_marc@hotmail.com
|
cfe01c157e5bf533fd31d7848b58539067e59b70
|
866f02270d0b2c91194b2ca037e4fd41cf897ab4
|
/Tests/src/main/java/com/tle/webtests/pageobject/generic/component/SelectCourseDialog.java
|
c297a89806a2d5d3584b4037f1893155efadadec
|
[] |
no_license
|
cbeach47/equella-autotests
|
3ebe82ab984240431bd22ef50530960235a8e001
|
f5698103e681a08cd5f5cfab15af04c89404f2dd
|
refs/heads/master
| 2021-01-21T23:21:05.328860
| 2017-06-22T04:48:58
| 2017-06-22T04:49:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,132
|
java
|
package com.tle.webtests.pageobject.generic.component;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedCondition;
import com.tle.webtests.framework.PageContext;
import com.tle.webtests.pageobject.AbstractPage;
import com.tle.webtests.pageobject.WaitingPageObject;
public class SelectCourseDialog extends AbstractPage<SelectCourseDialog>
{
private final String baseId;
@FindBy(id = "{baseid}_q")
private WebElement queryField;
@FindBy(id = "{baseid}_s")
private WebElement searchButton;
@FindBy(id = "{baseid}_ok")
private WebElement okButton;
@FindBy(id = "{baseid}_close")
private WebElement closeButton;
@FindBy(id = "results")
private WebElement resultsDiv;
@FindBy(className = "resultlist")
private WebElement resultsList;
public SelectCourseDialog(PageContext context, String baseId)
{
super(context);
this.baseId = baseId;
}
public String getBaseid()
{
return baseId;
}
@Override
protected void checkLoadedElement()
{
ensureVisible(queryField, searchButton, okButton);
}
public SelectCourseDialog search(String query)
{
queryField.clear();
queryField.sendKeys(query);
WaitingPageObject<SelectCourseDialog> ajaxUpdateExpect = ajaxUpdateExpect(resultsDiv, resultsList);
searchButton.click();
ajaxUpdateExpect.get();
waitForElement(By.xpath("id('" + baseId + "')//div[@id='results']//ul/li"));
return get();
}
public boolean searchWithoutMatch(String query)
{
queryField.clear();
queryField.sendKeys(query);
WaitingPageObject<SelectCourseDialog> ajaxUpdateExpect = ajaxUpdateExpect(resultsDiv, resultsList);
searchButton.click();
ajaxUpdateExpect.get();
waitForElement(By.xpath("id('" + baseId + "')//div[@id='results']//h4[text()]"));
String text = driver.findElement(By.xpath("id('" + baseId + "')//div[@id='results']//h4[text()]")).getText();
if( text.equals("Your search did not match any courses.") )
{
return true;
}
return false;
}
public boolean containsCourse(String course)
{
return !driver.findElements(getByForCourse(course)).isEmpty();
}
public SelectCourseDialog select(String course)
{
driver.findElement(getByForCourse(course)).click();
return get();
}
private By getByForCourse(String course)
{
String xpath = "//ul[@id =\"" + baseId + "_c\"]/li/label[text() = " + quoteXPath(course) + "]/../input";
return By.xpath(xpath);
}
public <T extends AbstractPage<T>> T searchSelectAndFinish(String course, WaitingPageObject<T> page)
{
search(course);
return selectAndFinish(course, page);
}
public <T extends AbstractPage<T>> T selectAndFinish(String course, WaitingPageObject<T> page)
{
select(course);
return finish(page);
}
public <T extends AbstractPage<T>> T finish(WaitingPageObject<T> page)
{
okButton.click();
return page.get();
}
public <T extends AbstractPage<T>> T cancel(WaitingPageObject<T> page)
{
ExpectedCondition<Boolean> removalCondition = removalCondition(closeButton);
closeButton.click();
waiter.until(removalCondition);
return page.get();
}
}
|
[
"doolse@gmail.com"
] |
doolse@gmail.com
|
2abf3f7ee6a354fe5edcdf6f47c21ddaa644fdc2
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/branches/dev5888/code/base/dso-common/src/com/tc/net/protocol/tcm/TCMessageRouter.java
|
03da7d6c0c8544e9202a583004075e45731c2f09
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 568
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tc.net.protocol.tcm;
import com.tc.async.api.Sink;
/**
* Interface for TC message routers
*
* @author steve
*/
public interface TCMessageRouter extends TCMessageSink {
public void routeMessageType(TCMessageType protocol, TCMessageSink sink);
public void routeMessageType(TCMessageType protocol, Sink destSink, Sink hydrateSink);
public void unrouteMessageType(TCMessageType protocol);
}
|
[
"teck@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
teck@7fc7bbf3-cf45-46d4-be06-341739edd864
|
56837ff2b48089b98bd8eacce00964ddd614cf86
|
379392993a89ede4a49b38a1f0e57dacbe17ec7d
|
/com/google/android/gms/tasks/TaskCompletionSource.java
|
963bf92a7f45798cb2169001d6b146e37f86c09d
|
[] |
no_license
|
mdali602/DTC
|
d5c6463d4cf67877dbba43e7d50a112410dccda3
|
5a91a20a0fe92d010d5ee7084470fdf8af5dafb5
|
refs/heads/master
| 2021-05-12T02:06:40.493406
| 2018-01-15T18:06:00
| 2018-01-15T18:06:00
| 117,578,063
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
package com.google.android.gms.tasks;
import android.support.annotation.NonNull;
public class TaskCompletionSource<TResult> {
private final zzh<TResult> zzbNG = new zzh();
@NonNull
public Task<TResult> getTask() {
return this.zzbNG;
}
public void setException(@NonNull Exception exception) {
this.zzbNG.setException(exception);
}
public void setResult(TResult tResult) {
this.zzbNG.setResult(tResult);
}
public boolean trySetException(@NonNull Exception exception) {
return this.zzbNG.trySetException(exception);
}
public boolean trySetResult(TResult tResult) {
return this.zzbNG.trySetResult(tResult);
}
}
|
[
"mohd.ali@xotiv.com"
] |
mohd.ali@xotiv.com
|
f7741d2077558c2dd872d2d49908ff01a24fcc94
|
a26c21ca703394b54053fd8c52876c7550480194
|
/addOns/soap/src/test/java/org/zaproxy/zap/extension/soap/WSDLCustomParserTestCase.java
|
8758c554dbce2242658e3660e81c24aa7be7638b
|
[
"Apache-2.0"
] |
permissive
|
Luiggy/zap-extensions
|
5a360a39b4b81e7f788d73e88a07d5d4120de8cc
|
ae79e2fe44d729d129dfabed5035599e5d870c05
|
refs/heads/master
| 2020-07-20T13:41:47.200916
| 2019-09-05T15:08:50
| 2019-09-05T15:08:50
| 206,651,585
| 1
| 0
|
Apache-2.0
| 2019-09-05T20:27:05
| 2019-09-05T20:27:05
| null |
UTF-8
|
Java
| false
| false
| 3,079
|
java
|
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2014 The ZAP Development Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.zaproxy.zap.extension.soap;
import static org.junit.Assert.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import org.parosproxy.paros.network.HttpMessage;
import org.zaproxy.zap.testutils.TestUtils;
public class WSDLCustomParserTestCase extends TestUtils {
private String wsdlContent;
private WSDLCustomParser parser;
@Before
public void setUp() throws Exception {
/* Simple log configuration to prevent Log4j malfunction. */
BasicConfigurator.configure();
Logger rootLogger = Logger.getRootLogger();
rootLogger.setLevel(Level.OFF);
/* Gets test wsdl file and retrieves its content as String. */
Path wsdlPath = getResourcePath("resources/test.wsdl");
wsdlContent = new String(Files.readAllBytes(wsdlPath), StandardCharsets.UTF_8);
parser = new WSDLCustomParser();
}
@Test
public void parseWSDLContentTest() {
/* Positive case. Checks the method's return value. */
boolean result = parser.extContentWSDLImport(wsdlContent, false);
assertTrue(result);
/* Negative cases. */
result = parser.extContentWSDLImport("", false); // Empty content.
assertFalse(result);
result = parser.extContentWSDLImport("asdf", false); // Non-empty invalid content.
assertFalse(result);
}
@Test
public void canBeWSDLparsedTest() {
/* Positive case. */
boolean result = parser.canBeWSDLparsed(wsdlContent);
assertTrue(result);
/* Negative cases. */
result = parser.canBeWSDLparsed(""); // Empty content.
assertFalse(result);
result = parser.canBeWSDLparsed("asdf"); // Non-empty invalid content.
assertFalse(result);
}
@Test
public void createSoapRequestTest() {
parser.extContentWSDLImport(wsdlContent, false);
/* Positive case. */
HttpMessage result = parser.createSoapRequest(parser.getLastConfig());
assertNotNull(result);
/* Negative case. */
result = parser.createSoapRequest(new SOAPMsgConfig());
assertNull(result);
}
}
|
[
"thc202@gmail.com"
] |
thc202@gmail.com
|
c835e88c1bf34c75e1d59c9d4d9d8eb0f23bd9ac
|
d30dc6778f64c26981b2fd53e47ef36a6b71ec3a
|
/src/main/java/org/web3j/methods/request/EthCall.java
|
f64057ef0abc921513eccde5dcd92ad7ddbfa43e
|
[
"MIT"
] |
permissive
|
gitter-badger/web3j
|
6e212f2ac4e5094f1561b9391fa2809b4dc22d7a
|
8c1590c7183f02ab65cd97751e4182db89e80307
|
refs/heads/master
| 2021-01-18T16:40:45.325649
| 2016-09-15T02:15:43
| 2016-09-15T02:15:43
| 68,261,007
| 0
| 0
| null | 2016-09-15T02:36:24
| 2016-09-15T02:36:24
| null |
UTF-8
|
Java
| false
| false
| 1,585
|
java
|
package org.web3j.methods.request;
import java.math.BigInteger;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.web3j.protocol.utils.Codec;
/**
* eth_sendTransaction object
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EthCall {
private String fromAddress;
private String toAddress;
private BigInteger gas;
private BigInteger gasPrice;
private BigInteger value;
private String data;
public EthCall(String fromAddress, String data) {
this.fromAddress = fromAddress;
this.data = data;
}
public EthCall(String fromAddress, String toAddress,
BigInteger gas, BigInteger gasPrice,
BigInteger value, String data) {
this.fromAddress = fromAddress;
this.toAddress = toAddress;
this.gas = gas;
this.gasPrice = gasPrice;
this.value = value;
this.data = data;
}
public String getFromAddress() {
return fromAddress;
}
public String getToAddress() {
return toAddress;
}
public String getGas() {
return convert(gas);
}
public String getGasPrice() {
return convert(gasPrice);
}
public String getValue() {
return convert(value);
}
public String getData() {
return data;
}
private static String convert(BigInteger value) {
if (value != null) {
return Codec.encodeQuantity(value);
} else {
return null; // we don't want the field to be encoded if not present
}
}
}
|
[
"conor10@gmail.com"
] |
conor10@gmail.com
|
d312dbd9520c44b19be8666b0664c14f2e443150
|
a01eaed695583aad70bd7e1da1af0ec736c7bf22
|
/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/level3/RadialPacket.java
|
b0c4016edda7155930011d55bdfe4faf16b912a0
|
[] |
no_license
|
SeanTheGuyThatAlwaysHasComputerTrouble/awips2
|
600d3e6f7ea1b488471e387c642d54cb6eebca1a
|
c8f8c20ca34e41ac23ad8e757130e91c77b558fe
|
refs/heads/master
| 2021-01-19T18:00:12.598133
| 2013-03-26T17:06:45
| 2013-03-26T17:06:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,282
|
java
|
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.radar.level3;
import java.io.DataInputStream;
import java.io.IOException;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
/**
* RadialPacket is a class that will allow access to the actual radar data
* contained in a radial product.
*
* @author randerso
* @version 1.0
*/
public class RadialPacket extends SymbologyPacket {
private final static IUFStatusHandler handler = UFStatus
.getHandler(RadialPacket.class);
public static final int RADIAL_DATA_PACKET_4BIT = 0xAF1F;
static {
PacketFactory.registerPacketType(RadialPacket.class,
RADIAL_DATA_PACKET_4BIT);
}
protected int firstBinIndex;
protected int numBins;
protected int theICenter;
protected int theJCenter;
protected double scaleFactor;
protected int numRadials;
protected byte[] radialData;
protected float[] angleData;
/**
* Construct takes a byte array containing a radial symbology layer.
*
*/
public RadialPacket(int packetId, DataInputStream in) throws IOException {
super(packetId, in);
}
/**
* Returns the number of range bins in each radial
*
* @return An int which will be from 1 to 460
*/
public int getNumBins() {
return numBins;
}
/**
* Returns the I coordinate of the center of sweep
*
* @return An int which will be from -2048 to 2048
*/
public int getICenter() {
return theICenter;
}
/**
* Returns the J coordinate of the center of sweep
*
* @return An int which will be from -2048 to 2048
*/
public int getJCenter() {
return theJCenter;
}
/**
* Returns the total number of radials in the product.
*
* @return An int which will be from 1 to 400
*/
public int getNumRadials() {
return numRadials;
}
/**
* Returns the number of pixels per range bin.
*
* @return A double from .001 to 8.000
*/
public double getScaleFactor() {
return scaleFactor;
}
/**
* Parses the radial header
*/
@Override
protected void init(DataInputStream in) throws IOException {
firstBinIndex = in.readUnsignedShort();
numBins = in.readUnsignedShort();
theICenter = in.readUnsignedShort();
theJCenter = in.readUnsignedShort();
scaleFactor = in.readUnsignedShort() * 0.001;
numRadials = in.readUnsignedShort();
radialData = new byte[numRadials * numBins];
angleData = new float[numRadials];
readRadialData(in);
}
/**
* @param in
* @throws IOException
*/
protected void readRadialData(DataInputStream in) throws IOException {
for (int radial = 0; radial < numRadials; radial++) {
int remainingBytes = in.readUnsignedShort() * 2;
angleData[radial] = (in.readUnsignedShort() * 0.1f) % 360.0f;
in.skip(2); // radial angle delta not used
int bin = 0;
for (int b = 0; b < remainingBytes; b++) {
byte dataByte = in.readByte();
int runLength = 0x0F & (dataByte >> 4);
byte value = (byte) (0x0F & dataByte);
for (int i = 0; i < runLength; ++i) {
setRadialDataValue(radial, bin++, value);
}
}
}
}
/**
* @param radial
* @param bin
* @param value
*/
protected void setRadialDataValue(int radial, int bin, byte value) {
if ((radial < numRadials) && (bin < numBins)) {
radialData[radial * numBins + bin] = value;
} else {
handler.handle(Priority.WARN, "Index out of range. Radial: "
+ radial + " Bin: " + bin
+ ". Excess data will be discarded.");
}
}
@Override
public String toString() {
String s = super.toString() + " Radial Data";
s += "\n\t\tNum Radials: " + numRadials;
s += "\n\t\tNum Bins: " + numBins;
return s;
}
public byte[] getRadialData() {
return radialData;
}
public float[] getAngleData() {
return angleData;
}
/**
* @return the firstBinIndex
*/
public int getFirstBinIndex() {
return firstBinIndex;
}
}
|
[
"root@lightning.(none)"
] |
root@lightning.(none)
|
4c9e0ef8bcd8913d5ee6522ff36951a833eaad04
|
dd08849a71940a7cb921dc383e12606e210def97
|
/src/hackerearth/examples/HaaaaveYouMetTed.java
|
e63a0e8db82bc2b400c8947695ca32f787ca3a99
|
[] |
no_license
|
brhmshrnv/Solutions
|
e3581cf1fc5ac7c391b3f62ef087b55c195ad345
|
0d3a6124030bbe2a2c5b653fc957eba19b631978
|
refs/heads/master
| 2022-12-17T22:52:19.455791
| 2020-09-26T11:15:52
| 2020-09-26T11:15:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 678
|
java
|
package hackerearth.examples;
import java.util.Scanner;
public class HaaaaveYouMetTed {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int testCases = in.nextInt();
for (int t = 1; t <= testCases; t++) {
int nos = in.nextInt();
long min = Long.MAX_VALUE;
for (int i = 1; i <= nos; i++) {
int hammingCode = NumberOfSetBits(in.nextInt());
if (hammingCode < min) {
min = hammingCode;
}
}
System.out.println(min);
}
}
static int NumberOfSetBits(int i) {
i = i - ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;
}
}
|
[
"Gurpreet-makkar"
] |
Gurpreet-makkar
|
28c48696044c3c2962b4a0de44c9ca61cfc5685b
|
5595a28469b05145089cba6f7babe7a342c3407c
|
/user/src/main/java/org/tessell/widgets/StubWidgetsProvider.java
|
bd4086b7bde314ba95ac3d30641a9cfed169ba84
|
[
"Apache-2.0"
] |
permissive
|
stephenh/tessell
|
c8078e92e0e8738a842e7edb51f7a88366458a28
|
27e03c18b5f271fcdb12984f9a7dfbc4a26b912f
|
refs/heads/master
| 2021-10-30T08:02:13.928182
| 2016-08-03T13:09:58
| 2016-08-03T13:09:58
| 766,240
| 18
| 11
|
NOASSERTION
| 2021-08-17T15:16:43
| 2010-07-09T16:23:28
|
Java
|
UTF-8
|
Java
| false
| false
| 6,261
|
java
|
package org.tessell.widgets;
import org.tessell.gwt.animation.client.AnimationLogic;
import org.tessell.gwt.animation.client.IsAnimation;
import org.tessell.gwt.animation.client.StubAnimation;
import org.tessell.gwt.animation.client.StubAnimations;
import org.tessell.gwt.dom.client.IsElement;
import org.tessell.gwt.dom.client.StubElement;
import org.tessell.gwt.user.client.*;
import org.tessell.gwt.user.client.ui.*;
import org.tessell.place.history.IsHistory;
import org.tessell.place.history.StubHistory;
import org.tessell.widgets.cellview.IsCellList;
import org.tessell.widgets.cellview.IsCellTable;
import org.tessell.widgets.cellview.StubCellList;
import org.tessell.widgets.cellview.StubCellTable;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.cellview.client.CellTable.Resources;
import com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay;
import com.google.gwt.user.client.ui.SuggestOracle;
/** A Widget factory. */
public class StubWidgetsProvider implements WidgetsProvider {
public static void install() {
Widgets.setProvider(new StubWidgetsProvider());
}
private final StubWindow window = new StubWindow();
private final StubCookies cookies = new StubCookies();
private final StubHistory history = new StubHistory();
private final StubAbsolutePanel root = new StubAbsolutePanel();
@Override
public IsTimer newTimer(Runnable runnable) {
return new StubTimer(runnable);
}
@Override
public IsAnimation newAnimation(AnimationLogic logic) {
StubAnimation a = new StubAnimation(logic);
StubAnimations.captureIfNeeded(a);
return a;
}
@Override
public IsWindow getWindow() {
return window;
}
@Override
public IsElement newElement(String tag) {
return new StubElement();
}
@Override
public IsTextArea newTextArea() {
return new StubTextArea();
}
@Override
public IsTextBox newTextBox() {
return new StubTextBox();
}
@Override
public IsTextList newTextList() {
return new StubTextList();
}
@Override
public IsAnchor newAnchor() {
return new StubAnchor();
}
@Override
public IsHyperlink newHyperline() {
return new StubHyperlink();
}
@Override
public IsInlineHyperlink newInlineHyperlink() {
return new StubInlineHyperlink();
}
@Override
public IsInlineLabel newInlineLabel() {
return new StubInlineLabel();
}
@Override
public IsImage newImage() {
return new StubImage();
}
@Override
public IsFlowPanel newFlowPanel() {
return new StubFlowPanel();
}
@Override
public IsScrollPanel newScrollPanel() {
return new StubScrollPanel();
}
@Override
public IsTabLayoutPanel newTabLayoutPanel(double barHeight, Unit barUnit) {
return new StubTabLayoutPanel();
}
@Override
public IsFadingDialogBox newFadingDialogBox() {
return new StubFadingDialogBox();
}
@Override
public IsHTML newHTML() {
return new StubHTML();
}
@Override
public IsHTMLPanel newHTMLPanel(String html) {
return new StubHTMLPanel(html);
}
@Override
public IsHTMLPanel newHTMLPanel(String tag, String html) {
return new StubHTMLPanel(tag, html);
}
@Override
public <T> IsCellTable<T> newCellTable() {
return new StubCellTable<T>();
}
@Override
public <T> IsCellTable<T> newCellTable(int pageSize, Resources resources) {
return new StubCellTable<T>(pageSize);
}
@Override
public <T> IsCellList<T> newCellList(Cell<T> cell) {
return new StubCellList<T>(cell);
}
@Override
public IsCheckBox newCheckBox() {
return new StubCheckBox();
}
@Override
public IsPasswordTextBox newPasswordTextBox() {
return new StubPasswordTextBox();
}
@Override
public IsPopupPanel newPopupPanel() {
return new StubPopupPanel();
}
@Override
public IsFocusPanel newFocusPanel() {
return new StubFocusPanel();
}
@Override
public IsLabel newLabel() {
return new StubLabel();
}
@Override
public IsCookies getCookies() {
return cookies;
}
@Override
public IsHistory getHistory() {
return history;
}
@Override
public IsAbsolutePanel newAbsolutePanel() {
return new StubAbsolutePanel();
}
@Override
public IsAbsolutePanel getRootPanel() {
return root;
}
@Override
public IsInlineHTML newInlineHTML() {
return new StubInlineHTML();
}
@Override
public IsButton newButton() {
return new StubButton();
}
@Override
public IsSuggestBox newSuggestBox(SuggestOracle oracle) {
return new StubSuggestBox(oracle);
}
@Override
public IsSuggestBox newSuggestBox(SuggestOracle oracle, IsTextBoxBase box) {
return new StubSuggestBox(oracle);
}
@Override
public IsSuggestBox newSuggestBox(SuggestOracle oracle, IsTextBoxBase box, SuggestionDisplay display) {
return new StubSuggestBox(oracle, display);
}
@Override
public IsDockLayoutPanel newDockLayoutPanel(Unit unit) {
return new StubDockLayoutPanel();
}
@Override
public IsSimplePanel newSimplePanel() {
return new StubSimplePanel();
}
@Override
public IsListBox newListBox() {
return new StubListBox();
}
@Override
public <T> IsDataGrid<T> newDataGrid() {
return new StubDataGrid<T>();
}
@Override
public <T> IsDataGrid<T> newDataGrid(int pageSize, com.google.gwt.user.cellview.client.DataGrid.Resources resources) {
return new StubDataGrid<T>(pageSize);
}
@Override
public IsResizeLayoutPanel newResizeLayoutPanel() {
return new StubResizeLayoutPanel();
}
@Override
public IsSimpleCheckBox newSimpleCheckBox() {
return new StubSimpleCheckBox();
}
@Override
public IsRadioButton newRadioButton(String name) {
return new StubRadioButton();
}
@Override
public IsSimpleRadioButton newSimpleRadioButton(String name) {
return new StubSimpleRadioButton();
}
@Override
public IsElementWidget newElementWidget(String tag) {
return new StubElementWidget(new StubElement());
}
@Override
public IsElementWidget newElementWidget(IsElement element) {
return new StubElementWidget((StubElement) element);
}
@Override
public IsFrame newFrame() {
return new StubFrame();
}
}
|
[
"stephen@exigencecorp.com"
] |
stephen@exigencecorp.com
|
19731dd0b9f07196f36f36dcf5993e8dc0c5ad21
|
bace31aab2aa164a0249c271f7cf7ba9a1503d04
|
/app/src/main/java/com/tiendas3b/almacen/dto/receipt/FhojaReciboDetTempDTO.java
|
387603de5993cc33a847df832105669c9691b532
|
[] |
no_license
|
opelayoa/Project
|
a8fab2a6f759f076fd52989e8917f2c02915096b
|
43788f12e3c7ea39a8bab8e35e85b74ff6c9f9fa
|
refs/heads/master
| 2020-04-10T07:33:17.768276
| 2019-01-04T22:02:31
| 2019-01-04T22:02:31
| 160,883,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 833
|
java
|
package com.tiendas3b.almacen.dto.receipt;
public class FhojaReciboDetTempDTO {
private int num_pallets;
private int cantidad_em;
private int iclave;
public FhojaReciboDetTempDTO(int num_pallets, int cantidad_em, int iclave) {
this.num_pallets = num_pallets;
this.cantidad_em = cantidad_em;
this.iclave = iclave;
}
public int getNum_pallets() {
return num_pallets;
}
public void setNum_pallets(int num_pallets) {
this.num_pallets = num_pallets;
}
public int getCantidad_em() {
return cantidad_em;
}
public void setCantidad_em(int cantidad_em) {
this.cantidad_em = cantidad_em;
}
public int getIclave() {
return iclave;
}
public void setIclave(int iclave) {
this.iclave = iclave;
}
}
|
[
"od.pelayo@gmail.com"
] |
od.pelayo@gmail.com
|
ab5c0e769899f7ac3e5479261382a6ac603e134d
|
e61d0ecb7db37f25d0b8f160a0d16de9f911d2e6
|
/Day01继承&修饰/src/cn/itcast/myExtends/itheima_02/Demo.java
|
ed53764428f52a78c745cfbdcd56ebce41b237fe
|
[] |
no_license
|
LoveXianYu/Four-days-before-the-employment-class
|
1540dd50c2c4c80cf678b24a1b5ccf30ccd2da05
|
ae142de34128cd0fed326f34da0199ccf3f3168b
|
refs/heads/master
| 2020-06-02T09:50:03.586021
| 2019-06-10T07:31:10
| 2019-06-10T07:31:10
| 191,119,410
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 216
|
java
|
package cn.itcast.myExtends.itheima_02;
/*
测试类
*/
public class Demo {
public static void main(String[] args) {
//创建对象,调用方法
Zi z = new Zi();
z.show();
}
}
|
[
"1617964770@qq.com"
] |
1617964770@qq.com
|
876e1a0bbf50e9de6f47b3cc338c6b714767f89b
|
665f0f5c68b0657b7ec304cd7393c8343df2b0d0
|
/Week2/app/src/main/java/com/example/myapplication/bean/Bean.java
|
88be4f96cd8ce0617e5961d5a55854e7645a32a7
|
[] |
no_license
|
gujianlong/lianx
|
e2268d5815b89ca7f12a2ba1fb6b808a68b419ff
|
43684531b0724beea8a94813deba96c644a41c44
|
refs/heads/master
| 2021-01-27T00:54:31.434735
| 2020-03-06T08:48:12
| 2020-03-06T08:48:12
| 243,470,216
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 534
|
java
|
package com.example.myapplication.bean;
/*
*@auther:谷建龙
*@Date: 2019/12/30
*@Time:15:43
*@Description:
* */
public class Bean {
private String name;
private int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Bean(String name, int age) {
this.name = name;
this.age = age;
}
}
|
[
"gjl2879905137@163.com"
] |
gjl2879905137@163.com
|
1bfc92a98507f2148bc615afd17050c40e722abb
|
329c69bef88d82e866ed79cb3cba9be6dfc8285f
|
/src/Interfaces/Debuffeable.java
|
28daa6af5728e89cbd9e74097fbb58a0be398ed0
|
[] |
no_license
|
Hanto/MyrranPC
|
8e209bbf223c1dd022d14505c3465584ced1835d
|
339a3a50d10593115e99fdb49de39fe0a9870b24
|
refs/heads/master
| 2020-12-24T13:35:50.614642
| 2014-03-28T06:41:43
| 2014-03-28T06:41:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package Interfaces;
import Skill.Aura.BDebuff;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.utils.Array;
/**
* Created by Hanto on 26/03/2014.
*/
public interface Debuffeable
{
public Array<BDebuff> getListaDeAuras ();
public Group getDebuffIcons ();
public Group getBuffIcons ();
}
|
[
"jhanto@gmail.com"
] |
jhanto@gmail.com
|
828c1cfd9d6e4591a95cb40f7ddb068267b3d8f7
|
28c571e43c5bf87cc71e23482b32922f71cc2bb8
|
/plugins/OSX/src/main/java/net/java/games/input/OSXMouse.java
|
b40e3e9f35176fa3c9d481f3ca7f3e086ba2654b
|
[] |
no_license
|
dmssargent/jinput
|
0b31eef42f482d34ea3595a209c1308cfca617b5
|
fea8f07a710eb176d78d40f91f9661ec418894d7
|
refs/heads/master
| 2021-01-12T20:50:06.094400
| 2016-12-28T04:21:33
| 2016-12-28T04:21:33
| 47,902,344
| 1
| 0
| null | 2015-12-13T02:01:50
| 2015-12-13T02:01:50
| null |
UTF-8
|
Java
| false
| false
| 2,940
|
java
|
/*
* %W% %E%
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*****************************************************************************
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* <p>
* - Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* <p>
* - Redistribution in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materails provided with the distribution.
* <p>
* Neither the name Sun Microsystems, Inc. or the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* <p>
* This software is provided "AS IS," without a warranty of any kind.
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND
* ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS
* A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* <p>
* You acknowledge that this software is not designed or intended for us in
* the design, construction, operation or maintenance of any nuclear facility
*****************************************************************************/
package net.java.games.input;
import java.io.IOException;
/** Represents an OSX Mouse
* @author elias
* @version 1.0
*/
final class OSXMouse extends Mouse {
private final PortType port;
private final OSXHIDQueue queue;
OSXMouse(OSXHIDDevice device, OSXHIDQueue queue, Component[] components, Controller[] children, Rumbler[] rumblers) {
super(device.getProductName(), components, children, rumblers);
this.queue = queue;
this.port = device.getPortType();
}
protected final boolean getNextDeviceEvent(Event event) throws IOException {
return OSXControllers.getNextDeviceEvent(event, queue);
}
protected final void setDeviceEventQueueSize(int size) throws IOException {
queue.setQueueDepth(size);
}
public final PortType getPortType() {
return port;
}
}
|
[
"dmssargent@yahoo.com"
] |
dmssargent@yahoo.com
|
318e1f8535bfb7e40d46840ecfeeb3e38fb38280
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/grade/cd2d9b5b5cff96b07c5b22c0d139ffa2aa36b01823c9eb4db6eca19065a0ce2c4d2516bfcc2f1bc95daeae5b0bbd5e9c15b83feda776735e7bc3de6c49d25144/009/mutations/96/grade_cd2d9b5b_009.java
|
8d14ba348f58bf66296483404ad36cc497415762
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,408
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class grade_cd2d9b5b_009 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
grade_cd2d9b5b_009 mainClass = new grade_cd2d9b5b_009 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
FloatObj num1 = new FloatObj (), num2 = new FloatObj (), num3 =
new FloatObj (), num4 = new FloatObj ();
FloatObj score = new FloatObj ();
output +=
(String.format
("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > "));
num1.value = scanner.nextFloat ();
num2.value = scanner.nextFloat ();
if (true) return ;
num3.value = scanner.nextFloat ();
num4.value = scanner.nextFloat ();
output +=
(String.format ("Thank you. Now enter student score (percent) >"));
score.value = scanner.nextFloat ();
if (score.value >= num1.value) {
output += (String.format ("Student has an A grade"));
} else if (score.value >= num2.value) {
output += (String.format ("Student has an B grade"));
} else if (score.value >= num3.value) {
output += (String.format ("Student has an C grade"));
} else if (score.value >= num4.value) {
output += (String.format ("Student has an D grade"));
}
output += (String.format ("\n"));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
8b646d4837524f54cb57d87e836f6a9744128d48
|
016b76c3cd1233d9d03b8e8da3e886ef20e696dd
|
/cyclops-core/src/main/java/com/aol/cyclops/lambda/tuple/PTuple5.java
|
979f2583fd5bda36a841c0045645c47fe32303c3
|
[
"MIT"
] |
permissive
|
anoordover/cyclops
|
37af6ef88dc71cb6598fbcedcad601b1521c48ab
|
44f319ad03f65c7daf70cf09ee943cf6a1d27d6a
|
refs/heads/master
| 2021-01-24T19:51:21.274975
| 2016-02-24T12:14:39
| 2016-02-24T12:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,954
|
java
|
package com.aol.cyclops.lambda.tuple;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.function.Function;
import com.aol.cyclops.functions.QuintFunction;
import com.aol.cyclops.lambda.tuple.lazymap.LazyMap1PTuple8;
import com.aol.cyclops.lambda.tuple.lazymap.LazyMap2PTuple8;
import com.aol.cyclops.lambda.tuple.lazymap.LazyMap3PTuple8;
import com.aol.cyclops.lambda.tuple.lazymap.LazyMap4PTuple8;
import com.aol.cyclops.lambda.tuple.lazymap.LazyMap5PTuple8;
public interface PTuple5<T1,T2,T3,T4,T5> extends PTuple4<T1,T2,T3,T4> {
default T5 v5(){
if(arity()<5)
throw new ClassCastException("Attempt to upscale to " + PTuple5.class.getCanonicalName() + " from com.aol.cyclops.lambda.tuple.Tuple"+arity());
return (T5)getCachedValues().get(4);
}
default T5 _5(){
return v5();
}
default T5 getT5(){
return v5();
}
default int arity(){
return 5;
}
default <R> R apply5(Function<T1,Function<T2,Function<T3,Function<T4,Function<T5,R>>>>> fn){
return fn.apply(v1()).apply(v2()).apply(v3()).apply(v4()).apply(v5());
}
default <R> R call(QuintFunction<T1,T2,T3,T4,T5,R> fn){
return fn.apply(v1(),v2(),v3(),v4(),v5());
}
default <R> CompletableFuture<R> callAsync(QuintFunction<T1,T2,T3,T4,T5,R> fn){
return CompletableFuture.completedFuture(this).thenApplyAsync(i->fn.apply(i.v1(),
i.v2(),i.v3(),i.v4(),i.v5()));
}
default <R> CompletableFuture<R> applyAsync5(Function<T1,Function<T2,Function<T3,Function<T4,Function<T5,R>>>>> fn){
return CompletableFuture.completedFuture(v5())
.thenApplyAsync(fn.apply(v1()).apply(v2()).apply(v3()).apply(v4()));
}
default <R> CompletableFuture<R> callAsync(QuintFunction<T1,T2,T3,T4,T5,R> fn, Executor e){
return CompletableFuture.completedFuture(this).thenApplyAsync(i->fn.apply(i.v1(),
i.v2(),i.v3(),i.v4(),i.v5()),e);
}
default <R> CompletableFuture<R> applyAsync5(Function<T1,Function<T2,Function<T3,Function<T4,Function<T5,R>>>>> fn, Executor e){
return CompletableFuture.completedFuture(v5())
.thenApplyAsync(fn.apply(v1()).apply(v2()).apply(v3()).apply(v4()),e);
}
/**Strict mapping of the first element
*
* @param fn Mapping function
* @return Tuple5
*/
default <T> PTuple5<T,T2,T3,T4,T5> map1(Function<T1,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.map1(fn);
else
return PowerTuples.tuple(fn.apply(v1()),v2(),v3(),v4(),v5());
}
/**
* Lazily Map 1st element and memoise the result
* @param fn Map function
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
default <T> PTuple5<T,T2,T3,T4,T5> lazyMap1(Function<T1,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.lazyMap1(fn);
return new LazyMap1PTuple8(fn,(PTuple8)this);
}
/**
* Lazily Map 2nd element and memoise the result
* @param fn Map function
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
default <T> PTuple5<T1,T,T3,T4,T5> lazyMap2(Function<T2,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.lazyMap2(fn);
return new LazyMap2PTuple8(fn,(PTuple8)this);
}
/** Map the second element in this Tuple
* @param fn mapper function
* @return new Tuple3
*/
default <T> PTuple5<T1,T,T3,T4,T5> map2(Function<T2,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.map2(fn);
return of(v1(),fn.apply(v2()),v3(),v4(),v5());
}
/**
* Lazily Map 3rd element and memoise the result
* @param fn Map function
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
default <T> PTuple5<T1,T2,T,T4,T5> lazyMap3(Function<T3,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.lazyMap3(fn);
return new LazyMap3PTuple8(fn,(PTuple8)this);
}
/*
* @see com.aol.cyclops.lambda.tuple.Tuple4#map3(java.util.function.Function)
*/
default <T> PTuple5<T1,T2,T,T4,T5> map3(Function<T3,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.map3(fn);
return of(v1(),v2(),fn.apply(v3()),v4(),v5());
}
/**
* Lazily Map 4th element and memoise the result
* @param fn Map function
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
default <T> PTuple5<T1,T2,T3,T,T5> lazyMap4(Function<T4,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.lazyMap4(fn);
return new LazyMap4PTuple8(fn,(PTuple8)this);
}
/*
* Map element 4
* @see com.aol.cyclops.lambda.tuple.Tuple4#map4(java.util.function.Function)
*/
default <T> PTuple5<T1,T2,T3,T,T5> map4(Function<T4,T> fn){
if(arity()!=5)
return (PTuple5)PTuple4.super.map4(fn);
return of(v1(),v2(),v3(),fn.apply(v4()),v5());
}
/**
* Lazily Map 5th element and memoise the result
* @param fn Map function
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
default <T> PTuple5<T1,T2,T3,T4,T> lazyMap5(Function<T5,T> fn){
return new LazyMap5PTuple8(fn,(PTuple8)this);
}
/**
* Map the 5th element in a tuple to a different value
*
* @param fn Mapper function
* @return new Tuple5
*/
default <T> PTuple5<T1,T2,T3,T4,T> map5(Function<T5,T> fn){
return of(v1(),v2(),v3(),v4(),fn.apply(v5()));
}
default PTuple4<T1,T2,T3,T4> tuple4(){
return (PTuple4)withArity(4);
}
default PTuple5<T5,T4,T3,T2,T1> swap5(){
return of(v5(),v4(),v3(),v2(),v1());
}
/**
* Lazily reorder a PTuple5 or both a narrow and reorder a larger Tuple
*
* @param v1S Function that determines new first element
* @param v2S Function that determines new second element
* @param v3S Function that determines new third element
* @param v4S Function that determines new fourth element
* @param v5S Function that determines new fifth element
* @return reordered PTuple5
*/
default <NT1, NT2, NT3, NT4,NT5> PTuple5<NT1, NT2, NT3, NT4,NT5> reorder(
Function<PTuple5<T1, T2, T3, T4,T5>, NT1> v1S,
Function<PTuple5<T1, T2, T3, T4,T5>, NT2> v2S,
Function<PTuple5<T1, T2, T3, T4,T5>, NT3> v3S,
Function<PTuple5<T1, T2, T3, T4,T5>, NT4> v4S,
Function<PTuple5<T1, T2, T3, T4,T5>, NT5> v5S) {
PTuple5<T1,T2,T3,T4,T5> host = this;
return new TupleImpl(Arrays.asList(), 5) {
public NT1 v1() {
return v1S.apply(host);
}
public NT2 v2() {
return v2S.apply(host);
}
public NT3 v3() {
return v3S.apply(host);
}
public NT4 v4() {
return v4S.apply(host);
}
public NT5 v5() {
return v5S.apply(host);
}
@Override
public List<Object> getCachedValues() {
return Arrays.asList(v1(), v2(), v3(), v4(),v5());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
default PTuple5<T1,T2,T3,T4,T5> memo(){
if(arity()!=5)
return (PTuple5)PTuple4.super.memo();
PTuple5<T1,T2,T3,T4,T5> host = this;
Map<Integer,Object> values = new ConcurrentHashMap<>();
return new TupleImpl(Arrays.asList(),5){
public T1 v1(){
return ( T1)values.computeIfAbsent(new Integer(0), key -> host.v1());
}
public T2 v2(){
return ( T2)values.computeIfAbsent(new Integer(1), key -> host.v2());
}
public T3 v3(){
return ( T3)values.computeIfAbsent(new Integer(2), key -> host.v3());
}
public T4 v4(){
return ( T4)values.computeIfAbsent(new Integer(3), key -> host.v4());
}
public T5 v5(){
return ( T5)values.computeIfAbsent(new Integer(4), key -> host.v5());
}
@Override
public List<Object> getCachedValues() {
return Arrays.asList(v1(),v2(),v3(),v4(),v5());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
public static <T1,T2,T3,T4,T5> PTuple5<T1,T2,T3,T4,T5> ofTuple(Object tuple5){
return (PTuple5)new TupleImpl(tuple5,5);
}
public static <T1,T2,T3,T4,T5> PTuple5<T1,T2,T3,T4,T5> of(T1 t1, T2 t2,T3 t3,T4 t4,T5 t5){
return (PTuple5)new TupleImpl(Arrays.asList(t1,t2,t3,t4,t5),5);
}
}
|
[
"john.mcclean@teamaol.com"
] |
john.mcclean@teamaol.com
|
3475fe4a73641bad8092706b8b537ac10b76832f
|
1132cef0ea0246b0ef505ee8daa3cdb342499fbc
|
/DesignPatterns/src/Behavioral_Pattern/iterator/ConcreteAggregate.java
|
e18e73cc7291555810a86f66eb4968f20781341d
|
[] |
no_license
|
zhhaochen/Algorithm
|
fd92a748fd727700abba8ad92db0d72663058666
|
509a8f29f00ed665182c8314c11c5a67b023701f
|
refs/heads/master
| 2023-07-02T08:14:13.918245
| 2021-08-05T16:31:08
| 2021-08-05T16:31:08
| 288,951,652
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 395
|
java
|
package Behavioral_Pattern.iterator;
public class ConcreteAggregate implements Aggregate {
private Integer[] items;
public ConcreteAggregate() {
items = new Integer[10];
for (int i = 0; i < items.length; i++) {
items[i] = i;
}
}
@Override
public Iterator createIterator() {
return new ConcreteIterator<Integer>(items);
}
}
|
[
"zhhaochen@gmail.com"
] |
zhhaochen@gmail.com
|
bdb454c2fb6fbcce2a8a0177c4d069d03e5f422e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_7d2aef87ee382e4d0d205ee990b2e2b9eda00b92/ServerTestsActivator/27_7d2aef87ee382e4d0d205ee990b2e2b9eda00b92_ServerTestsActivator_t.java
|
340b35313282595ac453d1b96abff8eed0dcaadd
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,096
|
java
|
/*******************************************************************************
* Copyright (c) 2010, 2011 IBM Corporation and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.orion.server.tests;
import org.eclipse.orion.internal.server.servlets.Activator;
import org.eclipse.orion.server.configurator.ConfiguratorActivator;
import org.osgi.framework.*;
import org.osgi.service.http.HttpService;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;
public class ServerTestsActivator implements BundleActivator {
private static final String EQUINOX_HTTP_JETTY = "org.eclipse.equinox.http.jetty"; //$NON-NLS-1$
private static final String EQUINOX_HTTP_REGISTRY = "org.eclipse.equinox.http.registry"; //$NON-NLS-1$
public static BundleContext bundleContext;
private static ServiceTracker<HttpService, HttpService> httpServiceTracker;
private static ServiceTracker<PackageAdmin, PackageAdmin> packageAdminTracker;
private static boolean initialized = false;
private static String serverHost = null;
private static int serverPort = 0;
public static BundleContext getContext() {
return bundleContext;
}
public static String getServerLocation() {
if (!initialized) {
try {
initialize();
//make sure the http registry is started
ensureBundleStarted(EQUINOX_HTTP_JETTY);
ensureBundleStarted(EQUINOX_HTTP_REGISTRY);
//get the webide bundle started via lazy activation.
org.eclipse.orion.server.authentication.basic.Activator.getDefault();
Activator.getDefault();
ConfiguratorActivator.getDefault();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
return "http://" + serverHost + ':' + String.valueOf(serverPort);
}
private static void initialize() throws Exception {
ServiceReference<HttpService> reference = httpServiceTracker.getServiceReference();
String port = (String) reference.getProperty("http.port"); //$NON-NLS-1$
serverHost = "localhost"; //$NON-NLS-1$
serverPort = Integer.parseInt(port);
initialized = true;
}
public void start(BundleContext context) throws Exception {
bundleContext = context;
httpServiceTracker = new ServiceTracker<HttpService, HttpService>(context, HttpService.class, null);
httpServiceTracker.open();
packageAdminTracker = new ServiceTracker<PackageAdmin, PackageAdmin>(context, PackageAdmin.class.getName(), null);
packageAdminTracker.open();
}
public void stop(BundleContext context) throws Exception {
if (httpServiceTracker != null)
httpServiceTracker.close();
if (packageAdminTracker != null)
packageAdminTracker.close();
httpServiceTracker = null;
packageAdminTracker = null;
bundleContext = null;
}
static private Bundle getBundle(String symbolicName) {
PackageAdmin packageAdmin = packageAdminTracker.getService();
if (packageAdmin == null)
return null;
Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
if (bundles == null)
return null;
// Return the first bundle that is not installed or uninstalled
for (int i = 0; i < bundles.length; i++) {
if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
return bundles[i];
}
}
return null;
}
static private void ensureBundleStarted(String name) throws BundleException {
Bundle bundle = getBundle(name);
if (bundle != null) {
if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING) {
bundle.start(Bundle.START_TRANSIENT);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
bd7f61b89fb91af22879db1de0cb447dc51d4cfc
|
adee578270fae3eeff740b34b635c87e1da24723
|
/src/main/java/ua/i/mail100/dto/EventDTO.java
|
f7a1f0621ec950446e7082430ddf718b12a191da
|
[] |
no_license
|
Antoninadan/Swimmer
|
9ddbebf2a955adc797d0b18d83910e41ab9ac13e
|
80fc62b81918513066491997a0cfe628e0d640c1
|
refs/heads/master
| 2021-05-18T04:29:31.853057
| 2020-05-31T17:41:34
| 2020-05-31T17:41:34
| 251,107,205
| 0
| 0
| null | 2021-04-26T20:12:30
| 2020-03-29T18:47:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,184
|
java
|
package ua.i.mail100.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class EventDTO extends BaseEntityDTO {
private Integer franchiseId;
private String organizer;
private String name;
private String dateFrom;
private String dateTo;
private Integer countryId;
private String venue;
private String url;
private String comment;
private List<DistanceDTO> distances;
public EventDTO(Integer id, Integer franchiseId, String organizer, String name, String dateFrom, String dateTo,
Integer countryId, String venue, String url, String comment,
Long createDate, Long modifyDate, String recordStatus) {
super(id, createDate, modifyDate, recordStatus);
this.franchiseId = franchiseId;
this.organizer = organizer;
this.name = name;
this.dateFrom = dateFrom;
this.dateTo = dateTo;
this.countryId = countryId;
this.venue = venue;
this.url = url;
this.comment = comment;
}
}
|
[
"mail100@i.ua"
] |
mail100@i.ua
|
e84805994a58f967da1d3ff90ac64520954408e8
|
aa1e6fb49207ef7d3d7cc00b688fdb28895c6956
|
/P15009907/src/main/java/com/erim/sz/company/service/CompanyBusinessService.java
|
64a66e7640d2719e9f2d4b9a1d2ee81ef87dacee
|
[] |
no_license
|
zhanght86/erim
|
f76fec9267200c6951a0a8c1fb3f723de88a039c
|
504d81bb4926e496c11a34641dcc67150e78dadc
|
refs/heads/master
| 2021-05-15T17:10:07.801083
| 2016-12-02T09:35:07
| 2016-12-02T09:35:07
| 107,489,023
| 1
| 0
| null | 2017-10-19T02:37:10
| 2017-10-19T02:37:10
| null |
UTF-8
|
Java
| false
| false
| 5,571
|
java
|
package com.erim.sz.company.service;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
import com.erim.sz.common.bean.ComBusRegionBean;
import com.erim.sz.common.bean.CompanyBusinessBean;
import com.erim.sz.company.dao.ComBusRegionDao;
import com.erim.sz.company.dao.CompanyBusinessDao;
import com.erim.sz.system.bean.ZxSystemUserBean;
import com.erim.sz.web.util.CommonUtil;
/**
* @类名: CompanyBusinessService
* @描述: 公司业务范围信息实体操作业务层
* @作者: 宁晓强
* @创建时间: 2015年11月4日 下午1:24:02
*/
@Service("companyBusinessService")
@Scope(BeanDefinition.SCOPE_SINGLETON)
public class CompanyBusinessService {
@Autowired
private CompanyBusinessDao companyBusinessDao;
@Autowired
private ComBusRegionDao comBusRegionDao;
/**
* @Title: selectBuinessByCpyId
* @Description: 根据企业id 查询企业业务范围
* @param @param cpyId
* @param @return 设定文件
* @return CompanyBusinessBean 返回类型
* @author maoxian
* @date 2015年12月28日 下午9:06:03
* @throws
*/
public CompanyBusinessBean selectBuinessByCpyId(Integer cpyId){
return this.companyBusinessDao.getBusinessById(cpyId);
}
/**
* @方法名: insert
* @描述: 新增公司业务范围信息
* @作者: 宁晓强
* @创建时间: 2015年11月4日 下午1:21:08
* @param map
* @param bean
* @return
*/
public Integer insert(ModelMap map, CompanyBusinessBean bean, String currDate, HttpServletRequest request) {
Integer result = CommonUtil.ERROR;
// 公司ID
Integer cpyId = (Integer) SecurityUtils.getSubject().getSession().getAttribute("cpyId");
// 录入业务地区
result = insertBusRegion(request, cpyId);
// 如果录入异常直接返回失败
if (result == CommonUtil.ERROR) {
return result;
}
bean.setCpyId(cpyId);
// 国际业务方向
String servcieOuter = bean.getCbsServiceOuter();
// 国际地接涉及区域 - 完全从国际业务方向获取
bean.setCbsNurState(servcieOuter);
// 国际其他业务方向
String serviceRest = bean.getCbsServiceRest();
// 当国际其他业务方向不为空时,添加到国际其他地接涉及区域。
if (serviceRest != null && !"".equals(serviceRest)) {
// 国际其他地接涉及区域
String nurRest = bean.getCbsNurRest();
bean.setCbsNurRest(serviceRest + "," + nurRest);
}
// 执行新增前,先预删除该企业ID相关的业务信息,防止重复。
companyBusinessDao.deleteBusinessByCpyId(bean);
// 执行新增
companyBusinessDao.insert(bean);
return CommonUtil.SUCCESS;
}
/**
* @描述: 录入业务地区
* @作者: 宁晓强
* @创建时间: 2015年11月10日 下午6:00:18
* @param request
* @param cpyId
*/
public Integer insertBusRegion(HttpServletRequest request, Integer cpyId) {
Integer result = CommonUtil.ERROR;
try {
// 业务区域
ComBusRegionBean regionModel = new ComBusRegionBean();
// 地接涉及区域省市县
String[] nurProvinceA = request.getParameterValues("cbsNurProvince");
String[] nurCityA = request.getParameterValues("cbsNurCity");
String[] nurCountyA = request.getParameterValues("cbsNurCounty");
// 录入地接涉及区域
for (int i = 0; i < nurProvinceA.length; i++) {
// 省
String proStr = nurProvinceA[i];
if (proStr != null && !"".equals(proStr)) {
regionModel.setCpyId(cpyId);// 公司iD
regionModel.setCbrBusType("01");// 01代表地接涉及区域
regionModel.setCbrProvince(proStr);// 省
regionModel.setCbrCity(nurCityA[i]);// 市
regionModel.setCbrCounty(nurCountyA[i]);// 县
// 执行新增前清库
comBusRegionDao.deleteRegion(regionModel);
// 执行新增
comBusRegionDao.insert(regionModel);
}
}
// 可服务地区省市县
String[] srlProvinceA = request.getParameterValues("cbsSrlProvince");
String[] srlCityA = request.getParameterValues("cbsSrlCity");
String[] srlCountyA = request.getParameterValues("cbsSrlCounty");
// 录入可服务地区
for (int i = 0; i < srlProvinceA.length; i++) {
// 省
String proStr = srlProvinceA[i];
if (proStr != null && !"".equals(proStr)) {
regionModel.setCpyId(cpyId);// 公司iD
regionModel.setCbrBusType("02");// 02代表可服务区域
regionModel.setCbrProvince(proStr);// 省
regionModel.setCbrCity(srlCityA[i]);// 市
regionModel.setCbrCounty(srlCountyA[i]);// 县
// 执行新增前清库
comBusRegionDao.deleteRegion(regionModel);
// 执行新增
comBusRegionDao.insert(regionModel);
}
}
result = CommonUtil.SUCCESS;
} catch (Exception e) {
result = CommonUtil.ERROR;
}
return result;
}
/**
* @方法名: showBusinessPage
* @描述: 打开修改业务范围信息页面 - 暂时废弃
* @作者: 宁晓强
* @创建时间: 2015年11月4日 下午1:22:54
* @param map
* @param bean
*/
public void updateBusinessPage(ModelMap map, ZxSystemUserBean bean) {
Integer cpyId = bean.getCpyId();
CompanyBusinessBean model = new CompanyBusinessBean();
// 根据ID获取一条信息
model = companyBusinessDao.getBusinessById(cpyId);
map.addAttribute("business", model);
map.addAttribute("cpyId", cpyId);
}
}
|
[
"libra0920@qq.com"
] |
libra0920@qq.com
|
b9e012702ade025004a85644930f0b30c43c9e58
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/20_nekomud-net.sourceforge.nekomud.nio.NetworkServiceNioImpl-0.5-2/net/sourceforge/nekomud/nio/NetworkServiceNioImpl_ESTest_scaffolding.java
|
37cf2278a69cb0da384377fbe5bf949dfaedabc5
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 09:29:11 GMT 2019
*/
package net.sourceforge.nekomud.nio;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class NetworkServiceNioImpl_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
96741aeef8a306106ae4cdaa280be885eab3da88
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/sortContent/beforeErrorType.java
|
85566ef74ca0b9f88de4086554a1468ee6e28fb9
|
[
"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
| 141
|
java
|
// "Sort content" "false"
import java.util.*;
public class Main {
private void test() {
new Object[] {"foo",<caret> 1, "bar"};
}
}
|
[
"Roman.Ivanov@jetbrains.com"
] |
Roman.Ivanov@jetbrains.com
|
44981ee49f4c00664ef67581b9907728fd8513b9
|
599b2e80237f007507263bbb83617a052c1f91be
|
/leech-gwt-ui/src/main/java/com/voole/leech/gwt/util/TestSub2.java
|
5fee8d4bbbe4089824aa246f05a161e367f8cab0
|
[] |
no_license
|
wowcinder/leech
|
0d5a27926b7f4502720928f0425d68278f5f9bcd
|
8101ccdc53f59f33fafb93ff3aad97efb8adf0e2
|
refs/heads/master
| 2016-09-16T03:05:53.370063
| 2013-11-27T06:18:07
| 2013-11-27T06:18:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 227
|
java
|
/*
* Copyright (C) 2013 BEIJING UNION VOOLE TECHNOLOGY CO., LTD
*/
package com.voole.leech.gwt.util;
/**
* @author XuehuiHe
* @date 2013年9月29日
*/
public class TestSub2 extends TestSub<Float, Integer> {
}
|
[
"xuehuihe.java@gmail.com"
] |
xuehuihe.java@gmail.com
|
f375ef7d20c6f7334953f997c9981b33fb542177
|
a16b2a58625081530c089568e2b29f74e23f95a9
|
/doolin/Doolin-Application/src/main/java/net/sf/doolin/gui/field/support/swing/SwingMultipleSelectionSupport.java
|
710191df089e79d9f659426cdbb9f9311dba3b5e
|
[] |
no_license
|
dcoraboeuf/orbe
|
440335b109dee2ee3db9ee2ab38430783e7a3dfb
|
dae644da030e5a5461df68936fea43f2f31271dd
|
refs/heads/master
| 2022-01-27T10:18:43.222802
| 2022-01-01T11:45:35
| 2022-01-01T11:45:35
| 178,600,867
| 0
| 0
| null | 2022-01-01T11:46:01
| 2019-03-30T19:13:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,774
|
java
|
/*
* Created on Aug 7, 2007
*/
package net.sf.doolin.gui.field.support.swing;
import java.util.List;
import net.sf.doolin.gui.field.FieldMultipleSelection;
import net.sf.doolin.gui.field.event.EventAction;
import net.sf.doolin.gui.field.support.MultipleSelectionSupport;
import net.sf.doolin.gui.swing.select.SelectableList;
import net.sf.doolin.gui.swing.select.SelectedEvent;
import net.sf.doolin.gui.swing.select.SelectedEventListener;
/**
* Support for the <code>{@link FieldMultipleSelection}</code> based on a
* <code>{@link SelectableList}</code>.
*
* @author Damien Coraboeuf
* @version $Id: SwingMultipleSelectionSupport.java,v 1.1 2007/08/07 16:47:05 guinnessman Exp $
* @param <T>
* Type of item
*/
public class SwingMultipleSelectionSupport<T> extends AbstractSwingInfoFieldSupport<FieldMultipleSelection, SelectableList<T>> implements MultipleSelectionSupport<T> {
private SelectableList<T> list;
@Override
protected SelectableList<T> createComponent() {
list = new SelectableList<T>();
list.setLabelProvider(getField().getLabelProvider());
list.setVisibleRows(getField().getVisibleRows());
// List of items
@SuppressWarnings("unchecked")
List<T> items = getField().getItemProvider().getItems();
list.setItems(items);
return list;
}
public void setItems(List<T> items) {
list.setItems(items);
}
public List<T> getSelection() {
return list.getSelectedItems();
}
public void setSelection(List<T> collection) {
list.setSelectedItems(collection);
}
public void bindEditEvent(final EventAction eventAction) {
list.addSelectedEventListener(new SelectedEventListener() {
public void itemSelected(SelectedEvent event) {
eventAction.execute(getView(), getField(), null);
}
});
}
}
|
[
"damien.coraboeuf@gmail.com"
] |
damien.coraboeuf@gmail.com
|
eff5e72d57d4379c16e9e94a130aad77cc1dbb76
|
3f0015de89c8b0cd48ae203f35f395b2316dee28
|
/src/com/apiclient/vo/SynthesisCuttingToolConfigVO.java
|
0c83e46d3324dbb87bd1754da0ae83fc661cd5da
|
[] |
no_license
|
looooogan/icomp-4gb-pda
|
f8bf25c2ff20594ef802993ec708b66a8068d3dc
|
87f773b746485883f4839d646700a21d05c54d4f
|
refs/heads/master
| 2020-03-21T03:12:04.271544
| 2018-06-20T14:21:13
| 2018-06-20T14:21:13
| 133,898,130
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,742
|
java
|
package com.apiclient.vo;
import java.io.Serializable;
import java.util.List;
/**
* Created by jiangchenkeji
* Automated Build
* 实体 SynthesisCuttingToolConfigVO
*/
public class SynthesisCuttingToolConfigVO implements Serializable {
// 序列化接口属性
private static final long serialVersionUID = 1L;
/**
* @fieldName id
* @fieldType Integer
* @Description 标识
*/
private Integer id;
/**
* @fieldName synthesisCuttingToolCode
* @fieldType String
* @Description 合成刀编码
*/
private String synthesisCuttingToolCode;
/**
* @fieldName synthesisCuttingToolTypeId
* @fieldType Integer
* @Description 合成刀类型 1复合刀具 2刀片 3热套 4一体刀 5
*/
private Integer synthesisCuttingToolTypeId;
/**
* @fieldName isDel
* @fieldType Integer
* @Description 逻辑删除
*/
private Integer isDel;
/**
* @fieldName count
* @fieldType Integer
* @Description 数量
*/
private Integer count;
/**
* @fieldName picurl
* @fieldType String
* @Description 图纸url
*/
private String picurl;
/**
* @fieldName location
* @fieldType Integer
* @Description 位置
*/
private Integer location;
/**
* @fieldName synthesisCuttingToolCode
* @fieldType
* @Description 合成刀编码
*/
private SynthesisCuttingToolVO synthesisCuttingToolVO;
/**
* @fieldName synthesisCuttingToolTypeId
* @fieldType
* @Description 合成刀类型 1复合刀具 2刀片 3热套 4一体刀 5
*/
private SynthesisCuttingToolTypeVO synthesisCuttingToolTypeVO;
private List<SynthesisCuttingToolLocationConfigVO> synthesisCuttingToolLocationConfigVOList;
/**
* @fieldName currentPage
* @fieldType Integer
* @Description 当前页码
*/
private Integer currentPage = 1;
/**
* @fieldName totalPage
* @fieldType Integer
* @Description 总页数
*/
private Integer totalPage;
/**
* @fieldName pageSize
* @fieldType Integer
* @Description 每页记录条数
*/
private Integer pageSize = 10;
/**
* @fieldName maxPage
* @fieldType Integer
* @Description 总页数
*/
private Integer maxPage;
/**
* @fieldName startRecord
* @fieldType Integer
* @Description 开始查询记录
*/
private Integer startRecord;
/* 标识 */
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSynthesisCuttingToolCode() {
return synthesisCuttingToolCode;
}
public void setSynthesisCuttingToolCode(String synthesisCuttingToolCode) {
this.synthesisCuttingToolCode = synthesisCuttingToolCode;
}
public Integer getSynthesisCuttingToolTypeId() {
return synthesisCuttingToolTypeId;
}
public void setSynthesisCuttingToolTypeId(Integer synthesisCuttingToolTypeId) {
this.synthesisCuttingToolTypeId = synthesisCuttingToolTypeId;
}
public Integer getIsDel() {
return isDel;
}
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getPicurl() {
return picurl;
}
public void setPicurl(String picurl) {
this.picurl = picurl;
}
public Integer getLocation() {
return location;
}
public void setLocation(Integer location) {
this.location = location;
}
public SynthesisCuttingToolVO getSynthesisCuttingToolVO() {
return synthesisCuttingToolVO;
}
public void setSynthesisCuttingToolVO(SynthesisCuttingToolVO synthesisCuttingToolVO) {
this.synthesisCuttingToolVO = synthesisCuttingToolVO;
}
public SynthesisCuttingToolTypeVO getSynthesisCuttingToolTypeVO() {
return synthesisCuttingToolTypeVO;
}
public void setSynthesisCuttingToolTypeVO(SynthesisCuttingToolTypeVO synthesisCuttingToolTypeVO) {
this.synthesisCuttingToolTypeVO = synthesisCuttingToolTypeVO;
}
public List<SynthesisCuttingToolLocationConfigVO> getSynthesisCuttingToolLocationConfigVOList() {
return synthesisCuttingToolLocationConfigVOList;
}
public void setSynthesisCuttingToolLocationConfigVOList(List<SynthesisCuttingToolLocationConfigVO> synthesisCuttingToolLocationConfigVOList) {
this.synthesisCuttingToolLocationConfigVOList = synthesisCuttingToolLocationConfigVOList;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
this.startRecord = (this.currentPage-1)*pageSize;
}
public Integer getTotalPage() {
return totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
this.maxPage = this.totalPage/this.pageSize+(this.totalPage%this.pageSize)>0?1:0;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getStartRecord() {
return startRecord;
}
public void setStartRecord(Integer startRecord) {
this.startRecord = startRecord;
}
public Integer getMaxPage() {
return maxPage;
}
public void setMaxPage(Integer maxPage) {
this.maxPage = maxPage;
}
}
|
[
"logan.box2016@gmail.com"
] |
logan.box2016@gmail.com
|
f546923f4462813c20ec3463e0f1e8cede410971
|
3f954c0b777cecfff80623c87bd4291292167afc
|
/test/junit/workbench/util/DurationNumberTest.java
|
78fa33ac005f5da3275ec7085d4460a6462cf255
|
[] |
no_license
|
zippy1981/SqlWorkbenchJ
|
67ba4dca04fb9ee69ca0992032c6ddfb69614f60
|
7b246fb0dadd6b5c47900dcbb2298cc5f0143b77
|
refs/heads/master
| 2021-01-10T01:47:54.963813
| 2016-02-14T23:14:10
| 2016-02-14T23:14:10
| 45,090,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,912
|
java
|
/*
* This file is part of SQL Workbench/J, http://www.sql-workbench.net
*
* Copyright 2002-2016, Thomas Kellerer
*
* Licensed under a modified Apache License, Version 2.0
* that restricts the use for certain governments.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://sql-workbench.net/manual/license.html
*
* 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.
*
* To contact the author please send an email to: support@sql-workbench.net
*/
package workbench.util;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author Thomas Kellerer
*/
public class DurationNumberTest
{
public DurationNumberTest()
{
}
@Test
public void testGetTime()
{
DurationNumber num = new DurationNumber();
assertEquals(50, num.parseDefinition("50"));
assertEquals(1000, num.parseDefinition(" 1s"));
assertEquals(1000 * 60, num.parseDefinition(" 1 m "));
assertEquals(1000 * 60 * 60 * 2, num.parseDefinition(" 2h"));
assertEquals(1000 * 60 * 60 * 24, num.parseDefinition("1d"));
assertEquals(1000 * 60 * 60 * 24 * 5, num.parseDefinition("5d"));
assertEquals(0, num.parseDefinition("x"));
assertEquals(0, num.parseDefinition(null));
}
@Test
public void testIsValid()
{
DurationNumber num = new DurationNumber();
assertTrue(num.isValid("5d"));
assertTrue(num.isValid("100s"));
assertTrue(num.isValid("2h"));
assertFalse(num.isValid("42x"));
assertFalse(num.isValid("xyz"));
assertFalse(num.isValid(" "));
assertFalse(num.isValid(""));
}
}
|
[
"tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28"
] |
tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28
|
e779a8f516a757ef3e083734e29c18faeea1fe11
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_2nd/Nicad_t1_beam_2nd417.java
|
4b98143b7abef760b0cbb81de6c054f0bf9f7444
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 485
|
java
|
// clone pairs:2916:80%
// 3231:beam/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/PTransformMatchers.java
public class Nicad_t1_beam_2nd417
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EqualUrnPTransformMatcher that = (EqualUrnPTransformMatcher) o;
return urn.equals(that.urn);
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
eaaddf3d28f9140df2cdb0e7a9681848ed133dd8
|
3e7cbcb234fb2f2bac0963d2d14c7aea3506aabd
|
/Membership/src/main/java/com/example/service/UserService.java
|
da4680736af58118f66e7c8b7bb61a633db1e9be
|
[] |
no_license
|
tmznf963/SIST-E-Spring
|
de94e5626744d694cdb655ca91303ea8ac2050e3
|
92381fb1c89e438be41c2154ff70f38588a218f3
|
refs/heads/master
| 2020-04-08T10:45:51.499682
| 2019-01-24T00:32:45
| 2019-01-24T00:32:45
| 159,281,337
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 330
|
java
|
package com.example.service;
import java.util.List;
import com.oracle.vo.UserVO;
//void == return 안하는 애들
public interface UserService {
void createUser(UserVO userVO);
UserVO readUser(String userid);
List<UserVO> selectAllUsers();
void updateUser(String userid, String city);
void deleteUser(String userid);
}
|
[
"qhfhd963@naver.com"
] |
qhfhd963@naver.com
|
c03de66dce46dd26cfa34a5bbd472253b3ec571c
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/src/com/jshx/xzdccfjdsdw/service/SpoPenDecComService.java
|
79f0e3696a90e40ca712ddfa4deeecc01db8c554
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
package com.jshx.xzdccfjdsdw.service;
import java.util.List;
import java.util.Map;
import com.jshx.core.base.service.BaseService;
import com.jshx.core.base.vo.Pagination;
import com.jshx.xzdccfjdsdw.entity.SpoPenDecCom;
public interface SpoPenDecComService extends BaseService
{
/**
* 分页查询
* @param page 分页信息
* @param paraMap 查询条件信息
* @return 分页信息
*/
public Pagination findByPage(Pagination page, Map<String, Object> paraMap);
/**
* 根据主键ID查询信息
* @param id 主键ID
* @return 主键ID对应的信息
*/
public SpoPenDecCom getById(String id);
/**
* 保存信息
* @param model 信息
*/
public void save(SpoPenDecCom model);
/**
* 修改信息
* @param model 信息
*/
public void update(SpoPenDecCom model);
/**
* 物理删除信息
* @param ids 主键ID列表
*/
public void delete(String[] ids);
/**
* 逻辑删除信息
* @param ids 主键ID列表
*/
public void deleteWithFlag(String ids);
/**
* 查询所有记录
* @param page 分页信息
* @param paraMap 查询条件信息
* @return 分页信息
*/
public List<SpoPenDecCom> findSpoPenDecCom(Map<String, Object> paraMap);
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
3a4606959faf498d101e7875ce8b829753ec3c79
|
d0352f49cfb42f3c0d583389ab57598640c78fc6
|
/week2/TestExamples/src/test/java/com/revature/cactus/CactusTest1.java
|
59f9bdf54fabbb431204c2b9c60c62bd98ca75bd
|
[] |
no_license
|
201026-reston-java-msa/demos
|
c0c79139391e70fe0393be2e705182e17ee4b244
|
57a56ff56df12afff167565554effac0ea284336
|
refs/heads/main
| 2023-03-29T04:27:20.165396
| 2021-03-31T11:21:20
| 2021-03-31T11:21:20
| 307,373,580
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,413
|
java
|
package com.revature.cactus;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import com.revature.Cactus;
import com.revature.Flower;
public class CactusTest1 {
private static Cactus cactus;
@Before
public void setUp() throws Exception {
List<Flower> startingFlowers = new ArrayList<Flower>();
startingFlowers.add(Flower.Sunflower);
cactus = new Cactus(10, 2, "Green", startingFlowers);
}
@Test
public void testAddFlower() {
// our cactus has a Sunflower..
// by the end of the test, we want to ASSERTEQUALS
// that we have both a sunflower and a bud
cactus.addFlower(Flower.Bud);
List<Flower> myCactusFlowers = new ArrayList<Flower>();
myCactusFlowers.add(Flower.Sunflower);
myCactusFlowers.add(Flower.Bud);
assertEquals(myCactusFlowers, cactus.getFlowers());
}
@Test
public void testRemoveFlower() {
List<Flower> expected = new ArrayList<Flower>();
// expected list.size == 0;
cactus.removeFlower(Flower.Sunflower);
// now cactus.flowers.size == 0....
assertEquals(expected, cactus.getFlowers()); // 0 & 0
}
// This tests that we indeed CANNOT pass negative values in because otherwis
// we'll throw the exception as we defined in our method body
@Test(expected = IllegalArgumentException.class)
public void testGrowException() {
cactus.grow(-3.0);
}
@Test
public void testSeeding() {
List<Flower> childFlowers = new ArrayList<Flower>();
childFlowers.add(Flower.Sunflower);
// the expected baby Cactus object to return
Cactus expected = new Cactus(0.1, 0.2, cactus.getColor(), childFlowers);
assertEquals(expected, cactus.seeding());
// That when you create tests that COMPARE OBJECTS
// YOU MUST OVERRIDE THE .EQUALS() METHOD!!
}
@Test
public void testBloom() {
// we are only testing the int value that is returned from the bloom();
assertEquals(1, cactus.bloom());
}
// DONT'T WORRY ABOUT THIS
// static boolean testDoubleEquality(Double one, Double two, Double delta){
// return Math.abs(one - two)< delta;
// }
//
// public static void main(String[] args) {
// System.out.println(testDoubleEquality((double) 101, cactus.grow(100), 1.0));
// }
//
// @Test
// public void testGrowReturn() {
//
//
// assertEquals(new Double(101), new Double(cactus.grow(100)));
// }
}
|
[
"msophiagavrila@gmail.com"
] |
msophiagavrila@gmail.com
|
1dac3ed5a830916aded7e3d8042a2107656eedbe
|
d845c34f5b875c220293265b49dfd51f290d4ee0
|
/projects/org.graalvm.vm.posix/src/org/graalvm/vm/posix/api/Timespec.java
|
deacd4bca528aa29a8a3c235e1267083c7d62819
|
[
"UPL-1.0",
"Apache-2.0"
] |
permissive
|
pekd/vmx86
|
d136c86b8ccd2d22f3aaff9296bb861d6fac5d42
|
f7e7e839a13f6d519cf25598dd5dfcdcacd1a177
|
refs/heads/dev
| 2022-07-01T23:35:21.609475
| 2022-06-17T16:53:14
| 2022-06-17T16:53:14
| 215,284,931
| 4
| 2
|
NOASSERTION
| 2020-02-28T15:12:46
| 2019-10-15T11:45:31
|
Java
|
UTF-8
|
Java
| false
| false
| 3,751
|
java
|
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below, permission is hereby granted to any
* person obtaining a copy of this software, associated documentation and/or
* data (collectively the "Software"), free of charge and under any and all
* copyright rights in the Software, and any and all patent rights owned or
* freely licensable by each licensor hereunder covering either (i) the
* unmodified Software as contributed to or provided by such licensor, or (ii)
* the Larger Works (as defined below), to deal in both
*
* (a) the Software, and
*
* (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
* one is included with the Software each a "Larger Work" to which the Software
* is contributed by such licensors),
*
* without restriction, including without limitation the rights to copy, create
* derivative works of, display, perform, and distribute the Software and make,
* use, sell, offer for sale, import, export, have made, and have sold the
* Software and the Larger Work(s), and to sublicense the foregoing rights on
* either these or other terms.
*
* This license is subject to the following condition:
*
* The above copyright notice and either this complete permission notice or at a
* minimum a reference to the UPL must be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.graalvm.vm.posix.api;
import java.util.Date;
public class Timespec implements Struct {
public long tv_sec;
public long tv_nsec;
public Timespec() {
}
public Timespec(long tv_sec, long tv_nsec) {
this.tv_sec = tv_sec;
this.tv_nsec = tv_nsec;
}
public Timespec(Date date) {
long msec = date.getTime();
tv_sec = msec / 1000;
tv_nsec = (msec % 1000) * 1000000;
}
public Timespec(Timespec ts) {
copyFrom(ts);
}
public long toMillis() {
return tv_sec * 1000 + (tv_nsec / 1000000);
}
public void copyFrom(Timespec ts) {
tv_sec = ts.tv_sec;
tv_nsec = ts.tv_nsec;
}
@Override
public PosixPointer read32(PosixPointer ptr) {
PosixPointer p = ptr;
tv_sec = Integer.toUnsignedLong(p.getI32());
p = p.add(4);
tv_nsec = Integer.toUnsignedLong(p.getI32());
return p.add(4);
}
@Override
public PosixPointer read64(PosixPointer ptr) {
PosixPointer p = ptr;
tv_sec = p.getI64();
p = p.add(8);
tv_nsec = p.getI64();
return p.add(8);
}
@Override
public PosixPointer write32(PosixPointer ptr) {
PosixPointer p = ptr;
p.setI32((int) tv_sec);
p = p.add(4);
p.setI32((int) tv_nsec);
return p.add(4);
}
@Override
public PosixPointer write64(PosixPointer ptr) {
PosixPointer p = ptr;
p.setI64(tv_sec);
p = p.add(8);
p.setI64(tv_nsec);
return p.add(8);
}
@Override
public String toString() {
return String.format("{tv_sec=%d,tv_nsec=%d}", tv_sec, tv_nsec);
}
}
|
[
"pekarekdaniel@gmail.com"
] |
pekarekdaniel@gmail.com
|
f32330d9c58da086ad37186be9cb11c55881953e
|
d47e5806106f89d880d036507ee0835a7ed2dbb0
|
/ktf-file-parser/src/test/java/com/ktf/parser/sample/fixed/Customer.java
|
7c95830ef24d01805b45d7641710bf567ef3a20a
|
[] |
no_license
|
kivilu/ktf
|
8b59198d8fb096961c92fe395a7f266b9ed350af
|
adf55e6a8f9c0b6c1965cbb391a9c189318ee0ca
|
refs/heads/master
| 2020-03-19T06:37:06.396632
| 2019-03-14T09:10:20
| 2019-03-14T09:10:20
| 136,039,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,268
|
java
|
/*
* Customer.java
*
* Copyright (C) 2007 Felipe Gon�alves Coury <felipe.coury@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.ktf.parser.sample.fixed;
import java.util.Date;
import com.ktf.parser.annotations.FieldAlign;
import com.ktf.parser.annotations.FieldConverter;
import com.ktf.parser.annotations.FieldFixedLength;
import com.ktf.parser.annotations.FieldOptional;
import com.ktf.parser.annotations.FieldTrim;
import com.ktf.parser.annotations.FixedLengthRecord;
import com.ktf.parser.enums.AlignMode;
import com.ktf.parser.enums.ConverterKind;
import com.ktf.parser.enums.TrimMode;
import com.ktf.parser.helpers.StringHelper;
@FixedLengthRecord( )
public class Customer {
@FieldFixedLength( 4 )
private Integer custId;
@FieldAlign( alignMode = AlignMode.Right )
@FieldFixedLength( 20 )
private String name;
@FieldFixedLength( 3 )
private Integer rating;
@FieldTrim( trimMode = TrimMode.Right )
@FieldFixedLength( 10 )
@FieldConverter( converter = ConverterKind.Date, format = "dd-MM-yyyy" )
private Date addedDate;
@FieldFixedLength( 3 )
@FieldOptional
private String stockSimbol;
@Override
public String toString() {
String l = System.getProperty("line.separator");
StringBuffer b = new StringBuffer();
b.append("Customer: ").append(l);
b.append(" custId = " + custId).append(l);
b.append(" name = " + name).append(l);
b.append(" rating = " + rating).append(l);
b.append(" addedDate = " + addedDate).append(l);
b.append(" stockSimbol = " + stockSimbol).append(l);
return StringHelper.toStringBuilder(this, b.toString());
}
public Integer getCustId() {
return custId;
}
public void setCustId( Integer custId ) {
this.custId = custId;
}
public String getName() {
return name;
}
public void setName( String name ) {
this.name = name;
}
public Integer getRating() {
return rating;
}
public void setRating( Integer rating ) {
this.rating = rating;
}
public Date getAddedDate() {
return addedDate;
}
public void setAddedDate( Date addedDate ) {
this.addedDate = addedDate;
}
public String getStockSimbol() {
return stockSimbol;
}
public void setStockSimbol( String stockSimbol ) {
this.stockSimbol = stockSimbol;
}
}
|
[
"michael_0877@163.com"
] |
michael_0877@163.com
|
b3911d4f7da7a8e2b4bae93b5b2858f03159ec90
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/orientechnologies--orientdb/1e1162ad7a27fbe58fc90ef2608bfc2ea3dec8f9/after/SecMaskTest.java
|
84697c2217a4b6852abfb5cecad75cc5382c0e46
|
[] |
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
| 3,576
|
java
|
package com.orientechnologies.orient.test.database.users;
import java.util.List;
import org.testng.annotations.Test;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.intent.OIntentMassiveInsert;
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import com.orientechnologies.orient.core.storage.OStorage;
import com.orientechnologies.orient.core.tx.OTransaction.TXTYPE;
public class SecMaskTest {
private static ODatabaseDocumentTx database;
@Test
public static void main(String[] args) {
database = new ODatabaseDocumentTx("local:/tmp/secmask/secmask");
if (database.exists())
database.open("admin", "admin");
else {
database.create();
create();
}
// insert();
query();
}
public static void insert() {
database.declareIntent(new OIntentMassiveInsert());
database.begin(TXTYPE.NOTX);
long ndoc = 1000000;
ODocument doc = new ODocument();
System.out.println("Inserting " + ndoc + " docs...");
long block = System.nanoTime();
for (long i = 1; i <= ndoc; i++) {
doc.field("id", i);
doc.field("val1", 4.0d);
doc.field("val2", 5.0d);
doc.field("val3", 6.0f);
doc.field("val4", 255);
doc.field("val5", "this is the description for a long comic books -" + i);
doc.field("name", "this is secmask put on top - " + i);
doc.setClassName("Account");
doc.setDatabase(database);
doc.save();
doc.reset();
if (i % 100000 == 0) {
double time = (double) (System.nanoTime() - block) / 1000000;
System.out.println(i * 100 / ndoc + "%.\t" + time + "\t" + 100000.0d / time + " docs/ms");
block = System.nanoTime();
}
}
database.commit();
System.out.println("Insertion done, now indexing ids...");
block = System.nanoTime();
// CREATE THE INDEX AT THE END
database.getMetadata().getSchema().getClass("Account").getProperty("id").createIndex(OClass.INDEX_TYPE.UNIQUE);
System.out.println("Indexing done in: " + (System.nanoTime() - block) / 1000000 + "ms");
}
public static void query() {
System.out.println("Querying docs...");
// List<ODocument> result = database.query(new ONativeSynchQuery<ODocument, OQueryContextNativeSchema<ODocument>>(database,
// "Account", new OQueryContextNativeSchema<ODocument>()) {
// @Override
// public boolean filter(OQueryContextNativeSchema<ODocument> iRecord) {
// return iRecord.field("id").eq(1000l).field("name").go();
// }
// });
long start = System.currentTimeMillis();
List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>("SELECT FROM Account WHERE id = " + 100999));
System.out.println("Elapsed: " + (System.currentTimeMillis() - start));
System.out.println("Query done");
for (ODocument o : result) {
System.out.println("id=" + o.field("id") + "\tname=" + o.field("name"));
}
}
public static void create() {
OClass account = database.getMetadata().getSchema()
.createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
account.createProperty("id", OType.LONG);
account.createProperty("val1", OType.DOUBLE);
account.createProperty("val2", OType.DOUBLE);
account.createProperty("val3", OType.FLOAT);
account.createProperty("val4", OType.SHORT);
account.createProperty("val5", OType.STRING);
account.createProperty("name", OType.STRING);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
95466522f5ea8be6ccff4f6c04e40b033a7da8d7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_952170b3cac1e7ffac230c9e0819a62fbd2dc154/MinecraftDownloadUtils/2_952170b3cac1e7ffac230c9e0819a62fbd2dc154_MinecraftDownloadUtils_s.java
|
07d88cc54575283ab9a7f8c11c233af44192dd7d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,375
|
java
|
package org.spoutcraft.launcher;
import java.io.File;
import java.io.IOException;
import org.spoutcraft.diff.JBPatch;
import org.spoutcraft.launcher.async.Download;
import org.spoutcraft.launcher.async.DownloadListener;
public class MinecraftDownloadUtils {
public static void downloadMinecraft(String user, String output, ModpackBuild build, DownloadListener listener) throws IOException {
String requiredMinecraftVersion = build.getMinecraftVersion();
if (downloadMinecraftVersion(requiredMinecraftVersion, listener))
return;
int tries = 3;
File outputFile = null;
while (tries > 0) {
Util.logi("Starting download of minecraft, with %s trie(s) remaining", tries);
tries--;
Download download = new Download(build.getMinecraftURL(user), output);
download.setListener(listener);
download.run();
if (!download.isSuccess()) {
if (download.getOutFile() != null) {
download.getOutFile().delete();
}
System.err.println("Download of minecraft failed!");
listener.stateChanged("Download Failed, retries remaining: " + tries, 0F);
} else {
String resultMD5 = MD5Utils.getMD5(download.getOutFile());
String minecraftVersion = MD5Utils.getMinecraftMD5(resultMD5);
GameUpdater.copy(download.getOutFile(), new File(GameUpdater.cacheDir, "minecraft_" + minecraftVersion + ".jar"));
if (minecraftVersion != null) {
Util.log("Downloaded 'minecraft.jar' matches MD5 of version '%s'.", minecraftVersion);
} else {
Util.log("Downloaded 'minecraft.jar' does not matche MD5 of any known minecraft version!");
continue;
}
if (!minecraftVersion.equals(requiredMinecraftVersion)) {
if (downloadMinecraftVersion(requiredMinecraftVersion, listener))
return;
} else {
outputFile = download.getOutFile();
break;
}
}
}
if (outputFile == null) { throw new IOException("Failed to download minecraft"); }
GameUpdater.copy(outputFile, new File(GameUpdater.cacheDir, "minecraft_" + requiredMinecraftVersion + ".jar"));
}
public static boolean downloadMinecraftVersion(String requiredMinecraftVersion, DownloadListener listener) {
String latestCached = MinecraftYML.getLatestCachedMinecraft();
if (MinecraftYML.compareVersions(requiredMinecraftVersion, latestCached) > 0)
return false;
for (String cachedVersion : MinecraftYML.getCachedMinecraftVersions()) {
if (MD5Utils.getMD5FromList("Patches/Minecraft/minecraft_"+cachedVersion+"-"+requiredMinecraftVersion+".patch") != null)
return downgradeFrom(cachedVersion, requiredMinecraftVersion, listener);
}
return false;
}
private static boolean downgradeFrom(String cachedVersion, String requiredMinecraftVersion, DownloadListener listener) {
File patch = new File(GameUpdater.tempDir, "mc.patch");
String patchURL = MirrorUtils.getMirrorUrl("Patches/Minecraft/minecraft_"+cachedVersion+"-"+requiredMinecraftVersion+".patch", null);
File cachedFile = new File(GameUpdater.cacheDir, "minecraft_" + cachedVersion + ".jar");
File requiredFile = new File(GameUpdater.cacheDir, "minecraft_" + requiredMinecraftVersion + ".jar");
Download patchDownload;
try {
patchDownload = DownloadUtils.downloadFile(patchURL, patch.getPath(), null, null, listener);
if (patchDownload.isSuccess()) {
File patchedMinecraft = new File(GameUpdater.tempDir, "patched_minecraft.jar");
patchedMinecraft.delete();
listener.stateChanged(String.format("Patching Minecraft to '%s'.", requiredMinecraftVersion), 0F);
JBPatch.bspatch(cachedFile, patchedMinecraft, patch);
listener.stateChanged(String.format("Patched Minecraft to '%s'.", requiredMinecraftVersion), 100F);
String currentMinecraftMD5 = MD5Utils.getMD5(FileType.minecraft, requiredMinecraftVersion);
String resultMD5 = MD5Utils.getMD5(patchedMinecraft);
Util.log("Comapring new jar md5 '%s' to stored md5 '%s'.", resultMD5, currentMinecraftMD5);
if (currentMinecraftMD5.equals(resultMD5)) {
GameUpdater.copy(patchedMinecraft, requiredFile);
patchedMinecraft.delete();
patch.deleteOnExit();
patch.delete();
return true;
}
}
} catch (IOException e) {
}
return false;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
43dc67d90e3939d9da58f7f26b12e94372d76136
|
8ba7e66ca0c880a5b251e76309382e1bac17c3bd
|
/code/client/corepower/helloworld-coolsql/src/com/coolsql/pub/editable/CloseWindowListener.java
|
1b4e611d11ae389f50313a534ea9e4094eda0d0f
|
[] |
no_license
|
gongweichuan/gongweichuan
|
b80571d21f8d8d00163fc809ed36aae78887ae40
|
65c4033f95257cd8f33bfd5723ba643291beb8ca
|
refs/heads/master
| 2016-09-05T20:12:18.033880
| 2013-04-09T15:53:28
| 2013-04-09T15:53:28
| 34,544,114
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,138
|
java
|
/**
*
*/
package com.coolsql.pub.editable;
import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JOptionPane;
/**
* @author kenny liu
*该类完成关闭窗口的动作,前提是不执行任何特定的逻辑。可以设置在关闭窗口前是否提示。
* 2007-11-6 create
*/
public class CloseWindowListener extends WindowAdapter {
private Window window; //被关闭的窗口对象
private boolean isPrompt; //关闭时是否进行提示(true:提示,false:部提示)
/**
* 该构造方法默认不进行信息提示。
* @param w --被关闭的窗口
*/
public CloseWindowListener(Window w)
{
this(w,false);
}
public CloseWindowListener(Window w,boolean isPrompt)
{
super();
this.window=w;
this.isPrompt=isPrompt;
}
public void windowClosing(WindowEvent e)
{
if(isPrompt)
{
int r=JOptionPane.showConfirmDialog(window, "","please confirm",JOptionPane.OK_CANCEL_OPTION);
if(r==JOptionPane.OK_OPTION)
window.dispose();
else
return;
}else
window.dispose();
}
}
|
[
"gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a"
] |
gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a
|
96cba202381ef8e45007685745c01967a8cfc20e
|
6f31629748be043b5fef7e05c2c00b2cc0534d3f
|
/src/interfaces/RandomDoubles.java
|
258295b7ea051e259712629fcc707c7a08955a22
|
[] |
no_license
|
lyzkhqby/ThinkInJava
|
a7ecf6278bea97bc30ec27233a786efdd8c3df3a
|
a90668a5f23c01d83f51b6953f6a0144451ed329
|
refs/heads/master
| 2021-05-04T18:37:36.503063
| 2018-04-12T07:14:41
| 2018-04-12T07:14:41
| 120,162,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 378
|
java
|
package interfaces;
import java.util.Random;
public class RandomDoubles {
private static Random rand = new Random(47);
public double next() {
return rand.nextDouble();
}
public static void main(String[] args) {
RandomDoubles rd = new RandomDoubles();
for (int i = 0; i < 7; i++)
System.out.println(rd.next() + " ");
}
}
|
[
"lyzkhqby@sina.com"
] |
lyzkhqby@sina.com
|
45a2ade8907dcfed67b6fc8d35870098a718c1b9
|
492ab60eaa5619551af16c79c569bdb704b4d231
|
/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java
|
c8a26413117874bfa7f3cfb19ef3f76491678467
|
[] |
no_license
|
ddcjackm/plantuml
|
36b89d07401993f6cbb109c955db4ab10a47ac78
|
4638f93975a0af9374cec8200d16e1fa180dafc2
|
refs/heads/master
| 2021-01-12T22:34:56.588483
| 2016-07-25T19:25:28
| 2016-07-25T19:25:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,395
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* This file is part of PlantUML.
*
* PlantUML 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.
*
* PlantUML 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 19109 $
*
*/
package net.sourceforge.plantuml.classdiagram.command;
import java.util.List;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.command.SingleLineCommand;
import net.sourceforge.plantuml.cucadiagram.Code;
import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
public class CommandStereotype extends SingleLineCommand<ClassDiagram> {
public CommandStereotype() {
super("(?i)^([\\p{L}0-9_.]+|[%g][^%g]+[%g])[%s]*(\\<\\<.*\\>\\>)$");
}
@Override
protected CommandExecutionResult executeArg(ClassDiagram diagram, List<String> arg) {
final Code code = Code.of(arg.get(0));
final String stereotype = arg.get(1);
final IEntity entity = diagram.getOrCreateLeaf(code, null, null);
entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram
.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet()));
return CommandExecutionResult.ok();
}
}
|
[
"plantuml@gmail.com"
] |
plantuml@gmail.com
|
8965428a765f5f3c5009040ac6fad964696aabab
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_35aa10e74528cc4af5938c651bf029996c29b2d5/ProductControllerImpl/9_35aa10e74528cc4af5938c651bf029996c29b2d5_ProductControllerImpl_t.java
|
fa082eeba5fa5b36a3085a02535dfa7b1c7f557d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,275
|
java
|
package devopsdistilled.operp.client.items.controllers.impl;
import javax.inject.Inject;
import devopsdistilled.operp.client.items.controllers.ProductController;
import devopsdistilled.operp.client.items.models.ProductModel;
import devopsdistilled.operp.client.items.panes.controllers.CreateProductPaneController;
import devopsdistilled.operp.client.items.panes.controllers.EditProductPaneController;
import devopsdistilled.operp.client.items.panes.controllers.ListProductPaneController;
import devopsdistilled.operp.server.data.entity.items.Product;
public class ProductControllerImpl implements ProductController {
@Inject
private ProductModel productModel;
@Inject
private CreateProductPaneController createProductPaneController;
@Inject
private ListProductPaneController listProductPaneController;
@Inject
private EditProductPaneController editProductPaneController;
@Override
public void create() {
createProductPaneController.init();
}
@Override
public void edit(Product product) {
editProductPaneController.init(product);
}
@Override
public void list() {
listProductPaneController.init();
}
@Override
public void delete(Product product) {
productModel.deleteAndUpdateModel(product);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ce0c75cfc2f497327ecedec82d5e16254f5e7ea3
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2010-06-20/seasar2-2.4.42/seasar2/s2-framework/src/main/java/org/seasar/framework/util/JarInputStreamUtil.java
|
1b38d0473bd9d221b76aaca16706972a66575579
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,283
|
java
|
/*
* Copyright 2004-2010 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import org.seasar.framework.exception.IORuntimeException;
/**
* {@link JarInputStream}用のユーティリティクラスです。
*
* @author koichik
*/
public class JarInputStreamUtil {
/**
* インスタンスを構築します。
*/
protected JarInputStreamUtil() {
}
/**
* {@link JarInputStream}を作成します。
*
* @param is
* @return {@link JarInputStream}
* @throws IORuntimeException
* {@link IOException}が発生した場合
* @see JarInputStream#JarInputStream(InputStream)
*/
public static JarInputStream create(final InputStream is)
throws IORuntimeException {
try {
return new JarInputStream(is);
} catch (final IOException e) {
throw new IORuntimeException(e);
}
}
/**
* {@link JarInputStream#getNextJarEntry()}の例外処理をラップするメソッドです。
*
* @param is
* @return {@link JarEntry}
* @throws IORuntimeException
* {@link IOException}が発生した場合
* @see JarInputStream#getNextJarEntry()
*/
public static JarEntry getNextJarEntry(final JarInputStream is)
throws IORuntimeException {
try {
return is.getNextJarEntry();
} catch (final IOException e) {
throw new IORuntimeException(e);
}
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
c7dd60dacaeeb08e4bccef8b444144300a4ba04a
|
02e505daba8aeda37adc723a45120592eb4ed074
|
/src/com/facebook/buck/android/AndroidBundleFactory.java
|
687fcb532d58da215e9e92e756aa9173eec3679f
|
[
"Apache-2.0"
] |
permissive
|
tokopedia/buck
|
14e5a6d859abe3cc46f47839a55ea8db6f89606e
|
42cbcaad9039aaeb13b71feda410c97292da9577
|
refs/heads/master
| 2023-01-10T00:38:59.788692
| 2022-08-02T09:29:47
| 2022-08-02T09:29:47
| 186,541,181
| 0
| 3
|
Apache-2.0
| 2023-01-05T02:20:46
| 2019-05-14T03:54:19
|
Java
|
UTF-8
|
Java
| false
| false
| 5,614
|
java
|
/*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.android;
import com.facebook.buck.android.FilterResourcesSteps.ResourceFilter;
import com.facebook.buck.android.exopackage.ExopackageMode;
import com.facebook.buck.android.toolchain.AndroidPlatformTarget;
import com.facebook.buck.android.toolchain.AndroidSdkLocation;
import com.facebook.buck.core.cell.CellPathResolver;
import com.facebook.buck.core.exceptions.HumanReadableException;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.Flavor;
import com.facebook.buck.core.model.InternalFlavor;
import com.facebook.buck.core.rules.ActionGraphBuilder;
import com.facebook.buck.core.rules.BuildRule;
import com.facebook.buck.core.rules.BuildRuleParams;
import com.facebook.buck.core.toolchain.ToolchainProvider;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.jvm.core.JavaLibrary;
import com.facebook.buck.jvm.java.JavaOptions;
import com.facebook.buck.jvm.java.Keystore;
import com.google.common.collect.ImmutableSortedSet;
import java.util.EnumSet;
import java.util.Optional;
public class AndroidBundleFactory {
private static final Flavor ANDROID_MODULARITY_VERIFICATION_FLAVOR =
InternalFlavor.of("modularity_verification");
private final AndroidBuckConfig androidBuckConfig;
public AndroidBundleFactory(AndroidBuckConfig androidBuckConfig) {
this.androidBuckConfig = androidBuckConfig;
}
public AndroidBundle create(
ToolchainProvider toolchainProvider,
ProjectFilesystem projectFilesystem,
ActionGraphBuilder graphBuilder,
CellPathResolver cellPathResolver,
BuildTarget buildTarget,
BuildRuleParams params,
AndroidBinaryGraphEnhancer graphEnhancer,
DexSplitMode dexSplitMode,
EnumSet<ExopackageMode> exopackageModes,
ResourceFilter resourceFilter,
ImmutableSortedSet<JavaLibrary> rulesToExcludeFromDex,
AndroidBundleDescriptionArg args,
JavaOptions javaOptions) {
BuildRule keystore = graphBuilder.getRule(args.getKeystore());
if (!(keystore instanceof Keystore)) {
throw new HumanReadableException(
"In %s, keystore='%s' must be a keystore() but was %s().",
buildTarget, keystore.getFullyQualifiedName(), keystore.getType());
}
ProGuardObfuscateStep.SdkProguardType androidSdkProguardConfig =
args.getAndroidSdkProguardConfig().orElse(ProGuardObfuscateStep.SdkProguardType.NONE);
AndroidGraphEnhancementResult result = graphEnhancer.createAdditionalBuildables();
AndroidBinaryFilesInfo filesInfo =
new AndroidBinaryFilesInfo(result, exopackageModes, args.isPackageAssetLibraries());
Optional<BuildRule> moduleVerification;
if (args.getAndroidAppModularityResult().isPresent()) {
moduleVerification =
Optional.of(
new AndroidAppModularityVerification(
graphBuilder,
buildTarget.withFlavors(ANDROID_MODULARITY_VERIFICATION_FLAVOR),
projectFilesystem,
args.getAndroidAppModularityResult().get(),
args.isSkipProguard(),
result.getDexFilesInfo().proguardTextFilesPath,
result.getPackageableCollection()));
graphBuilder.addToIndex(moduleVerification.get());
} else {
moduleVerification = Optional.empty();
}
return new AndroidBundle(
buildTarget,
projectFilesystem,
toolchainProvider.getByName(AndroidSdkLocation.DEFAULT_NAME, AndroidSdkLocation.class),
toolchainProvider.getByName(
AndroidPlatformTarget.DEFAULT_NAME, AndroidPlatformTarget.class),
params,
graphBuilder,
Optional.of(args.getProguardJvmArgs()),
(Keystore) keystore,
dexSplitMode,
args.getNoDx(),
androidSdkProguardConfig,
args.getOptimizationPasses(),
args.getProguardConfig(),
args.isSkipProguard(),
RedexArgsHelper.getRedexOptions(
androidBuckConfig,
buildTarget,
graphBuilder,
cellPathResolver,
args.getRedex(),
args.getRedexExtraArgs(),
args.getRedexConfig()),
args.getResourceCompression(),
args.getCpuFilters(),
resourceFilter,
exopackageModes,
rulesToExcludeFromDex,
result,
args.getXzCompressionLevel(),
args.isPackageAssetLibraries(),
args.isCompressAssetLibraries(),
args.getAssetCompressionAlgorithm(),
args.getManifestEntries(),
javaOptions.getJavaRuntimeLauncher(graphBuilder, buildTarget.getTargetConfiguration()),
args.getIsCacheable(),
moduleVerification,
filesInfo.getDexFilesInfo(),
filesInfo.getNativeFilesInfo(),
filesInfo.getResourceFilesInfo(),
ImmutableSortedSet.copyOf(result.getAPKModuleGraph().getAPKModules()),
filesInfo.getExopackageInfo(),
args.getBundleConfigFile());
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
46986476dbc0dd7985c8b904dc9343a35b8d82e7
|
99b7666953bc1106a30d379c10c05d1236c01def
|
/hibernate-solution/src/main/java/com/htp/basumatarau/hibernate/dao/dto/EmployeeDetailDTO.java
|
3018be648a764f94de3b4445ae7becf42cdbc4c4
|
[] |
no_license
|
basumatarau/task02
|
d2c0f4b74b462d82f82fa21e2e221b3e5666d98e
|
0c5d3f13b1e6ca53f5f3864fe55572ac1f819063
|
refs/heads/master
| 2022-12-04T14:28:51.176253
| 2019-08-21T07:22:28
| 2019-08-21T07:22:28
| 173,960,175
| 0
| 0
| null | 2022-11-24T07:40:48
| 2019-03-05T14:19:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,626
|
java
|
package com.htp.basumatarau.hibernate.dao.dto;
public class EmployeeDetailDTO {
private final String firstName;
private final String lastName;
private final String currentAddress;
private final String currentCity;
private final String currentCountry;
private final String company;
private final String city;
private final String country;
private final String address;
private final Long numStaff;
private final String jobPosition;
public EmployeeDetailDTO(String firstName,
String lastName,
String currentAddress,
String currentCity,
String currentCountry,
String company,
String city,
String country,
String address,
Long numStaff,
String jobPosition) {
this.firstName = firstName;
this.lastName = lastName;
this.currentAddress = currentAddress;
this.currentCity = currentCity;
this.currentCountry = currentCountry;
this.company = company;
this.city = city;
this.country = country;
this.address = address;
this.numStaff = numStaff;
this.jobPosition = jobPosition;
}
@Override
public String toString() {
return '\'' + firstName + " " + lastName + '\'' + " " +
'\'' + currentAddress + " " + currentCity + " " + currentCountry + '\'' +
" " + '\'' + company + '\'' +
" " + '\'' + city + '\'' +
" " + '\'' + country + '\'' +
" " + '\'' + address + '\'' +
", staff: " + numStaff +
", job:'" + jobPosition + '\'';
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getCurrentAddress() {
return currentAddress;
}
public String getCurrentCity() {
return currentCity;
}
public String getCurrentCountry() {
return currentCountry;
}
public String getCompany() {
return company;
}
public String getCity() {
return city;
}
public String getCountry() {
return country;
}
public String getAddress() {
return address;
}
public Long getNumStaff() {
return numStaff;
}
public String getJobPosition() {
return jobPosition;
}
}
|
[
"basumatarau@gmail.com"
] |
basumatarau@gmail.com
|
1381dfbe866540820d39ce9c33292e36588edbcd
|
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
|
/cards/src/main/java/org/rnd/jmagic/cards/OxiddaScrapmelter.java
|
4754b555875c9f23a989f327a5d9c10d96e28ac7
|
[] |
no_license
|
NorthFury/jmagic
|
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
|
efe53d9d02716cc215456e2794a43011759322d9
|
refs/heads/master
| 2020-05-28T11:04:50.631220
| 2014-06-17T09:48:44
| 2014-06-17T09:48:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
package org.rnd.jmagic.cards;
import static org.rnd.jmagic.Convenience.*;
import org.rnd.jmagic.engine.*;
import org.rnd.jmagic.engine.generators.*;
@Name("Oxidda Scrapmelter")
@Types({Type.CREATURE})
@SubTypes({SubType.BEAST})
@ManaCost("3R")
@Printings({@Printings.Printed(ex = Expansion.SCARS_OF_MIRRODIN, r = Rarity.UNCOMMON)})
@ColorIdentity({Color.RED})
public final class OxiddaScrapmelter extends Card
{
public static final class OxiddaScrapmelterAbility0 extends EventTriggeredAbility
{
public OxiddaScrapmelterAbility0(GameState state)
{
super(state, "When Oxidda Scrapmelter enters the battlefield, destroy target artifact.");
this.addPattern(whenThisEntersTheBattlefield());
SetGenerator target = targetedBy(this.addTarget(ArtifactPermanents.instance(), "target artifact"));
this.addEffect(destroy(target, "Destroy target artifact."));
}
}
public OxiddaScrapmelter(GameState state)
{
super(state);
this.setPower(3);
this.setToughness(3);
// When Oxidda Scrapmelter enters the battlefield, destroy target
// artifact.
this.addAbility(new OxiddaScrapmelterAbility0(state));
}
}
|
[
"robyter@gmail"
] |
robyter@gmail
|
82ccb43393b8725fdee0f1132de1404708ba53a7
|
12a18a1fb033d97f4ec0251f61078733cfd8c63f
|
/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/SingleTabModel.java
|
63e45558fb41455eb09a894908b49fb88670a2b6
|
[
"BSD-3-Clause"
] |
permissive
|
compliment/chromium
|
ddb080627e8a5e75030a2ff2ef296f858e336f0e
|
bcd6a141ba148374c5b17135e2b61eef5bb32992
|
refs/heads/master
| 2023-01-13T00:01:38.156170
| 2019-12-19T05:36:59
| 2019-12-19T05:36:59
| 228,990,557
| 0
| 0
|
BSD-3-Clause
| 2019-12-19T06:32:50
| 2019-12-19T06:32:49
| null |
UTF-8
|
Java
| false
| false
| 5,563
|
java
|
// Copyright 2015 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.tabmodel;
import android.app.Activity;
import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ObserverList;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabImpl;
import org.chromium.chrome.browser.tab.TabLaunchType;
import org.chromium.chrome.browser.tab.TabSelectionType;
import java.util.List;
/**
* Simple TabModel that assumes that only one Tab exists.
*/
public class SingleTabModel implements TabModel {
private final Activity mActivity;
private final ObserverList<TabModelObserver> mObservers = new ObserverList<>();
private Tab mTab;
private boolean mIsIncognito;
SingleTabModel(Activity activity, boolean incognito) {
mActivity = activity;
mIsIncognito = incognito;
}
/**
* Sets the Tab that is managed by the SingleTabModel.
* @param tab Tab to manage.
*/
void setTab(Tab tab) {
if (mTab == tab) return;
Tab oldTab = mTab;
mTab = tab;
if (oldTab != null) {
for (TabModelObserver observer : mObservers) {
observer.willCloseTab(oldTab, false);
}
}
if (tab != null) {
assert mTab.isIncognito() == mIsIncognito;
for (TabModelObserver observer : mObservers) {
observer.didAddTab(tab, TabLaunchType.FROM_LINK);
observer.didSelectTab(tab, TabSelectionType.FROM_USER, Tab.INVALID_TAB_ID);
}
int state = ApplicationStatus.getStateForActivity(mActivity);
if (state == ActivityState.CREATED || state == ActivityState.STARTED
|| state == ActivityState.RESUMED) {
mTab.show(TabSelectionType.FROM_USER);
}
}
if (oldTab != null && oldTab.isInitialized()) {
for (TabModelObserver observer : mObservers) {
observer.didCloseTab(oldTab.getId(), oldTab.isIncognito());
}
oldTab.destroy();
}
}
@Override
public Profile getProfile() {
return mTab == null ? null : ((TabImpl) mTab).getProfile();
}
@Override
public boolean isIncognito() {
return mIsIncognito;
}
@Override
public int getCount() {
return mTab == null ? 0 : 1;
}
@Override
public int indexOf(Tab tab) {
if (tab == null) return INVALID_TAB_INDEX;
return mTab != null && mTab.getId() == tab.getId() ? 0 : INVALID_TAB_INDEX;
}
@Override
public int index() {
return mTab != null ? 0 : INVALID_TAB_INDEX;
}
@Override
public boolean closeTab(Tab tab) {
return closeTab(tab, false, false, false);
}
@Override
public boolean closeTab(Tab tab, boolean animate, boolean uponExit, boolean canUndo) {
if (mTab == null || mTab.getId() != tab.getId()) return false;
setTab(null);
return true;
}
@Override
public boolean closeTab(
Tab tab, Tab recommendedNextTab, boolean animate, boolean uponExit, boolean canUndo) {
return closeTab(tab, animate, uponExit, canUndo);
}
@Override
public void closeMultipleTabs(List<Tab> tabs, boolean canUndo) {
if (mTab == null) return;
for (Tab tab : tabs) {
if (tab.getId() == mTab.getId()) {
setTab(null);
return;
}
}
}
@Override
public void closeAllTabs() {
closeAllTabs(true, false);
}
@Override
public void closeAllTabs(boolean allowDelegation, boolean uponExit) {
setTab(null);
}
// Tab retrieval functions.
@Override
public Tab getTabAt(int position) {
return position == 0 ? mTab : null;
}
@Override
public void setIndex(int i, final @TabSelectionType int type) {
assert i == 0;
}
@Override
public boolean isCurrentModel() {
return true;
}
@Override
public void moveTab(int id, int newIndex) {
assert false;
}
@Override
public void destroy() {
if (mTab != null) mTab.destroy();
mTab = null;
}
@Override
public Tab getNextTabIfClosed(int id) {
return null;
}
@Override
public boolean isClosurePending(int tabId) {
return false;
}
@Override
public TabList getComprehensiveModel() {
return this;
}
@Override
public void commitAllTabClosures() {}
@Override
public void commitTabClosure(int tabId) {}
@Override
public void cancelTabClosure(int tabId) {}
@Override
public boolean supportsPendingClosures() {
return false;
}
@Override
public void addTab(Tab tab, int index, @TabLaunchType int type) {
setTab(tab);
}
@Override
public void removeTab(Tab tab) {
mTab = null;
for (TabModelObserver obs : mObservers) obs.tabRemoved(tab);
}
@Override
public void addObserver(TabModelObserver observer) {
mObservers.addObserver(observer);
}
@Override
public void removeObserver(TabModelObserver observer) {
mObservers.removeObserver(observer);
}
@Override
public void openMostRecentlyClosedTab() {}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
a0427d40393ed2e74b40af699e8a846e68e3de10
|
409bdfcaa53e73a69c816da3605001c6e0e7042d
|
/1.JavaSyntax/src/com/javarush/task/task04/task0442/Solution.java
|
357d203cb2ac8a113358b3ed49ee290e28a53134
|
[] |
no_license
|
sebelousov/javarushtasks
|
2a4c8ebcdba94196276b61688bb73ccf2cad039e
|
2710a327278ba04b40637cd5918491ef70ced117
|
refs/heads/master
| 2023-03-25T09:41:19.840213
| 2021-03-24T13:56:49
| 2021-03-24T13:56:49
| 351,092,038
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 700
|
java
|
package com.javarush.task.task04.task0442;
/*
Суммирование
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
/*BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int sum = 0;
for ( ; true; ){
String x = reader.readLine();
if (x.equals("-1")){
System.out.println(sum);
break;
}
else{
sum = sum + Integer.parseInt(x);
}
}*/
String hello = "Hello, world!";
System.out.println(hello);
//напишите тут ваш код
}
}
|
[
"bsn@list.ru"
] |
bsn@list.ru
|
16fd8ac35e80628925feee661574fbc8fec89e68
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/434/CtJavaDocTag.java
|
da8d741339682740c7025aa5efdc51505961db93
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,363
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.reflect.code;
import spoon.reflect.declaration.CtElement;
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;
import static spoon.reflect.path.CtRole.COMMENT_CONTENT;
import static spoon.reflect.path.CtRole.JAVADOC_TAG_VALUE;
import static spoon.reflect.path.CtRole.DOCUMENTATION_TYPE;
/**
* This code element defines a javadoc tag
*
* Example:
* <code>
* @since name description
* </code>
*/
public interface CtJavaDocTag extends CtElement {
/**
* The tag prefix
*/
String JAVADOC_TAG_PREFIX = "@";
/**
* Define the possible type for a tag
*/
enum TagType {
AUTHOR,
DEPRECATED,
EXCEPTION ,
PARAM,
RETURN,
SEE,
SERIAL,
SERIAL_DATA,
SERIAL_FIELD,
SINCE,
THROWS,
VERSION,
UNKNOWN;
/**
* Return true if the tag can have a parameter
* @return true if the tag can have a parameter
*/
public boolean hasParam() {
return this == PARAM || this == THROWS;
}
/**
* Get the tag type associated to a name
* @param tagName the tag name
* @return the tag type
*/
public static TagType tagFromName(String tagName) {
for (TagType t : TagType.values()) {
if (t.name().toLowerCase().equals(tagName.toLowerCase())) {
return t;
}
}
return UNKNOWN;
}
@Override
public String toString() {
return JAVADOC_TAG_PREFIX + name().toLowerCase();
}
}
/**
* The type of the tag
* @return the type of the tag
*/
@PropertyGetter(role = DOCUMENTATION_TYPE)
TagType getType();
/**
* Define the type of the tag
* @param type the type name
*/
@PropertySetter(role = DOCUMENTATION_TYPE)
<E extends CtJavaDocTag> E setType(String type);
/**
* Define the type of the tag
* @param type the new type
*/
@PropertySetter(role = DOCUMENTATION_TYPE)
<E extends CtJavaDocTag> E setType(TagType type);
/**
* Get the content of the atg
* @return the content of the tag
*/
@PropertyGetter(role = COMMENT_CONTENT)
String getContent();
/**
* Define the content of the tag
* @param content the new content of the tag
*/
@PropertySetter(role = COMMENT_CONTENT)
<E extends CtJavaDocTag> E setContent(String content);
/**
* Get the parameter of the tag return null when none is specified (only for @param and @throws)
* @return the parameter
*/
@PropertyGetter(role = JAVADOC_TAG_VALUE)
String getParam();
/**
* Define a parameter
* @param param the parameter
*/
@PropertySetter(role = JAVADOC_TAG_VALUE)
<E extends CtJavaDocTag> E setParam(String param);
@Override
CtJavaDocTag clone();
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
253447f8ca7bc5f77fa1ef57c986182956747c13
|
481a2ccdbaad190d02015f2e99eebe41415b956c
|
/Core/SDK/org.emftext.sdk.codegen.resource.ui/src/org/emftext/sdk/codegen/resource/ui/generators/ui/QuickAssistAssistantGenerator.java
|
6d5e808df7a1e3baf116fc1c0d57c51c54a7bd4b
|
[] |
no_license
|
balazsgrill/EMFText
|
2f3d5eb1ac9d794325b61a8bbea2e1d2c7d4b279
|
cbbf0f472f5a4ab7222c7d9df9cb0962dac989da
|
refs/heads/master
| 2020-12-30T18:38:38.790410
| 2013-04-24T10:03:32
| 2013-04-24T10:03:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,614
|
java
|
/*******************************************************************************
* Copyright (c) 2006-2012
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
******************************************************************************/
package org.emftext.sdk.codegen.resource.ui.generators.ui;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.ABSTRACT_REUSABLE_INFORMATION_CONTROL_CREATOR;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.ANNOTATION;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.DEFAULT_INFORMATION_CONTROL;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.I_INFORMATION_CONTROL;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.I_INFORMATION_PRESENTER;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.I_QUICK_ASSIST_ASSISTANT;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.I_QUICK_ASSIST_INVOCATION_CONTEXT;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.QUICK_ASSIST_ASSISTANT;
import static org.emftext.sdk.codegen.resource.ui.IUIClassNameConstants.SHELL;
import org.emftext.sdk.codegen.composites.JavaComposite;
import org.emftext.sdk.codegen.parameters.ArtifactParameter;
import org.emftext.sdk.codegen.resource.GenerationContext;
import org.emftext.sdk.codegen.resource.ui.generators.UIJavaBaseGenerator;
public class QuickAssistAssistantGenerator extends UIJavaBaseGenerator<ArtifactParameter<GenerationContext>> {
public void generateJavaContents(JavaComposite sc) {
sc.add("package " + getResourcePackageName() + ";");
sc.addLineBreak();
sc.add("public class " + getResourceClassName() + " extends " + QUICK_ASSIST_ASSISTANT + " implements " + I_QUICK_ASSIST_ASSISTANT + " {");
sc.addLineBreak();
addConstructor(sc);
addCanAssistMethod(sc);
addCanFixMethod(sc);
sc.add("}");
}
private void addConstructor(JavaComposite sc) {
sc.add("public " + getResourceClassName() + "(" + iResourceProviderClassName + " resourceProvider, " + iAnnotationModelProviderClassName + " annotationModelProvider) {");
sc.add("setQuickAssistProcessor(new " + quickAssistProcessorClassName + "(resourceProvider, annotationModelProvider));");
sc.add("setInformationControlCreator(new " + ABSTRACT_REUSABLE_INFORMATION_CONTROL_CREATOR + "() {");
sc.add("public " + I_INFORMATION_CONTROL + " doCreateInformationControl(" + SHELL + " parent) {");
sc.add("return new " + DEFAULT_INFORMATION_CONTROL + "(parent, (" + I_INFORMATION_PRESENTER + ") null);");
sc.add("}");
sc.add("});");
sc.add("}");
sc.addLineBreak();
}
private void addCanAssistMethod(JavaComposite sc) {
sc.add("public boolean canAssist(" + I_QUICK_ASSIST_INVOCATION_CONTEXT + " invocationContext) {");
sc.add("return false;");
sc.add("}");
sc.addLineBreak();
}
private void addCanFixMethod(JavaComposite sc) {
sc.add("public boolean canFix(" + ANNOTATION + " annotation) {");
sc.add("return true;");
sc.add("}");
sc.addLineBreak();
}
}
|
[
"jendrik.johannes@devboost.de"
] |
jendrik.johannes@devboost.de
|
3672747dd8ee0062e45f5629257cfdc6d896df79
|
e3c912687a56e48fc7c6db2e95b644183f40b8f0
|
/src/main/java/iurii/job/interview/leetcode/FindKClosestElements.java
|
fa3aa0dbb119c1b268f72526c4540b45d7ec9e46
|
[
"MIT"
] |
permissive
|
dataronio/algorithms-1
|
00e11b0483eef96ab1b39bd39e00ab412d8e1e2c
|
ab3e08bd16203b077f4a600e31794d6d73303d68
|
refs/heads/master
| 2022-02-06T19:43:57.936282
| 2021-09-18T22:47:01
| 2021-09-18T22:47:01
| 158,045,329
| 0
| 0
|
MIT
| 2020-03-09T22:06:21
| 2018-11-18T03:07:59
|
Java
|
UTF-8
|
Java
| false
| false
| 3,764
|
java
|
package iurii.job.interview.leetcode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.PriorityQueue;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 658. Find K Closest Elements https://leetcode.com/problems/find-k-closest-elements/description/
*
* https://leetcode.com/articles/find-k-closest-elements/
*
* https://www.geeksforgeeks.org/find-k-closest-elements-given-value/
*
* Similar to {@link iurii.job.interview.amazon.KClosestPoints} but array already sorted
*
* Idea is similar in {@link FindSmallestLetterGreaterThanTarget}
*
* But in case already sorted array, no need to use PriorityQueue for sorting,
* just use two pointers
*
* Time complexity: O(log(N) + k) logarithmic for two pointers search
* Auxiliary space complexity: O(K) - two pointers + List to store k result elements
*/
public class FindKClosestElements {
/**
* For not sorted case Priority queue can be used
* Time complexity: O((N-k)*log(k))
* Auxiliary space complexity: O(k) - priority queue length
* ! Note in java default priority queue is unbounded.
* ! But bounded queue (only k elements) can be implemented or used from different libraries
*/
public List<Integer> findClosestElementsWithPriorityQueue(int[] arr, int k, int x) {
PriorityQueue<Pair> priorityQueue = new PriorityQueue<>();
for(int el : arr) {
Pair pair = new Pair(el);
pair.distance = Math.abs(el - x);
priorityQueue.add(pair);
}
return Stream.generate(priorityQueue::poll)
.limit(k).mapToInt(pair -> pair.value).sorted().boxed().collect(Collectors.toList());
}
public static class Pair implements Comparable<Pair> {
int value;
int distance;
Pair(int value) {
this.value = value;
}
@Override
public int compareTo(Pair o) {
int compare = Integer.compare(distance, o.distance);
return (compare == 0) ? Integer.compare(value, o.value) : compare;
}
}
/**
* For sorted array case two pointers with binary search can be used to find the window of k elements
*
* Time complexity: O(log(n) + k) - binary search + taking k found elements
* Auxiliary space complexity: O(k) - two pointers + list of k elements
*/
public List<Integer> findClosestElementsSortedWithTwoPointers(int[] arr, int k, int x) {
List<Integer> result = new ArrayList<>();
if (arr == null || arr.length == 0 || k <= 0) {
return result;
}
int low = 0;
int high = arr.length - k;
while (low < high) {
int middle = low + (high - low) / 2;
if (x - arr[middle] > arr[middle + k] - x) {
low = middle + 1;
} else {
high = middle;
}
}
for(int i = low; i < low + k; i++) {
result.add(arr[i]);
}
return result;
}
/**
* Solution with sorting with comparator and extracting first k values and sorting them
*
* Time complexity: O(n*log(n) + k*log(k)) sorting
* Auxiliary space complexity: O(1) in place sorting and k elements from list view
*
* Solution can be used for not sorted array as well
*/
public List<Integer> findClosestElementsWithSortingList(List<Integer> arr, int k, int x) {
if (arr == null || arr.size() == 0 || k <= 0) {
return new ArrayList<>();
}
arr.sort(Comparator.comparingInt(a -> Math.abs(a - x)));
arr = arr.subList(0, k);
Collections.sort(arr);
return arr;
}
}
|
[
"ydzyuban@gmail.com"
] |
ydzyuban@gmail.com
|
306b82e4b7f580aef59c72611b72a926ce4a621a
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/com/facebook/stetho/inspector/network/DefaultResponseHandler.java
|
c53b720b8a218af8017aea6fa55e241a2019b5ec
|
[] |
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
| 1,624
|
java
|
package com.facebook.stetho.inspector.network;
import java.io.IOException;
public class DefaultResponseHandler
implements ResponseHandler
{
private int mBytesRead = 0;
private int mDecodedBytesRead = -1;
private final NetworkEventReporter mEventReporter;
private final String mRequestId;
public DefaultResponseHandler(NetworkEventReporter paramNetworkEventReporter, String paramString)
{
this.mEventReporter = paramNetworkEventReporter;
this.mRequestId = paramString;
}
private void reportDataReceived()
{
NetworkEventReporter localNetworkEventReporter = this.mEventReporter;
String str = this.mRequestId;
int j = this.mBytesRead;
if (this.mDecodedBytesRead >= 0) {}
for (int i = this.mDecodedBytesRead;; i = this.mBytesRead)
{
localNetworkEventReporter.dataReceived(str, j, i);
return;
}
}
public void onEOF()
{
reportDataReceived();
this.mEventReporter.responseReadFinished(this.mRequestId);
}
public void onError(IOException paramIOException)
{
reportDataReceived();
this.mEventReporter.responseReadFailed(this.mRequestId, paramIOException.toString());
}
public void onRead(int paramInt)
{
this.mBytesRead += paramInt;
}
public void onReadDecoded(int paramInt)
{
if (this.mDecodedBytesRead == -1) {
this.mDecodedBytesRead = 0;
}
this.mDecodedBytesRead += paramInt;
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\facebook\stetho\inspector\network\DefaultResponseHandler.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
f268560a2cad19d00ab8c30dc6d676e2030b3337
|
6fb5fc73b3752fd83d1f77611ebc752e4745ce76
|
/app/src/main/java/com/appledroideirl/appuntomarcafreelancer/data/datasource/cloud/model/user/response/WsResponseAgregarDateAvailable.java
|
2901d83370b54d0f04879333047e835469020a5e
|
[] |
no_license
|
PierreCrow/RetoPractico
|
99227aa4cf499233e982e29ac48514ca0c18a53e
|
18ac623126fda2e5835ed3da7c693c917ba9a08d
|
refs/heads/master
| 2023-03-14T05:31:19.824183
| 2021-03-03T18:35:34
| 2021-03-03T18:35:34
| 347,413,876
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 870
|
java
|
package com.appledroideirl.appuntomarcafreelancer.data.datasource.cloud.model.user.response;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class WsResponseAgregarDateAvailable {
@SerializedName("entity")
@Expose
private int result;
@SerializedName("message")
@Expose
private String message = null;
@SerializedName("status")
@Expose
private int status;
public int getResult() {
return result;
}
public void setResult(int result) {
this.result = result;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}
|
[
"pierrecrow@gmail.com"
] |
pierrecrow@gmail.com
|
2ff3190f2d5f96b4635e86e74e6b6a22d3dadec5
|
c35500eea5b33131d911c05de69ec14184eda679
|
/soa-client/src/main/java/org/ebayopensource/turmeric/runtime/common/binding/Deserializer.java
|
c0d3e2d3403185681e24ea2125c779aa9b01d2c8
|
[
"Apache-2.0"
] |
permissive
|
ramananandh/MyPublicRepo
|
42b9fd2c1fce41fd0de9b828531aa4ada2c75185
|
686129c380f438f0858428cc19c2ebc7f5e6b13f
|
refs/heads/master
| 2020-06-06T17:49:41.818826
| 2011-08-29T06:34:07
| 2011-08-29T06:34:07
| 1,922,268
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,137
|
java
|
/*******************************************************************************
* Copyright (c) 2006-2010 eBay 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
*******************************************************************************/
package org.ebayopensource.turmeric.runtime.common.binding;
import javax.xml.stream.XMLStreamReader;
import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException;
import org.ebayopensource.turmeric.runtime.common.pipeline.InboundMessage;
/**
* Deserializer is responsible for managing the process of unmarshalling
* encoded data of a particular encoding, for example, schema xml,
* name-value, or JSON, into a Java content tree. It can also provide
* data encoding validation.
*
* @author smalladi
* @author wdeng
*/
public interface Deserializer {
/**
* Initiate deserialization of the specified inbound message value.
* @param msg the inbound message
* @param clazz the bound (target) type
* @return an object of the specified bound type
* @throws ServiceException Exception when deserialization fails.
*/
public Object deserialize(InboundMessage msg, Class<?> clazz) throws ServiceException;
/**
* Initiate deserialization of the specified inbound message value.
* @param msg the inbound message
* @param clazz the bound (target) type
* @param reader the XMLStreamReader to read in the payload.
* @return an object of the specified bound type
* @throws ServiceException Exception when deserialization fails.
*/
public Object deserialize(InboundMessage msg, Class<?> clazz, XMLStreamReader reader) throws ServiceException;
/**
* @deprecated
*
* For custom deserializer. This method returns the Class object of
* the top level java type this deserializer creates.
*
* @return The Class object of
* the top level java type this deserializer creates.
*/
public Class getBoundType();
}
|
[
"anav@ebay.com"
] |
anav@ebay.com
|
3af1bad6dc791c688016a88d18ab02116c17a546
|
29e184b262bb73e7301fca6b8069c873e910111c
|
/src/main/java/com/example/jaxb/fpml/recordkeeping/ClearingExceptionReason.java
|
807d4d6ef031a2b19e0d31030dfb924084b8e6e2
|
[] |
no_license
|
oliversalmon/fpml
|
6c0578d8b2460e3976033fa9aea4254341aba65b
|
cecf5321e750bbb88c14e9bd75ee341acdccc444
|
refs/heads/master
| 2020-04-03T17:41:00.682605
| 2018-10-30T20:58:56
| 2018-10-30T20:58:56
| 155,455,414
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,755
|
java
|
package com.example.jaxb.fpml.recordkeeping;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* The reason a trade is exempted from a clearing mandate.
*
* <p>Java class for ClearingExceptionReason complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ClearingExceptionReason">
* <simpleContent>
* <extension base="<http://www.fpml.org/FpML-5/recordkeeping>Scheme">
* <attribute name="clearingExceptionReasonScheme" type="{http://www.fpml.org/FpML-5/recordkeeping}NonEmptyURI" default="http://www.fpml.org/coding-scheme/clearing-exception-reason" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ClearingExceptionReason", namespace = "http://www.fpml.org/FpML-5/recordkeeping", propOrder = {
"value"
})
public class ClearingExceptionReason {
@XmlValue
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String value;
@XmlAttribute(name = "clearingExceptionReasonScheme")
protected String clearingExceptionReasonScheme;
/**
* The base class for all types which define coding schemes that are allowed to be empty.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the clearingExceptionReasonScheme property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getClearingExceptionReasonScheme() {
if (clearingExceptionReasonScheme == null) {
return "http://www.fpml.org/coding-scheme/clearing-exception-reason";
} else {
return clearingExceptionReasonScheme;
}
}
/**
* Sets the value of the clearingExceptionReasonScheme property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setClearingExceptionReasonScheme(String value) {
this.clearingExceptionReasonScheme = value;
}
}
|
[
"oliver.salmon@gmail.com"
] |
oliver.salmon@gmail.com
|
4dfb7ece200b66587b169b0b9dba480b29ee38dc
|
9b56c1a7ff68cec78d2d469242dc396fc9fd7b02
|
/bin/platform/ext/platformservices/src/de/hybris/platform/servicelayer/event/events/MessageSendingEventListener.java
|
ee4dc1d2cc0f12f1b5baeded51f48bd531f6a9b5
|
[] |
no_license
|
noiz23/TourHy
|
e32f411786c140e08b977dbe89f912061f47ce7f
|
8379099898362e7c697c6ef22ae988c85e41eae3
|
refs/heads/master
| 2020-04-11T08:14:00.193050
| 2019-01-03T10:15:13
| 2019-01-03T10:15:13
| 161,634,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,439
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.servicelayer.event.events;
import de.hybris.platform.servicelayer.event.impl.AbstractEventListener;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
/**
* Listener for the event of class {@link #eventClass}. After event is received {@link MessageSendingEventListener} will
* send it into {@link #channel}.
*/
public class MessageSendingEventListener extends AbstractEventListener<AbstractEvent>
{
private static final Logger LOG = Logger.getLogger(MessageSendingEventListener.class);
private Class<? extends AbstractEvent> eventClass;
private MessageChannel channel;
private Long timeout;
@Override
protected void onEvent(final AbstractEvent event)
{
if (event == null)
{
throw new IllegalArgumentException("Event is required, null given");
}
if (eventClass.isAssignableFrom(event.getClass()))
{
send(event);
}
else if (LOG.isDebugEnabled())
{
LOG.debug("Event has not been sent (reason: event class " + eventClass + " is not assignable from " + event.getClass());
}
}
protected void send(final AbstractEvent event)
{
final boolean sent;
final Message<AbstractEvent> payload = MessageBuilder.withPayload(event).build();
if (timeout == null)
{
sent = channel.send(payload);
}
else
{
sent = channel.send(payload, timeout.longValue());
}
if (!sent)
{
throw new MessageSendingException("Message of type " + event.getClass() + " could not be sent");
}
}
public void setTimeout(final Long timeout)
{
this.timeout = timeout;
}
@Required
public void setChannel(final MessageChannel channel)
{
this.channel = channel;
}
@Required
public void setEventClass(final Class<? extends AbstractEvent> eventClass)
{
this.eventClass = eventClass;
}
}
|
[
"ruben.echeverri"
] |
ruben.echeverri
|
8593f61774142709c154c8038da4275084c42639
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/luggage/bridge/c.java
|
d06e74a44849890faae898525d9d76a09167bb57
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 961
|
java
|
package com.tencent.luggage.bridge;
import android.text.TextUtils;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.HashMap;
import org.json.JSONObject;
final class c
extends e
{
c(int paramInt, String paramString, JSONObject paramJSONObject, boolean paramBoolean)
{
super(b.eij);
AppMethodBeat.i(140315);
HashMap localHashMap = new HashMap();
localHashMap.put("callbackId", Integer.valueOf(paramInt));
if (!TextUtils.isEmpty(paramString)) {
localHashMap.put("error", paramString);
}
if (paramJSONObject != null) {
localHashMap.put("data", paramJSONObject);
}
localHashMap.put("keepCallback", Boolean.valueOf(paramBoolean));
i(localHashMap);
AppMethodBeat.o(140315);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.luggage.bridge.c
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
39d558450da45f5972d7df6f00172d4e8f3f6ca4
|
bda52806b584b4c16224fccbc76dbb7fd1a274b5
|
/airline-core/src/main/java/com/github/rvesse/airline/restrictions/common/AllowedValuesRestriction.java
|
e36e89ff10295c099520dd12585b67ddf8c5618f
|
[
"Apache-2.0"
] |
permissive
|
lanwen/airline
|
cf0c3ce2d39a832138664d1daa88593dda2a9c37
|
1fae38f45efed3a6ad2b978d472b04c19fd68ff9
|
refs/heads/master
| 2021-05-04T07:26:23.053320
| 2016-09-20T10:32:01
| 2016-09-20T10:32:01
| 70,612,429
| 0
| 0
| null | 2016-10-11T16:19:50
| 2016-10-11T16:19:50
| null |
UTF-8
|
Java
| false
| false
| 3,649
|
java
|
/**
* Copyright (C) 2010-16 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.rvesse.airline.restrictions.common;
import java.util.LinkedHashSet;
import java.util.Set;
import com.github.rvesse.airline.DefaultTypeConverter;
import com.github.rvesse.airline.TypeConverter;
import com.github.rvesse.airline.model.ArgumentsMetadata;
import com.github.rvesse.airline.model.OptionMetadata;
import com.github.rvesse.airline.parser.ParseState;
import com.github.rvesse.airline.parser.errors.ParseArgumentsIllegalValueException;
import com.github.rvesse.airline.parser.errors.ParseInvalidRestrictionException;
import com.github.rvesse.airline.parser.errors.ParseOptionIllegalValueException;
import com.github.rvesse.airline.utils.AirlineUtils;
public class AllowedValuesRestriction extends AbstractAllowedValuesRestriction {
private Object currentState = null;
private Set<Object> allowedValues = null;
public AllowedValuesRestriction(String... rawValues) {
super(false);
this.rawValues.addAll(AirlineUtils.arrayToList(rawValues));
}
@Override
public <T> void postValidate(ParseState<T> state, OptionMetadata option, Object value) {
// Not enforced if no values specified
if (this.rawValues.isEmpty())
return;
Set<Object> allowedValues = createAllowedValues(state, option.getTitle(), option.getJavaType());
if (!allowedValues.contains(value)) {
throw new ParseOptionIllegalValueException(option.getTitle(), value, allowedValues);
}
}
protected synchronized <T> Set<Object> createAllowedValues(ParseState<T> state, String title, Class<?> type) {
// Re-use cached values if possible
if (currentState == state) {
return allowedValues;
}
// Convert values
Set<Object> actualValues = new LinkedHashSet<Object>();
TypeConverter converter = state.getParserConfiguration().getTypeConverter();
if (converter == null)
converter = new DefaultTypeConverter();
for (String rawValue : this.rawValues) {
try {
actualValues.add(converter.convert(title, type, rawValue));
} catch (Exception e) {
throw new ParseInvalidRestrictionException(e,
"Unable to parse raw value '%s' in order to apply allowed values restriction", rawValue);
}
}
// Cache for re-use
currentState = state;
this.allowedValues = actualValues;
return actualValues;
}
@Override
public <T> void postValidate(ParseState<T> state, ArgumentsMetadata arguments, Object value) {
// Not enforced if no values specified
if (this.rawValues.isEmpty())
return;
String title = getArgumentTitle(state, arguments);
Set<Object> allowedValues = createAllowedValues(state, title, arguments.getJavaType());
if (!allowedValues.contains(value)) {
throw new ParseArgumentsIllegalValueException(title, value, allowedValues);
}
}
}
|
[
"rvesse@dotnetrdf.org"
] |
rvesse@dotnetrdf.org
|
2ab5c1585846efe9177092c9b7d94b021237a2b3
|
15d038d7904d0859bd6fe884cd02276a7bf6aab5
|
/2017-april/4.strategy-pattern/src/com/alg/dp/project3/solution1/Test.java
|
b14511373f0923232c6609c165381c8598196ac0
|
[] |
no_license
|
DharmendraPrajapati/design-patterns
|
e9246b672d56d73fa915e7d5e35a4deed50760cc
|
3e2bc6b7ad5ac46884d40b7938c09484be2ee12f
|
refs/heads/master
| 2022-02-15T21:17:36.971028
| 2019-09-15T03:57:38
| 2019-09-15T03:57:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 233
|
java
|
package com.alg.dp.project3.solution1;
public class Test {
public static void main(String[] args) {
int[] in = {10, 6, 7, 8, 3};
Sorter sorter = new Sorter(in);
sorter.sort("bubble_sort");
sorter.sort("merge_sort");
}
}
|
[
"info@algorithmica.co.in"
] |
info@algorithmica.co.in
|
22a623edd6cbc9bfda9eebbd3523bf771696222b
|
f1a705b3af0fee41b44cd66ce453e5d76051d215
|
/app/src/main/java/com/lh/imbilibili/view/adapter/categoryfragment/PartionChildRecyclerViewAdapter.java
|
e72b0b9a07088dc6027c41e5f870ffcc66792f4e
|
[] |
no_license
|
1757526725/IMBiliBili-1
|
68383ffa7e1f812f4c679cbf74e6053a1edd8c19
|
b255903c190d23603ca49df639f2f6561677c086
|
refs/heads/master
| 2020-09-27T10:38:30.103950
| 2016-10-19T16:00:27
| 2016-10-19T16:00:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,063
|
java
|
package com.lh.imbilibili.view.adapter.categoryfragment;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.lh.imbilibili.R;
import com.lh.imbilibili.model.PartionHome;
import com.lh.imbilibili.model.PartionVideo;
import com.lh.imbilibili.utils.StringUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by liuhui on 2016/10/1.
*/
public class PartionChildRecyclerViewAdapter extends RecyclerView.Adapter {
private static final int TYPE_HOT_HEAD = 1;
private static final int TYPE_HOT_ITEM = 2;
private static final int TYPE_NEW_HEAD = 3;
private static final int TYPE_NEW_ITEM = 4;
private PartionHome mPartionHomeData;
private List<PartionVideo> mNewVideos;
private OnVideoItemClickListener mOnVideoItemClickListener;
private Context mContext;
private List<Integer> mTypeList;
public PartionChildRecyclerViewAdapter(Context context) {
mContext = context;
mTypeList = new ArrayList<>();
}
public void setOnVideoItemClickListener(OnVideoItemClickListener listener) {
mOnVideoItemClickListener = listener;
}
public void addNewVideos(List<PartionVideo> newVideos) {
if (newVideos == null) {
return;
}
if (mNewVideos == null) {
mNewVideos = newVideos;
} else {
mNewVideos.addAll(newVideos);
}
}
public void setPartionHomeData(PartionHome partionHomeData) {
mPartionHomeData = partionHomeData;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
RecyclerView.ViewHolder viewHolder = null;
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
switch (viewType) {
case TYPE_HOT_HEAD:
case TYPE_NEW_HEAD:
viewHolder = new HeadHolder(new TextView(parent.getContext()));
break;
case TYPE_HOT_ITEM:
case TYPE_NEW_ITEM:
viewHolder = new VideoHolder(inflater.inflate(R.layout.video_list_item, parent, false));
break;
}
return viewHolder;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
int type = getItemViewType(position);
if (type == TYPE_HOT_HEAD) {
HeadHolder headHolder = (HeadHolder) holder;
headHolder.mHeadName.setText("最热视频");
} else if (type == TYPE_HOT_ITEM) {
VideoHolder videoHolder = (VideoHolder) holder;
int realPosition = position - mTypeList.indexOf(TYPE_HOT_ITEM);
PartionVideo video = mPartionHomeData.getRecommend().get(realPosition);
Glide.with(mContext).load(video.getCover()).asBitmap().into(videoHolder.mIvCover);
videoHolder.mTvTitle.setText(video.getTitle());
videoHolder.mTvAuthor.setText(video.getName());
videoHolder.mTvInfoViews.setText(StringUtils.formateNumber(video.getPlay()));
videoHolder.mTvInfoDanmakus.setText(StringUtils.formateNumber(video.getDanmaku()));
videoHolder.mTvPayBadge.setVisibility(View.GONE);
videoHolder.mAid = video.getParam();
} else if (type == TYPE_NEW_HEAD) {
HeadHolder headHolder = (HeadHolder) holder;
headHolder.mHeadName.setText("最新视频");
} else if (type == TYPE_NEW_ITEM) {
VideoHolder videoHolder = (VideoHolder) holder;
int realPosition = position - mTypeList.indexOf(TYPE_NEW_ITEM);
PartionVideo video = mNewVideos.get(realPosition);
Glide.with(mContext).load(video.getCover()).asBitmap().into(videoHolder.mIvCover);
videoHolder.mTvTitle.setText(video.getTitle());
videoHolder.mTvAuthor.setText(video.getName());
videoHolder.mTvInfoViews.setText(StringUtils.formateNumber(video.getPlay()));
videoHolder.mTvInfoDanmakus.setText(StringUtils.formateNumber(video.getDanmaku()));
videoHolder.mTvPayBadge.setVisibility(View.GONE);
videoHolder.mAid = video.getParam();
}
}
@Override
public int getItemCount() {
mTypeList.clear();
if (mPartionHomeData != null && mPartionHomeData.getRecommend() != null && mPartionHomeData.getRecommend().size() > 0) {
mTypeList.add(TYPE_HOT_HEAD);
for (int i = 0; i < mPartionHomeData.getRecommend().size(); i++) {
mTypeList.add(TYPE_HOT_ITEM);
}
}
if (mNewVideos != null && mNewVideos.size() > 0) {
mTypeList.add(TYPE_NEW_HEAD);
for (int i = 0; i < mNewVideos.size(); i++) {
mTypeList.add(TYPE_NEW_ITEM);
}
}
return mTypeList.size();
}
@Override
public int getItemViewType(int position) {
return mTypeList.get(position);
}
private class HeadHolder extends RecyclerView.ViewHolder {
private TextView mHeadName;
HeadHolder(View itemView) {
super(itemView);
mHeadName = (TextView) itemView;
}
}
@SuppressWarnings("WeakerAccess")
class VideoHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
@BindView(R.id.cover)
ImageView mIvCover;
@BindView(R.id.pay_badge)
TextView mTvPayBadge;
@BindView(R.id.title)
TextView mTvTitle;
@BindView(R.id.author)
TextView mTvAuthor;
@BindView(R.id.info_views)
TextView mTvInfoViews;
@BindView(R.id.info_danmakus)
TextView mTvInfoDanmakus;
@BindView(R.id.text2)
TextView mTvSecond;
private String mAid;
VideoHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
int tintColor = ContextCompat.getColor(mContext, R.color.gray_dark);
Drawable drawableCompat = DrawableCompat.wrap(mTvInfoViews.getCompoundDrawables()[0]);
DrawableCompat.setTint(drawableCompat, tintColor);
drawableCompat = DrawableCompat.wrap(mTvInfoDanmakus.getCompoundDrawables()[0]);
DrawableCompat.setTint(drawableCompat, tintColor);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
if (mOnVideoItemClickListener != null) {
mOnVideoItemClickListener.onVideoClick(mAid);
}
}
}
public interface OnVideoItemClickListener {
void onVideoClick(String aid);
}
}
|
[
"1585086582@qq.com"
] |
1585086582@qq.com
|
3056d8502911197cb63782de626377dc86cbe837
|
6b14c59fba946f80f261fcd83ac2ceba67bbecd2
|
/xill-processor/src/main/java/nl/xillio/xill/plugins/file/constructs/IsLinkConstruct.java
|
3a7d391784536aa956966b7c88b23d4610bfeffc
|
[
"Apache-2.0"
] |
permissive
|
xillio/xill-platform
|
30c7fcef5f0508a6875e60b9ac4ff00512fc61ab
|
d6315b96b9d0ce9b92f91f611042eb2a2dd9a6ff
|
refs/heads/master
| 2022-09-15T09:38:24.601818
| 2022-08-03T14:37:29
| 2022-08-03T14:37:29
| 123,340,493
| 4
| 3
|
Apache-2.0
| 2022-09-08T01:07:07
| 2018-02-28T20:46:52
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
/**
* Copyright (C) 2014 Xillio (support@xillio.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 nl.xillio.xill.plugins.file.constructs;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
/**
* Tests whether a file is a symbolic link.
*
* @author Paul van der Zandt, Xillio
* @author Thomas biesaart
*/
public class IsLinkConstruct extends AbstractFlagConstruct {
@Override
protected Boolean process(Path path) throws IOException {
return Files.isSymbolicLink(path);
}
}
|
[
"thomas.biesaart@outlook.com"
] |
thomas.biesaart@outlook.com
|
646b73df5f813c2db391524c6d1299c9a081325d
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/core3/impl/tags/impl-parent-3.0.0-alpha8/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/graphPartition/ISOMLayout.java
|
25f5cbd3b7e0d8b3968b3502fdfb03a69957770b
|
[] |
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
| 1,054
|
java
|
/*
* This is based on the ISOMLayout from the JUNG project.
*/
package csapps.layout.algorithms.graphPartition;
import java.util.Set;
import org.cytoscape.model.CyNode;
import org.cytoscape.view.layout.AbstractLayoutAlgorithm;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.model.View;
import org.cytoscape.work.TaskIterator;
import org.cytoscape.work.undo.UndoSupport;
public class ISOMLayout extends AbstractLayoutAlgorithm {
/**
* Creates a new ISOMLayout object.
*/
public ISOMLayout(UndoSupport undo) {
super("isom", "Inverted Self-Organizing Map Layout", undo);
}
public TaskIterator createTaskIterator(CyNetworkView networkView, Object context, Set<View<CyNode>> nodesToLayOut,String attrName) {
return new TaskIterator(new ISOMLayoutTask(getName(), networkView, nodesToLayOut, (ISOMLayoutContext) context, attrName, undoSupport));
}
@Override
public Object createLayoutContext() {
return new ISOMLayoutContext();
}
@Override
public boolean getSupportsSelectedOnly() {
return true;
}
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
6668d5620be73fe6d2c6f0e07647a89b4d8c410d
|
d939455f557cd9eda2619fd812025d8e19b083e3
|
/Java/src/com/longluo/leetcode/math/Problem479_largestPalindromeProduct.java
|
709748cf6bd7e6c5b437335b0bc024b781722f72
|
[
"MIT"
] |
permissive
|
longluo/leetcode
|
61d445bd4fbae13b99ea24e9ef465bb700022866
|
5a171f223c03cfdddb18488fd4bc5910039e21c4
|
refs/heads/master
| 2023-08-17T05:03:25.433075
| 2023-07-30T04:01:16
| 2023-07-30T04:01:16
| 58,620,185
| 58
| 20
|
MIT
| 2023-05-25T19:00:48
| 2016-05-12T07:52:04
|
Java
|
UTF-8
|
Java
| false
| false
| 2,996
|
java
|
package com.longluo.leetcode.math;
/**
* 479. 最大回文数乘积
* <p>
* 给定一个整数 n ,返回 可表示为两个 n 位整数乘积的 最大回文整数 。因为答案可能非常大,所以返回它对 1337 取余 。
* <p>
* 示例 1:
* 输入:n = 2
* 输出:987
* 解释:99 x 91 = 9009, 9009 % 1337 = 987
* <p>
* 示例 2:
* 输入: n = 1
* 输出: 9
* <p>
* 提示:
* 1 <= n <= 8
* <p>
* https://leetcode-cn.com/problems/largest-palindrome-product/
*/
public class Problem479_largestPalindromeProduct {
// TimeOut
public static int largestPalindrome(int n) {
if (n == 1) {
return 9;
}
int MOD = 1337;
int ans = 0;
int max = (int) (Math.pow(10, n) - 1);
int min = (int) (Math.pow(10, n - 1) - 1);
for (long i = (long) max * max; i >= 1; i--) {
if (isPalindrome(i)) {
for (int j = max; j >= min; j--) {
if (i % j == 0 && i / j >= min && i / j <= max) {
return (int) (i % MOD);
}
}
}
}
return ans;
}
public static boolean isPalindrome(long x) {
if (x < 0 || (x != 0 && x % 10 == 0)) {
return false;
}
long revisited = 0;
while (x > revisited) {
revisited = revisited * 10 + x % 10;
x /= 10;
}
return x == revisited || x == revisited / 10;
}
public static boolean checkPalindrome(long num) {
String numStr = String.valueOf(num);
int left = 0;
int right = numStr.length() - 1;
while (left < right) {
if (numStr.charAt(left) != numStr.charAt(right)) {
return false;
}
left++;
right--;
}
return true;
}
// Math time: O(10^2n) space: O(1)
public static int largestPalindrome_best(int n) {
if (n == 1) {
return 9;
}
int ans = 0;
int max = (int) Math.pow(10, n) - 1;
for (int i = max; ans == 0; i--) {
long num = i;
for (int j = i; j > 0; j /= 10) {
num = 10 * num + j % 10;
}
for (long x = max; x * x >= num; x--) {
if (num % x == 0) {
ans = (int) (num % 1337);
break;
}
}
}
return ans;
}
public static void main(String[] args) {
System.out.println("9 ?= " + largestPalindrome(1));
System.out.println("987 ?= " + largestPalindrome(2));
System.out.println("123 ?= " + largestPalindrome(3));
System.out.println("677 ?= " + largestPalindrome(5));
System.out.println("1218 ?= " + largestPalindrome(6));
System.out.println("987 ?= " + largestPalindrome_best(2));
System.out.println("123 ?= " + largestPalindrome_best(3));
}
}
|
[
"calmbody@163.com"
] |
calmbody@163.com
|
e59d2ac3f5189a5ebd105ac399e022d0efbd3f15
|
9a6ea6087367965359d644665b8d244982d1b8b6
|
/src/main/java/X/AnonymousClass3YU.java
|
14d74b8cf4d55e5f1512c50297358b08dac07365
|
[] |
no_license
|
technocode/com.wa_2.21.2
|
a3dd842758ff54f207f1640531374d3da132b1d2
|
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
|
refs/heads/master
| 2023-02-12T11:20:28.666116
| 2021-01-14T10:22:21
| 2021-01-14T10:22:21
| 329,578,591
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 948
|
java
|
package X;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.android.search.verification.client.R;
/* renamed from: X.3YU reason: invalid class name */
public class AnonymousClass3YU extends AbstractC69443Hb {
public Button A00;
public ImageView A01;
public LinearLayout A02;
public TextView A03;
public TextView A04;
public AnonymousClass3YU(View view) {
super(view);
this.A01 = (ImageView) AnonymousClass0Q7.A0D(view, R.id.payout_bank_icon);
this.A04 = (TextView) AnonymousClass0Q7.A0D(view, R.id.payout_bank_name);
this.A03 = (TextView) AnonymousClass0Q7.A0D(view, R.id.payout_bank_status);
this.A02 = (LinearLayout) AnonymousClass0Q7.A0D(view, R.id.warning_container);
this.A00 = (Button) AnonymousClass0Q7.A0D(view, R.id.cta_button);
}
}
|
[
"madeinborneo@gmail.com"
] |
madeinborneo@gmail.com
|
af9ae6c11b28484f2fb73978a657bc09a86320fd
|
c15b74e50f249df767047dcb2564faf6b8166c51
|
/src/main/java/com/xwy/three/LRU/LRUCache.java
|
e0e85e25e6d027aabfbe31b06adb396c7fac8c61
|
[] |
no_license
|
never123450/thread
|
09c469e97ea1e81d1fdec96bd0784808982540ca
|
d5727a1643de3a10130166b3b396bac0d294ca63
|
refs/heads/master
| 2022-07-22T20:06:05.124971
| 2022-07-21T02:33:41
| 2022-07-21T02:33:41
| 204,009,094
| 0
| 0
| null | 2022-07-11T21:09:34
| 2019-08-23T13:57:56
|
Java
|
UTF-8
|
Java
| false
| false
| 2,630
|
java
|
package com.xwy.three.LRU;
import java.util.HashMap;
import java.util.Map;
public class LRUCache<k, v> {
//容量
private int capacity;
//当前有多少节点的统计
private int count;
//缓存节点
private Map<k, Node<k, v>> nodeMap;
private Node<k, v> head;
private Node<k, v> tail;
public LRUCache(int capacity) {
if (capacity < 1) {
throw new IllegalArgumentException(String.valueOf(capacity));
}
this.capacity = capacity;
this.nodeMap = new HashMap<>();
//初始化头节点和尾节点,利用哨兵模式减少判断头结点和尾节点为空的代码
Node headNode = new Node(null, null);
Node tailNode = new Node(null, null);
headNode.next = tailNode;
tailNode.pre = headNode;
this.head = headNode;
this.tail = tailNode;
}
public void put(k key, v value) {
Node<k, v> node = nodeMap.get(key);
if (node == null) {
if (count >= capacity) {
//先移除一个节点
removeNode();
}
node = new Node<>(key, value);
//添加节点
addNode(node);
} else {
//移动节点到头节点
moveNodeToHead(node);
}
}
public Node<k, v> get(k key) {
Node<k, v> node = nodeMap.get(key);
if (node != null) {
moveNodeToHead(node);
}
return node;
}
private void removeNode() {
Node node = tail.pre;
//从链表里面移除
removeFromList(node);
nodeMap.remove(node.key);
count--;
}
private void removeFromList(Node<k, v> node) {
Node pre = node.pre;
Node next = node.next;
pre.next = next;
next.pre = pre;
node.next = null;
node.pre = null;
}
private void addNode(Node<k, v> node) {
//添加节点到头部
addToHead(node);
nodeMap.put(node.key, node);
count++;
}
private void addToHead(Node<k, v> node) {
Node next = head.next;
next.pre = node;
node.next = next;
node.pre = head;
head.next = node;
}
public void moveNodeToHead(Node<k, v> node) {
//从链表里面移除
removeFromList(node);
//添加节点到头部
addToHead(node);
}
class Node<k, v> {
k key;
v value;
Node pre;
Node next;
public Node(k key, v value) {
this.key = key;
this.value = value;
}
}
}
|
[
"845619585@qq.com"
] |
845619585@qq.com
|
f832932576fee8dff93e58bd0f4e4d5cf1253dd2
|
0f9e3b5a061f343065483bdd031a5dc8c8fb09af
|
/org.xpect.xtext.lib/src/org/xpect/xtext/lib/setup/generic/File.java
|
1b0263019a7645e92091ee7d5c552aa930d2307f
|
[] |
no_license
|
joergreichert/Xpect
|
ed1296af1d155ecc983cf5a5d28276b7e20241fe
|
fde2c38359ec59f3415cad7d6e83d6efa66c22f5
|
refs/heads/master
| 2021-01-16T21:13:04.910708
| 2013-08-23T15:40:04
| 2013-08-23T15:40:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 909
|
java
|
package org.xpect.xtext.lib.setup.generic;
import java.io.IOException;
import java.io.InputStream;
import org.eclipse.emf.common.util.URI;
import org.xpect.setup.IXpectRunnerSetup.IFileSetupContext;
public class File extends GenericResource {
private String from;
public File() {
super();
}
public File(String name) {
super(name);
}
public InputStream getContents(IFileSetupContext ctx) throws IOException {
URI source = ctx.resolve(getFrom() == null ? getName() : getFrom());
return ctx.getXpectFile().eResource().getResourceSet().getURIConverter().createInputStream(source);
}
public String getFrom() {
return from;
}
public String getLocalName(IFileSetupContext ctx) {
return getName() == null ? from : getName();
}
public URI getResolvedURI(IFileSetupContext ctx) {
return ctx.resolve(getLocalName(ctx));
}
public void setFrom(String from) {
this.from = from;
}
}
|
[
"moritz.eysholdt@itemis.de"
] |
moritz.eysholdt@itemis.de
|
7670499cb4e03c92b6e6a888e72ea322b2a06669
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/maks_MGit/app/src/main/java/me/sheimi/sgit/repo/tasks/repo/StatusTask.java
|
cb52840548bee264dffa3da967fc3b6029eb93e0
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,809
|
java
|
// isComment
package me.sheimi.sgit.repo.tasks.repo;
import java.util.Set;
import me.sheimi.sgit.database.models.Repo;
import me.sheimi.sgit.exception.StopTaskException;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.errors.NoWorkTreeException;
public class isClassOrIsInterface extends RepoOpTask {
public interface isClassOrIsInterface {
public void isMethod(String isParameter);
}
private GetStatusCallback isVariable;
private StringBuffer isVariable = new StringBuffer();
public isConstructor(Repo isParameter, GetStatusCallback isParameter) {
super(isNameExpr);
isNameExpr = isNameExpr;
}
@Override
protected Boolean isMethod(Void... isParameter) {
return isMethod();
}
protected void isMethod(Boolean isParameter) {
super.isMethod(isNameExpr);
if (isNameExpr != null && isNameExpr) {
isNameExpr.isMethod(isNameExpr.isMethod());
}
}
public void isMethod() {
isMethod();
}
private boolean isMethod() {
try {
org.eclipse.jgit.api.Status isVariable = isNameExpr.isMethod().isMethod().isMethod();
isMethod(isNameExpr);
} catch (NoWorkTreeException isParameter) {
isMethod(isNameExpr);
return true;
} catch (GitAPIException isParameter) {
isMethod(isNameExpr);
return true;
} catch (StopTaskException isParameter) {
return true;
} catch (Throwable isParameter) {
isMethod(isNameExpr);
return true;
}
return true;
}
private void isMethod(org.eclipse.jgit.api.Status isParameter) {
if (!isNameExpr.isMethod() && isNameExpr.isMethod()) {
isNameExpr.isMethod("isStringConstant");
return;
}
// isComment
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
isMethod("isStringConstant", isNameExpr.isMethod());
}
private void isMethod(String isParameter, Set<String> isParameter) {
if (isNameExpr.isMethod())
return;
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod("isStringConstant");
for (String isVariable : isNameExpr) {
isNameExpr.isMethod('isStringConstant');
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod('isStringConstant');
}
isNameExpr.isMethod("isStringConstant");
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
cd9b7fcbcfc0ee51a9d2f04ecd7553253894f6bf
|
4fd736858d11b6c31c4c66e39f1495f6014043e5
|
/core/src/main/java/net/hasor/web/valid/ValidItem.java
|
eace282b48889a5021af9a914f22fe639a2c0a29
|
[
"Apache-2.0"
] |
permissive
|
147549561/hasor
|
0f031ae4d4d7b4551a37abed80a92cf997f22bfb
|
f446d3995acbb58122926d143d7a23edae357d5f
|
refs/heads/master
| 2021-01-25T11:02:39.054793
| 2017-06-09T12:33:21
| 2017-06-09T12:33:21
| 93,906,481
| 1
| 0
| null | 2017-06-10T00:35:22
| 2017-06-10T00:35:22
| null |
UTF-8
|
Java
| false
| false
| 1,606
|
java
|
/*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.hasor.web.valid;
import java.util.ArrayList;
/**
* 一个item下的验证信息
* @version : 2014年8月27日
* @author 赵永春(zyc@hasor.net)
*/
class ValidItem extends ArrayList<Message> {
private String key;
//
public ValidItem(String key) {
this.key = key;
}
public ValidItem(String key, String error) {
this(key);
this.addError(error);
}
public ValidItem(String key, Message error) {
this(key);
this.add(error);
}
//
public String getKey() {
return key;
}
//
public boolean isValid() {
return this.isEmpty();
}
//
public String firstError() {
if (this.isEmpty()) {
return null;
}
return get(size() - 1).getMessage();
}
//
public void addError(String validString) {
this.add(new Message(validString));
}
//
public String toString() {
return this.firstError();
}
}
|
[
"zyc@hasor.net"
] |
zyc@hasor.net
|
a2acd369c74fa0478169de946ee0e364c14e9a68
|
614ad6e97b9b45a485586f7c99275e901cba85cd
|
/src/test/java/com/example/cucumber/CucumberContextConfiguration.java
|
37244c0c8324ce3714978e478743abde6a8a3d0e
|
[] |
no_license
|
mitch-warrenburg/sample-app
|
9bb8f427ed62673625748588811bd4609a8a1f7d
|
b3968aa22cbf4d51e9d17407f1fea473e173c54a
|
refs/heads/master
| 2022-03-04T09:13:35.411193
| 2019-05-25T09:41:45
| 2019-05-25T09:41:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 600
|
java
|
package com.example.cucumber;
import com.example.SampleApp;
import cucumber.api.java.Before;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.web.WebAppConfiguration;
@SpringBootTest
@WebAppConfiguration
@ContextConfiguration(classes = SampleApp.class)
public class CucumberContextConfiguration {
@Before
public void setup_cucumber_spring_context(){
// Dummy method so cucumber will recognize this class as glue
// and use its context configuration.
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
e2b9264e0574b76a8bd068597f7135ee02ac0e69
|
9b11ab80013a2e74696c33249f32dfaf57e3e3f0
|
/conversion-service/convert-pdf-to-img/src/main/java/com/liumapp/convert/img/pattern/SimplePdfPattern.java
|
ab8ad8dc31df688a7a94e75d9d63429f68f89181
|
[
"Apache-2.0"
] |
permissive
|
DespairYoke/spring-cloud-conversion-in-docker
|
33356821e694b66f2a31ef9425b60efdae39e2ef
|
0097a0feaf1dae94a130034cc4d7192e2fee3de1
|
refs/heads/master
| 2020-03-16T17:33:39.885051
| 2018-05-11T03:45:07
| 2018-05-11T03:45:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 666
|
java
|
package com.liumapp.convert.img.pattern;
import org.springframework.stereotype.Component;
import java.io.Serializable;
/**
* @author liumapp
* @file PdfPattern.java
* @email liumapp.com@gmail.com
* @homepage http://www.liumapp.com
* @date 5/7/18
*/
@Component
public class SimplePdfPattern implements Serializable {
/**
* pdf file path
*/
private String path;
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public String toString() {
return "PdfPattern{" +
"path='" + path + '\'' +
'}';
}
}
|
[
"810095178@qq.com"
] |
810095178@qq.com
|
5d4e4edd4f2c14542244359f5c4ada793888bb0a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_e8a02d227c945dba7e3fddae8baf16bcfc8610f9/FunctionCompilerTypeTest/25_e8a02d227c945dba7e3fddae8baf16bcfc8610f9_FunctionCompilerTypeTest_t.java
|
d87e6a44cf89d7ad7e37ff6beabce2d28f4d5f13
|
[] |
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,084
|
java
|
package org.instructionexecutor;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.suite.Binder;
import org.suite.Journal;
import org.suite.SuiteUtil;
import org.suite.doer.Generalizer;
import org.suite.node.Atom;
import org.suite.node.Node;
import org.suite.node.Reference;
public class FunctionCompilerTypeTest {
@Test
public void testBasic() {
assertEquals(SuiteUtil.parse("BOOLEAN") //
, getType("4 = 8"));
}
@Test
public void testDefineType() {
getType("define type t = number >> \n" //
+ "define v as t = 1 >> \n" //
+ "v = 99");
}
@Test
public void testFun() {
assertEquals(SuiteUtil.parse("FUN NUMBER NUMBER") //
, getType("a => a + 1"));
assertEquals(SuiteUtil.parse("NUMBER") //
, getType("define f = (a => a + 1) >> f {3}"));
assertTrue(Binder.bind(SuiteUtil.parse("FUN _ (CO-LIST-OF NUMBER)") //
, getType("define fib = (n => dummy => n/(fib {n + 1})) >> \n" //
+ "fib {1}") // Pretends co-recursion
, new Journal()));
}
@Test
public void testList() {
assertEquals(SuiteUtil.parse("LIST-OF NUMBER") //
, getType("1,"));
assertEquals(SuiteUtil.parse("LIST-OF STRING") //
, getType("\"a\", \"b\", \"c\", \"d\","));
}
@Test
public void testOneOf() {
getType("" //
+ "define type t = one of (NIL, BTREE t t,) >> \n" //
+ "define u as t = NIL >> \n" //
+ "define v as t = NIL >> \n" //
+ "v = BTREE (BTREE NIL NIL) NIL");
}
@Test
public void testTuple() {
getType("BTREE 2 3 = BTREE 4 6");
getTypeMustFail("T1 2 3 = T2 2 3");
getTypeMustFail("BTREE 2 3 = BTREE \"a\" 6");
}
@Test
public void testFail() {
String cases[] = { "1 + 'abc'" //
, "define fib = (i2 => dummy => 1, fib {i2}) >> ()" //
, "define type t = one of (BTREE t t,) >> \n" //
+ "define v as t = BTREE 2 3 >> \n" //
+ "1" };
// There is a problem in deriving type of 1:(fib {i2})...
// Rule specified that right hand side of CONS should be a list,
// however fib {i2} is a closure.
// Should actually use corecursive list type (cons-ed by '^').
for (String c : cases)
getTypeMustFail(c);
}
private static void getTypeMustFail(String c) {
try {
getType(c);
} catch (RuntimeException ex) {
return;
}
throw new RuntimeException("Cannot catch type error of: " + c);
}
private static Node getType(String f) {
Node program = SuiteUtil.parse(f);
Node node = SuiteUtil
.parse("fc-parse .program .p, infer-type .p ()/() .type");
Generalizer generalizer = new Generalizer();
node = generalizer.generalize(node);
Node variable = generalizer.getVariable(Atom.create(".program"));
Node type = generalizer.getVariable(Atom.create(".type"));
((Reference) variable).bound(program);
String[] imports = { "auto.sl", "fc.sl" };
if (SuiteUtil.getProver(imports).prove(node))
return type.finalNode();
else
throw new RuntimeException("Type inference error");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e68d4d8c843e3f76192b256f15ce38b7e0aaca56
|
bc5b4ba58d5bc5c5fa17c39d6e09cc30293c018d
|
/app/src/main/java/com/kaqi/niuniu/ireader/presenter/contract/BookShelfContract.java
|
604e8dd901c61bd3389fd4f13829799a518f389d
|
[
"Apache-2.0"
] |
permissive
|
nances/INNBook
|
9bf533ff4a00e709952c0a3f16498636f5fff832
|
9729177ee5c9ee7153c6249bcea6b8d49d7a8842
|
refs/heads/master
| 2020-05-17T00:51:41.618413
| 2019-07-24T08:13:49
| 2019-07-24T08:13:49
| 183,406,972
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 739
|
java
|
package com.kaqi.niuniu.ireader.presenter.contract;
import com.kaqi.niuniu.ireader.model.bean.CollBookBean;
import com.kaqi.niuniu.ireader.ui.base.BaseContract;
import java.util.List;
/**
* Created by newbiechen on 17-5-8.
*/
public interface BookShelfContract {
interface View extends BaseContract.BaseView {
void finishRefresh(List<CollBookBean> collBookBeans);
void finishUpdate();
void showErrorTip(String error);
}
interface Presenter extends BaseContract.BasePresenter<View>{
void refreshCollBooks();
void createDownloadTask(CollBookBean collBookBean);
void updateCollBooks(List<CollBookBean> collBookBeans);
void loadRecommendBooks(String gender);
}
}
|
[
"niqiao1111@163.com"
] |
niqiao1111@163.com
|
3f87888fea3eede1f51a7549f72ac42484b3b422
|
6439160f3b2d5a64156d4a3ef1c0baab2acee015
|
/src/main/java/com/publiccms/views/directive/sys/SysDeptCategoryDirective.java
|
53eb177dcdd8058fea5eee07b1325f00815d3de5
|
[] |
no_license
|
puffershy/puffer-cms
|
c0c1c1bc4fc95cfedcca1b140146b48a6da6e252
|
69a0eeeab5fc8efa5dacb82cf73ef0de9d49b8b6
|
refs/heads/master
| 2020-04-05T18:01:40.022194
| 2018-11-11T15:05:23
| 2018-11-11T15:05:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,324
|
java
|
package com.publiccms.views.directive.sys;
// Generated 2016-1-19 11:41:45 by com.sanluan.common.source.SourceMaker
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.publiccms.entities.sys.SysDept;
import com.publiccms.entities.sys.SysDeptCategory;
import com.publiccms.logic.service.sys.SysDeptCategoryService;
import com.publiccms.logic.service.sys.SysDeptService;
import com.publiccms.common.base.AbstractTemplateDirective;
import com.sanluan.common.handler.RenderHandler;
@Component
public class SysDeptCategoryDirective extends AbstractTemplateDirective {
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
Integer deptId = handler.getInteger("deptId");
Integer categoryId = handler.getInteger("categoryId");
if (notEmpty(deptId)) {
if (notEmpty(categoryId)) {
handler.put("object", service.getEntity(deptId, categoryId)).render();
} else {
Integer[] categoryIds = handler.getIntegerArray("categoryIds");
if (notEmpty(categoryIds)) {
Map<String, Boolean> map = new LinkedHashMap<String, Boolean>();
SysDept entity = sysDeptService.getEntity(deptId);
if (notEmpty(entity)) {
if (entity.isOwnsAllCategory()) {
for (Integer id : categoryIds) {
map.put(String.valueOf(id), true);
}
} else {
for (Integer id : categoryIds) {
map.put(String.valueOf(id), false);
}
for (SysDeptCategory e : service.getEntitys(deptId, categoryIds)) {
map.put(String.valueOf(e.getCategoryId()), true);
}
}
}
handler.put("map", map).render();
}
}
}
}
@Autowired
private SysDeptCategoryService service;
@Autowired
private SysDeptService sysDeptService;
}
|
[
"9440979@qq.com"
] |
9440979@qq.com
|
8bd3387a009ab1c4e6b1ceed23575fbed4f4dd85
|
7eb41e000121121f800b01bdcc99abeb1e7902f5
|
/src/main/java/com/jstarcraft/rns/model/dl4j/rating/AutoRecModel.java
|
dc6a08ba7c11ccda16880ac6ded1cbf75cbaf81d
|
[
"Apache-2.0"
] |
permissive
|
sunronsoft/jstarcraft-rns
|
dd723514986026a4260ee3b231fd85ebeffae58f
|
4df4b78f4aac8a306fb0943de5c2c7475c05ba19
|
refs/heads/master
| 2021-05-18T03:30:47.397171
| 2020-03-25T07:08:09
| 2020-03-25T07:08:09
| 251,084,083
| 1
| 0
|
Apache-2.0
| 2020-03-29T16:55:36
| 2020-03-29T16:55:35
| null |
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
package com.jstarcraft.rns.model.dl4j.rating;
import org.deeplearning4j.nn.api.OptimizationAlgorithm;
import org.deeplearning4j.nn.conf.MultiLayerConfiguration;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.layers.DenseLayer;
import org.deeplearning4j.nn.conf.layers.OutputLayer;
import org.deeplearning4j.nn.weights.WeightInit;
import org.nd4j.linalg.activations.Activation;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.learning.config.Nesterovs;
import com.jstarcraft.ai.data.DataInstance;
import com.jstarcraft.ai.data.DataModule;
import com.jstarcraft.ai.data.DataSpace;
import com.jstarcraft.ai.math.structure.matrix.MatrixScalar;
import com.jstarcraft.core.utility.Configurator;
import com.jstarcraft.rns.model.NeuralNetworkModel;
/**
*
* AutoRec学习器
*
* <pre>
* AutoRec: Autoencoders Meet Collaborative Filtering
* 参考LibRec团队
* </pre>
*
* @author Birdy
*
*/
//TODO 存档,以后需要基于DL4J重构.
@Deprecated
public class AutoRecModel extends NeuralNetworkModel {
/**
* the data structure that indicates which element in the user-item is non-zero
*/
private INDArray maskData;
@Override
protected int getInputDimension() {
return userSize;
}
@Override
protected MultiLayerConfiguration getNetworkConfiguration() {
NeuralNetConfiguration.ListBuilder factory = new NeuralNetConfiguration.Builder().seed(6).updater(new Nesterovs(learnRatio, momentum)).weightInit(WeightInit.XAVIER_UNIFORM).optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT).l2(weightRegularization).list();
factory.layer(0, new DenseLayer.Builder().nIn(inputDimension).nOut(hiddenDimension).activation(Activation.fromString(hiddenActivation)).build());
factory.layer(1, new OutputLayer.Builder(new AutoRecLearner(maskData)).nIn(hiddenDimension).nOut(inputDimension).activation(Activation.fromString(outputActivation)).build());
MultiLayerConfiguration configuration = factory.pretrain(false).backprop(true).build();
return configuration;
}
@Override
public void prepare(Configurator configuration, DataModule model, DataSpace space) {
super.prepare(configuration, model, space);
// transform the sparse matrix to INDArray
int[] matrixShape = new int[] { itemSize, userSize };
inputData = Nd4j.zeros(matrixShape);
maskData = Nd4j.zeros(matrixShape);
for (MatrixScalar term : scoreMatrix) {
if (term.getValue() > 0D) {
inputData.putScalar(term.getColumn(), term.getRow(), term.getValue());
maskData.putScalar(term.getColumn(), term.getRow(), 1D);
}
}
}
@Override
public void predict(DataInstance instance) {
int userIndex = instance.getQualityFeature(userDimension);
int itemIndex = instance.getQualityFeature(itemDimension);
instance.setQuantityMark(outputData.getFloat(itemIndex, userIndex));
}
}
|
[
"Birdy@LAPTOP-QRG8T75T"
] |
Birdy@LAPTOP-QRG8T75T
|
4c86dbec186108c2a29efff47989792c08ee9c39
|
a1385d076aba4a103e5973233c3425203c056a58
|
/MyProject/BFUBChannels/src/com/trapedza/bankfusion/fatoms/FON_ValidateSelectedSupervisors.java
|
4305ffa3435508856a175527546bf7ca17991a45
|
[] |
no_license
|
Singhmnish1947/java1.8
|
8ff0a83392b051e5614e49de06556c684ff4283e
|
6b2d4dcf06c5fcbb13c2c2578706a825aaa4dc03
|
refs/heads/master
| 2021-07-10T17:38:55.581240
| 2021-04-08T12:36:02
| 2021-04-08T12:36:02
| 235,827,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,516
|
java
|
/* ***********************************************************************************
* Copyright (c) 2007 Misys Financial Systems Ltd. All Rights Reserved.
*
* This software is the proprietary information of Misys Financial Systems Ltd.
* Use is subject to license terms.
* **********************************************************************************
* $Id: FON_ValidateSelectedSupervisors.java,v 1.9 2008/08/12 20:14:04 vivekr Exp $
* **********************************************************************************
*
* Revision 1.14 2008/02/16 14:37:17 Vinayachandrakantha.B.K
* JavaDoc Comments added : For all the attributes
*/
package com.trapedza.bankfusion.fatoms;
import java.util.HashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.misys.ub.channels.events.ChannelsEventCodes;
import com.trapedza.bankfusion.bo.refimpl.IBOMisTransactionCodes;
import com.trapedza.bankfusion.core.BankFusionException;
import com.trapedza.bankfusion.core.CommonConstants;
import com.trapedza.bankfusion.servercommon.commands.BankFusionEnvironment;
import com.trapedza.bankfusion.steps.refimpl.AbstractFON_ValidateSelectedSupervisors;
import com.trapedza.bankfusion.core.EventsHelper;
/**
* This Class contains methods for validating various conditions on the selected supervisor list & their levels
* such as duplicate supervisor entries, no levels assigned for a supervisor & level selected but not a supervisor etc.
* @author Vinayachandrakantha.B.K
*
*/
public class FON_ValidateSelectedSupervisors extends AbstractFON_ValidateSelectedSupervisors {
/**
* <code>svnRevision</code> = $Revision: 1.0 $
*/
public static final String svnRevision = "$Revision: 1.0 $";
static {
com.trapedza.bankfusion.utils.Tracer.register(svnRevision);
}
/**
* Logger instance
*/
private transient final static Log logger = LogFactory.getLog(FON_ValidateSelectedSupervisors.class.getName());
/**
* The default value in the supervisor field
*/
String defaultSupervisorValue = "None";
/**
* The default value in the supervisor level field
*/
int defaultSupervisorLevelValue = 0;
/**
* Constructor
* @param env
*/
public FON_ValidateSelectedSupervisors(BankFusionEnvironment env) {
super(env);
// TODO Auto-generated constructor stub
}
/**
* implements process(...) method in AbstractFON_ValidateSelectedSupervisors
*/
public void process(BankFusionEnvironment env) {
// Validate the Supervisors & Supervisor levels
/**
* TRUE if no supervisor specified, else FALSE
*/
boolean noSupervisor = true;
/**
* Supervisor level field values input
*/
int[] supervisorLevelList = { getF_IN_supervisorLevel1().intValue(), getF_IN_supervisorLevel2().intValue(),
getF_IN_supervisorLevel3().intValue(), getF_IN_supervisorLevel4().intValue(),
getF_IN_supervisorLevel5().intValue(), getF_IN_supervisorLevel6().intValue(),
getF_IN_supervisorLevel7().intValue(), getF_IN_supervisorLevel8().intValue(),
getF_IN_supervisorLevel9().intValue(), getF_IN_supervisorLevel10().intValue() };
/**
* Supervisor field values input
*/
String[] supervisorList = { getF_IN_supervisor1(), getF_IN_supervisor2(), getF_IN_supervisor3(),
getF_IN_supervisor4(), getF_IN_supervisor5(), getF_IN_supervisor6(), getF_IN_supervisor7(),
getF_IN_supervisor8(), getF_IN_supervisor9(), getF_IN_supervisor10() };
// Iterate for all the Supervisor values & their levels
for (int i = 0; i < supervisorList.length; i++) {
// Set noSupervisor flag to false if atleast 1 supervisor is specified
if (!supervisorList[i].trim().equalsIgnoreCase(defaultSupervisorValue)) {
noSupervisor = false;
}
// Check for Supervisor Level not assigned
if (!supervisorList[i].trim().equalsIgnoreCase(defaultSupervisorValue)
&& supervisorLevelList[i] == defaultSupervisorLevelValue) {
/*throw new BankFusionException(9007, new Object[] { supervisorList[i] }, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_AUTHORIZATION_LEVEL_NOT_SELECTED_FOR_SUPERVISOR,new Object[] {supervisorList[i] } , new HashMap(), env);
}
// Check for Supervisor not assigned
else if (supervisorList[i].trim().equalsIgnoreCase(defaultSupervisorValue)
&& supervisorLevelList[i] != defaultSupervisorLevelValue) {
/*throw new BankFusionException(9018, new Object[] { new Integer(i + 1) }, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_SET_SUPERVISOR_OR_ELSE_AUTHORIZATION_LEVEL_NONE,new Object[] {new Integer(i + 1)} , new HashMap(), env);
}
// Check for duplicate entries
for (int j = i + 1; j < supervisorList.length; j++) {
if (supervisorList[i].equalsIgnoreCase(supervisorList[j])
&& !supervisorList[i].trim().equalsIgnoreCase(defaultSupervisorValue)) {
/*throw new BankFusionException(9006, new Object[] { supervisorList[i] }, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_SUPERVISOR_HAS_MORE_THAN_ONE_AUTHORIZATION_LEVEL,new Object[] {supervisorList[i]} , new HashMap(), env);
}
}
}
// throw exception if no supervisor is specified
if (noSupervisor) {
/*throw new BankFusionException(9011, null, logger, env);*/
}
// NOT BEING USED SINCE Destination Sort Code FIELD IS NOT EDITABLE in UI. HOWEVER, CAN BE USED IF IT'S MADE EDITABLE IN FUTURE RELEASES.
// Validate the Destination Sort Code entered.
/*String destSortCode = getF_IN_destinationSortCode().substring(0, 2)
+ "-" + getF_IN_destinationSortCode().substring(2, 4)
+ "-" + getF_IN_destinationSortCode().substring(4, 6);
IBOBranch branchObj = null;
try
{
branchObj = (IBOBranch)env.getFactory().findByPrimaryKey(IBOBranch.BONAME, destSortCode);
}
catch(PersistenceException ex)
{
throw new BankFusionException(9015, new Object[] {destSortCode}, logger, env);
}
if(branchObj==null)
{
throw new BankFusionException(9016, new Object[] {destSortCode}, logger, env);
}*/
/**
* Numeric code of the transaction type selected
*/
int numericCode = 0;
try {
IBOMisTransactionCodes transCodeObj = (IBOMisTransactionCodes) env.getFactory().findByPrimaryKey(
IBOMisTransactionCodes.BONAME, getF_IN_transType());
numericCode = transCodeObj.getF_NUMERICTRANSCODE();
}
catch (Exception ex) {
/*throw new BankFusionException(9021, new Object[] { ex.getMessage() }, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_EXCEPTION_OCCURED,new Object[] {ex.getMessage() } , new HashMap(), env);
logger.error(ex);
}
// Checks whether the length of the Numeric Code provided is <= 2 digits, since this will be used in the
// generation of EFT file where transaction code must be of 2 digits in length.
if (numericCode > 99 || numericCode < -9) {
/*throw new BankFusionException(9022, new String[] { getF_IN_transType(),
CommonConstants.EMPTY_STRING + numericCode }, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_INVALID_NUMERIC_CODE_FOR_THE_TRANSACTION_TYPE,new Object[] {} , new HashMap(), env);
}
// Checks whether the Destination Sort Code field is empty.
if (getF_IN_destinationSortCode() == null
|| getF_IN_destinationSortCode().trim().equalsIgnoreCase(CommonConstants.EMPTY_STRING)) {
/*throw new BankFusionException(9016, null, logger, env);*/
EventsHelper.handleEvent(ChannelsEventCodes.E_DESTINATION_BRANCH_SORT_CODE_MUST_BE_ENTERED,new Object[] {} , new HashMap(), env);
}
}
}
|
[
"manish.kumar1@finastra.com"
] |
manish.kumar1@finastra.com
|
0215f6133a0025391f6166b92169c4617e1191fc
|
f2c74ec4070d4bd69f0d16e5e6fbc6d43013a4e0
|
/api/src/main/java/org/iton/messenger/api/photos/Photos.java
|
3a98437cc1de5138d2624a39246c99cb2c0a8d64
|
[
"MIT"
] |
permissive
|
ITON-Solutions/messenger-server
|
755764947b5e80f55638add81230007e761e46bf
|
2dd14a37413540fe297903a7dc08190e72a09055
|
refs/heads/master
| 2022-06-30T15:50:59.077067
| 2020-04-26T14:11:11
| 2020-04-26T14:11:11
| 70,696,561
| 1
| 0
|
MIT
| 2022-06-20T23:51:49
| 2016-10-12T12:14:13
|
Java
|
UTF-8
|
Java
| false
| false
| 796
|
java
|
package org.iton.messenger.api.photos;
import org.iton.messenger.api.Photo;
import org.iton.messenger.api.User;
import org.iton.messenger.core.TLObject;
import org.iton.messenger.core.TLVector;
public abstract class Photos extends TLObject {
protected int count;
protected TLVector<Photo> photos;
protected TLVector<User> users;
public TLVector<Photo> getPhotos() {
return this.photos;
}
public void setPhotos(TLVector<Photo> photos) {
this.photos = photos;
}
public TLVector<User> getUsers() {
return this.users;
}
public void setUsers(TLVector<User> users) {
this.users = users;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}
|
[
"vladimir.perez.gonzalez@gmail.com"
] |
vladimir.perez.gonzalez@gmail.com
|
46932ef08476acdb5d2d5df32a03afb005664026
|
a2df6764e9f4350e0d9184efadb6c92c40d40212
|
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/QueryLinkefabricFabricUrlsaoneurlRequest.java
|
f06499e57bb07895183f5d30895b0d4bd683fd03
|
[
"Apache-2.0"
] |
permissive
|
warriorsZXX/aliyun-openapi-java-sdk
|
567840c4bdd438d43be6bd21edde86585cd6274a
|
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
|
refs/heads/master
| 2022-12-06T15:45:20.418475
| 2020-08-20T08:37:31
| 2020-08-26T06:17:49
| 290,450,773
| 1
| 0
|
NOASSERTION
| 2020-08-26T09:15:48
| 2020-08-26T09:15:47
| null |
UTF-8
|
Java
| false
| false
| 1,458
|
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.sofa.model.v20190815;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.sofa.Endpoint;
/**
* @author auto create
* @version
*/
public class QueryLinkefabricFabricUrlsaoneurlRequest extends RpcAcsRequest<QueryLinkefabricFabricUrlsaoneurlResponse> {
public QueryLinkefabricFabricUrlsaoneurlRequest() {
super("SOFA", "2019-08-15", "QueryLinkefabricFabricUrlsaoneurl", "sofa");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
@Override
public Class<QueryLinkefabricFabricUrlsaoneurlResponse> getResponseClass() {
return QueryLinkefabricFabricUrlsaoneurlResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f71f2cc708fbb9aaa26735f8008acaf4e7267157
|
4f3613a5f643862a604473010fe24dd3dc516a51
|
/app/src/main/java/com/bber/company/android/widget/NotifyingScrollView.java
|
80a96f2098ec2772cef5204c7b6930f4d714453f
|
[] |
no_license
|
chenqian19911214/BberCole
|
c2bb89ff4bf76f03fe92fd159a3aac54257ea95e
|
437da365938ee8c1e71ac428fce450ff284b4ea1
|
refs/heads/master
| 2020-03-23T10:39:18.226709
| 2018-07-18T15:38:46
| 2018-07-19T00:42:28
| 141,454,510
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,478
|
java
|
package com.bber.company.android.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ScrollView;
/**
* Created by Administrator on 2015-08-07.
*/
public class NotifyingScrollView extends ScrollView {
private Context mContext;
private OnScrollChangedListener mOnScrollChangedListener;
public NotifyingScrollView(Context context) {
super(context);
this.mContext = context;
}
public NotifyingScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
this.mContext = context;
}
public NotifyingScrollView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.mContext = context;
}
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mOnScrollChangedListener != null) {
mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);
}
}
public void setOnScrollChangedListener(OnScrollChangedListener listener) {
mOnScrollChangedListener = listener;
}
public interface OnScrollChangedListener {
void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt);
}
/**阻尼**/
/**
* Finalize inflating a view from XML. This is called as the last phase of
* inflation, after all child views have been added.
*/
}
|
[
"1096011884@qq.com"
] |
1096011884@qq.com
|
ad66df3d8cef974424d7a1db8a1b9efc00ff694d
|
233e63710e871ef841ff3bc44d3660a0c8f8564d
|
/trunk/gameserver/src/gameserver/network/chatserver/clientpackets/CM_CS_AUTH_RESPONSE.java
|
eca10d2c0d38bfa669cb9ea86801346d9f8393e6
|
[] |
no_license
|
Wankers/Project
|
733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6
|
da6db42f127d5970522038971a8bebb76baa595d
|
refs/heads/master
| 2016-09-06T10:46:13.768097
| 2012-08-01T23:19:49
| 2012-08-01T23:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,558
|
java
|
/*
* This file is part of Aion Extreme Emulator <aion-core.net>.
*
* Aion Extreme Emulator is a 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.
*
* Aion Extreme Emulator 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 Aion Extreme Emulator. If not, see <http://www.gnu.org/licenses/>.
*/
package gameserver.network.chatserver.clientpackets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import commons.utils.ExitCode;
import gameserver.network.chatserver.ChatServerConnection.State;
import gameserver.network.chatserver.CsClientPacket;
import gameserver.network.chatserver.serverpackets.SM_CS_AUTH;
import gameserver.services.ChatService;
import gameserver.utils.ThreadPoolManager;
/**
* @author ATracer
*/
public class CM_CS_AUTH_RESPONSE extends CsClientPacket {
/**
* Logger for this class.
*/
protected static final Logger log = LoggerFactory.getLogger(CM_CS_AUTH_RESPONSE.class);
/**
* Response: 0=Authed,<br>
* 1=NotAuthed,<br>
* 2=AlreadyRegistered
*/
private int response;
private byte[] ip;
private int port;
/**
* @param opcode
*/
public CM_CS_AUTH_RESPONSE(int opcode) {
super(opcode);
}
@Override
protected void readImpl() {
response = readC();
ip = readB(4);
port = readH();
}
@Override
protected void runImpl() {
switch (response) {
case 0: // Authed
log.info("GameServer authed successfully IP : " + (ip[0] & 0xFF) + "." + (ip[1] & 0xFF) + "." + (ip[2] & 0xFF)
+ "." + (ip[3] & 0xFF) + " Port: " + port);
getConnection().setState(State.AUTHED);
ChatService.setIp(ip);
ChatService.setPort(port);
break;
case 1: // NotAuthed
log.error("GameServer is not authenticated at ChatServer side");
System.exit(ExitCode.CODE_ERROR);
break;
case 2: // AlreadyRegistered
log.info("GameServer is already registered at ChatServer side! trying again...");
ThreadPoolManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
CM_CS_AUTH_RESPONSE.this.getConnection().sendPacket(new SM_CS_AUTH());
}
}, 10000);
break;
}
}
}
|
[
"sylvanodu14gmail.com"
] |
sylvanodu14gmail.com
|
03173041e1fd88a392e7c5a0b89954ce9deeda22
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/cab.snapp.passenger.play_184.apk-decompiled/sources/io/reactivex/internal/operators/b/b.java
|
4754a80bb72fd51139a0c84594205e43991c3e7b
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,344
|
java
|
package io.reactivex.internal.operators.b;
import io.reactivex.g;
import io.reactivex.internal.disposables.DisposableHelper;
import io.reactivex.internal.subscriptions.SubscriptionHelper;
import io.reactivex.j;
import io.reactivex.o;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import org.b.c;
import org.b.d;
public final class b<R> extends j<R> {
/* renamed from: b reason: collision with root package name */
final g f7015b;
final org.b.b<? extends R> c;
static final class a<R> extends AtomicReference<d> implements io.reactivex.d, o<R>, d {
/* renamed from: a reason: collision with root package name */
final c<? super R> f7016a;
/* renamed from: b reason: collision with root package name */
org.b.b<? extends R> f7017b;
io.reactivex.b.c c;
final AtomicLong d = new AtomicLong();
a(c<? super R> cVar, org.b.b<? extends R> bVar) {
this.f7016a = cVar;
this.f7017b = bVar;
}
public final void onNext(R r) {
this.f7016a.onNext(r);
}
public final void onError(Throwable th) {
this.f7016a.onError(th);
}
public final void onComplete() {
org.b.b<? extends R> bVar = this.f7017b;
if (bVar == null) {
this.f7016a.onComplete();
return;
}
this.f7017b = null;
bVar.subscribe(this);
}
public final void request(long j) {
SubscriptionHelper.deferredRequest(this, this.d, j);
}
public final void cancel() {
this.c.dispose();
SubscriptionHelper.cancel(this);
}
public final void onSubscribe(io.reactivex.b.c cVar) {
if (DisposableHelper.validate(this.c, cVar)) {
this.c = cVar;
this.f7016a.onSubscribe(this);
}
}
public final void onSubscribe(d dVar) {
SubscriptionHelper.deferredSetOnce(this, this.d, dVar);
}
}
public b(g gVar, org.b.b<? extends R> bVar) {
this.f7015b = gVar;
this.c = bVar;
}
public final void subscribeActual(c<? super R> cVar) {
this.f7015b.subscribe(new a(cVar, this.c));
}
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
36f2120c76bd3287f83560d3c98d1b8d91fbdb31
|
3eca6278418d9eef7f5f850b23714a8356ef525f
|
/tumi/ServicioEJB/ejbModule/pe/com/tumi/servicio/solicitudPrestamo/facade/PrestamoFacadeRemote.java
|
f5c500838c96fd97c6e0e3c9b95d3e6720f419f5
|
[] |
no_license
|
cdelosrios88/tumiws-bizarq
|
2728235b3f3239f12f14b586bb6349e2f9b8cf4f
|
7b32fa5765a4384b8d219c5f95327b2e14dd07ac
|
refs/heads/master
| 2021-01-23T22:53:21.052873
| 2014-07-05T05:19:58
| 2014-07-05T05:19:58
| 32,641,875
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,308
|
java
|
package pe.com.tumi.servicio.solicitudPrestamo.facade;
import java.util.List;
import javax.ejb.Remote;
import pe.com.tumi.credito.socio.aperturaCuenta.core.domain.Cuenta;
import pe.com.tumi.framework.negocio.exception.BusinessException;
import pe.com.tumi.parametro.general.domain.Archivo;
import pe.com.tumi.persona.core.domain.CuentaBancaria;
import pe.com.tumi.persona.core.domain.Persona;
import pe.com.tumi.seguridad.login.domain.Usuario;
import pe.com.tumi.servicio.configuracion.domain.ConfServDetalleId;
import pe.com.tumi.servicio.solicitudPrestamo.domain.CancelacionCredito;
import pe.com.tumi.servicio.solicitudPrestamo.domain.CronogramaCredito;
import pe.com.tumi.servicio.solicitudPrestamo.domain.EgresoDetalleInterfaz;
import pe.com.tumi.servicio.solicitudPrestamo.domain.EstadoCredito;
import pe.com.tumi.servicio.solicitudPrestamo.domain.ExpedienteCredito;
import pe.com.tumi.servicio.solicitudPrestamo.domain.ExpedienteCreditoId;
import pe.com.tumi.servicio.solicitudPrestamo.domain.RequisitoCredito;
import pe.com.tumi.servicio.solicitudPrestamo.domain.composite.RequisitoCreditoComp;
import pe.com.tumi.servicio.solicitudPrestamo.domain.composite.RequisitoCreditoComp2;
import pe.com.tumi.tesoreria.banco.domain.Bancocuenta;
import pe.com.tumi.tesoreria.egreso.domain.ControlFondosFijos;
import pe.com.tumi.tesoreria.egreso.domain.Egreso;
@Remote
public interface PrestamoFacadeRemote {
public List<ExpedienteCredito> obtenerExpedientePorIdPersonayIdEmpresa(Integer intIdPersona, Integer intIdEmpresa) throws BusinessException;
public List<ExpedienteCredito> buscarExpedienteParaGiro(List<Persona> listaPersonaFiltro, Integer intTipoCreditoFiltro,
EstadoCredito estadoCreditoFiltro, Integer intItemExpedienteFiltro, Integer intTipoBusquedaSucursal,
Integer intIdSucursalFiltro, Integer intIdSubsucursalFiltro) throws BusinessException;
public List<CancelacionCredito> getListaCancelacionCreditoPorExpedienteCredito(ExpedienteCredito expedienteCredito) throws BusinessException;
public ExpedienteCredito grabarGiroPrestamo(ExpedienteCredito expedienteCredito) throws BusinessException;
public List<CronogramaCredito> getListaCronogramaCreditoPorExpedienteCredito(ExpedienteCredito expedienteCredito) throws BusinessException;
public EstadoCredito obtenerUltimoEstadoCredito(ExpedienteCredito expedienteCredito, Integer intTipoEstado) throws BusinessException;
public Cuenta getCuentaActualPorIdPersona(Integer intIdPersona, Integer intIdEmpresa) throws BusinessException;
public List<EgresoDetalleInterfaz> cargarListaEgresoDetalleInterfaz(ExpedienteCredito expedienteCredito) throws BusinessException;
public Egreso generarEgresoPrestamo(ExpedienteCredito expedienteCredito, ControlFondosFijos controlFondosFijos, Usuario usuario)
throws BusinessException;
public ExpedienteCredito getExpedienteCreditoPorId(ExpedienteCreditoId expedienteCreditoId) throws BusinessException;
public ExpedienteCredito obtenerExpedientePorEgreso(Egreso egreso)throws BusinessException;
public Egreso generarEgresoPrestamoCheque(ExpedienteCredito expedienteCredito, Bancocuenta bancoCuenta, Usuario usuario,
Integer intNumeroCheque, Integer intTipoDocumentoValidar)throws BusinessException;
public Egreso generarEgresoPrestamoTransferencia(ExpedienteCredito expedienteCredito, Bancocuenta bancoCuentaOrigen, Usuario usuario,
Integer intNumeroTransferencia, Integer intTipoDocumentoValidar, CuentaBancaria cuentaBancariaDestino)throws BusinessException;
//JCHAVEZ 31.01.2014
public List<RequisitoCreditoComp> getRequisitoGiroPrestamo(ExpedienteCredito expCred) throws BusinessException;
//JCHAVEZ 03.02.2014
public RequisitoCredito grabarRequisito(RequisitoCredito reqCred) throws BusinessException;
public List<RequisitoCredito> getListaPorPkExpedienteCreditoYRequisitoDetalle(ExpedienteCreditoId pId, ConfServDetalleId rId) throws BusinessException;
public Archivo getArchivoPorRequisitoCredito(RequisitoCredito reqCred)throws BusinessException;
//JCHAVEZ 11.02.2014
public List<RequisitoCreditoComp2> getRequisitoGiroPrestamoBanco(ExpedienteCredito expCred) throws BusinessException;
public ExpedienteCredito grabarGiroPrestamoPorTesoreria(ExpedienteCredito expedienteCredito) throws BusinessException;
}
|
[
"cdelosrios@bizarq.com@b3a863b4-f5f8-5366-a268-df30542ed8c1"
] |
cdelosrios@bizarq.com@b3a863b4-f5f8-5366-a268-df30542ed8c1
|
1918b537e313dfb7bc7c720fbeeb4fa18f0b839e
|
4627d514d6664526f58fbe3cac830a54679749cd
|
/results/evosuite5/mockito-org.mockito.cglib.core.ClassEmitter-19/org/mockito/cglib/core/ClassEmitter_ESTest_scaffolding.java
|
9c3cecf49f6dddf77411712c55e0ec8382eab80d
|
[] |
no_license
|
STAMP-project/Cling-application
|
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
|
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
|
refs/heads/master
| 2022-07-27T09:30:16.423362
| 2022-07-19T12:01:46
| 2022-07-19T12:01:46
| 254,310,667
| 2
| 2
| null | 2021-07-12T12:29:50
| 2020-04-09T08:11:35
| null |
UTF-8
|
Java
| false
| false
| 6,609
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Aug 13 14:00:11 GMT 2019
*/
package org.mockito.cglib.core;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ClassEmitter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
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.mockito.cglib.core.ClassEmitter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
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.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/botsing-integration-experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ClassEmitter_ESTest_scaffolding.class.getClassLoader() ,
"org.mockito.cglib.core.MethodInfo",
"org.mockito.cglib.core.CodeEmitter$State",
"org.mockito.cglib.core.TypeUtils",
"org.mockito.cglib.core.CodeEmitter",
"org.mockito.cglib.core.Block",
"org.mockito.cglib.core.Constants",
"org.mockito.asm.ClassReader",
"org.mockito.cglib.core.LocalVariablesSorter$1",
"org.mockito.cglib.core.LocalVariablesSorter",
"org.mockito.asm.Type",
"org.mockito.cglib.core.ClassEmitter$2",
"org.mockito.cglib.core.ClassEmitter$3",
"org.mockito.cglib.core.ClassInfo",
"org.mockito.asm.MethodWriter",
"org.mockito.asm.Opcodes",
"org.mockito.asm.AnnotationWriter",
"org.mockito.asm.Edge",
"org.mockito.cglib.core.ClassEmitter$FieldInfo",
"org.mockito.asm.Label",
"org.mockito.cglib.core.ClassEmitter$1",
"org.mockito.cglib.core.Signature",
"org.mockito.asm.Attribute",
"org.mockito.cglib.core.LocalVariablesSorter$State",
"org.mockito.asm.AnnotationVisitor",
"org.mockito.asm.ClassAdapter",
"org.mockito.cglib.core.Predicate",
"org.mockito.cglib.core.Local",
"org.mockito.asm.ByteVector",
"org.mockito.asm.Item",
"org.mockito.asm.ClassVisitor",
"org.mockito.cglib.core.ClassEmitter",
"org.mockito.asm.FieldVisitor",
"org.mockito.cglib.core.CodeGenerationException",
"org.mockito.asm.MethodVisitor",
"org.mockito.cglib.core.CollectionUtils",
"org.mockito.cglib.core.Transformer",
"org.mockito.asm.Frame",
"org.mockito.asm.MethodAdapter",
"org.mockito.asm.ClassWriter",
"org.mockito.cglib.core.ProcessSwitchCallback",
"org.mockito.asm.FieldWriter"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ClassEmitter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.mockito.asm.ClassAdapter",
"org.mockito.cglib.core.ClassEmitter",
"org.mockito.cglib.core.ClassInfo",
"org.mockito.cglib.core.ClassEmitter$1",
"org.mockito.asm.MethodAdapter",
"org.mockito.cglib.core.ClassEmitter$2",
"org.mockito.cglib.core.LocalVariablesSorter",
"org.mockito.cglib.core.CollectionUtils",
"org.mockito.cglib.core.TypeUtils",
"org.mockito.cglib.core.Signature",
"org.mockito.cglib.core.CodeEmitter",
"org.mockito.cglib.core.ClassEmitter$3",
"org.mockito.cglib.core.ClassEmitter$FieldInfo",
"org.mockito.asm.Type",
"org.mockito.cglib.core.Constants",
"org.mockito.asm.ClassReader",
"org.mockito.asm.ClassWriter",
"org.mockito.asm.ByteVector",
"org.mockito.asm.Item",
"org.mockito.asm.MethodWriter",
"org.mockito.asm.Attribute",
"org.mockito.asm.FieldWriter",
"org.mockito.asm.AnnotationWriter",
"org.mockito.asm.Label",
"org.mockito.asm.Frame",
"org.mockito.cglib.core.LocalVariablesSorter$State",
"org.mockito.cglib.core.MethodInfo",
"org.mockito.cglib.core.CodeEmitter$State",
"org.mockito.asm.Edge"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d7adbed23dae63cef964ba480c3a9165450ba234
|
a5a81138a252f33c4f18012ccdaf8b08f22c4d5f
|
/mugen-beanmodule/src/java/com/arexis/mugen/ontologies/doid/DoidDTO_ISA.java
|
1834a92fa9d5eff8ee8b8b761da639fb3f4d2088
|
[] |
no_license
|
bioit/mugen
|
ce97e540d05af07f5b03df0e6ce411c8d828e332
|
8d96871be007d9ed79f1d61a6ea21d093375e780
|
refs/heads/master
| 2021-01-17T11:55:05.738117
| 2011-01-21T21:07:58
| 2011-01-21T21:07:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
package com.arexis.mugen.ontologies.doid;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
public class DoidDTO_ISA implements Serializable {
private String is_a;
public DoidDTO_ISA(String passed_is_a) {
this.is_a = passed_is_a;
}
public String getIsA(){
return is_a;
}
public int getIsAInt(){
return new Integer(is_a).intValue();
}
}
|
[
"discounix@Disco-Unixs-iMac.local"
] |
discounix@Disco-Unixs-iMac.local
|
bcf8b83a26a3fd9cc9a3dfcfe67ce0d5d03d4e38
|
f2e5f0c74cca281000e5b0a47044a84b49d5cb87
|
/Comp401/Comp 401 Workspace/lecture09/src/lec09/ex4/SubA.java
|
423c6e5f59907348de5abe7be7d3289ec87465cb
|
[] |
no_license
|
AaronZhangGitHub/Archive
|
7ad351831c7d1d197471213a2b483696ee38f426
|
e803443d5333f7f8f99e99e257735d5440ca8df7
|
refs/heads/master
| 2021-01-16T19:06:45.637250
| 2017-08-12T20:49:55
| 2017-08-12T20:49:55
| 100,136,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 198
|
java
|
package lec09.ex4;
public class SubA extends A {
private int z;
public SubA(int x, int y, int z) {
super(x,y);
this.z = z;
}
public int methodInSubA() {
return methodInA() + z;
}
}
|
[
"aaronz@live.unc.edu"
] |
aaronz@live.unc.edu
|
8166774c1c46b6632f391a568198ce4b36f7884b
|
398e376f38a1a8b4623ab2cb191624ebdaf2efd5
|
/src/main/java/yui/momoka/dao/BlogTypeDao.java
|
1523e31068f45ce69d953b3d5c8b2bbefd738251
|
[] |
no_license
|
uchiyamakoki/momoka01
|
af2e3fd9ae56a9b501a3747535147d2d2b74da2b
|
644e9a0174121081d7f60e2cf3bae90a5e2f2a29
|
refs/heads/master
| 2021-04-03T10:13:24.444089
| 2018-03-10T15:35:46
| 2018-03-10T15:35:46
| 124,387,590
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,087
|
java
|
package yui.momoka.dao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yui.momoka.entity.BlogType;
import java.util.List;
/*
博客类别信息
*/
@Repository
public interface BlogTypeDao {
/**
* 添加博客类别信息
* @param blogType
* @return
*/
Integer addBlogType(BlogType blogType);
/**
* 删除博客类别信息
* @param id
* @return
*/
Integer deleteBlogType(Integer id);
/**
* 更新博客类别信息
* @param blogType
* @return
*/
Integer updateBlogType(BlogType blogType);
/**
* 根据id查询博客类别信息
* @param id
* @return
*/
BlogType getById(Integer id);
/**
* 分页查询博客类别信息
* @param start
* @param end
* @return
*/
List<BlogType> listByPage(@Param("start") Integer start, @Param("end") Integer end);
/**
* 查询总记录数
* @return
*/
Long getTotal();
}
|
[
"454768497@qq.com"
] |
454768497@qq.com
|
e9cf52c86b14b1058a5e6c1a2b45318d297f2525
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/Mate20-9.0/src/main/java/android/net/wifi/hotspot2/IProvisioningCallback.java
|
87063aeccbbf9c5c376d3c335afa019e0182a120
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,284
|
java
|
package android.net.wifi.hotspot2;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface IProvisioningCallback extends IInterface {
public static abstract class Stub extends Binder implements IProvisioningCallback {
private static final String DESCRIPTOR = "android.net.wifi.hotspot2.IProvisioningCallback";
static final int TRANSACTION_onProvisioningFailure = 1;
static final int TRANSACTION_onProvisioningStatus = 2;
private static class Proxy implements IProvisioningCallback {
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
public void onProvisioningFailure(int status) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeInt(status);
this.mRemote.transact(1, _data, null, 1);
} finally {
_data.recycle();
}
}
public void onProvisioningStatus(int status) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeInt(status);
this.mRemote.transact(2, _data, null, 1);
} finally {
_data.recycle();
}
}
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IProvisioningCallback asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof IProvisioningCallback)) {
return new Proxy(obj);
}
return (IProvisioningCallback) iin;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (code != 1598968902) {
switch (code) {
case 1:
data.enforceInterface(DESCRIPTOR);
onProvisioningFailure(data.readInt());
return true;
case 2:
data.enforceInterface(DESCRIPTOR);
onProvisioningStatus(data.readInt());
return true;
default:
return super.onTransact(code, data, reply, flags);
}
} else {
reply.writeString(DESCRIPTOR);
return true;
}
}
}
void onProvisioningFailure(int i) throws RemoteException;
void onProvisioningStatus(int i) throws RemoteException;
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
77f50998385cd35840b8c6bafa7808bb33f1c0a4
|
628cf6fc211841dbb3f22e30e8b96562886c3724
|
/src/api-learning/api-plugin/src/cn/edu/pku/rm/learnapi/Combinator.java
|
edcdd9b4e2b4cc41a49b623e68d63ef622c2fa26
|
[] |
no_license
|
DylanYu/smatrt
|
ef4c54bf187762bc22407ea4d6e2e6c879072949
|
c85baa4255d2e6792c1ed9b1e7e184860cdac9ad
|
refs/heads/master
| 2016-09-06T04:46:19.998706
| 2013-07-20T10:03:29
| 2013-07-20T10:03:29
| 33,805,621
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,068
|
java
|
/**
*
*/
package cn.edu.pku.rm.learnapi;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ILocalVariable;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.SourceTypeElementInfo;
import cn.edu.pku.sei.ra.dt.DtFactory;
import cn.edu.pku.sei.ra.dt.Place;
import cn.edu.pku.sei.ra.dt.Repository;
import cn.edu.pku.sei.ra.dt.Transition;
import cn.edu.pku.sei.ra.dt.TransitionType;
/**
* @author hubert
*
*/
public class Combinator {
List<Repository> origin;
Repository entry;
private class Candidate{
Repository master;
Repository slave;
Transition trans;
}
public Repository combine() throws JavaModelException{
int i=5;
while(true){
i--;
List<Candidate> candidates=new ArrayList<Candidate>();
if(entry==null)
entry=null;
for(Transition trans:entry.getTransition()){
IJavaElement je=trans.getJavaElement();
if(je==null || !(je instanceof IMethod))
continue;
for(Repository found:origin){
if(found==entry)
continue;
if(je.equals(found.getMethod())){
Candidate cd=new Candidate();
cd.master=entry;
cd.slave=found;
cd.trans=trans;
candidates.add(cd);
}
}
}
if(candidates.size()==0 || i==0)
return this.entry;
for(Candidate cd:candidates){
replaceTransition(cd.trans, cd.master, cd.slave);
}
}
}
public Combinator(List<Repository> origin, String entryName) throws JavaModelException{
this.origin=origin;
for(Repository rep:origin){
String temp=rep.getMethod().getElementName();
if(temp.endsWith(entryName))
entry=rep;
}
}
/**
* @throws JavaModelException
*
*/
public Combinator(List<Repository> origin, Repository entry) throws JavaModelException {
this.origin=origin;
this.entry=entry;
}
/***
* TODO be careful when there are multiple returns
* @param trans
* @param master
* @param slave
* @throws JavaModelException
*/
private void replaceTransition(Transition trans, Repository master, Repository orislave) throws JavaModelException{
List<Place> methodEnds=new ArrayList<Place>();
Repository slave=(Repository)EcoreUtil.copy(orislave);
if(trans.getSignature().equals("addProperties"))
System.out.println("for debug");
int start=0;
if(((IMethod)slave.getMethod()).getParameterNames().length<trans.getInput().size())
start=1;
for(Place para:slave.getPlace()){
if(para.getParaOrder()==0)
continue;
Transition intertrans=DtFactory.eINSTANCE.createTransition();
if(start+para.getParaOrder()-1 >= trans.getInput().size()){
System.out.println("for debug");
continue;
}
//String typesig=para.getTypefull();
//if(SourceSampleUtil.isForAPI(typesig)){
//intertrans.setSignature(typesig);
//intertrans.setInvolved(true);
//}
intertrans.getInput().add(trans.getInput().get(start+para.getParaOrder()-1));
intertrans.setType(TransitionType.INTERMEDIATE);
intertrans.setOutput(para);
master.getTransition().add(intertrans);
para.setParaOrder(0);
}
trans.getInput().clear();
for(Place place:slave.getPlace())
if("MethodEnd".equals(place.getName())){
Transition intertrans=DtFactory.eINSTANCE.createTransition();
intertrans.setType(TransitionType.INTERMEDIATE);
place.setName("inner return");
intertrans.getInput().add(place);
intertrans.setOutput(trans.getOutput());
master.getTransition().add(intertrans);
}
trans.getInput().clear();
trans.setOutput(null);
master.getPlace().addAll(slave.getPlace());
int i=master.getTransition().indexOf(trans);
master.getTransition().addAll(i,slave.getTransition());
master.getTransition().remove(trans);
}
}
|
[
"fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8"
] |
fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8
|
983ce7e45804ff622a79d6f1475ddbc1bda43b05
|
812dbc150deb9c779514dc80fd521ca11fc428f4
|
/code/com/jivesoftware/os/tasmo/tasmo-lib/src/main/java/com/jivesoftware/os/tasmo/lib/ingress/TasmoNotificationsIngress.java
|
bb662c911533a15cbd819825982de104be610a0d
|
[
"Apache-2.0"
] |
permissive
|
jivesoftware/tasmo
|
50d650262810c8744ff8e5b0817df16bc200a663
|
3de99a078de545f3c57f4876ba0fea1fcaa0fcf7
|
refs/heads/master
| 2021-03-19T07:14:50.144891
| 2014-08-08T00:19:04
| 2014-08-08T00:19:04
| 15,554,335
| 1
| 4
| null | 2017-03-08T00:58:55
| 2013-12-31T17:54:07
|
Java
|
UTF-8
|
Java
| false
| false
| 4,466
|
java
|
package com.jivesoftware.os.tasmo.lib.ingress;
import com.jivesoftware.os.jive.utils.base.interfaces.CallbackStream;
import com.jivesoftware.os.jive.utils.id.ObjectId;
import com.jivesoftware.os.jive.utils.id.TenantIdAndCentricId;
import com.jivesoftware.os.jive.utils.logger.MetricLogger;
import com.jivesoftware.os.jive.utils.logger.MetricLoggerFactory;
import com.jivesoftware.os.jive.utils.ordered.id.OrderIdProvider;
import com.jivesoftware.os.tasmo.id.ViewValue;
import com.jivesoftware.os.tasmo.lib.read.ReadMaterializerViewFields;
import com.jivesoftware.os.tasmo.lib.read.ViewFieldsResponse;
import com.jivesoftware.os.tasmo.lib.write.PathId;
import com.jivesoftware.os.tasmo.lib.write.ViewField;
import com.jivesoftware.os.tasmo.view.notification.api.ViewNotification;
import com.jivesoftware.os.tasmo.view.reader.api.ViewDescriptor;
import com.jivesoftware.os.tasmo.view.reader.service.writer.ViewValueWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
*
* @author jonathan.colt
*/
public class TasmoNotificationsIngress implements CallbackStream<List<ViewNotification>> {
private static final MetricLogger LOG = MetricLoggerFactory.getLogger();
private final OrderIdProvider threadTimestamp;
private final ReadMaterializerViewFields readMaterializer;
private final ViewValueWriter viewValueWriter;
public TasmoNotificationsIngress(OrderIdProvider threadTimestamp,
ReadMaterializerViewFields readMaterializer,
ViewValueWriter viewValueWriter) {
this.threadTimestamp = threadTimestamp;
this.readMaterializer = readMaterializer;
this.viewValueWriter = viewValueWriter;
}
@Override
public List<ViewNotification> callback(List<ViewNotification> viewNotifications) throws Exception {
List<ViewNotification> failedToProcess = new ArrayList<>();
if (viewNotifications == null) {
return failedToProcess;
}
Map<ViewDescriptor, ViewNotification> indexViewDescriptorToViewNotification = new HashMap<>();
List<ViewDescriptor> viewDescriptors = new ArrayList<>(viewNotifications.size());
for (ViewNotification viewNotification : viewNotifications) {
ViewDescriptor viewDescriptor = new ViewDescriptor(viewNotification.getTenantIdAndCentricId(),
viewNotification.getActorId(),
viewNotification.getViewId());
viewDescriptors.add(viewDescriptor);
indexViewDescriptorToViewNotification.put(viewDescriptor, viewNotification);
}
long threadTime = threadTimestamp.nextId();
Map<ViewDescriptor, ViewFieldsResponse> readMaterialized = readMaterializer.readMaterialize(viewDescriptors);
for (Entry<ViewDescriptor, ViewFieldsResponse> changeSets : readMaterialized.entrySet()) {
ViewDescriptor viewDescriptor = changeSets.getKey();
ViewFieldsResponse fieldsResponse = changeSets.getValue();
if (fieldsResponse.isOk()) {
TenantIdAndCentricId tenantIdAndCentricId = viewDescriptor.getTenantIdAndCentricId();
ViewValueWriter.Transaction transaction = viewValueWriter.begin(tenantIdAndCentricId);
for (ViewField change : fieldsResponse.getViewFields()) {
if (change.getType() == ViewField.ViewFieldChangeType.add) {
PathId[] modelPathInstanceIds = change.getModelPathInstanceIds();
ObjectId[] ids = new ObjectId[modelPathInstanceIds.length];
for (int i = 0; i < modelPathInstanceIds.length; i++) {
ids[i] = modelPathInstanceIds[i].getObjectId();
}
transaction.set(change.getViewObjectId(),
change.getModelPathIdHashcode(),
ids,
new ViewValue(change.getModelPathTimestamps(), change.getValue()),
threadTime);
}
}
viewValueWriter.commit(transaction);
viewValueWriter.clear(tenantIdAndCentricId, viewDescriptor.getViewId(), threadTime - 1);
} else {
failedToProcess.add(indexViewDescriptorToViewNotification.get(viewDescriptor));
}
}
return failedToProcess;
}
}
|
[
"jonathan.colt@jivesoftware.com"
] |
jonathan.colt@jivesoftware.com
|
e226271f7acf83ab1c8370685c627c6da42444c6
|
217b6ca03aae468cbae64b519237044cd3178b33
|
/olyo/src/net/java/sip/communicator/service/protocol/ChatRoomConfigurationForm.java
|
4b8eef09dbd70da20a8da76eb50b39fad2fe3403
|
[] |
no_license
|
lilichun/olyo
|
41778e668784ca2fa179c65a67d99f3b94fdbb45
|
b3237b7d62808a5b1d059a8dd426508e6e4af0b9
|
refs/heads/master
| 2021-01-22T07:27:30.658459
| 2008-06-19T09:57:36
| 2008-06-19T09:57:36
| 32,123,461
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol;
import java.util.*;
/**
* The <tt>ChatRoomConfigurationForm</tt> contains the chat room configuration.
* It's meant to be implemented by protocol providers in order to provide an
* access to the administration properties of a chat room. The GUI should be
* able to obtain this form from the chat room and provide the user with the
* user interface representation and the possibility to change it.
* <br>
* The <tt>ChatRoomConfigurationForm</tt> contains a list of
* <tt>ChatRoomConfigurationFormField</tt>s. Each field corresponds to a chat
* room configuration property.
*
* @author Yana Stamcheva
*/
public interface ChatRoomConfigurationForm
{
/**
* Returns an Iterator over a set of <tt>ChatRoomConfigurationFormField</tt>s,
* containing the current configuration of the chat room. This method is
* meant to be used by bundles interested showing and changing the current
* chat room configuration.
*
* @return a list of <tt>ChatRoomConfigurationFormField</tt>s, containing
* the current configuration of the chat room
*/
public Iterator getConfigurationSet();
/**
* Submits the information in this configuration form to the server.
*
* @throws OperationFailedException if the submit opeation do not succeed
* for some reason (e.g. a wrong value is provided for a property)
*/
public void submit() throws OperationFailedException;
}
|
[
"dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0"
] |
dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0
|
3965de57f54f4508f160b6398ac1843ac35f4251
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/boot/svg/a/a/azi.java
|
6dc75191fbe73011db81cb11871039e6cf0082cf
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,887
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public final class azi extends c
{
private final int height = 96;
private final int width = 96;
public final int a(int paramInt, Object[] paramArrayOfObject)
{
switch (paramInt)
{
default:
case 0:
case 1:
case 2:
}
while (true)
{
paramInt = 0;
while (true)
{
return paramInt;
paramInt = 96;
continue;
paramInt = 96;
}
Canvas localCanvas = (Canvas)paramArrayOfObject[0];
paramArrayOfObject = (Looper)paramArrayOfObject[1];
c.h(paramArrayOfObject);
c.g(paramArrayOfObject);
Object localObject = c.k(paramArrayOfObject);
((Paint)localObject).setFlags(385);
((Paint)localObject).setStyle(Paint.Style.FILL);
Paint localPaint = c.k(paramArrayOfObject);
localPaint.setFlags(385);
localPaint.setStyle(Paint.Style.STROKE);
((Paint)localObject).setColor(-16777216);
localPaint.setStrokeWidth(1.0F);
localPaint.setStrokeCap(Paint.Cap.BUTT);
localPaint.setStrokeJoin(Paint.Join.MITER);
localPaint.setStrokeMiter(4.0F);
localPaint.setPathEffect(null);
c.a(localPaint, paramArrayOfObject).setStrokeWidth(1.0F);
localPaint = c.a((Paint)localObject, paramArrayOfObject);
localPaint.setColor(-12799249);
localCanvas.save();
localPaint = c.a(localPaint, paramArrayOfObject);
localObject = c.l(paramArrayOfObject);
((Path)localObject).moveTo(48.11264F, 11.0F);
((Path)localObject).cubicTo(29.075232F, 11.190086F, 20.986343F, 26.826294F, 20.986343F, 40.877155F);
((Path)localObject).cubicTo(9.261343F, 52.839657F, 12.905231F, 69.573708F, 16.545231F, 69.573708F);
((Path)localObject).cubicTo(18.859121F, 69.951294F, 22.617083F, 63.596981F, 22.617083F, 63.596981F);
((Path)localObject).cubicTo(22.617083F, 63.596981F, 22.733749F, 67.556465F, 25.812454F, 71.138359F);
((Path)localObject).cubicTo(22.417454F, 72.655174F, 20.195602F, 75.137932F, 20.195602F, 77.949135F);
((Path)localObject).cubicTo(20.195602F, 82.570686F, 26.175417F, 86.316811F, 33.553936F, 86.316811F);
((Path)localObject).cubicTo(39.042454F, 86.316811F, 43.753193F, 84.242676F, 45.80912F, 81.278877F);
((Path)localObject).lineTo(50.492638F, 81.278877F);
((Path)localObject).cubicTo(52.547268F, 84.242676F, 57.258011F, 86.316811F, 62.746529F, 86.316811F);
((Path)localObject).cubicTo(70.123749F, 86.316811F, 76.106155F, 82.571983F, 76.106155F, 77.949135F);
((Path)localObject).cubicTo(76.106155F, 75.137932F, 73.884308F, 72.656464F, 70.489304F, 71.138359F);
((Path)localObject).cubicTo(73.568008F, 67.556465F, 73.684677F, 63.596981F, 73.684677F, 63.596981F);
((Path)localObject).cubicTo(73.684677F, 63.596981F, 77.441345F, 69.951294F, 79.756531F, 69.573708F);
((Path)localObject).cubicTo(83.39653F, 69.572411F, 87.039124F, 52.838364F, 75.314117F, 40.875862F);
((Path)localObject).cubicTo(75.314117F, 26.826294F, 67.14875F, 11.181034F, 48.11264F, 11.0F);
((Path)localObject).close();
WeChatSVGRenderC2Java.setFillType((Path)localObject, 2);
localCanvas.drawPath((Path)localObject, localPaint);
localCanvas.restore();
c.j(paramArrayOfObject);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.boot.svg.a.a.azi
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
d8eaacdd84a51a2bf00cb02bbad850f7170ab70c
|
3927258e502590626dd18034000e7cad5bb46af6
|
/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/transform/CreateWebACLRequestMarshaller.java
|
37dfae3a847dcf529ab744fc2ee8bf0030ef7e01
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
gauravbrills/aws-sdk-java
|
332f9cf1e357c3d889f753b348eb8d774a30f07c
|
09d91b14bfd6fbc81a04763d679e0f94377e9007
|
refs/heads/master
| 2021-01-21T18:15:06.060014
| 2016-06-11T18:12:40
| 2016-06-11T18:12:40
| 58,072,311
| 0
| 0
| null | 2016-05-04T17:52:28
| 2016-05-04T17:52:28
| null |
UTF-8
|
Java
| false
| false
| 3,615
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.waf.model.transform;
import java.io.ByteArrayInputStream;
import java.util.Collections;
import java.util.Map;
import java.util.List;
import java.util.regex.Pattern;
import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.waf.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* CreateWebACLRequest Marshaller
*/
public class CreateWebACLRequestMarshaller implements
Marshaller<Request<CreateWebACLRequest>, CreateWebACLRequest> {
public Request<CreateWebACLRequest> marshall(
CreateWebACLRequest createWebACLRequest) {
if (createWebACLRequest == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
Request<CreateWebACLRequest> request = new DefaultRequest<CreateWebACLRequest>(
createWebACLRequest, "AWSWAF");
request.addHeader("X-Amz-Target", "AWSWAF_20150824.CreateWebACL");
request.setHttpMethod(HttpMethodName.POST);
request.setResourcePath("");
try {
final StructuredJsonGenerator jsonGenerator = SdkJsonProtocolFactory
.createWriter(false, "1.1");
jsonGenerator.writeStartObject();
if (createWebACLRequest.getName() != null) {
jsonGenerator.writeFieldName("Name").writeValue(
createWebACLRequest.getName());
}
if (createWebACLRequest.getMetricName() != null) {
jsonGenerator.writeFieldName("MetricName").writeValue(
createWebACLRequest.getMetricName());
}
if (createWebACLRequest.getDefaultAction() != null) {
jsonGenerator.writeFieldName("DefaultAction");
WafActionJsonMarshaller.getInstance().marshall(
createWebACLRequest.getDefaultAction(), jsonGenerator);
}
if (createWebACLRequest.getChangeToken() != null) {
jsonGenerator.writeFieldName("ChangeToken").writeValue(
createWebACLRequest.getChangeToken());
}
jsonGenerator.writeEndObject();
byte[] content = jsonGenerator.getBytes();
request.setContent(new ByteArrayInputStream(content));
request.addHeader("Content-Length",
Integer.toString(content.length));
request.addHeader("Content-Type", jsonGenerator.getContentType());
} catch (Throwable t) {
throw new AmazonClientException(
"Unable to marshall request to JSON: " + t.getMessage(), t);
}
return request;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
a283a50ff64fde9521c9c044b125d5c7ff1e0415
|
5440f80ef80e9bd1217ba18fd549881727391f7f
|
/zuul-demo/src/main/java/com/xjf/demo/filter/IpFilter.java
|
34b38536d557e223fa480cfa940e278ab18cf875
|
[] |
no_license
|
fanrendale/SpringCloud
|
cd3356791090ee661168da548470329539bb74a9
|
8b3bc747e2b7e35cfe1b4066d121bb070d3de069
|
refs/heads/master
| 2022-05-15T10:47:57.681139
| 2020-02-19T13:18:34
| 2020-02-19T13:18:34
| 234,743,473
| 0
| 0
| null | 2021-04-26T19:55:15
| 2020-01-18T14:04:15
|
Java
|
UTF-8
|
Java
| false
| false
| 2,761
|
java
|
package com.xjf.demo.filter;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import com.xjf.demo.base.ResponseCode;
import com.xjf.demo.base.ResponseData;
import com.xjf.demo.util.IpUtils;
import com.xjf.demo.util.JsonUtils;
import com.xjf.demo.util.NetworkUtil;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
/**
* 自定义过滤器: IP 过滤
*
* @author xjf
* @date 2020/1/28 22:11
*/
public class IpFilter extends ZuulFilter {
// IP 黑名单列表
private List<String> blackIpList = Arrays.asList("192.168.43.8");
/**
* 过滤器类型: pre, route, post, error
* @return
*/
@Override
public String filterType() {
//路由前
return "pre";
}
/**
* 过滤器的执行顺序,数值越小,优先级越高
* @return
*/
@Override
public int filterOrder() {
return 1;
}
/**
* 是否执行过滤器:true为执行,false为不执行
* @return
*/
@Override
public boolean shouldFilter() {
return false;
}
@Override
public Object run() throws ZuulException {
// 模拟异常报错,测试异常过滤器
// System.out.println(2/0);
RequestContext ctx = RequestContext.getCurrentContext();
//从请求中获取请求的IP地址
// String ip = IpUtils.getIpAddr(ctx.getRequest());
String ip = null;
try {
//从请求中获取请求的IP地址
ip = NetworkUtil.getIpAddress(ctx.getRequest());
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("请求的 IP : " + ip);
// 测试 RequestContext 传参,可以在多个过滤器中传值
ctx.set("name", "xjf");
Object name = ctx.get("name");
System.out.println(" RequestContext 中取值: name=" + name);
// 在黑名单中禁用
if (StringUtils.isNotBlank(ip) && blackIpList.contains(ip)){
// 告诉 Zuul 不需要将当前请求转发到后端的服务
ctx.setSendZuulResponse(false);
// 拦截本地转发请求(即设置了 forward:/local 的路由),上一行设置不能实现本地请求的拦截。
ctx.set("sendForwardFilter.ran", true);
ResponseData data = ResponseData.fail(" 非法请求 ", ResponseCode.NO_AUTH_CODE.getCode());
ctx.setResponseBody(JsonUtils.toJson(data));
ctx.getResponse().setContentType("application/json; charset=utf-8");
return null;
}
return null;
}
}
|
[
"1053314919@qq.com"
] |
1053314919@qq.com
|
c20b9ff60edcc6d0ad16ec9fbd973e7b1b553521
|
0011841c2fb086e4db80813e454a366450f96f6b
|
/app/src/main/java/com/teamtreehouse/musicmachine/DownloadThread.java
|
779406259ace77a6907dad68f037328da37262cc
|
[] |
no_license
|
Rikharthu/Music_Machine-Threads_and_Services
|
b20f061334e716f8312955d07ab413b40bedb179
|
20a501b0435bb90e3f765ff35c8f8255d529314e
|
refs/heads/master
| 2020-12-04T22:24:08.087817
| 2016-09-25T18:10:12
| 2016-09-25T18:10:12
| 67,045,059
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 601
|
java
|
package com.teamtreehouse.musicmachine;
import android.os.Looper;
import android.util.Log;
public class DownloadThread extends Thread {
private static final String TAG = DownloadThread.class.getSimpleName();
public DownloadHandler mHandler;
@Override
public void run() {
Log.d(TAG,"run()");
// Initialize the current thread as a looper
Looper.prepare();
// By default a Handler is associated with a looper of the current thread
mHandler=new DownloadHandler();
// Start looping over the message queue
Looper.loop();
}
}
|
[
"uberviolence@gmail.com"
] |
uberviolence@gmail.com
|
a37a1d6b0e629495e471a91fd4c09313d33ffac1
|
331da454c9cfe8d366d4879ac91c1d2d9f8178c9
|
/src/com/hanzo/register/rules/BirthdayRule.java
|
4709bb082144a8b5446b5279cff4b81535db0b27
|
[] |
no_license
|
JeffersonAlmeida/Register
|
9c8e98e95414e71c7e8255641fe2ce54415ea7c8
|
ef1edd25d59004da08ca83f913bd83a2676ef655
|
refs/heads/master
| 2021-01-21T05:05:16.292928
| 2015-09-17T23:08:59
| 2015-09-17T23:08:59
| 42,589,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.hanzo.register.rules;
import android.content.Context;
import android.view.View;
import com.hanzo.register.R;
import com.mobsandgeeks.saripaar.QuickRule;
public class BirthdayRule extends QuickRule<View> {
@Override
public boolean isValid(View view) {
return true;
}
@Override
public String getMessage(Context context) {
return context.getResources().getString(R.string.invalid);
}
}
|
[
"jefferson.almeida.comp@gmail.com"
] |
jefferson.almeida.comp@gmail.com
|
8f8475cb35155ec88be8623ac6018804681b5cf0
|
5e3f004fdfec54df1295e5cf6a21cf0897764952
|
/src/main/java/org/glite/authz/pep/pip/provider/authnprofilespip/AuthenticationProfilePolicySetImpl.java
|
33e353feaab5c662d751b38608c931c2ed07f5f9
|
[] |
no_license
|
argus-authz/argus-pep-server
|
ad44750ee6f67f0dd4a202faf0f940c966c76cfb
|
0a8a04e0168b26c6fdb7e7b3e6ecf27939c44e2d
|
refs/heads/develop
| 2023-07-20T22:32:51.292622
| 2022-09-20T15:01:26
| 2022-09-20T15:01:26
| 4,432,539
| 1
| 2
| null | 2023-06-14T22:53:56
| 2012-05-24T12:30:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,712
|
java
|
/*
* Copyright (c) Members of the EGEE Collaboration. 2006-2010.
* See http://www.eu-egee.org/partners/ for details on the copyright holders.
*
* 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.glite.authz.pep.pip.provider.authnprofilespip;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
public class AuthenticationProfilePolicySetImpl
implements AuthenticationProfilePolicySet {
private final Map<String, AuthenticationProfilePolicy> voProfilePolicies;
private final AuthenticationProfilePolicy anyVoProfilePolicy;
private final AuthenticationProfilePolicy anyCertificateProfilePolicy;
private AuthenticationProfilePolicySetImpl(Builder builder) {
voProfilePolicies = builder.voProfilePolicies;
anyVoProfilePolicy = builder.anyVoProfilePolicy;
anyCertificateProfilePolicy = builder.anyCertificateProfilePolicy;
}
@Override
public Map<String, AuthenticationProfilePolicy> getVoProfilePolicies() {
return voProfilePolicies;
}
@Override
public Optional<AuthenticationProfilePolicy> getAnyVoProfilePolicy() {
return Optional.ofNullable(anyVoProfilePolicy);
}
@Override
public Optional<AuthenticationProfilePolicy> getAnyCertificateProfilePolicy() {
return Optional.ofNullable(anyCertificateProfilePolicy);
}
public static class Builder {
private Map<String, AuthenticationProfilePolicy> voProfilePolicies;
private AuthenticationProfilePolicy anyVoProfilePolicy;
private AuthenticationProfilePolicy anyCertificateProfilePolicy;
public Builder() {
voProfilePolicies = new LinkedHashMap<>();
}
public Builder addVoPolicy(String voName, AuthenticationProfilePolicy policy) {
voProfilePolicies.put(voName, policy);
return this;
}
public Builder anyVoPolicy(AuthenticationProfilePolicy policy) {
this.anyVoProfilePolicy = policy;
return this;
}
public Builder anyCertificatePolicy(AuthenticationProfilePolicy policy) {
this.anyCertificateProfilePolicy = policy;
return this;
}
public AuthenticationProfilePolicySet build() {
return new AuthenticationProfilePolicySetImpl(this);
}
}
}
|
[
"andrea.ceccanti@gmail.com"
] |
andrea.ceccanti@gmail.com
|
de8237c8f69d62dcafeba32b5063342751794389
|
cb762d4b0f0ea986d339759ba23327a5b6b67f64
|
/src/dao/com/joymain/jecs/bd/model/JbdManualCon.java
|
bc0d4025bba50b5f80df96620ce6be94177a4854
|
[
"Apache-2.0"
] |
permissive
|
lshowbiz/agnt_ht
|
c7d68c72a1d5fa7cd0e424eabb9159d3552fe9dc
|
fd549de35cb12a2e3db1cd9750caf9ce6e93e057
|
refs/heads/master
| 2020-08-04T14:24:26.570794
| 2019-10-02T03:04:13
| 2019-10-02T03:04:13
| 212,160,437
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,346
|
java
|
package com.joymain.jecs.bd.model;
// Generated 2013-11-26 15:39:19 by Hibernate Tools 3.1.0.beta4
import java.util.Date;
/**
* @struts.form include-all="true" extends="BaseForm"
* @hibernate.class
* table="JBD_MANUAL_CON"
*
*/
public class JbdManualCon extends com.joymain.jecs.model.BaseObject implements java.io.Serializable {
// Fields
private Long id;
private String userCode;
private Integer startWeek;
private Integer endWeek;
private Integer salesStatus;
private Integer consumerStatus;
private String createNo;
private Date createTime;
// Constructors
/** default constructor */
public JbdManualCon() {
}
/** full constructor */
public JbdManualCon(String userCode, Integer startWeek, Integer endWeek, Integer salesStatus, Integer consumerStatus, String createNo, Date createTime) {
this.userCode = userCode;
this.startWeek = startWeek;
this.endWeek = endWeek;
this.salesStatus = salesStatus;
this.consumerStatus = consumerStatus;
this.createNo = createNo;
this.createTime = createTime;
}
// Property accessors
/**
* * @hibernate.id
* generator-class="sequence"
* type="java.lang.Long"
* column="ID"
*@hibernate.generator-param name="sequence" value="SEQ_BD"
*
*/
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
/**
* * @hibernate.property
* column="USER_CODE"
* length="50"
*
*/
public String getUserCode() {
return this.userCode;
}
public void setUserCode(String userCode) {
this.userCode = userCode;
}
/**
* * @hibernate.property
* column="START_WEEK"
* length="22"
*
*/
public Integer getStartWeek() {
return this.startWeek;
}
public void setStartWeek(Integer startWeek) {
this.startWeek = startWeek;
}
/**
* * @hibernate.property
* column="END_WEEK"
* length="22"
*
*/
public Integer getEndWeek() {
return this.endWeek;
}
public void setEndWeek(Integer endWeek) {
this.endWeek = endWeek;
}
/**
* * @hibernate.property
* column="SALES_STATUS"
* length="22"
*
*/
public Integer getSalesStatus() {
return this.salesStatus;
}
public void setSalesStatus(Integer salesStatus) {
this.salesStatus = salesStatus;
}
/**
* * @hibernate.property
* column="CONSUMER_STATUS"
* length="22"
*
*/
public Integer getConsumerStatus() {
return this.consumerStatus;
}
public void setConsumerStatus(Integer consumerStatus) {
this.consumerStatus = consumerStatus;
}
/**
* * @hibernate.property
* column="CREATE_NO"
* length="20"
*
*/
public String getCreateNo() {
return this.createNo;
}
public void setCreateNo(String createNo) {
this.createNo = createNo;
}
/**
* * @hibernate.property
* column="CREATE_TIME"
* length="7"
*
*/
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* toString
* @return String
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
buffer.append("userCode").append("='").append(getUserCode()).append("' ");
buffer.append("startWeek").append("='").append(getStartWeek()).append("' ");
buffer.append("endWeek").append("='").append(getEndWeek()).append("' ");
buffer.append("salesStatus").append("='").append(getSalesStatus()).append("' ");
buffer.append("consumerStatus").append("='").append(getConsumerStatus()).append("' ");
buffer.append("createNo").append("='").append(getCreateNo()).append("' ");
buffer.append("createTime").append("='").append(getCreateTime()).append("' ");
buffer.append("]");
return buffer.toString();
}
public boolean equals(Object other) {
if ( (this == other ) ) return true;
if ( (other == null ) ) return false;
if ( !(other instanceof JbdManualCon) ) return false;
JbdManualCon castOther = ( JbdManualCon ) other;
return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
&& ( (this.getUserCode()==castOther.getUserCode()) || ( this.getUserCode()!=null && castOther.getUserCode()!=null && this.getUserCode().equals(castOther.getUserCode()) ) )
&& ( (this.getStartWeek()==castOther.getStartWeek()) || ( this.getStartWeek()!=null && castOther.getStartWeek()!=null && this.getStartWeek().equals(castOther.getStartWeek()) ) )
&& ( (this.getEndWeek()==castOther.getEndWeek()) || ( this.getEndWeek()!=null && castOther.getEndWeek()!=null && this.getEndWeek().equals(castOther.getEndWeek()) ) )
&& ( (this.getSalesStatus()==castOther.getSalesStatus()) || ( this.getSalesStatus()!=null && castOther.getSalesStatus()!=null && this.getSalesStatus().equals(castOther.getSalesStatus()) ) )
&& ( (this.getConsumerStatus()==castOther.getConsumerStatus()) || ( this.getConsumerStatus()!=null && castOther.getConsumerStatus()!=null && this.getConsumerStatus().equals(castOther.getConsumerStatus()) ) )
&& ( (this.getCreateNo()==castOther.getCreateNo()) || ( this.getCreateNo()!=null && castOther.getCreateNo()!=null && this.getCreateNo().equals(castOther.getCreateNo()) ) )
&& ( (this.getCreateTime()==castOther.getCreateTime()) || ( this.getCreateTime()!=null && castOther.getCreateTime()!=null && this.getCreateTime().equals(castOther.getCreateTime()) ) );
}
public int hashCode() {
int result = 17;
result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
result = 37 * result + ( getUserCode() == null ? 0 : this.getUserCode().hashCode() );
result = 37 * result + ( getStartWeek() == null ? 0 : this.getStartWeek().hashCode() );
result = 37 * result + ( getEndWeek() == null ? 0 : this.getEndWeek().hashCode() );
result = 37 * result + ( getSalesStatus() == null ? 0 : this.getSalesStatus().hashCode() );
result = 37 * result + ( getConsumerStatus() == null ? 0 : this.getConsumerStatus().hashCode() );
result = 37 * result + ( getCreateNo() == null ? 0 : this.getCreateNo().hashCode() );
result = 37 * result + ( getCreateTime() == null ? 0 : this.getCreateTime().hashCode() );
return result;
}
}
|
[
"727736571@qq.com"
] |
727736571@qq.com
|
aadb3f7dfba4612171e36510f36dec32efa6aaf2
|
51a27a589439d35ebcd36ef9ab196107d3e0c942
|
/SpringAPIUse/src/main/java/com/wk/config/ScopeAndLazyConfig.java
|
02b62e45bd4dbdb1a110bf10c4a8f2c774d32198
|
[] |
no_license
|
emperwang/JavaBase
|
a9d9a43c782288ed8d18f4773b105e82b53320cb
|
0a0423f85a022f9664e44ab852170fa6e09960ed
|
refs/heads/master
| 2023-02-08T07:40:02.418247
| 2023-02-03T14:49:40
| 2023-02-03T14:49:40
| 185,725,768
| 1
| 0
| null | 2022-12-06T00:32:25
| 2019-05-09T04:23:51
|
Java
|
UTF-8
|
Java
| false
| false
| 811
|
java
|
package com.wk.config;
import com.wk.beans.Person;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
@Configuration
public class ScopeAndLazyConfig {
/**
* SCOPE_PROTOTYPE 多实例
* SCOPE_SINGLETON 单实例
* SCOPE_REQUEST 请求域
* SCOPE_SESSION session域
*/
//@Scope(value = "prototype")
@Lazy //在初始化的时候不注册bean,只有在第一次使用的时候才会取注册bean
@Bean("person")
public Person person(){
System.out.println("注册bean");
return new Person("wwww",20);
}
}
|
[
"544094478@qq.com"
] |
544094478@qq.com
|
5de910aa3111237ee5225ae7bb4155713804a72f
|
832c756923d48ace3f338b27ae9dc8327058d088
|
/src/contest/usaco/USACO_2012_Nearby_Cows.java
|
ac03308608b70177801b142decb3f8f9d830147a
|
[
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
luchy0120/competitive-programming
|
1331bd53698c4b05b57a31d90eecc31c167019bd
|
d0dfc8f3f3a74219ecf16520d6021de04a2bc9f6
|
refs/heads/master
| 2020-05-04T15:18:06.150736
| 2018-11-07T04:15:26
| 2018-11-07T04:15:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,089
|
java
|
package contest.usaco;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class USACO_2012_Nearby_Cows {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter ps = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
static StringTokenizer st;
public static void main (String[] args) throws IOException {
int n = readInt();
int k = readInt();
ArrayList<ArrayList<Integer>> adj = new ArrayList<ArrayList<Integer>>();
for (int x = 0; x < n; x++)
adj.add(new ArrayList<Integer>());
for (int x = 0; x < n - 1; x++) {
int a = readInt() - 1;
int b = readInt() - 1;
adj.get(a).add(b);
adj.get(b).add(a);
}
long[][] dp = new long[n][k + 1];
for (int x = 0; x < n; x++) {
int a = readInt();
dp[x][0] = dp[x][1] = a;
}
for (int x = 1; x <= k; x++) {
for (int y = 0; y < n; y++) {
long total = 0;
for (Integer z : adj.get(y))
total += dp[z][x - 1];
long minus = 0;
if (x != 1)
minus = dp[y][x - 2] * (adj.get(y).size() - 1);
dp[y][x] += total - minus;
}
}
for (int y = 0; y < n; y++) {
System.out.println(dp[y][k]);
}
}
static String next () throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
static long readLong () throws IOException {
return Long.parseLong(next());
}
static int readInt () throws IOException {
return Integer.parseInt(next());
}
static double readDouble () throws IOException {
return Double.parseDouble(next());
}
static char readCharacter () throws IOException {
return next().charAt(0);
}
static String readLine () throws IOException {
return br.readLine().trim();
}
}
|
[
"jeffrey.xiao1998@gmail.com"
] |
jeffrey.xiao1998@gmail.com
|
1c21d99eb3de4348d33ca2744f53d79d439b00fd
|
1661886bc7ec4e827acdd0ed7e4287758a4ccc54
|
/srv_unip_pub/src/main/java/com/sa/unip/app/common/ctrlhandler/MsgSendQueueHisPickupGridViewSearchFormHandler.java
|
40066dd3e9e5a8b7abb3f0f6bb2c2e18aa2f6b15
|
[
"MIT"
] |
permissive
|
zhanght86/iBizSys_unip
|
baafb4a96920e8321ac6a1b68735bef376b50946
|
a22b15ebb069c6a7432e3401bdd500a3ca37250e
|
refs/heads/master
| 2020-04-25T21:20:23.830300
| 2018-01-26T06:08:28
| 2018-01-26T06:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,373
|
java
|
/**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package com.sa.unip.app.common.ctrlhandler;
import java.util.ArrayList;
import java.util.List;
import net.ibizsys.paas.util.StringHelper;
import net.ibizsys.paas.web.WebContext;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import com.sa.unip.app.srv.common.ctrlmodel.MsgSendQueueHisDefaultSearchFormModel;
import net.ibizsys.psrt.srv.common.demodel.MsgSendQueueHisDEModel;
import net.ibizsys.psrt.srv.common.service.MsgSendQueueHisService;
import net.ibizsys.psrt.srv.common.dao.MsgSendQueueHisDAO;
import net.ibizsys.psrt.srv.common.entity.MsgSendQueueHis;
import net.ibizsys.paas.ctrlmodel.ISearchFormModel;
import net.ibizsys.paas.data.DataObject;
import net.ibizsys.paas.data.IDataObject;
import net.ibizsys.paas.web.AjaxActionResult;
import net.ibizsys.paas.web.SDAjaxActionResult;
import net.ibizsys.paas.sysmodel.ISystemRuntime;
import net.ibizsys.paas.ctrlhandler.IFormItemHandler;
import net.ibizsys.paas.ctrlhandler.IFormItemUpdateHandler;
public class MsgSendQueueHisPickupGridViewSearchFormHandler extends net.ibizsys.paas.ctrlhandler.SearchFormHandlerBase {
protected MsgSendQueueHisDefaultSearchFormModel searchformModel = null;
public MsgSendQueueHisPickupGridViewSearchFormHandler() {
super();
}
@Override
protected void onInit() throws Exception {
searchformModel = (MsgSendQueueHisDefaultSearchFormModel)this.getViewController().getCtrlModel("searchform");
super.onInit();
}
@Override
protected ISearchFormModel getSearchFormModel() {
return this.getRealSearchFormModel();
}
protected MsgSendQueueHisDefaultSearchFormModel getRealSearchFormModel() {
return this.searchformModel ;
}
protected MsgSendQueueHisService getRealService() {
return (MsgSendQueueHisService)this.getViewController().getService();
}
/**
* 准备部件成员处理对象
* @throws Exception
*/
@Override
protected void prepareCtrlItemHandlers()throws Exception {
super.prepareCtrlItemHandlers();
ISystemRuntime iSystemRuntime = (ISystemRuntime)this.getSystemModel();
}
}
|
[
"dev@ibizsys.net"
] |
dev@ibizsys.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.