blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
listlengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e38cbd4a0fd8896c2a43d433bdd3a3ac1aebd52e
|
8329acfadb93d99aa22756159cc75e185aa52dd6
|
/src/main/java/com/futurell/custom_annotations/entity/CityEntity.java
|
2e6841214358247063cf611102f49d0eb712fec3
|
[] |
no_license
|
FutureLL/SpringAop
|
9f6e52cdfbe3f5a866e322b1d5f3c687d2413159
|
bdc91cbe6ff4813f6820cf17d51d7d28f3a86b2c
|
refs/heads/master
| 2022-11-05T13:30:39.982517 | 2020-07-03T04:23:43 | 2020-07-03T04:23:43 | 276,806,354 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 571 |
java
|
package com.futurell.custom_annotations.entity;
import com.futurell.custom_annotations.annotation.Entity;
/**
* @description:
* @author: Mr.Li
* @date: Created in 2020/6/29 15:36
* @version: 1.0
* @modified By:
*/
@Entity(value = "city")
public class CityEntity {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"[email protected]"
] | |
977617343be33638bbb75933ad23623489e96f33
|
4260ec2401f765a9ade2cb3570bacc9bac876774
|
/src/test/java/com/departamento/DepartamentoApplicationTests.java
|
f9e1124f6588957df41b38dfac01cba0cf814f40
|
[] |
no_license
|
sbsromero/Departamento
|
32b7687ed89bdf193a898aeceb13ae4d7dc71c81
|
8f636ed87a8210fdb1ddf818fbdf8b39b38e00f9
|
refs/heads/master
| 2020-06-01T18:51:26.347215 | 2019-06-08T13:24:15 | 2019-06-08T13:24:15 | 190,890,466 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 339 |
java
|
package com.departamento;
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 DepartamentoApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"[email protected]"
] | |
1723dc884feeef6360141c28677d55a9944babcd
|
7a147b244868c702b90ee94b593a033a1093d410
|
/app/src/main/java/com/nshumskii/testapp/MainActivity.java
|
92ca7b6a4ff3a7c8593cae02ca96839b7a140327
|
[] |
no_license
|
daMelkov/FlexibleApp
|
1b274d6a64592481249732fe6773ffa09ef6e01d
|
9b400737b7105a2c2063db57cb2a243542c09401
|
refs/heads/master
| 2022-11-26T23:37:13.560368 | 2020-07-21T18:10:22 | 2020-07-21T18:10:22 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,563 |
java
|
package com.nshumskii.testapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.Switch;
import java.util.ArrayList;
import java.util.HashMap;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Switch tvSwitch = findViewById(R.id.tv_switch);
final Switch etSwitch = findViewById(R.id.et_switch);
final Switch btnSwitch = findViewById(R.id.btn_switch);
Button btnStart = findViewById(R.id.button_start);
btnStart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(MainActivity.this, MainActivity2.class);
HashMap<String, String> elements = new HashMap<>();
if (tvSwitch.isChecked()) {
elements.put("text_view", "Hi all");
}
if (etSwitch.isChecked()) {
elements.put("edit_text", "Put here your name");
}
if (btnSwitch.isChecked()) {
elements.put("button", "Let's start");
}
intent.putExtra("elements", elements);
startActivity(intent);
}
});
}
}
|
[
"[email protected]"
] | |
59ca06230cedc6b83254af7562f8f2a070d9f7e0
|
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
|
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/file_SQLiteGrammar_php.java
|
42692d47b04e8085ab131736e578df21b0d6fd2c
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
RuntimeConverter/RuntimeConverterLaravelJava
|
657b4c73085b4e34fe4404a53277e056cf9094ba
|
7ae848744fbcd993122347ffac853925ea4ea3b9
|
refs/heads/master
| 2020-04-12T17:22:30.345589 | 2018-12-22T10:32:34 | 2018-12-22T10:32:34 | 162,642,356 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,237 |
java
|
package com.project.convertedCode.includes.vendor.laravel.framework.src.Illuminate.Database.Query.Grammars;
import com.runtimeconverter.runtime.RuntimeStack;
import com.runtimeconverter.runtime.interfaces.ContextConstants;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.IncludeEventException;
import com.runtimeconverter.runtime.classes.RuntimeClassBase;
import com.runtimeconverter.runtime.RuntimeEnv;
import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface;
import com.runtimeconverter.runtime.arrays.ZPair;
/*
Converted with The Runtime Converter (runtimeconverter.com)
vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
*/
public class file_SQLiteGrammar_php implements RuntimeIncludable {
public static final file_SQLiteGrammar_php instance = new file_SQLiteGrammar_php();
public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException {
Scope1162 scope = new Scope1162();
stack.pushScope(scope);
this.include(env, stack, scope);
stack.popScope();
}
public final void include(RuntimeEnv env, RuntimeStack stack, Scope1162 scope)
throws IncludeEventException {
// Namespace import was here
// Namespace import was here
// Namespace import was here
// Conversion Note: class named SQLiteGrammar was here in the source code
env.addManualClassLoad("Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar");
}
private static final ContextConstants runtimeConverterContextContantsInstance =
new ContextConstants()
.setDir("/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars")
.setFile(
"/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php");
public ContextConstants getContextConstants() {
return runtimeConverterContextContantsInstance;
}
private static class Scope1162 implements UpdateRuntimeScopeInterface {
public void updateStack(RuntimeStack stack) {}
public void updateScope(RuntimeStack stack) {}
}
}
|
[
"[email protected]"
] | |
fe840a7202045d6fc0b65f6371e411c75f00d60d
|
8a20b31610600e8644b4b32ada03bf11c8c8d661
|
/mybatisweb/src/com/jp/utils/MyUtil.java
|
ab6442dee46ab9be9eab39a9cde7532b67f9343b
|
[] |
no_license
|
CodeSheeper/spring
|
607401820931f9ffd33d7f81c021f80ff120fb46
|
0111b616efb09796af3f3ecc6ba97db46a98854b
|
refs/heads/master
| 2020-03-11T18:52:21.715741 | 2018-05-07T05:13:06 | 2018-07-16T12:37:48 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 173 |
java
|
package com.jp.utils;
public class MyUtil {
public static boolean isNumber(String str){
char[] arr=str.toCharArray();
return true;
}
}
|
[
"[email protected]"
] | |
5215dde081ee2c3ca788c4eef011e8324ce9fbb4
|
c360e2239860cd74527eb71115f09e92455b4901
|
/src/test/java/com/resource/server/web/rest/ComparesResourceIT.java
|
1824565300c33bff5d80250b9db7eab48669f816
|
[] |
no_license
|
thetlwinoo/ecp-resource
|
ff2be4bb831f108a44b3969eda379885c1472625
|
9659b178a333b7443604197301cc0b5f2cbbbaa8
|
refs/heads/master
| 2022-12-25T08:34:06.665691 | 2019-11-01T10:12:08 | 2019-11-01T10:12:08 | 216,721,900 | 0 | 0 | null | 2022-12-16T04:40:35 | 2019-10-22T04:16:44 |
Java
|
UTF-8
|
Java
| false | false | 13,830 |
java
|
package com.resource.server.web.rest;
import com.resource.server.ResourceApp;
import com.resource.server.domain.Compares;
import com.resource.server.domain.People;
import com.resource.server.domain.CompareProducts;
import com.resource.server.repository.ComparesRepository;
import com.resource.server.service.ComparesService;
import com.resource.server.service.dto.ComparesDTO;
import com.resource.server.service.mapper.ComparesMapper;
import com.resource.server.web.rest.errors.ExceptionTranslator;
import com.resource.server.service.dto.ComparesCriteria;
import com.resource.server.service.ComparesQueryService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.Validator;
import javax.persistence.EntityManager;
import java.util.List;
import static com.resource.server.web.rest.TestUtil.createFormattingConversionService;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Integration tests for the {@link ComparesResource} REST controller.
*/
@SpringBootTest(classes = ResourceApp.class)
public class ComparesResourceIT {
@Autowired
private ComparesRepository comparesRepository;
@Autowired
private ComparesMapper comparesMapper;
@Autowired
private ComparesService comparesService;
@Autowired
private ComparesQueryService comparesQueryService;
@Autowired
private MappingJackson2HttpMessageConverter jacksonMessageConverter;
@Autowired
private PageableHandlerMethodArgumentResolver pageableArgumentResolver;
@Autowired
private ExceptionTranslator exceptionTranslator;
@Autowired
private EntityManager em;
@Autowired
private Validator validator;
private MockMvc restComparesMockMvc;
private Compares compares;
@BeforeEach
public void setup() {
MockitoAnnotations.initMocks(this);
final ComparesResource comparesResource = new ComparesResource(comparesService, comparesQueryService);
this.restComparesMockMvc = MockMvcBuilders.standaloneSetup(comparesResource)
.setCustomArgumentResolvers(pageableArgumentResolver)
.setControllerAdvice(exceptionTranslator)
.setConversionService(createFormattingConversionService())
.setMessageConverters(jacksonMessageConverter)
.setValidator(validator).build();
}
/**
* Create an entity for this test.
*
* This is a static method, as tests for other entities might also need it,
* if they test an entity which requires the current entity.
*/
public static Compares createEntity(EntityManager em) {
Compares compares = new Compares();
return compares;
}
/**
* Create an updated entity for this test.
*
* This is a static method, as tests for other entities might also need it,
* if they test an entity which requires the current entity.
*/
public static Compares createUpdatedEntity(EntityManager em) {
Compares compares = new Compares();
return compares;
}
@BeforeEach
public void initTest() {
compares = createEntity(em);
}
@Test
@Transactional
public void createCompares() throws Exception {
int databaseSizeBeforeCreate = comparesRepository.findAll().size();
// Create the Compares
ComparesDTO comparesDTO = comparesMapper.toDto(compares);
restComparesMockMvc.perform(post("/api/compares")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(comparesDTO)))
.andExpect(status().isCreated());
// Validate the Compares in the database
List<Compares> comparesList = comparesRepository.findAll();
assertThat(comparesList).hasSize(databaseSizeBeforeCreate + 1);
Compares testCompares = comparesList.get(comparesList.size() - 1);
}
@Test
@Transactional
public void createComparesWithExistingId() throws Exception {
int databaseSizeBeforeCreate = comparesRepository.findAll().size();
// Create the Compares with an existing ID
compares.setId(1L);
ComparesDTO comparesDTO = comparesMapper.toDto(compares);
// An entity with an existing ID cannot be created, so this API call must fail
restComparesMockMvc.perform(post("/api/compares")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(comparesDTO)))
.andExpect(status().isBadRequest());
// Validate the Compares in the database
List<Compares> comparesList = comparesRepository.findAll();
assertThat(comparesList).hasSize(databaseSizeBeforeCreate);
}
@Test
@Transactional
public void getAllCompares() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
// Get all the comparesList
restComparesMockMvc.perform(get("/api/compares?sort=id,desc"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].id").value(hasItem(compares.getId().intValue())));
}
@Test
@Transactional
public void getCompares() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
// Get the compares
restComparesMockMvc.perform(get("/api/compares/{id}", compares.getId()))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.id").value(compares.getId().intValue()));
}
@Test
@Transactional
public void getAllComparesByCompareUserIsEqualToSomething() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
People compareUser = PeopleResourceIT.createEntity(em);
em.persist(compareUser);
em.flush();
compares.setCompareUser(compareUser);
comparesRepository.saveAndFlush(compares);
Long compareUserId = compareUser.getId();
// Get all the comparesList where compareUser equals to compareUserId
defaultComparesShouldBeFound("compareUserId.equals=" + compareUserId);
// Get all the comparesList where compareUser equals to compareUserId + 1
defaultComparesShouldNotBeFound("compareUserId.equals=" + (compareUserId + 1));
}
@Test
@Transactional
public void getAllComparesByCompareListIsEqualToSomething() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
CompareProducts compareList = CompareProductsResourceIT.createEntity(em);
em.persist(compareList);
em.flush();
compares.addCompareList(compareList);
comparesRepository.saveAndFlush(compares);
Long compareListId = compareList.getId();
// Get all the comparesList where compareList equals to compareListId
defaultComparesShouldBeFound("compareListId.equals=" + compareListId);
// Get all the comparesList where compareList equals to compareListId + 1
defaultComparesShouldNotBeFound("compareListId.equals=" + (compareListId + 1));
}
/**
* Executes the search, and checks that the default entity is returned.
*/
private void defaultComparesShouldBeFound(String filter) throws Exception {
restComparesMockMvc.perform(get("/api/compares?sort=id,desc&" + filter))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].id").value(hasItem(compares.getId().intValue())));
// Check, that the count call also returns 1
restComparesMockMvc.perform(get("/api/compares/count?sort=id,desc&" + filter))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(content().string("1"));
}
/**
* Executes the search, and checks that the default entity is not returned.
*/
private void defaultComparesShouldNotBeFound(String filter) throws Exception {
restComparesMockMvc.perform(get("/api/compares?sort=id,desc&" + filter))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$").isArray())
.andExpect(jsonPath("$").isEmpty());
// Check, that the count call also returns 0
restComparesMockMvc.perform(get("/api/compares/count?sort=id,desc&" + filter))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(content().string("0"));
}
@Test
@Transactional
public void getNonExistingCompares() throws Exception {
// Get the compares
restComparesMockMvc.perform(get("/api/compares/{id}", Long.MAX_VALUE))
.andExpect(status().isNotFound());
}
@Test
@Transactional
public void updateCompares() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
int databaseSizeBeforeUpdate = comparesRepository.findAll().size();
// Update the compares
Compares updatedCompares = comparesRepository.findById(compares.getId()).get();
// Disconnect from session so that the updates on updatedCompares are not directly saved in db
em.detach(updatedCompares);
ComparesDTO comparesDTO = comparesMapper.toDto(updatedCompares);
restComparesMockMvc.perform(put("/api/compares")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(comparesDTO)))
.andExpect(status().isOk());
// Validate the Compares in the database
List<Compares> comparesList = comparesRepository.findAll();
assertThat(comparesList).hasSize(databaseSizeBeforeUpdate);
Compares testCompares = comparesList.get(comparesList.size() - 1);
}
@Test
@Transactional
public void updateNonExistingCompares() throws Exception {
int databaseSizeBeforeUpdate = comparesRepository.findAll().size();
// Create the Compares
ComparesDTO comparesDTO = comparesMapper.toDto(compares);
// If the entity doesn't have an ID, it will throw BadRequestAlertException
restComparesMockMvc.perform(put("/api/compares")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(comparesDTO)))
.andExpect(status().isBadRequest());
// Validate the Compares in the database
List<Compares> comparesList = comparesRepository.findAll();
assertThat(comparesList).hasSize(databaseSizeBeforeUpdate);
}
@Test
@Transactional
public void deleteCompares() throws Exception {
// Initialize the database
comparesRepository.saveAndFlush(compares);
int databaseSizeBeforeDelete = comparesRepository.findAll().size();
// Delete the compares
restComparesMockMvc.perform(delete("/api/compares/{id}", compares.getId())
.accept(TestUtil.APPLICATION_JSON_UTF8))
.andExpect(status().isNoContent());
// Validate the database contains one less item
List<Compares> comparesList = comparesRepository.findAll();
assertThat(comparesList).hasSize(databaseSizeBeforeDelete - 1);
}
@Test
@Transactional
public void equalsVerifier() throws Exception {
TestUtil.equalsVerifier(Compares.class);
Compares compares1 = new Compares();
compares1.setId(1L);
Compares compares2 = new Compares();
compares2.setId(compares1.getId());
assertThat(compares1).isEqualTo(compares2);
compares2.setId(2L);
assertThat(compares1).isNotEqualTo(compares2);
compares1.setId(null);
assertThat(compares1).isNotEqualTo(compares2);
}
@Test
@Transactional
public void dtoEqualsVerifier() throws Exception {
TestUtil.equalsVerifier(ComparesDTO.class);
ComparesDTO comparesDTO1 = new ComparesDTO();
comparesDTO1.setId(1L);
ComparesDTO comparesDTO2 = new ComparesDTO();
assertThat(comparesDTO1).isNotEqualTo(comparesDTO2);
comparesDTO2.setId(comparesDTO1.getId());
assertThat(comparesDTO1).isEqualTo(comparesDTO2);
comparesDTO2.setId(2L);
assertThat(comparesDTO1).isNotEqualTo(comparesDTO2);
comparesDTO1.setId(null);
assertThat(comparesDTO1).isNotEqualTo(comparesDTO2);
}
@Test
@Transactional
public void testEntityFromId() {
assertThat(comparesMapper.fromId(42L).getId()).isEqualTo(42);
assertThat(comparesMapper.fromId(null)).isNull();
}
}
|
[
"[email protected]"
] | |
e41d4b886453afc16cd746bb2629ae67e2a7a8cf
|
94f75c1672bfd8554d38b4e21ccfb446f5845a5b
|
/src/main/java/com/vsu/webAnalitic/controller/ExceptionController.java
|
3f5ce5753fa331a947e5437275e8c64d1efd526e
|
[] |
no_license
|
AntonovAleksandr/WebAnalitics
|
b8d327760cba6232a964c6be20a3d9f9b9b235e3
|
f7961eb4decc80bf53e6690f05d8057044646fb2
|
refs/heads/master
| 2023-06-27T12:46:33.710439 | 2021-07-31T16:52:26 | 2021-07-31T16:52:26 | 357,873,874 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 484 |
java
|
package com.vsu.webAnalitic.controller;
import com.vsu.webAnalitic.data.service.CounterService;
import com.vsu.webAnalitic.data.service.ExceptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/app")
public class ExceptionController {
@Autowired
private ExceptionService exceptionService;
}
|
[
"[email protected]"
] | |
f58dd2165639146c6d2126a25508a7240bf516ea
|
a07472f3aca4be4be4f42c44ba7cd84d63ee05cb
|
/app/src/main/java/com/codiansoft/oneandonly/model/MyAdsModel.java
|
068f389257822e673ffefb6c3bc3d78c26a76411
|
[] |
no_license
|
faiqmustaqeem/1-and-only
|
d1ac8cbadef673b2bb8f177fb2ce6293b670c3fa
|
e55f1568524815c904db99dca875fcf82481dd55
|
refs/heads/master
| 2021-01-24T21:35:43.222923 | 2018-03-29T11:50:16 | 2018-03-29T11:50:16 | 123,272,694 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,275 |
java
|
package com.codiansoft.oneandonly.model;
import java.util.ArrayList;
/**
* Created by Codiansoft on 8/1/2017.
*/
public class MyAdsModel {
String name;
String category;
String subCategory;
String city;
String lastUpdateTime;
String ID;
String details;
String contact1;
String contact2;
String email;
String imageURL;
String latitude;
String longitude;
String price;
String currencyCode;
String countryName;
String stateName;
String cityName;
String des1;
String des2;
String des3;
String des4;
ArrayList<String> adImages = new ArrayList<String>();
public MyAdsModel(String name, String category, String subCategory, String city, String lastUpdateTime, String ID, String details, String contact1,
String contact2, String email, String imageURL, String latitude, String longitude, String price, String currencyCode, String countryName, String stateName, String cityName, ArrayList<String> adImages, String des1, String des2, String des3, String des4) {
this.name=name;
this.category=category;
this.subCategory=subCategory;
this.city=city;
this.lastUpdateTime=lastUpdateTime;
this.ID=ID;
this.details=details;
this.contact1=contact1;
this.contact2=contact2;
this.email=email;
this.imageURL=imageURL;
this.latitude=latitude;
this.longitude=longitude;
this.price=price;
this.currencyCode=currencyCode;
this.adImages=adImages;
this.countryName=countryName;
this.stateName=stateName;
this.cityName=cityName;
this.des1=des1;
this.des2=des2;
this.des3=des3;
this.des4=des4;
}
public String getName() {
return name;
}
public String getCategory() {
return category;
}
public String getSubCategory() {
return subCategory;
}
public String getCity() {
return city;
}
public String getLastUpdateTime() {
return lastUpdateTime;
}
public String getID() {
return ID;
}
public String getDetails() {
return details;
}
public String getContact1() {
return contact1;
}
public String getContact2() {
return contact2;
}
public String getEmail() {
return email;
}
public String getImageURL() {
return imageURL;
}
public String getLatitude() {
return latitude;
}
public String getLongitude() {
return longitude;
}
public String getPrice() {
return price;
}
public ArrayList<String> getAdImages() {
return adImages;
}
public String getCurrencyCode() {
return currencyCode;
}
public String getCountryName() {
return countryName;
}
public String getStateName() {
return stateName;
}
public String getCityname() {
return cityName;
}
public String getDes1() {
return des1;
}
public String getDes2() {
return des2;
}
public String getDes3() {
return des3;
}
public String getDes4() {
return des4;
}
}
|
[
"[email protected]"
] | |
9ceaa66c5cc726b41cb2db29af01ae2907bf6bf7
|
2ea49bfaa6bc1b9301b025c5b2ca6fde7e5bb9df
|
/contributions/javiruiz/java/I/O/2016-07-11.java
|
d700d1e7703ae6a4b2c303cbba7882cc172c200f
|
[] |
no_license
|
0x8801/commit
|
18f25a9449f162ee92945b42b93700e12fd4fd77
|
e7692808585bc7e9726f61f7f6baf43dc83e28ac
|
refs/heads/master
| 2021-10-13T08:04:48.200662 | 2016-12-20T01:59:47 | 2016-12-20T01:59:47 | 76,935,980 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 169 |
java
|
How to test if file or directory exists in Java
Create system file paths using the `Path` class
Reading and writing text files
Using buffered streams
The `Console` class
|
[
"[email protected]"
] | |
4a14cc48e135a77d057d88434dde0d180f1e1245
|
b8e75b824e0d9fea1ad033af08faad750c6bf176
|
/src/main/java/com/ok/okhelper/Gecco/Main.java
|
8972425cd52f3eeb6eb75f78d76415cf6d9d2c1d
|
[] |
no_license
|
lovebiubiu/graduation-java-project
|
3f2dd46e83bb62fd9b6a39e00d9f8d81d7531926
|
27188554c750997f7b5b58c7cda1cad87e7e8bc6
|
refs/heads/master
| 2020-05-07T22:02:31.886970 | 2019-05-17T00:02:05 | 2019-05-17T00:02:05 | 180,929,017 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 782 |
java
|
package com.ok.okhelper.Gecco;
import com.geccocrawler.gecco.GeccoEngine;
import com.geccocrawler.gecco.request.HttpGetRequest;
public class Main {
public static void main(String[] rags) {
System.out.println("=======start========");
HttpGetRequest startUrl = new HttpGetRequest("https://nba.hupu.com/teams");
startUrl.setCharset("GBK");
GeccoEngine.create()
//Gecco搜索的包路径
.classpath("com.ok.okhelper.Gecco")
//开始抓取的页面地址
.start(startUrl)
//开启几个爬虫线程
.thread(10)
//单个爬虫每次抓取完一个请求后的间隔时间
.interval(2000)
.run();
}
}
|
[
"[email protected]"
] | |
373f06b9190b2172cd4e9be139e049f26fe89817
|
da46245d8a2de30492c60fda92cc67480b807fbd
|
/Server/core/src/pl/mmorpg/prototype/server/commandUtils/actions/ChangeDatabaseConfigFilePathCommand.java
|
f81d10da3888e022daa7f7f241faab270e8e1a1b
|
[
"MIT"
] |
permissive
|
MMORPG-Prototype/MMORPG_Prototype
|
a86473ad7cf49311b2b09f9f20036ccbcb8d8536
|
65dae4f55b8da285f0dfc83a9179048e240abdc8
|
refs/heads/master
| 2022-12-06T06:37:11.691569 | 2020-04-20T19:50:26 | 2020-04-20T19:50:26 | 86,737,982 | 4 | 0 |
MIT
| 2022-11-16T09:22:41 | 2017-03-30T18:56:49 |
Java
|
UTF-8
|
Java
| false | false | 652 |
java
|
package pl.mmorpg.prototype.server.commandUtils.actions;
import pl.mmorpg.prototype.server.database.Settings;
public class ChangeDatabaseConfigFilePathCommand implements CommandAction
{
@Override
public void run(String args)
{
if(args == null)
{
System.out.println("Not enough arguments");
return;
}
String configFilePath = args.trim();
Settings.HIBERNATE_CONFIG_FILE_PATH = configFilePath;
System.out.println("Config path changed to: " + configFilePath);
}
@Override
public String getDescription()
{
return "Change database configuration filepath";
}
@Override
public String getName()
{
return "db-config";
}
}
|
[
"[email protected]"
] | |
64674dce1942fe16176ae4551cc1d4266a0e2d21
|
a9f4a4dbc135b2beb02f02f9db4f612af91bde42
|
/KDK/src/report/kimdongkyu/r0005/Exam.java
|
365199e0dc844956ba51c8e00156d064060aa90a
|
[] |
no_license
|
eastar92/iot
|
bb6d63356c4b69f86d06ecee22dfe8f0a62eee55
|
76060193488c1825facfccb7a1b054a823fc6086
|
refs/heads/master
| 2020-11-30T01:45:37.563231 | 2017-09-20T08:40:46 | 2017-09-20T08:40:46 | 95,616,011 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 704 |
java
|
package report.kimdongkyu.r0005;
public class Exam {
public static void main(String[] args) {
// Robot클래스가 가지고 있는 3가지 함수를 호출해서 결과값을 출력해주세요
// 단 로봇의 이름은 지로봇, 나이는 10살입니다.
// Cal 클래스를 사용하여 더하기 빼기 나누기 곱하기 연산을 출력해주세요.
// 단 첫번째 변수는 10, 두번째 변수는 2 입니다.
// Robot r = new Robot("지로봇", 10);
// r.doKick();
// r.doRun();
// r.doChange();
int i = 0;
int j = 11;
for (int k = 1; k <= 10; k++) {
i = i + 1;
j = j - 1;
Cal c = new Cal(i, j, "+");
c.printCal();
}
}
}
|
[
"[email protected]"
] | |
9fffa828471eabdcf2766eedbc3228c15ccdc520
|
a84e6c44d092014348dbb7793702fcacf58ff091
|
/src/main/java/com/strio/services/ImageService.java
|
e4faf545bed13025dc889cc1f3a7bd49a421c806
|
[] |
no_license
|
GowriSakthivel/RecipeGradleMongoDB
|
08c608b832ebaf238091a03f8ca6f8ae1bcb3967
|
4db86633b011631162fff159985a9e4bc861b111
|
refs/heads/main
| 2023-03-04T20:30:37.851749 | 2021-02-17T13:14:30 | 2021-02-17T13:14:30 | 339,710,816 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 217 |
java
|
package com.strio.services;
import org.springframework.web.multipart.MultipartFile;
/**
* Created by jt on 7/3/17.
*/
public interface ImageService {
void saveImageFile(String recipeId, MultipartFile file);
}
|
[
"[email protected]"
] | |
99b92bcfb562c703def8d0ed6a8de59b132224c7
|
39fb3376c0ce6c299a83970d272b02263e055f53
|
/app/src/main/java/com/first/saccelerator/model/RescueIpResponse.java
|
ca6f5741ed41382b963b9639aca73f536b1ed3e3
|
[] |
no_license
|
YuIosXiao/TestLimao
|
fced03dff503d4bceb26e8175e39ec6f5f2f2528
|
d29fa4c1efa9aa1df768acd69dda70a00555f8cc
|
refs/heads/master
| 2020-05-16T09:51:25.607550 | 2018-07-27T07:53:06 | 2018-07-27T07:53:06 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 361 |
java
|
package com.first.saccelerator.model;
import java.util.List;
/**
* Created by XQ on 2017/9/21.
* 救援IP 实体类
*/
public class RescueIpResponse {
private List<String> rescueip;
public List<String> getRescueip() {
return rescueip;
}
public void setRescueip(List<String> rescueip) {
this.rescueip = rescueip;
}
}
|
[
"[email protected]"
] | |
1d89b1383d06c11e3a3b85792572dad981999057
|
f59ec806451a32579c763139415cef67cce1969f
|
/nw51-commons/src/main/java/br/com/nw51/common/vo/CareerCourseVO.java
|
9a4d90264a54db232e091b2ff8c76f7bebdafe27
|
[] |
no_license
|
josivansilva/nw51
|
ca2523a16efda133fb329b3f445c04e7b4de1379
|
371340f9f161669e2e77fce649bbc261f109e09e
|
refs/heads/master
| 2020-03-14T04:52:06.217149 | 2018-04-28T23:40:26 | 2018-04-28T23:40:26 | 131,451,572 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 657 |
java
|
package br.com.nw51.common.vo;
/**
* Value Object class for CareerCourse.
*
* @author Josivan Silva
*
*/
public class CareerCourseVO {
private CareerVO careerVO;
private CourseVO courseVO;
private int sequenceNumber;
public CareerVO getCareerVO() {
return careerVO;
}
public void setCareerVO(CareerVO careerVO) {
this.careerVO = careerVO;
}
public CourseVO getCourseVO() {
return courseVO;
}
public void setCourseVO(CourseVO courseVO) {
this.courseVO = courseVO;
}
public int getSequenceNumber() {
return sequenceNumber;
}
public void setSequenceNumber(int sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
}
|
[
"[email protected]"
] | |
faeb40bcb2c1f132c2474fbc9e7f46de1cd6edd9
|
60fd481d47bdcc768ebae0bd265fa9a676183f17
|
/xinyu-service/src/main/java/com/xinyu/service/qm/QmMethodInterface.java
|
984345fa0dee50288f9f6e87ca5f0065b26d3842
|
[] |
no_license
|
zilonglym/xinyu
|
3257d2d10187205c4f91efa4fed8e992a9419694
|
8828638b77e3e0f6da099f050476cf634ef84c7b
|
refs/heads/master
| 2020-03-09T16:49:34.758186 | 2018-03-27T06:52:46 | 2018-03-27T06:52:46 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 826 |
java
|
package com.xinyu.service.qm;
public interface QmMethodInterface {
/**
* 发货确认
*/
public final String METHOD_DELIVERORDER="taobao.qimen.deliveryorder.confirm";//发货确认
/**
* 发货单缺货通知接口
*/
public final String METHOD_ITEMLACK="taobao.qimen.itemlack.report";//发货单缺货通知接口
/**
* 库存盘点通知接口
*/
public final String METHOD_INVENTORY="taobao.qimen.inventory.report";//库存盘点通知接口
/**
* 仓内加工单确认接口
*/
public final String METHODD_STOREPROCESS="taobao.qimen.storeprocess.confirm";//仓内加工单确认接口
/**
* 库存异动接口
*/
public final String METHOD_STOCKCHANGE="taobao.qimen.stockchange.report";//库存异动接口
/**
* 仓库编码
*/
public final String warehouseCode="zhongcang";//
}
|
[
"[email protected]"
] | |
7cde5973adce83c66df82170c71934a1fefc0496
|
c91435391bcaaf6daae0f02400e4aa4ed483dd8b
|
/robot/Pepper4RSA/app/src/main/java/it/uniba/di/sysag/pepper4rsa/utils/request/RoomRequest.java
|
fde4e9d93b5432a1163f3d15863cc2d30f69e990
|
[] |
no_license
|
lorenzodinoia/pepper-iot
|
113ac89b6cdf28cd19ac2f29b89c5cce678234f4
|
7449559e75a2979f2873e793ae74d2efb5d00bcd
|
refs/heads/master
| 2023-03-10T01:41:07.145590 | 2021-02-19T11:35:03 | 2021-02-19T11:35:03 | 313,067,715 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,117 |
java
|
package it.uniba.di.sysag.pepper4rsa.utils.request;
import java.util.Collection;
import it.uniba.di.sysag.pepper4rsa.utils.models.Room;
import it.uniba.di.sysag.pepper4rsa.utils.request.core.CRUD;
import it.uniba.di.sysag.pepper4rsa.utils.request.core.CRUDRequest;
import it.uniba.di.sysag.pepper4rsa.utils.request.core.RequestListener;
public class RoomRequest extends CRUDRequest<Room> implements CRUD<Room> {
@Override
public void create(Room model, RequestListener<Room> requestListener) {
throw new UnsupportedOperationException();
}
@Override
public void read(long id, RequestListener<Room> requestListener) {
}
@Override
public void readAll(RequestListener<Collection<Room>> requestListener) {
super.readAll("room/list", requestListener, Room.class);
}
@Override
public void update(Room model, RequestListener<Room> requestListener) {
throw new UnsupportedOperationException();
}
@Override
public void delete(long id, RequestListener<Boolean> requestListener) {
throw new UnsupportedOperationException();
}
}
|
[
"[email protected]"
] | |
39381a3dfa5e324582208e62d4c78cd0aeac3df7
|
d7b724f30a0a05a71d6940589597f974afef7045
|
/springmvcmybatis-core/src/main/java/com/yaofei/springmvcmybatis/entity/ImportantPerson.java
|
cb9faf76c2d2cb4a7d29af745cd097e1b3858fe0
|
[] |
no_license
|
hlanlin-ny/springmvcmybatis
|
440d3eb41a48b2d41e3d31e2b6082863c16bed1d
|
d851bd7e32fd3274064d9b6bc0d3f5181931ed9b
|
refs/heads/master
| 2022-12-24T14:24:04.495768 | 2019-09-11T06:55:33 | 2019-09-11T06:55:33 | 207,513,174 | 0 | 0 | null | 2022-12-16T11:07:53 | 2019-09-10T09:06:28 |
Java
|
UTF-8
|
Java
| false | false | 8,051 |
java
|
package com.yaofei.springmvcmybatis.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* 重点人员信息表
*
* @author yaofei
* @email [email protected]
* @date 2017-09-14 09:30:59
*/
public class ImportantPerson extends BaseEntity {
private static final long serialVersionUID = 1L;
//主键,自增ID
private Long id;
//区域id
private Long areaId;
//重点人员姓名
private String name;
//身份证号码
private String idCardNo;
//重点人员性别
private String sex;
//民族
private String nation;
//出生日期
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
private Date bornTime;
//地址
private String address;
//人员类别(涉恐人员、涉稳人员、在逃人员、涉毒人员、刑事犯罪前科人员、肇事肇祸精神病人、重点上访人员)
private String personType;
//布控人姓名
private String controlName;
//布控人单位
private String controlPersonUnit;
//布控单位
private String controlUnit;
//布控人手机号
private String controlTel;
//布控状态:已布控、未布控
private String status;
//删除状态 0:正常 1:已删除
private Boolean isDeleted;
//创建人
private String createdBy;
//创建时间
private Date createdTime;
//创建人IP
private String createdIp;
//修改时间
private Date modificationTime;
//修改人
private String modificationBy;
//修改人IP
private String modificationIp;
//备注
private String remark;
/**
* 设置:主键,自增ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* 获取:主键,自增ID
*/
public Long getId() {
return id;
}
/**
* 设置:重点人员姓名
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:重点人员姓名
*/
public String getName() {
return name;
}
/**
* 设置:身份证号码
*/
public void setIdCardNo(String idCardNo) {
this.idCardNo = idCardNo;
}
/**
* 获取:身份证号码
*/
public String getIdCardNo() {
return idCardNo;
}
/**
* 设置:重点人员性别
*/
public void setSex(String sex) {
this.sex = sex;
}
/**
* 获取:重点人员性别
*/
public String getSex() {
return sex;
}
/**
* 设置:民族
*/
public void setNation(String nation) {
this.nation = nation;
}
/**
* 获取:民族
*/
public String getNation() {
return nation;
}
/**
* 设置:出生日期
*/
public void setBornTime(Date bornTime) {
this.bornTime = bornTime;
}
/**
* 获取:出生日期
*/
public Date getBornTime() {
return bornTime;
}
/**
* 设置:地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* 获取:地址
*/
public String getAddress() {
return address;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
/**
* 设置:人员类别(涉恐人员、涉稳人员、在逃人员、涉毒人员、刑事犯罪前科人员、肇事肇祸精神病人、重点上访人员)
*/
public void setPersonType(String personType) {
this.personType = personType;
}
/**
* 获取:人员类别(涉恐人员、涉稳人员、在逃人员、涉毒人员、刑事犯罪前科人员、肇事肇祸精神病人、重点上访人员)
*/
public String getPersonType() {
return personType;
}
public String getControlName() {
return controlName;
}
public void setControlName(String controlName) {
this.controlName = controlName;
}
public String getControlPersonUnit() {
return controlPersonUnit;
}
public void setControlPersonUnit(String controlPersonUnit) {
this.controlPersonUnit = controlPersonUnit;
}
public String getControlUnit() {
return controlUnit;
}
public void setControlUnit(String controlUnit) {
this.controlUnit = controlUnit;
}
public String getControlTel() {
return controlTel;
}
public void setControlTel(String controlTel) {
this.controlTel = controlTel;
}
/**
* 设置:删除状态 0:正常 1:已删除
*/
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
/**
* 获取:删除状态 0:正常 1:已删除
*/
public Boolean getIsDeleted() {
return isDeleted;
}
/**
* 设置:创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* 获取:创建人
*/
public String getCreatedBy() {
return createdBy;
}
/**
* 设置:创建时间
*/
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
/**
* 获取:创建时间
*/
public Date getCreatedTime() {
return createdTime;
}
/**
* 设置:创建人IP
*/
public void setCreatedIp(String createdIp) {
this.createdIp = createdIp;
}
/**
* 获取:创建人IP
*/
public String getCreatedIp() {
return createdIp;
}
/**
* 设置:修改时间
*/
public void setModificationTime(Date modificationTime) {
this.modificationTime = modificationTime;
}
/**
* 获取:修改时间
*/
public Date getModificationTime() {
return modificationTime;
}
/**
* 设置:修改人
*/
public void setModificationBy(String modificationBy) {
this.modificationBy = modificationBy;
}
/**
* 获取:修改人
*/
public String getModificationBy() {
return modificationBy;
}
/**
* 设置:修改人IP
*/
public void setModificationIp(String modificationIp) {
this.modificationIp = modificationIp;
}
/**
* 获取:修改人IP
*/
public String getModificationIp() {
return modificationIp;
}
/**
* 设置:备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* 获取:备注
*/
public String getRemark() {
return remark;
}
/**
* 获取:区域id
*/
public Long getAreaId() {return areaId;}
/**
* 设置:区域id
*/
public void setAreaId(Long areaId) {this.areaId = areaId;}
@Override
public String toString() {
return "ImportantPerson{" +
"id=" + id +
", areaId=" + areaId +
", name='" + name + '\'' +
", idCardNo='" + idCardNo + '\'' +
", sex='" + sex + '\'' +
", nation='" + nation + '\'' +
", bornTime=" + bornTime +
", address='" + address + '\'' +
", personType='" + personType + '\'' +
", controlName='" + controlName + '\'' +
", controlUnit='" + controlUnit + '\'' +
", controlTel='" + controlTel + '\'' +
", isDeleted=" + isDeleted +
", createdBy='" + createdBy + '\'' +
", createdTime=" + createdTime +
", createdIp='" + createdIp + '\'' +
", modificationTime=" + modificationTime +
", modificationBy='" + modificationBy + '\'' +
", modificationIp='" + modificationIp + '\'' +
", remark='" + remark + '\'' +
'}';
}
}
|
[
"[email protected]"
] | |
a5d03991999a7be001a8bb29537689c67798bd77
|
f48cb400a422d812ccf53a2ecc95f8280e2b7d7e
|
/src/main/java/org/clarke/predictionModel/SeasonPrediction.java
|
a5d8864406150b31819fb2cc1b191975633dbc4e
|
[] |
no_license
|
Ender144/football-prediction
|
abd452499c8483cc37980a02771eac960da53594
|
cde59d3fa3e6c766ac380fb29fbcbd62f908ca81
|
refs/heads/master
| 2022-03-10T17:28:06.222108 | 2022-02-08T02:42:15 | 2022-02-08T02:42:15 | 146,945,677 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,838 |
java
|
package org.clarke.predictionModel;
import org.clarke.regularSeasonModel.Game;
import java.util.Map;
public class SeasonPrediction {
private String participant;
private Map<Game, PredictedScore> gamePredictions;
private boolean printUnplayedGames;
public SeasonPrediction(String predictorName, Map<Game, PredictedScore> gamePredictions, boolean printUnplayedGames) {
this.participant = predictorName;
this.gamePredictions = gamePredictions;
this.printUnplayedGames = printUnplayedGames;
}
public PredictedScore getGamePrediction(Game game) {
return gamePredictions.get(game);
}
public Map<Game, PredictedScore> getGamePredictions() {
return gamePredictions;
}
public String getParticipant() {
return participant;
}
@Override
public String toString() {
StringBuilder gamePredictionsString = new StringBuilder();
for (Map.Entry<Game, PredictedScore> predictedGameScore : gamePredictions.entrySet()) {
Game game = predictedGameScore.getKey();
if (game.getActualOutcome() != Outcome.UNPLAYED || printUnplayedGames) {
PredictedScore predictedScore = predictedGameScore.getValue();
gamePredictionsString.append("\n\t\t{\t").append(game.getHomeTeam()).append(" VS ").append(game.getAwayTeam()).append("\n")
.append("\t\t\tPredicted:\t")
.append(predictedScore.getOurScore()).append("\t(US)\t-\t").append(predictedScore.getTheirScore()).append("\t(THEM) (").append(predictedScore.getPredictedOutcome()).append(")\n")
.append("\t\t\tActual:\t\t")
.append(game.getOurScore()).append("\t(US)\t-\t").append(game.getTheirScore()).append("\t(THEM) (").append(game.getActualOutcome()).append(")")
.append("\n\t\t},");
}
}
return "SeasonPrediction {" +
"\n\tpredictor = '" + participant + '\'' +
"\n\tgamePredictions = " + gamePredictionsString +
"\n}";
}
}
|
[
"[email protected]"
] | |
fb6885c501cc88249c53272c7aa69797bfd8b86b
|
dc254fa0e5d0bb8e83b70a0a71f41e5d279d4196
|
/src/main/java/com/infy/db/config/AsyncConfiguration.java
|
b01ba980adccbad6563a049ca58ce6efb5bf8d8f
|
[] |
no_license
|
gurpreet19/dbSvc
|
2d295efff8e28a8916d4971688dad589b8e53309
|
dfeb9755e4cf21abb661c69a896abc7c2dd5623c
|
refs/heads/master
| 2021-07-04T14:58:59.294112 | 2019-03-08T13:52:07 | 2019-03-08T13:52:07 | 172,341,361 | 0 | 1 | null | 2020-09-18T08:15:34 | 2019-02-24T13:32:52 |
Java
|
UTF-8
|
Java
| false | false | 2,288 |
java
|
package com.infy.db.config;
import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor;
import io.github.jhipster.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.*;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@Configuration
@EnableAsync
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer, SchedulingConfigurer {
private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);
private final JHipsterProperties jHipsterProperties;
public AsyncConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
log.debug("Creating Async Task Executor");
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("db-svc-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return new SimpleAsyncUncaughtExceptionHandler();
}
@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
taskRegistrar.setScheduler(scheduledTaskExecutor());
}
@Bean
public Executor scheduledTaskExecutor() {
return Executors.newScheduledThreadPool(jHipsterProperties.getAsync().getCorePoolSize());
}
}
|
[
"[email protected]"
] | |
bea4bec74bcd7fbaee43037abcd382fed7baa2bb
|
646f59f6e00ab9b23e23374edf869ed7c7fda1e4
|
/ERPSpring-SaludPersistence/src/main/java/pe/royalsystems/springerp/model/domain/SsAdOrdenAtencionDetalle.java
|
c281bb54b5b1a66f442204e2a95ea0a6f2e8b0b3
|
[] |
no_license
|
servidor-ate/repository201903
|
81e71b79ccd506f302bdbf5a213391af021bb4d4
|
605bab675c776cf0af9461169a3239aeb64354c2
|
refs/heads/master
| 2021-09-17T14:45:43.798311 | 2018-07-02T21:23:19 | 2018-07-02T21:23:19 | 112,219,743 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 33,765 |
java
|
package pe.royalsystems.springerp.model.domain;
import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* The persistent class for the SS_AD_OrdenAtencionDetalleX database table.
*
*/
@Entity
@Table(name = "SS_AD_OrdenAtencionDetalle")
public class SsAdOrdenAtencionDetalle extends Entidad {
private static final Long serialVersionUID = 1L;
private SsAdOrdenAtencionDetallePK id;
private String almacenDestino;
private Integer cama;
private String campoReferencia;
private BigDecimal cantidad;
private BigDecimal cantidadDesechada;
private BigDecimal cantidadDespachada;
private BigDecimal cantidadDevuelta;
private BigDecimal cantidadPresupuestada;
private BigDecimal cantidadRecepcionada;
private BigDecimal cantidadSolicitada;
private BigDecimal cantidadSuministrada;
private String centroCosto;
private String clasificadorMovimiento;
private String compania;
private String componente;
private String componentePaquete;
private String componentePerfil;
private String conceptoGasto;
private String condicionComponente;
private Integer cuarto;
private String diagnostico_Clinico;
private String documentoRelacionado;
private String enfermedadActual;
private Integer episodioClinicoHCE;
private Integer especialidad;
private String especimen;
private Integer estado;
private BigDecimal factorConversion;
private String familia;
private Date fechaAlertaInterfase;
private Date fechaAplicacion;
private Date fechaAutoriza;
private Date fechaCreacion;
private Date fechaModificacion;
private Date fechaProcesoExpediente;
private Integer grupoInterfase;
private String hallazgos_Operatorios;
private Integer idCita;
private Integer idDiagnostico;
private Integer idDocumentoRelacionado;
private Long idEpisodioAtencionHCE;
private Integer idEstablecimiento;
private Integer idOAOrigenTraslado;
private Integer idOPC;
private Integer idPaciente;
private Integer idPacienteHCE;
private Integer idPersonaAntUnificacion;
private Integer idProcesoExpediente;
private Integer idProcesoExpedienteBk;
private Integer idServicio;
private Integer idTransaccionCambioHospitalizacion;
private Integer idTurno;
private Integer idUnidadMedida;
private Integer idVisita;
private Integer indicadorAgregado;
private Integer indicadorAlertaInterfase;
private Integer indicadorCoberturado;
private Integer indicadorCobrado;
private Integer indicadorCorreoLaboratorio;
private Integer indicadorCostoCero;
private Integer indicadorDisponible;
private Integer indicadorEliminado;
private Integer indicadorEPS;
private Integer indicadorEstHospIngresoLinea;
private Integer indicadorExpediente;
private Integer indicadorExpedienteBk;
private Integer indicadorFacturacion;
private Integer indicadorHonorarios;
private Integer indicadorLlegada;
private String indicadorMigrado;
private Integer indicadorMigradoHospital;
private Integer indicadorOcultarConsulta;
private Integer indicadorPaquete;
private Integer indicadorPerfil;
private Integer indicadorPlanilla;
private Integer indicadorProcedimiento;
private Integer indicadorReceta;
private Integer indicadorReingresoSalida;
private Integer indicadorRiesgoQuirurgico;
private Integer indicadorSeCobra;
private Integer indicadorTransferir;
private Integer indicadorValidarFechaTrat;
private Integer indRequiereCirugia;
private Integer lineaDocumentoRelacionado;
private String lineaFamilia;
private Integer lineaHospInicial;
private String loteComponente;
private Integer modoIngreso;
private Integer motivoInterFase;
private String motivoRechazo;
private String numeroDocumento;
private Integer numeroExpediente;
private Integer numeroExpedienteBk;
private Integer numeroOPC;
private String observacion;
private String observacionHospitalizacion;
private Integer ordenPerfil;
private Integer periodoEmision;
private String procedenciaComponente;
private String proyecto;
private Integer secuencia;
private Integer secuenciaHCE;
private Integer secuencialDocumentoRelacionado;
private Integer secuencialInterfase;
private String serieDocumentoRelacionado;
private String serieOPC;
private Integer situacion;
private Integer situacionInterfase;
private Integer situacionLineaHosp;
private Integer situacionLineaHospPreAltaAdm;
private String subFamilia;
private String sucursal;
private String tipoComponente;
private String tipoDocumento;
private String tipoDocumentoRelacionado;
private Integer tipoHospitalizacion;
private Integer tipoInterConsulta;
private String tipoOPC;
private Integer tipoOrdenAtencion;
private Integer tipoordenatencionBk;
private Integer tipoReceta;
private String tipoRelacion;
private Integer tipoTecnica;
private String unidadOrganizacional;
private String unidadReplicacionHCE;
private String unidadReplicacionT;
private String usuarioAutoriza;
private String usuarioCreacion;
private String usuarioModificacion;
public SsAdOrdenAtencionDetalle() {
id = new SsAdOrdenAtencionDetallePK();
}
@EmbeddedId
public SsAdOrdenAtencionDetallePK getId() {
return this.id;
}
public void setId(SsAdOrdenAtencionDetallePK id) {
this.id = id;
}
@Column(name="AlmacenDestino")
public String getAlmacenDestino() {
return this.almacenDestino;
}
public void setAlmacenDestino(String almacenDestino) {
this.almacenDestino = almacenDestino;
}
@Column(name="Cama")
public Integer getCama() {
return this.cama;
}
public void setCama(Integer cama) {
this.cama = cama;
}
@Column(name="CampoReferencia")
public String getCampoReferencia() {
return this.campoReferencia;
}
public void setCampoReferencia(String campoReferencia) {
this.campoReferencia = campoReferencia;
}
@Column(name="Cantidad")
public BigDecimal getCantidad() {
return this.cantidad;
}
public void setCantidad(BigDecimal cantidad) {
this.cantidad = cantidad;
}
@Column(name="CantidadDesechada")
public BigDecimal getCantidadDesechada() {
return this.cantidadDesechada;
}
public void setCantidadDesechada(BigDecimal cantidadDesechada) {
this.cantidadDesechada = cantidadDesechada;
}
@Column(name="CantidadDespachada")
public BigDecimal getCantidadDespachada() {
return this.cantidadDespachada;
}
public void setCantidadDespachada(BigDecimal cantidadDespachada) {
this.cantidadDespachada = cantidadDespachada;
}
@Column(name="CantidadDevuelta")
public BigDecimal getCantidadDevuelta() {
return this.cantidadDevuelta;
}
public void setCantidadDevuelta(BigDecimal cantidadDevuelta) {
this.cantidadDevuelta = cantidadDevuelta;
}
@Column(name="CantidadPresupuestada")
public BigDecimal getCantidadPresupuestada() {
return this.cantidadPresupuestada;
}
public void setCantidadPresupuestada(BigDecimal cantidadPresupuestada) {
this.cantidadPresupuestada = cantidadPresupuestada;
}
@Column(name="CantidadRecepcionada")
public BigDecimal getCantidadRecepcionada() {
return this.cantidadRecepcionada;
}
public void setCantidadRecepcionada(BigDecimal cantidadRecepcionada) {
this.cantidadRecepcionada = cantidadRecepcionada;
}
@Column(name="CantidadSolicitada")
public BigDecimal getCantidadSolicitada() {
return this.cantidadSolicitada;
}
public void setCantidadSolicitada(BigDecimal cantidadSolicitada) {
this.cantidadSolicitada = cantidadSolicitada;
}
@Column(name="CantidadSuministrada")
public BigDecimal getCantidadSuministrada() {
return this.cantidadSuministrada;
}
public void setCantidadSuministrada(BigDecimal cantidadSuministrada) {
this.cantidadSuministrada = cantidadSuministrada;
}
@Column(name="CentroCosto")
public String getCentroCosto() {
return this.centroCosto;
}
public void setCentroCosto(String centroCosto) {
this.centroCosto = centroCosto;
}
@Column(name="ClasificadorMovimiento")
public String getClasificadorMovimiento() {
return this.clasificadorMovimiento;
}
public void setClasificadorMovimiento(String clasificadorMovimiento) {
this.clasificadorMovimiento = clasificadorMovimiento;
}
@Column(name="Compania")
public String getCompania() {
return this.compania;
}
public void setCompania(String compania) {
this.compania = compania;
}
@Column(name="Componente")
public String getComponente() {
return this.componente;
}
public void setComponente(String componente) {
this.componente = componente;
}
@Column(name="ComponentePaquete")
public String getComponentePaquete() {
return this.componentePaquete;
}
public void setComponentePaquete(String componentePaquete) {
this.componentePaquete = componentePaquete;
}
@Column(name="ComponentePerfil")
public String getComponentePerfil() {
return this.componentePerfil;
}
public void setComponentePerfil(String componentePerfil) {
this.componentePerfil = componentePerfil;
}
@Column(name="ConceptoGasto")
public String getConceptoGasto() {
return this.conceptoGasto;
}
public void setConceptoGasto(String conceptoGasto) {
this.conceptoGasto = conceptoGasto;
}
@Column(name="CondicionComponente")
public String getCondicionComponente() {
return this.condicionComponente;
}
public void setCondicionComponente(String condicionComponente) {
this.condicionComponente = condicionComponente;
}
@Column(name="Cuarto")
public Integer getCuarto() {
return this.cuarto;
}
public void setCuarto(Integer cuarto) {
this.cuarto = cuarto;
}
@Column(name="Diagnostico_Clinico")
public String getDiagnostico_Clinico() {
return this.diagnostico_Clinico;
}
public void setDiagnostico_Clinico(String diagnostico_Clinico) {
this.diagnostico_Clinico = diagnostico_Clinico;
}
@Column(name="DocumentoRelacionado")
public String getDocumentoRelacionado() {
return this.documentoRelacionado;
}
public void setDocumentoRelacionado(String documentoRelacionado) {
this.documentoRelacionado = documentoRelacionado;
}
@Column(name="EnfermedadActual")
public String getEnfermedadActual() {
return this.enfermedadActual;
}
public void setEnfermedadActual(String enfermedadActual) {
this.enfermedadActual = enfermedadActual;
}
@Column(name="EpisodioClinicoHCE")
public Integer getEpisodioClinicoHCE() {
return this.episodioClinicoHCE;
}
public void setEpisodioClinicoHCE(Integer episodioClinicoHCE) {
this.episodioClinicoHCE = episodioClinicoHCE;
}
@Column(name="Especialidad")
public Integer getEspecialidad() {
return this.especialidad;
}
public void setEspecialidad(Integer especialidad) {
this.especialidad = especialidad;
}
@Column(name="Especimen")
public String getEspecimen() {
return this.especimen;
}
public void setEspecimen(String especimen) {
this.especimen = especimen;
}
@Column(name="Estado")
public Integer getEstado() {
return this.estado;
}
public void setEstado(Integer estado) {
this.estado = estado;
}
@Column(name="FactorConversion")
public BigDecimal getFactorConversion() {
return this.factorConversion;
}
public void setFactorConversion(BigDecimal factorConversion) {
this.factorConversion = factorConversion;
}
@Column(name="Familia")
public String getFamilia() {
return this.familia;
}
public void setFamilia(String familia) {
this.familia = familia;
}
@Column(name="FechaAlertaInterfase")
public Date getFechaAlertaInterfase() {
return this.fechaAlertaInterfase;
}
public void setFechaAlertaInterfase(Date fechaAlertaInterfase) {
this.fechaAlertaInterfase = fechaAlertaInterfase;
}
@Column(name="FechaAplicacion")
public Date getFechaAplicacion() {
return this.fechaAplicacion;
}
public void setFechaAplicacion(Date fechaAplicacion) {
this.fechaAplicacion = fechaAplicacion;
}
@Column(name="FechaAutoriza")
public Date getFechaAutoriza() {
return this.fechaAutoriza;
}
public void setFechaAutoriza(Date fechaAutoriza) {
this.fechaAutoriza = fechaAutoriza;
}
@Column(name="FechaCreacion")
public Date getFechaCreacion() {
return this.fechaCreacion;
}
public void setFechaCreacion(Date fechaCreacion) {
this.fechaCreacion = fechaCreacion;
}
@Column(name="FechaModificacion")
public Date getFechaModificacion() {
return this.fechaModificacion;
}
public void setFechaModificacion(Date fechaModificacion) {
this.fechaModificacion = fechaModificacion;
}
@Column(name="FechaProcesoExpediente")
public Date getFechaProcesoExpediente() {
return this.fechaProcesoExpediente;
}
public void setFechaProcesoExpediente(Date fechaProcesoExpediente) {
this.fechaProcesoExpediente = fechaProcesoExpediente;
}
@Column(name="GrupoInterfase")
public Integer getGrupoInterfase() {
return this.grupoInterfase;
}
public void setGrupoInterfase(Integer grupoInterfase) {
this.grupoInterfase = grupoInterfase;
}
@Column(name="Hallazgos_Operatorios")
public String getHallazgos_Operatorios() {
return this.hallazgos_Operatorios;
}
public void setHallazgos_Operatorios(String hallazgos_Operatorios) {
this.hallazgos_Operatorios = hallazgos_Operatorios;
}
@Column(name="IdCita")
public Integer getIdCita() {
return this.idCita;
}
public void setIdCita(Integer idCita) {
this.idCita = idCita;
}
@Column(name="IdDiagnostico")
public Integer getIdDiagnostico() {
return this.idDiagnostico;
}
public void setIdDiagnostico(Integer idDiagnostico) {
this.idDiagnostico = idDiagnostico;
}
@Column(name="IdDocumentoRelacionado")
public Integer getIdDocumentoRelacionado() {
return this.idDocumentoRelacionado;
}
public void setIdDocumentoRelacionado(Integer idDocumentoRelacionado) {
this.idDocumentoRelacionado = idDocumentoRelacionado;
}
@Column(name="IdEpisodioAtencionHCE")
public Long getIdEpisodioAtencionHCE() {
return this.idEpisodioAtencionHCE;
}
public void setIdEpisodioAtencionHCE(Long idEpisodioAtencionHCE) {
this.idEpisodioAtencionHCE = idEpisodioAtencionHCE;
}
@Column(name="IdEstablecimiento")
public Integer getIdEstablecimiento() {
return this.idEstablecimiento;
}
public void setIdEstablecimiento(Integer idEstablecimiento) {
this.idEstablecimiento = idEstablecimiento;
}
@Column(name="IdOAOrigenTraslado")
public Integer getIdOAOrigenTraslado() {
return this.idOAOrigenTraslado;
}
public void setIdOAOrigenTraslado(Integer idOAOrigenTraslado) {
this.idOAOrigenTraslado = idOAOrigenTraslado;
}
@Column(name="IdOPC")
public Integer getIdOPC() {
return this.idOPC;
}
public void setIdOPC(Integer idOPC) {
this.idOPC = idOPC;
}
@Column(name="IdPaciente")
public Integer getIdPaciente() {
return this.idPaciente;
}
public void setIdPaciente(Integer idPaciente) {
this.idPaciente = idPaciente;
}
@Column(name="IdPacienteHCE")
public Integer getIdPacienteHCE() {
return this.idPacienteHCE;
}
public void setIdPacienteHCE(Integer idPacienteHCE) {
this.idPacienteHCE = idPacienteHCE;
}
@Column(name="IdPersonaAntUnificacion")
public Integer getIdPersonaAntUnificacion() {
return this.idPersonaAntUnificacion;
}
public void setIdPersonaAntUnificacion(Integer idPersonaAntUnificacion) {
this.idPersonaAntUnificacion = idPersonaAntUnificacion;
}
@Column(name="IdProcesoExpediente")
public Integer getIdProcesoExpediente() {
return this.idProcesoExpediente;
}
public void setIdProcesoExpediente(Integer idProcesoExpediente) {
this.idProcesoExpediente = idProcesoExpediente;
}
@Column(name="IdProcesoExpedienteBk")
public Integer getIdProcesoExpedienteBk() {
return this.idProcesoExpedienteBk;
}
public void setIdProcesoExpedienteBk(Integer idProcesoExpedienteBk) {
this.idProcesoExpedienteBk = idProcesoExpedienteBk;
}
@Column(name="IdServicio")
public Integer getIdServicio() {
return this.idServicio;
}
public void setIdServicio(Integer idServicio) {
this.idServicio = idServicio;
}
@Column(name="IdTransaccionCambioHospitalizacion")
public Integer getIdTransaccionCambioHospitalizacion() {
return this.idTransaccionCambioHospitalizacion;
}
public void setIdTransaccionCambioHospitalizacion(Integer idTransaccionCambioHospitalizacion) {
this.idTransaccionCambioHospitalizacion = idTransaccionCambioHospitalizacion;
}
@Column(name="IdTurno")
public Integer getIdTurno() {
return this.idTurno;
}
public void setIdTurno(Integer idTurno) {
this.idTurno = idTurno;
}
@Column(name="IdUnidadMedida")
public Integer getIdUnidadMedida() {
return this.idUnidadMedida;
}
public void setIdUnidadMedida(Integer idUnidadMedida) {
this.idUnidadMedida = idUnidadMedida;
}
@Column(name="IdVisita")
public Integer getIdVisita() {
return this.idVisita;
}
public void setIdVisita(Integer idVisita) {
this.idVisita = idVisita;
}
@Column(name="IndicadorAgregado")
public Integer getIndicadorAgregado() {
return this.indicadorAgregado;
}
public void setIndicadorAgregado(Integer indicadorAgregado) {
this.indicadorAgregado = indicadorAgregado;
}
@Column(name="IndicadorAlertaInterfase")
public Integer getIndicadorAlertaInterfase() {
return this.indicadorAlertaInterfase;
}
public void setIndicadorAlertaInterfase(Integer indicadorAlertaInterfase) {
this.indicadorAlertaInterfase = indicadorAlertaInterfase;
}
@Column(name="IndicadorCoberturado")
public Integer getIndicadorCoberturado() {
return this.indicadorCoberturado;
}
public void setIndicadorCoberturado(Integer indicadorCoberturado) {
this.indicadorCoberturado = indicadorCoberturado;
}
@Column(name="IndicadorCobrado")
public Integer getIndicadorCobrado() {
return this.indicadorCobrado;
}
public void setIndicadorCobrado(Integer indicadorCobrado) {
this.indicadorCobrado = indicadorCobrado;
}
@Column(name="IndicadorCorreoLaboratorio")
public Integer getIndicadorCorreoLaboratorio() {
return this.indicadorCorreoLaboratorio;
}
public void setIndicadorCorreoLaboratorio(Integer indicadorCorreoLaboratorio) {
this.indicadorCorreoLaboratorio = indicadorCorreoLaboratorio;
}
@Column(name="IndicadorCostoCero")
public Integer getIndicadorCostoCero() {
return this.indicadorCostoCero;
}
public void setIndicadorCostoCero(Integer indicadorCostoCero) {
this.indicadorCostoCero = indicadorCostoCero;
}
@Column(name="IndicadorDisponible")
public Integer getIndicadorDisponible() {
return this.indicadorDisponible;
}
public void setIndicadorDisponible(Integer indicadorDisponible) {
this.indicadorDisponible = indicadorDisponible;
}
@Column(name="IndicadorEliminado")
public Integer getIndicadorEliminado() {
return this.indicadorEliminado;
}
public void setIndicadorEliminado(Integer indicadorEliminado) {
this.indicadorEliminado = indicadorEliminado;
}
@Column(name="IndicadorEPS")
public Integer getIndicadorEPS() {
return this.indicadorEPS;
}
public void setIndicadorEPS(Integer indicadorEPS) {
this.indicadorEPS = indicadorEPS;
}
@Column(name="IndicadorEstHospIngresoLinea")
public Integer getIndicadorEstHospIngresoLinea() {
return this.indicadorEstHospIngresoLinea;
}
public void setIndicadorEstHospIngresoLinea(Integer indicadorEstHospIngresoLinea) {
this.indicadorEstHospIngresoLinea = indicadorEstHospIngresoLinea;
}
@Column(name="IndicadorExpediente")
public Integer getIndicadorExpediente() {
return this.indicadorExpediente;
}
public void setIndicadorExpediente(Integer indicadorExpediente) {
this.indicadorExpediente = indicadorExpediente;
}
@Column(name="IndicadorExpedienteBk")
public Integer getIndicadorExpedienteBk() {
return this.indicadorExpedienteBk;
}
public void setIndicadorExpedienteBk(Integer indicadorExpedienteBk) {
this.indicadorExpedienteBk = indicadorExpedienteBk;
}
@Column(name="IndicadorFacturacion")
public Integer getIndicadorFacturacion() {
return this.indicadorFacturacion;
}
public void setIndicadorFacturacion(Integer indicadorFacturacion) {
this.indicadorFacturacion = indicadorFacturacion;
}
@Column(name="IndicadorHonorarios")
public Integer getIndicadorHonorarios() {
return this.indicadorHonorarios;
}
public void setIndicadorHonorarios(Integer indicadorHonorarios) {
this.indicadorHonorarios = indicadorHonorarios;
}
@Column(name="IndicadorLlegada")
public Integer getIndicadorLlegada() {
return this.indicadorLlegada;
}
public void setIndicadorLlegada(Integer indicadorLlegada) {
this.indicadorLlegada = indicadorLlegada;
}
@Column(name="IndicadorMigrado")
public String getIndicadorMigrado() {
return this.indicadorMigrado;
}
public void setIndicadorMigrado(String indicadorMigrado) {
this.indicadorMigrado = indicadorMigrado;
}
@Column(name="IndicadorMigradoHospital")
public Integer getIndicadorMigradoHospital() {
return this.indicadorMigradoHospital;
}
public void setIndicadorMigradoHospital(Integer indicadorMigradoHospital) {
this.indicadorMigradoHospital = indicadorMigradoHospital;
}
@Column(name="IndicadorOcultarConsulta")
public Integer getIndicadorOcultarConsulta() {
return this.indicadorOcultarConsulta;
}
public void setIndicadorOcultarConsulta(Integer indicadorOcultarConsulta) {
this.indicadorOcultarConsulta = indicadorOcultarConsulta;
}
@Column(name="IndicadorPaquete")
public Integer getIndicadorPaquete() {
return this.indicadorPaquete;
}
public void setIndicadorPaquete(Integer indicadorPaquete) {
this.indicadorPaquete = indicadorPaquete;
}
@Column(name="IndicadorPerfil")
public Integer getIndicadorPerfil() {
return this.indicadorPerfil;
}
public void setIndicadorPerfil(Integer indicadorPerfil) {
this.indicadorPerfil = indicadorPerfil;
}
@Column(name="IndicadorPlanilla")
public Integer getIndicadorPlanilla() {
return this.indicadorPlanilla;
}
public void setIndicadorPlanilla(Integer indicadorPlanilla) {
this.indicadorPlanilla = indicadorPlanilla;
}
@Column(name="IndicadorProcedimiento")
public Integer getIndicadorProcedimiento() {
return this.indicadorProcedimiento;
}
public void setIndicadorProcedimiento(Integer indicadorProcedimiento) {
this.indicadorProcedimiento = indicadorProcedimiento;
}
@Column(name="IndicadorReceta")
public Integer getIndicadorReceta() {
return this.indicadorReceta;
}
public void setIndicadorReceta(Integer indicadorReceta) {
this.indicadorReceta = indicadorReceta;
}
@Column(name="IndicadorReingresoSalida")
public Integer getIndicadorReingresoSalida() {
return this.indicadorReingresoSalida;
}
public void setIndicadorReingresoSalida(Integer indicadorReingresoSalida) {
this.indicadorReingresoSalida = indicadorReingresoSalida;
}
@Column(name="IndicadorRiesgoQuirurgico")
public Integer getIndicadorRiesgoQuirurgico() {
return this.indicadorRiesgoQuirurgico;
}
public void setIndicadorRiesgoQuirurgico(Integer indicadorRiesgoQuirurgico) {
this.indicadorRiesgoQuirurgico = indicadorRiesgoQuirurgico;
}
@Column(name="IndicadorSeCobra")
public Integer getIndicadorSeCobra() {
return this.indicadorSeCobra;
}
public void setIndicadorSeCobra(Integer indicadorSeCobra) {
this.indicadorSeCobra = indicadorSeCobra;
}
@Column(name="IndicadorTransferir")
public Integer getIndicadorTransferir() {
return this.indicadorTransferir;
}
public void setIndicadorTransferir(Integer indicadorTransferir) {
this.indicadorTransferir = indicadorTransferir;
}
@Column(name="IndicadorValidarFechaTrat")
public Integer getIndicadorValidarFechaTrat() {
return this.indicadorValidarFechaTrat;
}
public void setIndicadorValidarFechaTrat(Integer indicadorValidarFechaTrat) {
this.indicadorValidarFechaTrat = indicadorValidarFechaTrat;
}
@Column(name="IndRequiereCirugia")
public Integer getIndRequiereCirugia() {
return this.indRequiereCirugia;
}
public void setIndRequiereCirugia(Integer indRequiereCirugia) {
this.indRequiereCirugia = indRequiereCirugia;
}
@Column(name="LineaDocumentoRelacionado")
public Integer getLineaDocumentoRelacionado() {
return this.lineaDocumentoRelacionado;
}
public void setLineaDocumentoRelacionado(Integer lineaDocumentoRelacionado) {
this.lineaDocumentoRelacionado = lineaDocumentoRelacionado;
}
@Column(name="LineaFamilia")
public String getLineaFamilia() {
return this.lineaFamilia;
}
public void setLineaFamilia(String lineaFamilia) {
this.lineaFamilia = lineaFamilia;
}
@Column(name="LineaHospInicial")
public Integer getLineaHospInicial() {
return this.lineaHospInicial;
}
public void setLineaHospInicial(Integer lineaHospInicial) {
this.lineaHospInicial = lineaHospInicial;
}
@Column(name="LoteComponente")
public String getLoteComponente() {
return this.loteComponente;
}
public void setLoteComponente(String loteComponente) {
this.loteComponente = loteComponente;
}
@Column(name="ModoIngreso")
public Integer getModoIngreso() {
return this.modoIngreso;
}
public void setModoIngreso(Integer modoIngreso) {
this.modoIngreso = modoIngreso;
}
@Column(name="MotivoInterFase")
public Integer getMotivoInterFase() {
return this.motivoInterFase;
}
public void setMotivoInterFase(Integer motivoInterFase) {
this.motivoInterFase = motivoInterFase;
}
@Column(name="MotivoRechazo")
public String getMotivoRechazo() {
return this.motivoRechazo;
}
public void setMotivoRechazo(String motivoRechazo) {
this.motivoRechazo = motivoRechazo;
}
@Column(name="NumeroDocumento")
public String getNumeroDocumento() {
return this.numeroDocumento;
}
public void setNumeroDocumento(String numeroDocumento) {
this.numeroDocumento = numeroDocumento;
}
@Column(name="NumeroExpediente")
public Integer getNumeroExpediente() {
return this.numeroExpediente;
}
public void setNumeroExpediente(Integer numeroExpediente) {
this.numeroExpediente = numeroExpediente;
}
@Column(name="NumeroExpedienteBk")
public Integer getNumeroExpedienteBk() {
return this.numeroExpedienteBk;
}
public void setNumeroExpedienteBk(Integer numeroExpedienteBk) {
this.numeroExpedienteBk = numeroExpedienteBk;
}
@Column(name="NumeroOPC")
public Integer getNumeroOPC() {
return this.numeroOPC;
}
public void setNumeroOPC(Integer numeroOPC) {
this.numeroOPC = numeroOPC;
}
@Column(name="Observacion")
public String getObservacion() {
return this.observacion;
}
public void setObservacion(String observacion) {
this.observacion = observacion;
}
@Column(name="ObservacionHospitalizacion")
public String getObservacionHospitalizacion() {
return this.observacionHospitalizacion;
}
public void setObservacionHospitalizacion(String observacionHospitalizacion) {
this.observacionHospitalizacion = observacionHospitalizacion;
}
@Column(name="OrdenPerfil")
public Integer getOrdenPerfil() {
return this.ordenPerfil;
}
public void setOrdenPerfil(Integer ordenPerfil) {
this.ordenPerfil = ordenPerfil;
}
@Column(name="PeriodoEmision")
public Integer getPeriodoEmision() {
return this.periodoEmision;
}
public void setPeriodoEmision(Integer periodoEmision) {
this.periodoEmision = periodoEmision;
}
@Column(name="ProcedenciaComponente")
public String getProcedenciaComponente() {
return this.procedenciaComponente;
}
public void setProcedenciaComponente(String procedenciaComponente) {
this.procedenciaComponente = procedenciaComponente;
}
@Column(name="Proyecto")
public String getProyecto() {
return this.proyecto;
}
public void setProyecto(String proyecto) {
this.proyecto = proyecto;
}
@Column(name="Secuencia")
public Integer getSecuencia() {
return this.secuencia;
}
public void setSecuencia(Integer secuencia) {
this.secuencia = secuencia;
}
@Column(name="SecuenciaHCE")
public Integer getSecuenciaHCE() {
return this.secuenciaHCE;
}
public void setSecuenciaHCE(Integer secuenciaHCE) {
this.secuenciaHCE = secuenciaHCE;
}
@Column(name="SecuencialDocumentoRelacionado")
public Integer getSecuencialDocumentoRelacionado() {
return this.secuencialDocumentoRelacionado;
}
public void setSecuencialDocumentoRelacionado(Integer secuencialDocumentoRelacionado) {
this.secuencialDocumentoRelacionado = secuencialDocumentoRelacionado;
}
@Column(name="SecuencialInterfase")
public Integer getSecuencialInterfase() {
return this.secuencialInterfase;
}
public void setSecuencialInterfase(Integer secuencialInterfase) {
this.secuencialInterfase = secuencialInterfase;
}
@Column(name="SerieDocumentoRelacionado")
public String getSerieDocumentoRelacionado() {
return this.serieDocumentoRelacionado;
}
public void setSerieDocumentoRelacionado(String serieDocumentoRelacionado) {
this.serieDocumentoRelacionado = serieDocumentoRelacionado;
}
@Column(name="SerieOPC")
public String getSerieOPC() {
return this.serieOPC;
}
public void setSerieOPC(String serieOPC) {
this.serieOPC = serieOPC;
}
@Column(name="Situacion")
public Integer getSituacion() {
return this.situacion;
}
public void setSituacion(Integer situacion) {
this.situacion = situacion;
}
@Column(name="SituacionInterfase")
public Integer getSituacionInterfase() {
return this.situacionInterfase;
}
public void setSituacionInterfase(Integer situacionInterfase) {
this.situacionInterfase = situacionInterfase;
}
@Column(name="SituacionLineaHosp")
public Integer getSituacionLineaHosp() {
return this.situacionLineaHosp;
}
public void setSituacionLineaHosp(Integer situacionLineaHosp) {
this.situacionLineaHosp = situacionLineaHosp;
}
@Column(name="SituacionLineaHospPreAltaAdm")
public Integer getSituacionLineaHospPreAltaAdm() {
return this.situacionLineaHospPreAltaAdm;
}
public void setSituacionLineaHospPreAltaAdm(Integer situacionLineaHospPreAltaAdm) {
this.situacionLineaHospPreAltaAdm = situacionLineaHospPreAltaAdm;
}
@Column(name="SubFamilia")
public String getSubFamilia() {
return this.subFamilia;
}
public void setSubFamilia(String subFamilia) {
this.subFamilia = subFamilia;
}
@Column(name="Sucursal")
public String getSucursal() {
return this.sucursal;
}
public void setSucursal(String sucursal) {
this.sucursal = sucursal;
}
@Column(name="TipoComponente")
public String getTipoComponente() {
return this.tipoComponente;
}
public void setTipoComponente(String tipoComponente) {
this.tipoComponente = tipoComponente;
}
@Column(name="TipoDocumento")
public String getTipoDocumento() {
return this.tipoDocumento;
}
public void setTipoDocumento(String tipoDocumento) {
this.tipoDocumento = tipoDocumento;
}
@Column(name="TipoDocumentoRelacionado")
public String getTipoDocumentoRelacionado() {
return this.tipoDocumentoRelacionado;
}
public void setTipoDocumentoRelacionado(String tipoDocumentoRelacionado) {
this.tipoDocumentoRelacionado = tipoDocumentoRelacionado;
}
@Column(name="TipoHospitalizacion")
public Integer getTipoHospitalizacion() {
return this.tipoHospitalizacion;
}
public void setTipoHospitalizacion(Integer tipoHospitalizacion) {
this.tipoHospitalizacion = tipoHospitalizacion;
}
@Column(name="TipoInterConsulta")
public Integer getTipoInterConsulta() {
return this.tipoInterConsulta;
}
public void setTipoInterConsulta(Integer tipoInterConsulta) {
this.tipoInterConsulta = tipoInterConsulta;
}
@Column(name="TipoOPC")
public String getTipoOPC() {
return this.tipoOPC;
}
public void setTipoOPC(String tipoOPC) {
this.tipoOPC = tipoOPC;
}
@Column(name="TipoOrdenAtencion")
public Integer getTipoOrdenAtencion() {
return this.tipoOrdenAtencion;
}
public void setTipoOrdenAtencion(Integer tipoOrdenAtencion) {
this.tipoOrdenAtencion = tipoOrdenAtencion;
}
@Column(name="tipoordenatencion_bk")
public Integer getTipoordenatencionBk() {
return this.tipoordenatencionBk;
}
public void setTipoordenatencionBk(Integer tipoordenatencionBk) {
this.tipoordenatencionBk = tipoordenatencionBk;
}
@Column(name="TipoReceta")
public Integer getTipoReceta() {
return this.tipoReceta;
}
public void setTipoReceta(Integer tipoReceta) {
this.tipoReceta = tipoReceta;
}
@Column(name="TipoRelacion")
public String getTipoRelacion() {
return this.tipoRelacion;
}
public void setTipoRelacion(String tipoRelacion) {
this.tipoRelacion = tipoRelacion;
}
@Column(name="TipoTecnica")
public Integer getTipoTecnica() {
return this.tipoTecnica;
}
public void setTipoTecnica(Integer tipoTecnica) {
this.tipoTecnica = tipoTecnica;
}
@Column(name="UnidadOrganizacional")
public String getUnidadOrganizacional() {
return this.unidadOrganizacional;
}
public void setUnidadOrganizacional(String unidadOrganizacional) {
this.unidadOrganizacional = unidadOrganizacional;
}
@Column(name="UnidadReplicacionHCE")
public String getUnidadReplicacionHCE() {
return this.unidadReplicacionHCE;
}
public void setUnidadReplicacionHCE(String unidadReplicacionHCE) {
this.unidadReplicacionHCE = unidadReplicacionHCE;
}
@Column(name="UnidadReplicacionT")
public String getUnidadReplicacionT() {
return this.unidadReplicacionT;
}
public void setUnidadReplicacionT(String unidadReplicacionT) {
this.unidadReplicacionT = unidadReplicacionT;
}
@Column(name="UsuarioAutoriza")
public String getUsuarioAutoriza() {
return this.usuarioAutoriza;
}
public void setUsuarioAutoriza(String usuarioAutoriza) {
this.usuarioAutoriza = usuarioAutoriza;
}
@Column(name="UsuarioCreacion")
public String getUsuarioCreacion() {
return this.usuarioCreacion;
}
public void setUsuarioCreacion(String usuarioCreacion) {
this.usuarioCreacion = usuarioCreacion;
}
@Column(name="UsuarioModificacion")
public String getUsuarioModificacion() {
return this.usuarioModificacion;
}
public void setUsuarioModificacion(String usuarioModificacion) {
this.usuarioModificacion = usuarioModificacion;
}
}
|
[
"[email protected]"
] | |
f8f62c6dbe4f1102a66e1282e96de60f2295bed1
|
ee7cda7b96d6355c00e7f2ed85d1d35090f604a3
|
/src/com/irrienberith/picme/widget/ResizeBlock.java
|
809fd4d785541dbbb2524a64e92858db43fc1b8a
|
[] |
no_license
|
irrienberith/picme
|
7bfaca424cbab0ff29fdc572ec8f683c39e98fc3
|
6b2669aa06104485ec711e5ee11a6390926ed259
|
refs/heads/master
| 2016-09-05T10:48:36.976490 | 2014-12-04T11:37:33 | 2014-12-04T11:37:33 | null | 0 | 0 | null | null | null | null |
WINDOWS-1252
|
Java
| false | false | 487 |
java
|
package com.irrienberith.picme.widget;
import android.content.Context;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
/**
* Created by irrienberith on 14-11-19, ÏÂÎç5:00.
* All rights reserved.
*/
public class ResizeBlock extends FrameLayout {
private LinearLayout root;
public ResizeBlock(Context context) {
super(context);
}
private void initLayout(Context context){
root = new LinearLayout(context);
}
}
|
[
"[email protected]"
] | |
1db5813e12d98d1314d4eb629117d8c5c934c9a6
|
456bef059dab19106eefd0ed7437536f0e467792
|
/app/src/test/java/com/vache/exhibition/ExampleUnitTest.java
|
992540e7701b3041a934f9d499d0c37a689d5949
|
[] |
no_license
|
VacheMumchyan/Exhibition
|
765819c6359037f734d64edbca04b0e0fac4b639
|
90fdfe4188979ddddaddeff27f8ac48dbf32dbfe
|
refs/heads/master
| 2020-04-03T18:00:50.756478 | 2018-10-30T23:02:55 | 2018-10-30T23:02:55 | 155,467,574 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 398 |
java
|
package com.vache.exhibition;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"[email protected]"
] | |
f314e924325fe9a7d69e7156dd1cbba82ccaa634
|
4421d42ffe13f7b596c41b55ad4c9132d77c684a
|
/src/Books/BookSorter.java
|
b889cf44155b274af1275d6de0902a3ee7276c68
|
[] |
no_license
|
bdr1224/2201-swen-262-02-c-lbms
|
5b09e4ae8cdbe709e9e133548cbc83eb45cf08a1
|
fb3cb1350f0cea7156ca725f3c830e699b33aec8
|
refs/heads/master
| 2023-01-14T23:08:25.919409 | 2020-11-20T19:12:13 | 2020-11-20T19:12:13 | 297,370,829 | 1 | 0 | null | 2020-11-20T19:12:15 | 2020-09-21T14:49:05 |
Java
|
UTF-8
|
Java
| false | false | 181 |
java
|
package Books;
import java.util.List;
/**
* Strategy for sorting methods
*
* @author Owen Racette
*/
public interface BookSorter {
List<Book> sortBy(List<Book> book);
}
|
[
"[email protected]"
] | |
9f59f4bc901a3dcdfa04b8401db5d147e76cd926
|
eeb08544bfbb1308e021d16052832166b3963581
|
/src/main/java/mutithreading/p_q/Test.java
|
40f26076d5166dadcc7139d7185dbda76ad2ae46
|
[] |
no_license
|
ZacZhang/DesignPattern
|
6b2764d2c80512c465dd0cde97821958fb5f3443
|
345e7574e66430da2c537acea5961c2880b37ebf
|
refs/heads/master
| 2021-03-24T11:52:20.789746 | 2018-02-12T04:30:16 | 2018-02-12T04:30:16 | 115,146,882 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 289 |
java
|
package mutithreading.p_q;
public class Test {
public static void main(String[] args) {
Buffer buffer = new Buffer();
Producer p = new Producer(buffer);
Consumer c = new Consumer(buffer);
new Thread(p).start();
new Thread(c).start();
}
}
|
[
"[email protected]"
] | |
c274454d620980f9f761e6ecb09c0e84e227ce27
|
983213b697dae8028c4dfba4c0df2df0e4704ce9
|
/src/main/java/com/slyak/dynip/DynipReporterApplication.java
|
6a2fc51cbc74d66202357aba19271223fd48306d
|
[] |
no_license
|
stormning/dynip-reporter
|
71b04e527531d88e5358e9ec72be585fbb565fb9
|
ae069fedca69f921f983eba114e4ab0931f0702c
|
refs/heads/master
| 2021-01-10T03:31:35.178446 | 2015-10-10T01:36:33 | 2015-10-10T01:36:33 | 43,947,872 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 583 |
java
|
package com.slyak.dynip;
import com.slyak.dynip.util.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
@EnableConfigurationProperties({Config.class})
public class DynipReporterApplication {
public static void main(String[] args) {
SpringApplication.run(DynipReporterApplication.class, args);
}
}
|
[
"[email protected]"
] | |
0697654a58c4a595f475058555368ff6782a61ee
|
0b01ed4fb83f79b471978ebababfd32a49929998
|
/Java/brdowlin/TestAVLTree.java
|
713b71029a3724456d4d93bdc4b3ed76ab436040
|
[] |
no_license
|
bthomasd/git
|
91eca3e6b13980306ec4118a4ec3d0b982e890c3
|
804a39451db8744fd8a1180ecc3f1cfc62878eb3
|
refs/heads/master
| 2021-01-13T03:27:24.573744 | 2016-12-28T18:07:00 | 2016-12-28T18:07:00 | 77,546,174 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,160 |
java
|
// Name: Bradley Dowling
// CSU ID: 2657649
// CIS 265: Assignment 5
// Description: A test program for the AVLTree/AVLNode classes
import java.util.Scanner;
public class TestAVLTree {
public static void main(String[] args) {
AVLTree<Integer> avlTree = new AVLTree<Integer>(10);
Scanner input = new Scanner(System.in);
int userInput = 0;
System.out.println("Welcome to the AVLTree test program.");
System.out.println("This AVLTree is using Integer type and is rooted with a value of 10.");
do {
System.out.println("Please enter a selection.");
System.out.print("1) Insert an item into the tree.\n" +
"2) Search for an item in the tree.\n" +
"3) Get in-order traversal of tree.\n" +
"4) Get pre-order traversal of tree.\n" +
"5) Get post-order traversal of tree.\n" +
"6) Test toString().\n" +
"7) Quit\n" +
">>> ");
try {
userInput = input.nextInt();
if (userInput == 1) {
System.out.print("Please enter an integer value to insert: ");
userInput = input.nextInt();
avlTree.insert(userInput);
System.out.println("Inserted " + userInput + " into the AVL tree.");
}
else if (userInput == 2) {
System.out.print("Please enter the integer you want to locate: ");
AVLNode<Integer> temp = avlTree.search(input.nextInt());
if (temp == null) {
System.out.println("Element not found.");
} else {
System.out.println(temp);
}
}
else if (userInput == 3) {
System.out.println(avlTree.inOrderTraversal());
}
else if (userInput == 4) {
System.out.println(avlTree.preOrderTraversal());
}
else if (userInput == 5) {
System.out.println(avlTree.postOrderTraversal());
}
else if (userInput == 6) {
System.out.println(avlTree.toString());
}
else if (userInput == 7) {
System.out.println("Thank you for using the test program.");
}
else {
System.out.println("Please try another selection.");
}
} catch (Exception ex) {
System.out.println("An error occurred.");
input.next();
}
} while (userInput != 7);
System.out.println("Good bye.");
}
}
|
[
"[email protected]"
] | |
a2dd441707294379337a791b0c2000ba65209ce6
|
4e248845a15221dd26f6d82255596dba784cb057
|
/src/main/java/Duke/Command/ListCommand.java
|
1ea67425f82ac12ec6232e42e1e0cb3024a48453
|
[] |
no_license
|
namiwa/duke
|
63e4673e30bdef21f91b8d4e7fc8251995bb9f42
|
ff664bd1f88fb07f03afb944ab0d2464c06a8941
|
refs/heads/master
| 2020-07-05T05:29:13.595230 | 2019-09-12T01:38:04 | 2019-09-12T01:38:04 | 202,537,434 | 0 | 0 | null | 2019-08-15T12:30:51 | 2019-08-15T12:30:51 | null |
UTF-8
|
Java
| false | false | 949 |
java
|
package Duke.Command;
import Duke.Util.TaskList;
import Duke.Util.Storage;
import Duke.Util.Ui;
import Duke.Exceptions.DukeEmptyListException;
public class ListCommand extends Command {
public ListCommand() {
}
/**
* Takes in TaskList, Ui and Storage objects which then displays
* all the actively tracked Tasks in TaskList.
* @param tasks TaskList object containing current active taskList.
* @param ui Ui object containing all output methods to user.
* @param store Storage object which updates stored data.
*/
@Override
public void execute(TaskList tasks, Ui ui, Storage store) throws DukeEmptyListException {
boolean isEmpty = tasks.getTasks().isEmpty();
if (isEmpty) {
throw new DukeEmptyListException();
} else {
ui.printTaskList(tasks.getTasks());
}
}
@Override
public boolean isExit() {
return false;
}
}
|
[
"[email protected]"
] | |
ce8643bd52248a547892ea94151ea724de4d2d4a
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/trro/v20220325/models/ModifyProjectRequest.java
|
cb2519400575ea60583dd7b314a5c79e5ce575af
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 |
Apache-2.0
| 2023-09-13T02:42:03 | 2018-04-17T02:58:16 |
Java
|
UTF-8
|
Java
| false | false | 4,791 |
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.tencentcloudapi.trro.v20220325.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ModifyProjectRequest extends AbstractModel{
/**
* 目标修改项目的项目ID
*/
@SerializedName("ProjectId")
@Expose
private String ProjectId;
/**
* 修改后的项目名称,不填则不修改
*/
@SerializedName("ProjectName")
@Expose
private String ProjectName;
/**
* 修改后的项目描述,不填则不修改
*/
@SerializedName("ProjectDescription")
@Expose
private String ProjectDescription;
/**
* 修改后的权限模式,black为黑名单,white为白名单,不填则不修改
*/
@SerializedName("PolicyMode")
@Expose
private String PolicyMode;
/**
* Get 目标修改项目的项目ID
* @return ProjectId 目标修改项目的项目ID
*/
public String getProjectId() {
return this.ProjectId;
}
/**
* Set 目标修改项目的项目ID
* @param ProjectId 目标修改项目的项目ID
*/
public void setProjectId(String ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get 修改后的项目名称,不填则不修改
* @return ProjectName 修改后的项目名称,不填则不修改
*/
public String getProjectName() {
return this.ProjectName;
}
/**
* Set 修改后的项目名称,不填则不修改
* @param ProjectName 修改后的项目名称,不填则不修改
*/
public void setProjectName(String ProjectName) {
this.ProjectName = ProjectName;
}
/**
* Get 修改后的项目描述,不填则不修改
* @return ProjectDescription 修改后的项目描述,不填则不修改
*/
public String getProjectDescription() {
return this.ProjectDescription;
}
/**
* Set 修改后的项目描述,不填则不修改
* @param ProjectDescription 修改后的项目描述,不填则不修改
*/
public void setProjectDescription(String ProjectDescription) {
this.ProjectDescription = ProjectDescription;
}
/**
* Get 修改后的权限模式,black为黑名单,white为白名单,不填则不修改
* @return PolicyMode 修改后的权限模式,black为黑名单,white为白名单,不填则不修改
*/
public String getPolicyMode() {
return this.PolicyMode;
}
/**
* Set 修改后的权限模式,black为黑名单,white为白名单,不填则不修改
* @param PolicyMode 修改后的权限模式,black为黑名单,white为白名单,不填则不修改
*/
public void setPolicyMode(String PolicyMode) {
this.PolicyMode = PolicyMode;
}
public ModifyProjectRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ModifyProjectRequest(ModifyProjectRequest source) {
if (source.ProjectId != null) {
this.ProjectId = new String(source.ProjectId);
}
if (source.ProjectName != null) {
this.ProjectName = new String(source.ProjectName);
}
if (source.ProjectDescription != null) {
this.ProjectDescription = new String(source.ProjectDescription);
}
if (source.PolicyMode != null) {
this.PolicyMode = new String(source.PolicyMode);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamSimple(map, prefix + "ProjectName", this.ProjectName);
this.setParamSimple(map, prefix + "ProjectDescription", this.ProjectDescription);
this.setParamSimple(map, prefix + "PolicyMode", this.PolicyMode);
}
}
|
[
"[email protected]"
] | |
46d669ac6286f39853e6e5bbdae509790637fff7
|
0d71dd0aa1c7e336008f9da88e9ac10a5668fa19
|
/it.ltc.services.custom/src/main/java/it/ltc/services/custom/authentication/CustomAuthenticationProvider.java
|
5dcca6f6f19f1aa8bead1131a1f792c03e79a0f2
|
[] |
no_license
|
Dufler/webservices
|
6f27cd674b605bceded296cefb56006ec3ac50b8
|
2efecfe088f6d0d5c67ecdec3cacd92932ecc0d1
|
refs/heads/master
| 2022-12-24T14:52:16.132351 | 2019-06-04T13:31:32 | 2019-06-04T13:31:32 | 130,059,064 | 0 | 0 | null | 2022-12-16T05:12:30 | 2018-04-18T12:30:05 |
Java
|
UTF-8
|
Java
| false | false | 2,923 |
java
|
package it.ltc.services.custom.authentication;
import java.util.ArrayList;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Component;
import it.ltc.database.model.utente.UtenteUtenti;
import it.ltc.services.custom.controller.LoginController;
/**
* Classe atta all'autenticazione delle richieste fatte dagli utenti tramite BASIC AUTH su HTTP.
* @author Damiano
*
*/
@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
private static final ArrayList<Role> authorities = new ArrayList<Role>();
private static final String INVALID_CREDENTIALS = "Login fallito: username o password non validi.";
@Autowired
private LoginController loginManager;
// public CustomAuthenticationProvider() {
// loginManager = LoginController.getInstance();
// }
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
String username = authentication.getName();
String password = (String) authentication.getCredentials();
UtenteUtenti user = loginManager.getUserByUsernameAndPassword(username, password);
if (user == null)
throw new BadCredentialsException(INVALID_CREDENTIALS);
//throw new CustomException(INVALID_CREDENTIALS, 401);
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password, getAuthorities());
return token;
}
@Override
public boolean supports(Class<?> c) {
return true;
}
/**
* Questo metodo va cambiato per far restituire il giusto ruolo dell'utente:
* lato DB, tabella Utente: aggiungere la colonna 'ruolo', potrebbe contenere in chiaro una lista di ruoli separati da una virgola.
* lato DB, soluzione alternativa: fare tabella 'ruolo' e una join table con utente dove vengono indicati i ruoli attribuiti all'utente.
* qui: questo metodo deve accettare come argomento un'oggetto POJO Utente e ricavarne i ruoli, restituisce poi una Collection di Role
* qui, soluzione alternativa: l'oggetto POJO ruolo implementa l'interface di Role e lo soppianta del tutto.
* xml spring security: diversificare i path dove necessario in base ai ruoli definiti.
* TODO - implementare una delle due soluzioni.
* @return
*/
private static Collection<Role> getAuthorities() {
if (authorities.isEmpty()) {
authorities.add(new Role());
}
return authorities;
}
}
|
[
"Damiano@Damiano-PC"
] |
Damiano@Damiano-PC
|
196ef62a4b6013f902183996db03175c8a465327
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/domain/AlipayDataDataservicePropertyBusinesspropertyModifyModel.java
|
e30c96580445c505cc4d28e5be01a948cf53f097
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567 | 2023-08-22T14:54:57 | 2023-08-22T14:54:57 | 132,569,986 | 470 | 207 |
Apache-2.0
| 2022-12-25T07:37:40 | 2018-05-08T07:19:22 |
Java
|
UTF-8
|
Java
| false | false | 3,719 |
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 蚂蚁业务画像标签编辑
*
* @author auto create
* @since 1.0, 2019-10-16 21:35:53
*/
public class AlipayDataDataservicePropertyBusinesspropertyModifyModel extends AlipayObject {
private static final long serialVersionUID = 8839657253145164475L;
/**
* 业务负责人工号
*/
@ApiField("biz_owner_id")
private String bizOwnerId;
/**
* 业务画像消费类目id
*/
@ApiField("business_profile_category_id")
private String businessProfileCategoryId;
/**
* 业务画像标签id
*/
@ApiField("business_property_id")
private String businessPropertyId;
/**
* 创建人工号
*/
@ApiField("creator_id")
private String creatorId;
/**
* 数据负责人工号
*/
@ApiField("data_owner_id")
private String dataOwnerId;
/**
* 数据类型 NUMBER("数值型"), STRING("文本型"), DATE("日期型"), ENUM("枚举型"), LBS("经纬度类");
*/
@ApiField("data_type")
private String dataType;
/**
* 当数据类型为枚举型时,要指定枚举ID
*/
@ApiField("enum_id")
private String enumId;
/**
* 个性化信息,jsonarray字符串
*/
@ApiListField("personality_info")
@ApiField("string")
private List<String> personalityInfo;
/**
* 统计类型 ETL("ETL统计"), MODEL("模型预测")
*/
@ApiField("proc_type")
private String procType;
/**
* 标签描述
*/
@ApiField("property_desc")
private String propertyDesc;
/**
* 标签名称
*/
@ApiField("propery_name")
private String properyName;
/**
* 质量负责人工号
*/
@ApiField("quality_owner_id")
private String qualityOwnerId;
public String getBizOwnerId() {
return this.bizOwnerId;
}
public void setBizOwnerId(String bizOwnerId) {
this.bizOwnerId = bizOwnerId;
}
public String getBusinessProfileCategoryId() {
return this.businessProfileCategoryId;
}
public void setBusinessProfileCategoryId(String businessProfileCategoryId) {
this.businessProfileCategoryId = businessProfileCategoryId;
}
public String getBusinessPropertyId() {
return this.businessPropertyId;
}
public void setBusinessPropertyId(String businessPropertyId) {
this.businessPropertyId = businessPropertyId;
}
public String getCreatorId() {
return this.creatorId;
}
public void setCreatorId(String creatorId) {
this.creatorId = creatorId;
}
public String getDataOwnerId() {
return this.dataOwnerId;
}
public void setDataOwnerId(String dataOwnerId) {
this.dataOwnerId = dataOwnerId;
}
public String getDataType() {
return this.dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getEnumId() {
return this.enumId;
}
public void setEnumId(String enumId) {
this.enumId = enumId;
}
public List<String> getPersonalityInfo() {
return this.personalityInfo;
}
public void setPersonalityInfo(List<String> personalityInfo) {
this.personalityInfo = personalityInfo;
}
public String getProcType() {
return this.procType;
}
public void setProcType(String procType) {
this.procType = procType;
}
public String getPropertyDesc() {
return this.propertyDesc;
}
public void setPropertyDesc(String propertyDesc) {
this.propertyDesc = propertyDesc;
}
public String getProperyName() {
return this.properyName;
}
public void setProperyName(String properyName) {
this.properyName = properyName;
}
public String getQualityOwnerId() {
return this.qualityOwnerId;
}
public void setQualityOwnerId(String qualityOwnerId) {
this.qualityOwnerId = qualityOwnerId;
}
}
|
[
"auto-publish"
] |
auto-publish
|
b33a225c9d6431bd9f5a4f5f844b3d57aa4071e9
|
da73caf55972362aed72c2cc93e6afd3e8a422c5
|
/src/main/java/self_education/multithreading/Example_2.java
|
fa7eb798cc4d1aafeeb39e4b36ac6fac175774cf
|
[] |
no_license
|
Aleks1696/UA.training
|
9c32c609618fc9a59c1ccc0c7622dedbfb809c58
|
3e70636cedfd5428363d3ef2fa512db435a4ba4b
|
refs/heads/master
| 2020-04-22T05:24:10.925181 | 2019-03-30T23:41:00 | 2019-03-30T23:41:00 | 170,154,079 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,628 |
java
|
package self_education.multithreading;
import java.util.stream.Stream;
public class Example_2 {
public static void main(String[] args) throws InterruptedException {
Account account = new Account(3000);
Transaction[] transaction = new Transaction[]{
new Transaction(account, 2200),
new Transaction(account, 20),
new Transaction(account, 300),
new Transaction(account, 390),
new Transaction(account, 80)
};
Stream.of(transaction).forEach(Thread::start);
for (Transaction transaction1 : transaction) {
transaction1.join();
}
System.out.println("Balance: " + account.getMoney());
}
}
class Account {
private int money;
public Account(int money) {
this.money = money;
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
}
class Transaction extends Thread{
private Account account;
private int withdraw;
public Transaction(Account account, int withdraw) {
this.account = account;
this.withdraw = withdraw;
}
@Override
public void run() {
try {
Thread.sleep(300);
} catch (InterruptedException e) {
e.printStackTrace();
}
synchronized (account) {
System.out.println(Thread.currentThread().getId());
int total = account.getMoney();
if (total >= withdraw) {
account.setMoney(total - withdraw);
}
}
}
}
|
[
"[email protected]"
] | |
1176cbc3b658e71a1e268bf072c3c9dc438bfbaf
|
b5045a2387f3e48a3b61db3df0a473f053a83248
|
/androidlib/src/main/java/androidlib/image/utils/CloseableUtils.java
|
e4528deea13875d61e9b0da57c684573d313db06
|
[] |
no_license
|
lizhenxin111/OneMaterial
|
a0df0a82aeaf30c01131bc9bc34dadcddcf938dc
|
9e3c834c976e6670dc3f3723f05b7e41d5c9e83e
|
refs/heads/master
| 2021-08-30T21:14:24.936032 | 2017-12-19T12:51:25 | 2017-12-19T12:51:25 | 114,764,676 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 407 |
java
|
package androidlib.image.utils;
import java.io.Closeable;
import java.io.IOException;
/**
* Created by lizhe on 2017/10/24.
*/
public class CloseableUtils {
public static void close(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
"[email protected]"
] | |
7b6a58ffcc39c576dcc5438fd2232e7eb6db1c75
|
58845a249f668ed9958ea009a06c186ba1429ceb
|
/src/main/java/com/pharmacy/mock/model/responses/OrderResponse.java
|
cdbd289b1cebf9b3a4722611e26842652833cd45
|
[] |
no_license
|
istvan-olah/SmarthackMock2020
|
9785f3aee800037c73f6facb87edbf559c8e1286
|
9f03347da74f326b74e40da0eca15334a65c10a3
|
refs/heads/master
| 2023-01-11T17:25:54.385492 | 2020-11-01T11:00:01 | 2020-11-01T11:00:01 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 405 |
java
|
package com.pharmacy.mock.model.responses;
public class OrderResponse {
private OrderResponseStatus orderResponseStatus;
public OrderResponseStatus getOrderResponseStatus() {
return orderResponseStatus;
}
public OrderResponse setOrderResponseStatus(OrderResponseStatus orderResponseStatus) {
this.orderResponseStatus = orderResponseStatus;
return this;
}
}
|
[
"[email protected]"
] | |
e24cae992b969f0566fcfe58295e177498f444c7
|
47f365306fbcb0845e4a91f0ac6fbd006c8efd66
|
/FinancialManagement/src/cs/android/ddtc/mvp/presenters/LoginPresenter.java
|
5c0da312afee4628b46b5871a1d1e41d00f0f7f0
|
[] |
no_license
|
jbaek7023/FinancialManagement
|
d453fda92c98652a6610b04b77f018188502ce88
|
13290cda826c155eae708d69a2e769ea08f98bf7
|
refs/heads/master
| 2020-07-15T03:52:41.685702 | 2016-11-16T01:44:23 | 2016-11-16T01:44:23 | 73,872,318 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,882 |
java
|
package cs.android.ddtc.mvp.presenters;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import android.widget.Toast;
import cs.android.ddtc.mvp.Iviews.ILoginView;
import cs.android.ddtc.mvp.model.JSONParser;
import cs.android.ddtc.mvp.support.Constants;
public class LoginPresenter {
/** the view to manipulate */
private final ILoginView myView;
private final JSONParser myModel;
private ProgressDialog pDialog;
/**
* Make the presenter.
*
* @param view the view to use
*
*/
public LoginPresenter(ILoginView view, JSONParser model) {
myView = view;
myModel = model;
}
/**
* Handle a login button click in the ui. Just advance to the next screen,
* but don't do anything to the model.
*/
public void onLoginClick(String uid, String pass) {
new LoginUser(uid, pass).execute();
}
class LoginUser extends AsyncTask<String, String, String>{
String ID, PW;
public LoginUser(String uid, String pass) {
ID = uid;
PW = pass;
}
@Override
protected void onPreExecute(){
super.onPreExecute();
pDialog = new ProgressDialog((Context)myView);
pDialog.setMessage("Login Process. Please wait...");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
}
@Override
protected String doInBackground(String... arg0) {
// TODO Auto-generated method stub
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("ID", ID));
params.add(new BasicNameValuePair("PASSWORD", PW));
JSONObject json = myModel.makeHttpRequest(Constants.url_login, "GET", params);
Log.d("Get User Information", json.toString());
try{
int success = json.getInt(Constants.TAG_SUCCESS);
if(success == 1){
JSONArray userObj = json.getJSONArray("product");
JSONObject user = userObj.getJSONObject(0);
Log.d("ID", user.getString(Constants.TAG_ID));
Log.d("PW", user.getString(Constants.TAG_PASSWORD));
myView.advanceToaccount(ID);
}
else{
}
}catch(JSONException e){
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String file_url) {
pDialog.dismiss();
}
}
protected void success() {
Toast.makeText((Context) myView, "Login Success!",
Toast.LENGTH_LONG).show();
}
protected void fail() {
Toast.makeText((Context) myView, "Sorry, unrecognized username or password.",
Toast.LENGTH_LONG).show();
}
}
|
[
"[email protected]"
] | |
9ebda1d13880be42a2e325e716ee1b93de57485c
|
5e3cfc138ca45746cbd8ed1fc8eccaa59cd0840b
|
/Homeless/Android/Homeless_com.positivelymade.homeless_source_from_JADX/android/support/v4/view/ab.java
|
ac57b4458ec543beadff4a380388cc6318730c8d
|
[] |
no_license
|
ycourteau/PedagogiqueProjets
|
18011979f797bacd5f6b87bd6e6866ebc83752f9
|
7704cf3e431f34b408f874d908132af9aa498c7b
|
refs/heads/master
| 2021-06-27T21:30:17.028954 | 2019-05-08T17:26:29 | 2019-05-08T17:26:29 | 110,717,560 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 162 |
java
|
package android.support.v4.view;
import android.view.View;
class ab {
public static int m789a(View view) {
return view.getOverScrollMode();
}
}
|
[
"[email protected]"
] | |
3274fcf758d529ecb088108230cb0f5402023994
|
d8e3ef085111d1779d806ed558509053d49f9ffb
|
/db-services/db-user-service/src/main/java/com/qreal/wmp/db/user/exceptions/NotFoundException.java
|
ee38f78ee3fa7f85dfc56f529606c72463c1a07f
|
[
"Apache-2.0"
] |
permissive
|
gitter-badger/wmp
|
c46e05bed02fd0a9047642c6c30cac5bb2e28b34
|
a80e308e697689b669a6e3d7bb304e8a08c927b5
|
refs/heads/master
| 2021-01-11T01:49:23.740090 | 2016-10-05T17:05:58 | 2016-10-05T17:05:58 | 70,851,417 | 0 | 0 | null | 2016-10-13T21:56:28 | 2016-10-13T21:56:27 | null |
UTF-8
|
Java
| false | false | 353 |
java
|
package com.qreal.wmp.db.user.exceptions;
/** NotFound exception says that object was not found in DB.*/
public class NotFoundException extends Exception {
private final String id;
public NotFoundException(String id, String message) {
super(message);
this.id = id;
}
public String getId() {
return id;
}
}
|
[
"[email protected]"
] | |
7d4a8e0937876d0f350b4136f9aa0ef64aa80998
|
77fb90c41fd2844cc4350400d786df99e14fa4ca
|
/m/a/NoArgsConstructor.java
|
6e6fd5badf1d1d5d106352e7389289ce94dee00b
|
[] |
no_license
|
highnes7/umaang_decompiled
|
341193b25351188d69b4413ebe7f0cde6525c8fb
|
bcfd90dffe81db012599278928cdcc6207632c56
|
refs/heads/master
| 2020-06-19T07:47:18.630455 | 2019-07-12T17:16:13 | 2019-07-12T17:16:13 | 196,615,053 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 370 |
java
|
package m.a;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import m.a.b.c;
import m.a.javac.CommentInfo.StartConnection;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@c
public @interface NoArgsConstructor
{
CommentInfo.StartConnection when();
}
|
[
"[email protected]"
] | |
77bc369e06b402a268c25f7c539dd0fa17671130
|
f49aff2d03022b6fa9069c59a4cec4e9465da273
|
/app/src/main/java/com/cyc/newpai/ui/me/MyPropertyActivity.java
|
70690000a387f6dee81ec38dc07d15b206c0b5d9
|
[] |
no_license
|
syc8622374github/NewPai
|
7d6cd106875baad5a741d82f84a6d511e63479dd
|
491d50009958b06e957db53138b1b58b9b7c50c4
|
refs/heads/master
| 2020-03-21T02:39:29.723259 | 2018-09-15T03:28:12 | 2018-09-15T03:28:12 | 137,869,972 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,411 |
java
|
package com.cyc.newpai.ui.me;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import com.cyc.newpai.R;
import com.cyc.newpai.framework.base.BaseActivity;
import com.cyc.newpai.framework.base.BaseFragment;
public class MyPropertyActivity extends BaseActivity {
private TabLayout tabLayout;
private String[] shopCategorys = new String[]{"全部记录","收入","支出"};
@Override
public int getLayoutId() {
return R.layout.activity_my_property;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initView();
}
@Override
protected void initToolbar() {
super.initToolbar();
ctb_toolbar.tv_title.setTextColor(getResources().getColor(R.color.color_toolbar_title_black));
}
private void initView() {
tabLayout = findViewById(R.id.tbl_my_property_nav);
initTab();
}
private void initTab() {
tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
onTabItemSelected(tab.getPosition());
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
// 提供自定义的布局添加Tab
for(String title : shopCategorys){
tabLayout.addTab(tabLayout.newTab().setText(title));
}
}
private void onTabItemSelected(int position){
BaseFragment fragment = null;
switch (position){
case 0:
fragment = MyPropertyAllRecordFragment.newInstance(MyPropertyAllRecordFragment.TYPE_ALL_RECORD);
break;
case 1:
fragment = MyPropertyAllRecordFragment.newInstance(MyPropertyAllRecordFragment.TYPE_INCOME_RECORD);
break;
case 2:
fragment = MyPropertyAllRecordFragment.newInstance(MyPropertyAllRecordFragment.TYPE_PAY_RECORD);
break;
}
if(fragment !=null) {
getSupportFragmentManager().beginTransaction().replace(R.id.fl_my_property_container, fragment).commit();
}
}
}
|
[
"[email protected]"
] | |
9458959d1a7f22db90a7fdacfe0962dc650f9683
|
d5c95c56641e2652788ead0178961ee0b56f86d5
|
/backEnd/src/main/java/com/kockumation/backEnd/dockMaster/model/PontoonDataForMap.java
|
a2ca91e4c7edaaa332cc3a4fb4fc5e951a527e71
|
[] |
no_license
|
mohammedalmahfoodh/DockMaster-backEnd
|
dbc6496091d48ab7d2a82c30762845210d971885
|
d2e61b1628f7a2ab2b5d59b65772420c15ba4d74
|
refs/heads/master
| 2022-12-29T01:57:07.384435 | 2020-09-15T14:52:43 | 2020-09-15T14:52:43 | 285,838,543 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,140 |
java
|
package com.kockumation.backEnd.dockMaster.model;
public class PontoonDataForMap {
private int pontoon_id;
private int alarm_state;
private String alarm_date;
private String time_accepted;
private String time_retrieved;
private boolean alarm_active;
private String alarm_description;
private boolean acknowledged;
private String alarm_name;
private boolean inserted;
private boolean updateBlue;
private boolean updateRed;
private float xCoordinate ;
private float deflectionLimit;
private float offset;
private float currentDraft;
private float refDraft;
private String shipSide;
private float draftDifference ;
public float getDraftDifference() {
return draftDifference;
}
public void setDraftDifference(float draftDifference) {
this.draftDifference = draftDifference;
}
public String getShipSide() {
return shipSide;
}
public void setShipSide(String shipSide) {
this.shipSide = shipSide;
}
public PontoonDataForMap() {
updateRed = true;
updateBlue = true;
}
public float getCurrentDraft() {
return currentDraft;
}
public void setCurrentDraft(float currentDraft) {
this.currentDraft = currentDraft;
}
public float getRefDraft() {
return refDraft;
}
public void setRefDraft(float refDraft) {
this.refDraft = refDraft;
}
public float getOffset() {
return offset;
}
public void setOffset(float offset) {
this.offset = offset;
}
public float getDeflectionLimit() {
return deflectionLimit;
}
public void setDeflectionLimit(float deflectionLimit) {
this.deflectionLimit = deflectionLimit;
}
public float getxCoordinate() {
return xCoordinate;
}
public void setxCoordinate(float xCoordinate) {
this.xCoordinate = xCoordinate;
}
public int getPontoon_id() {
return pontoon_id;
}
public void setPontoon_id(int pontoon_id) {
this.pontoon_id = pontoon_id;
}
public int getAlarm_state() {
return alarm_state;
}
public void setAlarm_state(int alarm_state) {
this.alarm_state = alarm_state;
}
public String getAlarm_date() {
return alarm_date;
}
public void setAlarm_date(String alarm_date) {
this.alarm_date = alarm_date;
}
public String getTime_accepted() {
return time_accepted;
}
public void setTime_accepted(String time_accepted) {
this.time_accepted = time_accepted;
}
public String getTime_retrieved() {
return time_retrieved;
}
public void setTime_retrieved(String time_retrieved) {
this.time_retrieved = time_retrieved;
}
public boolean isAlarm_active() {
return alarm_active;
}
public void setAlarm_active(boolean alarm_active) {
this.alarm_active = alarm_active;
}
public String getAlarm_description() {
return alarm_description;
}
public void setAlarm_description(String alarm_description) {
this.alarm_description = alarm_description;
}
public boolean isAcknowledged() {
return acknowledged;
}
public void setAcknowledged(boolean acknowledged) {
this.acknowledged = acknowledged;
}
public String getAlarm_name() {
return alarm_name;
}
public void setAlarm_name(String alarm_name) {
this.alarm_name = alarm_name;
}
public boolean isInserted() {
return inserted;
}
public void setInserted(boolean inserted) {
this.inserted = inserted;
}
public boolean isUpdateBlue() {
return updateBlue;
}
public void setUpdateBlue(boolean updateBlue) {
this.updateBlue = updateBlue;
}
public boolean isUpdateRed() {
return updateRed;
}
public void setUpdateRed(boolean updateRed) {
this.updateRed = updateRed;
}
@Override
public String toString() {
return "PontoonDataForMap{" +
"pontoon_id=" + pontoon_id +
", alarm_state=" + alarm_state +
", alarm_date='" + alarm_date + '\'' +
", time_accepted='" + time_accepted + '\'' +
", time_retrieved='" + time_retrieved + '\'' +
", alarm_active=" + alarm_active +
", alarm_description='" + alarm_description + '\'' +
", acknowledged=" + acknowledged +
", alarm_name='" + alarm_name + '\'' +
", inserted=" + inserted +
", updateBlue=" + updateBlue +
", updateRed=" + updateRed +
", xCoordinate=" + xCoordinate +
", deflectionLimit=" + deflectionLimit +
", offset=" + offset +
", currentDraft=" + currentDraft +
", refDraft=" + refDraft +
", shipSide='" + shipSide + '\'' +
", draftDifference=" + draftDifference +
'}';
}
}
|
[
"[email protected]"
] | |
8d141d4a2e8447602003e4db5417b0585d5a77aa
|
6a0798e10ed95bc1eb279756084411f921168ef1
|
/code-base-core/src/main/java/com/wushengju/study/common/CommonConstant.java
|
b0355fee776956727ec9242c2e9b41744f66c520
|
[] |
no_license
|
wushengju/code-base-platform
|
26119f6b5cebc922edd22d8a315a33b52a91e4e7
|
7a835819e3e24cdb7bc913aab35dd1c7d1799e02
|
refs/heads/master
| 2021-06-24T20:31:03.429491 | 2020-04-24T02:14:34 | 2020-04-24T02:14:34 | 223,103,562 | 0 | 0 | null | 2021-04-22T19:06:01 | 2019-11-21T06:24:10 |
Java
|
UTF-8
|
Java
| false | false | 284 |
java
|
package com.wushengju.study.common;
/**
* 通用的常量
*
* @author Sunny
* @version 1.0
* @className CommonConstant
* @date 2019-11-21 20:03
*/
public class CommonConstant {
/** 默认的字符编码 **/
public static final String DEFAULT_CHARSET_NAME = "utf-8";
}
|
[
"[email protected]"
] | |
e260dd497ab2b750ccf78f8481417a05c942d618
|
80a8af61dda5e18d36e5c02862e95f617e7c6661
|
/src/ru/timick/keylogger/SimpleKeyLogger.java
|
ebc62aaf0ce6d9d1d9c39fcfb1dc2137f7342468
|
[] |
no_license
|
TimickRu/KeyLogger
|
8b6506b902817ff54bbcb0ca339099b83a9b5edc
|
b99d316f51156ff1224c646ddeaeb62febb1c6ef
|
refs/heads/master
| 2021-08-26T05:29:56.658014 | 2017-11-21T18:01:27 | 2017-11-21T18:01:27 | 111,583,667 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,945 |
java
|
package ru.timick.keylogger;
import javax.swing.JFrame;
public class SimpleKeyLogger {
/**
* panel which logs information about pressed keys
*/
LoggerPanel loggerPanel;
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
init();
}
});
}
/**
* init application: create window and register the key listeners
*/
private static void init() {
SimpleKeyLogger keyLogger = new SimpleKeyLogger();
keyLogger.createAndShowGUI();
keyLogger.initializeKeyListeners();
}
/**
* Create the GUI and show it.
*/
private void createAndShowGUI() {
// Create and set up the window.
JFrame frame = new JFrame("Key Logger");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Add contents to the window.
loggerPanel = new LoggerPanel();
frame.add(loggerPanel);
// Display the window.
frame.pack();
frame.setVisible(true);
loggerPanel.appendTextToPanel("--start logging--");
}
/**
* initialize listeners which will listen for key events
*/
private void initializeKeyListeners() {
new GlobalKeyListener().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent event) {
loggerPanel.appendTextToPanel(event.toString());
}
@Override
public void keyReleased(KeyEvent event) {
loggerPanel.appendTextToPanel(event.toString());
if (event.getVirtualKeyCode() == KeyEvent.VK_ADD && event.isCtrlPressed())
loggerPanel.appendTextToPanel("CTRL+ADD was just released (CTRL is still pressed)");
}
});
}
}
|
[
"[email protected]"
] | |
671ab64a896e576f23ccc1283e8363e70e42719e
|
e9affefd4e89b3c7e2064fee8833d7838c0e0abc
|
/aws-java-sdk-emrcontainers/src/main/java/com/amazonaws/services/emrcontainers/model/transform/DescribeVirtualClusterRequestMarshaller.java
|
68e28060f0e33849b1b81171f0640f3ffeeba056
|
[
"Apache-2.0"
] |
permissive
|
aws/aws-sdk-java
|
2c6199b12b47345b5d3c50e425dabba56e279190
|
bab987ab604575f41a76864f755f49386e3264b4
|
refs/heads/master
| 2023-08-29T10:49:07.379135 | 2023-08-28T21:05:55 | 2023-08-28T21:05:55 | 574,877 | 3,695 | 3,092 |
Apache-2.0
| 2023-09-13T23:35:28 | 2010-03-22T23:34:58 | null |
UTF-8
|
Java
| false | false | 2,077 |
java
|
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.emrcontainers.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.emrcontainers.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* DescribeVirtualClusterRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class DescribeVirtualClusterRequestMarshaller {
private static final MarshallingInfo<String> ID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PATH)
.marshallLocationName("virtualClusterId").build();
private static final DescribeVirtualClusterRequestMarshaller instance = new DescribeVirtualClusterRequestMarshaller();
public static DescribeVirtualClusterRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(DescribeVirtualClusterRequest describeVirtualClusterRequest, ProtocolMarshaller protocolMarshaller) {
if (describeVirtualClusterRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describeVirtualClusterRequest.getId(), ID_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
|
[
""
] | |
6169e2f441f9685dbdcbb601698818e07d82cfdc
|
202b2875f52e2481e435a1b2ac5d539d864855b9
|
/app/src/main/java/sovietPosterArt/utils/MathUtils.java
|
de482dbac3ed0dbb831507aead360bc1b4cd011c
|
[] |
no_license
|
RikNorakomi/SovietPosterArt
|
a61a1feccbbd90bc87dff392474fd3b01f4aa341
|
9a540094759c5ebe300ba1f074a7340882385077
|
refs/heads/master
| 2021-01-21T11:54:23.209307 | 2016-09-23T08:00:21 | 2016-09-23T08:00:21 | 53,043,265 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,732 |
java
|
package sovietPosterArt.utils;
/**
* Created by MEDION on 13-1-2016.
*/
public class MathUtils {
public static float constrain(float min, float max, float v) {
return Math.max(min, Math.min(max, v));
}
public static float interpolate(float x1, float x2, float f) {
return x1 + (x2 - x1) * f;
}
public static float uninterpolate(float x1, float x2, float v) {
if (x2 - x1 == 0) {
throw new IllegalArgumentException("Can't reverse interpolate with domain size of 0");
}
return (v - x1) / (x2 - x1);
}
public static int floorEven(int num) {
return num & ~0x01;
}
public static int roundMult4(int num) {
return (num + 2) & ~0x03;
}
public static boolean isEven(int num) {
return num % 2 == 0;
}
// divide two integers but round up
// see http://stackoverflow.com/a/7446742/102703
public static int intDivideRoundUp(int num, int divisor) {
int sign = (num > 0 ? 1 : -1) * (divisor > 0 ? 1 : -1);
return sign * (Math.abs(num) + Math.abs(divisor) - 1) / Math.abs(divisor);
}
public static float maxDistanceToCorner(int x, int y, int left, int top, int right, int bottom) {
float maxDistance = 0;
maxDistance = Math.max(maxDistance, (float) Math.hypot(x - left, y - top));
maxDistance = Math.max(maxDistance, (float) Math.hypot(x - right, y - top));
maxDistance = Math.max(maxDistance, (float) Math.hypot(x - left, y - bottom));
maxDistance = Math.max(maxDistance, (float) Math.hypot(x - right, y - bottom));
return maxDistance;
}
private MathUtils() {
}
}
|
[
"[email protected]"
] | |
7d5009db85aa43785ce024c5d86f1a93cc2f3aa5
|
262b91ee24fd9ff49aa0f74aa9f3867cb13b63e8
|
/Other/MBIT 2020 Fall/CMBIT.java
|
f575ffa23f808d70720df9d10eaad8463ffdedcc
|
[] |
no_license
|
Senpat/Competitive-Programming
|
ec169b1ed9ee85186768b72479b38391df9234b3
|
d13731811eb310fb3d839e9a8e8200975d926321
|
refs/heads/master
| 2023-06-23T01:25:35.209727 | 2023-06-15T02:55:48 | 2023-06-15T02:55:48 | 146,513,522 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,105 |
java
|
//make sure to make new file!
import java.io.*;
import java.util.*;
public class CMBIT{
public static void main(String[] args)throws IOException{
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
int n = Integer.parseInt(f.readLine());
StringTokenizer st1 = new StringTokenizer(f.readLine());
StringTokenizer st2 = new StringTokenizer(f.readLine());
int[] a = new int[n];
int[] b = new int[n];
int[] indexofa = new int[n+1];
for(int k = 0; k < n; k++){
a[k] = Integer.parseInt(st1.nextToken());
b[k] = Integer.parseInt(st2.nextToken());
indexofa[a[k]] = k;
}
long numbelow = 0L;
long numat = 0L;
long numabove = 0L;
long answer = 0L;
int[] rotfreq = new int[n];
for(int k = 0; k < n; k++){
if(k < indexofa[b[k]]){
numbelow++;
rotfreq[indexofa[b[k]]-k]++;
}
if(k == indexofa[b[k]]) numat++;
if(k > indexofa[b[k]]){
numabove++;
rotfreq[indexofa[b[k]]-k+n]++;
}
answer += (long)Math.abs(k-indexofa[b[k]]);
}
//out.println(answer);
long prevanswer = answer;
for(int k = 1; k < n; k++){
long curanswer = prevanswer;
curanswer -= numbelow;
curanswer += (numat + numabove);
numabove += numat;
numat = rotfreq[k];
numbelow -= numat;
//update last
numabove--;
numbelow++;
curanswer -= (long)Math.abs(n-indexofa[b[n-k]]);
curanswer += (long)indexofa[b[n-k]];
answer = Math.min(answer,curanswer);
prevanswer = curanswer;
//out.println(curanswer);
}
out.println(answer);
out.close();
}
}
|
[
"[email protected]"
] | |
daa93522e35cf3bb53c8675146fdd1420556ba66
|
173145c077f6d0bfdf59029b7e7063db4bb77f26
|
/app/src/main/java/com/mxkj/econtrol/widget/AbSlidingPlayView.java
|
0bc7cf3ea2618f5a5eee916eee797b26f9897611
|
[] |
no_license
|
heaofei/EControl
|
ab09dc662c7ec8f0a8bb57800937a551d98c83b7
|
38f0470248928217a3d07c6236bfb39f6706cb9a
|
refs/heads/master
| 2020-09-11T23:36:42.690348 | 2019-04-22T06:21:24 | 2019-04-22T06:21:24 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 13,396 |
java
|
/*
* Copyright (C) 2012 www.amsoft.cn
*
* 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.mxkj.econtrol.widget;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import java.util.ArrayList;
import java.util.List;
// TODO: Auto-generated Javadoc
/**
* © 2012 amsoft.cn
* 名称:AbPlayView
* 描述:可播放显示的View.
*
* @author 还如一梦中
* @version
* @date 2011-11-28
*/
public class AbSlidingPlayView extends LinearLayout {
/** 上下文. */
private Context context;
/** 内部的ViewPager. */
private AbInnerViewPager mViewPager;
/** 导航的布局. */
private LinearLayout navLinearLayout;
/** 导航布局参数. */
public LayoutParams navLayoutParams = null;
/** 计数. */
private int count, position;
/** 导航图片. */
private Drawable displayDrawable;
private Drawable hideDrawable;
/** 点击. */
private AbOnItemClickListener mOnItemClickListener;
/** 改变. */
private AbOnChangeListener mAbChangeListener;
/** 滚动. */
private AbOnScrollListener mAbScrolledListener;
/** 触摸. */
private AbOnTouchListener mAbOnTouchListener;
/** List views. */
private ArrayList<View> mListViews = null;
/** 适配器. */
private AbViewPagerAdapter mAbViewPagerAdapter = null;
/** 导航的点父View. */
private LinearLayout mNavLayoutParent = null;
/** 导航内容的对齐方式. */
private int navHorizontalGravity = Gravity.RIGHT;
/** 播放的方向. */
private int playingDirection = 0;
/** 播放的开关. */
private boolean play = false;
/**
* 创建一个AbSlidingPlayView.
*
* @param context the context
*/
public AbSlidingPlayView(Context context) {
super(context);
initView(context);
}
/**
* 从xml初始化的AbSlidingPlayView.
*
* @param context the context
* @param attrs the attrs
*/
public AbSlidingPlayView(Context context, AttributeSet attrs) {
super(context, attrs);
initView(context);
}
/**
* 描述:初始化这个View.
*
* @param context the context
*/
public void initView(Context context){
this.context = context;
navLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
this.setOrientation(LinearLayout.VERTICAL);
RelativeLayout mRelativeLayout = new RelativeLayout(context);
mViewPager = new AbInnerViewPager(context);
//手动创建的ViewPager,如果用fragment必须调用setId()方法设置一个id
// mViewPager.setId(1985);
//导航的点
mNavLayoutParent = new LinearLayout(context);
mNavLayoutParent.setPadding(0,5, 0, 5);
navLinearLayout = new LinearLayout(context);
navLinearLayout.setPadding(15, 1, 15, 1);
navLinearLayout.setVisibility(View.INVISIBLE);
mNavLayoutParent.addView(navLinearLayout,new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
lp1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,RelativeLayout.TRUE);
lp1.addRule(RelativeLayout.CENTER_HORIZONTAL,RelativeLayout.TRUE);
lp1.addRule(RelativeLayout.CENTER_VERTICAL,RelativeLayout.TRUE);
mRelativeLayout.addView(mViewPager,lp1);
RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
lp2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,RelativeLayout.TRUE);
mRelativeLayout.addView(mNavLayoutParent,lp2);
addView(mRelativeLayout,new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
mListViews = new ArrayList<View>();
mAbViewPagerAdapter = new AbViewPagerAdapter(context,mListViews);
mViewPager.setAdapter(mAbViewPagerAdapter);
mViewPager.setFadingEdgeLength(0);
mViewPager.setOnPageChangeListener(new OnPageChangeListener() {
@Override
public void onPageSelected(int position) {
makesurePosition();
onPageSelectedCallBack(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
onPageScrolledCallBack(position);
}
});
}
/**
* 创建导航点.
*/
public void creatIndex() {
//显示下面的点
navLinearLayout.removeAllViews();
mNavLayoutParent.setHorizontalGravity(navHorizontalGravity);
navLinearLayout.setGravity(Gravity.CENTER);
navLinearLayout.setVisibility(View.VISIBLE);
count = mListViews.size();
navLayoutParams.setMargins(5, 5, 5, 5);
navLayoutParams.width = 15;
navLayoutParams.height = 15;
for (int j = 0; j < count; j++) {
ImageView imageView = new ImageView(context);
imageView.setLayoutParams(navLayoutParams);
if (j == 0) {
imageView.setImageDrawable(displayDrawable);
} else {
imageView.setImageDrawable(hideDrawable);
}
//AbViewUtil.scaleView(imageView);
navLinearLayout.addView(imageView, j);
}
}
/**
* 定位点的位置.
*/
public void makesurePosition() {
position = mViewPager.getCurrentItem();
for (int j = 0; j < count; j++) {
if (position == j) {
((ImageView)navLinearLayout.getChildAt(position)).setImageDrawable(displayDrawable);
} else {
((ImageView)navLinearLayout.getChildAt(j)).setImageDrawable(hideDrawable);
}
}
}
/**
* 描述:添加可播放视图.
*
* @param view the view
*/
public void addView(View view){
mListViews.add(view);
if(view instanceof AbsListView){
}else{
view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(mOnItemClickListener!=null){
mOnItemClickListener.onClick(position);
}
}
});
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
if(mAbOnTouchListener!=null){
mAbOnTouchListener.onTouch(event);
}
return false;
}
});
}
mAbViewPagerAdapter.notifyDataSetChanged();
creatIndex();
}
/**
* 描述:添加可播放视图列表.
*
* @param views the views
*/
public void addViews(List<View> views){
mListViews.addAll(views);
for(View view:views){
view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(mOnItemClickListener!=null){
mOnItemClickListener.onClick(position);
}
}
});
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
if(mAbOnTouchListener!=null){
mAbOnTouchListener.onTouch(event);
}
return false;
}
});
}
mAbViewPagerAdapter.notifyDataSetChanged();
creatIndex();
}
/**
* 描述:删除可播放视图.
*
*/
@Override
public void removeAllViews(){
mListViews.clear();
mAbViewPagerAdapter.notifyDataSetChanged();
creatIndex();
}
/**
* 描述:设置页面切换事件.
*
* @param position the position
*/
public void onPageScrolledCallBack(int position) {
if(mAbScrolledListener!=null){
mAbScrolledListener.onScroll(position);
}
}
/**
* 描述:设置页面切换事件.
*
* @param position the position
*/
private void onPageSelectedCallBack(int position) {
if(mAbChangeListener!=null){
mAbChangeListener.onChange(position);
}
}
/** 用与轮换的 handler. */
private Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
if (msg.what==0) {
int count = mListViews.size();
int i = mViewPager.getCurrentItem();
if(playingDirection==0){
if(i == count-1){
playingDirection = -1;
i--;
}else{
i++;
}
}else{
if(i == 0){
playingDirection = 0;
i++;
}else{
i--;
}
}
mViewPager.setCurrentItem(i, true);
if(play){
handler.postDelayed(runnable, 5000);
}
}
}
};
/** 用于轮播的线程. */
private Runnable runnable = new Runnable() {
public void run() {
if(mViewPager!=null){
handler.sendEmptyMessage(0);
}
}
};
/**
* 描述:自动轮播.
*/
public void startPlay(){
if(handler!=null){
play = true;
handler.postDelayed(runnable, 5000);
}
}
/**
* 描述:自动轮播.
*/
public void stopPlay(){
if(handler!=null){
play = false;
handler.removeCallbacks(runnable);
}
}
/**
* 设置点击事件监听.
*
* @param onItemClickListener the new on item click listener
*/
public void setOnItemClickListener(AbOnItemClickListener onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
/**
* 描述:设置页面切换的监听器.
*
* @param abChangeListener the new on page change listener
*/
public void setOnPageChangeListener(AbOnChangeListener abChangeListener) {
mAbChangeListener = abChangeListener;
}
/**
* 描述:设置页面滑动的监听器.
*
* @param abScrolledListener the new on page scrolled listener
*/
public void setOnPageScrolledListener(AbOnScrollListener abScrolledListener) {
mAbScrolledListener = abScrolledListener;
}
/**
* 描述:设置页面Touch的监听器.
*
* @param abOnTouchListener the new on touch listener
*/
public void setOnTouchListener(AbOnTouchListener abOnTouchListener){
mAbOnTouchListener = abOnTouchListener;
}
/**
* 设置页的指示图标
*
* @param displayDrawable 选择状态图
* @param hideDrawable 未选择状态图
*/
public void setNavPageResources(int displayResId,int hideResId) {
this.displayDrawable = this.getResources().getDrawable(displayResId);
this.hideDrawable = this.getResources().getDrawable(hideResId);
creatIndex();
}
/**
* 描述:获取这个滑动的ViewPager类.
*
* @return the view pager
*/
public ViewPager getViewPager() {
return mViewPager;
}
/**
* 描述:获取当前的View的数量.
*
* @return the count
*/
public int getCount() {
return mListViews.size();
}
/**
* 描述:设置页显示条的位置,在AddView前设置.
*
* @param horizontalGravity the nav horizontal gravity
*/
public void setNavHorizontalGravity(int horizontalGravity) {
navHorizontalGravity = horizontalGravity;
}
/**
* 如果外层有ScrollView需要设置.
*
* @param parentScrollView the new parent scroll view
*/
public void setParentScrollView(ScrollView parentScrollView) {
this.mViewPager.setParentScrollView(parentScrollView);
}
/**
* 如果外层有ListView需要设置.
*
* @param parentListView the new parent list view
*/
public void setParentListView(ListView parentListView) {
this.mViewPager.setParentListView(parentListView);
}
/**
* 描述:设置导航点的背景.
*
* @param resid the new nav layout background
*/
public void setNavLayoutBackground(int resid){
navLinearLayout.setBackgroundResource(resid);
}
/**
* 监听器.
*
* @see AbOnChangeEvent
*/
public interface AbOnChangeListener {
/**
* 改变.
* @param position the position
*/
public void onChange(int position);
}
/**
* 条目点击接口.
*
* @see AbOnItemClickEvent
*/
public interface AbOnItemClickListener {
/**
* 描述:点击事件.
* @param position 索引
*/
public void onClick(int position);
}
/**
* 滚动.
*
* @see AbOnScrollEvent
*/
public interface AbOnScrollListener {
/**
* 滚动.
* @param arg1 返回参数
*/
public void onScroll(int arg1);
/**
* 滚动停止.
*/
public void onScrollStoped();
/**
* 滚到了最左边.
*/
public void onScrollToLeft();
/**
* 滚到了最右边.
*/
public void onScrollToRight();
}
/**
* 触摸屏幕接口.
*
* @see AbOnTouchEvent
*/
public interface AbOnTouchListener {
/**
* 描述:Touch事件.
*
* @param event 触摸手势
*/
public void onTouch(MotionEvent event);
}
}
|
[
"[email protected]"
] | |
b4f8543bc393d4492cd14537f9956482653d5434
|
c4a781b4fb9dc77cccdfb240b8677205fa2c86df
|
/ticketstore/src/main/java/com/projeto1/ticketstore/domain/validators/ValidEmail.java
|
e09a7a2995da80c1de6f3bcb90d68e94bfb707c4
|
[] |
no_license
|
Roneycacau/Decola_DesafioFinal
|
ee59b94be55421579179fe5a01b321186c6f4531
|
ea98985c78bbcaf06f17ada0551b256ff2094fd4
|
refs/heads/master
| 2021-09-14T18:11:17.389405 | 2021-08-12T19:27:39 | 2021-08-12T19:27:39 | 239,892,140 | 0 | 0 | null | 2021-08-12T19:27:40 | 2020-02-12T00:16:08 |
TypeScript
|
UTF-8
|
Java
| false | false | 621 |
java
|
package com.projeto1.ticketstore.domain.validators;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ FIELD })
@Retention(RUNTIME)
@Constraint(validatedBy = EmailValidator.class)
@Documented
public @interface ValidEmail {
String message() default "Invalid email";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
|
[
"[email protected]"
] | |
e4608bf13a9c6fbd9c56ae382d39cbaef8b0def5
|
776001872160ff1b7352f1edff44bead76f95603
|
/src/controllers/Recorder.java
|
1850a9cac6c5825c315991b30a60aa7d53f414bc
|
[] |
no_license
|
octo-kumo/QuickMacro
|
6f0ddfdb6557cc817f913709ca3a0202ca5d8856
|
ff22f46aa2cef54c686d490f8ccf062387d03693
|
refs/heads/main
| 2023-01-21T00:27:33.842605 | 2020-11-30T01:15:25 | 2020-11-30T01:15:25 | 317,077,952 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 27,289 |
java
|
package controllers;
import com.google.gson.Gson;
import com.google.gson.stream.JsonReader;
import com.sun.glass.events.MouseEvent;
import display.Editor;
import display.Settings;
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;
import org.jnativehook.mouse.NativeMouseEvent;
import org.jnativehook.mouse.NativeMouseListener;
import org.jnativehook.mouse.NativeMouseMotionListener;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Optional;
public class Recorder implements NativeKeyListener, NativeMouseListener, NativeMouseMotionListener {
private final Robot robot;
private final Timer timer;
public final ArrayList<MousePos> mousePositions;
public final ArrayList<Press> mousePresses;
public final ArrayList<Press> keyPresses;
public final ArrayList<ScreenState> screenStates;
private final ArrayList<Press> activeKeys;
private final ArrayList<Press> activeButtons;
private long startTime;
private int mouseIndex;
private int mousePressIndex;
private int keyIndex;
public long currentTime;
private final Editor editor;
public enum RecorderState {IDLE, RECORDING, PLAYING}
private RecorderState state = RecorderState.IDLE;
private int frameCounter = 0;
private Rectangle capture;
public Recorder(Editor editor) throws AWTException {
this.editor = editor;
mousePositions = new ArrayList<>();
keyPresses = new ArrayList<>();
mousePresses = new ArrayList<>();
screenStates = new ArrayList<>();
activeKeys = new ArrayList<>();
activeButtons = new ArrayList<>();
timer = new Timer(8, e -> update());
robot = new Robot();
try {
GlobalScreen.registerNativeHook();
} catch (NativeHookException ex) {
System.err.println("There was a problem registering the native hook.");
System.err.println(ex.getMessage());
System.exit(1);
}
GlobalScreen.addNativeMouseMotionListener(this);
GlobalScreen.addNativeKeyListener(this);
GlobalScreen.addNativeMouseListener(this);
if (!new File("./cache").exists()) new File("./cache").mkdir();
}
public void record() {
if (state != RecorderState.IDLE) return;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
capture = new Rectangle(0, 0, screenSize.width, screenSize.height);
state = RecorderState.RECORDING;
mouseIndex = 0;
mousePressIndex = 0;
keyIndex = 0;
startTime = System.currentTimeMillis();
mousePositions.clear();
keyPresses.clear();
mousePresses.clear();
timer.start();
}
private void update() {
currentTime = System.currentTimeMillis() - startTime;
if (state == RecorderState.PLAYING) {
execute();
editor.playbackCallback();
}
if (state == RecorderState.RECORDING) {
if (frameCounter % 5 == 0)
screenStates.add(new ScreenState(currentTime, resize(robot.createScreenCapture(capture))));
frameCounter++;
}
}
public static BufferedImage resize(BufferedImage img) {
Image tmp = img.getScaledInstance(img.getWidth() / 2, img.getHeight() / 2, Image.SCALE_FAST);
BufferedImage dimg = new BufferedImage(img.getWidth() / 2, img.getHeight() / 2, BufferedImage.TYPE_BYTE_GRAY);
Graphics2D g2d = dimg.createGraphics();
g2d.drawImage(tmp, 0, 0, null);
g2d.dispose();
return dimg;
}
public void execute() {
while (true) { // purely mouse genius
if (mouseIndex >= mousePositions.size() && keyIndex >= keyPresses.size() && mousePressIndex >= mousePresses.size() && activeKeys.size() == 0 && activeButtons.size() == 0) { // run out of stuff
state = RecorderState.IDLE;
break;
}
boolean stop = true;
if (mouseIndex < mousePositions.size()) {
MousePos mousePos = mousePositions.get(mouseIndex);
if (mousePos.time < currentTime) {
robot.mouseMove(mousePos.x, mousePos.y);
mouseIndex++;
stop = false;
}
}
if (keyIndex < keyPresses.size()) {
Press press = keyPresses.get(keyIndex);
if (press.time < currentTime) {
robot.keyPress(press.code);
activeKeys.add(press);
keyIndex++;
stop = false;
}
}
for (int i = activeKeys.size() - 1; i >= 0; i--) {
Press press = activeKeys.get(i);
if (press.time + press.duration < currentTime) {
robot.keyRelease(press.code);
activeKeys.remove(i);
}
}
if (mousePressIndex < mousePresses.size()) {
Press press = mousePresses.get(mousePressIndex);
if (press.time < currentTime) {
robot.mousePress(press.code);
activeButtons.add(press);
mousePressIndex++;
stop = false;
}
}
for (int i = activeButtons.size() - 1; i >= 0; i--) {
Press press = activeButtons.get(i);
if (press.time + press.duration < currentTime) {
robot.mouseRelease(press.code);
activeButtons.remove(i);
}
}
if (stop) break;
}
}
public void playBack() {
if (state != RecorderState.IDLE) return;
state = RecorderState.PLAYING;
mouseIndex = 0;
mousePressIndex = 0;
keyIndex = 0;
startTime = System.currentTimeMillis();
timer.start();
activeKeys.clear();
activeButtons.clear();
}
public void stop() {
state = RecorderState.IDLE;
timer.stop();
}
public void exit() {
try {
GlobalScreen.unregisterNativeHook();
} catch (NativeHookException e) {
e.printStackTrace();
}
}
public void nativeMouseDragged(NativeMouseEvent nativeMouseEvent) {
if (state == RecorderState.RECORDING) {
currentTime = System.currentTimeMillis() - startTime;
mousePositions.add(new MousePos(nativeMouseEvent.getPoint(), currentTime));
}
}
public void nativeMouseMoved(NativeMouseEvent nativeMouseEvent) {
if (state == RecorderState.RECORDING && (mousePositions.size() == 0 || mousePositions.get(mousePositions.size() - 1).dist2(nativeMouseEvent.getPoint()) > 2)) {
currentTime = System.currentTimeMillis() - startTime;
mousePositions.add(new MousePos(nativeMouseEvent.getPoint(), currentTime));
}
}
public void nativeKeyPressed(NativeKeyEvent nativeKeyEvent) {
if (state == RecorderState.RECORDING) {
currentTime = System.currentTimeMillis() - startTime;
keyPresses.add(new Press(translateKey(nativeKeyEvent.getKeyCode()), currentTime));
}
if (Settings.PLAY_KEY.accepts(nativeKeyEvent) && mousePositions.size() > 0) playBack();
else if (Settings.RECORD_KEY.accepts(nativeKeyEvent)) record();
if (Settings.STOP_KEY.accepts(nativeKeyEvent)) {
stop();
editor.update();
}
}
public void nativeKeyReleased(NativeKeyEvent nativeKeyEvent) {
if (state == RecorderState.RECORDING) {
currentTime = System.currentTimeMillis() - startTime;
int key = translateKey(nativeKeyEvent.getKeyCode());
Optional<Press> reduce = keyPresses.stream().filter(p -> p.code == key).reduce((first, second) -> second);
reduce.ifPresent(press -> press.duration = (int) (currentTime - press.time));
}
}
public void nativeMousePressed(NativeMouseEvent nativeMouseEvent) {
if (state == RecorderState.RECORDING) {
currentTime = System.currentTimeMillis() - startTime;
mousePresses.add(new Press(translateButton(nativeMouseEvent.getButton()), currentTime));
}
}
public void nativeMouseReleased(NativeMouseEvent nativeMouseEvent) {
if (state == RecorderState.RECORDING) {
currentTime = System.currentTimeMillis() - startTime;
int button = translateButton(nativeMouseEvent.getButton());
Optional<Press> reduce = mousePresses.stream().filter(p -> p.code == button).reduce((first, second) -> second);
reduce.ifPresent(press -> press.duration = (int) (currentTime - press.time));
}
}
public static class TimedObject {
public long time;
}
public static class ScreenState extends TimedObject {
public long time;
public ScreenState(long time, BufferedImage state) {
this.time = time;
try {
ImageIO.write(state, "png", new File("./cache/" + time + ".png"));
} catch (IOException e) {
e.printStackTrace();
}
}
public BufferedImage getImage() {
try {
return ImageIO.read(new File("./cache/" + time + ".png"));
} catch (IOException e) {
return null;
}
}
}
public static class MousePos extends TimedObject {
public int x, y;
public MousePos(Point point, long time) {
this.x = point.x;
this.y = point.y;
this.time = time;
}
public int dist2(Point other) {
return (other.x - x) * (other.x - x) + (other.y - y) * (other.y - y);
}
}
public static class Press extends TimedObject {
public int code;
public int duration;
public Press(int code, long start) {
this.code = code;
this.time = start;
}
}
public void saveToFile() {
Gson gson = new Gson();
JFileChooser fileChooser = new JFileChooser();
int result = fileChooser.showSaveDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try {
RecordedData object = new RecordedData(mousePositions, mousePresses, keyPresses);
FileWriter writer = new FileWriter(file);
gson.toJson(object, RecordedData.class, writer);
writer.flush();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public void openFromFile() {
JFileChooser fileChooser = new JFileChooser();
int result = fileChooser.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
openFromFile(file);
}
}
private static class RecordedData {
public ArrayList<MousePos> mousePositions;
public ArrayList<Press> mousePresses;
public ArrayList<Press> keyPresses;
public RecordedData() {
}
public RecordedData(ArrayList<MousePos> mousePositions, ArrayList<Press> mousePresses, ArrayList<Press> keyPresses) {
this.mousePositions = mousePositions;
this.mousePresses = mousePresses;
this.keyPresses = keyPresses;
}
}
public void openFromFile(File file) {
Gson gson = new Gson();
try {
RecordedData object = gson.fromJson(new JsonReader(new FileReader(file)), RecordedData.class);
this.mousePositions.clear();
this.mousePresses.clear();
this.keyPresses.clear();
this.mousePositions.addAll(object.mousePositions);
this.mousePresses.addAll(object.mousePresses);
this.keyPresses.addAll(object.keyPresses);
} catch (IOException e) {
e.printStackTrace();
}
}
public void nativeKeyTyped(NativeKeyEvent nativeKeyEvent) {
}
public void nativeMouseClicked(NativeMouseEvent nativeMouseEvent) {
}
public static int translateKey(int oldCode) {
int keyCode = KeyEvent.VK_UNDEFINED;
switch (oldCode) {
case NativeKeyEvent.VC_ESCAPE:
keyCode = KeyEvent.VK_ESCAPE;
break;
case NativeKeyEvent.VC_F1:
keyCode = KeyEvent.VK_F1;
break;
case NativeKeyEvent.VC_F2:
keyCode = KeyEvent.VK_F2;
break;
case NativeKeyEvent.VC_F3:
keyCode = KeyEvent.VK_F3;
break;
case NativeKeyEvent.VC_F4:
keyCode = KeyEvent.VK_F4;
break;
case NativeKeyEvent.VC_F5:
keyCode = KeyEvent.VK_F5;
break;
case NativeKeyEvent.VC_F6:
keyCode = KeyEvent.VK_F6;
break;
case NativeKeyEvent.VC_F7:
keyCode = KeyEvent.VK_F7;
break;
case NativeKeyEvent.VC_F8:
keyCode = KeyEvent.VK_F8;
break;
case NativeKeyEvent.VC_F9:
keyCode = KeyEvent.VK_F9;
break;
case NativeKeyEvent.VC_F10:
keyCode = KeyEvent.VK_F10;
break;
case NativeKeyEvent.VC_F11:
keyCode = KeyEvent.VK_F11;
break;
case NativeKeyEvent.VC_F12:
keyCode = KeyEvent.VK_F12;
break;
case NativeKeyEvent.VC_F13:
keyCode = KeyEvent.VK_F13;
break;
case NativeKeyEvent.VC_F14:
keyCode = KeyEvent.VK_F14;
break;
case NativeKeyEvent.VC_F15:
keyCode = KeyEvent.VK_F15;
break;
case NativeKeyEvent.VC_F16:
keyCode = KeyEvent.VK_F16;
break;
case NativeKeyEvent.VC_F17:
keyCode = KeyEvent.VK_F17;
break;
case NativeKeyEvent.VC_F18:
keyCode = KeyEvent.VK_F18;
break;
case NativeKeyEvent.VC_F19:
keyCode = KeyEvent.VK_F19;
break;
case NativeKeyEvent.VC_F20:
keyCode = KeyEvent.VK_F20;
break;
case NativeKeyEvent.VC_F21:
keyCode = KeyEvent.VK_F21;
break;
case NativeKeyEvent.VC_F22:
keyCode = KeyEvent.VK_F22;
break;
case NativeKeyEvent.VC_F23:
keyCode = KeyEvent.VK_F23;
break;
case NativeKeyEvent.VC_F24:
keyCode = KeyEvent.VK_F24;
break;
// End Function Keys
// Begin Alphanumeric Zone
case NativeKeyEvent.VC_BACKQUOTE:
keyCode = KeyEvent.VK_BACK_QUOTE;
break;
case NativeKeyEvent.VC_1:
keyCode = KeyEvent.VK_1;
break;
case NativeKeyEvent.VC_2:
keyCode = KeyEvent.VK_2;
break;
case NativeKeyEvent.VC_3:
keyCode = KeyEvent.VK_3;
break;
case NativeKeyEvent.VC_4:
keyCode = KeyEvent.VK_4;
break;
case NativeKeyEvent.VC_5:
keyCode = KeyEvent.VK_5;
break;
case NativeKeyEvent.VC_6:
keyCode = KeyEvent.VK_6;
break;
case NativeKeyEvent.VC_7:
keyCode = KeyEvent.VK_7;
break;
case NativeKeyEvent.VC_8:
keyCode = KeyEvent.VK_8;
break;
case NativeKeyEvent.VC_9:
keyCode = KeyEvent.VK_9;
break;
case NativeKeyEvent.VC_0:
keyCode = KeyEvent.VK_0;
break;
case NativeKeyEvent.VC_MINUS:
keyCode = KeyEvent.VK_MINUS;
break;
case NativeKeyEvent.VC_EQUALS:
keyCode = KeyEvent.VK_EQUALS;
break;
case NativeKeyEvent.VC_BACKSPACE:
keyCode = KeyEvent.VK_BACK_SPACE;
break;
case NativeKeyEvent.VC_TAB:
keyCode = KeyEvent.VK_TAB;
break;
case NativeKeyEvent.VC_CAPS_LOCK:
keyCode = KeyEvent.VK_CAPS_LOCK;
break;
case NativeKeyEvent.VC_A:
keyCode = KeyEvent.VK_A;
break;
case NativeKeyEvent.VC_B:
keyCode = KeyEvent.VK_B;
break;
case NativeKeyEvent.VC_C:
keyCode = KeyEvent.VK_C;
break;
case NativeKeyEvent.VC_D:
keyCode = KeyEvent.VK_D;
break;
case NativeKeyEvent.VC_E:
keyCode = KeyEvent.VK_E;
break;
case NativeKeyEvent.VC_F:
keyCode = KeyEvent.VK_F;
break;
case NativeKeyEvent.VC_G:
keyCode = KeyEvent.VK_G;
break;
case NativeKeyEvent.VC_H:
keyCode = KeyEvent.VK_H;
break;
case NativeKeyEvent.VC_I:
keyCode = KeyEvent.VK_I;
break;
case NativeKeyEvent.VC_J:
keyCode = KeyEvent.VK_J;
break;
case NativeKeyEvent.VC_K:
keyCode = KeyEvent.VK_K;
break;
case NativeKeyEvent.VC_L:
keyCode = KeyEvent.VK_L;
break;
case NativeKeyEvent.VC_M:
keyCode = KeyEvent.VK_M;
break;
case NativeKeyEvent.VC_N:
keyCode = KeyEvent.VK_N;
break;
case NativeKeyEvent.VC_O:
keyCode = KeyEvent.VK_O;
break;
case NativeKeyEvent.VC_P:
keyCode = KeyEvent.VK_P;
break;
case NativeKeyEvent.VC_Q:
keyCode = KeyEvent.VK_Q;
break;
case NativeKeyEvent.VC_R:
keyCode = KeyEvent.VK_R;
break;
case NativeKeyEvent.VC_S:
keyCode = KeyEvent.VK_S;
break;
case NativeKeyEvent.VC_T:
keyCode = KeyEvent.VK_T;
break;
case NativeKeyEvent.VC_U:
keyCode = KeyEvent.VK_U;
break;
case NativeKeyEvent.VC_V:
keyCode = KeyEvent.VK_V;
break;
case NativeKeyEvent.VC_W:
keyCode = KeyEvent.VK_W;
break;
case NativeKeyEvent.VC_X:
keyCode = KeyEvent.VK_X;
break;
case NativeKeyEvent.VC_Y:
keyCode = KeyEvent.VK_Y;
break;
case NativeKeyEvent.VC_Z:
keyCode = KeyEvent.VK_Z;
break;
case NativeKeyEvent.VC_OPEN_BRACKET:
keyCode = KeyEvent.VK_OPEN_BRACKET;
break;
case NativeKeyEvent.VC_CLOSE_BRACKET:
keyCode = KeyEvent.VK_CLOSE_BRACKET;
break;
case NativeKeyEvent.VC_BACK_SLASH:
keyCode = KeyEvent.VK_BACK_SLASH;
break;
case NativeKeyEvent.VC_SEMICOLON:
keyCode = KeyEvent.VK_SEMICOLON;
break;
case NativeKeyEvent.VC_QUOTE:
keyCode = KeyEvent.VK_QUOTE;
break;
case NativeKeyEvent.VC_ENTER:
keyCode = KeyEvent.VK_ENTER;
break;
case NativeKeyEvent.VC_COMMA:
keyCode = KeyEvent.VK_COMMA;
break;
case NativeKeyEvent.VC_PERIOD:
keyCode = KeyEvent.VK_PERIOD;
break;
case NativeKeyEvent.VC_SLASH:
keyCode = KeyEvent.VK_SLASH;
break;
case NativeKeyEvent.VC_SPACE:
keyCode = KeyEvent.VK_SPACE;
break;
// End Alphanumeric Zone
case NativeKeyEvent.VC_PRINTSCREEN:
keyCode = KeyEvent.VK_PRINTSCREEN;
break;
case NativeKeyEvent.VC_SCROLL_LOCK:
keyCode = KeyEvent.VK_SCROLL_LOCK;
break;
case NativeKeyEvent.VC_PAUSE:
keyCode = KeyEvent.VK_PAUSE;
break;
// Begin Edit Key Zone
case NativeKeyEvent.VC_INSERT:
keyCode = KeyEvent.VK_INSERT;
break;
case NativeKeyEvent.VC_DELETE:
keyCode = KeyEvent.VK_DELETE;
break;
case NativeKeyEvent.VC_HOME:
keyCode = KeyEvent.VK_HOME;
break;
case NativeKeyEvent.VC_END:
keyCode = KeyEvent.VK_END;
break;
case NativeKeyEvent.VC_PAGE_UP:
keyCode = KeyEvent.VK_PAGE_UP;
break;
case NativeKeyEvent.VC_PAGE_DOWN:
keyCode = KeyEvent.VK_PAGE_DOWN;
break;
// End Edit Key Zone
// Begin Cursor Key Zone
case NativeKeyEvent.VC_UP:
keyCode = KeyEvent.VK_UP;
break;
case NativeKeyEvent.VC_LEFT:
keyCode = KeyEvent.VK_LEFT;
break;
case NativeKeyEvent.VC_CLEAR:
keyCode = KeyEvent.VK_CLEAR;
break;
case NativeKeyEvent.VC_RIGHT:
keyCode = KeyEvent.VK_RIGHT;
break;
case NativeKeyEvent.VC_DOWN:
keyCode = KeyEvent.VK_DOWN;
break;
// End Cursor Key Zone
// Begin Numeric Zone
case NativeKeyEvent.VC_NUM_LOCK:
keyCode = KeyEvent.VK_NUM_LOCK;
break;
case NativeKeyEvent.VC_SEPARATOR:
keyCode = KeyEvent.VK_SEPARATOR;
break;
// End Numeric Zone
// Begin Modifier and Control Keys
case NativeKeyEvent.VC_SHIFT:
keyCode = KeyEvent.VK_SHIFT;
break;
case NativeKeyEvent.VC_CONTROL:
keyCode = KeyEvent.VK_CONTROL;
break;
case NativeKeyEvent.VC_ALT:
keyCode = KeyEvent.VK_ALT;
break;
case NativeKeyEvent.VC_META:
keyCode = KeyEvent.VK_META;
break;
case NativeKeyEvent.VC_CONTEXT_MENU:
keyCode = KeyEvent.VK_CONTEXT_MENU;
break;
// End Modifier and Control Keys
/* Begin Media Control Keys
case NativeKeyEvent.VC_POWER:
case NativeKeyEvent.VC_SLEEP:
case NativeKeyEvent.VC_WAKE:
case NativeKeyEvent.VC_MEDIA_PLAY:
case NativeKeyEvent.VC_MEDIA_STOP:
case NativeKeyEvent.VC_MEDIA_PREVIOUS:
case NativeKeyEvent.VC_MEDIA_NEXT:
case NativeKeyEvent.VC_MEDIA_SELECT:
case NativeKeyEvent.VC_MEDIA_EJECT:
case NativeKeyEvent.VC_VOLUME_MUTE:
case NativeKeyEvent.VC_VOLUME_UP:
case NativeKeyEvent.VC_VOLUME_DOWN:
case NativeKeyEvent.VC_APP_MAIL:
case NativeKeyEvent.VC_APP_CALCULATOR:
case NativeKeyEvent.VC_APP_MUSIC:
case NativeKeyEvent.VC_APP_PICTURES:
case NativeKeyEvent.VC_BROWSER_SEARCH:
case NativeKeyEvent.VC_BROWSER_HOME:
case NativeKeyEvent.VC_BROWSER_BACK:
case NativeKeyEvent.VC_BROWSER_FORWARD:
case NativeKeyEvent.VC_BROWSER_STOP:
case NativeKeyEvent.VC_BROWSER_REFRESH:
case NativeKeyEvent.VC_BROWSER_FAVORITES:
// End Media Control Keys */
// Begin Japanese Language Keys
case NativeKeyEvent.VC_KATAKANA:
keyCode = KeyEvent.VK_KATAKANA;
break;
case NativeKeyEvent.VC_UNDERSCORE:
keyCode = KeyEvent.VK_UNDERSCORE;
break;
//case VC_FURIGANA:
case NativeKeyEvent.VC_KANJI:
keyCode = KeyEvent.VK_KANJI;
break;
case NativeKeyEvent.VC_HIRAGANA:
keyCode = KeyEvent.VK_HIRAGANA;
break;
//case VC_YEN:
// End Japanese Language Keys
// Begin Sun keyboards
case NativeKeyEvent.VC_SUN_HELP:
keyCode = KeyEvent.VK_HELP;
break;
case NativeKeyEvent.VC_SUN_STOP:
keyCode = KeyEvent.VK_STOP;
break;
//case VC_SUN_FRONT:
//case VC_SUN_OPEN:
case NativeKeyEvent.VC_SUN_PROPS:
keyCode = KeyEvent.VK_PROPS;
break;
case NativeKeyEvent.VC_SUN_FIND:
keyCode = KeyEvent.VK_FIND;
break;
case NativeKeyEvent.VC_SUN_AGAIN:
keyCode = KeyEvent.VK_AGAIN;
break;
//case NativeKeyEvent.VC_SUN_INSERT:
case NativeKeyEvent.VC_SUN_COPY:
keyCode = KeyEvent.VK_COPY;
break;
case NativeKeyEvent.VC_SUN_CUT:
keyCode = KeyEvent.VK_CUT;
break;
}
return keyCode;
}
public static int translateModifier(int modifier) {
int result = 0;
if ((modifier & NativeKeyEvent.ALT_MASK) != 0) result |= 1 << 3;
if ((modifier & NativeKeyEvent.META_MASK) != 0) result |= 1 << 2;
if ((modifier & NativeKeyEvent.CTRL_MASK) != 0) result |= 1 << 1;
if ((modifier & NativeKeyEvent.SHIFT_MASK) != 0) result |= 1;
return result;
}
public static int translateButton(int oldCode) {
int code = MouseEvent.BUTTON_NONE;
switch (oldCode) {
case NativeMouseEvent.BUTTON1:
code = InputEvent.BUTTON1_MASK;
break;
case NativeMouseEvent.BUTTON2:
code = InputEvent.BUTTON2_MASK;
break;
case NativeMouseEvent.BUTTON3:
code = InputEvent.BUTTON3_MASK;
break;
}
return code;
}
}
|
[
"[email protected]"
] | |
16d24286f43900387afc1644e992e0df2cf9c895
|
b12af4bd1add331a483a4ed7594d7877ebd05e7b
|
/src/main/java/com/stackroute/MuzixApp/repository/TrackRepository.java
|
bb79b5260b2c32cb3150f94e0cddd9b3952c1882
|
[] |
no_license
|
vinayDalt/MuzixApp_mysql
|
b933810d11e1a10a540b3947ed2283d1cbb126f3
|
6d7a38ddb268d0a327cb7ebacb6f9dfe5694c629
|
refs/heads/master
| 2021-10-11T02:05:47.478051 | 2019-01-21T09:48:17 | 2019-01-21T09:48:17 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 329 |
java
|
package com.stackroute.MuzixApp.repository;
//import com.mongodb.Mongo;
import com.stackroute.MuzixApp.domain.Track;
import org.springframework.data.jpa.repository.JpaRepository;
//import org.springframework.data.mongodb.repository.MongoRepository;
public interface TrackRepository extends JpaRepository<Track,Integer> {
}
|
[
"[email protected]"
] | |
cc063bdefa0a563308aa87a51b18c99e9f3ea4ce
|
cf5c99dad755f20c54ae6a98d187353c66aaf96d
|
/src/codigo/clsUserType.java
|
fd4e4618f68a23f947b730aa851a49b0d6eb231a
|
[] |
no_license
|
miguelvillatarco/diariodigital
|
0f19ed2f06676598870d4dc87ab0edd88616fd38
|
808481034b96e0d0af7f34bcff66cf78570a5c98
|
refs/heads/master
| 2023-06-25T02:41:43.866782 | 2021-07-27T21:38:22 | 2021-07-27T21:38:22 | 299,335,508 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,242 |
java
|
package codigo;
import java.util.Date;
public class clsUserType {
private int id;
private String userType, description;
private Date createDate, deleteDate;
private String icon;
public clsUserType(int id, String userType, String description, Date createDate, Date deleteDate, String icon) {
this.id = id;
this.userType= userType;
this.description = description;
this.createDate = createDate;
this.deleteDate = deleteDate;
this.icon=icon;
}
public int getId() {
return this.id; }
public void setId(int id) {
this.id = id; }
public String getUserType() {
return this.userType; }
public void setUserType(String userType) {
this.userType = userType; }
public String getDescription() {
return this.description; }
public void setDescription(String description) {
this.description = description; }
public Date getCreateDate() {
return this.createDate; }
public void setCreateDate(Date createDate) {
this.createDate = createDate; }
public Date getDeleteDate() {
return this.deleteDate; }
public void setDeleDate(Date deleteDate) {
this.deleteDate = deleteDate; }
public String getIcon() {
return this.icon; }
public void setIcon(String icon) {
this.icon = icon; }
}
|
[
"[email protected]"
] | |
838211ea2b632d311ee5e802c4ef39af843ddb55
|
4f36d00c74329991ea3cb4dd550bc3afd84a0c45
|
/TestThread/src/com/ldu/thread/TestWindows1.java
|
bb3d93463fa9be6e9567982f7bec1cf2e79335f1
|
[] |
no_license
|
Snail-404/java
|
6b9ea18f58eee25823d6c6c3d78ad8b42109536f
|
2fadb83da47099d22b22aff3c16effe8bc8f514e
|
refs/heads/master
| 2021-07-02T10:36:51.343473 | 2017-09-23T07:18:33 | 2017-09-23T07:18:33 | 104,549,047 | 0 | 0 | null | null | null | null |
GB18030
|
Java
| false | false | 1,018 |
java
|
package com.ldu.thread;
public class TestWindows1 {
public static void main(String[] args) {
Window1 win = new Window1();
Thread t1 = new Thread(win);
Thread t2 = new Thread(win);
Thread t3 = new Thread(win);
t1.setName("窗口1");
t2.setName("窗口2");
t3.setName("窗口3");
t1.start();
t2.start();
t3.start();
}
}
class Window1 implements Runnable {
int ticket = 100;
// Object obj = new Object();
// 同步方法
/*
* @Override public void run() { while(true){ show(); if (ticket<=0) {
* break; } }
* System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"); }
*
* public synchronized void show(){ if (ticket > 0) {
* System.out.println(Thread.currentThread().getName() + "售票:" + ticket--);
* } }
*/
// 同步方法块
@Override
public void run() {
while (true) {
synchronized (this) {
if (ticket > 0) {
System.out.println(Thread.currentThread().getName() + "售票:"
+ ticket--);
} else
break;
}
}
}
}
|
[
"[email protected]"
] | |
df1e3e406c01e5dad2f1f824d89e2cee17c9863e
|
fec54e88b847d6ba73cd2393aca3d4bf16a2ed54
|
/Java/File Handling/write.java
|
0a774bbe2e75a75ad7fbb12f92627d068b09008f
|
[] |
no_license
|
Avik-18/Basic-Codes-of-Labs
|
2d379f2b348d699318ab13144b6e1561834d0a40
|
21b5d24fc90bcf13e2b6e0e941255441993bd7dd
|
refs/heads/main
| 2023-02-14T03:12:37.253630 | 2021-01-12T07:26:50 | 2021-01-12T07:26:50 | 300,845,303 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,935 |
java
|
import java.util.*;
import java.lang.*;
import java.io.*;
public class write
{
public static void main (String[] args)throws IOException
{
Scanner sc=new Scanner(System.in);
String id,na;
int n,price;
System.out.print("Enter the no of items ");
n=sc.nextInt();
sc.nextLine();
File f1=new File("item.txt");
if(f1.exists())
{
FileWriter fout=new FileWriter("item.txt",true);
BufferedWriter ffout=new BufferedWriter(fout);
PrintWriter ob=new PrintWriter(ffout);
for(int i=1;i<=n;i++)
{
System.out.print("Enter id : ");
id=sc.nextLine();
id=id.toUpperCase();
System.out.print("Enter item name : ");
na=sc.nextLine();
na=na.toUpperCase();
System.out.print("Enter price : ");
price=sc.nextInt();
sc.nextLine();
ob.println(id);
ob.println(na);
ob.println(price);
}
ob.close();
}
else
{
FileWriter fout=new FileWriter("item.txt");
BufferedWriter ffout=new BufferedWriter(fout);
PrintWriter ob=new PrintWriter(ffout);
for(int i=1;i<=n;i++)
{
System.out.print("Enter id : ");
id=sc.nextLine();
id=id.toUpperCase();
System.out.print("Enter item name : ");
na=sc.nextLine();
na=na.toUpperCase();
System.out.print("Enter price : ");
price=sc.nextInt();
sc.nextLine();
ob.println(id);
ob.println(na);
ob.println(price);
}
ob.close();
}
}
}
|
[
"[email protected]"
] | |
374993b08eef00da2539400bbfbf2b645b9b8ce3
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/h/g/d/Calc_1_2_7630.java
|
3878f9a5ca7b3f0398e2a8d71459da32f8b9c6d4
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 131 |
java
|
package h.g.d;
public class Calc_1_2_7630 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"[email protected]"
] | |
b0b0a7b993aa500cc6f93220aaa3b9febbfd474b
|
58ea72a5a4171878ffbc59d95921e4e911a840a7
|
/src/test/java/org/greencheek/web/filter/memcached/util/SplittingCharSeparatedValueSorterTest.java
|
ef52fba240079eb9b8adff6a033d5f04512b42bd
|
[
"Apache-2.0"
] |
permissive
|
helpying/tomcat-memcached-response-filter
|
559fe5d5e681559b30164af9355f5b25fdef7e17
|
02294944b25cdc9a9cfa6e7faa3cc14bf516c2b3
|
refs/heads/master
| 2021-01-21T08:43:21.348240 | 2014-06-16T06:10:17 | 2014-06-16T06:10:17 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,160 |
java
|
package org.greencheek.web.filter.memcached.util;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class SplittingCharSeparatedValueSorterTest {
private CharSeparatedValueSorter sorter;
@Before
public void setUp() {
sorter = new SplittingCharSeparatedValueSorter(new CustomSplitByChar(),new CustomJoinByChar());
}
@Test
public void testSortEmptyString() {
assertEquals("",sorter.sort("",','));
}
@Test
public void testSortNullString() {
assertEquals("",sorter.sort(null,','));
}
@Test
public void testSortString() {
assertEquals("a,b",sorter.sort("b,a",','));
}
@Test
public void testSortStringDifferentChar() {
assertEquals("a;b",sorter.sort("b;a",';'));
}
@Test
public void testSortStringWrongChar() {
assertEquals("b,a",sorter.sort("b,a",';'));
}
@Test
public void testStringNoChar() {
assertEquals("a",sorter.sort("a",','));
}
@Test
public void testStringWithMultipleItems() {
assertEquals("a,a,b,c,f,z",sorter.sort("a,c,f,b,a,z",','));
}
}
|
[
"[email protected]"
] | |
b3eb6ae377e936c2a3bfd3fb6233a108dc855bd9
|
82e2fa3b1128edc8abd2bd84ecfc01c932831bc0
|
/jena-arq/src/main/java/org/apache/jena/riot/thrift/RiotThriftException.java
|
13e3ebae170a4d56f4f91caea8ba34afe7f8d901
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
apache/jena
|
b64f6013582f2b5aa38d1c9972d7b14e55686316
|
fb41e79d97f065b8df9ebbc6c69b3f983b6cde04
|
refs/heads/main
| 2023-08-14T15:16:21.086308 | 2023-08-03T08:34:08 | 2023-08-03T08:34:08 | 7,437,073 | 966 | 760 |
Apache-2.0
| 2023-09-02T09:04:08 | 2013-01-04T08:00:32 |
Java
|
UTF-8
|
Java
| false | false | 1,251 |
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.riot.thrift;
import org.apache.jena.riot.RiotException ;
public class RiotThriftException extends RiotException {
public RiotThriftException() { super() ; }
public RiotThriftException(String msg) { super(msg) ; }
public RiotThriftException(Throwable th) { super(th) ; }
public RiotThriftException(String msg, Throwable th) { super(msg, th) ; }
}
|
[
"[email protected]"
] | |
27740e95df7f9762b8a059be0d9a8db858c4bec6
|
02fd2beae3d70efc85902832fc760784337c3a72
|
/app/src/test/java/de/kaiwidmaier/travelplanner/ExampleUnitTest.java
|
7bfa54051c1121f900cef300fbd58966400f5628
|
[] |
no_license
|
RealityTest/TravelPlanner
|
29e8dead87aafe74c429150fdccd7cbbd816652f
|
e4e8f939c6a828841198362c862ecf391b785441
|
refs/heads/master
| 2020-03-27T11:38:10.727366 | 2018-09-02T11:53:26 | 2018-09-02T11:53:26 | 143,146,784 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 380 |
java
|
package de.kaiwidmaier.travelplanner;
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);
}
}
|
[
"[email protected]"
] | |
40b99de2612738f85aff203983572dbb42bd2c1c
|
7cc0b062265c53da9c2d1f399dd94b2975587b58
|
/retrofit/src/test/java/com/dasu/okhttp/ExampleUnitTest.java
|
171b24f0d8a1eb8d8adc76dc4c2f6668c13287d7
|
[
"Apache-2.0"
] |
permissive
|
msdgwzhy6/base-module
|
27ede99f12dab35220bda585e0621c3e60e285d7
|
655001edbd032ec6fff24177f1a0aae51076df28
|
refs/heads/master
| 2020-04-02T20:01:59.238995 | 2018-10-23T09:29:27 | 2018-10-23T09:29:27 | 154,755,571 | 1 | 0 |
Apache-2.0
| 2018-10-26T00:41:07 | 2018-10-26T00:41:07 | null |
UTF-8
|
Java
| false | false | 409 |
java
|
package com.dasu.okhttp;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"[email protected]"
] | |
37718364ef3e161c007225290ec4605f4ac9846c
|
6ca67df64382f612d1e51ab485a37507607a2239
|
/src/methods/PlayerMethodsSql.java
|
7d0bfa0ef3b0790b04c7502bf73bc3a2325a4434
|
[] |
no_license
|
Stock3/Player
|
62e9d48aa091adf6a21ae6c7cbb815902f571e27
|
191ad02806154221b8ef3d829d99cf5a266fe2fa
|
refs/heads/master
| 2021-08-28T11:52:38.323315 | 2017-12-12T05:05:14 | 2017-12-12T05:05:14 | 113,945,320 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,633 |
java
|
package methods;
import models.Player;
import models.Position;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
public class PlayerMethodsSql {
private GenericProviderSql<Player> genericProvider;
public PlayerMethodsSql(){
try {
genericProvider = new GenericProviderSql<Player>();
} catch (Exception e) {
e.printStackTrace();
}
}
//перетворення результату виконання запиту в ArrayList
private static ArrayList<Player> mappingListResult(ResultSet result) throws SQLException {
ArrayList<Player> list = new ArrayList<Player>();
Player player = new Player();
try {
while (result.next()) {
player.setId(result.getInt(1));
player.setFirstName(result.getString(2));
player.setLastName(result.getString(3));
player.setDateOfBirthday(LocalDate.parse(result.getString(4)));
player.setPosistions((List<Position>) result.getArray(5));
list.add(new Player(player.getId(), player.getFirstName(), player.getLastName(), player.getDateOfBirthday(), player.getPosistions()));
}
} finally {
if (result != null) {
result.close();
}
}
return list;
}
public void createPlayer(Player player){
try {
genericProvider.execute("call CreatePlayer", new Object[]{player.getFirstName(), player.getLastName(), player.getDateOfBirthday(), player.getPosistions().stream().findFirst().get().getId()});
} catch (SQLException e) {
e.printStackTrace();
}
}
//метод який поверне список гравців по заданій позиції
public List<Player> getPlayerList(Position position) {
List<Player> playerList = new ArrayList<Player>();
try {
playerList = mappingListResult(genericProvider.getList("call GetPlayerListByPosition", new Object[]{position.getId()}));
} catch (SQLException e) {
e.printStackTrace();
}
return playerList;
}
public ArrayList<Player> getYearForPlayer(int year){
ArrayList<Player> playerList = new ArrayList<Player>();
try {
playerList = mappingListResult(genericProvider.getList("call GetYearForPlayer", new Object[]{year}));
} catch (SQLException e) {
e.printStackTrace();
}
return playerList;
}
}
|
[
"[email protected]"
] | |
dec1fc6053c5b488834997e3c3aa6605e6eba5cb
|
7947a48f7fff4a3c3826d8e267555ba53a45060b
|
/src/main/java/com/github/hgwood/fanfaron/Definitions.java
|
370def0fa998bccb6d48b095107c6a778bf5017f
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
hgwood/fanfaron
|
dc5b0eb59dbf8c4ee8023bdf89f9bd0146db576c
|
0dbf2a887f43b52a21dd60a68f682041b255e566
|
refs/heads/master
| 2021-01-18T18:32:25.848898 | 2016-01-10T23:37:20 | 2016-01-10T23:37:20 | 41,328,938 | 8 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 419 |
java
|
package com.github.hgwood.fanfaron;
import com.github.hgwood.fanfaron.utils.DynamicObject;
import java.util.Map;
/**
* https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#definitionsObject
*/
public class Definitions extends DynamicObject<Schema> {
public Definitions(Map<String, Schema> definitions) {
super(definitions);
}
public Definitions() {
super();
}
}
|
[
"[email protected]"
] | |
7fd2176015ca0a75de4170159880d74463680eb1
|
d4255338416fa568bf7123d209c6a75f8c772ee4
|
/src/pattern/creational/factory/document/DocumentApplication.java
|
2247678b80fe112d4d290834e03154c445d5ea6a
|
[
"MIT"
] |
permissive
|
nans/programming-basics
|
a0e93deb798628d739a7180e10a06c1c647b6d00
|
777253888188cb934e3066caf3888f5ec0eb390a
|
refs/heads/master
| 2021-01-17T18:57:55.875011 | 2018-03-05T10:00:59 | 2018-03-05T10:00:59 | 94,070,053 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 503 |
java
|
package pattern.creational.factory.document;
public class DocumentApplication {
public DocumentApplication() {
DocumentFactory documentFactory = new DocumentFactory();
Document newContract = documentFactory.makeDocumentByType("contract");
newContract.setText("Contract text.");
newContract.printContent();
Document newCheck = documentFactory.makeDocumentByType("check");
newCheck.setText("Check content.");
newCheck.printContent();
}
}
|
[
"[email protected]"
] | |
17b750362b1c8cec42ed74cbf0bc9ba18c6a8bb2
|
1a8137ee60dad3e6130040524db50ce51b31dbff
|
/modules/HarvesterModule/src/main/java/gg/steve/mc/tp/modules/harvester/HarvesterModule.java
|
82f91d52f488fccb1b82c94af093a478684ceb78
|
[] |
no_license
|
nbdSteve/ToolsPlus-development
|
d7d249a52ae521b51ba229fb4b84c5bfd99f97a5
|
d387e0bc78479f341d9e5e340aa1ce3216b645c2
|
refs/heads/master
| 2023-06-25T16:36:30.668935 | 2021-07-25T04:52:47 | 2021-07-25T04:52:47 | 179,775,260 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,752 |
java
|
package gg.steve.mc.tp.modules.harvester;
import gg.steve.mc.tp.framework.yml.PluginFile;
import gg.steve.mc.tp.module.ToolsPlusModule;
import gg.steve.mc.tp.framework.nbt.NBTItem;
import gg.steve.mc.tp.modules.harvester.tool.HarvesterHoe;
import gg.steve.mc.tp.modules.harvester.tool.HarvesterHoeData;
import gg.steve.mc.tp.tool.AbstractTool;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Listener;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HarvesterModule extends ToolsPlusModule {
public static String moduleId = "HARVESTER";
public static String moduleConfigId = "HARVESTER_CONFIG";
public HarvesterModule() {
super(moduleId);
setNiceName("Harvester Hoe");
}
@Override
public String getVersion() {
return "2.0.0-PR1";
}
@Override
public String getAuthor() {
return "stevegoodhill";
}
@Override
public List<Listener> getListeners() {
return new ArrayList<>();
}
@Override
public PlaceholderExpansion getPlaceholderExpansion() {
return null;
}
@Override
public AbstractTool loadTool(NBTItem nbtItem, PluginFile pluginFile) {
return new HarvesterHoe(nbtItem, pluginFile);
}
@Override
public Map<String, String> getModuleFiles() {
Map<String, String> files = new HashMap<>();
files.put(moduleConfigId, "configs" + File.separator + "harvester.yml");
return files;
}
@Override
public void onLoad() {
HarvesterHoeData.initialise();
}
@Override
public void onShutdown() {
HarvesterHoeData.shutdown();
}
}
|
[
"[email protected]"
] | |
e421807480a4c72c3a9be0dc0ee23074e5d0cd02
|
7f4f30a8be3ef1de88bfed6c4833c17da1b80668
|
/bst/src/applet/WordCountApplet.java
|
4df0eab8f1d7066f71cd8545b5c25d041a714469
|
[] |
no_license
|
voyefusi/old-projects
|
118af99be3ca3ae2f10023297e2e4cf9c3d3fa1b
|
7f7d7501dcc2c3b48f215e42171709ef998a8442
|
refs/heads/master
| 2020-04-17T18:16:29.950036 | 2014-06-19T05:26:14 | 2014-06-19T05:26:14 | 20,988,746 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,080 |
java
|
package applet;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import java.util.Scanner;
import java.util.regex.Pattern;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import searchTree.SearchTreeMap;
public class WordCountApplet extends JApplet implements ActionListener {
/**
*
*/
private static final long serialVersionUID = 1L;
JTextField urlTextField;
JTextArea textArea;
private void CreateWordGUI() {
resize(650, 300);
/* Name label and textfield */
JLabel urlLabel = new JLabel("URL");
int nameFieldLength = 40;
urlTextField = new JTextField(nameFieldLength);
urlTextField.setText("http://www.cs.umd.edu/class/summer2010/cmsc132/projects/Bst/data/beatles.txt");
urlTextField.addActionListener(this);
/* Adding Post button */
JButton refreshButton = new JButton("Count!");
refreshButton.addActionListener(this);
/* Text Area to type info */
textArea = new JTextArea(10, 40);
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
/* Adding the scrollPane to the panel */
// Lay out the GUI.
BorderLayout layout = new BorderLayout();
Container contentPane = getContentPane();
contentPane.setLayout(layout);
JPanel top = new JPanel(new FlowLayout());
top.add(urlLabel);
top.add(urlTextField);
top.add(refreshButton);
contentPane.add(top, BorderLayout.NORTH);
contentPane.add(scrollPane, BorderLayout.CENTER);
}
// Called when this applet is loaded into the browser.
public void init() {
// Execute a job on the event-dispatching thread:
// creating this applet's GUI.
try {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
CreateWordGUI();
}
});
} catch (Exception e) {
System.err.println("CreateWordGUI didn't successfully complete");
}
}
public void actionPerformed(ActionEvent e) {
String urlStr = urlTextField.getText();
textArea.selectAll();
URL userUrl = null;
boolean UrlOnError = false;
// Transform the String to a real URL
try {
userUrl = new URL(urlStr);
} catch (Exception exc) {
UrlOnError = true;
}
SearchTreeMap<String, Integer> tree = new SearchTreeMap<String, Integer>();
if (!UrlOnError && (userUrl != null)) {
try {
Scanner sc = new Scanner(userUrl.openStream());
Pattern p = Pattern.compile("[a-zA-Z]+");
String s;
while (sc.hasNextLine()) {
// find all words in line
while ((s = sc.findInLine(p)) != null) {
Integer i = tree.get(s);
if (i == null)
tree.put(s, 1);
else
tree.put(s, i + 1);
}
sc.nextLine(); // go to next line
}
} catch (Exception exc) {
UrlOnError = true;
}
}
if (UrlOnError) {
textArea.setText("Problem reading URL: " + urlStr);
} else {
String curStr = "URL = " + urlStr + "\nWords Counted = " + tree.size()
+ "\n<Word #>\n";
for (String str : tree.keyList()) {
curStr = curStr + str + " " + tree.get(str) + "\n";
}
textArea.setText(curStr);
}
}
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new WordCountApplet();
}
});
}
/* Static block for feel and look */
/* Comment this block out and see how the feel and look changes */
/* You can also try this experiment in a Mac */
static {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
|
[
"[email protected]"
] | |
c0ae60e0d57246c5eed5bb6e699194d635eb0a82
|
44c8db8924dda20c9798baabe2286f8aa78de25c
|
/WebMundo/src/model/Pais.java
|
67e78b507b952cb7e4dfd00c20aa8a34bdae60a8
|
[] |
no_license
|
isasinha/WebPaisAula11
|
bd5a1eaf75dd95d613ff7add3c13db9e97c5490a
|
3bc35141b3c7fcb87a2f2904f72175971471e8c8
|
refs/heads/master
| 2020-03-18T02:52:07.044127 | 2018-06-06T02:57:39 | 2018-06-06T02:57:39 | 134,210,854 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,872 |
java
|
package model;
import java.io.Serializable;
public class Pais implements Serializable{
int id;
String nome;
long populacao;
double area;
String continente;
public Pais(int id, String nome, long populacao, double area, String continente) {
this.id = id;
this.nome = nome;
this.populacao = populacao;
this.area = area;
this.continente = continente;
}
public Pais() {
}
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 long getPopulacao() {
return populacao;
}
public void setPopulacao(long populacao) {
this.populacao = populacao;
}
public double getArea() {
return area;
}
public void setArea(double area) {
this.area = area;
}
public String getContinente() {
return continente;
}
public void setContinente(String continente) {
this.continente = continente;
}
@Override
public String toString() {
return "Pais [id=" + id + ", nome=" + nome + ", populacao=" + populacao
+ ", area=" + area + ", continente=" + continente + "]";
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Pais other = (Pais) obj;
if (area == 0.0) {
if (other.area != 0.0)
return false;
} else if (area != other.area)
return false;
if (populacao == 0) {
if (other.populacao != 0)
return false;
} else if (populacao != other.populacao)
return false;
if (id != other.id)
return false;
if (nome == null) {
if (other.nome != null)
return false;
} else if (!nome.equals(other.nome))
return false;
return true;
}
}
|
[
"[email protected]"
] | |
4c1ddae7ea3d8fc93d576c3f58599e9da24d044c
|
2404c0862985f4ff6220a3de62f37627d85c2bcc
|
/app/src/main/java/com/reseeit/adapters/GalleryImageAdapter.java
|
7606264e47a5cdbedfbef1f8778e936ed885c40c
|
[] |
no_license
|
CDL24/TouchEventDemo
|
87b40931ff8b46d6237e41a2fbc26667e19e4109
|
c7f9884b221dc069de43083af7e8264ab360926e
|
refs/heads/master
| 2021-01-12T13:20:39.220241 | 2016-11-02T06:31:47 | 2016-11-02T06:31:52 | 72,200,418 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,441 |
java
|
package com.reseeit.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.reseeit.R;
import com.reseeit.com.reseeit.listeners.ImageClickListener;
import com.reseeit.models.ReceiptItem;
import com.reseeit.util.GalleryManager;
import java.util.ArrayList;
public class GalleryImageAdapter extends RecyclerView.Adapter<GalleryImageAdapter.ViewHolder> {
private Context context;
private ArrayList<ReceiptItem> items;
private ImageClickListener listener;
public GalleryImageAdapter(Context context, ArrayList<ReceiptItem> items, ImageClickListener listener) {
this.context = context;
this.items = items;
this.listener = listener;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(context).inflate(R.layout.inflater_gallery_image, parent, false);
return new ViewHolder(v);
}
@Override
public int getItemCount() {
return items.size();
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
if (items.get(position).receipt_img != null && !items.get(position).receipt_img.equals("")) {
// Picasso.with(context).load(new File(items.get(position).receipt_img)).resizeDimen(R.dimen.profile_image, R.dimen.profile_image).centerCrop().placeholder(R.drawable.ic_img_box).error(R.drawable.ic_img_box).into(holder.img);
}
if (items.get(position).status.equals(GalleryManager.STATUS_PENDING)) {
holder.imgStatus.setImageResource(R.drawable.ic_img_status_pending);
} else if (items.get(position).status.equals(GalleryManager.STATUS_APPROVED)) {
holder.imgStatus.setImageResource(R.drawable.ic_img_status_offer);
} else if (items.get(position).status.equals(GalleryManager.STATUS_NOT_APPROVED)) {
holder.imgStatus.setImageResource(R.drawable.ic_img_status_no_offer);
}
}
class ViewHolder extends RecyclerView.ViewHolder implements OnClickListener {
private ImageView img, imgStatus;
public ViewHolder(View itemView) {
super(itemView);
img = (ImageView) itemView.findViewById(R.id.gallery_img);
imgStatus = (ImageView) itemView.findViewById(R.id.gallery_img_status);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
listener.onImageClicked();
}
}
}
|
[
"[email protected]"
] | |
1331a2de38a167b8a3e20ee9b9b6a7608542adbe
|
9ef846d8e0d4cac6ff14ad8b53a45e72c416b305
|
/src/main/java/de/minewave/mwcore/util/JsonHelper.java
|
10b77d7642f1aa51b40acdb4348fd89ae434113a
|
[] |
no_license
|
MineWaveDevelopment/mwcore
|
9d663eceb1d23f3bf11d990a3e0306c44b86fca8
|
c8948a0e3a18c9cb8a6f69c6f5a3127be8126c47
|
refs/heads/master
| 2022-11-07T01:34:24.668521 | 2020-06-21T18:54:18 | 2020-06-21T18:54:18 | 273,473,709 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 460 |
java
|
package de.minewave.mwcore.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* Software by FLXnet
* More info at FLXnet.de
* Copyright (c) 2015-2020 by FLXnet
* @author Felix
*/
public class JsonHelper {
private static Gson gson = new GsonBuilder().setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create();
/**
* @return the gson
*/
public static Gson getGson() {
return gson;
}
}
|
[
"[email protected]"
] | |
8a2bd9241d26afd1a1cffc34d3997b4b484eb4d1
|
0ddf2aca167fb53c69066596ca16bfb472be47ab
|
/src/main/java/com/tw/apistackbase/respository/CriminalCaseRepository.java
|
b269cbdf943081eb804a1baa5c5cd5f307c9d15a
|
[] |
no_license
|
Lidongpeng1/springboot-stack-2019-7-17-9-32-17-210
|
11305d08da9b560a235a092f1c87a749046afe35
|
77037f2408cfcc6bcaeeb6646106b7cfa5d25fbc
|
refs/heads/master
| 2020-06-21T07:36:02.601779 | 2019-07-18T04:31:25 | 2019-07-18T04:31:25 | 197,384,393 | 0 | 0 | null | 2019-07-17T12:24:35 | 2019-07-17T12:24:35 | null |
UTF-8
|
Java
| false | false | 302 |
java
|
package com.tw.apistackbase.repository;
import com.tw.apistackbase.model.CriminalCase;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface CriminalCaseRepository extends JpaRepository<CriminalCase, Integer> {
}
|
[
"[email protected]"
] | |
86510a4ca6ccfc44100b9ac35d7d08efcdcc6f9a
|
333a4a5117c0d5458bfd76da5737a277a3279e3b
|
/connectz-util/src/main/java/com/connectz/util/json/JsonObject.java
|
a2284718b76ef26258919c73c6841dd1f5e763c3
|
[] |
no_license
|
leoleegit/connectz
|
eb6abf5deb3dc908f60eeef4f770464440e0909d
|
a7e863fb114f0d87a10b5194e79d70a782366c07
|
refs/heads/master
| 2021-09-16T03:02:29.586271 | 2018-06-15T08:40:40 | 2018-06-15T08:40:40 | 107,750,816 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 11,730 |
java
|
package com.connectz.util.json;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.connectz.util.ReflectUtils;
import com.connectz.util.StringUtils;
public abstract class JsonObject implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
protected static Logger logger = Logger.getLogger(JsonObject.class);
private String json;
public JsonObject(String json) {
this.setJson(json);
if (json != null)
json2Object(json, this);
}
/**
* obj1 merge to obj2
*
* @param obj1
* @param obj2
* @return obj2
*/
public static JSONObject merge(JSONObject obj1, JSONObject obj2) {
if (obj2 == null)
return obj1;
java.util.Iterator<?> it = obj2.keys();
if(it!=null){
for(;it.hasNext();){
String name = (String) it.next();
Object value;
try {
value = obj2.getString(name);
if (value != null
&& (!(value instanceof String) || StringUtils
.notNull((String) value))) {
obj1.put(name, value);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
logger.warn(e);
}
}
}
return obj1;
}
@SuppressWarnings("unchecked")
public String toJson() {
StringBuilder sb = new StringBuilder();
Class<?> type = null;
sb.append("{");
try {
for (Class<?> clazz = getClass(); clazz != Object.class; clazz = clazz
.getSuperclass()) {
Field[] fs = clazz.getDeclaredFields();
for (Field f : fs) {
if (Modifier.isStatic(f.getModifiers()))
continue;
Object value = null;
String name = f.getName();
if (!"json".equals(name) && !"encode".equals(name)
&& !"decode".equals(name)) {
type = f.getType();
Method m = ReflectUtils.getMethod(getClass(),
new StringBuilder().append("get").append(name)
.toString());
if (m == null)
m = ReflectUtils.getMethod(
getClass(),
new StringBuilder().append("is")
.append(name).toString());
if (m != null) {
if (String.class == type) {
value = (String) m.invoke(this, new Object[0]);
if (StringUtils.notNull((String) value)) {
value = encode((String) value);
}
if (StringUtils.notNull((String) value)) {
value = "\"" + value + "\"";
}
} else if ((Integer.class == type)
|| (Integer.TYPE == type)) {
value = (Integer) m.invoke(this, new Object[0]);
} else if ((Boolean.class == type)
|| (Boolean.TYPE == type)) {
value = (Boolean) m.invoke(this, new Object[0]);
} else if ((Long.class == type)
|| (Long.TYPE == type)) {
value = (Long) m.invoke(this, new Object[0]);
} else if ((Float.class == type)
|| (Float.TYPE == type)) {
value = (Float) m.invoke(this, new Object[0]);
} else if (Timestamp.class == type) {
Object o1 = m.invoke(this, new Object[0]);
value = o1!=null?String.valueOf(((Timestamp)o1).getTime()):null;
} else if (JsonObject.class.isAssignableFrom(type)) {
Object o1 = m.invoke(this, new Object[0]);
JsonObject jsonObj = o1 != null ? (JsonObject) o1
: null;
value = jsonObj != null ? jsonObj.toJson()
: null;
} else if (Collection.class.isAssignableFrom(type)) {
List<Object> jsonObj = (List<Object>) m.invoke(
this, new Object[0]);
value = toJsonArray(jsonObj);
} else if(JSONObject.class.isAssignableFrom(type)){
Object o1 = m.invoke(this, new Object[0]);
JSONObject jsonObj = o1 != null ? (JSONObject) o1
: null;
value = jsonObj != null ? jsonObj.toString()
: null;
}else {
Object o1 = m.invoke(this, new Object[0]);
Method m1 = o1 != null ? ReflectUtils
.getMethod(o1.getClass(), "toJson",new Class<?>[0])
: null;
if (m1 != null) {
try {
value = m1.invoke(o1, new Object[0]);
} catch (Exception e) {
logger.warn(e);
}
} else
value = toJson(name, o1);
}
}
if (value != null
&& (!(value instanceof String) || StringUtils
.notNull((String) value))) {
sb.append("\"").append(name).append("\"")
.append(":").append(value).append(",");
}
}
}
}
} catch (Throwable t) {
logger.error("", t);
}
if (sb.lastIndexOf(",") == sb.length() - 1)
sb.deleteCharAt(sb.length() - 1);
sb.append("}");
return sb.toString();
}
public Object json2Object(String jsonStr, Object o) {
JSONObject json = getJSONObject(jsonStr);
if (json != null) {
for (Class<?> clazz = o.getClass(); clazz != Object.class; clazz = clazz
.getSuperclass()) {
Field[] fs = clazz.getDeclaredFields();
Class<?> type = null;
for (Field f : fs) {
String name = f.getName();
Method m = ReflectUtils
.getMethod(o.getClass(), new StringBuilder()
.append("set").append(name).toString(),
new Class<?>[] { f.getType() });
if (m == null)
m = ReflectUtils.getMethod(o.getClass(),
new StringBuilder().append("is").append(name)
.toString());
if ((m != null) && (json.has(name))) {
try {
String value = json.getString(name);
if (StringUtils.notNull(value)) {
type = f.getType();
Object args = null;
if (String.class == type) {
value = decode(value);
args = value;
} else if ((Integer.class == type)
|| (Integer.TYPE == type))
args = StringUtils.isNumeric(value) ? Integer
.valueOf(value) : null;
else if ((Boolean.class == type)
|| (Boolean.TYPE == type))
args = Boolean.valueOf(Boolean
.parseBoolean(value));
else if ((Long.class == type)
|| (Long.TYPE == type))
args = StringUtils.isNumeric(value) ? Long
.valueOf(value) : null;
else if ((Float.class == type)
|| (Float.TYPE == type))
args = Float.valueOf(value);
else if (Timestamp.class == type)
args = StringUtils.isNumeric(value)?new Timestamp(Long.valueOf(value)):null;
else if (JsonObject.class
.isAssignableFrom(type)) {
try {
if (ReflectUtils
.hasConstructor(
type,
new Class<?>[] { String.class }))
args = ReflectUtils.newInstance(
type,
new Object[] { value });
} catch (SecurityException e) {
logger.warn(e);
continue;
} catch (IllegalArgumentException e) {
logger.warn(e);
continue;
}
} else if (Collection.class
.isAssignableFrom(type)) {
args = value;
setListObject(name, args);
continue;
}else if(JSONObject.class.isAssignableFrom(type)){
args = new JSONObject(value);
}else {
args = value;
setObject(name, args);
continue;
}
try {
if (args != null)
m.invoke(o, new Object[] { args });
} catch (Exception e) {
logger.warn(e);
}
}
} catch (JSONException e) {
logger.error("", e);
}
}
}
}
}
return o;
}
public abstract String toJson(String name, Object o1);
public abstract String encode(String str);
public abstract String decode(String str);
public abstract void setListObject(String name, Object args);
public abstract void setObject(String name, Object args);
public static JSONObject getJSONObject(String str) {
if (str == null || (str != null && str.trim().length() == 0)) {
return null;
}
if (!str.startsWith("{")) {
logger.warn(" A JSONObject text must begin with '{' at character 1 :\n"
+ str);
return null;
}
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(str);
} catch (JSONException e) {
logger.warn(str, e);
return null;
}
return jsonObject;
}
public static String lineToJson(Map<String, String> keyMaps,
String[] commands) {
JSONObject jsonObject = null;
jsonObject = new JSONObject();
String name = null;
for (String s : commands) {
if (keyMaps.containsKey(s)) {
name = keyMaps.get(s);
continue;
}
if (name == null)
continue;
try {
if (jsonObject.has(s)) {
jsonObject.append(name, s);
} else {
jsonObject.accumulate(name, s);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
logger.warn("", e);
}
}
return jsonObject.toString();
}
public static String toJsonArray(List<?> list) {
if (list == null)
return null;
StringBuilder sb = new StringBuilder();
sb.append("[");
if (list != null)
for (Iterator<?> i$ = list.iterator(); i$.hasNext();) {
Object o = i$.next();
if (o instanceof JsonObject)
sb.append(((JsonObject) o).toJson()).append(",");
else {
Method m = ReflectUtils.getMethod(o.getClass(), "toJson",
new Class<?>[0]);
if (m != null) {
try {
sb.append(m.invoke(o, new Object[0])).append(",");
} catch (Exception e) {
logger.warn(e);
}
} else
sb.append(o.toString()).append(",");
}
}
if (sb.lastIndexOf(",") == sb.length() - 1)
sb.deleteCharAt(sb.length() - 1);
sb.append("]");
return sb.toString();
}
public static JSONArray getJSONArray(String str) {
if (str == null || (str != null && str.trim().length() == 0)) {
return null;
}
if (!str.startsWith("[")) {
logger.warn(" A JSONArray text must begin with '[' at character 1 :\n"
+ str);
return null;
}
JSONArray jsonArray = null;
try {
jsonArray = new JSONArray(str);
} catch (JSONException e) {
logger.warn(str, e);
return null;
}
return jsonArray;
}
@SuppressWarnings("unchecked")
public static <T> T generateOne(Class<T> clazz, String json) {
Object args = null;
try {
if (json != null
&& ReflectUtils.hasConstructor(clazz,
new Class<?>[] { String.class }))
args = ReflectUtils.newInstance(clazz, new Object[] { json });
} catch (SecurityException e) {
logger.warn(e);
} catch (IllegalArgumentException e) {
logger.warn(e);
}
return (T) args;
}
public static <T> List<T> generateArray(Class<T> clazz, JSONArray array) {
List<T> at = new ArrayList<T>();
if (array != null) {
for (int index = 0; index < array.length(); index++) {
try {
T t = generateOne(clazz, array.getString(index));
at.add(t);
} catch (JSONException e) {
logger.error("", e);
}
}
}
return at;
}
public static <T> List<T> generateArray(Class<T> clazz, String array) {
return generateArray(clazz,getJSONArray(array));
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
}
|
[
"[email protected]"
] | |
4a3fe3148eab0c7e8ce7c99567003050df750f4a
|
096555048e41ea68adace16f55bd7d3629bd868d
|
/src/uk/ac/aber/cs39440/game/entities/Entity.java
|
94e1208664f1dec7feb21faa2933a3e5009575f6
|
[] |
no_license
|
drguildo/cs39440-game
|
a2f8fdbc161502131b91217c4f27ce4e38844f8b
|
78f484b408fc3425cb54e12710be53d6c05774b5
|
refs/heads/master
| 2016-09-06T08:52:33.163756 | 2014-03-29T17:41:54 | 2014-03-29T17:41:54 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,328 |
java
|
package uk.ac.aber.cs39440.game.entities;
import net.phys2d.math.ROVector2f;
import net.phys2d.math.Vector2f;
import net.phys2d.raw.Body;
import net.phys2d.raw.shapes.Polygon;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.Shape;
import uk.ac.aber.cs39440.game.Util;
/**
* @author Simon Morgan
*
* XXX: Why doesn't calling move() here, instead of in each subclass, work?
*
*/
public abstract class Entity {
protected Body body;
protected Polygon poly;
public void draw(Graphics g) {
ROVector2f[] verts = poly.getVertices(body.getPosition(),
body.getRotation());
for (int i = 0, j = verts.length - 1; i < verts.length; j = i, i++) {
g.drawLine(verts[i].getX(), verts[i].getY(),
verts[j].getX(), verts[j].getY());
}
}
public Body getBody() {
return body;
}
public Polygon getPoly() {
return poly;
}
public Shape getShape() {
Vector2f[] v = poly.getVertices(body.getPosition(), body.getRotation());
return new org.newdawn.slick.geom.Polygon(Util.vectorsToFloats(v));
}
public void move(float x, float y) {
body.setPosition(x, y);
}
public void setBody(Body body) {
this.body = body;
}
}
|
[
"[email protected]"
] | |
c69c5c4b12bf28a12bf7d8186b21763465eaecb2
|
bdfd4198d779fbfb7b5c9f92dd3af358f0fba9eb
|
/honda/src/main/java/com/sv/honda/repository/BaseRepository.java
|
4ca87e71f5e1cc8b9c4cfb51df8ed6e6478e7287
|
[] |
no_license
|
liaozhiqiang2020/honda
|
f00f5efa1a3eefee3df99ea1afa961148db8b719
|
8738a811924da85f46f62ec158ef08cf66fff1ab
|
refs/heads/master
| 2022-12-21T20:05:59.477436 | 2018-04-25T06:03:52 | 2018-04-25T06:04:46 | 295,959,162 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 403 |
java
|
package com.sv.honda.repository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.io.Serializable;
@NoRepositoryBean
public interface BaseRepository<T, ID extends Serializable> extends CrudRepository<T, ID>, PagingAndSortingRepository<T, ID> {
}
|
[
"[email protected]"
] | |
f1cfcdb7c41c8d89168acb4d300ac82df8ab589c
|
1966f4b546ea2c078b6cf4cff2c79b878677a33a
|
/app/src/androidTest/java/com/example/priam/mobilecomputingactivities/ApplicationTest.java
|
5e82f58951f1491b570d258a586fdf9902f320b2
|
[] |
no_license
|
YamMaii/MobileComputing
|
a90b5f4b326605306b20ce32953866d3d53ba10a
|
5ff208e9a4bcec788f4f95194f00d50b094eaf02
|
refs/heads/master
| 2021-01-17T15:46:54.411445 | 2016-10-07T13:44:18 | 2016-10-07T13:44:18 | 69,878,546 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 374 |
java
|
package com.example.priam.mobilecomputingactivities;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
[
"[email protected]"
] | |
35c2e18b4d53e957183707c43443d62760224164
|
d09677df7544873e3d1d7d98cf35a44d31917ca1
|
/src/main/java/com/qktz/utils/CollectionUtils.java
|
4d6478182431fba119f04373cf2eee0444e1426a
|
[] |
no_license
|
G4Yuan/dubbo-service
|
ea7f7d0467696934c3adb12623012a8f8a149cf7
|
6647074ce4fa3ce8a27fac41765a8fb026fee8c7
|
refs/heads/master
| 2021-01-01T15:46:54.437057 | 2017-07-19T09:55:30 | 2017-07-19T09:55:30 | 97,698,556 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,506 |
java
|
package com.qktz.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import javax.xml.datatype.XMLGregorianCalendar;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class CollectionUtils {
private static DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static Logger logger = LoggerFactory.getLogger(CollectionUtils.class);
private static final String TEMP_ENCODING = "ISO-8859-1";
private static final String DEFAULT_ENCODING = "UTF-8";
/**
* 得到UTC时间,类型为Date,格式为"yyyy-MM-dd HH:mm:ss" 如果获取失败,返回null
* @return
*/
public static Date getUTCTimeStr() {
StringBuffer UTCTimeBuffer = new StringBuffer();
// 1、取得本地时间:
Calendar cal = Calendar.getInstance();
// 2、取得时间偏移量:
int zoneOffset = cal.get(java.util.Calendar.ZONE_OFFSET);
// 3、取得夏令时差:
int dstOffset = cal.get(java.util.Calendar.DST_OFFSET);
// 4、从本地时间里扣除这些差量,即可以取得UTC时间:
cal.add(java.util.Calendar.MILLISECOND, -(zoneOffset + dstOffset));
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minute = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
UTCTimeBuffer.append(year).append("-").append(month).append("-").append(day);
UTCTimeBuffer.append(" ").append(hour).append(":").append(minute).append(":").append(second);
try {
return format.parse(UTCTimeBuffer.toString());
// return UTCTimeBuffer.toString() ;
} catch (Exception e) {
logger.info("转换失败",e);
//e.printStackTrace();
}
return null;
}
/**
* 将UTC时间转换为东八区时间
* @param UTCTime
* @return
*/
public static Date getLocalTimeFromUTC(Date UTCTime) {
Date UTCDate = null;
String localTimeStr = null;
Date localTimeDate = null;
try {
UTCDate = UTCTime;
format.setTimeZone(TimeZone.getTimeZone("GMT-8"));
localTimeStr = format.format(UTCDate);
localTimeDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(localTimeStr);
} catch (Exception e) {
logger.info("转换失败",e);
//e.printStackTrace();
}
return localTimeDate;
}
/**
* date 转 XMLGregorianCalendar
* @param date
* @return
* @throws Exception
*/
@SuppressWarnings("all")
public static javax.xml.datatype.XMLGregorianCalendar getXMLGregorianCalendar(java.util.Date date)
throws Exception {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
javax.xml.datatype.DatatypeFactory dtf = javax.xml.datatype.DatatypeFactory.newInstance();
return dtf.newXMLGregorianCalendar(calendar.get(calendar.YEAR), calendar.get(calendar.MONTH) + 1,
calendar.get(calendar.DAY_OF_MONTH), calendar.get(calendar.HOUR), calendar.get(calendar.MINUTE),
calendar.get(calendar.SECOND), calendar.get(calendar.MILLISECOND),
calendar.get(calendar.ZONE_OFFSET) / (1000 * 60));
}
/**
* XMLGregorianCalendar 转 date
* @param cal
* @return
*/
public static Date getDateFromXMLGregorianCalendar(XMLGregorianCalendar cal) {
return cal.toGregorianCalendar().getTime();
}
/**
* 将对象序列化成字符串
* @param serStr
* @return Object
* @throws IOException
*/
public static String writeToStr(Object obj) throws IOException {
// 此类实现了一个输出流,其中的数据被写入一个 byte 数组。
// 缓冲区会随着数据的不断写入而自动增长。可使用 toByteArray() 和 toString() 获取数据。
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// 专用于java对象序列化,将对象进行序列化
ObjectOutputStream objectOutputStream = null;
String serStr = null;
try {
objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
objectOutputStream.writeObject(obj);
serStr = byteArrayOutputStream.toString(TEMP_ENCODING);
serStr = java.net.URLEncoder.encode(serStr, DEFAULT_ENCODING);
} catch (IOException e) {
e.printStackTrace();
} finally {
objectOutputStream.close();
}
return serStr;
}
/**
* 将序列化的字符串反序列化成对象
* @param serStr 系列化的字符串
* @return Object 反序列化后得到原始的对象
* @throws IOException
*/
public static Object deserializeFromStr(String serStr) throws IOException {
ByteArrayInputStream byteArrayInputStream = null;
ObjectInputStream objectInputStream = null;
try {
String deserStr = java.net.URLDecoder.decode(serStr, DEFAULT_ENCODING);
byteArrayInputStream = new ByteArrayInputStream(deserStr.getBytes(TEMP_ENCODING));
objectInputStream = new ObjectInputStream(byteArrayInputStream);
return objectInputStream.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} finally {
objectInputStream.close();
byteArrayInputStream.close();
}
return null;
}
public static void main(String[] args) {
//Date UTCTimeStr = getUTCTimeStr();
//System.out.println(UTCTimeStr);
//System.out.println(getLocalTimeFromUTC(UTCTimeStr));
}
}
|
[
"[email protected]"
] | |
d6b06ead268305f705fb59270f969ae06fa9e0ab
|
7aa1e1f63af3c74244ddf1b415c5fca0ca9e1a32
|
/TME9/src/exo12/Segment.java
|
2e2af2f5d720e30a67956edff2e91ea0caf288e1
|
[] |
no_license
|
derdiche/3I001
|
31672f8280db45f10e1f59c6910ff06f4e20d964
|
32b27f5499f087a73581e2cb79cb7cad1ebedf27
|
refs/heads/main
| 2023-04-29T14:04:15.753711 | 2021-05-15T11:26:41 | 2021-05-15T11:26:41 | 367,606,867 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 454 |
java
|
//avec Lisa Kacel 3702697
import graphic.Window;
import java.awt.Point;
public class Segment {
private Window f;
private final Point m, n;
public Segment (Window f, Point m, Point n) {
this.f = f;
this.m = m;
this.n = n;
}
public static double longueur(Point m, Point n) {
return Math.sqrt( Math.pow (m.y - n.y, 2.0) + Math.pow (m.x - n.x, 2.0) );
}
public static void tracer (Window f, Point m, Point n) {
f.plotLine(m, n);
}
}
|
[
"[email protected]"
] | |
0f90c996d3c05642ab01e8de7802d690a3d6f6bd
|
bb8e5e74c23d553028b9eacca5adcde774111de7
|
/src/main/java/io/muic/cs/senior_1/Video/VideoModel.java
|
95d1af186a9990d72cde7e99d5ee017c9fc7e7e4
|
[] |
no_license
|
tle32252/senior_bn
|
55d3e73b78b51e065733962c4475e4b3da43c0a8
|
133cea62c5d2b583cfbb8990ab3475085c392c26
|
refs/heads/master
| 2020-03-21T09:01:35.199871 | 2018-07-15T04:53:11 | 2018-07-15T04:53:11 | 138,379,808 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,041 |
java
|
package io.muic.cs.senior_1.Video;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class VideoModel {
@Id
@GeneratedValue
private Long id;
private String topic;
private String description;
private String filepath;
private String url;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getFilepath() {
return filepath;
}
public void setFilepath(String filepath) {
this.filepath = filepath;
}
}
|
[
"[email protected]"
] | |
b4cd171b6d38651e28a107b7bf942c16f7c704cb
|
ca379d35ab208e9f1fae463d55f909dbb85ef161
|
/src/org/brutality/model/players/packets/commands/developer/Macban.java
|
cf60268a00de0fefe57440274924874d5c982d61
|
[] |
no_license
|
rampage-osrs/rampage-os-server
|
a8d1f55073ebfbb14b6b8d97c75575c9b5a80ca6
|
53b9e4124659e35983740b4ef365a2f02d23ea86
|
refs/heads/master
| 2021-08-19T09:42:18.123993 | 2017-11-25T16:53:13 | 2017-11-25T16:53:13 | 112,019,026 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,003 |
java
|
package org.brutality.model.players.packets.commands.developer;
import java.util.Optional;
import org.brutality.Connection;
import org.brutality.event.CycleEventHandler;
import org.brutality.model.players.Player;
import org.brutality.model.players.PlayerHandler;
import org.brutality.model.players.packets.commands.Command;
/*
* Author - Mikey96
*/
public class Macban implements Command {
@Override
public void execute(Player c, String input) {
Optional<Player> optionalPlayer = PlayerHandler.getOptionalPlayer(input);
if (optionalPlayer.isPresent()) {
Player c2 = optionalPlayer.get();
Connection.addMacBan(c2.getMacAddress());
c2.properLogout = true;
c2.disconnected = true;
CycleEventHandler.getSingleton().stopEvents(c2);
c.sendMessage("@red@You have MAC Banned: " + c2.playerName);
return;
} else if (input.length() < 1) {
c.sendMessage("Please enter a valid username.");
} else
c.sendMessage(input + " doesn't seem to be online.");
}
}
|
[
"[email protected]"
] | |
1765f0d2e8520ee1e1e9b69ab4d2fa56aecc8e7d
|
e670f5ac8ad6ae53744c6bfe209cacaae115f429
|
/src/main/java/com/tsoft/ai/simulatedannealing/engine/SolutionStep.java
|
8acaaf80b3c03f98d277270d9a6b48553e8066c9
|
[] |
no_license
|
knivit/ai
|
613f733647ba9acf0d44df91b3107cddec92078d
|
ff48cc5e6bb2566c2592ff85abc2f2bc22efbb26
|
refs/heads/master
| 2023-04-29T02:50:57.948041 | 2019-11-10T21:41:26 | 2019-11-10T21:41:26 | 220,854,985 | 0 | 0 | null | 2023-04-17T19:41:34 | 2019-11-10T21:40:18 |
C
|
UTF-8
|
Java
| false | false | 231 |
java
|
package com.tsoft.ai.simulatedannealing.engine;
import lombok.Data;
@Data
public class SolutionStep {
private int timer;
private double temperature;
private double energy;
private double worseAcceptedPercent;
}
|
[
"[email protected]"
] | |
f5b45b94bb8a235ac4aaa6705d00295ab4be89e5
|
6ec4616259101b7dee3f08d61475789f7af484bb
|
/src/main/java/com/springapp/mvc/dao/PersonDao.java
|
2df079dda6c79a5aff69d8a860a25db2624cf5a4
|
[] |
no_license
|
dev-dgupta/graphQLSpringMVC
|
9022c50e97a334393ab57de7e11a0a4e921cee4e
|
ff1117861da05504d5f22a7bcecc4f687fcb5bdb
|
refs/heads/master
| 2021-01-13T12:57:27.091518 | 2017-06-20T13:56:02 | 2017-06-20T13:56:02 | 94,896,562 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 783 |
java
|
package com.springapp.mvc.dao;
import com.springapp.mvc.domain.Person;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Divya.Gupta on 19-06-2017.
*/
public class PersonDao implements IPersonDao {
private JdbcTemplate jdbcTemplate;
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
public List<Person> getAllPersons() {
List<Person> persons = new ArrayList<Person>();
return persons;
}
public Person getPersonObj(int userid) {
String sql = "select * from person where userid = ?";
Person p = jdbcTemplate.queryForObject(sql, new Object[]{userid}, new PersonMapper());
return p;
}
}
|
[
"[email protected]"
] | |
d92a86437160c4033d97bc12118ac5c8875dadfb
|
ae87226f7c1b901566995c38e13eabfe1153dba4
|
/blog-service/src/main/java/com/chumbok/blog/Application.java
|
d9577440dd995a2ce3a7e36bab820794570ac5fb
|
[
"MIT"
] |
permissive
|
imran110219/production-ready-microservices-starter
|
828f610cc893974d745888b9a8286eef0ac22d98
|
a8cf1e71870b673192241d5eef06e7cc58de7c27
|
refs/heads/master
| 2023-03-29T07:09:39.521041 | 2021-04-06T16:59:12 | 2021-04-06T16:59:12 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 820 |
java
|
package com.chumbok.blog;
import com.chumbok.multitenancy.annotation.EnableMultitenantJpaRepositories;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration;
import javax.annotation.PostConstruct;
import java.util.TimeZone;
@SpringBootApplication
@EnableMultitenantJpaRepositories
@EnableAutoConfiguration(exclude = ErrorMvcAutoConfiguration.class)
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@PostConstruct
void init() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
}
|
[
"[email protected]"
] | |
aad59e5729a93a2cd6385af7486e073e5586cd31
|
a3961a14eb036ff93fdcaa459b43c0525897d805
|
/jt-manage/src/main/java/com/jt/manage/service/ItemService.java
|
f4f557f62a78b9d7923921dcab728b558098342c
|
[] |
no_license
|
18186398702/JT
|
7eadfd76a30a71f073b106f4d06ae8d6169986cb
|
3cc5e92009c7946758e0738b06d07da81c44d938
|
refs/heads/master
| 2020-06-10T13:40:33.946410 | 2019-06-25T06:50:24 | 2019-06-25T06:54:43 | 193,651,768 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 543 |
java
|
package com.jt.manage.service;
import com.jt.common.po.Item;
import com.jt.common.po.ItemDesc;
import com.jt.common.vo.EasyUIResult;
public interface ItemService {
EasyUIResult findItemListByPage(Integer page, Integer rows);
String findItemCatNameById(Long itemId);
void saveItem(Item item, String desc);
void updateStatus(Long[] ids, int status);
ItemDesc findItemDesc(Long itemId);
void updateItem(Item item, String desc);
void deleteItems(Long[] ids);
Item findItemById(Long itemId);
}
|
[
"C&J@DESKTOP-ILQ5FKQ"
] |
C&J@DESKTOP-ILQ5FKQ
|
a05d70f18e32389c2d47030a46880bb38d1b43da
|
8a72aee66b4c4e680597c267942002c9db59ff59
|
/src/main/java/com/example/springreact/model/entity/Usuario.java
|
8d7d2fa8d4e2d8cbe8b6bf7afec61dd18b064d8f
|
[] |
no_license
|
Caro2019ar/spring-react-minhasFinancas
|
2269e4494b8f99239b9f1e2f03f68496b14697ae
|
198445057b7cc7c8e058f0bfc3ef0ef78109ed3f
|
refs/heads/master
| 2023-08-28T04:29:25.807812 | 2021-10-16T21:36:13 | 2021-10-16T21:36:13 | 417,612,677 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 598 |
java
|
package com.example.springreact.model.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import javax.persistence.*;
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name="usuario", schema="financas")
public class Usuario {
@Id
//@Column(name="id")
@EqualsAndHashCode.Include
@GeneratedValue (strategy = GenerationType.IDENTITY)
private Long id;
@Column(name ="nome")
private String nome;
@Column(name = "email")
private String email;
@Column(name = "senha")
@JsonIgnore
private String senha;
}
|
[
"[email protected]"
] | |
22e23b1c1061fd3f18d7bc779a8ed59bf3d1b85d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_ed2cac43a53bcca9d76af6ad3c26a1bbcc92d1f9/AbstractFileRegionTest/1_ed2cac43a53bcca9d76af6ad3c26a1bbcc92d1f9_AbstractFileRegionTest_s.java
|
9ddaaa41aa0cf2c04805a6febc06fb679556f3fc
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null |
UTF-8
|
Java
| false | false | 4,409 |
java
|
package org.apache.mina.transport;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.concurrent.CountDownLatch;
import junit.framework.TestCase;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.common.IoBuffer;
import org.apache.mina.common.IoConnector;
import org.apache.mina.common.IoHandlerAdapter;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.WriteFuture;
import org.apache.mina.util.AvailablePortFinder;
public abstract class AbstractFileRegionTest extends TestCase {
private static final int FILE_SIZE = 1 * 1024 * 1024; // 1MB file
protected abstract IoAcceptor createAcceptor();
protected abstract IoConnector createConnector();
public void testSendLargeFile() throws Throwable {
File file = createLargeFile();
assertEquals("Test file not as big as specified", FILE_SIZE, file.length());
final CountDownLatch latch = new CountDownLatch(1);
final boolean[] success = {false};
final Throwable[] exception = {null};
int port = AvailablePortFinder.getNextAvailable(1025);
IoAcceptor acceptor = createAcceptor();
acceptor.setHandler(new IoHandlerAdapter() {
private int index = 0;
@Override
public void exceptionCaught(IoSession session, Throwable cause)
throws Exception {
exception[0] = cause;
session.close();
}
@Override
public void messageReceived(IoSession session, Object message) throws Exception {
IoBuffer buffer = (IoBuffer) message;
while (buffer.hasRemaining()) {
int x = buffer.getInt();
if (x != index) {
throw new Exception(String.format("Integer at %d was %d but should have been %d", index, x, index));
}
index++;
}
if (index > FILE_SIZE / 4) {
throw new Exception("Read too much data");
}
if (index == FILE_SIZE / 4) {
success[0] = true;
session.close();
}
}
});
acceptor.bind(new InetSocketAddress(port));
IoConnector connector = createConnector();
connector.setHandler(new IoHandlerAdapter() {
@Override
public void exceptionCaught(IoSession session, Throwable cause)
throws Exception {
exception[0] = cause;
session.close();
}
@Override
public void sessionClosed(IoSession session) throws Exception {
latch.countDown();
}
});
ConnectFuture future = connector.connect(new InetSocketAddress("localhost", port));
future.awaitUninterruptibly();
IoSession session = future.getSession();
session.write(file);
latch.await();
if (exception[0] != null) {
throw exception[0];
}
assertTrue("Did not complete file transfer successfully", success[0]);
assertEquals("Written messages should be 1 (we wrote one file)", 1, session.getWrittenMessages());
assertEquals("Written bytes should match file size", FILE_SIZE, session.getWrittenBytes());
connector.dispose();
acceptor.dispose();
}
private File createLargeFile() throws IOException {
File largeFile = File.createTempFile("mina-test", "largefile");
FileChannel channel = new FileOutputStream(largeFile).getChannel();
ByteBuffer buffer = createBuffer();
channel.write(buffer);
channel.close();
return largeFile;
}
private ByteBuffer createBuffer() {
ByteBuffer buffer = ByteBuffer.allocate(FILE_SIZE);
for (int i = 0; i < FILE_SIZE / 4; i++) {
buffer.putInt(i);
}
buffer.flip();
return buffer;
}
}
|
[
"[email protected]"
] | |
137ca454575aaebc6ba1cb4dc116376363f83dfd
|
2508ab3d684d8dac924b08fffcc8156bf1a98f83
|
/jstore.java
|
fa965d90fe74ad31769a887a10b8d486a69727b2
|
[] |
no_license
|
alhudareza/JStore
|
86f316b707d1192e93cfa463c3e489361701ede6
|
21a8e5960c9131c4d6fb0f6de7ae5e1f97632c93
|
refs/heads/master
| 2020-05-09T16:39:03.365362 | 2019-04-14T08:20:17 | 2019-04-14T08:20:17 | 181,279,070 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 464 |
java
|
/**
* Write a description of class jstore here.
*
* @author Alhuda reza mahara
* @version 21-2-2019
*/
public class jstore
{
// instance variables - replace the example below with your own
/**
* Constructor for objects of class jstore
*/
public jstore()
{
// initialise instance variables
}
public static void main(String[] args)
{
}
}
|
[
"[email protected]"
] | |
71d1d5713d8a70eab9dd8bd280055e22dd18c88a
|
44893e381c0b3a122513348f7c64f43afb7f2ee9
|
/src/main/java/net/droth/strinder/view/controller/ViewController.java
|
2def8a2ee162d1f8025939fcbdef7b7f23bf400e
|
[] |
no_license
|
todroth/strinder
|
40a7a50b76d08ceae9bbcb548273264fbee3a54e
|
49591f138182a22b0bf06d4e242f75315ab2962f
|
refs/heads/main
| 2023-04-10T02:31:19.134573 | 2021-04-16T20:57:07 | 2021-04-16T21:27:00 | 297,634,650 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 6,428 |
java
|
package net.droth.strinder.view.controller;
import lombok.extern.slf4j.Slf4j;
import net.droth.strinder.core.exception.*;
import net.droth.strinder.core.model.Match;
import net.droth.strinder.core.model.json.Configuration;
import net.droth.strinder.core.model.json.Genres;
import net.droth.strinder.core.model.json.Movies;
import net.droth.strinder.core.model.UserPair;
import net.droth.strinder.core.service.MatchService;
import net.droth.strinder.core.service.MovieService;
import net.droth.strinder.core.service.SwipeService;
import net.droth.strinder.core.service.UserService;
import net.droth.strinder.view.model.UserType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
@Slf4j
@Controller
public final class ViewController {
private final MovieService movieService;
private final UserService userService;
private final SwipeService swipeService;
private final MatchService matchService;
public ViewController(
final MovieService movieService,
final UserService userService,
final SwipeService swipeService,
final MatchService matchService
) {
this.movieService = movieService;
this.userService = userService;
this.swipeService = swipeService;
this.matchService = matchService;
}
@GetMapping("/")
public String home(final Model model) {
Optional<Genres> optionalGenres = movieService.getGenres().blockOptional();
List<Genres.Genre> genres = optionalGenres.map(Genres::getGenres).orElse(Collections.emptyList());
model.addAttribute("genres", genres);
UserPair userPair = userService.generateUserPair();
model.addAttribute("userPair", userPair);
model.addAttribute("userType", UserType.HOST);
return "index";
}
@GetMapping("/u/{userId}")
public String swipe(@PathVariable final UUID userId, final Model model)
throws UserNotFoundException, UserPairNotFoundException {
checkAndSetUser(userId, model);
Optional<Genres> optionalGenres = movieService.getGenres().blockOptional();
List<Genres.Genre> genres = optionalGenres.map(Genres::getGenres).orElse(Collections.emptyList());
model.addAttribute("genres", genres);
return "index";
}
@GetMapping("/u/{userId}/g/{genreId}")
public String swipe(@PathVariable final UUID userId, @PathVariable final int genreId, final Model model)
throws UserNotFoundException, UserPairNotFoundException, NoMovieFoundException, ConfigurationNotLoadedException, GenreNotFoundException {
fillSwipePageData(userId, genreId, model);
return "swipe";
}
@GetMapping("/u/{userId}/g/{genreId}/jop/{movieId}")
public String swipeYes(@PathVariable final UUID userId, @PathVariable final int genreId, @PathVariable final int movieId, final Model model)
throws UserNotFoundException, GenreNotFoundException, UserPairNotFoundException, NoMovieFoundException, ConfigurationNotLoadedException {
fillSwipePageData(userId, genreId, model);
swipeService.swipeYes(userId, movieId);
String url = "/u/" + userId + "/g/" + genreId;
return "redirect:" + url;
}
@GetMapping("/u/{userId}/g/{genreId}/nop/{movieId}")
public String swipeNo(@PathVariable final UUID userId, @PathVariable final int genreId, @PathVariable final int movieId, final Model model)
throws UserNotFoundException, GenreNotFoundException, UserPairNotFoundException, NoMovieFoundException, ConfigurationNotLoadedException {
fillSwipePageData(userId, genreId, model);
swipeService.swipeNo(userId, movieId);
String url = "/u/" + userId + "/g/" + genreId;
return "redirect:" + url;
}
@GetMapping("/u/{userId}/matches")
public String matches(@PathVariable final UUID userId, final Model model) throws UserNotFoundException, UserPairNotFoundException {
List<Match> matches = matchService.getMatches(userId);
model.addAttribute("matches", matches);
return "matches";
}
private void fillSwipePageData(final UUID userId, final int genreId, final Model model)
throws UserNotFoundException, GenreNotFoundException, NoMovieFoundException, ConfigurationNotLoadedException, UserPairNotFoundException {
checkAndSetUser(userId, model);
Genres.Genre selectedGenre = movieService.getGenres()
.blockOptional()
.flatMap(genres -> genres.getGenres().stream().filter(genre -> genre.getId() == genreId).findFirst())
.orElseThrow(() -> new GenreNotFoundException(genreId));
model.addAttribute("genre", selectedGenre);
Movies.Movie randomMovie = movieService.getRandomMovie(genreId).blockOptional()
.orElseThrow(() -> new NoMovieFoundException(genreId));
model.addAttribute("movie", randomMovie);
Configuration configuration = movieService.getConfiguration().blockOptional().orElseThrow(ConfigurationNotLoadedException::new);
Configuration.Images imgConf = configuration.getImages();
String posterPath = imgConf.getBase_url() + imgConf.getPoster_sizes()[Math.min(2, imgConf.getPoster_sizes().length - 1)] + randomMovie.getPoster_path();
model.addAttribute("posterPath", posterPath);
}
private void checkAndSetUser(final UUID userId, final Model model)
throws UserNotFoundException, UserPairNotFoundException {
if (!userService.exists(userId)) {
throw new UserNotFoundException(userId);
}
UserPair userPair = userService.findUserPair(userId).orElseThrow(() -> new UserPairNotFoundException(userId));
model.addAttribute("userPair", userPair);
model.addAttribute("userType", userType(userId, userPair));
}
private UserType userType(final UUID userId, final UserPair userPair) {
if (userPair.getHost().getId().equals(userId)) {
return UserType.HOST;
} else if (userPair.getGuest().getId().equals(userId)) {
return UserType.GUEST;
}
return UserType.UNKNOWN;
}
}
|
[
"[email protected]"
] | |
46203c20a3643fc324dbf043666f0969850e9e22
|
9a4a0d9958eacfd1773d45e24296359e6fffbc20
|
/src/main/java/dices/model/Game.java
|
ce0e137c3a43219a78969bd784d8288aebfd58f1
|
[] |
no_license
|
ivanetierra/dices-security
|
e3464a4d991bfa32aefa8f2fa774690dc1c142d2
|
aa8aa15abb0b53ab85a7fe165efde0056f3fc0e4
|
refs/heads/master
| 2023-02-13T07:34:44.744926 | 2021-01-10T22:57:02 | 2021-01-10T22:57:02 | 308,253,263 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,839 |
java
|
package dices.model;
import javax.persistence.*;
@Entity
@Table(name="game")
public class Game {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
//@Column(name = "id")
private Long id;
@Column(name = "dice1")
private int dice1;
@Column(name = "dice2")
private int dice2;
@Column(name = "win")
private boolean win;
@ManyToOne
@JoinColumn(name="player_id")
private Player player;
//CONSTRUCTORS
Game() {}
public Game(Player player) {
this.player = player;
int dice1 = throwDice();
int dice2 = throwDice();
int result = dice1 + dice2;
boolean win = false;
if (result == 7) {
win = true;
}
this.dice1 = dice1;
this.dice2 = dice2;
this.win = win;
}
public static int throwDice() {
int num = (int) ((Math.random()*6)+1); //returns int 1-6
return num;
}
public Game(Long id, int dice1, int dice2, boolean win, Player player) {
this.id = id;
this.dice1 = dice1;
this.dice2 = dice2;
this.win = win;
this.player = player;
}
//GETTERS Y SETTERS
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public int getDice1() {
return dice1;
}
public void setDice1(int dice1) {
this.dice1 = dice1;
}
public int getDice2() {
return dice2;
}
public void setDice2(int dice2) {
this.dice2 = dice2;
}
public boolean isWin() {
return win;
}
public void setWin(boolean win) {
this.win = win;
}
public Player getPlayer() {
return player;
}
public void setPlayer(Player player) {
this.player = player;
}
}
|
[
"[email protected]"
] | |
8c8af1151492effdaf32a0f41c851e64fb87546c
|
df63b85119983921773529f0b909c10e28cf4213
|
/cucumberproject/src/test/java/skeleton/LoginOfDemowebshop.java
|
b9b6a72fa89d77455024c4e3b3df2dd25d1c9a74
|
[] |
no_license
|
Vineethanps/SeleniumCucumberProject
|
8d9492225f0ee9dd2b7192e63c3be80bdb154e51
|
de68be4b5a1673b5aaf08fe8c0cc58aa427949d8
|
refs/heads/master
| 2020-06-17T15:54:33.420614 | 2019-07-09T08:55:39 | 2019-07-09T08:55:39 | 195,969,161 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,683 |
java
|
package skeleton;
import java.sql.Driver;
import java.util.List;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
public class LoginOfDemowebshop {
WebDriver driver;
@Given("url of demowebshop {string}")
public void url_of_demowebshop(String string) {
// Write code here that turns the phrase above into concrete actions
//throw new cucumber.api.PendingException();
String chromepath="C:\\Users\\a07208trng_b4a.04.26\\Desktop\\selenium\\jar\\chromedriver_win32\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", chromepath);
driver = new ChromeDriver();
driver.get(string);
driver.manage().window().maximize();
Assert.assertTrue(driver.getCurrentUrl().contains("login"));
}
@When("user enters {string} as username")
public void user_enters_as_username(String string) {
// Write code here that turns the phrase above into concrete actions
//throw new cucumber.api.PendingException();
driver.findElement(By.id("Email")).sendKeys(string);
}
@When("user enters {string} as password")
public void user_enters_as_password(String string) {
// Write code here that turns the phrase above into concrete actions
//throw new cucumber.api.PendingException();
driver.findElement(By.id("Password")).sendKeys(string);
}
@Then("user is in webshop as {word}")
public void user_is_in_webshop(String type) {
// Write code here that turns the phrase above into concrete actions
//throw new cucumber.api.PendingException();
driver.findElement(By.cssSelector("input[value='Log in']")).click();
Assert.assertTrue(driver.findElement(By.linkText("Log out")).isDisplayed());
}
@Given("Admin of the test me app enters")
public void admin_of_the_test_me_app_enters(io.cucumber.datatable.DataTable dataTable) {
// Write code here that turns the phrase above into concrete actions
// For automatic transformation, change DataTable to one of
// E, List<E>, List<List<E>>, List<Map<K,V>>, Map<K,V> or
// Map<K, List<V>>. E,K,V must be a String, Integer, Float,
// Double, Byte, Short, Long, BigInteger or BigDecimal.
//
// For other transformations you can register a DataTableType.
//throw new cucumber.api.PendingException();
List<List<String>> list=dataTable.asLists();
for(List<String> strings:list) {
for(String s:strings) {
System.out.print(s+"\t");
}
System.out.println("");
}
}
}
|
[
"[email protected]"
] | |
25813ddbfda4d4d08688ef08b9c727df051ba07c
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipsejdt_cluster/14705/tar_0.java
|
9c7f590c945e15ec87acdadba8a528719bbabb27
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,225 |
java
|
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.lookup.*;
public class Argument extends LocalDeclaration {
// prefix for setter method (to recognize special hiding argument)
private final static char[] SET = "set".toCharArray(); //$NON-NLS-1$
public Argument(char[] name, long posNom, TypeReference tr, int modifiers) {
super(name, (int) (posNom >>> 32), (int) posNom);
this.declarationSourceEnd = (int) posNom;
this.modifiers = modifiers;
type = tr;
this.bits |= IsLocalDeclarationReachable;
}
public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
// record the resolved type into the type reference
int modifierFlag = this.modifiers;
Binding existingVariable = scope.getBinding(name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
if (existingVariable != null && existingVariable.isValidBinding()){
if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
scope.problemReporter().redefineArgument(this);
return;
}
boolean isSpecialArgument = false;
if (existingVariable instanceof FieldBinding) {
if (scope.isInsideConstructor()) {
isSpecialArgument = true; // constructor argument
} else {
AbstractMethodDeclaration methodDecl = scope.referenceMethod();
if (methodDecl != null && CharOperation.prefixEquals(SET, methodDecl.selector)) {
isSpecialArgument = true; // setter argument
}
}
}
scope.problemReporter().localVariableHiding(this, existingVariable, isSpecialArgument);
}
scope.addLocalVariable(
this.binding =
new LocalVariableBinding(this, typeBinding, modifierFlag, true));
resolveAnnotations(scope, this.annotations, this.binding);
//true stand for argument instead of just local
this.binding.declaration = this;
this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED;
}
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
public int getKind() {
return PARAMETER;
}
public boolean isVarArgs() {
return this.type != null && (this.type.bits & IsVarArgs) != 0;
}
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
printModifiers(this.modifiers, output);
if (this.annotations != null) printAnnotations(this.annotations, output);
if (type == null) {
output.append("<no type> "); //$NON-NLS-1$
} else {
type.print(0, output).append(' ');
}
return output.append(this.name);
}
public StringBuffer printStatement(int indent, StringBuffer output) {
return print(indent, output).append(';');
}
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check bounds*/);
if (exceptionType == null) return null;
if (exceptionType.isBoundParameterizedType()) {
scope.problemReporter().invalidParameterizedExceptionType(exceptionType, this);
return null;
}
if (exceptionType.isTypeVariable()) {
scope.problemReporter().invalidTypeVariableAsException(exceptionType, this);
return null;
}
TypeBinding throwable = scope.getJavaLangThrowable();
if (!exceptionType.isCompatibleWith(throwable)) {
scope.problemReporter().typeMismatchError(exceptionType, throwable, this);
return null;
}
Binding existingVariable = scope.getBinding(name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
if (existingVariable != null && existingVariable.isValidBinding()){
if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
scope.problemReporter().redefineArgument(this);
return null;
}
scope.problemReporter().localVariableHiding(this, existingVariable, false);
}
this.binding = new LocalVariableBinding(this, exceptionType, modifiers, false); // argument decl, but local var (where isArgument = false)
resolveAnnotations(scope, this.annotations, this.binding);
scope.addLocalVariable(binding);
binding.setConstant(NotAConstant);
return exceptionType;
}
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (type != null)
type.traverse(visitor, scope);
if (initialization != null)
initialization.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
|
[
"[email protected]"
] | |
e6c14b741c67aa755c6241fba887fa17548c46fe
|
8be6c54bdaa6b9d326d5052883eadf5f0e18da7e
|
/app/src/main/java/com/dealse/dealsepartner/Interfaces/AddStore.java
|
ab8e38c2dac829c9066a13b953f115bd3c7b9399
|
[] |
no_license
|
heartzz/DealseRetailer
|
1253f18e3c24212a20038c126eba3d6b0a472873
|
3ad626e8de38ee05f853a6366880f035d2580bd0
|
refs/heads/master
| 2023-06-10T12:57:33.513707 | 2021-06-16T20:20:58 | 2021-06-16T20:20:58 | 354,929,648 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,850 |
java
|
package com.dealse.dealsepartner.Interfaces;
import com.dealse.dealsepartner.Entity.CheckStoreMobieNumberExistRequest;
import com.dealse.dealsepartner.Entity.CheckStoreMobieNumberExistResponse;
import com.dealse.dealsepartner.Entity.Store;
import com.dealse.dealsepartner.Objects.Partner;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface AddStore {
@Multipart
@POST("api/v1/Store/AddStoreForStoreApp")
Call<CheckStoreMobieNumberExistResponse> addStore(@Header("Authorization") String authtoken,
@Part("AreaId") Integer AreaId,
@Part("StoreTypeId") Integer StoreTypeId,
@Part("Name") RequestBody Name,
@Part("Email") RequestBody Email,
@Part("Address") RequestBody Address1,
@Part("Latitude") double Latitude,
@Part("Longitude") double Longitude,
@Part("OwnerName") RequestBody OwnerName,
@Part("OwnerMobileNo") RequestBody OwnerMobileNo,
@Part("MobileNo1") RequestBody MobileNo1,
@Part("DeviceID") RequestBody DeviceID,
@Part MultipartBody.Part Logo
);
}
|
[
"[email protected]"
] | |
f9cd88254ec5dc0973cb4cfb11358449f6394a77
|
60c7f7fe56cfb40f8276fa97eea2e1545e9604c0
|
/FlexableRcvTest/app/src/main/java/com/emrhmrc/hateksdepoqr/samples/flexibleadapter/animators/OvershootInRightItemAnimator.java
|
f8a21dad591e30aede7ba916a448010b27cb5a7f
|
[] |
no_license
|
hamurcuabi/MaterialUI
|
dec36e6f1126b3e291c8eb2bc9630e35d1e54a59
|
e0c7b1588b94c2ad0f456729d8f6569841ccf924
|
refs/heads/master
| 2020-08-22T08:37:21.272105 | 2019-09-19T09:43:26 | 2019-09-19T09:43:26 | 216,353,989 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,145 |
java
|
/*
* Copyright (C) 2015 Wasabeef
*
* 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.emrhmrc.hateksdepoqr.samples.flexibleadapter.animators;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.RecyclerView;
import android.view.animation.OvershootInterpolator;
import eu.davidea.flexibleadapter.common.FlexibleItemAnimator;
public class OvershootInRightItemAnimator extends FlexibleItemAnimator {
private final float mTension;
public OvershootInRightItemAnimator() {
mTension = 2.0f;
}
public OvershootInRightItemAnimator(float mTension) {
this.mTension = mTension;
}
@Override
protected void animateRemoveImpl(final RecyclerView.ViewHolder holder, final int index) {
ViewCompat.animate(holder.itemView)
.translationX(holder.itemView.getRootView().getWidth())
.setDuration(getRemoveDuration())
.setListener(new DefaultRemoveVpaListener(holder))
.start();
}
@Override
protected boolean preAnimateAddImpl(final RecyclerView.ViewHolder holder) {
holder.itemView.setTranslationX(holder.itemView.getRootView().getWidth());
return true;
}
@Override
protected void animateAddImpl(final RecyclerView.ViewHolder holder, final int index) {
ViewCompat.animate(holder.itemView)
.translationX(0)
.setDuration(getAddDuration())
.setInterpolator(new OvershootInterpolator(mTension))
.setListener(new DefaultAddVpaListener(holder))
.start();
}
}
|
[
"[email protected]"
] | |
4e2feb8aedfaded897f360fd7261685cce875405
|
6ab51618da03f96bbbbf63e3094a2121fddf3c36
|
/src/framedb/DBFrameView.java
|
1e2586f8cded9428f8bb897b5eabf9b2493a9e53
|
[] |
no_license
|
50316047/lastkadai
|
9733947b8bf4f536232933387a1214c8d47dca04
|
5490ec5ad89a2eb2369d2e27222ae81657b790bc
|
refs/heads/master
| 2021-03-12T22:21:05.601362 | 2015-02-13T04:54:31 | 2015-02-13T04:54:31 | 30,740,930 | 0 | 0 | null | null | null | null |
SHIFT_JIS
|
Java
| false | false | 2,225 |
java
|
package framedb;
import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Label;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.sql.ResultSet;
import java.sql.SQLException;
import dbconsole.MySQL;
public class DBFrameView extends Frame implements ActionListener,WindowListener{
private Button button1 =new Button("DBConsole");
//M/m/1用
public DBFrameView(DBFrameController controller) {
// TODO Auto-generated constructor stub
addWindowListener(this);
setTitle("FrameSystem");
setLayout(new FlowLayout(FlowLayout.CENTER));
add(button1);
button1.addActionListener(this);
}
@Override
public void windowActivated(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void windowClosed(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void windowClosing(WindowEvent arg0) {
// TODO Auto-generated method stub
System.exit(0);
}
@Override
public void windowDeactivated(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void windowDeiconified(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void windowIconified(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void windowOpened(WindowEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if(e.getSource()==button1){
int id, score;
String name;
ResultSet rs;
MySQL mysql = new MySQL();
rs = mysql.selectAll();
try {while(rs.next()){
id = rs.getInt("id");
name = rs.getString("name");
score = rs.getInt("score");
System.out.println("ID:" + id);
System.out.println("名前:" + name);
System.out.println("得点:" + score);
}
} catch (SQLException k) {
// TODO Auto-generated catch block
k.printStackTrace();
}//try catchで囲む
}
}
}
|
[
"[email protected]"
] | |
920c4a4bfb911185e659d6d3e98e19b7e6235c1c
|
776bebbfa7d4a3d45ba636cfdd42c957d5445d4a
|
/src/test/java/org/codelabor/example/helloworld/service/HelloWorldServiceTest.java
|
391518e6cb83b30c51ba5e82d550c21849986c11
|
[
"Apache-2.0"
] |
permissive
|
codelabor/codelabor-web-app-prototype
|
64964e174d106015a492163402d215436aa2a708
|
c9c7aca148fbd210e3adc7132c32144a603f0ca7
|
refs/heads/master
| 2022-12-23T03:53:39.495953 | 2020-07-08T05:17:54 | 2020-07-08T05:17:54 | 38,967,977 | 0 | 1 |
Apache-2.0
| 2022-12-16T06:03:23 | 2015-07-12T16:04:02 |
Java
|
UTF-8
|
Java
| false | false | 896 |
java
|
package org.codelabor.example.helloworld.service;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HelloWorldServiceTest {
private final Logger logger = LoggerFactory.getLogger(HelloWorldServiceTest.class);
private HelloWorldService helloWorldService = null;
@Before
public void setUp() throws Exception {
helloWorldService = new HelloWorldServiceImpl();
}
@Test
public void testSayHello() {
String message = helloWorldService.sayHello();
logger.debug("message: {}", message);
Assert.assertEquals("Hello, World!", message);
}
@Test
public void testSayHelloString() {
String name = "Bomber";
String message = helloWorldService.sayHello(name);
logger.debug("message: {}", message);
Assert.assertEquals("Hello, Bomber!", message);
}
}
|
[
"[email protected]"
] | |
8bf793dc4ed6fef1298dcdacc3a64a0b50f50fc2
|
20e6dd99d4a18efc2d68b7235625772ad1177588
|
/src/main/java/de/uni_mannheim/informatik/wdi/identityresolution/model/DefaultRecord.java
|
e2c5217daceccd8306edea9b86d2f322612203dc
|
[] |
no_license
|
jd3v/wdi
|
b4c74f83235527ce5ba0de1c4a94505ba5f9d074
|
34bbd75cd9b679bc958f0283dc2705223bebc515
|
refs/heads/master
| 2020-12-11T07:31:35.410356 | 2015-12-03T18:06:51 | 2015-12-03T18:06:51 | 46,276,543 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,173 |
java
|
package de.uni_mannheim.informatik.wdi.identityresolution.model;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import de.uni_mannheim.informatik.wdi.Record;
/**
* A default model that represents a record as a set of key/value pairs.
* @author Oliver
*
*/
public class DefaultRecord extends Record {
private Map<String, String> values;
private Map<String, List<String>> lists;
public DefaultRecord(String identifier, String provenance) {
super(identifier, provenance);
values = new HashMap<>();
lists = new HashMap<>();
}
public String getValue(String attributeName) {
return values.get(attributeName);
}
public List<String> getList(String attributeName) {
return lists.get(attributeName);
}
public void setValue(String attributeName, String value) {
values.put(attributeName, value);
}
public void setList(String attributeName, List<String> list) {
lists.put(attributeName, list);
}
public Set<String> getAttributeNames() {
return values.keySet();
}
public Set<String> getListAttributeNames() {
return lists.keySet();
}
}
|
[
"[email protected]"
] | |
a74d1362e61042abe5007568aaf43e80ea880651
|
68d4809e3d2b9091bf36752c20181ce085ffc4a0
|
/Projet_Thread/src/vdd/ascenceur/Asc0.java
|
7c9d74f5c39d5ce41c2d41005fb8e747d5f30150
|
[] |
no_license
|
phvdd59/FORMATION
|
2f0f5dedfbda9447d95d0961f80b54e3dd89a467
|
348e4810519be53d6305983d750ba6757c6152e7
|
refs/heads/master
| 2021-01-21T04:50:58.638429 | 2016-07-18T12:56:53 | 2016-07-18T12:56:53 | 54,314,328 | 4 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 207 |
java
|
package vdd.ascenceur;
import vdd.main.Main;
public class Asc0 extends Asc {
public Asc0(Main manageur) {
super(manageur);
}
@Override
public void run() {
while (!fin) {
}
}
}
|
[
"[email protected]"
] | |
b09db26e9b1dc2a290e2b380e495a35f102bae89
|
c8c121e622da2b01c7b53af4ec2ad7a1158ce88d
|
/src/com/kevinmichie/Student.java
|
bf1043245eb7862954ed681a18ad5fb9710417e2
|
[] |
no_license
|
kmichie32/PracticeFinalExamQuestions
|
67503cf1d8efac7c077bc9f9f82314aac7fe8124
|
5829d4de8034a3ab6616561326282f1f9fd486c2
|
refs/heads/master
| 2021-01-19T03:24:37.309264 | 2016-08-10T14:39:12 | 2016-08-10T14:39:12 | 65,340,361 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 902 |
java
|
package com.kevinmichie;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* Created by kevinmichie on 8/9/16.
*/
public class Student {
private String id;
private ArrayList<String> students;
public Student(String studentId) {
this.id = studentId;
}
public void addToStudents(String studentName) {
students.add(studentName);
}
public void removeStudents(String studentName) {
students.remove(studentName);
}
public String getId() {
return id;
}
public Map<String,Student> indexStudents(String id, ArrayList<Student> students) {
Student student = new Student(id);
Map studentsOrganized = new HashMap<String,Student>();
for(Student person: students) {
studentsOrganized.put(student.getId(), person);
}
return studentsOrganized;
}
}
|
[
"[email protected]"
] | |
775f51f9aa23110b4dc8ffd8616444ddb9638eef
|
2f0aa9461a1bb7df432158fd76197465cda89812
|
/Assessment/src/Bus/BusModel.java
|
75ded690952ef5d50ab61b6eae6befa779e0b52e
|
[] |
no_license
|
Salman-Root/Salman-Root
|
bdc7570312453068c5f8baf582accb92c65f4f9d
|
0934c77d23b0bbcb557dcb2e7f0e69992f0ee118
|
refs/heads/master
| 2021-01-04T20:33:38.554887 | 2020-08-02T07:12:31 | 2020-08-02T07:12:31 | 240,750,077 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,013 |
java
|
package Bus;
import java.util.ArrayList;
import java.util.Scanner;
public class BusModel {
String busNumber="";
int capacity=0;
boolean filledStatus=false;
String source="";
ArrayList<Driver> driverList;
Driver driver = new Driver();
Employee em= new Employee();
Scanner sc;
public BusModel() {
sc= new Scanner(System.in);
driverList= new ArrayList<Driver>();
}
public String getBusNumber() {
return busNumber;
}
public void setBusNumber(String busNumber) {
this.busNumber = busNumber;
}
public int getCapacity() {
return capacity;
}
public void setCapacity(int capacity) {
this.capacity = capacity;
}
public boolean isFilledStatus() {
return filledStatus;
}
public void setFilledStatus(boolean filledStatus) {
this.filledStatus = filledStatus;
}
public Driver getDriver() {
return driver;
}
public void setDriver(Driver driver) {
this.driver = driver;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public void populateDriver(int driverId, String driverPhone, String driverName) {
// TODO Auto-generated method stub
driver.setDriverId(driverId);
driver.setDriverName(driverName);
driver.setDriverPhone(driverPhone);
driverList.add(driver);
}
public void GetBusDetailsFromUser()
{
int id;
System.out.println("Select the driver from the below list");
for(Driver driver:driverList)
{
System.out.println("Driver Id"+driver.getDriverId());
}
System.out.println("Enter thr driver id");
id= sc.nextInt();
sc.nextLine();
driver.setDriverId(id);
System.out.println("Please enter Bus number");
busNumber=sc.nextLine();
setBusNumber(busNumber);
System.out.println("Please enter capacity");
capacity=sc.nextInt();
setCapacity(id);
sc.nextLine();
System.out.println("Please enter Source");
source=sc.nextLine();
setSource(source);
}
}
|
[
"[email protected]"
] | |
3ca6acef7b47ae79babaf931853edca44db084f4
|
93f3578669fb0d0030a550316aebe0d7b4221631
|
/rpc-supplychain-jxc/src/main/java/cn/com/glsx/supplychain/jxc/kafka/ExportMerchantOrder.java
|
d5ebfe9c3541f38eee7b8e56782f74ddcb050dd1
|
[] |
no_license
|
shanghaif/supplychain
|
4d7de62809b6c88ac5080a85a77fc4bf3d856db8
|
c36c771b0304c5739de98bdfc322c0082a9e523d
|
refs/heads/master
| 2023-02-09T19:01:35.562699 | 2021-01-05T09:39:11 | 2021-01-05T09:39:11 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,411 |
java
|
package cn.com.glsx.supplychain.jxc.kafka;
import java.util.Date;
//商户订单导出条件搜索
public class ExportMerchantOrder {
private String moMerchantOrder;
private String orderNumber;
private String productCode;
private String productName;
private String materialCode;
private String materialName;
private String dispatchOrderCode;
private String orderMaterialCode;
private String orderMaterialName;
private String type;
private Byte channel;
private String merchantCode;
private String merchantName;
private Byte status;
private Byte signStatus;
private Date startDate;
private Date endDate;
private Date checkStartDate;
private Date checkEndDate;
private Byte productTypeId;
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Byte getChannel() {
return channel;
}
public void setChannel(Byte channel) {
this.channel = channel;
}
public String getMerchantCode() {
return merchantCode;
}
public void setMerchantCode(String merchantCode) {
this.merchantCode = merchantCode;
}
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getCheckStartDate() {
return checkStartDate;
}
public void setCheckStartDate(Date checkStartDate) {
this.checkStartDate = checkStartDate;
}
public Date getCheckEndDate() {
return checkEndDate;
}
public void setCheckEndDate(Date checkEndDate) {
this.checkEndDate = checkEndDate;
}
public Byte getSignStatus() {
return signStatus;
}
public void setSignStatus(Byte signStatus) {
this.signStatus = signStatus;
}
public String getMoMerchantOrder() {
return moMerchantOrder;
}
public void setMoMerchantOrder(String moMerchantOrder) {
this.moMerchantOrder = moMerchantOrder;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public Byte getProductTypeId() {
return productTypeId;
}
public void setProductTypeId(Byte productTypeId) {
this.productTypeId = productTypeId;
}
public String getOrderMaterialName() {
return orderMaterialName;
}
public void setOrderMaterialName(String orderMaterialName) {
this.orderMaterialName = orderMaterialName;
}
public String getOrderMaterialCode() {
return orderMaterialCode;
}
public void setOrderMaterialCode(String orderMaterialCode) {
this.orderMaterialCode = orderMaterialCode;
}
@Override
public String toString() {
return "ExportMerchantOrder [moMerchantOrder=" + moMerchantOrder
+ ", orderNumber=" + orderNumber + ", productCode="
+ productCode + ", productName=" + productName
+ ", materialCode=" + materialCode + ", materialName="
+ materialName + ", orderMaterialCode=" + orderMaterialCode
+ ", orderMaterialName=" + orderMaterialName + ", type=" + type
+ ", channel=" + channel + ", merchantCode=" + merchantCode
+ ", merchantName=" + merchantName + ", status=" + status
+ ", signStatus=" + signStatus + ", startDate=" + startDate
+ ", endDate=" + endDate + ", checkStartDate=" + checkStartDate
+ ", checkEndDate=" + checkEndDate + ", productTypeId="
+ productTypeId + "]";
}
public String getDispatchOrderCode() {
return dispatchOrderCode;
}
public void setDispatchOrderCode(String dispatchOrderCode) {
this.dispatchOrderCode = dispatchOrderCode;
}
}
|
[
"[email protected]"
] | |
f911792d3b2ac54f585fb6e0ee9988b2ddf93bca
|
dccee02e3e9bafdc7d1c578fecb328b643059e17
|
/src/utils/javafx/IntegerField.java
|
b2c1c5e8e9b06ca365aa8115d38f61fa3baf8f11
|
[
"MIT"
] |
permissive
|
hammer97/NEmuS
|
571cdb763cc5cd5e5618edb44b316e3b3d655a3b
|
3b3e2c9bbb249611343461aa14cf5b8fc4f35c7d
|
refs/heads/master
| 2022-11-14T18:12:28.196927 | 2020-07-02T14:32:49 | 2020-07-02T20:04:40 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 510 |
java
|
package utils.javafx;
import javafx.scene.control.TextField;
import openGL.filters.Parameter;
public class IntegerField extends TextField {
public IntegerField(Parameter parameter) {
super(parameter.value.toString());
setMaxWidth(40);
textProperty().addListener((observable, oldValue1, newValue1) -> {
if (!newValue1.matches("\\d{0,20}([.]\\d{0,4})?"))
setText(oldValue1);
parameter.value = Integer.parseInt(getText());
});
}
}
|
[
"[email protected]"
] | |
b42040921943311cbf5854792228d5e6267954a2
|
d16e5da8412a34d0c294dabf3be91230770e2ab2
|
/src/poo/Carro.java
|
ae69deefa72d42a311e69d21037853159c3b6e93
|
[] |
no_license
|
JehuelCastro/CursoJava_VS
|
208b3282f801ed2fe5767666176c0095b1d5b8a1
|
bf1b06b000c6ae4dbbb175f200f248d48b2606b8
|
refs/heads/main
| 2023-07-15T20:34:24.661225 | 2021-08-30T08:19:26 | 2021-08-30T08:19:26 | 401,220,400 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 310 |
java
|
package poo;
public class Carro {
int ano;
String cor;
void ligar() {
System.out.println("engine ON ..........");
}
void desligar() {
System.out.println("engine OF ..........");
}
void acelerar() {
System.out.println("vrummmmmmmmmmmmmmm");
}
}
|
[
"[email protected]"
] | |
ad23a1e14d53fb218c55cf4b0394a6069478afa4
|
d6d61ab071ce87a0049638e327337b2a201cf191
|
/app/src/main/java/com/nikorych/mymoviesmvvmretrofit/model/MovieDataSource.java
|
e494fa4f4e974895b0b5ffe0368b53230fa515bc
|
[] |
no_license
|
nT14Ko/MyAACMovies
|
b27810d00106d43de2f716bd3ff8abce1ef59d1d
|
b5626ad639d82c8e4d3fa4b321ec3374379ca6c1
|
refs/heads/master
| 2022-11-22T16:54:35.273406 | 2020-07-08T19:06:37 | 2020-07-08T19:06:37 | 278,139,993 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,040 |
java
|
package com.nikorych.mymoviesmvvmretrofit.model;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.paging.PageKeyedDataSource;
import com.nikorych.mymoviesmvvmretrofit.R;
import com.nikorych.mymoviesmvvmretrofit.service.MovieApiService;
import com.nikorych.mymoviesmvvmretrofit.service.RetrofitInstance;
import java.util.ArrayList;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class MovieDataSource extends PageKeyedDataSource<Long, Result> {
private MovieApiService movieApiService;
private Application application;
public MovieDataSource(MovieApiService movieApiService, Application application) {
this.movieApiService = movieApiService;
this.application = application;
}
@Override
public void loadInitial(@NonNull LoadInitialParams<Long> params, @NonNull LoadInitialCallback<Long, Result> callback) {
movieApiService = RetrofitInstance.getService();
Call<MovieApiResponse> call = movieApiService.getPopularMoviesWithPaging(application.getApplicationContext().getString(R.string.api_key), 1);
call.enqueue(new Callback<MovieApiResponse>() {
@Override
public void onResponse(Call<MovieApiResponse> call, Response<MovieApiResponse> response) {
MovieApiResponse movieApiResponse = response.body();
ArrayList<Result> results = new ArrayList<>();
if (movieApiResponse != null && movieApiResponse.getResults() != null){
results = (ArrayList<Result>) movieApiResponse.getResults();
callback.onResult(results, null, (long) 2);
}
}
@Override
public void onFailure(Call<MovieApiResponse> call, Throwable t) {
}
});
}
@Override
public void loadBefore(@NonNull LoadParams<Long> params, @NonNull final LoadCallback<Long, Result> callback) {
}
@Override
public void loadAfter(@NonNull LoadParams<Long> params, @NonNull LoadCallback<Long, Result> callback) {
movieApiService = RetrofitInstance.getService();
Call<MovieApiResponse> call = movieApiService.getPopularMoviesWithPaging(application.getApplicationContext().getString(R.string.api_key), params.key);
call.enqueue(new Callback<MovieApiResponse>() {
@Override
public void onResponse(Call<MovieApiResponse> call, Response<MovieApiResponse> response) {
MovieApiResponse movieApiResponse = response.body();
ArrayList<Result> results = new ArrayList<>();
if (movieApiResponse != null && movieApiResponse.getResults() != null) {
results = (ArrayList<Result>) movieApiResponse.getResults();
callback.onResult(results, params.key + 1);
}
}
@Override
public void onFailure(Call<MovieApiResponse> call, Throwable t) {
}
});
}
}
|
[
"[email protected]"
] | |
6517f8341ddd8fe67e40240c24d3bbc46ebfd995
|
343d10584fe85e64d16948ca17633b301deaad84
|
/src/Codec.java
|
33cfb6088912a23b7c82aecac7b191f108899b28
|
[] |
no_license
|
feiteng/leetcode
|
2a7fd32ce7f70b308bdd6b361bd59f8d51eb866c
|
19fdc2fae10d9c527bc89d3cba56fe7c182b6045
|
refs/heads/master
| 2021-01-19T20:30:35.056523 | 2020-07-20T01:04:53 | 2020-07-20T01:04:53 | 16,057,762 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,931 |
java
|
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
// public class Codec
// {
//
// // Encodes a list of strings to a single string.
// public String encode( List<String> strs )
// {
// StringBuilder sb = new StringBuilder();
// for ( String s : strs )
// sb.append( "" + s.length() + "." + s );
// return sb.toString();
//
// }
//
// // Decodes a single string to a list of strings.
// public List<String> decode( String s )
// {
// List<String> list = new ArrayList<>();
// int i = 0;
// while ( i < s.length() )
// {
// int p = s.indexOf( ".", i );
// int len = Integer.valueOf( s.substring( i, p ) );
// list.add( s.substring( p + 1, len + p + 1 ) );
// i = len + p + 1;
// }
//
// return list;
// }
//
// public static void main( String[] args )
// {
// Codec c = new Codec();
// List<String> list = new ArrayList<>();
// String[] strings = { "C#", "&", "~Xp|F", "R4QBf9g=_" };
// for ( String string : strings )
// list.add( string );
// System.out.println( c.decode( c.encode( list ) ) );
// }
// }
// public class Codec
// {
// Map<String, String> _longUrl = new HashMap<>(), _shortUrl = new HashMap<>();
// String string = "http://tinyurl.com/", code = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
// int len = code.length();
// Random r = new Random();
//
// // Encodes a URL to a shortened URL.
// public String encode( String longUrl )
// {
// _longUrl.put( null, null );
// if ( _longUrl.containsKey( longUrl ) )
// return _longUrl.get( longUrl );
// String key = null;
// StringBuilder sb = new StringBuilder();
// while ( _longUrl.containsKey( key ) )
// {
// for ( int i = 0; i < 10; i++ ) // length of 10
// sb.append( code.charAt( r.nextInt( len ) ) );
// key = sb.toString();
// }
// _longUrl.put( longUrl, key );
// _shortUrl.put( key, longUrl );
// return string.concat( key );
// }
//
// // Decodes a shortened URL to its original URL.
// public String decode( String shortUrl )
// {
// return _shortUrl.get( shortUrl.substring( 19, shortUrl.length() ) );
// }
//
// public static void main( String[] args )
// {
// Codec c = new Codec();
// System.out.println( c.decode( c.encode( "https://leetcode.com/problems/design-tinyurl" ) ) );
// }
// }
// public class Codec
// {
//
// // Encodes a tree to a single string.
// public String serialize( TreeNode root )
// {
// list.clear();
// preOrder( root );
// return String.join( ",", list );
// }
//
// // Decodes your encoded data to tree.
// public TreeNode deserialize( String data )
// {
// if ( data.length() < 1 )
// return null;
// String[] sVals = data.split( "," );
// int[] vals = new int[sVals.length];
// for ( int i = 0; i < sVals.length; i++ )
// vals[i] = Integer.parseInt( sVals[i] );
// return construct( vals );
// }
//
// TreeNode construct( int[] val )
// {
// if ( val.length < 1 )
// return null;
// int i = 1;
// TreeNode root = new TreeNode( val[0] );
// while ( i < val.length && val[i] < val[0] )
// i++;
// int[] left = Arrays.copyOfRange( val, 1, i ), right = Arrays.copyOfRange( val, i, val.length );
// root.left = construct( left );
// root.right = construct( right );
// return root;
// }
//
// List<String> list = new ArrayList<>();
//
// void preOrder( TreeNode root )
// {
// if ( root == null )
// return;
// list.add( String.valueOf( root.val ) );
// preOrder( root.left );
// preOrder( root.right );
// }
// }
public class Codec
{
// Encodes a tree to a single string.
// level order representation
public String serialize( TreeNode root )
{
if ( root == null )
return "";
Queue<TreeNode> queue = new LinkedList<>(), tQueue = new LinkedList<>();
List<String> list = new ArrayList<>();
queue.add( root );
while ( !queue.isEmpty() )
{
tQueue.clear();
while ( !queue.isEmpty() )
{
TreeNode p = queue.poll();
if ( p != null )
{
tQueue.add( p.left );
tQueue.add( p.right );
list.add( String.valueOf( p.val ) );
}
else
list.add( "null" );
}
queue.addAll( tQueue );
}
return String.join( ",", list );
}
// Decodes your encoded data to tree.
public TreeNode deserialize( String data )
{
if ( data.equals( "" ) )
return null;
String[] sv = data.split( "," );
TreeNode root = new TreeNode( Integer.valueOf( sv[0] ) );
Queue<TreeNode> queue = new LinkedList<>();
queue.add( root );
int k = 1;
while ( k < sv.length )
{
TreeNode tmp = queue.poll();
if ( !sv[k].equals( "null" ) )
{
tmp.left = new TreeNode( Integer.parseInt( sv[k] ) );
queue.add( tmp.left );
}
k++;
if ( k < sv.length && !sv[k].equals( "null" ) )
{
tmp.right = new TreeNode( Integer.parseInt( sv[k] ) );
queue.add( tmp.right );
}
k++;
}
return root;
}
public static void main( String[] args )
{
Codec cd = new Codec();
TreeNode r = new TreeNode( 1 );
System.out.println( cd.serialize( r ) );
cd.deserialize( "1" ).print();
}
}
|
[
"[email protected]"
] | |
3bb7d6d2fb7c52d869ebb1ada40f69c9230fccba
|
9eb1ffac0ab5a8a10d2b4b18ae4e978603e2e796
|
/src/model/date/DateFormatter.java
|
b6985ea2ffbd8b627f307ff323aabdb13091310c
|
[] |
no_license
|
dryu99/simple-budgeter
|
60517789bfc6a12f4d562c836b7df96affb3153c
|
ac982780c7f3cada4e672044fb6f8dfc5d1b3b4f
|
refs/heads/master
| 2020-04-12T02:00:44.127005 | 2018-12-18T05:41:58 | 2018-12-18T05:41:58 | 162,235,242 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 348 |
java
|
package model.date;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateFormatter {
private static SimpleDateFormat instance = new SimpleDateFormat("dd/MM/yy");
// EFFECTS: returns given date in simple string form dd/mm/yy
public static String format(Date date) {
return instance.format(date);
}
}
|
[
"[email protected]"
] | |
275684b781db6be70e267db7a8e2e3771ce4dac8
|
865a81f9ae98d7d7f55eb979431e21cbe19cb19a
|
/BlogProject/cruddemobackend/src/test/java/com/amit/cruddemobackend/test/UserDAOTest.java
|
968c08ba404351b11d434a6b4c15b49655410330
|
[] |
no_license
|
amitsingh100919/Back-Up
|
a36084a2e5440d60ad22a5afeb8c12fb66d547d1
|
a0dfc309e63095e921c55b4eef148334eca63824
|
refs/heads/master
| 2020-04-04T19:21:01.705528 | 2018-11-05T10:54:59 | 2018-11-05T10:54:59 | 156,202,358 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,535 |
java
|
package com.amit.cruddemobackend.test;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.amit.cruddemobackend.DAO.UserDAO;
import com.amit.cruddemobackend.model.User;
public class UserDAOTest {
private static AnnotationConfigApplicationContext context=null;
private static UserDAO userDAO=null;
private static User user=null;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
context=new AnnotationConfigApplicationContext();
context.scan("com.amit.cruddemobackend");
context.refresh();
userDAO=(UserDAO)context.getBean("userDAO");
user=new User();
}
@Test
public void testRegisterUser() {
user.setEmail("[email protected]");
user.setPassword("123456");
user.setFirstname("amit");
user.setLastname("singh");
user.setMobile("9417808375");
assertTrue("User record not inserted",userDAO.saveUser(user));
}
@Ignore
@Test
public void testUpdateUser() {
fail("Not yet implemented");
}
@Ignore
@Test
public void testDeleteUser() {
fail("Not yet implemented");
}
@Ignore
@Test
public void testGetUserByEmail() {
fail("Not yet implemented");
}
@Ignore
@Test
public void testGetAllActiveUser() {
fail("Not yet implemented");
}
@Ignore
@Test
public void testActiveOrdeactiveUser() {
fail("Not yet implemented");
}
@Ignore
@Test
public void testValidate() {
fail("Not yet implemented");
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.