blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
564d66179aac0308b65f51e6163e7f158965804e
d310d95f8040d6c71ac711643fcb3bca9d5a74e3
/IJLes1CommonStringMethods/src/faith.java
385b1dbbb578d0672c0a8c4b67a7c431b4167de2
[]
no_license
faithfem/newBoston
9a9c4272faef3abd3744c8fdd73d50bb1f27e85b
d00ca3146fca5ead1e7b06c4e331c9a5df4d24ee
refs/heads/master
2021-05-02T08:11:02.536182
2018-03-22T03:46:19
2018-03-22T03:46:19
120,846,011
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
/*public class faith { public static void main(String[]args){ String[] myString = {"funk", "chunk","furry", "bacon"}; //find words that start with fu //WHY DECLARE ANOTHER VARIABLE IN THE FOR LOOP? for (String x : myString) { //Why declare another variable x if (x.startsWith("fu")) System.out.println(x + " starts with fu"); } } }*/
3bef2e69039d07cd8c7a83bcbc118df0994c07b7
91ba343b150b74700952c8b32a002e7d462feec3
/src/main/java/com/luv2code/springboot/thymeleafdemo/entity/Employee.java
886c0d649065cd543528804062c2e71c1839e8fe
[]
no_license
Vivek131299/Spring-Boot-Thymeleaf-CRUD-Database-Project
c1be486314a28219dcdc90c930884360297ebc64
5a34d43be98076c50a6f6bf97e6d4fde6506f42b
refs/heads/master
2023-07-14T22:57:49.291261
2021-08-30T17:10:33
2021-08-30T17:10:33
401,379,608
0
0
null
null
null
null
UTF-8
Java
false
false
1,840
java
package com.luv2code.springboot.thymeleafdemo.entity; import javax.annotation.processing.Generated; import javax.persistence.*; @Entity @Table(name = "employee") public class Employee { // define fields @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email") private String email; // define constructors public Employee() { } public Employee(int id, String firstName, String lastName, String email) { this.id = id; this.firstName = firstName; this.lastName = lastName; this.email = email; } public Employee(String firstName, String lastName, String email) { this.firstName = firstName; this.lastName = lastName; this.email = email; } // define getters/setters public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } // define toString() @Override public String toString() { return "Employee{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + '}'; } }
fe09505010bb90a95bc3dee3877fc45618b05399
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
/SW_Expert_Academy/D0/Solution_D0_5658_보물상자비밀번호.java
fd6b82e4f485180320da92b97c7daed98b25d2b4
[]
no_license
refresh6724/APS
a261b3da8f53de7ff5ed687f21bb1392046c98e5
945e0af114033d05d571011e9dbf18f2e9375166
refs/heads/master
2022-02-01T23:31:42.679631
2021-12-31T14:16:04
2021-12-31T14:16:04
251,617,280
0
0
null
null
null
null
UTF-8
Java
false
false
1,782
java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.StringTokenizer; // 기존 제출일 2019-10-31 11:38 (풀이시간 11:03~11:38 약 30분) public class Solution_D0_5658_보물상자비밀번호 { // 수정 제출일 2020-03-01 21:54 static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); static StringTokenizer st = null; static StringBuilder sb = new StringBuilder(); static int N; static int K; public static void main(String[] args) throws Exception { int TC = Integer.parseInt(br.readLine()); for (int tc = 1; tc <= TC; tc++) { st = new StringTokenizer(br.readLine()); N = Integer.parseInt(st.nextToken()); K = Integer.parseInt(st.nextToken()); String line = br.readLine(); char[] arr = line.toCharArray(); HashSet<Integer> set = new HashSet<>(); int rot = N / 4; for (int i = 0; i < rot; i++) { set.add(Integer.parseInt(line.substring(0, rot), 16)); set.add(Integer.parseInt(line.substring(rot, rot * 2), 16)); set.add(Integer.parseInt(line.substring(rot * 2, rot * 3), 16)); set.add(Integer.parseInt(line.substring(rot * 3, rot * 4), 16)); // 회전 char tmp = arr[0]; for (int j = 1; j < N; j++) { arr[j - 1] = arr[j]; } arr[N - 1] = tmp; line = String.valueOf(arr); } ArrayList<Integer> array = new ArrayList(set); Collections.sort(array); sb.append("#").append(tc).append(" ").append(array.get(array.size() - K)).append("\n"); } bw.write(sb.toString()); bw.flush(); } }
5c29e21a5bbf103747a3b754756be2f46c6b439a
7a70f33d9a0130e9a59b2cbfafbc3e0ebddf754e
/app/src/main/java/com/example/dell/rare/Adapter/AutoCompleteCountryAdapter.java
76033d5c9f9b3d2845436cdc52df9625c0ed664c
[]
no_license
samarth30/RARE-REPAIR-USER-APP
5c3e230eec744fad48cde1906fb3d23835d5aaeb
cee7bcbb6dd0c148e0fedfa638f2a5498b00baaa
refs/heads/master
2022-04-14T09:10:44.548233
2020-04-08T17:15:19
2020-04-08T17:15:19
220,693,639
0
0
null
null
null
null
UTF-8
Java
false
false
2,867
java
package com.example.dell.rare.Adapter; import android.content.Context; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Filter; import android.widget.ImageView; import android.widget.TextView; import com.example.dell.rare.R; import com.example.dell.rare.classes.CountryItem; import java.util.ArrayList; import java.util.List; public class AutoCompleteCountryAdapter extends ArrayAdapter<CountryItem> { private List<CountryItem> countryListFull; public AutoCompleteCountryAdapter( Context context, List<CountryItem> countryList) { super(context,0,countryList); countryListFull = new ArrayList<>(countryList); } @NonNull @Override public Filter getFilter() { return countryFilter; } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { if(convertView == null){ convertView = LayoutInflater.from(getContext()).inflate(R.layout.country_autocomplete_row,parent,false); } TextView textViewName = convertView.findViewById(R.id.text_view_name); ImageView imageViewFlag = convertView.findViewById(R.id.image_view_flag); CountryItem countryItem = getItem(position); if(countryItem != null){ textViewName.setText(countryItem.getCountryName()); imageViewFlag.setImageResource(countryItem.getFlagImage()); } return convertView; } private Filter countryFilter = new Filter() { @Override protected FilterResults performFiltering(CharSequence constraint) { FilterResults results = new FilterResults(); List<CountryItem> suggestion = new ArrayList<>(); if(constraint == null || constraint.length() == 0){ suggestion.addAll(countryListFull); }else{ String filterPattern = constraint.toString().toLowerCase().trim(); for(CountryItem item : countryListFull){ if(item.getCountryName().toLowerCase().contains(filterPattern)){ suggestion.add(item); } } } results.values = suggestion; results.count = suggestion.size(); return results; } @Override protected void publishResults(CharSequence constraint, FilterResults results) { clear(); addAll((List)results.values); notifyDataSetChanged(); } @Override public CharSequence convertResultToString(Object resultValue) { return ((CountryItem)resultValue).getCountryName(); } }; }
a2f576f5184b7aa0eb7cfb5bac7b19b201e668b8
10b8732c7a77a09c5d3a07f00f64ac2c57d797d7
/src/java/Controladores/SoporteControlador.java
ff47d342abbf5ea604dd1736878796db49d56842
[]
no_license
CamiloGodoy09/AsistenteVial
3899ec47658b9938ca43389f48f495af356d7606
d8658a81b59d6ef90dd012715f4a7a55d71e1c72
refs/heads/master
2020-09-28T11:09:03.020027
2019-12-09T02:28:32
2019-12-09T02:28:32
226,766,234
0
0
null
null
null
null
UTF-8
Java
false
false
3,007
java
package Controladores; import DAO.SoporteDAO; import VO.SoporteVO; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author Juan */ @WebServlet(name = "SoporteControlador", urlPatterns = {"/Soporte"}) public class SoporteControlador extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); int opcion = Integer.parseInt(request.getParameter("opcion")); String idSoporte = null; String comentario = request.getParameter("txtcomentario"); String idCliente = request.getParameter("idCliente"); String usuario = request.getParameter("txtUsuario"); SoporteVO soporVO = new SoporteVO(comentario, idCliente, idSoporte, usuario); SoporteDAO soporDAO = new SoporteDAO(soporVO); if (soporDAO.AgregarRegistro()) { request.setAttribute("mensajeExitoso", "el comentario fue enviado correctamente"); request.getRequestDispatcher("soporte.jsp").forward(request, response); } else { request.setAttribute("mensajeError", "ERROR al enviar comentario"); request.getRequestDispatcher("soporte.jsp").forward(request, response); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
1ffeac613bb174d71e99ec9e8104fbf560253b4a
2bda5c6965856bf6692a97a57093a69cbd0071ea
/SalonManagement/src/com/gss/dao/EmployeeMyBatisRepository.java
15f92f8c5277a8d11ed9e3d4e1cf23385677ccb4
[]
no_license
JKSantos/AJAX-Sample
971f863175778a06a07a668813ef7956e33a6dcf
9fc81d86f35d24bb971007ddd8894474a8d3e2d9
refs/heads/master
2020-05-26T00:41:21.860266
2016-07-07T04:35:34
2016-07-07T04:35:34
62,775,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,705
java
package com.gss.dao; import java.io.Reader; import java.util.List; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import com.gss.model.Employee; import com.gss.model.EmployeeCategory; import com.gss.model.Job; public class EmployeeMyBatisRepository implements EmployeeRepository{ public List<Employee> getAllEmployee() { // TODO Auto-generated method stub return null; } public Employee getEmployeeByUserPass(String username, String password) { // TODO Auto-generated method stub return null; } public Employee getEmployeeByName() { // TODO Auto-generated method stub return null; } @Override public boolean createEmployee(Employee emp) { try{ Reader reader = Resources.getResourceAsReader("SqlMapConfig.xml"); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader); SqlSession session = sqlSessionFactory.openSession(); session.insert("Employee.insertEmployee", emp); session.commit(); session.close(); return true; } catch(Exception e){ return false; } } @Override public boolean updateEmployee(Employee emp) { // TODO Auto-generated method stub return false; } @Override public List<EmployeeCategory> getAllCategory() { // TODO Auto-generated method stub return null; } @Override public List<Job> getEmployeeJob(int empID) { // TODO Auto-generated method stub return null; } @Override public boolean deactivateEmployee(int empID) { // TODO Auto-generated method stub return false; } }
cc84378d96d30393ce7e789528e464fe8141fd94
4676fa9cae2c46799dcaef2380571b6db367e396
/src/com/blockempires/lineage/LineagePlugin.java
2a27802538b433c3fdf5a83e2104e65b42dec0b6
[]
no_license
adambratt/Lineage
b76dd24c59d5d3592bb8bda0a9d801ce87c65159
1454552a563a53ab9684fed02b82611b45fc0f48
refs/heads/master
2016-09-06T01:04:20.415151
2011-11-27T03:42:48
2011-11-27T03:42:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,645
java
package com.blockempires.lineage; import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.World; import org.bukkit.event.Event.Priority; import org.bukkit.event.Event.Type; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; import org.bukkit.util.config.Configuration; import ru.tehkode.permissions.PermissionManager; import ru.tehkode.permissions.bukkit.PermissionsEx; import com.blockempires.lineage.commands.AreaCommands; import com.blockempires.lineage.commands.LineageCommands; import com.iConomy.iConomy; import com.sk89q.worldguard.bukkit.WorldGuardPlugin; import com.sk89q.worldguard.protection.regions.ProtectedRegion; public class LineagePlugin extends JavaPlugin { private static final Logger log = Logger.getLogger("Minecraft"); private boolean eventsRegistered = false; private LineagePlayerListener playerListener; public static WorldGuardPlugin wgPlugin; private static iConomy ecoPlugin; private static LineageAreaManager areaManager; private static LineagePlugin instance; private static LineageRaceManager raceManager; private static PermissionManager permManager; public PluginManager pManage; public Configuration config; public static LineagePlugin getInstance(){ return LineagePlugin.instance; } public void serverlog(String msg) { // Just a simple little function that will put "[lineage]" before putting into the log // Use logger to output to console log.log(Level.INFO, "[Lineage] " + msg); } public void onEnable(){ //Save our instance LineagePlugin.instance=this; // Here's where the code goes when we load up the plugin to the server serverlog("Registering Events..."); registerEvents(); serverlog("Registering Commands..."); registerCommands(); serverlog("Loading Lineage Areas and Races..."); dependLoad(); serverlog("Version " + getDescription().getVersion() + " is enabled!"); } public void onDisable(){ //Log that we've been shutdown serverlog("Plugin is disabled!"); } private void dependLoad() { //Load dependencies first if(pManage.isPluginEnabled("PermissionsEx")){ permManager=PermissionsEx.getPermissionManager(); }else{ serverlog("PermissionsEx does not appear to be installed"); } if(pManage.isPluginEnabled("iConomy")){ Plugin eco=pManage.getPlugin("iConomy"); if(eco instanceof iConomy){ LineagePlugin.ecoPlugin=(iConomy) eco; } }else{ serverlog("iConomy does not appear to be installed"); //Need to die or something here } if(pManage.isPluginEnabled("WorldGuard")){ Plugin wg=pManage.getPlugin("WorldGuard"); if(wg instanceof WorldGuardPlugin){ LineagePlugin.wgPlugin=(WorldGuardPlugin) wg; } //Need to add error handling if it doesn't load }else{ serverlog("WorldGuard does not appear to be installed"); //Need to die or something here } //Now Load Configuration config = getConfiguration(); //Load Areas+Races LineagePlugin.areaManager=new LineageAreaManager(this); LineagePlugin.raceManager=new LineageRaceManager(this); } private void registerCommands(){ //register commands ... try { getCommand("lineager").setExecutor(new AreaCommands()); getCommand("lineage").setExecutor(new LineageCommands()); } catch (Exception e) { serverlog("Error: Commands not definated in 'plugin.yaml'"); } } private void registerEvents(){ if(!eventsRegistered){ playerListener=new LineagePlayerListener(this); pManage = getServer().getPluginManager(); pManage.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.High, this); pManage.registerEvent(Type.PLAYER_INTERACT, playerListener, Priority.Normal, this); //pManage.registerEvent(Type.PLAYER_TELEPORT, playerListener, Priority.High, this); } } public static ProtectedRegion getRegion(String regionName, World world){ ProtectedRegion region=LineagePlugin.getWorldGuard().getRegionManager(world).getRegion(regionName); if(region==null) return null; return region; } public static boolean regionExists(String regionName, World worldName){ ProtectedRegion r=LineagePlugin.getRegion(regionName, worldName); if(r==null) return false; return true; } public static iConomy getEconomy(){ return LineagePlugin.ecoPlugin; } public static WorldGuardPlugin getWorldGuard(){ return LineagePlugin.wgPlugin; } public static LineageAreaManager getAreaManager() { return areaManager; } public static LineageRaceManager getRaceManager() { return raceManager; } public static PermissionManager getPermissions() { return permManager; } }
2c7b2701084808ff654c3e9c866f970ae3b15435
6b4558648f6406c0adfd15ed60de02e26adea00f
/odin-visual/odin-monitor/src/main/java/com/diditech/odin/monitor/service/impl/RedisServiceImpl.java
c6c962d6a22d5fa6ff7989824eb8c23181a316e2
[]
no_license
edjian/odin
ed4d64de5aa9aafa141d8f4fe867112b10d3a39c
ea3d797c50ccacb16b80639a1b13230c4a2f0e99
refs/heads/master
2023-02-18T21:49:31.719980
2021-01-22T02:21:24
2021-01-22T02:21:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,730
java
package com.diditech.odin.monitor.service.impl; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.diditech.odin.monitor.service.RedisService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.RedisCallback; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import java.util.*; /** * @author diditech * @date 2019-05-08 */ @Slf4j @Service @AllArgsConstructor public class RedisServiceImpl implements RedisService { private RedisTemplate redisTemplate; /** * 获取内存信息 * @return */ @Override public Map<String, Object> getInfo() { Properties info = (Properties) redisTemplate.execute((RedisCallback) redisConnection -> redisConnection.info()); Properties commandStats = (Properties) redisTemplate .execute((RedisCallback) redisConnection -> redisConnection.info("commandstats")); Object dbSize = redisTemplate.execute((RedisCallback) redisConnection -> redisConnection.dbSize()); Map<String, Object> result = new HashMap<>(4); result.put("info", info); result.put("dbSize", dbSize); result.put("time", DateUtil.format(new Date(), DatePattern.NORM_TIME_PATTERN)); List<Map<String, String>> pieList = new ArrayList<>(); commandStats.stringPropertyNames().forEach(key -> { Map<String, String> data = new HashMap<>(4); String property = commandStats.getProperty(key); data.put("name", StrUtil.removePrefix(key, "cmdstat_")); data.put("value", StrUtil.subBetween(property, "calls=", ",usec")); pieList.add(data); }); result.put("commandStats", pieList); return result; } }
fd5daded4137a2eab1ded1850bd0f6ded8ac5cd3
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/linkvisual-20180120/src/main/java/com/aliyun/linkvisual20180120/models/CreatePictureSearchAppResponse.java
916ceeb5f31c8620cad7a46eb124f2fddfa84e60
[ "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
1,444
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.linkvisual20180120.models; import com.aliyun.tea.*; public class CreatePictureSearchAppResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public CreatePictureSearchAppResponseBody body; public static CreatePictureSearchAppResponse build(java.util.Map<String, ?> map) throws Exception { CreatePictureSearchAppResponse self = new CreatePictureSearchAppResponse(); return TeaModel.build(map, self); } public CreatePictureSearchAppResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public CreatePictureSearchAppResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public CreatePictureSearchAppResponse setBody(CreatePictureSearchAppResponseBody body) { this.body = body; return this; } public CreatePictureSearchAppResponseBody getBody() { return this.body; } }
f49b001ce30f93941eddd819daf339c6af31bb6a
eb6e1163ca5d0cbb110a34b985182a65261ab8b1
/src/Main/Menu.java
f2b9cb1fd238f7395a4d6a329d0fe2ee4afd9d5a
[]
no_license
diegocravo/OOPOOP.Exame
86074cc2dac6582b74d76e6cba9b01d8caf22af5
14257f226bf1465de8a9196de00c1ab439440764
refs/heads/master
2022-12-17T04:23:53.106021
2020-09-24T12:18:15
2020-09-24T12:18:15
295,467,571
0
0
null
null
null
null
UTF-8
Java
false
false
1,150
java
package Main; import java.util.Locale; import java.util.Scanner; public class Menu { public static void menu(){ Locale.setDefault(Locale.US); Scanner ler = new Scanner(System.in); boolean cond = true; while (cond){ System.out.println("Escolha uma opção: "); System.out.println("1. Cadastrar Exame"); System.out.println("2. Listar Exames"); System.out.println("3. Consultar Exame"); System.out.println("0. Sair"); String option = ler.nextLine(); switch (option){ case "1": Cadastrar.cadastrarExame(); break; case "2": Listar.listarExame(); break; case "3": Consultar.consultarExame(); break; case "0": System.out.println("Até mais"); cond = false; break; default: System.out.println("Opção Inválida"); } } } }
0e9975f22e9021d0b1856340178e86ecb18681c5
4b25c72f5db22f4d5154f887cf56d8b6da1d3f78
/windigo-library/src/com/windigo/RestApiFactory.java
8fd6cab6246cc9d3ab1d757ddc217b29b1a99a74
[ "Apache-2.0" ]
permissive
burakdede/windigo-android
c4692fd153a18876f907dfbc478bcf69e1c1204a
e652d1610f3a05b70128e977cc9873df17a738ee
refs/heads/master
2020-12-11T07:38:08.127622
2018-04-23T20:48:29
2018-04-23T20:48:29
18,631,959
0
1
null
null
null
null
UTF-8
Java
false
false
3,881
java
/* * Copyright (C) Burak Dede. * * 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.windigo; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.concurrent.ConcurrentHashMap; import com.windigo.annotations.Get; import com.windigo.annotations.Post; import com.windigo.annotations.RestApi; import com.windigo.http.client.ApacheHttpClient; import com.windigo.http.client.BaseHttpClient; import com.windigo.utils.GlobalSettings; /** * @author burakdede * * Factory class to generate new api and setup proxy instance * */ public class RestApiFactory { private static final ConcurrentHashMap<String, Object> cachedServices = new ConcurrentHashMap<String, Object>(); private static final ConcurrentHashMap<Method, RestApiMethodMetadata> cachedMethodMetaData = new ConcurrentHashMap<Method, RestApiMethodMetadata>(); @SuppressWarnings("unchecked") public static <T> T createNewService(String apiEndpointUrl, Class<T> restServiceClass, BaseHttpClient client) { T service; if (restServiceClass.isAnnotationPresent(RestApi.class)) { String restClassName = restServiceClass.getName(); service = (T) cachedServices.get(restClassName); if (service == null) { service = (T) Proxy.newProxyInstance(restServiceClass.getClassLoader(), new Class[] { restServiceClass }, new RestServiceInvocationHandler(apiEndpointUrl)); T found = (T) cachedServices.putIfAbsent(restClassName, service); if (found != null) { service = found; } setupMethodMetaDataCache(restServiceClass, client); } } else { throw new IllegalArgumentException(restServiceClass + " missing @RestApi annotation."); } return service; } public static <T> T createNewService(String apiEndpointUrl, Class<T> restServiceClass, BaseHttpClient client, boolean debugMode) { if (debugMode) { GlobalSettings.DEBUG = true; } else { GlobalSettings.DEBUG = false; } return createNewService(apiEndpointUrl, restServiceClass, client); } /** * Initialize method meta data cache for every method * * @param restServiceClass {@link T} * @param client {@link ApacheHttpClient} */ private static void setupMethodMetaDataCache(Class<?> restServiceClass, BaseHttpClient httpClient) { for (Method method : restServiceClass.getMethods()) { if (method.isAnnotationPresent(Get.class) || method.isAnnotationPresent(Post.class)) { cachedMethodMetaData.putIfAbsent(method, new RestApiMethodMetadata(method, httpClient)); } } } /** * Handle all the calls to rest service class * */ private static class RestServiceInvocationHandler implements InvocationHandler { private String baseUrl; public RestServiceInvocationHandler(String baseUrl) { this.baseUrl = baseUrl; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { RestApiMethodMetadata methodMetaDataCache = cachedMethodMetaData.get(method); try { if (methodMetaDataCache != null) { return methodMetaDataCache.invoke(baseUrl, args); } else { return method.invoke(this, args); } } catch (InvocationTargetException e) { throw e.getCause(); } } } }
7483ffd36a89a9c82fa8c662f639805411f3a7d3
903d33d00982c65788725f93bbd4068f02188c3c
/src/main/java/pattern/Chain/Handler/ConcreteHandlerC.java
abeb61a6dca3a29a01d9dd800756cfd5ff34e2a3
[]
no_license
WangJi92/utils
476d6d4802ed77f932125996f13609bdbd26a348
0ca450bdcb2bcaff46519275da5436ef2f27644e
refs/heads/master
2021-01-01T04:27:54.379957
2017-09-23T07:00:35
2017-09-23T07:00:35
97,178,063
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package pattern.Chain.Handler; import lombok.extern.slf4j.Slf4j; @Slf4j public class ConcreteHandlerC extends Handler { protected void handleProcess() { log.info("handle by ConcreteHandlerC"); } }
9e02fbe273cb09acc98a77e329ecca1fff250be9
63053c2be31e924310845e531f15ea95ca51f7a8
/src/main/java/main/bean/Interaction.java
d675d50b1f64dffa8b7b25d70e9b1e3b8c5e97a9
[]
no_license
EasyArch-ls/Gobang
f17269a2b3471acb3b2f4ae846224e45e96cdac8
5b08e07873783d8625aa6cb283c833de9c3a2651
refs/heads/master
2023-06-12T11:18:35.200204
2020-02-26T15:15:24
2020-02-26T15:15:24
242,694,128
1
0
null
2023-05-26T22:24:33
2020-02-24T09:24:05
JavaScript
UTF-8
Java
false
false
2,610
java
package main.bean; public class Interaction { private String url; private String name; private String houseid; private String houses; private String names; /** * r{0(不存在)/1(ok)/2(满)} */ private String r; /** * y/n 发给俩人 */ private String status="n"; private String first; /** * (15,黑) 坐标,颜色 */ private String s; private String color; private String type; private String hisname; private String hisstatus; private String index; private String res; public String getIndex() { return index; } public void setIndex(String index) { this.index = index; } public String getRes() { return res; } public void setRes(String res) { this.res = res; } public String getHisname() { return hisname; } public void setHisname(String hisname) { this.hisname = hisname; } public String getHisstatus() { return hisstatus; } public void setHisstatus(String hisstatus) { this.hisstatus = hisstatus; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getHouseid() { return houseid; } public void setHouseid(String houseid) { this.houseid = houseid; } public String getNames() { return names; } public void setNames(String names) { this.names = names; } public String getHouses() { return houses; } public void setHouses(String houses) { this.houses = houses; } public String getR() { return r; } public void setR(String r) { this.r = r; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getFirst() { return first; } public void setFirst(String first) { this.first = first; } public String getS() { return s; } public void setS(String s) { this.s = s; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } }
42ead67f60159d83c20fff356c2417d6eca318bd
b298dc46d0c57d282cb782ea63d6c80c2afb855e
/src/someCourse/Section_6/Cylinder/Cylinder.java
5afb26689f1908f0067baf0802c62b5bc69c5b39
[]
no_license
FrancisTheTerrible/someCourse
e3c788280791fc5ee04e8b673eb460ab2498d952
7248ffc6e3c46b2c9cf5fe353f936ffce2607bfb
refs/heads/master
2021-11-24T18:28:18.943335
2020-10-11T22:05:11
2020-10-11T22:05:11
211,921,157
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
package Section_6.Cylinder; public class Cylinder extends Circle { private double height; public Cylinder(double radius, double height) { super(radius); if (this.height < 0){ this.height = 0; } else { this.height = height; } } public double getHeight() { return height; } public double getVolume(){ return getArea() * getHeight(); } }
17c8c24540df452127d5eb044666b5ab2680a7c8
5a70dc0b17f2a5b2d1ca13685534840c8050099d
/app/src/animations/java/configure/test/configurebuilds/activities/test104/Animation104Activity.java
e637912b21f2de19961159e24509325e0af95cc3
[]
no_license
pankajnimgade/ConfigureBuilds
6ee100947d7f13e84e0059e8e0bf234f8d67e729
a23bf58085fa69264de51595a37815a2e64c6f79
refs/heads/master
2021-07-08T20:44:32.423245
2021-05-12T21:06:56
2021-05-12T21:06:56
124,326,139
0
0
null
2019-06-05T02:53:47
2018-03-08T02:40:27
Java
UTF-8
Java
false
false
3,355
java
/* * Copyright 2018 Pankaj Nimgade * * 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 configure.test.configurebuilds.activities.test104; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.constraintlayout.widget.ConstraintLayout; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; import configure.test.configurebuilds.R; public class Animation104Activity extends AppCompatActivity { private ConstraintLayout rootLayout; private Button removeButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_animation104); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); initializeUi(); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } private void initializeUi() { rootLayout = findViewById(R.id.Animation104Activity_rootView); removeButton = findViewById(R.id.Animation104Activity_remove_button); removeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ValueAnimator fadeAnim = ObjectAnimator.ofFloat(removeButton, "translationY", 400); final ValueAnimator translationY = ObjectAnimator.ofFloat(removeButton, "alpha", 1f, 0f); translationY.setDuration(350); fadeAnim.setDuration(350); fadeAnim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { super.onAnimationStart(animation); translationY.start(); } @Override public void onAnimationEnd(Animator animation) { rootLayout.removeView(removeButton); } }); fadeAnim.start(); } }); } }
5cb344676047d3adbc9b04af249716bcf33346be
350dd4c0c7c9894d6b7c0ca148651fa2a4568c0f
/src/main/java/com/example/vidu_clone/models/user_repository.java
f6e76fbd0753180522307c0bce16e357b8bed38f
[]
no_license
padaniyariyaz/vidu_clone_backend
1f01da07ab5b9ad38e65c23169b974d1f13b6a0f
669f9dea672d63a2dfb3dfcbc1a8196c461d805c
refs/heads/master
2023-07-03T00:48:56.041204
2021-08-15T16:04:32
2021-08-15T16:04:32
396,131,803
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.example.vidu_clone.models; import org.springframework.data.mongodb.repository.MongoRepository; public interface user_repository extends MongoRepository<users,String> { users findByUsername(String username); }
239fa105426f2c1fc1179a43d0c6dcd9bdb89ef5
8eb15f219dba828c76402ab7543a20ead523107d
/ProblemSolving/src/chapter4/Node.java
029a61429486ac163942e52f6c651cc435938795
[]
no_license
Sharmina/Programming-Practice
07100f4e6b47209898d4d4b606e692d60f7a32e5
ded121986db692e84df5f9d0aedbcb8e1722c897
refs/heads/master
2021-01-20T19:09:12.840551
2016-06-30T17:31:52
2016-06-30T17:31:52
61,092,234
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package chapter4; public class Node { int data; Node left; Node right; Node parent; Node(int data) { this.data=data; this.left=null; this.right=null; this.parent=null; } int getValue() { return this.data; } Node getLeft() { return this.left; } Node getRight() { return this.right; } Node getParent() { return this.parent; } }
19d12e360af0711bae24fc5d28123277021e4b18
1d8155a70fd0606b404bf9057e15edf30d4b7479
/Code/GA_FinalProjectHM/app/src/main/java/com/greenacademy/ga_finalprojecthm/model/ChiTietSanPham/SanPhamTranfers.java
aec65f8b341c6519febb5e626c89751d6affe257
[]
no_license
violet137/AndroidD005
92ad135ce186968db9d1ecd1a51afc299ed9e969
783c9f981ffdc2ff132cf62bfea5b94649e7c36c
refs/heads/master
2021-08-24T10:55:08.804746
2017-12-09T10:04:26
2017-12-09T10:04:26
108,132,403
1
0
null
null
null
null
UTF-8
Java
false
false
2,511
java
package com.greenacademy.ga_finalprojecthm.model.ChiTietSanPham; import java.util.ArrayList; /** * Created by Hoang Tin on 04-Dec-17. */ public class SanPhamTranfers { int ID; String Ten; String Ngaytao; int GiaTien; int GiaTienGiam; String MoTa; String ChiTiet; ArrayList<HinhByColor> hinhByColors =new ArrayList<>(); ArrayList<String> MauSac=new ArrayList<>(); ArrayList<String> Size=new ArrayList<>(); int[] SapPhamPhuHop; int DanhMucHangID; String LoaiThoiTrang; public int getID() { return ID; } public void setID(int ID) { this.ID = ID; } public String getTen() { return Ten; } public void setTen(String ten) { Ten = ten; } public String getNgaytao() { return Ngaytao; } public void setNgaytao(String ngaytao) { Ngaytao = ngaytao; } public int getGiaTien() { return GiaTien; } public void setGiaTien(int giaTien) { GiaTien = giaTien; } public int getGiaTienGiam() { return GiaTienGiam; } public void setGiaTienGiam(int giaTienGiam) { GiaTienGiam = giaTienGiam; } public String getMoTa() { return MoTa; } public void setMoTa(String moTa) { MoTa = moTa; } public String getChiTiet() { return ChiTiet; } public void setChiTiet(String chiTiet) { ChiTiet = chiTiet; } public ArrayList<HinhByColor> getHinhByColors() { return hinhByColors; } public void setHinhByColors(ArrayList<HinhByColor> hinhByColors) { this.hinhByColors = hinhByColors; } public ArrayList<String> getMauSac() { return MauSac; } public void setMauSac(ArrayList<String> mauSac) { MauSac = mauSac; } public ArrayList<String> getSize() { return Size; } public void setSize(ArrayList<String> size) { Size = size; } public int[] getSapPhamPhuHop() { return SapPhamPhuHop; } public void setSapPhamPhuHop(int[] sapPhamPhuHop) { SapPhamPhuHop = sapPhamPhuHop; } public int getDanhMucHangID() { return DanhMucHangID; } public void setDanhMucHangID(int danhMucHangID) { DanhMucHangID = danhMucHangID; } public String getLoaiThoiTrang() { return LoaiThoiTrang; } public void setLoaiThoiTrang(String loaiThoiTrang) { LoaiThoiTrang = loaiThoiTrang; } }
b0ce0b7c2c17db84f5f8b70880a92ae0c1e66095
ff860e1bbced4d9a7f669d0a30878ba04ab57110
/src/es/flasheat/model/Producto.java
aa0266d12bf383be90908e573083cbb36f17c26d
[]
no_license
JorginoSerra/FlashEat-Middleware
9f19a442078bba132690c54a2010294f9d3bb831
910917701bb3b37081020f6620dd92107aa54f1a
refs/heads/master
2021-02-18T03:28:41.566983
2020-03-20T18:17:12
2020-03-20T18:17:12
245,154,654
1
0
null
null
null
null
UTF-8
Java
false
false
955
java
package es.flasheat.model; public class Producto extends AbstractValueObject { private Long id = null; private String nombre = null; private String descripcion = null; private Long idRestaurante = null; private Double precio = null; public Producto(){ } public String getNombre() { return nombre; } public Long getId() { return id; } public void setNombre(String nombre) { this.nombre = nombre; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public Long getIdRestaurante() { return idRestaurante; } public void setIdRestaurante(Long idRestaurante) { this.idRestaurante = idRestaurante; } public void setId(Long id) { this.id = id; } public Double getPrecio() { return precio; } public void setPrecio(Double precio) { this.precio = precio; } }
[ "Jorgino@JorgeSerrano" ]
Jorgino@JorgeSerrano
14664bedaafb4fe2b5486dbdfd9f80ef47f59a56
af65e8ffa873aa63b96c7dd6d6b634ed3fbb28bd
/library/src/main/java/com/maogu/htclibrary/widget/imageviewtouch/easing/Back.java
0496a6f6f8726ca28e451bc3ed351e3934a8ac44
[]
no_license
wangchengmeng/RefreshRecyclerView
3d37d3c700658f7d9df1a24b742ea3f902b92166
7f46acdfb473db6051e3af928753ac845ad5338d
refs/heads/master
2021-09-01T18:44:40.941592
2017-12-28T09:08:13
2017-12-28T09:08:13
115,396,840
1
0
null
null
null
null
UTF-8
Java
false
false
1,272
java
package com.maogu.htclibrary.widget.imageviewtouch.easing; public class Back implements Easing { @Override public double easeOut(double time, double start, double end, double duration) { return easeOut(time, start, end, duration, 0); } @Override public double easeIn(double time, double start, double end, double duration) { return easeIn(time, start, end, duration, 0); } @Override public double easeInOut(double time, double start, double end, double duration) { return easeInOut(time, start, end, duration, 0.9); } public double easeIn(double t, double b, double c, double d, double s) { if (s == 0) s = 1.70158; return c * (t /= d) * t * ((s + 1) * t - s) + b; } public double easeOut(double t, double b, double c, double d, double s) { if (s == 0) s = 1.70158; return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; } public double easeInOut(double t, double b, double c, double d, double s) { if (s == 0) s = 1.70158; if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; } }
fa8cb2f2710b2d56e5671f255d88371f16ae3d54
c35ea5716b4611730b4f004154e92e6c07b22940
/test/com/facebook/buck/rules/FakeAbstractBuildRuleBuilderParams.java
474e9946b6daed49829b13476b7bb45a97d14a57
[ "Apache-2.0" ]
permissive
belomx/open_tools
40665bf2171aec7ccd9740b2686990350882e959
40edf05000921cfbfe41c3440e94220357e40ba5
refs/heads/master
2021-01-20T12:12:39.789164
2015-06-08T13:32:25
2015-06-08T13:32:25
36,820,163
0
0
null
null
null
null
UTF-8
Java
false
false
1,118
java
/* * Copyright 2013-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.rules; import com.facebook.buck.testutil.IdentityPathRelativizer; import com.google.common.base.Function; import java.nio.file.Path; public class FakeAbstractBuildRuleBuilderParams implements AbstractBuildRuleBuilderParams { @Override public Function<String, Path> getPathRelativizer() { return IdentityPathRelativizer.getIdentityRelativizer(); } @Override public RuleKeyBuilderFactory getRuleKeyBuilderFactory() { return new FakeRuleKeyBuilderFactory(); } }
563cfc40ff8b2ae7b0febd30b0623bced33ecdba
74b112ef5bf6cba400b0e0339fcec53dda6d8473
/j2se/core/src/test/java/net/jxta/impl/cm/sql/DerbySeedDbGenerator.java
bc8a9c29784bb1ab0c1f561a8a5eed789718a327
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
iBarryZhang/jxta
a2b0f1b284d183b17ef93ced24de2452f1cea8b4
7df0fde855fd6c8dfaf565721f94d671cc99a74b
refs/heads/master
2022-03-10T18:42:23.762200
2012-07-11T04:05:37
2012-07-11T04:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package net.jxta.impl.cm.sql; import java.io.File; import java.io.IOException; public class DerbySeedDbGenerator { public static void main(String[] args) throws IOException { File storeRoot = new File("derby_seed2"); DerbyAdvertisementCache cache = new DerbyAdvertisementCache(storeRoot.toURI(), "testArea"); cache.stop(); } }
[ "utvikler@bb6347ba-dd5b-cb82-9178-e950404d9c8c" ]
utvikler@bb6347ba-dd5b-cb82-9178-e950404d9c8c
494bad74b6c0832f32368eff4cbbee13fa68e950
41a90da820c5c9d85a479610ce43845fc4e36bc3
/guvnor-structure/guvnor-structure-client/src/test/java/org/guvnor/structure/client/editors/repository/list/RepositoriesViewTest.java
29edd979dbfc04f994614453d1b53d850de5e256
[ "Apache-2.0" ]
permissive
latikaV/guvnor
2fb53db17827c9f42490eb0cb46a81b338ac9d6b
5d48a98d7fd12b8344778801aaf81a6380d5d6fa
refs/heads/master
2021-01-18T04:13:29.129765
2016-02-23T15:36:09
2016-02-23T16:46:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,333
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.guvnor.structure.client.editors.repository.list; import java.util.HashMap; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Widget; import com.google.gwtmockito.GwtMockitoTestRunner; import org.guvnor.structure.repositories.Repository; import org.guvnor.structure.repositories.impl.git.GitRepository; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; @RunWith(GwtMockitoTestRunner.class) public class RepositoriesViewTest { @Mock private RepositoriesView view; @Before public void init() { doCallRealMethod().when( view ).removeIfExists( any( Repository.class ) ); } @Test public void removeIfExistsTest() { view.repositoryToWidgetMap = new HashMap<Repository, Widget>(); view.panel = GWT.create( FlowPanel.class ); Repository r1 = new GitRepository( "r1" ); Repository r2 = new GitRepository( "r2" ); Repository r3 = new GitRepository( "r3" ); final RepositoriesViewItem i1 = new RepositoriesViewItem( r1.getAlias(), null, null, null, null, null, null, null ); final RepositoriesViewItem i2 = new RepositoriesViewItem( r1.getAlias(), null, null, null, null, null, null, null ); view.repositoryToWidgetMap.put( r1, i1 ); view.repositoryToWidgetMap.put( r2, i2 ); view.removeIfExists( r1 ); view.removeIfExists( r3 ); verify( view.panel ).remove( i1 ); verify( view.panel, times( 1 ) ).remove( any( RepositoriesViewItem.class ) ); } }
51b1304ca6ae29168cb522d5d8ce50c3f966a402
f711b7de8d7cdd357ac9962c29b19f95f5db2647
/RapiServer/src/rest/RestCaracteristicas.java
183459d0fc0bac0184aa1a1be3466868979172cc
[]
no_license
jdipasqua/RapiServer
d1d8dd1a11095535cf9e64b565423ed4f6b5c644
4e27e7983105dcf1854eef312310ae6c16254c69
refs/heads/master
2021-01-10T09:03:22.557416
2016-03-22T21:27:40
2016-03-22T21:27:40
46,498,749
0
0
null
null
null
null
UTF-8
Java
false
false
821
java
package rest; import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import controladores.ControladorCaracteristicas; import controladores.ControladorGenerico; import entidades.Caracteristica; @Path("caracteristicas") public class RestCaracteristicas { @SuppressWarnings("unchecked") @GET @Path("todas") @Produces(MediaType.APPLICATION_JSON) public List<Caracteristica> getCaracteristicas () { return new ControladorGenerico().buscarTodos(Caracteristica.class); } @POST @Path("nueva") @Consumes(MediaType.APPLICATION_JSON) public boolean agregarCaracteristica (Caracteristica caracteristica) { return new ControladorCaracteristicas().agregar(caracteristica); } }
9c19be090bf1ff41b480a2c7b2579bd9438af82d
6bd4493a07335630c22d71b6fdf555e2b5136bc5
/grid/com/exilant/exility/core/GridProcessorInterface.java
f2ff6d2d6171c6988662fbd5b223871db2ebb413
[ "MIT" ]
permissive
guruprasad015/ExilityCore-5.0.0
74f9f3778345443f5772964e60061d8504b58ea6
d29cc34d031057a115a80e41f443804d86587819
refs/heads/master
2021-01-10T22:38:51.510347
2015-06-15T06:59:27
2015-06-15T06:59:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
/* ******************************************************************************************************* Copyright (c) 2015 EXILANT Technologies Private Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************************************** */ package com.exilant.exility.core; /** * manipulate a grid */ public interface GridProcessorInterface { /** * carry out desired manipulation * * @param dc * @return 0 if no work was done. number that can have some meaning. for * example number of rows copied. */ int process(DataCollection dc); }
e82b8ade7822fd8e2029fd461616bf8d4983eba3
05ba0c43830913e5666c8b7a22c0ea0161829a00
/FirebaseAutenticacao/app/src/main/java/com/example/firebaseautenticacao/CadastrarActivity.java
4531b2d0d638f82bc5337f0b5f61a3b0c63b635c
[]
no_license
AlexandreMundoJS/projeto-curso-git
ca66de0dcf3c1f147a35ca9665f0f69f8fbdfc05
06353e75e01af22f2c3e8aa8b44899fb52091a9f
refs/heads/master
2022-12-23T01:33:03.423671
2020-10-07T14:31:38
2020-10-07T14:31:38
290,262,835
0
0
null
null
null
null
UTF-8
Java
false
false
4,872
java
package com.example.firebaseautenticacao; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.os.PersistableBundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; public class CadastrarActivity extends AppCompatActivity implements View.OnClickListener { private EditText editText_Email, editText_Senha, editText_SenhaRepetir; private Button button_Cadastrar, button_Cancelar; private FirebaseAuth auth; @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_cadastrar); editText_Email = (EditText) findViewById(R.id.editText_EmailCadastro); editText_Senha = (EditText) findViewById(R.id.editText_SenhaCadastro); editText_SenhaRepetir = (EditText) findViewById(R.id.editText_SenhaRepetirCadastro); button_Cadastrar = (Button) findViewById(R.id.button_CadastrarUsuario); button_Cancelar = (Button) findViewById(R.id.button_Cancelar); button_Cadastrar.setOnClickListener(this); //button_Cancelar.setOnClickListener(this); //Autenticação firebase auth = FirebaseAuth.getInstance(); } @Override public void onClick(View view) { switch (view.getId()){ case R.id.button_CadastrarUsuario: cadastrar(); break; } } private void cadastrar(){ //Criar usuário com email e senha = ADICONAR USUARIO AUTENTICAÇÃO FIREBASE //addOnCompleteListener = tratamento de erro(E=mail completo) String email = editText_Email.getText().toString().trim(); String senha = editText_Senha.getText().toString().trim(); String confirmaSenha = editText_SenhaRepetir.getText().toString().trim(); //Tratamento de erros // Se algum dos campos estiverem vazios if (email.isEmpty() || senha.isEmpty() || confirmaSenha.isEmpty()) { Toast.makeText(getBaseContext(), "Erro - preencha os campos vazios", Toast.LENGTH_LONG).show(); }else{ //Verifica se as senhas sao iguais if (senha.contentEquals(confirmaSenha)){ if (Util.verificarInternet(this)) { criarUsuario(email, senha); }else{ Toast.makeText(getBaseContext(), "Erro - Verifique sua conexão com a internet", Toast.LENGTH_LONG).show(); } }else{ Toast.makeText(getBaseContext(), "Erro - Senhas diferentes", Toast.LENGTH_LONG).show(); } } } private void criarUsuario(String email, String senha){ auth.createUserWithEmailAndPassword(email, senha).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { //Firebase responde se houve sucesso ou erro através da task @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()){ FirebaseAuth auth = FirebaseAuth.getInstance(); FirebaseUser user = auth.getCurrentUser(); user.sendEmailVerification() .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { Toast.makeText(getBaseContext(), "Acesse seu e-mail e valide seu cadastro.", Toast.LENGTH_LONG).show(); }else { Toast.makeText(getBaseContext(), "Falha ao enviar e-mail de confirmação. Tente novamente mais tarde.", Toast.LENGTH_LONG).show(); } } }); // startActivity(new Intent(getBaseContext(), PrincipalActivity.class)); // Toast.makeText(getBaseContext(), "Cadastro Efetuado com sucesso", Toast.LENGTH_LONG).show(); // finish(); }else{ String resposta = task.getException().toString(); Util.opcoesErro(getBaseContext(), resposta); } } }); } }
b0a3343fad3c305590520cfaaedc972573e6a982
136cd6b37c4c1320357c91587a7dd729cefb0065
/eureka-security-server/src/main/java/com/allan/cloud/config/WebSecurityConfig.java
f2d920b8d5739c7d86ca0b2146f8db3e5860dc3d
[]
no_license
yanglin1501804006/springcloud-learning
e1719d5a7c1e0ea4a95fa6bb5f6447bb26a9f9e2
9781259c619cb2197c19fe522ddc59e7b799267f
refs/heads/main
2021-07-09T03:37:52.262394
2020-12-01T08:27:00
2020-12-01T08:27:00
317,466,202
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package com.allan.cloud.config; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; /** * 默认情况下添加SpringSecurity依赖的应用每个请求都需要添加CSRF token才能访问, * Eureka客户端注册时并不会添加,所以需要配置/eureka/**路径不需要CSRF token。 * Created by macro on 2019/8/28. */ @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().ignoringAntMatchers("/eureka/**"); super.configure(http); } }
064e97f7f400f76021b6c0674ffa9bc5f489dbbd
9b105e7feb4b6bb7b5d0cae8ee5df623fabd84f0
/wxpay-java-sdk/src/main/java/com/tencent/protocol/refund_protocol/RefundReqData.java
089d2c6bc4be8f7ea43a47a7f6b785f578aac21c
[]
no_license
fushun1990/pay
c88ab9916443b969174c036d127683cb79bda0de
8474bbc57510ede5b4ea2d406e0ca2e45d4212f0
refs/heads/master
2021-08-30T23:42:55.589578
2019-08-08T08:22:45
2019-08-08T08:22:45
173,144,419
5
4
null
2021-08-13T15:23:09
2019-02-28T16:12:52
Java
UTF-8
Java
false
false
3,388
java
package com.tencent.protocol.refund_protocol; import com.tencent.common.Configure; import com.tencent.protocol.base_protocol.BaseReqData; /** * User: rizenguo * Date: 2014/10/25 * Time: 16:12 */ public class RefundReqData extends BaseReqData { //每个字段具体的意思请查看API文档 /** * 是微信系统为每一笔支付交易分配的订单号,通过这个订单号可以标识这笔交易,它由支付订单API支付成功时返回的数据里面获取到。建议优先使用 */ private String transaction_id = ""; /** * 商户系统内部的订单号,transaction_id 、out_trade_no 二选一,如果同时存在优先级:transaction_id>out_trade_no */ private String out_trade_no = ""; /** * 商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔 */ private String out_refund_no = ""; /** * 订单总金额,单位为分 */ private int total_fee = 0; /** * 退款总金额,单位为分,可以做部分退款 */ private int refund_fee = 0; /** * 货币类型,符合ISO 4217标准的三位字母代码,默认为CNY(人民币) */ private String refund_fee_type = "CNY"; /** * 操作员帐号, 默认为商户号 */ private String op_user_id = ""; /** * 微信 退款源 */ private String refund_account; /** * 退款原因 */ private String refund_desc; /** * 请求退款服务 * * @param deviceInfo 微信支付分配的终端设备号,与下单一致 */ public RefundReqData(String deviceInfo, Configure configure) { super(deviceInfo, configure); this.op_user_id = this.getMch_id(); } public String getTransaction_id() { return transaction_id; } public void setTransaction_id(String transaction_id) { this.transaction_id = transaction_id; } public String getOut_trade_no() { return out_trade_no; } public void setOut_trade_no(String out_trade_no) { this.out_trade_no = out_trade_no; } public String getOut_refund_no() { return out_refund_no; } public void setOut_refund_no(String out_refund_no) { this.out_refund_no = out_refund_no; } public int getTotal_fee() { return total_fee; } public void setTotal_fee(int total_fee) { this.total_fee = total_fee; } public int getRefund_fee() { return refund_fee; } public void setRefund_fee(int refund_fee) { this.refund_fee = refund_fee; } public String getOp_user_id() { return op_user_id; } public void setOp_user_id(String op_user_id) { this.op_user_id = op_user_id; } public String getRefund_fee_type() { return refund_fee_type; } public void setRefund_fee_type(String refund_fee_type) { this.refund_fee_type = refund_fee_type; } public String getRefund_account() { return refund_account; } public void setRefund_account(String refund_account) { this.refund_account = refund_account; } public String getRefund_desc() { return refund_desc; } public void setRefund_desc(String refund_desc) { this.refund_desc = refund_desc; } }
786a9c475d5b16cf73b146a9b912d80818b68d95
3eac9b253d47edb8850b5a1d319d89a3018d9f69
/quiz-core/src/main/java/fr/epita/quiz/datamodel/Options.java
372aee8d236de5690453ef1e4dba7a390e0a6111
[]
no_license
Shivank-Mittal/AdvJavaProject
f863693d08af5d1c2471a2b7e86f8ab623e9b2b9
a445c9d45d1eca3d981b414d7392b5af1dac7233
refs/heads/master
2022-12-21T15:49:18.662363
2019-12-12T06:07:03
2019-12-12T06:07:03
227,531,428
0
0
null
2022-12-16T14:51:11
2019-12-12T05:58:32
Java
UTF-8
Java
false
false
1,224
java
package fr.epita.quiz.datamodel; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="Options") public class Options { public Options() { } public Options( int Questionid, String Option, boolean CorrectOption) { this.questionId=Questionid; this.options= Option; this.correctOption= CorrectOption; } @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="ID") private Integer id; @Column(name="Question_ID") private int questionId; @Column(name="Options") private String options; @Column(name="CorrectOption") private boolean correctOption; public int getQuestionId() { return questionId; } public void setQuestionId(int questionId) { this.questionId = questionId; } public String getOptions() { return options; } public void setOptions(String options) { this.options = options; } public boolean isCorrectOption() { return correctOption; } public void setCorrectOption(boolean correctOption) { this.correctOption = correctOption; } public Integer getId() { return id; } }
c3c208b821e614615fc05ae7c7c44f0fe7ded9cb
02b3d36ad44452194d2e4f5c93fdbac164152fbb
/higgs-network-wallet-domain/src/main/java/com/higgs/network/wallet/domain/AutoOnchainPartnerinfo.java
5d8d914b0aa151b67f08b4b90adb348c7c103d02
[]
no_license
higgsnetwork/higgsnetwork_wallet
c7705391947c7c52a7c989d08a024fb53171bf8a
3622a6567f5ec358a7ca2d6666dc059e0e485b3f
refs/heads/master
2022-07-02T10:53:57.877110
2019-09-11T14:46:12
2019-09-11T14:46:12
191,108,224
0
0
null
2022-06-17T02:14:47
2019-06-10T06:14:55
Java
UTF-8
Java
false
false
873
java
package com.higgs.network.wallet.domain; public class AutoOnchainPartnerinfo { private Integer id; private Integer partnerId; private String onchainTokenBase; private Integer status; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getPartnerId() { return partnerId; } public void setPartnerId(Integer partnerId) { this.partnerId = partnerId; } public String getOnchainTokenBase() { return onchainTokenBase; } public void setOnchainTokenBase(String onchainTokenBase) { this.onchainTokenBase = onchainTokenBase == null ? null : onchainTokenBase.trim(); } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } }
08406d3d7a91ae5ef4b289b44e7f4a20249524b7
9065c26f240482408019a9d17f2cfcd6187e2cd3
/Practice/src/main/java/com/subrat/findDuplicates/FindDuplicateFrom1Ton.java
182d2fb817f89db594d169c2513dd4fec6e05af0
[]
no_license
SangeethaSivasamy/Practice
62b372f56ba6e4efa250317d0ef55cd313e34c6b
e62bf383fa1cc693d458464fd6eadf1d68ae0d48
refs/heads/master
2021-01-01T06:24:38.572528
2017-05-18T15:45:14
2017-05-18T15:45:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
/** * */ package com.subrat.findDuplicates; /** * @author sparida * */ public class FindDuplicateFrom1Ton { /** * @param args */ public static void main(String[] args) { int[] array = new int[]{1,2,4,3,2,6,2}; FindDuplicateFrom1Ton duplicate = new FindDuplicateFrom1Ton(); duplicate.find(array); } private void find(int[] array) { int index = 0; while(true){ int element = array[index]; if(array[element] == element){ System.out.println("Duplicate element :"+element+" found"); break; }else{ int temp = array[index]; array[index] = array[element]; array[element] = temp; } } } }
c96a8c813e1b7419c1bef31d8372d6826ce9802c
a612adad5242bec80c3e19d13331cbbfd0f35f30
/src/org/leyfer/thesis/TouchLogger/helper/UploadGesturesScheduler.java
ccbe4f0abc41fcbe312a85fd537ee8f9fc84872e
[ "Apache-2.0" ]
permissive
BOOtak/touchlogger-client
5f66610b33a8459003a4dc43cc4ad7a68e4930b3
f34c9debcb2dc8dd0d2e5abb8eba54db04f3b778
refs/heads/master
2023-07-05T07:57:07.110925
2016-01-18T16:18:59
2016-01-18T16:18:59
49,286,461
4
2
null
null
null
null
UTF-8
Java
false
false
1,167
java
package org.leyfer.thesis.TouchLogger.helper; import android.content.Context; import android.content.SharedPreferences; public class UploadGesturesScheduler { private final String GESTURE_SHAREDPREFS_ID = "org.leyfer.thesis.sharedPrefsKey"; private final String NEED_UPLOAD = "org.leyfer.thesis.needUpload"; private final Context mContext; public boolean needUploadGestures() { SharedPreferences prefs = mContext.getSharedPreferences(GESTURE_SHAREDPREFS_ID, Context.MODE_PRIVATE); return prefs.getBoolean(NEED_UPLOAD, false); } public void setNeedUploadGestures(boolean state) { SharedPreferences prefs = mContext.getSharedPreferences(GESTURE_SHAREDPREFS_ID, Context.MODE_PRIVATE); prefs.edit().putBoolean(NEED_UPLOAD, state).apply(); } private static UploadGesturesScheduler ourInstance; public static UploadGesturesScheduler getInstance(Context context) { if (ourInstance == null) { ourInstance = new UploadGesturesScheduler(context); } return ourInstance; } private UploadGesturesScheduler(Context context) { mContext = context; } }
28cd755cd9499f1ce676348b9bb7af1c64518224
74b47b895b2f739612371f871c7f940502e7165b
/aws-java-sdk-iotwireless/src/main/java/com/amazonaws/services/iotwireless/model/SessionKeysAbpV11.java
ebec353137a0a53875fc9616ce6399a9f5a95b7e
[ "Apache-2.0" ]
permissive
baganda07/aws-sdk-java
fe1958ed679cd95b4c48f971393bf03eb5512799
f19bdb30177106b5d6394223a40a382b87adf742
refs/heads/master
2022-11-09T21:55:43.857201
2022-10-24T21:08:19
2022-10-24T21:08:19
221,028,223
0
0
Apache-2.0
2019-11-11T16:57:12
2019-11-11T16:57:11
null
UTF-8
Java
false
false
7,941
java
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.iotwireless.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Session keys for ABP v1.1 * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/iotwireless-2020-11-22/SessionKeysAbpV1_1" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SessionKeysAbpV11 implements Serializable, Cloneable, StructuredPojo { /** * <p> * The FNwkSIntKey value. * </p> */ private String fNwkSIntKey; /** * <p> * The SNwkSIntKey value. * </p> */ private String sNwkSIntKey; /** * <p> * The NwkSEncKey value. * </p> */ private String nwkSEncKey; /** * <p> * The AppSKey value. * </p> */ private String appSKey; /** * <p> * The FNwkSIntKey value. * </p> * * @param fNwkSIntKey * The FNwkSIntKey value. */ public void setFNwkSIntKey(String fNwkSIntKey) { this.fNwkSIntKey = fNwkSIntKey; } /** * <p> * The FNwkSIntKey value. * </p> * * @return The FNwkSIntKey value. */ public String getFNwkSIntKey() { return this.fNwkSIntKey; } /** * <p> * The FNwkSIntKey value. * </p> * * @param fNwkSIntKey * The FNwkSIntKey value. * @return Returns a reference to this object so that method calls can be chained together. */ public SessionKeysAbpV11 withFNwkSIntKey(String fNwkSIntKey) { setFNwkSIntKey(fNwkSIntKey); return this; } /** * <p> * The SNwkSIntKey value. * </p> * * @param sNwkSIntKey * The SNwkSIntKey value. */ public void setSNwkSIntKey(String sNwkSIntKey) { this.sNwkSIntKey = sNwkSIntKey; } /** * <p> * The SNwkSIntKey value. * </p> * * @return The SNwkSIntKey value. */ public String getSNwkSIntKey() { return this.sNwkSIntKey; } /** * <p> * The SNwkSIntKey value. * </p> * * @param sNwkSIntKey * The SNwkSIntKey value. * @return Returns a reference to this object so that method calls can be chained together. */ public SessionKeysAbpV11 withSNwkSIntKey(String sNwkSIntKey) { setSNwkSIntKey(sNwkSIntKey); return this; } /** * <p> * The NwkSEncKey value. * </p> * * @param nwkSEncKey * The NwkSEncKey value. */ public void setNwkSEncKey(String nwkSEncKey) { this.nwkSEncKey = nwkSEncKey; } /** * <p> * The NwkSEncKey value. * </p> * * @return The NwkSEncKey value. */ public String getNwkSEncKey() { return this.nwkSEncKey; } /** * <p> * The NwkSEncKey value. * </p> * * @param nwkSEncKey * The NwkSEncKey value. * @return Returns a reference to this object so that method calls can be chained together. */ public SessionKeysAbpV11 withNwkSEncKey(String nwkSEncKey) { setNwkSEncKey(nwkSEncKey); return this; } /** * <p> * The AppSKey value. * </p> * * @param appSKey * The AppSKey value. */ public void setAppSKey(String appSKey) { this.appSKey = appSKey; } /** * <p> * The AppSKey value. * </p> * * @return The AppSKey value. */ public String getAppSKey() { return this.appSKey; } /** * <p> * The AppSKey value. * </p> * * @param appSKey * The AppSKey value. * @return Returns a reference to this object so that method calls can be chained together. */ public SessionKeysAbpV11 withAppSKey(String appSKey) { setAppSKey(appSKey); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFNwkSIntKey() != null) sb.append("FNwkSIntKey: ").append(getFNwkSIntKey()).append(","); if (getSNwkSIntKey() != null) sb.append("SNwkSIntKey: ").append(getSNwkSIntKey()).append(","); if (getNwkSEncKey() != null) sb.append("NwkSEncKey: ").append(getNwkSEncKey()).append(","); if (getAppSKey() != null) sb.append("AppSKey: ").append(getAppSKey()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SessionKeysAbpV11 == false) return false; SessionKeysAbpV11 other = (SessionKeysAbpV11) obj; if (other.getFNwkSIntKey() == null ^ this.getFNwkSIntKey() == null) return false; if (other.getFNwkSIntKey() != null && other.getFNwkSIntKey().equals(this.getFNwkSIntKey()) == false) return false; if (other.getSNwkSIntKey() == null ^ this.getSNwkSIntKey() == null) return false; if (other.getSNwkSIntKey() != null && other.getSNwkSIntKey().equals(this.getSNwkSIntKey()) == false) return false; if (other.getNwkSEncKey() == null ^ this.getNwkSEncKey() == null) return false; if (other.getNwkSEncKey() != null && other.getNwkSEncKey().equals(this.getNwkSEncKey()) == false) return false; if (other.getAppSKey() == null ^ this.getAppSKey() == null) return false; if (other.getAppSKey() != null && other.getAppSKey().equals(this.getAppSKey()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFNwkSIntKey() == null) ? 0 : getFNwkSIntKey().hashCode()); hashCode = prime * hashCode + ((getSNwkSIntKey() == null) ? 0 : getSNwkSIntKey().hashCode()); hashCode = prime * hashCode + ((getNwkSEncKey() == null) ? 0 : getNwkSEncKey().hashCode()); hashCode = prime * hashCode + ((getAppSKey() == null) ? 0 : getAppSKey().hashCode()); return hashCode; } @Override public SessionKeysAbpV11 clone() { try { return (SessionKeysAbpV11) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.iotwireless.model.transform.SessionKeysAbpV11Marshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
9cdd6d692e2a1adbcddcc2221e23aa0b7fd8918e
89a020e209d84c219430b73c5c5218766e66ac98
/src/main/java/org/step/linked/step/util/DbHelper.java
467dc603fe97436ebcbbe4e150134248d491320e
[]
no_license
vdanke/LinkedStepSpringBoot
576b4b1a979464a526f482de28f8864f435662f3
6e3648c8404b4b88fcfd22c1a5dd402fc3c68e9f
refs/heads/master
2022-12-30T12:34:59.502980
2020-10-13T03:45:34
2020-10-13T03:45:34
300,341,897
0
0
null
null
null
null
UTF-8
Java
false
false
619
java
package org.step.linked.step.util; import org.springframework.stereotype.Component; import org.step.linked.step.entity.projection.IdProjection; import org.step.linked.step.repository.LinkedCommonRepository; @Component public class DbHelper<T> { public Long generateId(LinkedCommonRepository<T> commonRepository) { final long startId = 1L; long newId; IdProjection maxId = commonRepository.findTopByOrderByIdDesc(); if (maxId == null) { newId = startId; } else { newId = maxId.getId(); ++newId; } return newId; } }
0cec8cd8facecc65739b3d937e7781d3b09b0840
be09e63895fe2eab2e141b664c082854a10b4d9d
/6_GeoParser/ClassPath/src/com/usc/edu/vanila/ExtractText.java
9f9251eca7eb1e6c6b8d5fce58fb597fec2791a9
[]
no_license
RashmiNalwad/Scientific-Content-Enrichment-in-the-Text-Retrieval-Conference-TREC-Polar-Dynamic-Dataset-
e38e5dffb8245e4e5e8a935f628231dd9e2e2a4a
9c623fafa98283f75d74848e441d25595d7859bf
refs/heads/master
2020-09-13T09:19:50.866772
2016-08-17T22:56:59
2016-08-17T22:56:59
65,946,938
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
package com.usc.edu.vanila; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import org.apache.tika.Tika; import org.apache.tika.exception.TikaException; import org.apache.tika.metadata.Metadata; import org.apache.tika.parser.AutoDetectParser; import org.apache.tika.parser.ParseContext; import org.apache.tika.parser.Parser; import org.apache.tika.sax.BodyContentHandler; import org.xml.sax.SAXException; public class ExtractText { public static void main(String[] args) throws IOException, SAXException, TikaException { Tika tika = new Tika(); Path path = Paths.get(args[0]); File dir = new File(path.toString()); File[] files = dir.listFiles(); for (File file:files) { if(file.isFile()) { try { FileInputStream inputstream = new FileInputStream(file); System.out.println(file.getName()); String filecontent = tika.parseToString(file); FileWriter fileWriter = new FileWriter("./src/geot/"+file.getName().replaceFirst("[.][^.]+$", "")+".geot"); BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); System.out.println("Extracted Content:\n" + filecontent); bufferedWriter.write(filecontent); /*Parser parser = new AutoDetectParser(); BodyContentHandler handler = new BodyContentHandler(); Metadata metadata = new Metadata(); ParseContext context = new ParseContext(); parser.parse(inputstream, handler, metadata, context); String[] metadataNames = metadata.names(); for(String name : metadataNames) { System.out.println(name + ": " + metadata.get(name)); String result = (name+": "+ metadata.get(name)); System.out.println(result); }*/ inputstream.close(); bufferedWriter.close(); }//end try catch (Exception exception) { } } } } }
97df9ce8b95ded8891aadb11f07b451aede197f3
86866bbcca1092e42325e7ed18e0e09f06ade845
/clustering/src/main/java/de/hpi/smm/evaluation/EvaluationResult.java
288856fa553b2d8f51c8cb5846a91439a156e869
[ "MIT" ]
permissive
tabergma/similar_author_identification
1f8656d92c25eb44d61b54d2cbb088ca28ad66c9
15ca2bd44f1ff19bf62317f7b146f501a2e60699
refs/heads/master
2021-05-28T07:55:41.525889
2015-02-24T21:14:07
2015-02-24T21:14:07
25,924,586
0
0
null
null
null
null
UTF-8
Java
false
false
1,163
java
package de.hpi.smm.evaluation; import de.hpi.smm.sets.Author; public class EvaluationResult { private static final String FORMAT = "Author %s -> cluster %d: F-measure = %.2f (precision = %.2f, recall = %.2f)."; private final double fMeasure; private final Author author; private final int cluster; private final double precision; private final double recall; public EvaluationResult(Author author, int cluster, double precision, double recall){ this.author = author; this.cluster = cluster; this.fMeasure = (precision * recall) / (precision + recall) * 2; this.precision = precision; this.recall = recall; } public Author getAuthor() { return author; } public int getCluster() { return cluster; } public double getFMeasure() { return fMeasure; } public double getPrecision() { return precision; } public double getRecall() { return recall; } public String toString() { return String.format(FORMAT, this.author.toString(), this.cluster, this.fMeasure, this.precision, this.recall); } }
613393d9279ffc206e609bc25d186685f96bc367
9523d1a19ce30cbab6eb2c543a354819441d611d
/src/test/java/com/saberpro/dao/TestUsuarioDao.java
11e526e6fcfacccaade829e3c1b451b78e905080
[]
no_license
ProyectoIntegradorUSB/SaberProTool
65f81ccc304bdcec16b7a38d8d74e437508f483a
8a3c6fd796841c965a5494a111fb24159fbfe37f
refs/heads/master
2020-03-19T16:04:27.077033
2018-06-09T07:05:53
2018-06-09T07:05:53
136,699,227
0
0
null
null
null
null
UTF-8
Java
false
false
4,334
java
package com.saberpro.dao; import static org.junit.Assert.*; import java.util.Date; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.saberpro.dataaccess.api.DaoException; import com.saberpro.dataaccess.dao.ITipoUsuarioDAO; import com.saberpro.dataaccess.dao.IUsuarioDAO; import com.saberpro.modelo.Usuario; import com.saberpro.utilities.Constantes; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/applicationContext.xml") @Rollback(false) public class TestUsuarioDao { private final static Logger log = LoggerFactory.getLogger(TestUsuarioDao.class); private static long usuId = 6L; @Autowired ITipoUsuarioDAO tipoUsuarioDao; @Autowired IUsuarioDAO usuarioDao; @Test @Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void testaCreate() throws DaoException { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); Usuario usuario = usuarioDao.findById(usuId); assertNull("tipoUsuario ya existe",usuario); usuario = new Usuario(); usuario.setActivo("S"); usuario.setApellido("Sarria Paloma"); usuario.setCelular(3108971385L); usuario.setCodigo(1145879L); usuario.setCorreo("[email protected]"); usuario.setFechaCreacion(new Date()); usuario.setGenero("M"); usuario.setNombre("Jhony"); usuario.setUsuCreador(0L); usuario.setTipoUsuario(tipoUsuarioDao.findById(1L)); usuario.setPassword("12345"); usuario.setIdentificacion(16597187L); usuarioDao.save(usuario); usuId = usuario.getIdUsuario(); log.info("Se creo la tipoUsuario "+usuario.toString()); } @Test @Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void testbUpdate() throws DaoException { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); Usuario usuario = usuarioDao.findById(usuId); assertNotNull(" usuario no ya existe",usuario); usuario.setNombre("Andres".toUpperCase()); usuarioDao.update(usuario); log.info("Se actualizo la usuario "+usuario.toString()); } @Test @Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void testcDelete() throws DaoException { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); Usuario usuario = usuarioDao.findById(usuId); assertNotNull(" usuario no ya existe",usuario); usuarioDao.deleteById(usuId); //usuarioDao.delete(usuario); log.info("Se borro la Modulo "+usuario.toString()); } @Test @Transactional(readOnly = true) public void testdConsulta() { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); List<Usuario> list = usuarioDao.findByTipoUsuarioPrograma(5L,2L); log.info("tamaño "+list.size()); for (Usuario usuario : list) { log.info(usuario.toString()); } } @Test @Transactional(readOnly = true) public void testeConsultaCodigo() { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); Usuario usuario = usuarioDao.findByCodigo(9999999L); log.info(usuario.toString()); } @Test @Transactional(readOnly = true) public void testfConsultaEmail() { assertNotNull("El tipousuarioDao es null",tipoUsuarioDao); assertNotNull("El usuarioDao es null",usuarioDao); List<Usuario> usuarioList = usuarioDao.findByTipoUsuarioFacultad(1L,Constantes.USER_TYPE_DOCENTE); log.info("Tamaño es de "+usuarioList.size()); for (Usuario usuario2 : usuarioList) { log.info(usuario2.toString()); } } }
8b050da43588d2eb0c2635fe2cc8951a195f56d8
5f6edf313639dbe464a1c9cbb62762b427786235
/crm/src/com/naswork/module/marketing/controller/clientorder/EmailVo.java
c5f35649c060004d76fce8c8062a0abb443dcbd1
[]
no_license
magicgis/outfile
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
497635e2cd947811bf616304e9563e59f0ab4f56
refs/heads/master
2020-05-07T19:24:08.371572
2019-01-23T04:57:18
2019-01-23T04:57:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,490
java
package com.naswork.module.marketing.controller.clientorder; import java.util.Date; public class EmailVo { private Integer id; private Integer clientId; private Integer supplierId; private Integer sn; private String partNumber; private String description; private Double amount; private String nowImportpackNumber; private String oldImportpackNumber; private String orderNumber; private String clientOrderNumber; private String supplierOrderNumber; private Double nowAmount; private Double oldAmount; private Integer userId; private Integer emailStatus; private Date updateTimestamp; public Double getNowAmount() { return nowAmount; } public void setNowAmount(Double nowAmount) { this.nowAmount = nowAmount; } public Double getOldAmount() { return oldAmount; } public void setOldAmount(Double oldAmount) { this.oldAmount = oldAmount; } public String getClientOrderNumber() { return clientOrderNumber; } public void setClientOrderNumber(String clientOrderNumber) { this.clientOrderNumber = clientOrderNumber; } public String getSupplierOrderNumber() { return supplierOrderNumber; } public void setSupplierOrderNumber(String supplierOrderNumber) { this.supplierOrderNumber = supplierOrderNumber; } public String getOrderNumber() { return orderNumber; } public void setOrderNumber(String orderNumber) { this.orderNumber = orderNumber; } public Integer getSn() { return sn; } public Integer getClientId() { return clientId; } public void setClientId(Integer clientId) { this.clientId = clientId; } public void setSn(Integer sn) { this.sn = sn; } public String getPartNumber() { return partNumber; } public Integer getSupplierId() { return supplierId; } public void setSupplierId(Integer supplierId) { this.supplierId = supplierId; } public void setPartNumber(String partNumber) { this.partNumber = partNumber; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Double getAmount() { return amount; } public void setAmount(Double amount) { this.amount = amount; } public String getNowImportpackNumber() { return nowImportpackNumber; } public void setNowImportpackNumber(String nowImportpackNumber) { this.nowImportpackNumber = nowImportpackNumber; } public String getOldImportpackNumber() { return oldImportpackNumber; } public void setOldImportpackNumber(String oldImportpackNumber) { this.oldImportpackNumber = oldImportpackNumber; } /** * @return the userId */ public Integer getUserId() { return userId; } /** * @param userId the userId to set */ public void setUserId(Integer userId) { this.userId = userId; } /** * @return the id */ public Integer getId() { return id; } /** * @param id the id to set */ public void setId(Integer id) { this.id = id; } /** * @return the emailStatus */ public Integer getEmailStatus() { return emailStatus; } /** * @param emailStatus the emailStatus to set */ public void setEmailStatus(Integer emailStatus) { this.emailStatus = emailStatus; } /** * @return the updateTimestamp */ public Date getUpdateTimestamp() { return updateTimestamp; } /** * @param updateTimestamp the updateTimestamp to set */ public void setUpdateTimestamp(Date updateTimestamp) { this.updateTimestamp = updateTimestamp; } }
007ccb013abda14551d4d59e13800959282567b3
08bb100430729532ed32f97ab12a04d970d73d5c
/app/src/main/java/com/example/tarotdairy/Tarots.java
f41508de5ec52452cfec3ed79b195b75ae8a9c0f
[]
no_license
vetsnick/TarotDairy04
dbb3a020362d566ad4f85b256dbfb52173cfd0b2
1a382082ad862402f436e7de8b46a18dd29717a9
refs/heads/master
2023-04-30T22:10:25.170133
2021-04-29T00:08:49
2021-04-29T00:08:49
362,639,985
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package com.example.tarotdairy; public class Tarots { private String cardname; int cardimage; public String getCardname() { return cardname; } public void setCardname(String cardname) { this.cardname = cardname; } public int getCardimage() { return cardimage; } public void setCardimage(int cardimage) { this.cardimage = cardimage; } public Tarots(String cardname, int cardimage) { this.cardname = cardname; this.cardimage = cardimage; } }
f1aa6e2b3e165d19f510fe5f080823161cdd7c95
add977126f0e469adaac9762d94f7a1b6418e3ca
/src/main/java/ma/emsi/pfa/dao/UserRepository.java
0b97f3abfad0cbca53f3a80c13d271e48f9d68b5
[]
no_license
NouaouryOthman/analyse-sentiment-JEE
36e229ff74359d16334375abb672602d7e19e0b9
b561d763f942bd26122c6fc99fcbbb15b669e811
refs/heads/master
2023-06-20T07:35:09.940123
2021-07-15T21:25:39
2021-07-15T21:25:39
386,427,006
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package ma.emsi.pfa.dao; import ma.emsi.pfa.entities.User; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; public interface UserRepository extends JpaRepository<User, Long> { User findByEmail(String email); Page<User> findByEmailContains(String email, Pageable pageable); }
40c297c2895f8f7986a4a2878c5611cb1c0d6827
e3712168b5154d456edf3512a1424b9aea290f24
/frontend/Tagline/sources/android/support/transition/ChangeTransform.java
af18abab1a287aa74c17f70c48994d73f93e362f
[]
no_license
uandisson/Projeto-TagLine-HACK_GOV_PE
bf3c5c106191292b3692068d41bc5e6f38f07d52
5e130ff990faf5c8c5dab060398c34e53e0fd896
refs/heads/master
2023-03-12T17:36:36.792458
2021-02-11T18:17:51
2021-02-11T18:17:51
338,082,674
0
1
null
null
null
null
UTF-8
Java
false
false
22,722
java
package android.support.transition; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.animation.TypeEvaluator; import android.graphics.Matrix; import android.graphics.PointF; import android.os.Build; import android.support.annotation.NonNull; import android.support.p000v4.view.ViewCompat; import android.support.transition.Transition; import android.util.Property; import android.view.View; import android.view.ViewGroup; public class ChangeTransform extends Transition { private static final Property<PathAnimatorMatrix, float[]> NON_TRANSLATIONS_PROPERTY; private static final String PROPNAME_INTERMEDIATE_MATRIX = "android:changeTransform:intermediateMatrix"; private static final String PROPNAME_INTERMEDIATE_PARENT_MATRIX = "android:changeTransform:intermediateParentMatrix"; private static final String PROPNAME_MATRIX = "android:changeTransform:matrix"; private static final String PROPNAME_PARENT = "android:changeTransform:parent"; private static final String PROPNAME_PARENT_MATRIX = "android:changeTransform:parentMatrix"; private static final String PROPNAME_TRANSFORMS = "android:changeTransform:transforms"; private static final boolean SUPPORTS_VIEW_REMOVAL_SUPPRESSION = (Build.VERSION.SDK_INT >= 21); private static final Property<PathAnimatorMatrix, PointF> TRANSLATIONS_PROPERTY; private static final String[] sTransitionProperties; private boolean mReparent = true; private Matrix mTempMatrix; boolean mUseOverlay = true; static { Property<PathAnimatorMatrix, float[]> property; Property<PathAnimatorMatrix, PointF> property2; String[] strArr = new String[3]; strArr[0] = PROPNAME_MATRIX; String[] strArr2 = strArr; strArr2[1] = PROPNAME_TRANSFORMS; String[] strArr3 = strArr2; strArr3[2] = PROPNAME_PARENT_MATRIX; sTransitionProperties = strArr3; new Property<PathAnimatorMatrix, float[]>(float[].class, "nonTranslations") { public float[] get(PathAnimatorMatrix pathAnimatorMatrix) { PathAnimatorMatrix pathAnimatorMatrix2 = pathAnimatorMatrix; return null; } public void set(PathAnimatorMatrix object, float[] value) { object.setValues(value); } }; NON_TRANSLATIONS_PROPERTY = property; new Property<PathAnimatorMatrix, PointF>(PointF.class, "translations") { public PointF get(PathAnimatorMatrix pathAnimatorMatrix) { PathAnimatorMatrix pathAnimatorMatrix2 = pathAnimatorMatrix; return null; } public void set(PathAnimatorMatrix object, PointF value) { object.setTranslation(value); } }; TRANSLATIONS_PROPERTY = property2; } public ChangeTransform() { Matrix matrix; new Matrix(); this.mTempMatrix = matrix; } /* JADX WARNING: Illegal instructions before constructor call */ /* Code decompiled incorrectly, please refer to instructions dump. */ public ChangeTransform(android.content.Context r12, android.util.AttributeSet r13) { /* r11 = this; r0 = r11 r1 = r12 r2 = r13 r4 = r0 r5 = r1 r6 = r2 r4.<init>(r5, r6) r4 = r0 r5 = 1 r4.mUseOverlay = r5 r4 = r0 r5 = 1 r4.mReparent = r5 r4 = r0 android.graphics.Matrix r5 = new android.graphics.Matrix r10 = r5 r5 = r10 r6 = r10 r6.<init>() r4.mTempMatrix = r5 r4 = r1 r5 = r2 int[] r6 = android.support.transition.Styleable.CHANGE_TRANSFORM android.content.res.TypedArray r4 = r4.obtainStyledAttributes(r5, r6) r3 = r4 r4 = r0 r5 = r3 r6 = r2 org.xmlpull.v1.XmlPullParser r6 = (org.xmlpull.v1.XmlPullParser) r6 java.lang.String r7 = "reparentWithOverlay" r8 = 1 r9 = 1 boolean r5 = android.support.p000v4.content.res.TypedArrayUtils.getNamedBoolean(r5, r6, r7, r8, r9) r4.mUseOverlay = r5 r4 = r0 r5 = r3 r6 = r2 org.xmlpull.v1.XmlPullParser r6 = (org.xmlpull.v1.XmlPullParser) r6 java.lang.String r7 = "reparent" r8 = 0 r9 = 1 boolean r5 = android.support.p000v4.content.res.TypedArrayUtils.getNamedBoolean(r5, r6, r7, r8, r9) r4.mReparent = r5 r4 = r3 r4.recycle() return */ throw new UnsupportedOperationException("Method not decompiled: android.support.transition.ChangeTransform.<init>(android.content.Context, android.util.AttributeSet):void"); } public boolean getReparentWithOverlay() { return this.mUseOverlay; } public void setReparentWithOverlay(boolean reparentWithOverlay) { boolean z = reparentWithOverlay; this.mUseOverlay = z; } public boolean getReparent() { return this.mReparent; } public void setReparent(boolean reparent) { boolean z = reparent; this.mReparent = z; } public String[] getTransitionProperties() { return sTransitionProperties; } private void captureValues(TransitionValues transitionValues) { Object obj; Matrix matrix; Matrix matrix2; Matrix matrix3; TransitionValues transitionValues2 = transitionValues; View view = transitionValues2.view; if (view.getVisibility() != 8) { Object put = transitionValues2.values.put(PROPNAME_PARENT, view.getParent()); new Transforms(view); Object put2 = transitionValues2.values.put(PROPNAME_TRANSFORMS, obj); Matrix matrix4 = view.getMatrix(); if (matrix4 == null || matrix4.isIdentity()) { matrix = null; } else { new Matrix(matrix4); matrix = matrix3; } Object put3 = transitionValues2.values.put(PROPNAME_MATRIX, matrix); if (this.mReparent) { new Matrix(); Matrix parentMatrix = matrix2; ViewGroup parent = (ViewGroup) view.getParent(); ViewUtils.transformMatrixToGlobal(parent, parentMatrix); boolean preTranslate = parentMatrix.preTranslate((float) (-parent.getScrollX()), (float) (-parent.getScrollY())); Object put4 = transitionValues2.values.put(PROPNAME_PARENT_MATRIX, parentMatrix); Object put5 = transitionValues2.values.put(PROPNAME_INTERMEDIATE_MATRIX, view.getTag(C0211R.C0213id.transition_transform)); Object put6 = transitionValues2.values.put(PROPNAME_INTERMEDIATE_PARENT_MATRIX, view.getTag(C0211R.C0213id.parent_matrix)); } } } public void captureStartValues(@NonNull TransitionValues transitionValues) { TransitionValues transitionValues2 = transitionValues; captureValues(transitionValues2); if (!SUPPORTS_VIEW_REMOVAL_SUPPRESSION) { ((ViewGroup) transitionValues2.view.getParent()).startViewTransition(transitionValues2.view); } } public void captureEndValues(@NonNull TransitionValues transitionValues) { captureValues(transitionValues); } public Animator createAnimator(@NonNull ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) { ViewGroup sceneRoot = viewGroup; TransitionValues startValues = transitionValues; TransitionValues endValues = transitionValues2; if (startValues == null || endValues == null || !startValues.values.containsKey(PROPNAME_PARENT) || !endValues.values.containsKey(PROPNAME_PARENT)) { return null; } ViewGroup startParent = (ViewGroup) startValues.values.get(PROPNAME_PARENT); boolean handleParentChange = this.mReparent && !parentsMatch(startParent, (ViewGroup) endValues.values.get(PROPNAME_PARENT)); Matrix startMatrix = (Matrix) startValues.values.get(PROPNAME_INTERMEDIATE_MATRIX); if (startMatrix != null) { Object put = startValues.values.put(PROPNAME_MATRIX, startMatrix); } Matrix startParentMatrix = (Matrix) startValues.values.get(PROPNAME_INTERMEDIATE_PARENT_MATRIX); if (startParentMatrix != null) { Object put2 = startValues.values.put(PROPNAME_PARENT_MATRIX, startParentMatrix); } if (handleParentChange) { setMatricesForParent(startValues, endValues); } ObjectAnimator transformAnimator = createTransformAnimator(startValues, endValues, handleParentChange); if (handleParentChange && transformAnimator != null && this.mUseOverlay) { createGhostView(sceneRoot, startValues, endValues); } else if (!SUPPORTS_VIEW_REMOVAL_SUPPRESSION) { startParent.endViewTransition(startValues.view); } return transformAnimator; } private ObjectAnimator createTransformAnimator(TransitionValues startValues, TransitionValues transitionValues, boolean z) { PathAnimatorMatrix pathAnimatorMatrix; TypeEvaluator typeEvaluator; AnimatorListenerAdapter animatorListenerAdapter; TransitionValues endValues = transitionValues; boolean handleParentChange = z; Matrix startMatrix = (Matrix) startValues.values.get(PROPNAME_MATRIX); Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_MATRIX); if (startMatrix == null) { startMatrix = MatrixUtils.IDENTITY_MATRIX; } if (endMatrix == null) { endMatrix = MatrixUtils.IDENTITY_MATRIX; } if (startMatrix.equals(endMatrix)) { return null; } Transforms transforms = (Transforms) endValues.values.get(PROPNAME_TRANSFORMS); View view = endValues.view; setIdentityTransforms(view); float[] startMatrixValues = new float[9]; startMatrix.getValues(startMatrixValues); float[] endMatrixValues = new float[9]; endMatrix.getValues(endMatrixValues); new PathAnimatorMatrix(view, startMatrixValues); PathAnimatorMatrix pathAnimatorMatrix2 = pathAnimatorMatrix; Property<PathAnimatorMatrix, float[]> property = NON_TRANSLATIONS_PROPERTY; TypeEvaluator typeEvaluator2 = typeEvaluator; new FloatArrayEvaluator(new float[9]); float[][] fArr = new float[2][]; fArr[0] = startMatrixValues; float[][] fArr2 = fArr; fArr2[1] = endMatrixValues; PropertyValuesHolder valuesProperty = PropertyValuesHolder.ofObject(property, typeEvaluator2, fArr2); PropertyValuesHolder translationProperty = PropertyValuesHolderUtils.ofPointF(TRANSLATIONS_PROPERTY, getPathMotion().getPath(startMatrixValues[2], startMatrixValues[5], endMatrixValues[2], endMatrixValues[5])); PropertyValuesHolder[] propertyValuesHolderArr = new PropertyValuesHolder[2]; propertyValuesHolderArr[0] = valuesProperty; PropertyValuesHolder[] propertyValuesHolderArr2 = propertyValuesHolderArr; propertyValuesHolderArr2[1] = translationProperty; ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(pathAnimatorMatrix2, propertyValuesHolderArr2); final boolean z2 = handleParentChange; final Matrix matrix = endMatrix; final View view2 = view; final Transforms transforms2 = transforms; final PathAnimatorMatrix pathAnimatorMatrix3 = pathAnimatorMatrix2; new AnimatorListenerAdapter(this) { private boolean mIsCanceled; private Matrix mTempMatrix; final /* synthetic */ ChangeTransform this$0; { Matrix matrix; this.this$0 = this$0; new Matrix(); this.mTempMatrix = matrix; } public void onAnimationCancel(Animator animator) { Animator animator2 = animator; this.mIsCanceled = true; } public void onAnimationEnd(Animator animator) { Animator animator2 = animator; if (!this.mIsCanceled) { if (!z2 || !this.this$0.mUseOverlay) { view2.setTag(C0211R.C0213id.transition_transform, (Object) null); view2.setTag(C0211R.C0213id.parent_matrix, (Object) null); } else { setCurrentMatrix(matrix); } } ViewUtils.setAnimationMatrix(view2, (Matrix) null); transforms2.restore(view2); } public void onAnimationPause(Animator animator) { Animator animator2 = animator; setCurrentMatrix(pathAnimatorMatrix3.getMatrix()); } public void onAnimationResume(Animator animator) { Animator animator2 = animator; ChangeTransform.setIdentityTransforms(view2); } private void setCurrentMatrix(Matrix currentMatrix) { this.mTempMatrix.set(currentMatrix); view2.setTag(C0211R.C0213id.transition_transform, this.mTempMatrix); transforms2.restore(view2); } }; AnimatorListenerAdapter listener = animatorListenerAdapter; animator.addListener(listener); AnimatorUtils.addPauseListener(animator, listener); return animator; } private boolean parentsMatch(ViewGroup viewGroup, ViewGroup viewGroup2) { ViewGroup startParent = viewGroup; ViewGroup endParent = viewGroup2; boolean parentsMatch = false; if (!isValidTarget(startParent) || !isValidTarget(endParent)) { parentsMatch = startParent == endParent; } else { TransitionValues endValues = getMatchedTransitionValues(startParent, true); if (endValues != null) { parentsMatch = endParent == endValues.view; } } return parentsMatch; } private void createGhostView(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) { Matrix matrix; Transition outerTransition; Transition.TransitionListener transitionListener; ViewGroup sceneRoot = viewGroup; TransitionValues startValues = transitionValues; TransitionValues endValues = transitionValues2; View view = endValues.view; new Matrix((Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX)); Matrix localEndMatrix = matrix; ViewUtils.transformMatrixToLocal(sceneRoot, localEndMatrix); GhostViewImpl ghostView = GhostViewUtils.addGhost(view, sceneRoot, localEndMatrix); if (ghostView != null) { ghostView.reserveEndViewTransition((ViewGroup) startValues.values.get(PROPNAME_PARENT), startValues.view); Transition transition = this; while (true) { outerTransition = transition; if (outerTransition.mParent == null) { break; } transition = outerTransition.mParent; } new GhostListener(view, ghostView); Transition addListener = outerTransition.addListener(transitionListener); if (SUPPORTS_VIEW_REMOVAL_SUPPRESSION) { if (startValues.view != endValues.view) { ViewUtils.setTransitionAlpha(startValues.view, 0.0f); } ViewUtils.setTransitionAlpha(view, 1.0f); } } } private void setMatricesForParent(TransitionValues transitionValues, TransitionValues transitionValues2) { Matrix matrix; TransitionValues startValues = transitionValues; TransitionValues endValues = transitionValues2; Matrix endParentMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX); endValues.view.setTag(C0211R.C0213id.parent_matrix, endParentMatrix); Matrix toLocal = this.mTempMatrix; toLocal.reset(); boolean invert = endParentMatrix.invert(toLocal); Matrix startLocal = (Matrix) startValues.values.get(PROPNAME_MATRIX); if (startLocal == null) { new Matrix(); startLocal = matrix; Object put = startValues.values.put(PROPNAME_MATRIX, startLocal); } boolean postConcat = startLocal.postConcat((Matrix) startValues.values.get(PROPNAME_PARENT_MATRIX)); boolean postConcat2 = startLocal.postConcat(toLocal); } static void setIdentityTransforms(View view) { setTransforms(view, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f); } static void setTransforms(View view, float translationX, float translationY, float translationZ, float scaleX, float scaleY, float rotationX, float rotationY, float rotationZ) { View view2 = view; view2.setTranslationX(translationX); view2.setTranslationY(translationY); ViewCompat.setTranslationZ(view2, translationZ); view2.setScaleX(scaleX); view2.setScaleY(scaleY); view2.setRotationX(rotationX); view2.setRotationY(rotationY); view2.setRotation(rotationZ); } private static class Transforms { final float mRotationX; final float mRotationY; final float mRotationZ; final float mScaleX; final float mScaleY; final float mTranslationX; final float mTranslationY; final float mTranslationZ; Transforms(View view) { View view2 = view; this.mTranslationX = view2.getTranslationX(); this.mTranslationY = view2.getTranslationY(); this.mTranslationZ = ViewCompat.getTranslationZ(view2); this.mScaleX = view2.getScaleX(); this.mScaleY = view2.getScaleY(); this.mRotationX = view2.getRotationX(); this.mRotationY = view2.getRotationY(); this.mRotationZ = view2.getRotation(); } public void restore(View view) { ChangeTransform.setTransforms(view, this.mTranslationX, this.mTranslationY, this.mTranslationZ, this.mScaleX, this.mScaleY, this.mRotationX, this.mRotationY, this.mRotationZ); } public boolean equals(Object obj) { Object that = obj; if (!(that instanceof Transforms)) { return false; } Transforms thatTransform = (Transforms) that; return thatTransform.mTranslationX == this.mTranslationX && thatTransform.mTranslationY == this.mTranslationY && thatTransform.mTranslationZ == this.mTranslationZ && thatTransform.mScaleX == this.mScaleX && thatTransform.mScaleY == this.mScaleY && thatTransform.mRotationX == this.mRotationX && thatTransform.mRotationY == this.mRotationY && thatTransform.mRotationZ == this.mRotationZ; } public int hashCode() { return (31 * ((31 * ((31 * ((31 * ((31 * ((31 * ((31 * (this.mTranslationX != 0.0f ? Float.floatToIntBits(this.mTranslationX) : 0)) + (this.mTranslationY != 0.0f ? Float.floatToIntBits(this.mTranslationY) : 0))) + (this.mTranslationZ != 0.0f ? Float.floatToIntBits(this.mTranslationZ) : 0))) + (this.mScaleX != 0.0f ? Float.floatToIntBits(this.mScaleX) : 0))) + (this.mScaleY != 0.0f ? Float.floatToIntBits(this.mScaleY) : 0))) + (this.mRotationX != 0.0f ? Float.floatToIntBits(this.mRotationX) : 0))) + (this.mRotationY != 0.0f ? Float.floatToIntBits(this.mRotationY) : 0))) + (this.mRotationZ != 0.0f ? Float.floatToIntBits(this.mRotationZ) : 0); } } private static class GhostListener extends TransitionListenerAdapter { private GhostViewImpl mGhostView; private View mView; GhostListener(View view, GhostViewImpl ghostView) { this.mView = view; this.mGhostView = ghostView; } public void onTransitionEnd(@NonNull Transition transition) { Transition removeListener = transition.removeListener(this); GhostViewUtils.removeGhost(this.mView); this.mView.setTag(C0211R.C0213id.transition_transform, (Object) null); this.mView.setTag(C0211R.C0213id.parent_matrix, (Object) null); } public void onTransitionPause(@NonNull Transition transition) { Transition transition2 = transition; this.mGhostView.setVisibility(4); } public void onTransitionResume(@NonNull Transition transition) { Transition transition2 = transition; this.mGhostView.setVisibility(0); } } private static class PathAnimatorMatrix { private final Matrix mMatrix; private float mTranslationX = this.mValues[2]; private float mTranslationY = this.mValues[5]; private final float[] mValues; private final View mView; PathAnimatorMatrix(View view, float[] values) { Matrix matrix; new Matrix(); this.mMatrix = matrix; this.mView = view; this.mValues = (float[]) values.clone(); setAnimationMatrix(); } /* access modifiers changed from: package-private */ public void setValues(float[] fArr) { float[] values = fArr; System.arraycopy(values, 0, this.mValues, 0, values.length); setAnimationMatrix(); } /* access modifiers changed from: package-private */ public void setTranslation(PointF pointF) { PointF translation = pointF; this.mTranslationX = translation.x; this.mTranslationY = translation.y; setAnimationMatrix(); } private void setAnimationMatrix() { this.mValues[2] = this.mTranslationX; this.mValues[5] = this.mTranslationY; this.mMatrix.setValues(this.mValues); ViewUtils.setAnimationMatrix(this.mView, this.mMatrix); } /* access modifiers changed from: package-private */ public Matrix getMatrix() { return this.mMatrix; } } }
951b523d85d0e19672137719db6f536a985fb368
f49000a7ee1712c53aecaa87e8d8126eea53e605
/src/test/java/saucedemo/pages/InventoryItemSauceLabsBackpack.java
f44c8bc4799b8675ccc2645f1927db246b0c7aba
[]
no_license
Shurins/repo
e28bb6c0a64fc0cce4b7a58521a50ee95d6f566f
a52a2e5c19ea370c1f8a85cdc67dee5abdfe482c
refs/heads/master
2020-09-01T02:54:08.079775
2019-10-31T20:05:20
2019-10-31T20:05:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
737
java
package saucedemo.pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import java.util.List; public class InventoryItemSauceLabsBackpack { WebDriver driver; public InventoryItemSauceLabsBackpack(WebDriver driver) { this.driver = driver; } @FindBy(xpath = "//button[@class='btn_secondary btn_inventory']") private WebElement removeItemFromCart; @FindBy(xpath = "//button[@class='btn_secondary btn_inventory']") private List<WebElement> removeItemFromCartList; public List<WebElement> getRemoveItemFromCartList() { return removeItemFromCartList; } public WebElement getRemoveItemFromCart() { return removeItemFromCart; } }
949a07874713470919a5ed879ec69fd114778cc8
47bf910ab09cacb494945882e6f7ef049739f27c
/app/src/test/java/com/sunil/googlemapsharelocation/ExampleUnitTest.java
4a9f2547e0edf134beaa12b0184d54ad558ce3a6
[]
no_license
sunil676/GoogleMapShareLocation
7f8df205d1cc8034129875706404427f89d6a050
30cbaf17139902f30241553c8cd20ac2bd92292e
refs/heads/master
2021-01-01T06:34:07.081984
2017-01-02T06:23:01
2017-01-02T06:23:01
77,814,631
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package com.sunil.googlemapsharelocation; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
53efe71790cf95080f1202babdac832b2e2fa9a9
14afa368a3265ea2b19a0917164a7b3f7786bcea
/build/generated/src/org/apache/jsp/Seeker1_jsp.java
3bb986483223648556e619c97d13fdc8da915d7f
[]
no_license
FehzanSadriWala/javascript-netbeans-project
6012993843e8889028d94cce977ca1f90f5811f1
c46a8eb87b168b5ef182aec5ba5ffdeea15ac76b
refs/heads/master
2020-04-06T03:36:30.038135
2016-07-26T22:39:24
2016-07-26T22:39:24
64,258,802
0
0
null
null
null
null
UTF-8
Java
false
false
21,062
java
package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.Date; public final class Seeker1_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_fmt_formatDate_value_type_nobody; private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_set_var_value_nobody; private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspInit() { _jspx_tagPool_fmt_formatDate_value_type_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _jspx_tagPool_c_set_var_value_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); } public void _jspDestroy() { _jspx_tagPool_fmt_formatDate_value_type_nobody.release(); _jspx_tagPool_c_set_var_value_nobody.release(); } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("<!DOCTYPE HTML>\n"); out.write("<html>\n"); out.write("<head>\n"); out.write("<title>Blood Bank</title>\n"); out.write("<link href=\"css/bootstrap.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\">\n"); out.write("<link href=\"css/style.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />\n"); out.write("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"); out.write("<meta name=\"keywords\" content=\"Sciencelab Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web \n"); out.write("template, \n"); out.write("Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design\" />\n"); out.write("<script type=\"application/x-javascript\"> addEventListener(\"load\", function() { setTimeout(hideURLbar, 0); }, false); function \n"); out.write("hideURLbar(){ window.scrollTo(0,1); } </script>\n"); out.write("<script src=\"js/jquery-1.8.3.min.js\"></script>\n"); out.write("<script src=\"js/modernizr.custom.97074.js\"></script>\n"); out.write("<!---- start-smoth-scrolling---->\n"); out.write("<script type=\"text/javascript\" src=\"js/move-top.js\"></script>\n"); out.write("<script type=\"text/javascript\" src=\"js/easing.js\"></script>\n"); out.write(" <script type=\"text/javascript\">\n"); out.write("\t\tjQuery(document).ready(function($) {\n"); out.write("\t\t\t$(\".scroll\").click(function(event){\t\t\n"); out.write("\t\t\t\tevent.preventDefault();\n"); out.write("\t\t\t\t$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);\n"); out.write("\t\t\t});\n"); out.write("\t\t});\n"); out.write("\t</script>\n"); out.write("<!---End-smoth-scrolling---->\n"); out.write("<!--script-->\n"); out.write("<script src=\"js/jquery.chocolat.js\"></script>\n"); out.write("\t\t<link rel=\"stylesheet\" href=\"css/chocolat.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\">\n"); out.write("\t\t<!--light-box-files -->\n"); out.write("\t\t<script type=\"text/javascript\" charset=\"utf-8\">\n"); out.write("\t\t$(function() {\n"); out.write("\t\t\t$('.gallery a').Chocolat();\n"); out.write("\t\t});\n"); out.write("\t\t</script>\n"); out.write(" <script type=\"text/javascript\">\n"); out.write(" function myfunction()\n"); out.write(" {\n"); out.write(" //alert(\"total cost\");\n"); out.write(" var f_exp = document.getElementById('cop1').value;\n"); out.write(" var pass_no =document.getElementById('qun1').value;\n"); out.write(" var mul = f_exp * pass_no;\n"); out.write(" var ttl = document.getElementById('tc');\n"); out.write(" ttl.value=innerHTML =mul;\n"); out.write(" } \n"); out.write(" function onlyAlphabets(e, t) \n"); out.write(" {\n"); out.write(" try \n"); out.write(" {\n"); out.write(" if (window.event) \n"); out.write(" {\n"); out.write(" var charCode = window.event.keyCode;\n"); out.write(" }\n"); out.write(" else if (e) \n"); out.write(" {\n"); out.write(" var charCode = e.which;\n"); out.write(" }\n"); out.write(" else \n"); out.write(" {\n"); out.write(" return true;\n"); out.write(" }\n"); out.write(" if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123))\n"); out.write(" return true;\n"); out.write(" else\n"); out.write(" return false;\n"); out.write(" }\n"); out.write(" catch (err) \n"); out.write(" {\n"); out.write(" alert(err.Description);\n"); out.write(" }\n"); out.write(" }\n"); out.write(" function onlyNos(e, t)\n"); out.write(" {\n"); out.write(" try\n"); out.write(" {\n"); out.write(" if (window.event)\n"); out.write(" {\n"); out.write(" var charCode = window.event.keyCode;\n"); out.write(" }\n"); out.write(" else if (e) \n"); out.write(" {\n"); out.write(" var charCode = e.which;\n"); out.write(" }\n"); out.write(" else 1\n"); out.write(" { \n"); out.write(" return true; \n"); out.write(" }\n"); out.write(" if (charCode > 31 && (charCode < 48 || charCode > 57))\n"); out.write(" {\n"); out.write(" return false;\n"); out.write(" }\n"); out.write(" return true;\n"); out.write(" }\n"); out.write(" catch (err)\n"); out.write(" {\n"); out.write(" alert(err.Description);\n"); out.write(" }\n"); out.write(" }\n"); out.write(" \n"); out.write(" </script>\n"); out.write("<!--script-->\n"); out.write("</head>\n"); out.write("<body background=\"images/backk.gif\">\n"); out.write(" "); org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "Header.jsp", out, false); out.write("\n"); out.write(" <div class=\"col-md-3\" style=\"background-color: burlywood; height: 1000px;\">\n"); out.write(" <center> <h3 style=\"margin-top: 30px; color: saddlebrown;\">RaktPlus @ your service</h3><br/><br/>\n"); out.write(" <table>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"AboutHospital.jsp\"><input type=\"submit\" value=\"About Hospital\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"AboutDoctors.jsp\"><input type=\"submit\" value=\"About Doctors\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"BloodInfo.jsp\"><input type=\"submit\" value=\"Blood Info\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" \n"); out.write(" <tr>\n"); out.write(" <td><a href=\"DonorInstruction.jsp\"><input type=\"submit\" value=\"Donor Instruction\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"HealthTips.jsp\"><input type=\"submit\" value=\"Health Tips\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"HelpfulDonation.jsp\"><input type=\"submit\" value=\"Helpful Donation\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><a href=\"NewsBlood.jsp\"><input type=\"submit\" value=\"Blood Bank\" style=\"width:200px; height:40px;font-size: larger;\"></a></td>\n"); out.write(" </tr>\n"); out.write(" </table>\n"); out.write(" <img src=\"images/seek.jpg\" alt=\"\"/>\n"); out.write(" </center>\n"); out.write(" </div>\n"); out.write(" "); String bg=request.getParameter("bg"); String loc=request.getParameter("loc"); String cost=request.getParameter("cost"); String qun=request.getParameter("qun"); out.write("\n"); out.write(" <div class=\"team\">\n"); out.write(" <div class=\"container\">\n"); out.write(" <center>\n"); out.write(" <img src=\"images/Seeker details.JPG\" alt=\"\"/></center>\n"); out.write(" <form action=\"Skbean.jsp\">\n"); out.write(" <center>\n"); out.write(" <table style=\"margin-top:50px;\">\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family:Times New Roman;\">Blood Group:</h2></td>\n"); out.write(" <td><input type=\"text\" value=\""); out.print(bg); out.write("\" name=\"bg\" maxlength=\"0\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" required></td> \n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Location:</h2></td>\n"); out.write(" <td><input type=\"text\" value=\""); out.print(loc); out.write("\" name=\"loc\" maxlength=\"0\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" required></td> \n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Cost Per Unit:</h2></td>\n"); out.write(" <td><input type=\"text\" value=\""); out.print(cost); out.write("\" id=\"cop1\" name=\"cop\" maxlength=\"0\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" required></td> \n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Quantity:</h2></td>\n"); out.write(" <td><input type=\"text\" id=\"qun1\" name=\"qun\" max=\""); out.print(qun); out.write("\" maxlength=\"1\" onblur=\"myfunction();\" onkeypress=\"return onlyNos(event,this);\" placeholder=\"enter quantity\" required></td> \n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Total Cost:</h2></td>\n"); out.write(" <td><input type=\"text\" name=\"tc\" id=\"tc\" value=\"Total is :\" maxlength=\"0\" required></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Patient's Name:</h2></td>\n"); out.write(" <td><input type=\"text\" name=\"pname\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" placeholder=\"Enter name\" required /></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Patient's Gender: </h2></td>\n"); out.write(" <td><input type=\"radio\" name=\"gen\" value=\"Male\">Male<input type=\"radio\" name=\"gen\" value=\"Female\">Female</td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Receiver's Name:</h2></td>\n"); out.write(" <td><input type=\"text\" name=\"rcnm\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" placeholder=\"Enter name\" required /></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Receiver's Contact No:</h2></td>\n"); out.write(" <td><input type=\"text\" name=\"rcno\" pattern=\"[0-9]{10}\" title=\"ten digit number\" maxlength=\"10\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" placeholder=\"Enter contact no.\" required /></td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Receiver's Email:</h2></td>\n"); out.write(" <td><input type=\"text\" name=\"email\" style=\"font-size: large;font-family: monospace; font-weight: bold;\" placeholder=\"Enter Email Id\" required /></td>\n"); out.write(" </tr> \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" "); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_set_0.setPageContext(_jspx_page_context); _jspx_th_c_set_0.setParent(null); _jspx_th_c_set_0.setVar("now"); _jspx_th_c_set_0.setValue(new java.util.Date()); int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag(); if (_jspx_th_c_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); return; } _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); out.write("\n"); out.write(" "); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_1 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_set_1.setPageContext(_jspx_page_context); _jspx_th_c_set_1.setParent(null); _jspx_th_c_set_1.setVar("tomorrow"); _jspx_th_c_set_1.setValue(new Date(new Date().getTime() + 60*60*24*1000)); int _jspx_eval_c_set_1 = _jspx_th_c_set_1.doStartTag(); if (_jspx_th_c_set_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_1); return; } _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_1); out.write("\n"); out.write(" <tr>\n"); out.write(" <td><h2 style=\"font-family: Times New Roman;\">Required Date:</h2></td>\n"); out.write(" <td><select name=\"rdt\">\n"); out.write(" <option>Date</option>\n"); out.write(" <option>"); if (_jspx_meth_fmt_formatDate_0(_jspx_page_context)) return; out.write("</option>\n"); out.write(" </select></td>\n"); out.write(" </tr>\n"); out.write(" </table>\n"); out.write(" </center>\n"); out.write(" <center>\n"); out.write(" <input type=\"submit\" value=\"Next\" style=\"color:black;margin-top: 20px; width:100px; height:40px; font-size: large;\">\n"); out.write(" &emsp;&emsp;&emsp;<input type=\"reset\" value=\"Reset\" style=\"color:black;margin-top: 20px; width:100px; height:40px; font-size: large;\">\n"); out.write(" </center> \n"); out.write(" </form>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" "); org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "Footer.jsp", out, false); out.write("\n"); out.write("</body>\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } private boolean _jspx_meth_fmt_formatDate_0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // fmt:formatDate org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_formatDate_0 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _jspx_tagPool_fmt_formatDate_value_type_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class); _jspx_th_fmt_formatDate_0.setPageContext(_jspx_page_context); _jspx_th_fmt_formatDate_0.setParent(null); _jspx_th_fmt_formatDate_0.setType("date"); _jspx_th_fmt_formatDate_0.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${now}", java.util.Date.class, (PageContext)_jspx_page_context, null)); int _jspx_eval_fmt_formatDate_0 = _jspx_th_fmt_formatDate_0.doStartTag(); if (_jspx_th_fmt_formatDate_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _jspx_tagPool_fmt_formatDate_value_type_nobody.reuse(_jspx_th_fmt_formatDate_0); return true; } _jspx_tagPool_fmt_formatDate_value_type_nobody.reuse(_jspx_th_fmt_formatDate_0); return false; } }
e4d54ff6b419b2a451c00a7742c9c75261426983
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/16178/tar_0.java
1ca53c3146aa90023f74deaa7ce0acb412de927f
[]
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
12,486
java
/******************************************************************************* * Copyright (c) 2005 BEA Systems, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * [email protected] - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.apt.core.internal.util; import com.sun.mirror.declaration.AnnotationMirror; import com.sun.mirror.declaration.AnnotationValue; import com.sun.mirror.type.AnnotationType; import com.sun.mirror.type.ClassType; import com.sun.mirror.type.InterfaceType; import com.sun.mirror.type.TypeMirror; import java.util.ArrayList; import java.util.List; import org.eclipse.jdt.apt.core.internal.EclipseMirrorImpl; import org.eclipse.jdt.apt.core.internal.declaration.AnnotationDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.AnnotationElementDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.AnnotationMirrorImpl; import org.eclipse.jdt.apt.core.internal.declaration.AnnotationValueImpl; import org.eclipse.jdt.apt.core.internal.declaration.ClassDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.ConstructorDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.DeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.EnumConstantDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.EnumDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.FieldDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.InterfaceDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.MethodDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.TypeDeclarationImpl; import org.eclipse.jdt.apt.core.internal.declaration.TypeParameterDeclarationImpl; import org.eclipse.jdt.apt.core.internal.env.ProcessorEnvImpl; import org.eclipse.jdt.apt.core.internal.type.ArrayTypeImpl; import org.eclipse.jdt.apt.core.internal.type.ErrorType; import org.eclipse.jdt.apt.core.internal.type.PrimitiveTypeImpl; import org.eclipse.jdt.apt.core.internal.type.VoidTypeImpl; import org.eclipse.jdt.apt.core.internal.type.WildcardTypeImpl; import org.eclipse.jdt.core.dom.IResolvedAnnotation; import org.eclipse.jdt.core.dom.IBinding; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding; public class Factory { public static TypeDeclarationImpl createReferenceType(ITypeBinding binding, ProcessorEnvImpl env) { if(binding == null || binding.isNullType()) return null; TypeDeclarationImpl mirror = null; // must test for annotation type before interface since annotation // is an interface if( binding.isAnnotation() ) mirror = new AnnotationDeclarationImpl(binding, env); else if (binding.isInterface() ) mirror = new InterfaceDeclarationImpl(binding, env); // must test for enum first since enum is also a class. else if( binding.isEnum() ) mirror = new EnumDeclarationImpl(binding, env); else if( binding.isClass() ) mirror = new ClassDeclarationImpl(binding, env); else throw new IllegalStateException("cannot create type declaration from " + binding); return mirror; } public static DeclarationImpl createDeclaration(IBinding binding, ProcessorEnvImpl env) { if(binding == null) return null; switch(binding.getKind()) { case IBinding.TYPE: final ITypeBinding typeBinding = (ITypeBinding)binding; if( typeBinding.isAnonymous() || typeBinding.isArray() || typeBinding.isWildcardType() || typeBinding.isPrimitive() ) throw new IllegalStateException("failed to create declaration from " + binding); return createReferenceType(typeBinding, env); case IBinding.VARIABLE: final IVariableBinding varBinding = (IVariableBinding)binding; if(varBinding.isEnumConstant()) return new EnumConstantDeclarationImpl(varBinding, env); else return new FieldDeclarationImpl(varBinding, env); case IBinding.METHOD: final IMethodBinding method = (IMethodBinding)binding; if( method.isConstructor() ) return new ConstructorDeclarationImpl(method, env); final ITypeBinding declaringType = method.getDeclaringClass(); if( declaringType != null && declaringType.isAnnotation() ) return new AnnotationElementDeclarationImpl(method, env); else return new MethodDeclarationImpl(method, env); default: throw new IllegalStateException("failed to create declaration from " + binding); } } public static TypeMirror createTypeMirror(ITypeBinding binding, ProcessorEnvImpl env) { if( binding == null ) return null; if( binding.isPrimitive() ){ if( "int".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_INT; else if( "byte".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_BYTE; else if( "short".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_SHORT; else if( "char".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_CHAR; else if( "long".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_LONG; else if( "float".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_FLOAT; else if( "double".equals(binding.getName()) ) return PrimitiveTypeImpl.PRIMITIVE_DOUBLE; else if( "boolean".equals(binding.getName())) return PrimitiveTypeImpl.PRIMITIVE_BOOLEAN; else if( "void".equals(binding.getName()) ) return VoidTypeImpl.TYPE_VOID; else throw new IllegalStateException("unrecognized primitive type: " + binding); } else if( binding.isArray() ) return new ArrayTypeImpl(binding, env); else if( binding.isWildcardType() ){ return new WildcardTypeImpl(binding, env); } else if( binding.isTypeVariable() ) return new TypeParameterDeclarationImpl(binding, env); else return createReferenceType(binding, env); } /** * @param annotation the ast node. * @param annotated the declaration that <code>annotation</code> annotated * @param env * @return a newly created {@link AnnotationMirror} object */ public static AnnotationMirror createAnnotationMirror(final IResolvedAnnotation annotation, final DeclarationImpl annotated, final ProcessorEnvImpl env) { return new AnnotationMirrorImpl(annotation, annotated, env); } /** * Build an {@link AnnotationValue} object based on the given dom value. * @param domValue default value according to the DOM API. * @param decl the element declaration whose default value is <code>domValue</code> * if {@link #domValue} is an annotation, then this is the declaration it annotated. * In all other case, this parameter is ignored. * @param env * @return an annotation value */ public static AnnotationValue createDefaultValue(Object domValue, AnnotationElementDeclarationImpl decl, ProcessorEnvImpl env) { if( domValue == null ) return null; final Object converted = convertDOMValueToMirrorValue(domValue, null, decl, decl, env); return createAnnotationValue(converted, null, -1, decl, env); } /** * Build an {@link AnnotationValue} object based on the given dom value. * @param domValue annotation member value according to the DOM API. * @param elementName the name of the member value * @param anno the annotation that directly contains <code>domValue</code> * @param env * @return an annotation value */ public static AnnotationValue createAnnotationMemberValue(Object domValue, String elementName, AnnotationMirrorImpl anno, ProcessorEnvImpl env) { if( domValue == null ) return null; final Object converted = convertDOMValueToMirrorValue(domValue, elementName, anno, anno.getAnnotatedDeclaration(), env); return createAnnotationValue(converted, elementName, -1, anno, env); } private static AnnotationValue createAnnotationValue(Object convertedValue, String name, int index, EclipseMirrorImpl mirror, ProcessorEnvImpl env) { if( convertedValue == null ) return null; if( mirror instanceof AnnotationMirrorImpl ) return new AnnotationValueImpl(convertedValue, name, index, (AnnotationMirrorImpl)mirror, env); else return new AnnotationValueImpl(convertedValue, index, (AnnotationElementDeclarationImpl)mirror, env); } /** * Building an annotation value object based on the dom value. * * @param dom the dom value to convert to the mirror specification. * @see com.sun.mirror.declaration.AnnotationValue.getObject() * @param name the name of the element if <code>domValue</code> is an * element member value of an annotation * @param parent the parent of this annotation value. * @param decl if <code>domValue</code> is a default value, then this is the * annotation element declaration where the default value originates * if <code>domValue</code> is an annotation, then <code>decl</code> * is the declaration that it annotates. */ private static Object convertDOMValueToMirrorValue(Object domValue, String name, EclipseMirrorImpl parent, DeclarationImpl decl, ProcessorEnvImpl env) { if( domValue == null ) return null; else if(domValue instanceof Boolean || domValue instanceof Byte || domValue instanceof Character || domValue instanceof Double || domValue instanceof Float || domValue instanceof Integer || domValue instanceof Long || domValue instanceof Short || domValue instanceof String ) return domValue; else if( domValue instanceof IVariableBinding ) { return Factory.createDeclaration((IVariableBinding)domValue, env); } else if (domValue instanceof Object[]) { final Object[] elements = (Object[])domValue; final int len = elements.length; final List<AnnotationValue> annoValues = new ArrayList<AnnotationValue>(len); for( int i=0; i<len; i++ ){ if( elements[i] == null ) continue; // can't have multi-dimensional array. // there should be already a java compile time error else if( elements[i] instanceof Object[] ) return null; final AnnotationValue annoValue = createAnnotationValue(elements[i], name, i, parent, env); if( annoValue != null ) annoValues.add(annoValue); } return annoValues; } // caller should have caught this case. else if( domValue instanceof ITypeBinding ) return Factory.createTypeMirror((ITypeBinding)domValue, env); else if( domValue instanceof IResolvedAnnotation ) { return Factory.createAnnotationMirror((IResolvedAnnotation)domValue, decl, env); } // should never reach this point throw new IllegalStateException("cannot build annotation value object from " + domValue); } public static InterfaceType createErrorInterfaceType(final ITypeBinding binding) { return new ErrorType.ErrorInterface(binding.getName()); } public static ClassType createErrorClassType(final ITypeBinding binding) { return new ErrorType.ErrorClass(binding.getName()); } public static AnnotationType createErrorAnnotationType(final ITypeBinding binding) { return new ErrorType.ErrorAnnotation(binding.getName()); } }
6f6c6c061b02aaaf449ddfa19144d70e808a79ec
a038e183b8ffe6a0801aaf94d7c3d9cfa5f65517
/DisposableJFrame.java
5db0c0852775938216f3e4f66ba53859cb6cefff
[]
no_license
cs2113-s21/j4-class-samples
538473c009b8e431afdb03161e383c4997e17149
3ff6af677a55e47d39458999b59e39e756bf51aa
refs/heads/main
2023-04-01T10:15:30.312288
2021-04-05T17:23:02
2021-04-05T17:23:02
354,914,122
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
import javax.swing.*; public class DisposableJFrame extends JFrame{ private int id; public DisposableJFrame(int id){ super(); this.id = id; this.setTitle("CS2113, actually I like it! ("+id+")"); this.setSize(300,400); this.setLocation(2000+id*50,-100+id*50); } public int getId(){ return id; } //rest of this functionality comes from extending JFrame }
6e13fed8948b76a68a9939e8dc7280c446c15631
e872d23b4bb660c08376e7c79f2136320a5e0646
/behaviors/behavior-tutorial/behavior-tutorial-platform-jar/src/main/java/com/someco/model/SomeCoRatingsModel.java
6adda77e2958d3849ac6a0ebd1d20943435a254d
[ "Apache-2.0" ]
permissive
spino233/alfresco-developer-series
0c14223eff6d58ff1e811a6ac49fbddd48d7b7a2
770df307c30c2caa9cdb3c541b4ee386073b2860
refs/heads/master
2020-05-15T12:11:04.117376
2019-02-14T03:17:54
2019-02-14T03:17:54
182,256,884
1
0
Apache-2.0
2019-04-19T11:49:08
2019-04-19T11:49:08
null
UTF-8
Java
false
false
817
java
package com.someco.model; /** * Created by jpotts, Metaversant on 4/11/18. */ public interface SomeCoRatingsModel { // Namespaces public static final String NAMESPACE_SOMECO_RATINGS_CONTENT_MODEL = "http://www.someco.com/model/ratings/1.0"; // Types public static final String TYPE_SCR_RATING = "rating"; // Aspects public static final String ASPECT_SCR_RATEABLE = "rateable"; // Properties public static final String PROP_RATING = "rating"; public static final String PROP_RATER = "rater"; public static final String PROP_AVERAGE_RATING= "averageRating"; public static final String PROP_TOTAL_RATING= "totalRating"; public static final String PROP_RATING_COUNT= "ratingCount"; // Associations public static final String ASSN_SCR_RATINGS = "ratings"; }
82e36cf79d21d3b6c563fd9ebda2843866f028d4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_f9d43a8a5fcd84a5ddd84b9861edadc750c76641/RouterVersion/12_f9d43a8a5fcd84a5ddd84b9861edadc750c76641_RouterVersion_s.java
20eae22f7b05b7d2149d60dac5ea3330e45d4047
[]
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,109
java
package net.i2p.router; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain * with no warranty of any kind, either expressed or implied. * It probably won't make your computer catch on fire, or eat * your children, but it might. Use at your own risk. * */ import net.i2p.CoreVersion; /** * Expose a version string * */ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; public final static long BUILD = 3; /** for example "-test" */ public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public static void main(String args[]) { System.out.println("I2P Router version: " + FULL_VERSION); System.out.println("Router ID: " + RouterVersion.ID); System.out.println("I2P Core version: " + CoreVersion.VERSION); System.out.println("Core ID: " + CoreVersion.ID); } }
8b4b8ae5e4b1ea265ca7656258c0463aca776f03
663647092730b2313fc7f86c7d2bf57041a2a208
/app6/src/main/java/co/edu/udea/cmovil/gr8/yamba/DetailsFragment.java
116b5ecbfe95f34fc37b34b8dafa884c6c7eddaf
[]
no_license
programadorsito/Yamba
76d6b1745cc534fd84a4b20a3812d5bd6776d20a
092351fb99774ecf4931fb73a0821e3e63ff17b8
refs/heads/master
2021-01-10T04:40:14.224743
2015-06-11T05:49:43
2015-06-11T05:49:43
36,865,475
0
0
null
null
null
null
UTF-8
Java
false
false
1,811
java
package co.edu.udea.cmovil.gr8.yamba; import android.app.Fragment; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class DetailsFragment extends Fragment { private TextView textUser, textMessage, textCreatedAt; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View view = inflater.inflate(R.layout.list_item, null, false); textUser = (TextView) view.findViewById(R.id.list_item_text_user); textMessage = (TextView) view.findViewById(R.id.list_item_text_message); textCreatedAt = (TextView) view.findViewById(R.id.list_item_text_created_at); return view; } @Override public void onResume() { super.onResume(); long id = getActivity().getIntent().getLongExtra(StatusContract.Column.ID, -1); updateView(id); } public void updateView(long id) { if (id == -1) { textUser.setText(""); textMessage.setText(""); textCreatedAt.setText(""); return; } Uri uri = ContentUris.withAppendedId(StatusContract.CONTENT_URI, id); Cursor cursor = getActivity().getContentResolver().query(uri, null,null, null, null); if (!cursor.moveToFirst()) return; String user = cursor.getString(cursor.getColumnIndex(StatusContract.Column.USER)); String message = cursor.getString(cursor.getColumnIndex(StatusContract.Column.MESSAGE)); long createdAt = cursor.getLong(cursor.getColumnIndex(StatusContract.Column.CREATED_AT)); textUser.setText(user); textMessage.setText(message); textCreatedAt.setText(DateUtils.getRelativeTimeSpanString(createdAt)); } }
f90405f56f7e7d26bcbac245d38d13313a8224c8
2ac4352be39c46ed8add5c8d49f4b0ed1adeb9da
/src/main/java/net/bigpoint/assessment/gasstation/BigpointGasStation.java
7bef9ae35334578a8ea5aa8c69da08ea2c99296a
[]
no_license
AliHassan89/Java-GasStation
ad3567021d24e85b868c7ef9326b374f79a6ec91
0bc3b3d1d850794af37227a2e188a9011159e35a
refs/heads/master
2020-12-26T02:33:03.660213
2014-03-16T11:50:03
2014-03-16T11:50:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,524
java
package net.bigpoint.assessment.gasstation; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.concurrent.Semaphore; import net.bigpoint.assessment.gasstation.exceptions.GasTooExpensiveException; import net.bigpoint.assessment.gasstation.exceptions.NotEnoughGasException; public class BigpointGasStation implements GasStation{ /** * List containing all gas pump objects at this station */ List<GasPump> gasPumps; /** * Total amount of money generated from all sales * */ double revenue; /** * Number of successful sales from this pump, * sales which the customer paid for */ int successfulSales; /** * Number of unsuccessful sales due to lack * of gas in pump. */ int canceledSales_noGas; /** * Number of unsuccessful sales caused whenever * customer bids lower than the fixed price of gas */ int canceledSales_expensive; /** * Semaphore is used for synchronizing threads. 1 is passed as argument, it is * to ensure that only one thread at a time is calling the pumpGas(double) * method as per requirement. Semaphore releases a thread just after committing * all changes by calling semaphore.release(). */ private final Semaphore mySemaphore = new Semaphore(1); /** * Constructor initializing List and variables */ public BigpointGasStation() { super(); revenue = 0; successfulSales = 0; canceledSales_expensive = 0; canceledSales_noGas = 0; gasPumps = new LinkedList<GasPump>(); } @Override public void addGasPump(GasPump pump) { this.gasPumps.add(pump); } @Override public Collection<GasPump> getGasPumps() { return gasPumps; } @Override public double buyGas(GasType type, double amountInLiters, double maxPricePerLiter) throws NotEnoughGasException, GasTooExpensiveException { int lowGasCheck = 0, expensiveGasCheck = 0, expensiveGas = 0, lowGas = 0, index=0; boolean check=false; // This acquires one thread at a time try { mySemaphore.acquire(); } catch (InterruptedException e) {} for(int i=0; i<gasPumps.size(); i++) { GasPump pump = gasPumps.get(i); if(type == pump.getGasType()) //also checks if any other thread is using this pump { check = true; lowGasCheck++; if(pump.getRemainingAmount() >= amountInLiters) { expensiveGasCheck++; if(getPrice(type) <= maxPricePerLiter) { index=i; break; } else expensiveGas++; } else lowGas++; } } if(check) if(lowGas == lowGasCheck) { canceledSales_noGas++; throw new NotEnoughGasException(); } if(expensiveGas == expensiveGasCheck) { canceledSales_expensive++; throw new GasTooExpensiveException(); } gasPumps.get(index).pumpGas(amountInLiters); double payableAmount = amountInLiters * maxPricePerLiter; revenue += payableAmount; successfulSales++; mySemaphore.release(); return payableAmount; } @Override public double getRevenue() { return revenue; } @Override public int getNumberOfSales() { return successfulSales; } @Override public int getNumberOfCancellationsNoGas() { return canceledSales_noGas; } @Override public int getNumberOfCancellationsTooExpensive() { return canceledSales_expensive; } @Override public double getPrice(GasType type) { return type.price; } @Override public void setPrice(GasType type, double price) { type.price = price; } }
cb5728ea9fe36cfc233803f5a7672701aab155db
f46a7cb85f78918bdc9d8d9430714f67d0421068
/src/test/java/Test_Cases/DifferentWait.java
f48491cd9fbc2c0868765a62f013dc1c6bf0b1dd
[]
no_license
Vivek1328/Learning
566469524b86ab40072a7480f037315a50660e97
218c510e0bf4029bd8fbf4e76bf7cc876b93953c
refs/heads/main
2023-05-06T00:50:23.120516
2021-04-05T13:31:29
2021-04-05T13:31:29
354,843,180
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package Test_Cases; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class DifferentWait { public WebDriver driver; public void test() { driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); WebDriverWait wait = new WebDriverWait(driver,20); //wait.until(ExpectedConditions.invisibilityOfElementLocated(driver.findElement(By.id("")).click(); } }
16653db4689f348bac17ee5745ccddffc52ef4a5
6d5ef22679046dae328668134fb2cf48404d0652
/vr_mod_2/src/androidTest/java/tech/joei/vr_mod_2/ExampleInstrumentedTest.java
3b2a9fdaeeac3a40cbc1e73128c22ff0aabb7bda
[]
no_license
cyberpirate/VR-Test-App
17089f084f2cfb19ba73b53e99b870d55e415ad2
ca2d71e41e6226683fb00cfaff62147eb1ef4a29
refs/heads/master
2020-03-29T19:58:14.178412
2017-06-29T00:36:45
2017-06-29T00:36:45
95,723,095
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package tech.joei.vr_mod_2; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("tech.joei.vr_mod_2.test", appContext.getPackageName()); } }
7543be24ad14b3aa2da2f5f7d2e462c11af62512
3863c24c9a08ce44f7a0aba84f02a164e74cbe15
/Khao-kao/peck/Springboot/src/main/java/comeng/sa/no12/demo/controller/StaffController.java
167078e5f6f12b869d94ab5ccc4616f07cb16292
[]
no_license
johnR46/523331_SYSTEM-ANALYSIS-AND-DESIGN
e555e8f03c365355a1260e4ad06d90abe5645e4e
b3fbacc442bafdab961bed34fc50e3d507454d1d
refs/heads/master
2020-03-30T18:08:22.374149
2018-10-26T16:10:19
2018-10-26T16:10:19
151,485,421
1
3
null
2018-10-25T08:19:05
2018-10-03T21:54:43
JavaScript
UTF-8
Java
false
false
766
java
package comeng.sa.no12.demo.controller; import comeng.sa.no12.demo.entity.Staff; import comeng.sa.no12.demo.repository.StaffRepository; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Collection; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; @RestController class StaffController { @Autowired private StaffRepository staffRepository; public StaffController(StaffRepository staffRepository) { this.staffRepository = staffRepository; } @GetMapping("/Staffs") public Collection<Staff> Staff(){ return staffRepository.findAll().stream().collect(Collectors.toList()); } }
e5a483b943015d847f6e1aaf61eff43481ca3443
e9368c9381eb2215b8968f271c5952eae18a2428
/countoff/src/main/java/com/dy/kata/countoff/gamerule/model/SpecialNumbers.java
a739056fae0f3075eb76af0c7371b65401f53f29
[]
no_license
oracs/codekata
bcaba4df775ab2f0d02409030d6b574c72576461
6b9f316427f1b25059b05112fc0a07dd85ad60a0
refs/heads/master
2021-09-10T14:46:28.888641
2018-03-28T01:35:05
2018-03-28T01:35:05
109,691,254
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package com.dy.kata.countoff.gamerule.model; import java.util.Arrays; import java.util.List; public class SpecialNumbers { private final List<Integer> specialNumbers; public SpecialNumbers(Integer[] numbers) { specialNumbers = Arrays.asList(numbers); } public int size() { return specialNumbers.size(); } public int get(int index) { return specialNumbers.get(index); } }
b65f77aa8750fca413885b694372a0c6de5792f5
ca493c514d92ab502187912e79f526e0f1c38b5a
/src/lesson13/MysqlConnect.java
131b562e6eb0d9166b03c6c1061e4903ccc839c3
[]
no_license
AleksandrMikhin/lessons
3dad6a5a6a27fcb7934c10ef9d05454d99a04520
62a79daccba5bac36d41ce4779a9d8d736f15b1c
refs/heads/master
2022-01-25T18:34:40.043317
2019-01-16T12:10:35
2019-01-16T12:10:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
package lesson13; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class MysqlConnect { static String connectUrl = "jdbc:mysql://localhost:3306/lesson13" + "?verifyServerCertificate=false"+ "&useSSL=false"+ "&requireSSL=false"+ "&useLegacyDatetimeCode=false"+ "&amp"+ "&serverTimezone=UTC"; static String user = "root"; static String pass = "root"; static String sql = "CREATE TABLE IF NOT EXISTS Example(" + "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + "firstColumn TEXT NOT NULL," + "secondColumn INTEGER NOT NULL);"; public static void main(String[] args) throws SQLException, ClassNotFoundException { // регистрируем драйвер Class.forName("com.mysql.cj.jdbc.Driver"); try (Connection connection = DriverManager.getConnection(connectUrl, user, pass)){ Statement statement = connection.createStatement(); // int row = statement.executeUpdate(sql); // System.out.println(row); } } }
c545a60d66e0e5426e139cb5f4cf2ac474b8632f
254d0792bf567723782770c401caeef3c1d5a256
/TestMenu/app/src/main/java/com/henallux/testmenu/MyApplication.java
108df1b5e2d7b9eedc910a7c4d693eb2fe77ec58
[]
no_license
dernich/projetAndroid
7dcd33ba5857caf6e123eb9f64e4e9a4b5d72cd2
e22a37190b6b0f15da212727be95cf5051131079
refs/heads/master
2016-08-11T12:06:59.490810
2016-01-20T10:57:00
2016-01-20T10:57:00
43,499,719
0
0
null
null
null
null
UTF-8
Java
false
false
1,409
java
package com.henallux.testmenu; import android.app.Application; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.Signature; import android.util.Base64; import android.util.Log; import com.henallux.testmenu.Model.Nurse; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MyApplication extends Application { private static MyApplication mInstance; private static Nurse idInfirmiere; @Override public void onCreate(){ super.onCreate(); try { PackageInfo info = getPackageManager().getPackageInfo( this.getPackageName(), PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); } } catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException e) {e.printStackTrace(); } mInstance = this; } public static MyApplication getInstance(){ return mInstance; } public static Context getAppContext(){ return mInstance.getApplicationContext(); } public static void setIdInfirmiere(Nurse id) { idInfirmiere = id; } public static Nurse getIdInfirmiere() { return idInfirmiere; } }
47ef8ea4dd7db62ea5da266f5a85804c8ffc6b5d
5d5d5f118f1dc4a9d3986942d417b563e21d616f
/crawlingbot/src/main/java/com/example/demo/worker/PageExtractor.java
3761801f6ee873bb5bb1d8e37e56ef46493b1f8c
[]
no_license
Sagarovi21/SocialVantage
cebd726fe8e384a4cebe2b6b1dd79728b252b540
cb68325b128f121e606fe0b709b5b8f0878796a4
refs/heads/master
2022-11-12T03:14:30.877820
2019-02-22T18:47:43
2019-02-22T18:47:43
172,232,655
0
1
null
2022-10-29T07:08:58
2019-02-23T15:53:09
Python
UTF-8
Java
false
false
9,837
java
package com.example.demo.worker; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.jsoup.HttpStatusException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import com.example.demo.entity.Reviews; import com.example.demo.model.Review; import opennlp.tools.postag.POSModel; import opennlp.tools.postag.POSTaggerME; import opennlp.tools.tokenize.SimpleTokenizer; @Component @Scope("prototype") public class PageExtractor implements Callable<List<Reviews>>{ private static Logger logger = LoggerFactory.getLogger(Runnable.class); private String url; private String parent; private List<Reviews> result; public PageExtractor(String parent, String url) { super(); this.url = url; this.parent = parent; } public List<Reviews> getResult() { return result; } public void setResult(List<Reviews> result) { this.result = result; } public String getParent() { return parent; } public void setParent(String parent) { this.parent = parent; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public void init() { URI uri; try { uri = new URI(parent); String hostname = uri.getHost(); String protocol = uri.getScheme(); if( !url.contains("http")) { this.setUrl(protocol+"://"+hostname+this.url); } } catch (URISyntaxException e) { logger.error("error during url extraction", e); } } public void run() { init(); logger.info("Child :"+this.url); try { Document doc = Jsoup.connect(this.url).userAgent("Mozilla").timeout(5000).get(); String title = doc.select("h1").text(); String price = null; price = extractPrice(doc, price); List<String> specs = new ArrayList<>(); List<Review> list = new ArrayList<>(); getFeatures(doc, specs); String feature = String.join(" ", specs); logger.info("feature : "+feature); List<Pattern> rating_Patterns = new ArrayList<>(); rating_Patterns.add(Pattern.compile("(\\d|\\d.\\d) out of (\\d|\\d.\\d)")); rating_Patterns.add(Pattern.compile("(\\d|\\d.\\d) Out of (\\d|\\d.\\d)")); Elements reviews = doc.select("[class*='reviewList']"); reviews = doc.select("[class*='review']"); extractReviews( list, rating_Patterns, reviews); if(list.size() < 2) { reviews = doc.select("[class*='cmnt']"); extractReviews( list, rating_Patterns, reviews); } result = new ArrayList<>(); feature = feature.replaceAll("[^A-Za-z0-9()\\s\\.\\[\\]]", ""); feature= processNLP(feature); for(Review review : list) { String titleText = title.replaceAll("[^A-Za-z0-9()\\s\\.\\[\\]]", ""); if(titleText.length() > 130) { titleText = titleText.substring(0, 130);} String reviewText = review.getReview().replaceAll("[^A-Za-z0-9()\\s\\.\\[\\]]", ""); if(reviewText.length() > 990) { reviewText = reviewText.substring(0, 990);} logger.info(feature); result.add(new Reviews(1, titleText,"", reviewText, review.getRating(), review.getTotalRating(), (price == null ? 0.0d: Double.parseDouble(price)), feature, feature)) ; } logger.info("title : "+title+ " price: "+ price); } catch (HttpStatusException ex) { logger.error("HttpStatusException in url parsing", ex); } catch (IOException e) { logger.error("IOException in url parsing", e); } } private String processNLP(String feature) { SimpleTokenizer tokenizer = SimpleTokenizer.INSTANCE; List<String> fet =new ArrayList<>(); String[] tokens = tokenizer.tokenize(feature); InputStream inputStreamPOSTagger = getClass() .getResourceAsStream("/models/en-pos-maxent.bin"); POSModel posModel; try { posModel = new POSModel(inputStreamPOSTagger); POSTaggerME posTagger = new POSTaggerME(posModel); String tags[] = posTagger.tag(tokens); for(int i =0;i<tags.length; i++) { String tag = tags[i]; if(tag.equals("NNP") || tag.equals("NN") || tag.equals("JJ") || tag.equals("CD")) { fet.add("'"+tokens[i]+"'"); } } if(fet.size() > 0) { feature = String.join(",", fet); if(feature.length() > 220) { feature = feature.substring(0, 220);} if(feature.substring(feature.length() - 1).equals(",") || feature.substring(feature.length() - 1).equals("]") ) { feature=feature.substring(0,feature.length() - 1); feature = "["+String.join(",", fet)+"]"; }else if (feature.substring(feature.length() - 1).equals("'") ) { feature = "["+String.join(",", fet)+"]"; }else { feature = "["+String.join(",", fet)+"']"; } }else { feature = null; } } catch (IOException e) { logger.info("error during pos tagger",e); } return feature; } private void extractReviews(List<Review> list, List<Pattern> rating_Patterns, Elements reviews) { for(Element review : reviews) { String rating = null; String total_rating = null; String comments = null; //logger.info(review.toString()); for(Element children : review.children()) { //logger.info(children.toString()); //logger.info(children.text()); for(Pattern pattern : rating_Patterns) if (rating == null) { Matcher m = pattern.matcher(children.text()); m = pattern.matcher(children.text()); while (m.find()) { rating = m.group(1); total_rating = m.group(2); } if (rating != null) { break; } } if (rating == null) { int count = 0; int rate =0; Elements rates = children.select("[class*='star']:not(:has(*))"); String refer = null; for ( Element rele : rates) { if (refer == null) { refer = rele.className(); } if (!(refer.compareTo(rele.className()) > 0)) { rate +=1; } count++; } if(rate != 0 && count != 0 && count <= 10) { rating = Integer.toString(rate); total_rating = Integer.toString(count); } } if(rating != null) { comments += children.text(); } } if(rating != null) { logger.info(rating +" : "+total_rating+ " : "+comments); list.add(new Review(comments,Float.parseFloat(rating),Float.parseFloat(total_rating))); } } } private void getFeatures(Document doc, List<String> specs) { Elements features = doc.select("div[class*='feature']"); for(Element feature : features) { feature.children().forEach((e)->{specs.add(e.text());}); } if(features == null || features.size() == 0) { features = doc.select("div[id*='feature']"); for(Element feature : features) { feature.children().forEach((e)->{ specs.add(e.text());}); } } if(features == null || features.size() == 0) { features = doc.select("div[class*='specific']"); for(Element feature : features) { feature.children().forEach((e)->{specs.add(e.text());}); } } if(features == null || features.size() == 0) { features = doc.select("div[id*='specific']"); for(Element feature : features) { feature.children().forEach((e)->{ specs.add(e.text());}); } } if(features == null || features.size() == 0) { features = doc.select("div[class*='detail']"); for(Element feature : features.select(":not(:has(*)")) { if(feature.hasText()) { specs.add(feature.text()); } } } if(features == null || features.size() == 0) { features = doc.select("div[id*='detail']"); for(Element feature : features.select(":not(:has(*)")) { if(feature.hasText()) { specs.add(feature.text()); } } } } private String extractPrice(Document doc, String price) { Elements eles = doc.select("div[class*='price']"); for(Element ele : eles) { Elements priceEle = ele.getElementsMatchingText("^(0|[1-9][0-9]*)$"); if(priceEle.size()>0) { price = priceEle.first().text(); } priceEle = ele.getElementsMatchingText("^\\d{1,3}(,\\d{3})*(\\.\\d+)?$"); if(priceEle.size()>0) { price = priceEle.first().text().replaceAll(",", ""); } } if( price == null) { eles = doc.select("div[id*='price']"); for(Element ele : eles) { Elements priceEle = ele.getElementsMatchingText("^(0|[1-9][0-9]*)$"); if(priceEle.size()>0) { price = priceEle.first().text(); } priceEle = ele.getElementsMatchingText("^\\d{1,3}(,\\d{3})*(\\.\\d+)?$"); if(priceEle.size()>0) { price = priceEle.first().text().replaceAll(",", ""); } } } return price; } public static void main(String[] args){ String url1 ="https://gadgets.ndtv.com/samsung-galaxy-a9s-5709"; String url2 ="https://www.digit.in/mobile-phones/xiaomi-mi-a2-price-125589.html"; String url3 = "https://shop.gadgetsnow.com/smartphones/lenovo-k8-note-64gb-black-4gb-ram-/10021/p_G28690"; String url4 = "https://gadgets.ndtv.com/vivo-z3i-standard-edition-8950"; String url5 ="https://gadgets.ndtv.com/samsung-m20-galaxy-8938"; String url6 ="https://www.consumerreports.org/products/smart-phone/sony-xperia-xz1-394729/overview/"; PageExtractor pageExtractor = new PageExtractor("https://gadgets.ndtv.com/",url1); pageExtractor.run(); /* * PageExtractor pageExtractor = new * PageExtractor("https://gadgets.ndtv.com/",""); pageExtractor.processNLP(""); */ } @Override public List<Reviews> call() throws Exception { run(); return this.result; } }
23336594b62749a3daefc232f46dab43b7bcc888
f9f4144a74c28850c3c890f530f684903c4756b1
/springboot-mybatis/src/main/java/com/lzj/springbootmybatis/mapper/DepartmentMapper.java
a21f33a7ac0aa301645cb3f83510ddb3e244a493
[]
no_license
liuzhoujian/springboot-jdbc-mysql-jpa
9b5aee11e6986f409c7833f03140c6b7c2343e0a
6c70d34a9e2675e378ff01ecd6f55c87905bcc86
refs/heads/master
2020-04-17T22:12:04.902605
2019-01-22T11:45:02
2019-01-22T11:45:02
166,984,373
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
package com.lzj.springbootmybatis.mapper; import com.lzj.springbootmybatis.bean.Department; import org.apache.ibatis.annotations.*; import java.util.List; //@Mapper 在springboot主类中配置统一扫描 public interface DepartmentMapper { @Select("SELECT * FROM department WHERE id = #{id}") Department getDepartmentById(Integer id); @Delete("DELETE FROM department WHERE id = #{id}") int deleteDepartmentById(Integer id); @Options(useGeneratedKeys = true, keyProperty = "id") //返回自增主键 @Insert("INSERT INTO department(departmentName) VALUES (#{departmentName})") int insertDepartment(Department department); @Update("UPDATE department SET departmentName = #{departmentName} WHERE id = #{id}") Department updateDepartment(Department department); //分页获取所有信息 @Select("SELECT * FROM department") List<Department> getAllDepartment(); }
e016637d5503699e26971865594e1c4eb55d1040
af97b69d5cd5b5e27a626ee72b5603f0bd027591
/src/tool/Nmrs.java
bb3041f0230b193b844eb3f15687d92b2dd2efe6
[]
no_license
huangtao/MahjongGit
f5ca3a64705b568a6d1eacd5c7fc3e8297458075
a682777c5d9c2a5772524b35e6b5929c0c2d59be
refs/heads/master
2021-01-18T02:03:15.820791
2015-06-09T20:33:57
2015-06-09T20:33:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package tool; import java.util.ArrayList; import java.util.List; public class Nmrs { public static void main(String[] args) { } private List<List<Integer>> build_n(List<Integer> elemList, int cur, int leftSize) { List<List<Integer>> retList = new ArrayList<List<Integer>>(); if (leftSize == 0){ retList.add(new ArrayList<Integer>()); return retList; } for (int i = cur; i < elemList.size() - (leftSize - 1); i++) { if (elemList.size() - (i + 1) >= leftSize - 1) { List<List<Integer>> list_next = build_n(elemList, i+1, leftSize - 1); Integer elem = elemList.get(i); for (List<Integer> list3 : list_next) { list3.add(elem); retList.add(list3); } } } return retList; } }
b02d3fa863c90209d4eb56fc8747cc365e5b7daa
a964cbdcb355af8d8775383e793380c8c0c64adf
/src/main/java/org/csc/wlt/enums/CoinSymbolEnum.java
2619cb5b39f06c9367513e46d5be03806b210db6
[]
no_license
Csc-Quanta/wallet-api
2b0091039f23f1d761c41c51781067205628764f
64b77955f792a34af1fec29332fcc33ab61dadcf
refs/heads/master
2020-04-18T18:00:47.939291
2019-01-26T09:41:48
2019-01-26T09:41:48
167,671,691
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package org.csc.wlt.enums; public enum CoinSymbolEnum { ETH("1"), BTC("2"), EOS("3"), CSC("4"), RMB("5"); String number; CoinSymbolEnum(String number) { this.number = number; } /** * 通过编号获得枚举 不存在的编号返回null * * @param number * @return */ public static CoinSymbolEnum getCoinSymbolByNumber(String number) { for (CoinSymbolEnum coinSymbol : values()) { if (coinSymbol.number.equals(number)) { return coinSymbol; } } return null; } }
4ec94a29e9ebfe53a7cfd2469aa7110165dbef2d
8c2ec1da840dfbf0d5d11c5cff71b7ad3e2238a8
/library/src/test/java/reactiveairplanemode/pwittchen/github/com/library/ReactiveAirplaneModeTest.java
63171b510e68de02e3a0db5177b91b885edf6820
[ "Apache-2.0" ]
permissive
pwittchen/ReactiveAirplaneMode
2d5dd4bd0abfa37b6babba1fda3dcac8aa321cf2
ba463d59b841ddd893bd74916d5df85a2be95e8f
refs/heads/master
2021-01-02T09:12:53.411991
2020-08-19T08:49:23
2020-08-19T08:49:23
99,165,764
8
2
Apache-2.0
2020-08-19T08:49:24
2017-08-02T22:21:09
Java
UTF-8
Java
false
false
5,433
java
/* * Copyright (C) 2017 Piotr Wittchen * * 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 reactiveairplanemode.pwittchen.github.com.library; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import io.reactivex.Observable; import io.reactivex.ObservableEmitter; import io.reactivex.Single; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @SuppressWarnings("PMD") @RunWith(RobolectricTestRunner.class) public class ReactiveAirplaneModeTest { private Context context; private ReactiveAirplaneMode reactiveAirplaneMode; @Before public void setUp() { context = spy(RuntimeEnvironment.application.getApplicationContext()); reactiveAirplaneMode = spy(ReactiveAirplaneMode.create()); } @Test public void reactiveAirplaneModeObjectShouldNotBeNull() { assertThat(reactiveAirplaneMode).isNotNull(); } @Test(expected = IllegalArgumentException.class) public void getAndObserveShouldThrowAnExceptionForNullContext() { reactiveAirplaneMode.getAndObserve(null); } @Test(expected = IllegalArgumentException.class) public void observeShouldThrowAnExceptionForNullContext() { reactiveAirplaneMode.observe(null); } @Test(expected = IllegalArgumentException.class) public void getShouldThrowAnExceptionForNullContext() { reactiveAirplaneMode.get(null); } @Test(expected = IllegalArgumentException.class) public void isAirplaneModeOnShouldThrowAnExceptionForNullContext() { reactiveAirplaneMode.isAirplaneModeOn(null); } @Test public void observeShouldCreateIntentFilter() { // when reactiveAirplaneMode.observe(context); // then verify(reactiveAirplaneMode).createIntentFilter(); } @Test public void isAirplaneModeOnShouldReturnFalseByDefault() { // when final boolean isAirplaneModeOn = reactiveAirplaneMode.isAirplaneModeOn(context); // then assertThat(isAirplaneModeOn).isFalse(); } @Test public void getAndObserveShouldEmitAirplaneModeOffByDefault() { // when final Observable<Boolean> observable = reactiveAirplaneMode.getAndObserve(context); // then assertThat(observable.blockingFirst()).isFalse(); } @Test public void getShouldEmitAirplaneModeOffByDefault() { // when final Single<Boolean> single = reactiveAirplaneMode.get(context); // then assertThat(single.blockingGet()).isFalse(); } @Test public void shouldCreateBroadcastReceiver() { // given final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class); // when final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter); // then assertThat(receiver).isNotNull(); } @Test public void broadcastReceiverShouldReceiveAnIntentWhereAirplaneModeIsOff() { // given final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class); final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter); final Intent intent = mock(Intent.class); when(intent.getBooleanExtra(ReactiveAirplaneMode.INTENT_EXTRA_STATE, false)).thenReturn(false); // when receiver.onReceive(context, intent); // then verify(emitter).onNext(false); } @Test public void broadcastReceiverShouldReceiveAnIntentWhereAirplaneModeIsOn() { // given final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class); final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter); final Intent intent = mock(Intent.class); when(intent.getBooleanExtra(ReactiveAirplaneMode.INTENT_EXTRA_STATE, false)).thenReturn(true); // when receiver.onReceive(context, intent); // then verify(emitter).onNext(true); } @Test public void shouldCreateIntentFilter() { // when final IntentFilter intentFilter = reactiveAirplaneMode.createIntentFilter(); // then assertThat(intentFilter).isNotNull(); } @Test public void shouldCreateIntentFilterWithAirplaneModeChangedAction() { // when final IntentFilter intentFilter = reactiveAirplaneMode.createIntentFilter(); // then assertThat(intentFilter.getAction(0)).isEqualTo(Intent.ACTION_AIRPLANE_MODE_CHANGED); } @Test public void shouldTryToUnregisterReceiver() { // given final BroadcastReceiver broadcastReceiver = mock(BroadcastReceiver.class); // when reactiveAirplaneMode.tryToUnregisterReceiver(broadcastReceiver, context); // then verify(context).unregisterReceiver(broadcastReceiver); } }
688c72808226975abafb4b8d741ad84708bccbea
3fc144b3a5ec652482f1592178b538a460be6dae
/src/main/java/model/ContasAReceber.java
1c6ecbbc08ea5dd7fd3e810d91e652193df07619
[]
no_license
luanyaribeiro/projetouniversidade
2094ea407de5d22ed8bee586dad304c6a4ad2983
c9a20ff8858302c63ff114977a8af9923fb8a859
refs/heads/master
2020-05-17T12:39:20.572151
2019-04-27T02:00:01
2019-04-27T02:00:01
183,716,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
package model; import model.Enum.StatusContas; import java.math.BigDecimal; import java.util.Date; public class ContasAReceber { private Integer id; private Aluno aluno; private Date dataVencimento; private BigDecimal valorAReceber; private StatusContas statusConta; public ContasAReceber() { } public ContasAReceber(Integer id, Aluno aluno, Date dataVencimento, BigDecimal valorAReceber, StatusContas statusConta) { this.id = id; this.aluno = aluno; this.dataVencimento = dataVencimento; this.valorAReceber = valorAReceber; this.statusConta = statusConta; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Aluno getAluno() { return aluno; } public void setAluno(Aluno aluno) { this.aluno = aluno; } public Date getDataVencimento() { return dataVencimento; } public void setDataVencimento(Date dataVencimento) { this.dataVencimento = dataVencimento; } public BigDecimal getValorAReceber() { return valorAReceber; } public void setValorAReceber(BigDecimal valorAReceber) { this.valorAReceber = valorAReceber; } public StatusContas getStatusConta() { return statusConta; } public void setStatusConta(StatusContas statusConta) { this.statusConta = statusConta; } }
f824b068d295260cc47b09eb07ac7d56a422f575
36f206b44fd02897d4305427bdb8c727e2efe824
/ProjectZip/src/com/barry/projectzip/Tag.java
eae0c863e4fe4b45855cdba42e0cc919fee0664b
[]
no_license
breakerthb/AndroidStudyResource
344d627ac14fecc288c139405f420d771dc43c72
c8112f81e0f4f07a83105797059095608154943e
refs/heads/master
2021-04-29T08:31:24.106406
2016-12-30T09:00:48
2016-12-30T09:00:48
77,674,262
0
0
null
null
null
null
UTF-8
Java
false
false
186
java
package com.barry.projectzip; public class Tag { public static String LINE = "##"; public static String FILE_NAME_START = "<<>>#"; public static String FILE_NAME_END = "#<<>>"; }
8df194601791a922e36ef2d0a69c131cddb58d24
a1cc7321c90a21fb559c39a99fa54cff5915cf9e
/dc/src/dc1_2/MenuController.java
6329443148501d7d9f62cb6a3f42e1f52adb9569
[]
no_license
inoue-keiichi/Java-training
1009637f51bd15fce6bcd989e6bb0c99d2255ee7
dd5ca7bc86e32740e74a50dd831ae322b81c32a3
refs/heads/master
2023-05-15T04:50:00.598526
2023-05-08T11:43:48
2023-05-08T11:43:48
203,075,371
0
0
null
null
null
null
UTF-8
Java
false
false
2,001
java
package dc1_2; import java.awt.Button; import java.awt.Choice; import java.awt.Dialog; import java.awt.Dimension; import java.awt.Frame; import java.awt.GridLayout; import java.awt.Label; import java.awt.List; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class MenuController extends Dialog implements ActionListener { private static final MenuController menuController = new MenuController(ClockView.getInstance(), "Property Setting"); private final MenuService menuService = MenuService.getInstance(); private final ClockService clockService = ClockService.getInstance(); private MenuController(Frame frame, String title) { super(frame, title, true); setLayout(new GridLayout(5, 2)); add(new Label("Font")); add(menuService.getFontChoice()); add(new Label("Font Size")); add(menuService.getFontSizeChoice()); add(new Label("Font Color")); add(menuService.getFontColorChoice()); add(new Label("Background Color")); add(menuService.getBackgroundColorChoice()); Button okBtn = new Button("OK"); okBtn.setBounds(50, 80, 100, 30); okBtn.addActionListener(this); add(new Label()); add(okBtn); setResizable(false); setSize(400, 200); addWindowListener(new MenuWindowAdapter()); } @Override public void actionPerformed(ActionEvent e) { clockService.setFont(menuService.getFontChoice().getSelectedItem()); clockService.setFontSize(menuService.intConverter(menuService.getFontSizeChoice().getSelectedItem())); clockService.setFontColor(menuService.colorConverter(menuService.getFontColorChoice().getSelectedItem())); clockService.setBackgroundColor( menuService.colorConverter(menuService.getBackgroundColorChoice().getSelectedItem())); dispose(); ClockView.getInstance().setBackground(clockService.getBackgroundColor()); ClockView.getInstance().setSize(clockService.getFontSize() * 5, clockService.getFontSize() * 5); } public static final MenuController getInstance() { return menuController; } }
0f0664fb35f01f05eee92e66b676e182df85d5ed
1b8a226a3f15c3459f819ebe752d6165e1522a93
/Treinamento_refatoracao_codigo/src/br/alexandre/refatoracao/cap3/GeradorDeNotaFiscal.java
962b225591352d32f2e43ec0484f8c18ec17013f
[]
no_license
alexandreximenes/java
832d4e708dd3122c1fbf0ab9e4007f2f8c38d509
5cef77703bda6a5106734abc32093c0abb29bd5b
refs/heads/master
2022-12-23T21:48:56.717760
2021-04-14T05:19:36
2021-04-14T05:19:36
128,485,600
1
0
null
2022-12-16T04:26:13
2018-04-07T01:16:29
JavaScript
UTF-8
Java
false
false
581
java
package br.alura.refatoracao.cap3; public class GeradorDeNotaFiscal { public NotaFiscal gera(Fatura fatura) { NotaFiscal nf = geraNf(fatura); new EnviadorDeEmail().enviaEmail(nf); new NFDao().salvaNoBanco(nf); return nf; } private NotaFiscal geraNf(Fatura fatura) { double valor = fatura.getValorMensal(); double imposto = 0; if(valor < 200) { imposto = valor * 0.03; } else if(valor > 200 && valor <= 1000) { imposto = valor * 0.06; } else { imposto = valor * 0.07; } NotaFiscal nf = new NotaFiscal(valor, imposto); return nf; } }
1bba53db8501c3fe7428fa2c997c9a2daa3e91a3
80fa845e71c46d38ed027123cf9f82145a6cdc49
/ly-admin/src/main/java/com/ly/lyadmin/modules/bus/service/impl/TCarouselServiceImpl.java
836112f1f38beee7ca3e05426667e0e703d54f58
[ "Apache-2.0" ]
permissive
y-ww/ly-manager
574dbcae61b43471774beb93e16cdc2ec3348e86
552382c38d6925c82243360b7126b8c8db9e84d7
refs/heads/master
2020-08-17T14:59:25.005008
2019-12-26T02:32:53
2019-12-26T02:32:53
215,680,957
0
0
Apache-2.0
2019-12-26T02:32:54
2019-10-17T01:55:33
Java
UTF-8
Java
false
false
558
java
package com.ly.lyadmin.modules.bus.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ly.lyadmin.modules.bus.mapper.TCarouselMapper; import com.ly.lyadmin.modules.bus.model.TCarousel; import com.ly.lyadmin.modules.bus.service.TCarouselService; import org.springframework.stereotype.Service; /** * @Description: TODO * @Author SLIGHTLEE * @Date 2019/11/22 1:23 上午 * @Version V1.0 */ @Service public class TCarouselServiceImpl extends ServiceImpl<TCarouselMapper, TCarousel> implements TCarouselService { }
aa8e1ea57f4c6fed7e2a9b09d93aad44debfe061
5ec0cf99355eef213f32639a62947cc0512df140
/src/com/company/ResultInfo.java
3c93a6c36d7418537d9e794493ba88835c240b15
[]
no_license
valerich2000/calc
8c12e9b66e41fe12528f447592a8bcb4c81e8362
2e403ba7f3f0c3459474654afbda3318abde8119
refs/heads/master
2023-05-30T23:02:20.820277
2021-07-03T19:36:22
2021-07-03T19:36:22
382,696,095
0
0
null
null
null
null
UTF-8
Java
false
false
113
java
package com.company; public class ResultInfo { public String[] elements; public String operationType; }
9ca1f9602b087b63544cf1c615f0b05f2d7104f4
658c3281a99b56e8aa35cfe428c40c5340a55645
/src/com/duan/utils/ArrayUtils.java
d612507174827b49a24e61bbabda07b9479ed72e
[]
no_license
earthinjava/PV2019
822c2fd04bbf594f1201f824e043e7a088078ad6
403a498b3ada8cb504e2c87ae46781a8fe7a52d1
refs/heads/master
2020-07-09T16:19:09.165483
2019-09-06T09:33:28
2019-09-06T09:33:28
204,011,934
0
0
null
null
null
null
UTF-8
Java
false
false
1,196
java
package com.duan.utils; public class ArrayUtils { /** * 获得数组x与y的x1差值 * * @param x 数组x * @param y 数组y * @param x1 * @return */ public static double getMidByTwoArrays(double[] x, double[] y, double x1) { if (x == null || y == null) { return Constant.ERROR_DOUBLE; } int len = x.length; if (x1 <= x[len - 1] && x1 >= x[0]) { int lowX = 0; int bigX = 0; for (int i = 0; i <= len - 1 && x1 >= x[i]; i++) { lowX = i; bigX = i + 1; } double y1 = (y[bigX] - y[lowX]) / (x[bigX] - x[lowX]) * (x1 - x[lowX]) + y[lowX]; return y1; } return Constant.ERROR_DOUBLE; } /** * 获得差值 * * @param array * @param x1 * @return */ public static double getMindByTwoArrays(double[][] array, double x1) { if (array == null) { return Constant.ERROR_DOUBLE; } int l = array[0].length; if (l != 2) { return Constant.ERROR_DOUBLE; } int r = array.length; double[] x = new double[r]; double[] y = new double[r]; for (int i = 0; i < r; i++) { x[i] = array[i][0]; y[i] = array[i][1]; } return getMidByTwoArrays(x, y, x1); } }
[ "Administrator@BVHENZPRV9K1PY5" ]
Administrator@BVHENZPRV9K1PY5
6891882591bdf0b187ecb9bb68dd1dd45fc85036
4afd80ea29894e44e58a3a75905c872fc3527e7e
/EjemploJavaBeans/src/main/java/test/ManejoJavaBeans.java
124bd103188ae74f4e339b40d653a72b01c3cbd4
[]
no_license
Grafijoss/cursoJavaProgramacion
1c941b0ebb9464e3fde8e22125e887a9cbd58428
f4ae5cb194daf5ad58cabe8d2eaca9eb1fd2827e
refs/heads/master
2022-06-22T14:59:13.714597
2020-05-04T22:22:36
2020-05-04T22:22:36
260,047,430
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package test; import beans.PersonaBean; public class ManejoJavaBeans { public static void main(String[] args) { PersonaBean personaBean = new PersonaBean(); personaBean.setNombre("Claudia"); personaBean.setEdad(23); System.out.println("Persona : Nombre = " + personaBean.getNombre() + ", Edad = " + personaBean.getEdad()); } }
c35edb28b026230d855ccd6022d13f9c86b94db6
8bb4b631246e09f518a12c11154abd7b62b6f341
/group15/src/main/java/com/gdg/group15/auth/dto/AccessTokenRequestDTO.java
70748a5b63b3a0ef8ec43bba2331c827582cf710
[]
no_license
GDGSummerHackathon-group15/gdg-group15-backend
570edddc2238e7344fe4c0ff2626719dcd17a547
499a601bc722a952ae696338567278aaad29d932
refs/heads/main
2023-06-17T10:01:33.463807
2021-07-20T08:11:17
2021-07-20T08:11:17
382,566,336
2
2
null
null
null
null
UTF-8
Java
false
false
431
java
package com.gdg.group15.auth.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Builder; import lombok.Getter; @Getter @Builder @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) public class AccessTokenRequestDTO { private final String clientId; private final String clientSecret; private final String code; }
d9472e3c43dd63b98d46c5739720eb1b126704e7
e39bb1a02451b292b58f806a2af3c67f06f6187d
/com/ideas2it/employee/model/Address.java
7fdbfe1e99f2a6acab619591c4f589eef641f773
[]
no_license
Sathishkumar-i2i/EmployeeManagementSystem
56817d217512b7fcf927c2c43080dfa307184005
52da0046d5efeff3a37dde0dc5072b1c9b8b4553
refs/heads/master
2023-03-11T17:03:46.569356
2021-03-04T11:48:11
2021-03-04T11:48:11
342,177,894
0
0
null
null
null
null
UTF-8
Java
false
false
1,402
java
package com.ideas2it.employee.model; /** * This class is used for stored Address details for Employee * @version 04/3/21 * @author Sathishkumar M */ public class Address { private int id; private String doorNo; private String streetName; private String localArea; private String district; private String state; private int pinCode; public int getId() { return id; } public String getDoorNo() { return doorNo; } public String getStreetName() { return streetName; } public String getLocalArea() { return localArea; } public String getDistrict() { return district; } public String getState() { return state; } public int getPinCode() { return pinCode; } public void setId(int id) { this.id = id; } public void setDoorNo(String doorNo) { this.doorNo = doorNo; } public void setStreetName(String StreetName) { this.streetName = streetName; } public void setLocalArea(String localArea) { this.localArea = localArea; } public void setDistrict(String district) { this.district = district; } public void setState(String state) { this.state = state; } public void setPinCode(int pinCode) { this.pinCode = pinCode; } }
cad3472766cd22858dc2267ec1fa796da96fd644
c29b7b424ef1fb341684b6ff8219cd65ae77d35d
/backend/phone_registery_apis/src/main/java/com/emaratech/assignment/util/Constants.java
ed3549047caa54f72748313e6498acd675ca5919
[]
no_license
manargalal/emaratic_task
76bd7d8058c3d895d7d1d5a89d126d6fcbf38436
f792753b7e5631891e920eba3ec5b4f91d4f0d32
refs/heads/master
2023-01-23T06:39:53.470932
2019-07-30T20:39:45
2019-07-30T20:39:45
199,717,858
0
0
null
2023-01-07T08:16:22
2019-07-30T19:52:09
CSS
UTF-8
Java
false
false
371
java
package com.emaratech.assignment.util; public class Constants { public static final String CLIENT_APPLICATION_NAME = "PhoneRegistery"; public final static String SIGNING_KEY = "h{NYa2|f<eg4?tys5FNE2lAD!*$ghlqCKjg:~^~pn;VD?IC(%|g(9\"8chPw3+)."; public static final String CLIENT_APPLICATION_PASSWORD = "$2a$10$KEiHy/EI.cScvE/jM2oVkuH4Hasslmv9GhplJ1Ec55zJ4NRjUbrYy"; }
4b27d3590e6da9239e4dbd668f09e0ebed638281
73727627172d865957d5405a0632443d78e11414
/src/main/java/springboot/example/controllers/TodoListController.java
e30d471910af55d2ba55e22115f5736905018a3e
[]
no_license
ianhyun007/NICE-project
a89ab54774d4c8f011696d057b5d209070f4d793
912bd5420b593d68ac9bd9aa79ca23e5ca167b58
refs/heads/master
2020-03-19T20:58:49.514302
2018-06-15T12:28:28
2018-06-15T12:28:28
136,924,817
0
0
null
null
null
null
UTF-8
Java
false
false
2,570
java
package springboot.example.controllers; import java.util.List; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import springboot.example.models.TodoList; import springboot.example.services.TodoListService; @RestController public class TodoListController { public static final Logger logger = LoggerFactory.getLogger(TodoListController.class); @Autowired private TodoListService todoListService; //Creating a todo list @RequestMapping(value="/todolists", method=RequestMethod.POST) TodoList createUser(@RequestBody TodoList newTodoList) { return todoListService.saveTodoList(newTodoList); } //Adding task to a todo list @RequestMapping(value="/todolists/{id}/addtask", method=RequestMethod.POST) TodoList AddTask(@PathVariable Long id, @RequestBody List<String> taskIds) throws Exception { List<Long> tasksIds = taskIds.stream().map(Long::parseLong).collect(Collectors.toList()); return todoListService.addTasks(id, tasksIds); } //Fetch all todo lists with tasks (List all tasks grouped by todo list) @RequestMapping(value="/todolists", method=RequestMethod.GET) Iterable<TodoList> getAllTasks() { return todoListService.listAllTasksGroupedByTodoList(); } //Fetch a particular todo list including all its tasks @RequestMapping(value = "/todolists/{id}", method=RequestMethod.GET) TodoList getTodoListById(@PathVariable Long id) throws Exception { return todoListService.findTodoListById(id); } //Delete TodoList by Id @RequestMapping(value = "/todolists/{id}", method = RequestMethod.DELETE) void deleteTodoList(@PathVariable Long id) throws Exception{ todoListService.deleteTodoListById(id); } //Delete tasks from a todo list @RequestMapping(value = "/todolists/{id}/removetasks", method = RequestMethod.DELETE) TodoList deleteTasksFromTodoList (@PathVariable Long id, @RequestBody List<String> taskIds) throws Exception{ List<Long> removeTasksIds = taskIds.stream().map(Long::parseLong).collect(Collectors.toList()); return todoListService.deleteTasksInTodoList(id, removeTasksIds); } }
c76a6f1c6cf2529b84f61b40219a7d6667143cff
365964694266726548f9eb3495cde398b1090f90
/src/main/java/com/jhallat/todo/scheduler/batch/ScheduledTaskBatch.java
9f21f8303d5a718f62e4bb48c29433caa05d1b6b
[]
no_license
jhallat/to-do-scheduler
faf74ad353707d049a5bc12f4f22e4fb717ab7ba
dba279e2fc1181f626de3d5e16bf5d77cef7938c
refs/heads/main
2023-09-04T15:26:37.159129
2021-11-01T00:45:13
2021-11-01T00:45:13
378,905,777
0
0
null
null
null
null
UTF-8
Java
false
false
3,261
java
package com.jhallat.todo.scheduler.batch; import com.jhallat.todo.scheduler.CreateToDoDTO; import com.jhallat.todo.scheduler.ScheduleRepository; import com.jhallat.todo.scheduler.ToDo; import com.jhallat.todo.scheduler.ToDoRepository; import org.jboss.logging.Logger; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.stream.Collectors; @ApplicationScoped public class ScheduledTaskBatch implements Batch { private static final Logger LOG = Logger.getLogger(ScheduledTaskBatch.class); @Inject ToDoRepository toDoRepository; @Inject ScheduleRepository scheduleRepository; @Override public String getKey() { return "SCHEDULED_TASK"; } @Override public BatchResponse execute(LocalDate date) { try { int added = 0; int updated = 0; var scheduleFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); var formattedScheduleDate = date.format(scheduleFormatter); var checklistFormatter = DateTimeFormatter.ofPattern("yyyyMMdd"); var formattedChecklistDate = date.format(checklistFormatter); var taskMap = toDoRepository.findAllForActiveDate(formattedChecklistDate) .stream() .filter(item -> item.taskId() > 0) .collect(Collectors.toMap(ToDo::taskId, todo -> todo)); LOG.info("Returned " + taskMap.size() + " active tasks"); var schedules = scheduleRepository.getScheduleForDay(formattedScheduleDate); for (var schedule : schedules) { if (!schedule.weeklyMaxReached()) { if (taskMap.containsKey(schedule.taskId())) { if (schedule.quantifiable()) { var todo = taskMap.get(schedule.taskId()); int addQuantity = schedule.quantity(); if (todo.quantity() + schedule.quantity() >= schedule.weeklyMax()) { addQuantity = schedule.weeklyMax() - todo.quantity(); scheduleRepository.updateWeeklyMaxReached(todo.taskId(), true); } if (addQuantity > 0) { toDoRepository.updateQuantity(todo.id(), addQuantity); } updated++; } } else { CreateToDoDTO todo = new CreateToDoDTO(schedule.description(), schedule.taskId(), schedule.quantity(), schedule.goalId(), schedule.goalDescription()); toDoRepository.insertToDo(todo); added++; } } } return new BatchResponse(true, updated, added); } catch (Exception exception) { LOG.error("Error occurred in scheduled task batch", exception); return new BatchResponse(false, 0, 0); } } }
8cfd4b76f063b34e28437a6bf265ca9c98f10f1f
86bc85d9f3de83bed67dcb66296ec8350f70bb10
/src/main/java/com/challenge/banking/model/UserSecurity.java
05101b09e4eda04034306e1c563de4c02e684109
[]
no_license
tomztansen/bankingdemo
89bc339c91be65b5aeaf5db9640a06d73434a727
26dfbe39eee488fd733b6407b373591b1631704d
refs/heads/master
2020-03-17T20:28:29.974095
2018-05-23T05:15:49
2018-05-23T05:15:49
133,911,607
0
0
null
null
null
null
UTF-8
Java
false
false
3,385
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.challenge.banking.model; import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.Collection; import java.util.Date; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; /** * * @author Tommy Tansen <[email protected]> */ public class UserSecurity implements UserDetails { private String username; private String password; private String email; private Date lastPasswordReset; private Collection<? extends GrantedAuthority> authorities; private Boolean accountNonExpired = true; private Boolean accountNonLocked = true; private Boolean credentialsNonExpired = true; private Boolean enabled = true; public UserSecurity() { } public UserSecurity(String username, String password, String email, Collection<? extends GrantedAuthority> authorities) { setUsername(username); setPassword(password); setEmail(email); setAuthorities(authorities); } public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } @JsonIgnore public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } @JsonIgnore public Date getLastPasswordReset() { return this.lastPasswordReset; } public void setLastPasswordReset(Date lastPasswordReset) { this.lastPasswordReset = lastPasswordReset; } public Collection<? extends GrantedAuthority> getAuthorities() { return this.authorities; } public void setAuthorities(Collection<? extends GrantedAuthority> authorities) { this.authorities = authorities; } @JsonIgnore public Boolean getAccountNonExpired() { return this.accountNonExpired; } public void setAccountNonExpired(Boolean accountNonExpired) { this.accountNonExpired = accountNonExpired; } public boolean isAccountNonExpired() { return getAccountNonExpired(); } @JsonIgnore public Boolean getAccountNonLocked() { return this.accountNonLocked; } public void setAccountNonLocked(Boolean accountNonLocked) { this.accountNonLocked = accountNonLocked; } public boolean isAccountNonLocked() { return getAccountNonLocked(); } @JsonIgnore public Boolean getCredentialsNonExpired() { return this.credentialsNonExpired; } public void setCredentialsNonExpired(Boolean credentialsNonExpired) { this.credentialsNonExpired = credentialsNonExpired; } public boolean isCredentialsNonExpired() { return getCredentialsNonExpired(); } @JsonIgnore public Boolean getEnabled() { return this.enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public boolean isEnabled() { return getEnabled(); } }
16b7541029673e96a9f9f08266aba999671eb066
a0ecdde8f5b065b62fd992fede9e75278a18b5ff
/src/main/java/com/advisorapp/api/model/Credential.java
3fee20b587f76c6d6b89d1322556fd7dc8f8e611
[]
no_license
AdvisorApp/API
943ee9ab6bcd81731ef7c94e831e3fb2334bbf70
4a9f7a93c4b7eb4e87626c609aca6b0fba91e18c
refs/heads/master
2021-01-01T03:47:28.151693
2016-06-09T21:51:58
2016-06-09T21:51:58
58,557,587
0
0
null
2016-06-09T08:36:58
2016-05-11T15:34:23
Java
UTF-8
Java
false
false
807
java
package com.advisorapp.api.model; /** * Created by damien on 20/05/2016. */ public class Credential { private String email; private String password; public Credential() { } public Credential(String email, String password) { this.email = email; this.password = password; } @Override public String toString() { return "Credential(" + "email='" + email + '\'' + ", password='" + password + '\'' + ')'; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
4137882de604fef128d16c2d45fd57378126716d
6dc72c292fa4d8b3acde5112911e1e9ad9bbed21
/laboratorios/practicas en clase/16 Oct 27/programa 2 POO cuenta - 27Oct/src/Main.java
9e48df359b018ca3ee6ad613f8314f44ff3496ea
[ "MIT" ]
permissive
HillaryNatashaThompsonFoster/uip-iiiq-pc2
b8dd68a9c99fbd4f8f1bad70890782b2f1d56a73
d43175ddada885370588affd5f09db2465dd79f6
refs/heads/master
2021-01-11T08:17:07.664165
2016-12-16T01:03:30
2016-12-16T01:03:30
68,972,407
0
0
null
null
null
null
UTF-8
Java
false
false
1,129
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { //programacion orientado a objetos. double saldo = 0.0; BufferedReader leer = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Saldo inicial: "); try { saldo = Double.parseDouble(leer.readLine()); }catch (IOException e){ System.out.print("Dato invalido"); } //Cuenta c1 = new Cuenta(saldo); Cuenta c1 = new Cuenta();// con la palabra (new) defino que es un objeto de una clase //c1.setBalance(saldo); c1.setBalance(saldo); System.out.println("El saldo inicial es de: " + c1.getBalance()); c1.depositar(50); System.out.println("Usted deposito. Tiene: " + c1.getBalance()); c1.retirar(75); System.out.println("Usted retiro. Tiene: " + c1.getBalance()); c1.depositar(150); System.out.println("El saldo final es de : " + c1.getBalance()); } }
3117cc1fbef4cd25e436c634a579f2d1fd000386
73d45ee9d5a10daf306dcdcbdefed4e1fb82af38
/src/test/java/com/example/demo/Test.java
9bce990a135044c79642dfd3c23d716b84bffd61
[]
no_license
ForeverLove0507/FlowEngineDemo
42cb30bcdb9e4381e65febed460d05b25e7cb11e
d9f6f84948fe8baa7acc9a9545e80093cb5007fe
refs/heads/master
2023-02-23T04:56:10.930952
2021-01-24T07:00:09
2021-01-24T07:00:09
332,387,584
1
0
null
null
null
null
UTF-8
Java
false
false
3,787
java
package com.example.demo; import java.util.Collection; import java.util.Collections; import java.util.HashMap; public class Test { private static String del(String s) { Test test=new Test(); ThreadLocal threadLocal=new ThreadLocal(); threadLocal.get(); threadLocal.set("ff"); //创建一个hashMap存储,存储字符串中的字符和其出现的次数 HashMap<Character, Integer> map = new HashMap<>(); char[] ch = s.toCharArray(); for (int i = 0; i < ch.length; i++) { if (map.containsKey(ch[i])) { map.put(ch[i], map.get(ch[i]) + 1); } else { map.put(ch[i], 1); } } Collection<Integer> values = map.values(); Integer max = Collections.max(values); StringBuffer str = new StringBuffer(); for (int i = 0; i < ch.length; i++) { if (map.get(ch[i]) != max) { str.append(ch[i]); } } return str.toString(); } public static void main1(String[] args) { String s = "aBc12D9"; // 3.1、输出字符串中字符和数字的个数。 int letter = 0; int digit = 0; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) letter++; else if (c >= '0' && c <= '9') digit++; } System.out.println("字符个数:" + letter + " 数字个数:" + digit); // 3.2、相连的数字不能分为2个,即12是作为一个数字统计,输出字符串中字符和数字的个数。 letter = 0; digit = 0; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) letter++; else if (isDigit(c) && !isDigit(s.charAt(i - 1))) digit++; } System.out.println("字符个数:" + letter + " 数字个数:" + digit); // 3.3、字符大小写不区分,统计字符的个数及出现次数。 int[] counts = new int[26]; for (char c : toLowerCase(s)) { if (Character.isLetter(c)) { counts[c - 'a']++; } } for (int i = 0; i < counts.length; i++) { System.out.println((char) ('a' + i) + " 出现了 " + counts[i] + " 次;"); } // 3.4、统计出现次数最多的字符和数字。 counts = new int[200]; int max1 = 0;// 记录出现次数最多等字符的下标 int max2 = 0;// 记录出现次数最多等数字的下标 //一次遍历,记录出现的次数,同时更新出现次数最多的字符和数字 for (char c : s.toCharArray()) { counts[c]++; if (isLetter(c) && counts[max1] < counts[c]) { max1 = c; } else if (isDigit(c) && counts[max2] < counts[c]) { max2 = c; } } System.out.println((char) (max1) + " 字符出现了 " + counts[max1] + " 次;"); System.out.println((char) (max2) + " 数字出现了 " + counts[max2] + " 次;"); } public static char[] toLowerCase(String s) { char[] arr = s.toCharArray(); for (int i = 0; i < arr.length; i++) { if (arr[i] >= 'A' && arr[i] < 'Z') { arr[i] = (char) (arr[i] + 'a' - 'A'); } } return arr; } private static boolean isDigit(char c) { return c >= '0' && c <= '9'; } private static boolean isLetter(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } }
907580b0a9e73133146ebd72269611a4a4ff1e1f
0d901663101e91ce237047d6d3caf5228c3ee637
/gr.agroknow.freme.authors/src/main/java/gr/agroknow/author/Author.java
e5f062ee526de4cfcb58dd55578fe8deebbc834c
[]
no_license
agroknow/gr.agroknow.freme.authors
dabef89b63f4ed98d50f7675fd9d598d06c0e9d9
d69bdd41adc90296a45a92de917d99181298d75e
refs/heads/master
2021-01-10T14:58:50.231683
2015-12-04T09:32:51
2015-12-04T09:32:51
47,394,400
0
0
null
null
null
null
UTF-8
Java
false
false
1,634
java
package gr.agroknow.author; import java.util.ArrayList; import java.util.Collection; public class Author { String dummy; String name; String surname; String orcid; String organization; String project; String arn; String uri; static Collection<Author> authors = new ArrayList<Author>(); public String getAuthorDummy() { return dummy; } public void setAuthorDummy(String dummy) { this.dummy = dummy; } public String getAuthorName() { return name; } public void setAuthorName(String name) { this.name = name; } public String getAuthorLastName() { return surname; } public void setAuthorLastName(String surname) { this.surname = surname; } public String getAuthorOrganization() { return organization; } public void setAuthorOrganization(String organization) { this.organization = organization; } public String getAuthorArn() { return arn; } public void setAuthorArn(String arn) { this.arn = arn; } public String getAuthorProject() { return project; } public void setAuthorProject(String project) { this.project = project; } public String getAuthorUri() { return uri; } public void setAuthorUri(String uri) { this.uri = uri; } public String getAuthorOrcid() { return orcid; } public void setAuthorOrcid(String orcid) { this.orcid = orcid; } public Collection<Author> getAuthorList() { return authors; } public void addToAuthorList(Author author) { authors.add(author); } }
b9712ab26dec9d35354fdfca5207fc05adb203c0
0f00b4445371d2bef15903b16a6ad416ffe5f91c
/app/src/main/java/com/xuechuan/xcedu/adapter/home/HomsAdapter.java
c21921da9026c4c6b0df329643ebbc5d0d2e8ce9
[]
no_license
yufeilong92/andorid
c8f83e26bb29ccedf307142c8008ca9f334ed090
8c2c5cf9d02c8e94f6480e26a67259180119df0e
refs/heads/master
2020-04-22T13:59:13.900223
2019-02-13T02:44:31
2019-02-13T02:44:31
170,428,065
0
0
null
null
null
null
UTF-8
Java
false
false
32,168
java
package com.xuechuan.xcedu.adapter.home; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.felipecsl.gifimageview.library.GifImageView; import com.xuechuan.xcedu.R; import com.xuechuan.xcedu.XceuAppliciton.MyAppliction; import com.xuechuan.xcedu.base.DataMessageVo; import com.xuechuan.xcedu.live.ac.PolyvLivePlayerActivity; import com.xuechuan.xcedu.mvp.view.TimeShowView; import com.xuechuan.xcedu.ui.AgreementActivity; import com.xuechuan.xcedu.ui.InfomDetailActivity; import com.xuechuan.xcedu.ui.home.AdvisoryListActivity; import com.xuechuan.xcedu.ui.home.ArticleListActivity; import com.xuechuan.xcedu.ui.home.AtirlceListActivity; import com.xuechuan.xcedu.ui.home.BookActivity; import com.xuechuan.xcedu.ui.home.SpecasListActivity; import com.xuechuan.xcedu.ui.home.YouZanActivity; import com.xuechuan.xcedu.ui.net.VideoInfomActivity; import com.xuechuan.xcedu.utils.GifDataDownloader; import com.xuechuan.xcedu.utils.MyTimeUitl; import com.xuechuan.xcedu.utils.PushXmlUtil; import com.xuechuan.xcedu.utils.StringUtil; import com.xuechuan.xcedu.utils.T; import com.xuechuan.xcedu.utils.TimeUtil; import com.xuechuan.xcedu.utils.Utils; import com.xuechuan.xcedu.vo.AdvisoryBean; import com.xuechuan.xcedu.vo.ArticleBean; import com.xuechuan.xcedu.vo.BannerBean; import com.xuechuan.xcedu.vo.BookBean; import com.xuechuan.xcedu.vo.ClassBean; import com.xuechuan.xcedu.vo.HomePageVo; import com.xuechuan.xcedu.vo.PolyvliveBean; import com.xuechuan.xcedu.weight.AddressTextView; import com.youth.banner.Banner; import com.youth.banner.BannerConfig; import com.youth.banner.listener.OnBannerClickListener; import com.youth.banner.loader.ImageLoader; import java.util.ArrayList; import java.util.List; /** * @version V 1.0 xxxxxxxx * @Title: xcedu * @Package com.xuechuan.xcedu.adapter * @Description: 首页 * @author: L-BackPacker * @date: 2018/6/2 16:35 * @verdescript 版本号 修改时间 修改人 修改的概要说明 * @Copyright: 2018 */ public class HomsAdapter extends RecyclerView.Adapter { private String code; private Context mContext; private HomePageVo mData; private final LayoutInflater mInflater; private BannerViewHolder mBanner; public HomsAdapter(Context mContext, HomePageVo mData, String code) { this.mContext = mContext; this.mData = mData; this.code = code; mInflater = LayoutInflater.from(mContext); } public void setData(HomePageVo vo, String codes) { mData = vo; code = codes; notifyDataSetChanged(); } //轮播图 private int BANNER_VIEW_LAYOUT = 100; //教材 private int MENU_VIEW_LAYOUT = 110; //资讯 private int INFOM_VIEW_LAYOUT = 111; //文章 private int WEN_VIEW_LAYOUT = 112; //直播 private int WEN_VIEW_LIVE = 113; //网课精品 private int WEN_VIEW_NET = 114; //精品教辅 private int TEACHING_ASSISTANTS_VIEW = 115; private int MDATA = BANNER_VIEW_LAYOUT; // TODO: 2018.10.27 视频直播 true 为隐藏,false 为显示 private boolean isShowLive = true; private int itemNubmer = 4; private boolean ploview = false, book = false, net = false; /** * 设置扫码监听 */ private OnScanClickListener onScanClickListener; public interface OnScanClickListener { public void onClickScan(); } public void setOnScanClickListener(OnScanClickListener onScanClickListener) { this.onScanClickListener = onScanClickListener; } /** * 设置地址监听 */ private OnAddressClickListener onAddressClickListener; public interface OnAddressClickListener { public void onClickAddress(String address); } public void setOnAddressClickListener(OnAddressClickListener onAddressClickListener) { this.onAddressClickListener = onAddressClickListener; } public void doChangerItem(boolean ployview, boolean book, boolean net) { this.ploview = ployview; this.book = book; this.net = net; notifyDataSetChanged(); } public void doChangerItem(int nubmer) { this.itemNubmer = nubmer; notifyDataSetChanged(); } /** * 设置搜索监听 */ private OnSearchClickListener onSearchClickListener; public interface OnSearchClickListener { public void onClickSearch(); } public void setOnSearchClickListener(OnSearchClickListener onSearchClickListener) { this.onSearchClickListener = onSearchClickListener; } public void setAddressContent(String address) { if (mBanner != null) { mBanner.mTvHomeAddressView.setText(address); notifyDataSetChanged(); } } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { if (viewType == BANNER_VIEW_LAYOUT) { return new BannerViewHolder(mInflater.inflate(R.layout.home_banner, null)); } else if (viewType == MENU_VIEW_LAYOUT) { return new MenuViewHolder(mInflater.inflate(R.layout.home_meun, null)); } else if (viewType == WEN_VIEW_LIVE) { return new WenViewliveHolder(mInflater.inflate(R.layout.home_live, null)); } else if (viewType == WEN_VIEW_NET) { return new WenViewNetHolder(mInflater.inflate(R.layout.home_net, null)); } else if (viewType == TEACHING_ASSISTANTS_VIEW) { return new TeachingAssistantsViewholder(mInflater.inflate(R.layout.home_teaching, null)); } else if (viewType == INFOM_VIEW_LAYOUT) { return new InfomViewHolder(mInflater.inflate(R.layout.home_infom, null)); } else if (viewType == WEN_VIEW_LAYOUT) { return new WenvIewHolder(mInflater.inflate(R.layout.home_wen, null)); } return null; } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { if (holder instanceof BannerViewHolder) { mBanner = (BannerViewHolder) holder; setBanner(mBanner); } else if (holder instanceof MenuViewHolder) { MenuViewHolder meun = (MenuViewHolder) holder; setMenu(meun); } else if (holder instanceof WenViewliveHolder) { WenViewliveHolder live = (WenViewliveHolder) holder; setLive(live); } else if (holder instanceof WenViewNetHolder) { WenViewNetHolder net = (WenViewNetHolder) holder; setNet(net); } else if (holder instanceof TeachingAssistantsViewholder) { TeachingAssistantsViewholder teachingAssistantsViewholder = (TeachingAssistantsViewholder) holder; setTeacher(teachingAssistantsViewholder); } else if (holder instanceof InfomViewHolder) { InfomViewHolder infomViewHolder = (InfomViewHolder) holder; setInfom(infomViewHolder); } else if (holder instanceof WenvIewHolder) { WenvIewHolder wenvIewHolder = (WenvIewHolder) holder; setWen(wenvIewHolder); } } /** * 精品教辅 * * @param teacher */ private void setTeacher(TeachingAssistantsViewholder teacher) { if (mData == null) return; setGridlManage(teacher.mRlvHomeTeacherContent); HomeTeacherAdapter teacherAdapter = new HomeTeacherAdapter(mContext, mData.getData().getBook()); teacher.mRlvHomeTeacherContent.setAdapter(teacherAdapter); teacherAdapter.setOnItemClickListener(new HomeTeacherAdapter.OnItemClickListener() { @Override public void onClickItem(BookBean vo) {//网课 Intent intent = YouZanActivity.newInstance(mContext, vo.getYouzanurl()); intent.putExtra(YouZanActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.home_tacher_book)); mContext.startActivity(intent); } }); teacher.mTvTeacherBookMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {//更多 if (MyAppliction.getInstance().getYouZanSet() != null && MyAppliction.getInstance().getYouZanSet().getHomeurl() != null && !StringUtil.isEmpty(MyAppliction.getInstance().getYouZanSet().getHomeurl())) { Intent intent = YouZanActivity.newInstance(mContext, MyAppliction.getInstance().getYouZanSet().getHomeurl()); intent.putExtra(YouZanActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.shaop)); mContext.startActivity(intent); } else { T.showToast(mContext, "商城初始化失败,稍后再试"); } } }); } /** * 文章 * * @param wenvIewHolder */ private void setWen(WenvIewHolder wenvIewHolder) { if (mData == null) return; List<ArticleBean> article = mData.getData().getArticle(); HomeAllAdapter allAdapter = new HomeAllAdapter(mContext, article); GridLayoutManager manager = new GridLayoutManager(mContext, 1); manager.setOrientation(GridLayoutManager.VERTICAL); wenvIewHolder.mRlvRecommendAll.setLayoutManager(manager); wenvIewHolder.mRlvRecommendAll.setAdapter(allAdapter); allAdapter.setClickListener(new HomeAllAdapter.onItemClickListener() { @Override public void onClickListener(Object obj, int position) { ArticleBean vo = (ArticleBean) obj; Intent intent = InfomDetailActivity.startInstance(mContext, vo.getGourl(), String.valueOf(vo.getId()), vo.getTitle(), DataMessageVo.USERTYOEARTICLE); mContext.startActivity(intent); } }); wenvIewHolder.mTvArticleMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent instance = AtirlceListActivity.newInstance(mContext, ""); instance.putExtra(ArticleListActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.Allarticle)); mContext.startActivity(instance); } }); } /** * 资讯 * * @param infomViewHolder */ private void setInfom(InfomViewHolder infomViewHolder) { if (mData == null) return; List<AdvisoryBean> advisory = mData.getData().getAdvisory(); HomeContentAdapter allAdapter = new HomeContentAdapter(mContext, advisory); setGridlManage(infomViewHolder.mRlvRecommendContent); infomViewHolder.mRlvRecommendContent.setAdapter(allAdapter); allAdapter.setClickListener(new HomeContentAdapter.onItemClickListener() { @Override public void onClickListener(Object obj, int position) { AdvisoryBean vo = (AdvisoryBean) obj; Intent intent = AgreementActivity.newInstance(mContext, vo.getGourl(), AgreementActivity.SHAREMARK, vo.getTitle(), vo.getShareurl()); mContext.startActivity(intent); } }); infomViewHolder.mTvInfomMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String str = PushXmlUtil.getInstance().getLocationProvice(mContext, code); Intent intent1 = AdvisoryListActivity.newInstance(mContext, code, str); mContext.startActivity(intent1); } }); } private void setGridlManage(RecyclerView view) { GridLayoutManager manager = new GridLayoutManager(mContext, 1); manager.setOrientation(GridLayoutManager.VERTICAL); view.setLayoutManager(manager); } /** * 菜单 * * @param meun */ private void setMenu(MenuViewHolder meun) { meun.mTvHomeBook.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent3 = AgreementActivity.newInstance(mContext, DataMessageVo.jiaocao, AgreementActivity.NOSHAREMARK, mContext.getResources().getString(R.string.home_teacherMateri), null); intent3.putExtra(BookActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.home_teacherMateri)); mContext.startActivity(intent3); // Intent intent = WebActivity.start_Intent(mContext, DataMessageVo.jiaocao, ""); // mContext.startActivity(intent); } }); meun.mTvHomeStandard.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent2 = AgreementActivity.newInstance(mContext, DataMessageVo.guifan, AgreementActivity.NOSHAREMARK, mContext.getResources().getString(R.string.home_specs), null); intent2.putExtra(SpecasListActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.home_specs)); mContext.startActivity(intent2); } }); meun.mTvHomeStore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (!Utils.isNet(mContext)) { T.showToast(mContext, mContext.getResources().getString(R.string.net_error)); return; } if (MyAppliction.getInstance().getYouZanSet() != null && MyAppliction.getInstance().getYouZanSet().getHomeurl() != null && !StringUtil.isEmpty(MyAppliction.getInstance().getYouZanSet().getHomeurl())) { Intent intent = YouZanActivity.newInstance(mContext, MyAppliction.getInstance().getYouZanSet().getHomeurl()); intent.putExtra(YouZanActivity.CSTR_EXTRA_TITLE_STR, mContext.getResources().getString(R.string.shaop)); mContext.startActivity(intent); } else { T.showToast(mContext, "商城初始化失败,稍后再试"); } } }); } private void setBanner(final BannerViewHolder banner) { if (mData == null) return; final List<BannerBean> beanList = mData.getData().getBanner(); ArrayList<String> list = new ArrayList<>(); for (int i = 0; i < beanList.size(); i++) { list.add(beanList.get(i).getImageurl()); } banner.mBanHome.setBannerStyle(BannerConfig.NOT_INDICATOR); banner.mBanHome.setIndicatorGravity(BannerConfig.CENTER); banner.mBanHome.setDelayTime(2000); banner.mBanHome.setImageLoader(new ImageLoader() { @Override public void displayImage(Context context, Object path, ImageView imageView) { imageView.setScaleType(ImageView.ScaleType.FIT_XY); MyAppliction.getInstance().displayImages(imageView, (String) path, false); } }); banner.mBanHome.setImages(list); banner.mBanHome.start(); banner.mBanHome.setOnBannerClickListener(new OnBannerClickListener() { @Override public void OnBannerClick(int position) { BannerBean bean; if (position <= 0) { bean = beanList.get(position); } else bean = beanList.get(position - 1); if (!StringUtil.isEmpty(bean.getGourl())) mContext.startActivity(AgreementActivity.newInstance(mContext, bean.getGourl(), AgreementActivity.NOSHAREMARK, "", "")); } }); banner.mIvHomeScan.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {//扫码 if (onScanClickListener != null) { onScanClickListener.onClickScan(); } } }); banner.mTvHomeAddressView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {//地址 if (onAddressClickListener != null) { onAddressClickListener.onClickAddress(banner.mTvHomeAddressView.getText().toString().trim()); } } }); banner.mLlHomeSerach.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {//搜素 if (onSearchClickListener != null) { onSearchClickListener.onClickSearch(); } } }); } /** * 直播 * TODO: 2018.10.15 * * @param live */ private void setLive(final WenViewliveHolder live) { if (mData == null) return; if (mData.getData().getPolyvlive() == null || mData.getData().getPolyvlive().isEmpty()) { return; } final PolyvliveBean polyvliveBean = mData.getData().getPolyvlive().get(0); if (!StringUtil.isEmpty(polyvliveBean.getIndexurl())) { MyAppliction.getInstance().displayImages(live.mIvHomeLive, polyvliveBean.getIndexurl(), false); } else { live.mIvHomeLive.setImageResource(R.mipmap.s_n); } MyTimeUitl timeUitl = MyTimeUitl.getInstance(mContext); long time = TimeUtil.intervalNow(polyvliveBean.getBegintime()); if (time >= 0) { showLiveImg(live, true); new GifDataDownloader() { @Override protected void onPostExecute(final byte[] bytes) { live.mGifContentGiftOne.setBytes(bytes); live.mGifContentGiftOne.startAnimation(); } }.execute(polyvliveBean.getGifurl()); // live.mGifContentGift.setImageResource(R.drawable.gif_one); } else { showLiveImg(live, false); Drawable drawable = mContext.getResources().getDrawable(R.mipmap.c_play_icon_his); live.mIcHomeLiveLogon.setImageDrawable(drawable); timeUitl.initTime(Math.abs(time), live.mTvHomeLiveTime, new TimeShowView() { @Override public void TimeFinish() { showLiveImg(live, true); new GifDataDownloader() { @Override protected void onPostExecute(final byte[] bytes) { live.mGifContentGiftOne.setBytes(bytes); live.mGifContentGiftOne.startAnimation(); } }.execute(polyvliveBean.getGifurl()); } }); } live.mRlLayoutRoot.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DataMessageVo vo = DataMessageVo.get_Instance(); String nickname = null, headicon = null; if (MyAppliction.getInstance().getUserData() != null) { nickname = MyAppliction.getInstance().getUserData().getData().getNickname(); if (StringUtil.isEmpty(nickname)) nickname = "游客" + vo.getChatUserId(); headicon = MyAppliction.getInstance().getUserData().getData().getHeadicon(); if (StringUtil.isEmpty(headicon)) { headicon = "null"; } } mContext.startActivity(PolyvLivePlayerActivity. newIntent(mContext, vo.getTESTUSERID(), polyvliveBean.getChannelnum(), vo.getChatUserId(), nickname, headicon, false, false)); } }); } private void showLiveImg(WenViewliveHolder live, boolean show) { live.mGifContentGiftOne.setVisibility(show ? View.VISIBLE : View.GONE); live.mLlLiveTime.setVisibility(show ?View.GONE:View.VISIBLE); } /** * 设置监听 */ private OnNetMoreClickListener onNetMoreClickListener; public interface OnNetMoreClickListener { public void onClickNetMore(); } public void setOnNetMoreClickListener(OnNetMoreClickListener onItemClickListener) { this.onNetMoreClickListener = onItemClickListener; } /** * 网课模块 * * @param net */ public void setNet(WenViewNetHolder net) { if (mData == null) return; List<ClassBean> classX = mData.getData().getClassX(); net.mTvNetMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (onNetMoreClickListener != null) { onNetMoreClickListener.onClickNetMore(); } } }); HomeItemNetAdapter adapter = new HomeItemNetAdapter(mContext, classX); GridLayoutManager layoutManager = new GridLayoutManager(mContext, 1); layoutManager.setOrientation(GridLayoutManager.VERTICAL); net.mRlvRecommendContent.setLayoutManager(layoutManager); net.mRlvRecommendContent.setAdapter(adapter); adapter.setOnItemClickListener(new HomeItemNetAdapter.OnItemClickListener() { @Override public void onClickItem(ClassBean vo) { Intent intent = VideoInfomActivity.start_Intent(mContext, String.valueOf(vo.getId())); intent.putExtra(VideoInfomActivity.CSTR_EXTRA_TITLE_STR_HOME, vo.getName()); mContext.startActivity(intent); } }); } /* @Override public int getItemCount() { return isShowLive ? 7 : 4; }*/ @Override public int getItemCount() { return itemNubmer; } @Override public int getItemViewType(int position) { if (ploview && book && net) {//1 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_LIVE; } else if (position == 3) { MDATA = WEN_VIEW_NET; } else if (position == 4) { MDATA = TEACHING_ASSISTANTS_VIEW; } else if (position == 5) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 6) { MDATA = WEN_VIEW_LAYOUT; } } else if (ploview && !net && book) {//2 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_LIVE; } else if (position == 3) { MDATA = TEACHING_ASSISTANTS_VIEW; } else if (position == 4) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 5) { MDATA = WEN_VIEW_LAYOUT; } } else if (ploview && !net && !book) {//3 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_LIVE; } else if (position == 3) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 4) { MDATA = WEN_VIEW_LAYOUT; } } else if (ploview && net && !book) {//4 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_LIVE; } else if (position == 3) { MDATA = WEN_VIEW_NET; } else if (position == 4) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 5) { MDATA = WEN_VIEW_LAYOUT; } } else if (!ploview && net && book) {//5 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_NET; } else if (position == 3) { MDATA = TEACHING_ASSISTANTS_VIEW; } else if (position == 4) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 5) { MDATA = WEN_VIEW_LAYOUT; } } else if (!ploview && net && !book) {//6 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_NET; } else if (position == 3) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 4) { MDATA = WEN_VIEW_LAYOUT; } } else if (!ploview && !net && book) {//7 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = TEACHING_ASSISTANTS_VIEW; } else if (position == 3) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 4) { MDATA = WEN_VIEW_LAYOUT; } } else if (!ploview && !net && !book) {//8 if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 3) { MDATA = WEN_VIEW_LAYOUT; } } /* if (isShowLive) { if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = WEN_VIEW_LIVE; } else if (position == 3) { MDATA = WEN_VIEW_NET; } else if (position == 4) { MDATA = TEACHING_ASSISTANTS_VIEW; } else if (position == 5) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 6) { MDATA = WEN_VIEW_LAYOUT; } } else { if (position == 0) { MDATA = BANNER_VIEW_LAYOUT; } else if (position == 1) { MDATA = MENU_VIEW_LAYOUT; } else if (position == 2) { MDATA = INFOM_VIEW_LAYOUT; } else if (position == 3) { MDATA = WEN_VIEW_LAYOUT; } }*/ return MDATA; } /** * 轮播图 */ public class BannerViewHolder extends RecyclerView.ViewHolder { public Banner mBanHome; public AddressTextView mTvHomeAddressView; public LinearLayout mLlHomeSerach; public ImageView mIvHomeScan; public BannerViewHolder(View itemView) { super(itemView); this.mBanHome = (Banner) itemView.findViewById(R.id.ban_home); this.mTvHomeAddressView = (AddressTextView) itemView.findViewById(R.id.tv_home_address_view); this.mLlHomeSerach = (LinearLayout) itemView.findViewById(R.id.ll_home_serach); this.mIvHomeScan = (ImageView) itemView.findViewById(R.id.iv_home_scan); } } /** * 教材 规范 商城 */ public class MenuViewHolder extends RecyclerView.ViewHolder { public TextView mTvHomeBook; public TextView mTvHomeStandard; public TextView mTvHomeStore; public MenuViewHolder(View itemView) { super(itemView); this.mTvHomeBook = (TextView) itemView.findViewById(R.id.tv_home_book); this.mTvHomeStandard = (TextView) itemView.findViewById(R.id.tv_home_standard); this.mTvHomeStore = (TextView) itemView.findViewById(R.id.tv_home_store); } } /** * 资讯模式 */ public class InfomViewHolder extends RecyclerView.ViewHolder { public TextView mTvInfomMore; public RecyclerView mRlvRecommendContent; public InfomViewHolder(View itemView) { super(itemView); this.mTvInfomMore = (TextView) itemView.findViewById(R.id.tv_infom_more); this.mRlvRecommendContent = (RecyclerView) itemView.findViewById(R.id.rlv_recommend_content); } } /** * 文章模式 */ public class WenvIewHolder extends RecyclerView.ViewHolder { public TextView mTvArticleMore; public RecyclerView mRlvRecommendAll; public WenvIewHolder(View itemView) { super(itemView); this.mTvArticleMore = (TextView) itemView.findViewById(R.id.tv_article_more); this.mRlvRecommendAll = (RecyclerView) itemView.findViewById(R.id.rlv_recommend_all); } } /** * 直播模式 */ public class WenViewliveHolder extends RecyclerView.ViewHolder { public ImageView mIvHomeLive; public ImageView mIcHomeLiveLogon; public TextView mTvHomeLiveCaption; public TextView mTvHomeLiveTime; public GifImageView mGifContentGiftOne; public RelativeLayout mRlLayoutRoot; public LinearLayout mLlLiveRoot; public LinearLayout mLlLiveTime; public WenViewliveHolder(View itemView) { super(itemView); this.mIvHomeLive = (ImageView) itemView.findViewById(R.id.iv_home_live); this.mGifContentGiftOne = (GifImageView) itemView.findViewById(R.id.gifImageView); this.mIcHomeLiveLogon = (ImageView) itemView.findViewById(R.id.ic_home_live_logon); this.mTvHomeLiveCaption = (TextView) itemView.findViewById(R.id.tv_home_live_caption); this.mTvHomeLiveTime = (TextView) itemView.findViewById(R.id.tv_home_live_time); this.mRlLayoutRoot = (RelativeLayout) itemView.findViewById(R.id.rl_layout_root); this.mLlLiveRoot = (LinearLayout) itemView.findViewById(R.id.ll_live_root); this.mLlLiveTime = (LinearLayout) itemView.findViewById(R.id.li_live_time); } } /** * 网课模式 */ public class WenViewNetHolder extends RecyclerView.ViewHolder { public TextView mTvNetMore; public RecyclerView mRlvRecommendContent; public WenViewNetHolder(View itemView) { super(itemView); this.mTvNetMore = (TextView) itemView.findViewById(R.id.tv_home_net_more); this.mRlvRecommendContent = (RecyclerView) itemView.findViewById(R.id.rlv_home_net); } } public class TeachingAssistantsViewholder extends RecyclerView.ViewHolder { public RecyclerView mRlvHomeTeacherContent; public TextView mTvTeacherBookMore; public TeachingAssistantsViewholder(View itemView) { super(itemView); this.mRlvHomeTeacherContent = (RecyclerView) itemView.findViewById(R.id.rlv_home_teacher_content); this.mTvTeacherBookMore = (TextView) itemView.findViewById(R.id.tv_teacher_book_more); } } }
63e13c367c3cb6d2ff8953af4fa0ad40906acf80
10aafeb04c776976117b7360c6e31a9d1037310b
/src/goryachev/fx/Theme.java
d0ce1f70fef323146c8a7b475a5f2eb0f81fba56
[ "Apache-2.0", "LGPL-3.0-only" ]
permissive
pzatschl/FxDock
35ec29eca4399c68f83653a8414aa73640aaa1d1
68d529a02bf2d8ae4b194c0523d7cbe8cd04aa45
refs/heads/master
2021-05-24T18:46:57.855284
2020-04-07T06:43:42
2020-04-07T06:43:42
253,704,503
0
0
Apache-2.0
2020-04-07T06:18:40
2020-04-07T06:18:40
null
UTF-8
Java
false
false
2,196
java
// Copyright © 2017-2020 Andy Goryachev <[email protected]> package goryachev.fx; import goryachev.common.util.Keep; import goryachev.common.util.SB; import goryachev.fx.internal.StandardThemes; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import javafx.scene.paint.Color; /** * Color Theme. */ @Keep public class Theme { public Color affirm; public Color base; public Color control; public Color destruct; public Color focus; public Color outline; public Color selectedTextBG; public Color selectedTextFG; public Color textBG; public Color textFG; private static Theme current; public Theme() { } public static Theme current() { if(current == null) { Theme t = loadFromSettings(); if(t == null) { // TODO how to detect dark OS theme? t = StandardThemes.createLightTheme(); } check(t); current = t; } return current; } private static Theme loadFromSettings() { // TODO first standard names // TODO use keys to load values return null; } private static void check(Theme t) { SB sb = null; Field[] fs = Theme.class.getDeclaredFields(); for(Field f: fs) { int m = f.getModifiers(); if(Modifier.isPublic(m) && !Modifier.isStatic(m)) { Object v; try { v = f.get(t); } catch(Exception e) { v = null; } if(v == null) { if(sb == null) { sb = new SB(); sb.append("Missing theme values: "); } else { sb.a(","); } sb.append(f.getName()); } } } if(sb != null) { throw new Error(sb.toString()); } } /** creates a light/dark compatible gray color, based on the intensity of the textBG */ public Color gray(int gray) { if(isLight()) { return Color.rgb(gray, gray, gray); } else { return Color.rgb(255 - gray, 255 - gray, 255 - gray); } } public boolean isLight() { // this is good enough for now return (textBG.getBrightness() > 0.5); } public boolean isDark() { return !isLight(); } }
b33fdef3a9fdd76144cf60784277c9224efea46b
4e277ff64d602cb688c5e5349f5e7872fafc7993
/PlantFactory.java
2515fac3e735e863d141b1d98aa6461625c575a4
[]
no_license
adirzoari/Aquarium-Java-with-gui
352e0de45821382a74a5626cae47edb615483221
442987b67e44c8c760625fea3f04fad3804ee614
refs/heads/master
2021-01-20T06:38:35.374130
2017-05-01T07:49:50
2017-05-01T07:49:50
89,906,161
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
/** * planet factory class return the specific object by getting message (string) * @author Adir Zoari 203002753 * @author Idan Levi 305562431 */ import java.awt.Color; public class PlantFactory implements AbstractSeaFactory { int size,x,y; AquaPanel panel; Color col; public PlantFactory(AquaPanel panel,int size,int x,int y){ this.panel=panel; this.size=size; this.x=x; this.y=x; this.col=Color.green; } public SeaCreature produceSeaCreature(String type){ if(type.equalsIgnoreCase("Laminaria")) return new Laminaria(panel,size,x,y); else if(type.equalsIgnoreCase("Zostera")){ return new Zostera(panel,size,x,y); } return null; } }
7f4aa6f6259cf3829db1c2e7c464840a01dcbf05
3dfe39d6cf86ba7ae5c2f7ba396d146405c27819
/oneview-sdk-java-lib/src/main/java/com/hp/ov/sdk/dto/networking/SubPort.java
145a596a5a8b428b6750221d8d6653fab9742bed
[ "Apache-2.0" ]
permissive
HewlettPackard/oneview-sdk-java
36332dbd55829e85a4b717cedf84cac5149af551
6b53b1f30070ade8ae479fe709da992e8f703d52
refs/heads/master
2023-08-09T07:37:10.565694
2018-04-18T17:55:45
2018-04-18T17:55:45
38,078,052
19
9
Apache-2.0
2018-04-18T17:55:46
2015-06-25T22:36:44
Java
UTF-8
Java
false
false
2,445
java
/* * (C) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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.hp.ov.sdk.dto.networking; import java.io.Serializable; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; public final class SubPort implements Serializable { private static final long serialVersionUID = -470998644380158072L; private Integer portNumber; private PortStatus portStatus; private PortStatusReason portStatusReason; /** * @return the portNumber */ public Integer getPortNumber() { return portNumber; } /** * @param portNumber the portNumber to set */ public void setPortNumber(Integer portNumber) { this.portNumber = portNumber; } /** * @return the portStatus */ public PortStatus getPortStatus() { return portStatus; } /** * @param portStatus the portStatus to set */ public void setPortStatus(PortStatus portStatus) { this.portStatus = portStatus; } /** * @return the portStatusReason */ public PortStatusReason getPortStatusReason() { return portStatusReason; } /** * @param portStatusReason the portStatusReason to set */ public void setPortStatusReason(PortStatusReason portStatusReason) { this.portStatusReason = portStatusReason; } @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
28ad1e15b35779bc4ee525f221801d10445ac9b8
090d44a992133906c7ad0acb6a00107f3f64126b
/src/com/uha/client/widgets/SubmitButton.java
a3b66d60df28c0c53009eeed5a1d2c9de610346d
[]
no_license
ksrivastava/UHAProject
d3ce590adf1da0eed49132478c80adf42c0ce09a
56e1c0e8946ebd724a75d028ec6493d77ec9e6e2
refs/heads/master
2021-01-20T08:49:07.125607
2013-09-24T17:09:47
2013-09-24T17:09:47
13,071,274
0
1
null
null
null
null
UTF-8
Java
false
false
353
java
package com.uha.client.widgets; import com.uha.core.UHAPanel; @SuppressWarnings("serial") public class SubmitButton extends UHAButton { public SubmitButton(UHAPanel panel) { super("Submit", panel); } public SubmitButton(UHAPanel panel, String text) { super(text, panel); } protected void execute(UHAPanel panel) { panel.submit(); } }
e28611239ff0a93e15537d48e4c3fcfd8394238c
c6a3b554eea42bb5a186c70ba6a4db54eca08291
/yiShuQiao/src/main/java/com/yishuqiao/dto/MyIntegralDTO.java
1d728ddb3e270755ceeb80e43e3d31aae21032bc
[]
no_license
df799409257/YiShuQiao
d7e9a0b79229da4ead403a83cd6b3de63a415265
23adef801c969288b40f8a6135af43595f985a23
refs/heads/master
2021-07-16T16:21:01.406415
2017-10-24T11:25:30
2017-10-24T11:30:10
103,234,511
0
0
null
null
null
null
UTF-8
Java
false
false
1,822
java
package com.yishuqiao.dto; import java.util.List; /** * 作者:admin * <p> * 创建时间:2017-7-6 上午10:20:16 * <p> * 项目名称:YiShuQiao * <p> * 文件名称:MyIntegralDTO.java * <p> * 类说明:我的积分界面 */ public class MyIntegralDTO { private String txt_code; private String txt_message; private List<DataInfor> dataList; public String getTxt_code() { return txt_code; } public void setTxt_code(String txt_code) { this.txt_code = txt_code; } public String getTxt_message() { return txt_message; } public void setTxt_message(String txt_message) { this.txt_message = txt_message; } public List<DataInfor> getDataList() { return dataList; } public void setDataList(List<DataInfor> dataList) { this.dataList = dataList; } public class DataInfor { private String txt_id = "";// 消息ID private String txt_count = "";// 积分数量 private String txt_title = "";// 标题 private String txt_date = "";// 日期 public String getTxt_id() { return txt_id; } public void setTxt_id(String txt_id) { this.txt_id = txt_id; } public String getTxt_count() { return txt_count; } public void setTxt_count(String txt_count) { this.txt_count = txt_count; } public String getTxt_title() { return txt_title; } public void setTxt_title(String txt_title) { this.txt_title = txt_title; } public String getTxt_date() { return txt_date; } public void setTxt_date(String txt_date) { this.txt_date = txt_date; } } }
5c2c563d53470527da30900a3e6dd7fa60aa3209
63aa505b77759ee3e82c4e17129454011ca0b33c
/src/main/java/com/olive/hr_info/controller/HRController.java
fd34ec14199ac6bcee1ddb1e3d46320e2a73eabb
[]
no_license
githubforchan/Olive
749efe6ee32f8237d0ca9510b114a7501a211ca7
fc376dacab61e7e6bef2c016110dff0d1e168fc3
refs/heads/master
2023-03-02T22:13:16.831845
2021-02-16T02:28:13
2021-02-16T02:28:13
324,474,514
0
0
null
null
null
null
UTF-8
Java
false
false
4,168
java
package com.olive.hr_info.controller; import java.security.Principal; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.olive.dto.DeptTest; import com.olive.dto.Emp; import com.olive.dto.SalaryInfo; import com.olive.hr_info.service.Hr_infoService; import com.olive.hr_management.service.Hr_managementService; import com.olive.utils.Criteria; import com.olive.utils.Pagination; import com.olive.utils.service.PagingService; @Controller @RequestMapping("/HRinfo/") public class HRController { private Hr_infoService empService; @Autowired private Hr_managementService managementService; @Autowired public void setEmpService(Hr_infoService empService) { this.empService = empService; } @Autowired private BCryptPasswordEncoder bCryptPasswordEncoder; @Autowired private PagingService pagingService; //인사관리 > 급여관리 > 급여상세 @RequestMapping(value = "SalaryDetail.do", method = RequestMethod.GET) public String getSalaryDetail(Model model, String date, int empno) { SalaryInfo salaryInfo = managementService.getSalaryDetail(date, empno); salaryInfo.conversionFormality(); model.addAttribute("salaryInfo", salaryInfo); return "HRinfo/salaryDetail"; } @RequestMapping(value="Salary.do", method=RequestMethod.GET) public String showSalary(Model model, Criteria cri, Principal pri) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); cri.setCriteria("salaryinfo", "SAL_DATE", "DESC"); cri.setSearchType("empno"); cri.setKeyword(auth.getName()); int totalCount = pagingService.getListCount(cri); cri.setPerPageNum(5); Pagination pagination = new Pagination(cri, totalCount); List<Map<String, Object>> result = pagingService.getList(cri); model.addAttribute("list", result); model.addAttribute("pagination", pagination); model.addAttribute("criteria", cri); return "HRinfo/Salary"; } @RequestMapping("SalaryDetail.do") public String showSalaryDetail() { return "HRinfo/salaryDetail"; } //전체 사원 목록 조회 @RequestMapping(value="Emp.do", method=RequestMethod.GET) public String showEmpList(Model model, Criteria cri) { //empinfo 뷰 사용 cri.setCriteria("empinfo", "empno", "asc"); int totalCount = pagingService.getListCount(cri); Pagination pagination = new Pagination(cri, totalCount); cri.setPerPageNum(5); List<Map<String, Object>> result = pagingService.getList(cri); model.addAttribute("emplist", result); model.addAttribute("pagination", pagination); model.addAttribute("criteria", cri); return "HRinfo/Emp"; } //조직도 본부 단위 (default) //미완성 @RequestMapping(value="Organization_chart.do", method=RequestMethod.GET) public String showOrg(Model model) { List<DeptTest> headlist = empService.showOrg(); model.addAttribute("head", headlist); return "HRinfo/Organization_chart"; } //마이페이지 처음 보여줄 때 @RequestMapping(value="EditMyinfo.do", method=RequestMethod.GET) public String editMyinfo(Model model) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); String username = auth.getName(); Map<String, Object> emp = empService.searchEmpByEmpno(username); model.addAttribute("emp", emp); return "HRinfo/EditMyinfo"; } //마이페이지 수정하기 @RequestMapping(value="updateMyInfo.do", method=RequestMethod.POST) public String updateMyInfo(Emp emp, HttpServletRequest request) { emp.setPwd(this.bCryptPasswordEncoder.encode(emp.getPwd())); empService.updateMyInfo(emp, request); return "redirect:/HRinfo/EditMyinfo.do"; } }
d96aecb1a3d515b93661f0df4131f134f7ade02f
1084fe97ca4f7ffba6584cdae0f29af7fd882bfe
/schema/external/src/main/java/net/meerkat/identifier/currency/PLN.java
c5f68053d36371e042fef6e34c770f18f2c5c8ff
[]
no_license
ollierob/meerkat
668a59d839adf01dcb04dcd35e3185ffe55888a8
5c88d567355eb4cb4fee62613b3f6be290dcc19d
refs/heads/master
2022-11-13T21:14:52.829245
2022-10-18T19:53:49
2022-10-18T19:53:49
54,719,015
1
0
null
null
null
null
UTF-8
Java
false
false
345
java
package net.meerkat.identifier.currency; /** * * @author ollie */ public class PLN extends NationalCurrencyIso { private static final long serialVersionUID = 1L; PLN() { } @Override public String symbol() { return "zł"; } @Override public String name() { return "Polish złoty"; } }
affc84f35718461274f304ff8dbe333b346c3894
02127aef528ff9ba18ae478f481ab37cf3c2fb4c
/src/main/java/com/wanliang/small/entity/Area.java
eb498227d78d68692d4cc7e9846aad4bd2be2a75
[]
no_license
pf5512/small
2f2c78a9fcc7f0fc9df56fb4d251df49ea037ae8
923eda30e9c85214a9efb78fc3750b7fc3e572d4
refs/heads/master
2021-01-01T06:53:32.059039
2015-04-13T01:15:50
2015-04-13T01:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,900
java
package com.wanliang.small.entity; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.PrePersist; import javax.persistence.PreRemove; import javax.persistence.PreUpdate; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotEmpty; /** * Entity - 地区 * * @author [email protected] Team * @version 3.0 */ @Entity @Table(name = "xx_area") @SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_area_sequence") public class Area extends OrderEntity { private static final long serialVersionUID = -2158109459123036967L; /** 树路径分隔符 */ private static final String TREE_PATH_SEPARATOR = ","; /** 名称 */ private String name; /** 全称 */ private String fullName; /** 树路径 */ private String treePath; /** 上级地区 */ private Area parent; /** 下级地区 */ private Set<Area> children = new HashSet<Area>(); /** 会员 */ private Set<Member> members = new HashSet<Member>(); /** 收货地址 */ private Set<Receiver> receivers = new HashSet<Receiver>(); /** 订单 */ private Set<Order> orders = new HashSet<Order>(); /** 发货点 */ private Set<DeliveryCenter> deliveryCenters = new HashSet<DeliveryCenter>(); /** * 获取名称 * * @return 名称 */ @NotEmpty @Length(max = 100) @Column(nullable = false, length = 100) public String getName() { return name; } /** * 设置名称 * * @param name * 名称 */ public void setName(String name) { this.name = name; } /** * 获取全称 * * @return 全称 */ @Column(nullable = false, length = 500) public String getFullName() { return fullName; } /** * 设置全称 * * @param fullName * 全称 */ public void setFullName(String fullName) { this.fullName = fullName; } /** * 获取树路径 * * @return 树路径 */ @Column(nullable = false, updatable = false) public String getTreePath() { return treePath; } /** * 设置树路径 * * @param treePath * 树路径 */ public void setTreePath(String treePath) { this.treePath = treePath; } /** * 获取上级地区 * * @return 上级地区 */ @ManyToOne(fetch = FetchType.LAZY) public Area getParent() { return parent; } /** * 设置上级地区 * * @param parent * 上级地区 */ public void setParent(Area parent) { this.parent = parent; } /** * 获取下级地区 * * @return 下级地区 */ @OneToMany(mappedBy = "parent", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @OrderBy("order asc") public Set<Area> getChildren() { return children; } /** * 设置下级地区 * * @param children * 下级地区 */ public void setChildren(Set<Area> children) { this.children = children; } /** * 获取会员 * * @return 会员 */ @OneToMany(mappedBy = "area", fetch = FetchType.LAZY) public Set<Member> getMembers() { return members; } /** * 设置会员 * * @param members * 会员 */ public void setMembers(Set<Member> members) { this.members = members; } /** * 获取收货地址 * * @return 收货地址 */ @OneToMany(mappedBy = "area", fetch = FetchType.LAZY) public Set<Receiver> getReceivers() { return receivers; } /** * 设置收货地址 * * @param receivers * 收货地址 */ public void setReceivers(Set<Receiver> receivers) { this.receivers = receivers; } /** * 获取订单 * * @return 订单 */ @OneToMany(mappedBy = "area", fetch = FetchType.LAZY) public Set<Order> getOrders() { return orders; } /** * 设置订单 * * @param orders * 订单 */ public void setOrders(Set<Order> orders) { this.orders = orders; } /** * 获取发货点 * * @return 发货点 */ @OneToMany(mappedBy = "area", fetch = FetchType.LAZY) public Set<DeliveryCenter> getDeliveryCenters() { return deliveryCenters; } /** * 设置发货点 * * @param deliveryCenters * 发货点 */ public void setDeliveryCenters(Set<DeliveryCenter> deliveryCenters) { this.deliveryCenters = deliveryCenters; } /** * 持久化前处理 */ @PrePersist public void prePersist() { Area parent = getParent(); if (parent != null) { setFullName(parent.getFullName() + getName()); setTreePath(parent.getTreePath() + parent.getId() + TREE_PATH_SEPARATOR); } else { setFullName(getName()); setTreePath(TREE_PATH_SEPARATOR); } } /** * 更新前处理 */ @PreUpdate public void preUpdate() { Area parent = getParent(); if (parent != null) { setFullName(parent.getFullName() + getName()); } else { setFullName(getName()); } } /** * 删除前处理 */ @PreRemove public void preRemove() { Set<Member> members = getMembers(); if (members != null) { for (Member member : members) { member.setArea(null); } } Set<Receiver> receivers = getReceivers(); if (receivers != null) { for (Receiver receiver : receivers) { receiver.setArea(null); } } Set<Order> orders = getOrders(); if (orders != null) { for (Order order : orders) { order.setArea(null); } } Set<DeliveryCenter> deliveryCenters = getDeliveryCenters(); if (deliveryCenters != null) { for (DeliveryCenter deliveryCenter : deliveryCenters) { deliveryCenter.setArea(null); } } } /** * 重写toString方法 * * @return 全称 */ @Override public String toString() { return getFullName(); } }
ad05733adab0320f1f83db6ec9025d8a958d349d
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/p005b/p273o/p276x4/p277j/C5036b.java
12a610480e4e4b86f80c491abba034df53881818
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
package p005b.p273o.p276x4.p277j; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.ActivityChooserModel; import com.segment.analytics.AnalyticsContext; import com.segment.analytics.integrations.BasePayload; import java.util.Objects; import org.json.JSONObject; import p005b.p035e.p036a.p037a.C0843a; /* renamed from: b.o.x4.j.b */ public class C5036b { @NonNull /* renamed from: a */ public String f9732a; @Nullable /* renamed from: b */ public C5037c f9733b; /* renamed from: c */ public Float f9734c; /* renamed from: d */ public long f9735d; public C5036b(@NonNull String str, @Nullable C5037c cVar, float f) { this.f9732a = str; this.f9733b = cVar; this.f9734c = Float.valueOf(f); this.f9735d = 0; } public C5036b(@NonNull String str, @Nullable C5037c cVar, float f, long j) { this.f9732a = str; this.f9733b = cVar; this.f9734c = Float.valueOf(f); this.f9735d = j; } /* renamed from: a */ public JSONObject mo16788a() { JSONObject jSONObject = new JSONObject(); jSONObject.put(AnalyticsContext.Device.DEVICE_ID_KEY, this.f9732a); C5037c cVar = this.f9733b; if (cVar != null) { Objects.requireNonNull(cVar); JSONObject jSONObject2 = new JSONObject(); C5038d dVar = cVar.f9736a; if (dVar != null) { JSONObject jSONObject3 = new JSONObject(); jSONObject3.put("notification_ids", dVar.f9738a); jSONObject3.put("in_app_message_ids", dVar.f9739b); jSONObject2.put("direct", jSONObject3); } C5038d dVar2 = cVar.f9737b; if (dVar2 != null) { JSONObject jSONObject4 = new JSONObject(); jSONObject4.put("notification_ids", dVar2.f9738a); jSONObject4.put("in_app_message_ids", dVar2.f9739b); jSONObject2.put("indirect", jSONObject4); } jSONObject.put("sources", jSONObject2); } if (this.f9734c.floatValue() > 0.0f) { jSONObject.put(ActivityChooserModel.ATTRIBUTE_WEIGHT, this.f9734c); } long j = this.f9735d; if (j > 0) { jSONObject.put(BasePayload.TIMESTAMP_KEY, j); } return jSONObject; } public String toString() { StringBuilder u = C0843a.m460u("OSOutcomeEventParams{outcomeId='"); u.append(this.f9732a); u.append('\''); u.append(", outcomeSource="); u.append(this.f9733b); u.append(", weight="); u.append(this.f9734c); u.append(", timestamp="); u.append(this.f9735d); u.append('}'); return u.toString(); } }
db885f94c04e6efdd696adc3e7c57690e5fd86d7
3033689d77e7e143f04e4ae5a65086b407fe4acc
/app/src/main/java/com/gtsl/mvpapp/utils/Hash.java
b6100bb116e3fc5b44062c4dc56c55cc5a503331
[]
no_license
brsengar/MvpApp
54b4676d97d760cd14d6374bdabb5d42d6444e93
27a071dbca3a4e4f4b27395916af601bb0fb9ac6
refs/heads/master
2021-07-09T14:02:08.449402
2017-10-06T13:30:21
2017-10-06T13:30:21
105,124,265
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package com.gtsl.mvpapp.utils; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Hash { public static String md5(String value) { try { MessageDigest digest = MessageDigest.getInstance("MD5"); digest.update(value.getBytes()); byte messageDigest[] = digest.digest(); StringBuilder hex = new StringBuilder(); for (int i = 0; i < messageDigest.length; i++) { String h = Integer.toHexString(0xFF & messageDigest[i]); while (h.length() < 2) { h = "0" + h; } hex.append(h); } return hex.toString(); } catch (NoSuchAlgorithmException e) { return null; } } }
8966b2eae847f4f637f8219332dcd1cee5c390c3
d0bc0a7421b1582244f0a3fc70ca9d8556ee3879
/src/main/java/com/ojas/gst/serviceimpl/DistrictServiceImpl.java
b2a3c24741f51b121d52686a7d3f638f683703e2
[]
no_license
dhamotharang/GSTProject
9743ab52716682ebd54c4ce42fcba5ba26906ba4
05784ffcece1ebe47b8773a4ae30758cde8e453a
refs/heads/master
2023-06-03T10:56:58.285574
2019-10-03T12:41:38
2019-10-03T12:41:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
941
java
package com.ojas.gst.serviceimpl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import com.ojas.gst.dao.DistrictDao; import com.ojas.gst.entity.District; import com.ojas.gst.service.DistrictService; public class DistrictServiceImpl implements DistrictService{ @Autowired private DistrictDao districtDao; @Override public District createDistrict(District district) { return districtDao.save(district); } @Override public List<District> getAllDistricts() { return districtDao.getAllDistricts(); } @Override public District getDistrictById(Long districtId) { return districtDao.find(districtId); } @Override public int deleteDistrictById(District district) { return districtDao.deleteById(district); } @Override public District updateDistrict(District district) { //return districtDao.updateDistrictById(district); return districtDao.save(district); } }
1fa2bc5b4803dfe04c7cbbd4cb9da57e51922991
68d8872a478418cd1bb065891802baa961c8cc44
/e-safra-web/src/main/java/validator/EmailValidator.java
ad0eeb61f04cb9674c36b0403ad2c14ab758e5e5
[]
no_license
NizarBoussarsar/e-safra
82444a3a0f54da87c0aed15fbf532d11c4af0ba4
72e3265355cfa844e35eca126eea3e95b2048d97
refs/heads/master
2020-09-13T10:49:43.137810
2015-05-22T06:27:41
2015-05-22T06:27:41
34,184,032
0
2
null
null
null
null
UTF-8
Java
false
false
1,162
java
package validator; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; @FacesValidator("validator.EmailValidator") public class EmailValidator implements Validator { private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-]+(\\." + "[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*" + "(\\.[A-Za-z]{2,})$"; private Pattern pattern; private Matcher matcher; public EmailValidator() { pattern = Pattern.compile(EMAIL_PATTERN); } @Override public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { matcher = pattern.matcher(value.toString()); if (!matcher.matches()) { FacesMessage msg = new FacesMessage("E-mail validation failed.", "Invalid E-mail format."); msg.setSeverity(FacesMessage.SEVERITY_ERROR); throw new ValidatorException(msg); } } }
b9d738c4c29ad0378a775758902d9cacf61dda3d
515d4f0500ac39d08bb58bb22d851981393df955
/SectionFiveChallenges/src/com/leonardovieira/FirstLastDigitSum.java
c9644ae102d07dc09ad4951662bf2f318121e6cd
[]
no_license
LeoVieira1997/Java-Projects
24e0affc99aca11fe7cdec5f9f2b544d2c1296b4
3197cb7d82ac981d7fc313870736cbe0660b6a08
refs/heads/master
2020-04-23T07:35:42.730986
2019-02-16T14:07:25
2019-02-16T14:07:25
171,010,777
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.leonardovieira; public class FirstLastDigitSum { public static void main(String[] args) { System.out.println(sumFirstAndLastDigit(252)); } public static int sumFirstAndLastDigit(int number){ int lastDigit = number % 10; int firstDigit = 0; if (number < 0){ return -1; } while (number != 0){ firstDigit = number; number = number/10; } return firstDigit + lastDigit; } }
64f8405989f83be7ab99b32be02131b2bed80db8
8f28c1b497689a34cc5bcb6a0441f0c45b1cb4b9
/src/main/java/com/managerSystem/entity/PageBean.java
cd26a9411271e5c4d1e460b21e8907055c6b69f0
[]
no_license
liyong7686/ManageSystem
0bc2cab00b743aff453db9fd85e53127aa01c2c4
add643e35ae1f9ac277d7f7d1f4cd7e317e5aee8
refs/heads/master
2020-03-26T07:42:16.483083
2018-08-17T09:54:37
2018-08-17T09:54:37
144,666,757
1
0
null
null
null
null
GB18030
Java
false
false
630
java
package com.managerSystem.entity; /** * 分页Model类 */ public class PageBean { private int page; // 第几页 private int pageSize; // 每页记录数 private int start; // 起始页 public PageBean(int page, int pageSize) { super(); this.page = page; this.pageSize = pageSize; } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getStart() { return (page-1)*pageSize; } }
29440d5f763c85667a3740b6a5fd13bb5b79ef28
16b283d15f7f9ba01a139d03e90e078c3ddf6970
/src/code/model/Board_MVC_062.java
776688a793b9ce2295d345625fb2d9967bd2e9d9
[]
no_license
AliHasan123/Scrabble
06d3c888189b53c44f7e3b0f951849e72a9746e0
514f719de4f40e748528a475cf38d56114b99e46
refs/heads/master
2021-01-15T20:28:57.620879
2017-08-09T21:26:43
2017-08-09T21:26:43
99,854,173
0
0
null
null
null
null
UTF-8
Java
false
false
4,163
java
package code.model; //author Noah during meeting 4/3 /* ---Revisions--- * Noah 4/4 - boardTileClicked declaration * Noah and James 4/6 - various methods */ public interface Board_MVC_062 { /*Methods for the Controller */ public void boardTileClicked(int x, int y); /* it's up to the board's functionality to determine what to do when a tile on the board is clicked */ public void tileRackClicked(int num, int pos); /* board handles a tileRack button click event */ //Noah and Ali 4/7 /* Methods for the View */ public String toString(); /* returns the contents of the board in the form of a string of length 400 "AC-D-XS---J" and so forth */ public String colors(); /* returns the color of each tile in the form of a string of length 400 "BGGRYY--YYGGBRR " and so forth */ public String getError(); /* possible errors: "invalidPlacement" , "invalidWord" */ //noah 4/10 public Player_024_062 whoseTurn(); /* returns whose turn it is */ //public Integer[] highlight(); /* Returns an Integer array of length 6 containing information about which tile the game needs to highlight. The string will contain only ints. index 0: 0 means no board tile is highlighted. 1 means a board tile is highlighted. index 1: x coordinate of highlighted board tile index 2: y coordinate of highlighted board tile index 3: 0 means no tileTack is highlighted ... vice versa index 4: Player # of whose tileRack contains the highlighted tile (1-4) index 5: position on said tileRack of highlighted tile Two zeros in indices 0 and 3 means no tile is highlighted. Example return array: {0, 0, 0, 1, 3, 11} */ // 4/28 I decided that the above version of highlight is obsolete, because board is now operating on a state basis - Noah public Integer[] highlight(); /* returns an array of length 5 that contains the values of _clickState _whichRack _rackPosition _newTileX _newTileY */ // -- Noah individual edit 4/28 public boolean checkIfWordIsValid(String word); //Checks to see if word is valid with dictionary txt file // -James 4/5 --> Noah and james 4/6 public int leftInBag(); /*returns the number of tiles remaining in the inventory */ /* Methods for model functionality */ //driver:noah navigator:james 4/8 public boolean validatePlacement(); /* checks to make sure the newly placed words are valid. If there are any invalid placements, the method will write "invalid placement" to the error instance variable and will then return false. */ public void flipTileColors(Tile_024_062 tile, int x, int y); /* (after a word submission has been confirmed as valid, but not yet scored) scans the board for places where tile colors need to be flipped and then assigns the appropriate color to the flipped tiles */ public int evaluateWords(); /* calculates the total score of the newly formed words (taking into account the colors) and will add the value to the appropriate player's current score. After all is said and done, the new words should be added to the _wordsOnBoard ArrayList. See the WordTracker class for proper formatting */ /* validatePlacement(), flipTileColors(), and evaluateWords() will be called in order of the declaration * (they should also be written in order of declaration) */ /* Words that already exist on the board are kept in the _wordsOnBoard ArrayList. Since players only receive points * for new words, we must compare potential new words to the old words to ensure that the new words are actually new. * To do this, simply iterate through words on board. Pack the new word into WordTracker format. If a is an old word * and b is potentially a new word, just go a.equals(b). If b isn't equal to anything in the list, then it's a new * word and points can be awarded for it. (The word must be determined to be valid before beginning the comparison process */ }
e9a487da5be58da6bc79dfa092b4c2b876b09847
ed1ffed7615dac9b7eb7de2ade48d0820050f5e2
/app/src/main/java/zxch/com/androdivoidetest/utils/GudieData.java
fdc4c2236c66fd7ee9f302e05a4170694ab598fc
[]
no_license
wayosiptv/wayos_iptv
4f2ec7a5c988ecbc17b1fc96f04bea66375d9fdb
e918ac36a207acb68d23a90a664f7b69e4ef533d
refs/heads/master
2022-11-27T05:15:13.596393
2020-08-05T01:30:20
2020-08-05T01:30:20
285,145,014
1
0
null
null
null
null
UTF-8
Java
false
false
1,736
java
package zxch.com.androdivoidetest.utils; import java.io.Serializable; /** * Created by Love红宝 on 2018/12/11. */ public class GudieData implements Serializable { /** * result : 1 * code : * value : 和 */ private int result; private String code; private String value; public int getResult() { return result; } public void setResult(int result) { this.result = result; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } // // /** // * result : 1 // * code : tvChannelSet // * name : 中央一台 // * id : 0000135D // * number : 1 // */ // // private int result; // private String code; // private String name; // private String id; // private String number; // // public int getResult() { // return result; // } // // public void setResult(int result) { // this.result = result; // } // // public String getCode() { // return code; // } // // public void setCode(String code) { // this.code = code; // } // // public String getName() { // return name; // } // // public void setName(String name) { // this.name = name; // } // // public String getId() { // return id; // } // // public void setId(String id) { // this.id = id; // } // // public String getNumber() { // return number; // } // // public void setNumber(String number) { // this.number = number; // } }
1bf19373793c7fb0d78bfde779bd1498b789cf1a
2540dfb13662156d65dbfe64c0064fd475e797c8
/springboot-mybatis/src/main/java/com/bob/springboot/config/Swagger2Config.java
83c3e20bf83a209c0e97fcea1686054994fc5113
[]
no_license
bob4396/SpringBoot
82611f70c115470da9b9b547bf965c53cdff7a44
1d027d7099698d365060eb2cd2277d9cfd66afa1
refs/heads/master
2022-12-10T06:37:48.792730
2020-09-07T00:39:09
2020-09-07T00:39:09
292,720,144
0
0
null
null
null
null
UTF-8
Java
false
false
1,169
java
package com.bob.springboot.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class Swagger2Config { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.bob.springboot.controller")) .paths(PathSelectors.any()) .build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("swagger-api文档") .description("swagger文档 by bob") .version("1.0") .build(); } }
9654038eacfd893f61ea8baf0f9c209e4dcbe81b
960a46f1726910d9d542cceb3ffb7c95b5cc1d07
/school-jdbc/src/com/sample/school/service/SchoolService.java
2162d7dc13d5c3ea2fb40daf84004f80acc8b104
[]
no_license
MinSeob-Lee/JHTA
5cf9d7f75d29413b3050c6c7b94acab3c4dd3581
a861c7ba6a857eb3519db4cbbd3640f3091cbef9
refs/heads/master
2022-12-23T19:06:20.945706
2020-08-05T00:03:09
2020-08-05T00:03:09
246,175,466
2
0
null
2022-12-16T10:05:05
2020-03-10T00:58:36
Java
UTF-8
Java
false
false
73
java
package com.sample.school.service; public class SchoolService { }
0535985b2915196c1404e01e39a96623db3d4f0b
4f3af11692f248742729d4ff022abd6600711b28
/09-threads/DiningPlace/src/bg/sofia/uni/fmi/mjt/restaurant/Chef.java
b5c9402138f5f78f9d788a0d96b74c4666228234
[]
no_license
xMonny/Java-course-FMI
0a626b3c8d15b79c476b560c2cc925a00280dd0f
3f791f45c580d4ff2292db9c05d5b1a888277da4
refs/heads/main
2023-03-05T20:58:33.418147
2021-02-20T19:30:13
2021-02-20T19:30:13
312,666,594
1
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package bg.sofia.uni.fmi.mjt.restaurant; public class Chef extends Thread { private final int id; private final Restaurant restaurant; private int cookedMeals; public Chef(int id, Restaurant restaurant) { this.id = id; this.restaurant = restaurant; } public int getChefId() { return this.id; } @Override public void run() { while (((MJTDiningPlace) restaurant).isRestaurantOpened() || ((MJTDiningPlace) restaurant).hasOrders()) { Order orderToCook = restaurant.nextOrder(); if (orderToCook != null) { try { Thread.sleep(orderToCook.meal().getCookingTime()); } catch (InterruptedException e) { e.printStackTrace(); } cookedMeals++; } } } /** * Returns the total number of meals that this chef has cooked. **/ public int getTotalCookedMeals() { return cookedMeals; } }
b56d680eb6611b8d7911af076af5aeff048ce095
31a629ce57de5492a3679a6c4e81300b32b3785d
/BigFitness/src/main/java/com/member/gufei/bigfitness/com/GuFei/NetWork/Api.java
96d93a43f1a917092e0fd1cbd60a9edee6c64335
[]
no_license
zhuzilyy/NewbigFitnessMember
e910007c86537fa4821441ed094d7544aef2d705
3ccee9b93d9948b269ee4d5cb18557953e720911
refs/heads/master
2020-04-09T07:18:01.830772
2018-12-17T03:10:08
2018-12-17T03:10:08
160,144,166
0
0
null
null
null
null
UTF-8
Java
false
false
68,877
java
package com.member.gufei.bigfitness.com.GuFei.NetWork; import com.member.gufei.bigfitness.ResBean; import com.member.gufei.bigfitness.com.GuFei.Member.Ui.Main.AllCulbsList.UpdateVersion.UpdateBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.APPBuyLessonOrderDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyAPPBuyCardOrderDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberCardDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberCardListActivedBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberCardListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberCardListNotActiveBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberCardListRefundedBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberLessonDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberLessonListActivedBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberLessonListNotActiveBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppGetMyMemberLessonListRefundedBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.AppUserResetPwdCheckBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.AddFeeMemberLessonPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.AppBuyLessonPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.AppBuyMemberLessonPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.NewAppBuyMemberCardPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.NoticeListBean; //import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.RenewMemberCardPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.RenewMemberCardPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.UpMemberCardPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClassAppointmentBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClassCountdownInfoBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClassLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClassLessonRecordListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubFLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubGroupLessonDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubGroupLessonEvaluateListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubImagesBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubInfoByIdBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubLessonDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubLessonEvaluateStarTotalBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubLessonTeacherListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubListForMemberBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubListForMemberNoBuyBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubMemberCardTypeDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubOnlineSaleMemberCardListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubSaleLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubSaleNotOpenOrBuyGroupLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubTeacherDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubTeacherEvaluateListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ClubTeacherListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.CodeBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.ConsumptionRecordBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.CreateLessonQRBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.DistanceClassTimeBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.EventDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.FitnessRequestBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.FreeLessonAppointmentListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.FreeLessonClassRecordBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.GetLessonEvaluateBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.LandAppUserBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.LessonAddFeePriceBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MemberCardOnlineUpInfoBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MemberIdBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MemberMyInfoBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MemberSetUserInfoBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MembershipRenewalBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyGroupLessonBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyGroupLessonDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyLessonAppDetailBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyLessonAppListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyOthersAppointmentBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.MyTwoDimensionCodeBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.NotActiveMemberLessonListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.Buy.PayForAliPayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.PwdCheckBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.QueryScheduleDayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.RegisterAppUserBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.TeacherScheduleDayBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.UpGradeCardListBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.UserregisterAppUserBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.VerificationAccountNameBean; import com.member.gufei.bigfitness.com.GuFei.Model.MemberModel.VerifyCodeBean; import java.sql.RowId; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Query; import static com.member.gufei.bigfitness.Constants.BASEURL; /** * Created by GuFei_lyf on 2017/3/21 * 外部接口类 */ public interface Api { String baseUrl = BASEURL; /** * 登录 * * @param AccountName 用户名 * @param Pwd 密码 * @param DeviceCode 设备码 * @param DeviceType 设备类型 * @return */ @GET("appUser/landAppUser") rx.Observable<LandAppUserBean> landAppUser( @Query("AccountName") String AccountName, @Query("Pwd") String Pwd, @Query("DeviceCode") String DeviceCode, @Query("DeviceType") String DeviceType ); /** * #原手机修改密码验证 * * @param Mobile 电话 * @param VerifyCode 验证码 * @param token * @return */ @GET("appUser/appUserResetPwdCheck") rx.Observable<AppUserResetPwdCheckBean> appUserResetPwdCheck( @Query("Mobile") String Mobile, @Query("VerifyCode") String VerifyCode, @Query("token") String token ); /** * 操课预约详情 * * @param ClubId * @param Token * @param APPUserId * @param FLessonId * @param StartTime * @param LessonDate * @return */ @GET("/appMember/memberLesson/getClubFreeLessonInfo") rx.Observable<ResBean> getClubFreeLessonInfo( @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("APPUserId") String APPUserId, @Query("FLessonId") String FLessonId, @Query("StartTime") String StartTime, @Query("LessonDate") String LessonDate ); /** * 修改密码 * * @param AccountName 用户名 * @param Pwd 密码 * @param APPUserId 用户id * @param token * @return */ @GET("appUser/appUserResetPwd") rx.Observable<CodeBean> appUserResetPwd( @Query("AccountName") String AccountName, @Query("Pwd") String Pwd, @Query("APPUserId") String APPUserId, @Query("token") String token ); /** * 昵称重复校验 * * @param NickName 昵称 * @param token * @return */ @GET("appUser/checkNickName") rx.Observable<MemberMyInfoBean> checkNickName( @Query("NickName") String NickName, @Query("token") String token ); /** * 注册 * * @param AccountName 用户名 * @param Mobile 电话 * @param Pwd 密码 * @param VerifyCode 验证码 * @param token * @return */ @GET("appUser/registerAppUser") rx.Observable<RegisterAppUserBean> registerAppUser( @Query("AccountName") String AccountName, @Query("Mobile") String Mobile, @Query("Pwd") String Pwd, @Query("VerifyCode") String VerifyCode, @Query("token") String token ); /** * 完善个人信息 * * @param APPUserId 用户id * @param DeviceCode 设备码 * @param Birthday 生日 * @param NickName 昵称 * @param Sex 性别 * @param Height 身高 * @param Weight 体重 * @param FitnessRequest 健身需求 * @param DeviceType 设备类型 * @return */ @GET("appUser/updateAppUserInfo") rx.Observable<MemberMyInfoBean> updateAppUserInfo( @Query("APPUserId") String APPUserId, @Query("DeviceCode") String DeviceCode, @Query("Sex") String Sex, @Query("NickName") String NickName, @Query("Birthday") String Birthday, @Query("Height") String Height, @Query("Weight") String Weight, @Query("FitnessRequest") String FitnessRequest, @Query("DeviceType") String DeviceType ); /** * 修改个人信息 * * @param APPUserId 用户id * @param HeaderURL 头像 * @param Birthday 生日 * @param NickName 昵称 * @param Sex 性别 * @param Height 身高 * @param Weight 体重 * @param FitnessRequest 健身需求 * @param token * @return */ @GET("appMember/setUserInfo") rx.Observable<MemberSetUserInfoBean> setAppUserInfo( @Query("APPUserId") String APPUserId, @Query("HeaderURL") String HeaderURL, @Query("Sex") String Sex, @Query("NickName") String NickName, @Query("Birthday") String Birthday, @Query("Height") String Height, @Query("Weight") String Weight, @Query("FitnessRequest") String FitnessRequest, @Query("token") String token ); /** * 用户名重复校验 * * @param AccountName 用户名 * @param token * @return */ @GET("appUser/checkTAppuserByAccountName") rx.Observable<VerificationAccountNameBean> checkTAppuserByAccountName( @Query("AccountName") String AccountName, @Query("token") String token ); /** * 获取健身需求 * * @param token * @return */ @GET("appUser/getFitnessRequest") rx.Observable<FitnessRequestBean> getFitnessRequest( @Query("token") String token ); /** * 获取通知消息 * * @param APPUserId * @param token * @param PageIndex * @param PageSize * @param MsgTypeId * @return */ @GET("appMember/pushMessage/getAPPUserMessage") rx.Observable<NoticeListBean> getNoticeList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("PageIndex") String PageIndex, @Query("PageSize") String PageSize, @Query("MsgTypeId") String MsgTypeId ); /** * 阅读消息,标记为已读 * * @param APPUserId * @param token * @param RowId * @param IsAPPPush * @return */ @GET("appMember/pushMessage/ReadMessage") rx.Observable<CodeBean> getIsRead( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("RowId") String RowId, @Query("IsAPPPush") String IsAPPPush ); /** * 删除通知 * * @param APPUserId * @param token * @param RowId * @param IsAPPPush * @return */ @GET("appMember/pushMessage/delMessage") rx.Observable<CodeBean> getDelete( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("RowId") String RowId, @Query("IsAPPPush") String IsAPPPush ); /** *全部标记为已读 * * @param APPUserId * @param token * @param MsgTypeId * @return */ @GET("appMember/pushMessage/ReadAllMessage") rx.Observable<CodeBean> getAllRead( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("MsgTypeId") String MsgTypeId ); /** *删除全部已读 * * @param APPUserId * @param token * @param MsgTypeId * @return */ @GET("appMember/pushMessage/delAllMessage") rx.Observable<CodeBean> getAllDelete( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("MsgTypeId") String MsgTypeId ); /** * 所有会所列表(包含我的会所) * * @param APPUserId * @param token * @param currentPage * @param UserPosition * @return */ @GET("appClub/getClubListForMember") rx.Observable<ClubListForMemberBean> getClubListForMember( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("currentPage") String currentPage, @Query("UserPosition") String UserPosition ); /** * 会所详情 * * @param ClubId * @param APPUserId * @param token * @return */ @GET("appClub/clubInfoById") rx.Observable<ClubInfoByIdBean> clubInfoById( @Query("ClubId") String ClubId, @Query("APPUserId") String APPUserId, @Query("token") String token ); /** * 轮播图详情 * * @param Id * @param token * @return */ @GET("appClub/getEventDetail") rx.Observable<EventDetailBean> getEventDetail( @Query("Id") String Id, @Query("token") String token ); /** * 其他会所列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appClub/getClubListForMemberNoBuy") rx.Observable<ClubListForMemberNoBuyBean> getClubListForMemberNoBuy( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("lat") String lat, @Query("lng") String lng ); /** * 获取会所评价列表 * * @param APPUserId * @param Token * @param ClubId * @param IsOnlyShowContent * @param Star * @param PageIndex * @return */ @GET("appClub/getClubevaluateByClubId") rx.Observable<ClubLessonEvaluateStarTotalBean> getClubevaluateByClubId( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("IsOnlyShowContent") int IsOnlyShowContent, @Query("Star") int Star, @Query("PageIndex") int PageIndex ); /** * 获取会所图片列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appClub/getClubImages") rx.Observable<ClubImagesBean> getClubImages( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token ); /** * 获取会所教练列表 * * @param ClubId * @param token * @param APPUserId * @return */ @GET("appMember/clubTeacher/getClubLessonTeacherList") rx.Observable<ClubTeacherListBean> getClubTeacherList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("currentPage") int currentPage ); /** * 获取会所私教课评价列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubSaleLessonList") rx.Observable<ClubSaleLessonListBean> getClubSaleLessonList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("currentPage") int currentPage ); /** * 获取私教课评价列表 * * @param APPUserId * @param Token * @param ClubId * @param IsOnlyShowContent * @param Star * @param PageIndex * @return */ @GET("appMember/memberLesson/getClubLessonEvaluateList") rx.Observable<ClubLessonEvaluateStarTotalBean> getClubLessonEvaluateList( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("LessonId") String LessonId, @Query("IsOnlyShowContent") int IsOnlyShowContent, @Query("Star") int Star, @Query("PageIndex") int PageIndex ); /** * 获取团体课评价列表 * * @param APPUserId * @param Token * @param ClubId * @param GroupLessonId * @param IsOnlyShowContent * @param Star * @param PageIndex * @return */ @GET("appMember/memberLesson/getClubGroupLessonEvaluateList") rx.Observable<ClubGroupLessonEvaluateListBean> getClubGroupLessonEvaluateList( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("GroupLessonId") String GroupLessonId, @Query("IsOnlyShowContent") int IsOnlyShowContent, @Query("Star") int Star, @Query("PageIndex") int PageIndex ); /** * 获取会所评价统计 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubLessonEvaluateStarTotal") rx.Observable<ClubLessonEvaluateStarTotalBean> getClubLessonEvaluateStarTotal( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId ); /** * 获取会教练评价列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubTeacherEvaluateList") rx.Observable<ClubTeacherEvaluateListBean> getClubTeacherEvaluateList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("PageIndex") int PageIndex, @Query("TeacherId") String TeacherId, @Query("Star") int Star ); /** * 获取会所私教课详情信息 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubLessonDetail") rx.Observable<ClubLessonDetailBean> getClubLessonDetail( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("LessonId") String LessonId ); /** * 获取会所在售未开课或已购买的小团体课列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubSaleNotOpenOrBuyGroupLessonList") rx.Observable<ClubSaleNotOpenOrBuyGroupLessonListBean> getClubSaleNotOpenOrBuyGroupLessonList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("currentPage") int currentPage ); /** * 获取会所小团体课详情信息 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubGroupLessonDetail") rx.Observable<ClubGroupLessonDetailBean> getClubGroupLessonDetail( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("GroupLessonId") String GroupLessonId ); /** * 获取会所私教课的教练列表 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubLessonTeacherList") rx.Observable<ClubLessonTeacherListBean> getClubLessonTeacherList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("LessonId") String LessonId, @Query("currentPage") int currentPage ); /** * 获取会所教练详情信息 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/clubTeacher/getClubTeacherDetail") rx.Observable<ClubTeacherDetailBean> getClubTeacherDetail( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("TeacherId") String TeacherId ); /** * 获取私教课教练详情信息 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/memberLesson/getClubTeacherDetail") rx.Observable<ClubTeacherDetailBean> getClubLessonTeacherDetail( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("TeacherId") String TeacherId ); /** * 我的会员卡列表-全部 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @return */ @GET("appMember/memberCard/appGetMyMemberCardList") rx.Observable<AppGetMyMemberCardListBean> appGetMyMemberCardList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * 获取会所线上销售的会员卡列表 * * @param APPUserId * @param Token * @param ClubId * @param currentPage * @return */ @GET("appMember/memberCard/getClubOnlineSaleMemberCardList") rx.Observable<ClubOnlineSaleMemberCardListBean> getClubOnlineSaleMemberCardList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * /** * 获取会所线上销售的会员卡详情 * * @param APPUserId * @param token * @param ClubId * @param MemberCardTypeId * @return */ @GET("appMember/memberCard/getClubMemberCardTypeDetail") rx.Observable<ClubMemberCardTypeDetailBean> getClubMemberCardTypeDetail( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("MemberCardTypeId") String MemberCardTypeId ); /** * /** * *获取会员卡续费-APP支付订单信息 * @param APPUserId * @param token * @param ClubId * @param MemberCardId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/memberCard/appAddFeeMemberCardPay") rx.Observable<RenewMemberCardPayBean> getRenewMemberCardPay( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("MemberCardId") String MemberCardId, @Query("Amount") String Amount, @Query("Price") String Price, @Query("TotalMoney") String TotalMoney, @Query("PayMode") String PayMode ); /** * /** * 获取会员卡续费价格列表 * * @param APPUserId * @param token * @param ClubId * @param MemberCardTypeId * @return */ @GET("sysMemberCard/memberCard/getMemberCardAddFeePriceList") rx.Observable<MembershipRenewalBean> getMemberCardAddFeePriceList( @Query("APPUserId") String APPUserId, @Query("token") String token, @Query("ClubId") String ClubId, @Query("MemberCardTypeId") String MemberCardTypeId ); /** * 获取会所操课列表 * * @param APPUserId * @param Token * @param ClubId * @param LessonDate * @param StartTime * @param PageIndex * @return */ @GET("appMember/memberLesson/getClubFLessonList") rx.Observable<ClubFLessonListBean> getClubFLessonList( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("LessonDate") String LessonDate, @Query("StartTime") String StartTime, @Query("PageIndex") int PageIndex ); /** * 我的会员卡列表-已激活 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @return */ @GET("appMember/memberCard/appGetMyMemberCardListActived") rx.Observable<AppGetMyMemberCardListActivedBean> appGetMyMemberCardListActived( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * 我的会员卡列表-未激活 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @return */ @GET("appMember/memberCard/appGetMyMemberCardListNotActive") rx.Observable<AppGetMyMemberCardListNotActiveBean> appGetMyMemberCardListNotActive( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * 我的会员卡列表-已退款 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @return */ @GET("appMember/memberCard/appGetMyMemberCardListRefunded") rx.Observable<AppGetMyMemberCardListRefundedBean> appGetMyMemberCardListRefunded( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * 我的会员卡详情 未激活 - 退款申请中 - 已退款 * * @param APPUserId * @param ClubId * @param Token * @return */ @GET("appMember/memberCard/appGetMyAPPBuyCardOrderDetail") rx.Observable<AppGetMyAPPBuyCardOrderDetailBean> appGetMyAPPBuyCardOrderDetail( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("OrderId") String OrderId, @Query("Status") String Status ); /** * 我的私教课退款申请 * * @param APPUserId * @param ClubId * @param Token * @param OrderId * @return */ @GET("appMember/memberLesson/appMyMemberLessonApplyRefund") rx.Observable<CodeBean> appMyMemberLessonApplyRefund( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("OrderId") String OrderId ); /** * 我的会员卡详情 激活 -过期 -已冻结 -作废 -冻结申请 * * @param APPUserId * @param ClubId * @param Token * @return */ @GET("appMember/memberCard/appGetMyMemberCardDetail") rx.Observable<AppGetMyMemberCardDetailBean> appGetMyMemberCardDetail( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("Status") String Status, @Query("MemberCardId") String MemberCardId, @Query("ConsumeType") String ConsumeType ); /** * 冻结会员卡申请 * * @param APPUserId * @param ClubId * @param Token * @return */ @GET("sysMemberCard/appMemberCardLockApply") rx.Observable<CodeBean> appMemberCardLockApply( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("MemberCardId") String MemberCardId, @Query("StartDate") String StartDate, @Query("EndDate") String EndDate ); /** * 获取会员卡升级-APP支付订单信息 * * @param APPUserId * @param Token * @param ClubId * @param MemberCardId * @param NewMemberCardTypeId * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/memberCard/appUpMemberCardPay") rx.Observable<UpMemberCardPayBean> getAppUpMemberCardPay( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("MemberCardId") String MemberCardId, @Query("NewMemberCardTypeId") String NewMemberCardTypeId, @Query("TotalMoney") String TotalMoney, @Query("PayMode") String PayMode ); /** * 获取会员卡升级列表 * * @param ClubId * @param MemberCardTypeId * @param Token * @return */ @GET("appMember/memberCard/getMemberCardOnlineUpPriceList") rx.Observable<UpGradeCardListBean> appMemberUpGradeCardList( @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("MemberCardTypeId") String MemberCardTypeId ); /** * 我的会员卡升级信息 * * @param MemberCardTypeId * @param NewMemberCardTypeId * @param ExpireTime * @param Token * @return */ @GET("appMember/memberCard/getMemberCardOnlineUpInfo") rx.Observable<MemberCardOnlineUpInfoBean> getMemberCardOnlineUpInfo( @Query("MemberCardTypeId") String MemberCardTypeId, @Query("NewMemberCardTypeId") String NewMemberCardTypeId, @Query("ExpireTime") String ExpireTime, @Query("Token") String Token ); /** * 预约操课按钮 * * @param APPUserId * @param Token * @param ClubId * @param FLessonId * @param MemberId * @param LessonDate * @return */ @GET("appMember/memberLesson/AddMemberFreeLessonAppointment") rx.Observable<ClassAppointmentBean> classAppointment( @Query("APPUserId") String APPUserId, @Query("Token") String Token, @Query("ClubId") String ClubId, @Query("FLessonId") String FLessonId, @Query("MemberId") String MemberId, @Query("LessonDate") String LessonDate ); /** * 我的会员卡 申请退款 * * @param APPUserId * @param ClubId * @param Token * @return */ @GET("appMember/memberCard/appMyMemberCardApplyRefund") rx.Observable<CodeBean> appMyMemberCardApplyRefund( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("OrderId") String OrderId ); /** * 我的会员卡 删除 * * @param APPUserId * @param ClubId * @param Token * @return */ @GET("appMember/memberCard/delMemberCardByOrderId") rx.Observable<CodeBean> delMemberCardByOrderId( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("OrderId") String OrderId ); /** * #获取会所在售未开课或已购买的小团体课列表 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @return */ @GET("appMember/memberLesson/getClubSaleNotOpenOrBuyGroupLessonList") rx.Observable<FitnessRequestBean> getClubSaleNotOpenOrBuyGroupLessonList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token ); /** * 我的私教课列表-全部 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @return */ @GET("appMember/memberLesson/appGetMyMemberLessonList") rx.Observable<AppGetMyMemberLessonListBean> appGetMyMemberLessonList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token ); /** * #获取我的私教课列表——未激活 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @param PageIndex 页码 * @return */ @GET("appMember/memberLesson/appGetMyMemberLessonListNotActive") rx.Observable<AppGetMyMemberLessonListNotActiveBean> appGetMyMemberLessonListNotActive( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * #获取我的私教课列表——已激活 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @param PageIndex 页码 * @return */ @GET("appMember/memberLesson/appGetMyMemberLessonListActived") rx.Observable<AppGetMyMemberLessonListActivedBean> appGetMyMemberLessonListActived( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * #获取我的私教课列表——已退款 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @param PageIndex 页码 * @return */ @GET("appMember/memberLesson/appGetMyMemberLessonListRefunded") rx.Observable<AppGetMyMemberLessonListRefundedBean> appGetMyMemberLessonListRefunded( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * #获取我的私教课列表——未认证 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @param PageIndex 页码 * @return */ @GET("appMember/memberLesson/getNotActiveMemberLessonList") rx.Observable<NotActiveMemberLessonListBean> getNotActiveMemberLessonList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * #私教课详细信息——已激活 * * @param APPUserId 用户id * @param ClubId 会所id * @param Id 私教课ID * @param token * @return */ @GET("appMember/memberLesson/appGetMyMemberLessonDetail") rx.Observable<AppGetMyMemberLessonDetailBean> appGetMyMemberLessonDetail( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Id") String Id, @Query("Status") String Status, @Query("token") String token ); /** * 我的私教课购买订单详情 * * @param APPUserId 用户id * @param ClubId 会所id * @param OrderId 订单编号 * @param Status * @param token * @return */ @GET("appMember/memberLesson/appGetMyAPPBuyLessonOrderDetail") rx.Observable<APPBuyLessonOrderDetailBean> getMyAPPBuyLessonOrderDetailNo( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("OrderId") String OrderId, @Query("Status") String Status, @Query("token") String token ); /** * 消费记录 * * @param APPUserId * @param ClubId * @param token * @return */ @GET("appMember/Record/getConsumptionRecord") rx.Observable<ConsumptionRecordBean> getConsumptionRecord( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * 上课记录--操课 * * @param APPUserId * @param ClubId * @param token * @param PageIndex * @param MemberId * @return */ @GET("appMember/Record/getFreeLessonClassRecord") rx.Observable<FreeLessonClassRecordBean> getFreeLessonClassRecord( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex, @Query("MemberId") String MemberId ); /** * 我的小团体课列表 * * @param ClubId * @param MemberId * @param token * @param PageIndex * @return */ @GET("appMember/memberLesson/getMyGroupLesson") rx.Observable<MyGroupLessonBean> getMyGroupLesson( @Query("ClubId") String ClubId, @Query("MemberId") String MemberId, @Query("token") String token, @Query("PageIndex") int PageIndex ); /** * 我的小团体课详情 * * @param ClubId * @param MemberId * @param Id * @param token * @return */ @GET("appMember/memberLesson/getMyGroupLessonDetail") rx.Observable<MyGroupLessonDetailBean> getMyGroupLessonDetail( @Query("ClubId") String ClubId, @Query("MemberId") String MemberId, @Query("Id") int Id, @Query("token") String token ); /** * 4.2.11.18.6.1. 上课私教课列表 * * @param APPUserId * @param ClubId * @param token * @param PageIndex * @param MemberId * @return */ @GET("appMember/Record/getClassLessonList") rx.Observable<ClassLessonListBean> getClassLessonList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex, @Query("MemberId") int MemberId ); /** *私教课上课记录 * * @param APPUserId * @param ClubId * @param token * @param PageIndex * @param MemberId * @param ComeLogId * @return */ @GET("appMember/Record/getLessonClassRecord") rx.Observable<ClassLessonRecordListBean>getLessonClassRecord( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("PageIndex") int PageIndex, @Query("MemberId") int MemberId, @Query("LessonId") String LessonId, @Query("ComeLogId") String ComeLogId ); /** *私教课评价 * * @param APPUserId * @param ClubId * @param token * @param MemberId * @param ComeLogId * @param AppointmentId * @param EvaluateStar * @param EvaluateContent * @param TeacherEvaluateStar * @param ServiceEvaluateStar * @param TeacherEvaluateContent * @param ImageURL * @param TeacherImageURL * @param IsAnonymous * @return */ @GET("appMember/memberAppointment/LessonEvaluate") rx.Observable<CodeBean>getLessonEvaluate( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("MemberId") String MemberId, @Query("ComeLogId") String ComeLogId, @Query("AppointmentId") String AppointmentId, @Query("EvaluateStar") String EvaluateStar, @Query("EvaluateContent") String EvaluateContent, @Query("TeacherEvaluateStar") String TeacherEvaluateStar, @Query("ServiceEvaluateStar") String ServiceEvaluateStar, @Query("TeacherEvaluateContent") String TeacherEvaluateContent, @Query("ImageURL") String ImageURL, @Query("TeacherImageURL") String TeacherImageURL, @Query("IsAnonymous") String IsAnonymous ); /** *获取私教课评价内容 * * @param APPUserId * @param ClubId * @param token * @param MemberId * @param AppointmentId * @param ComeLogId * @return */ @GET("appMember/Record/getLessonEvaluate") rx.Observable<GetLessonEvaluateBean>getEvaluate( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("MemberId") String MemberId, @Query("AppointmentId") String AppointmentId, @Query("ComeLogId") String ComeLogId ); /** *补课申请 * * @param APPUserId * @param ClubId * @param token * @param LessonId * @param AppointmentId * @param Cause * @return */ @GET("appMember/Record/AddLessonMakeUpApply") rx.Observable<CodeBean>getAddLessonMakeUpApply( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token, @Query("LessonId") String LessonId, @Query("AppointmentId") String AppointmentId, @Query("Cause") String Cause ); /** * 会所评价 * * @param APPUserId * @param ClubId * @param Token * @param EvaluateStar * @param EvaluateContent * @param ImageURL * @param IsAnonymous * @return */ @POST("appClub/ClubEvaluate") @FormUrlEncoded rx.Observable<CodeBean> ClubEvaluate( @Field("APPUserId") String APPUserId, @Field("ClubId") String ClubId, @Field("Token") String Token, @Field("EvaluateStar") String EvaluateStar, @Field("EvaluateContent") String EvaluateContent, @Field("ImageURL") String ImageURL, @Field("IsAnonymous") String IsAnonymous ); /** * 操课评价 * * @param MemberId * @param ClubId * @param Token * @param FreeLessonId * @param EvaluateStar * @param EvaluateContent * @param ImageURL * @param IsAnonymous * @return */ @POST("appMember/memberLesson/FreeLessonEvaluate") @FormUrlEncoded rx.Observable<CodeBean> FreeLessonEvaluate( @Field("MemberId") String MemberId, @Field("ClubId") String ClubId, @Field("Token") String Token, @Field("FreeLessonId") String FreeLessonId, @Field("EvaluateStar") String EvaluateStar, @Field("EvaluateContent") String EvaluateContent, @Field("ImageURL") String ImageURL, @Field("IsAnonymous") String IsAnonymous ); /** * 小团体课评价 * * @param MemberId * @param ClubId * @param Token * @param FreeLessonId * @param EvaluateStar * @param EvaluateContent * @param ImageURL * @param IsAnonymous * @return */ @POST("appMember/memberLesson/GroupLessonEvaluate") @FormUrlEncoded rx.Observable<CodeBean> GroupLessonEvaluate( @Field("MemberId") String MemberId, @Field("ClubId") String ClubId, @Field("Token") String Token, @Field("GroupLessonId") String FreeLessonId, @Field("EvaluateStar") String EvaluateStar, @Field("EvaluateContent") String EvaluateContent, @Field("ImageURL") String ImageURL, @Field("IsAnonymous") String IsAnonymous ); /** * 4.2.11.8.5.1. 会员卡冻结催办 * * @param APPUserId * @param ClubId * @param Token * @param MemberCardId * @return */ @GET("sysMemberCard/appMemberCardLockSendMsg") rx.Observable<CodeBean> appMemberCardLockSendMsg( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("MemberCardId") String MemberCardId ); /** * 日程查询,按日期段查询预约数据接口 (包含上课预约记录) * * @param APPUserId * @param ClubId * @param Token * @param AppointmentStartDate * @param AppointmentEndDate * @return */ @GET("appMember/schedule/QueryScheduleDay") rx.Observable<QueryScheduleDayBean> QueryScheduleDay( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("AppointmentStartDate") String AppointmentStartDate, @Query("AppointmentEndDate") String AppointmentEndDate, @Query("isNow") String isNow ); /** * 首页悬浮按钮 * * @param APPUserId * @param ClubId * @param Token * @param AppointmentStartDate * @param AppointmentEndDate * @param quanquan * @return */ @GET("appMember/schedule/QueryScheduleDay") rx.Observable<QueryScheduleDayBean> getQuanQuan( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("AppointmentStartDate") String AppointmentStartDate, @Query("AppointmentEndDate") String AppointmentEndDate, @Query("quanquan") String quanquan ); /** * 二维码生成 * * @param APPUserId * @param ClubId * @param Token * @param AppointmentId * @return */ @GET("appMember/memberLesson/CreateLessonQR") rx.Observable<CreateLessonQRBean> CreateLessonQR( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("AppointmentId") String AppointmentId ); /** * 获取手机验证码 * * @param Mobile * @return */ @GET("appUser/getVerifyCode") rx.Observable<VerifyCodeBean> getVerifyCode( @Query("Mobile") String Mobile ); /** * 新用户注册 * * @param AccountName * @param Mobile * @param Pwd * @param VerifyCode * @return */ @GET("appUser/registerAppUser") rx.Observable<RegisterAppUserBean> registerAppUser( @Query("AccountName") String AccountName, @Query("Mobile") String Mobile, @Query("Pwd") String Pwd, @Query("VerifyCode") String VerifyCode ); /** * @return */ @GET("appUserregisterAppUser") rx.Observable<UserregisterAppUserBean> appUserregisterAppUser( ); /** * 验证密码 * * @param APPUserId * @param Pwd * @param token * @return */ @GET("appMember/PwdCheck") rx.Observable<PwdCheckBean> PwdCheck( @Query("APPUserId") String APPUserId, @Query("Pwd") String Pwd, @Query("token") String token ); /** * 我的二维码 * * @param APPUserId * @param token * @return */ @GET("appUser/getMyTwoDimensionCode") rx.Observable<MyTwoDimensionCodeBean> getMyTwoDimensionCode( @Query("APPUserId") String APPUserId, @Query("token") String token ); /** * 4.2.11.3.4.3. 修改手机号码 * * @param APPUserId * @param Mobile * @param VerifyCode * @return */ @GET("appMember/updateAPPUserMobile") rx.Observable<CodeBean> updateAPPUserMobile( @Query("APPUserId") String APPUserId, @Query("Mobile") String Mobile, @Query("VerifyCode") String VerifyCode ); /** * 获取我的私教课预约列表 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @return */ @GET("appMember/memberAppointment/getMyLessonAppList") rx.Observable<MyLessonAppListBean> getMyLessonAppList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("currentPage") int currentPage ); /** * 获取我的其他预约列表 * * @param APPUserId * @param ClubId * @param Token * @param PageIndex * @param PageSize * @return */ @GET("appMember/getMemberAppointmentList") rx.Observable<MyOthersAppointmentBean> getMyOthersAppointmentList( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("Token") String Token, @Query("PageIndex") int PageIndex, @Query("PageSize") int PageSize ); /** * 私教课预约详情 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @return */ @GET("appMember/memberAppointment/getMyLessonAppDetail") rx.Observable<MyLessonAppDetailBean>getMyLessonAppDetail( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId ); /** * 请求距离上课时间 * @param APPUserId * @param Token * @param ClubId * @param LessonId * @param AppointmentId * @return */ @GET("appMember/memberLesson/AttendClassTime") rx.Observable<DistanceClassTimeBean>getAttendClassTime( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("LessonId") String LessonId , @Query("AppointmentId") String AppointmentId ); /** * 上课正计时 * @param APPUserId * @param Token * @param ClubId * @param AppointmentId * @return */ @GET("appMember/memberLesson/getClassCountdownInfo") rx.Observable<ClassCountdownInfoBean>getClassCountdownInfo( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("AppointmentId") String AppointmentId ); /** * 确认私教预约 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @return */ @GET("appMember/memberAppointment/confirmLessonAppointment") rx.Observable<CodeBean>confirmLessonAppointment( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId ); /** * * 取消私教预约 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @param AppointmentStatus * @return */ @GET("appMember/memberAppointment/cancelMemberLessonAppointment") rx.Observable<CodeBean>cancelMemberLessonAppointment( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId , @Query("AppointmentStatus") String AppointmentStatus ); /** * * 确认其他预约 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @return */ @GET("appMember/memberAppointmentConfirm") rx.Observable<CodeBean>getMyOthersAppointmentSubmit( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId ); /** * * 取消其他预约 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @return */ @GET("appMember/memberAppointmentCancel") rx.Observable<CodeBean>getMyOthersAppointmentCancel( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId ); /** * * 操课预约列表 * * @param APPUserId * @param ClubId * @param Token * @param currentPage * @param MemberId * @return */ @GET("appMember/memberLesson/FreeLessonAppointmentList") rx.Observable<FreeLessonAppointmentListBean>FreeLessonAppointmentList( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("currentPage") int currentPage , @Query("MemberId") String MemberId ); /** * 取消操课预约 * @param APPUserId * @param ClubId * @param Token * @param MemberId * @param AppointmentId * @param Cause * @return */ @GET("appMember/memberLesson/cancelMemberFreeLessonAppointment") rx.Observable<CodeBean>cancelMemberFreeLessonAppointment( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Token") String Token , @Query("MemberId") String MemberId , @Query("AppointmentId") String AppointmentId , @Query("Cause") String Cause ); /** * 教练日程列表-日 * @param APPUserId * @param ClubId * @param token * @param AppointmentTeacherId * @return */ @GET("appMember/memberAppointment/getTeacherScheduleDay") rx.Observable<TeacherScheduleDayBean>getTeacherScheduleDay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("token") String token , @Query("AppointmentStartDate") String AppointmentStartDate , @Query("AppointmentEndDate") String AppointmentEndDate , @Query("AppointmentTeacherId") String AppointmentTeacherId ); /** * * 添加私教课预约 * @param APPUserId * @param ClubId * @param MemberId * @param LessonId * @param AppointmentTeacherId * @param Content * @param token * @param StartTime * @param EndTime * @param TipStartTime * @param TipInterval * @param AppointmentCata * @param AppointmentOwner * @param AppointmentStatus * @return */ @GET("appMember/memberAppointment/AddMemberLessonAppointment") rx.Observable<CodeBean>AddMemberLessonAppointment( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("MemberId") String MemberId , @Query("LessonId") String LessonId , @Query("AppointmentTeacherId") String AppointmentTeacherId , @Query("Content") String Content , @Query("token") String token , @Query("StartTime") String StartTime , @Query("EndTime") String EndTime , @Query("TipStartTime") String TipStartTime , @Query("TipInterval") String TipInterval , @Query("AppointmentCata") String AppointmentCata , @Query("AppointmentOwner") String AppointmentOwner , @Query("AppointmentStatus") String AppointmentStatus ); /** *私教课购买 * * @param APPUserId * @param ClubId * @param LessonId * @param TeacherId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appBuyLessonPay") rx.Observable<AppBuyLessonPayBean>appBuyLessonPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("LessonId") String LessonId , @Query("TeacherId") String TeacherId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** *小团体购买订单 * * @param APPUserId * @param ClubId * @param Id * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appAddFeeMemberLessonPay") rx.Observable<AppBuyLessonPayBean>appAddFeeMemberLessonPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Id") String Id , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * 购买操课订单 * * @param APPUserId * @param ClubId * @param GroupLessonId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appBuyGroupLessonPay") rx.Observable<AppBuyLessonPayBean>appBuyGroupLessonPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("GroupLessonId") String GroupLessonId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * * 购买会员卡 * * @param APPUserId * @param ClubId * @param MemberCardTypeId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/appBuyMemberCardPay") rx.Observable<AppBuyLessonPayBean>appBuyMemberCardPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("MemberCardTypeId") String MemberCardTypeId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * * 获取私教课购买-APP支付订单信息 * * @param APPUserId * @param Token * @param ClubId * @param LessonId * @param TeacherId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("/appMember/memberLesson/appBuyLessonPay") rx.Observable<AppBuyMemberLessonPayBean>appBuyMemberLessonPay( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("LessonId") String LessonId , @Query("TeacherId") String TeacherId , @Query("Amount") String Amount , @Query("Price") Double Price , @Query("TotalMoney") Double TotalMoney , @Query("PayMode") String PayMode ); /** * * 获取私教课续费价格列表 * * @param APPUserId * @param Token * @param ClubId * @param LessonId * @return */ @GET("appMember/memberLesson/getMemberLessonAddFeePriceList") rx.Observable<LessonAddFeePriceBean>getMemberLessonAddFeePriceList( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("LessonId") String LessonId ); /** * * 获取私教课续费-APP支付订单信息 * * @param APPUserId * @param Token * @param ClubId * @param Id * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appAddFeeMemberLessonPay") rx.Observable<AddFeeMemberLessonPayBean>getAddFeeMemberLessonPay( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("Id") String Id, @Query("Amount") String Amount, @Query("Price") String Price, @Query("TotalMoney") String TotalMoney, @Query("PayMode") String PayMode ); /** * 升级会员卡订单 * * * @param APPUserId * @param ClubId * @param MemberCardId * @param NewMemberCardTypeId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/memberCard/appUpMemberCardPay") rx.Observable<AppBuyLessonPayBean>appUpMemberCardPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("MemberCardId") String MemberCardId , @Query("NewMemberCardTypeId") String NewMemberCardTypeId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); // TODO: 2018/6/22 支付宝部分 /** *私教课购买 * * @param APPUserId * @param ClubId * @param LessonId * @param TeacherId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appBuyLessonPay") rx.Observable<PayForAliPayBean>appBuyLessonPayForAliPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("LessonId") String LessonId , @Query("TeacherId") String TeacherId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** *小团体购买订单 * * @param APPUserId * @param ClubId * @param Id * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appAddFeeMemberLessonPay") rx.Observable<PayForAliPayBean>appAddFeeMemberLessonPayForAliPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("Id") String Id , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * 购买操课订单 * * @param APPUserId * @param ClubId * @param GroupLessonId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("appMember/memberLesson/appBuyGroupLessonPay") rx.Observable<PayForAliPayBean>appBuyGroupLessonPayForAliPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("GroupLessonId") String GroupLessonId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * * 购买会员卡 * * @param APPUserId * @param ClubId * @param MemberCardTypeId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/appBuyMemberCardPay") rx.Observable<PayForAliPayBean>appBuyMemberCardPayForAliPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("MemberCardTypeId") String MemberCardTypeId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * * 新购买会员卡 * 2018/09/03 - LiuShengYuan * * @param APPUserId * @param Token * @param ClubId * @param MemberCardTypeId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/appBuyMemberCardPay") rx.Observable<NewAppBuyMemberCardPayBean>newAppBuyMemberCardPayBean( @Query("APPUserId") String APPUserId , @Query("Token") String Token , @Query("ClubId") String ClubId , @Query("MemberCardTypeId") String MemberCardTypeId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * 升级会员卡订单 * * * @param APPUserId * @param ClubId * @param MemberCardId * @param NewMemberCardTypeId * @param Amount * @param Price * @param TotalMoney * @param PayMode * @return */ @GET("sysMemberCard/memberCard/appUpMemberCardPay") rx.Observable<PayForAliPayBean>appUpMemberCardPayForAliPay( @Query("APPUserId") String APPUserId , @Query("ClubId") String ClubId , @Query("MemberCardId") String MemberCardId , @Query("NewMemberCardTypeId") String NewMemberCardTypeId , @Query("Amount") String Amount , @Query("Price") String Price , @Query("TotalMoney") String TotalMoney , @Query("PayMode") String PayMode ); /** * 判断该APP用户是否可以进行预约 * * @param APPUserId 用户id * @param ClubId 会所id * @param token * @return */ @GET("appClub/getMemberId") rx.Observable<MemberIdBean> getMemberIdIsLock( @Query("APPUserId") String APPUserId, @Query("ClubId") String ClubId, @Query("token") String token ); /*新版本更新 * @return */ @GET("appVersion/getNewestVersion") rx.Observable<UpdateBean> updateVersion( @Query("AppType") String AppType ); }