blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
7b9db09f38155a247977bf8a0bb78b47137b614a
0686ded6148958315ea25cf60c6e864d380e9b1f
/src/main/java/hillelJavaEE_02/util/ErrorBody.java
6b64d59f78e10556df01d37f70df5d103e2d55e5
[]
no_license
venger-alex/HillelJavaEE_02
a56d54e9bfefbf7040bba4ef94ca893b50411e61
d680d75af4b8f545af4580dcdb67348ae5001ce0
refs/heads/master
2021-09-04T14:49:40.074129
2017-12-26T16:57:05
2017-12-26T16:57:05
113,312,661
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package hillelJavaEE_02.util; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class ErrorBody { private final Integer code = 400; private String msg; }
[ "venger.alex@gmail.com" ]
venger.alex@gmail.com
5f5d72031a2f35578d801a084026d81d759f4f87
0ac05e3da06d78292fdfb64141ead86ff6ca038f
/OSWE/oswe/openCRX/rtjar/rt.jar.src/java/nio/file/attribute/DosFileAttributes.java
95e30e4a42d2d7b241a48ace13ad579a71e3f1bd
[]
no_license
qoo7972365/timmy
31581cdcbb8858ac19a8bb7b773441a68b6c390a
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
refs/heads/master
2023-07-26T12:26:35.266587
2023-07-17T12:35:19
2023-07-17T12:35:19
353,889,195
7
1
null
null
null
null
UTF-8
Java
false
false
392
java
package java.nio.file.attribute; public interface DosFileAttributes extends BasicFileAttributes { boolean isReadOnly(); boolean isHidden(); boolean isArchive(); boolean isSystem(); } /* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/java/nio/file/attribute/DosFileAttributes.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "t0984456716" ]
t0984456716
02ab02b67fdb24246c776613ffceaf6605384ea3
e375ae39f636ace94c365e21e1a6c08d7380f218
/src/methods/Test9.java
516f55505416d93ad2fd07c873a66755e0c51741
[]
no_license
javaandselenium/java245
42c2667bca12cf6bb334735f7a43ed92d10526fe
7dc0e76ce355ee5f303a57809f50f1d2f99d6fbd
refs/heads/master
2023-06-29T08:13:43.909144
2021-07-30T02:02:00
2021-07-30T02:02:00
381,546,243
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package methods; public class Test9 { public static void serach(String name) { System.out.println(name); } public static void serach(String sub,int date) { System.out.println(sub+date); } public static void serach(String cc,String Sub) { System.out.println(cc+Sub); } public static void main(String[] args) { Test9.serach("bharani"); Test9.serach("john","hello"); } }
[ "QSP@QSP" ]
QSP@QSP
250900307dd5c14da1ce0d3f6cd28bfa82247684
1a0eac7c99df859943f8cdbc96aaf67acfdb732d
/piechart/src/main/java/com/wifi/hblolj/piechart/PieFragment.java
9d5975cacf6878997a100ad6998a8649b0393e27
[]
no_license
hblolj/BasicDemo1
ac62edea19881c12971c6ea915a779799c75c016
edcfff49c61f9da18d72b130eac870b4a5482eaf
refs/heads/master
2021-01-19T20:03:12.857835
2017-04-17T05:22:25
2017-04-17T05:22:25
88,478,022
0
0
null
null
null
null
UTF-8
Java
false
false
4,975
java
package com.wifi.hblolj.piechart; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.text.SpannableString; import android.text.Spanned; import android.text.style.AbsoluteSizeSpan; import android.text.style.ForegroundColorSpan; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.github.mikephil.charting.charts.PieChart; import com.github.mikephil.charting.components.Description; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.PieData; import com.github.mikephil.charting.data.PieDataSet; import com.github.mikephil.charting.data.PieEntry; import com.github.mikephil.charting.highlight.Highlight; import com.github.mikephil.charting.listener.OnChartValueSelectedListener; import com.wifi.hblolj.piechart.bean.MonthData; import java.util.ArrayList; import java.util.List; /** * Created by hblolj on 2017/2/6. */ public class PieFragment extends Fragment implements OnChartValueSelectedListener { private static final String KEY_DATA = "piefragment_key_data"; private MonthData mData; private PieChart mPieChart; private TextView des_tv; public static PieFragment newInstance(MonthData data) { Bundle args = new Bundle(); // args.putString(KEY_DATA, data); args.putParcelable(KEY_DATA, data); PieFragment fragment = new PieFragment(); fragment.setArguments(args); return fragment; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle arguments = getArguments(); if (arguments != null) { mData = arguments.getParcelable(KEY_DATA); } } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.pie_fragment, null); mPieChart = (PieChart) view.findViewById(R.id.pichart); des_tv = ((TextView) view.findViewById(R.id.des_tv)); initViews(); //TextView textView = new TextView(getContext()); //textView.setText(mData); return view; } private void initViews() { setData(); Description desc = new Description(); desc.setText(""); mPieChart.setCenterText(getCenterText()); // mPieChart.setDrawSliceText(false); mPieChart.setDrawEntryLabels(false); mPieChart.getData().getDataSet().setDrawValues(false); mPieChart.getLegend().setEnabled(false); mPieChart.setDescription(desc); mPieChart.setRotationEnabled(false); mPieChart.setOnChartValueSelectedListener(this); // mPieChart.setExtraOffsets(20, 0, 20, 0); } private CharSequence getCenterText() { CharSequence text = "总支出\n" + mData.getSum() + "块"; SpannableString spannableString = new SpannableString(text); spannableString.setSpan(new ForegroundColorSpan(Color.rgb(200 ,200, 200)), 0, 3, Spanned.SPAN_INCLUSIVE_INCLUSIVE); spannableString.setSpan(new AbsoluteSizeSpan(64, true), 4, text.length()-1, Spanned.SPAN_INCLUSIVE_INCLUSIVE); return spannableString; } private void setData() { List<Integer> colors = new ArrayList<>(); colors.add(Color.rgb(0,191,255)); colors.add(Color.rgb(124,252,0)); colors.add(Color.rgb(255,99,71)); List<PieEntry> entrys = new ArrayList<>(); for (int i=0; i<mData.obj.size(); i++){ MonthData.PieChart chart = mData.obj.get(i); PieEntry pieEntry = new PieEntry(chart.value, chart.title); entrys.add(pieEntry); } PieDataSet dataSet = new PieDataSet(entrys, ""); dataSet.setColors(colors); PieData pieData = new PieData(dataSet); pieData.setValueTextSize(20); mPieChart.setData(pieData); } /** * 点击突出的监听函数 * @param e * @param h */ @Override public void onValueSelected(Entry e, Highlight h) { //设置旋转角度 float proportion = 360f/mData.getSum(); float x = h.getX(); MonthData.PieChart cell = mData.obj.get((int) x); // float angle = 90 - cell.value * proportion / 2; float angle = 90 - cell.value * proportion / 2 - mData.getSum(((int) h.getX())) * proportion; mPieChart.setRotationAngle(angle); updateDesText(cell); } private void updateDesText(MonthData.PieChart cell) { des_tv.setVisibility(View.VISIBLE); des_tv.setText(cell.title + " : " + cell.value); } /** * 点击收缩的监听函数 */ @Override public void onNothingSelected() { des_tv.setVisibility(View.GONE); } }
[ "hblolj@gmail.com" ]
hblolj@gmail.com
5b83aab6502845d52d4512e23054eb13b71d918e
e35cbc57b3716ecab95e9e24be92d336b65d13c1
/Instituto/src/controlador/Altas.java
01f1853d90e513207c82e348ed242cc823ee90df
[]
no_license
Drami24/AccesoDatos
46eca43e729a4ec813330ac8e1df0a6b4e1049c5
30d89250b59638e1fcf053121798b18af19ed5da
refs/heads/master
2023-08-17T13:31:16.856407
2018-10-07T15:34:53
2018-10-07T15:34:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
556
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 controlador; import modelo.BaseDatos; import vistas.Insercions; /** * * @author a14damianld */ public class Altas { public static void altaProfesor() { BaseDatos.insertarProfesor(Insercions.profesor()); } public static void altaAlumno() { BaseDatos.insertarAlumno(Insercions.alumno()); } }
[ "damilores@gmail.com" ]
damilores@gmail.com
d3451372f72cf8ea8ccfde6b29af2f9d08bdc435
261083e8ae210d8d74084af12983bf89e2e77964
/app/src/main/java/com/example/loaders/Employee.java
19a14f060566f56d9bffa084d816ffb28d509a40
[]
no_license
VishalSolanki135/Loaders
5a1f707ae8f2a8c295d86372ce61d5cc564f76f7
0605603cc72652a28b7cbb0446f343d9474dee96
refs/heads/main
2023-09-03T14:33:06.213573
2021-10-09T08:23:35
2021-10-09T08:23:35
406,615,155
0
0
null
null
null
null
UTF-8
Java
false
false
215
java
package com.example.loaders; public class Employee { public String empid; public String name; public Employee(String empid, String name) { this.empid = empid; this.name = name; } }
[ "vishalsolanki14002@gmail.com" ]
vishalsolanki14002@gmail.com
a1f36782ecb46d3b096c088f48d0c9d9621e9c9c
1609ad2449a33261f07bdc939b5a25b1f45aeda0
/Lazada_App/app/src/main/java/com/example/admin/lazada_app/Interfaces/inter.java
1d0e20cd30ad48da852d531711d6a46f455a53cf
[]
no_license
quychi/android-firebase
7f4316ae8d3855b45b5eef8881d011ef415e5617
73ffdffd73edd0ac7f9e37495f89d65881886c6c
refs/heads/master
2022-10-06T07:01:17.845012
2020-06-09T08:32:21
2020-06-09T08:32:21
270,945,600
0
0
null
null
null
null
UTF-8
Java
false
false
217
java
package com.example.admin.lazada_app.Interfaces; import com.example.admin.lazada_app.model.GioHang; public interface inter { void Add(int position); void Sub(int position); void Delete(int position); }
[ "nguyenquychi96@gmail.com" ]
nguyenquychi96@gmail.com
074575820f3c0c3ae838bfebc3d7f5273f0278c2
4dc41b994f6af11bed7bad44c4e761e824293aed
/src/p76q78/ArrayListOfSal.java
f7ed930c3f961765cb461bb8f22931f50d48d32d
[]
no_license
chitraphp/java_assignment
fffcf2c905767fba541fdb36cddf3ed8e61d8ed2
afd0cd6a7eefc3bff73161e8eaf99fbcb6627e2c
refs/heads/master
2023-03-19T20:12:06.291182
2021-03-15T05:50:05
2021-03-15T05:50:05
344,419,289
0
0
null
null
null
null
UTF-8
Java
false
false
47
java
package p76q78;public class ArrayListOfSal { }
[ "chitra.atmakuru@gmail.com" ]
chitra.atmakuru@gmail.com
f19b276acfccb3a2becfc16ae48394f88ef4b1fe
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201411/ReportJob.java
7557afe8b9def36c7364f8b54d283e6b922e5db8
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
2,919
java
package com.google.api.ads.dfp.jaxws.v201411; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * Represents a report job that will be run to retrieve performance and * statistics information about ad campaigns, networks, inventory and sales. * * * <p>Java class for ReportJob complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ReportJob"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * &lt;element name="reportQuery" type="{https://www.google.com/apis/ads/publisher/v201411}ReportQuery" minOccurs="0"/> * &lt;element name="reportJobStatus" type="{https://www.google.com/apis/ads/publisher/v201411}ReportJobStatus" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ReportJob", propOrder = { "id", "reportQuery", "reportJobStatus" }) public class ReportJob { protected Long id; protected ReportQuery reportQuery; protected ReportJobStatus reportJobStatus; /** * Gets the value of the id property. * * @return * possible object is * {@link Long } * */ public Long getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link Long } * */ public void setId(Long value) { this.id = value; } /** * Gets the value of the reportQuery property. * * @return * possible object is * {@link ReportQuery } * */ public ReportQuery getReportQuery() { return reportQuery; } /** * Sets the value of the reportQuery property. * * @param value * allowed object is * {@link ReportQuery } * */ public void setReportQuery(ReportQuery value) { this.reportQuery = value; } /** * Gets the value of the reportJobStatus property. * * @return * possible object is * {@link ReportJobStatus } * */ public ReportJobStatus getReportJobStatus() { return reportJobStatus; } /** * Sets the value of the reportJobStatus property. * * @param value * allowed object is * {@link ReportJobStatus } * */ public void setReportJobStatus(ReportJobStatus value) { this.reportJobStatus = value; } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
35a228875a8246918340d165df0a4a8693e213d7
d605eafd058795b5183ab418c601bffd651f4dc3
/workspace/JavaBootcamp2017/src/main/java/Clase4API/Service/UserService.java
ade79d134f5ed6fc436dd5b51ea41c8587cce1fe
[ "Apache-2.0" ]
permissive
acastaneda1/java-bootcamp-2017
b559973baf3c9dd72d7cfeefe1b85d4a16e3de37
11caa5ebb9b749ed1113f15154a93f8bb8f6fba1
refs/heads/master
2021-01-23T02:15:04.693383
2017-04-20T11:44:08
2017-04-20T11:44:08
85,974,336
0
0
null
2017-03-23T16:49:52
2017-03-23T16:49:51
null
UTF-8
Java
false
false
528
java
package Clase4API.Service; import Clase4API.Model.User; public interface UserService { /* This method create an new User*/ public void createUser(User user); /* This method return an object type User*/ public User getUser(String id, String name, String email, String password, int creditCardNumberUser); /* This method receive an object type User and change its attributes */ public void updateUser(User user); /* This method receive an object type User and is deleted */ public void deleteUser(User user); }
[ "yiyi65526@users.noreply.github.co" ]
yiyi65526@users.noreply.github.co
2369f021363f388934726e33191efead04da055e
19ff03acc109ef6205d9d4847d7a860ceb32258b
/Emergency_case_Management/src/Business/Role/OrganReceptionRole.java
eaef226f8936b9d7d1781f87beb5cd8f56e3f754
[]
no_license
mrunalghorpade11/Emergency-case-managment-for-hospitals
9e65cd1cdd64d44047370a18230adf2f78e96d1e
0b3ce98b40196e63c6463a514a9b2b0dfd55d1a9
refs/heads/master
2022-04-26T03:40:28.407302
2020-04-26T12:13:48
2020-04-26T12:13:48
174,235,641
0
0
null
null
null
null
UTF-8
Java
false
false
939
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 Business.Role; import Business.Business; import Business.Enterprise.Enterprise; import Business.Organisation.OrganInventoryReceptionOrganization; import Business.Organisation.Organization; import Business.UserAccount.UserAccount; import UserInterface.OrganInventoryWorkAreaPanel.OrganReceptionWorkAreaJPanel; import javax.swing.JPanel; /** * * @author puja_ */ public class OrganReceptionRole extends Role{ @Override public JPanel createWorkArea(JPanel userProcessContainer, UserAccount account, Organization organization, Business business, Enterprise enterprise) { return new OrganReceptionWorkAreaJPanel(userProcessContainer, account, (OrganInventoryReceptionOrganization)organization, enterprise, business); } }
[ "ghorpade.m@husky.neu.edu" ]
ghorpade.m@husky.neu.edu
9817500c0545ab0daf64477987fe4a20e4b9a336
7a7b9321474ac33ed060f45d9e7ca8cae625b94e
/src/test/java/org/hibernate/orm/persister/common/spi/AbstractTable.java
9bea7911a2118af40a2d28ed969e6c7a420b15f6
[ "Apache-2.0" ]
permissive
letaoli123/hibernate-semantic-query
46bec2ed3afc5e638d9d0bd5057ed12ec1629431
f6e2be44aa3837616cd2a630f6f76aea116cd9fa
refs/heads/main
2023-03-21T18:21:44.039557
2017-04-26T19:42:55
2017-04-26T19:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,158
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ package org.hibernate.orm.persister.common.spi; import java.util.Collection; import java.util.Map; import java.util.TreeMap; import org.hibernate.MappingException; /** * @author Steve Ebersole */ public abstract class AbstractTable implements Table { private final Map<String,Column> valueMap = new TreeMap<>( String.CASE_INSENSITIVE_ORDER ); public PhysicalColumn makeColumn(String name, int jdbcType) { if ( valueMap.containsKey( name ) ) { // assume it is a Column @SuppressWarnings("UnnecessaryLocalVariable") final PhysicalColumn existing = (PhysicalColumn) valueMap.get( name ); // todo : "type compatibility" checks would be nice return existing; } final PhysicalColumn column = new PhysicalColumn( this, name, jdbcType ); valueMap.put( name, column ); return column; } public DerivedColumn makeFormula(String expression, int jdbcType) { // for now, we use expression as registration key but that allows reuse of formula mappings, we may want to // force separate expressions in this case... final String registrationKey = expression; if ( valueMap.containsKey( registrationKey ) ) { // assume it is a Formula @SuppressWarnings("UnnecessaryLocalVariable") final DerivedColumn existing = (DerivedColumn) valueMap.get( registrationKey ); // todo : "type compatibility" checks would be nice return existing; } final DerivedColumn derivedColumn = new DerivedColumn( this, expression, jdbcType ); valueMap.put( registrationKey, derivedColumn ); return derivedColumn; } @Override public Column getColumn(String name) { final Column match = locateColumn( name ); if ( match == null ) { throw new MappingException( "Could not locate value : " + name ); } return match; } @Override public Column locateColumn(String name) { return valueMap.get( name ); } @Override public Collection<Column> getColumns() { return valueMap.values(); } }
[ "steve@hibernate.org" ]
steve@hibernate.org
e1d6b69c0150451adb91e761b9ad7bf5b147e7e1
196d992e509db2252cb42afe175f9da46d619b7a
/Observer/src/org/anmol/sample/Expenditure.java
021a7868a8432d4fb2430224babde91c8ccbe0fa
[]
no_license
GitHubChinese/master
8249e299aa472fba9d910a17a797f8f2f2d31d64
0a73df3fb7cdd7941e8a81e0a4030780bb600cba
refs/heads/master
2020-12-30T13:27:40.970069
2017-06-14T12:15:41
2017-06-14T12:15:41
91,213,633
1
0
null
null
null
null
UTF-8
Java
false
false
1,483
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 org.anmol.sample; import java.util.ArrayList; import java.util.List; /** * * @author ADEE */ public class Expenditure { private List<Member> members; private List<Observer> observers = new ArrayList<Observer>(); public List<Member> getMembers() { return members; } public void setMembers(List<Member> members) { this.members = members; } public List<Observer> getObservers() { return observers; } public void setObservers(List<Observer> observers) { this.observers = observers; } public void addObserver(Observer observer) { this.observers.add(observer); } public void addExpenditure(Member member, double spends) { Member memberFromList = members.get(members.indexOf(member)); double currentExpense = memberFromList.getExpenditure(); currentExpense = currentExpense + spends; memberFromList.setExpenditure(currentExpense); notifyAllObservers(); } public void notifyAllObservers() { observers.forEach(observer -> observer.update()); } public Double totalExpenses() { double sum = 0.0; for (Member member : members) { sum = sum + member.getExpenditure(); } return sum; } }
[ "18163132129@163.com" ]
18163132129@163.com
b98faec16f52a147db3db1fafbae6525ee275902
efce7d9697ffb75c9a97b55e6b98ace3f7943b39
/app/src/main/java/com/onewayit/veki/fragment/OngoingRequests.java
148f6f3947a374db4d45b958b1da51ddec445fd6
[]
no_license
Shekhar7860/vekiNew
f8a2d6c82d6715bba0a934dbe8eade71cd8f555b
e4b754f4e7b400852a62e950b3ddd6c47f71bd87
refs/heads/master
2020-07-07T10:13:15.193997
2019-08-20T07:18:56
2019-08-20T07:18:56
203,321,387
0
0
null
null
null
null
UTF-8
Java
false
false
9,579
java
package com.onewayit.veki.fragment; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import com.google.android.material.tabs.TabLayout; import com.loopj.android.http.BaseJsonHttpResponseHandler; import com.onewayit.veki.Adapters.OngoingRequestListAdapter; import com.onewayit.veki.GetterSetter.RequestsData; import com.onewayit.veki.Preferences.UserSessionPreferences; import com.onewayit.veki.R; import com.onewayit.veki.RestClient.RestClient; import com.onewayit.veki.utilities.GlobalClass; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; import cz.msebera.android.httpclient.Header; import cz.msebera.android.httpclient.entity.ByteArrayEntity; import cz.msebera.android.httpclient.message.BasicHeader; import pl.droidsonroids.gif.GifImageView; public class OngoingRequests extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; View view; ViewPager viewPager; TabLayout tabLayout; ListView lv_requests; RelativeLayout rl_loading; GifImageView gifnoresult; TextView tv_action; Context context; ArrayList<RequestsData> servicesList; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment view = inflater.inflate(R.layout.fragment_pending_requests, container, false); context = getActivity(); findViewById(); getMyServices(); return view; } private void findViewById() { lv_requests = view.findViewById(R.id.lv_requests); rl_loading = view.findViewById(R.id.rl_loading); gifnoresult = view.findViewById(R.id.gifnoresult); tv_action = view.findViewById(R.id.tv_action); servicesList = new ArrayList<>(); } public void startProgress() { lv_requests.setVisibility(View.GONE); rl_loading.setVisibility(View.VISIBLE); tv_action.setText("Loading pending requests.."); } public void closeProgress() { lv_requests.setVisibility(View.VISIBLE); rl_loading.setVisibility(View.GONE); // progressBarGIFDialog. } public void closeProgressNoResult() { lv_requests.setVisibility(View.GONE); rl_loading.setVisibility(View.GONE); gifnoresult.setImageResource(R.drawable.no_result_found); // progressBarGIFDialog. } private void getMyServices() { startProgress(); final GlobalClass globalClass = new GlobalClass(); globalClass.cancelProgressBarInterection(true, getActivity()); RestClient restClient = new RestClient(); final UserSessionPreferences sessionPreferences = new UserSessionPreferences(getActivity()); final String relativeUrl = "requests?user_id=" + sessionPreferences.getUserID(); ByteArrayEntity entity = null; //Log.e("password is=",encrptPass); List<Header> headers = new ArrayList<Header>(); headers.add(new BasicHeader("Authorization", sessionPreferences.getToken())); Log.e("Token and url", relativeUrl + " " + headers); restClient.getWithheader(getActivity(), relativeUrl, headers.toArray(new Header[headers.size()]), null, new BaseJsonHttpResponseHandler<JSONArray>() { @Override public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse, JSONArray response) { Log.e("response dekh", rawJsonResponse); globalClass.cancelProgressBarInterection(false, getActivity()); try { JSONObject object = new JSONObject(rawJsonResponse); if (object.getString("status").equalsIgnoreCase("Success")) { JSONArray requests_data = object.getJSONArray("data"); if (requests_data.length() == 0) { closeProgressNoResult(); } else if (requests_data.length() > 0) { for (int i = 0; i < requests_data.length(); i++) { JSONObject request = new JSONObject(String.valueOf(requests_data.get(i))); JSONObject serviceData = new JSONObject(request.getString("service")); if (request.getString("status").equalsIgnoreCase("1")) { RequestsData requestsData = new RequestsData(); requestsData.setLatitude(request.getString("latitude")); requestsData.setLongitude(request.getString("longitude")); requestsData.setAccepted_user_id(request.getString("accepted_user_id")); requestsData.setName(sessionPreferences.getUserFirstName()); requestsData.setEmail(sessionPreferences.getEmailId()); requestsData.setPhone(sessionPreferences.getMobile()); requestsData.setPhone(sessionPreferences.getMobile()); // requestsData.setAddress(request.getString("address")); requestsData.setId(request.getString("id")); requestsData.setServiceName(serviceData.getString("name")); requestsData.setMinServicePrice(request.getString("amount")); requestsData.setTimeAgo(String.valueOf(globalClass.getTimeDifference(request.getString("updated_at"))) + ""); requestsData.setNotes(request.getString("notes")); requestsData.setDistance(String.format("%.2f", globalClass.distance(Double.parseDouble(sessionPreferences.getLat()), Double.parseDouble(sessionPreferences.getLon()), Double.parseDouble(request.getString("latitude")), Double.parseDouble(request.getString("longitude")))) + " Km"); // requestsData.setDistance(request.getString("distance")); requestsData.setPhoto(sessionPreferences.getProfile_Status()); requestsData.setTag("request " + i); ArrayList<String> images = new ArrayList<>(); if (request.has("images")) { JSONArray imagesArray = request.getJSONArray("images"); for (int j = 0; j < imagesArray.length(); j++) { images.add(new JSONObject(String.valueOf(imagesArray.get(j))).getString("image")); } } requestsData.setImages(images); servicesList.add(requestsData); } } setAdapter(); } } else { closeProgressNoResult(); } } catch (JSONException e) { e.printStackTrace(); } } private void setAdapter() { if (servicesList.size() > 0) { OngoingRequestListAdapter requestsListAdapter = new OngoingRequestListAdapter(getActivity(), servicesList, getFragmentManager()); lv_requests.setAdapter(requestsListAdapter); closeProgress(); } else { closeProgressNoResult(); } } @Override public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonData, JSONArray errorResponse) { Toast.makeText(getActivity(), "Error while fetching requests...", Toast.LENGTH_SHORT).show(); globalClass.cancelProgressBarInterection(false, getActivity()); closeProgressNoResult(); } @Override protected JSONArray parseResponse(String rawJsonData, boolean isFailure) throws Throwable { return null; } }); } }
[ "shekharchugh8@gmail.com" ]
shekharchugh8@gmail.com
936db045a3521af7daf64188b8c5ba2ea0652370
8aadfd355bc7b47797ae26f98f7da0abcf04485b
/NewsFeedApp/NewsFeedApp/app/src/main/java/com/ahmedmakramallah/newsfeedapp/NewsAdapter.java
f3a23ccf910ee97393fe44301555c0d96ea4478e
[]
no_license
ahmedmakramallah/AndroidBasicsNanodegreeProgram
81ec66839e888acaab21eaa80440bccbd5b6639d
1a5481336fa5b9f34f23417392998972d061f033
refs/heads/master
2020-03-27T23:44:43.278767
2018-09-04T13:10:36
2018-09-04T13:10:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,619
java
package com.ahmedmakramallah.newsfeedapp; import android.app.Activity; import android.content.Context; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.ArrayList; /** * Created by ahmed on 8/11/2017. */ public class NewsAdapter extends ArrayAdapter<NewsInfo> { public NewsAdapter(Activity context, ArrayList<NewsInfo> newslist) { super(context, 0, newslist); } @Override public View getView(int position, View convertView, ViewGroup parent) { View listItemView = convertView; if (listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate( R.layout.list_item, parent, false); } NewsInfo currentNews = getItem(position); TextView newsTitle = (TextView) listItemView.findViewById(R.id.news_title); newsTitle.setText(currentNews.getmTitle().toString()); TextView sectionName = (TextView) listItemView.findViewById(R.id.sectionName_title); sectionName.setText(currentNews.getmSectionName().toString()); TextView Description = (TextView) listItemView.findViewById(R.id.description); Description.setText(currentNews.getmSectionName()); TextView date = (TextView) listItemView.findViewById(R.id.date); date.setText(currentNews.getmDate()); return listItemView; } }
[ "ahmedmakramallah96@gmail.com" ]
ahmedmakramallah96@gmail.com
db3db478d22475f1a6a343ca89ad4f08f6efb47e
38bd1cf9e52ea23b43223d53d8139aad52bb1c70
/java/src/org/openqa/selenium/devtools/noop/NoOpCdpInfo.java
125c9297d2e50017f5436a0169c0656d9c60d725
[ "Apache-2.0" ]
permissive
SeleniumHQ/selenium
46d9553e3a45412a7540dd3f7d1f34be6ef42b1b
cc41a883b5138962c6b4408a0fdf4e932bd08071
refs/heads/trunk
2023-09-03T22:56:56.403484
2023-09-02T19:20:45
2023-09-02T19:20:45
7,613,257
30,383
9,671
Apache-2.0
2023-09-14T18:47:42
2013-01-14T21:40:56
Java
UTF-8
Java
false
false
1,008
java
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.openqa.selenium.devtools.noop; import org.openqa.selenium.devtools.CdpInfo; public class NoOpCdpInfo extends CdpInfo { public NoOpCdpInfo() { super(1, dt -> new NoOpDomains()); } }
[ "simon.m.stewart@gmail.com" ]
simon.m.stewart@gmail.com
9b1bbb7975413c12e0d2a40172339a41052bb266
e56bbf549444fd0c5f64df3712411652e5a61d44
/Web_Spring/5_Spring_IOC/src/main/java/tv/step1/TV.java
300e6c32e257362d05583891b302d4164bcbf6da
[]
no_license
youngseo9478/Web
98cbeaf39768ba0fa722e39d124b3d209f9a6ac7
79962e2c3a52ed0a151ab96a81b858458c6d0e49
refs/heads/master
2020-03-30T09:13:55.141823
2018-10-01T10:38:45
2018-10-01T10:38:45
151,066,754
0
0
null
null
null
null
UTF-8
Java
false
false
45
java
package tv.step1; public interface TV { }
[ "youngseo9478@gmail.com" ]
youngseo9478@gmail.com
ec64395743deeb8f95241ee98ee40d67ba03150d
783839dcae0d2f1bdbab3b1d345f69ca00a14e5a
/lab05-lifecycle/src/test/java/Test.java
8b9e5deb7a7f5d1065ae1fcf8b4fc4829ccf0203
[]
no_license
zzmxg1208/springlab
c60070bbffc6e5bba061a5c91964e71ba3110955
5d342a3d9dc6a8c61149983cc978714948527ce2
refs/heads/main
2023-01-30T20:03:35.048047
2020-12-15T06:43:55
2020-12-15T06:43:55
319,310,072
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
import com.example.spring.lab.Account; import com.example.spring.lab.SpringConfi; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** * Created by zzhang4 on 2020/12/14 */ public class Test { @org.junit.Test public void testCase(){ AnnotationConfigApplicationContext ctxt = new AnnotationConfigApplicationContext(SpringConfi.class); Account account = (Account) ctxt.getBean("acct5.1"); account.setId(999); Account account2 = (Account) ctxt.getBean("acct5.1"); System.out.println(account); System.out.println(account2); ctxt.close(); } }
[ "zzhang@paypal.com" ]
zzhang@paypal.com
7223abadf6fb78603d74da5c63ee1e240765ccce
ad14003fa3c3dcc4f80c027588f01d12776e13a2
/app/src/main/java/com/example/webrtc/android/ConnectActivity.java
d41f20369cdda1fb9eddc70c5a8e6ff156bee727
[ "BSD-3-Clause" ]
permissive
skennetho/WebRTCPratice
a7da7c88ff01df310cea616cb07a7a485814a4fd
fe4abc63131ee11cecff1235f5e312d4f397f1ed
refs/heads/master
2022-11-30T03:07:46.240647
2020-08-07T05:29:41
2020-08-07T05:29:41
283,733,465
0
0
null
null
null
null
UTF-8
Java
false
false
33,414
java
package com.example.webrtc.android; import android.Manifest; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.ContextMenu; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.EditorInfo; import android.webkit.URLUtil; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import org.appspot.apprtc.ui.SettingsActivity; import org.json.JSONArray; import org.json.JSONException; import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; import java.util.Enumeration; import java.util.Random; //import android.support.v4.app.ActivityCompat; //import android.support.v7.app.AppCompatActivity; /** * Handles the initial setup where the user selects which room to join. * <p> * - 영상통화 하기 전 preference.xml에서 저장된 여러가지 많은 설정들(오디오, 비디오 등)과, EditText를 통해 입력한 방이름 등의 정보들을 CallActivity로 보내기 위한 클래스. */ public class ConnectActivity extends AppCompatActivity { private static final String TAG = "ConnectActivity"; private static final int CONNECTION_REQUEST = 1; private static final int REMOVE_FAVORITE_INDEX = 0; private static boolean commandLineRun = false; private TextView tvIP; private ImageButton addFavoriteButton; private EditText roomEditText; private ListView roomListView; private SharedPreferences sharedPref; private String keyprefResolution; private String keyprefFps; private String keyprefVideoBitrateType; private String keyprefVideoBitrateValue; private String keyprefAudioBitrateType; private String keyprefAudioBitrateValue; private String keyprefRoomServerUrl; private String keyprefRoom; private String keyprefRoomList; private ArrayList<String> roomList; private ArrayAdapter<String> adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get setting keys. PreferenceManager.setDefaultValues(this, org.appspot.apprtc.R.xml.preferences, false); sharedPref = PreferenceManager.getDefaultSharedPreferences(this); keyprefResolution = getString(org.appspot.apprtc.R.string.pref_resolution_key); keyprefFps = getString(org.appspot.apprtc.R.string.pref_fps_key); keyprefVideoBitrateType = getString(org.appspot.apprtc.R.string.pref_maxvideobitrate_key); keyprefVideoBitrateValue = getString(org.appspot.apprtc.R.string.pref_maxvideobitratevalue_key); keyprefAudioBitrateType = getString(org.appspot.apprtc.R.string.pref_startaudiobitrate_key); keyprefAudioBitrateValue = getString(org.appspot.apprtc.R.string.pref_startaudiobitratevalue_key); keyprefRoomServerUrl = getString(org.appspot.apprtc.R.string.pref_room_server_url_key); keyprefRoom = getString(org.appspot.apprtc.R.string.pref_room_key); keyprefRoomList = getString(org.appspot.apprtc.R.string.pref_room_list_key); setContentView(R.layout.activity_connect); roomEditText = findViewById(R.id.room_edittext); roomEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_DONE) { addFavoriteButton.performClick(); return true; } return false; } }); roomEditText.requestFocus(); tvIP = findViewById(R.id.tvIP); roomListView = findViewById(R.id.room_listview); roomListView.setEmptyView(findViewById(android.R.id.empty)); roomListView.setOnItemClickListener(roomListClickListener); registerForContextMenu(roomListView); ImageButton connectButton = findViewById(R.id.connect_button); connectButton.setOnClickListener(connectListener); addFavoriteButton = findViewById(R.id.add_favorite_button); addFavoriteButton.setOnClickListener(addFavoriteListener); // If an implicit VIEW intent is launching the app, go directly to that URL. final Intent intent = getIntent(); if ("android.intent.action.VIEW".equals(intent.getAction()) && !commandLineRun) { boolean loopback = intent.getBooleanExtra(CallActivity.EXTRA_LOOPBACK, false); int runTimeMs = intent.getIntExtra(CallActivity.EXTRA_RUNTIME, 0); boolean useValuesFromIntent = intent.getBooleanExtra(CallActivity.EXTRA_USE_VALUES_FROM_INTENT, false); String room = sharedPref.getString(keyprefRoom, ""); connectToRoom(room, true, loopback, useValuesFromIntent, runTimeMs); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.connect_menu, menu); return true; } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { if (v.getId() == R.id.room_listview) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo; menu.setHeaderTitle(roomList.get(info.position)); String[] menuItems = getResources().getStringArray(org.appspot.apprtc.R.array.roomListContextMenu); for (int i = 0; i < menuItems.length; i++) { menu.add(Menu.NONE, i, i, menuItems[i]); } } else { super.onCreateContextMenu(menu, v, menuInfo); } } @Override public boolean onContextItemSelected(MenuItem item) { if (item.getItemId() == REMOVE_FAVORITE_INDEX) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); roomList.remove(info.position); adapter.notifyDataSetChanged(); return true; } return super.onContextItemSelected(item); } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle presses on the action bar items. if (item.getItemId() == R.id.action_settings) { Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); return true; } else if (item.getItemId() == R.id.action_loopback) { connectToRoom(null, false, true, false, 0); return true; } else { return super.onOptionsItemSelected(item); } } @Override public void onPause() { super.onPause(); String room = roomEditText.getText().toString(); String roomListJson = new JSONArray(roomList).toString(); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(keyprefRoom, room); editor.putString(keyprefRoomList, roomListJson); editor.commit(); } @Override public void onResume() { super.onResume(); String room = sharedPref.getString(keyprefRoom, ""); roomEditText.setText(room); roomList = new ArrayList<>(); String roomListJson = sharedPref.getString(keyprefRoomList, null); if (roomListJson != null) { try { JSONArray jsonArray = new JSONArray(roomListJson); for (int i = 0; i < jsonArray.length(); i++) { roomList.add(jsonArray.get(i).toString()); } } catch (JSONException e) { Log.e(TAG, "Failed to load room list: " + e.toString()); } } adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, roomList); roomListView.setAdapter(adapter); if (adapter.getCount() > 0) { roomListView.requestFocus(); roomListView.setItemChecked(0, true); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == CONNECTION_REQUEST && commandLineRun) { Log.d(TAG, "Return: " + resultCode); setResult(resultCode); commandLineRun = false; finish(); } } /** * Get a value from the shared preference or from the intent, if it does not * exist the default is used. */ private String sharedPrefGetString( int attributeId, String intentName, int defaultId, boolean useFromIntent) { String defaultValue = getString(defaultId); if (useFromIntent) { String value = getIntent().getStringExtra(intentName); if (value != null) { return value; } return defaultValue; } else { String attributeName = getString(attributeId); return sharedPref.getString(attributeName, defaultValue); } } /** * Get a value from the shared preference or from the intent, if it does not * exist the default is used. */ private boolean sharedPrefGetBoolean( int attributeId, String intentName, int defaultId, boolean useFromIntent) { boolean defaultValue = Boolean.parseBoolean(getString(defaultId)); if (useFromIntent) { return getIntent().getBooleanExtra(intentName, defaultValue); } else { String attributeName = getString(attributeId); return sharedPref.getBoolean(attributeName, defaultValue); } } /** * Get a value from the shared preference or from the intent, if it does not * exist the default is used. */ private int sharedPrefGetInteger( int attributeId, String intentName, int defaultId, boolean useFromIntent) { String defaultString = getString(defaultId); int defaultValue = Integer.parseInt(defaultString); if (useFromIntent) { return getIntent().getIntExtra(intentName, defaultValue); } else { String attributeName = getString(attributeId); String value = sharedPref.getString(attributeName, defaultString); try { return Integer.parseInt(value); } catch (NumberFormatException e) { Log.e(TAG, "Wrong setting for: " + attributeName + ":" + value); return defaultValue; } } } //연결작업을 하는부분 @SuppressWarnings("StringSplitter") private void connectToRoom(String roomId, boolean commandLineRun, boolean loopback, boolean useValuesFromIntent, int runTimeMs) { ConnectActivity.commandLineRun = commandLineRun; // roomId is random for loopback. if (loopback) { roomId = Integer.toString((new Random()).nextInt(100000000)); } String roomUrl = sharedPref.getString( keyprefRoomServerUrl, getString(org.appspot.apprtc.R.string.pref_room_server_url_default)); // Video call enabled flag. boolean videoCallEnabled = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_videocall_key, CallActivity.EXTRA_VIDEO_CALL, org.appspot.apprtc.R.string.pref_videocall_default, useValuesFromIntent); // Use screencapture option. boolean useScreencapture = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_screencapture_key, CallActivity.EXTRA_SCREENCAPTURE, org.appspot.apprtc.R.string.pref_screencapture_default, useValuesFromIntent); // Use Camera2 option. boolean useCamera2 = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_camera2_key, CallActivity.EXTRA_CAMERA2, org.appspot.apprtc.R.string.pref_camera2_default, useValuesFromIntent); // Get default codecs. String videoCodec = sharedPrefGetString(org.appspot.apprtc.R.string.pref_videocodec_key, CallActivity.EXTRA_VIDEOCODEC, org.appspot.apprtc.R.string.pref_videocodec_default, useValuesFromIntent); String audioCodec = sharedPrefGetString(org.appspot.apprtc.R.string.pref_audiocodec_key, CallActivity.EXTRA_AUDIOCODEC, org.appspot.apprtc.R.string.pref_audiocodec_default, useValuesFromIntent); // Check HW codec flag. boolean hwCodec = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_hwcodec_key, CallActivity.EXTRA_HWCODEC_ENABLED, org.appspot.apprtc.R.string.pref_hwcodec_default, useValuesFromIntent); // Check Capture to texture. boolean captureToTexture = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_capturetotexture_key, CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, org.appspot.apprtc.R.string.pref_capturetotexture_default, useValuesFromIntent); // Check FlexFEC. boolean flexfecEnabled = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_flexfec_key, CallActivity.EXTRA_FLEXFEC_ENABLED, org.appspot.apprtc.R.string.pref_flexfec_default, useValuesFromIntent); // Check Disable Audio Processing flag. boolean noAudioProcessing = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_noaudioprocessing_key, CallActivity.EXTRA_NOAUDIOPROCESSING_ENABLED, org.appspot.apprtc.R.string.pref_noaudioprocessing_default, useValuesFromIntent); boolean aecDump = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_aecdump_key, CallActivity.EXTRA_AECDUMP_ENABLED, org.appspot.apprtc.R.string.pref_aecdump_default, useValuesFromIntent); boolean saveInputAudioToFile = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_enable_save_input_audio_to_file_key, CallActivity.EXTRA_SAVE_INPUT_AUDIO_TO_FILE_ENABLED, org.appspot.apprtc.R.string.pref_enable_save_input_audio_to_file_default, useValuesFromIntent); // Check OpenSL ES enabled flag. boolean useOpenSLES = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_opensles_key, CallActivity.EXTRA_OPENSLES_ENABLED, org.appspot.apprtc.R.string.pref_opensles_default, useValuesFromIntent); // Check Disable built-in AEC flag. boolean disableBuiltInAEC = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_disable_built_in_aec_key, CallActivity.EXTRA_DISABLE_BUILT_IN_AEC, org.appspot.apprtc.R.string.pref_disable_built_in_aec_default, useValuesFromIntent); // Check Disable built-in AGC flag. boolean disableBuiltInAGC = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_disable_built_in_agc_key, CallActivity.EXTRA_DISABLE_BUILT_IN_AGC, org.appspot.apprtc.R.string.pref_disable_built_in_agc_default, useValuesFromIntent); // Check Disable built-in NS flag. boolean disableBuiltInNS = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_disable_built_in_ns_key, CallActivity.EXTRA_DISABLE_BUILT_IN_NS, org.appspot.apprtc.R.string.pref_disable_built_in_ns_default, useValuesFromIntent); // Check Disable gain control boolean disableWebRtcAGCAndHPF = sharedPrefGetBoolean( org.appspot.apprtc.R.string.pref_disable_webrtc_agc_and_hpf_key, CallActivity.EXTRA_DISABLE_WEBRTC_AGC_AND_HPF, org.appspot.apprtc.R.string.pref_disable_webrtc_agc_and_hpf_key, useValuesFromIntent); // Get video resolution from settings. int videoWidth = 0; int videoHeight = 0; if (useValuesFromIntent) { videoWidth = getIntent().getIntExtra(CallActivity.EXTRA_VIDEO_WIDTH, 0); videoHeight = getIntent().getIntExtra(CallActivity.EXTRA_VIDEO_HEIGHT, 0); } if (videoWidth == 0 && videoHeight == 0) { String resolution = sharedPref.getString(keyprefResolution, getString(org.appspot.apprtc.R.string.pref_resolution_default)); String[] dimensions = resolution.split("[ x]+"); if (dimensions.length == 2) { try { videoWidth = Integer.parseInt(dimensions[0]); videoHeight = Integer.parseInt(dimensions[1]); } catch (NumberFormatException e) { videoWidth = 0; videoHeight = 0; Log.e(TAG, "Wrong video resolution setting: " + resolution); } } } // Get camera fps from settings. int cameraFps = 0; if (useValuesFromIntent) { cameraFps = getIntent().getIntExtra(CallActivity.EXTRA_VIDEO_FPS, 0); } if (cameraFps == 0) { String fps = sharedPref.getString(keyprefFps, getString(org.appspot.apprtc.R.string.pref_fps_default)); String[] fpsValues = fps.split("[ x]+"); if (fpsValues.length == 2) { try { cameraFps = Integer.parseInt(fpsValues[0]); } catch (NumberFormatException e) { cameraFps = 0; Log.e(TAG, "Wrong camera fps setting: " + fps); } } } // Check capture quality slider flag. boolean captureQualitySlider = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_capturequalityslider_key, CallActivity.EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED, org.appspot.apprtc.R.string.pref_capturequalityslider_default, useValuesFromIntent); // Get video and audio start bitrate. int videoStartBitrate = 0; if (useValuesFromIntent) { videoStartBitrate = getIntent().getIntExtra(CallActivity.EXTRA_VIDEO_BITRATE, 0); } if (videoStartBitrate == 0) { String bitrateTypeDefault = getString(org.appspot.apprtc.R.string.pref_maxvideobitrate_default); String bitrateType = sharedPref.getString(keyprefVideoBitrateType, bitrateTypeDefault); if (!bitrateType.equals(bitrateTypeDefault)) { String bitrateValue = sharedPref.getString( keyprefVideoBitrateValue, getString(org.appspot.apprtc.R.string.pref_maxvideobitratevalue_default)); videoStartBitrate = Integer.parseInt(bitrateValue); } } int audioStartBitrate = 0; if (useValuesFromIntent) { audioStartBitrate = getIntent().getIntExtra(CallActivity.EXTRA_AUDIO_BITRATE, 0); } if (audioStartBitrate == 0) { String bitrateTypeDefault = getString(org.appspot.apprtc.R.string.pref_startaudiobitrate_default); String bitrateType = sharedPref.getString(keyprefAudioBitrateType, bitrateTypeDefault); if (!bitrateType.equals(bitrateTypeDefault)) { String bitrateValue = sharedPref.getString( keyprefAudioBitrateValue, getString(org.appspot.apprtc.R.string.pref_startaudiobitratevalue_default)); audioStartBitrate = Integer.parseInt(bitrateValue); } } // Check statistics display option. boolean displayHud = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_displayhud_key, CallActivity.EXTRA_DISPLAY_HUD, org.appspot.apprtc.R.string.pref_displayhud_default, useValuesFromIntent); boolean tracing = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_tracing_key, CallActivity.EXTRA_TRACING, org.appspot.apprtc.R.string.pref_tracing_default, useValuesFromIntent); // Check Enable RtcEventLog. boolean rtcEventLogEnabled = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_enable_rtceventlog_key, CallActivity.EXTRA_ENABLE_RTCEVENTLOG, org.appspot.apprtc.R.string.pref_enable_rtceventlog_default, useValuesFromIntent); boolean useLegacyAudioDevice = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_use_legacy_audio_device_key, CallActivity.EXTRA_USE_LEGACY_AUDIO_DEVICE, org.appspot.apprtc.R.string.pref_use_legacy_audio_device_default, useValuesFromIntent); // Get datachannel options boolean dataChannelEnabled = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_enable_datachannel_key, CallActivity.EXTRA_DATA_CHANNEL_ENABLED, org.appspot.apprtc.R.string.pref_enable_datachannel_default, useValuesFromIntent); boolean ordered = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_ordered_key, CallActivity.EXTRA_ORDERED, org.appspot.apprtc.R.string.pref_ordered_default, useValuesFromIntent); boolean negotiated = sharedPrefGetBoolean(org.appspot.apprtc.R.string.pref_negotiated_key, CallActivity.EXTRA_NEGOTIATED, org.appspot.apprtc.R.string.pref_negotiated_default, useValuesFromIntent); int maxRetrMs = sharedPrefGetInteger(org.appspot.apprtc.R.string.pref_max_retransmit_time_ms_key, CallActivity.EXTRA_MAX_RETRANSMITS_MS, org.appspot.apprtc.R.string.pref_max_retransmit_time_ms_default, useValuesFromIntent); int maxRetr = sharedPrefGetInteger(org.appspot.apprtc.R.string.pref_max_retransmits_key, CallActivity.EXTRA_MAX_RETRANSMITS, org.appspot.apprtc.R.string.pref_max_retransmits_default, useValuesFromIntent); int id = sharedPrefGetInteger(org.appspot.apprtc.R.string.pref_data_id_key, CallActivity.EXTRA_ID, org.appspot.apprtc.R.string.pref_data_id_default, useValuesFromIntent); String protocol = sharedPrefGetString(org.appspot.apprtc.R.string.pref_data_protocol_key, CallActivity.EXTRA_PROTOCOL, org.appspot.apprtc.R.string.pref_data_protocol_default, useValuesFromIntent); // Start AppRTCMobile activity. Log.d(TAG, "Connecting to room " + roomId + " at URL " + roomUrl); if (validateUrl(roomUrl)) { Uri uri = Uri.parse(roomUrl); Intent intent = new Intent(this, CallActivity.class); intent.setData(uri); intent.putExtra(CallActivity.EXTRA_ROOMID, roomId); intent.putExtra(CallActivity.EXTRA_LOOPBACK, loopback); intent.putExtra(CallActivity.EXTRA_VIDEO_CALL, videoCallEnabled); intent.putExtra(CallActivity.EXTRA_SCREENCAPTURE, useScreencapture); intent.putExtra(CallActivity.EXTRA_CAMERA2, useCamera2); intent.putExtra(CallActivity.EXTRA_VIDEO_WIDTH, videoWidth); intent.putExtra(CallActivity.EXTRA_VIDEO_HEIGHT, videoHeight); intent.putExtra(CallActivity.EXTRA_VIDEO_FPS, cameraFps); intent.putExtra(CallActivity.EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED, captureQualitySlider); intent.putExtra(CallActivity.EXTRA_VIDEO_BITRATE, videoStartBitrate); intent.putExtra(CallActivity.EXTRA_VIDEOCODEC, videoCodec); intent.putExtra(CallActivity.EXTRA_HWCODEC_ENABLED, hwCodec); intent.putExtra(CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, captureToTexture); intent.putExtra(CallActivity.EXTRA_FLEXFEC_ENABLED, flexfecEnabled); intent.putExtra(CallActivity.EXTRA_NOAUDIOPROCESSING_ENABLED, noAudioProcessing); intent.putExtra(CallActivity.EXTRA_AECDUMP_ENABLED, aecDump); intent.putExtra(CallActivity.EXTRA_SAVE_INPUT_AUDIO_TO_FILE_ENABLED, saveInputAudioToFile); intent.putExtra(CallActivity.EXTRA_OPENSLES_ENABLED, useOpenSLES); intent.putExtra(CallActivity.EXTRA_DISABLE_BUILT_IN_AEC, disableBuiltInAEC); intent.putExtra(CallActivity.EXTRA_DISABLE_BUILT_IN_AGC, disableBuiltInAGC); intent.putExtra(CallActivity.EXTRA_DISABLE_BUILT_IN_NS, disableBuiltInNS); intent.putExtra(CallActivity.EXTRA_DISABLE_WEBRTC_AGC_AND_HPF, disableWebRtcAGCAndHPF); intent.putExtra(CallActivity.EXTRA_AUDIO_BITRATE, audioStartBitrate); intent.putExtra(CallActivity.EXTRA_AUDIOCODEC, audioCodec); intent.putExtra(CallActivity.EXTRA_DISPLAY_HUD, displayHud); intent.putExtra(CallActivity.EXTRA_TRACING, tracing); intent.putExtra(CallActivity.EXTRA_ENABLE_RTCEVENTLOG, rtcEventLogEnabled); intent.putExtra(CallActivity.EXTRA_CMDLINE, commandLineRun); intent.putExtra(CallActivity.EXTRA_RUNTIME, runTimeMs); intent.putExtra(CallActivity.EXTRA_USE_LEGACY_AUDIO_DEVICE, useLegacyAudioDevice); intent.putExtra(CallActivity.EXTRA_DATA_CHANNEL_ENABLED, dataChannelEnabled); if (dataChannelEnabled) { intent.putExtra(CallActivity.EXTRA_ORDERED, ordered); intent.putExtra(CallActivity.EXTRA_MAX_RETRANSMITS_MS, maxRetrMs); intent.putExtra(CallActivity.EXTRA_MAX_RETRANSMITS, maxRetr); intent.putExtra(CallActivity.EXTRA_PROTOCOL, protocol); intent.putExtra(CallActivity.EXTRA_NEGOTIATED, negotiated); intent.putExtra(CallActivity.EXTRA_ID, id); } if (useValuesFromIntent) { if (getIntent().hasExtra(CallActivity.EXTRA_VIDEO_FILE_AS_CAMERA)) { String videoFileAsCamera = getIntent().getStringExtra(CallActivity.EXTRA_VIDEO_FILE_AS_CAMERA); intent.putExtra(CallActivity.EXTRA_VIDEO_FILE_AS_CAMERA, videoFileAsCamera); } if (getIntent().hasExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE)) { String saveRemoteVideoToFile = getIntent().getStringExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE); intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE, saveRemoteVideoToFile); } if (getIntent().hasExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_WIDTH)) { int videoOutWidth = getIntent().getIntExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_WIDTH, 0); intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_WIDTH, videoOutWidth); } if (getIntent().hasExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT)) { int videoOutHeight = getIntent().getIntExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT, 0); intent.putExtra(CallActivity.EXTRA_SAVE_REMOTE_VIDEO_TO_FILE_HEIGHT, videoOutHeight); } } startCallActivity(intent); } } private static final String[] PERMISSIONS_START_CALL = {Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO};//WRITE_EXTERNAL_STORAGE, CAPTURE_VIDEO_OUTPUT private static final int PERMISSIONS_REQUEST_START_CALL = 101; private Intent startCallIntent; private void startCallActivity(Intent intent) { if (!hasPermissions(this, PERMISSIONS_START_CALL)) { startCallIntent = intent; ActivityCompat.requestPermissions(this, PERMISSIONS_START_CALL, PERMISSIONS_REQUEST_START_CALL); return; } startActivityForResult(intent, CONNECTION_REQUEST); } private static boolean hasPermissions(Context context, String... permissions) { if (context != null && permissions != null) { for (String permission : permissions) { if (ActivityCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) { return false; } } } return true; } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); switch (requestCode) { case PERMISSIONS_REQUEST_START_CALL: { if (hasPermissions(this, PERMISSIONS_START_CALL)) { // permission was granted, yay! if (startCallIntent != null) startActivityForResult(startCallIntent, CONNECTION_REQUEST); } else { Toast.makeText(this, "Required permissions denied.", Toast.LENGTH_LONG).show(); } return; } } } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); startCallIntent = savedInstanceState.getParcelable("startCallIntent"); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable("startCallIntent", startCallIntent); } private boolean validateUrl(String url) { if (URLUtil.isHttpsUrl(url) || URLUtil.isHttpUrl(url)) { return true; } new AlertDialog.Builder(this) .setTitle(getText(org.appspot.apprtc.R.string.invalid_url_title)) .setMessage(getString(org.appspot.apprtc.R.string.invalid_url_text, url)) .setCancelable(false) .setNeutralButton(org.appspot.apprtc.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }) .create() .show(); return false; } private final AdapterView.OnItemClickListener roomListClickListener = new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { String roomId = ((TextView) view).getText().toString(); connectToRoom(roomId, false, false, false, 0); } }; private final OnClickListener addFavoriteListener = new OnClickListener() { @Override public void onClick(View view) { String newRoom = roomEditText.getText().toString(); if (newRoom.length() > 0 && !roomList.contains(newRoom)) { adapter.add(newRoom); adapter.notifyDataSetChanged(); } } }; private final OnClickListener connectListener = new OnClickListener() { @Override public void onClick(View view) { connectToRoom(roomEditText.getText().toString(), false, false, false, 0); } }; public void GetIP(View v) throws SocketException { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); //네트워크 중에서 IP가 할당된 넘들에 대해서 뺑뺑이를 한 번 더 돕니다. for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) { InetAddress inetAddress = enumIpAddr.nextElement(); //네트워크에는 항상 Localhost 즉, 루프백(LoopBack)주소가 있으며, 우리가 원하는 것이 아닙니다. //IP는 IPv6와 IPv4가 있습니다. //IPv6의 형태 : fe80::64b9::c8dd:7003 //IPv4의 형태 : 123.234.123.123 //어떻게 나오는지는 찍어보세요. if(inetAddress.isLoopbackAddress()) { Log.i("IPAddress", intf.getDisplayName() + "(loopback) | " + inetAddress.getHostAddress()); } else { Log.i("IPAddress", intf.getDisplayName() + " | " + inetAddress.getHostAddress()); } //루프백이 아니고, IPv4가 맞다면 리턴~~~ if (!inetAddress.isLoopbackAddress() && (inetAddress instanceof Inet4Address )) { tvIP.setText(inetAddress.getHostAddress().toString()); return; }else{ if(inetAddress.isLoopbackAddress()) tvIP.setText("can't get : its loopBack"); else tvIP.setText("can't get IP"); } } } } }
[ "thrkd613@naver.com" ]
thrkd613@naver.com
f49f6f2be30e865d1d36f67c85465c2677da6673
cc811c1a30bd007e9e8f90ef0c4eca56d832de15
/src/main/java/com/demo/ch2/sec11/Test.java
aff301693012c42c33d01117f187d166d431e2b5
[]
no_license
sumajali/Java8ForReallyImpatient
3dfe2b86cda3e3e8d17358f9c5224df84cb351aa
29c2654de76f624f0a98d5bae80ad4850af95b4e
refs/heads/master
2021-09-24T03:38:28.902928
2018-10-02T19:32:49
2018-10-02T19:32:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,096
java
package com.demo.ch2.sec11; import com.demo.FileLocator; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; import static java.util.stream.Collectors.*; class City { private String name; private String state; private int population; public City(String name, String state, int population) { this.name = name; this.state = state; this.population = population; } public String getName() { return name; } public String getState() { return state; } public int getPopulation() { return population; } } public class Test { public static Stream<City> readCities(String filename) throws IOException { return Files.lines(Paths.get(filename)).map(l -> l.split(", ")).map(a -> new City(a[0], a[1], Integer.parseInt(a[2]))); } public static void main(String[] args) throws IOException { Stream<Locale> locales = Stream.of(Locale.getAvailableLocales()); Map<String, List<Locale>> countryToLocales = locales.collect( Collectors.groupingBy(Locale::getCountry)); System.out.println("Swiss locales: " + countryToLocales.get("CH")); locales = Stream.of(Locale.getAvailableLocales()); Map<Boolean, List<Locale>> englishAndOtherLocales = locales.collect( Collectors.partitioningBy(l -> l.getLanguage().equals("en"))); System.out.println("English locales: " + englishAndOtherLocales.get(true)); locales = Stream.of(Locale.getAvailableLocales()); Map<String, Set<Locale>> countryToLocaleSet = locales.collect( groupingBy(Locale::getCountry, toSet())); System.out.println("countryToLocaleSet: " + countryToLocaleSet); locales = Stream.of(Locale.getAvailableLocales()); Map<String, Long> countryToLocaleCounts = locales.collect( groupingBy(Locale::getCountry, counting())); System.out.println("countryToLocaleCounts: " + countryToLocaleCounts); Stream<City> cities = readCities(FileLocator.CITIES_TXT); Map<String, Integer> stateToCityPopulation = cities.collect( groupingBy(City::getState, summingInt(City::getPopulation))); System.out.println("stateToCityPopulation: " + stateToCityPopulation); cities = readCities(FileLocator.CITIES_TXT); Map<String, Optional<String>> stateToLongestCityName = cities.collect( groupingBy(City::getState, mapping(City::getName, maxBy(Comparator.comparing(String::length))))); System.out.println("stateToLongestCityName: " + stateToLongestCityName); locales = Stream.of(Locale.getAvailableLocales()); Map<String, Set<String>> countryToLanguages = locales.collect( groupingBy(l -> l.getDisplayCountry(), mapping(l -> l.getDisplayLanguage(), toSet()))); System.out.println("countryToLanguages: " + countryToLanguages); cities = readCities(FileLocator.CITIES_TXT); Map<String, IntSummaryStatistics> stateToCityPopulationSummary = cities.collect( groupingBy(City::getState, summarizingInt(City::getPopulation))); System.out.println(stateToCityPopulationSummary.get("NY")); cities = readCities(FileLocator.CITIES_TXT); Map<String, String> stateToCityNames = cities.collect( groupingBy(City::getState, reducing("", City::getName, (s, t) -> s.length() == 0 ? t : s + ", " + t))); cities = readCities(FileLocator.CITIES_TXT); stateToCityNames = cities.collect( groupingBy(City::getState, mapping(City::getName, joining(", ")))); System.out.println("stateToCityNames: " + stateToCityNames); } }
[ "nazar_lelyak@epam.com" ]
nazar_lelyak@epam.com
180f1fd1dc7539c94e4cce727850cba70b4c7db6
4d77d1b81d748560188e3f26a7585a03165a1d78
/app/src/main/java/com/erginus/klips/Adapter/ArtistsAdapter.java
727039a3fa8ba81d10c7a4452adb43bfcd459298
[]
no_license
AndroidGeek190/klips_android
99ce88aab4f41e8cfc476943065805fcc0c5687c
9f467c0d1ad16a5b3c12dca0c00e466e4c00a60c
refs/heads/master
2021-06-06T12:37:11.529410
2016-09-14T11:54:25
2016-09-14T11:54:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,905
java
package com.erginus.klips.Adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.erginus.klips.Model.ArtistModel; import com.erginus.klips.Model.SongsModel; import com.erginus.klips.R; import com.squareup.picasso.Picasso; import java.util.List; /** * Created by paramjeet on 8/9/15. */ public class ArtistsAdapter extends BaseAdapter { // Declare Variables private List<ArtistModel> list; private final Context context; public ArtistsAdapter(Context context, List<ArtistModel> list) { this.context = context; this.list=list; } @Override public int getCount() { return list.size(); } @Override public Object getItem(int position) { return list.get(position); } @Override public long getItemId(int position) { return list.indexOf(list.get(position)); } public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater; ImageView imageView; TextView textView_artist, text_albm; inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View itemView = inflater.inflate(R.layout.artists_item, parent, false); imageView=(ImageView)itemView.findViewById(R.id.image_product); textView_artist=(TextView)itemView.findViewById(R.id.textView_artist); text_albm=(TextView)itemView.findViewById(R.id.textView); textView_artist.setText(list.get(position).getName()); text_albm.setText(list.get(position).getDescription()); Picasso.with(context).load(list.get(position).getImage()).into(imageView); return itemView; } }
[ "paramjeet.1990.kaur@gmail.com" ]
paramjeet.1990.kaur@gmail.com
86d7e6577baf6f4a804b0d5afeaf4dc08fc7fcb6
050268660f3415d37666b23b1cce9aaf4c66f3ad
/JPA_Exercicio_NF/src/com/entidades/Produto.java
58e8318c858655615007223602707814be93409b
[]
no_license
DiegoLins10/ProdutoJPA_NF
7ec7e45c9913e56de7438e23f7ecc04a086d622a
ee18633d3c70f29d1a3afb0e4bacd301a4986c07
refs/heads/master
2023-04-03T15:27:36.414992
2021-04-16T13:57:36
2021-04-16T13:57:36
358,595,103
0
0
null
null
null
null
UTF-8
Java
false
false
985
java
package com.entidades; /* * @Author Diego Lins 16/04 * entidade produto */ import javax.persistence.Entity; import javax.persistence.Id; @Entity //CTRL + SHIFT + O importa todas as classe public class Produto { @Id private int id; private String nome; private float precoUnitario; public Produto() { } public Produto(int id, String nome, float precoUnitario) { super(); this.id = id; this.nome = nome; this.precoUnitario = precoUnitario; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public float getPrecoUnitario() { return precoUnitario; } public void setPrecoUnitario(float precoUnitario) { this.precoUnitario = precoUnitario; } @Override public String toString() { return "Produto [id=" + id + ", nome=" + nome + ", precoUnitario=" + precoUnitario + "]"; } }
[ "68483773+DiegoLins10@users.noreply.github.com" ]
68483773+DiegoLins10@users.noreply.github.com
05b024f7ff41940009457c46692e37cc27e4bd01
de05dff4cc5b8fb97dfbb857bad2394ed8f79ae4
/src/jd/controlling/reconnect/plugins/liveheader/recorder/Utils.java
fba3b27e7fd76ba129d18a05cebdbdad213f5e79
[]
no_license
thiagocrestani/jdownloader-service
3a6c4929b808eb596c66f156812310701f4508eb
2d24d86bb97a1e5f93feb474f688a6a289447553
refs/heads/master
2020-12-24T18:12:38.941947
2010-11-16T13:34:57
2010-11-16T13:34:57
35,786,842
0
0
null
null
null
null
UTF-8
Java
false
false
12,034
java
// jDownloader - Downloadmanager // Copyright (C) 2008 JD-Team support@jdownloader.org // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package jd.controlling.reconnect.plugins.liveheader.recorder; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.util.LinkedHashMap; import java.util.Vector; import java.util.Map.Entry; import java.util.regex.Pattern; import jd.config.Configuration; import jd.config.SubConfiguration; import jd.controlling.JDLogger; import jd.nutils.encoding.Encoding; import jd.parser.Regex; import jd.utils.JDHexUtils; import jd.utils.JDUtilities; public final class Utils { /** * Don't let anyone instantiate this class. */ private Utils() { } public static String readline(final BufferedInputStream in) { final StringBuilder data = new StringBuilder(""); int c; try { in.mark(1); if (in.read() == -1) return null; else in.reset(); while ((c = in.read()) >= 0) { if ((c == 0) || (c == 10) || (c == 13)) break; else data.append((char) c); } if (c == 13) { in.mark(1); if (in.read() != 10) { in.reset(); } } } catch (Exception e) { } return data.toString(); } public static ByteBuffer readheader(final InputStream in) { ByteBuffer bigbuffer = ByteBuffer.allocateDirect(4096); final byte[] minibuffer = new byte[1]; int position; int c; boolean complete = false; try { while ((c = in.read(minibuffer)) >= 0) { if (bigbuffer.remaining() < 1) { final ByteBuffer newbuffer = ByteBuffer.allocateDirect((bigbuffer.capacity() * 2)); bigbuffer.flip(); newbuffer.put(bigbuffer); bigbuffer = newbuffer; } if (c > 0) bigbuffer.put(minibuffer); if (bigbuffer.position() >= 4) { position = bigbuffer.position(); complete = bigbuffer.get(position - 4) == (byte) 13; complete &= bigbuffer.get(position - 3) == (byte) 10; complete &= bigbuffer.get(position - 2) == (byte) 13; complete &= bigbuffer.get(position - 1) == (byte) 10; if (complete) break; } } } catch (Exception e) { JDLogger.exception(e); } bigbuffer.flip(); return bigbuffer; } public static InputStream newInputStream(final ByteBuffer buf) { return new InputStream() { public synchronized int read() throws IOException { if (!buf.hasRemaining()) { return -1; } return buf.get(); } public synchronized int read(final byte[] bytes, final int off, int len) throws IOException { // Read only what's left if (!buf.hasRemaining()) { return -1; } len = Math.min(len, buf.remaining()); buf.get(bytes, off, len); return len; } }; } public static void createStep(LinkedHashMap<String, String> headers, String postdata, Vector<String> steps, boolean ishttps, boolean rawmode) { if (!new Regex(headers.get(null), ".*?\\.(gif|jpg|png|bmp|ico|css).*?").matches()) { String httpstrue = ""; String rawtrue = ""; if (ishttps) { httpstrue = " https=\"true\""; } if (rawmode) { rawtrue = " raw=\"true\""; } final StringBuilder hlh = new StringBuilder(); hlh.append(" [[[STEP]]]" + "\r\n"); hlh.append(" [[[REQUEST" + httpstrue + rawtrue + "]]]" + "\r\n"); if (rawmode == true) { for (final Entry<String, String> entry : headers.entrySet()) { final String key = entry.getKey(); /* * werden vom browser gesetzt */ if (key == null) { hlh.append(" " + headers.get(null) + "\r\n"); } else { if (key.equalsIgnoreCase("referer")) { continue; } if (key.equalsIgnoreCase("host")) { hlh.append(" Host: %%%routerip%%%" + "\r\n"); continue; } hlh.append(" " + key + ": " + entry.getValue() + "\r\n"); } } } else { hlh.append(" " + headers.get(null) + "\r\n"); hlh.append(" Host: %%%routerip%%%" + "\r\n"); if (headers.containsKey("authorization")) { String auth = new Regex(headers.get("authorization"), "Basic (.+)").getMatch(0); if (auth != null) ReconnectRecorder.AUTH = Encoding.Base64Decode(auth.trim()); hlh.append(" Authorization: Basic %%%basicauth%%%" + "\r\n"); } } if (headers.get(null).contains("POST") && postdata != null) { hlh.append("\r\n"); hlh.append(postdata.trim()); hlh.append("\r\n"); } hlh.append(" [[[/REQUEST]]]" + "\r\n"); hlh.append(" [[[/STEP]]]" + "\r\n"); steps.add(hlh.toString()); } } public static void rewriteLocationHeader(final ProxyThread instance) { String location = JDHexUtils.toString(new Regex(instance.buffer, Pattern.compile(JDHexUtils.getHexString("Location: ") + "(.*?)" + JDHexUtils.REGEX_HTTP_NEWLINE, Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)); if (location != null) { if (new Regex(location, "https?://(.*?)/?").getMatch(0) != null) { final String oldlocation = location; location = new Regex(location, "https?://.*?/(.+)", Pattern.DOTALL).getMatch(0); if (!oldlocation.startsWith("https")) { if (location != null) { location = "http://localhost:" + SubConfiguration.getConfig("ReconnectRecorder").getIntegerProperty(ReconnectRecorder.PROPERTY_PORT, 8972) + "/" + location; } else { location = "http://localhost:" + SubConfiguration.getConfig("ReconnectRecorder").getIntegerProperty(ReconnectRecorder.PROPERTY_PORT, 8972) + "/"; } } else { if (location != null) { location = "https://localhost:" + SubConfiguration.getConfig("ReconnectRecorder").getIntegerProperty(ReconnectRecorder.PROPERTY_PORT, 8972) + "/" + location; } else { location = "https://localhost:" + (SubConfiguration.getConfig("ReconnectRecorder").getIntegerProperty(ReconnectRecorder.PROPERTY_PORT, 8972) + 1) + "/"; } } instance.buffer = instance.buffer.replaceAll(JDHexUtils.getHexString("Location: " + oldlocation), JDHexUtils.getHexString("Location: " + location)); instance.renewbuffer = true; } } } public static void rewriteHostHeader(final ProxyThread instance) { String host = JDHexUtils.toString(new Regex(instance.buffer, Pattern.compile(JDHexUtils.getHexString("Host: ") + "(.*?)" + JDHexUtils.REGEX_HTTP_NEWLINE, Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)); if (host != null) { if (new Regex(host, "(.*?):?").getMatch(0) != null) { final String oldhost = host; host = JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null); instance.buffer = instance.buffer.replaceAll(JDHexUtils.getHexString("Host: " + oldhost), JDHexUtils.getHexString("Host: " + host)); instance.renewbuffer = true; } } } public static void rewriteConnectionHeader(final ProxyThread instance) { String con = JDHexUtils.toString(new Regex(instance.buffer, Pattern.compile(JDHexUtils.getHexString("Connection: ") + "(.*?)" + JDHexUtils.REGEX_HTTP_NEWLINE, Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)); if (con != null) { final String type = new Regex(con, "(.+)").getMatch(0); if (type != null && !type.equalsIgnoreCase("close")) { final String oldcon = con; con = "close"; instance.buffer = instance.buffer.replaceAll(JDHexUtils.getHexString("Connection: " + oldcon), JDHexUtils.getHexString("Connection: " + con)); instance.renewbuffer = true; } } } public static void rewriteRefererHeader(final ProxyThread instance) { String ref = JDHexUtils.toString(new Regex(instance.buffer, Pattern.compile(JDHexUtils.getHexString("Referer: ") + "(.*?)" + JDHexUtils.REGEX_HTTP_NEWLINE, Pattern.CASE_INSENSITIVE | Pattern.DOTALL)).getMatch(0)); if (ref != null) { if (new Regex(ref, "https?://(.*?)/?").getMatch(0) != null) { String oldref = ref; String ref2 = new Regex(ref, "https?://.*?/(.+)", Pattern.DOTALL).getMatch(0); if (!oldref.startsWith("https")) { if (ref2 != null) { ref = "http://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null) + "/" + ref2.trim(); } else { if (new Regex(ref, "https?://.*?/", Pattern.DOTALL).matches()) { ref = "http://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null) + "/"; } else { ref = "http://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null); } } } else { if (ref2 != null) { ref = "https://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null) + "/" + ref2.trim(); } else { if (new Regex(ref, "https?://.*?/", Pattern.DOTALL).matches()) { ref = "https://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null) + "/"; } else { ref = "https://" + JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_HTTPSEND_IP, null); } } } instance.buffer = instance.buffer.replaceAll(JDHexUtils.getHexString("Referer: " + oldref), JDHexUtils.getHexString("Referer: " + ref)); instance.renewbuffer = true; } } } }
[ "dpsenner@gmail.com" ]
dpsenner@gmail.com
370c7a7b8c1f518cc910d2a474b64e68fa5124e6
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces/tags/icefaces-1.7.2-SP1/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/layoutPanel/panelPositioned/PositionedPanelBean.java
36347c18b9dfc696b83c392e2dc954abcac7a3e0
[]
no_license
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
3,233
java
/* * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * "The contents of this file are subject to the Mozilla Public License * Version 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is ICEfaces 1.5 open source software code, released * November 5, 2006. The Initial Developer of the Original Code is ICEsoft * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C) * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved. * * Contributor(s): _____________________. * * Alternatively, the contents of this file may be used under the terms of * the GNU Lesser General Public License Version 2.1 or later (the "LGPL" * License), in which case the provisions of the LGPL License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the LGPL License and not to * allow others to use your version of this file under the MPL, indicate * your decision by deleting the provisions above and replace them with * the notice and other provisions required by the LGPL License. If you do * not delete the provisions above, a recipient may use your version of * this file under either the MPL or the LGPL License." * */ package org.icefaces.application.showcase.view.bean.examples.layoutPanel.panelPositioned; import com.icesoft.faces.component.panelpositioned.PanelPositionedEvent; import java.util.ArrayList; import java.util.List; import java.io.Serializable; /** * Simple bean which holds a list of objects which is manipulated by the * position panel */ public class PositionedPanelBean implements Serializable { private List people; public PositionedPanelBean() { // add some objects to the list people = new ArrayList(7); people.add(new PostionedPanelPerson("Mary Smith")); people.add(new PostionedPanelPerson("James Johnson")); people.add(new PostionedPanelPerson("Patricia Williams")); people.add(new PostionedPanelPerson("John Jones")); people.add(new PostionedPanelPerson("Linda Brown")); people.add(new PostionedPanelPerson("Robert Davis")); people.add(new PostionedPanelPerson("Barbara Miller")); resetRank(); } private void resetRank() { for (int i = 0; i < people.size(); i++) { ((PostionedPanelPerson) people.get(i)).setRank(i + 1); } } public void changed(PanelPositionedEvent evt) { resetRank(); if (evt.getOldIndex() >= 0) { ((PostionedPanelPerson) people.get( evt.getIndex())).getEffect().setFired(false); } } public List getPeople() { return people; } public void setPeople(List people) { this.people = people; } }
[ "ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
c8809ca9b2dca92b38dcf0fbd65a03663d3eb780
bf50a38870015ce95578801b18798528a90f8702
/src/datastructure/billpoon/linkedList/BAbstractList.java
59e1e78f2f4e4ec338628e06db7c4da209d5d3d8
[]
no_license
billpoon12138/JavaUtil
a3254327aff606035fb1c872a733ab2ec6f911e3
4e0cbb3919da0b41a84a90301137df5e953261d9
refs/heads/master
2020-05-27T18:05:01.531551
2017-04-06T16:18:55
2017-04-06T16:18:55
82,569,283
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package datastructure.billpoon.linkedList; public abstract class BAbstractList implements BList { public int size; @Override public void add(Object o) { // TODO Auto-generated method stub } @Override public void add(int index, Object o) { // TODO Auto-generated method stub } @Override public void clear() { // TODO Auto-generated method stub } @Override public boolean contains(Object o) { // TODO Auto-generated method stub return false; } @Override public Object get(int index) { // TODO Auto-generated method stub return null; } @Override public int indexOf(Object o) { // TODO Auto-generated method stub return 0; } @Override public boolean isEmpty() { // TODO Auto-generated method stub return false; } @Override public int lastIndexOf() { // TODO Auto-generated method stub return 0; } @Override public boolean remove(Object o) { // TODO Auto-generated method stub return false; } @Override public int size() { // TODO Auto-generated method stub return 0; } @Override public Object remove(int index) { // TODO Auto-generated method stub return null; } @Override public Object set(int index, Object o) { // TODO Auto-generated method stub return null; } }
[ "panquanbiao@gmail.com" ]
panquanbiao@gmail.com
e27f5eb6e5d523632c6fd93491fb0fe49eb0e0ba
87878284ef2714f72ff05061137fc12eccdf083f
/Semana2/Figura/src/figura/Triangulo.java
e5202c431b7e47ae3c4be070cb915d6271fe5ea4
[]
no_license
vanevrb/Java_275_52876
77aab6c89f14805772072c3b0d832d129fc207df
601bb18b911d360bf83e9b598867cd2e4d04e363
refs/heads/main
2023-07-26T09:32:53.848123
2021-09-08T14:57:11
2021-09-08T14:57:11
397,954,056
1
0
null
null
null
null
UTF-8
Java
false
false
504
java
package figura; public class Triangulo extends Figura { private double base; private double altura; public Triangulo(double base, double altura) { this.base = base; this.altura = altura; } @Override /* public void area() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }*/ public void area() { System.out.println("el area es" + base * altura); } }
[ "noreply@github.com" ]
noreply@github.com
3319f808ebe4c08849e43554bfde3dd277c509e3
5f53b1ea0bbb537188aa6110db524bc7f1926def
/header/src/main/java/org/zstack/header/vm/VmBeforeAttachL3NetworkExtensionPoint.java
68e3187a058d3ecb0d82c937ea0d92f7cca04132
[ "Apache-2.0" ]
permissive
dangpf/zstack
86293e2a5b479cf70c96a903c90523f29e41fd22
8db5d96d06f961d366c67c16394f4e4572c02115
refs/heads/master
2021-01-18T13:06:11.080079
2016-09-01T09:57:37
2016-09-01T09:58:40
56,648,736
1
0
null
2016-04-20T02:28:56
2016-04-20T02:28:55
null
UTF-8
Java
false
false
280
java
package org.zstack.header.vm; import org.zstack.header.network.l3.L3NetworkInventory; /** * Created by xing5 on 2016/4/18. */ public interface VmBeforeAttachL3NetworkExtensionPoint { void vmBeforeAttachL3Network(VmInstanceInventory vm, L3NetworkInventory l3); }
[ "xing5820@gmail.com" ]
xing5820@gmail.com
9bfb122571e0477890f499a8487125919d5ae2d8
c122c557ab008455d8570338d1516275064cf3c3
/src/com/service/OnPlayerEventListener.java
d7461ff70c162f6b861980b07e4e2cd2d3f910c1
[]
no_license
2586249084/SuperMusic
d9057ed8c317098ae52e63b8e8a701f34f35f1cb
9698021857377e0eca90dac3bb8ba7ba3db971f5
refs/heads/master
2020-03-26T22:04:11.846010
2018-12-10T10:16:36
2018-12-10T10:16:36
145,429,158
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package com.service; import com.model.Music; /** * 播放进度监听器 * Created by Mrzhang on 2018/12/10 */ public interface OnPlayerEventListener { /** * 切换音乐 * @param music 音乐 */ void onChange(Music music); /** * 继续播放 */ void onPlayerStart(); /** * 暂停播放 */ void onPlayerPause(); /** * 更新进度 * @param progress 进度 */ void onPublish(int progress); /** * 缓冲百分比 * @param percent 百分比 */ void onBufferingUpdate(int percent); }
[ "2586249084@qq.com" ]
2586249084@qq.com
5364ef731e5608a26f077b946dda583c9fe31db8
9bb14c87f3e8d9ce327484adbfcc2487b595ee2b
/ILighthouseInputListener.java
802bcfcda8db10dcee93e9e3d7321b0b28b6c339
[]
no_license
newminerM23/connect
9704eb3d2c995d2c6d4c9d3f4a1c020474f1b807
70f72b4aff7492ae0311eeb7fe7cb23b644fa0c0
refs/heads/master
2021-01-16T06:09:36.572687
2020-02-25T13:15:58
2020-02-25T13:15:58
243,003,429
0
0
null
null
null
null
UTF-8
Java
false
false
991
java
package Connect4; /** * This Interface provides the methods to get user input through the ProjektLighthouseAPI. * These methods are called from the Projekt Lighthouse receiving Thread! */ public interface ILighthouseInputListener { /** * This method is called when a keyboard button changes its state. * @param source a random number to identify the input device (multiple devices possible) * @param button the number associated with the button being pressed * @param down true if the button was pressed and false if it was released */ void keyboardEvent(int source, int button, boolean down); /** * This method is called when a controller button changes its state. * @param source a random number to identify the input device (multiple devices possible) * @param button the number associated with the button being pressed * @param down true if the button was pressed and false if it was released */ void controllerEvent(int source, int button, boolean down); }
[ "noreply@github.com" ]
noreply@github.com
9867045f2cbf0949c776e5f7d0cc8821faae825b
943b1fea59bd7594808c462a17ccb32b7e029e85
/src/main/java/com/swf/attence/entity/ImeetingMsg.java
48205c3854cc03299c09285149ea64e6a09fd25f
[]
no_license
lq460541033/meetting
13d1bfa59c0b364a78dc20bb294f8bba90a1a857
f47453235b8fc6c7792242c4967edf81110cf2a6
refs/heads/master
2022-06-13T20:03:20.600270
2020-05-06T12:35:15
2020-05-06T12:35:15
261,375,965
0
0
null
null
null
null
UTF-8
Java
false
false
2,382
java
package com.swf.attence.entity; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; /** * <p> * * </p> * * @author auto-genergator123 * @since 2019-03-31 */ @TableName("imeeting_msg") public class ImeetingMsg implements Serializable { private static final long serialVersionUID = 1L; private String id; /** * 报警时间 */ @TableField("imeeting_time") private String imeetingTime; /** * 报警来源:摄像头ip */ @TableField("imeeting_cameraid") private String imeetingCameraid; /** * 用户工号 */ @TableField("imeeting_userid") private String imeetingUserid; /** * 用户姓名 */ @TableField("imeeting_username") private String imeetingUsername; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getImeetingTime() { return imeetingTime; } public void setImeetingTime(String imeetingTime) { this.imeetingTime = imeetingTime; } public String getImeetingCameraid() { return imeetingCameraid; } public void setImeetingCameraid(String imeetingCameraid) { this.imeetingCameraid = imeetingCameraid; } public String getImeetingUserid() { return imeetingUserid; } public void setImeetingUserid(String imeetingUserid) { this.imeetingUserid = imeetingUserid; } public String getImeetingUsername() { return imeetingUsername; } public void setImeetingUsername(String imeetingUsername) { this.imeetingUsername = imeetingUsername; } public static final String ID = "id"; public static final String IMEETING_TIME = "imeeting_time"; public static final String IMEETING_CAMERAID = "imeeting_cameraid"; public static final String IMEETING_USERID = "imeeting_userid"; public static final String IMEETING_USERNAME = "imeeting_username"; @Override public String toString() { return "ImeetingMsg{" + ", id=" + id + ", imeetingTime=" + imeetingTime + ", imeetingCameraid=" + imeetingCameraid + ", imeetingUserid=" + imeetingUserid + ", imeetingUsername=" + imeetingUsername + "}"; } }
[ "luoqiang@efunong.com" ]
luoqiang@efunong.com
322cf693b1f7a580e0e034622aa8444b0ac0a22f
9d1121310b243150805fa05be7e848e37611a89f
/src/kata3/Histogram.java
1f3e6a1925d15ff34715b58d21f2ea9593a4823d
[]
no_license
ismaelromerorando/kata3
a5716dd2e9158983dab7873a9ce30f64e83c15f2
2e22179a25ec4a3ecc9877296eb61b851f1387af
refs/heads/master
2021-01-22T11:38:29.675358
2014-10-16T11:10:26
2014-10-16T11:10:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
261
java
package kata3; import java.util.HashMap; public class Histogram <Type> extends HashMap<Type, Integer>{ @Override public Integer get(Object key) { if (containsKey(key)) return super.get(key); return 0; } }
[ "usuario@10.22.143.32" ]
usuario@10.22.143.32
73149048f97b8ce2c8cc10962b98fb8e6edaeae3
d584cc48c864e6158d747b11a1743ae4157b031d
/src/Alogrithms4.java
e90bd9b2457f0f77770f6cf34c3e6ebcd7ee7390
[]
no_license
KenHoang16CDTH12/AlogrithmsVSJava
b605ce3158528889085394474e7dbf2152aeaa9f
c8d4aeed8264333a93ca25691224a51c8b521239
refs/heads/master
2021-05-16T00:58:48.624446
2017-10-20T02:42:43
2017-10-20T02:42:43
106,410,200
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
import java.util.Scanner; public class Alogrithms4 { public static void main(String[] args) { //System.out.println(pow(2, 3)); //System.out.println(result(2, 3)); Scanner sc = new Scanner(System.in); System.out.println("Import number"); int number = sc.nextInt(); int numberSum = sumSplitnumber(number); String result = checkDividesionThree(numberSum); System.out.println("Devide % 3 ?? " + result); } /** * pow */ public static double pow(int x, int number) { return number == 0 ? 1.0 : x * pow(x, number - 1); } /** * S= 1 - x +x^2- x^3+ … (-1)x^n */ public static double result(int x, int number) { double result = 0; for (int i = 0; i <= number; i++) { if (i % 2 == 0) result += pow(x, i); else result -= pow(x, i); } return result; } public static int sumSplitnumber(int number) { int result = 0; while (number > 0) { result += number % 10; number = number / 10; } return result; } public static String checkDividesionThree(int number) { return number % 3 == 0 ? "% 3 == 0" : "% 3 != 0"; } }
[ "hoang.duongminh0221@gmail.com" ]
hoang.duongminh0221@gmail.com
9a8bf1152aa657f4397e002943d7829391919521
829a35fadbe725cee6f45c8b39e627b622324a2b
/FullStackJavaProject/src/main/java/com/javaproject/ProjectmanagementApplication.java
39f2c54770427ae24cd28f50d3fc2849ea9db345
[]
no_license
SUBHAJIT8085/ProjectManagement
a9025ecb8dd03c315a3b75b7a72dbe83d5cbc084
11ff58d2ff58b05c4db7e06f2f7d73937c5fdb81
refs/heads/master
2022-09-20T12:51:54.322500
2020-05-26T06:28:23
2020-05-26T06:28:23
266,960,246
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.javaproject; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ProjectmanagementApplication { public static void main(String[] args) { SpringApplication.run(ProjectmanagementApplication.class, args); } }
[ "subhajit28061997@gmail.com" ]
subhajit28061997@gmail.com
675d3b7ebb28d12b69c6869cfe93823fa67d49df
c3231a67920709e690a986126dab40c9908e7103
/jflaplib-core/src/main/java/edu/duke/cs/jflap/automata/turing/AcceptanceFilter.java
47a8bd4adf4d8cd76af2a0729ef551e87a293c80
[ "MIT" ]
permissive
anfaas1618/jflap-lib
a5a5dba0f51f7840f6c79037ee2e8f50fc4e1221
729a974911924d14b2cb42635b4a5ab8982dd30c
refs/heads/master
2021-09-06T10:51:04.773015
2018-02-05T19:46:02
2018-02-05T19:46:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
/* * JFLAP - Formal Languages and Automata Package * * * Susan H. Rodger * Computer Science Department * Duke University * August 27, 2009 * Copyright (c) 2002-2009 * All rights reserved. * JFLAP is open source software. Please see the LICENSE for terms. * */ package edu.duke.cs.jflap.automata.turing; public interface AcceptanceFilter{ boolean accept(TMConfiguration tmc); String getName(); }
[ "pablo.rodriguez.mier@usc.es" ]
pablo.rodriguez.mier@usc.es
bd7ce08de6bad0d31e0e4b56f14c05fd82b2b8b1
b3c4872345554f30d8a546bba92012566827f6d2
/src/stoica/radu1087/simpleFactory/CuponGold.java
30e07910a35fd03c9c2ccdd9a5b233095bdd1b47
[]
no_license
radux18/CTS-m
423272ad09e3540652dad8ca799ea5b05eba67d7
5b156927edae247b956bbdbdecd3dc9c3d8e717a
refs/heads/master
2023-05-12T22:31:01.919683
2021-06-02T12:10:34
2021-06-02T12:10:34
344,450,575
0
0
null
2021-03-04T11:32:19
2021-03-04T11:27:13
Java
UTF-8
Java
false
false
240
java
package stoica.radu1087.simpleFactory; public class CuponGold extends CuponAbstract { public CuponGold(String denumire, double suma) { super(denumire, suma); } @Override public void setSuma(double suma) { } }
[ "radux18@yahoo.com" ]
radux18@yahoo.com
ddc25b842f4c243f01d86a42d412c65ac5a700b8
39f0eebfccc977023c6e9662d79bd65e8b70cb27
/src/test/Main.java
5e75e20fffa714f38390dbf62b88b2de2dd8ce74
[]
no_license
EgoVas95/TestTask
8bb8d8f5fa47ae2bffc1fdf68ad87f8c8f5934d2
ef5852678cf94d14d2fc692039b566d5d97b82ab
refs/heads/master
2020-04-08T16:41:02.359265
2018-12-06T18:54:23
2018-12-06T18:54:23
159,529,885
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package test; public class Main { static byte[] array = {0, 5, 10, 0, 11, 14, 13, 4, 11, 8, 8, 7, 1, 4, 12, 11 }; public static void main(String[] args) { // TODO Auto-generated method stub Cycle cycle = new Cycle(array); ReturnClass answer = cycle.findStepsAndLength(); System.out.println("Steps = " + answer.Steps); System.out.println("Cycle length = " + answer.Cycle_length); } }
[ "vasilyevegorandreevich120695@gmail.com" ]
vasilyevegorandreevich120695@gmail.com
3a7ce1b28834fc22a3ed93c664b14adf8d912971
c1b29ae46d02b46bffdb1e672006660ce15f0f01
/src/main/java/com/uchain/uvm/CallCreate.java
47e5e3fcd839808c57e5378d03daeab0571e6191
[]
no_license
UCHAIN-WORLD/uchain-core
47c1692d7290b7d030cd2fcae8a2c0781679777c
10feba7bcf8f8fe622826795bb1dc8cda75840c7
refs/heads/master
2020-03-28T10:33:37.796634
2019-02-22T07:00:38
2019-02-22T07:00:38
148,120,183
2
2
null
null
null
null
UTF-8
Java
false
false
250
java
package com.uchain.uvm; import lombok.AllArgsConstructor; import lombok.Getter; @AllArgsConstructor @Getter public class CallCreate { private byte[] data; private byte[] destination; private byte[] gasLimit; private byte[] value; }
[ "416841146@qq.com" ]
416841146@qq.com
16b2a60771d76b3b86b38e2f107d088f7a36c919
d704cf5cccfe0351769feb57078d9fe0fc713691
/ticketing/src/main/java/com/ticketing/web/rest/vm/LoggerVM.java
ad6b5e6894ce276133a20451a6454e939a1f9634
[]
no_license
hkarakose/user_projects
3f10a10bf8b4efca52f04561b54f91b00413d548
d67a3a0c66213a5f2884d97e4b35943dcdea04e9
refs/heads/master
2020-04-12T08:15:42.758847
2017-01-11T14:00:40
2017-01-11T14:00:40
62,990,448
0
0
null
null
null
null
UTF-8
Java
false
false
898
java
package com.ticketing.web.rest.vm; import ch.qos.logback.classic.Logger; import com.fasterxml.jackson.annotation.JsonCreator; /** * View Model object for storing a Logback logger. */ public class LoggerVM { private String name; private String level; public LoggerVM(Logger logger) { this.name = logger.getName(); this.level = logger.getEffectiveLevel().toString(); } @JsonCreator public LoggerVM() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } @Override public String toString() { return "LoggerVM{" + "name='" + name + '\'' + ", level='" + level + '\'' + '}'; } }
[ "halil.karakose@ericsson.com" ]
halil.karakose@ericsson.com
33e0ca9a373036e27c6b8db41e25a6ad8eab517f
1f21387f675bf1a6230887c77bff802af24034a3
/consumer-movie-feign/src/test/java/com/ikang/ConsumerMovieFeignApplicationTests.java
4e2c8fe6c7d8079472d404abb8dd312cc6ff8668
[]
no_license
suboyang2135/spring-cloud-leaning
daa385b899daa40cdba8df5a172ee5216bf20ea7
f55a672e537fa112208fe806996d45358eb09c9a
refs/heads/master
2020-05-27T15:52:08.912494
2019-06-17T02:39:21
2019-06-17T02:39:21
188,688,267
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.ikang; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ConsumerMovieFeignApplicationTests { @Test public void contextLoads() { } }
[ "yangxu@huangbaoche.com" ]
yangxu@huangbaoche.com
88b8abd0f9ecaa62b3b97dfbdc0e2afbd325a430
1579469cec2614b97668cc22aa4e94fbc728f49c
/src/main/java/me/draku/genesis/permissions/Role.java
fa1ec58319d1bddb56df94a503c9002b08cdaf10
[]
no_license
Stantu777/Api-Rest
e1b9a29f9b6eadc1ae8ddc24e848c05bf1178491
c674446bf50df1b83fa30288ff14686bb1309fbd
refs/heads/master
2020-03-30T00:33:34.578309
2018-09-18T00:37:09
2018-09-18T00:37:09
150,530,566
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package me.draku.genesis.permissions; public final class Role { private Integer id; private String name; public Role(Integer id, String name) { this.id = id; this.name = name; } public Integer getId() { return id; } public String getName() { return name; } }
[ "vladimir.ibazeta@gmail.com" ]
vladimir.ibazeta@gmail.com
0422f3e983827c4448f737cd4da824a9465d5b33
35a620858338f371c42a5c78139dc94b45cf087b
/src/OOAD/GuitarSpecs.java
2ed32543a9513d7191d2cd5a38df82d426bcc9d0
[]
no_license
XI1062-abhisheksinghal/CoreJava-Algo
ed9e7b747c83f4165ba852715bd94a444795bfb6
703290326e145288d13328f54265232bd15edffd
refs/heads/master
2023-05-25T21:08:03.152354
2023-05-20T08:19:01
2023-05-20T08:19:01
267,253,987
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package OOAD; public class GuitarSpecs { private int numString; private String build; private GuitarType type; GuitarSpecs(int numString,String build, GuitarType type){ this.numString= numString; this.build=build; this.type= type; } public boolean searchGuitar(GuitarSpecs g){ boolean result =false; if(g.build.equals(this.build)){ result = true; } return result; } }
[ "abhishek_singhal-GGN@external.mckinsey.com" ]
abhishek_singhal-GGN@external.mckinsey.com
b5a1271daa15b4a9131983da7ea8b2966c1034b9
1bc44143218ebe4bc3bb14f74d99c63d5a2d2ee0
/src/main/java/edu/university/resource/CourseResource.java
f80c4acd965a122bef856c4a491910d9c5dd04e0
[]
no_license
emrahyurtlu/university-rest-api
57ff639ea05efb8f907ca3fddf42f95173343d29
5fb41b31c1b8e152b7d5b4d48b3cc5c216976d61
refs/heads/master
2022-09-13T17:27:15.079175
2020-03-05T21:35:56
2020-03-05T21:35:56
244,039,416
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package edu.university.resource; import edu.university.entity.Course; import edu.university.repository.BaseRepoImpl; import edu.university.repository.CourseRepo; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("courses") @Produces(MediaType.APPLICATION_JSON) public class CourseResource extends BaseResourceImpl<Course> { protected CourseResource(BaseRepoImpl repo) { super(new CourseRepo()); } }
[ "emrahyurtlu@gmail.com" ]
emrahyurtlu@gmail.com
7ed513a5be5284e14a9caf19b2524e06a2191a3f
8c0ece2a91f55ecf7cae7544249ff892dc92e925
/_01_basic/src/main/java/com/quinn/dagger/basic/MainPresenter.java
553cec8d7e40741b72204983134f284cfad6c440
[]
no_license
Leaking/Dagger2Note
19b439a5751044aaa32b6237d491bdfe63cbcad9
2c0e38e66fe3d442168cd5c74e4997eab219e77e
refs/heads/master
2020-03-17T14:24:01.276560
2018-06-06T03:49:31
2018-06-06T03:49:31
133,670,482
1
0
null
null
null
null
UTF-8
Java
false
false
256
java
package com.quinn.dagger.basic; public class MainPresenter { private HttpUtils httpUtils; public MainPresenter(HttpUtils httpUtils) { this.httpUtils = httpUtils; } public void start(){ this.httpUtils.request(); } }
[ "chenhuazhaoao@gmail.com" ]
chenhuazhaoao@gmail.com
dc5a228bfa3a490ac418e2b4b16ec314655158e5
29716a31be33a1f5069d92814cf8175e48405a3b
/src/main/java/com/diogoneves/cursomc/domain/Cliente.java
1a279876fd7b1590f4378b9931310e5e03e5bf9e
[]
no_license
DiogoCastro/modelagemconceitual
d45677afc795d811e5c00567350c2abe039a12ba
5dbadb9a8f6be8fb3cdcd961b6cb2f83dff8b22d
refs/heads/master
2021-07-24T19:12:21.558766
2017-10-30T13:16:24
2017-10-30T13:16:24
106,453,614
0
0
null
null
null
null
UTF-8
Java
false
false
3,237
java
package com.diogoneves.cursomc.domain; import java.io.Serializable; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import com.diogoneves.cursomc.domain.enums.TipoCliente; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity public class Cliente implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String nome; @Column(unique=true) private String email; private String cpfCnpj; private Integer tipoCliente; @OneToMany(mappedBy="cliente", cascade=CascadeType.ALL) // Toda operação que modificar um cliente, vai poder refletir em cascata nos endereços private List<Endereco> enderecos = new ArrayList<>(); @ElementCollection @CollectionTable(name="telefone") private Set<String> telefones = new HashSet<>(); // Conjunto que não aceita repetição @JsonIgnore @OneToMany(mappedBy="cliente") private List<Pedido> pedidos = new ArrayList<>(); public Cliente() {} public Cliente(Integer id, String nome, String email, String cpfCnpj, TipoCliente tipoCliente) { super(); this.id = id; this.nome = nome; this.email = email; this.cpfCnpj = cpfCnpj; this.tipoCliente = (tipoCliente == null) ? null : tipoCliente.getCod(); } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getCpfCnpj() { return cpfCnpj; } public void setCpfCnpj(String cpfCnpj) { this.cpfCnpj = cpfCnpj; } public TipoCliente getTipoCliente() { return TipoCliente.toEnum(tipoCliente); } public void setTipoCliente(TipoCliente tipoCliente) { this.tipoCliente = tipoCliente.getCod(); } public List<Endereco> getEnderecos() { return enderecos; } public void setEnderecos(List<Endereco> enderecos) { this.enderecos = enderecos; } public Set<String> getTelefones() { return telefones; } public void setTelefones(Set<String> telefones) { this.telefones = telefones; } public List<Pedido> getPedidos() { return pedidos; } public void setPedidos(List<Pedido> pedidos) { this.pedidos = pedidos; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cliente other = (Cliente) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "diogooncastro1@gmail.com" ]
diogooncastro1@gmail.com
651c339182ffb20539b5a2af0a9d00150a5bfd58
86f41be144f47b8446f781538ac57f703d3dce56
/src/main/java/com/epam/task9spring/repository/RealEstateRepository.java
092b312cf5510c1ce0c5b14edb507ab598b66cbb
[]
no_license
DmitriyD1985/task9Spring
f3c41f81df66d754e9da873e4e9a144967aa1025
5f2add8842030ef5fbe3a08f13aa3546e3080014
refs/heads/master
2023-04-27T07:19:00.914478
2021-05-11T04:06:28
2021-05-11T04:06:28
360,028,448
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
package com.epam.task9spring.repository; import com.epam.task9spring.model.RealEstate; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface RealEstateRepository extends JpaRepository<RealEstate, Long> { Optional<RealEstate> findByName(String name); }
[ "Torpedro1985@gmail.com" ]
Torpedro1985@gmail.com
21ad20049917d46191a2eab0a86d81ee198e62a5
13bce41f5b13fa29685704e44b9b60a73ae4fbeb
/juniorChapter_004_Control/src/main/java/control/controller/filters/EditUserFilter.java
f6a75823e4d09e9b762fe91445f9686382cfcb58
[ "Apache-2.0" ]
permissive
IhorZhytchenko/job4j
16a9be95e69fa3cb51759ae8ee873a0c07687112
1d6318adbdcd4c62f792d8240001156f87163277
refs/heads/master
2020-03-07T17:49:38.475609
2018-08-11T07:57:06
2018-08-11T07:57:06
127,621,951
0
0
null
null
null
null
UTF-8
Java
false
false
1,386
java
package control.controller.filters; import control.repository.entity.User; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; /** * class EditUserFilter. * * @author Ihor Zhytchenko (igor.zhytchenko@gmail.com) * @version $1$ * @since 03.07.2018 */ public class EditUserFilter implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpSession session = request.getSession(); String role = ((User) session.getAttribute("user")).getRole().getRoleName(); if (role.equals("ADMIN") || role.equals("MANDATOR")) { chain.doFilter(req, resp); } else { long id = Long.parseLong(request.getParameter("id")); if (((User) session.getAttribute("user")).getId() == id) { chain.doFilter(req, resp); } else { ((HttpServletResponse) resp).sendRedirect(String.format("%s/users", request.getContextPath())); } } } @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void destroy() { } }
[ "igor.zhytchenko@gmail.com" ]
igor.zhytchenko@gmail.com
62b28e6867395bdc3a143af5837996f78e682dd2
64b67da133931d5d664224a0bdd1065a50f4ccb0
/Servicios/Servicios-ejb/src/main/java/co/edu/unicundi/entity/Direccion.java
2b835dd2847b44287b73d537edb9c7154fe67f75
[]
no_license
andrestinoco06/Servicios
7251bcd5172fdcdb303f331553013388c9ec678e
e5d79eac566b0abd03250ab487c75b23807c9f74
refs/heads/master
2023-01-07T12:31:41.569093
2020-11-08T16:29:10
2020-11-08T16:29:10
295,025,193
0
0
null
null
null
null
UTF-8
Java
false
false
1,871
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 co.edu.unicundi.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.MapsId; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.validation.constraints.NotNull; /** * * @author johan */ @Entity @Table(name = "direccion") public class Direccion implements Serializable{ @Id private Integer id; @NotNull(message = "Dirección requerido") @Column(name = "direccion", nullable = false, length = 70) private String direccion; @NotNull(message = "Barrio requerido") @Column(name = "barrio", nullable = false, length = 25) private String barrio; @OneToOne @MapsId private Autor autor; public Direccion() { } public Direccion(Integer id, String direccion, String barrio, Autor autor) { this.id = id; this.direccion = direccion; this.barrio = barrio; this.autor = autor; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getDireccion() { return direccion; } public void setDireccion(String direccion) { this.direccion = direccion; } public String getBarrio() { return barrio; } public void setBarrio(String barrio) { this.barrio = barrio; } public Autor getAutor() { return autor; } public void setAutor(Autor autor) { this.autor = autor; } }
[ "johansebastian.zambranopaez24@gmail.com" ]
johansebastian.zambranopaez24@gmail.com
f8d719b8ca56c5c314e82368b8d23aec2d3f5219
2a34d433f4ac2e87c9ce88fbadcd63c1e9b8c797
/src/Lesson9II_9/Main.java
4f1536457f67f37c71cd7c8669278eea1d38b0d3
[]
no_license
phuong68/MPP
cd8451f18a231041ee36ea4b3c2f82929ad189d4
4618e7ba17792a88fd9e6a0f2b4fb4b3854907ca
refs/heads/master
2020-03-08T17:36:39.567243
2018-04-28T03:28:42
2018-04-28T03:28:42
128,273,421
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package Lesson9II_9; import java.util.List; public class Main { public static void main(String[] argv) { // set up Book book = new Book("test", 3); List<BookCopy> copies = book.getCopies(); copies.forEach(copy -> copy.changeAvailability()); // test System.out.println(book.isAvailable()); } }
[ "phuong.lehoang@gmail.com" ]
phuong.lehoang@gmail.com
5d94f200b0fa6d1629567acccd6323ad5f80e83a
866acf626f8de66b0b2c5304b3ac4af6b2428ef0
/text7/src/text7/Student2.java
f872616137421fdddfb19972d78e7251f34f2299
[]
no_license
liuxiansheng66/cku
727c6294d7b2f2b05d2ac31a4a0481dd82fec0ae
5e6519bc70d0c63886a24411f237f34638945a0b
refs/heads/master
2020-04-28T02:32:42.198561
2019-03-18T06:22:38
2019-03-18T06:22:38
174,902,503
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
290
java
package text7; public class Student2 { public static void main(String[] args) { // TODO Auto-generated method stub Student1 p=new Student1(); p.setLenth(160); p.setName("ê»Ë§"); p.setAge(20); p.setSex('ÄÐ'); p.speak(); p.setName("³¬Ë§"); p.speak1(); } }
[ "2380197840@qq.com" ]
2380197840@qq.com
8b6fe4fb26d1b68a976d6d2ea29ba7b0f49397db
0fafb70d3624cadcb54418270e308facd39ae866
/BigArrayDate/src/day27/demo3/LockA.java
4768875f00956959b489bd8c731bf8245563138a
[]
no_license
he-a123/JavaStudyCode
1595a5565c7d263d98e286a475ec62fab8193452
263350c5c45432290403ab6bec9706b4b1f0a462
refs/heads/master
2023-07-30T15:02:28.182148
2021-09-20T16:10:56
2021-09-20T16:10:56
408,299,514
0
0
null
null
null
null
UTF-8
Java
false
false
124
java
package day27.demo3; public class LockA { private LockA(){} public static final LockA locka = new LockA(); }
[ "1770799921@qq.com" ]
1770799921@qq.com
cbc798357b7d064e89731b120ba6e07883efc375
3b5b60b95a70fe56ebae68879c70956c12759e08
/src/main/java/Forgot_password_positive_scenarios/Forgot_password_positive_scenarios.java
526f1724d836ea6d8a2ec212afe1bbd76c6fef0a
[]
no_license
Revathychandran47/Web_latest
3603e81c4e021a83e8b1ffa2aa4f1ee26be1e08a
9cb7eb7c8e01b8c795942295f049d50da8936c29
refs/heads/main
2023-06-20T18:35:43.049754
2021-08-06T07:33:35
2021-08-06T07:33:35
382,791,114
0
0
null
null
null
null
UTF-8
Java
false
false
2,902
java
package Forgot_password_positive_scenarios; import java.io.IOException; import org.openqa.selenium.By; import org.testng.Assert; import Reusable_Functions.Generic_function; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; public class Forgot_password_positive_scenarios extends Generic_function { static String str; /* Browser is launching , navigating to Landing Welcome Page */ @Given("Browser is open") public static void browser_open() throws Exception { try{ Browser_Launch(); }catch (Exception e) { e.printStackTrace(); } } /* TC_001 -Validate that the user should able to enter 10 digit number in "Phone Number" field*/ @Then("Click on Login button then click on Forgot Password link and enter phone number in Phone number field") public static void forgot_positive_tc_001() throws Exception{ try { driver.findElement(By.xpath(OR_reader("welcome_login"))).click(); driver.findElement(By.xpath(OR_reader("forgot_password_link"))).click(); driver.findElement(By.xpath(OR_reader("forgot_password_phone_no"))).sendKeys(td_reader("forgot_password_phone_no",3)); str= driver.findElement(By.xpath(OR_reader("forgot_password_page_title"))).getText(); Assert.assertEquals(str,td_reader("forgot_password_page_title")); browser_wait(12); browser_refresh(); } catch (Exception e) { e.printStackTrace(); takeScreenShot("forgot_positive_tc_001"); } } /* TC_002 -Validate that the user should able to click on the Send Reset Link button on entering valid phone number in Phone number field*/ @Given("Verify that Send Reset Link button gets enabled and user can click on it") public static void forgot_positive_tc_002() throws Exception{ try { driver.findElement(By.xpath(OR_reader("forgot_password_phone_no"))).sendKeys(td_reader("forgot_password_phone_no",3)); driver.findElement(By.xpath(OR_reader("send_reset_link"))).click(); str= driver.findElement(By.xpath(OR_reader("forgot_password_page_title"))).getText(); Assert.assertEquals(str,td_reader("forgot_password_page_title")); } catch (Exception e) { e.printStackTrace(); takeScreenShot("forgot_positive_tc_002"); } } /* TC_003 -Validate that the user is navigated to sign up page on clicking Sign up link*/ @Given("Click on Sign up link then should be navigated to Sign up page") public static void forgot_positive_tc_003() throws Exception{ try { browser_back(); driver.findElement(By.xpath(OR_reader("forgot_password_signup_link"))).click(); str= driver.findElement(By.xpath(OR_reader("signup_page_title"))).getText(); Assert.assertEquals(str,td_reader("signup_page_title")); System.out.println("forgot positive"); browser_close(); } catch (Exception e) { e.printStackTrace(); takeScreenShot("forgot_positive_tc_003"); } } }
[ "noreply@github.com" ]
noreply@github.com
f88a8e1675b5fb80964a7d0ec899a6b93d3e5e87
54ed8259a85324dcc4c5da730267b3db4f0520a2
/springdi/src/exam/SamsungTV.java
bfef36cd4cf92278f0d3a882d5da8047b9515309
[]
no_license
HunnuH/spring
c2c12fc7bd43fb330ca9f61be8a9c37272b27a74
09c4dba7d15d7752060fcc46f66bc69623492756
refs/heads/master
2023-09-03T04:26:58.785639
2021-11-08T01:27:38
2021-11-08T01:27:38
425,658,080
0
0
null
null
null
null
UTF-8
Java
false
false
727
java
package exam; public class SamsungTV implements TV{ //현재 클래스 내부에서 사용하는 객체 - 스프링컨테이너를 통해 전달받을 수 있도록 준비 Speaker speaker; public SamsungTV() { } public SamsungTV(Speaker speaker) { super(); this.speaker = speaker; } public Speaker getSpeaker() { return speaker; } public void turnOn() { System.out.println("SamsungTV---전원 켠다."); } public void turnOff() { System.out.println("SamsungTV---전원 끈다."); } public void soundUp() { System.out.println("SamsungTV---소리 올린다."); speaker.soundUp(); } public void soundDown() { System.out.println("SamsungTV---소리 내린다."); speaker.soundDown(); } }
[ "88477795+HunnuH@users.noreply.github.com" ]
88477795+HunnuH@users.noreply.github.com
bcbd195b7e909807c2d9b72c8b8e7a19188fbba2
3204a2d9ce419e761df72182526f9caf7b7a8f0e
/src/main/java/com/lykke/tests/api/service/partnerapi/model/CustomerBalanceResponseModel.java
2d86dc5112448c16221d60e3453b78d5a8389004
[ "MIT" ]
permissive
OpenMAVN/MAVN.Service.Tests
e20b71d3352c658f4a80be1a287fd57d127ad897
e972731ccc697f5922e41fc7cf4e882e1e480741
refs/heads/master
2021-04-23T22:02:22.863785
2020-03-26T13:06:05
2020-03-26T13:06:05
250,015,230
0
3
null
null
null
null
UTF-8
Java
false
false
756
java
package com.lykke.tests.api.service.partnerapi.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.PropertyNamingStrategy.UpperCamelCaseStrategy; import com.fasterxml.jackson.databind.annotation.JsonNaming; import com.lykke.api.testing.annotations.PublicApi; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @AllArgsConstructor @Builder @Data @NoArgsConstructor @JsonNaming(UpperCamelCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) @PublicApi public class CustomerBalanceResponseModel { private CustomerBalanceStatus status; private float tokens; private float fiatBalance; private String fiatCurrency; }
[ "mail@glushkov.us" ]
mail@glushkov.us
8c51ba0802d51fb41800c69bca3eb2e9e6282f1f
e7178cf5c86042613725248e5976fbbdbbf67bad
/app/src/main/java/org/wangchenlong/scrolllistview/MainActivity.java
a9d63ae27291cd73ae9aa448b739a203ce2b5f4c
[]
no_license
qxs820624/ScrollListView
60b9e99c41e44ac3d04dc85176ed3e1896c1efc7
fa882bbd9b0f3a2f1a6012f2c0155b5ff5a864d4
refs/heads/master
2021-01-19T00:49:38.861495
2016-11-24T08:43:06
2016-11-24T08:43:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package org.wangchenlong.scrolllistview; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "morndragon@126.com" ]
morndragon@126.com
2b2e4dc68b22ba5ea316b7983880cdc76fe6c2c6
6baa09045c69b0231c35c22b06cdf69a8ce227d6
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201607/cm/AdGroupCriterionReturnValue.java
db39f99198c5aebb315192166a76902a790597ff
[ "Apache-2.0" ]
permissive
remotejob/googleads-java-lib
f603b47117522104f7df2a72d2c96ae8c1ea011d
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
refs/heads/master
2020-12-11T01:36:29.506854
2016-07-28T22:13:24
2016-07-28T22:13:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,152
java
package com.google.api.ads.adwords.jaxws.v201607.cm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A container for return values from the AdGroupCriterionService. * * * <p>Java class for AdGroupCriterionReturnValue complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AdGroupCriterionReturnValue"> * &lt;complexContent> * &lt;extension base="{https://adwords.google.com/api/adwords/cm/v201607}ListReturnValue"> * &lt;sequence> * &lt;element name="value" type="{https://adwords.google.com/api/adwords/cm/v201607}AdGroupCriterion" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="partialFailureErrors" type="{https://adwords.google.com/api/adwords/cm/v201607}ApiError" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AdGroupCriterionReturnValue", propOrder = { "value", "partialFailureErrors" }) public class AdGroupCriterionReturnValue extends ListReturnValue { protected List<AdGroupCriterion> value; protected List<ApiError> partialFailureErrors; /** * Gets the value of the value property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the value property. * * <p> * For example, to add a new item, do as follows: * <pre> * getValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AdGroupCriterion } * * */ public List<AdGroupCriterion> getValue() { if (value == null) { value = new ArrayList<AdGroupCriterion>(); } return this.value; } /** * Gets the value of the partialFailureErrors property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the partialFailureErrors property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPartialFailureErrors().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ApiError } * * */ public List<ApiError> getPartialFailureErrors() { if (partialFailureErrors == null) { partialFailureErrors = new ArrayList<ApiError>(); } return this.partialFailureErrors; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
2acbc4923703f6c0971c499ff22e3c3be4177a99
e4ae7fdda6198886300075148ea173c084250103
/src/Main.java
6d843a8acdd503d95537d5705add37770d3fdd61
[]
no_license
OlgaStash/jv1.2
07c5553fecbd3f097c6e60d824dd002b54f73809
a8d3cfeb86c4e3d36db347b8c2798656a969f06e
refs/heads/master
2023-07-31T21:38:56.756352
2021-09-22T11:11:18
2021-09-22T11:11:18
408,364,897
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
public class Main { public static void main(String[] args) { // TODO: подставлять номер карты нужно сюда между двойными кавычками, без пробелов String number = "4929238188065554019"; System.out.println(String.format("Result is %s", isValidCardNumber(number) ? "OK" : "FAIL")); } public static boolean isValidCardNumber(String number) { if (number == null) { return false; } if (number.length() != 16) { return false; } long result = 0; for (int i = 0; i < number.length(); i++) { int digit; try { digit = Integer.parseInt(number.charAt(i) + ""); } catch (NumberFormatException e) { return false; } if (i % 2 == 0) { digit *= 2; if (digit > 9) { digit -= 9; } } result += digit; } return (result != 0) && (result % 10 == 0); } }
[ "olgastachenyk@mail.ru" ]
olgastachenyk@mail.ru
4ab5897eca1bd800c445df4e551828ce9bfb4ef5
fec61d55af6f1e8f9277868c38ff7a897d9eccc5
/src/test/java/com/epam/handlers/BookParserTest.java
71e9f78e5cc944ca5782c40f304377f976230d36
[]
no_license
NKolmakov/Java-Hometask-Task2
ff13cc49e7eb133d2a886c6df9e71e277982cd97
21246a65af7391ea76de7ce760db0d7b92719737
refs/heads/master
2020-05-15T02:08:03.067363
2019-05-04T15:17:53
2019-05-04T15:17:53
179,973,524
0
0
null
null
null
null
UTF-8
Java
false
false
4,429
java
package com.epam.handlers; import com.epam.classes.*; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.util.LinkedList; import java.util.List; import static org.junit.Assert.*; public class BookParserTest { Text text; BookParser parser = BookParser.getInstance(); List<Sentence> sentenceList; List<Paragraph> paragraphList; List<Chapter> chapterList; @Before public void setUp() { Sentence sentence = new Sentence(); Paragraph paragraph = new Paragraph(); Chapter chapter = new Chapter(); text = new Text(); sentenceList = new LinkedList<Sentence>(); paragraphList = new LinkedList<Paragraph>(); chapterList = new LinkedList<Chapter>(); sentence.addChildElement(new Word("1")); sentence.addChildElement(new Punctuation(". ")); sentence.addChildElement(new Word("Word")); sentence.addChildElement(new Punctuation(".")); chapter.setChapterName(sentence); sentence = new Sentence(); sentence.addChildElement(new Word("Text")); sentence.addChildElement(new Punctuation(" ")); sentence.addChildElement(new Word("text")); sentence.addChildElement(new Punctuation(" ")); sentence.addChildElement(new Word("text")); sentence.addChildElement(new Punctuation(". ")); sentenceList.add(sentence); sentence = new Sentence(); sentence.addChildElement(new Word("Text")); sentence.addChildElement(new Punctuation(" ")); sentence.addChildElement(new Word("text")); sentence.addChildElement(new Punctuation(".")); sentenceList.add(sentence); sentence = new Sentence(); sentence.addChildElement(new Word("Text")); sentence.addChildElement(new Punctuation(" ")); sentence.addChildElement(new Word("text")); sentence.addChildElement(new Punctuation(" ")); sentence.addChildElement(new Word("text")); sentence.addChildElement(new Punctuation(". ")); sentenceList.add(sentence); paragraph.addChildElement(sentenceList.get(0)); paragraph.addChildElement(sentenceList.get(1)); paragraphList.add(paragraph); paragraph = new Paragraph(); paragraph.addChildElement(sentenceList.get(2)); paragraphList.add(paragraph); chapter.addChildElement(paragraphList.get(0)); chapter.addChildElement(paragraphList.get(1)); text.addChildElement(chapter); } @Test public void getInstance() { BookParser bookParser2 = BookParser.getInstance(); assertSame(parser, bookParser2); } @Test public void parseBook() throws IOException { StringBuilder stringBuilder = new StringBuilder(); String expectedString = "§ 1. Word.\nText text text. Text text.\nText text text."; int inc = 0; parser.parseBook(new Book("src/test/resources/text4test")); Text testText = parser.getTextAsObject(); for(TextObject chapter:testText.getElementsByClass(Chapter.class)) { stringBuilder.append("§ "); for(TextObject chapterName:((Chapter)chapter).getChapterName()){ for(TextObject sentence:chapterName.getElementsByClass(Sentence.class)){ inc = 0; for (TextObject word : sentence.getElementsByClass(Word.class)) { stringBuilder.append(((Word) word).getWord()); stringBuilder.append(((Punctuation) sentence.getElementsByClass(Punctuation.class).get(inc++)).getPunctuation()); } } } for (TextObject paragraph : testText.getElementsByClass(Paragraph.class)) { stringBuilder.append("\n"); for (TextObject sentence : paragraph.getElementsByClass(Sentence.class)) { inc = 0; for (TextObject word : sentence.getElementsByClass(Word.class)) { stringBuilder.append(((Word) word).getWord()); stringBuilder.append(((Punctuation) sentence.getElementsByClass(Punctuation.class).get(inc++)).getPunctuation()); } } } } String actual = stringBuilder.toString(); assertEquals(expectedString, actual); } }
[ "colmakov.nikita@mail.ru" ]
colmakov.nikita@mail.ru
b779817c03a2f273386e5eeffef9cf02dc34c97b
2887304f924cdf654809b2ff3f3d6e5f0f334900
/hxfenxiao后台代码/hxfenxiao-api/src/main/java/net/seehope/hxfenxiao/MultipartConfig.java
2dcb6dcab098484943edb0c48125c247f15b6014
[]
no_license
JintaoY/-
f5424f846578a53dbf647c615e4d4101746b6c1c
dbfeb20cbad43474829cecbfb957c188e85084a5
refs/heads/master
2020-12-07T11:05:42.626306
2020-01-09T04:32:04
2020-01-09T04:32:04
232,708,546
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package net.seehope.hxfenxiao; import javax.servlet.MultipartConfigElement; import org.springframework.boot.web.servlet.MultipartConfigFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; //@Configuration public class MultipartConfig { @Bean MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setLocation("/hx"); return factory.createMultipartConfig(); } }
[ "1596475940@qq.com" ]
1596475940@qq.com
e1b727564311a6b1489851e60076a4545c0f73ab
377e01d3eecd1814ae28c876532a7d85ad7d139d
/10thMarch/src/EggDropping.java
a1a64e743308156b330fe6b71af1dc17906ee910
[]
no_license
d28ev/Interview_preparation_devendra
b81b514c586e7981e9c9e4ac702a95bf2cf1625f
fe63face525da00060260c9eedbf762b7b1ce417
refs/heads/master
2023-04-26T09:52:59.710999
2021-05-21T00:57:20
2021-05-21T00:57:20
295,152,218
1
0
null
null
null
null
UTF-8
Java
false
false
1,065
java
public class EggDropping { public static void main(String[] args) { int egg=2; int floor = 9; int[][] ans = new int[egg+1][floor+1]; //initialize matrix with -1 for(int i=0;i<=egg;i++) { for(int j=0;j<=floor;j++) { ans[i][j] = -1; } } System.out.println(findMinimumNumberOfTrials(egg, floor, ans)); } public static int findMinimumNumberOfTrials(int egg, int floor, int[][] ans) { //System.out.println(egg+ " "+ floor); if(egg==1) { ans[egg][floor]=floor; return floor; } if(floor == 0 || floor == 1) { ans[egg][floor] = floor; return floor; } if(ans[egg][floor]!=-1) { return ans[egg][floor]; } int min_trials = Integer.MAX_VALUE; for(int i=1;i<=floor;i++) { int res = 1+max(findMinimumNumberOfTrials(egg-1, i-1, ans), findMinimumNumberOfTrials(egg, floor-i, ans)); if(res < min_trials) { min_trials = res; } } ans[egg][floor]=min_trials; return ans[egg][floor]; } public static int max(int a, int b) { if(a>b) return a; return b; } }
[ "kumaryadav28dev@gmail.com" ]
kumaryadav28dev@gmail.com
a7b8b2e343d7a748755d6c6ee6b082d7c4c2f095
7b1b9444b4950f331975660644ae206a2a3f472b
/MrNom/src/com/androidgames/mrnom/Settings.java
cf0ed610033fa1c11164a45b06d9668f5d4756b9
[]
no_license
7er/android_learning
d02abbcf0e6083af2d4e9e4ba24601ec8557c6f9
7ba838b1b6c7283a3d5ae9588e2886ca9e2920e4
refs/heads/master
2016-09-06T17:44:10.289833
2012-02-21T00:41:49
2012-02-21T00:41:49
3,278,816
0
0
null
null
null
null
UTF-8
Java
false
false
235
java
package com.androidgames.mrnom; import com.badlogic.androidgames.framework.Game; public class Settings { public static boolean soundEnabled = true; public static void load(Game game) { // TODO Auto-generated method stub } }
[ "syver.enstad@cisco.com" ]
syver.enstad@cisco.com
b938e10565552fb0cbef1ee8764dc3d52bb9a939
6b53c06cc9cbad810915b992f65bb2faf7a67e23
/src/main/java/com/netflix/postreview/p4/Where.java
2fd12a5d56699b7623a3168deb7ca8d73a589245
[ "Apache-2.0" ]
permissive
trevmex/post2crucible
a5c370e016c41a04ab28c826c563c83b89bb899a
af8d95f9943a7e2bd292571c49a159238867e863
refs/heads/master
2021-01-17T21:31:45.683244
2014-07-04T00:29:49
2014-07-04T00:29:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,856
java
/** * Copyright 2013 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.postreview.p4; import com.netflix.postreview.Runner; import java.io.IOException; import java.util.Map; /** * Representation of the 'p4 where' command and its results. * * @author cquinn */ public class Where extends P4Command { public final String depotPath; public final String clientPath; public final String localPath; public static Where invokeWith(Runner runner, String path) throws IOException { return fromZtag(runner.execAndReadString(commandFor(path))); } @Override public String toString() { return "'" + depotPath + "' '" + clientPath + "' '" + localPath + "'"; } private Where(String depotPath, String clientPerforcePath, String clientLocalPath) { this.depotPath = depotPath; this.clientPath = clientPerforcePath; this.localPath = clientLocalPath; } private static String[] commandFor(String path) { return new String[] { "p4", "-ztag", "where", path }; } private static Where fromZtag(String ztag) { Map<String, String> zmap = ztagMap(ztag); if (zmap.size() == 0) { return null; } return new Where(zmap.get("depotFile"), zmap.get("clientFile"), zmap.get("path")); } }
[ "carl.quinn@gmail.com" ]
carl.quinn@gmail.com
9aa1ce68e512dad32723d94b41730d623a66176a
22d9c97be3e14414a4144a2ac6b06e9876e284cd
/NumArray_303/NumArray.java
fef78864d2ede8b5194a6e5262f5d7fc21365f90
[]
no_license
yuzicheng1994/LeetCode
d0deeea27471245c90abe353178a1c339a4a5ab7
c8889574bbc1ebc838b4befb3fccd456e5b2ae36
refs/heads/master
2022-05-03T13:09:58.273820
2022-03-21T12:26:58
2022-03-21T12:26:58
159,177,499
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
//https://leetcode-cn.com/problems/range-sum-query-immutable/ public class NumArray { private int[] sum; public NumArray(int[] nums) { sum = new int[nums.length + 1]; sum[0] = 0; for (int i = 1; i < sum.length; i++) sum[i] = sum[i - 1] + nums[i - 1]; } public int sumRange(int i, int j) { return sum[j + 1] - sum[i]; } }
[ "157955309@qq.com" ]
157955309@qq.com
a408524e4686d56f40a9cc5a1b2f47b5f0bf70dc
1f19aec2ecfd756934898cf0ad2758ee18d9eca2
/u-1/u-11/u-11-111/u-11-111-1112/u-11-111-1112-11113-111111/u-11-111-1112-11113-111111-f6536.java
2917069f88236a41c172d19985aed4f6d37cc545
[]
no_license
apertureatf/perftest
f6c6e69efad59265197f43af5072aa7af8393a34
584257a0c1ada22e5486052c11395858a87b20d5
refs/heads/master
2020-06-07T17:52:51.172890
2019-06-21T18:53:01
2019-06-21T18:53:01
193,039,805
0
0
null
null
null
null
UTF-8
Java
false
false
106
java
mastercard 5555555555554444 4012888888881881 4222222222222 378282246310005 6011111111111117 9900098642006
[ "jenkins@khan.paloaltonetworks.local" ]
jenkins@khan.paloaltonetworks.local
f7cbefe56f6917b58f728b814e60465546e4c21d
62b5f0ff1ff1af44d0bcf953ebdd3cc9e1a07f0e
/use-cases/TOSCA/eu.artist.tosca/src/tosca/impl/PlanTypeImpl.java
b3228dc9a5d163882f0beddf7b4a72c68f7a5b31
[ "MIT" ]
permissive
patrickneubauer/XMLIntellEdit
5014a2fa426116e42c7f4b318d636c3a48720059
5e4a0ad59b7e9446e7f79dcb32e09971c2193118
refs/heads/master
2021-01-12T01:56:56.595551
2018-11-10T00:35:14
2018-11-10T00:35:14
78,438,535
7
0
null
null
null
null
UTF-8
Java
false
false
3,473
java
/** */ package tosca.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import tosca.PlanType; import tosca.ToscaPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Plan Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link tosca.impl.PlanTypeImpl#getPlanRef <em>Plan Ref</em>}</li> * </ul> * </p> * * @generated */ public class PlanTypeImpl extends MinimalEObjectImpl.Container implements PlanType { /** * The default value of the '{@link #getPlanRef() <em>Plan Ref</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPlanRef() * @generated * @ordered */ protected static final String PLAN_REF_EDEFAULT = null; /** * The cached value of the '{@link #getPlanRef() <em>Plan Ref</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPlanRef() * @generated * @ordered */ protected String planRef = PLAN_REF_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PlanTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ToscaPackage.Literals.PLAN_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getPlanRef() { return planRef; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setPlanRef(String newPlanRef) { String oldPlanRef = planRef; planRef = newPlanRef; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ToscaPackage.PLAN_TYPE__PLAN_REF, oldPlanRef, planRef)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ToscaPackage.PLAN_TYPE__PLAN_REF: return getPlanRef(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ToscaPackage.PLAN_TYPE__PLAN_REF: setPlanRef((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ToscaPackage.PLAN_TYPE__PLAN_REF: setPlanRef(PLAN_REF_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ToscaPackage.PLAN_TYPE__PLAN_REF: return PLAN_REF_EDEFAULT == null ? planRef != null : !PLAN_REF_EDEFAULT.equals(planRef); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (planRef: "); result.append(planRef); result.append(')'); return result.toString(); } } //PlanTypeImpl
[ "neubauer@big.tuwien.ac.at" ]
neubauer@big.tuwien.ac.at
1f7f806139ea130f7ce88e36368c8b922dee1c66
34f437f24c28039f3041ad84dd1df56c571d5f8f
/src/main/java/com/thinkgem/jeesite/common/persistence/TreeEntity.java
54f8cf1872d458949ce7b8ead2dc065c108c4476
[]
no_license
MichardChen/oa
73122326d7efbde585e01ca70cce0b1522e4aef4
ea7cb0d9596e2dbb3821756be0e642188c5a33cb
refs/heads/master
2021-05-06T00:45:19.740164
2017-12-15T05:54:10
2017-12-15T05:54:10
114,323,322
0
0
null
null
null
null
UTF-8
Java
false
false
1,965
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.jeesite.common.persistence; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import com.fasterxml.jackson.annotation.JsonBackReference; import com.thinkgem.jeesite.common.utils.Reflections; import com.thinkgem.jeesite.common.utils.StringUtils; /** * 数据Entity类 * @author ThinkGem * @version 2014-05-16 */ public abstract class TreeEntity<T> extends DataEntity<T> { private static final long serialVersionUID = 1L; protected T parent; // 父级编号 protected String parentIds; // 所有父级编号 protected String name; // 机构名称 protected Integer sort; // 排序 protected int autoIncId; // 自增长id 2016-06-30 public TreeEntity() { super(); this.sort = 30; } public TreeEntity(String id) { super(id); } /** * 父对象,只能通过子类实现,父类实现mybatis无法读取 * @return */ @JsonBackReference @NotNull public abstract T getParent(); /** * 父对象,只能通过子类实现,父类实现mybatis无法读取 * @return */ public abstract void setParent(T parent); @Length(min=1, max=2000) public String getParentIds() { return parentIds; } public void setParentIds(String parentIds) { this.parentIds = parentIds; } @Length(min=1, max=100) public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } public String getParentId() { String id = null; if (parent != null){ id = (String)Reflections.getFieldValue(parent, "id"); } return StringUtils.isNotBlank(id) ? id : "0"; } public int getAutoIncId() { return autoIncId; } public void setAutoIncId(int autoIncId) { this.autoIncId = autoIncId; } }
[ "765205059@qq.com" ]
765205059@qq.com
4d6b4b13a20f2c741dc74d70092be1003f5a2677
254fdb8729b639fd0fb9896364d0e89186521b6a
/LintCode/Peeking Iterator.java
22f188b3062210578aeeeb93405a9303ace33a8a
[]
no_license
jiangxf/java_interview
99e9601aefa058a2465946803ad348ffb91f804e
1a1794689d7a977464e7e47a994140de67cf56be
refs/heads/master
2020-04-08T14:54:06.386481
2018-12-04T06:03:31
2018-12-04T06:03:31
159,456,451
0
0
null
null
null
null
UTF-8
Java
false
false
4,990
java
再一次理解错题意.peek()就是头顶,但是不一定是最大值啊。总是把PEEK想成了最大值,然后用2 STACK做了最大值的cache,练的一手好双stack,可惜错了。 回到原题,其实不难。找一个cache来存next()的值,然后每次next()里面维护这个cache就好。 ``` /* Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it essentially peek() at the element that MySolution be returned by the next call to next(). Here is an example. Assume that the iterator is initialized to the beginning of the list: [1, 2, 3]. Call next() gets you 1, the first element in the list. Now you call peek() and it returns 2, the next element. Calling next() after that still return 2. You call next() the final time and it returns 3, the last element. Calling hasNext() after that should return false. Hint: Think of "looking ahead". You want to cache the next element. Is one variable sufficient? Why or why not? Test your design with call order of peek() before next() vs next() before peek(). For a clean implementation, check out Google's guava library source code. (https://github.com/google/guava/blob/703ef758b8621cfbab16814f01ddcc5324bdea33/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Iterators.java#L1125) Follow up: How would you extend your design to be generic and work with all types, not just integer? It looks like the guava library uses 'E' for generic element Tags: Design Similar Problems: (M) Binary Search Tree Iterator, (M) Flatten 2D Vector, (M) Zigzag Iterator */ /* Second attempt. Thoughts: Of coruse can't store in a queue, that MySolution be brutle and meaning less. Instead, use a iterator variable, cache, to hold next(). When called next(), move forward; otherwise, return the cache. Make sure also return the cached peek, and update cache with next() value. */ // Java Iterator interface reference: // https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html class PeekingIterator implements Iterator<Integer> { private int cache; private Iterator<Integer> itt; private boolean notEnd; public PeekingIterator(Iterator<Integer> iterator) { // initialize any member here. itt = iterator; cache = itt.next(); notEnd = iterator.hasNext(); } // Returns the next element in the iteration without advancing the iterator. public Integer peek() { return cache; } // hasNext() and next() should behave the same as in the Iterator interface. // Override them if needed. @Override public Integer next() { int curr = cache; notEnd = itt.hasNext(); if (itt.hasNext()) { cache = itt.next(); } return curr; } @Override public boolean hasNext() { return notEnd; } } /* Attempt1, failed. Reason: I thought we are looking for the real max-peek element! However, this problem only asks for peek() element, which is not necessarily the maximun element. This mistake is bloody. Thoughts: To find peek, have to run through the iterator at least once. O(n). Store everything in 2 stacks: We want to process the end of the iterator first, put everything into stack. Therefore the top of the stack is the next() element of iterator. Also, use second stack to hold max value for each element stage. Each stack1 element has a max coresponding element in stack2. For example, [5,9,1,3,6] s1: 6,3,1,9,5 [5 gets out first] s2: 6,6,6,9,9 [end 9 gets out first] */ // Java Iterator interface reference: // https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html class PeekingIterator implements Iterator<Integer> { private Stack<Integer> s1; private Stack<Integer> s2; private int size; public PeekingIterator(Iterator<Integer> iterator) { // initialize any member here. s1 = new Stack<Integer>(); s2 = new Stack<Integer>(); Stack<Integer> temp = new Stack<Integer>(); size = 0; int max = Integer.MIN_VALUE; while (iterator.hasNext()) { temp.push(iterator.next()); size++; } while (!temp.empty()) { s1.push(temp.peek()); max = Math.max(max, temp.peek()); s2.push(max); temp.pop(); } } // Returns the next element in the iteration without advancing the iterator. public Integer peek() { if (s1.size() > size) { s1.pop(); return s2.pop(); } else { return s2.peek(); } } // hasNext() and next() should behave the same as in the Iterator interface. // Override them if needed. @Override public Integer next() { size--; return s1.pop(); } @Override public boolean hasNext() { return !s1.empty(); } } ```
[ "jiangxiaofeng@simuyun.com" ]
jiangxiaofeng@simuyun.com
7e9baf0da89fc3926961f5c0ac362a2372ac166d
e20ebedf425a343d83c898dda7762f01f30c0c8a
/src/main/java/zsc/ordermealsys/dao/Order_StatusMapper.java
d95320bc446bf041eb626864c806724aea8be8f0
[]
no_license
xuedie12369/ordermealsys
701ca3f8d67fe715e72842aaaf8f77ba52799a07
84b7da4502a6b2aea41f931dc823d6b8b82234f9
refs/heads/master
2021-04-09T11:27:27.947063
2018-03-24T10:55:44
2018-03-24T10:55:44
119,346,024
0
0
null
null
null
null
UTF-8
Java
false
false
954
java
package zsc.ordermealsys.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import zsc.ordermealsys.pojo.Order_Status; import zsc.ordermealsys.pojo.Order_StatusExample; public interface Order_StatusMapper { int countByExample(Order_StatusExample example); int deleteByExample(Order_StatusExample example); int deleteByPrimaryKey(Integer id); int insert(Order_Status record); int insertSelective(Order_Status record); List<Order_Status> selectByExample(Order_StatusExample example); Order_Status selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Order_Status record, @Param("example") Order_StatusExample example); int updateByExample(@Param("record") Order_Status record, @Param("example") Order_StatusExample example); int updateByPrimaryKeySelective(Order_Status record); int updateByPrimaryKey(Order_Status record); }
[ "501968797@qq.com" ]
501968797@qq.com
4a25caee471684e56b9f7b345b180e81a5d42d92
4f78317017fea87743080f7953b37f00d784d6ed
/src/test/java/com/tomgibara/permute/PermutationInfoTest.java
1aa8cfa4926a83b7d35804a8c271716508581f03
[ "Apache-2.0" ]
permissive
tomgibara/permute
9bc3be837ae13b9f82d35d682ec1f34586e27535
68177f5a2aaa182ed96e3a41bd18534c8fd67f70
refs/heads/master
2021-05-16T02:58:22.222816
2017-10-16T21:18:34
2017-10-16T21:18:34
41,121,017
3
0
Apache-2.0
2020-10-13T09:04:24
2015-08-20T22:06:30
Java
UTF-8
Java
false
false
4,847
java
/* * Copyright 2011 Tom Gibara * * 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.tomgibara.permute; import static com.tomgibara.permute.Permutation.correspond; import java.util.List; import java.util.Random; import java.util.Set; import com.tomgibara.permute.Permutation.Info; public class PermutationInfoTest extends PermutationTestCase { public void testOdd() { assertFalse( Permutation.identity(5).info().isOdd() ); assertTrue( Permutation.identity(5).generator().transpose(0, 1).permutation().info().isOdd() ); assertFalse( Permutation.identity(5).generator().transpose(0, 1).transpose(1, 2).permutation().info().isOdd() ); } public void testIdentity() { List<Integer> a = list(1,2,3,4,5); List<Integer> b = copy(a); Permutation p = Permutation.identity(5); assertTrue(p.info().isIdentity()); permutable(b).apply(p); assertEquals(b, a); } public void testTransposition() { assertFalse(Permutation.identity(0).info().isTransposition()); assertFalse(Permutation.identity(1).info().isTransposition()); assertTrue(Permutation.rotate(2, 1).info().isTransposition()); assertTrue(Permutation.transpose(5, 0, 1).info().isTransposition()); assertFalse(Permutation.rotate(5, 1).info().isTransposition()); } public void testReversal() { for (int i = 0; i < 10; i++) { Info info = Permutation.reverse(i).info(); // test twice to check any cached values are consistent assertTrue(info.isReversal()); assertTrue(info.isReversal()); } Random r = new Random(0L); for (int i = 0; i < 100; i++) { int size = r.nextInt(30); Permutation p = Permutation.identity(size).generator().shuffle(r).permutation(); assertTrue( p.equals(Permutation.reverse(size)) || !p.info().isReversal() ); } } public void testRotation() { assertTrue(Permutation.identity(0).info().isRotation()); assertEquals(0, Permutation.identity(0).info().rotationDistance().get().intValue()); Random r = new Random(0L); for (int i = 0; i < 1000; i++) { int size = 1 + r.nextInt(50); int distance = r.nextInt(size); Permutation p = Permutation.rotate(size, distance); assertTrue(p.info().isRotation()); assertEquals(distance, p.info().rotationDistance().get().intValue()); } } public void testCyclic() { assertEquals(1, correspond(1,2,3,4,0).info().getNumberOfCycles()); assertEquals(0, correspond(0,1,2,3,4).info().getNumberOfCycles()); assertEquals(1, correspond(1,0,2,3,4).info().getNumberOfCycles()); assertEquals(2, correspond(1,0,2,4,3).info().getNumberOfCycles()); assertEquals(0, correspond(0).info().getNumberOfCycles()); assertEquals(0, correspond().info().getNumberOfCycles()); } public void testDisjointCycles() { { Permutation p = Permutation.identity(5); assertTrue(p.info().getDisjointCycles().isEmpty()); } { Permutation p = correspond(1,2,3,4,0); assertEquals(set(p), p.info().getDisjointCycles()); } { Permutation p = correspond(1,0,2,4,3); assertEquals(set(correspond(1,0,2,3,4), correspond(0,1,2,4,3)), p.info().getDisjointCycles()); } { Permutation p = correspond(1,2,0,4,3); assertEquals(set(correspond(1,2,0,3,4), correspond(0,1,2,4,3)), p.info().getDisjointCycles()); } Random random = new Random(0); for (int i = 0; i < 1000; i++) { int size = 1 + random.nextInt(20); Permutation permutation = Permutation.identity(size).generator().shuffle(random).permutation(); Permutation.Info info = permutation.info(); Set<Permutation> cycles = info.getDisjointCycles(); assertEquals(info.getNumberOfCycles(), cycles.size()); Permutation.Generator generator = Permutation.identity(size).generator(); for (Permutation p : cycles) { generator.apply(p); } assertEquals(permutation, generator.permutation()); } } public void testLengthOfOrbit() { Random random = new Random(0); for (int n = 0; n < 1000; n++) { int size = random.nextInt(11); Permutation identity = Permutation.identity(size); Permutation permutation = identity.generator().shuffle(random).permutation(); Permutation p = permutation; int orbit = permutation.info().getLengthOfOrbit().intValue(); for(int i = orbit - 1; i > 0; i--) { p = p.generator().apply(permutation).permutation(); assertFalse(p.equals(permutation)); } assertEquals(identity, p); } } }
[ "me@tomgibara.com" ]
me@tomgibara.com
6577591f26efe10807ae0e07a9334d2d66e20c5b
aaec604c81bc62ed7d7018f69a3dac4070b1afd8
/Week_03/[105]从前序与中序遍历序列构造二叉树-有待改进.java
0e297f6602727e753c3e2083f9fc462cf5020cab
[]
no_license
YSDDG/algorithm013
4095095cb0f869f29fae39f45bfd8b39eb9b1bb8
121fbc6e754740083282cbfbdef54c58c5f5826b
refs/heads/master
2022-12-17T16:17:36.193819
2020-09-21T07:51:54
2020-09-21T07:51:54
282,752,544
0
0
null
2020-07-26T23:45:55
2020-07-26T23:45:54
null
UTF-8
Java
false
false
2,157
java
//根据一棵树的前序遍历与中序遍历构造二叉树。 // // 注意: //你可以假设树中没有重复的元素。 // // 例如,给出 // // 前序遍历 preorder = [3,9,20,15,7] //中序遍历 inorder = [9,3,15,20,7] // // 返回如下的二叉树: // // 3 // / \ // 9 20 // / \ // 15 7 // Related Topics 树 深度优先搜索 数组 // 👍 612 👎 0 //leetcode submit region begin(Prohibit modification and deletion) /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { ///终止条件 if (preorder.length == 0) return null; TreeNode root = new TreeNode(preorder[0]); if (preorder.length == 1) { return root; } Map<Integer, Integer> idxMap = new HashMap<>(); for (int i = 0; i < inorder.length; i++) { idxMap.put(inorder[i], i); } ///当前逻辑 Integer rootIdx = idxMap.get(preorder[0]); System.out.println(rootIdx); int leftLength = rootIdx; if (leftLength > 0) { int[] leftPreOrder = new int[leftLength]; System.arraycopy(preorder, 1, leftPreOrder, 0, leftLength); int[] leftInOrder = new int[leftLength]; System.arraycopy(inorder, 0, leftInOrder, 0, leftLength); //下一层 root.left = buildTree(leftPreOrder, leftInOrder); } int rightLength = inorder.length - 1 - rootIdx; if (rightLength > 0) { int[] rightPreorder = new int[rightLength]; System.arraycopy(preorder, leftLength + 1, rightPreorder, 0, rightLength); int[] rightInorder = new int[rightLength]; System.arraycopy(inorder, leftLength + 1, rightInorder, 0, rightLength); ///下一层 root.right = buildTree(rightPreorder, rightInorder); } return root; } } //leetcode submit region end(Prohibit modification and deletion)
[ "hzj910416@163.com" ]
hzj910416@163.com
249fc9580c0c7bad0862486fce13cb4495a15376
daa05307dc3684e7de7cd1e07e4b24e8fd967c04
/PluginMarket/app/src/test/java/com/dullyoung/pluginmarket/ExampleUnitTest.java
427f83ec2bfb20525df2a9b6d39ac4afc3b9e65e
[]
no_license
Dullyoung/PluginMarket
b4a39aad44ccd66baeaaba04fa0c230b04b956cc
232d44ba3d6f2da26dc5b863176a1984cdf66f52
refs/heads/master
2023-03-17T04:45:26.520012
2021-03-03T06:01:51
2021-03-03T06:01:51
344,017,448
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.dullyoung.pluginmarket; 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() { assertEquals(4, 2 + 2); } }
[ "664846453@qq.com" ]
664846453@qq.com
dd35720df126698291235b109a04a69d391bc9e0
3be5b9b42e3e36f5ca996a6e1c10ae48767a7f64
/L2J_SunriseProject_Data/dist/game/data/scripts/quests/Q00179_IntoTheLargeCavern/Q00179_IntoTheLargeCavern.java
640c17f16ae3fed1da318f54f31230a45444e148
[]
no_license
flbzs/sunrise-dp
28b560da569a7514a30100ddd8af1db8072b46f3
a7f977932f7e4bc79de48154b7e0ea853c215485
refs/heads/master
2022-12-19T01:30:35.705014
2020-09-12T00:01:24
2020-09-12T00:01:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,778
java
/* * Copyright (C) 2004-2013 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package quests.Q00179_IntoTheLargeCavern; import l2r.gameserver.enums.Race; import l2r.gameserver.model.actor.L2Npc; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.quest.Quest; import l2r.gameserver.model.quest.QuestState; import l2r.gameserver.model.quest.State; import quests.Q00178_IconicTrinity.Q00178_IconicTrinity; /** * Into the Large Cavern (179) * @author Gnacik * @version 2010-10-15 Based on official server Naia */ public class Q00179_IntoTheLargeCavern extends Quest { // NPCs private static final int KEKROPUS = 32138; private static final int MENACING_MACHINE = 32258; // Misc private static final int MIN_LEVEL = 17; private static final int MAX_LEVEL = 21; public Q00179_IntoTheLargeCavern() { super(179, Q00179_IntoTheLargeCavern.class.getSimpleName(), "Into The Large Cavern"); addStartNpc(KEKROPUS); addTalkId(KEKROPUS, MENACING_MACHINE); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; final QuestState st = player.getQuestState(getName()); if (st == null) { return htmltext; } if (npc.getId() == KEKROPUS) { if (event.equalsIgnoreCase("32138-03.html")) { st.startQuest(); } } else if (npc.getId() == MENACING_MACHINE) { if (event.equalsIgnoreCase("32258-08.html")) { st.giveItems(391, 1); st.giveItems(413, 1); st.exitQuest(false, true); } else if (event.equalsIgnoreCase("32258-09.html")) { st.giveItems(847, 2); st.giveItems(890, 2); st.giveItems(910, 1); st.exitQuest(false, true); } } return htmltext; } @Override public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(player); final QuestState st = getQuestState(player, true); if (st == null) { return htmltext; } if (npc.getId() == KEKROPUS) { switch (st.getState()) { case State.CREATED: if (player.getRace() != Race.KAMAEL) { htmltext = "32138-00b.html"; } else { final QuestState prev = player.getQuestState(Q00178_IconicTrinity.class.getSimpleName()); final int level = player.getLevel(); if ((prev != null) && prev.isCompleted() && (level >= MIN_LEVEL) && (level <= MAX_LEVEL) && (player.getClassId().level() == 0)) { htmltext = "32138-01.htm"; } else if (level < MIN_LEVEL) { htmltext = "32138-00.html"; } else { htmltext = "32138-00c.html"; } } break; case State.STARTED: if (st.isCond(1)) { htmltext = "32138-03.htm"; } break; case State.COMPLETED: htmltext = getAlreadyCompletedMsg(player); break; } } else if ((npc.getId() == MENACING_MACHINE) && (st.getState() == State.STARTED)) { htmltext = "32258-01.html"; } return htmltext; } }
[ "vGodFather@7628a37d-9d16-49c9-a037-77158a4058ea" ]
vGodFather@7628a37d-9d16-49c9-a037-77158a4058ea
15075be31899738f7498b1923d0eabdb11ddedb9
5ce83d248657774e8eda9c500c81142896d0b8ba
/search-server/src/main/java/com/chameleon1986/searchengine/documents/InputDocument.java
5a3f6e652b6754d6ee1e81988ab8d097539ea1cd
[ "Apache-2.0" ]
permissive
sergiusstp/test-task-003
a772f427f99909269b576caa4aa2ec461ffc6af3
c46be99f4a458708c2fa9e98abfdfd9391caeb23
refs/heads/master
2020-03-25T00:52:47.088695
2018-07-23T00:50:09
2018-07-23T00:50:09
143,210,228
0
0
null
null
null
null
UTF-8
Java
false
false
110
java
package com.chameleon1986.searchengine.documents; public class InputDocument { public String document; }
[ "lagena3@gmail.com" ]
lagena3@gmail.com
89115ef8f69d317bd3c468b6433da7110a818e4e
f9e7feb4a092bdc2a25c56b99645c196d7f986e5
/session14/src/com/auribises/packtwo/App.java
8511e25fafffaa05824a52d1a529f1122040e90e
[]
no_license
kalpana94/card
d14c1a716ed15c78a3dbb4a13b473f76b087cce1
3fdb3268addbc93141f9c75bbda369f493c9430b
refs/heads/master
2020-04-19T18:36:50.416880
2019-02-25T13:03:28
2019-02-25T13:03:28
168,367,423
0
0
null
null
null
null
UTF-8
Java
false
false
1,008
java
package com.auribises.packtwo; import com.auribises.packone.one; // import com.auribises.packtwo; // not accessible outside the package => error // inheritance across the package // only public and protected will be inherited, private and default will not be inherited // protected after inheritance behaves like private class CA extends one{ void fun() { //pvtshow();=> error //defshow();=> error proshow(); } } public class App { public static void main(String[] args) { //one oRef = new one(); //oRef.pvtshow(); // error //oRef.defshow(); //oRef.pubshow(); //oRef.proshow(); CA cRef = new CA(); //cRef.pvtshow(); //cRef.proshow(); //cRef.defshow(); cRef.pubshow(); cRef.fun(); } } // public is accessible with in package and even outside the package // public class is the only class which can be imported outside the package // public class's public methods are accessible outside the package
[ "hp@DESKTOP-3UTJHUA" ]
hp@DESKTOP-3UTJHUA
edfa92c82c86d59409179981b490df186c647333
7a30addc1a64c06654fb28d92fc0b42331fd810f
/Juli 2020/28-07-2020/Quiz/CitraQuestion21.java
5a32deca23914c699ca0e39e447326125f0fb3b7
[]
no_license
citrapp02/Bootcamp-PTS
fb9f8cf2ee96a6d4462684bdbac2c18ce0d20a45
a76e6fbbb01fa30fcdf4fc426a6447192956e444
refs/heads/master
2022-11-08T15:31:26.709570
2020-08-09T18:53:49
2020-08-09T18:53:49
286,290,017
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
import java.util.Scanner; public class CitraQuestion21 { public static void main(String[] args){ Scanner keyboard = new Scanner(System.in); String kata, kataKebalik = ""; int panjang; System.out.print("Masukkan kata: "); kata = keyboard.nextLine(); panjang = kata.length(); for (int i = panjang-1 ; i >= 0 ; i--) { kataKebalik = kataKebalik + kata.charAt(i); } System.out.println("Kebalikannya adalah "+kataKebalik+""); } }
[ "noreply@github.com" ]
noreply@github.com
2a22573f1ef3978c2e7194beaec982ff9c6c8893
635103de9b1c124728bec111117c4dea41d998c5
/src/main/java/handlers/mentor/coincubator/EditCoincubatorHandler.java
c4e0606005954888af838e9de3d13fc3e9ad6ecf
[]
no_license
AdamPietras/QuestStore
bdba3038a0de0211bb82378fceb50e7b88c717f2
6d4eb04235151f0dcce14021636edc1fd46a5ef2
refs/heads/master
2022-10-26T14:51:42.561060
2020-02-20T08:30:20
2020-02-20T08:30:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package handlers.mentor.coincubator; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import java.io.IOException; public class EditCoincubatorHandler implements HttpHandler { @Override public void handle(HttpExchange httpExchange) throws IOException { } }
[ "adam.marek.pietras@gmail.com" ]
adam.marek.pietras@gmail.com
9ef119529c4716f99e41a51c409b7c41c68da549
25d286ee2b69cd0380b5a9205156e9e6aceb43fe
/Part_1/SecondsInDay/src/SecondsInDay.java
a1a4cafe184a127c861e2c2d110df565e2b1a5fc
[]
no_license
vdpham326/Java-Mooc-1
5239e095d6950fc68ea1c6fe59a7244b32f92b4f
6d462cdfbb52b91a80d1539fd56a9b7d373f8435
refs/heads/master
2023-05-02T17:20:35.055195
2021-06-04T00:01:10
2021-06-04T00:01:10
371,110,639
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
import java.util.Scanner; public class SecondsInDay { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); System.out.println("How many days would you like to convert to seconds?"); int day = Integer.valueOf(scan.nextLine()); int seconds = day * 24 * 60 * 60; System.out.println(seconds); } }
[ "vdpham326@gmail.com" ]
vdpham326@gmail.com
a1bb37ab5b507605ba75182fcad085b3e88d8900
de01bf0400e6676fb051ffbaef67e52bfc9f9c0e
/android/app/src/main/kotlin/com/iallchain/flutter_app_service/MyService.java
1701ffc6ae778ca332b19dfd838ba653250fad71
[]
no_license
JiJiBo/flutter_app_service
60cbd2df923d02bcf197dc5f37940548844680f5
3efb473c43971576157774fdb7f6d98ae71050a4
refs/heads/master
2020-08-11T16:23:00.835501
2019-10-12T06:48:49
2019-10-12T06:48:49
214,594,355
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
package com.iallchain.flutter_app_service; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Message; import java.util.Timer; import java.util.TimerTask; import io.flutter.Log; public class MyService extends Service { @Override public IBinder onBind(Intent intent) { Log.e("1123", "onBind"); initTime(); return new MyBinder(); } private void initTime() { Log.e("1123", "inittimer"); Timer timer = new Timer(); TimerTask timerTask = new TimerTask() { @Override public void run() { mHandler.sendEmptyMessage(0); } }; timer.schedule(timerTask, 0, 1000); } private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case 0: if (listener != null) { Log.e("1123", "listener"); listener.str(System.currentTimeMillis() + ""); } break; } super.handleMessage(msg); } }; public interface Listener { void str(String str); } private Listener listener; public void setListener(Listener listener) { this.listener = listener; } public class MyBinder extends Binder { public MyService getService() { return MyService.this; } } }
[ "1270071138@" ]
1270071138@
aec9017f0d90f6302da110fd06e54b1610d9dcfc
ba827146c631a8cba0e8ed0ca89afafc3ea743a1
/HomeTour/src/game/Main.java
af9e1ba662448e291fe025eec322ed3e4305958e
[]
no_license
MSmudin/RevatureProjects
a1131e91ae1af7d4db5e84e0dc55f9cd2330b6a4
52561f0b8e917b11a999c0d590a647c736b0c8b4
refs/heads/main
2023-05-30T22:41:44.886467
2021-06-16T02:09:13
2021-06-16T02:09:13
376,678,774
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package game; public class Main { public static void main(String[] args) { } public static void printRoom(Player player) { System.out.println(); } public static String[] collectInput() { } public static void parse(String[] command, Player player) { } }
[ "m.smudin@my.ccsu.edu" ]
m.smudin@my.ccsu.edu
047b76d17fd8c9abd0868ecbc138ed0ab0a1af8a
5e264f75f49efa39d166f0c6f71f14f838e23963
/admin-yihu/src/main/java/cn/yihu/microboot/dao/MemberMapper.java
325973c7d82ce887d3b8785ed96b983a4df61d82
[ "Apache-2.0" ]
permissive
twentyDreamwork/YihuAdmin
c756ed3e727b0187deab21adeac6c97db21fff53
dd0b655e0f733e10cb2f8588d89d40f87a4331c5
refs/heads/master
2022-07-07T10:10:50.723762
2019-09-11T05:58:00
2019-09-11T05:58:00
205,616,399
0
0
Apache-2.0
2022-06-17T02:25:58
2019-09-01T01:48:58
Java
UTF-8
Java
false
false
582
java
package cn.yihu.microboot.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import cn.yihu.microboot.vo.Member; import cn.yihu.microboot.vo.Page; @Mapper public interface MemberMapper { int deleteByPrimaryKey(String id); int insert(Member record); int insertSelective(Member record); Member selectByPrimaryKey(String id); int updateByPrimaryKeySelective(Member record); int updateByPrimaryKey(Member record); int count_all(); List<Member> findpage(int pageno,int pagesize); List<Member> findall(); }
[ "yang610463@users.github.com" ]
yang610463@users.github.com
11f564b9e5087dec058337b54739b4093b4028b3
88ec7b95ef0e0eb5c1c2c46dbd80c4f449d8158f
/app/src/main/java/com/testingandroid/login/LoadUrl.java
b31ffcf491fa135dc7aab8d1e0c26a2a5e60727c
[ "Apache-2.0" ]
permissive
ANGELOS-TSILAFAKIS/AndroidTestingTutorial
e47dc52352c97d6206b3a8836faa334da94ce03b
57639f4794079bf7397a42b3f0f5477dc9f7b01d
refs/heads/master
2020-09-22T11:33:56.356347
2017-03-31T12:59:24
2017-03-31T12:59:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
package com.testingandroid.login; import android.net.http.SslError; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.webkit.SslErrorHandler; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; import com.testingandroid.R; public class LoadUrl extends AppCompatActivity { WebView webview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_load_url); webview = (WebView) findViewById(R.id.webview); webview.loadUrl("https://www.sawerly.com/beta/cms/3/en"); webview.getSettings().setUseWideViewPort(true); webview.getSettings().setJavaScriptEnabled(true); // webview.measure(100,100); webview.setWebViewClient(new WebViewClient(){ @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { super.onReceivedSslError(view, handler, error); handler.proceed(); } }); // webview.setWebChromeClient(new WebChromeClient()); } }
[ "parth.dave93@gmail.com" ]
parth.dave93@gmail.com
c951a93a0eb2100d829644776f03dd0f5eb33db7
0170245478cdc6d3a20ed0290e6a7588a1d7260b
/app/src/androidTest/java/com/xing/tablayoutsample/ExampleInstrumentedTest.java
7f4a13c0bbb55d47a78edd8559b1258f18eb9087
[]
no_license
xing16/TabLayoutSample
77a6a5693b14daf069b73dbe099359be7fd96a59
0a4487e8d1db77bde380d6309b8de11f394e0000
refs/heads/master
2021-01-20T07:24:14.513262
2017-08-27T07:23:23
2017-08-27T07:23:23
101,536,359
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package com.xing.tablayoutsample; 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("com.xing.tablayoutsample", appContext.getPackageName()); } }
[ "xing-java@foxmail.com" ]
xing-java@foxmail.com
e47926adfa9f0e51e3c5a12aa2cdfd018e1c9692
ab62c9e8539ca255aab0b843490e39d18b5d6c2c
/src/main/java/com/mkurczuk/crypto/repositories/CryptocurrencyRepository.java
42041b61adb680673a2150e13fa57278d4724179
[]
no_license
mkurczuk/crypto-to-smi
4bde32df315f09c535f31eb9df58c4aa76061841
faca7aab7208418261b87d80af9b8b427a37d3fe
refs/heads/master
2022-06-21T05:39:08.693076
2018-07-03T23:16:39
2018-07-03T23:16:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.mkurczuk.crypto.repositories; import com.mkurczuk.crypto.model.Cryptocurrency; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; public interface CryptocurrencyRepository extends JpaRepository<Cryptocurrency, Integer> { Optional<Cryptocurrency> findCryptocurrencyByName(String name); }
[ "kurczukmarcin@gmail.com" ]
kurczukmarcin@gmail.com
650381b7e6296a76ff656304a04018b7ebf67068
33d653968b4da59864e322f4bfb3ef5d1a80ad28
/Messenger/src/messenger/Messenger.java
4de4d4d78299f089d2e318715b2a83fadef0c238
[]
no_license
enaim/Java
92893ff68a63b68acc00dcb532f06bd358205704
d2a923182a2377b46f2bbe3e267d8064f9e1e382
refs/heads/master
2023-02-25T18:58:16.328651
2021-02-02T03:33:07
2021-02-02T03:33:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
449
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 messenger; /** * * @author Naim Elias */ public class Messenger { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "naimelias56@gmail.com" ]
naimelias56@gmail.com
4112e792fe2d493f0c37da5d1de5b4c2c748683a
09c7227cd3cf33e9b29ef41fb8b18ee2047e2c3f
/QuoteGeneration/src/com/cg/Controller/ProfileController.java
bbb6c1fc4abd834d82df11006d378508fb4c3b45
[]
no_license
Bhargavi-Rayapaneni/QuoteGeneration
61437bda5aad82c234aeb50ac801e386f1f3a5b6
bcf634f399990b4142981766b607a390eeee6403
refs/heads/main
2023-01-18T21:54:02.694414
2020-11-24T07:58:35
2020-11-24T07:58:35
315,545,871
0
0
null
null
null
null
UTF-8
Java
false
false
1,156
java
package com.cg.Controller; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.cg.Service.ProfileService; import com.cg.User; @Controller public class ProfileController { @Autowired @Qualifier(value="profileservice") private ProfileService profileservice; @RequestMapping(value="/profile.htm",method=RequestMethod.GET) public String showProfileForm(Map<String,User> map){ System.out.println("Inside showLoginForm()"); map.put("profi",new User()); return "ProfileCreation"; } @RequestMapping(value="/profile.htm",method=RequestMethod.POST) public String addProfile(@ModelAttribute("profi")User user) { System.out.println("Inside createAccount of profileController"); profileservice.addProfile(user); return "success"; } }
[ "Bhargavi@DESKTOP-QQBFRRM" ]
Bhargavi@DESKTOP-QQBFRRM
871eee89dcd55d4c08f9a6236a66f5affb7e4006
785c7f95636e605116b872f3cb62f5a8f3f3b1b8
/src/main/java/org/playground/atomic/sound/CDPlayer.java
967888aa68a46a4743d22321bf3218f3d863ca12
[]
no_license
jsebasct/knight
6457cca3c03dd7e1e25ec1c1a18f6256795d7ccb
012678240baa3350a83d1ddb07489243f31ec767
refs/heads/master
2021-06-04T06:59:19.734411
2018-08-24T03:28:17
2018-08-24T03:28:17
144,632,773
0
0
null
null
null
null
UTF-8
Java
false
false
579
java
package org.playground.atomic.sound; import org.springframework.beans.factory.annotation.Autowired; public class CDPlayer implements MediaPlayer { private CompactDisk compactDisk; // @Autowired // public CDPlayer(CompactDisk compactDisk) { // this.compactDisk = compactDisk; // } @Override public void play() { compactDisk.play(); } public CompactDisk getCompactDisk() { return compactDisk; } @Autowired public void setCompactDisk(CompactDisk compactDisk) { this.compactDisk = compactDisk; } }
[ "jsebas.ct@gmail.com" ]
jsebas.ct@gmail.com
b6ecb077ee1160539cb9cfee54d3ac9f67176d6a
19bf42fc41d72be7817098cea3d70469c9e886da
/src/com/ajith/hibernate/demo/UpdateStudentDemo.java
4d6e3af9c6d9b245b26510a2e93eb52bcc2a6bd5
[]
no_license
12ajith1998/Hibernate-CRUD
433fc3f1dc9af19ab8dba7ebd759b81cf93a69cf
23695232736129791bfe16806b0c74dedb182e8e
refs/heads/main
2023-07-10T16:31:54.328569
2021-08-24T09:08:04
2021-08-24T09:08:04
399,399,193
0
0
null
null
null
null
UTF-8
Java
false
false
1,217
java
package com.ajith.hibernate.demo; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import com.ajith.hibernate.demo.entity.Student; public class UpdateStudentDemo { public static void main(String[] args) { SessionFactory factory=new Configuration() .configure("hibernate.cfg.xml") .addAnnotatedClass(Student.class) .buildSessionFactory(); Session session=factory.getCurrentSession(); try{ int studentId=2; //operation 1 session=factory.getCurrentSession(); session.beginTransaction(); System.out.println("getting student with id: "+studentId); Student MyStudent =session.get(Student.class, studentId); System.out.println("updating students...."); MyStudent.setFirstName("aji"); session.getTransaction().commit(); //operation 2 session=factory.getCurrentSession(); session.beginTransaction(); session.createQuery("update Student set email='kk@gmail.com' where id=3").executeUpdate(); session.getTransaction().commit(); System.out.println("Done !"); }finally{ factory.close(); } } }
[ "noreply@github.com" ]
noreply@github.com
8ea940eaf892b4fe4b02c9c47f9c97d7a52f1e91
c6b0823bcff6e6d8b8ecf2c0910177843cf8c778
/src/main/java/ru/ncedu/course/catalog_example/servlet/SuccessServlet.java
3e131403c737cfa3616da4950192e00dbe8ed47c
[]
no_license
owlet1997/lab_8
09635d377cb87f1608d7cd93567276258c110c9a
e6c9dfb85260589620732e67c5ab2bf30c0160d5
refs/heads/dev
2022-09-27T11:07:11.461125
2020-03-04T15:29:03
2020-03-04T15:29:03
244,152,782
0
0
null
2022-09-08T01:06:59
2020-03-01T13:18:59
Java
UTF-8
Java
false
false
1,204
java
package ru.ncedu.course.catalog_example.servlet; import ru.ncedu.course.catalog_example.service.AuthorizationBean; import ru.ncedu.course.catalog_example.util.PathConstants; import javax.inject.Inject; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet(PathConstants.SUCCESS_PAGE) public class SuccessServlet extends HttpServlet { private static final String AUTHORIZED_ATTR = "authorized"; private static final String SUCCESS_JSP = "/successPage.jsp"; @Inject private AuthorizationBean authorizationBean; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { getServletContext().setAttribute(AUTHORIZED_ATTR, authorizationBean.isAuthorized()); getServletContext().getRequestDispatcher(SUCCESS_JSP).forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req,resp); } }
[ "alonewithlight@yandex.ru" ]
alonewithlight@yandex.ru
319799dbaf78f2163fc4273dd317785b6f3e5031
93ad8a376389a82471ca8ad9ea0003bb9a39a37a
/MVC_Spring/spring_webtest/src/main/java/spring/model/bbs/BbsService.java
8b6b7068b5d097e4c729bba96db5bd0eb5d508b5
[]
no_license
Leehyeokhui/Today-I-Learned
2737a6337100c869551d2b550f7323b4ce509623
6ab38cccc9557996994ecaf932c0d28421d61389
refs/heads/master
2023-03-20T21:07:11.821278
2021-03-19T09:04:08
2021-03-19T09:04:08
328,283,780
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package spring.model.bbs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import spring.model.reply.ReplyMapper; @Service public class BbsService { @Autowired private BbsMapper mapper; @Autowired private ReplyMapper rmapper; @Autowired private BbsDAOJPA jpa; public void insert(BbsVO vo) { jpa.insertBbs(vo); } public void delete(int bbsno) throws Exception{ //댓글을 지운다. rmapper.bdelete(bbsno); //부모글을 지운다. mapper.delete(bbsno); } }
[ "noreply@github.com" ]
noreply@github.com
efaa0463b61e12073dda092bf3b2036ce83aaa15
6e34a4bf59d4fe466865be89377373c35ffdc62b
/src/com/neocoretechs/relatrix/iterator/FindSetMode5.java
fc501fee023266cfdc51a253588f93c702f2099c
[ "Apache-2.0" ]
permissive
neocoretechs/Relatrix
5ab7ed93f8b1bf46ca88fed62ad5206d365dc5b1
3567be3d61433300d9dd3c9ba166fe5a3bc0b736
refs/heads/master
2023-05-26T08:01:48.414376
2023-05-16T21:43:11
2023-05-16T21:43:11
25,831,041
4
0
null
null
null
null
UTF-8
Java
false
false
1,869
java
package com.neocoretechs.relatrix.iterator; import java.io.IOException; import java.util.Iterator; import com.neocoretechs.relatrix.Morphism; import com.neocoretechs.relatrix.DomainRangeMap; /** * Find the set of objects in the relation via the specified predicate. * This mode is for (object,"?|*",object) returning 1 object or identity, but always a 1 element array of Comparable * where the map is returned where it is a component of the relationship, or an identity Morphism subclass * in the case of findSet(object,"*",object) where the identity is returned for each relationship where the objects match * the specified two objects in the findSet. * Legal permutations are:<br/> * [object],*,[object] <br/> * [object],?,[object] <br/> * [TemplateClass],*,[TemplateClass] <br/> * [TemplateClass],?,[TemplateClass] <br/> * @author Jonathan Groff Copyright (C) NeoCoreTechs 2014,2015,2021 * */ public class FindSetMode5 extends IteratorFactory { // mode 5 char mop; Object darg,rarg; short[] dmr_return = new short[4]; public FindSetMode5(Object darg, char mop, Object rarg) { this.darg = darg; this.mop = mop; this.rarg = rarg; // see if its ? or * operator dmr_return[1] = 0; // 'map' object // see if its ? or * operator dmr_return[2] = checkOp(mop); // 'range' dmr_return[3] = 0; } /** * @return Iterator for the set, each iterator return is a Comparable array of tuples of arity n=?'s */ @Override public Iterator<?> createIterator() throws IllegalAccessException, IOException { Morphism dmr = new DomainRangeMap((Comparable)darg, null, (Comparable)rarg, true); return createRelatrixIterator(dmr); } @Override protected Iterator<?> createRelatrixIterator(Morphism tdmr)throws IllegalAccessException, IOException { return new RelatrixIterator( tdmr, dmr_return); } }
[ "groffj@neocoretechs.com" ]
groffj@neocoretechs.com
77c3468d1414a1a5cadb430a077eca2f3b3e9769
1c96779342a9dec62526cf87264c9b85f7cd90fd
/src/TestComparator.java
8de65a7e2c43f92d75c376d1a14dc1fea4cd2fb3
[]
no_license
geotori/my_java
7e8e5214fb84d0bf6af543c843f23680df0d4157
1804a9d49066d6cf5cb43f5b5cb2a03b5df98e26
refs/heads/master
2023-08-22T19:51:53.673901
2021-10-19T17:09:36
2021-10-19T17:09:36
419,019,522
0
0
null
null
null
null
UTF-8
Java
false
false
574
java
import java.util.Comparator; public class TestComparator { public static void main(String[] args) { GeometricObject g1 = new Rectangle(5, 5); GeometricObject g2 = new Circle(5); GeometricObject g = max(g1, g2, new GeometricObjectComparator()); System.out.println("The area of the larger object is " + g.getArea()); } public static GeometricObject max(GeometricObject g1, GeometricObject g2, Comparator<GeometricObject> c) { if (c.compare(g1, g2) > 0) return g1; else return g2; } }
[ "vgu010@post.uit.no" ]
vgu010@post.uit.no
ef13a5c7c8b842476634ea0f08251310ff6d0e98
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/finsky/instantapps/install/C3514p.java
f9093d0fce218f6883cd0c1e99feffce81a82f25
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,164
java
package com.google.android.finsky.instantapps.install; import android.support.v4.os.C0330d; import android.util.Base64; import com.google.android.finsky.utils.FinskyLog; import com.google.android.instantapps.common.p221d.p222a.ad; import com.google.android.instantapps.common.p221d.p222a.af; import com.google.android.p306h.p307a.p308a.C5677n; import com.google.android.p306h.p307a.p308a.C5678o; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.util.Arrays; import java.util.concurrent.Callable; import java.util.concurrent.Future; final class C3514p implements Callable { public final C3522y f17747a; public final C3503c f17748b; public final Future f17749c; public final C3506h f17750d; C3514p(C3522y c3522y, C3503c c3503c, Future future, C3506h c3506h) { this.f17747a = c3522y; this.f17748b = c3503c; this.f17749c = future; this.f17750d = c3506h; } private final Boolean m17089a() { try { C0330d.m1728a("getInstallStream"); OutputStream a = this.f17750d.m17081a(this.f17748b); ag agVar = (ag) this.f17749c.get(); InputStream bufferedInputStream = new BufferedInputStream(agVar.f17717a, 32768); af afVar = agVar.f17718b; MessageDigest instance = MessageDigest.getInstance("SHA-256"); BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new DigestOutputStream(a, instance), 32768); m17091a(afVar, 1619); long j = 0; byte[] bArr = new byte[32768]; while (true) { try { int read = bufferedInputStream.read(bArr); if (read > 0) { bufferedOutputStream.write(bArr, 0, read); j += (long) read; C3522y c3522y = this.f17747a; c3522y.f17769b.mo3528a(c3522y.f17770c.addAndGet((long) read), c3522y.f17768a); } if (read == -1) { break; } } catch (Throwable th) { C0330d.m1728a("closeStreams"); bufferedInputStream.close(); bufferedOutputStream.close(); } finally { C0330d.m1727a(); } } C0330d.m1728a("closeStreams"); try { boolean z; bufferedInputStream.close(); bufferedOutputStream.close(); m17091a(afVar, 1620); byte[] bArr2 = this.f17748b.f17728d; byte[] digest = instance.digest(); if (this.f17748b.f17727c == j && (bArr2 == null || Arrays.equals(digest, bArr2))) { z = true; } else { m17091a(afVar, 1640); FinskyLog.m21667d("Validation failed for %s. Expected %d bytes with hash %s but got %d bytes with hash %s", this.f17748b.f17726b, Long.valueOf(this.f17748b.f17727c), C3514p.m17090a(bArr2), Long.valueOf(j), C3514p.m17090a(digest)); z = false; } return Boolean.valueOf(z); } finally { C0330d.m1727a(); } } finally { C0330d.m1727a(); } } private static String m17090a(byte[] bArr) { if (bArr != null) { return Base64.encodeToString(bArr, 0); } return "<none>"; } private final void m17091a(af afVar, int i) { C5678o c5678o = new C5678o(); c5678o.f28786c = new C5677n(); c5678o.f28786c.f28777a = this.f17748b.f17726b.toString(); c5678o.f28786c.f28778b = Long.valueOf(this.f17748b.f17727c); ad adVar = new ad(i); adVar.f28913f = c5678o; afVar.mo5139a(adVar.m26987a()); } public final /* synthetic */ Object call() { return m17089a(); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
61bb21ba1fbef65001d1b84cdb1fac678ca4da8a
eb0892bf9ee6b0a1dfd4f706907c64dd8ae35a7e
/HelloWorld/src/Hello.java
0d13299aeaff45dc626f7ae64ffc4b3762eec1f8
[]
no_license
indysreeram/Java-Kata
2e3e04738f258299e79757c27d70439df2605edb
51348f2437690e8bb214c18c116548cd2e4646ee
refs/heads/master
2021-01-24T10:06:59.331328
2018-04-12T11:10:57
2018-04-12T11:10:57
123,038,787
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
/** * Created by sreeram.srini on 1/8/18. */ public class Hello { public static void main(String[] args){ System.out.println("Hello Sreeram !!!"); int age = 39; System.out.println("My Age ::" +age); short shortValue = 20; byte byteValue = 8; int intValue = 10; long longValue = 100L; long totalValue = 5000L + 10L *(byteValue+shortValue+intValue); System.out.println("total value " + totalValue ); } }
[ "indysreeram@gmail.com" ]
indysreeram@gmail.com
7e5f2e4dc473a93683780515774ffb888ccc5997
8eb059ab34cb24751e9d9a04d49c4cd5d53d20ce
/testsuite/src/test/java/org/jboss/ejb3/test/stateless/TemplatedStateless.java
54893e2037b21783f996fddca99c8e88b09d20a4
[]
no_license
wolfc/jboss-ejb3.obsolete
0109c9f12100e0983333cb11803d18b073b0dbb5
4df1234e2f81312b3ff608f9965f9a6ad4191c92
refs/heads/master
2020-04-07T03:03:19.723537
2009-12-02T11:37:57
2009-12-02T11:37:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,258
java
/* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.ejb3.test.stateless; /** * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a> */ public interface TemplatedStateless<T> { T testMandatoryTx(T t) throws javax.transaction.SystemException; }
[ "cdewolf@redhat.com" ]
cdewolf@redhat.com
5b35e814018065498c551414efc3d13720cdd48d
1537a6f5cfcca02d6592058b17f45b4aa52ef123
/javatests/com/google/collide/client/workspace/TestUtils.java
c3531dfd20c8aeedd634d7b76d9bdf5355a2a986
[ "Apache-2.0" ]
permissive
soitun/collide
6e809b7fd1a40c5570d80203082ce01190924311
2136cfc9705a96d88c69356868dda5b95c35bc6d
refs/heads/superdev
2022-05-27T15:00:06.791469
2018-11-23T09:23:58
2018-11-23T09:23:58
45,740,258
0
0
Apache-2.0
2022-05-11T02:22:47
2015-11-07T14:43:37
Java
UTF-8
Java
false
false
891
java
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.collide.client.workspace; /** * Shared utility code for workspace tests. */ public class TestUtils { /** * This is the GWT Module used for these tests. */ public static final String BUILD_MODULE_NAME = "com.google.collide.client.TestCode"; }
[ "dragonsinth@gmail.com" ]
dragonsinth@gmail.com
15439270560de43405fbff874cda5ac12e3f76fc
d808f548e012cb134bc7a468f4e7f5c086c81f6b
/src/java/modelo/PersonaDAO.java
b58c13bf41ae20edebb5f104dc6dc557978aecbb
[]
no_license
GarciaNicolasEmanuel/Login-java
7af2ef7133bbe8098e7e50cfc2536f349b70659d
1cc04a4c73328750d5ec75cf395af4230fe89b63
refs/heads/master
2020-12-02T09:28:05.334386
2019-12-30T18:39:55
2019-12-30T18:39:55
230,962,460
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
java
package modelo; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; /** * * @author HP7900 */ public class PersonaDAO implements Validar { Connection con; Conexion cn=new Conexion(); PreparedStatement ps; ResultSet rs; int r=0; @Override public int validar(Persona per) { String sql= "select * from persona where Nombres=? AND Correo=?"; try{ con=cn.getConnection(); ps=con.prepareStatement(sql); ps.setString(1, per.getNom()); ps.setString(2, per.getCorreo()); rs=ps.executeQuery(); while(rs.next()) { r=r+1; per.setNom(rs.getString("Nombres")); per.setCorreo(rs.getString("Correo")); } if(r==1){ return 1; }else{ return 0; } }catch (Exception e){ return 0; } } }
[ "1234garcia" ]
1234garcia
b69b52ddb7ea2c7d714ba2abcb83accf75f12cf9
3eaa22385bcf570082f26bd572de497b755ab58d
/hw2seo/src/main/java/GroupingComparator.java
92c1f9028d1e0712f6918976f303bf98fd500a36
[]
no_license
zetyquickly/sphere_hadoop
7c02144303cf5d939a48a50c68cdc373e2616ee2
c4c4fce99debf110a12d57b65fb289fca002168e
refs/heads/master
2020-04-02T18:41:57.205688
2019-01-18T21:54:48
2019-01-18T21:54:48
154,709,635
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
import org.apache.hadoop.io.Text; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; public class GroupingComparator extends WritableComparator { GroupingComparator() { super(HostQCount.class, true); } public int compare(WritableComparable value1, WritableComparable value2) { Text host1 = ((HostQCount) value1).getHost(); Text host2 = ((HostQCount) value2).getHost(); return host1.compareTo(host2); } }
[ "emilzq@bk.ru" ]
emilzq@bk.ru
1cf3c295851f7cc0d946677cc5cd29dc631f7fcb
db72e18ecd5449e6881b03e305540457c7d500f6
/src/main/java/net/planetgeeks/mcstarter/minecraft/session/OfflineSession.java
faa2510c2e939b4b8d619d32da9b4713b71b366e
[]
no_license
PlanetGeeks/mcstarter
e074739023dd5da018285f55b17b398f2f56b19a
c91ab47d15b7eaf8c62919fece06f95bbe7d4297
refs/heads/master
2021-01-10T20:25:33.590704
2015-01-02T23:28:16
2015-01-02T23:28:16
27,940,104
1
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package net.planetgeeks.mcstarter.minecraft.session; import java.util.ArrayList; import java.util.List; import java.util.Random; import lombok.Getter; import lombok.NonNull; import lombok.Setter; /** * Contains a random/custom offline session information. * * <p> * Usage example: * * <blockquote> * * <pre> * Session session = new OfflineSession("Flood2d"); * * Profile profile = session.getSelectedProfile(); * * System.out.println(profile.getName()); * </pre> * * </blockquote> * * @author Flood2d */ public class OfflineSession implements Session { @Setter @Getter private List<Profile> availableProfiles; /** * Construct an OfflineSession with the given name. * @param name - profile name */ public OfflineSession(@NonNull String name) { List<Profile> profiles = new ArrayList<Profile>(); Profile profile = new Profile("id", name); profile.setSession(this); profiles.add(profile); setAvailableProfiles(profiles); } /** * Construct an OfflineSession with a random profile's name. */ public OfflineSession() { this("Player" + (new Random().nextInt(900) + 100)); } @Override public String getAccessToken() { return null; } @Override public String getClientToken() { return null; } @Override public Profile getSelectedProfile() { return getAvailableProfiles() != null && getAvailableProfiles().size() > 0 ? getAvailableProfiles().get(0) : null; } @Override public boolean isValid() { return true; } }
[ "PlanetGeekITA@gmail.com" ]
PlanetGeekITA@gmail.com
03ba1c67c12d8173e4dd7fd3e48f8754fb0c2ca1
ac16a8786f609280927a62242fb6e0dde68e8f4e
/CarIcon.java
4207090a790facf9324307a24959b6a98772eaa5
[]
no_license
jordangotbaum/myProjects
be85488be84aae7f36d66b3d256fa75463013622
160f4b630f29bd0466741098aa4bfbfa1432e307
refs/heads/master
2021-01-21T13:53:44.795077
2016-05-24T23:22:24
2016-05-24T23:22:24
50,870,170
0
0
null
null
null
null
UTF-8
Java
false
false
2,172
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. */ /** * * @author Jordan */ import java.awt.*; import java.awt.geom.*; import javax.swing.*; /** An icon that has the shape of a car. */ public class CarIcon implements Icon { /** Constructs a car of a given width. @param width the width of the car */ public CarIcon(int aWidth) { width = aWidth; } public void setWidth(int aWidth) { this.width = aWidth; } public int getIconWidth() { return width; } public int getIconHeight() { return width / 2; } public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g; Rectangle2D.Double body = new Rectangle2D.Double(x, y + width / 6, width - 1, width / 6); Ellipse2D.Double frontTire = new Ellipse2D.Double(x + width / 6, y + width / 3, width / 6, width / 6); Ellipse2D.Double rearTire = new Ellipse2D.Double(x + width * 2 / 3, y + width / 3, width / 6, width / 6); // The bottom of the front windshield Point2D.Double r1 = new Point2D.Double(x + width / 6, y + width / 6); // The front of the roof Point2D.Double r2 = new Point2D.Double(x + width / 3, y); // The rear of the roof Point2D.Double r3 = new Point2D.Double(x + width * 2 / 3, y); // The bottom of the rear windshield Point2D.Double r4 = new Point2D.Double(x + width * 5 / 6, y + width / 6); Line2D.Double frontWindshield = new Line2D.Double(r1, r2); Line2D.Double roofTop = new Line2D.Double(r2, r3); Line2D.Double rearWindshield = new Line2D.Double(r3, r4); g2.fill(frontTire); g2.fill(rearTire); g2.setColor(Color.red); g2.fill(body); g2.draw(frontWindshield); g2.draw(roofTop); g2.draw(rearWindshield); } private int width; }
[ "jordangotbaum@gmail.com" ]
jordangotbaum@gmail.com
af9b6224d07eb66b2771bce58f105fff8a86714d
5b373da893354c5d1bf05b51489d329f2b5adb21
/app/src/main/java/com/svanberggroup/pfago/Utils/Rib/Constants/RibMain.java
38b967e5d183242e4c7fe18f69526ba2e06aad09
[]
no_license
GlennSvanberg/PFAGO
f3ec5234d8399c1e4b799fbfb55ac9497693653b
5e4f6e79783a184cf06f4cf12c7737beb15f7a9c
refs/heads/master
2021-03-21T07:51:23.766988
2020-05-06T09:25:41
2020-05-06T09:25:41
247,277,132
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.svanberggroup.pfago.Utils.Rib.Constants; import android.util.Log; public final class RibMain { public static final String QUERY_HINT = "Ämne; UN-nr"; public static final String TITLE = "RIB: Farliga Ämnen"; public static final String URL_KEY = "url"; public static String getResultText(String searched){ Log.i("FAILED_TERM", searched); return "Sökningen på " + searched + " gav inget resultat"; } private RibMain(){} }
[ "63953357+HerrSven@users.noreply.github.com" ]
63953357+HerrSven@users.noreply.github.com
3eecef8dc0afd437915ba58348a0b6e39e507b6a
a7df9c8a3c6fdbf2d1c2089e66eccd6d4a0bb62b
/src/main/java/com/example/dao/EmployeeDao.java
826be5c4191de2e0c1c890d3dc490941460652f3
[]
no_license
javacoder2/girl
35a0d1bb8a379e8d9509959bdc1155b9aa5643ff
dcc9eed06e4448a9e1640aea9e0bcd3f3dffd19e
refs/heads/master
2021-08-12T03:49:45.371471
2017-11-14T11:38:01
2017-11-14T11:38:01
110,682,454
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.example.dao; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Select; import com.example.common.BaseDao; import com.example.domain.Employee; public interface EmployeeDao extends BaseDao<Employee> { @Select("select * from employee") public List<Employee> selectByState(Integer state); @Select("select count(1) from employee") public int queryTotalCount(); @Select("select * from employee limit #{offset}, #{rows}") public List<Employee> queryPageData(Map<String, Object> queryMap); }
[ "1004349374@qq.com" ]
1004349374@qq.com