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
afb30cee31c8bf6a317d073456365c4071f8a43e
97e1647d7e9eb807e23ed15bff63f842c1e47608
/easymis-crm-leads/easymis-crm-leads-client/src/main/java/org/easymis/crm/leads/client/service/LeadsRestService.java
a682bf62b2ecb45e8965a23d6265e302ca3efdb6
[]
no_license
tanyujie/easymis-crm
8a5065af32039385df566b646ddf11a0a468fe8b
92e104abf86d21c7a7083d4336b7648c0bb76a41
refs/heads/master
2020-05-26T22:46:10.263385
2019-05-31T03:01:12
2019-05-31T03:01:12
188,403,139
0
1
null
null
null
null
UTF-8
Java
false
false
1,143
java
package org.easymis.crm.leads.client.service; import java.util.ArrayList; import org.easymis.crm.leads.object.LeadsQo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestParam; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; @Service public class LeadsRestService { @Autowired private LeadsClient leadsClient; @HystrixCommand(fallbackMethod = "findByIdFallback") public String findById(String id) { String temp = leadsClient.findById(id); System.out.println(id + ":" + temp); return leadsClient.findById(id); } @HystrixCommand(fallbackMethod = "findByPageFallback") public String findByPage(Integer page,Integer size) { System.out.println("size:"+size); return leadsClient.findByPage(page, size); } public void remove(String id) { } public ArrayList<LeadsQo> find() { return null; } private String findByIdFallback(String id) { return null; } private String findByPageFallback(Integer page,Integer size) { return null; } }
[ "13551259347@139.com" ]
13551259347@139.com
76c139fc7b860e87ae28c88490d4489dcd21459b
930c207e245c320b108e9699bbbb036260a36d6a
/BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IEconomizer_Disable_Differential_Enthalpy.java
0258b8064594053fc17e70917d0494878ea8d7d0
[]
no_license
InnovationSE/BRICK-Generated-By-OLGA
24d278f543471e1ce622f5f45d9e305790181fff
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
refs/heads/master
2021-07-01T14:13:11.302860
2017-09-21T12:44:17
2017-09-21T12:44:17
104,251,784
1
0
null
null
null
null
UTF-8
Java
false
false
437
java
/** * This file is automatically generated by OLGA * @author OLGA * @version 1.0 */ package brickschema.org.schema._1_0_2.Brick; import java.util.ArrayList; import java.util.List; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.RDF; import brickschema.org.schema._1_0_2.Brick.IEconomizer; public interface IEconomizer_Disable_Differential_Enthalpy extends IEconomizer { public IRI iri(); }
[ "Andre.Ponnouradjane@non.schneider-electric.com" ]
Andre.Ponnouradjane@non.schneider-electric.com
cac879316e50a5596decce0122a5e1710a2d2224
c8885c64e14ae34a3dc0b2f1f1c1a8933e50a7f9
/collections/src/main/java/net/kuujo/copycat/collections/AsyncSetConfig.java
6c087b2fb2c02bde80917e19bc7b20f34c0c79f7
[ "Apache-2.0" ]
permissive
akoshibe/copycat
4cce717a09daae21a67e30c48202754ca3f20458
e58fe12e37d1f7b97ea8b275d26222623ac7d4a6
refs/heads/master
2021-01-18T08:00:02.311937
2015-02-03T07:06:11
2015-02-03T07:06:11
30,261,734
0
0
null
2015-02-03T20:00:48
2015-02-03T20:00:48
null
UTF-8
Java
false
false
1,903
java
/* * Copyright 2014 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.kuujo.copycat.collections; import net.kuujo.copycat.cluster.ClusterConfig; import net.kuujo.copycat.cluster.internal.coordinator.CoordinatedResourceConfig; import net.kuujo.copycat.collections.internal.collection.DefaultAsyncSet; import net.kuujo.copycat.state.StateLogConfig; import java.util.Map; /** * Asynchronous set configuration. * * @author <a href="http://github.com/kuujo">Jordan Halterman</a> */ public class AsyncSetConfig extends AsyncCollectionConfig<AsyncSetConfig> { private static final String DEFAULT_CONFIGURATION = "set-defaults"; private static final String CONFIGURATION = "set"; public AsyncSetConfig() { super(CONFIGURATION, DEFAULT_CONFIGURATION); } public AsyncSetConfig(Map<String, Object> config) { super(config, CONFIGURATION, DEFAULT_CONFIGURATION); } public AsyncSetConfig(String resource) { super(resource, CONFIGURATION, DEFAULT_CONFIGURATION); } protected AsyncSetConfig(AsyncSetConfig config) { super(config); } @Override public AsyncSetConfig copy() { return new AsyncSetConfig(this); } @Override public CoordinatedResourceConfig resolve(ClusterConfig cluster) { return new StateLogConfig(toMap()) .resolve(cluster) .withResourceType(DefaultAsyncSet.class); } }
[ "jordan.halterman@gmail.com" ]
jordan.halterman@gmail.com
8e6c61002541ff748a743aa250fe4824ee1ead64
6f94218c3632634bfe24e87b9fbe9acc668396fa
/vteba/src/main/java/com/vteba/product/men/dao/spi/MenDao.java
22bba22294eb99652b556506f0d6611684141675
[]
no_license
skmbw/vteba
99155e2a770eca33cbf680319536e555ca16faae
b27b03d64fe0cca535d24045a6ddd4ca82b5a00c
refs/heads/master
2016-09-06T17:41:30.573209
2014-11-02T05:34:59
2014-11-02T05:34:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
287
java
package com.vteba.product.men.dao.spi; import com.vteba.tx.hibernate.BaseGenericDao; import com.vteba.product.men.model.Men; /** * 男装类商品Dao接口。 * @author yinlei * date 2013-10-5 17:00:08 */ public interface MenDao extends BaseGenericDao<Men, Long> { }
[ "tongku2008@126.com" ]
tongku2008@126.com
22fa8efeddca83f3c8fbf18899ef45787f83a275
7130aa55111830a02bb46787fab9c95996dd717a
/flightcheckin/src/main/java/com/tanmay/flightcheckin/integration/ReservationRestClientImpl.java
f2ee6f38218f5eedd9420138cf78661d801ec59d
[]
no_license
tans105/flight-management-system
aa9ef6b2ff884aff570744111eb098c6305d6bcb
96bcb3e3b4a661a636dd738a43c1c0e38fa75d4b
refs/heads/master
2022-07-13T16:51:14.944680
2020-01-06T16:28:42
2020-01-06T16:28:42
225,027,857
0
0
null
2022-06-30T20:22:06
2019-11-30T14:57:03
Java
UTF-8
Java
false
false
1,060
java
package com.tanmay.flightcheckin.integration; import com.tanmay.flightcheckin.integration.dto.Reservation; import com.tanmay.flightcheckin.integration.dto.ReservationUpdateRequest; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; /** * @author Tanmay * @date 08/12/19 **/ @Component public class ReservationRestClientImpl implements ReservationRestClient { public static final String RESERVATION_REST_URL = "http://localhost:8080/flightreservation/reservations/"; @Override public Reservation findReservation(Long id) { RestTemplate restTemplate = new RestTemplate(); Reservation reservation = restTemplate.getForObject(RESERVATION_REST_URL + id, Reservation.class); return reservation; } @Override public Reservation updateReservation(ReservationUpdateRequest req) { RestTemplate restTemplate = new RestTemplate(); Reservation res = restTemplate.postForObject(RESERVATION_REST_URL, req, Reservation.class); return res; } }
[ "tanmayawasthi105@gmail.com" ]
tanmayawasthi105@gmail.com
ea126605eed8e0e7e19d4f6dc235a707689a187d
09c12d179be0ddd27311820dcbc5dc0190b0e1b2
/jonix/src/main/java/com/tectonica/jonix/unify/base/onix2/BaseSubject2.java
bb8b88d2889c08481d659dcd05c69a6be1a5bec3
[ "Apache-2.0" ]
permissive
zach-m/jonix
3a2053309d8df96f406b0eca93de6b25b4aa3e98
c7586ed7669ced7f26e937d98b4b437513ec1ea9
refs/heads/master
2023-08-23T19:42:15.570453
2023-07-31T19:02:35
2023-07-31T19:02:35
32,450,400
67
23
Apache-2.0
2023-06-01T03:43:12
2015-03-18T09:47:36
Java
UTF-8
Java
false
false
1,671
java
/* * Copyright (C) 2012-2023 Zach Melamed * * Latest version available online at https://github.com/zach-m/jonix * Contact me at zach@tectonica.co.il * * 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.tectonica.jonix.unify.base.onix2; import com.tectonica.jonix.common.codelist.SubjectSchemeIdentifiers; import com.tectonica.jonix.onix2.Subject; import com.tectonica.jonix.unify.base.BaseSubject; /** * ONIX2 concrete implementation for {@link BaseSubject} * * @author Zach Melamed */ public class BaseSubject2 extends BaseSubject { private static final long serialVersionUID = 1L; public BaseSubject2(SubjectSchemeIdentifiers subjectSchemeIdentifier, String subjectCode, String subjectHeadingText) { super(subjectSchemeIdentifier, subjectCode, subjectHeadingText); } public BaseSubject2(Subject s) { extract(s, this); } public static void extract(Subject s, BaseSubject dest) { dest.subjectSchemeIdentifier = s.subjectSchemeIdentifier().value; dest.subjectCode = s.subjectCode().value; dest.subjectHeadingText = s.subjectHeadingText().value; } }
[ "zach@tectonica.co.il" ]
zach@tectonica.co.il
14d7406dcf91684f1c0b141e343e0ea89d815aa0
24a32bc2aafcca19cf5e5a72ee13781387be7f0b
/src/framework/tags/gwt-test-utils-parent-0.36/gwt-test-utils/src/test/java/com/octo/gwt/test/MenuBarImagesTest.java
49209124506d020cd5bea5cfe155bbf10db0a5c5
[]
no_license
google-code-export/gwt-test-utils
27d6ee080f039a8b4111e04f32ba03e5396dced5
0391347ea51b3db30c4433566a8985c4e3be240e
refs/heads/master
2016-09-09T17:24:59.969944
2012-11-20T07:13:03
2012-11-20T07:13:03
32,134,062
0
0
null
null
null
null
UTF-8
Java
false
false
2,280
java
package com.octo.gwt.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Test; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.AbstractImagePrototype.ImagePrototypeElement; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.MenuBar.MenuBarImages; @SuppressWarnings("deprecation") public class MenuBarImagesTest extends GwtTestTest { private final MenuBarImages menuBarImages = GWT.create(MenuBarImages.class); @Test public void checkToString() { // Arrange AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon(); // Act & Assert assertNotNull(proto.toString()); } @Test public void createElement() { // Arrange AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon(); // Act ImagePrototypeElement element = proto.createElement(); // Assert assertEquals("IMG", element.getTagName()); assertEquals( "<img onload=\"this.__gwtLastUnhandledEvent=\"load\";\" src=\"http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif\" style=\"width: 0px; height: 0px; background:-url(http://127.0.0.1: 8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px; \" border=\"0\"></img>", element.toString()); } @Test public void createImage() { // Arrange AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon(); // Act Image image = proto.createImage(); // Assert assertEquals( "http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif", image.getUrl()); } @Test public void getHTML() { // Arrange AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon(); // Act String html = proto.getHTML(); // Assert assertEquals( "<img onload='this.__gwtLastUnhandledEvent=\"load\";' src='http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif' style='width: 0px; height: 0px; background: url(http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px;' border='0'>", html); } }
[ "gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa" ]
gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa
76bf3cb8ec9e241ffe37d2c73049d278c0bb1d6b
2e9f34e403028120973d2bf794a3a0b61fae91dd
/app/src/main/java/helper/Word.java
43bdf5c24a2e460935585f5c3c1013d40c696cb4
[]
no_license
enigmaharjan/Dictionarysqllite
7263f3d8557bf565dea9bd1fc35b642d39a883ab
12279d220966ed488584997c28888078100162c5
refs/heads/master
2020-05-18T22:26:54.858454
2019-05-05T04:55:50
2019-05-05T04:55:50
184,691,404
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package helper; import java.io.PrintStream; public class Word { private int wordId; private String word; private String meaning; public Word(int wordId, String word, String meaning) { this.wordId = wordId; this.word = word; this.meaning = meaning; } public int getWordId() { return wordId; } public void setWordId(int wordId) { this.wordId = wordId; } public String getWord() { return word; } public void setWord(String word) { this.word = word; } public String getMeaning() { return meaning; } public void setMeaning(String meaning) { this.meaning = meaning; } }
[ "softwarica@softwarica.com" ]
softwarica@softwarica.com
4b804c6b00ac50d849161a69f71856ebfe594bba
aa3ab3cff116e6d2fedcdc31b039ff678023b431
/workspaceJava-EE/TpJSP/src/iit/auth/InscriptionEtud.java
c99559dd01944e4fb1c8e0b9fd7dc3e6b6525bdc
[]
no_license
HassenBenSlima/Mini-Project-Java
623981e9e6196996ec5be0cf1908fea26e64921d
cd5cf3c56229a1660898dce0b929fdbb791010ca
refs/heads/master
2022-12-22T18:39:42.857902
2019-10-08T22:30:26
2019-10-08T22:30:26
133,140,428
0
0
null
2022-12-16T05:46:31
2018-05-12T11:38:47
TSQL
UTF-8
Java
false
false
1,282
java
package iit.auth; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; /** * Servlet implementation class InscriptionEtud */ @WebServlet("/InscriptionEtud") public class InscriptionEtud extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public InscriptionEtud() { super(); // TODO Auto-generated constructor stub } @Override public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("<h1> Inscription: Cette Etudiant n'est pas inscrit</h1>"); out.println("<form method='post' action='InscriptionControle'> "); out.println("Nom: <input type='text' name='nom'/></br>"); out.println("Prenom: <input type='text' name='prenom'/></br>"); out.println("Login: <input type='text' name='login'/></br>"); out.println("Mot de passe: <input type='text' name='pass'/></br></br>"); out.println("<input value='Inscription' type='submit' />"); out.println("</form>"); } }
[ "Hassen.BenSlima" ]
Hassen.BenSlima
9d374147f10f134853411acd053b0de55dce2fcf
d504110d2237650b4a445417c80131915f303fe0
/netbeans/gas/main_ui/src/com/gas/main/ui/molpane/sitepanel/primer3/SelectTemplatePanel.java
94a21ed67985d7802d6a822762fe5e94cecd216a
[]
no_license
duncan1201/VF
ab8741163bbff03962818cc1076cc35c1252bb03
095478313d2580925f7417dae6eb083d09636a30
refs/heads/master
2021-03-22T00:26:13.276478
2016-09-08T11:48:01
2016-09-08T11:48:01
32,251,044
0
0
null
null
null
null
UTF-8
Java
false
false
2,777
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.gas.main.ui.molpane.sitepanel.primer3; import com.gas.database.core.primer.service.api.IUserInputService; import com.gas.domain.core.primer3.UserInput; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.lang.ref.WeakReference; import java.util.List; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import org.openide.DialogDescriptor; import org.openide.NotificationLineSupport; import org.openide.util.Lookup; /** * * @author dq */ public class SelectTemplatePanel extends JPanel { private IUserInputService service = Lookup.getDefault().lookup(IUserInputService.class); private WeakReference<UserInputTable> tableRef; private DialogDescriptor dialogDescriptor; private NotificationLineSupport notificationLineSupport; SelectTemplatePanel() { super(new GridBagLayout()); UserInputTable table = new UserInputTable(); table.setEditable(false); table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { validateInput(); } }); tableRef = new WeakReference<UserInputTable>(table); List<UserInput> userInputs = service.getAll(true); table.setUserInputs(userInputs); GridBagConstraints c = new GridBagConstraints(); JScrollPane scrollPane = new JScrollPane(table); add(scrollPane, c); } public void setDialogDescriptor(DialogDescriptor dialogDescriptor) { this.dialogDescriptor = dialogDescriptor; this.notificationLineSupport = dialogDescriptor.createNotificationLineSupport(); } void validateInput(){ UserInput userInput = getSelectedUserInput(); if(userInput == null){ dialogDescriptor.setValid(false); notificationLineSupport.setInformationMessage("Please select a setting"); }else{ dialogDescriptor.setValid(true); notificationLineSupport.clearMessages(); } } public UserInput getSelectedUserInput() { UserInputTable table = tableRef.get(); UserInputTable.UserInputTableModel model = (UserInputTable.UserInputTableModel) table.getModel(); int selected = table.getSelectedRow(); UserInput ret = model.getRow(table.convertRowIndexToModel(selected)); return ret; } }
[ "dunqiang.liao@vectorfriends.com" ]
dunqiang.liao@vectorfriends.com
e8008fd61e0b484e4a1b2737952e090d98023e9c
1824a3ea8151f56e6d6cbffc7d5c56c1ee04bd2b
/src/main/java/me/Hazz/HazzBot/Variables/MySQLAdapter.java
8492d129353b919df5204a77e692803c5633e9a2
[]
no_license
Hazzaaa43/HazzBot
1652b148d51e55cce87c35ba5df28661ee9cf58b
f23fd9e59f396c59bba85598a7b5c669d4b69fa4
refs/heads/master
2020-12-07T08:01:30.022926
2020-01-08T22:52:02
2020-01-08T23:03:07
232,679,192
0
0
null
null
null
null
UTF-8
Java
false
false
4,181
java
package me.Hazz.HazzBot.Variables; import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource; import java.sql.*; import java.util.Calendar; public class MySQLAdapter { private String DB_NAME; private String DB_USER; private String DB_ADRES; private int DB_PORT; private String DB_PASSWORD; private Connection c; public MySQLAdapter(String server, int port, String databaseUser, String databasePassword, String databaseName) { DB_ADRES = server; DB_USER = databaseUser; DB_PASSWORD = databasePassword; DB_NAME = databaseName; DB_PORT = port; } private Connection createConnection() { try { MysqlConnectionPoolDataSource dataSource = new MysqlConnectionPoolDataSource(); dataSource.setUser(DB_USER); dataSource.setPassword(DB_PASSWORD); dataSource.setServerName(DB_ADRES); dataSource.setPort(DB_PORT); dataSource.setDatabaseName(DB_NAME); dataSource.setZeroDateTimeBehavior("convertToNull"); dataSource.setUseUnicode(true); return dataSource.getConnection(); } catch (SQLException e) { e.printStackTrace(); System.out.println("Cant connect to db"); try { throw new Exception("Cant connect to db"); } catch (Exception ex) { } } return null; } public Connection getConnection() { if (c == null) { c = createConnection(); } try { if (c.isClosed()) c = createConnection(); } catch (Throwable t) { } return c; } public ResultSet select(String sql, Object... params) throws SQLException { PreparedStatement query; query = getConnection().prepareStatement(sql); resolveParameters(query, params); return query.executeQuery(); } private void resolveParameters(PreparedStatement query, Object... params) throws SQLException { int index = 1; for (Object p : params) { if (p instanceof String) { query.setString(index, (String) p); } else if (p instanceof Integer) { query.setInt(index, (int) p); } else if (p instanceof Long) { query.setLong(index, (Long) p); } else if (p instanceof Double) { query.setDouble(index, (double) p); } else if (p instanceof java.sql.Date) { java.sql.Date d = (java.sql.Date) p; Timestamp ts = new Timestamp(d.getTime()); query.setTimestamp(index, ts); } else if (p instanceof java.util.Date) { java.util.Date d = (java.util.Date) p; Timestamp ts = new Timestamp(d.getTime()); query.setTimestamp(index, ts); } else if (p instanceof Calendar) { Calendar cal = (Calendar) p; Timestamp ts = new Timestamp(cal.getTimeInMillis()); query.setTimestamp(index, ts); } else if (p == null) { query.setNull(index, Types.NULL); } else { try { throw new Exception("Broken fucking database"); } catch (Exception e) { e.printStackTrace(); } } index++; } } public int query(String sql, Object... params) throws SQLException { try (PreparedStatement query = getConnection().prepareStatement(sql)) { resolveParameters(query, params); return query.executeUpdate(); } } public int insert(String sql, Object... params) throws SQLException { try (PreparedStatement query = getConnection().prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) { resolveParameters(query, params); query.executeUpdate(); ResultSet rs = query.getGeneratedKeys(); if (rs.next()) { return rs.getInt(1); } } return -1; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
50c7ab6d66b041633cca2da62344ecaa2c46270a
9b3bd9c5c230e9fbf08a2411b3f206cf972630d0
/ORM Converter/src/org/netbeans/jsonb/converter/compiler/NillableSnippet.java
49b8530fafb82255d3c77c5e7309d9b1c64b32d5
[ "Apache-2.0" ]
permissive
MHTaleb/jeddict
1b6f29adaa3ef6e9d6d171d899a8ba28b9d48e90
5c98f01269811e69a14e0a8b4278ebaa0cb9d21c
refs/heads/master
2020-12-02T17:57:43.042540
2017-07-02T19:46:38
2017-07-02T19:46:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,857
java
/** * Copyright [2017] Gaurav Gupta * * 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.netbeans.jsonb.converter.compiler; import org.netbeans.orm.converter.compiler.*; import java.util.Collection; import java.util.Collections; import static org.netbeans.jcode.jsonb.JSONBConstants.JSONB_NILLABLE; import static org.netbeans.jcode.jsonb.JSONBConstants.JSONB_NILLABLE_FQN; import static org.netbeans.jpa.modeler.settings.code.CodePanel.isGenerateDefaultValue; import static org.netbeans.orm.converter.util.ORMConverterUtil.CLOSE_PARANTHESES; import static org.netbeans.orm.converter.util.ORMConverterUtil.OPEN_PARANTHESES; public class NillableSnippet implements Snippet { private final Boolean nillable; public NillableSnippet(Boolean nillable) { this.nillable = nillable; } @Override public String getSnippet() throws InvalidDataException { StringBuilder builder = new StringBuilder(); builder.append("@").append(JSONB_NILLABLE); if (isGenerateDefaultValue() || !nillable) { builder.append(OPEN_PARANTHESES).append(nillable).append(CLOSE_PARANTHESES); } return builder.toString(); } @Override public Collection<String> getImportSnippets() throws InvalidDataException { return Collections.singletonList(JSONB_NILLABLE_FQN); } }
[ "gaurav.gupta.jc@gmail.com" ]
gaurav.gupta.jc@gmail.com
c9daac218138be11ee064f7e1f13aecf33a49a27
209b998c9289113fda450c8440fd476aefc3a9a6
/src/org/jglrxavpok/glutils/GL_3DS_Importer.java
f3d0457e253f3ff88a3192536cebdf5f53c29114
[ "BSD-2-Clause" ]
permissive
jglrxavpok/jglrxavpok_lwjgl_utils
1efc9bf1e9973ba52d315c530dc365cb6afbd357
5676bbb854e113d79899a783f03712000850db9f
refs/heads/master
2021-01-23T07:04:02.378146
2014-02-24T14:04:29
2014-02-24T14:04:29
17,135,428
0
1
null
null
null
null
UTF-8
Java
false
false
4,533
java
package org.jglrxavpok.glutils; import java.io.*; import java.util.ArrayList; /** * Import a 3DS file into a GL_Model object. */ public class GL_3DS_Importer { // Reads the 3DS files into vertex and face lists private GL_3DS_Reader reader = new GL_3DS_Reader(); // Mesh object will hold the data in a renderable form private GL_Mesh mesh = new GL_Mesh(); public GL_3DS_Importer() { } public GL_Mesh load(String filename) { System.out.println("GL_3DS_Importer.import(): Load object from " + filename); reader = new GL_3DS_Reader(filename); System.out.println("GL_3DS_Importer.importFromStream(): model has " + reader.faces.size() + " faces and " + reader.vertices.size() + " vertices. "); return makeMeshObject(reader.vertices, reader.textureCoords, reader.normals, reader.faces); } /** * Load the 3DS file and store into a mesh. */ public GL_Mesh importFromStream(InputStream inStream) { System.out.println("importFromStream(): Load object from stream..."); reader.load3DSFromStream(inStream); System.out.println("importFromStream(): model has " + reader.faces.size() + " faces and " + reader.vertices.size() + " vertices and " + reader.textureCoords.size() + " txtrcoords."); return makeMeshObject(reader.vertices, reader.textureCoords, reader.normals, reader.faces); } /** * create a GL_Object (mesh object) from the data read by a 3DS_Reader * * @param verts * ArrayList of vertices * @param txtrs * ArrayList of texture coordinates * @param norms * ArrayList of normal * @param faces * ArrayList of Face objects (triangles) * @return */ public GL_Mesh makeMeshObject(ArrayList verts, ArrayList txtrs, ArrayList norms, ArrayList faces) { mesh = new GL_Mesh(); // mesh object mesh.name = "3DS"; // add verts to GL_object for (int i = 0; i < verts.size(); i++) { float[] coords = (float[]) verts.get(i); mesh.addVertex(coords[0], coords[1], coords[2]); } // add triangles to GL_object. 3DS "face" is always a triangle. for (int i = 0; i < faces.size(); i++) { Face face = (Face) faces.get(i); // put verts, normals, texture coords into triangle addTriangle(mesh, face, txtrs, norms); } // optimize the GL_Object and generate normals mesh.rebuild(); // if no normals were loaded, generate some if (norms.size() == 0) { mesh.regenerateNormals(); } return mesh; } /** * Add a new triangle to the GL_Object. This assumes that the vertices have * already been added to the GL_Object, in the same order that they were in * the 3DS. * * @param obj * GL_Object * @param face * a face from the OBJ file * @param txtrs * ArrayList of texture coords from the OBJ file * @param norms * ArrayList of normals from the OBJ file * @param v1 * vertices to use for the triangle (face may have >3 verts) * @param v2 * @param v3 * @return */ public GL_Triangle addTriangle(GL_Mesh obj, Face face, ArrayList txtrs, ArrayList norms) { // An OBJ face may have many vertices (can be a polygon). // Make a new triangle with the specified three verts. GL_Triangle t = new GL_Triangle(obj.vertex(face.vertexIDs[0]), obj.vertex(face.vertexIDs[1]), obj.vertex(face.vertexIDs[2])); // put texture coords into triangle if (txtrs.size() > 0) { // if texture coords were loaded float[] uvw; uvw = (float[]) txtrs.get(face.textureIDs[0]); // txtr coord for // vert 1 t.uvw1 = new GL_Vector(uvw[0], uvw[1], uvw[2]); uvw = (float[]) txtrs.get(face.textureIDs[1]); // txtr coord for // vert 2 t.uvw2 = new GL_Vector(uvw[0], uvw[1], uvw[2]); uvw = (float[]) txtrs.get(face.textureIDs[2]); // txtr coord for // vert 3 t.uvw3 = new GL_Vector(uvw[0], uvw[1], uvw[2]); } // put normals into triangle (NOTE: normalID can be -1!!! could barf // here!!!) if (norms.size() > 0) { // if normals were loaded float[] norm; norm = (float[]) norms.get(face.normalIDs[0]); // normal for vert 1 t.norm1 = new GL_Vector(norm[0], norm[1], norm[2]); norm = (float[]) norms.get(face.normalIDs[1]); // normal for vert 2 t.norm2 = new GL_Vector(norm[0], norm[1], norm[2]); norm = (float[]) norms.get(face.normalIDs[2]); // normal for vert 3 t.norm3 = new GL_Vector(norm[0], norm[1], norm[2]); } // add triangle to GL_object mesh.addTriangle(t); return t; } }
[ "jglrxavpok@gmail.com" ]
jglrxavpok@gmail.com
95fcacc3d6f14dd35d9f7c2fa00a8bd8ccd93987
425ac2b3d2ba036202c1dc72c561d3a904df33ad
/support/cas-server-support-oauth-webflow/src/main/java/org/apereo/cas/support/oauth/web/flow/OAuth20WebflowConfigurer.java
16ab49810e6a002c3a9091dd0b2a1751de069013
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
fogbeam/cas_mirror
fee69b4b1a7bf5cac87da75b209edc3cc3c1d5d6
b7daea814f1238e95a6674663b2553555a5b2eed
refs/heads/master
2023-01-07T08:34:26.200966
2021-08-12T19:14:41
2021-08-12T19:14:41
41,710,765
1
2
Apache-2.0
2022-12-27T15:39:03
2015-09-01T01:53:24
Java
UTF-8
Java
false
false
1,856
java
package org.apereo.cas.support.oauth.web.flow; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.web.flow.CasWebflowConstants; import org.apereo.cas.web.flow.configurer.AbstractCasWebflowConfigurer; import lombok.val; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; import org.springframework.webflow.engine.ActionState; import org.springframework.webflow.engine.ViewState; import org.springframework.webflow.engine.builder.support.FlowBuilderServices; /** * This is {@link OAuth20WebflowConfigurer}. * * @author Misagh Moayyed * @since 5.0.0 */ public class OAuth20WebflowConfigurer extends AbstractCasWebflowConfigurer { public OAuth20WebflowConfigurer(final FlowBuilderServices flowBuilderServices, final FlowDefinitionRegistry loginFlowDefinitionRegistry, final ConfigurableApplicationContext applicationContext, final CasConfigurationProperties casProperties) { super(flowBuilderServices, loginFlowDefinitionRegistry, applicationContext, casProperties); } @Override protected void doInitialize() { val loginFlow = getLoginFlow(); if (loginFlow != null) { val state = getTransitionableState(loginFlow, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM, ViewState.class); state.getEntryActionList().add(createEvaluateAction("oauth20RegisteredServiceUIAction")); val createTicketState = getState(loginFlow, CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET, ActionState.class); createTicketState.getExitActionList().add(createEvaluateAction("oauth20SessionStoreTicketGrantingTicketAction")); } } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
ef409c6851a7ad77de55d19d0f1f16852db1c791
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/finsky/accounts/impl/C0990e.java
d35683ae8924318704c9ac761d19a04617055a18
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,342
java
package com.google.android.finsky.accounts.impl; import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; import android.text.TextUtils; import com.google.android.finsky.aa.C0955b; import com.google.android.finsky.aa.C0957n; import com.google.android.finsky.accounts.C0985d; import com.google.android.finsky.aq.C1500a; import com.google.android.finsky.as.C1506e; import com.google.android.finsky.utils.C4680k; import com.google.android.finsky.utils.ba; import com.squareup.leakcanary.C7582R; import java.util.Locale; class C0990e implements C0985d { public static final Account[] f5979c = new Account[0]; public static final String f5980d = ba.m21789a("finsky.sw_account_type"); public String[] f5981e; public final Context f5982f; public final C1500a f5983g; public final C1506e f5984h; public final AccountManager f5985i; C0990e(Context context, AccountManager accountManager, C1506e c1506e, C1500a c1500a) { this.f5982f = context; this.f5985i = accountManager; this.f5984h = c1506e; this.f5983g = c1500a; } public synchronized String[] mo1185c() { if (this.f5981e == null) { if (this.f5984h.m8839b()) { this.f5981e = new String[]{f5980d, "cn.google", "com.google"}; } else if (this.f5984h.m8841d()) { this.f5981e = new String[0]; } else { Object a = C4680k.m21818a((String) C0955b.ep.m28964b()); int length = a.length; this.f5981e = new String[(length + 1)]; this.f5981e[0] = "com.google"; System.arraycopy(a, 0, this.f5981e, 1, length); } } return this.f5981e; } public Account[] mo1188d() { int i; int i2; Account account; int i3 = 0; Account[] accounts = this.f5985i.getAccounts(); String[] c = mo1185c(); boolean b = this.f5984h.m8839b(); int length = accounts.length; for (i = 0; i < accounts.length; i++) { for (Object equals : c) { if (accounts[i].type.equals(equals)) { i2 = 1; break; } } i2 = 0; if (i2 != 0) { boolean z; Account account2 = accounts[i]; if (!b || "cn.google".equals(account2.type) || f5980d.equals(account2.type)) { z = true; } else { z = C0990e.mo1194a(account2.name); } if (z) { } } accounts[i] = null; length--; } if (length > 1) { for (i = 0; i < accounts.length; i++) { Account account3 = accounts[i]; if (account3 != null && account3.type.equals("com.google.work")) { i2 = length; for (length = 0; length < accounts.length; length++) { if (i != length) { account = accounts[length]; if (account != null && account3.name.equalsIgnoreCase(account.name)) { accounts[length] = null; i2--; } } } length = i2; } } } if (length == accounts.length) { return accounts; } if (length == 0) { return f5979c; } Account[] accountArr = new Account[length]; int length2 = accounts.length; i2 = 0; while (i2 < length2) { account = accounts[i2]; if (account != null) { i = i3 + 1; accountArr[i3] = account; } else { i = i3; } i2++; i3 = i; } return accountArr; } private static boolean mo1194a(String str) { return str != null && str.toLowerCase(Locale.ENGLISH).endsWith("@google.com"); } public void mo1182a(Account account, C0957n c0957n) { if (account != null) { if (!this.f5984h.m8839b() || "cn.google".equals(account.type) || f5980d.equals(account.type)) { c0957n.m5763a(account.name); } } } public Account mo1189e() { Account[] d = mo1188d(); if (d.length > 0) { return d[0]; } return null; } public Account mo1183b(String str) { if (TextUtils.isEmpty(str)) { return null; } for (Account account : mo1188d()) { if (account.name.equalsIgnoreCase(str)) { return account; } } return null; } public boolean mo1184c(String str) { return mo1183b(str) != null; } public boolean mo1190f() { for (Account account : mo1188d()) { if (account.type.equals("com.google") && C0990e.mo1194a(account.name)) { return true; } } return false; } public Account mo1181a(C0957n c0957n) { Account b = mo1183b((String) c0957n.m5760a()); if (b != null) { return b; } b = mo1189e(); mo1182a(b, c0957n); return b; } public String mo1187d(String str) { if (str == null) { return null; } return (this.f5984h.m8839b() || this.f5983g.m8818a()) ? mo1186d(mo1183b(str)) : str; } public String mo1186d(Account account) { if (account == null) { return null; } if ("cn.google".equals(account.type)) { return account.name.substring(0, account.name.indexOf("@")); } if (C1500a.m8816c(account)) { return this.f5982f.getString(C7582R.string.work_account_label); } return account.name; } public String[] mo1191g() { Account[] d = mo1188d(); String[] strArr = new String[d.length]; for (int i = 0; i < d.length; i++) { strArr[i] = d[i].name; } return strArr; } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
c167b829e971dd9c109ebdccc1cba63e4cdfe477
40665051fadf3fb75e5a8f655362126c1a2a3af6
/datasalt-pangool/22ae3f07a92a9dc1872dc6c4b12eb661902fe386/26/PangoolUrlResolution.java
e63f0d32853287bca652644880263e15b0269012
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
5,737
java
/** * Copyright [2012] [Datasalt Systems S.L.] * * 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.datasalt.pangool.benchmark.cogroup; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat; import com.datasalt.pangool.io.ITuple; import com.datasalt.pangool.io.Schema; import com.datasalt.pangool.io.Schema.Field; import com.datasalt.pangool.io.Schema.Field.Type; import com.datasalt.pangool.io.Tuple; import com.datasalt.pangool.tuplemr.TupleMRBuilder; import com.datasalt.pangool.tuplemr.TupleMRException; import com.datasalt.pangool.tuplemr.mapred.lib.input.HadoopInputFormat; import com.datasalt.pangool.tuplemr.mapred.lib.output.HadoopOutputFormat; import com.datasalt.pangool.tuplemr.mapred.tuplemr.TupleMapper; import com.datasalt.pangool.tuplemr.mapred.tuplemr.TupleReducer; import com.datasalt.pangool.utils.HadoopUtils; /** * Code for solving the URL Resolution CoGroup Problem in Pangool. * <p> * The URL Resolution CoGroup Problem is: We have one file with URL Registers: {url timestamp ip} and another file with * canonical URL mapping: {url canonicalUrl}. We want to obtain the URL Registers file with the url substituted with the * canonical one according to the mapping file: {canonicalUrl timestamp ip}. */ public class PangoolUrlResolution { @SuppressWarnings("serial") public static class UrlProcessor extends TupleMapper<LongWritable, Text> { private Tuple tuple; @Override public void map(LongWritable key, Text value, TupleMRContext context, Collector collector) throws IOException, InterruptedException { if(tuple == null) { tuple = new Tuple(context.getTupleMRConfig().getIntermediateSchema("urlRegister")); } String[] fields = value.toString().split("\t"); tuple.set("url", fields[0]); tuple.set("timestamp", Long.parseLong(fields[1])); tuple.set("ip", fields[2]); collector.write(tuple); } } @SuppressWarnings("serial") public static class UrlMapProcessor extends TupleMapper<LongWritable, Text> { private Tuple tuple; @Override public void map(LongWritable key, Text value, TupleMRContext context, Collector collector) throws IOException, InterruptedException { if(tuple == null) { tuple = new Tuple(context.getTupleMRConfig().getIntermediateSchema("urlMap")); } String[] fields = value.toString().split("\t"); tuple.set("url", fields[0]); tuple.set("canonicalUrl", fields[1]); collector.write(tuple); } } @SuppressWarnings("serial") public static class Handler extends TupleReducer<Text, NullWritable> { private Text result; @Override public void reduce(ITuple group, Iterable<ITuple> tuples, TupleMRContext context, Collector collector) throws IOException, InterruptedException, TupleMRException { if (result == null) { result = new Text(); } String cannonicalUrl = null; for(ITuple tuple : tuples) { if("urlMap".equals(tuple.getSchema().getName())) { cannonicalUrl = tuple.get("canonicalUrl").toString(); } else { result.set(cannonicalUrl + "\t" + tuple.get("timestamp") + "\t" + tuple.get("ip")); collector.write(result, NullWritable.get()); } } } } public Job getJob(Configuration conf, String input1, String input2, String output) throws TupleMRException, IOException { List<Field> urlRegisterFields = new ArrayList<Field>(); urlRegisterFields.add(Field.create("url",Type.STRING)); urlRegisterFields.add(Field.create("timestamp",Type.LONG)); urlRegisterFields.add(Field.create("ip",Type.STRING)); List<Field> urlMapFields = new ArrayList<Field>(); urlMapFields.add(Field.create("url",Type.STRING)); urlMapFields.add(Field.create("canonicalUrl",Type.STRING)); TupleMRBuilder grouper = new TupleMRBuilder(conf,"Pangool Url Resolution"); grouper.addIntermediateSchema(new Schema("urlMap", urlMapFields)); grouper.addIntermediateSchema(new Schema("urlRegister", urlRegisterFields)); grouper.setGroupByFields("url"); grouper.setTupleReducer(new Handler()); grouper.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class); grouper.addInput(new Path(input1), new HadoopInputFormat(TextInputFormat.class), new UrlMapProcessor()); grouper.addInput(new Path(input2), new HadoopInputFormat(TextInputFormat.class), new UrlProcessor()); return grouper.createJob(); } public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException, TupleMRException { Configuration conf = new Configuration(); FileSystem fS = FileSystem.get(conf); String input1 = args[0]; String input2 = args[1]; String output = args[2]; HadoopUtils.deleteIfExists(fS, new Path(output)); new PangoolUrlResolution().getJob(conf, input1, input2, output).waitForCompletion(true); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
b12692dde180dc12052ababc8f8ff9c86cb3917e
aed7e4e162207a39905b503752bec8336953ba39
/src/test/java/com/netflix/governator/autobind/CustomAutoBind.java
f8e980d664701cc0644d34c92f7d6b56c7cbdd91
[ "Apache-2.0" ]
permissive
jaxlaw/governator
2edd78dcb70411805b5e3fbf7cb65b253d8ddae7
eab5f7a14765d5722a94414bf9d8e7406d19c39e
refs/heads/master
2021-01-16T18:15:14.652610
2012-12-05T21:17:29
2012-12-05T21:17:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
package com.netflix.governator.autobind; import com.google.inject.BindingAnnotation; import com.netflix.governator.annotations.AutoBind; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER}) @BindingAnnotation @AutoBind public @interface CustomAutoBind { String str(); int value(); }
[ "jordan@jordanzimmerman.com" ]
jordan@jordanzimmerman.com
e15e39ed5e71a9336101f2e79f1d28f695382b21
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/google/android/gms/internal/p763e/C16371d.java
fcfed2f00e403f900d47af8a9b67f768bdd1c72d
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
790
java
package com.google.android.gms.internal.p763e; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.maps.model.Tile; /* renamed from: com.google.android.gms.internal.e.d */ public final class C16371d extends C16368a implements C16369b { C16371d(IBinder iBinder) { super(iBinder, "com.google.android.gms.maps.model.internal.ITileProviderDelegate"); } /* renamed from: a */ public final Tile mo42461a(int i, int i2, int i3) throws RemoteException { Parcel a = mo42457a(); a.writeInt(i); a.writeInt(i2); a.writeInt(i3); Parcel a2 = mo42458a(1, a); Tile tile = (Tile) C16373f.m53341a(a2, Tile.CREATOR); a2.recycle(); return tile; } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
d06f0b2d4ec7cbc8380f17b1c8748d6afd212de1
da9616db5dea64d74cdd3b9efcf12d415f8b4a73
/task_2/dmitriy.osipov/bookshop/src/main/java/com/task/bookshop/repository/BookRepositoryImpl.java
0f064ea793aa1a0ee76c8569dd359b6e72997662
[]
no_license
jelem/javaee
e3f4247e14db6bdf78ef1ce2ececd29ec5b8119a
dd1c4cace608dafd14b0bda65579013cbf7cf29b
refs/heads/master
2021-01-02T09:28:24.050270
2017-11-20T13:34:46
2017-11-20T13:34:46
99,216,102
1
19
null
2017-11-20T13:34:47
2017-08-03T09:34:39
Java
UTF-8
Java
false
false
2,845
java
package com.task.bookshop.repository; import com.task.bookshop.exceptions.BookAlreadyExistsException; import com.task.bookshop.exceptions.BookNotExistsException; import com.task.bookshop.model.Book; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; public class BookRepositoryImpl implements BookRepository { private List<Book> bookList; public BookRepositoryImpl() { bookList = new ArrayList<>(); demoData(); } @Override public void save(Book book) throws BookAlreadyExistsException { if (bookList.contains(book)) { throw new BookAlreadyExistsException("Book is already added"); } bookList.add(book); } @Override public void update(Book book) throws BookNotExistsException { Optional<Book> oldBook = bookList.stream() .filter(x -> x.getId().equals(book.getId())).findFirst(); int index = bookList.indexOf(oldBook .orElseThrow(() -> new BookNotExistsException("There is no book with such ID"))); bookList.set(index, book); } @Override public boolean exists(Book book) { return bookList.contains(book); } @Override public List<Book> findAll() { return bookList; } @Override public Book getById(String id) { return bookList.stream().filter(x -> x.getId().equals(id)).findFirst() .orElse(Book.getEmptyBook()); } @Override public List<Book> findAllByAuthorLike(String author) { return bookList.stream().filter(x -> x.getAuthor().toLowerCase().contains(author.toLowerCase())) .collect(Collectors.toList()); } @Override public List<Book> findAllByYear(int year) { return bookList.stream().filter(x -> x.getYear() == year).collect(Collectors.toList()); } @Override public List<Book> findAllByTitleLike(String title) { return bookList.stream().filter(x -> x.getTitle().toLowerCase().contains(title.toLowerCase())) .collect(Collectors.toList()); } private void demoData() { bookList.add(new Book("Code Complete", "Steve McConnell", 2004)); bookList.add(new Book("The Unified Software Development Process", "Grady Booch, Ivar Jacobson, James Rumbaugh", 1995)); bookList.add(new Book("Java 8. The Complete Reference, 9th Edition", "Herbert Schildt", 2015)); bookList.add(new Book("Java. Библиотека профессионала. Том 1. Основы", "Хорстманн К., Корнелл Г.", 2016)); bookList.add(new Book("The Lord of the Rings", "J.R.R. Tolkien", 2017)); bookList.add(new Book("The Hobbit", "J.R.R. Tolkien", 2016)); bookList.add(new Book("The Chronicles of Amber", "Roger Zelazny", 2016)); bookList.add(new Book("The Steel Rat", "Harry Harrison", 2015)); bookList.add(new Book("The Steel Rat", "Harry Harrison", 2017)); } }
[ "stanislav_parkhomenko@yahoo.com" ]
stanislav_parkhomenko@yahoo.com
19643195044f923f83c186c997ce779f913becaa
e2dc570266b4621da5f5fe0d6db7fcd0a727146a
/nestrefresh/src/main/java/com/todou/nestrefresh/material/resources/NRCancelableFontCallback.java
42a80146169e25948e021de12b07ca5f6246b319
[ "Apache-2.0" ]
permissive
csh159/nestrefresh
37bc13f8b5a35505f87aa4bc62a22ded51d4bd17
7eb9766a8e40d290c45cfd30df5a719f86e698a2
refs/heads/master
2020-06-15T15:21:20.157704
2019-06-28T14:04:24
2019-06-28T14:04:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,346
java
package com.todou.nestrefresh.material.resources; import android.graphics.Typeface; import com.todou.nestrefresh.material.TextAppearanceFontCallback; public final class NRCancelableFontCallback extends TextAppearanceFontCallback { /** Functional interface for method to call when font is retrieved (or fails with fallback). */ public interface ApplyFont { void apply(Typeface font); } private final Typeface fallbackFont; private final ApplyFont applyFont; private boolean cancelled; public NRCancelableFontCallback(ApplyFont applyFont, Typeface fallbackFont) { this.fallbackFont = fallbackFont; this.applyFont = applyFont; } @Override public void onFontRetrieved(Typeface font, boolean fontResolvedSynchronously) { updateIfNotCancelled(font); } @Override public void onFontRetrievalFailed(int reason) { updateIfNotCancelled(fallbackFont); } /** * Cancels this callback. No async operations will actually be interrupted as a result of this * method, but it will ignore any subsequent result of the fetch. * * <p>Callback cannot be resumed after canceling. New callback has to be created. */ public void cancel() { cancelled = true; } private void updateIfNotCancelled(Typeface updatedFont) { if (!cancelled) { applyFont.apply(updatedFont); } } }
[ "yytodou123@gmail.com" ]
yytodou123@gmail.com
8934d7dd979d6844ac2289e0e436b38ed3510b3b
4b2b6fe260ba39f684f496992513cb8bc07dfcbc
/com/planet_ink/coffee_mud/WebMacros/HTTPstatusInfo.java
3219d0deafa0d08d3243faa753b028ec917912ed
[ "Apache-2.0" ]
permissive
vjanmey/EpicMudfia
ceb26feeac6f5b3eb48670f81ea43d8648314851
63c65489c673f4f8337484ea2e6ebfc11a09364c
refs/heads/master
2021-01-18T20:12:08.160733
2014-06-22T04:38:14
2014-06-22T04:38:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,801
java
package com.planet_ink.coffee_mud.WebMacros; import com.planet_ink.miniweb.interfaces.*; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2000-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class HTTPstatusInfo extends StdWebMacro { @Override public String name() {return "HTTPstatusInfo";} @Override public String runMacro(HTTPRequest httpReq, String parm) { if(httpReq.getRequestObjects().get("SYSTEM_HTTP_STATUS_INFO")!=null) return (String)httpReq.getRequestObjects().get("SYSTEM_HTTP_STATUS_INFO"); return ""; } }
[ "vjanmey@gmail.com" ]
vjanmey@gmail.com
cc68c9bf85066bdcbbaf9797b29d29c79229748e
c19cb77e3958a194046d6f84ca97547cc3a223c3
/pkix/src/main/java/org/bouncycastle/cms/CMSSignatureEncryptionAlgorithmFinder.java
b1cd91fd53a414ceb24744dbd842ee4c1c2c3eba
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bcgit/bc-java
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
refs/heads/main
2023-09-04T00:48:33.995258
2023-08-30T05:33:42
2023-08-30T05:33:42
10,416,648
1,984
1,021
MIT
2023-08-26T05:14:28
2013-06-01T02:38:42
Java
UTF-8
Java
false
false
723
java
package org.bouncycastle.cms; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; /** * Finder which is used to look up the algorithm identifiers representing the encryption algorithms that * are associated with a particular signature algorithm. */ public interface CMSSignatureEncryptionAlgorithmFinder { /** * Return the encryption algorithm identifier associated with the passed in signatureAlgorithm * @param signatureAlgorithm the algorithm identifier of the signature of interest * @return the algorithm identifier to be associated with the encryption algorithm used in signature creation. */ AlgorithmIdentifier findEncryptionAlgorithm(AlgorithmIdentifier signatureAlgorithm); }
[ "dgh@cryptoworkshop.com" ]
dgh@cryptoworkshop.com
6382a02903c30bd5f0b357681382ba1862b8ff61
dd80a584130ef1a0333429ba76c1cee0eb40df73
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/GradleExportWizard.java
29f88026ac7be92fd136e72224617d8e42e0099f
[ "BSD-3-Clause", "EPL-1.0", "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
3,556
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.ide.eclipse.adt.internal.wizards.exportgradle; import com.android.ide.eclipse.adt.AdtPlugin; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.ui.IExportWizard; import org.eclipse.ui.IWorkbench; import java.lang.reflect.InvocationTargetException; import java.util.Collection; public class GradleExportWizard extends Wizard implements IExportWizard { private ProjectSetupBuilder mBuilder = new ProjectSetupBuilder(); private ProjectSelectionPage mFirstPage; private ConfirmationPage mSecondPage; private FinalPage mFinalPage; /** * Creates buildfile. */ @Override public boolean performFinish() { if (mBuilder.canGenerate()) { generateBuildfiles(mSecondPage); getContainer().showPage(mFinalPage); return false; } return true; } @Override public void addPages() { mFirstPage = new ProjectSelectionPage(mBuilder); addPage(mFirstPage); mSecondPage = new ConfirmationPage(mBuilder); addPage(mSecondPage); mFinalPage = new FinalPage(mBuilder); addPage(mFinalPage); } @Override public void init(IWorkbench workbench, IStructuredSelection selection) { setWindowTitle(ExportMessages.WindowTitle); setNeedsProgressMonitor(true); } @Override public boolean canFinish() { return mBuilder.canFinish() || mBuilder.canGenerate(); } /** * Converts Eclipse Java projects to Gradle build files. Displays error dialogs. */ public boolean generateBuildfiles(final WizardPage page) { IRunnableWithProgress runnable = new IRunnableWithProgress() { @Override public void run(IProgressMonitor pm) throws InterruptedException { Collection<GradleModule> modules = mBuilder.getModules(); final int count = modules.size(); SubMonitor localmonitor = SubMonitor.convert(pm, ExportMessages.StatusMessage, count); BuildFileCreator.createBuildFiles( mBuilder, page.getShell(), localmonitor.newChild(count)); } }; try { getContainer().run(false, false, runnable); } catch (InvocationTargetException e) { AdtPlugin.log(e, null); return false; } catch (InterruptedException e) { AdtPlugin.log(e, null); return false; } if (page.getErrorMessage() != null) { return false; } return true; } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
cbf68f5327d6152915c981d232d634d6c59f69e3
0dd6326cc1b96dfec99e68475c1259404da1f1a5
/library/src/main/java/com/mainaer/wjoklib/okhttp/download/dao/DownloadDao.java
0a87c8a417b9d9a71dffc613fd8be936ad56005b
[]
no_license
liyimeifeng/Duandianxuchuan
dec0e99db63741975f8b4450299d64e07cb0e64b
140163f4ef0cccb42673d8d0417d4cc1f06e325c
refs/heads/master
2021-01-19T23:19:06.658834
2017-04-21T08:06:19
2017-04-21T08:06:19
88,957,824
1
0
null
null
null
null
UTF-8
Java
false
false
6,055
java
package com.mainaer.wjoklib.okhttp.download.dao; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import de.greenrobot.dao.AbstractDao; import de.greenrobot.dao.Property; import de.greenrobot.dao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "download". */ public class DownloadDao extends AbstractDao<DownloadEntity, String> { public static final String TABLENAME = "download"; /** * Properties of entity DownloadEntity.<br/> * Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property DownloadId = new Property(0, String.class, "downloadId", true, "DOWNLOAD_ID"); public final static Property ToolSize = new Property(1, Long.class, "toolSize", false, "TOOL_SIZE"); public final static Property CompletedSize = new Property(2, Long.class, "completedSize", false, "COMPLETED_SIZE"); public final static Property Url = new Property(3, String.class, "url", false, "URL"); public final static Property SaveDirPath = new Property(4, String.class, "saveDirPath", false, "SAVE_DIR_PATH"); public final static Property FileName = new Property(5, String.class, "fileName", false, "FILE_NAME"); public final static Property DownloadStatus = new Property(6, Integer.class, "downloadStatus", false, "DOWNLOAD_STATUS"); }; public DownloadDao(DaoConfig config) { super(config); } public DownloadDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } /** Creates the underlying database table. */ public static void createTable(SQLiteDatabase db, boolean ifNotExists) { String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"download\" (" + // "\"DOWNLOAD_ID\" TEXT PRIMARY KEY NOT NULL ," + // 0: downloadId "\"TOOL_SIZE\" INTEGER," + // 1: toolSize "\"COMPLETED_SIZE\" INTEGER," + // 2: completedSize "\"URL\" TEXT," + // 3: url "\"SAVE_DIR_PATH\" TEXT," + // 4: saveDirPath "\"FILE_NAME\" TEXT," + // 5: fileName "\"DOWNLOAD_STATUS\" INTEGER);"); // 6: downloadStatus } /** Drops the underlying database table. */ public static void dropTable(SQLiteDatabase db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"download\""; db.execSQL(sql); } /** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, DownloadEntity entity) { stmt.clearBindings(); String downloadId = entity.getDownloadId(); if (downloadId != null) { stmt.bindString(1, downloadId); } Long toolSize = entity.getToolSize(); if (toolSize != null) { stmt.bindLong(2, toolSize); } Long completedSize = entity.getCompletedSize(); if (completedSize != null) { stmt.bindLong(3, completedSize); } String url = entity.getUrl(); if (url != null) { stmt.bindString(4, url); } String saveDirPath = entity.getSaveDirPath(); if (saveDirPath != null) { stmt.bindString(5, saveDirPath); } String fileName = entity.getFileName(); if (fileName != null) { stmt.bindString(6, fileName); } Integer downloadStatus = entity.getDownloadStatus(); if (downloadStatus != null) { stmt.bindLong(7, downloadStatus); } } /** @inheritdoc */ @Override public String readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0); } /** @inheritdoc */ @Override public DownloadEntity readEntity(Cursor cursor, int offset) { DownloadEntity entity = new DownloadEntity( // cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // downloadId cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // toolSize cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // completedSize cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // url cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // saveDirPath cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // fileName cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6) // downloadStatus ); return entity; } /** @inheritdoc */ @Override public void readEntity(Cursor cursor, DownloadEntity entity, int offset) { entity.setDownloadId(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setToolSize(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); entity.setCompletedSize(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); entity.setUrl(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setSaveDirPath(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setFileName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setDownloadStatus(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6)); } /** @inheritdoc */ @Override protected String updateKeyAfterInsert(DownloadEntity entity, long rowId) { return entity.getDownloadId(); } /** @inheritdoc */ @Override public String getKey(DownloadEntity entity) { if(entity != null) { return entity.getDownloadId(); } else { return null; } } /** @inheritdoc */ @Override protected boolean isEntityUpdateable() { return true; } }
[ "liyi@dftcmedia.com" ]
liyi@dftcmedia.com
e9e87c7bd22355611a7e2aa75ed4aceeb3f2a153
4c2e83907706317c147433e4560a49d431badf1b
/app/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java
7d9a0ccd281cec98f20dea0e06a05d0a431f6d18
[ "Unlicense" ]
permissive
renyuanceshi/KingKingRE
92c80328556853029eb5b7bbf3a48a19182cf056
b15295bec2cee47867b786dbe0841c1a4edaff5e
refs/heads/master
2020-12-13T14:41:26.365794
2020-01-17T04:27:21
2020-01-17T04:27:21
234,442,774
0
0
null
null
null
null
UTF-8
Java
false
false
1,361
java
package org.apache.http.client.protocol; import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpVersion; import org.apache.http.ProtocolVersion; import org.apache.http.annotation.Immutable; import org.apache.http.protocol.HTTP; import org.apache.http.protocol.HttpContext; import org.apache.http.util.Args; @Immutable public class RequestExpectContinue implements HttpRequestInterceptor { public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException { Args.notNull(httpRequest, "HTTP request"); if (!httpRequest.containsHeader("Expect") && (httpRequest instanceof HttpEntityEnclosingRequest)) { ProtocolVersion protocolVersion = httpRequest.getRequestLine().getProtocolVersion(); HttpEntity entity = ((HttpEntityEnclosingRequest) httpRequest).getEntity(); if (entity != null && entity.getContentLength() != 0 && !protocolVersion.lessEquals(HttpVersion.HTTP_1_0) && HttpClientContext.adapt(httpContext).getRequestConfig().isExpectContinueEnabled()) { httpRequest.addHeader("Expect", HTTP.EXPECT_CONTINUE); } } } }
[ "lewis@spectratech.com" ]
lewis@spectratech.com
5fd7d9436fd9509bc863a1211ad62477e4078e31
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape/tags/Cyto-2.6.0-beta1/src/cytoscape/data/webservice/DatabaseSearchResult.java
8b47f6d31960bf940e3e025234502ea68bae72f9
[]
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
619
java
package cytoscape.data.webservice; import cytoscape.data.webservice.CyWebServiceEvent.WSEventType; public class DatabaseSearchResult { private final Integer resultSize; private final Object resultObject; private final WSEventType nextMove; public DatabaseSearchResult(Integer resultSize, Object resultObject, WSEventType nextMove) { this.resultSize = resultSize; this.resultObject = resultObject; this.nextMove = nextMove; } public Object getResult() { return resultObject; } public Integer getResultSize() { return resultSize; } public WSEventType getNextMove() { return nextMove; } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
20a1a120e271937b08318d2db57219ef3ddc7cc0
55dca62e858f1a44c2186774339823a301b48dc7
/code/my-app/functions/12/readAttributes_NationSummary.java
a4d45a3dec55321408202dc75a401cc5ab3e7b60
[]
no_license
jwiszowata/code_reaper
4fff256250299225879d1412eb1f70b136d7a174
17dde61138cec117047a6ebb412ee1972886f143
refs/heads/master
2022-12-15T14:46:30.640628
2022-02-10T14:02:45
2022-02-10T14:02:45
84,747,455
0
0
null
2022-12-07T23:48:18
2017-03-12T18:26:11
Java
UTF-8
Java
false
false
631
java
protected void readAttributes(FreeColXMLReader xr) throws XMLStreamException { super.readAttributes(xr); stance = xr.getAttribute(STANCE_TAG, Stance.class, Stance.PEACE); numberOfSettlements = xr.getAttribute(NUMBER_OF_SETTLEMENTS_TAG, -1); numberOfUnits = xr.getAttribute(NUMBER_OF_UNITS_TAG, -1); militaryStrength = xr.getAttribute(MILITARY_STRENGTH_TAG, -1); navalStrength = xr.getAttribute(NAVAL_STRENGTH_TAG, -1); gold = xr.getAttribute(GOLD_TAG, -1); soL = xr.getAttribute(SOL_TAG, -1); foundingFathers = xr.getAttribute(FOUNDING_FATHERS_TAG, -1); tax = xr.getAttribute(TAX_TAG, -1); }
[ "wiszowata.joanna@gmail.com" ]
wiszowata.joanna@gmail.com
17fab4dd203ee440c3c17c2ef2da2bcec0d72265
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/org/apache/http/client/methods/HttpHead.java
bac992612579d65f2451ad54dfd6b213a29b4693
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
378
java
package org.apache.http.client.methods; import java.net.URI; @Deprecated public class HttpHead extends HttpRequestBase { public static final String METHOD_NAME = "HEAD"; public HttpHead(URI uri) { setURI(uri); } public HttpHead(String uri) { setURI(URI.create(uri)); } public String getMethod() { return METHOD_NAME; } }
[ "toor@debian.toor" ]
toor@debian.toor
59ff6e707f66d40517efbe168ee3b9de7b716cbc
86c01941aa884489dc81e480e27b77f47b77529f
/vista/src/vista/graph/CurveLegendLine.java
3242b53fe5884ef50fbd53dcc6226affa961b37c
[]
no_license
CADWRDeltaModeling/dsm2-vista
cdcb3135a4bc8ed2af0d9a5242411b9aadf3e986
5115fbae9edae5fa1d90ed795687fd74e69d5051
refs/heads/master
2023-05-25T13:01:31.466663
2023-05-18T18:51:40
2023-05-18T18:51:40
32,541,476
2
0
null
null
null
null
UTF-8
Java
false
false
3,924
java
/* Copyright (C) 1996, 1997, 1998 State of California, Department of Water Resources. VISTA : A VISualization Tool and Analyzer. Version 1.0beta by Nicky Sandhu California Dept. of Water Resources Division of Planning, Delta Modeling Section 1416 Ninth Street Sacramento, CA 95814 (916)-653-7552 nsandhu@water.ca.gov Send bug reports to nsandhu@water.ca.gov This program is licensed to you under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License along with this program; if not, contact Dr. Francis Chung, below, or the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED BY THE CALIFORNIA DEPARTMENT OF WATER RESOURCES AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CALIFORNIA DEPARTMENT OF WATER RESOURCES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OR SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. For more information about VISTA, contact: Dr. Francis Chung California Dept. of Water Resources Division of Planning, Delta Modeling Section 1416 Ninth Street Sacramento, CA 95814 916-653-5601 chung@water.ca.gov or see our home page: http://wwwdelmod.water.ca.gov/ Send bug reports to nsandhu@water.ca.gov or call (916)-653-7552 */ package vista.graph; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Rectangle; /** * A line which represents the curve characterstics. * * @author Nicky Sandhu * @version $Id: CurveLegendLine.java,v 1.1 2003/10/02 20:48:52 redwood Exp $ */ public class CurveLegendLine extends GraphicElement { /** * A line with the same attributes as the curve */ public CurveLegendLine(Curve curve) { super(curve.getAttributes()); _curve = curve; } /** * */ public Dimension getPreferredSize() { return new Dimension(50, 20); } /** * */ public Dimension getMinimumSize() { return getPreferredSize(); } /** * */ public void Draw() { Graphics gc = getGraphics(); CurveAttr attr = (CurveAttr) getAttributes(); Rectangle r = getBounds(); int yPos = r.y + r.height / 2; if (DEBUG) System.out.println("Rectangle for legend item: " + r); if (attr._thickness > 1) GraphUtils.drawThickLine(gc, r.x, yPos, r.x + r.width, yPos, attr._thickness); else gc.drawLine(r.x, yPos, r.x + r.width, yPos); if (attr._drawSymbol) { Symbol sym = _curve.getSymbol(); if (sym != null) { Rectangle symbolBounds = sym.getBounds(); if (DEBUG) System.out.println("Symbol for legend item: " + symbolBounds); symbolBounds.x = r.x + r.width / 2; symbolBounds.y = yPos; sym.draw(gc, symbolBounds); symbolBounds.x = r.x + r.width / 4; symbolBounds.y = yPos; sym.draw(gc, symbolBounds); symbolBounds.x = r.x + (r.width * 3) / 4; symbolBounds.y = yPos; sym.draw(gc, symbolBounds); } } } /** * The curve which is being represented */ protected Curve _curve; /** * */ private static final boolean DEBUG = false; }
[ "psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06" ]
psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06
6464e4f61e98968ddb19aa488ac5d60e30c9819f
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a210/A210678Test.java
f46203454a169c7a500df636b215914faff7b746
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a210; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A210678Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
11baa98de330b101a27860b7ae16815cb79dee62
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/formulario_30/copy/copy/copy/TestingTry.java
e06ea2ec95dd80fa6a88833b815f2b933cbaad01
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,271
java
package cl.stotomas.factura.negocio.formulario_30.copy.copy.copy; import java.applet.Applet; public class TestingTry { // Inclusión de funcionalidades de esfera de control que no es de confianza // Un atacante puede insertar funcionalidades maliciosas dentro de este programa. // Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web // Ademas la entrega de acceso de credenciales es engorrosa para el cliente. public final class TestApplet extends Applet { private static final long serialVersionUID = 1L; } //Comparación de referencias de objeto en lugar de contenido de objeto // El if dentro de este código no se ejecutará. // porque se prioriza el String a mostrar. public final class compareStrings{ public String str1; public String str2; public void comparar() { if (str1 == str2) { System.out.println("str1 == str2"); } } // RECOMENDACIÓN VERACODE // Utilizar equals para realizar la comparación. // public void comprar() // { // if (str1.equals (str2)) // { // System.out.println ("str1 es igual a str2"); // } // } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
d652e0bef43936ebc570e6cb5ae7c7be85e09831
9d6089379238e00c0a5fb2949c1a6e7c19b50958
/bin/ext-content/importcockpit/testsrc/de/hybris/platform/importcockpit/daos/impl/DefaultImportCockpitCronJobLogDaoTest.java
933d284054127b4fd493fdb038edc420180f0b02
[]
no_license
ChintalaVenkat/learning_hybris
55ce582b4796a843511d0ea83f4859afea52bd88
6d29f59578512f9fa44a3954dc67d0f0a5216f9b
refs/heads/master
2021-06-18T17:47:12.173132
2021-03-26T11:00:09
2021-03-26T11:00:09
193,689,090
0
0
null
2019-06-25T10:46:40
2019-06-25T10:46:39
null
UTF-8
Java
false
false
1,908
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.importcockpit.daos.impl; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.importcockpit.model.ImportCockpitCronJobModel; import de.hybris.platform.servicelayer.search.FlexibleSearchQuery; import de.hybris.platform.servicelayer.search.FlexibleSearchService; import de.hybris.platform.servicelayer.search.SearchResult; import org.junit.Before; import org.junit.Test; import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @UnitTest public class DefaultImportCockpitCronJobLogDaoTest { private DefaultImportCockpitCronJobLogDao icDao; @Mock private ImportCockpitCronJobModel job; @Mock private FlexibleSearchService flexibleSearchService; @Mock private SearchResult searchResult; @Before public void setUp() { MockitoAnnotations.initMocks(this); icDao = new DefaultImportCockpitCronJobLogDao(); icDao.setFlexibleSearchService(flexibleSearchService); } @Test public void testFindRecentLogsByCronJob() { when(flexibleSearchService.search(Matchers.<FlexibleSearchQuery> any())).thenReturn(searchResult); when(searchResult.getResult()).thenReturn(null); when(job.getStartTime()).thenReturn(null); when(job.getCreationtime()).thenReturn(null); icDao.findRecentLogsByCronJob(job); verify(flexibleSearchService).search(Matchers.<FlexibleSearchQuery> any()); verify(job).getCreationtime(); verify(job).getStartTime(); } }
[ "a.basov@aimprosoft.com" ]
a.basov@aimprosoft.com
c2eb8cea2cd861a5532a25aa9545ffc0c3922832
d61cbe04b46e3480d5f2acf356f8ccdbab28dbc7
/Java Standard Edition APIs Core/03_Modulo3Genericos/src/com/icaballero/clases02/PackDoble.java
449b6fbdb9317563cfe8c749dbb60f8fde2de5c8
[]
no_license
decalion/Formaciones-Platzi-Udemy
d479548c50f3413eba5bad3d01bdd6a33ba75f60
3180d5062d847cc466d4a614863a731189137e50
refs/heads/master
2022-11-30T18:59:39.796599
2021-06-08T20:11:18
2021-06-08T20:11:18
200,000,005
1
2
null
2022-11-24T09:11:48
2019-08-01T07:27:00
Java
UTF-8
Java
false
false
475
java
package com.icaballero.clases02; public class PackDoble<T> { private T item1; private T item2; public PackDoble(T item1, T item2) { super(); this.item1 = item1; this.item2 = item2; } public T getItem1() { return item1; } public void setItem1(T item1) { this.item1 = item1; } public T getItem2() { return item2; } public void setItem2(T item2) { this.item2 = item2; } public boolean iguals() { return item1.equals(item2); } }
[ "icaballerohernandez@gmail.com" ]
icaballerohernandez@gmail.com
8c6faf5efba66015fe00775e05bbec764377b0df
0aff735c9a49ccf9c004ea07e94cd60f911c8338
/net/minecraft/network/play/server/S2DPacketOpenWindow.java
7920d299162950b556e6711de9818248fcad9394
[]
no_license
a3535ed54a5ee6917a46cfa6c3f12679/a775b0d7_phenix_mc_InDev
00be6df18da5ce388ba49d8c275ef664453e7bd8
9581b9fcf37b967a438ea7cfe1c58720268fd134
refs/heads/master
2021-09-06T10:02:23.512201
2018-02-05T08:50:24
2018-02-05T08:50:24
120,032,615
1
0
null
null
null
null
UTF-8
Java
false
false
3,209
java
package net.minecraft.network.play.server; import java.io.IOException; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; public class S2DPacketOpenWindow extends Packet { private int field_148909_a; private int field_148907_b; private String field_148908_c; private int field_148905_d; private boolean field_148906_e; private int field_148904_f; private static final String __OBFID = "CL_00001293"; public S2DPacketOpenWindow() {} public S2DPacketOpenWindow(int p_i45184_1_, int p_i45184_2_, String p_i45184_3_, int p_i45184_4_, boolean p_i45184_5_) { this.field_148909_a = p_i45184_1_; this.field_148907_b = p_i45184_2_; this.field_148908_c = p_i45184_3_; this.field_148905_d = p_i45184_4_; this.field_148906_e = p_i45184_5_; } public S2DPacketOpenWindow(int p_i45185_1_, int p_i45185_2_, String p_i45185_3_, int p_i45185_4_, boolean p_i45185_5_, int p_i45185_6_) { this(p_i45185_1_, p_i45185_2_, p_i45185_3_, p_i45185_4_, p_i45185_5_); this.field_148904_f = p_i45185_6_; } public void processPacket(INetHandlerPlayClient p_148903_1_) { p_148903_1_.handleOpenWindow(this); } /** * Reads the raw packet data from the data stream. */ public void readPacketData(PacketBuffer p_148837_1_) throws IOException { this.field_148909_a = p_148837_1_.readUnsignedByte(); this.field_148907_b = p_148837_1_.readUnsignedByte(); this.field_148908_c = p_148837_1_.readStringFromBuffer(32); this.field_148905_d = p_148837_1_.readUnsignedByte(); this.field_148906_e = p_148837_1_.readBoolean(); if (this.field_148907_b == 11) { this.field_148904_f = p_148837_1_.readInt(); } } /** * Writes the raw packet data to the data stream. */ public void writePacketData(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeByte(this.field_148909_a); p_148840_1_.writeByte(this.field_148907_b); p_148840_1_.writeStringToBuffer(this.field_148908_c); p_148840_1_.writeByte(this.field_148905_d); p_148840_1_.writeBoolean(this.field_148906_e); if (this.field_148907_b == 11) { p_148840_1_.writeInt(this.field_148904_f); } } public int func_148901_c() { return this.field_148909_a; } public int func_148899_d() { return this.field_148907_b; } public String func_148902_e() { return this.field_148908_c; } public int func_148898_f() { return this.field_148905_d; } public boolean func_148900_g() { return this.field_148906_e; } public int func_148897_h() { return this.field_148904_f; } public void processPacket(INetHandler p_148833_1_) { this.processPacket((INetHandlerPlayClient)p_148833_1_); } }
[ "unknowlk@tuta.io" ]
unknowlk@tuta.io
f36a7da55c167ab700b377a844552caa4e65210c
fb3f91fb6c18bb93c5d51b58d13e201203833994
/Desarrollo/AcmeParent/AcmeHibernateDomain/src/main/java/pe/com/acme/hibernate/service/ComprobanteItemRepository.java
1948415b778d768f85f8b91978ebad4dc1234877
[]
no_license
cgb-extjs-gwt/avgust-extjs-generator
d24241e594078eb8af8e33e99be64e56113a1c0c
30677d1fef4da73e2c72b6c6dfca85d492e1a385
refs/heads/master
2023-07-20T04:39:13.928605
2018-01-16T18:17:23
2018-01-16T18:17:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package pe.com.acme.hibernate.service; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.stereotype.Repository; import pe.com.acme.hibernate.domain.ComprobanteItem; /** * Created by JRaffo on 23/03/17. */ @Repository public interface ComprobanteItemRepository extends PagingAndSortingRepository<ComprobanteItem, Integer> { }
[ "raffo8924@gmail.com" ]
raffo8924@gmail.com
15a9ce63db09f953b2db7d24cacfefb40b269165
8ec2cbabd6125ceeb00e0c6192c3ce84477bdde6
/com.alcatel.as.sipservlet10/javax/servlet/sip/annotation/SipSessionAttributeListener.java
7367fd365f9e37ca747aa03f1fc440e4312c1787
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
nokia/osgi-microfeatures
2cc2b007454ec82212237e012290425114eb55e6
50120f20cf929a966364550ca5829ef348d82670
refs/heads/main
2023-08-28T12:13:52.381483
2021-11-12T20:51:05
2021-11-12T20:51:05
378,852,173
1
1
null
null
null
null
UTF-8
Java
false
false
521
java
// Copyright 2000-2021 Nokia // // Licensed under the Apache License 2.0 // SPDX-License-Identifier: Apache-2.0 // package javax.servlet.sip.annotation; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.Target; import java.lang.annotation.ElementType; @Target({ElementType.TYPE}) @Retention(RUNTIME) @Inherited public @interface SipSessionAttributeListener { String applicationName() default ""; }
[ "pierre.de_rop@nokia.com" ]
pierre.de_rop@nokia.com
a231f692f445436cb26e08ab3be6c575805d932f
419e0607d4bb1ff298faca921447ee4b35e5b894
/server/src/main/java/io/crate/metadata/functions/BoundSignature.java
fd1d1dbf676689931aa14eaffa341ec52c4e393b
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
crate/crate
7af793e2f709b77a5addc617d6e9dbba452d4e68
8acb044a7cdbab048b045854d0466fccc2492550
refs/heads/master
2023-08-31T07:17:42.891453
2023-08-30T15:09:09
2023-08-30T17:13:14
9,342,529
3,540
639
Apache-2.0
2023-09-14T21:00:43
2013-04-10T09:17:16
Java
UTF-8
Java
false
false
1,760
java
/* * Licensed to Crate.io GmbH ("Crate") under one or more contributor * license agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. Crate licenses * this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * * However, if you have executed another commercial license agreement * with Crate these terms will supersede the license and you may use the * software solely pursuant to the terms of the relevant commercial agreement. */ package io.crate.metadata.functions; import java.util.List; import io.crate.types.DataType; public final class BoundSignature { private final List<DataType<?>> argTypes; private final DataType<?> returnType; public static BoundSignature sameAsUnbound(Signature signature) { return new BoundSignature( signature.getArgumentDataTypes(), signature.getReturnType().createType() ); } public BoundSignature(List<DataType<?>> argTypes, DataType<?> returnType) { this.argTypes = argTypes; this.returnType = returnType; } public List<DataType<?>> argTypes() { return argTypes; } public DataType<?> returnType() { return returnType; } }
[ "37929162+mergify[bot]@users.noreply.github.com" ]
37929162+mergify[bot]@users.noreply.github.com
bf491bf9cd1b5749339d5e1f539bca80a71c65a7
b49081b8d8d5258d6d45ae4405fc12c40240d497
/haitao-service/src/main/java/com/thinvent/basicpf/controller/MoudleController.java
8e98de2ae1b5c0f98c720c7e5c3ee8c517669747
[]
no_license
keercers/haitao
33ef403e799c50c83bb9162e103d3e619e506a02
7fd47aa750563765ee1886f571be8f3dea3996b5
refs/heads/master
2020-03-21T12:35:06.752138
2018-06-27T10:07:36
2018-06-27T10:07:36
138,560,732
0
0
null
null
null
null
UTF-8
Java
false
false
2,842
java
package com.thinvent.basicpf.controller; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.thinvent.basicpf.handler.IMoudleHandler; import com.thinvent.library.exception.ThinventBaseException; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @RestController @RequestMapping(value = "moudle") public class MoudleController { @Autowired private IMoudleHandler moudleHandle; @GetMapping(value = "/getMoudleByLevel") @ApiOperation(value = "模块--模块等级查询", notes = "根据等级查询模块列表") @ApiImplicitParam(name = "moudleLevel", required = true, value = "模块ID", dataType = "string", paramType = "query") public Object getByLevel(@RequestParam(value = "moudleLevel") String moudleLevel, @RequestParam(value = "userId") String userId) throws ThinventBaseException { return this.moudleHandle.findByMoudleLevelAndEnable(moudleLevel, userId); } @GetMapping(value = "/getMoudleTreeBySign") @ApiOperation(value = "模块--模块子节点查询", notes = "根据模块sign查询模块列表") @ApiImplicitParam(name = "moudleSign", required = true, value = "模块ID", dataType = "string", paramType = "query") public Object getTreeBySign(@RequestParam(value = "moudleSign") String moudleSign, @RequestParam(value = "userId") String userId) { return this.moudleHandle.findTreeByMoudleSignLike(moudleSign, userId); } @GetMapping(value = "/getAll") @ApiOperation(value = "模块--模块查询", notes = "查询所有模块列表") public Object getAll() { return this.moudleHandle.findByEnable(); } @GetMapping(value = "/getForbidList") @ApiOperation(value = "模块--获取用户禁止权限", notes = "获取用户禁止权限") @ApiImplicitParam(name = "userId", required = true, value = "禁止权限", dataType = "string") public String getForbidList(@RequestParam(required = true, value = "userId") String userId) throws ThinventBaseException{ return this.moudleHandle.getForbidList(userId); } @GetMapping(value = "/getMoudleTree") @ApiOperation(value = "模块--模块树查询", notes = "模块树查询") @ApiImplicitParam(name = "moudleSign", required = true, value = "模块ID", dataType = "String", paramType = "query") public List<Map> getMoudleTree(@RequestParam(value = "moudleSign") String moudleSign, @RequestParam(value = "userId") String userId) throws ThinventBaseException { return this.moudleHandle.getMoudleTree(moudleSign, userId); } }
[ "keercers@lookout.com" ]
keercers@lookout.com
37cc64d59ea2e088459b5c1a226fba2e1b86d885
92f7ba1ebc2f47ecb58581a2ed653590789a2136
/src/com/infodms/dms/po/TtAsWrActivityHoursPO.java
114e0e9f342b176f9bc88e654accca90170d1d1f
[]
no_license
dnd2/CQZTDMS
504acc1883bfe45842c4dae03ec2ba90f0f991ee
5319c062cf1932f8181fdd06cf7e606935514bf1
refs/heads/master
2021-01-23T15:30:45.704047
2017-09-07T07:47:51
2017-09-07T07:47:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,447
java
/* * Copyright (c) 2005 Infoservice, Inc. All Rights Reserved. * This software is published under the terms of the Infoservice Software * License version 1.0, a copy of which has been included with this * distribution in the LICENSE.txt file. * * CreateDate : 2017-07-24 11:06:34 * CreateBy : chenzheng * Comment : generate by com.sgm.po.POGen */ package com.infodms.dms.po; import com.infoservice.po3.bean.PO; @SuppressWarnings("serial") public class TtAsWrActivityHoursPO extends PO{ private String hoursName; private String hoursCode; private Long id; private Float applyHoursCount; private Long activityId; private Long hoursId; public void setHoursName(String hoursName){ this.hoursName=hoursName; } public String getHoursName(){ return this.hoursName; } public void setHoursCode(String hoursCode){ this.hoursCode=hoursCode; } public String getHoursCode(){ return this.hoursCode; } public void setId(Long id){ this.id=id; } public Long getId(){ return this.id; } public void setApplyHoursCount(Float applyHoursCount){ this.applyHoursCount=applyHoursCount; } public Float getApplyHoursCount(){ return this.applyHoursCount; } public void setActivityId(Long activityId){ this.activityId=activityId; } public Long getActivityId(){ return this.activityId; } public void setHoursId(Long hoursId){ this.hoursId=hoursId; } public Long getHoursId(){ return this.hoursId; } }
[ "wanghanxiancn@gmail.com" ]
wanghanxiancn@gmail.com
53845e0709c61ff5a80d5344fe3879b4c821b324
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/GetLinkeBahamutApprovaltaskscountResponse.java
87b255028041847eba3f039e43bd3b9ec95cc078
[ "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
2,921
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.AcsResponse; import com.aliyuncs.sofa.transform.v20190815.GetLinkeBahamutApprovaltaskscountResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class GetLinkeBahamutApprovaltaskscountResponse extends AcsResponse { private String requestId; private String resultCode; private String resultMessage; private String errorMessage; private String errorMsgParamsMap; private String message; private Long responseStatusCode; private Long result; private Boolean success; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getResultCode() { return this.resultCode; } public void setResultCode(String resultCode) { this.resultCode = resultCode; } public String getResultMessage() { return this.resultMessage; } public void setResultMessage(String resultMessage) { this.resultMessage = resultMessage; } public String getErrorMessage() { return this.errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public String getErrorMsgParamsMap() { return this.errorMsgParamsMap; } public void setErrorMsgParamsMap(String errorMsgParamsMap) { this.errorMsgParamsMap = errorMsgParamsMap; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public Long getResponseStatusCode() { return this.responseStatusCode; } public void setResponseStatusCode(Long responseStatusCode) { this.responseStatusCode = responseStatusCode; } public Long getResult() { return this.result; } public void setResult(Long result) { this.result = result; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } @Override public GetLinkeBahamutApprovaltaskscountResponse getInstance(UnmarshallerContext context) { return GetLinkeBahamutApprovaltaskscountResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
09b69db477439677cb25dca8b28e7ea59fc8c61c
c458fe10e1d8aef4c53d0f6e3cacaf7617ca4e9d
/AdvanceJava_ntaj114_Final/FilterApp4-SessionCheckingFilter/src/com/nt/filter/LoginSessionCheckFilter.java
a048dea5df6aabd20f8732c94d64aee86127c773
[]
no_license
aakulasaikiran/AdvanceJava
53c64c75eaf7f8581bcf8f067f828402c4a3a6a8
b702d4295b93ae82748cc2ca6052841c794208e6
refs/heads/master
2020-03-23T17:50:39.602290
2018-07-22T08:45:02
2018-07-22T08:45:02
141,878,302
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package com.nt.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; @WebFilter("/inboxurl") public class LoginSessionCheckFilter implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException,ServletException { HttpSession ses=null; RequestDispatcher rd=null; //get Access to Sesson ses=((HttpServletRequest)req).getSession(false); if(ses==null || ses.getAttribute("userDetails")==null){ req.setAttribute("errMsg","Please Login to access InBox"); rd=req.getRequestDispatcher("/login.jsp"); rd.forward(req, res); } else{ chain.doFilter(req,res); }//else }//doFilter }//filter
[ "aakulasaikiran@gmail.com" ]
aakulasaikiran@gmail.com
1f14fc8f545f5113fd831a258933485a302455f4
3557b30b7aac3740c5b3e74412953ef74f26d998
/app/src/main/java/com/cyanbirds/tanlove/activity/MoneyOutputActivity.java
918bc2a9d076e316e38e35e07849a2eb123d0a9a
[]
no_license
wybilold1999/TanProject
55a5baced00563e5121b263cf88631025b22489d
e13919a0b1e0aaa7f942d9749d4dfd80863c40a6
refs/heads/master
2021-01-23T06:20:26.617070
2018-07-16T08:01:37
2018-07-16T08:01:37
86,355,833
0
0
null
null
null
null
UTF-8
Java
false
false
6,586
java
package com.cyanbirds.tanlove.activity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AlertDialog; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; import android.widget.TextView; import com.cyanbirds.tanlove.R; import com.cyanbirds.tanlove.activity.base.BaseActivity; import com.cyanbirds.tanlove.config.ValueKey; import com.cyanbirds.tanlove.entity.OutputMoney; import com.cyanbirds.tanlove.eventtype.SnackBarEvent; import com.cyanbirds.tanlove.manager.AppManager; import com.cyanbirds.tanlove.net.request.OutputMoneyRequest; import com.cyanbirds.tanlove.utils.PreferencesUtils; import com.cyanbirds.tanlove.utils.ProgressDialogUtils; import com.cyanbirds.tanlove.utils.ToastUtil; import org.greenrobot.eventbus.EventBus; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import mehdi.sakout.fancybuttons.FancyButton; /** * 作者:wangyb * 时间:2017/9/9 11:39 * 描述: */ public class MoneyOutputActivity extends BaseActivity { @BindView(R.id.edt_name) EditText mEdtName; @BindView(R.id.edt_bank) EditText mEdtBank; @BindView(R.id.edt_bank_no) EditText mEdtBankNo; @BindView(R.id.edt_money) EditText mEdtMoney; @BindView(R.id.btn_get) FancyButton mBtnGet; private float mMoneyCount; private View mInputView; private TextView mMoney; private EditText mPwd; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_money_output); ButterKnife.bind(this); Toolbar toolbar = getActionBarToolbar(); if (toolbar != null) { toolbar.setNavigationIcon(R.mipmap.ic_up); } setupData(); } private void setupData() { mMoneyCount = getIntent().getFloatExtra(ValueKey.DATA, 0); } @OnClick(R.id.btn_get) public void onViewClicked() { if (mMoneyCount <= 0 ) { ToastUtil.showMessage(R.string.money_count_zero); } else if (!AppManager.getClientUser().is_vip){ showVipDialog(); } else if (AppManager.getClientUser().gold_num < 101) { showGoldDialog(); } else if (checkInput()) { initDialogView(); showInputDialog(); } } /** * 验证输入 */ private boolean checkInput() { String message = ""; boolean bool = true; if (TextUtils.isEmpty(mEdtName.getText().toString())) { message = getResources().getString(R.string.input_name); bool = false; } else if (TextUtils.isEmpty(mEdtBank.getText().toString())) { message = getResources().getString(R.string.input_bank); bool = false; } else if (TextUtils.isEmpty(mEdtBankNo.getText().toString())) { message = getResources().getString(R.string.input_bank_no); bool = false; } else if (TextUtils.isEmpty(mEdtMoney.getText().toString())) { message = getResources().getString(R.string.input_output_money); bool = false; } else if (Double.parseDouble(mEdtMoney.getText().toString()) > mMoneyCount) { message = getResources().getString(R.string.output_money_beyond); bool = false; } if (!bool) ToastUtil.showMessage(message); return bool; } private void showInputDialog(){ mMoney.setText("¥" + mEdtMoney.getText().toString()); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setCancelable(false); builder.setView(mInputView); builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); if (mPwd.getText().toString().length() == 6) { OutputMoney outputMoney = new OutputMoney(); outputMoney.nickname = mEdtName.getText().toString(); outputMoney.bank = mEdtBank.getText().toString(); outputMoney.bankNo = mEdtBankNo.getText().toString(); outputMoney.money = mEdtMoney.getText().toString(); outputMoney.pwd = mPwd.getText().toString(); new OutputMoneyTask().request(outputMoney); ProgressDialogUtils.getInstance(MoneyOutputActivity.this).show(R.string.wait); } else { ToastUtil.showMessage("密码长度不够"); } } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.show(); } private void initDialogView(){ mInputView = LayoutInflater.from(this).inflate(R.layout.dialog_input_pwd, null); mMoney = (TextView) mInputView.findViewById(R.id.input_money_count); mPwd = (EditText) mInputView.findViewById(R.id.input_pwd); } class OutputMoneyTask extends OutputMoneyRequest { @Override public void onPostExecute(String s) { ToastUtil.showMessage(R.string.output_success); ProgressDialogUtils.getInstance(MoneyOutputActivity.this).dismiss(); PreferencesUtils.setMyMoney(MoneyOutputActivity.this, mMoneyCount - Float.parseFloat(mEdtMoney.getText().toString())); EventBus.getDefault().post(new SnackBarEvent()); finish(); } @Override public void onErrorExecute(String error) { ProgressDialogUtils.getInstance(MoneyOutputActivity.this).dismiss(); ToastUtil.showMessage(R.string.output_faile); } } private void showVipDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.output_money_vip); builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Intent intent = new Intent(MoneyOutputActivity.this, VipCenterActivity.class); startActivity(intent); } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.show(); } private void showGoldDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.output_money_gold); builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Intent intent = new Intent(MoneyOutputActivity.this, MyGoldActivity.class); startActivity(intent); } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.show(); } }
[ "395044952@qq.com" ]
395044952@qq.com
e32e1c11fb771e36ee5a4fa5dd4550f3858467df
13c82eeb3d6caaa31d88b52429ea4239f54f30cd
/chap004/src/main/java/thisisjava/chap16_stream/sec12/_parallelism/MaleStudentExample.java
6048634b53f2d7a46fbb9793dd8964ce22148db9
[]
no_license
nekisse-lee/java_study
9d8c3735cc02c66a2c66210c4e3859727fee860c
b661a3b22e61e90f9134bc3d1229954c5672f024
refs/heads/master
2020-05-22T13:59:48.844596
2019-08-04T08:18:06
2019-08-04T08:18:06
186,373,107
0
0
null
null
null
null
UTF-8
Java
false
false
929
java
package thisisjava.chap16_stream.sec12._parallelism; import java.util.Arrays; import java.util.List; @SuppressWarnings("ALL") public class MaleStudentExample { public static void main(String[] args) { List<Student> totalList = Arrays.asList( new Student("홍길동", 10, Student.Sex.MALE), new Student("김수애", 6, Student.Sex.FEMALE), new Student("신용권", 10, Student.Sex.MALE), new Student("박수미", 6, Student.Sex.FEMALE) ); MaleStudent maleStudent = totalList.parallelStream() .filter(student -> student.getSex() == Student.Sex.MALE) .collect( () -> new MaleStudent(), (r, t) -> r.accumulate(t), (r1, r2) -> r1.combine(r2) ); maleStudent.getList().stream() .forEach(student -> System.out.println(student.getName())); } }
[ "lsh891224@gmail.com" ]
lsh891224@gmail.com
99092beab14f556c5f54506ef966d5d63c7f4b45
ebe37ebe51995d626a5228983a7347f7396d50e0
/Java Web Development Basics/Exam Preparation/Judge/src/main/java/service/ProblemServiceImpl.java
233961b91d0c3c56ae9c5c1bc7e352668e9580a3
[]
no_license
hristopanev/java-EE
542b7ee02c512cc97dcd0e4fb9cb6741d210b932
4feb8bb516ff5747e4d798bdadb5e142bacfabc5
refs/heads/master
2023-08-10T03:53:53.633323
2020-06-09T10:11:52
2020-06-09T10:11:52
206,050,870
1
0
null
2023-07-22T15:12:24
2019-09-03T10:25:38
HTML
UTF-8
Java
false
false
1,386
java
package service; import domain.entites.Problem; import domain.models.service.ProblemServiceModel; import org.modelmapper.ModelMapper; import repository.ProblemRepository; import javax.inject.Inject; import java.util.List; import java.util.stream.Collectors; public class ProblemServiceImpl implements ProblemService { private final ProblemRepository problemRepository; private final ModelMapper modelMapper; @Inject public ProblemServiceImpl(ProblemRepository problemRepository, ModelMapper modelMapper) { this.problemRepository = problemRepository; this.modelMapper = modelMapper; } @Override public ProblemServiceModel createProblem(ProblemServiceModel problemServiceModel) { return this.modelMapper .map(this.problemRepository .save(this.modelMapper.map(problemServiceModel, Problem.class)), ProblemServiceModel.class); } @Override public ProblemServiceModel getProblemById(String id) { return this.modelMapper.map(this.problemRepository.findById(id), ProblemServiceModel.class); } @Override public List<ProblemServiceModel> getAllProblems() { return this.problemRepository.findAll() .stream() .map(p -> this.modelMapper.map(p, ProblemServiceModel.class)) .collect(Collectors.toList()); } }
[ "hristopanef@gmail.com" ]
hristopanef@gmail.com
4d2ba38d5f18ad255148d4d9d241a818f0f1364c
4da2bb0c1fb189d8172e0210809063db5e59c079
/src/main/java/com/springmvc/utils/WX/WechatUtil.java
a48dcd98949b8cd33f84b781a9c6ff92cbda99cc
[]
no_license
liuwuxiang/property_app
59df70bcb2af4c8611e6c2a633836cbf52d9db58
08b35ff88511ba51aaf2638fa30c32cfb18fa421
refs/heads/master
2022-12-22T06:39:15.579385
2019-11-07T07:15:11
2019-11-07T07:15:11
220,174,067
0
0
null
2022-12-16T07:47:01
2019-11-07T07:12:08
Java
UTF-8
Java
false
false
1,164
java
package com.springmvc.utils.WX; import com.springmvc.utils.HttpRequest; import com.springmvc.utils.WechatEnterprisePay.WeChatConfig; import net.sf.json.JSONObject; import java.util.HashMap; import java.util.Map; public class WechatUtil { /* * 生成获取微信用户openid、refresh_token请求参数 * */ public static String obtainOpenIdParamts(String code){ String param = "appid="+WXPublicSettingUtil.appId+"&secret="+WXPublicSettingUtil.appSecret+"&code="+code+"&grant_type=authorization_code"; return param; } //获取公众号access_token public static String obtainAccessToken(){ String paramts = "grant_type=client_credential&appid="+ WXPublicSettingUtil.appId+"&secret="+WXPublicSettingUtil.appSecret; String data= HttpRequest.sendGet("https://api.weixin.qq.com/cgi-bin/token", paramts); JSONObject dataJson = JSONObject.fromObject(data); System.out.println("token获取结果:"+dataJson.toString()); if (dataJson.get("errcode") == null){ return (String)dataJson.get("access_token"); } else{ return null; } } }
[ "494775947@qq.com" ]
494775947@qq.com
d3c351ff85a7652a192d0733e8db486d5c9b5f3a
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/batik-1.7/sources/org/apache/batik/css/engine/value/InheritValue.java
82cb3b3ed7bc9902b4b6663c4b00e95cb0f3acbb
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false engine PACKAGE_IDENTIFIER false value PACKAGE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false CSSValue TYPE_IDENTIFIER false InheritValue TYPE_IDENTIFIER true AbstractValue TYPE_IDENTIFIER false InheritValue TYPE_IDENTIFIER false INSTANCE VARIABLE_IDENTIFIER true InheritValue TYPE_IDENTIFIER false InheritValue METHOD_IDENTIFIER false String TYPE_IDENTIFIER false getCssText METHOD_IDENTIFIER true getCssValueType METHOD_IDENTIFIER true CSSValue TYPE_IDENTIFIER false CSS_INHERIT VARIABLE_IDENTIFIER false String TYPE_IDENTIFIER false toString METHOD_IDENTIFIER true getCssText METHOD_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
5e35a4ab4244ffc47d556c896d16cc2024f1b66e
c8faad383c490a37d1109d3ce802fff49e8fa072
/src/main/java/org/springframework/data/solr/repository/support/SolrRepositoryFactoryBean.java
2a5a698df34d7e9ec72df2816a1c98d9b0d6a793
[ "Apache-2.0" ]
permissive
dynamicguy/spring-data-solr
7bb1a132a814e227c6862a56ea027acee2abe301
66140c4d3c2dcf0ba0dc4d818ce8228afc8ce73b
refs/heads/master
2021-08-28T15:52:31.026965
2012-10-03T03:54:44
2012-10-03T03:54:44
5,938,451
0
0
Apache-2.0
2021-08-16T20:15:16
2012-09-24T18:01:03
Java
UTF-8
Java
false
false
2,242
java
/* * Copyright 2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.solr.repository.support; import java.io.Serializable; import org.springframework.beans.factory.FactoryBean; import org.springframework.data.repository.Repository; import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import org.springframework.data.solr.core.SolrOperations; import org.springframework.util.Assert; /** * Spring {@link FactoryBean} implementation to ease container based configuration for XML namespace and JavaConfig. * * @author Oliver Gierke */ public class SolrRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends RepositoryFactoryBeanSupport<T, S, ID> { private SolrOperations operations; /** * Configures the {@link SolrOperations} to be used to create Solr repositories. * * @param operations the operations to set */ public void setSolrOperations(SolrOperations operations) { Assert.notNull(operations); this.operations = operations; } /* * (non-Javadoc) * @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createRepositoryFactory() */ @Override protected RepositoryFactorySupport createRepositoryFactory() { return new SolrRepositoryFactory(operations); } /* * (non-Javadoc) * @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#afterPropertiesSet() */ @Override public void afterPropertiesSet() { super.afterPropertiesSet(); Assert.notNull(operations, "SolrOperations must be configured!"); } }
[ "info@olivergierke.de" ]
info@olivergierke.de
7823c93e8aaeea9e203a262d346644bfb553767a
64eaf5bd1069f0bdffb4422d2b6285f41d5a2721
/desktop-admin/src/main/java/com/adstream/automate/babylon/swing/tree/UserEntry.java
dcbc4655b56cca27050fc2b49aa8d7aed2dc7727
[]
no_license
DevikaS/gdam
892f731c69ded3ee48474f3326f8d06d8f77e3f0
7ebd8f5059d88e8f7e34b463e3111fe2e090da21
refs/heads/master
2021-10-28T10:29:01.637709
2019-04-23T13:31:11
2019-04-23T13:31:11
183,001,214
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package com.adstream.automate.babylon.swing.tree; import com.adstream.automate.babylon.JsonObjects.User; /** * User: ruslan.semerenko * Date: 25.11.12 13:19 */ public class UserEntry { private User user; public UserEntry(User user) { this.user = user; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String toString() { return user.getEmail(); } }
[ "Devika.Subramanian@adstream.com" ]
Devika.Subramanian@adstream.com
d8a26b796bfbbe73cd468b73b2e2de91b4a111d0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_110ed4d6b5c53e00fc34d6e95537ace36785eeaa/ElementManipulator/14_110ed4d6b5c53e00fc34d6e95537ace36785eeaa_ElementManipulator_s.java
ef2ea22fb46423563e8f21efb00658502c396e42
[]
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,101
java
package com.ontometrics.scraper.extraction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ontometrics.scraper.TagOccurrence; import com.ontometrics.scraper.util.ScraperUtil; public class ElementManipulator extends Manipulator { private static final Logger log = LoggerFactory.getLogger(ElementManipulator.class); private TagOccurrence tagOccurrence; public ElementManipulator(TagOccurrence tagOccurrence) { this.tagOccurrence = tagOccurrence; } @Override public String performExtraction() { return extractTag(); } private String extractTag() { String extraction = null; if (tagOccurrence.getMatching() != null) { extraction = ScraperUtil.extractTagMatching(getSource().toString(), tagOccurrence); log.debug("result of matching: {}", extraction); } else { extraction = ScraperUtil.extract(getSource().toString(), tagOccurrence.getTag(), tagOccurrence.getOccurrence()); } return extraction; } @Override public void setMatcher(String matcher) { this.tagOccurrence.setMatcher(matcher); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e5a7abb25c723e0e594adc73ec1db32f1980b87e
7d7d2093dda33095ad3e95c48eeac4ef2724751c
/src/com/siwuxie095/designpattern/category/chapter9th/example5th/Main.java
d1ddecb98b92d21af76f2a2bd840b8f680d34785
[]
no_license
siwuxie095/DesignPattern
8cf0f7ad6591b9574dc950099ba2df05ac317eeb
1f31e6e0277a068a096fe9dbef5c44b18999b7e8
refs/heads/master
2020-07-02T14:55:51.576373
2019-11-12T05:56:13
2019-11-12T05:56:13
201,562,114
0
0
null
null
null
null
UTF-8
Java
false
false
8,552
java
package com.siwuxie095.designpattern.category.chapter9th.example5th; /** * @author Jiajing Li * @date 2019-11-06 16:48:00 */ public class Main { /** * 迭代器模式 * * 提供了一种方法顺序访问一个聚合对象中的各个元素,而又不暴露 * 其内部的表示。 * * * 迭代器模式让我们能游走于聚合内的每一个元素,而又不暴露其内部 * 的表示。把游走的任务放在迭代器上,而不是聚合上。这样简化了聚 * 合的接口和实现,也让责任各得其所。 * * 这很有意义:这个模式给你提供了一种方法,可以顺序访问一个聚合 * 对象中的元素,而又不用知道内部是如何表示的。在之前的例子中可 * 以看到这一点,在设计中使用迭代器的影响是明显的:如果你有一个 * 统一的方法访问聚合中的每一个对象,你就可以编写多态的代码和这 * 些聚合搭配使用。 * * 另一个对设计造成重要影响的,是迭代器模式把在元素之间游走的责 * 任交给迭代器,而不是聚合对象。这不仅让聚合的接口和实现变得更 * 简洁,也可以让聚合更专注在它应该专注的事情上面(即 管理对象 * 集合),而不必去理会遍历的事情。 * * * 疑问与解答 * * 问: * 我看到其他书上让迭代器类提供一些方法叫做 first()、next()、 * isDone() 和 currentItem()。为什么这些方法不一样? * 答: * 这些是 "经典" 的方法名称,它们随着时间的流逝渐渐改变了,而 * 现在在 Java 自带的 Iterator 中所使用的名称有 next()、 * hasNext() 甚至 remove()。 * 不妨看看这些经典的方法。next() 和 currentItem() 实际上 * 被合并成了 Iterator 中的 next()。isDone() 变成了 Iterator * 中的 hasNext()。至于 first() 则不存在对应,这是在 Java * 中,更倾向于取得一个新的迭代器,而不是让目前的迭代器跳到一 * 开始的位置。所以,其实这些接口没什么太大的差异。事实上,你 * 可以在自己的迭代器内部加上许多的方法,例如 remove()。 * * 问: * 我听说 "内部的" 迭代器和 "外部的" 迭代器。这是什么?在前面 * 的例子中实现的是哪一种? * 答: * 实现的是外部的迭代器,也就是说,客户通过调用 next() 取得下 * 一个元素。而内部的迭代器则是由迭代器自己控制。在这种情况下, * 因为是由迭代器自行在元素之间游走,所以你必须告诉迭代器在游 * 走的过程中,要做什么事情,也就是说,你必须将操作传给迭代器。 * 因为客户无法控制遍历的过程,所以内部迭代器比外部迭代器更没 * 有弹性。然而,某些人可能认为内部的迭代器比较容易使用,因为 * 只需将操作告诉它,它就会帮你做完所有事情。 * * 问: * 迭代器可以被实现成向后(向左)移动吗,就像向前(向右)移动 * 一样? * 答: * 绝对可以。在这样的情况下,你可能要加上两个方法,一个方法取 * 得前一个元素,而另一个方法告诉你是否已经到了集合的最前端。 * Java 的 Collection Framework 提供了另一种迭代器接口, * 称为 ListIterator。这个迭代器在标准的迭代器接口上多加了 * 一个 hasPrevious() 和 previous() 以及一些其他的方法。 * 任何实现了 List 接口的集合,都支持这样的做法。 * * 问: * 对于散列表这样的集合,元素之间并没有明显的次序关系,该怎么办? * 答: * 迭代器意味着没有次序。只是取出所有的元素,并不表示取出元素的 * 先后就代表元素的大小次序。对于迭代器来说,数据结构可以是有次 * 序的,或是没有次序的,甚至数据可以是重复的。除非某个集合的文 * 件有特别说明,否则不可以对迭代器所取出的元素大小顺序作出假设。 * * 问: * 你说可以用迭代器写出 "多态的代码",可以再多做一些解释吗? * 答: * 当写了一个需要以迭代器当作参数的方法时,其实就是在使用多态的 * 迭代器。也就是说,所写出的代码,可以在不同的集合中游走,只要 * 这个集合支持迭代器即可。我们不在乎这个集合是如何被实现的,但 * 依然可以编程在它内部的元素之间游走。 * * 问: * 如果我使用 Java,不见得总是要利用 Java 自带的迭代器,可能 * 想要使用自己的迭代器实现,和这些已经使用 Java 自带的迭代器 * 的类进行整合,这做得到吗? * 答: * 或许可以吧。如果你有一个通用的迭代器接口,那么让你自己的集合 * 和 Java 的集合(如:List、Vector)混合使用就会比较容易。 * 但是请记住,如果你需要在自己的迭代器接口为你的集合新增功能, * 你可以随时扩展迭代器接口。 * * 问: * 我看到 Java 有一个 Enumeration (枚举器)接口,它实现了 * 迭代器模式吗? * 答: * Enumeration 其实是一个有次序的迭代器实现,它有两个方法, * hasMoreElements() 类似 hasNext(),而 nextElement() * 类似 next()。然而你应该比较想使用迭代器,而不是枚举器, * 因为大多数的 Java 类支持的都是迭代器。如果你想把二者互相 * 转换,可以通过适配器模式来进行。 * * * * 九个 OO 原则之第九个设计原则: * 一个类应该只有一个引起变化的原因 * * 也称 单一职责(责任)原则 * * * 如果允许这里的聚合实现它们内部的集合,以及相关的操作和遍历的方法, * 又会如何?已经知道,这会增加聚合中的方法个数,但又怎样?为什么这 * 么做不好? * 这是因为,当允许一个类不但要完成自己的事情(管理相关操作),还同 * 时要担负更多的责任(遍历)时,就给了这个类两个变化的原因。 * 即 如果这个集合改变改变的话,这个类也必须改变。如果遍历的方式改变 * 的话,这个类也必须跟着改变。 * 所以,老朋友 "改变" 又成了设计原则的中心。 * * 显然,应该要避免类内的改变,因为修改代码很容易造成许多潜在的错误。 * 如果有一个类具有两个改变的原因,那么这会使得将来该类的变化机率上 * 升,而当它真的改变时,你的设计中同时有两个方面将会受到影响。 * 要如何解决呢?这个原则告诉我们将一个责任只指派给一个类。但这听起 * 来容易,但做起来却并不简单:区分设计中的责任,是最困难的事情之一。 * 因为大脑很习惯看着一大群行为,然后将它们集中在一起,尽管它们可能 * 属于两个或多个不同的责任。想要成功的方法,就是努力不懈地检查你的 * 设计,随着系统的成长,随时观察有没有迹象显示某个类改变的原因超过 * 一个。 * * 类的每个责任都有改变的潜在区域。超过一个责任,意味着超过一个改变 * 的区域。所以,尽量让每个类保持单一责任。 * * * 内聚(cohesion) * * 内聚用来度量一个类或模块紧密地达到单一目的或责任。 * * 当一个类或模块被设计成只支持一组相关的功能时,就说它具有高内聚; * 反之,当被设计成支持一组不相关的功能时,就说它具有低内聚。 * * 内聚是一个比单一责任原则更普遍的概念,但两者其实关系是很密切的。 * 遵守这个原则的类容易具有很高的凝聚力,而且比背负许多责任的低内聚 * 类更容易维护。 */ public static void main(String[] args) { Aggregate aggregate = new ConcreteAggregate(); Client client = new Client(aggregate); client.doSomething(); } }
[ "834879583@qq.com" ]
834879583@qq.com
b7c243f0861ab748a56a5f61ca97c42ea4129870
2ec51ec7a480bc82217ba067b055a932f3f9736a
/src/com/yale/test/springmvc/i18n/web/MvcInterceptor.java
9d3eea3ee082defc90b1adccd5195e088a9ba949
[]
no_license
gitking/JavaDemoStudyProject
03eae3ced81d81330a96d4f87a29c5d11db63686
072b2155a2da92d59168a6b73ae4ad045d9d28c0
refs/heads/master
2022-05-20T14:24:57.408102
2022-03-27T13:45:03
2022-03-27T13:45:03
100,861,539
0
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.yale.test.springmvc.i18n.web; import java.util.Locale; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.MessageSource; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.ModelAndView; /* * 不要忘了在WebMvcConfigurer中注册MvcInterceptor。现在,就可以在View中调用MessageSource.getMessage()方法来实现多语言: */ @Component public class MvcInterceptor implements HandlerInterceptor{ @Autowired LocaleResolver localeResolver; @Autowired @Qualifier("i18n")// 注意注入的MessageSource名称是i18n: MessageSource messageSource; @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { if (modelAndView != null) { // 解析用户的Locale: Locale locale = localeResolver.resolveLocale(request); // 放入Model: modelAndView.addObject("__messageSource__", messageSource); modelAndView.addObject("__locale__", locale); } } }
[ "yale268sh@163.com" ]
yale268sh@163.com
17104af4cc612e3ee25e30940878ad545111c1a3
19156214d3c456e7aa9b34183a928ef144b3c206
/src/test-suite-dependencies/geotk-xml-gml-3.21-sources/src/main/java/org/geotoolkit/gml/xml/v321/SurfacePatchArrayPropertyType.java
aa34e7951c60abc0b4c120c2fc12f9090152d49c
[]
no_license
opengeospatial/teamengine-offline
85549dbab9ff681c4f6b09dfabce1e4b85ce4206
6b81fc3fc4647e8f68ba433701199b0e68fc36d2
refs/heads/master
2021-01-01T19:24:08.817030
2014-12-18T17:35:06
2014-12-18T17:35:06
21,212,109
0
0
null
null
null
null
UTF-8
Java
false
false
3,653
java
/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2012, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.gml.xml.v321; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * gml:SurfacePatchArrayPropertyType is a container for a sequence of surface patches. * * <p>Java class for SurfacePatchArrayPropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SurfacePatchArrayPropertyType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence maxOccurs="unbounded" minOccurs="0"> * &lt;element ref="{http://www.opengis.net/gml/3.2}AbstractSurfacePatch"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SurfacePatchArrayPropertyType", propOrder = { "abstractSurfacePatch" }) public class SurfacePatchArrayPropertyType { @XmlElementRef(name = "AbstractSurfacePatch", namespace = "http://www.opengis.net/gml/3.2", type = JAXBElement.class) private List<JAXBElement<? extends AbstractSurfacePatchType>> abstractSurfacePatch; /** * Gets the value of the abstractSurfacePatch property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the abstractSurfacePatch property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAbstractSurfacePatch().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link AbstractParametricCurveSurfaceType }{@code >} * {@link JAXBElement }{@code <}{@link PolygonPatchType }{@code >} * {@link JAXBElement }{@code <}{@link SphereType }{@code >} * {@link JAXBElement }{@code <}{@link ConeType }{@code >} * {@link JAXBElement }{@code <}{@link RectangleType }{@code >} * {@link JAXBElement }{@code <}{@link TriangleType }{@code >} * {@link JAXBElement }{@code <}{@link CylinderType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSurfacePatchType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractGriddedSurfaceType }{@code >} * * */ public List<JAXBElement<? extends AbstractSurfacePatchType>> getAbstractSurfacePatch() { if (abstractSurfacePatch == null) { abstractSurfacePatch = new ArrayList<JAXBElement<? extends AbstractSurfacePatchType>>(); } return this.abstractSurfacePatch; } }
[ "rjmartell@computer.org" ]
rjmartell@computer.org
00d7141030d5d6a2e4be1ea6923c86728423c7ea
9ffdeedbb966e25ae8f46045a4cd5fd4c4fdd71a
/fupin_2_0/src/main/java/com/roch/fupin/dialog/NormalDailog.java
1c8a38215c853c453a4c66440a68f5312c2abaad
[]
no_license
gugj/FuPin_2_0_TongLiao
ef6bc04356924411ed937b1f357eface1f06a5ab
6bad2ea4550fb1d4349bd2a7ad34adfa40eb3eae
refs/heads/master
2021-01-22T21:13:10.083617
2017-08-18T06:25:32
2017-08-18T06:25:32
100,679,481
1
0
null
null
null
null
UTF-8
Java
false
false
4,868
java
package com.roch.fupin.dialog; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.WindowManager.LayoutParams; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.roch.fupin_2_0.R; public class NormalDailog extends Dialog { private android.view.View.OnClickListener mOnClick; private TextView content, title,tv_dingwei_location,tv_old_location,tv_qiandao_count; private Button doneBtn, cancelBtn,xiugaiBtn; LinearLayout doneBtnLayout; private int layout_type; public NormalDailog(Context context) { super(context); } public NormalDailog(Context context, int theme) { super(context, theme); } /** * * @param context 上下文 * @param theme 主体 * @param layout_type dialog弹窗口布局类型,如果为3,即为修改、删除、取消按钮布局,否则为确定、取消按钮布局;如果为4, * 即为自定义的可以显示位置信息的布局 */ public NormalDailog(Context context, int theme,int layout_type) { super(context, theme); this.layout_type=layout_type; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(3==layout_type){ setContentView(R.layout.widget_normal_dialog_3); }else if(4==layout_type){ setContentView(R.layout.widget_normal_dialog_zidingyi); } else { setContentView(R.layout.widget_normal_dialog); } // 使dialog全局 getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); initViews(); } //dialog 控件初始化 private void initViews() { title = (TextView) findViewById(R.id.product_search_dialog_title); content = (TextView) findViewById(R.id.normal_dialog_content); doneBtn = (Button) findViewById(R.id.normal_dialog_done); cancelBtn = (Button) findViewById(R.id.normal_dialog_cancel); if(3==layout_type){ xiugaiBtn = (Button) findViewById(R.id.normal_dialog_xiugai); }else if(4==layout_type){ tv_dingwei_location = (TextView) findViewById(R.id.tv_dingwei_location); tv_old_location = (TextView) findViewById(R.id.tv_old_location); tv_qiandao_count = (TextView) findViewById(R.id.tv_qiandao_count); } } /** * 按钮点击事件 * @param l */ public void setOnClickLinener(android.view.View.OnClickListener l) { this.mOnClick = l; doneBtn.setOnClickListener(mOnClick); cancelBtn.setOnClickListener(mOnClick); if(3==layout_type){ xiugaiBtn.setOnClickListener(mOnClick); } } /** * 设置title 文字 * @param text */ public void setTitleText(String text) { title.setText(text); } /** * 设置dialog提示内容,如果是自定义的,即设置签到的时间 * @param text */ public void setContentText(String text) { content.setText(text); } /** * 设置当前定位的位置信息 * @param text */ public void setLocationText(String text) { tv_dingwei_location.setText(text); } /** * 设置服务器保存的定位的位置信息 * @param text */ public void setNetLocationText(String text) { tv_old_location.setText(text); } /** * 设置服务器保存的已签到次数 * @param text */ public void setQiaoDaoCount(String text) { tv_qiandao_count.setText(text); } /** * 设置dialog提示内容 颜色 * * @param color */ public void setContentTextColor(int color) { content.setTextColor(color); } /** * 设置完成按钮文字描述 * @param text */ public void setDoneButtonText(String text) { doneBtn.setText(text); } /** * 设置取消按钮文字描述 * @param text */ public void setCancelButtonText(String text) { cancelBtn.setText(text); } /** * 设置确定按钮隐藏 or 显示 * @param visibility */ public void setDoneBtnVisible(int visibility) { //doneBtnLayout.setVisibility(visibility); doneBtn.setVisibility(visibility); } /** * 设置取消按钮隐藏 or 显示 * @param visibility */ public void setCancelVisible(int visibility) { //doneBtnLayout.setVisibility(visibility); cancelBtn.setVisibility(visibility); } public void setCancelBtnText(String text) { cancelBtn.setText(text); } public void setDoneBtnText(String text) { doneBtn.setText(text); } }
[ "qqdongshao123@126.com" ]
qqdongshao123@126.com
503fe3603fbca91e35ddc90871834f165ddb2adb
3f8832413754de2a0de7369adca147b9e9a3f297
/src/main/java/com/github/taktos/dbflute/dao/exbhv/MemberAddressBhv.java
bbbd75a14b47670d952b164b5fa9fdfc7ebf38fb
[]
no_license
taktos/dbflute-cache
085e907cdb5649c6d44dc3043b2a726429f890f6
73c12e7a73192ef81348c6497bfdecb80333b1cb
refs/heads/master
2021-01-20T05:58:24.398496
2012-03-19T01:43:34
2012-03-20T14:25:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package com.github.taktos.dbflute.dao.exbhv; import com.github.taktos.dbflute.dao.bsbhv.BsMemberAddressBhv; /** * The behavior of MEMBER_ADDRESS. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class MemberAddressBhv extends BsMemberAddressBhv { }
[ "taktos@gmail.com" ]
taktos@gmail.com
e2b6a55dde057fd5241de29bcba372e15fc72cc2
1c58f6ea07d10898b2b3ec776aa87086712c035f
/src/consulo/unity3d/module/Unity3dChildModuleExtension.java
5046b9f9de3b26f35861ea50a1c0f75f56ce57b0
[ "Apache-2.0" ]
permissive
CaiusPeng/consulo-unity3d
861111508b44d1e727c8a8db263c77bf578d888d
e11893e92ceafca0f41a04f09bc277656250e7a1
refs/heads/master
2021-01-21T20:46:26.756833
2017-05-18T11:34:03
2017-05-18T11:34:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,571
java
/* * Copyright 2013-2016 consulo.io * * 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 consulo.unity3d.module; import java.util.Collections; import java.util.List; import java.util.Map; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.projectRoots.SdkType; import com.intellij.openapi.roots.OrderRootType; import com.intellij.util.ArrayUtil; import consulo.annotations.RequiredReadAction; import consulo.dotnet.module.DotNetNamespaceGeneratePolicy; import consulo.module.extension.ModuleInheritableNamedPointer; import consulo.module.extension.impl.ModuleExtensionImpl; import consulo.roots.ModuleRootLayer; /** * @author VISTALL * @since 29.03.2015 */ public class Unity3dChildModuleExtension extends ModuleExtensionImpl<Unity3dChildModuleExtension> implements Unity3dModuleExtension<Unity3dChildModuleExtension> { public Unity3dChildModuleExtension(@NotNull String id, @NotNull ModuleRootLayer moduleRootLayer) { super(id, moduleRootLayer); } @NotNull @Override @RequiredReadAction public DotNetNamespaceGeneratePolicy getNamespaceGeneratePolicy() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getNamespaceGeneratePolicy(); } return UnityNamespaceGeneratePolicy.INSTANCE; } @NotNull @Override public ModuleInheritableNamedPointer<Sdk> getInheritableSdk() { return EmptyModuleInheritableNamedPointer.empty(); } @Nullable @Override public Sdk getSdk() { return null; } @Nullable @Override public String getSdkName() { return null; } @NotNull @Override public Class<? extends SdkType> getSdkTypeClass() { throw new UnsupportedOperationException("Use root module extension"); } @Override @RequiredReadAction @NotNull public List<String> getVariables() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getVariables(); } return Collections.emptyList(); } @Override public boolean isSupportCompilation() { return false; } @NotNull @Override @RequiredReadAction public Map<String, String> getAvailableSystemLibraries() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getAvailableSystemLibraries(); } return Collections.emptyMap(); } @NotNull @Override @RequiredReadAction public String[] getSystemLibraryUrls(@NotNull String name, @NotNull OrderRootType orderRootType) { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getSystemLibraryUrls(name, orderRootType); } return ArrayUtil.EMPTY_STRING_ARRAY; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
f922ff48f37f0706ad141a96c889ec5eb7644255
01a4ded83ae5539af30c7418ab1ac38a98aa18f8
/jaxrs-scale/jaxrs-scale-dmv-war6/src/test/java/ejava/examples/jaxrsscale/dmv/client/ApproveApplicationAction.java
30a2a0b609bbaae48ed01cd35cac89feed2a7134
[]
no_license
DeepaBC/war-project
3a549221605bb68e6e81b8ef6549ef7deaf03de0
e8965a203b456b63e322a9dbb7519052779653ce
refs/heads/master
2020-04-30T21:08:50.751285
2012-12-12T16:40:29
2012-12-12T16:40:29
177,087,610
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package ejava.examples.jaxrsscale.dmv.client; import ejava.examples.jaxrsscale.dmv.lic.dto.Application; /** * This class implements the approval of a DMV application. */ public class ApproveApplicationAction extends PutApplicationAction { public Application approve() { return super.put(null); } }
[ "jcstaff@apl.jhu.edu" ]
jcstaff@apl.jhu.edu
a97ec932ee891fba9fc6348820318ac32864ea22
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
/src/za/co/mmagon/jwebswing/plugins/bootstrap/forms/groups/sets/BSFormSetChildren.java
cceb612f872eeb9908fd2a6c40661a2803bad1c0
[]
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
960
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.bootstrap.forms.groups.sets; import za.co.mmagon.jwebswing.base.html.interfaces.GlobalChildren; /** * * @author Marc Magon * @since 07 Aug 2015 * @version 1.0 */ public interface BSFormSetChildren extends GlobalChildren { }
[ "ged_marc@hotmail.com" ]
ged_marc@hotmail.com
28f2716d17bf6a829e8ca4b1a571ce95605cb915
da5a2d2050ac529a19e14a8ea3f9f21714cc2b5d
/app/src/main/java/rx/exceptions/CompositeException$WrappedPrintStream.java
0b5b4f376276d34881445b2563694eff68a5162e
[]
no_license
F0rth/Izly
851bf22e53ea720fd03f03269d015efd7d8de5a4
89af45cedfc38e370a64c9fa341815070cdf49d6
refs/heads/master
2021-07-17T15:39:25.947444
2017-10-21T10:05:58
2017-10-21T10:05:58
108,004,099
1
1
null
2017-10-23T15:51:00
2017-10-23T15:51:00
null
UTF-8
Java
false
false
461
java
package rx.exceptions; import java.io.PrintStream; class CompositeException$WrappedPrintStream extends CompositeException$PrintStreamOrWriter { private final PrintStream printStream; CompositeException$WrappedPrintStream(PrintStream printStream) { super(); this.printStream = printStream; } Object lock() { return this.printStream; } void println(Object obj) { this.printStream.println(obj); } }
[ "baptiste.robert@sigma.se" ]
baptiste.robert@sigma.se
4f83849d8b551c5cd955ec47259394eb8f7ed309
14f4c680c4f71663efabdafa8ebc2d709e40436f
/src/main/java/gradle/demo/dao/CourseMapper.java
b50d57101659d78c5a144a9c350015d7a223dd87
[ "Apache-2.0" ]
permissive
Vip-Augus/gradle-demo
22fc55442150f07471f6f8d914fe1eb69715b592
b790d449241d4b406e123d9375a9af49f5847c84
refs/heads/master
2021-04-09T15:44:56.874049
2019-09-22T15:21:07
2019-09-22T15:21:07
125,706,060
1
2
null
null
null
null
UTF-8
Java
false
false
1,027
java
package gradle.demo.dao; import gradle.demo.base.BaseMapperTemplate; import gradle.demo.model.Course; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @author JingQ on 2017/12/24. */ @Mapper public interface CourseMapper extends BaseMapperTemplate<Course> { /** * 批量查询 * * @param ids 课程ID列表 * @return 课程列表 */ List<Course> selectByIds(@Param("ids") List<Integer> ids); /** * 查询室使用情况--正在上的课 * * @param classroomId 室ID * @param day 周几 * @param currentTime 当前时间 * @return */ List<Course> selectInUseByClassroomId(@Param("classroomId") Integer classroomId, @Param("day") Integer day, @Param("currentTime") String currentTime); /** * 根据识别码进行课程查询 * * @param code 课程识别码 * @return 课程信息 */ Course selectByCode(@Param("code") String code); }
[ "850366301@qq.com" ]
850366301@qq.com
4262a0cff9535ca1070e3510621a11264afdfb30
09dcc67c72e2bd8e3f26edeb7602fffeceac7f5c
/src/test/java/me/sangmessi/soccer/index/IndexControllerTest.java
6dda7c36ddde6ce700a4fc67d87fb1fea39b1b3f
[]
no_license
messi1913/soccer
93751029e3bc12c1ea3a209669c2915eb4c83079
c43b932e6d58bb1fc83fe4ace7e8e3958353f75f
refs/heads/master
2020-04-17T14:51:43.840056
2019-01-20T15:09:28
2019-01-20T15:09:28
166,674,723
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package me.sangmessi.soccer.index; import me.sangmessi.soccer.common.BaseControllerTest; import org.junit.Test; import static org.junit.Assert.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; public class IndexControllerTest extends BaseControllerTest { @Test public void index() throws Exception { this.mockMvc.perform(get("/api/")) .andExpect(status().isOk()) .andExpect(jsonPath("_links.accounts").exists()) ; } }
[ "messi1913@gmail.com" ]
messi1913@gmail.com
d9f5b4ebb961453a68ae8abe022f0d0008908417
4fd380b338cab14efa9508f54c443cefb1e5e5ff
/spf4j-core/src/main/java/org/spf4j/io/ObjectAppenderSupplier.java
b604c894746cde72d674d98107a4d87649479e83
[]
no_license
josecarloscanova/spf4j
73f576ec990844c52194bf0f14104a8c96396ffb
f9113225ef8ce58ea7fa3e88deae3bebaf223b38
refs/heads/master
2020-12-03T03:51:48.970722
2017-06-23T16:09:41
2017-06-23T16:09:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,344
java
/* * Copyright (c) 2001, Zoltan Farkas All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser 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 org.spf4j.io; import javax.annotation.Nonnull; import javax.annotation.ParametersAreNonnullByDefault; /** * * @author zoly */ @ParametersAreNonnullByDefault public interface ObjectAppenderSupplier { @Nonnull <T> ObjectAppender<? super T> get(Class<T> type); ObjectAppenderSupplier TO_STRINGER = new ObjectAppenderSupplier() { @Override public <T> ObjectAppender<T> get(final Class<T> type) { return (ObjectAppender<T>) ObjectAppender.TOSTRING_APPENDER; } }; }
[ "zolyfarkas@yahoo.com" ]
zolyfarkas@yahoo.com
8f4a7fd0922c0983589525b40bb2b37b7de1b7ab
d436fade2ee33c96f79a841177a6229fdd6303b7
/com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_Blindness.java
8425c79d1a1453dc20da29c873cce6d49424c644
[ "Apache-2.0" ]
permissive
SJonesy/UOMUD
bd4bde3614a6cec6fba0e200ac24c6b8b40a2268
010684f83a8caec4ea9d38a7d57af2a33100299a
refs/heads/master
2021-01-20T18:30:23.641775
2017-05-19T21:38:36
2017-05-19T21:38:36
90,917,941
0
0
null
null
null
null
UTF-8
Java
false
false
4,503
java
package com.planet_ink.coffee_mud.Abilities.Prayers; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2017 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Prayer_Blindness extends Prayer { @Override public String ID() { return "Prayer_Blindness"; } private final static String localizedName = CMLib.lang().L("Blindness"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Blindness)"); @Override public String displayText() { return localizedStaticDisplay; } @Override protected int canAffectCode(){return Ability.CAN_MOBS;} @Override protected int canTargetCode(){return Ability.CAN_MOBS;} @Override public int classificationCode(){return Ability.ACODE_PRAYER|Ability.DOMAIN_CORRUPTION;} @Override public int abstractQuality(){ return Ability.QUALITY_MALICIOUS;} @Override public long flags(){return Ability.FLAG_UNHOLY;} @Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected,affectableStats); if(affected==null) return; if(!(affected instanceof MOB)) return; affectableStats.setSensesMask(affectableStats.sensesMask()|PhyStats.CAN_NOT_SEE); } @Override public void unInvoke() { // undo the affects of this spell if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; super.unInvoke(); if((canBeUninvoked())&&(CMLib.flags().canSee(mob))) mob.tell(L("Your vision returns.")); } @Override public int castingQuality(MOB mob, Physical target) { if(mob!=null) { if(target instanceof MOB) { if(((MOB)target).charStats().getBodyPart(Race.BODY_EYE)==0) return Ability.QUALITY_INDIFFERENT; if(!CMLib.flags().canSee((MOB)target)) return Ability.QUALITY_INDIFFERENT; } } return super.castingQuality(mob,target); } @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if((!auto)&&(target.charStats().getBodyPart(Race.BODY_EYE)==0)) { mob.tell(L("@x1 has no eyes, and would not be affected.",target.name(mob))); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,-((target.charStats().getStat(CharStats.STAT_WISDOM)*2)),auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto)|CMMsg.MASK_MALICIOUS,auto?"":L("^S<S-NAME> invoke(s) an unholy blindness upon <T-NAMESELF>.^?")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); if(msg.value()<=0) { mob.location().show(target,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> go(es) blind!")); maliciousAffect(mob,target,asLevel,0,-1); } } } else return maliciousFizzle(mob,target,L("<S-NAME> attempt(s) to blind <T-NAMESELF>, but flub(s) it.")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
0b26f775a0dd3b142aee01e98ec3ddd0f19c2e67
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-6-8-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/extension/xar/internal/handler/packager/DocumentMergeImporter_ESTest_scaffolding.java
6f588b591cee1b0d66c6385976aa0bf9f7dbb3b1
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Apr 06 03:55:09 UTC 2020 */ package org.xwiki.extension.xar.internal.handler.packager; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DocumentMergeImporter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a7ff405ac8ea8af3d73cc3425224b8076dfcac0e
c95b26c2f7dd77f5e30e2d1cd1a45bc1d936c615
/azureus-core/src/main/java/org/gudy/azureus2/core3/tracker/protocol/udp/PRUDPPacketReplyScrape.java
9ef7f122ebaa8e183f5b9ff54d5be956dfb42541
[]
no_license
ostigter/testproject3
b918764f5c7d4c10d3846411bd9270ca5ba2f4f2
2d2336ef19631148c83636c3e373f874b000a2bf
refs/heads/master
2023-07-27T08:35:59.212278
2023-02-22T09:10:45
2023-02-22T09:10:45
41,742,046
2
1
null
2023-07-07T22:07:12
2015-09-01T14:02:08
Java
UTF-8
Java
false
false
3,460
java
/* * File : PRUDPPacketReplyScrape.java * Created : 21-Jan-2004 * By : parg * * Azureus - a Java Bittorrent client * * 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 ( see the LICENSE file ). * * 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 org.gudy.azureus2.core3.tracker.protocol.udp; /** * @author parg * */ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import com.aelitis.net.udp.uc.PRUDPPacketReply; public class PRUDPPacketReplyScrape extends PRUDPPacketReply { // protected int interval; protected static final int BYTES_PER_ENTRY = 32; protected byte[][] hashes; protected int[] complete; protected int[] incomplete; protected int[] downloaded; public PRUDPPacketReplyScrape(int trans_id) { super(PRUDPPacketTracker.ACT_REPLY_SCRAPE, trans_id); } protected PRUDPPacketReplyScrape(DataInputStream is, int trans_id) throws IOException { super(PRUDPPacketTracker.ACT_REPLY_SCRAPE, trans_id); // interval = is.readInt(); hashes = new byte[is.available() / BYTES_PER_ENTRY][]; complete = new int[hashes.length]; incomplete = new int[hashes.length]; downloaded = new int[hashes.length]; for (int i = 0; i < hashes.length; i++) { hashes[i] = new byte[20]; is.read(hashes[i]); complete[i] = is.readInt(); downloaded[i] = is.readInt(); incomplete[i] = is.readInt(); } } /* * public void setInterval( int value ) { interval = value; } public int getInterval() { return( interval ); } */ public void setDetails(byte[][] _hashes, int[] _complete, int[] _downloaded, int[] _incomplete) { hashes = _hashes; complete = _complete; downloaded = _downloaded; incomplete = _incomplete; } public byte[][] getHashes() { return (hashes); } public int[] getComplete() { return (complete); } public int[] getDownloaded() { return (downloaded); } public int[] getIncomplete() { return (incomplete); } public void serialise(DataOutputStream os) throws IOException { super.serialise(os); // os.writeInt( interval ); if (hashes != null) { for (int i = 0; i < hashes.length; i++) { os.write(hashes[i]); os.writeInt(complete[i]); os.writeInt(downloaded[i]); os.writeInt(incomplete[i]); } } } public String getString() { return (super.getString().concat("[hashes=").concat(String.valueOf(hashes.length)).concat("]")); // return( super.getString() + "[interval=" + interval + ", hashes=" + hashes.length + "]" ); } }
[ "oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b" ]
oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b
ee47a87a232623616c541e3d4d2949d259d5176c
f41bdbc59cb6f1f48d6520a93f517fd44f83f153
/net/minecraft/enchantment/EnchantmentOxygen.java
ae8e0c518e6324438d13a3f01d75853b71a616ae
[ "MIT" ]
permissive
BantorSchwanzVor/plotscanner-leak
f9ec02b2538fe51af94cfc807c7beb3ef158f106
cbf130076159711d939affb4b0343c46c3466107
refs/heads/master
2021-05-20T12:02:47.993998
2020-04-01T21:23:59
2020-04-01T21:23:59
252,285,321
0
0
null
null
null
null
UTF-8
Java
false
false
808
java
package net.minecraft.enchantment; import net.minecraft.inventory.EntityEquipmentSlot; public class EnchantmentOxygen extends Enchantment { public EnchantmentOxygen(Enchantment.Rarity rarityIn, EntityEquipmentSlot... slots) { super(rarityIn, EnumEnchantmentType.ARMOR_HEAD, slots); setName("oxygen"); } public int getMinEnchantability(int enchantmentLevel) { return 10 * enchantmentLevel; } public int getMaxEnchantability(int enchantmentLevel) { return getMinEnchantability(enchantmentLevel) + 30; } public int getMaxLevel() { return 3; } } /* Location: C:\Users\BSV\AppData\Local\Temp\Rar$DRa6216.20396\Preview\Preview.jar!\net\minecraft\enchantment\EnchantmentOxygen.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "germangamera@gmail.com" ]
germangamera@gmail.com
10df5aab2cec1a5687e03aebee19ac0d94ea8ef6
a005511a1f406a96a99e296cf4ee0287f8309362
/listview3/src/main/java/com/imooc/demo/app/listview/ChatActivity.java
085dddbe0c7be170679d97e110c824eb2c9b755a
[]
no_license
johnYin2015/NetPopulateFramework
6544c8752a8a0f663dc03afe7200a57e05073619
3b5ae9446034be92e2bf28ee07e588147a53eef2
refs/heads/master
2020-06-16T05:27:24.720368
2020-03-19T12:59:50
2020-03-19T12:59:50
195,490,580
1
1
null
null
null
null
UTF-8
Java
false
false
4,941
java
package com.imooc.demo.app.listview; import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.imooc.demo.R; import com.imooc.demo.model.ChatMessage; import java.util.ArrayList; import java.util.List; /** * Function: * Create date on 16/8/13. * * @author Conquer * @version 1.0 */ public class ChatActivity extends AppCompatActivity { private ListView mListView; List<ChatMessage> mChatMessages = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mListView = (ListView) findViewById(R.id.list_view_demo); ChatMessage chatMessage = new ChatMessage(1,2,"刘小明","8:20","你好吗","","",true); ChatMessage chatMessage2 = new ChatMessage(2,1,"小军","8:21","我很好","","",false); ChatMessage chatMessage3 = new ChatMessage(1,2,"刘小明","8:22","今天天气怎么样","","",true); ChatMessage chatMessage4 = new ChatMessage(2,1,"小军","8:23","热成狗了","","",false); mChatMessages.add(chatMessage); mChatMessages.add(chatMessage2); mChatMessages.add(chatMessage3); mChatMessages.add(chatMessage4); mListView.setAdapter(new ChatMessageAdapter(this, mChatMessages)); } public static class ChatMessageAdapter extends BaseAdapter { public interface IMessageViewType { int COM_MESSAGE = 0; int TO_MESSAGE = 1; } private List<ChatMessage> mChatMessages; private LayoutInflater mInflater; public ChatMessageAdapter(Context context, List<ChatMessage> coll) { this.mChatMessages = coll; mInflater = LayoutInflater.from(context); } public int getCount() { return mChatMessages.size(); } public Object getItem(int position) { return mChatMessages.get(position); } public long getItemId(int position) { return position; } public int getItemViewType(int position) { ChatMessage entity = mChatMessages.get(position); if (entity.getMsgType()) { return IMessageViewType.COM_MESSAGE; } else { return IMessageViewType.TO_MESSAGE; } } public int getViewTypeCount() { return 2; } public View getView(int position, View convertView, ViewGroup parent) { final ChatMessage entity = mChatMessages.get(position); boolean isComMsg = entity.getMsgType(); ViewHolder viewHolder; if (convertView == null) { if (isComMsg) { convertView = mInflater.inflate(R.layout.chatting_item_msg_text_left, null); } else { convertView = mInflater.inflate(R.layout.chatting_item_msg_text_right, null); } viewHolder = new ViewHolder(); viewHolder.mSendTime = (TextView) convertView.findViewById(R.id.tv_send_time); viewHolder.mUserName = (TextView) convertView.findViewById(R.id.tv_username); viewHolder.mContent = (TextView) convertView.findViewById(R.id.tv_chat_content); viewHolder.mTime = (TextView) convertView.findViewById(R.id.tv_time); viewHolder.mUserAvatar = (ImageView) convertView.findViewById(R.id.iv_user_head); viewHolder.mIsComMessage = isComMsg; convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.mSendTime.setText(entity.getDate()); viewHolder.mContent.setText(entity.getContent()); viewHolder.mContent.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); viewHolder.mTime.setText(""); viewHolder.mUserName.setText(entity.getName()); if (isComMsg) { viewHolder.mUserAvatar.setImageResource(R.drawable.avatar); } else { viewHolder.mUserAvatar.setImageResource(R.mipmap.ic_launcher); // ImageLoader.getInstance().displayImage(entity.getAvatarUrl(), viewHolder.mUserAvatar); } return convertView; } class ViewHolder { public TextView mSendTime; public TextView mUserName; public TextView mContent; public TextView mTime; public ImageView mUserAvatar; public boolean mIsComMessage = true; } } }
[ "wit.zhaoguo@gmail.com" ]
wit.zhaoguo@gmail.com
c523f00d61f96b1c6ed3f52e94ef3100da9c3677
d00958862bdeab0de6eafb29625be92ca5fda62e
/src/collection/map/RemoveEntryByValue.java
7884108a2d97f7dde2908e5bfd481b444679a25f
[]
no_license
mrashmi791/Practice_Program
9b556fb8014cd579d28252575c5809e2cae7a71f
866180429b00d1e337df48eafeac86b17a7b3ccb
refs/heads/master
2022-06-30T20:41:42.936447
2020-05-13T10:03:22
2020-05-13T10:03:22
243,255,292
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package collection.map; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Scanner; import java.util.Set; import javax.xml.crypto.dsig.keyinfo.KeyValue; public class RemoveEntryByValue { @SuppressWarnings("unlikely-arg-type") public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc= new Scanner(System.in); Map<Integer, Character> map = new HashMap<Integer, Character>(); String str = sc.nextLine(); // char value = sc.nextLine().charAt(0); for(int i = 0; i < str.length(); i++) { map.put(i,str.charAt(i)); } map.entrySet() .removeIf( entry -> ("2".equals(""+entry.getKey()))); System.out.println(map); } }
[ "mrashmi791@gmail.com" ]
mrashmi791@gmail.com
53244813e63a19e37dbf579f4417798ac65fbc2e
385e3414ccb7458bbd3cec326320f11819decc7b
/packages/apps/Camera/src/com/android/camera/v2/ui/RotateAnimationImageView.java
67447875adca0a0751fb15a118842c90ae8f44a4
[ "Apache-2.0" ]
permissive
carlos22211/Tango_AL813
14de7f2693c3045b9d3c0cb52017ba2bb6e6b28f
b50b1b7491dc9c5e6b92c2d94503635c43e93200
refs/heads/master
2020-03-28T08:09:11.127995
2017-06-26T05:05:29
2017-06-26T05:05:29
147,947,860
1
0
null
2018-09-08T15:55:46
2018-09-08T15:55:45
null
UTF-8
Java
false
false
3,330
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2014. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.android.camera.v2.ui; import android.content.Context; import android.graphics.drawable.AnimationDrawable; import android.util.AttributeSet; import com.android.camera.Log; public class RotateAnimationImageView extends RotateImageView { private static final String TAG = "RotateAniImageView"; public RotateAnimationImageView(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void setImageResource(int resId) { setAnimationRunning(false); super.setImageResource(resId); setAnimationRunning(true); } private void setAnimationRunning(boolean run) { Log.d(TAG, "setAnimationRunning(" + run + ")"); AnimationDrawable anim = null; if (getDrawable() instanceof AnimationDrawable) { anim = (AnimationDrawable) getDrawable(); } if (anim != null) { if (run && !anim.isRunning()) { anim.start(); } if (!run && anim.isRunning()) { anim.stop(); } } } }
[ "zhangjinqiang@huaqin.com" ]
zhangjinqiang@huaqin.com
6eebf50d6e82e29796d9f7bacd074c00e2b2baf8
68e8295e66b48e2960dea8020970eeb332c64646
/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/util/PackageInfoQNameAnalyzer.java
fdf364868cbeb9e6002dabc6bd446d7fd106e02a
[ "BSD-2-Clause" ]
permissive
highsource/jaxb2-basics
52aeed82cf39b898128df3a037ed0b33e061a056
77fc1a3d5b3561af68d19ebe8e01adb9d567f5bd
refs/heads/master
2023-08-30T12:00:57.009957
2023-06-30T14:11:52
2023-06-30T14:11:52
24,514,964
99
56
BSD-2-Clause
2023-06-30T14:11:53
2014-09-26T20:50:41
Java
UTF-8
Java
false
false
3,275
java
package org.jvnet.jaxb2_commons.xml.bind.model.util; import java.util.HashMap; import java.util.Map; import javax.xml.namespace.QName; import org.jvnet.jaxb2_commons.lang.StringUtils; import org.jvnet.jaxb2_commons.lang.Validate; import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; import org.jvnet.jaxb2_commons.xml.bind.model.MElementInfo; import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfo; public class PackageInfoQNameAnalyzer<T, C extends T> { private final MModelInfo<T, C> modelInfo; public PackageInfoQNameAnalyzer(MModelInfo<T, C> modelInfo) { Validate.notNull(modelInfo); this.modelInfo = modelInfo; } public String getMostUsedElementNamespaceURI(MPackageInfo packageInfo) { final NamespaceURICounter counter = new NamespaceURICounter(); final QNameCollector collector = new QNameCollector() { public void element(QName name) { counter.add(name.getNamespaceURI()); } public void attribute(QName name) { } }; collectNamespaceURIs(packageInfo, collector); return counter.getMostUsedNamespaceURI(); } public String getMostUsedAttributeNamespaceURI(MPackageInfo packageInfo) { final NamespaceURICounter counter = new NamespaceURICounter(); final QNameCollector collector = new QNameCollector() { public void element(QName name) { } public void attribute(QName name) { counter.add(name.getNamespaceURI()); } }; collectNamespaceURIs(packageInfo, collector); return counter.getMostUsedNamespaceURI(); } private void collectNamespaceURIs(MPackageInfo packageInfo, final QNameCollector collector) { for (MElementInfo<T, C> elementInfo : modelInfo.getElementInfos()) { if (elementInfo.getPackageInfo() == packageInfo) { collector.element(elementInfo.getElementName()); } } final QNameCollectingPropertyInfoVisitor<T, C> visitor = new QNameCollectingPropertyInfoVisitor<T, C>( collector); for (MClassInfo<T, C> classInfo : modelInfo.getClassInfos()) { if (classInfo.getPackageInfo() == packageInfo) { for (MPropertyInfo<T, C> propertyInfo : classInfo .getProperties()) { propertyInfo.acceptPropertyInfoVisitor(visitor); } } } } private static class NamespaceURICounter { private Map<String, Integer> map = new HashMap<String, Integer>(); public void add(String namespaceURI) { final Integer count = map.get(namespaceURI); if (count == null) { map.put(namespaceURI, Integer.valueOf(1)); } else { map.put(namespaceURI, Integer.valueOf(count.intValue() + 1)); } } public String getMostUsedNamespaceURI() { String namespaceURI = null; int count = 0; for (Map.Entry<String, Integer> e : map.entrySet()) { final String currentNamespaceURI = e.getKey(); final int currentCount = e.getValue(); if (namespaceURI == null) { namespaceURI = currentNamespaceURI; count = currentCount; } else { if (currentCount > count || (currentCount == count && namespaceURI == null)) { namespaceURI = currentNamespaceURI; count = currentCount; } } } return StringUtils.isEmpty(namespaceURI) ? null : namespaceURI; } } }
[ "aleksei.valikov@gmail.com" ]
aleksei.valikov@gmail.com
9f9b55bd9a755b5376d5198952859c2e07e4c498
029a60dd1daeac58f1683503d70f9a756d550bbc
/level07/src/main/java/lesson06/task01/com/javarush/test/level07/lesson06/task01/Solution.java
5fcde82db90a6575058518dd8d232682c820ab72
[]
no_license
Borislove/JavaRush-1
4d66837bd07697299d97c234b751c0310ea57042
752373a5972c32e57fa1bffa60013a0da9e49b67
refs/heads/master
2023-05-03T12:32:29.577155
2021-05-24T13:12:55
2021-05-24T13:12:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package lesson06.task01.com.javarush.test.level07.lesson06.task01; /* 5 различных строчек в списке 1. Создай список строк. 2. Добавь в него 5 различных строчек. 3. Выведи его размер на экран. 4. Используя цикл выведи его содержимое на экран, каждое значение с новой строки. */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; public class Solution { public static void main(String[] args) throws Exception { //Напишите тут ваш код ArrayList<String> strings = new ArrayList<String> (); strings.add ("a1"); strings.add ("a2"); strings.add ("a3"); strings.add ("a4"); strings.add ("a5"); System.out.println (strings.size ()); for (int i = 0; i < strings.size (); i++) { System.out.println (strings.get(i)); } } }
[ "krohmal_kirill@mail.ru" ]
krohmal_kirill@mail.ru
5526270880dce2dbd8e2fb9a143441a8cc86150e
77f41106d18d9d2fd2ca85c18531f7e30e6968a8
/chorus/model/src/main/java/com/infoclinika/mssharing/model/extraction/MsFunctionExtractionContentExpert.java
cf59fb0cdecfa7b66e6b93d2e61e4c9c73669d65
[]
no_license
StratusBioSciences/chorus
a8abaa7ab1e9e8f6d867d327c7ec26e804e6fe0b
c9d8099419733314c0166980ee6270563a212383
refs/heads/master
2021-01-20T12:41:17.996158
2017-05-05T13:33:37
2017-05-05T13:33:37
90,378,816
0
4
null
2019-05-08T17:09:36
2017-05-05T13:32:47
Java
UTF-8
Java
false
false
374
java
package com.infoclinika.mssharing.model.extraction; import com.infoclinika.analysis.storage.cloud.CloudStorageItemReference; import java.util.Set; /** * @author andrii.loboda */ public interface MsFunctionExtractionContentExpert { CloudStorageItemReference selectMatchingMS2Filter(Set<CloudStorageItemReference> translatedContents, final double groupPrecursor); }
[ "vladimir.moiseiev@teamdev.com" ]
vladimir.moiseiev@teamdev.com
f0bb04bbf7b21f19202b2561e7aac139c59389bb
629871b7cb4fc74dcc13c3b2e5f20b233bd39caf
/src/main/java/chatter/client/ChatBotHelper.java
b71281aef6a1e76ad72ec0526c52e3dfc79656ad
[]
no_license
manojkhanwalkar/jabber
2e90f3bc83844e2a6459bce78bc5011465fe0c83
6dac212822847ae63058612c6704ae6cb20d05e4
refs/heads/master
2022-11-05T08:47:58.623236
2020-06-26T22:41:08
2020-06-26T22:41:08
266,450,374
0
0
null
null
null
null
UTF-8
Java
false
false
3,545
java
package chatter.client; import chatter.data.Packet; import util.JSONUtil; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket; import java.util.HashMap; import java.util.Map; import java.util.Scanner; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class ChatBotHelper { public ChatBotHelper() { } static class ReceiverHandler implements Runnable { BufferedReader in; QueryProcessor queryProcessor; public ReceiverHandler(Socket socket) { try { in = new BufferedReader( new InputStreamReader( socket.getInputStream() ) ); } catch (IOException e) { e.printStackTrace(); } queryProcessor = new QueryProcessor(socket); } public void run() { while(true) { String line = null; try { line = in.readLine(); } catch (IOException e) { e.printStackTrace(); } if( line != null ) { System.out.println( "Query Received " + line ); queryProcessor.process(line); // line = in.readLine(); } } } } static class QueryProcessor { PrintStream out; String user; public QueryProcessor(Socket socket) { // Create input and output streams to read from and write to the server try { out = new PrintStream(socket.getOutputStream()); user = System.getProperty("user"); out.println(user); out.flush(); init(); } catch (IOException e) { e.printStackTrace(); } } Map<String, String> answers = new HashMap<>(); private void init() { for (int i = 0; i < 10; i++) { answers.put("Q" + i, "A" + i); } } ExecutorService pool = Executors.newFixedThreadPool(10); public void process(String query) { CompletableFuture.runAsync(() -> { Packet input = (Packet) JSONUtil.fromJSON(query, Packet.class); String answer = answers.getOrDefault(input.getMessage(), "Unable t answer"); Packet packet = new Packet(); packet.setFrom(user); packet.setTo(input.getFrom()); packet.setMessage(answer); synchronized (out) { out.println(JSONUtil.toJSON(packet)); out.flush(); } }, pool); } } Socket socket; public void start() { String server = "localhost"; try { // Connect to the server socket = new Socket( server, 5000 ); ReceiverHandler receiverHandler = new ReceiverHandler(socket); CompletableFuture.runAsync(receiverHandler); } catch( Exception e ) { e.printStackTrace(); } } public void stop() { try { socket.close(); } catch (IOException e) { e.printStackTrace(); } } }
[ "manoj.khanwalkar@gmail.com" ]
manoj.khanwalkar@gmail.com
d20a4e0cbee661a543c0f3d60657ebef170c6a6d
d577f066627703130e70c60374d1b65f31072b43
/Items/Tools/ItemSplashGun.java
2267dee5d826457dd76f807dd682bba06d7c62c0
[]
no_license
lrivera25/ChromatiCraft
bef7960c1d81af29883a5d909cac8b652e38aac1
42842ad41ea3f8b2663f9dc19cb0b8983f64545e
refs/heads/master
2021-03-24T05:35:43.135925
2020-03-14T20:50:10
2020-03-14T20:50:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2017 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.ChromatiCraft.Items.Tools; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import Reika.ChromatiCraft.Base.ItemProjectileFiringTool; import Reika.ChromatiCraft.Entity.EntitySplashGunShot; public class ItemSplashGun extends ItemProjectileFiringTool { public ItemSplashGun(int index) { super(index); } @Override protected Entity createProjectile(ItemStack is, World world, EntityPlayer ep) { return new EntitySplashGunShot(world, ep); } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
0274c0191379efcfe4073c815ca6994ec059a5aa
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
/codeChef/src/medium/unsolved/TeamFormation.java
7b2ec5ad2df905ff2c364a5f25afe0c1485d6c15
[ "MIT" ]
permissive
sagarnikam123/learnNPractice
f0da3f8acf653e56c591353ab342765a6831698c
1b3b0cb2cff2f478006626a4c37a99102acbb628
refs/heads/master
2023-02-04T11:21:18.211654
2023-01-24T14:47:52
2023-01-24T14:47:52
61,184,927
2
1
MIT
2022-03-06T11:07:18
2016-06-15T06:57:19
Python
UTF-8
Java
false
false
4,972
java
/** Team Formation Battle of the Chefs is coming up! It's a contest where different teams of different Chefs compete against each other. Our Chef wants to send one of the best teams from his entire staff. Selecting a good team is not about having the best people, but it is about having members who can cooperate and work well with each other. Chef is very aware of this fact. So he chooses the following strategy to decide a team. He lines up all his N cooks in a line. Each of these cooks has a skill level associated with him. Denote the level of the i-th cook as skill[i] for 1 ≤ i ≤ N. Let us make a few points on a team formation. A team can have any number of cooks. Each team should consist of consecutive cooks. So, for example, cooks with positions 3, 4, 5 can form a team, but cooks with positions 4, 5, 7, 8 can not. A team is a candidate team if the difference between the maximum skill and the minimum skill of the cooks in the team does not exceed the threshold C. A cook can be in 0 or more candidate teams. Which means that candidate teams can intersect. Two candidate teams are considered to be different if there exists at least one cook who is in one team but not in the other. Chef has not yet decided the team of what size he is going to send to the battle. To be precise we note, that the team size is the total number of cooks in it. For the given team size Chef wants to consider all candidate teams of this size according to the rules described above, evaluate them for himself and choose the best one. Denote the total number of candidate teams for the given size K as cand[K]. To increase the chances of choosing better team he wants the number of candidate teams to be as large as possible. But Chef is a human and can't evaluate too many teams. The maximal number of teams he can evaluate depends on many factors such as his mood or fatigue. We call it the Chef's limit. Denote the current Chef's limit as M. Since Chef still wants the total number of candidate teams to be as large as possible you need to find the team size K such that cand[K] ≤ M, among all such K find the value for which cand[K] is maximal and if such K is not unique find the minimal K among them. Since Chef's limit always changes according to his mood or fatigue you should find the required team size for several values of M. Chef also wants to know the total number of candidate teams for the size you will find. There will be Q values of M in all. In order to keep the input small the skills of the cooks will be given in the following way. Skills of the first X cooks are given in the input, where X = min(10000, N). If N > 10000 skills of the remaining cooks for 10000 < i ≤ N are calculated as skill[i] = (A * skill[i-1] + B * skill[i-2] + D) mod 230, where A, B and D are given in the input. Here mod denotes the modulo operation, that is, Y mod Z is the remainder of division of Y by Z. Input The first line of the input contains a single integer T, the number of test cases to follow. Each test case consists of 3 lines. The first line contains 6 space-separated integers N, C, Q, A, B and D. The second line contains X = min(N, 10000) space-separated integers, i-th integer among them represents the skill of the i-th cook, that is, the number skill[i]. The third line contains Q space-separated integers, the values of M for which you need to find the optimal team size and the number of candidate teams of this size. Output For each test case, output Q lines containing the optimal team size for the corresponding value of M and the number of candidate teams corresponding to this team size separated by a space. Constraints 1 ≤ T ≤ 5 1 ≤ N ≤ 500000 0 ≤ C < 230 1 ≤ Q ≤ 1000 0 ≤ A, B, D < 230 0 ≤ skill[i] < 230 for 1 ≤ i ≤ X 1 ≤ M ≤ N *********************************************************************************************************************** Example Input: 2 6 3 3 1 1 1 6 2 4 5 6 3 4 3 6 6 10 1 2 2 2 1 1000 1 1000 1 1000 4 Output: 2 4 3 3 1 6 2 0 Explanation Case 1. With team size 2, we have 4 candidate teams: {2, 4}, {4, 5}, {5, 6}, and {6, 3}. Here numbers denote the cooks' skills. With any other team size, the number of candidate teams is either less than 4 or greater than 4. Similarly, with team size 3, we have 3 candidate teams, which are {2, 4, 5}, {4, 5, 6} and {5, 6, 3}. With team size 1, we have 6 candidate teams with one member in each team. Case 2. With team size 1, we have 6 possible candidate teams. But 6 > 4. For all other team sizes, the total number of candidate teams is 0. Thus, the answer is the smallest size among them, i.e., 2. **********************************************************************************************************************/ package medium.unsolved; public class TeamFormation { public static void main(String[] args) { } }
[ "sagarnikam123@gmail.com" ]
sagarnikam123@gmail.com
c2c61091cb5416a0b1619ce740021a9e736816b7
ed31841d39ddb9226df97299f9be7b67a054ed4a
/jmiser-poi/src/main/java/org/miser/poi/excel/style/StyleUtil.java
8487e04f1d362bac45975971ec388f47a5f6803e
[ "Apache-2.0" ]
permissive
kezf/jmiser
da8b01f2de13bea2ae2cccbee75c954b4f9e01d7
d72a0deedf18e682c782096aa87695921c0f5500
refs/heads/main
2021-12-04T06:52:26.912289
2021-07-20T15:16:26
2021-07-20T15:16:26
50,419,766
0
0
null
null
null
null
UTF-8
Java
false
false
6,203
java
package org.miser.poi.excel.style; import org.miser.core.util.StringUtil; import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.DataFormat; import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.VerticalAlignment; import org.apache.poi.ss.usermodel.Workbook; /** * Excel样式工具类 * * @author Oliver * */ public class StyleUtil { /** * 克隆新的{@link CellStyle} * * @param cell 单元格 * @param cellStyle 被复制的样式 * @return {@link CellStyle} */ public static CellStyle cloneCellStyle(Cell cell, CellStyle cellStyle) { return cloneCellStyle(cell.getSheet().getWorkbook(), cellStyle); } /** * 克隆新的{@link CellStyle} * * @param workbook 工作簿 * @param cellStyle 被复制的样式 * @return {@link CellStyle} */ public static CellStyle cloneCellStyle(Workbook workbook, CellStyle cellStyle) { final CellStyle newCellStyle = createCellStyle(workbook); newCellStyle.cloneStyleFrom(cellStyle); return newCellStyle; } /** * 设置cell文本对齐样式 * * @param cellStyle {@link CellStyle} * @param halign 横向位置 * @param valign 纵向位置 * @return {@link CellStyle} */ public static CellStyle setAlign(CellStyle cellStyle, HorizontalAlignment halign, VerticalAlignment valign) { cellStyle.setAlignment(halign); cellStyle.setVerticalAlignment(valign); return cellStyle; } /** * 设置cell的四个边框粗细和颜色 * * @param cellStyle {@link CellStyle} * @param borderSize 边框粗细{@link BorderStyle}枚举 * @param colorIndex 颜色的short值 * @return {@link CellStyle} */ public static CellStyle setBorder(CellStyle cellStyle, BorderStyle borderSize, IndexedColors colorIndex) { cellStyle.setBorderBottom(borderSize); cellStyle.setBottomBorderColor(colorIndex.index); cellStyle.setBorderLeft(borderSize); cellStyle.setLeftBorderColor(colorIndex.index); cellStyle.setBorderRight(borderSize); cellStyle.setRightBorderColor(colorIndex.index); cellStyle.setBorderTop(borderSize); cellStyle.setTopBorderColor(colorIndex.index); return cellStyle; } /** * 给cell设置颜色 * * @param cellStyle {@link CellStyle} * @param color 背景颜色 * @param fillPattern 填充方式 {@link FillPatternType}枚举 * @return {@link CellStyle} */ public static CellStyle setColor(CellStyle cellStyle, IndexedColors color, FillPatternType fillPattern) { return setColor(cellStyle, color.index, fillPattern); } /** * 给cell设置颜色 * * @param cellStyle {@link CellStyle} * @param color 背景颜色 * @param fillPattern 填充方式 {@link FillPatternType}枚举 * @return {@link CellStyle} */ public static CellStyle setColor(CellStyle cellStyle, short color, FillPatternType fillPattern) { cellStyle.setFillForegroundColor(color); cellStyle.setFillPattern(fillPattern); return cellStyle; } /** * 创建字体 * * @param workbook {@link Workbook} * @param color 字体颜色 * @param fontSize 字体大小 * @param fontName 字体名称,可以为null使用默认字体 * @return {@link Font} */ public static Font createFont(Workbook workbook, short color, short fontSize, String fontName) { final Font font = workbook.createFont(); return setFontStyle(font, color, fontSize, fontName); } /** * 设置字体样式 * * @param font 字体{@link Font} * @param color 字体颜色 * @param fontSize 字体大小 * @param fontName 字体名称,可以为null使用默认字体 * @return {@link Font} */ public static Font setFontStyle(Font font, short color, short fontSize, String fontName) { if (color > 0) { font.setColor(color); } if (fontSize > 0) { font.setFontHeightInPoints(fontSize); } if (StringUtil.isNotBlank(fontName)) { font.setFontName(fontName); } return font; } /** * 创建单元格样式 * * @param workbook {@link Workbook} 工作簿 * @return {@link CellStyle} * @see Workbook#createCellStyle() * */ public static CellStyle createCellStyle(Workbook workbook) { if (null == workbook) { return null; } return workbook.createCellStyle(); } /** * 创建默认普通单元格样式 * * <pre> * 1. 文字上下左右居中 * 2. 细边框,黑色 * </pre> * * @param workbook {@link Workbook} 工作簿 * @return {@link CellStyle} */ public static CellStyle createDefaultCellStyle(Workbook workbook) { final CellStyle cellStyle = createCellStyle(workbook); setAlign(cellStyle, HorizontalAlignment.CENTER, VerticalAlignment.CENTER); setBorder(cellStyle, BorderStyle.THIN, IndexedColors.BLACK); return cellStyle; } /** * 创建默认头部样式 * * @param workbook {@link Workbook} 工作簿 * @return {@link CellStyle} */ public static CellStyle createHeadCellStyle(Workbook workbook) { final CellStyle cellStyle = createCellStyle(workbook); setAlign(cellStyle, HorizontalAlignment.CENTER, VerticalAlignment.CENTER); setBorder(cellStyle, BorderStyle.THIN, IndexedColors.BLACK); setColor(cellStyle, IndexedColors.GREY_25_PERCENT, FillPatternType.SOLID_FOREGROUND); return cellStyle; } /** * 给定样式是否为null(无样式)或默认样式,默认样式为{@code workbook.getCellStyleAt(0)} * * @param workbook 工作簿 * @param style 被检查的样式 * @return 是否为null(无样式)或默认样式 * */ public static boolean isNullOrDefaultStyle(Workbook workbook, CellStyle style) { return (null == style) || style.equals(workbook.getCellStyleAt(0)); } /** * 创建数据格式并获取格式 * * @param workbook {@link Workbook} * @param format 数据格式 * @return 数据格式 * */ public Short getFormat(Workbook workbook, String format) { final DataFormat dataFormat = workbook.createDataFormat(); return dataFormat.getFormat(format); } }
[ "kezf@kmac.local" ]
kezf@kmac.local
c567299024ec541ec566dde72e8f59dc23e7e2f8
a843b73c528ee12bc3108a72f34c6eba6c739324
/src/ua/i/mail100/iterator/iterator/ProfileIterator.java
1838724c6f32faf0efb69f3c17887e0a7bcaff43
[]
no_license
Antoninadan/Patterns
0b3eadcb61f15a50d3024de546b72fceb747d833
0aa7aa3d387494eecaa91201554b592aafc9e22f
refs/heads/master
2022-12-07T11:33:24.585573
2020-08-13T20:25:48
2020-08-13T20:25:48
264,946,647
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package ua.i.mail100.iterator.iterator; import ua.i.mail100.iterator.model.Profile; public interface ProfileIterator { boolean hasNext(); Profile getNext(); void reset(); }
[ "mail100@i.ua" ]
mail100@i.ua
e3bf32787c20961c57af5a9a0ab8992450771ea9
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Log4j/Log4j2901.java
a51da535ebd7ffc3d8c58fa8c1a84248e358e8af
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
@SuppressWarnings("") private V getObjectValue(final Object k) { if (k == null) { return containsNullKey ? values[arraySize] : defRetValue; } K curr; final K[] key = this.keys; int pos; // The starting point. if ((curr = key[pos = HashCommon.mix(k.hashCode()) & mask]) == null) { return defRetValue; } if (k.equals(curr)) { return values[pos]; } // There's always an unused entry. while (true) { if (((curr = key[pos = (pos + 1) & mask]) == null)) { return defRetValue; } if (k.equals(curr)) { return values[pos]; } } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
1f5ea4228793e13ee014b6b9d03622b94ea46566
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/ant_cluster/24257/src_2.java
58b5e93c68dc16b6685da9ef919f1f253feadc10
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,254
java
/* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.tools.ant.taskdefs.optional.perforce; import java.io.IOException; import org.apache.myrmidon.api.TaskException; import org.apache.oro.text.perl.Perl5Util; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.exec.Execute; import org.apache.tools.ant.types.Commandline; /** * Base class for Perforce (P4) ANT tasks. See individual task for example * usage. * * @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A> * @see P4Sync * @see P4Have * @see P4Change * @see P4Edit * @see P4Submit * @see P4Label * @see org.apache.tools.ant.taskdefs.Exec */ public abstract class P4Base extends org.apache.tools.ant.Task { /** * Perl5 regexp in Java - cool eh? */ protected Perl5Util util = null; //P4 runtime directives /** * Perforce Server Port (eg KM01:1666) */ protected String P4Port = ""; /** * Perforce Client (eg myclientspec) */ protected String P4Client = ""; /** * Perforce User (eg fbloggs) */ protected String P4User = ""; /** * Perforce view for commands (eg //projects/foobar/main/source/... ) */ protected String P4View = ""; //P4 g-opts and cmd opts (rtfm) /** * Perforce 'global' opts. Forms half of low level API */ protected String P4Opts = ""; /** * Perforce command opts. Forms half of low level API */ protected String P4CmdOpts = ""; /** * The OS shell to use (cmd.exe or /bin/sh) */ protected String shell; public void setClient( String P4Client ) { this.P4Client = "-c" + P4Client; } public void setCmdopts( String P4CmdOpts ) { this.P4CmdOpts = P4CmdOpts; } //Setters called by Ant public void setPort( String P4Port ) { this.P4Port = "-p" + P4Port; } public void setUser( String P4User ) { this.P4User = "-u" + P4User; } public void setView( String P4View ) { this.P4View = P4View; } private void prepare() { util = new Perl5Util(); //Get default P4 settings from environment - Mark would have done something cool with //introspection here.....:-) String tmpprop; if( ( tmpprop = project.getProperty( "p4.port" ) ) != null ) setPort( tmpprop ); if( ( tmpprop = project.getProperty( "p4.client" ) ) != null ) setClient( tmpprop ); if( ( tmpprop = project.getProperty( "p4.user" ) ) != null ) setUser( tmpprop ); } protected void execP4Command( String command ) throws TaskException { execP4Command( command, null ); } public void execute() throws TaskException { //Setup task before executing it prepare(); super.execute(); } /** * Execute P4 command assembled by subclasses. * * @param command The command to run * @param handler A P4Handler to process any input and output * @exception TaskException Description of Exception */ protected void execP4Command( String command, P4Handler handler ) throws TaskException { try { Commandline commandline = new Commandline(); commandline.setExecutable( "p4" ); //Check API for these - it's how CVS does it... if( P4Port != null && P4Port.length() != 0 ) { commandline.createArgument().setValue( P4Port ); } if( P4User != null && P4User.length() != 0 ) { commandline.createArgument().setValue( P4User ); } if( P4Client != null && P4Client.length() != 0 ) { commandline.createArgument().setValue( P4Client ); } commandline.createArgument().setLine( command ); String[] cmdline = commandline.getCommandline(); String cmdl = ""; for( int i = 0; i < cmdline.length; i++ ) { cmdl += cmdline[ i ] + " "; } log( "Execing " + cmdl, Project.MSG_VERBOSE ); if( handler == null ) handler = new SimpleP4OutputHandler( this ); Execute exe = new Execute( handler, null ); exe.setAntRun( project ); exe.setCommandline( commandline.getCommandline() ); try { exe.execute(); } catch( IOException e ) { throw new TaskException( "Error", e ); } finally { try { handler.stop(); } catch( Exception e ) { } } } catch( Exception e ) { throw new TaskException( "Problem exec'ing P4 command: " + e.getMessage() ); } } }
[ "375833274@qq.com" ]
375833274@qq.com
9f79e99b8dbe7b632c7d6361b47f50a259bb43a9
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
/com/amap/mapapi/map/bd.java
0fb70ed0c83858e276f18f123fd5e1d567cd3b9b
[]
no_license
CrazyWolf2014/VehicleBus
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
450150fc3f4c7d5d7230e8012786e426f3ff1149
refs/heads/master
2021-01-03T07:59:26.796624
2016-06-10T22:04:02
2016-06-10T22:04:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
186
java
package com.amap.mapapi.map; import com.amap.mapapi.core.GeoPoint; /* compiled from: TransAnimListener */ public interface bd { void m815a(GeoPoint geoPoint); void m816b(); }
[ "ahhmedd16@hotmail.com" ]
ahhmedd16@hotmail.com
59c0a95f4efec493b119f8fd010b16c2ab159c0d
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
/src/main/java/com/alipay/api/domain/AlipayEcoEduJzApplyresultSyncModel.java
245e7ca3341687337297137e717a33d7b20b6776
[ "Apache-2.0" ]
permissive
1755616537/alipay-sdk-java-all
a7ebd46213f22b866fa3ab20c738335fc42c4043
3ff52e7212c762f030302493aadf859a78e3ebf7
refs/heads/master
2023-02-26T01:46:16.159565
2021-02-02T01:54:36
2021-02-02T01:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 兼职平台报名同步接口 * * @author auto create * @since 1.0, 2016-09-08 16:00:33 */ public class AlipayEcoEduJzApplyresultSyncModel extends AlipayObject { private static final long serialVersionUID = 3657599694115912117L; /** * 报名编号(通过调用报名信息同步接口返回) */ @ApiField("apply_third_id") private String applyThirdId; /** * 备注 */ @ApiField("audit_remark") private String auditRemark; /** * 报名结果状态 */ @ApiField("listing_status") private String listingStatus; public String getApplyThirdId() { return this.applyThirdId; } public void setApplyThirdId(String applyThirdId) { this.applyThirdId = applyThirdId; } public String getAuditRemark() { return this.auditRemark; } public void setAuditRemark(String auditRemark) { this.auditRemark = auditRemark; } public String getListingStatus() { return this.listingStatus; } public void setListingStatus(String listingStatus) { this.listingStatus = listingStatus; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
afe830fab5cfdde4a141f28c2a7a08311e29d6f7
d7452b9df968de07286903ea5f541f9ff680eeb0
/cosmetic-web/src/main/java/com/cyberlink/cosmetic/action/api/product/ListPriceRangAndNameAction.java
e78ff94a557528e007c69ebed921df501e9e2e4a
[ "Apache-2.0" ]
permissive
datree-demo/bcserver_demo
21075c94726932d325b291fb0c26b82cacc26b5b
852a8d4780d3724236e1d5069cccf2dbe7a4dce9
refs/heads/master
2020-04-07T08:28:28.382766
2017-03-14T03:16:35
2017-03-14T03:16:35
158,215,647
0
1
null
null
null
null
UTF-8
Java
false
false
1,626
java
package com.cyberlink.cosmetic.action.api.product; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.cyberlink.core.web.view.page.PageResult; import com.cyberlink.cosmetic.action.api.AbstractAction; import com.cyberlink.cosmetic.modules.product.dao.StorePriceRangeDao; import com.cyberlink.cosmetic.modules.product.model.StorePriceRange; import com.cyberlink.cosmetic.modules.product.model.result.PriceRangeWrapper; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.Resolution; import net.sourceforge.stripes.action.UrlBinding; import net.sourceforge.stripes.integration.spring.SpringBean; @UrlBinding("/api/store/listPriceRangAndName.action") public class ListPriceRangAndNameAction extends AbstractAction{ private String locale ; @SpringBean("product.StorePriceRangeDao") private StorePriceRangeDao storePriceRangeDao; @DefaultHandler public Resolution route() { final Map<String, Object> results = new HashMap<String, Object>(); List<StorePriceRange> priceRangeResult = new ArrayList<StorePriceRange>(); priceRangeResult = storePriceRangeDao.listAllPriceRangeByLocale(locale); List<PriceRangeWrapper> wrappedPriceRangeList = new ArrayList<PriceRangeWrapper>(); for( StorePriceRange priceRageItem: priceRangeResult ){ wrappedPriceRangeList.add(new PriceRangeWrapper( priceRageItem )); } results.put("results", wrappedPriceRangeList); return json(results); } public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } }
[ "wuyongwen@gmail.com" ]
wuyongwen@gmail.com
f541c79e909f836042d64e4d5be22ce49cb4f657
cf729a7079373dc301d83d6b15e2451c1f105a77
/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201509/cm/CustomParameter.java
f828c38fcceee4a2b3bc7e85b7d187f9f359703e
[]
no_license
cvsogor/Google-AdWords
044a5627835b92c6535f807ea1eba60c398e5c38
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
refs/heads/master
2023-03-23T05:49:33.827251
2021-03-17T14:35:13
2021-03-17T14:35:13
348,719,387
0
0
null
null
null
null
UTF-8
Java
false
false
2,651
java
package com.google.api.ads.adwords.jaxws.v201509.cm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * CustomParameter is used to map a custom parameter key to its value. * * * <p>Java class for CustomParameter complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CustomParameter"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="isRemove" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CustomParameter", propOrder = { "key", "value", "isRemove" }) public class CustomParameter { protected String key; protected String value; protected Boolean isRemove; /** * Gets the value of the key property. * * @return * possible object is * {@link String } * */ public String getKey() { return key; } /** * Sets the value of the key property. * * @param value * allowed object is * {@link String } * */ public void setKey(String value) { this.key = value; } /** * Gets the value of the value property. * * @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 isRemove property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsRemove() { return isRemove; } /** * Sets the value of the isRemove property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsRemove(Boolean value) { this.isRemove = value; } }
[ "vacuum13@gmail.com" ]
vacuum13@gmail.com
2f48066f54815c2e13f5053bee46055c782041b4
7ab64dd8a4405031ef5e08d6347cc37d4bf88eed
/rmi-server/src/main/java/com/xiepanpan/rmi/rpc/LBServerDemo.java
4e4ac3d0e85bbc872f747bdf0f64c305e16fb8e7
[]
no_license
xiepanpan/rmi
94c605e20799f5fcdc40748013d3810c25034217
84d02c463fbd3e382cd11e5b9c497b552c203897
refs/heads/master
2022-12-25T03:14:36.115878
2020-07-08T06:25:11
2020-07-08T06:25:11
277,601,542
0
0
null
2020-10-13T23:23:14
2020-07-06T17:05:26
Java
UTF-8
Java
false
false
631
java
package com.xiepanpan.rmi.rpc; import com.xiepanpan.rmi.rpc.zk.IRegisterCenter; import com.xiepanpan.rmi.rpc.zk.RegisterCenterImpl; import java.io.IOException; /** * @author: xiepanpan * @Date: 2020/7/8 * @Description: 模拟负载均衡1 */ public class LBServerDemo { public static void main(String[] args) throws IOException { IXpHello iXpHello = new XpHelloImpl(); IRegisterCenter registerCenter = new RegisterCenterImpl(); RpcServer rpcServer = new RpcServer(registerCenter,"127.0.0.1:8081"); rpcServer.bind(iXpHello); rpcServer.publish(); System.in.read(); } }
[ "xiepanpan@thunisoft.com" ]
xiepanpan@thunisoft.com
02e058609f33b96620a68ee8f24ef43def98b8dd
24edaa26e4c78c1d49331bcef8e8df2075ac99b6
/b2b/b2b-activity/activity-dao/src/main/java/com/jumore/b2b/activity/service/impl/GiftCategoryServiceImp.java
62b7fdc4b3821b6dbe63d41263a59dfbfa61cc2a
[]
no_license
73jdjdJDate61hdjd84hdjd52juggwf/activity
7be59b672220e0c07fe48dc5c5a49263229719d0
2ddcbaa25be230ca1b21f8eeb102f86ca94a3b5d
refs/heads/master
2020-03-21T10:18:36.654839
2016-08-19T10:36:53
2016-08-19T10:36:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,066
java
/** * 奖励类别 * GiftCategoryServiceImp.java * Copyright(C) 2015-2015 xxxxxx公司 * All rights reserved. * ----------------------------------------------- * 2016-07-01 Created */ package com.jumore.b2b.activity.service.impl; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.jumore.b2b.activity.base.service.single.BaseServiceImp; import com.jumore.b2b.activity.comm.Pages; import com.jumore.b2b.activity.mapper.GiftCategoryMapper; import com.jumore.b2b.activity.model.GiftCategory; import com.jumore.b2b.activity.model.GiftCategoryQueryHelper; import com.jumore.b2b.activity.service.IGiftCategoryService; @org.springframework.stereotype.Service public class GiftCategoryServiceImp extends BaseServiceImp<GiftCategory, GiftCategoryQueryHelper> implements IGiftCategoryService { static final Logger log = LogManager.getLogger(GiftCategoryServiceImp.class);; GiftCategoryMapper giftCategoryMapper; @Resource public void setGiftCategoryMapper(GiftCategoryMapper giftCategoryMapper) { this.giftCategoryMapper=giftCategoryMapper; //this.setBaseMapper(giftCategoryMapper); } /** *综合查询 */ public Pages<GiftCategory> browser(GiftCategory giftCategory, int length, int offset) { GiftCategoryQueryHelper example = new GiftCategoryQueryHelper(); /** 查询业务逻辑 **/ // example.createCriteria().andXXXEqualTo(xx.()) /** 查询业务逻辑完 **/ /**######################_我是分隔线######################**/ List<GiftCategory> list = new ArrayList<GiftCategory>(); long total = giftCategoryMapper.countByExample(example); if (total > 0) { /**排序业务逻辑 **/ //example.setOrderByClause(XX) /** 排序业务逻辑完 **/ /**######################_我是分隔线######################**/ //分页插件查询 PageHelper.startPage(offset, length); list = giftCategoryMapper.selectByExample(example); PageInfo<GiftCategory> page = new PageInfo<GiftCategory>(list); list=page.getList(); } return new Pages<com.jumore.b2b.activity.model.GiftCategory>(list, total, offset, length); } /** *添加 */ public long append(GiftCategory giftCategory) { /** 新增业务逻辑 **/ /** 新增业务逻辑完 **/ /**######################_我是分隔线######################**/ return giftCategoryMapper.insert(giftCategory); } /** *添加 */ public long delete(List<GiftCategory> giftCategory) { /** 删除务逻辑 **/ log.info("devlopping"); /** 删除业务逻辑完 **/ /**######################_我是分隔线######################**/ return 0; } /** *添加 */ public long update(GiftCategory giftCategory) { GiftCategoryQueryHelper e = new GiftCategoryQueryHelper(); /** 更新业务逻辑 **/ /** 更新业务逻辑完 **/ /**######################_我是分隔线######################**/ return giftCategoryMapper.updateByExampleSelective(giftCategory,e); } /** *添加 */ public GiftCategory selectUnique(GiftCategory giftCategory) { GiftCategoryQueryHelper e = new GiftCategoryQueryHelper(); /** 查询业务逻辑 **/ /** 查询业务逻辑完 **/ /**######################_我是分隔线######################**/ List<GiftCategory> list = giftCategoryMapper.selectByExample(e); if (list.size() != 1) throw new RuntimeException("对象不存在!"); return list.get(0); } }
[ "fans_2046@126.com" ]
fans_2046@126.com
6eff806e239adb62c2dac3432361a026475d08f0
755a5432e9b53191a8941591f560e7a4fc28b1a0
/java-project2-server/src19/main/java/com/eomcs/lms/handler/LessonAddCommand.java
6dcf9df1817bbd3fb7182f1be4f203791f046fb3
[]
no_license
SeungWanWoo/bitcamp-java-2018-12
4cff763ddab52721f24ce8abcebcec998dacc9e3
d14a8a935ef7a4d24eb633fedea892378e59168d
refs/heads/master
2021-08-06T22:11:24.954160
2019-08-06T08:17:07
2019-08-06T08:17:07
163,650,664
0
0
null
2020-04-30T03:39:17
2018-12-31T08:00:39
Java
UTF-8
Java
false
false
937
java
package com.eomcs.lms.handler; import com.eomcs.lms.context.Component; import com.eomcs.lms.dao.LessonDao; import com.eomcs.lms.domain.Lesson; @Component("/lesson/add") public class LessonAddCommand extends AbstractCommand { LessonDao lessonDao; public LessonAddCommand(LessonDao lessonDao) { this.lessonDao = lessonDao; } @Override public void execute(Response response) throws Exception { Lesson lesson = new Lesson(); lesson.setTitle(response.requestString("수업명? ")); lesson.setContents(response.requestString("설명? ")); lesson.setStartDate(response.requestDate("시작일? ")); lesson.setEndDate(response.requestDate("종료일? ")); lesson.setTotalHours(response.requestInt("총수업시간? ")); lesson.setDayHours(response.requestInt("일수업시간? ")); lessonDao.insert(lesson); response.println("저장하였습니다."); } }
[ "seungwan.woo94@gmail.com" ]
seungwan.woo94@gmail.com
35c2ea22ec0401bce610d1ebf5823ee621493d9b
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/JabRef/rev2119-2213/left-trunk-2213/java/net/sf/jabref/imports/EndnoteImporter.java
008c61443db3001f6ef69f11077b08728860afaa
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
5,967
java
package net.sf.jabref.imports; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.regex.Pattern; import net.sf.jabref.*; public class EndnoteImporter extends ImportFormat { public String getFormatName() { return "Refer/Endnote"; } public String getCLIId() { return "refer"; } public boolean isRecognizedFormat(InputStream stream) throws IOException { BufferedReader in = new BufferedReader(ImportFormatReader.getReaderDefaultEncoding(stream)); Pattern pat1 = Pattern.compile("%A .*"), pat2 = Pattern.compile("%E .*"); String str; while ((str = in.readLine()) != null){ if (pat1.matcher(str).matches() || pat2.matcher(str).matches()) return true; } return false; } public List<BibtexEntry> importEntries(InputStream stream) throws IOException { ArrayList<BibtexEntry> bibitems = new ArrayList<BibtexEntry>(); StringBuffer sb = new StringBuffer(); BufferedReader in = new BufferedReader(ImportFormatReader.getReaderDefaultEncoding(stream)); String ENDOFRECORD = "__EOREOR__"; String str; boolean first = true; while ((str = in.readLine()) != null){ str = str.trim(); if (str.indexOf("%0") == 0){ if (first){ first = false; }else{ sb.append(ENDOFRECORD); } sb.append(str); }else sb.append(str); sb.append("\n"); } String[] entries = sb.toString().split(ENDOFRECORD); HashMap<String, String> hm = new HashMap<String, String>(); String author = "", Type = "", editor = ""; for (int i = 0; i < entries.length; i++){ hm.clear(); author = ""; Type = ""; editor = ""; boolean IsEditedBook = false; String[] fields = entries[i].trim().substring(1).split("\n%"); for (int j = 0; j < fields.length; j++){ if (fields[j].length() < 3) continue; String prefix = fields[j].substring(0, 1); String val = fields[j].substring(2); if (prefix.equals("A")){ if (author.equals("")) author = val; else author += " and " + val; }else if (prefix.equals("E")){ if (editor.equals("")) editor = val; else editor += " and " + val; }else if (prefix.equals("T")) hm.put("title", val); else if (prefix.equals("0")){ if (val.indexOf("Journal") == 0) Type = "article"; else if ((val.indexOf("Book Section") == 0)) Type = "incollection"; else if ((val.indexOf("Book") == 0)) Type = "book"; else if (val.indexOf("Edited Book") == 0) { Type = "book"; IsEditedBook = true; }else if (val.indexOf("Conference") == 0) Type = "inproceedings"; else if (val.indexOf("Report") == 0) Type = "techreport"; else if (val.indexOf("Review") == 0) Type = "article"; else if (val.indexOf("Thesis") == 0) Type = "phdthesis"; else Type = "misc"; }else if (prefix.equals("7")) hm.put("edition", val); else if (prefix.equals("C")) hm.put("address", val); else if (prefix.equals("D")) hm.put("year", val); else if (prefix.equals("8")) hm.put("date", val); else if (prefix.equals("J")){ if (hm.get("journal") == null) hm.put("journal", val); }else if (prefix.equals("B")){ if (Type.equals("article")) hm.put("journal", val); else if (Type.equals("book") || Type.equals("inbook")) hm.put( "series", val); else hm.put("booktitle", val); }else if (prefix.equals("I")) { if (Type.equals("phdthesis")) hm.put("school", val); else hm.put("publisher", val); } else if (prefix.equals("P")) hm.put("pages", val.replaceAll("([0-9]) *- *([0-9])","$1--$2")); else if (prefix.equals("V")) hm.put("volume", val); else if (prefix.equals("N")) hm.put("number", val); else if (prefix.equals("U")) hm.put("url", val); else if (prefix.equals("O")) hm.put("note", val); else if (prefix.equals("K")) hm.put("keywords", val); else if (prefix.equals("X")) hm.put("abstract", val); else if (prefix.equals("9")){ if (val.indexOf("Ph.D.") == 0) Type = "phdthesis"; if (val.indexOf("Masters") == 0) Type = "mastersthesis"; }else if (prefix.equals("F")) hm.put(BibtexFields.KEY_FIELD, Util .checkLegalKey(val)); } if (IsEditedBook && editor.equals("")) { editor = author; author = ""; } if (!author.equals("")) hm.put("author", fixAuthor(author)); if (!editor.equals("")) hm.put("editor", fixAuthor(editor)); BibtexEntry b = new BibtexEntry(BibtexFields.DEFAULT_BIBTEXENTRY_ID, Globals .getEntryType(Type)); b.setField(hm); if (b.getAllFields().length > 0) bibitems.add(b); } return bibitems; } private String fixAuthor(String s) { int index = s.indexOf(" and "); if (index >= 0) return AuthorList.fixAuthor_lastNameFirst(s); index = s.lastIndexOf(","); if (index == s.length()-1) { String mod = s.substring(0, s.length()-1).replaceAll(", ", " and "); return AuthorList.fixAuthor_lastNameFirst(mod); } else return AuthorList.fixAuthor_lastNameFirst(s); } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
3f152a45f68236a34427556e3088d84007dd628b
d468cbe15ac0b6a6134e5fed8b34f8d64fbffbc0
/app/src/main/java/com/zhuandian/schoolsocial/adapter/PostListAdapter.java
c8cdb9743a7a1dca92a79d3759a566be8ae70d34
[]
no_license
zhuandian/SchoolSocial
95d9d5adde12cfe98701e647e5f14765ac780e8a
015bfa9a06ab9ea85f3a27d37dddde71158c77b0
refs/heads/master
2020-04-30T22:59:04.099524
2019-05-27T05:06:13
2019-05-27T05:06:13
177,132,973
2
0
null
null
null
null
UTF-8
Java
false
false
5,162
java
package com.zhuandian.schoolsocial.adapter; import android.content.Context; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.zhuandian.schoolsocial.R; import com.zhuandian.schoolsocial.base.BaseAdapter; import com.zhuandian.schoolsocial.base.BaseViewHolder; import com.zhuandian.schoolsocial.business.schoolNews.schoolsocial.MyUtils; import com.zhuandian.schoolsocial.entity.CommentEntity; import com.zhuandian.schoolsocial.entity.PostEntity; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import cn.bmob.v3.BmobQuery; import cn.bmob.v3.datatype.BmobPointer; import cn.bmob.v3.exception.BmobException; import cn.bmob.v3.listener.FindListener; /** * desc : * author:xiedong * date:2019/4/22 */ public class PostListAdapter extends BaseAdapter<PostEntity, BaseViewHolder> { @BindView(R.id.ll_click_span) LinearLayout llClickSpan; @BindView(R.id.username) TextView username; @BindView(R.id.time) TextView time; @BindView(R.id.content) TextView content; @BindView(R.id.comment) TextView comment; @BindView(R.id.tv_chat) TextView tvChat; private ItemClickListener clickListener; public PostListAdapter(Context context, List<PostEntity> mDatas) { super(context, mDatas); } @Override protected void converData(BaseViewHolder holder, final PostEntity heartShareEntity, final int position) { ButterKnife.bind(this, holder.itemView); username.setText(heartShareEntity.getUsername()); setCommentCount(heartShareEntity.getObjectId(), comment); //评论个数 content.setText(heartShareEntity.getContent()); System.out.println("创建Time----" + heartShareEntity.getCreatedAt() + "系统时间--" + MyUtils.currentTime()); // 创建Time----2016-12-30 10:46:44系统时间--2016-12-30 10:54:03 String createtTime[] = heartShareEntity.getCreatedAt().split(" "); String currentTime[] = MyUtils.currentTime().split(" "); //判断创建时间跟当前时间是否同一天,是,只显示时间,不是,显示创建的日期,不显示时间 if (createtTime[0].equals(currentTime[0])) { String createtTime1[] = createtTime[1].split(":"); time.setText("今天 " + createtTime1[0] + ":" + createtTime1[1]); } else { String createtTime1[] = createtTime[0].split("-"); //正则切割月份 String createtTime2[] = createtTime[1].split(":"); //正则切割时间 time.setText(createtTime1[1] + "/" + createtTime1[2] + " " + createtTime2[0] + ":" + createtTime2[1]); } llClickSpan.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (clickListener != null) { clickListener.onItemClick(heartShareEntity); } } }); llClickSpan.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View view) { if (clickListener != null) { clickListener.onItemLongClick(position); } return true; } }); tvChat.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (clickListener != null) { clickListener.onClicChat(heartShareEntity); } } }); } /** * 得到动态相关的评论个数 * * @param objectId * @return */ private void setCommentCount(String objectId, final TextView countView) { BmobQuery<CommentEntity> query = new BmobQuery<CommentEntity>(); //用此方式可以构造一个BmobPointer对象。只需要设置objectId就行 PostEntity post = new PostEntity(); post.setObjectId(objectId); //得到当前动态的Id号, query.addWhereEqualTo("postEntity", new BmobPointer(post)); //希望同时查询该评论的发布者的信息,以及该帖子的作者的信息,这里用到上面`include`的并列对象查询和内嵌对象的查询 query.include("myuser,postentity.auther"); query.findObjects(new FindListener<CommentEntity>() { @Override public void done(List<CommentEntity> objects, BmobException e) { if (e == null) { countView.setText(objects.size() + ""); } else { System.out.println("查询数据失败"); } } }); } @Override public int getItemLayoutId() { return R.layout.heart_share_item; } public void setClickListener(ItemClickListener clickListener) { this.clickListener = clickListener; } public interface ItemClickListener { void onItemClick(PostEntity heartShareEntity); void onItemLongClick(int pos); void onClicChat(PostEntity heartShareEntity); } }
[ "xiedong11@aliyun.com" ]
xiedong11@aliyun.com
8101eeeae3aca15a284eb902b0ae747efc4a0bf7
b49ee04177c483ab7dab6ee2cd3cabb44a159967
/medicineDaChen/src/main/java/com/core/BarcodeScannerView.java
d660e64ccc6709661822a39e9a85c781f66b48f4
[]
no_license
butaotao/MedicineProject
8a22a98a559005bb95fee51b319535b117f93d5d
8e57c1e0ee0dac2167d379edd9d97306b52d3165
refs/heads/master
2020-04-09T17:29:36.570453
2016-09-13T09:17:05
2016-09-13T09:17:05
68,094,294
0
1
null
null
null
null
UTF-8
Java
false
false
6,019
java
package com.core; import android.content.Context; import android.graphics.Color; import android.graphics.Rect; import android.hardware.Camera; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.widget.FrameLayout; import android.widget.RelativeLayout; public abstract class BarcodeScannerView extends FrameLayout implements Camera.PreviewCallback { private Camera mCamera; private CameraPreview mPreview; private IViewFinder mViewFinderView; private Rect mFramingRectInPreview; private CameraHandlerThread mCameraHandlerThread; private Boolean mFlashState; private boolean mAutofocusState = true; public BarcodeScannerView(Context context) { super(context); } public BarcodeScannerView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public final void setupLayout(Camera camera) { removeAllViews(); mPreview = new CameraPreview(getContext(), camera, this); RelativeLayout relativeLayout = new RelativeLayout(getContext()); relativeLayout.setGravity(Gravity.CENTER); relativeLayout.setBackgroundColor(Color.BLACK); relativeLayout.addView(mPreview); addView(relativeLayout); mViewFinderView = createViewFinderView(getContext()); if (mViewFinderView instanceof View) { addView((View) mViewFinderView); } else { throw new IllegalArgumentException("IViewFinder object returned by " + "'createViewFinderView()' should be instance of android.view.View"); } } /** * <p>Method that creates view that represents visual appearance of a barcode scanner</p> * <p>Override it to provide your own view for visual appearance of a barcode scanner</p> * * @param context {@link Context} * @return {@link View} that implements {@link ViewFinderView} */ protected IViewFinder createViewFinderView(Context context) { return new ViewFinderView(context); } public void startCamera(int cameraId) { if(mCameraHandlerThread == null) { mCameraHandlerThread = new CameraHandlerThread(this); } mCameraHandlerThread.startCamera(cameraId); } public void setupCameraPreview(Camera camera) { mCamera = camera; if(mCamera != null) { setupLayout(mCamera); mViewFinderView.setupViewFinder(); if(mFlashState != null) { setFlash(mFlashState); } setAutoFocus(mAutofocusState); } } public void startCamera() { startCamera(-1); } public void stopCamera() { if(mCamera != null) { mPreview.stopCameraPreview(); mPreview.setCamera(null, null); mCamera.release(); mCamera = null; } if(mCameraHandlerThread != null) { mCameraHandlerThread.quit(); mCameraHandlerThread = null; } } public void stopCameraPreview() { if(mPreview != null) { mPreview.stopCameraPreview(); } } protected void resumeCameraPreview() { if(mPreview != null) { mPreview.showCameraPreview(); } } public synchronized Rect getFramingRectInPreview(int previewWidth, int previewHeight) { if (mFramingRectInPreview == null) { Rect framingRect = mViewFinderView.getFramingRect(); int viewFinderViewWidth = mViewFinderView.getWidth(); int viewFinderViewHeight = mViewFinderView.getHeight(); if (framingRect == null || viewFinderViewWidth == 0 || viewFinderViewHeight == 0) { return null; } Rect rect = new Rect(framingRect); rect.left = rect.left * previewWidth / viewFinderViewWidth; rect.right = rect.right * previewWidth / viewFinderViewWidth; rect.top = 100; rect.bottom = rect.bottom * previewHeight / viewFinderViewHeight; mFramingRectInPreview = rect; } return mFramingRectInPreview; } public void setFlash(boolean flag) { mFlashState = flag; if(mCamera != null && CameraUtils.isFlashSupported(mCamera)) { Camera.Parameters parameters = mCamera.getParameters(); if(flag) { if(parameters.getFlashMode().equals(Camera.Parameters.FLASH_MODE_TORCH)) { return; } parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); } else { if(parameters.getFlashMode().equals(Camera.Parameters.FLASH_MODE_OFF)) { return; } parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); } mCamera.setParameters(parameters); } } public boolean getFlash() { if(mCamera != null && CameraUtils.isFlashSupported(mCamera)) { Camera.Parameters parameters = mCamera.getParameters(); if(parameters.getFlashMode().equals(Camera.Parameters.FLASH_MODE_TORCH)) { return true; } else { return false; } } return false; } public void toggleFlash() { if(mCamera != null && CameraUtils.isFlashSupported(mCamera)) { Camera.Parameters parameters = mCamera.getParameters(); if(parameters.getFlashMode().equals(Camera.Parameters.FLASH_MODE_TORCH)) { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); } else { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); } mCamera.setParameters(parameters); } } public void setAutoFocus(boolean state) { mAutofocusState = state; if(mPreview != null) { mPreview.setAutoFocus(state); } } }
[ "1802928215@qq.com" ]
1802928215@qq.com
329b3099e3bde46ca53143b4bb86fa4b2ad0c4ec
7f31bbbba3749a66bdb97c72e56f7b038625254f
/zftlive/zftlive/apps/zftlive-framework-samples/src/main/java/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebView2Activity.java
dcbf081ace9c77f424a0b28cb2057be6efe26b71
[ "Apache-2.0" ]
permissive
ruanxuexiong/demo
a6aa04825b4f8063258756d56d30a37bc1b3d877
7ca3c71051f85ab6d28e75599e7c38a13bed8d3a
refs/heads/master
2020-05-22T05:27:57.313371
2019-05-12T10:03:41
2019-05-12T10:03:41
186,235,930
0
0
null
null
null
null
UTF-8
Java
false
false
2,832
java
/* * Android基础开发个人积累、沉淀、封装、整理共通 * Copyright (c) 2016. 曾繁添 <zftlive@163.com> * Github:https://github.com/zengfantian || http://git.oschina.net/zftlive * * 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.zftlive.android.sample.pulltorefresh; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; import com.zftlive.android.R; import com.zftlive.android.library.widget.pulltorefresh.PullToRefreshBase; import com.zftlive.android.library.widget.pulltorefresh.PullToRefreshBase.OnRefreshListener; import com.zftlive.android.library.widget.pulltorefresh.extras.PullToRefreshWebView2; public final class PullToRefreshWebView2Activity extends Activity implements OnRefreshListener<WebView> { /** Called when the activity is first created. */ @SuppressLint("NewApi") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ptr_webview2); PullToRefreshWebView2 pullRefreshWebView = (PullToRefreshWebView2) findViewById(R.id.pull_refresh_webview2); pullRefreshWebView.setOnRefreshListener(this); WebView webView = pullRefreshWebView.getRefreshableView(); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new SampleWebViewClient()); // We just load a prepared HTML page from the assets folder for this // sample, see that file for the Javascript implementation webView.loadUrl("file:///android_asset/ptr_webview2_sample.html"); //初始化带返回按钮的标题栏 // ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private static class SampleWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } @Override public void onRefresh(final PullToRefreshBase<WebView> refreshView) { // This is very contrived example, we just wait 2 seconds, then call // onRefreshComplete() refreshView.postDelayed(new Runnable() { @Override public void run() { refreshView.onRefreshComplete(); } }, 2 * 1000); } }
[ "412877174@qq.com" ]
412877174@qq.com
aadb850c0c64f6974c5566546c914cd7bb802f40
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/huawei/wallet/sdk/common/log/Logger.java
48986d3f11ea53f4ea78c357e343dfe600a17302
[]
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,445
java
package com.huawei.wallet.sdk.common.log; import java.util.Map; public class Logger { private String mTag; public static class Builder { /* access modifiers changed from: private */ public String module; /* access modifiers changed from: private */ public String tag; public Logger build() { return new Logger(this); } public Builder setTag(String tag2) { this.tag = tag2; return this; } public Builder setModule(String module2) { this.module = module2; return this; } public Builder depth(int depth) { return this; } } Logger(Builder builder) { String str; if (builder.module != null) { this.mTag = builder.module + ":"; } if (builder.tag != null) { if (this.mTag == null) { str = builder.tag; } else { str = this.mTag + builder.tag; } this.mTag = str; } } public static Builder tag(String tag) { return new Builder().setTag(tag); } public static Builder module(String module) { return new Builder().setModule(module); } public static boolean isDebugLogEnable() { return LogUtil.isDebugLogEnable(); } public static void d(String tag, String msg, boolean isNeedProguard) { LogUtil.d(tag, msg, isNeedProguard); } public static void i(String tag, String msg, boolean isNeedProguard) { LogUtil.i(tag, msg, isNeedProguard); } public static void i(String tag, String msg, Throwable e, boolean isNeedProguard) { LogUtil.i(tag, msg, e, isNeedProguard); } public static void w(String tag, String msg, boolean isNeedProguard) { LogUtil.e(tag, msg, null, isNeedProguard); } public static void w(String tag, String msg, Throwable e, boolean isNeedProguard) { LogUtil.e(tag, msg, e, isNeedProguard); } public static void e(String tag, String msg, boolean isNeedProguard) { LogUtil.e(tag, msg, null, isNeedProguard); } public static void e(String tag, String msg, Throwable e, boolean isNeedProguard) { LogUtil.e(tag, msg, e, isNeedProguard); } public static void e(String tag, String message, Throwable e, int errorCode, Map<String, String> map, boolean uploadLog, boolean isNeedProguard) { if (message != null) { LogUtil.e(tag, message, e, isNeedProguard); } } public void d(String msg, boolean isNeedProguard) { LogUtil.d(this.mTag, msg, isNeedProguard); } public void i(String msg, boolean isNeedProguard) { LogUtil.i(this.mTag, msg, isNeedProguard); } public void i(String msg, Throwable e, boolean isNeedProguard) { LogUtil.i(this.mTag, msg, e, isNeedProguard); } public void w(String msg, boolean isNeedProguard) { LogUtil.e(this.mTag, msg, null, isNeedProguard); } public void w(String msg, Throwable e, boolean isNeedProguard) { LogUtil.e(this.mTag, msg, e, isNeedProguard); } public void e(String msg, boolean isNeedProguard) { LogUtil.e(this.mTag, msg, null, isNeedProguard); } public void e(String msg, Throwable e, boolean isNeedProguard) { LogUtil.e(this.mTag, msg, e, isNeedProguard); } }
[ "dstmath@163.com" ]
dstmath@163.com
fe97c6c2b63d9a76a367dbe2004b83e09db272c3
2534632801fd1f4c59b184088c515a28078e3a70
/src/main/java/com/nswt/service/system/fhlog/FHlogManager.java
31981f31f1ce7aca678ad8a7c48db3fe47171315
[]
no_license
SimonHK/ProcessIntegrationPlatform
0b339a7051a858eedf87953471c9f8820cdd0f8b
d7bd97e3a8b125cc1137de7ede8c0498dd0f02d6
refs/heads/master
2021-10-27T16:07:27.150839
2019-04-18T10:28:45
2019-04-18T10:28:45
100,347,976
0
0
null
null
null
null
UTF-8
Java
false
false
991
java
package com.nswt.service.system.fhlog; import java.util.List; import com.nswt.entity.Page; import com.nswt.util.PageData; /** * 说明: 操作日志记录接口 * 创建人:HongKai * 创建时间:2016-05-10 * @version */ public interface FHlogManager{ /**新增 * @param pd * @throws Exception */ public void save(String USERNAME, String CONTENT)throws Exception; /**删除 * @param pd * @throws Exception */ public void delete(PageData pd)throws Exception; /**列表 * @param page * @throws Exception */ public List<PageData> list(Page page)throws Exception; /**列表(全部) * @param pd * @throws Exception */ public List<PageData> listAll(PageData pd)throws Exception; /**通过id获取数据 * @param pd * @throws Exception */ public PageData findById(PageData pd)throws Exception; /**批量删除 * @param ArrayDATA_IDS * @throws Exception */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception; }
[ "18611949252@163.como" ]
18611949252@163.como
a5b17a13378e0841d454319f0c51f3fe29b60be3
bafab6aea4107c2915cc2da62fa14296f4f9ded9
/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/main/java/org/kie/workbench/common/stunner/client/widgets/canvas/FocusableLienzoPanelView.java
3105f363402db7f12b408838c756fcd6e071623d
[ "Apache-2.0" ]
permissive
lazarotti/kie-wb-common
7da98f53758c211c94002660cf44698b9a2cccc4
bc98aca29846baaa01fb9a5dc468ab4f3f55a8c7
refs/heads/master
2021-01-12T01:46:55.935051
2017-01-09T10:58:05
2017-01-09T10:58:05
78,430,514
0
0
null
2017-01-09T13:19:14
2017-01-09T13:19:14
null
UTF-8
Java
false
false
2,111
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.stunner.client.widgets.canvas; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; /** * LienzoPanel that can take the Focus (and more importantly cause other Widgets to loose the Focus) */ public class FocusableLienzoPanelView extends com.ait.lienzo.client.widget.LienzoPanel { public FocusableLienzoPanelView( final int width, final int height ) { super( width, height ); //Basic support to loose focus on other Widgets when a WiresCanvas is clicked addMouseDownHandler( new MouseDownHandler() { @Override public void onMouseDown( final MouseDownEvent event ) { broadcastBlurEvent(); } } ); addMouseWheelHandler( new MouseWheelHandler() { @Override public void onMouseWheel( final MouseWheelEvent event ) { broadcastBlurEvent(); } } ); } protected void broadcastBlurEvent() { final NativeEvent blur = Document.get().createBlurEvent(); for ( int i = 0; i < RootPanel.get().getWidgetCount(); i++ ) { final Widget w = RootPanel.get().getWidget( i ); DomEvent.fireNativeEvent( blur, w ); } } }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
ef68124032560faa130d9338ae4203a3c7016d13
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/green-20180509/src/main/java/com/aliyun/green20180509/models/ImageSyncScanResponse.java
8d77d73d96a588c56f9db34012284e5942cecdb2
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
735
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.green20180509.models; import com.aliyun.tea.*; public class ImageSyncScanResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; public static ImageSyncScanResponse build(java.util.Map<String, ?> map) throws Exception { ImageSyncScanResponse self = new ImageSyncScanResponse(); return TeaModel.build(map, self); } public ImageSyncScanResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
46d7e9dc5fbbcd514863123b1bb9af3518602c08
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/webview/ui/tools/jsapi/b.java
682c807ccb5986d6c5ba79ccfc0e86e2c179ed07
[]
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
2,517
java
package com.tencent.mm.plugin.webview.ui.tools.jsapi; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.webview.jsapi.c.a; import com.tencent.mm.plugin.webview.jsapi.e; import com.tencent.mm.plugin.webview.jsapi.h; import com.tencent.mm.plugin.webview.jsapi.p; import com.tencent.mm.sdk.platformtools.ClipboardHelper; import com.tencent.mm.sdk.platformtools.Log; import java.util.Map; import kotlin.Metadata; import kotlin.a.ak; import kotlin.g.b.s; import kotlin.v; @Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/webview/ui/tools/jsapi/JsApiGetPasteboardContent;", "Lcom/tencent/mm/plugin/webview/jsapi/newjsapi/BaseJsApi;", "()V", "TAG", "", "getTAG", "()Ljava/lang/String;", "controlByte", "", "getControlByte", "()I", "funcName", "getFuncName", "handleMsg", "", "env", "Lcom/tencent/mm/plugin/webview/jsapi/JsApiEnv;", "msg", "Lcom/tencent/mm/plugin/webview/jsapi/MsgWrapper;", "plugin-webview_release"}, k=1, mv={1, 5, 1}, xi=48) public final class b extends a { private static final int OOk; private static final String TAG; public static final b Xil; private static final String idA; static { AppMethodBeat.i(164014); Xil = new b(); TAG = "MicroMsg.JsApiGetPasteboardContent"; OOk = 364; idA = "getPasteboardContent"; AppMethodBeat.o(164014); } public final boolean a(h paramh, p paramp) { AppMethodBeat.i(297378); s.u(paramh, "env"); s.u(paramp, "msg"); Object localObject = ClipboardHelper.getText(paramh.context); Log.i(TAG, s.X("do get pasteboard content: ", localObject)); int i; if ((localObject == null) || (((CharSequence)localObject).length() == 0)) { i = 1; if (i == 0) { break label97; } paramh.WDy.doCallback(paramp.WEH, s.X(paramp.function, ":fail nocontent"), ak.kkZ()); } for (;;) { AppMethodBeat.o(297378); return true; i = 0; break; label97: s.s(localObject, "text"); localObject = ak.l(v.Y("content", localObject)); paramh.WDy.doCallback(paramp.WEH, s.X(paramp.function, ":ok"), (Map)localObject); } } public final String gPX() { return idA; } public final int gPZ() { return OOk; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.webview.ui.tools.jsapi.b * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
0f1ab63cfd2567ac8b4d0ee705ae152a41ffae7b
f52981eb9dd91030872b2b99c694ca73fb2b46a8
/Source/Plugins/Core/com.equella.core/src/com/tle/web/api/collection/interfaces/beans/CollectionSecurityBean.java
4f8a387f23ad7219c189cb044fffaa74498ad8be
[ "BSD-3-Clause", "LGPL-2.0-or-later", "LGPL-2.1-only", "LicenseRef-scancode-jdom", "GPL-1.0-or-later", "ICU", "CDDL-1.0", "LGPL-3.0-only", "LicenseRef-scancode-other-permissive", "CPL-1.0", "MIT", "GPL-2.0-only", "Apache-2.0", "NetCDF", "Apache-1.1", "EPL-1.0", "Classpath-exception-2.0", "CDDL-1.1", "LicenseRef-scancode-freemarker" ]
permissive
phette23/Equella
baa41291b91d666bf169bf888ad7e9f0b0db9fdb
56c0d63cc1701a8a53434858a79d258605834e07
refs/heads/master
2020-04-19T20:55:13.609264
2019-01-29T03:27:40
2019-01-29T22:31:24
168,427,559
0
0
Apache-2.0
2019-01-30T22:49:08
2019-01-30T22:49:08
null
UTF-8
Java
false
false
1,708
java
/* * Copyright 2017 Apereo * * 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.tle.web.api.collection.interfaces.beans; import java.util.List; import java.util.Map; import com.tle.web.api.interfaces.beans.security.BaseEntitySecurityBean; import com.tle.web.api.interfaces.beans.security.DynamicRuleBean; import com.tle.web.api.interfaces.beans.security.TargetListEntryBean; public class CollectionSecurityBean extends BaseEntitySecurityBean { private Map<String, ItemMetadataSecurityBean> metadata; private Map<String, List<TargetListEntryBean>> statuses; private List<DynamicRuleBean> dynamicRules; public Map<String, ItemMetadataSecurityBean> getMetadata() { return metadata; } public void setMetadata(Map<String, ItemMetadataSecurityBean> metadata) { this.metadata = metadata; } public Map<String, List<TargetListEntryBean>> getStatuses() { return statuses; } public void setStatuses(Map<String, List<TargetListEntryBean>> statuses) { this.statuses = statuses; } public List<DynamicRuleBean> getDynamicRules() { return dynamicRules; } public void setDynamicRules(List<DynamicRuleBean> dynamicRules) { this.dynamicRules = dynamicRules; } }
[ "doolse@gmail.com" ]
doolse@gmail.com
9077394ffeaf9015c8bf54116567f0b47527639a
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module502/src/main/java/module502packageJava0/Foo578.java
bf639e4569ff86e1f9ce48f0ed7c70b9331a239d
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
820
java
package module502packageJava0; import java.lang.Integer; public class Foo578 { Integer int0; Integer int1; Integer int2; public void foo0() { new module502packageJava0.Foo577().foo15(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } public void foo10() { foo9(); } public void foo11() { foo10(); } public void foo12() { foo11(); } public void foo13() { foo12(); } public void foo14() { foo13(); } public void foo15() { foo14(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
a689d2016be48fc56527704f2f54f181ba1b2a5a
fb7b030d462ab0a1a449dad08aeca61bf5bfba63
/app/src/main/java/com/jxxx/gaotang/view/adapter/HomeActivityAdapter.java
4d916e87cd5501c9ac0353f8b86c8d83dd197d50
[]
no_license
ltg263/GaoTang
a15c5b51d8ce928795448a72793ce221ef8b5e3a
b687c6d5760f004f452a19923c532c6d04e33fc5
refs/heads/master
2022-07-04T21:36:44.512969
2020-05-25T03:03:57
2020-05-25T03:03:57
266,670,590
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
package com.jxxx.gaotang.view.adapter; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.jxxx.gaotang.R; import java.util.List; public class HomeActivityAdapter extends BaseQuickAdapter<String, BaseViewHolder> { public HomeActivityAdapter(@Nullable List<String> data) { super(R.layout.item_home_activity,data); } @Override protected void convert(@NonNull BaseViewHolder helper, String item) { } }
[ "qzj842179561@gmail.com" ]
qzj842179561@gmail.com
ab20951bbaa9ea5a0fb8f7e546f7b58b17ad2834
5da2534bc582022c54d50c20c93a7c1872ac37d5
/metrics/src/main/java/com/facebook/battery/metrics/network/NetworkMetricsCollector.java
966029c6265072cc38f071d789d4513241e32bea
[ "MIT" ]
permissive
z4zzaman/Battery-Metrics
4ba3b4b2bc7d2c8c87616570e812880d12ebad6c
52941f03f7cc02b599b172208fbf719162e8b51e
refs/heads/master
2020-08-03T03:33:22.464613
2019-09-13T02:38:47
2019-09-13T02:41:30
211,612,867
1
0
MIT
2019-09-29T06:13:18
2019-09-29T06:13:18
null
UTF-8
Java
false
false
3,778
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * <p>This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ package com.facebook.battery.metrics.network; import static com.facebook.battery.metrics.network.NetworkBytesCollector.BG; import static com.facebook.battery.metrics.network.NetworkBytesCollector.FG; import static com.facebook.battery.metrics.network.NetworkBytesCollector.MOBILE; import static com.facebook.battery.metrics.network.NetworkBytesCollector.RX; import static com.facebook.battery.metrics.network.NetworkBytesCollector.TX; import static com.facebook.battery.metrics.network.NetworkBytesCollector.WIFI; import android.content.Context; import com.facebook.battery.metrics.core.SystemMetricsCollector; import com.facebook.battery.metrics.core.SystemMetricsLogger; import com.facebook.infer.annotation.ThreadSafe; import java.util.Arrays; /** * Records data transferred by the current application, broken down by type of network (radio vs * wifi) and bytes received and transmitted. * * <p>This tries to use a qtaguid file if available, but otherwise falls back to TrafficStats with * manual instrumentation for guessing which type of network is active. * * <p>See {@link EnhancedNetworkMetricsCollector} for distinguishing between foreground/background * app states as well. */ @ThreadSafe public class NetworkMetricsCollector extends SystemMetricsCollector<NetworkMetrics> { private static final String TAG = "NetworkMetricsCollector"; private boolean mIsValid = true; private final NetworkBytesCollector mCollector; private final long[] mBytes; private final long[] mPrevBytes; public NetworkMetricsCollector(Context context) { mCollector = NetworkBytesCollector.create(context); mBytes = NetworkBytesCollector.createByteArray(); mPrevBytes = NetworkBytesCollector.createByteArray(); } @Override @ThreadSafe(enableChecks = false) public synchronized boolean getSnapshot(NetworkMetrics snapshot) { // Once the value has decreased, the underlying value has almost certainly reset and all current // snapshots are invalidated. Disable this collector. if (!mIsValid || !mCollector.getTotalBytes(mBytes)) { return false; } mIsValid = ensureBytesIncreased(mBytes, mPrevBytes); if (!mIsValid) { return false; } boolean supportsBgDetection = mCollector.supportsBgDistinction(); resetMetrics(snapshot); addMetricsFromBytes(snapshot, mBytes, FG); if (supportsBgDetection) { addMetricsFromBytes(snapshot, mBytes, BG); } return true; } static boolean ensureBytesIncreased(long[] currentBytes, long[] previousBytes) { for (int i = 0; i < currentBytes.length; i++) { if (currentBytes[i] < previousBytes[i]) { SystemMetricsLogger.wtf( TAG, "Network Bytes decreased from " + Arrays.toString(previousBytes) + " to " + Arrays.toString(currentBytes)); return false; } } System.arraycopy(currentBytes, 0, previousBytes, 0, currentBytes.length); return true; } static void addMetricsFromBytes(NetworkMetrics metrics, long[] bytes, int fgBgBit) { metrics.mobileBytesTx += bytes[MOBILE | TX | fgBgBit]; metrics.mobileBytesRx += bytes[MOBILE | RX | fgBgBit]; metrics.wifiBytesTx += bytes[WIFI | TX | fgBgBit]; metrics.wifiBytesRx += bytes[WIFI | RX | fgBgBit]; } static void resetMetrics(NetworkMetrics metrics) { metrics.mobileBytesTx = 0; metrics.mobileBytesRx = 0; metrics.wifiBytesTx = 0; metrics.wifiBytesRx = 0; } @Override public NetworkMetrics createMetrics() { return new NetworkMetrics(); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
c3a8ea0b1f02ec90bca4b644115b99f051b63bb8
1f45dafb232759e3028b7d524cf708dc2a31d1b3
/programs/dld/MaheshFrame.java
600d24e0bf56a3887cfba635d638916ff58557cf
[]
no_license
gcsr/btech-practice-codes
06eacfeb6a7074b2244383a6110f77abdfc052b3
f95a79f23484740d82eebe24763996beddd1ace7
refs/heads/master
2022-11-19T17:37:39.220405
2020-07-23T18:17:58
2020-07-23T18:17:58
263,967,369
0
0
null
null
null
null
UTF-8
Java
false
false
623
java
import javax.swing.JFrame; import javax.swing.JList; import java.awt.BorderLayout; import javax.swing.JButton; public class MaheshFrame extends JFrame{ JList list; /** * @param args */ MaheshFrame() { String[] selection={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18",}; list =new JList(selection); list.setVisibleRowCount(5); list.setSelectedIndex(4); setLayout(new BorderLayout()); add(list,BorderLayout.NORTH); setSize(500,500); setVisible(true); } public static void main(String[] args) { // TODO Auto-generated method stub new MaheshFrame(); } }
[ "gc.sekhar002@gmail.com" ]
gc.sekhar002@gmail.com
b853767ad2c0ecb39e753763379a246fbf9734af
f3c0028d4138c69c4ce24b2fd01e4ca595a6af4d
/app/src/main/java/com/siweisoft/nurse/ui/base/bean/reqbean/BaseNurseReqBean.java
5437c69ed002b62703bb028d6aa7c4fe24da82b5
[]
no_license
canvaser/desktop
83138fa37b36a02d4663d5e9cb136313f501a43e
7652ece27d050d627c95fe0934734bf05db2cb0e
refs/heads/master
2021-01-13T03:09:42.346997
2017-02-07T01:43:59
2017-02-07T01:43:59
77,433,645
2
0
null
null
null
null
UTF-8
Java
false
false
1,384
java
package com.siweisoft.nurse.ui.base.bean.reqbean; import com.siweisoft.base.ui.bean.BaseBean; import com.siweisoft.network.bean.req.BaseReqBean; import com.siweisoft.network.bean.res.BaseResBean; /** * Created by ${viwmox} on 2016-11-16. */ public class BaseNurseReqBean extends BaseReqBean{ /**获取该指定病区的任务;可忽略,忽略时默认为当前用户所在的病区*/ private String rid; private String begin; private String end; private String zyh; private String patientid; private String regionid; public String getRegionid() { return regionid; } public void setRegionid(String regionid) { this.regionid = regionid; } public String getPatientid() { return patientid; } public void setPatientid(String patientid) { this.patientid = patientid; } public String getBegin() { return begin; } public void setBegin(String begin) { this.begin = begin; } public String getEnd() { return end; } public void setEnd(String end) { this.end = end; } public String getZyh() { return zyh; } public void setZyh(String zyh) { this.zyh = zyh; } public String getRid() { return rid; } public void setRid(String rid) { this.rid = rid; } }
[ "18721607438@163.com" ]
18721607438@163.com