blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 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 684M ⌀ | 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 132 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 28 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64ab97da00f58d51f2fda06ed011b8874d4e7570 | 1dbbafec723fbe16fdec250aab8d66fe298a72e5 | /app/src/androidTest/java/org/chzz/map/ApplicationTest.java | 343d99657f2dcb781b7fcf2fd852823916c779fd | [] | no_license | xiaoxinxing12/ChzzMap-Android | ba4f27e5af6cd76f02ee3688f25c528eb07f789d | cf119001cbae8a540a31da7375fe37413e5f7361 | refs/heads/master | 2021-01-16T20:38:31.071026 | 2016-08-05T10:13:00 | 2016-08-05T10:13:00 | 64,924,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 343 | java | package org.chzz.map;
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);
}
} | [
"xiaoxinxing12@qq.com"
] | xiaoxinxing12@qq.com |
39a6db6dce611e3f6b6ddf6c47dae324610871e5 | 2e17e8dd21931b8603be7e65b611d5831a3dcf6b | /src/main/java/com/tharuke/lhi/repository/CustomerRepository.java | 0c7a77a05bdba3b0bc274cc0c27263edee29b675 | [] | no_license | TharukeJay/lhi-backend | 0c2b3c190a82eb756488b85fd3faffbabd3b7918 | f65d7071f16424f1d7015ed537f57a6e0b6dc773 | refs/heads/master | 2023-08-15T02:49:45.345020 | 2021-09-26T04:48:35 | 2021-09-26T04:48:35 | 400,353,704 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 797 | java | package com.tharuke.lhi.repository;
import com.tharuke.lhi.repository.model.Customer;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface CustomerRepository extends MongoRepository<Customer,String> {
List<Customer> findAll();
Customer findCustomerByCustomerId(String customerId);
boolean existsCustomerByCustomerName(String customerName);
boolean existsCustomerByCustomerId(String customerId);
@Query("{'$or':[ {'customerName':{'$regex':?0, $options: 'i'}}, {'town':{'$regex':?1, $options: 'i'}} ] }")
List<Customer> searchAllByCustomerNameAndTown(String customerName, String townText);
}
| [
"tharuke.insteller@gmail.com"
] | tharuke.insteller@gmail.com |
1043c23804733b9a4bc6d38c11dfc94a1b54b2f6 | 506cbb3a7e991221063095c1861ade0d6afea15d | /src/main/java/com/codetaylor/mc/dropt/modules/dropt/rule/parse/ParserRuleMatchBlocks.java | 78e8aa1e517e5140ed5914bf4b3073642c7e357d | [
"Apache-2.0"
] | permissive | WolfieWaffle/dropt | 93fe18157700e233a0c70b6d08e5239c9fef84d1 | d0388b9e5d8c1db1fee4ae4bed3b8c208ce77a8e | refs/heads/master | 2020-06-14T08:43:08.032853 | 2019-06-30T18:18:49 | 2019-06-30T18:18:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,087 | java | package com.codetaylor.mc.dropt.modules.dropt.rule.parse;
import com.codetaylor.mc.athenaeum.parser.recipe.item.MalformedRecipeItemException;
import com.codetaylor.mc.athenaeum.parser.recipe.item.ParseResult;
import com.codetaylor.mc.athenaeum.parser.recipe.item.RecipeItemParser;
import com.codetaylor.mc.dropt.modules.dropt.rule.data.Rule;
import com.codetaylor.mc.dropt.modules.dropt.rule.data.RuleList;
import com.codetaylor.mc.dropt.modules.dropt.rule.log.ILogger;
import com.codetaylor.mc.dropt.modules.dropt.rule.log.DebugFileWrapper;
import com.codetaylor.mc.dropt.modules.dropt.rule.match.BlockMatchEntry;
import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.oredict.OreDictionary;
public class ParserRuleMatchBlocks
implements IRuleListParser {
@Override
public void parse(
RecipeItemParser parser, RuleList ruleList, Rule rule, ILogger logger, DebugFileWrapper debugFileWrapper
) {
if (rule.match == null) {
if (rule.debug) {
debugFileWrapper.debug("[PARSE] Match object not defined, skipped parsing block match");
}
return;
}
if (rule.match.blocks == null || rule.match.blocks.blocks.length == 0) {
if (rule.debug) {
debugFileWrapper.debug("[PARSE] No block matches defined, skipped parsing block match");
}
return;
}
for (String string : rule.match.blocks.blocks) {
String[] split = string.split(",");
ParseResult parse;
try {
parse = parser.parse(split[0]);
} catch (MalformedRecipeItemException e) {
logger.error("[PARSE] Unable to parse block <" + split[0] + "> in file: " + ruleList._filename, e);
continue;
}
if (rule.debug) {
debugFileWrapper.debug("[PARSE] Parsed block match: " + parse);
}
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(parse.getDomain(), parse.getPath()));
if (block == null) {
logger.error("[PARSE] Unable to find registered block: " + parse.toString());
continue;
}
if (rule.debug) {
debugFileWrapper.debug("[PARSE] Found registered block: " + block);
}
int meta = parse.getMeta();
int[] metas = new int[Math.max(split.length - 1, 0)];
for (int i = 1; i < split.length; i++) {
if ("*".equals(split[i].trim())) {
meta = OreDictionary.WILDCARD_VALUE;
metas = new int[0];
break;
}
try {
metas[i - 1] = Integer.valueOf(split[i].trim());
} catch (Exception e) {
logger.error("[PARSE] Unable to parse extra meta for <" + string + "> in file: " + ruleList._filename, e);
}
}
BlockMatchEntry blockMatchEntry = new BlockMatchEntry(parse.getDomain(), parse.getPath(), meta, metas);
rule.match.blocks._blocks.add(blockMatchEntry);
if (rule.debug) {
debugFileWrapper.debug("[PARSE] Added block matcher: " + blockMatchEntry);
}
}
}
}
| [
"jason@codetaylor.com"
] | jason@codetaylor.com |
0f89246f6d8f6d5dccae1fdbd7de3fb90d41696c | d5fe966fe2189398ca1825d4f3decc38c7e0c75f | /app/src/main/java/com/example/myapplication/NewListContents.java | af08f32fc8911c44f1746dfc57444ac99f716c75 | [] | no_license | HarshShirke25/Women-Safety-App | 7c81d4b3e5edf284f93522c923c65c0417933343 | aae8d4f70b8960f447b275e1dff64b691a0f60e3 | refs/heads/main | 2023-05-28T14:44:51.288340 | 2021-06-14T18:24:13 | 2021-06-14T18:24:13 | 376,919,256 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,322 | java | package com.example.myapplication;
import android.annotation.SuppressLint;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
public class NewListContents extends AppCompatActivity {
DatabaseHandler myDB;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.viewcontents_layout);
@SuppressLint("WrongViewCast") ListView listView = (ListView) findViewById(R.id.views);
myDB = new DatabaseHandler(this);
ArrayList<String> theList = new ArrayList<>();
Cursor data = myDB.getListContents();
if (data.getCount() == 0) {
Toast.makeText(NewListContents.this, "There is no contact", Toast.LENGTH_SHORT).show();
} else {
while (data.moveToNext()) {
theList.add(data.getString(1));
ListAdapter listAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, theList);
listView.setAdapter(listAdapter);
}
}
}
}
| [
"shirkeharsh8@gmail.com"
] | shirkeharsh8@gmail.com |
4b56bc5209d963a999819dff455a27390ab71e90 | 57d151f463cc0f0424de701cd287b4a538a0065e | /mega_repaso/src/pro_ev1/tanda3ej7.java | f5242458e5b4ce434d4cd9f58df0afcb7d93dcd2 | [] | no_license | svivancos/src_java | dfb0d88ace38963a80ff8f656e0abfb7533973e7 | 1e24a3797eb32c48d6b7debcfc69cea805e1cd5c | refs/heads/master | 2020-04-30T08:52:26.483113 | 2015-08-31T11:26:18 | 2015-08-31T11:26:18 | 41,671,821 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 945 | java | package pro_ev1;
public class tanda3ej7 {
public static void main(String[] args) {
int[] vec = {5,6,8,9,7,4,3,10,1};
System.out.print("Sin orden: ");
for(int i = 0; i < vec.length; i++){
System.out.print(vec[i]+" ");
}
System.out.println();
System.out.print("Ordenado: ");
int i, j, menor, pos, tmp;
// FASE 1, cogemos el primer valor lo damos como si fuera el menor y posteriormente probaremos el resto
for (i = 0; i < vec.length - 1; i++) {
menor = vec[i];
pos = i;
// FASE 2, con ese teórico menor lo cotejamos con los demás en busca de uno menor
for (j = i + 1; j < vec.length; j++){
if (vec[j] < menor) {
menor = vec[j];
pos = j;
}
}
// FASE 3, si hay uno menor se intercambian las posiciones
if (pos != i){
tmp = vec[i];
vec[i] = vec[pos];
vec[pos] = tmp;
}
}
for(int k = 0; k < vec.length; k++){
System.out.print(vec[k]+" ");
}
}
}
| [
"dzei_one@hotmail.com"
] | dzei_one@hotmail.com |
65088e01af86172aef7ec367ad7d43b603b34d4c | faad8f8a6da1a8bd421fb7581df175253682cd4b | /src/main/java/org/javarosa/core/services/PrototypeManager.java | d4a8e26e0303c58380d0c68cc65d03d7763f508a | [
"Apache-2.0"
] | permissive | echisMOH/echisCommCareMOH-core | cff4011261098b18afeaa249b4ff35f5d97e5e8f | 30fde2c53a96315195c6d00ef693e63a2f99c6db | refs/heads/master | 2020-05-21T16:06:29.238477 | 2019-05-11T08:16:45 | 2019-05-11T08:16:45 | 186,106,173 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,307 | java | package org.javarosa.core.services;
import org.javarosa.core.util.externalizable.CannotCreateObjectException;
import org.javarosa.core.util.externalizable.PrototypeFactory;
import java.util.HashSet;
public class PrototypeManager {
private static final HashSet<String> prototypes = new HashSet<>();
private static PrototypeFactory staticDefault;
public static void registerPrototype(String className) {
prototypes.add(className);
try {
PrototypeFactory.getInstance(Class.forName(className));
} catch (ClassNotFoundException e) {
throw new CannotCreateObjectException(className + ": not found");
}
rebuild();
}
public static void registerPrototypes(String[] classNames) {
for (String className : classNames) {
registerPrototype(className);
}
}
public static PrototypeFactory getDefault() {
if (staticDefault == null) {
rebuild();
}
return staticDefault;
}
private static void rebuild() {
if (staticDefault == null) {
staticDefault = new PrototypeFactory(prototypes);
return;
}
synchronized (staticDefault) {
staticDefault = new PrototypeFactory(prototypes);
}
}
}
| [
"dwt.krs@gmail.com"
] | dwt.krs@gmail.com |
3e52f732eba4b76aba07b23e8e334494e6c68838 | 0ad728410205770a667806a87f3a2daeaeccec94 | /src/main/java/com/vtgarment/model/view/NormalView.java | e15d221d815fc06bbebba7c59686db9ec7a7073e | [] | no_license | NarongchaiPlaiyim/VTGarment | 55fafb9a58d08fb57379298c434366a7d56938f5 | e1da45d550f91e5e8fbe7df80066328ca4ac0107 | refs/heads/master | 2021-01-18T22:01:22.125128 | 2016-05-30T04:12:10 | 2016-05-30T04:12:10 | 54,274,192 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package com.vtgarment.model.view;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
public abstract class NormalView extends View {
public String country;
public String factory;
public String line;
public String sutureLine;
public String percentOfYesterday;
public String percentOfToday;
public String trends;
}
| [
"N.Plaiyim@gmail.com"
] | N.Plaiyim@gmail.com |
77bc61050b652b2b5bd72f5ffca80cbbe557eb38 | afe46e1cb5d6b2a6a7f05a3aaabacb204cfd249d | /src/model/data_structures/llaveC.java | 0ed87137ae9d5e90c93f05d0403964e82c992c3b | [] | no_license | lagonzalezd/Proyecto_2_202010_sec_3_team_1 | 2939cf8c3067ee221299859f33822370739c0583 | 11594d080ca75e1b217c560d0df18d39a6c53c04 | refs/heads/master | 2021-05-20T14:19:54.699306 | 2020-04-26T04:47:49 | 2020-04-26T04:47:49 | 252,329,950 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 327 | java | package model.data_structures;
public class llaveC implements Comparable<llaveC>{
private int id;
public llaveC(int pObjId){
id = pObjId;
}
public int darId(){
return id;
}
public int compareTo(llaveC arg0) {
if (id>arg0.darId())
return 1;
else if (id<arg0.darId())
return -1;
return 0;
}
} | [
"60269749+Geisson19@users.noreply.github.com"
] | 60269749+Geisson19@users.noreply.github.com |
2868f4b85e85299ca04ac7e77cd1cfc0796bb6b4 | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A72n_10_0_0/src/main/java/com/android/server/wm/ClientLifecycleManager.java | 5bce15ab3315bbaeca2fd383f6b3446233033b62 | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,412 | java | package com.android.server.wm;
import android.app.IApplicationThread;
import android.app.servertransaction.ActivityLifecycleItem;
import android.app.servertransaction.ClientTransaction;
import android.app.servertransaction.ClientTransactionItem;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
/* access modifiers changed from: package-private */
public class ClientLifecycleManager {
ClientLifecycleManager() {
}
/* access modifiers changed from: package-private */
public void scheduleTransaction(ClientTransaction transaction) throws RemoteException {
IApplicationThread client = transaction.getClient();
ClientLifecycleMonitor.getInstance().transactionStart(transaction);
transaction.schedule();
if (!(client instanceof Binder)) {
transaction.recycle();
}
}
/* access modifiers changed from: package-private */
public void scheduleTransaction(IApplicationThread client, IBinder activityToken, ActivityLifecycleItem stateRequest) throws RemoteException {
scheduleTransaction(transactionWithState(client, activityToken, stateRequest));
}
/* access modifiers changed from: package-private */
public void scheduleTransaction(IApplicationThread client, IBinder activityToken, ClientTransactionItem callback) throws RemoteException {
scheduleTransaction(transactionWithCallback(client, activityToken, callback));
}
/* access modifiers changed from: package-private */
public void scheduleTransaction(IApplicationThread client, ClientTransactionItem callback) throws RemoteException {
scheduleTransaction(transactionWithCallback(client, null, callback));
}
private static ClientTransaction transactionWithState(IApplicationThread client, IBinder activityToken, ActivityLifecycleItem stateRequest) {
ClientTransaction clientTransaction = ClientTransaction.obtain(client, activityToken);
clientTransaction.setLifecycleStateRequest(stateRequest);
return clientTransaction;
}
private static ClientTransaction transactionWithCallback(IApplicationThread client, IBinder activityToken, ClientTransactionItem callback) {
ClientTransaction clientTransaction = ClientTransaction.obtain(client, activityToken);
clientTransaction.addCallback(callback);
return clientTransaction;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
55608810938ebabdf744ef14f96577a3a85fc146 | 329b2cb3c91a0c953458efd253c4fcdce6f539c4 | /graphsdk/src/main/java/com/microsoft/graph/generated/IBaseWorkbookTableConvertToRangeRequestBuilder.java | 3577b6dfa4807c78d308306af81dad1096d94f5c | [
"MIT"
] | permissive | sbolotovms/msgraph-sdk-android | 255eeddf19c1b15f04ee3b1549f0cae70d561fdd | 1320795ba1c0b5eb36ef8252b73799d15fc46ba1 | refs/heads/master | 2021-01-20T05:09:00.148739 | 2017-04-28T23:20:23 | 2017-04-28T23:20:23 | 89,751,501 | 1 | 0 | null | 2017-04-28T23:20:37 | 2017-04-28T23:20:37 | null | UTF-8 | Java | false | false | 1,485 | java | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.extensions.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.List;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Workbook Table Convert To Range Request Builder.
*/
public interface IBaseWorkbookTableConvertToRangeRequestBuilder extends IRequestBuilder {
/**
* Creates the IWorkbookTableConvertToRangeRequest
*
* @return The IWorkbookTableConvertToRangeRequest instance
*/
IWorkbookTableConvertToRangeRequest buildRequest();
/**
* Creates the IWorkbookTableConvertToRangeRequest with specific options instead of the existing options
*
* @param requestOptions the options for the request
* @return The IWorkbookTableConvertToRangeRequest instance
*/
IWorkbookTableConvertToRangeRequest buildRequest(final List<Option> requestOptions);
}
| [
"brianmel@microsoft.com"
] | brianmel@microsoft.com |
d6ea9d890724b6fc5e41c2d1423ea39f89d6deac | f0a63413261469627354a246836a46035382fb46 | /Android/mud/src/Teacher.java | e2f8ccd698923d2f37c6719b09916282ef4c67bb | [] | no_license | oskarlindh/Java | 1b4ece6ca15357ebfbfa57f08d08d9b5883b9919 | 0488369e7c85a10b5f6537b0c7b560106d4f6773 | refs/heads/master | 2020-06-28T20:35:26.868845 | 2019-01-19T10:16:31 | 2019-01-19T10:16:31 | 74,474,201 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,037 | java | import java.io.File;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.lang.StringBuilder;
/**
* Teacher is subclass to Creature and handles the avatar courses interaction
*/
public class Teacher extends Creature
{
private Course course;
private List<String> validInteractions;
/**
*Default constructor for the Teacher object
* @param name the name of the Teacher
*/
public Teacher(String name)
{
super(name);
validInteractions = new ArrayList<String>();
validInteractions.add("talk");
}
/**
* Prints the Teachers name and it's course
*/
public void talk()
{
String talk = "Hi my name is " +super.name+"\n";
talk += "The subject i am teaching is " + course;
System.out.println(talk);
}
/**
* Prints the Teachers question
*/
public void askQuestion()
{
StringBuilder question = new StringBuilder();
question.append("Teacher "+super.name+" asks you a question\n\n");
question.append(course.questionToString());
System.out.println(question.toString());
}
/**
* Checks if an interaction is valid
* @param action the action to test for validity
* @return true if the interaction is a valid one
*/
public boolean validInteraction(String action)
{
for (int i = 0;i < validInteractions.size();i++ ) {
if(action.equals(validInteractions.get(i)))
return true;
}
return false;
}
public List<String> getValidInteractions()
{
return validInteractions;
}
/**
* Prints the Teachers questions with one less alternativ
*/
public void askQuestionAlternativeRemoved()
{ if(course == null)
System.out.println("I have no question to ask you");
System.out.println(course.questionRemoveAnswer());
}
/**
* Checks if the answer to the question is correct
* @param answer the alternative for the teachers quesion wished to test
* for corectness
* @return true if the answer i correct
*/
public boolean checkAnswer(int answer)
{
return course.checkAnswer(answer);
}
/**
* Set the object course
* @param course the course to set for the teacher.
*/
public void setCourse(Course course)
{ if(this.course == null){
this.course = course;
validInteractions.add("enroll");
}
}
/**
* Returns the Book for the objects course
* @return the book corresponding to the teachers course
*/
public Book getCourseBook()
{
return course.getBook();
}
/**
* @return a string containing "Teacher"
*/
public String getCreatureType()
{
return "Teacher";
}
/**
* @return the objects course object
*/
public Course getCourse()
{
return course;
}
}
| [
"oskar_lindholm_ritz@hotmail.com"
] | oskar_lindholm_ritz@hotmail.com |
14d39d7d058a22a8b60f1ac221331cb32ece5a83 | c83ae1e7ef232938166f7b54e69f087949745e0d | /sources/com/google/firebase/iid/zzav.java | 5dd066f369d772b10c865d2da5c2aa251f85f4a1 | [] | no_license | FL0RlAN/android-tchap-1.0.35 | 7a149a08a88eaed31b0f0bfa133af704b61a7187 | e405f61db55b3bfef25cf16103ba08fc2190fa34 | refs/heads/master | 2022-05-09T04:35:13.527984 | 2020-04-26T14:41:37 | 2020-04-26T14:41:37 | 259,030,577 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,587 | java | package com.google.firebase.iid;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.util.Log;
import androidx.collection.SimpleArrayMap;
import androidx.legacy.content.WakefulBroadcastReceiver;
import java.util.ArrayDeque;
import java.util.Queue;
import org.matrix.olm.OlmException;
public final class zzav {
private static zzav zzcy;
private final SimpleArrayMap<String, String> zzcz = new SimpleArrayMap<>();
private Boolean zzda = null;
private Boolean zzdb = null;
final Queue<Intent> zzdc = new ArrayDeque();
private final Queue<Intent> zzdd = new ArrayDeque();
public static synchronized zzav zzai() {
zzav zzav;
synchronized (zzav.class) {
if (zzcy == null) {
zzcy = new zzav();
}
zzav = zzcy;
}
return zzav;
}
private zzav() {
}
public static PendingIntent zza(Context context, int i, Intent intent, int i2) {
return PendingIntent.getBroadcast(context, i, zza(context, "com.google.firebase.MESSAGING_EVENT", intent), 1073741824);
}
public static void zzb(Context context, Intent intent) {
context.sendBroadcast(zza(context, "com.google.firebase.INSTANCE_ID_EVENT", intent));
}
public static void zzc(Context context, Intent intent) {
context.sendBroadcast(zza(context, "com.google.firebase.MESSAGING_EVENT", intent));
}
private static Intent zza(Context context, String str, Intent intent) {
Intent intent2 = new Intent(context, FirebaseInstanceIdReceiver.class);
intent2.setAction(str);
intent2.putExtra("wrapped_intent", intent);
return intent2;
}
public final Intent zzaj() {
return (Intent) this.zzdd.poll();
}
public final int zzb(Context context, String str, Intent intent) {
String str2 = "FirebaseInstanceId";
if (Log.isLoggable(str2, 3)) {
String str3 = "Starting service: ";
String valueOf = String.valueOf(str);
Log.d(str2, valueOf.length() != 0 ? str3.concat(valueOf) : new String(str3));
}
char c = 65535;
int hashCode = str.hashCode();
if (hashCode != -842411455) {
if (hashCode == 41532704 && str.equals("com.google.firebase.MESSAGING_EVENT")) {
c = 1;
}
} else if (str.equals("com.google.firebase.INSTANCE_ID_EVENT")) {
c = 0;
}
if (c == 0) {
this.zzdc.offer(intent);
} else if (c != 1) {
String str4 = "Unknown service action: ";
String valueOf2 = String.valueOf(str);
Log.w(str2, valueOf2.length() != 0 ? str4.concat(valueOf2) : new String(str4));
return 500;
} else {
this.zzdd.offer(intent);
}
Intent intent2 = new Intent(str);
intent2.setPackage(context.getPackageName());
return zzd(context, intent2);
}
/* JADX WARNING: Removed duplicated region for block: B:42:0x00de A[Catch:{ SecurityException -> 0x0124, IllegalStateException -> 0x00fc }] */
/* JADX WARNING: Removed duplicated region for block: B:43:0x00e3 A[Catch:{ SecurityException -> 0x0124, IllegalStateException -> 0x00fc }] */
/* JADX WARNING: Removed duplicated region for block: B:45:0x00f0 A[Catch:{ SecurityException -> 0x0124, IllegalStateException -> 0x00fc }] */
/* JADX WARNING: Removed duplicated region for block: B:48:0x00fa */
private final int zzd(Context context, Intent intent) {
String str;
ComponentName componentName;
synchronized (this.zzcz) {
str = (String) this.zzcz.get(intent.getAction());
}
if (str == null) {
ResolveInfo resolveService = context.getPackageManager().resolveService(intent, 0);
if (resolveService == null || resolveService.serviceInfo == null) {
Log.e("FirebaseInstanceId", "Failed to resolve target intent service, skipping classname enforcement");
if (zzd(context)) {
componentName = WakefulBroadcastReceiver.startWakefulService(context, intent);
} else {
componentName = context.startService(intent);
Log.d("FirebaseInstanceId", "Missing wake lock permission, service start may be delayed");
}
if (componentName != null) {
return -1;
}
Log.e("FirebaseInstanceId", "Error while delivering the message: ServiceIntent not found.");
return 404;
}
ServiceInfo serviceInfo = resolveService.serviceInfo;
if (!context.getPackageName().equals(serviceInfo.packageName) || serviceInfo.name == null) {
String str2 = serviceInfo.packageName;
String str3 = serviceInfo.name;
StringBuilder sb = new StringBuilder(String.valueOf(str2).length() + 94 + String.valueOf(str3).length());
sb.append("Error resolving target intent service, skipping classname enforcement. Resolved service was: ");
sb.append(str2);
sb.append("/");
sb.append(str3);
Log.e("FirebaseInstanceId", sb.toString());
if (zzd(context)) {
}
if (componentName != null) {
}
} else {
String str4 = serviceInfo.name;
if (str4.startsWith(".")) {
String valueOf = String.valueOf(context.getPackageName());
String valueOf2 = String.valueOf(str4);
str4 = valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf);
}
str = str4;
synchronized (this.zzcz) {
this.zzcz.put(intent.getAction(), str);
}
}
}
if (Log.isLoggable("FirebaseInstanceId", 3)) {
String str5 = "Restricting intent to a specific service: ";
String valueOf3 = String.valueOf(str);
Log.d("FirebaseInstanceId", valueOf3.length() != 0 ? str5.concat(valueOf3) : new String(str5));
}
intent.setClassName(context.getPackageName(), str);
try {
if (zzd(context)) {
}
if (componentName != null) {
}
} catch (SecurityException e) {
Log.e("FirebaseInstanceId", "Error while delivering the message to the serviceIntent", e);
return OlmException.EXCEPTION_CODE_SESSION_INIT_OUTBOUND_SESSION;
} catch (IllegalStateException e2) {
String valueOf4 = String.valueOf(e2);
StringBuilder sb2 = new StringBuilder(String.valueOf(valueOf4).length() + 45);
sb2.append("Failed to start service while in background: ");
sb2.append(valueOf4);
Log.e("FirebaseInstanceId", sb2.toString());
return OlmException.EXCEPTION_CODE_SESSION_INIT_INBOUND_SESSION;
}
}
/* access modifiers changed from: 0000 */
public final boolean zzd(Context context) {
if (this.zzda == null) {
this.zzda = Boolean.valueOf(context.checkCallingOrSelfPermission("android.permission.WAKE_LOCK") == 0);
}
if (!this.zzda.booleanValue()) {
String str = "FirebaseInstanceId";
if (Log.isLoggable(str, 3)) {
Log.d(str, "Missing Permission: android.permission.WAKE_LOCK this should normally be included by the manifest merger, but may needed to be manually added to your manifest");
}
}
return this.zzda.booleanValue();
}
/* access modifiers changed from: 0000 */
public final boolean zze(Context context) {
if (this.zzdb == null) {
this.zzdb = Boolean.valueOf(context.checkCallingOrSelfPermission("android.permission.ACCESS_NETWORK_STATE") == 0);
}
if (!this.zzda.booleanValue()) {
String str = "FirebaseInstanceId";
if (Log.isLoggable(str, 3)) {
Log.d(str, "Missing Permission: android.permission.ACCESS_NETWORK_STATE this should normally be included by the manifest merger, but may needed to be manually added to your manifest");
}
}
return this.zzdb.booleanValue();
}
}
| [
"M0N5T3R159753@nym.hush.com"
] | M0N5T3R159753@nym.hush.com |
42b27b29ccf824e08e922f0dc3b37b67d4caab27 | 6afd4b0e9f53b316eb619b31d0929906d044cdc0 | /src/com/challengeearth/cedroid/caching/CECacheRequest.java | df4f6b428733fbd813c0c208726447b5c5dc089c | [] | no_license | stestaub/ChallengeEarthAndroid | b47efeba9f823a72b521a381fd45fc80ce35eaad | cae13c8abe1632ca6b8c6da5d4aecd5dca943720 | refs/heads/master | 2016-09-05T10:00:48.353318 | 2012-03-23T15:32:51 | 2012-03-23T15:32:51 | 3,145,898 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package com.challengeearth.cedroid.caching;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.CacheRequest;
public class CECacheRequest extends CacheRequest {
final ByteArrayOutputStream body = new ByteArrayOutputStream();
@Override
public void abort() {
}
@Override
public OutputStream getBody() throws IOException {
return body;
}
}
| [
"stub@zhaw.ch"
] | stub@zhaw.ch |
95533794e13c176a6ada4a4b935e75fc36c04ef3 | 34c3b0887f71165a6d4a533bc06ffa2624c2dc10 | /summer-alipay-core/src/main/java/com/alipay/api/domain/Material.java | b8f9592b4b5b6efd3143e6d403334a9c4961f87b | [] | no_license | songhaoran/summer-alipay | 91a7a7fdddf67265241785cd6bb2b784c0f0f1c4 | d02e33d9ab679dfc56160af4abd759c0abb113a4 | refs/heads/master | 2021-05-04T16:39:11.272890 | 2018-01-17T09:52:32 | 2018-01-17T09:52:32 | 120,255,759 | 1 | 0 | null | 2018-02-05T04:42:15 | 2018-02-05T04:42:15 | null | UTF-8 | Java | false | false | 1,271 | 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, 2016-12-02 15:56:25
*/
public class Material extends AlipayObject {
private static final long serialVersionUID = 8853395383182559114L;
/**
* 图文消息子消息项集合,单条消息最多6个子项,否则会发送失败
*/
@ApiListField("articles")
@ApiField("article")
private List<Article> articles;
/**
* 消息类型,text:文本类型,image-text:图文类型。当消息类型为text时,text参数必传,当消息类型为image-text时,articles参数必传
*/
@ApiField("msg_type")
private String msgType;
/**
* 文本消息内容
*/
@ApiField("text")
private Text text;
public List<Article> getArticles() {
return this.articles;
}
public void setArticles(List<Article> articles) {
this.articles = articles;
}
public String getMsgType() {
return this.msgType;
}
public void setMsgType(String msgType) {
this.msgType = msgType;
}
public Text getText() {
return this.text;
}
public void setText(Text text) {
this.text = text;
}
}
| [
"1467237221@qq.com"
] | 1467237221@qq.com |
07c92a3c1a2d6369e3d26dc1ba3efbcd0bfa8bbf | a5957981f24989424a8e627af5089fb63cb6ce60 | /src/com/bergerkiller/bukkit/tc/signactions/SignActionStation.java | c1dbc06e53d637aaa1a7f0fe276b2f40914651b1 | [] | no_license | Thulinma/TrainCarts | fc928f03ee61416c79785c2bc137c8a8ac4a367f | 999d2694debe100b887d6a9a8703c32010080237 | refs/heads/master | 2021-01-18T08:55:27.299989 | 2012-01-11T16:49:56 | 2012-01-11T16:49:56 | 2,627,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,837 | java | package com.bergerkiller.bukkit.tc.signactions;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.material.Rails;
import com.bergerkiller.bukkit.tc.MinecartGroup;
import com.bergerkiller.bukkit.tc.MinecartMember;
import com.bergerkiller.bukkit.tc.StationMode;
import com.bergerkiller.bukkit.tc.TrainCarts;
import com.bergerkiller.bukkit.tc.API.SignActionEvent;
import com.bergerkiller.bukkit.tc.actions.BlockActionSetLevers;
import com.bergerkiller.bukkit.tc.permissions.Permission;
import com.bergerkiller.bukkit.tc.utils.BlockUtil;
import com.bergerkiller.bukkit.tc.utils.FaceUtil;
public class SignActionStation extends SignAction {
@Override
public void execute(SignActionEvent info) {
if (info.isAction(SignActionType.REDSTONE_CHANGE, SignActionType.GROUP_ENTER, SignActionType.GROUP_LEAVE)) {
if (info.isTrainSign() || info.isCartSign()) {
if (info.isType("station")) {
if (info.hasRails()) {
MinecartGroup group = info.getGroup();
if (group != null) {
if (info.isAction(SignActionType.GROUP_LEAVE)) {
} else if (!info.isPowered()) {
group.clearActions();
} else {
//Check if not already targeting
if (group != null && info.hasRails()) {
//Get station length
double length = 0;
try {
length = Double.parseDouble(info.getLine(1).substring(7).trim());
} catch (Exception ex) {};
long delayMS = 0;
try {
delayMS = (long) (Double.parseDouble(info.getLine(2)) * 1000);
} catch (Exception ex) {};
//Get the mode used
StationMode mode = StationMode.fromString(info.getLine(3));
//Get the middle minecart
MinecartMember midd = group.middle();
//First, get the direction of the tracks above
BlockFace dir = info.getRailDirection();
//Get the length of the track to center in
if (length == 0) {
//manually calculate the length
//use the amount of straight blocks
for (BlockFace face : FaceUtil.getFaces(dir)) {
int tlength = 0;
//get the type of rail required
BlockFace checkface = face;
if (checkface == BlockFace.NORTH)
checkface = BlockFace.SOUTH;
if (checkface == BlockFace.EAST)
checkface = BlockFace.WEST;
Block b = info.getRails();
int maxlength = 20;
while (true) {
//Next until invalid
b = b.getRelative(face);
Rails rr = BlockUtil.getRails(b);
if (rr == null || rr.getDirection() != checkface)
break;
tlength++;
//prevent inf. loop or long processing
maxlength--;
if (maxlength <= 0) break;
}
//Update the length
if (length == 0 || tlength < length) length = tlength;
}
}
boolean west = info.isPowered(BlockFace.WEST);
boolean east = info.isPowered(BlockFace.EAST);
boolean north = info.isPowered(BlockFace.NORTH);
boolean south = info.isPowered(BlockFace.SOUTH);
//which directions to move, or brake?
BlockFace instruction = BlockFace.UP; //SELF is brake
if (dir == BlockFace.WEST) {
if (west && !east) {
instruction = BlockFace.WEST;
} else if (east && !west) {
instruction = BlockFace.EAST;
} else {
instruction = BlockFace.SELF;
}
} else if (dir == BlockFace.SOUTH) {
if (north && !south) {
instruction = BlockFace.NORTH;
} else if (south && !north) {
instruction = BlockFace.SOUTH;
} else {
instruction = BlockFace.SELF;
}
}
if (instruction == BlockFace.UP) return;
//What do we do?
if (instruction == BlockFace.SELF) {
if (north || east || south || west) {
//Redstone change and moving?
if (!info.isAction(SignActionType.REDSTONE_CHANGE) || !info.getMember().isMoving()) {
//Brake
//TODO: ADD CHECK?!
group.clearActions();
midd.addActionLaunch(info.getRailLocation(), 0);
BlockFace trainDirection = null;
if (mode == StationMode.CONTINUE) {
trainDirection = midd.getDirection();
} else if (mode == StationMode.REVERSE) {
trainDirection = midd.getDirection().getOppositeFace();
} else if (mode == StationMode.LEFT || mode == StationMode.RIGHT) {
trainDirection = info.getFacing();
//Convert
if (mode == StationMode.LEFT) {
trainDirection = FaceUtil.rotate(trainDirection, 2);
} else {
trainDirection = FaceUtil.rotate(trainDirection, -2);
}
}
if (trainDirection != null) {
//Actual launching here
if (delayMS > 0) {
if (TrainCarts.playSoundAtStation) group.addActionSizzle();
info.getGroup().addAction(new BlockActionSetLevers(info.getAttachedBlock(), true));
}
group.addActionWait(delayMS);
midd.addActionLaunch(trainDirection, length, TrainCarts.launchForce);
} else {
group.addActionWaitForever();
if (TrainCarts.playSoundAtStation) group.addActionSizzle();
info.getGroup().addAction(new BlockActionSetLevers(info.getAttachedBlock(), true));
}
}
}
} else {
//Launch
group.clearActions();
MinecartMember head = group.head();
if (delayMS > 0 || (head.isMoving() && head.getDirection() != instruction)) {
//Reversing or has delay, need to center it in the middle first
midd.addActionLaunch(info.getRailLocation(), 0);
}
if (delayMS > 0) {
if (TrainCarts.playSoundAtStation) group.addActionSizzle();
info.getGroup().addAction(new BlockActionSetLevers(info.getAttachedBlock(), true));
}
group.addActionWait(delayMS);
midd.addActionLaunch(instruction, length, TrainCarts.launchForce);
}
}
}
}
if (info.isAction(SignActionType.GROUP_LEAVE)) {
info.setLevers(false);
}
}
}
}
}
}
@Override
public void build(SignChangeEvent event, String type, SignActionMode mode) {
if (mode != SignActionMode.NONE) {
if (type.startsWith("station")) {
handleBuild(event, Permission.BUILD_STATION, "station", "stop, wait and launch trains");
}
}
}
}
| [
"bergerkiller@gmail.com"
] | bergerkiller@gmail.com |
be140011c0e29a79bf51bf9627940abfa3e34058 | f88d3a6b54aa55ee1529d052dc4c8f71dfb38bc2 | /compilation1/Compiler_vrai/src/com/esisa/compiler/scanner/dfa/Blank.java | a934c57913b2fca432bf22ccdc008a40b46d78ce | [] | no_license | mhidoart/compilation-esisa | 8085c85591f004151857239c75b5e294d9e9137c | 5c76edd2ef88c789eacb172eb3dddafa26b4579d | refs/heads/master | 2023-02-23T04:29:15.411940 | 2021-01-28T15:06:09 | 2021-01-28T15:06:09 | 333,791,470 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 259 | java | package com.esisa.compiler.scanner.dfa;
import com.esisa.compiler.scanner.DFA;
public class Blank extends DFA{
public Blank() {
this("blank");
}
public Blank(String name) {
super(name , 2, 1);
add(0, 1, " \t\n\r");
add(1, 1, " \t\n\r");
}
}
| [
"mhidoart@gmail.com"
] | mhidoart@gmail.com |
98db75bbd79608791b6e4856338962c6ea0d8805 | 29b6a856a81a47ebab7bfdba7fe8a7b845123c9e | /dingtalk/java/src/main/java/com/aliyun/dingtalkimpaas_1_0/models/GetConversationIdRequest.java | 54aa673e0d5bee2c6cff2f2794b5ab5b131c10c7 | [
"Apache-2.0"
] | permissive | aliyun/dingtalk-sdk | f2362b6963c4dbacd82a83eeebc223c21f143beb | 586874df48466d968adf0441b3086a2841892935 | refs/heads/master | 2023-08-31T08:21:14.042410 | 2023-08-30T08:18:22 | 2023-08-30T08:18:22 | 290,671,707 | 22 | 9 | null | 2021-08-12T09:55:44 | 2020-08-27T04:05:39 | PHP | UTF-8 | Java | false | false | 884 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkimpaas_1_0.models;
import com.aliyun.tea.*;
public class GetConversationIdRequest extends TeaModel {
@NameInMap("appUid")
public String appUid;
@NameInMap("userId")
public String userId;
public static GetConversationIdRequest build(java.util.Map<String, ?> map) throws Exception {
GetConversationIdRequest self = new GetConversationIdRequest();
return TeaModel.build(map, self);
}
public GetConversationIdRequest setAppUid(String appUid) {
this.appUid = appUid;
return this;
}
public String getAppUid() {
return this.appUid;
}
public GetConversationIdRequest setUserId(String userId) {
this.userId = userId;
return this;
}
public String getUserId() {
return this.userId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
ccde0387c692240d8bece67d1cfaa5e39bda2b94 | f845d8a05d86d93480cf7c6f634b2b36a645a8ea | /functional_programming/src/main/java/com/epam/functional_programming/PalindromeString.java | 33ddc598e8633024dff0c7e816ee086eee70065d | [] | no_license | IshaShylu/java-8-lambda-and-stream | cece5ebe4825243e82474ae0f276e7b1dbabc460 | bc838dae86dba855dcfabd7e8dfefb96da494dd5 | refs/heads/master | 2022-11-19T21:25:03.244291 | 2020-07-24T08:35:25 | 2020-07-24T08:35:25 | 282,165,025 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package com.epam.functional_programming;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class PalindromeString {
public static void main(String args[])
{
List<String> ls=Arrays.asList("ababa","madam","banana","refer","kayak","sir","computer");
checkPalindrome(ls,Palindrome::isPalindrome).forEach(System.out::println);
}
private static List<String> checkPalindrome(List<String> ls, Predicate<String> myPredicate) {
return ls.stream().filter(st -> myPredicate.test(st)).collect(Collectors.toList());
}
}
| [
"shyluisha@gmail.com"
] | shyluisha@gmail.com |
a7cf983ac418f5e632a085132201ad021eb6de5e | 40b527db78e89efb797c4d90db898eac741c44d0 | /app/src/main/java/com/example/hi/gossip/UserProfileActivity.java | cbb84558d71d5e2b097012bb1ab3437fbaff8338 | [
"MIT"
] | permissive | avik191/Gossip-chat-app | ce6b30b932190e56a4d657d2ba4f620e610d3d38 | 43615562784caa3eb22ec01c9a981b3a28311ed4 | refs/heads/master | 2021-01-23T08:28:28.979008 | 2017-09-09T06:50:34 | 2017-09-09T06:50:34 | 102,522,475 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,288 | java | package com.example.hi.gossip;
import android.app.ProgressDialog;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.squareup.picasso.Callback;
import com.squareup.picasso.NetworkPolicy;
import com.squareup.picasso.Picasso;
import java.text.DateFormat;
import java.util.Date;
import java.util.HashMap;
public class UserProfileActivity extends AppCompatActivity
{
DatabaseReference databaseReference;
TextView profile_name,profile_status,total_friends;
ImageView profile_img;
Button send_req,decline_req;
String uid;
ProgressDialog dialog;
DatabaseReference friend_request_reference;
DatabaseReference friends_reference;
DatabaseReference notification_reference;
FirebaseAuth firebaseAuth;
String current_State = "not_friends";
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_profile);
profile_name = (TextView)findViewById(R.id.profile_name);
profile_status = (TextView)findViewById(R.id.profile_status);
total_friends = (TextView)findViewById(R.id.total_friends);
profile_img = (ImageView)findViewById(R.id.profile_img);
send_req = (Button)findViewById(R.id.sendbtn);
decline_req =(Button)findViewById(R.id.declinebtn);
Bundle b =getIntent().getExtras();
uid = b.getString("user_key");
databaseReference = FirebaseDatabase.getInstance().getReference().child("users").child(uid);
//databaseReference.keepSynced(true);
firebaseAuth = FirebaseAuth.getInstance();
friend_request_reference = FirebaseDatabase.getInstance().getReference().child("friend_request");
// friend_request_reference.keepSynced(true);
friends_reference = FirebaseDatabase.getInstance().getReference().child("friends");
//friends_reference.keepSynced(true);
notification_reference = FirebaseDatabase.getInstance().getReference().child("notification");
dialog = new ProgressDialog(UserProfileActivity.this);
dialog.setMessage("Fetching user details..");
dialog.setCancelable(false);
dialog.show();
databaseReference.addValueEventListener(new ValueEventListener()
{
@Override
public void onDataChange(DataSnapshot dataSnapshot)
{
profile_name.setText(dataSnapshot.child("name").getValue().toString());
profile_status.setText(dataSnapshot.child("status").getValue().toString());
final String url = dataSnapshot.child("default_img").getValue().toString();
if(url.equals("default"))
profile_img.setImageResource(R.drawable.avatar);
else
{
Picasso.with(UserProfileActivity.this).load(url).networkPolicy(NetworkPolicy.OFFLINE).
placeholder(R.drawable.avatar).into(profile_img, new Callback()
{
@Override
public void onSuccess()
{
}
@Override
public void onError()
{
Picasso.with(UserProfileActivity.this).load(url).placeholder(R.drawable.avatar).into(profile_img);
}
});
}
friend_request_reference.child(firebaseAuth.getCurrentUser().getUid()).addListenerForSingleValueEvent(new ValueEventListener()
{
@Override
public void onDataChange(DataSnapshot dataSnapshot)
{
if(dataSnapshot.hasChild(uid))
{
String request_type = dataSnapshot.child(uid).child("request_type").getValue().toString();
if(request_type.equals("received"))
{
send_req.setText("Accept Request");
current_State = "request_received";
decline_req.setVisibility(View.VISIBLE);
decline_req.setEnabled(true);
}
else if(request_type.equals("sent"))
{
send_req.setText("cancel request");
current_State = "request_sent";
}
}
dialog.dismiss();
}
@Override
public void onCancelled(DatabaseError databaseError)
{
}
});
friends_reference.child(firebaseAuth.getCurrentUser().getUid()).addValueEventListener(new ValueEventListener()
{
@Override
public void onDataChange(DataSnapshot dataSnapshot)
{
if(dataSnapshot.hasChild(uid))
{
send_req.setText("Remove friend");
current_State = "friends";
if(dialog.isShowing())
dialog.dismiss();
}
}
@Override
public void onCancelled(DatabaseError databaseError)
{
}
});
if(dialog.isShowing())
dialog.dismiss();
}
@Override
public void onCancelled(DatabaseError databaseError)
{
}
});
send_req.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
// not friends state //
if(current_State.equals("not_friends"))
{
send_req.setEnabled(false);
dialog.setCancelable(false);
dialog.setMessage("please wait");
dialog.show();
final Request request = new Request();
request.setRequest_type("sent");
int time = (int)(System.currentTimeMillis()) * (-1);
request.setTimestamp(time);
friend_request_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid).setValue(request)
.addOnCompleteListener(new OnCompleteListener<Void>()
{
@Override
public void onComplete(@NonNull Task<Void> task)
{
if(task.isSuccessful())
{
request.setRequest_type("received");
friend_request_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid())
.setValue(request).addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
HashMap<String,String> notification_data = new HashMap<String, String>();
notification_data.put("from",firebaseAuth.getCurrentUser().getUid());
notification_data.put("type","request");
notification_reference.child(uid).push().setValue(notification_data)
.addOnCompleteListener(new OnCompleteListener<Void>()
{
@Override
public void onComplete(@NonNull Task<Void> task)
{
if(task.isSuccessful())
{
dialog.dismiss();
send_req.setEnabled(true);
send_req.setText("cancel request");
current_State = "request_sent";
Toast.makeText(UserProfileActivity.this, "request sent", Toast.LENGTH_SHORT).show();
}
else
Toast.makeText(UserProfileActivity.this, "something went wrong..", Toast.LENGTH_SHORT).show();
}
});
}
});
}
else
{
dialog.dismiss();
send_req.setEnabled(true);
Toast.makeText(UserProfileActivity.this, "cannot sent request..", Toast.LENGTH_SHORT).show();
}
}
});
}
// cancel friend request state
else if(current_State.equals("request_sent"))
{
send_req.setEnabled(false);
friend_request_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid)
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friend_request_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid())
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
send_req.setEnabled(true);
send_req.setText("send request");
current_State = "not_friends";
Toast.makeText(UserProfileActivity.this, "request cancelled", Toast.LENGTH_SHORT).show();
}
}).addOnFailureListener(new OnFailureListener()
{
@Override
public void onFailure(@NonNull Exception e)
{
Toast.makeText(UserProfileActivity.this,e.toString(), Toast.LENGTH_SHORT).show();
}
});
}
});
send_req.setEnabled(true);
}
// accept friend request
else if(current_State.equals("request_received"))
{
dialog.setCancelable(false);
dialog.setMessage("please wait");
dialog.show();
send_req.setEnabled(false);
final String time = DateFormat.getDateTimeInstance().format(new Date()).toString();
friends_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid).child("date")
.setValue(time).addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friends_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid()).child("date")
.setValue(time).addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friend_request_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid)
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friend_request_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid())
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
dialog.dismiss();
send_req.setEnabled(true);
send_req.setText("Remove Friend");
current_State = "friends";
decline_req.setVisibility(View.GONE);
Toast.makeText(UserProfileActivity.this, "you are now connected..", Toast.LENGTH_SHORT).show();
}
});
}
});
}
}).addOnFailureListener(new OnFailureListener()
{
@Override
public void onFailure(@NonNull Exception e)
{
dialog.dismiss();
}
});
}
});
send_req.setEnabled(true);
}
// remove friend
else if(current_State.equals("friends"))
{
send_req.setEnabled(false);
friends_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid)
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friends_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid())
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
send_req.setText("send request");
current_State = "not_friends";
send_req.setEnabled(true);
}
}).addOnFailureListener(new OnFailureListener()
{
@Override
public void onFailure(@NonNull Exception e)
{
Toast.makeText(UserProfileActivity.this,e.toString(), Toast.LENGTH_SHORT).show();
}
});
}
});
send_req.setEnabled(true);
}
dialog.dismiss();
}
});
decline_req.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
decline_req.setEnabled(false);
friend_request_reference.child(firebaseAuth.getCurrentUser().getUid()).child(uid)
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
friend_request_reference.child(uid).child(firebaseAuth.getCurrentUser().getUid())
.removeValue().addOnSuccessListener(new OnSuccessListener<Void>()
{
@Override
public void onSuccess(Void aVoid)
{
send_req.setEnabled(true);
send_req.setText("send request");
current_State = "not_friends";
decline_req.setVisibility(View.GONE);
Toast.makeText(UserProfileActivity.this, "request declined", Toast.LENGTH_SHORT).show();
}
}).addOnFailureListener(new OnFailureListener()
{
@Override
public void onFailure(@NonNull Exception e)
{
Toast.makeText(UserProfileActivity.this,e.toString(), Toast.LENGTH_SHORT).show();
}
});
}
});
decline_req.setEnabled(true);
}
});
}
}
| [
"me.avik191@gmail.com"
] | me.avik191@gmail.com |
ed431cb79111f1c0a24d25daf670f6bc2eb8be36 | 7d01b90c542d321e513009e134a59a756a08097c | /babasport/src/main/java/com/cjk/core/bean/product/Brand.java | a2de6459960dc1956d52f70b5b19e0ac8580d009 | [] | no_license | Killwithout/AyogaStore | 544708cae9e3168ac05b32ee871b55ccf213fbdb | ad99f6fba33d036b7c7c78463c660148ec069eb8 | refs/heads/master | 2020-03-12T13:10:33.692096 | 2018-04-23T03:43:38 | 2018-04-23T03:43:38 | 130,635,484 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,925 | java | package com.cjk.core.bean.product;
import com.cjk.core.web.Constants;
/**
* 品牌
* @author cjk
*
*/
public class Brand {
private Integer id;
private String name;
private String description;
private String imgUrl;
private Integer sort;
private Integer isDisplay;
//获取全路径
public String getAllUrl(){
return Constants.IMAGE_URL + imgUrl;
}
//页号
private Integer pageNo = 1;
//开始行
private Integer startRow;
//每页数
private Integer pageSize = 10;
public Integer getStartRow() {
return startRow;
}
public void setStartRow(Integer startRow) {
this.startRow = startRow;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
//计算一次开始行
this.startRow = (pageNo - 1)*pageSize;
this.pageSize = pageSize;
}
public Integer getPageNo() {
return pageNo;
}
public void setPageNo(Integer pageNo) {
//计算一次开始行
this.startRow = (pageNo - 1)*pageSize;
this.pageNo = pageNo;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getIsDisplay() {
return isDisplay;
}
public void setIsDisplay(Integer isDisplay) {
this.isDisplay = isDisplay;
}
@Override
public String toString() {
return "Brand [id=" + id + ", name=" + name + ", description="
+ description + ", imgUrl=" + imgUrl + ", sort=" + sort
+ ", isDisplay=" + isDisplay + "]";
}
}
| [
"351285143@qq.com"
] | 351285143@qq.com |
8e2be79e2a9013cb73fdaa912f87aeac80e03016 | d5f3b2856dcd60a1cd50c27ec7f95de0825cea7d | /src/main/java/com/helencoder/shield/util/DFA.java | 85ee1c52631098307946201a0f2df3756144c016 | [
"MIT"
] | permissive | helencoder/Shield | bf0bfb51051d6a862d05e01a8eebfc0d792832dc | 06b2960c0866f84ce6a70c416854dfcee90224ac | refs/heads/master | 2021-09-06T22:57:02.595216 | 2018-02-13T01:46:19 | 2018-02-13T01:46:19 | 104,615,084 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,030 | java | package com.helencoder.shield.util;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* DFA(Deterministic Finite Automaton)算法
*
* Created by helencoder on 2018/1/5.
*/
public class DFA {
private String dictPath;
private Set sensitiveWordsSet;
private Map sensitiveWordsMap;
public DFA(String dictPath) {
this.dictPath = dictPath;
this.sensitiveWordsSet = new HashSet<String>();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(dictPath)));
for (String str = br.readLine(); str != null; str = br.readLine()) {
this.sensitiveWordsSet.add(str.trim());
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
/**
* 敏感词map构建
*/
public void init() {
this.sensitiveWordsMap = new HashMap<String, String>(this.sensitiveWordsSet.size());
Set<String> sensitiveWordsSet = this.sensitiveWordsSet;
for (String word : sensitiveWordsSet) {
Map nowMap = this.sensitiveWordsMap;
for (int i = 0; i < word.length(); i++) {
// 转换成char型
char keyChar = word.charAt(i);
// 获取
Object tempMap = nowMap.get(keyChar);
if (tempMap != null) { // 如果存在该key,直接赋值
nowMap = (Map) tempMap;
} else { // 不存在则,则构建一个map,同时将isEnd设置为0,因为他不是最后一个
// 设置标志位
Map<String, String> newMap = new HashMap<String, String>();
newMap.put("isEnd", "0");
// 添加到集合
nowMap.put(keyChar, newMap);
nowMap = newMap;
}
// 最后一个
if (i == word.length() - 1) {
nowMap.put("isEnd", "1");
}
}
}
}
/**
* 敏感词检测
*/
public boolean check(String str) {
boolean flag = false; //敏感词结束标识位:用于敏感词只有1位的情况
char word = 0;
Map nowMap = this.sensitiveWordsMap;
for(int i = 0; i < str.length() ; i++){
word = str.charAt(i);
nowMap = (Map) nowMap.get(word); //获取指定key
if(nowMap != null){ //存在,则判断是否为最后一个
if("1".equals(nowMap.get("isEnd"))){ //如果为最后一个匹配规则,结束循环,返回匹配标识数
flag = true; //结束标志位为true
}
} else{ //不存在,直接返回
break;
}
}
return flag;
}
}
| [
"731873664@qq.com"
] | 731873664@qq.com |
8ed376c0b3d9c29a086444855cb04e7e5c10ac3b | a2f8374ffdad04ee3d0c72f63119ba8d36200f35 | /discovery/src/main/java/com/jinhyy/EurekaServer.java | 5b76799291f14d34234ee78e36baa4be9735d9f3 | [] | no_license | Jinhyy/cloud-native-app-sample | 4b16b841094b3102e90c1abd848ee9d1ecdf8df8 | 9350e89ad29d13658f3b3fef3f00e2d27d5f4997 | refs/heads/master | 2022-11-22T15:33:58.020455 | 2020-07-15T17:25:55 | 2020-07-15T17:25:55 | 170,606,991 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,891 | java | package com.jinhyy;
import com.netflix.config.ConfigurationManager;
import io.micrometer.core.instrument.MeterRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@EnableEurekaServer
@SpringBootApplication
public class EurekaServer {
private static final Logger logger = LoggerFactory.getLogger(EurekaServer.class);
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll()
.and().csrf().disable();
}
}
//
// @Bean
// MeterRegistryCustomizer<MeterRegistry> configurer(
// @Value("${spring.application.name}") String applicationName) {
// return (registry) -> registry.config().commonTags("application", applicationName);
// }
public static void main(String[] args) {
SpringApplication.run(EurekaServer.class, args);
// String dataCenter = ConfigurationManager.getConfigInstance().getString("archaius.deployment.datacenter");
// logger.info("★ dataCenter: {}", dataCenter);
// System.out.println("☆ dataCenter: " + dataCenter);
}
}
| [
"able0527@gmaill.com"
] | able0527@gmaill.com |
f36c99c3d828088288961508503a33adf79b51ae | 1e745cd853bd5f3971ee53cfb6695264a25015ff | /app/src/main/java/hreday/sagar/allusaonlineshop/Electreonics/Craig.java | b79f8a7fc1278fe7894d5c6d8bc5c28471bed16e | [] | no_license | HredaySagarChakraborty/OnlineShopping | f1b692c4a6596ce5c7b9fbc85b490fcc583d3138 | fc0568c10a94831f1584465df21a7685f2b39b27 | refs/heads/master | 2021-03-16T14:29:35.334025 | 2020-03-12T19:35:28 | 2020-03-12T19:35:28 | 246,916,076 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,793 | java | package hreday.sagar.allusaonlineshop.Electreonics;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import hreday.sagar.allusaonlineshop.R;
public class Craig extends AppCompatActivity {
private WebView webView;
private ProgressBar progressBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_craig);
getSupportActionBar().hide();
progressBar=findViewById(R.id.progress);
// mInterstitialAd = new InterstitialAd(this);
// mInterstitialAd.setAdUnitId("ca-app-pub-4248114886151875/2595314880");
// mInterstitialAd.loadAd(new AdRequest.Builder().build());
webView = findViewById(R.id.webviewId);
webView.loadUrl("https://sfbay.craigslist.org/");
WebSettings webSettings = webView.getSettings();
webView.setWebViewClient(new WebViewClient()
{
@Override public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
progressBar.setVisibility(ProgressBar.VISIBLE);
webView.setVisibility(View.INVISIBLE);
}
@Override public void onPageCommitVisible(WebView view, String url) {
super.onPageCommitVisible(view, url);
progressBar.setVisibility(ProgressBar.GONE);
webView.setVisibility(View.VISIBLE);
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
Craig.this.webView.loadUrl("file:///android_asset/errors.html");
super.onReceivedError(view, request, error);
}
});
webSettings.setJavaScriptEnabled(true);
}
@Override
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack();
} else {
super.onBackPressed();
}
}
/*
@Override
public void onBackPressed() {
if (mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
super.onAdClosed();
finish();
}
});
} else {
super.onBackPressed();
}
}
*/
}
| [
"hredaysagar@gmail.com"
] | hredaysagar@gmail.com |
5e576d9f5d0b914cc427875cc4a42ce429c50f08 | 9eaa7d5600d84e7e326386b2e4aa8404bb2dec8a | /app/src/main/java/com/application/pradyotprakash/newattendanceappfaculty/FirebaseMessagingService.java | 50b3b2240ba855c16b06f6895bd1f44513f0e526 | [] | no_license | pradyotprksh/NewAttendanceAppFaculty | 89ee6b2ec02ecf8f8b96ea52aa7cef0b2d6850ca | a19da05a2155a98a73dba04f85c2c820b701d2c3 | refs/heads/master | 2021-04-06T04:34:28.771214 | 2018-05-17T19:05:10 | 2018-05-17T19:05:10 | 124,767,084 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,094 | java | package com.application.pradyotprakash.newattendanceappfaculty;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import com.google.firebase.messaging.RemoteMessage;
/**
* Created by pradyotprakash on 03/03/18.
*/
public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
String message_title = remoteMessage.getNotification().getTitle();
String message_body = remoteMessage.getNotification().getBody();
String click_action = remoteMessage.getNotification().getClickAction();
String dataMessage = remoteMessage.getData().get("message");
String dataFrom = remoteMessage.getData().get("from_user_id");
String dataFromDesignation = remoteMessage.getData().get("from_designation");
String dataFromOn = remoteMessage.getData().get("message_on");
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this, getString(R.string.default_notification_channel_id))
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(message_title)
.setContentText(message_body);
Intent intent = new Intent(click_action);
intent.putExtra("message", dataMessage);
intent.putExtra("from_user_id", dataFrom);
intent.putExtra("from_designation", dataFromDesignation);
intent.putExtra("message_on", dataFromOn);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pendingIntent);
int mNotificationId = (int) System.currentTimeMillis();
NotificationManager mNotifyMgr =
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mNotifyMgr.notify(mNotificationId, mBuilder.build());
}
}
| [
"pradyotprksh4@gmail.com"
] | pradyotprksh4@gmail.com |
b29878de319359d38b4f8f1691dd78a880119065 | c7d915893ddad2da392a96f6da21d273c4d5f2e6 | /src/结构型/过滤器模式/CriteriaFemale.java | 09988bd09b97b4bf90e42b78c8b31126e95feec1 | [] | no_license | xuqm/DesignPattern | 2fc7f489fc03b76379d42faddbc63af592de40f4 | ce9ef3a2b82349a49b273191074ebab4209814b4 | refs/heads/master | 2021-03-17T14:18:08.673062 | 2020-05-20T08:56:34 | 2020-05-20T08:56:34 | 246,997,019 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package 结构型.过滤器模式;
import java.util.ArrayList;
import java.util.List;
public class CriteriaFemale implements Criteria {
@Override
public List<Person> meetCriteria(List<Person> persons) {
List<Person> femalePersons = new ArrayList<Person>();
for (Person person : persons) {
if (person.getGender().equalsIgnoreCase("FEMALE")) {
femalePersons.add(person);
}
}
return femalePersons;
}
} | [
"xuqinmin12@sina.com"
] | xuqinmin12@sina.com |
8eecdd28300aec0070017830e0a0a9a297afb39b | 65074aecb1ec800748d0e5a6a1c12b1396ce9582 | /hc-meta-app/app/src/main/java/com/cloudminds/meta/service/navigation/LocationMonitor.java | 65f057764e4654afa82ae0521a3b5f778ece661c | [] | no_license | wqlljj/note | fe4011547899b469a5c179a813970af326f5c65f | 792821980fb6087719012b943cc4e8dda69d3626 | refs/heads/master | 2021-06-27T16:28:49.376137 | 2019-06-11T03:39:52 | 2019-06-11T03:39:52 | 135,403,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,997 | java | package com.cloudminds.meta.service.navigation;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.util.Log;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener;
import com.amap.api.navi.model.NaviLatLng;
import com.cloudminds.hc.hariservice.HariServiceClient;
import com.cloudminds.hc.hariservice.utils.PreferenceUtils;
import com.cloudminds.meta.util.DeviceUtils;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
/**
* Created by zoey on 17/5/15.
*/
public class LocationMonitor implements AMapLocationListener {
private final String TAG = "NAVI/LocationMonitor";
private static LocationMonitor locationMonitor;
private Context mContext;
private AMapLocationClient mLocationClient;
//声明mLocationOption对象
private AMapLocationClientOption mLocationOption;
public static String cityCode = "";
public static double curLatitude = 0.0; //当前位置纬度
public static double curLongitude = 0.0; //当前位置经度
private LocationObserver locationObserver;
private boolean enableReportLocation = false; //上传位置到hari 后台
//英文环境使用framwork提供的api
private LocationManager locationManager = null;
public static LocationMonitor instance(Context context){
if (null == locationMonitor){
locationMonitor = new LocationMonitor();
locationMonitor.init(context);
}
return locationMonitor;
}
public static LocationMonitor getInstance(){
return locationMonitor;
}
public void setEnableReportLocation(boolean enable){
enableReportLocation = enable;
}
public void init(Context context){
mContext = context;
if ("EN".equalsIgnoreCase(DeviceUtils.getSysLanguage())){
//initEn();
} else {
initCH();
}
}
private void initEn(){
if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return;
}
String serviceString = Context.LOCATION_SERVICE;
locationManager = (LocationManager) mContext.getSystemService(serviceString);
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 6000, 0, locationListener);
}
private void initCH(){
mLocationClient = new AMapLocationClient(mContext);
//初始化定位参数
mLocationOption = new AMapLocationClientOption();
//设置定位监听
mLocationClient.setLocationListener(this);
//设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
//设置定位间隔,单位毫秒,默认为2000ms
mLocationOption.setInterval(2000);
//启用手机传感器 用来获取方向角
mLocationOption.setSensorEnable(true);
//设置定位参数
mLocationClient.setLocationOption(mLocationOption);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为1000ms),并且在合适时间调用stopLocation()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用onDestroy()方法
}
public NaviLatLng getCurPoint(){
NaviLatLng latLng = new NaviLatLng();
latLng.setLatitude(curLatitude);
latLng.setLongitude(curLongitude);
return latLng;
}
public void setLocationObserver(LocationObserver observer){
locationObserver = observer;
}
public void startLocation(LocationObserver observer){
if ("EN".equalsIgnoreCase(DeviceUtils.getSysLanguage())){
initEn();
} else {
boolean gpsEnable = PreferenceUtils.getPrefBoolean("GPSEnable",true);
if (gpsEnable){
locationObserver = observer;
mLocationClient.startLocation();
}
}
}
public void stopLocation(){
if (null != locationManager){
locationManager.removeUpdates(locationListener);
}
if (null != mLocationClient){
mLocationClient.stopLocation();
}
}
@Override
public void onLocationChanged(AMapLocation aMapLocation) {
if (aMapLocation != null) {
if (aMapLocation.getErrorCode() == 0) {
//定位成功回调信息,设置相关消息
curLatitude = aMapLocation.getLatitude();//获取纬度
curLongitude = aMapLocation.getLongitude();//获取经度
Log.d(TAG,"定位精度 : "+aMapLocation.getAccuracy());
if (cityCode.isEmpty()){
cityCode = aMapLocation.getCityCode();//城市编码
}
if (enableReportLocation){
reportLocation();
enableReportLocation = false;
}
} else {
//显示错误信息ErrCode是错误码,errInfo是错误信息,详见错误码表。
Log.d(TAG,"location Error, ErrCode:"
+ aMapLocation.getErrorCode() + ", errInfo:"
+ aMapLocation.getErrorInfo());
}
}
if (locationObserver != null){
locationObserver.onLocationChanged(aMapLocation);
}
}
public interface LocationObserver{
public void onLocationChanged(AMapLocation aMapLocation);
}
//英文环境下 位置更新回调
private final LocationListener locationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
curLongitude = location.getLongitude();
curLatitude = location.getLatitude();
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
};
public boolean isGpsEnabled(){
boolean enable = true;
LocationManager locationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
// 判断GPS模块是否开启,如果没有则开启
if (!locationManager.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)){
enable = false;
}
return enable;
}
private void reportLocation(){
Log.d(TAG, "reportRobotLocation"+"latitude:"+ curLatitude + " longitude:" + curLongitude);
JSONObject object = new JSONObject();
try {
object.put("type","reportLocation");
JSONObject locationInfo = new JSONObject();
locationInfo.put("lng",curLongitude);
locationInfo.put("lat",curLatitude);
object.put("data",locationInfo);
}catch (JSONException e){
e.printStackTrace();
}
HariServiceClient.getCommandEngine().sendData(object);
}
}
| [
"qi.wang.x@cloudminds.com"
] | qi.wang.x@cloudminds.com |
222eab299876dc5c1003a24c3a3381b584bfd062 | a57d68dcd6f2b261dd1037c08a83ddcc7e0a05c7 | /views/JTBMain.java | d5743c8529ae8e5de3f049f442a82465555be234 | [] | no_license | CesarDuvanCabraCoy/SepararArchivos-TreeN | 8eb438165b62eada7f8b0a91e328ca679b0b144d | b3579b164160de6c51b2ddbcae60d5dbc2cfac31 | refs/heads/master | 2020-03-09T21:06:38.691888 | 2018-04-12T16:20:13 | 2018-04-12T16:20:13 | 129,001,250 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,044 | java | package views;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JToolBar;
import controllers.JBActions;
import controllers.MainController;
public class JTBMain extends JToolBar{
private static final long serialVersionUID = 1L;
private MainController mainController;
private JButton jbAddVideo;
public JTBMain(MainController mainController) {
this.mainController = mainController;
this.setBackground(Color.decode("#2D2E30"));
this.setFloatable(false);
this.setRollover(true);
init();
}
private void init() {
addButton(jbAddVideo, ConstantsGUI.URL_CHOOSE_FOLDER_MAIN, JBActions.SHOW_JFC_FOLDER, ConstantsGUI.TT_JFC_FOLDER, true);
}
private void addButton(JButton jb, String urlImage, JBActions command, String toolTip, boolean enabled) {
jb = new JButton(new ImageIcon(getClass().getResource(urlImage)));
jb.setEnabled(enabled);
jb.addActionListener(mainController);
jb.setActionCommand(command.toString());
jb.setToolTipText(toolTip);
this.add(jb);
}
} | [
"cesar.cabra01@uptc.edu.co"
] | cesar.cabra01@uptc.edu.co |
555683b7f80ed18daad54b1f5d6ffb9fec4be7a0 | 3067190d61555f813e9332f3982ea446f842b64f | /backend/src/main/java/com/arek314/pda/db/dao/InformationsDAO.java | 71b77d1ae537262dc382874f048aa0e43b874ced | [] | no_license | ArekArek/PDA | dba83c4e258fa85e66b72a45e4f573e4bc9ec0da | 6ede19a0c0762e3bf702d1bf1421c512aec99a7a | refs/heads/master | 2021-01-20T13:22:27.682339 | 2017-05-06T17:40:46 | 2017-05-06T17:40:46 | 90,480,205 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,313 | java | package com.arek314.pda.db.dao;
import com.arek314.pda.db.mapper.InformationMapper;
import com.arek314.pda.db.model.Information;
import org.skife.jdbi.v2.sqlobject.BindBean;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.SqlUpdate;
import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;
import java.util.Collection;
@RegisterMapper(InformationMapper.class)
public abstract class InformationsDAO {
@SqlQuery("select id, \"mapURL\" from informations")
public abstract Collection<Information> getAllInformations();
@SqlUpdate("insert into informations (\"mapURL\") values (:mapURL)")
public abstract void createInformation(@BindBean Information information);
@SqlUpdate("update informations set \"mapURL\" = :mapURL where id in (select id from informations order by id " + "desc limit 1)")
public abstract void updateInformation(@BindBean Information information);
@SqlQuery("select id, \"mapURL\" from informations order by id desc limit 1")
public abstract Information getInformation();
@SqlUpdate("delete from informations")
abstract void removeAll();
@SqlUpdate("alter table informations alter column id restart with 1")
abstract void resetIdCounter();
public void deleteAll() {
removeAll();
}
}
| [
"arek314arek@gmail.com"
] | arek314arek@gmail.com |
bdb0487ab300db1cebac18334c409812c76d87e2 | f55e0f08bbbbde3bbf06b83c822a93d54819b1e8 | /app/src/main/java/com/jqsoft/nursing/rx/RxBusBaseMessage.java | 4fedbb9fe8acca6e8456b3ed80026d77d8c47974 | [] | no_license | moshangqianye/nursing | 27e58e30a51424502f1b636ae47b60b81a3b2ca0 | 20cd5aace59555ef9d708df0fb03639b2fc843d0 | refs/heads/master | 2020-09-08T13:39:55.939252 | 2020-03-20T09:55:34 | 2020-03-20T09:55:34 | 221,147,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 428 | java | package com.jqsoft.nursing.rx;
/**
* Created by quantan.liu on 2017/3/10.
*/
public class RxBusBaseMessage {
private int code;
private Object object;
private RxBusBaseMessage(){}
public RxBusBaseMessage(int code, Object object){
this.code=code;
this.object=object;
}
public int getCode() {
return code;
}
public Object getObject() {
return object;
}
}
| [
"123456"
] | 123456 |
a52538190278f7fde06448f2c78ba34278ae72b4 | d74ae31c66c8493260e4dbf8b3cc87581337174c | /src/main/java/hello/repo/Customer146Repository.java | 6cf4a31d0e18e62dcec316a48a294ffbd6e13422 | [] | no_license | scratches/spring-data-gazillions | 72e36c78a327f263f0de46fcee991473aa9fb92c | 858183c99841c869d688cdbc4f2aa0f431953925 | refs/heads/main | 2021-06-07T13:20:08.279099 | 2018-08-16T12:13:37 | 2018-08-16T12:13:37 | 144,152,360 | 0 | 0 | null | 2021-04-26T17:19:34 | 2018-08-09T12:53:18 | Java | UTF-8 | Java | false | false | 279 | java | package hello.repo;
import hello.model.Customer146;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface Customer146Repository extends CrudRepository<Customer146, Long> {
List<Customer146> findByLastName(String lastName);
}
| [
"dsyer@pivotal.io"
] | dsyer@pivotal.io |
b702abdf9724cfb768184722626f00ddfb2c8836 | b31ef82368fcb1b4496eaa2c2d07e64fe6fea93b | /src/main/java/com/winetto/SearchServlet.java | 018c36029d201c3b5590c796e74c43320ac77d54 | [] | no_license | artureus/winetto | be61c625ea98f5af3bc80010c1fb06ebda1349e8 | 14443f2f64844650fcf7210b0457dd7bd85f0e11 | refs/heads/master | 2020-04-22T09:07:46.887831 | 2013-04-02T10:33:06 | 2013-04-02T10:33:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,743 | java | package main.java.com.winetto;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
public class SearchServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
// Checking for connection to the internet
public static boolean isInternetReachable()
{
try {
// Choose an URL of a known source
URL url = new URL("http://www.google.com");
// Open a connection to that source
HttpURLConnection urlConnect = (HttpURLConnection)url.openConnection();
// Trying to retrieve data of the source
urlConnect.getContent();
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
return true;
}
/**
* Read a URL returning an object and transform it into a String.
*
* @param urlString
* @return String with the external object
* @throws Exception
*/
private static String readUrl(String urlString) throws Exception {
BufferedReader reader = null;
try {
URL url = new URL(urlString);
reader = new BufferedReader(new InputStreamReader(url.openStream()));
StringBuffer buffer = new StringBuffer();
int read;
char[] chars = new char[1024];
while ((read = reader.read(chars)) != -1)
buffer.append(chars, 0, read);
return buffer.toString();
} finally {
if (reader != null)
reader.close();
}
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
try {
if (isInternetReachable()) {
// Defining API url parameters
String urlHTTPinit = "http://api.wine-searcher.com/wine-select-api.lml?";
String urlHTTParamSeparator = "&";
String urlHTTParamAssignation = "=";
String paramKey = "Xkey";
String paramVersion = "Xversion";
String paramWinename = "Xwinename";
String paramWidesearch = "Xwidesearch";
String paramKeyword_mode = "Xkeyword_mode";
String paramCurrencycode = "Xcurrencycode";
String paramVintage = "Xvintage";
String paramLocation = "Xlocation";
String paramAutoexpand = "Xautoexpand";
String paramFormat = "Xformat";
String key = "artrxx481761";
String version = "5";
String winename = req.getParameter("search_wine");
String widesearch = "Y";
String keyword_mode = "A"; // X
String currencycode = "EUR";
String vintage = req.getParameter("search_vintage");
String location = "spain";
String autoexpand = "Y";
String format = "J";
// Composing dynamic URL to make the API call
String apiURL = urlHTTPinit;
apiURL += paramKey + urlHTTParamAssignation + key;
apiURL += urlHTTParamSeparator + paramVersion + urlHTTParamAssignation + version;
if (req.getParameterMap().containsKey("search_wine"))
apiURL += urlHTTParamSeparator + paramWinename + urlHTTParamAssignation + winename;
apiURL += urlHTTParamSeparator + paramWidesearch + urlHTTParamAssignation + widesearch;
apiURL += urlHTTParamSeparator + paramKeyword_mode + urlHTTParamAssignation + keyword_mode;
apiURL += urlHTTParamSeparator + paramCurrencycode + urlHTTParamAssignation + currencycode;
if (req.getParameterMap().containsKey("search_vintage"))
apiURL += urlHTTParamSeparator + paramVintage + urlHTTParamAssignation + vintage;
apiURL += urlHTTParamSeparator + paramLocation + urlHTTParamAssignation + location;
apiURL += urlHTTParamSeparator + paramAutoexpand + urlHTTParamAssignation + autoexpand;
apiURL += urlHTTParamSeparator + paramFormat + urlHTTParamAssignation + format;
apiURL = apiURL.replace(' ', '+');
// DEVTime: Printing results
//System.out.println(apiURL);
// Translating Json Object from API URL to String
String jsonString = "";
try {
jsonString = readUrl(apiURL);
// DEVTime: Printing results
//System.out.println(jsonString);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// Translating Json Object (String) to Json Object (GSON lib)
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DASHES);
Gson gson = gsonBuilder.disableHtmlEscaping().create();
Type preWineListType = new TypeToken<PreWineList>(){}.getType();
PreWineList preWineList = gson.fromJson(jsonString, preWineListType);
// Another way could be:
//PreWineList preWineList = gson.fromJson(jsonString, PreWineList.class);
// DEVTime: Printing results
//System.out.println("json test String: " + new Gson().toJson(preWineList));
// Get Return Code for analyze response state
String returnCode = preWineList.getWineSearcher().getReturnCode();
req.setAttribute("returnCode", returnCode);
if (returnCode.equals("0")) {
// Print List Wine
List<PreWine> listPreWine = preWineList.getWineSearcher().getWines();
List<Wine> listWine = new ArrayList<Wine>();
if (listPreWine != null) {
for (int i = 0; i < listPreWine.size(); i++) {
listWine.add(listPreWine.get(i).getWine());
}
} else {
// If Wine List is empty, we force an error to fill every input
req.setAttribute("returnCode", "6");
}
req.setAttribute("data", listWine);
req.setAttribute("saved", listWine);
}
} else {
// If internet is no reachable, a message is returned to the view
req.setAttribute("returnCode", "7");
}
} catch (Exception e) {
req.setAttribute("returnCode", "99");
// TODO Auto-generated catch block
e.printStackTrace();
}
// Return control to View
req.getRequestDispatcher("/index.jsp").forward(req, resp);
}
}
| [
"arturo.arg@gmail.com"
] | arturo.arg@gmail.com |
8ec02b2a956d579b705bac2b821ad30c2d00879d | f28dce60491e33aefb5c2187871c1df784ccdb3a | /src/main/java/rx/internal/operators/OperatorZipIterable.java | 67b59f1147616416687a8b3613c9a45d69eac3bc | [
"Apache-2.0"
] | permissive | JackChan1999/boohee_v5.6 | 861a5cad79f2bfbd96d528d6a2aff84a39127c83 | 221f7ea237f491e2153039a42941a515493ba52c | refs/heads/master | 2021-06-11T23:32:55.977231 | 2017-02-14T18:07:04 | 2017-02-14T18:07:04 | 81,962,585 | 8 | 6 | null | null | null | null | UTF-8 | Java | false | false | 2,304 | java | package rx.internal.operators;
import java.util.Iterator;
import rx.Observable$Operator;
import rx.Subscriber;
import rx.exceptions.Exceptions;
import rx.functions.Func2;
import rx.observers.Subscribers;
public final class OperatorZipIterable<T1, T2, R> implements Observable$Operator<R, T1> {
final Iterable<? extends T2> iterable;
final Func2<? super T1, ? super T2, ? extends R> zipFunction;
public OperatorZipIterable(Iterable<? extends T2> iterable, Func2<? super T1, ? super T2, ? extends R> zipFunction) {
this.iterable = iterable;
this.zipFunction = zipFunction;
}
public Subscriber<? super T1> call(final Subscriber<? super R> subscriber) {
final Iterator<? extends T2> iterator = this.iterable.iterator();
try {
if (iterator.hasNext()) {
return new Subscriber<T1>(subscriber) {
boolean done;
public void onCompleted() {
if (!this.done) {
this.done = true;
subscriber.onCompleted();
}
}
public void onError(Throwable e) {
if (this.done) {
Exceptions.throwIfFatal(e);
return;
}
this.done = true;
subscriber.onError(e);
}
public void onNext(T1 t) {
if (!this.done) {
try {
subscriber.onNext(OperatorZipIterable.this.zipFunction.call(t, iterator.next()));
if (!iterator.hasNext()) {
onCompleted();
}
} catch (Throwable e) {
Exceptions.throwOrReport(e, this);
}
}
}
};
}
subscriber.onCompleted();
return Subscribers.empty();
} catch (Throwable e) {
Exceptions.throwOrReport(e, subscriber);
return Subscribers.empty();
}
}
}
| [
"jackychan2040@gmail.com"
] | jackychan2040@gmail.com |
b1620b1a2d5163c629ba7b868f0c432897d6e40a | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_24cde041f237747c2fc6d61a1ee0ec56a904293b/PublicOpenIDResource/15_24cde041f237747c2fc6d61a1ee0ec56a904293b_PublicOpenIDResource_s.java | 5b607db3c42691be88f7f09372f0106231c404d1 | [] | 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 | 10,176 | java | package uk.co.froot.demo.openid.resources;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import com.yammer.dropwizard.views.View;
import org.openid4java.OpenIDException;
import org.openid4java.consumer.ConsumerException;
import org.openid4java.consumer.ConsumerManager;
import org.openid4java.consumer.VerificationResult;
import org.openid4java.discovery.DiscoveryException;
import org.openid4java.discovery.DiscoveryInformation;
import org.openid4java.discovery.Identifier;
import org.openid4java.message.AuthRequest;
import org.openid4java.message.AuthSuccess;
import org.openid4java.message.MessageException;
import org.openid4java.message.ParameterList;
import org.openid4java.message.ax.AxMessage;
import org.openid4java.message.ax.FetchRequest;
import org.openid4java.message.ax.FetchResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.co.froot.demo.openid.auth.InMemoryUserCache;
import uk.co.froot.demo.openid.model.Authority;
import uk.co.froot.demo.openid.model.BaseModel;
import uk.co.froot.demo.openid.model.User;
import uk.co.froot.demo.openid.views.PublicFreemarkerView;
import javax.servlet.http.HttpSession;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.net.URI;
import java.util.List;
import java.util.Set;
/**
* <p>Resource to provide the following to application:</p>
* <ul>
* <li>Provision of configuration for public home page</li>
* </ul>
*
* @since 0.0.1
*/
@Path("/openid")
@Produces(MediaType.TEXT_HTML)
public class PublicOpenIDResource extends BaseResource {
private static final Logger log = LoggerFactory.getLogger(PublicOpenIDResource.class);
private static final String OPENID_DISCOVERY_KEY = "openid-discovery-key";
private final static String YAHOO_ENDPOINT = "https://me.yahoo.com";
private final static String GOOGLE_ENDPOINT = "https://www.google.com/accounts/o8/id";
public final ConsumerManager manager;
public PublicOpenIDResource() {
// Proxy configuration must come before ConsumerManager construction
// ProxyProperties proxyProps = new ProxyProperties();
// proxyProps.setProxyHostName("some-proxy");
// proxyProps.setProxyPort(8080);
// HttpClientFactory.setProxyProperties(proxyProps);
this.manager = new ConsumerManager();
}
/**
* @return A login view
*/
@GET
public View login() {
BaseModel model = new BaseModel();
return new PublicFreemarkerView<BaseModel>("openid/login.ftl", model);
}
/**
* Handles the authentication request from the user after they select their OpenId server
*
* @param identifier The identifier for the OpenId server
* @return A redirection or a form view containing user-specific permissions
*/
@POST
public Response authenticationRequest(
@FormParam("identifier")
String identifier
) {
Preconditions.checkNotNull(identifier, "No OpenID identifier submitted");
try {
// The OpenId server will use this endpoint to provide authentication
// Parts of this may be shown to the user
String returnToUrl = String.format(
"http://%s:%d/openid/verify",
request.getServerName(),
request.getServerPort());
// Perform discovery on the user-supplied identifier
List discoveries = manager.discover(identifier);
// Attempt to associate with the OpenID provider
// and retrieve one service endpoint for authentication
DiscoveryInformation discovered = manager.associate(discoveries);
// Store the discovery information in the user's session (creating a new one if required)
HttpSession session = request.getSession();
session.setAttribute(OPENID_DISCOVERY_KEY, discovered);
// Build the AuthRequest message to be sent to the OpenID provider
AuthRequest authReq = manager.authenticate(discovered, returnToUrl);
// Build the FetchRequest containing the information to be copied
// from the OpenID provider
FetchRequest fetch = FetchRequest.createFetchRequest();
if (identifier.startsWith(GOOGLE_ENDPOINT)) {
fetch.addAttribute("email",
"http://axschema.org/contact/email", true);
fetch.addAttribute("firstName",
"http://axschema.org/namePerson/first", true);
fetch.addAttribute("lastName",
"http://axschema.org/namePerson/last", true);
} else if (identifier.startsWith(YAHOO_ENDPOINT)) {
fetch.addAttribute("email",
"http://axschema.org/contact/email", true);
fetch.addAttribute("fullname",
"http://axschema.org/namePerson", true);
} else { // works for myOpenID
fetch.addAttribute("fullname",
"http://schema.openid.net/namePerson", true);
fetch.addAttribute("email",
"http://schema.openid.net/contact/email", true);
}
// Attach the extension to the authentication request
authReq.addExtension(fetch);
// Redirect the user to their OpenId server authentication process
return Response.seeOther(URI.create(authReq.getDestinationUrl(true))).build();
} catch (MessageException e1) {
e1.printStackTrace();
} catch (DiscoveryException e1) {
e1.printStackTrace();
} catch (ConsumerException e1) {
e1.printStackTrace();
}
return Response.ok().build();
}
/**
* Handles the OpenId server response to the earlier AuthRequest
*
* @return The OpenId identifier for this user if verification was successful
*/
@GET
@Path("/verify")
public View verifyOpenIdServerResponse() {
BaseModel model = new BaseModel();
try {
// Retrieve the previously stored discovery information
DiscoveryInformation discovered = (DiscoveryInformation) request
.getSession(false)
.getAttribute(OPENID_DISCOVERY_KEY);
// Fail fast
if (discovered == null) {
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
// Extract the receiving URL from the HTTP request
StringBuffer receivingURL = request.getRequestURL();
String queryString = request.getQueryString();
if (queryString != null && queryString.length() > 0) {
receivingURL.append("?").append(request.getQueryString());
}
// Extract the parameters from the authentication response
// (which comes in as a HTTP request from the OpenID provider)
ParameterList parameterList = new ParameterList(request.getParameterMap());
// Verify the response
// ConsumerManager needs to be the same (static) instance used
// to place the authentication request
// This could be tricky if this service is load-balanced
VerificationResult verification = manager.verify(
receivingURL.toString(), parameterList, discovered);
// Examine the verification result and extract the verified identifier
Optional<Identifier> verified = Optional.fromNullable(verification.getVerifiedId());
if (verified.isPresent()) {
// Verified
AuthSuccess authSuccess = (AuthSuccess) verification.getAuthResponse();
// Put the result into the user cache
User user = new User();
user.setOpenIDIdentifier(verified.get().getIdentifier());
// Extract additional information
if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
user.setEmailAddress(extractEmailAddress(authSuccess));
user.setFirstName(extractFirstName(authSuccess));
user.setLastName(extractLastName(authSuccess));
}
log.info("Extracted a {}",user);
// Bind the authorities to the user
Set<Authority> authorities = Sets.newHashSet();
// Promote to admin if they have a specific email address
// (not a good way, but this is only a demo)
if ("nobody@example.org".equals(user.getEmailAddress())) {
authorities.add(Authority.ROLE_ADMIN);
log.info("Granted admin rights");
}
authorities.add(Authority.ROLE_PUBLIC);
user.setAuthorities(authorities);
// This user may be returning through a verified cookie on a new session
HttpSession session = request.getSession();
// Use a central store for Users (keeps the session light)
InMemoryUserCache.INSTANCE.put(session.getId(), user);
return new PublicFreemarkerView<BaseModel>("common/home.ftl", model);
}
} catch (OpenIDException e) {
// present error to the user
e.printStackTrace();
}
// Must have failed to be here
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
private String extractEmailAddress(AuthSuccess authSuccess) throws MessageException {
FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
return getAttributeValue(
fetchResp,
"email",
"",
String.class);
}
private String extractFirstName(AuthSuccess authSuccess) throws MessageException {
FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
return getAttributeValue(
fetchResp,
"firstname",
"",
String.class);
}
private String extractLastName(AuthSuccess authSuccess) throws MessageException {
FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
return getAttributeValue(
fetchResp,
"lastname",
"",
String.class);
}
@SuppressWarnings("unchecked")
private <T> T getAttributeValue(FetchResponse fetchResponse, String attribute, T defaultValue, Class<T> clazz) {
List list = fetchResponse.getAttributeValues(attribute);
if (list != null && !list.isEmpty()) {
return (T) list.get(0);
}
return defaultValue;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a93227ea21e218267d270a64eeda56e83e202603 | 54d15f21c10b003b41e147dd147be7ea2287f08d | /EjemplosHilos/ejemplo_hilos_bodega/src/Programa.java | 21966c8e53aa2606602916199136294f72cef81d | [] | no_license | NicholleVerdugo/ejemplo_hilos_bodega | ef59af14c9ba910d73a105de563d010c54a7be40 | 163f75928dce580bad5561ddb7285c64d932deae | refs/heads/master | 2016-08-12T16:03:45.215742 | 2016-03-14T13:38:51 | 2016-03-14T13:38:51 | 53,327,644 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
public class Programa {
public static void main(String main[]){
Bodega bode = new Bodega();
Descargador procesoDescarga = new Descargador(bode);
Empacador procesoCarga=new Empacador(bode);
procesoDescarga.start();
procesoCarga.start();
}
}
| [
"nicolvgil@hotmail.com"
] | nicolvgil@hotmail.com |
f4638098e64c008a8d7693296ca22da6445cf24a | 42e55f37181715d4eb12833c71083fa2196f14bc | /sismtema-legado-empresa-1/src/main/java/com/emrpesa/sistema/legado/SismtemaLegadoEmpresa1Application.java | d66445723b2cce5b40eb78d2f20c4aa7e07a20a3 | [] | no_license | AngelCeebra/sistema-empresa | 17f0265c1164ef587d13ef8d6f81efe99899cd24 | 7008bc059908d135c1ce9345a06e4f2e0c59027d | refs/heads/master | 2022-12-09T18:24:19.282215 | 2020-09-01T02:41:31 | 2020-09-01T02:41:31 | 291,366,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 351 | java | package com.emrpesa.sistema.legado;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SismtemaLegadoEmpresa1Application {
public static void main(String[] args) {
SpringApplication.run(SismtemaLegadoEmpresa1Application.class, args);
}
}
| [
"angel@MBP-de-Angel.huawei.net"
] | angel@MBP-de-Angel.huawei.net |
43fb7d5b7f7d85342d440bfe4c46faede47464e6 | 1078a08def1c6edef7303fe9c1b5e8d91710d48d | /dashboard/dashboard-core/src/main/java/com/dmma/dashboard/core/services/BankOfficeService.java | 2c044e4f488f0b4a3b8c352ea8b61ff9b2699fc7 | [] | no_license | vtitkova/Dashboard | d18258076834b680997bdcb0adc3ecaedafe1ca8 | c7d0af2f01b8d4c9b781977968ecae5e58eff500 | refs/heads/master | 2020-12-02T08:44:32.755105 | 2011-08-23T21:24:45 | 2011-08-23T21:24:45 | 2,247,581 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,326 | java | package com.dmma.dashboard.core.services;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dmma.base.app.services.base.BaseService;
import com.dmma.dashboard.core.daos.BankOfficeDao;
import com.dmma.dashboard.core.entities.BankOffice;
public class BankOfficeService implements BaseService<BankOffice, Integer>{
private static final Logger log = LoggerFactory.getLogger(BankOfficeService.class);
private BankOfficeDao bankOfficeDao;
public void setBankOfficeDao(BankOfficeDao bankOfficeDao) {
this.bankOfficeDao = bankOfficeDao;
}
@Override
public BankOffice findById(Integer id) {
log.debug("findById");
return bankOfficeDao.findById(id);
}
@Override
public void saveOrUpdate(BankOffice entity) {
log.debug("saveOrUpdate");
bankOfficeDao.saveOrUpdate(entity);
}
@Override
public void delete(BankOffice entity) {
log.debug("delete");
bankOfficeDao.delete(entity);
}
@Override
public List<BankOffice> findAll() {
log.debug("findAll");
return bankOfficeDao.findAll();
}
@Override
public List<Integer> findAllIDs() {
log.debug("findAllIDs");
return bankOfficeDao.findAllIDs();
}
public BankOffice findByExternalId(Long externalId) {
log.debug("findByExternalId "+externalId);
return bankOfficeDao.findByExternalId(externalId);
}
}
| [
"vtitkova@gmail.com"
] | vtitkova@gmail.com |
9a01d3767ca6a919df7347ae3a703e0dc48b1038 | 115ea1b0b3adbaf984b92d57df1c4a659f03880d | /app/src/main/java/com/zjc/drivingSchoolT/db/model/OrderItem.java | cd86332d569337491527741fdba6405d5ed4972a | [] | no_license | caocf/DrivingSchoolT | c125bfed726ae710b3a1221dd1e9c14eca43b169 | f7799e10f2c08fd0cc6ec30df832049f3a28ac5f | refs/heads/master | 2020-06-11T21:46:29.964063 | 2016-09-03T15:17:04 | 2016-09-03T15:17:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,083 | java | package com.zjc.drivingSchoolT.db.model;
/**
* 订单列表Item
*
* @author LJ
* @date 2016年7月21日
*/
public class OrderItem extends AppResponse {
/**
* contactsname : 张俊陈
* contactsphone : 13797039695
* orderid : SJ160827592280000005
* orid : 678de123f41046028591cb6e36508104
* starttime : 2016-08-29 20:35:00
* state : 1
* title : 科目三培训学车订单
* total : 200.0
* uid : 42164b4381024eb1b6d6b9c0836aaa59
*/
private String contactsname;
private String contactsphone;
private String orderid;
private String orid;
private String starttime;
private String state;
private String title;
private double total;
private String uid;
public String getContactsname() {
return contactsname;
}
public void setContactsname(String contactsname) {
this.contactsname = contactsname;
}
public String getContactsphone() {
return contactsphone;
}
public void setContactsphone(String contactsphone) {
this.contactsphone = contactsphone;
}
public String getOrderid() {
return orderid;
}
public void setOrderid(String orderid) {
this.orderid = orderid;
}
public String getOrid() {
return orid;
}
public void setOrid(String orid) {
this.orid = orid;
}
public String getStarttime() {
return starttime;
}
public void setStarttime(String starttime) {
this.starttime = starttime;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
}
| [
"zjcx740811016"
] | zjcx740811016 |
b34b70dbd23caeab8e810e21780c96e3aa8af2cc | 6a2dcdc4ef2c0f7a27740696c978d7d3d01ac09e | /src/main/java/com/example/FinalExam/loanController.java | 40174c4aa3b5d886e6fa0e716d947b2b1f2ea429 | [] | no_license | amansidhu29/Amandeep_300324334FinalExam | ea2507a69e7e89013553cc9bbd76a3f8f396756c | b4ace04b702f77b5d20e08e2b0d1489a21935376 | refs/heads/master | 2023-07-15T10:09:48.687401 | 2021-08-19T19:10:30 | 2021-08-19T19:10:30 | 398,088,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,545 | java | package com.example.FinalExam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
@RequestMapping
@Controller
public class loanController {
DataBaseImplementation service;
@Autowired
Connection connect;
//a mapping when someone enters file
@RequestMapping(value = "/", method = RequestMethod.GET)
public String showloanPage2(ModelMap model) throws ClassNotFoundException, SQLException {
service = new DataBaseImplementation(connect.connect());
model.addAttribute("todos", service.display());
List<Loan> filteredTodos = new ArrayList<Loan>();
filteredTodos = (List) model.get("todos");
model.put("no", filteredTodos.get(0).getClientno());
model.put("clientname", filteredTodos.get(0).getClientname());
model.put("loanamount", filteredTodos.get(0).getLoanamount());
model.put("years", filteredTodos.get(0).getYears());
model.put("loantype", filteredTodos.get(0).getLoantype());
return "loantable";
}
@RequestMapping(value = "/loantable", method = RequestMethod.GET)
public String showLoanpage(ModelMap model,@RequestParam(defaultValue = "") String id) throws ClassNotFoundException, SQLException {
service = new DataBaseImplementation(connect.connect());
model.addAttribute("todos", service.display());
List<Loan> filteredTodos = new ArrayList<Loan>();
filteredTodos = (List) model.get("todos");
model.put("id", filteredTodos.get(0).getClientno());
model.put("clientname", filteredTodos.get(0).getClientname());
model.put("loanamount", filteredTodos.get(0).getLoanamount());
model.put("years", filteredTodos.get(0).getYears());
model.put("loantype", filteredTodos.get(0).getLoantype());
return"loantable";
}
@RequestMapping(value ="/delete-todo", method = RequestMethod.GET)
public String delete(ModelMap model, @RequestParam String id) throws SQLException, ClassNotFoundException {
service.delete(id);
model.clear();
return "redirect:/";
}
@RequestMapping(value = "/update-todo", method = RequestMethod.GET)
public String showUpdateTodoPage(ModelMap model, @RequestParam(defaultValue = "") String id) throws SQLException, ClassNotFoundException {
model.put("id", id);
Loan aa = service.search(id);
model.put("id", aa.getClientno());
model.put("clientname",aa.getClientname());
model.put("loanamount", aa.getLoanamount());
model.put("years", aa.getYears());
model.put("loantype", aa.getLoantype());
return "loanedit";
}
@RequestMapping(value = "/update-todo", method = RequestMethod.POST)
public String showUpdate(ModelMap model, @RequestParam String clientno, @RequestParam String clientname,@RequestParam double loanamount,@RequestParam int years,@RequestParam String loantype) throws SQLException, ClassNotFoundException {
String iid = (String) model.get("id");
Loan aa = new Loan(clientno,clientname,loanamount,years,loantype);
service.update(aa,iid);
return "redirect:/";
}
@RequestMapping(value = "/add-todo", method = RequestMethod.GET)
public String showpage()
{
return "loanadd";
}
@RequestMapping(value = "/add-todo", method = RequestMethod.POST)
public String add(ModelMap model, @RequestParam String clientno, @RequestParam String clientname,@RequestParam double loanamount,@RequestParam int years,@RequestParam String loantype) throws SQLException, ClassNotFoundException {
if (!((service.search(clientno)) == null)) {
model.put("errorMessage", "The Record you are trying to add is already existing.Choose a different customer number ");
return "redirect/loantable";
}
Loan aa = new Loan(clientno,clientname,loanamount,years,loantype);
service.add(aa);
model.clear();
return "redirect:/loantable";
}
}
| [
"amansidhu2971993@gmail.com"
] | amansidhu2971993@gmail.com |
6240985708828ae1bc85195b76ee9027a6baa26c | 0363f2e3baffe71dd218680974caf7cbe6b62804 | /app/src/main/java/com/example/soilagricultureiot/GasActivity.java | f479c0bd3032d76fe0197bd3da85d8c4fee06195 | [] | no_license | manhoosbilli1/SOIL-AGRICULTURE-APP | 922dced945d4ac4bb32ecbe5d76a51b2cb871f55 | eff24c5e57f14bb9a08139934d73e92918863f14 | refs/heads/master | 2022-11-20T22:43:17.027194 | 2020-07-28T21:03:25 | 2020-07-28T21:03:25 | 277,396,668 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,732 | java | package com.example.soilagricultureiot;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.Color;
import android.media.tv.TvView;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.data.LineDataSet;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.GenericTypeIndicator;
import com.google.firebase.database.ValueEventListener;
import java.lang.reflect.Array;
import java.security.Guard;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import de.nitri.gauge.Gauge;
import lecho.lib.hellocharts.model.Axis;
import lecho.lib.hellocharts.model.Line;
import lecho.lib.hellocharts.view.LineChartView;
import java.util.Calendar;
public class GasActivity extends AppCompatActivity {
private static final String TAG = "values";
ArrayList<Object> objectArrayList;
private static final int limit = 84600;
public static boolean remakeList = false;
private ValueEventListener mListener;
FirebaseDatabase mRoot;
DatabaseReference mRootRef;
LineDataSet lineDataSet = new LineDataSet(null,null);
LineData lineData;
LineChart chart;
Gauge gauge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gas);
Date currenTime =Calendar.getInstance().getTime();
Log.v(TAG, currenTime.toString());
Button btnBack = findViewById(R.id.btnBack);
chart = (LineChart) findViewById(R.id.chart);
gauge = (Gauge) findViewById(R.id.gauge);
mRoot = FirebaseDatabase.getInstance();
mRootRef = mRoot.getReference();
//chart settings
chart.setNoDataText("No data to show, Failed to load from database.");
chart.setBackgroundColor(Color.WHITE);
chart.setDrawBorders(true);
chart.setBorderColor(Color.BLACK);
//below event listener is for updating the gauges only
mListener = new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
Map<String, Float> dataMap = (Map)snapshot.getValue();
assert dataMap != null;
Number gasN = (Number) dataMap.get("gas");
assert gasN != null;
float gas = gasN.floatValue();
String gasS = gasN.toString();
gauge.moveToValue(gas);
gauge.setLowerText(gasS);
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(GasActivity.this,"Failed to load data from database",
Toast.LENGTH_SHORT).show();
}
};
mRootRef.child("firebaseIOT").addValueEventListener(mListener);
//adding another event listener for updating the graphs node: /soil-agriculture-iot/History/sensor;
//this is reading the history and transferring it to an array
mRootRef.child("History/gas").orderByKey().addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
List<Entry> entries = new ArrayList<>();
float counter=0f;
float counterData = 0f;
for(DataSnapshot mySnapShot : snapshot.getChildren()){
Float yValue = mySnapShot.getValue(Float.class);
counter += 1.0f;
entries.add(new Entry(counter, yValue));
counterData = counter++;
}
if(snapshot.getChildrenCount() >= limit){
mRootRef.child(("History/gas")).removeValue(); //cleans the data when its reached its limit
}
lineDataSet.setValues(entries);
lineDataSet.setLabel("Gas Values ");
lineDataSet.setColor(Color.WHITE);
lineData = new LineData(lineDataSet);
chart.clear();
chart.setData((lineData));
chart.invalidate();
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(GasActivity.this,"Failed to load data from database",
Toast.LENGTH_SHORT).show();
}
});
//show the retrieved array on a graph
btnBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(GasActivity.this, AdvancedActivity.class);
startActivity(i);
Toast.makeText(GasActivity.this, "Going back to menu", Toast.LENGTH_SHORT).show();
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
mRootRef.child("firebaseIOT").removeEventListener(mListener);
}
} | [
"shoaib.mustafa7@hotmail.com"
] | shoaib.mustafa7@hotmail.com |
bb523b5b94788a4a8210b253a5a56d92b15ec124 | a4e02b49771d16dd2a677c6702109aa848716831 | /src/com/cwa/server/logic/dataFunction/MatchDataFunction.java | 1702d7de443d0d14ceae8c842f806b095f6f87e2 | [] | no_license | mmgame/cwa2_2003logic_server | 29c1f774431bf458e98a648f76eea2c25ddf7133 | e40cb9ff2ea9b297124ce69acae4d114d1e3cfeb | refs/heads/master | 2021-03-12T22:08:58.968452 | 2015-08-06T03:10:02 | 2015-08-06T03:10:02 | 40,281,601 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,868 | java | package com.cwa.server.logic.dataFunction;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.cwa.component.data.IDBSession;
import com.cwa.component.data.function.IDataFunction;
import com.cwa.component.prototype.IPrototypeClientService;
import com.cwa.data.entity.IMatchEntityDao;
import com.cwa.data.entity.domain.MatchEntity;
import com.cwa.data.entity.domain.UserinfoEntity;
import com.cwa.message.MatchMessage.FormationInfoBean;
import com.cwa.prototype.FunctionPrototype;
import com.cwa.prototype.GameInitPrototype;
import com.cwa.prototype.gameEnum.CDTypeEnum;
import com.cwa.prototype.gameEnum.FunctionTypeEnum;
import com.cwa.prototype.gameEnum.IdsTypeEnum;
import com.cwa.prototype.gameEnum.MatchTypeEnum;
import com.cwa.server.logic.context.ILogicContext;
import com.cwa.server.logic.module.cd.IGameCdHandler;
import com.cwa.server.logic.module.match.cache.MatchCache;
import com.cwa.server.logic.player.IPlayer;
import com.cwa.util.TimeUtil;
/**
* 副本数据封装
*
* @author mausmars
*
*/
public class MatchDataFunction implements IDataFunction {
// {副本类型:MatchEntity}
private Map<Integer, MatchEntity> entityMap = new HashMap<Integer, MatchEntity>();
private MatchCache matchCache;
private IMatchEntityDao dao;
private IPlayer player;
private boolean isInited;
public MatchDataFunction(IPlayer player) {
this.player = player;
IDBSession dbSession = player.getDataFunctionManager().getDbSession();
dao = (IMatchEntityDao) dbSession.getEntityDao(MatchEntity.class);
}
@Override
public boolean initData(boolean newRegister) {
if (isInited) {
return false;
}
isInited = true;
List<MatchEntity> entitys = dao.selectEntityByUserId(player.getUserId(), createParams());
for (MatchEntity e : entitys) {
entityMap.put(e.matchType, e);
}
if (newRegister) {
IPrototypeClientService prototypeService = player.getLogicContext().getprototypeManager();
List<GameInitPrototype> gameInitPrototypeList = prototypeService.getAllPrototype(GameInitPrototype.class);
for (GameInitPrototype gameInitPrototype : gameInitPrototypeList) {
if (gameInitPrototype.getInitType() == IdsTypeEnum.Ids_Match.value()) {
newCreateEntity(gameInitPrototype.getInitSubType(), gameInitPrototype.getInitParamList().get(0));
}
}
}
return false;
}
@Override
public boolean isInited() {
return isInited;
}
public void newCreateEntity(int matchType, int passcardId) {
MatchEntity entity = new MatchEntity();
entity.userId = player.getUserId();
entity.matchType = matchType;
entity.matchKeyId = passcardId;
entity.resetTime = TimeUtil.currentSystemTime();
entity.setBattleKeyIdsMap(new HashMap<String, Integer>());
entity.setResetKeyIdsMap(new HashMap<String, Integer>());
entityMap.put(matchType, entity);
// 插入实体
insertEntity(entity);
}
public MatchEntity getEntity(int matchType) {
return entityMap.get(matchType);
}
public MatchCache getMatchCache() {
return matchCache;
}
// 创建副本战斗缓存
public void createMatchCache(int matchType, int passcardId) {
matchCache = new MatchCache();
matchCache.setMatchType(matchType);
matchCache.setMatchKeyId(passcardId);
matchCache.setStartTime(TimeUtil.currentSystemTime());
matchCache.setCheck(true);
matchCache.setSession(player.getSession());
}
// 移除緩存
public void cleanCache() {
matchCache = null;
}
public Collection<MatchEntity> getAllEntity() {
return entityMap.values();
}
/**
* 赢得比赛
*
* @param matchType
* @param passcardId
* @param next
*/
public void winMatch(int matchType, int passcardId, int next) {
MatchEntity matchEntity = entityMap.get(matchType);
if (matchEntity.matchKeyId == passcardId) {
// 设置下一关
matchEntity.matchKeyId = next;
}
modifyBattleCount(matchType, passcardId, 1);
updateEntity(matchEntity);
}
public void modifyBattleCount(int matchType, int passcardId, int count) {
// 精英副本比赛次数加
if (matchType == MatchTypeEnum.Match_Elite.value()) {
MatchEntity matchEntity = entityMap.get(matchType);
Map<String, Integer> battleKeyIdMap = matchEntity.getBattleKeyIdsMap();
if (!battleKeyIdMap.containsKey(String.valueOf(passcardId))) {
battleKeyIdMap.put(String.valueOf(passcardId), 0);
}
battleKeyIdMap.put(String.valueOf(passcardId), battleKeyIdMap.get(battleKeyIdMap) + count);
updateEntity(matchEntity);
}
}
// 精英副本次数重置
public void refreshBattleCount(int passcardId) {
MatchEntity matchEntity = entityMap.get(MatchTypeEnum.Match_Elite.value());
Map<String, Integer> battleKeyIdMap = matchEntity.getBattleKeyIdsMap();
if (battleKeyIdMap.containsKey(String.valueOf(passcardId))) {
battleKeyIdMap.put(String.valueOf(passcardId), 0);
updateEntity(matchEntity);
}
}
// 获取刷新次数
public int getRefreshCount(int passcardId) {
MatchEntity matchEntity = entityMap.get(MatchTypeEnum.Match_Elite.value());
Map<String, Integer> battleKeyIdMap = matchEntity.getBattleKeyIdsMap();
if (battleKeyIdMap.containsKey(String.valueOf(passcardId))) {
return battleKeyIdMap.get(String.valueOf(passcardId));
}
return 0;
}
/**
* 副本次数和重置次数cd检测
*/
public void cdBattleReset() {
ILogicContext logicContext = player.getLogicContext();
IGameCdHandler cdHandler = logicContext.getCdManager().getGameCd(CDTypeEnum.CD_BATTLE, player.getLogicContext());
for (MatchEntity matchEntity : entityMap.values()) {
boolean isFinishedCD = cdHandler.isFinishedCd(player, CDTypeEnum.CD_BATTLE.value(), matchEntity.resetTime);
if (isFinishedCD) {
matchEntity.getBattleKeyIdsMap().clear();
matchEntity.getResetKeyIdsMap().clear();
// 重置
if (logicContext.getCdManager().isSaveDb(CDTypeEnum.CD_BATTLE, logicContext)) {
matchEntity.resetTime = TimeUtil.currentSystemTime();
}
updateEntity(matchEntity);
}
}
}
public boolean checkMatchFormationInfo(List<FormationInfoBean> beans) {
Set<Integer> heroIds = new HashSet<Integer>();
boolean isRetinue = false;
Iterator<FormationInfoBean> beanIt = beans.iterator();
for (; beanIt.hasNext();) {
FormationInfoBean bean = beanIt.next();
int heroId = bean.getHeroId();
if (heroId > 0) {
if (heroIds.contains(heroId)) {
return false;
}
heroIds.add(heroId);
}
int retinueId = bean.getRetinueId();
if (retinueId > 0) {
if (heroIds.contains(retinueId)) {
return false;
}
heroIds.add(retinueId);
isRetinue = true;
}
}
if (isRetinue) {
UserinfoDataFunction fdFunction = (UserinfoDataFunction) player.getDataFunctionManager().getDataFunction(UserinfoEntity.class);
FunctionPrototype functionPrototype = player.getLogicContext().getprototypeManager()
.getPrototype(FunctionPrototype.class, FunctionTypeEnum.Function_Retinue.value());
int userLevel = fdFunction.getLevel();
if (userLevel < functionPrototype.getLevelMin()) {
// 等级不足开启侍从
return false;
}
}
return true;
}
private void updateEntity(MatchEntity entity) {
dao.updateEntity(entity, player.getDataFunctionManager().getDbSession().getParams(player.getRid()));
}
private void insertEntity(MatchEntity entity) {
dao.insertEntity(entity, player.getDataFunctionManager().getDbSession().getParams(player.getRid()));
}
private Map<String, Object> createParams() {
return player.getDataFunctionManager().getDbSession().getParams(player.getRid());
}
}
| [
"dalaoshuxxx@gmail.com"
] | dalaoshuxxx@gmail.com |
bdd6f4479f70e943d9656b55a2b022aef2cc7aba | 6f09a418d925d82659ade9c55ccf312339da13c0 | /app/src/main/java/com/atendimentossolutions/filafastonline/ItemMeusAtendimentos.java | b98306d29f0607740f945d521c75d1befb0375c8 | [] | no_license | jonathandias02/FilaFastOnlineMobile | bc9c1b5e1ea14f2976dfcf6cad24d39afc6df352 | 6afceff8d568710da36f99f08021d577911766b2 | refs/heads/master | 2020-03-27T06:32:23.047364 | 2018-11-09T22:30:17 | 2018-11-09T22:30:17 | 146,113,255 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package com.atendimentossolutions.filafastonline;
import java.util.Date;
public class ItemMeusAtendimentos {
private String senha;
private String dataAtendimento;
private String servico;
private String atendente;
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
public String getDataAtendimento() {
return dataAtendimento;
}
public void setDataAtendimento(String dataAtendimento) {
this.dataAtendimento = dataAtendimento;
}
public String getServico() {
return servico;
}
public void setServico(String servico) {
this.servico = servico;
}
public String getAtendente() {
return atendente;
}
public void setAtendente(String atendente) {
this.atendente = atendente;
}
}
| [
"jonathan.a.dias@gmail.com"
] | jonathan.a.dias@gmail.com |
29d00bcff2e53e6f8a72dd026cdad8ba989bb39b | 16640ec15e2dd0916cfe1a6b4ca70fc852b09a64 | /adp/src/main/java/com/hongguaninfo/hgdf/adp/service/sys/SysUserUgroupJoinService.java | 55c0bff5f2a97f2638c02e80483757825b7dee6e | [] | no_license | hhp676/LaiWuWater | 5d569fc205037f1883a5e65565a7ee57d8830cb8 | a57f1f20b008070ee160156afaf229376bfe551c | refs/heads/master | 2020-04-01T09:27:17.223874 | 2018-10-24T07:45:57 | 2018-10-24T07:45:57 | 153,070,956 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,648 | java | package com.hongguaninfo.hgdf.adp.service.sys;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hongguaninfo.hgdf.adp.core.exception.BizException;
import com.hongguaninfo.hgdf.adp.core.utils.SessionUtils;
import com.hongguaninfo.hgdf.adp.dao.sys.SysUserUgroupJoinDao;
import com.hongguaninfo.hgdf.adp.entity.sys.SysUserUgroupJoin;
/**
* 系统用户用户组关联表:SYS_USER_UGROUP_JOIN biz 层
*
* @author:yuyanlin
*/
@Service("sysUserUgroupJoinService")
public class SysUserUgroupJoinService {
@Autowired
private SysUserUgroupJoinDao sysUserUgroupJoinDao;
// 通过用户id获取列表
public List<SysUserUgroupJoin> getListByUserId(int userId)
throws BizException {
SysUserUgroupJoin queryVo = new SysUserUgroupJoin();
queryVo.setUserId(new BigDecimal(userId));
return sysUserUgroupJoinDao.getList(queryVo);
}
// 通过用户id获取用户组id字符串
public String getGroupIdsByUserId(int userId) throws BizException {
List<String> groupIdList = new ArrayList<String>();
List<SysUserUgroupJoin> list = getListByUserId(userId);
for (SysUserUgroupJoin bo : list) {
groupIdList.add(bo.getGroupId() + "");
}
return StringUtils.join(groupIdList, ",");
}
// 通过用户id获取用户组名称字符串
public String getGroupNamesByUserId(int userId) throws BizException {
List<String> groupNameList = new ArrayList<String>();
List<SysUserUgroupJoin> list = getListByUserId(userId);
for (SysUserUgroupJoin bo : list) {
groupNameList.add(bo.getGroupName());
}
return StringUtils.join(groupNameList, ",");
}
// 新增
public void insertSysUserUgroupJoin(int userId, int groupId)
throws BizException {
SysUserUgroupJoin sysUserUgroupJoin = new SysUserUgroupJoin();
sysUserUgroupJoin.setGroupId(new BigDecimal(groupId));
sysUserUgroupJoin.setUserId(new BigDecimal(userId));
sysUserUgroupJoin.setIsFinal(0);
sysUserUgroupJoin.setCrtUserid(new BigDecimal(SessionUtils.getUserId()));
sysUserUgroupJoin.setCrtTime(new Date());
sysUserUgroupJoinDao.save(sysUserUgroupJoin);
}
// 批量新增
public void insertBatchSysUserUgroupJoin(String groupIds, int userId)
throws BizException {
if (!StringUtils.isEmpty(groupIds)) {
List<SysUserUgroupJoin> list = new ArrayList<SysUserUgroupJoin>();
String[] groupIdAry = groupIds.split(",");
for (String groupId : groupIdAry) {
SysUserUgroupJoin sysUserUgroupJoin = new SysUserUgroupJoin();
sysUserUgroupJoin.setGroupId(new BigDecimal(groupId));
sysUserUgroupJoin.setUserId(new BigDecimal(userId));
sysUserUgroupJoin.setIsFinal(0);
sysUserUgroupJoin.setCrtUserid(new BigDecimal(SessionUtils
.getUserId()));
sysUserUgroupJoin.setCrtTime(new Date());
list.add(sysUserUgroupJoin);
}
sysUserUgroupJoinDao.saveBatch(list);
}
}
// 通过用户id删除
public void deleteByUserId(int userId) throws BizException {
sysUserUgroupJoinDao.delete(userId);
}
/**
* 通过用户组删除
* @param id
*/
public void deleteByGroupId(int groupId) {
sysUserUgroupJoinDao.deleteByGroupId(groupId);
}
} | [
"houhuapeng@hongguaninfo.com"
] | houhuapeng@hongguaninfo.com |
60770ebdebfac673ac0dc2b29d59a695c5beb540 | a90259f75e3c9185211252596c6635b1c752144d | /src/com/shixi/domain/Customer.java | 580ca02af3d9bcca2654dfca101875b8550eca65 | [] | no_license | anshe80/purchase_sell_stock | 8d5e37d45c770de3a55814d0c68db5d1528359ec | aad7b257e8f5297a0ffc24290807df6798b60bd8 | refs/heads/master | 2020-12-29T01:31:16.319988 | 2014-11-27T01:38:36 | 2014-11-27T01:38:36 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 1,895 | java | /**
* @author whl
* @date£º2013-7-20 ÏÂÎç3:49:25
*/
package com.shixi.domain;
public class Customer {
private Integer id;
private String name;
private String phone;
private String address;
private String postcode;
private String cmail;
private String company;
public String getPostcode() {
return postcode;
}
public void setPostcode(String postcode) {
this.postcode = postcode;
}
public String getCmail() {
return cmail;
}
public void setCmail(String cmail) {
this.cmail = cmail;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Customer() {}
public Customer(String name, String phone, String address, String postcode, String cmail, String company) {
this.name = name;
this.phone = phone;
this.address = address;
this.postcode = postcode;
this.cmail = cmail;
this.company = company;
}
public void setName(String name) {
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public Customer(Integer id, String name, String phone, String address,
String postcode, String cmail, String company) {
super();
this.id = id;
this.name = name;
this.phone = phone;
this.address = address;
this.postcode = postcode;
this.cmail = cmail;
this.company = company;
}
@Override
public String toString() {
return "Customer [id=" + id + ", name=" + name + ", phone=" + phone
+ ", address=" + address + ", postcode=" + postcode
+ ", cmail=" + cmail + ", company=" + company + "]";
}
}
| [
"cosmio.w@gmail.com"
] | cosmio.w@gmail.com |
1c95554b9f2400caaf33dbb2ff0e60064e398c43 | 49b026906e9949218c49b62fbe1118965a450ad3 | /src/test/java/ua/repair_agency/services/validation/FormValidatorTest.java | ac8ef87831a7914b339d5bba8c15888d26610e1f | [] | no_license | flame19/RepairAgency | 4921ca796f5b6c15ca3f8d2ea859285b33cad693 | 6fe393edd22f6922ce41982215a2ee8a28d44aa8 | refs/heads/master | 2022-12-25T17:28:14.425846 | 2020-10-11T15:47:47 | 2020-10-11T15:47:47 | 303,154,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,013 | java | package ua.repair_agency.services.validation;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import ua.repair_agency.constants.Attributes;
import ua.repair_agency.constants.Parameters;
import ua.repair_agency.models.forms.*;
import ua.repair_agency.models.user.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashSet;
import java.util.Set;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
class FormValidatorTest {
@Mock
private HttpServletRequest req;
private Set<String> inconsistencies = new HashSet<>();
@BeforeEach
void init() {
MockitoAnnotations.initMocks(this);
inconsistencies.clear();
}
@ParameterizedTest
@CsvSource({"user@mail.com, User1234", "USER@MAIL.com, User1234"})
void validation_loginFormWithValidData_noInconsistencies(String email, String pass) {
when(req.getParameter("email")).thenReturn(email);
when(req.getParameter("pass")).thenReturn(pass);
LoginForm form = new LoginForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@CsvSource({"user@mailcom, User1234", "usermail.com, User1234", "user@mail.c, User1234"})
void validation_loginFormWithInvalidEmail_oneEmailInconsistency(String email, String pass) {
when(req.getParameter("email")).thenReturn(email);
when(req.getParameter("pass")).thenReturn(pass);
LoginForm form = new LoginForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(1, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("email")));
}
@ParameterizedTest
@CsvSource({"user@mail.com, User123", "user@mail.com, user1234", "user@mail.com, ?ser1234"})
void validation_loginFormWithInvalidPass_onePassInconsistency(String email, String pass) {
when(req.getParameter("email")).thenReturn(email);
when(req.getParameter("pass")).thenReturn(pass);
LoginForm form = new LoginForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(1, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("password")));
}
@ParameterizedTest
@CsvSource({"user@mailcom, User123", "usermail.com, user1234", "user@mail.c, ?ser1234", ","})
void validation_loginFormWithInvalidEmailPass_twoEmailPassInconsistencies(String email, String pass) {
when(req.getParameter("email")).thenReturn(email);
when(req.getParameter("pass")).thenReturn(pass);
LoginForm form = new LoginForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(2, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("email")),
() -> assertTrue(inconsistencies.contains("password")));
}
@ParameterizedTest
@CsvSource({"Firstname, Lastname, user@mail.com, User1234, User1234, en, CUSTOMER",
"Ім'я, Прізвище, user@mail.com, User1234, User1234, uk, CUSTOMER"})
void validation_registrationFormWithValidData_noInconsistencies(
String fName, String lName, String email, String pass, String passConf, String lang, String role) {
HttpSession session = mock(HttpSession.class);
User user = mock(User.class);
when(req.getParameter(Parameters.F_NAME)).thenReturn(fName);
when(req.getParameter(Parameters.L_NAME)).thenReturn(lName);
when(req.getParameter(Parameters.EMAIL)).thenReturn(email);
when(req.getParameter(Parameters.PASS)).thenReturn(pass);
when(req.getParameter(Parameters.PASS_CONF)).thenReturn(passConf);
when(req.getParameter(Parameters.LANG)).thenReturn(lang);
when(req.getParameter(Parameters.ROLE)).thenReturn(role);
when(user.getLanguage()).thenReturn(lang);
when(session.getAttribute(Attributes.USER)).thenReturn(user);
when(req.getSession()).thenReturn(session);
RegistrationForm form = new RegistrationForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@CsvSource({"Firstname+, Lastnaem1, usermail.com, user1234, USer12345, ,",
"Ім'я%, Прізвище/, user@mail.c, user123, USer12345, ,"})
void validation_registrationFormWithInvalidData_sevenInconsistencies(
String fName, String lName, String email, String pass, String passConf, String lang, String role) {
HttpSession session = mock(HttpSession.class);
User user = mock(User.class);
when(req.getParameter(Parameters.F_NAME)).thenReturn(fName);
when(req.getParameter(Parameters.L_NAME)).thenReturn(lName);
when(req.getParameter(Parameters.EMAIL)).thenReturn(email);
when(req.getParameter(Parameters.PASS)).thenReturn(pass);
when(req.getParameter(Parameters.PASS_CONF)).thenReturn(passConf);
when(req.getParameter(Parameters.LANG)).thenReturn(lang);
when(req.getParameter(Parameters.ROLE)).thenReturn(role);
when(user.getLanguage()).thenReturn(lang);
when(session.getAttribute(Attributes.USER)).thenReturn(user);
when(req.getSession()).thenReturn(session);
RegistrationForm form = new RegistrationForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(7, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("firstName")),
() -> assertTrue(inconsistencies.contains("lastName")),
() -> assertTrue(inconsistencies.contains("email")),
() -> assertTrue(inconsistencies.contains("password")),
() -> assertTrue(inconsistencies.contains("passwordConfirmation")),
() -> assertTrue(inconsistencies.contains("language")),
() -> assertTrue(inconsistencies.contains("role")));
}
@ParameterizedTest
@CsvSource({
"Firstname, Lastname, user@mail.com, MANAGER",
"Ім'я, Прізвище, second-user@mail.com, MASTER"})
void validation_userEditingFormWithValidData_noInconsistencies(String fName, String lName, String email, String role) {
when(req.getParameter(Parameters.F_NAME)).thenReturn(fName);
when(req.getParameter(Parameters.L_NAME)).thenReturn(lName);
when(req.getParameter(Parameters.EMAIL)).thenReturn(email);
when(req.getParameter(Parameters.ROLE)).thenReturn(role);
UserEditingForm form = new UserEditingForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@CsvSource({
"Firstname8, Lastname/, usermail.com, ",
"Ім'я., Прізвище2, second-user@mailcom, "})
void validation_userEditingFormWithInvalidData_fourInconsistencies(String fName, String lName, String email, String role) {
when(req.getParameter(Parameters.F_NAME)).thenReturn(fName);
when(req.getParameter(Parameters.L_NAME)).thenReturn(lName);
when(req.getParameter(Parameters.EMAIL)).thenReturn(email);
when(req.getParameter(Parameters.ROLE)).thenReturn(role);
UserEditingForm form = new UserEditingForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(4, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("firstName")),
() -> assertTrue(inconsistencies.contains("lastName")),
() -> assertTrue(inconsistencies.contains("email")),
() -> assertTrue(inconsistencies.contains("role")));
}
@ParameterizedTest
@CsvSource(
{"Brand-100, 100-model, 2005, ENGINE_REPAIR, Repair description",
"Бренд-100, 100-модель, 1995, CHASSIS_REPAIR, Опис ремонту"})
void validation_orderFormWithValidData_noInconsistencies(
String brand, String model, String year, String repairType, String repairDescription) {
HttpSession session = mock(HttpSession.class);
when(req.getParameter(Parameters.CAR_BRAND)).thenReturn(brand);
when(req.getParameter(Parameters.CAR_MODEL)).thenReturn(model);
when(req.getParameter(Parameters.CAR_YEAR)).thenReturn(year);
when(req.getParameter(Parameters.REPAIR_TYPE)).thenReturn(repairType);
when(req.getParameter(Parameters.REPAIR_DESCRIPTION)).thenReturn(repairDescription);
when(session.getAttribute(Attributes.USER)).thenReturn(new User.UserBuilder().build());
when(req.getSession()).thenReturn(session);
OrderForm form = new OrderForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@CsvSource({
"Brand%, , 2100, Repair type, ",
", Модель?, 1899, , "})
void validation_orderFormWithInvalidData_fiveInconsistencies(
String brand, String model, String year, String repairType, String repairDescription) {
HttpSession session = mock(HttpSession.class);
when(req.getParameter(Parameters.CAR_BRAND)).thenReturn(brand);
when(req.getParameter(Parameters.CAR_MODEL)).thenReturn(model);
when(req.getParameter(Parameters.CAR_YEAR)).thenReturn(year);
when(req.getParameter(Parameters.REPAIR_TYPE)).thenReturn(repairType);
when(req.getParameter(Parameters.REPAIR_DESCRIPTION)).thenReturn(repairDescription);
when(session.getAttribute(Attributes.USER)).thenReturn(new User.UserBuilder().build());
when(req.getSession()).thenReturn(session);
OrderForm form = new OrderForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(5, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("carBrand")),
() -> assertTrue(inconsistencies.contains("carModel")),
() -> assertTrue(inconsistencies.contains("carYear")),
() -> assertTrue(inconsistencies.contains("repairType")),
() -> assertTrue(inconsistencies.contains("repairDescription")));
}
@ParameterizedTest
@CsvSource({"131.25, Some manager comment", "15, Якийсь коментар менеджера"})
void validation_orderEditingFormWithValidData_noInconsistencies(String price, String managerComment) {
when(req.getParameter(Parameters.PRICE)).thenReturn(price);
when(req.getParameter(Parameters.MANAGER_COMMENT)).thenReturn(managerComment);
OrderEditingForm form = new OrderEditingForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@CsvSource({".25, ", "10.1.3, "})
void validation_orderEditingFormWithInvalidData_twoInconsistencies(String price, String managerComment) {
when(req.getParameter(Parameters.PRICE)).thenReturn(price);
when(req.getParameter(Parameters.MANAGER_COMMENT)).thenReturn(managerComment);
OrderEditingForm form = new OrderEditingForm(req);
Set<String> inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(2, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("price")),
() -> assertTrue(inconsistencies.contains("managerComment")));
}
@ParameterizedTest
@CsvSource({"Some review", "Якийсь відгук"})
void validation_reviewFormWithValidData_noInconsistencies(String review) {
when(req.getParameter(Parameters.REVIEW_CONTENT)).thenReturn(review);
ReviewForm form = new ReviewForm(req);
inconsistencies = FormValidator.validateForm(form);
assertTrue(inconsistencies.isEmpty());
}
@ParameterizedTest
@ValueSource(strings = {""})
void validation_reviewFormWithInvalidData_inconsistency(String review) {
when(req.getParameter(Parameters.REVIEW_CONTENT)).thenReturn(review);
ReviewForm form = new ReviewForm(req);
inconsistencies = FormValidator.validateForm(form);
assertAll(
() -> assertEquals(1, inconsistencies.size()),
() -> assertTrue(inconsistencies.contains("reviewContent")));
}
}
| [
"dimon19032000@gmail.com"
] | dimon19032000@gmail.com |
620abadcbae120f1c246c6e639d71dbf9344da01 | 2d752386a1c0f064b30d9044c20a2116fa60581d | /comment/api/src/main/java/com/singerdream/comment/api/CommentInterface.java | 0d31a4cd7e695c4652e58c62da50409b1c160a05 | [] | no_license | Peng-Da/dubbo-usage | 25391f3b96de04d5d17a76a57bfcd4d1d9bff1fa | 5a09bc9d900b39090d899a1245fee24983bf5348 | refs/heads/main | 2023-04-12T23:31:56.535267 | 2021-04-28T13:28:57 | 2021-04-28T13:28:57 | 362,468,228 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 394 | java | package com.singerdream.comment.api;
import com.singerdream.comment.api.modle.CommentModel;
import java.util.List;
public interface CommentInterface {
CommentModel add(CommentModel comment);
void delete(long commentId);
void update(CommentModel commentModel);
List<CommentModel> queryActiveByTargetId(long targetId);
List<CommentModel> queryActiveByPid(long pid);
}
| [
"liumaopeng@singerdream.com"
] | liumaopeng@singerdream.com |
3a672820261432c24b8760cf300ffccf4b5748f6 | 342f92c326ab23ae70512356bb5568722aa81a7c | /ClavaWeaver/test/pt/up/fe/specs/cxxweaver/tests/CxxBenchTest.java | ba47a4fd2d46d0891ff2a6e9a32306fc321eb56b | [
"Apache-2.0"
] | permissive | fabiodrg/clava | 56082f69cf43ec3054c8b181cde3d0cda32562d5 | c85df83eaf4fd2037e0b628d933ae2de4a372a35 | refs/heads/master | 2023-06-30T04:46:03.315347 | 2021-08-11T18:46:12 | 2021-08-11T18:46:12 | 369,831,920 | 0 | 0 | Apache-2.0 | 2021-05-22T14:43:23 | 2021-05-22T14:43:22 | null | UTF-8 | Java | false | false | 1,885 | java | /**
* Copyright 2016 SPeCS.
*
* 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. under the License.
*/
package pt.up.fe.specs.cxxweaver.tests;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import pt.up.fe.specs.clava.language.Standard;
import pt.up.fe.specs.cxxweaver.ClavaWeaverTester;
import pt.up.fe.specs.util.SpecsSystem;
public class CxxBenchTest {
@BeforeClass
public static void setupOnce() {
SpecsSystem.programStandardInit();
ClavaWeaverTester.clean();
}
@After
public void tearDown() {
ClavaWeaverTester.clean();
}
private static ClavaWeaverTester newTester() {
return new ClavaWeaverTester("clava/test/bench/", Standard.CXX11)
.setResultPackage("cpp/results")
.setSrcPackage("cpp/src");
}
@Test
public void testLoicEx1() {
newTester().test("LoicEx1.lara", "loic_ex1.cpp");
}
@Test
public void testLoicEx2() {
newTester().setCheckWovenCodeSyntax(false).test("LoicEx2.lara", "loic_ex2.cpp");
}
@Test
public void testLoicEx3() {
// newTester().setCheckWovenCodeSyntax(false).test("LoicEx3.lara", "loic_ex3.cpp");
newTester().test("LoicEx3.lara", "loic_ex3.cpp");
}
@Test
public void testLSIssue2() {
newTester().test("LSIssue2.lara", "ls_issue2.cpp");
}
}
| [
"joaobispo@gmail.com"
] | joaobispo@gmail.com |
5bd375fd4382f0ae284815048144ba6a448f3dee | 76cebfcf868ea75889d7a127f82f6a94985efa00 | /hmf-common/src/main/java/com/hartwig/hmftools/common/purple/region/FittedRegionFactory.java | 13523eca0b68d46ee6b324536268927c0d732f1a | [
"MIT"
] | permissive | j-hudecek/hmftools | 2a45f2a13c2bd8c0364d2bd073c32c0d374d22a3 | f619e02cdb166594e7dd4d7d1dd7fe8592267f2d | refs/heads/master | 2020-03-31T08:20:54.511532 | 2018-10-08T09:39:29 | 2018-10-08T09:39:29 | 152,054,013 | 0 | 0 | MIT | 2018-10-08T09:34:13 | 2018-10-08T09:34:12 | null | UTF-8 | Java | false | false | 489 | java | package com.hartwig.hmftools.common.purple.region;
import java.util.Collection;
import java.util.List;
import org.jetbrains.annotations.NotNull;
public interface FittedRegionFactory {
@NotNull
List<FittedRegion> fitRegion(final double purity, final double normFactor,
@NotNull final Collection<ObservedRegion> observedRegions);
@NotNull
FittedRegion fitRegion(final double purity, final double normFactor, final @NotNull ObservedRegion observedRegion);
}
| [
"jonbaber@gmail.com"
] | jonbaber@gmail.com |
c0bec6f7a0200159ee4abeb5dd56f8a993fdcdb6 | f800e918fcd19d75ebaeb9c1db24dae62c35a907 | /app/src/main/java/com/bw/zweidu/activity/LoginActivity.java | 8a9e8b636325e687988b0d77961b3cbf5c77f30a | [] | no_license | zwais/zweidu | 5587df38c29f2d7229c3a15e7a18b4e78e1b3726 | 74000f274be66d30bd70eadcdff5149e54b06745 | refs/heads/master | 2020-04-27T12:46:24.831654 | 2019-03-07T12:55:29 | 2019-03-07T12:55:29 | 174,343,869 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,090 | java | package com.bw.zweidu.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.bw.zweidu.MainActivity;
import com.bw.zweidu.R;
import com.bw.zweidu.base.BaseActivity;
import com.bw.zweidu.bean.LoginBean;
import com.bw.zweidu.presenter.IpresenterImpl;
import com.bw.zweidu.util.Apis;
import com.bw.zweidu.util.RegularUtil;
import com.bw.zweidu.view.IView;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class LoginActivity extends BaseActivity implements IView {
private EditText edit_phone;
private EditText edit_pass;
private CheckBox box_remember;
private TextView text_reg;
private Button button_reg;
private SharedPreferences mSharedPreferences;
private IpresenterImpl mIpresenterImpl;
private SharedPreferences.Editor edit;
private ImageView image_eye;
@Override
protected int getLayoutResId() {
return R.layout.activity_login;
}
@SuppressLint("CommitPrefEdits")
@Override
protected void initView(Bundle savedInstanceState) {
//获取资源ID
edit_phone = findViewById(R.id.login_edit_phone);
edit_pass = findViewById(R.id.login_edit_pass);
box_remember = findViewById(R.id.login_box_remember);
text_reg = findViewById(R.id.login_text_reg);
button_reg= findViewById(R.id.login_button_login);
image_eye = findViewById(R.id.login_image_pass_eye);
mSharedPreferences=getSharedPreferences("User",MODE_PRIVATE);
edit = mSharedPreferences.edit();
//互绑
initPresenter();
}
@Override
protected void initData() {
//记住密码
getEdit();
//登录
clickMain();
//跳转到注册界面
touchRegister();
//触摸显示密码
touchEye();
}
@SuppressLint("ClickableViewAccessibility")
private void touchEye() {
image_eye.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
//判断事件的动作,按下,抬起
if (event.getAction()==MotionEvent.ACTION_DOWN){
//从密码不可见模式变为密码可见模式
edit_pass.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
}else if (event.getAction()==MotionEvent.ACTION_UP) {
//从密码可见模式变为密码不可见模式
edit_pass.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
return true;
}
});
}
private void getEdit() {
//获取记住密码的状态值
boolean box_ischeck = mSharedPreferences.getBoolean("box_ischeck", false);
if (box_ischeck){
String phone = mSharedPreferences.getString("phone", null);
String pass = mSharedPreferences.getString("pass", null);
edit_phone.setText(phone);
edit_pass.setText(pass);
box_remember.setChecked(true);
}
}
@SuppressLint("ClickableViewAccessibility")
private void touchRegister() {
text_reg.setOnTouchListener(new View.OnTouchListener() {
private float x;
private float y;
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction()==MotionEvent.ACTION_DOWN){
text_reg.setTextColor(Color.parseColor("#ff6699"));
x = event.getX();
y = event.getY();
}else if(event.getAction()==MotionEvent.ACTION_UP) {
text_reg.setTextColor(Color.parseColor("#ffffff"));
if (event.getX() == x || event.getY() == y) {
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
startActivity(intent);
finish();
}
}
return true;
}
});
}
private void clickMain() {
button_reg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//获取手机号和密码
String mphone = edit_phone.getText().toString();
String mpass = edit_pass.getText().toString();
//进行判断
if (RegularUtil.isNull(mphone)){
Toast.makeText(LoginActivity.this, "手机号不能为空", Toast.LENGTH_SHORT).show();
return ;
}
if (RegularUtil.isNull(mphone)){
Toast.makeText(LoginActivity.this, "密码不能为空", Toast.LENGTH_SHORT).show();
return ;
}
if (!(RegularUtil.isPhone(mphone))){
Toast.makeText(LoginActivity.this, "手机格式错误", Toast.LENGTH_SHORT).show();
return ;
}
if (RegularUtil.isPass(mpass)){
Toast.makeText(LoginActivity.this, "密码不能少于6位", Toast.LENGTH_SHORT).show();
return;
}
//判断复选框是否选中
if (box_remember.isChecked()){
//记住密码的状态
edit.putString("phone",mphone);
edit.putString("pass",mpass);
edit.putBoolean("box_ischeck",true);
edit.commit();
}else{
//清除所有的状态
edit.clear();
edit.commit();
}
//发送网络请求
getUrl(mphone,mpass);
}
});
}
private void getUrl(String mphone, String mpass) {
Map<String,String> params = new HashMap<>();
params.put("phone",mphone);
params.put("pwd",mpass);
mIpresenterImpl.postRequestIpresenter(Apis.LOGIN_URL,params,LoginBean.class);
}
private void initPresenter() {
mIpresenterImpl=new IpresenterImpl(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
//解绑
mIpresenterImpl.deatch();
}
@Override
public void success(Object object) {
if (object instanceof LoginBean){
LoginBean loginBean= (LoginBean) object;
if(loginBean.getStatus().equals("0000")) {
LoginBean.ResultBean result = loginBean.getResult();
Log.i("TAG_ID",result.getUserId()+" "+result.getSessionId());
edit.putString("sessionId", result.getSessionId());
edit.putString("userId", result.getUserId()+"");
edit.commit();
//跳转到主界面进行商品展示
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
intent.putExtra("result", (Serializable) result);
startActivity(intent);
Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show();
finish();
}else{
Toast.makeText(this, loginBean.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
@Override
public void failure(String error) {
Toast.makeText(this, error, Toast.LENGTH_SHORT).show();
}
}
| [
"45376375+zwais@users.noreply.github.com"
] | 45376375+zwais@users.noreply.github.com |
604afcc7b08d778d5c6053898c6326ed8652f787 | 8c9a308be789c7b925282fb5fccb84735a875c33 | /src/test/java/com/ing/controller/StatementControllerTest.java | 23dba51d4fee424d894a2cb2411494c7c30abf6e | [] | no_license | awsasif8/Mortgage | dd8cef92a9daca8e7866c241eb08bde557c70a0a | 992e7d8d02a35c1a340ab0b46601767d71a7e8a6 | refs/heads/master | 2020-07-17T18:54:32.376671 | 2019-09-03T15:19:34 | 2019-09-03T15:19:34 | 206,076,861 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 964 | java | package com.ing.controller;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import com.ing.dto.StatementResponseDto;
import com.ing.service.StatementService;
@RunWith(MockitoJUnitRunner.class)
public class StatementControllerTest {
@Mock
StatementService statementService;
@InjectMocks
StatementController statementController;
@Test
public void getStatementsTest()
{StatementResponseDto dto=new StatementResponseDto();
dto.setStatusCode(200);
Mockito.when(statementService.getStatements("12345")).thenReturn(dto);
ResponseEntity response=statementController.getStatements("12345");
response.getBody();
assertEquals(dto.getStatusCode(),response.getStatusCodeValue());
}
}
| [
"User1@LP-5CD9176L7J.HCLT.CORP.HCL.IN"
] | User1@LP-5CD9176L7J.HCLT.CORP.HCL.IN |
61113f4d51afe604d3d06e2e65b49e74aa0dc10c | 4c4ad34d0a1d2d941b8502c7c2eae608bb64d703 | /Laba3/Lab3_a/Product.java | 2ddeff1ddc3c42e4a47967e2ad89f69c46e7c7b8 | [] | no_license | ZhukDI/java_repository | f51272ec1f4f3ce8022d80d1176e727dc5559956 | f671ef9d832d2c11cc0e7890ab7fb93974770daf | refs/heads/master | 2020-04-05T08:53:23.325299 | 2017-08-05T21:49:47 | 2017-08-05T21:49:47 | 81,748,185 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,443 | java | package product;
/**
* Created by Админ on 28.02.2017.
*
*
*/
public class Product {
private int id;
private String name;
private String UPC;
private String maker;
private double price;
private int shelfLife;
private int count;
Product(int id, String name, String UPC, String maker, double price, int shelfLife, int count) {
this.id = id;
this.name = name;
this.UPC = UPC;
this.maker = maker;
this.price = price;
this.shelfLife = shelfLife;
this.count = count;
}
public int getId() {
return id;
}
public String getName() {
return name;
}
public int getShelfLife() {
return shelfLife;
}
public double getPrice() {
return price;
}
public String getUPC() {
return UPC;
}
public String getMaker() {
return maker;
}
public int getCount() {
return count;
}
public void Show(){
System.out.println("Id: "+ id);
System.out.println("Наименование: " + name);
System.out.println("UPC: " + UPC);
System.out.println("Производитель: " + maker);
System.out.println("Цена: " + price + " рублей");
System.out.println("Срок хранения: " + shelfLife + " месяцев");
System.out.println("Количество " + count);
}
}
| [
"dima_zhuk98@mail.ru"
] | dima_zhuk98@mail.ru |
a5b2a7e8ccec44440c36f96d3579b60ab6630673 | a0e5b1e4ce5a20dfdba7477072012712d1175d09 | /src/Table/TableView.java | b59d7be242a69f50fdeb80aee42e17c541dcd904 | [] | no_license | TakmingMark/Taisin | 93004244fb84555273c6538a3dd92291929cf086 | 7789294502a41e1463ad87ab02356f7b19881032 | refs/heads/master | 2021-09-02T11:58:38.467436 | 2018-01-02T11:08:57 | 2018-01-02T11:08:57 | 113,396,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,110 | java | package Table;
import java.awt.Dimension;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import Component.MultiLineTableCellRenderer;
public class TableView extends JPanel{
JTable table;
MultiLineTableCellRenderer multiLineTableCellRenderer;
private TableView() {
initView();
}
public static TableView getViewObject() {
return new TableView();
}
private void initView() {
table=new JTable();
multiLineTableCellRenderer=new MultiLineTableCellRenderer();
table.setDefaultRenderer(String.class, multiLineTableCellRenderer);
table.setRowHeight(table.getRowHeight() * 3);
this.add(new JScrollPane(table));
autoScrolltableToBottom();
}
public void autoScrolltableToBottom()
{
table.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
int lastIndex =table.getRowCount()-1;
table.changeSelection(lastIndex, 0,false,false);
}
});
}
public void setTableModel(TableModel model) {
table.setModel(model);
table.setPreferredScrollableViewportSize(new Dimension(790, 370));
table.getColumnModel().getColumn(0).setPreferredWidth(80);
table.getColumnModel().getColumn(1).setPreferredWidth(80);
table.getColumnModel().getColumn(2).setPreferredWidth(120);
table.getColumnModel().getColumn(3).setPreferredWidth(150);
table.getColumnModel().getColumn(4).setPreferredWidth(300);
table.getColumnModel().getColumn(5).setPreferredWidth(400);
table.getColumnModel().getColumn(6).setPreferredWidth(150);
table.getColumnModel().getColumn(7).setPreferredWidth(80);
table.getColumnModel().getColumn(8).setPreferredWidth(80);
table.getColumnModel().getColumn(9).setPreferredWidth(80);
table.getColumnModel().getColumn(10).setPreferredWidth(80);
table.setFillsViewportHeight(true);
table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
}
public JTable getTable() {
return table;
}
}
| [
"nark29880420@gmail.com"
] | nark29880420@gmail.com |
f51be376a57bfdf964763be928ee6ff78e245901 | a9a71a16ac9ed1d1515e77b4ff823e9d98bc9ec0 | /src/br/edu/ifcvideira/DAOs/UsuarioDao.java | 4d5d78e3969c4f9841c7b3062c8b3126ffed8158 | [] | no_license | WelliRigo/gerenciador-de-cantina | 7a31eb0f5e8f43d98824a634e782cd31f34c4ab8 | 21bb75524753a2aa6454e7cea318c5676040fb9b | refs/heads/master | 2022-11-19T16:09:45.350063 | 2020-07-17T18:19:48 | 2020-07-17T18:19:48 | 257,076,308 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,370 | java | package br.edu.ifcvideira.DAOs;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
import br.edu.ifcvideira.beans.Usuario;
import br.edu.ifcvideira.utils.Conexao;
public class UsuarioDao {
public void CadastrarUsuario(Usuario us) throws SQLException, Exception{
try{
String sql = "INSERT INTO usuarios (nome_usuario, cpf_usuario, rg_usuario, telefone_usuario, celular_usuario, login_usuario, senha_usuario, data_cadastro_usuario) VALUES (?,?,?,?,?,?,?,?)";
java.sql.PreparedStatement sqlPrep = Conexao.conectar().prepareStatement(sql);
int contador = 1;
sqlPrep.setString(contador++, us.getNome());
sqlPrep.setString(contador++, us.getCpf());
sqlPrep.setString(contador++, us.getRgUs());
sqlPrep.setString(contador++, us.getTelefone());
sqlPrep.setString(contador++, us.getCelular());
sqlPrep.setString(contador++, us.getLoginUs());
sqlPrep.setString(contador++, us.getSenhaUs());
sqlPrep.setTimestamp(contador++, us.getDataCadastro());
sqlPrep.execute();
} catch(SQLException e) {
JOptionPane.showMessageDialog(null,e.getMessage());
} catch(Exception e) {
JOptionPane.showMessageDialog(null,e.getMessage());
}
}
public void AlterarUsuarioComSenha(Usuario us) throws Exception {
try{
String sql = "UPDATE usuarios SET nome_usuario=?, cpf_usuario=?, rg_usuario=?, telefone_usuario=?, celular_usuario=?, login_usuario=?, senha_usuario=? WHERE id_usuario=?";
PreparedStatement sqlPrep = Conexao.conectar().prepareStatement(sql);
int contador = 1;
sqlPrep.setString(contador++, us.getNome());
sqlPrep.setString(contador++, us.getCpf());
sqlPrep.setString(contador++, us.getRgUs());
sqlPrep.setString(contador++, us.getTelefone());
sqlPrep.setString(contador++, us.getCelular());
sqlPrep.setString(contador++, us.getLoginUs());
sqlPrep.setString(contador++, us.getSenhaUs());
sqlPrep.setInt(contador++, us.getIdUs());
sqlPrep.execute();
}catch(Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
public void AlterarUsuarioSemSenha(Usuario us) throws Exception {
try{
String sql = "UPDATE usuarios SET nome_usuario=?, cpf_usuario=?, rg_usuario=?, telefone_usuario=?, celular_usuario=?, login_usuario=? WHERE id_usuario=?";
PreparedStatement sqlPrep = Conexao.conectar().prepareStatement(sql);
int contador = 1;
sqlPrep.setString(contador++, us.getNome());
sqlPrep.setString(contador++, us.getCpf());
sqlPrep.setString(contador++, us.getRgUs());
sqlPrep.setString(contador++, us.getTelefone());
sqlPrep.setString(contador++, us.getCelular());
sqlPrep.setString(contador++, us.getLoginUs());
sqlPrep.setInt(contador++, us.getIdUs());
sqlPrep.execute();
}catch(Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
public void deletarUsuario(Usuario us) throws Exception{
try{
String sql = "DELETE FROM usuarios WHERE id_usuario=? ";
PreparedStatement sqlPrep = (PreparedStatement) Conexao.conectar().prepareStatement(sql);
sqlPrep.setInt(1, us.getIdUs());
sqlPrep.execute();
} catch (SQLException e){
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
public List<Object> buscarTodos() throws SQLException, Exception{
List<Object> usuario = new ArrayList<Object>();
try {
String sql = "SELECT * FROM usuarios";
java.sql.Statement state = Conexao.conectar().createStatement();
ResultSet rs = state.executeQuery(sql);
while (rs.next())
{
Object[] linha = {rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6), rs.getString(7), rs.getString(9)};
usuario.add(linha);
}
state.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
return usuario;
}
public int RetornarProximoCodigoUsuario() throws Exception {
try{
String sql ="SELECT MAX(id_usuario)+1 AS id_usuario FROM usuarios ";
PreparedStatement sqlPrep = Conexao.conectar().prepareStatement(sql);
ResultSet rs = sqlPrep.executeQuery();
if (rs.next()){
return rs.getInt("id_usuario");
}else{
return 1;
}
} catch(Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
return 1;
}
}
} | [
"welliton.rigo@grad.ufsc.br"
] | welliton.rigo@grad.ufsc.br |
4289cdefb40c02e0cb4e0a7a249c5de2431d8450 | 9ebd81eb315eff1b7f7072c25b515205a50b808a | /src/test/java/entity/TrainDriverTest.java | 669a5b2a18584e32a0b079146b35a3dbf12f0bb9 | [] | no_license | yarrou/homework_3 | 39f8cd5e5f7518c011ef7b80f3e2a233ddc83bfb | abdc576b28db832adcec720dddd588095569f51e | refs/heads/main | 2023-04-27T10:51:54.146645 | 2021-04-26T15:14:44 | 2021-04-26T15:14:44 | 357,970,698 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 408 | java | package entity;
import data.UserTestSamples;
import entity.people.TrainDriver;
import entity.people.User;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class TrainDriverTest {
@Test
void createInvalidDriver() {
User user = UserTestSamples.getValidChildren();
assertThrows(IllegalArgumentException.class, () -> new TrainDriver(user));
}
} | [
"konic2884@gmail.com"
] | konic2884@gmail.com |
931fe5dd043dcc3e7a996b682580b70ec11a2c26 | e15245c68ba4d24527d03d1d3b74847d5e984b4a | /src/com/company/CheckStringEndValues.java | 2a6349762b453ac6ecad3bcd28ed523ba7d22cda | [] | no_license | NabeelHaris/String-end-with | e76af6d62d3dfd2fdefa90010378cbe59eae6759 | 86d7eb017c9ccf12db45c97a5f307beee506b4da | refs/heads/master | 2020-05-15T04:22:00.673458 | 2019-04-18T13:10:28 | 2019-04-18T13:10:28 | 182,085,216 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 280 | java | package com.company;
public class CheckStringEndValues {
public boolean checkStringEndWithSecondString(String inputString, String endString){
if (inputString.endsWith(endString)){
return true;
}else {
return false;
}
}
}
| [
"nabeelharis95@gmail.com"
] | nabeelharis95@gmail.com |
d554f9fb5196fe53e609e1c6a3b8a5a48b39e762 | 4afb654c6667f5ed9c25ebcd7071993f7382269d | /src/main/java/com/website/eap/crawler/storage/HBaseHelper.java | d7e92ab07633328bbb296583b065c22f2f9b85b3 | [] | no_license | ddviplinux/eap | c164f39f2e8bab8e75fb3d4d604e19ed35512d23 | 4a5c75772cd862104f8a783a68ef4e5152bef7c6 | refs/heads/master | 2021-01-10T11:55:20.571452 | 2016-02-27T05:35:07 | 2016-02-27T05:35:07 | 52,651,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,341 | java | package com.website.eap.crawler.storage;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.*;
import org.apache.hadoop.hbase.util.Bytes;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* Used by the book examples to generate tables and fill them with test data.
*/
public class HBaseHelper implements Closeable {
private Configuration configuration = null;
private Connection connection = null;
private Admin admin = null;
protected HBaseHelper(Configuration configuration) throws IOException {
this.configuration = configuration;
this.connection = ConnectionFactory.createConnection(configuration);
this.admin = connection.getAdmin();
}
public static HBaseHelper getHelper(Configuration configuration) throws IOException {
return new HBaseHelper(configuration);
}
@Override
public void close() throws IOException {
connection.close();
}
public Connection getConnection() {
return connection;
}
public Configuration getConfiguration() {
return configuration;
}
public void createNamespace(String namespace) {
try {
NamespaceDescriptor nd = NamespaceDescriptor.create(namespace).build();
admin.createNamespace(nd);
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
public void dropNamespace(String namespace, boolean force) {
try {
if (force) {
TableName[] tableNames = admin.listTableNamesByNamespace(namespace);
for (TableName name : tableNames) {
admin.disableTable(name);
admin.deleteTable(name);
}
}
} catch (Exception e) {
// ignore
}
try {
admin.deleteNamespace(namespace);
} catch (IOException e) {
System.err.println("Error: " + e.getMessage());
}
}
public boolean existsTable(String table)
throws IOException {
return existsTable(TableName.valueOf(table));
}
public boolean existsTable(TableName table)
throws IOException {
return admin.tableExists(table);
}
public void createTable(String table, String... colfams)
throws IOException {
createTable(TableName.valueOf(table), 1, null, colfams);
}
public void createTable(TableName table, String... colfams)
throws IOException {
createTable(table, 1, null, colfams);
}
public void createTable(String table, int maxVersions, String... colfams)
throws IOException {
createTable(TableName.valueOf(table), maxVersions, null, colfams);
}
public void createTable(TableName table, int maxVersions, String... colfams)
throws IOException {
createTable(table, maxVersions, null, colfams);
}
public void createTable(String table, byte[][] splitKeys, String... colfams)
throws IOException {
createTable(TableName.valueOf(table), 1, splitKeys, colfams);
}
public void createTable(TableName table, int maxVersions, byte[][] splitKeys,
String... colfams)
throws IOException {
HTableDescriptor desc = new HTableDescriptor(table);
for (String cf : colfams) {
HColumnDescriptor coldef = new HColumnDescriptor(cf);
coldef.setMaxVersions(maxVersions);
desc.addFamily(coldef);
}
if (splitKeys != null) {
admin.createTable(desc, splitKeys);
} else {
admin.createTable(desc);
}
}
public void disableTable(String table) throws IOException {
disableTable(TableName.valueOf(table));
}
public void disableTable(TableName table) throws IOException {
admin.disableTable(table);
}
public void dropTable(String table) throws IOException {
dropTable(TableName.valueOf(table));
}
public void dropTable(TableName table) throws IOException {
if (existsTable(table)) {
if (admin.isTableEnabled(table)) disableTable(table);
admin.deleteTable(table);
}
}
public void fillTable(String table, int startRow, int endRow, int numCols,
String... colfams)
throws IOException {
fillTable(TableName.valueOf(table), startRow,endRow, numCols, colfams);
}
public void fillTable(TableName table, int startRow, int endRow, int numCols,
String... colfams)
throws IOException {
fillTable(table, startRow, endRow, numCols, -1, false, colfams);
}
public void fillTable(String table, int startRow, int endRow, int numCols,
boolean setTimestamp, String... colfams)
throws IOException {
fillTable(TableName.valueOf(table), startRow, endRow, numCols, -1,
setTimestamp, colfams);
}
public void fillTable(TableName table, int startRow, int endRow, int numCols,
boolean setTimestamp, String... colfams)
throws IOException {
fillTable(table, startRow, endRow, numCols, -1, setTimestamp, colfams);
}
public void fillTable(String table, int startRow, int endRow, int numCols,
int pad, boolean setTimestamp, String... colfams)
throws IOException {
fillTable(TableName.valueOf(table), startRow, endRow, numCols, pad,
setTimestamp, false, colfams);
}
public void fillTable(TableName table, int startRow, int endRow, int numCols,
int pad, boolean setTimestamp, String... colfams)
throws IOException {
fillTable(table, startRow, endRow, numCols, pad, setTimestamp, false,
colfams);
}
public void fillTable(String table, int startRow, int endRow, int numCols,
int pad, boolean setTimestamp, boolean random,
String... colfams)
throws IOException {
fillTable(TableName.valueOf(table), startRow, endRow, numCols, pad,
setTimestamp, random, colfams);
}
public void fillTable(TableName table, int startRow, int endRow, int numCols,
int pad, boolean setTimestamp, boolean random,
String... colfams)
throws IOException {
Table tbl = connection.getTable(table);
Random rnd = new Random();
for (int row = startRow; row <= endRow; row++) {
for (int col = 1; col <= numCols; col++) {
Put put = new Put(Bytes.toBytes("row-" + padNum(row, pad)));
for (String cf : colfams) {
String colName = "col-" + padNum(col, pad);
String val = "val-" + (random ?
Integer.toString(rnd.nextInt(numCols)) :
padNum(row, pad) + "." + padNum(col, pad));
if (setTimestamp) {
put.addColumn(Bytes.toBytes(cf), Bytes.toBytes(colName), col,
Bytes.toBytes(val));
} else {
put.addColumn(Bytes.toBytes(cf), Bytes.toBytes(colName),
Bytes.toBytes(val));
}
}
tbl.put(put);
}
}
tbl.close();
}
public void fillTableRandom(String table,
int minRow, int maxRow, int padRow,
int minCol, int maxCol, int padCol,
int minVal, int maxVal, int padVal,
boolean setTimestamp, String... colfams)
throws IOException {
fillTableRandom(TableName.valueOf(table), minRow, maxRow, padRow, minCol,
maxCol, padCol, minVal, maxVal, padVal, setTimestamp, colfams);
}
public void fillTableRandom(TableName table,
int minRow, int maxRow, int padRow,
int minCol, int maxCol, int padCol,
int minVal, int maxVal, int padVal,
boolean setTimestamp, String... colfams)
throws IOException {
Table tbl = connection.getTable(table);
Random rnd = new Random();
int maxRows = minRow + rnd.nextInt(maxRow - minRow);
for (int row = 0; row < maxRows; row++) {
int maxCols = minCol + rnd.nextInt(maxCol - minCol);
for (int col = 0; col < maxCols; col++) {
int rowNum = rnd.nextInt(maxRow - minRow + 1);
Put put = new Put(Bytes.toBytes("row-" + padNum(rowNum, padRow)));
for (String cf : colfams) {
int colNum = rnd.nextInt(maxCol - minCol + 1);
String colName = "col-" + padNum(colNum, padCol);
int valNum = rnd.nextInt(maxVal - minVal + 1);
String val = "val-" + padNum(valNum, padCol);
if (setTimestamp) {
put.addColumn(Bytes.toBytes(cf), Bytes.toBytes(colName), col,
Bytes.toBytes(val));
} else {
put.addColumn(Bytes.toBytes(cf), Bytes.toBytes(colName),
Bytes.toBytes(val));
}
}
tbl.put(put);
}
}
tbl.close();
}
public String padNum(int num, int pad) {
String res = Integer.toString(num);
if (pad > 0) {
while (res.length() < pad) {
res = "0" + res;
}
}
return res;
}
public void put(String table, String row, String fam, String qual,
String val) throws IOException {
put(TableName.valueOf(table), row, fam, qual, val);
}
public void put(TableName table, String row, String fam, String qual,
String val) throws IOException {
Table tbl = connection.getTable(table);
Put put = new Put(Bytes.toBytes(row));
put.addColumn(Bytes.toBytes(fam), Bytes.toBytes(qual), Bytes.toBytes(val));
tbl.put(put);
tbl.close();
}
public void put(String table, String row, String fam, String qual, long ts,
String val) throws IOException {
put(TableName.valueOf(table), row, fam, qual, ts, val);
}
public void put(TableName table, String row, String fam, String qual, long ts,
String val) throws IOException {
Table tbl = connection.getTable(table);
Put put = new Put(Bytes.toBytes(row));
put.addColumn(Bytes.toBytes(fam), Bytes.toBytes(qual), ts,
Bytes.toBytes(val));
tbl.put(put);
tbl.close();
}
public void put(String table, String[] rows, String[] fams, String[] quals,
long[] ts, String[] vals) throws IOException {
put(TableName.valueOf(table), rows, fams, quals, ts, vals);
}
public void put(TableName table, String[] rows, String[] fams, String[] quals,
long[] ts, String[] vals) throws IOException {
Table tbl = connection.getTable(table);
for (String row : rows) {
Put put = new Put(Bytes.toBytes(row));
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
System.out.println("Adding: " + row + " " + fam + " " + qual +
" " + t + " " + val);
put.addColumn(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
v++;
}
}
tbl.put(put);
}
tbl.close();
}
public void dump(String table, String[] rows, String[] fams, String[] quals)
throws IOException {
dump(TableName.valueOf(table), rows, fams, quals);
}
public void dump(TableName table, String[] rows, String[] fams, String[] quals)
throws IOException {
Table tbl = connection.getTable(table);
List<Get> gets = new ArrayList<Get>();
for (String row : rows) {
Get get = new Get(Bytes.toBytes(row));
get.setMaxVersions();
if (fams != null) {
for (String fam : fams) {
for (String qual : quals) {
get.addColumn(Bytes.toBytes(fam), Bytes.toBytes(qual));
}
}
}
gets.add(get);
}
Result[] results = tbl.get(gets);
for (Result result : results) {
for (Cell cell : result.rawCells()) {
System.out.println("Cell: " + cell +
", Value: " + Bytes.toString(cell.getValueArray(),
cell.getValueOffset(), cell.getValueLength()));
}
}
tbl.close();
}
public void dump(String table) throws IOException {
dump(TableName.valueOf(table));
}
public void dump(TableName table) throws IOException {
try (
Table t = connection.getTable(table);
ResultScanner scanner = t.getScanner(new Scan())
) {
for (Result result : scanner) {
dumpResult(result);
}
}
}
public void dumpResult(Result result) {
for (Cell cell : result.rawCells()) {
System.out.println("Cell: " + cell +
", Value: " + Bytes.toString(cell.getValueArray(),
cell.getValueOffset(), cell.getValueLength()));
}
}
}
| [
"zhizunbao@wacai.com"
] | zhizunbao@wacai.com |
320712447ee8cb1a26442b768b202869ba18aff0 | 57fa27775cb4adb66264e426bf88e7abbd557630 | /CV/ParagraphWithList.java | 7952616d7ace2a655b6039ac94c98f150c0fe3b5 | [] | no_license | koalabzium/Learning-java | 2a54513c03df1f6f37075d58c124c75eefd1e1d2 | 1167c5a13d04d667ede223f196b02b3cf1b67323 | refs/heads/master | 2021-10-08T15:03:33.465113 | 2018-12-13T21:28:51 | 2018-12-13T21:28:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 853 | java | import javax.xml.bind.annotation.XmlElement;
import java.io.PrintStream;
public class ParagraphWithList extends Paragraph{
//String title;
@XmlElement(name = "list")
UnorderedList items = new UnorderedList();
ParagraphWithList(String newtext) {
super(newtext);
}
public ParagraphWithList() {
super("");
}
ParagraphWithList setContent(String newtext)
{
this.text=newtext;
return this;
}
ParagraphWithList addListItem(String itemName)
{
ListItem i = new ListItem(itemName);
this.items.additem(itemName);
return this;
}
ParagraphWithList addListItem(ListItem i)
{
this.items.additem(i);
return this;
}
void writeHTML(PrintStream out)
{
super.writeHTML(out);
items.writeHTML(out);
}
}
| [
"owsiak@student.agh.edu.pl"
] | owsiak@student.agh.edu.pl |
41bca3fdae613c658708c1b6baebb00092580fe7 | 44308a812aadf60910509d94de39e8a511d6e91e | /app/src/main/java/android/renderscript/ScriptIntrinsicResize.java | 83185e48c72c419bf30de04f89a1350586af5544 | [] | no_license | longyinzaitian/Android27Source | 31e01e83bc891e3602484b91b7eab325a22747ce | 9b982c844adbfd54f92facb7e4caf46ee40e2692 | refs/heads/master | 2020-03-08T15:54:54.433791 | 2018-04-10T09:44:25 | 2018-04-10T09:44:25 | 128,224,765 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,654 | java | /*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 android.renderscript;
/**
* Intrinsic for performing a resize of a 2D allocation.
*/
public final class ScriptIntrinsicResize extends ScriptIntrinsic {
private Allocation mInput;
private ScriptIntrinsicResize(long id, RenderScript rs) {
super(id, rs);
}
/**
* Supported elements types are {@link Element#U8}, {@link
* Element#U8_2}, {@link Element#U8_3}, {@link Element#U8_4}
* {@link Element#F32}, {@link Element#F32_2}, {@link
* Element#F32_3}, {@link Element#F32_4}
*
* @param rs The RenderScript context
*
* @return ScriptIntrinsicResize
*/
public static ScriptIntrinsicResize create(RenderScript rs) {
long id = rs.nScriptIntrinsicCreate(12, 0);
ScriptIntrinsicResize si = new ScriptIntrinsicResize(id, rs);
return si;
}
/**
* Set the input of the resize.
* Must match the element type supplied during create.
*
* @param ain The input allocation.
*/
public void setInput(Allocation ain) {
Element e = ain.getElement();
if (!e.isCompatible(Element.U8(mRS)) &&
!e.isCompatible(Element.U8_2(mRS)) &&
!e.isCompatible(Element.U8_3(mRS)) &&
!e.isCompatible(Element.U8_4(mRS)) &&
!e.isCompatible(Element.F32(mRS)) &&
!e.isCompatible(Element.F32_2(mRS)) &&
!e.isCompatible(Element.F32_3(mRS)) &&
!e.isCompatible(Element.F32_4(mRS))) {
throw new RSIllegalArgumentException("Unsupported element type.");
}
mInput = ain;
setVar(0, ain);
}
/**
* Get a FieldID for the input field of this intrinsic.
*
* @return Script.FieldID The FieldID object.
*/
public FieldID getFieldID_Input() {
return createFieldID(0, null);
}
/**
* Resize copy the input allocation to the output specified. The
* Allocation is rescaled if necessary using bi-cubic
* interpolation.
*
* @param aout Output allocation. Element type must match
* current input. Must not be same as input.
*/
public void forEach_bicubic(Allocation aout) {
if (aout == mInput) {
throw new RSIllegalArgumentException("Output cannot be same as Input.");
}
forEach_bicubic(aout, null);
}
/**
* Resize copy the input allocation to the output specified. The
* Allocation is rescaled if necessary using bi-cubic
* interpolation.
*
* @param aout Output allocation. Element type must match
* current input.
* @param opt LaunchOptions for clipping
*/
public void forEach_bicubic(Allocation aout, LaunchOptions opt) {
forEach(0, (Allocation) null, aout, null, opt);
}
/**
* Get a KernelID for this intrinsic kernel.
*
* @return Script.KernelID The KernelID object.
*/
public KernelID getKernelID_bicubic() {
return createKernelID(0, 2, null, null);
}
}
| [
"1536132397@qq.com"
] | 1536132397@qq.com |
fdcc0e1c8aee07d4d4cfa289a79fa8285828c4f0 | b2fa66ec49f50b4bb92fee6494479238c8b46876 | /src/main/java/fi/riista/feature/permit/application/mammal/amount/MammalPermitApplicationSpeciesAmountFeature.java | 1f26121cba41bc43ccb1fb4625c0e864778facb8 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | suomenriistakeskus/oma-riista-web | f007a9dc663317956ae672ece96581f1704f0e85 | f3550bce98706dfe636232fb2765a44fa33f78ca | refs/heads/master | 2023-04-27T12:07:50.433720 | 2023-04-25T11:31:05 | 2023-04-25T11:31:05 | 77,215,968 | 16 | 4 | MIT | 2023-04-25T11:31:06 | 2016-12-23T09:49:44 | Java | UTF-8 | Java | false | false | 4,873 | java | package fi.riista.feature.permit.application.mammal.amount;
import fi.riista.feature.gamediary.GameSpecies;
import fi.riista.feature.gamediary.GameSpeciesService;
import fi.riista.feature.permit.application.HarvestPermitApplication;
import fi.riista.feature.permit.application.HarvestPermitApplicationAuthorizationService;
import fi.riista.feature.permit.application.HarvestPermitApplicationSpeciesAmount;
import fi.riista.feature.permit.application.HarvestPermitApplicationSpeciesAmountRepository;
import fi.riista.feature.permit.application.HarvestPermitApplicationSpeciesAmountUpdater;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Nonnull;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@Component
public class MammalPermitApplicationSpeciesAmountFeature {
@Resource
private GameSpeciesService gameSpeciesService;
@Resource
private HarvestPermitApplicationAuthorizationService harvestPermitApplicationAuthorizationService;
@Resource
private HarvestPermitApplicationSpeciesAmountRepository harvestPermitApplicationSpeciesAmountRepository;
@Transactional(readOnly = true)
public List<MammalPermitApplicationSpeciesAmountDTO> getSpeciesAmounts(final long applicationId) {
final HarvestPermitApplication application =
harvestPermitApplicationAuthorizationService.readApplication(applicationId);
return application.getSpeciesAmounts().stream()
.sorted(Comparator.comparing(HarvestPermitApplicationSpeciesAmount::getId))
.map(MammalPermitApplicationSpeciesAmountDTO::new)
.collect(Collectors.toList());
}
@Transactional
public void saveSpeciesAmounts(final long applicationId,
final List<MammalPermitApplicationSpeciesAmountDTO> dtoList) {
final HarvestPermitApplication application =
harvestPermitApplicationAuthorizationService.updateApplication(applicationId);
final List<HarvestPermitApplicationSpeciesAmount> existingSpecies =
harvestPermitApplicationSpeciesAmountRepository.findByHarvestPermitApplication(application);
validateSpecies(dtoList);
final Updater speciesUpdater = new Updater(existingSpecies, createCallback(application));
speciesUpdater.processAll(dtoList);
harvestPermitApplicationSpeciesAmountRepository.saveAll(speciesUpdater.getResultList());
harvestPermitApplicationSpeciesAmountRepository.deleteAll(speciesUpdater.getMissing());
}
private static void validateSpecies(final List<MammalPermitApplicationSpeciesAmountDTO> dtoList) {
if (dtoList.size() > 1) {
dtoList.stream()
.map(MammalPermitApplicationSpeciesAmountDTO::getGameSpeciesCode)
.filter(code -> GameSpecies.isLargeCarnivore(code) || code == GameSpecies.OFFICIAL_CODE_OTTER)
.findAny()
.ifPresent(code -> {
throw new IllegalArgumentException("Contains species which need to be applied " +
"separately:" + code);
}
);
}
}
@Nonnull
private UpdaterCallback createCallback(final HarvestPermitApplication application) {
return new UpdaterCallback() {
@Override
public HarvestPermitApplicationSpeciesAmount create(final MammalPermitApplicationSpeciesAmountDTO dto) {
final GameSpecies gameSpecies = gameSpeciesService.requireByOfficialCode(dto.getGameSpeciesCode());
return HarvestPermitApplicationSpeciesAmount.createForHarvest(application, gameSpecies, dto.getAmount());
}
@Override
public void update(final HarvestPermitApplicationSpeciesAmount entity,
final MammalPermitApplicationSpeciesAmountDTO dto) {
entity.setSpecimenAmount(dto.getAmount());
}
@Override
public int getSpeciesCode(final MammalPermitApplicationSpeciesAmountDTO dto) {
return dto.getGameSpeciesCode();
}
};
}
private static class Updater
extends HarvestPermitApplicationSpeciesAmountUpdater<MammalPermitApplicationSpeciesAmountDTO> {
Updater(final List<HarvestPermitApplicationSpeciesAmount> existingList,
final UpdaterCallback callback) {
super(existingList, callback);
}
}
private abstract static class UpdaterCallback
implements HarvestPermitApplicationSpeciesAmountUpdater.Callback<MammalPermitApplicationSpeciesAmountDTO> {
}
}
| [
"56720623+tleppikangas@users.noreply.github.com"
] | 56720623+tleppikangas@users.noreply.github.com |
30ede45e3a31c56abd557ab2cf79629dd0b5087c | e5cffb6d7da3e21be1e0e7d6172a3394ab62f98c | /joker-generator/src/main/java/com/eccard/joker/Joker.java | 2572d4cb20dfd9583945bf9f7434f80059d6e085 | [] | no_license | eccard/gradle-final-project | 703e353936642c84fc8dae95c4afbaefda4dd2e5 | a9095b3bc84fdc51e09d3cb347fb9047c761b131 | refs/heads/master | 2020-04-15T11:15:55.285883 | 2019-01-12T19:35:17 | 2019-01-12T19:49:38 | 164,622,748 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 149 | java | package com.eccard.joker;
public class Joker {
public String getJoker(){
return "What gets wetter the more it dries? A towel.";
}
}
| [
"feccard@muxi.com.br"
] | feccard@muxi.com.br |
fc5622538c19e62fa9d5ee57ef1756c5b849586c | d3ca0ca21ace3acc5d4a0a68f275b4fb4578c059 | /src/main/java/com/qr/blog/service/interfaces/TagService.java | a66c3ccd98423b04542a9f08d3b3f2492c53d92a | [] | no_license | QRGE/qr-box | 63299e794cf4c8519371d1ba20a9721f6c51bae0 | bd5e042017306c7ccd3482b61f2f73beef6f544f | refs/heads/master | 2023-07-05T03:33:52.063942 | 2021-08-22T15:01:24 | 2021-08-22T15:01:24 | 398,827,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package com.qr.blog.service.interfaces;
import com.qr.blog.pojo.Tag;
import com.qr.blog.pojo.vo.HotTagVo;
import java.util.List;
/**
* @Author: QR
* @Date: 2021/8/4-13:48
*/
public interface TagService {
/**
* 根据名称搜索分类
* @param name 搜索的分类名称
* @return 搜索结果集
*/
List<Tag> getByName(String name);
/**
* 根据 blogId 查询 tags
* @param blogId blogId
* @return 查询的 tags
*/
List<Tag> getByBlogId(Long blogId);
/**
* 获取热门标签
* @return 热门标签集合
*/
List<HotTagVo> getHotTags();
}
| [
"1826255833@qq.com"
] | 1826255833@qq.com |
ff2b506f141d46da04daf9e05481c2e1b2a8ccc0 | fcc71599a3b7a8c55d7888fee1a8f9f48b0d8aac | /src/modelos/Persona.java | 53661bf1c55ea41bcd8d19472cd70b2e8fcc320f | [] | no_license | GuilleVe09/Taller-Refactoring | a387dc805a6546a7eaba05bbb53bebf7ecaaacc8 | 048e49d040d36f6f2595c290fd020befb667907d | refs/heads/main | 2023-05-28T23:15:23.226137 | 2021-01-08T06:03:06 | 2021-01-08T06:03:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,187 | java | package modelos;
import java.util.List;
public class Persona {
protected String nombre;
protected String apellido;
protected int edad;
protected Direccion direccion;
protected Telefono telefono;
protected List<Paralelo> paralelos;
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getApellido() {
return apellido;
}
public void setApellido(String apellido) {
this.apellido = apellido;
}
public int getEdad() {
return edad;
}
public void setEdad(int edad) {
this.edad = edad;
}
public Direccion getDireccion() {
return direccion;
}
public void setDireccion(Direccion direccion) {
this.direccion = direccion;
}
public Telefono getTelefono() {
return telefono;
}
public void setTelefono(Telefono telefono) {
this.telefono = telefono;
}
public List<Paralelo> getParalelos() {
return paralelos;
}
public void setParalelos(List<Paralelo> paralelos) {
this.paralelos = paralelos;
}
}
| [
"ajvilleg@espol.edu.ec"
] | ajvilleg@espol.edu.ec |
eeed57f1d2d5610d72e33b21f49ce01f69cee94c | 488b7d4454c2034ec79490dd71abdf7277f015ab | /sample/src/main/java/com/danikula/videocache/sample/MultipleVideosActivity.java | 46d7f5b42609a73f157948dcd94dccbb703eac6c | [
"Apache-2.0"
] | permissive | metalurgus/AndroidVideoCache | ee292e5161660ad7c1738be5ff7353f6ce66f2c7 | 945fa4d08034136145fef0e088a6cacec36a83fe | refs/heads/master | 2021-01-21T07:54:12.738247 | 2016-07-22T08:03:56 | 2016-07-22T08:03:56 | 63,934,433 | 4 | 0 | null | 2016-07-22T07:47:52 | 2016-07-22T07:47:51 | null | UTF-8 | Java | false | false | 937 | java | package com.danikula.videocache.sample;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import org.androidannotations.annotations.EActivity;
@EActivity(R.layout.activity_multiple_videos)
public class MultipleVideosActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle state) {
super.onCreate(state);
if (state == null) {
addVideoFragment(Video.ORANGE_1, R.id.videoContainer0);
addVideoFragment(Video.ORANGE_2, R.id.videoContainer1);
addVideoFragment(Video.ORANGE_3, R.id.videoContainer2);
addVideoFragment(Video.ORANGE_4, R.id.videoContainer3);
}
}
private void addVideoFragment(Video video, int containerViewId) {
getSupportFragmentManager()
.beginTransaction()
.add(containerViewId, VideoFragment.build(this, video))
.commit();
}
}
| [
"danikula@gmail.com"
] | danikula@gmail.com |
cbbfbb78800b9c0654264b2881e71da9102ae80c | 1ea83c6b176ad0b5c8d6f43bb9e942a90b0729bb | /app/src/main/java/com/howell/action/PlatformAction.java | 116834f6e839dc10226be8c0ff3a47cce3377d7a | [] | no_license | Bjelijah/EcamH265AS | bd2e61567f274b58d01d3ce2a3dbe715e006f4b7 | 85fff49782554d611ff575c062afd3f1f7600156 | refs/heads/master | 2021-01-12T14:45:57.533948 | 2017-08-21T06:29:56 | 2017-08-21T06:29:56 | 72,078,807 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 4,623 | java | package com.howell.action;
import android.os.AsyncTask;
import android.os.Handler;
import android.util.Log;
import com.howell.entityclass.Device;
import com.howell.entityclass.NodeDetails;
import com.howell.protocol.GetNATServerReq;
import com.howell.protocol.GetNATServerRes;
import com.howell.protocol.LoginRequest;
import com.howell.protocol.LoginResponse;
import com.howell.protocol.SoapManager;
import com.howell.utils.DecodeUtils;
import com.howell.utils.IConst;
import java.util.List;
public class PlatformAction implements IConst{
private static PlatformAction mInstance = null;
private PlatformAction() { }
public static PlatformAction getInstance(){
if(mInstance == null){
mInstance = new PlatformAction();
}
return mInstance;
}
SoapManager mSoapManager = SoapManager.getInstance();
private String turnServerIp = null;
private int turnServerPort = -1;
private String device_id = null;
private String deviceID = null;
private String account = null;
private String password= null;
private boolean isTest = false;//是用100868账号登入试用e看
private NodeDetails curSelNode= null;
List<Device> deviceList = null;
public boolean isTest(){
return isTest;
}
public void setIsTest(boolean isTest){
this.isTest = isTest;
}
public void setCurSelNode(NodeDetails node){
this.curSelNode = node;
}
public NodeDetails getCurSelNode(){
return curSelNode;
}
public void setDeviceID(String deviceID){
Log.e("123","~~~~~~~~ PlatformAction set dev id="+deviceID);
this.deviceID = deviceID;
}
public String getDeviceID(){
return this.deviceID;
}
public List<Device> getDeviceList() {
return deviceList;
}
public void setDeviceList(List<Device> deviceList) {
this.deviceList = deviceList;
}
public String getDevice_id() {
return device_id;
}
public String getDevice_id(int index){
if(deviceList==null)return null;
if(index>deviceList.size())return null;
return deviceList.get(index).getDeviceID();
}
public void setDevice_id(String device_id) {
this.device_id = device_id;
}
public void setDevice_id(int index){
if(deviceList==null)return;
if(index>deviceList.size())return;
this.device_id = deviceList.get(index).getDeviceID();
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getDeviceId(){
// return device_id;
return this.deviceID;
}
public String getCurSelDeviceId(){
return getDeviceId();
}
public void setCurSelDeviceId(String deviceId){
setDevice_id(deviceId);
}
public void setTurnServerIP(String turnServerIp){
// Log.i("123","~~~~~~turnServerIP="+turnServerIp);
this.turnServerIp = turnServerIp;
}
public String getTurnServerIP(){
return this.turnServerIp;
}
public void setTurnServerPort(int turnServerPort){
// Log.i("123","~~~~~turnServerPort="+turnServerPort);
this.turnServerPort = turnServerPort;
}
public int getTurnServerPort(){
return turnServerPort;
}
Handler handler;
public void setHandler(Handler handler){
this.handler = handler;
}
/**
* @Deprecated H265 Turn SSL never used
*
*
*/
@Deprecated
public void loginPlatform(){
new AsyncTask<Void, Void, Boolean>() {
@Override
protected Boolean doInBackground(Void... params) {
String encodedPassword = DecodeUtils.getEncodedPassword(TEST_PASSWORD);
// String imei = PhoneConfig.getPhoneDeveceID(PlatformAction.this);
LoginRequest loginReq = new LoginRequest(TEST_ACCOUNT, "Common",encodedPassword, "1.0.0.1",null);
LoginResponse loginRes = mSoapManager.getUserLoginRes(loginReq);
if(loginRes.getResult().equals("OK")){
List<Device> list = loginRes.getNodeList();
if(!list.isEmpty()){
device_id = list.get(0).getDeviceID();
}else{
device_id = null;
}
GetNATServerRes res = mSoapManager.getGetNATServerRes(new GetNATServerReq(TEST_ACCOUNT, loginRes.getLoginSession()));
Log.i("123", res.toString());
if(res.getResult().equals("OK")){
turnServerIp = res.getTURNServerAddress();
turnServerPort = res.getTURNServerPort();
}else{
turnServerIp = null;
turnServerPort = -1;
}
return true;
}else{
return false;
}
}
protected void onPostExecute(Boolean result) {
if(result){
handler.sendEmptyMessage(MSG_LOGIN_OK);
}else{
handler.sendEmptyMessage(MSG_LOGIN_FAIL);
}
};
}.execute();
}
}
| [
"elijah@live.cn"
] | elijah@live.cn |
87db2d05b912c2ede9eea1c4e26d99e64987fbd4 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/no_seeding/88_jopenchart-de.progra.charting.render.InterpolationChartRenderer-1.0-2/de/progra/charting/render/InterpolationChartRenderer_ESTest_scaffolding.java | 7529ab8f9c5927303a51d9603066a5542527b268 | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 558 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 15:05:31 GMT 2019
*/
package de.progra.charting.render;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class InterpolationChartRenderer_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
99f468bfdfe80f949e12c53b08b5a2550f9947cd | 7b451e69f5e3e5a3bc1247f71a6b4866950ce7f6 | /app/src/main/java/com/example/management/net/okhttp/callback/StringCallback.java | e458355d923495c888029a15879db4324f22b32d | [] | no_license | wangminjianjy/Management | b8602c1913c9729d80ec1186beafef7e72fcd463 | 77b65a1c949dea84924d0d57c831ef5396fcceb1 | refs/heads/master | 2023-06-15T06:53:53.703433 | 2021-07-12T09:41:36 | 2021-07-12T09:41:36 | 383,725,919 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 488 | java | package com.example.management.net.okhttp.callback;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;
/**
* Created by dzl on 2017/3/29.
*/
public interface StringCallback extends BaseCallBack {
void onStart(Request request);
void onResponse(Call call, Response response, String text);
void onResponseError(Call call, Response response, IOException e);
void onFailure(Call call, Request request, IOException e);
}
| [
"wangminjianjy"
] | wangminjianjy |
3c22e29edf8adf11742cea6f3fb9768f0ce2d8f4 | a2e06e57dcdfacd52b74547ebf68e985e0036fe0 | /platform/com.subgraph.vega.ui.tags/src/com/subgraph/vega/ui/tags/taggableeditor/TaggableEditorDialog.java | 72fdeb2a1625762f92cee6a7ed7f71e686f5fbff | [] | no_license | subgraph/Vega | 2804f5b3ccccdab4ab4edda551f3c643a24c4b2e | c732de3d3fe5be83a27ee1838d9aeb8132b1f9e2 | refs/heads/develop | 2023-08-07T09:17:31.887919 | 2016-06-29T21:12:23 | 2016-06-29T21:12:23 | 941,687 | 321 | 109 | null | 2021-02-23T18:00:14 | 2010-09-27T04:17:48 | Java | UTF-8 | Java | false | false | 15,775 | java | /*******************************************************************************
* Copyright (c) 2011 Subgraph.
* 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:
* Subgraph - initial API and implementation
******************************************************************************/
package com.subgraph.vega.ui.tags.taggableeditor;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.preference.ColorSelector;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.subgraph.vega.api.events.IEvent;
import com.subgraph.vega.api.events.IEventHandler;
import com.subgraph.vega.api.model.IWorkspace;
import com.subgraph.vega.api.model.WorkspaceCloseEvent;
import com.subgraph.vega.api.model.WorkspaceOpenEvent;
import com.subgraph.vega.api.model.WorkspaceResetEvent;
import com.subgraph.vega.api.model.tags.ITag;
import com.subgraph.vega.api.model.tags.ITagModel;
import com.subgraph.vega.api.model.tags.ITaggable;
import com.subgraph.vega.internal.ui.tags.taggableeditor.TagModifier;
import com.subgraph.vega.internal.ui.tags.taggableeditor.TagTableCheckStateManager;
import com.subgraph.vega.internal.ui.tags.taggableeditor.TagTableContentProvider;
import com.subgraph.vega.internal.ui.tags.taggableeditor.TagTableLabelProvider;
import com.subgraph.vega.internal.ui.tags.taggableeditor.TagTableSearchFilter;
import com.subgraph.vega.ui.tags.Activator;
import com.subgraph.vega.ui.tags.tageditor.TagEditorDialog;
import com.subgraph.vega.ui.tagsl.taggablepopup.ITagModifierValidator;
public class TaggableEditorDialog extends TitleAreaDialog implements ITagModifierValidator {
protected static final String IStructuredSelection = null;
private final ITaggable taggable;
private ITagModel tagModel;
private IEventHandler workspaceListener;
private ArrayList<TagModifier> tagList = new ArrayList<TagModifier>();
private TagModifier tagSelected;
private Composite parentComposite;
private Text tagFilterText;
private CheckboxTableViewer tagTableViewer;
private TagTableCheckStateManager checkStateManager;
private TagTableSearchFilter tagTableSearchFilter;
private Button createButton;
private Button editButton;
private Text tagNameText;
private Text tagDescText;
private ColorSelector nameColorSelector;
private ColorSelector rowColorSelector;
static public TaggableEditorDialog createDialog(Shell parentShell, ITaggable taggable) {
final TaggableEditorDialog dialog = new TaggableEditorDialog(parentShell, taggable);
dialog.initialize();
dialog.create();
dialog.getShell().addListener(SWT.Traverse, new Listener() {
public void handleEvent(Event e) {
if (e.detail == SWT.TRAVERSE_ESCAPE) {
e.doit = false;
}
}
});
return dialog;
}
private TaggableEditorDialog(Shell parentShell, ITaggable taggable) {
super(parentShell);
this.taggable = taggable;
workspaceListener = new IEventHandler() {
@Override
public void handleEvent(IEvent event) {
if (event instanceof WorkspaceOpenEvent) {
handleWorkspaceOpen((WorkspaceOpenEvent) event);
} else if (event instanceof WorkspaceCloseEvent) {
handleWorkspaceClose((WorkspaceCloseEvent) event);
} else if (event instanceof WorkspaceResetEvent) {
handleWorkspaceReset((WorkspaceResetEvent) event);
}
}
};
checkStateManager = new TagTableCheckStateManager();
tagTableSearchFilter = new TagTableSearchFilter();
}
private void initialize() {
IWorkspace currentWorkspace = Activator.getDefault().getModel().addWorkspaceListener(workspaceListener);
tagModel = currentWorkspace.getTagModel();
}
private void handleWorkspaceOpen(WorkspaceOpenEvent event) {
tagModel = event.getWorkspace().getTagModel();
}
private void handleWorkspaceClose(WorkspaceCloseEvent event) {
// REVISIT this is really bad. pop up a warning and exit?
tagModel = null;
}
private void handleWorkspaceReset(WorkspaceResetEvent event) {
tagModel = event.getWorkspace().getTagModel();
}
@Override
public void create() {
super.create();
setTitle("Select Tags");
setMessage("Tags can be used to signify a result as noteworthy and to simplify searching for it. Select " +
"which tags apply to this result.");
}
@Override
protected Control createDialogArea(Composite parent) {
final Composite dialogArea = (Composite) super.createDialogArea(parent);
parentComposite = new Composite(dialogArea, SWT.NULL);
parentComposite.setLayout(new GridLayout(1, false));
parentComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
createTagsArea(parentComposite).setLayoutData(new GridData(GridData.FILL_BOTH));
createTagInfoArea(parentComposite).setLayoutData(new GridData(GridData.FILL_BOTH));
for (ITag tag: tagModel.getAllTags()) {
TagModifier tagModifier = new TagModifier(tag);
tagList.add(tagModifier);
for (ITag tagged: taggable.getAllTags()) {
if (tagModifier.getTagOrig() == tagged) {
checkStateManager.addChecked(tagModifier);
break;
}
}
}
tagTableViewer.setInput(tagList);
setTagSelected(null);
return dialogArea;
}
@Override
protected void okPressed() {
for (TagModifier tagModifier: tagList) {
if (tagModifier.isModified()) {
tagModifier.store(tagModel);
}
}
List<TagModifier> checked = checkStateManager.getCheckedList();
ArrayList<ITag> checkedList = new ArrayList<ITag>(checked.size());
for (Object tagModifier: checked) {
checkedList.add(((TagModifier) tagModifier).getTagOrig());
}
taggable.setTags(checkedList);
super.okPressed();
}
@Override
protected void cancelPressed() {
int tagModifiedCnt = 0;
for (TagModifier tagModifier: tagList) {
if (tagModifier.isModified()) {
tagModifiedCnt++;
}
}
if (tagModifiedCnt != 0) {
if (confirmLoseTagModifications(tagModifiedCnt) == false) {
return;
}
}
super.cancelPressed();
}
@Override
public boolean close() {
if (workspaceListener != null) {
Activator.getDefault().getModel().removeWorkspaceListener(workspaceListener);
workspaceListener = null;
}
return super.close();
}
private GridLayout createGaplessGridLayout(int numColumns, boolean makeColumnsEqualWidth) {
final GridLayout layout = new GridLayout(numColumns, makeColumnsEqualWidth);
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.marginLeft = 0;
layout.marginTop = 0;
layout.marginRight = 0;
layout.marginBottom = 0;
return layout;
}
private Control createTagsArea(Composite parent) {
final Group rootControl = new Group(parent, SWT.NONE);
rootControl.setLayout(new GridLayout(1, false));
rootControl.setText("Available Tags");
tagFilterText = new Text(rootControl, SWT.SEARCH);
tagFilterText.setLayoutData(new GridData(GridData.FILL_BOTH));
tagFilterText.setMessage("type filter text");
tagFilterText.addModifyListener(createTagFilterModifyListener());
GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
final Control tagTableControl = createTagTable(rootControl, gd, 7);
tagTableControl.setLayoutData(gd);
createTagAreaButtonsControl(rootControl).setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1));
return rootControl;
}
private ModifyListener createTagFilterModifyListener() {
return new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
final String matchFilter = tagFilterText.getText();
if (!matchFilter.isEmpty()) {
tagTableSearchFilter.setMatchFilter(matchFilter);
} else {
tagTableSearchFilter.setMatchFilter(null);
}
tagTableViewer.refresh();
}
};
}
private Control createTagTable(Composite parent, GridData gd, int heightInRows) {
tagTableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER);
tagTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
tagTableViewer.setLabelProvider(new TagTableLabelProvider());
tagTableViewer.setContentProvider(new TagTableContentProvider());
tagTableViewer.addSelectionChangedListener(createSelectionChangedListener());
tagTableViewer.setCheckStateProvider(checkStateManager);
tagTableViewer.addCheckStateListener(checkStateManager);
tagTableViewer.addFilter(tagTableSearchFilter);
gd.heightHint = tagTableViewer.getTable().getItemHeight() * heightInRows;
return tagTableViewer.getTable();
}
private ISelectionChangedListener createSelectionChangedListener() {
return new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
boolean isEmpty = event.getSelection().isEmpty();
editButton.setEnabled(!isEmpty);
if (isEmpty == false) {
final TagModifier tagModifier = (TagModifier)((IStructuredSelection) event.getSelection()).getFirstElement();
setTagSelected(tagModifier);
}
}
};
}
private Composite createTagAreaButtonsControl(Composite parent) {
final Composite rootControl = new Composite(parent, SWT.NONE);
rootControl.setLayout(new GridLayout(2, false));
createButton = new Button(rootControl, SWT.PUSH);
createButton.setText("Create");
createButton.addSelectionListener(createSelectionListenerCreateButton());
editButton = new Button(rootControl, SWT.PUSH);
editButton.setText("Edit");
editButton.addSelectionListener(createSelectionListenerEditButton());
editButton.setEnabled(false);
return rootControl;
}
private SelectionListener createSelectionListenerCreateButton() {
return new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
TagModifier tag = new TagModifier(tagModel.createTag());
TagEditorDialog dialog = TagEditorDialog.createDialog(getShell(), tag, TaggableEditorDialog.this);
if (dialog.open() == IDialogConstants.OK_ID) {
tagList.add(tag);
tagTableViewer.refresh();
tagTableViewer.setSelection(new StructuredSelection(tag));
setTagSelected(tag);
}
}
};
}
private SelectionListener createSelectionListenerEditButton() {
return new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
final TagModifier tag = (TagModifier)((IStructuredSelection) tagTableViewer.getSelection()).getFirstElement();
if (tag != null) {
TagEditorDialog dialog = TagEditorDialog.createDialog(getShell(), tag, TaggableEditorDialog.this);
if (dialog.open() == IDialogConstants.OK_ID) {
tagTableViewer.refresh();
setTagSelected(tag);
}
}
}
};
}
private Group createTagInfoArea(Composite parent) {
final Group rootControl = new Group(parent, SWT.NONE);
rootControl.setLayout(new GridLayout(1, false));
rootControl.setText("Tag Information");
createTagInfoNameControl(rootControl).setLayoutData(new GridData(GridData.FILL_BOTH));
createTagInfoDescControl(rootControl).setLayoutData(new GridData(GridData.FILL_BOTH));
createTagInfoColorControl(rootControl).setLayoutData(new GridData(GridData.FILL_BOTH));
return rootControl;
}
private Composite createTagInfoNameControl(Composite parent) {
final Composite rootControl = new Composite(parent, SWT.NONE);
rootControl.setLayout(createGaplessGridLayout(2, false));
final Label label = new Label(rootControl, SWT.NONE);
label.setText("Name:");
label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
tagNameText = new Text(rootControl, SWT.BORDER | SWT.SINGLE);
tagNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
tagNameText.setEnabled(false);
return rootControl;
}
private Composite createTagInfoDescControl(Composite parent) {
final Composite rootControl = new Composite(parent, SWT.NONE);
rootControl.setLayout(createGaplessGridLayout(1, false));
final Label label = new Label(rootControl, SWT.NONE);
label.setText("Description:");
tagDescText = new Text(rootControl, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
final FontMetrics tagDescTextFm = new GC(tagDescText).getFontMetrics();
GridData tagDescTextGd = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
tagDescTextGd.heightHint = tagDescTextFm.getHeight() * 5;
tagDescText.setLayoutData(tagDescTextGd);
tagDescText.setEditable(false);
return rootControl;
}
private Composite createTagInfoColorControl(Composite parent) {
final Composite rootControl = new Composite(parent, SWT.NONE);
rootControl.setLayout(createGaplessGridLayout(2, false));
Label label = new Label(rootControl, SWT.NONE);
label.setText("Name color:");
nameColorSelector = new ColorSelector(rootControl);
nameColorSelector.setColorValue(new RGB(0, 0, 0));
nameColorSelector.setEnabled(false);
label = new Label(rootControl, SWT.NONE);
label.setText("Row background color:");
rowColorSelector = new ColorSelector(rootControl);
rowColorSelector.setColorValue(new RGB(255, 255, 255));
rowColorSelector.setEnabled(false);
return rootControl;
}
private RGB tagColorToRgb(int color) {
return new RGB((color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
}
private void setTagSelected(TagModifier tag) {
this.tagSelected = tag;
if (tag != null) {
tagNameText.setText(tag.getName());
if (tag.getDescription() != null) {
tagDescText.setText(tag.getDescription());
} else {
tagDescText.setText("");
}
nameColorSelector.setColorValue(tagColorToRgb(tag.getNameColor()));
rowColorSelector.setColorValue(tagColorToRgb(tag.getRowColor()));
} else {
tagNameText.setText("");
tagDescText.setText("");
nameColorSelector.setColorValue(new RGB(0, 0, 0));
rowColorSelector.setColorValue(new RGB(255, 255, 255));
}
}
private boolean confirmLoseTagModifications(int cnt) {
MessageBox messageDialog = new MessageBox(getShell(), SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
messageDialog.setText("Warning");
messageDialog.setMessage(cnt + " tags were modified. Proceed without saving?");
if (messageDialog.open() == SWT.CANCEL) {
return false;
} else {
return true;
}
}
@Override
public String validate(TagModifier modifier) {
final String name = modifier.getName();
if (name.isEmpty()) {
return "Tag name cannot be empty";
}
for (TagModifier tagModifier: tagList) {
if (tagModifier != modifier && tagModifier.getName().equalsIgnoreCase(name)) {
return "A tag of that name already exists";
}
}
return null;
}
}
| [
"cairnsc@subgraph.com"
] | cairnsc@subgraph.com |
632ce42911b488350c80812e75839d27adf87b1d | a04e7fa78a8087987c09816968793b97d4f788da | /hw16-0036493852-2/src/main/java/hr/fer/zemris/java/hw16/jvdraw/colors/JColorArea.java | 500a44fecbd92f226d5bdee031090467f041388b | [] | no_license | frankocar/OPJJ-FER | cb348888ac2aef33e7e136f342c543f5cdbd6374 | 5ee357a0bd543f94715d07b33aa4e72bab30f419 | refs/heads/master | 2021-05-07T07:21:42.962121 | 2017-11-01T10:53:12 | 2017-11-01T10:53:12 | 109,117,554 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,669 | java | package hr.fer.zemris.java.hw16.jvdraw.colors;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.LinkedList;
import java.util.List;
import javax.swing.JColorChooser;
import javax.swing.JComponent;
/**
* A component that shows a {@link JColorChooser} on a click and shows a currently
* selected color as its representation. Also is an implementation of {@link IColorProvider}
* interface.
*
* @author Franko Car
*
*/
public class JColorArea extends JComponent implements IColorProvider {
/** */
private static final long serialVersionUID = 1L;
/**
* Currently selected colors
*/
private Color selectedColor;
/**
* List of listeners
*/
private List<ColorChangeListener> listeners;
/**
* A constructor
*
* @param selectedColor initial color
*/
public JColorArea(Color selectedColor) {
this.selectedColor = selectedColor;
setBackground(selectedColor);
setOpaque(true);
setPreferredSize(new Dimension(15, 15));
setMaximumSize(new Dimension(15, 15));
setMinimumSize(new Dimension(15, 15));
setBackground(selectedColor);
addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
Color userColor = JColorChooser.showDialog(JColorArea.this.getParent(), "Choose a color", selectedColor);
if (userColor != null) {
setColor(userColor);
}
}
});
repaint();
}
/**
* Set a new color
*
* @param newColor new color
*/
public void setColor(Color newColor) {
if (newColor == null) {
throw new IllegalArgumentException("Color can't be null");
}
Color oldColor = selectedColor;
this.selectedColor = newColor;
setBackground(selectedColor);
repaint();
if (listeners != null && !listeners.isEmpty()) {
List<ColorChangeListener> iterable = new LinkedList<>(listeners);
for (ColorChangeListener listener : iterable) {
listener.newColorSelected(this, oldColor, selectedColor);
}
}
}
@Override
public Dimension getPreferredSize() {
return new Dimension(15, 15);
}
@Override
public Color getCurrentColor() {
return selectedColor;
}
@Override
public void addColorChangeListener(ColorChangeListener l) {
if (listeners == null) {
listeners = new LinkedList<>();
}
listeners.add(l);
}
@Override
public void removeColorChangeListener(ColorChangeListener l) {
if (listeners == null) {
return;
}
listeners.remove(l);
}
@Override
protected void paintComponent(Graphics g) {
g.setColor(selectedColor);
g.fillRect(0, 0, getWidth(), getHeight());
}
}
| [
"franko.car@fer.hr"
] | franko.car@fer.hr |
0f2906490d3cea8a377f2ffef74bdab3dd114872 | c3dd131751d5d94a60a3026120624638566c9dcb | /app/src/main/java/com/example/miwok/WordAdapter.java | 845c01ad8bf58e2c497bb45174b67968448444d2 | [] | no_license | systemry420/android-lang-app | 6a538e5014a7d768c3f9f7c4fa841b8a77b5ff70 | cb6024b2caf356149f760e42465d65bf42fba94b | refs/heads/master | 2023-04-04T00:29:24.394579 | 2021-04-11T18:56:45 | 2021-04-11T18:56:45 | 354,821,721 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,103 | java | package com.example.miwok;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.ArrayList;
public class WordAdapter extends ArrayAdapter<Word> {
public WordAdapter(Activity context, ArrayList<Word> words) {
super(context, 0, words);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View listItemView = convertView;
if(listItemView == null) {
listItemView = LayoutInflater.from(getContext()).inflate(
R.layout.listitem, parent, false);
}
// Get the {@link AndroidFlavor} object located at this position in the list
Word currentWord = getItem(position);
// Find the TextView in the list_item.xml layout with the ID version_name
TextView miwokTextView = listItemView.findViewById(R.id.miwok_text_view);
// Get the version name from the current AndroidFlavor object and
// set this text on the name TextView
miwokTextView.setText(currentWord.getmMiwokWord());
// Find the TextView in the list_item.xml layout with the ID version_number
TextView englishTextView = listItemView.findViewById(R.id.english_text_view);
// Get the version number from the current AndroidFlavor object and
// set this text on the number TextView
englishTextView.setText(currentWord.getDefaultWord());
ImageView image = listItemView.findViewById(R.id.image);
if(currentWord.hasImage()) {
image.setImageResource(currentWord.getnImageResID());
} else {
image.setVisibility(View.GONE);
}
// Return the whole list item layout (containing 2 TextViews and an ImageView)
// so that it can be shown in the ListView
return listItemView;
}
}
| [
"systemry420@gmail.com"
] | systemry420@gmail.com |
6b0d49c2d35dc6076a71c81521d9d73f549fdf8e | 79a33795eed2bbf921e426fdaaf285ed4a38a68f | /前30/xianjinxia/app/src/main/java/com/example/apple/xianjinxia/dao/Bills.java | 37100e84ae82172f05ba92fdb1b141c037be3d39 | [] | no_license | bluelzx/miaobaitiao | d809c6cf778852998513f0ae73624567d0798ca1 | b8be0d5256cb029fef8784069dae7704bb16ad85 | refs/heads/master | 2021-01-20T01:51:21.518301 | 2017-04-20T02:53:42 | 2017-04-20T02:53:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,041 | java | package com.example.apple.xianjinxia.dao;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table e_bills.
*/
public class Bills {
private Long b_id;
private Long b_pid;
private String b_add_date;
private String b_name;
private String b_type;
private String b_num;
private String b_all;
private String b_describ;
public Bills() {
}
public Bills(Long b_id) {
this.b_id = b_id;
}
public Bills(Long b_id, Long b_pid, String b_add_date, String b_name, String b_type, String b_num, String b_all, String b_describ) {
this.b_id = b_id;
this.b_pid = b_pid;
this.b_add_date = b_add_date;
this.b_name = b_name;
this.b_type = b_type;
this.b_num = b_num;
this.b_all = b_all;
this.b_describ = b_describ;
}
public Long getB_id() {
return b_id;
}
public void setB_id(Long b_id) {
this.b_id = b_id;
}
public Long getB_pid() {
return b_pid;
}
public void setB_pid(Long b_pid) {
this.b_pid = b_pid;
}
public String getB_add_date() {
return b_add_date;
}
public void setB_add_date(String b_add_date) {
this.b_add_date = b_add_date;
}
public String getB_name() {
return b_name;
}
public void setB_name(String b_name) {
this.b_name = b_name;
}
public String getB_type() {
return b_type;
}
public void setB_type(String b_type) {
this.b_type = b_type;
}
public String getB_num() {
return b_num;
}
public void setB_num(String b_num) {
this.b_num = b_num;
}
public String getB_all() {
return b_all;
}
public void setB_all(String b_all) {
this.b_all = b_all;
}
public String getB_describ() {
return b_describ;
}
public void setB_describ(String b_describ) {
this.b_describ = b_describ;
}
}
| [
"mexicande@hotmail.com"
] | mexicande@hotmail.com |
2d8bc36e8ad6a7d76b013cea78d763bee9474a5a | 349728f8777d48b4414dc47eed3057e22e3bcf0b | /sym/main/src/main/java/com/selectyour/gwtclient/component/master/stage/SelectHandler.java | 9f58881ea6792a40634469b37c744b0f80217868 | [] | no_license | gadgetfan/examples | 91584294f3144b0204b9f6d930a0f8b1fe84e009 | 7c2a5d6a8749d2e7c12fb63b3e661f5503a75c82 | refs/heads/master | 2016-09-05T09:13:07.185380 | 2014-11-09T11:24:38 | 2014-11-09T11:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 209 | java | package com.selectyour.gwtclient.component.master.stage;
/**
* event, that occurs, after client chooses some variant on this stage
*/
public interface SelectHandler {
void onSelect(Long[] selectIds);
}
| [
"for-dm@yandex.ru"
] | for-dm@yandex.ru |
824a14ff3ec5e78db0c2bc6688714422ce3fbe56 | d1502cfbd5becf7a1ad441f5990ebc80ac207055 | /src/test/java/listners/TestNGListners.java | 06c8bf484f4834af345a56c78161895256e36d80 | [] | no_license | nitink007/CucumberTestNGFramework | ec13605cc8795937b8ec7806729be11fb1e619a1 | 24bbc66f2cf58d31a171fc63b56b502a8bd774e0 | refs/heads/master | 2023-07-18T22:27:12.023782 | 2020-08-30T09:05:43 | 2020-08-30T09:06:22 | 269,528,926 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 959 | java | package listners;
import org.testng.IResultMap;
import org.testng.ITestContext;
import org.testng.ITestListener;
import org.testng.ITestResult;
public class TestNGListners implements ITestListener {
public void onTestStart(ITestResult result) {
System.out.println("onTestStart");
}
public void onTestSuccess(ITestResult result) {
System.out.println("onTestSuccess");
}
public void onTestFailure(ITestResult result) {
System.out.println("onTestFailure");
}
public void onTestSkipped(ITestResult result) {
System.out.println("onTestSkipped");
}
public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
System.out.println("onTestFailedButWithinSuccessPercentage");
}
public void onStart(ITestContext context) {
System.out.println("onStart");
}
public void onFinish(ITestContext context) {
System.out.println("onFinish");
}
}
| [
"nitinkumar1992.delhi@gmail.com"
] | nitinkumar1992.delhi@gmail.com |
6cce1217c677e2640d7f323f3760af23178d3759 | 9f276752a939569143bdeb30abf0f6fb5f069b1e | /src/main/java/com/joy/demo/mapper/TestMapper.java | 2bee6d47c0db66ed855ed6784930212cd3e1cccf | [] | no_license | 15122741165/spring.demo | e80600bfe245324206f4177fd0f120d1a41ca518 | d3586d8f161cf78561e7e35031120bed9da384f2 | refs/heads/master | 2023-04-17T11:58:37.751428 | 2021-05-05T13:48:12 | 2021-05-05T13:48:12 | 364,584,069 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 279 | java | package com.joy.demo.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@Mapper
public interface TestMapper {
@Select("select * from user")
List<Map<String,Object>> test();
}
| [
"you@example.com"
] | you@example.com |
1fd0c9145faafbecdc06e8c3f3511d3f694a46b0 | d6b21db31c312ecb0da1b52b955eac1c93c373a9 | /JavaSpring_Projects/TicketAdvantage/CommonPackage/src/main/java/com/ticketadvantage/services/model/User.java | 275028514e836b9f6d0b36d3c48934e538a5947f | [] | no_license | teja0009/Projects | 84b366a0d0cb17245422c6e2aad5e65a5f7403ac | 70a437a164cef33e42b65162f8b8c3cfaeda008b | refs/heads/master | 2023-03-16T10:10:10.529062 | 2020-03-08T06:22:43 | 2020-03-08T06:22:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,917 | java | /**
*
*/
package com.ticketadvantage.services.model;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* @author jmiller
*
*/
@Entity
@Table(name = "usersta")
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.NONE)
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "usersta_generator")
@SequenceGenerator(name="usersta_generator", sequenceName = "usersta_seq", initialValue=1, allocationSize=50)
@Column(name = "id", unique = true, nullable = false)
@XmlElement
private Long id;
@Column(name = "username", unique = true, nullable = false, length = 50)
@XmlElement
private String username;
@Column(name = "password", unique = false, nullable = true, length = 50)
@XmlElement(nillable=true)
private String password;
@Column(name = "email", unique = false, nullable = true, length = 100)
@XmlElement(nillable=true)
private String email;
@Column(name = "mobilenumber", unique = false, nullable = true, length = 16)
@XmlElement(nillable=true)
private String mobilenumber;
@Column(name = "isactive")
@XmlElement
private Boolean isactive;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "datecreated", unique = false, nullable = true)
@XmlElement
private Date datecreated;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "datemodified", unique = false, nullable = true)
@XmlElement
private Date datemodified;
@OneToMany(fetch = FetchType.EAGER, cascade=CascadeType.ALL)
@OrderBy("name ASC")
@JoinTable(name="usersaccounts", joinColumns={@JoinColumn(name="usersid", referencedColumnName="id")}
, inverseJoinColumns={@JoinColumn(name="accountsid", referencedColumnName="id")})
@XmlElement(nillable=true)
private Set<Accounts> accounts;
@OneToMany(fetch = FetchType.EAGER, cascade=CascadeType.ALL)
@OrderBy("name ASC")
@JoinTable(name="usersemailaccounts", joinColumns={@JoinColumn(name="usersid", referencedColumnName="id")}
, inverseJoinColumns={@JoinColumn(name="emailaccountsid", referencedColumnName="id")})
@XmlElement(nillable=true)
private Set<EmailAccounts> emailaccounts;
@OneToMany(fetch = FetchType.EAGER, cascade=CascadeType.ALL)
@OrderBy("name ASC")
@JoinTable(name="userstwitteraccounts", joinColumns={@JoinColumn(name="usersid", referencedColumnName="id")}
, inverseJoinColumns={@JoinColumn(name="twitteraccountsid", referencedColumnName="id")})
@XmlElement(nillable=true)
private Set<TwitterAccounts> twitteraccounts;
@OneToMany(fetch = FetchType.EAGER, cascade=CascadeType.ALL)
@OrderBy("name ASC")
@JoinTable(name="usersgroups", joinColumns={@JoinColumn(name="usersid", referencedColumnName="id")}
, inverseJoinColumns={@JoinColumn(name="groupsid", referencedColumnName="id")})
@XmlElement(nillable=true)
private Set<Groups> groups;
/*
@OneToMany(mappedBy="user", fetch = FetchType.EAGER, cascade=CascadeType.ALL)
@OrderBy("weekstartdate DESC")
@XmlElement(nillable=true)
private List<UserBilling> userBillings;
*/
/**
*
*/
public User() {
super();
// log.debug("Entering User()");
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return the username
*/
public String getUsername() {
return username;
}
/**
* @param username the username to set
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return the password
*/
public String getPassword() {
return password;
}
/**
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* @return the mobilenumber
*/
public String getMobilenumber() {
return mobilenumber;
}
/**
* @param mobilenumber the mobilenumber to set
*/
public void setMobilenumber(String mobilenumber) {
this.mobilenumber = mobilenumber;
}
/**
* @return the isactive
*/
public Boolean getIsactive() {
return isactive;
}
/**
* @param isactive the isactive to set
*/
public void setIsactive(Boolean isactive) {
this.isactive = isactive;
}
/**
* @return the datecreated
*/
public Date getDatecreated() {
return datecreated;
}
/**
* @param datecreated the datecreated to set
*/
public void setDatecreated(Date datecreated) {
this.datecreated = datecreated;
}
/**
* @return the datemodified
*/
public Date getDatemodified() {
return datemodified;
}
/**
* @param datemodified the datemodified to set
*/
public void setDatemodified(Date datemodified) {
this.datemodified = datemodified;
}
/**
* @return the accounts
*/
public Set<Accounts> getAccounts() {
return accounts;
}
/**
* @param accounts the accounts to set
*/
public void setAccounts(Set<Accounts> accounts) {
this.accounts = accounts;
}
/**
* @return the user billings
*/
// public List<UserBilling> getUserBillings() {
// return userBillings;
// }
/**
* @param user billings the user billings to set
*/
// public void setUserBillings(List<UserBilling> userBillings) {
// this.userBillings = userBillings;
// }
/**
* @return the emailaccounts
*/
public Set<EmailAccounts> getEmailaccounts() {
return emailaccounts;
}
/**
* @param emailaccounts the emailaccounts to set
*/
public void setEmailaccounts(Set<EmailAccounts> emailaccounts) {
this.emailaccounts = emailaccounts;
}
/**
* @return the twitteraccounts
*/
public Set<TwitterAccounts> getTwitteraccounts() {
return twitteraccounts;
}
/**
* @param twitteraccounts the twitteraccounts to set
*/
public void setTwitteraccounts(Set<TwitterAccounts> twitteraccounts) {
this.twitteraccounts = twitteraccounts;
}
/**
* @return the groups
*/
public Set<Groups> getGroups() {
return groups;
}
/**
* @param groups the groups to set
*/
public void setGroups(Set<Groups> groups) {
this.groups = groups;
}
/**
*
*/
@PrePersist
protected void onCreate() {
datecreated = datemodified = new Date();
}
/**
*
*/
@PreUpdate
protected void onUpdate() {
datecreated = datemodified = new Date();
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "User [id=" + id + ", username=" + username + ", password=" + password + ", email=" + email
+ ", mobilenumber=" + mobilenumber + ", isactive=" + isactive + ", datecreated=" + datecreated
+ ", datemodified=" + datemodified + ", accounts=" + accounts + ", emailaccounts=" + emailaccounts
+ ", twitteraccounts=" + twitteraccounts + ", groups=" + groups + "]";
}
} | [
"sinceregeneral@outlook.com"
] | sinceregeneral@outlook.com |
da9834aad15101580c1da96050babfa2d0022284 | 57369a8543ae72cef80eccea397006bfc6e7018e | /src/main/java/com/selab/livinglab/Controller/IndexController.java | 649665a761a72b485734070bade3a7ed2da5b955 | [] | no_license | ubbig/testgrafana | 7aff8f673efd895d0e3edd11109ad6c1e4d876c2 | 4f3f762e2092c1277670914bc60de17027f592d7 | refs/heads/main | 2023-07-14T13:38:59.978451 | 2021-08-30T09:20:36 | 2021-08-30T09:20:36 | 397,087,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 673 | java | package com.selab.livinglab.Controller;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.Model;
import javax.servlet.http.HttpServletRequest;
@Controller
public class IndexController {
static Logger logger = LoggerFactory.getLogger(IndexController.class);
public IndexController() {
}
@RequestMapping("/")
public String index(final Model model, final HttpServletResponse respose, final HttpServletRequest request){
return "living/geojson";
}
}
| [
"yblim@selab.co.kr"
] | yblim@selab.co.kr |
7bf46a2d76ec6eb53da7dce399c8372e9832b1b1 | 267e6e7f525e3e22639cb88551bde6cd95597290 | /src/main/java/com/cs/travels/service/UserService.java | 61db0a2b7d7bd2ca12cbef7fe20ba8a7fee5f0ca | [] | no_license | zycloud68/travels | 8d4815698a4713dcec0bd60e3fc755ffb0ae8932 | 7b310c2b8461d69888ef999dedde4e60ababeed1 | refs/heads/master | 2023-06-05T12:59:28.316364 | 2021-06-23T03:57:04 | 2021-06-23T03:57:04 | 287,181,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 160 | java | package com.cs.travels.service;
import com.cs.travels.entity.User;
public interface UserService {
void register(User user);
User login(User user);
}
| [
"zycloud68@163.com"
] | zycloud68@163.com |
a0d3b857249ac4d657b7dc5fc7f1376f5f68447f | 7bea7fb60b5f60f89f546a12b43ca239e39255b5 | /src/javax/management/remote/MBeanServerForwarder.java | f9d9dd1cdd6c43de94e36a48f4134fdfc3965d99 | [] | no_license | sorakeet/fitcorejdk | 67623ab26f1defb072ab473f195795262a8ddcdd | f946930a826ddcd688b2ddbb5bc907d2fc4174c3 | refs/heads/master | 2021-01-01T05:52:19.696053 | 2017-07-15T01:33:41 | 2017-07-15T01:33:41 | 97,292,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | /**
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.management.remote;
import javax.management.MBeanServer;
public interface MBeanServerForwarder extends MBeanServer{
public MBeanServer getMBeanServer();
public void setMBeanServer(MBeanServer mbs);
}
| [
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] | panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7 |
75a85223fcb58a5766468226d82e54e174a40441 | 511164dd56017b7738417d4d2403404fa4428e12 | /com.learnMaven.com/src/test/java/stepDefination/stepDefinationDemo.java | b1a71a4de0a37a2ccfb9268a27d714f575fa6fe3 | [] | no_license | ajaykbiswal/seleniumtest4 | 979c39d936e9f028d528ae0515f304aaa0613958 | c03043ad8fbca25ef746ab0b0103649c42b4b2cc | refs/heads/master | 2022-12-25T21:50:12.497332 | 2019-07-21T09:26:10 | 2019-07-21T09:26:10 | 198,035,122 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,132 | java | package stepDefination;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class stepDefinationDemo {
WebDriver driver;
@Given("^Open Chrome and start application$")
public void open_Chrome_and_start_application() throws Throwable {
System.setProperty("webdriver.chrome.driver", "");
driver=new ChromeDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("");
}
@When("^Enter valid username and valid password$")
public void enter_valid_username_and_valid_password() throws Throwable {
driver.findElement(By.xpath("")).sendKeys("");
driver.findElement(By.xpath("")).sendKeys("");
}
@Then("^user should be able to login into application sucessfully$")
public void user_should_be_able_to_login_into_application_sucessfully() throws Throwable {
driver.findElement(By.id("")).click();
}
}
| [
"ajayb4@kpit.com"
] | ajayb4@kpit.com |
97634c1490f4ed02518cb4dc19d43660100f2466 | 0dbd987d03145e5864e2031d3523dab013102031 | /JessevanAssen/src/org/uva/sea/ql/ast/expression/value/Bool.java | 313ff6aac7a3c49fe9bb52bef3bce90c35b8fa38 | [] | no_license | slvrookie/sea-of-ql | 52041a99159327925e586389a9c60c4d708c95f2 | 1c41ce46ab1e2c5de124f425d2e0e3987d1b6a32 | refs/heads/master | 2021-01-16T20:47:40.370047 | 2013-07-15T11:26:56 | 2013-07-15T11:26:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,305 | java | package org.uva.sea.ql.ast.expression.value;
import org.uva.sea.ql.ast.expression.ExpressionVisitor;
public class Bool implements Value {
private final boolean value;
public Bool(boolean value) {
this.value = value;
}
public boolean getValue() {
return value;
}
public Bool isEqualTo(Bool other) {
return new Bool(getValue() == other.getValue());
}
public Bool isNotEqualTo(Bool other) {
return isEqualTo(other).not();
}
public Bool and(Bool other) {
return new Bool(getValue() && other.getValue());
}
public Bool or(Bool other) {
return new Bool(getValue() || other.getValue());
}
public Bool not() {
return new Bool(!getValue());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
return getValue() == ((Bool)o).getValue();
}
@Override
public int hashCode() {
return value ? 1 : 0;
}
@Override
public String toString() {
return Boolean.toString(value);
}
@Override
public <ReturnType, ParameterType> ReturnType accept(ExpressionVisitor<ReturnType, ParameterType> visitor, ParameterType param) {
return visitor.visit(this, param);
}
}
| [
"jesse.v.assen@gmail.com"
] | jesse.v.assen@gmail.com |
a90835b3063b0a29ce772e8bdc513974957ccfdc | fcc6a1eca7246cd4465e9d7b7e3f4e1c4c741373 | /common/rebelkeithy/mods/aquaculture/items/AquaItemPickaxe.java | 21ac18e0269a80c4cd72fc5abc77a6d9acbd8f7f | [] | no_license | RebelKeithy/Aquaculture | 600617ec4996d166d04f55d970880574f8bb752f | 6fe8bd24cedfd6e129ade4354af53e2826678ea5 | refs/heads/master | 2023-07-08T14:10:50.533384 | 2013-07-16T18:54:41 | 2013-07-16T18:54:41 | 10,957,344 | 4 | 2 | null | 2020-07-21T14:44:24 | 2013-06-26T03:33:34 | Java | UTF-8 | Java | false | false | 778 | java | package rebelkeithy.mods.aquaculture.items;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
public class AquaItemPickaxe extends ItemPickaxe
{
public AquaItemPickaxe(int par1, EnumToolMaterial par2EnumToolMaterial)
{
super(par1, par2EnumToolMaterial);
}
/**
* Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item."
*/
public Item setUnlocalizedName(String par1Str)
{
super.setUnlocalizedName(par1Str);
this.setTextureName("aquaculture:" + par1Str.replaceAll("\\s",""));
return this;
}
public Item setTextureName(String par1Str)
{
super.func_111206_d(par1Str);
return this;
}
}
| [
"RebelKeithy@gmail.com"
] | RebelKeithy@gmail.com |
8b9fbce00270906a0b0e52f9f27686ac186be3ce | f42d7da85f9633cfb84371ae67f6d3469f80fdcb | /com4j-20120426-2/samples/word/build/src/word/SeriesCollection.java | ea5c98829a52884da387903798fc70402361a1ee | [
"BSD-2-Clause"
] | permissive | LoongYou/Wanda | ca89ac03cc179cf761f1286172d36ead41f036b5 | 2c2c4d1d14e95e98c0a3af365495ec53775cc36b | refs/heads/master | 2023-03-14T13:14:38.476457 | 2021-03-06T10:20:37 | 2021-03-06T10:20:37 | 231,610,760 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,817 | java | package word ;
import com4j.*;
@IID("{8FEB78F7-35C6-4871-918C-193C3CDD886D}")
public interface SeriesCollection extends Com4jObject,Iterable<Com4jObject> {
// Methods:
/**
* <p>
* Getter method for the COM property "Parent"
* </p>
* @return Returns a value of type com4j.Com4jObject
*/
@DISPID(150) //= 0x96. The runtime will prefer the VTID if present
@VTID(7)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject parent();
/**
* @param source Mandatory java.lang.Object parameter.
* @param rowcol Optional parameter. Default value is 2
* @param seriesLabels Optional parameter. Default value is com4j.Variant.getMissing()
* @param categoryLabels Optional parameter. Default value is com4j.Variant.getMissing()
* @param replace Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type word.Series
*/
@DISPID(181) //= 0xb5. The runtime will prefer the VTID if present
@VTID(8)
word.Series add(
@MarshalAs(NativeType.VARIANT) java.lang.Object source,
@Optional @DefaultValue("2") word.XlRowCol rowcol,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object seriesLabels,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLabels,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object replace);
/**
* <p>
* Getter method for the COM property "Count"
* </p>
* @return Returns a value of type int
*/
@DISPID(118) //= 0x76. The runtime will prefer the VTID if present
@VTID(9)
int count();
/**
* @param source Mandatory java.lang.Object parameter.
* @param rowcol Optional parameter. Default value is com4j.Variant.getMissing()
* @param categoryLabels Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type java.lang.Object
*/
@DISPID(227) //= 0xe3. The runtime will prefer the VTID if present
@VTID(10)
@ReturnValue(type=NativeType.VARIANT)
java.lang.Object extend(
@MarshalAs(NativeType.VARIANT) java.lang.Object source,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object rowcol,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLabels);
/**
* @param index Mandatory java.lang.Object parameter.
* @return Returns a value of type word.Series
*/
@DISPID(0) //= 0x0. The runtime will prefer the VTID if present
@VTID(11)
@DefaultMethod
word.Series item(
@MarshalAs(NativeType.VARIANT) java.lang.Object index);
/**
*/
@DISPID(-4) //= 0xfffffffc. The runtime will prefer the VTID if present
@VTID(12)
java.util.Iterator<Com4jObject> iterator();
/**
* @return Returns a value of type word.Series
*/
@DISPID(1117) //= 0x45d. The runtime will prefer the VTID if present
@VTID(13)
word.Series newSeries();
/**
* <p>
* Getter method for the COM property "Application"
* </p>
* @return Returns a value of type com4j.Com4jObject
*/
@DISPID(148) //= 0x94. The runtime will prefer the VTID if present
@VTID(14)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject application();
/**
* <p>
* Getter method for the COM property "Creator"
* </p>
* @return Returns a value of type int
*/
@DISPID(149) //= 0x95. The runtime will prefer the VTID if present
@VTID(15)
int creator();
/**
* @param index Mandatory java.lang.Object parameter.
* @return Returns a value of type word.Series
*/
@DISPID(1610743818) //= 0x6002000a. The runtime will prefer the VTID if present
@VTID(16)
word.Series _Default(
@MarshalAs(NativeType.VARIANT) java.lang.Object index);
// Properties:
}
| [
"815234949@qq.com"
] | 815234949@qq.com |
b63ea279f0ca1f9d51c50488f337fef742a96a68 | 41b772dd5d14f69136380234fa5a1af776ab81f8 | /vaadin-modules-dm-sample/vaadin-modules-dm-module2/src/main/java/org/ws13/vaadin/osgi/dm/module2/Module2.java | c7118504805147711fd13500b9e265ab0091692b | [] | no_license | ctranxuan/o-vaadin | 4eb6b3d25c9b91d6e3edb67255191e1e22099ae1 | 4547c38b8af6b20d3c6d94c88d7a72a9d33321df | refs/heads/master | 2020-04-22T09:33:17.145332 | 2011-12-10T19:10:36 | 2011-12-10T19:10:36 | 2,813,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,739 | java | /*******************************************************************************
* Copyright 2011 ctranxuan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package org.ws13.vaadin.osgi.dm.module2;
import org.ws13.vaadin.osgi.dm.services.Module;
import com.vaadin.ui.Component;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
public class Module2 implements Module {
public static class ModuleComponent extends CustomComponent {
private static final long serialVersionUID = 2619946166525399922L;
public ModuleComponent() {
setCompositionRoot(new Label("Hello, this is Module 2"));
}
}
public String getName() {
return "Module 2";
}
public Component createComponent() {
return new ModuleComponent();
}
// public void setModuleService(ModuleService service) {
// System.out.println("Module2: registering with ModuleService");
// service.registerModule(this);
// }
//
// public void unsetModuleService(ModuleService service) {
// System.out.println("Module2: unregistering with ModuleService");
// service.unregisterModule(this);
// }
}
| [
"ctranxuan@gmail.com"
] | ctranxuan@gmail.com |
c19838e7018e22c3f1b74ef6f724fc02bc50b446 | 7f15c327d450f165dc7210fd224e58584175e611 | /src/main/java/clinic/programming/training/Application.java | dd38abc36bdefff8d14b6306a6eb6f1e02433824 | [
"Apache-2.0"
] | permissive | dkim-dev/maven | d35f26069af9a0e3e93f0c49339dbc8bd8bf0794 | e923f7ad63a2e535b8d4ae667e88d928c57da845 | refs/heads/master | 2022-11-15T13:42:23.192708 | 2020-07-19T03:47:30 | 2020-07-19T03:47:30 | 280,722,049 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 985 | java | package clinic.programming.training;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
public class Application {
public int countWords(String words) {
String[] separateWords = StringUtils.split(words, ' ');
return (separateWords == null) ? 0 : separateWords.length;
}
public void greet() {
List<String> greetings = new ArrayList<>();
greetings.add ("Hello");
for (String greeting : greetings) {
System.out.println("Greeting: " + greeting);
}
}
public Application() {
System.out.println ("Inside Application");
}
// method main(): ALWAYS the APPLICATION entry point
public static void main (String[] args) {
System.out.println ("Starting Application");
Application app = new Application();
app.greet();
int count = app.countWords("I have four words");
System.out.println("Word Count: " + count);
}
}
| [
"dkim@Danils-MacBook-Pro.local"
] | dkim@Danils-MacBook-Pro.local |
82197054d689f013539fafee5b4ae85411b1c0e0 | 740c2625445063d975991f2bc35f7e8375b307eb | /android/app/src/main/java/com/taba/MainActivity.java | d96ae65a9d249167b11bc8b5d40129c80d9a1410 | [] | no_license | masteine/taba | ba617f346ab532e9cd0978e9a5d2cf02b7073682 | 52e78d31d15bbb2824e799257bdcfdaa867cc7f4 | refs/heads/master | 2023-04-12T11:27:13.904032 | 2021-04-14T14:52:06 | 2021-04-14T14:52:06 | 355,816,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 335 | java | package com.taba;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "taba";
}
}
| [
"maxim90m@gmail.com"
] | maxim90m@gmail.com |
8d9306c98cc192619f7598065a9b04ce77a03ced | bbde3a6b002eac0381e71a4a33086ffc291e7e11 | /src/main/java/ESClient.java | 7425dda717e8677caa86a9a8cf59fb8981cce8e1 | [] | no_license | AlexanderNikolovAlexn/ElasticSearchExample | bd4af15c1e2fa2e2e2b286fb3d7130d255da07e6 | 231fe576b9fe508a00549c89b3a8b3fcb9c92bc5 | refs/heads/master | 2021-01-13T00:49:20.686916 | 2016-01-26T10:10:48 | 2016-01-26T10:10:48 | 50,112,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,792 | java | import com.google.gson.Gson;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequest;
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.IndicesAdminClient;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
public class ESClient {
static final int BULKRECORDS = 1000;
private Client client;
private IndicesAdminClient adminClient;
public ESClient() {
this.client = null;
adminClient = null;
}
public ESClient(String hostName, int portNumber, String clusterName) {
try {
Settings settings = Settings.settingsBuilder()
.put("cluster.name", clusterName).build();
this.client = TransportClient.builder().settings(settings).build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostName), portNumber));
adminClient = this.client.admin().indices();
}
catch (UnknownHostException e) {
e.printStackTrace();
}
}
public boolean indexExists(String indexName) {
IndicesExistsRequest request = new IndicesExistsRequest(indexName);
IndicesExistsResponse response = adminClient.prepareExists(indexName).execute().actionGet();
if (response.isExists()) {
return true;
}
return false;
}
public boolean deleteIndex(String indexName)
{
DeleteIndexRequest request = new DeleteIndexRequest(indexName);
try {
DeleteIndexResponse response = adminClient.delete(request).actionGet();
if (!response.isAcknowledged()) {
return false;
}
return true;
}
catch (org.elasticsearch.index.IndexNotFoundException e) {
return false;
}
}
public boolean createIndex(String indexName)
{
CreateIndexRequest request = new CreateIndexRequest(indexName);
CreateIndexResponse response = this.adminClient.create(request).actionGet();
if (!response.isAcknowledged()) {
return false;
}
return true;
}
public boolean addJSON(String indexName, String indexType, String docId, JsonInterface json) {
IndexRequest indexRequest = new IndexRequest(indexName, indexType, docId);
indexRequest.source(json.toJson());
IndexResponse response = client.index(indexRequest).actionGet();
return response.isCreated();
}
public long bulkInsert(String indexName, String indexType, List<JsonInterface> jsons) {
BulkRequestBuilder bulkBuilder = client.prepareBulk();
long insertedRecords = 0;
long failedRecords = 0;
long bulkRecords = 0;
String id = "";
for (int i = 0; i < jsons.size(); i++) {
JsonInterface json = jsons.get(i);
String s = json.toJson();
bulkBuilder.add(client.prepareIndex(indexName, indexType, String.valueOf(i)).setSource(s));
bulkRecords++;
if(bulkRecords == BULKRECORDS || i == jsons.size() - 1) {
BulkResponse bulkResponse = bulkBuilder.execute().actionGet();
if(bulkResponse.hasFailures()) {
failedRecords += bulkResponse.getItems().length;
}
insertedRecords += bulkRecords;
bulkRecords = 0;
bulkBuilder = client.prepareBulk();
}
}
return insertedRecords;
}
public List<JsonInterface> getJsonFilter(String indexName, String indexType, Map<String, String> filter) {
BoolQueryBuilder boolQuery = new BoolQueryBuilder();
for (Map.Entry<String, String> entry : filter.entrySet()){
boolQuery.must(QueryBuilders.matchPhrasePrefixQuery(entry.getKey(), entry.getValue().toLowerCase()));
}
SearchResponse response = client.prepareSearch(indexName)
.setTypes(indexType)
.setSearchType(SearchType.QUERY_AND_FETCH)
.setQuery(boolQuery)
.setFrom(0).setSize(60).setExplain(true)
.execute()
.actionGet();
List<JsonInterface> myFiles = new ArrayList<JsonInterface>();
SearchHit[] results = response.getHits().getHits();
for (SearchHit hit : results) {
System.out.println("------------------------------");
Map<String,Object> result = hit.getSource();
Gson gson = new Gson();
myFiles.add(gson.fromJson(hit.getSourceAsString(), MyFile.class));
}
return myFiles;
}
public List<JsonInterface> getJsonMatchAll(String indexName, String type) {
SearchResponse response = client.prepareSearch(indexName)
.setTypes(type)
.setSearchType(SearchType.QUERY_AND_FETCH)
.setQuery(matchAllQuery())
.setFrom(0).setSize(60).setExplain(true)
.execute()
.actionGet();
List<JsonInterface> myFiles = new ArrayList<JsonInterface>();
SearchHit[] results = response.getHits().getHits();
for (SearchHit hit : results) {
System.out.println("------------------------------");
Map<String,Object> result = hit.getSource();
System.out.println(result);
Gson gson = new Gson();
myFiles.add(gson.fromJson(hit.getSourceAsString(), MyFile.class));
}
return myFiles;
}
public Client getClient(){
return this.client;
}
}
| [
"alexander.nikolov.alexn@gmail.com"
] | alexander.nikolov.alexn@gmail.com |
c85a876279ab2f06547fda0e5663e8aac1530b1d | 62bbd2ceeb59fc713e610133f37e5fee7271e91b | /src/main/java/ua/goit/timonov/enterprise/module_9/web/OrderServiceController.java | 489c4d93f8a0b93e6b2cd45933c469ee941b3342 | [] | no_license | alextimonov/GoJavaEnterprise | 7f4408cc5ad65f1c699cf8193b2098ef4d8d3502 | 56dc584ad5e3ae00933b9e96d46fa79d57756e0a | refs/heads/master | 2021-01-23T14:05:07.584488 | 2016-09-23T21:17:35 | 2016-09-23T21:17:35 | 59,581,892 | 0 | 1 | null | 2016-09-23T22:10:50 | 2016-05-24T14:47:25 | Java | UTF-8 | Java | false | false | 3,255 | java | package ua.goit.timonov.enterprise.module_9.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import ua.goit.timonov.enterprise.module_6_2.model.Employee;
import ua.goit.timonov.enterprise.module_9.service.EmployeeService;
import ua.goit.timonov.enterprise.module_9.service.OrderService;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
/**
* Created by Alex on 17.09.2016.
*/
@Controller
@RequestMapping("/service/order")
public class OrderServiceController {
public static final String ITEMS = "orders";
public static final String PATH_ORDERS = "service/order/orders";
private OrderService orderService;
private EmployeeService employeeService;
@Autowired
public void setOrderService(OrderService orderService) {
this.orderService = orderService;
}
@Autowired
public void setEmployeeService(EmployeeService employeeService) {
this.employeeService = employeeService;
}
@RequestMapping(value = "/orders", method = RequestMethod.GET)
public String getAllIngredients(Map<String, Object> model) {
model.put(ITEMS, orderService.getAllOrders());
return PATH_ORDERS;
}
// @RequestMapping(value = "/dishes", method = RequestMethod.GET)
// public String getOrderDishes(Map<String, Object> model, @RequestParam(value="order", required=true) Integer id) {
// Order order = orderService.getOrder(id);
// model.put("dishes", order.getDishes());
// return PATH_ORDERS;
// }
@RequestMapping(value = "/filterByDate", method = RequestMethod.GET)
public String filterByDate(Map<String, Object> model, @RequestParam(value="date", required=true) Date date) {
model.put(ITEMS, orderService.filterByDate(date));
return PATH_ORDERS;
}
@RequestMapping(value = "/filterByWaiter", method = RequestMethod.GET)
public String filterByName(Map<String, Object> model, @RequestParam(value="waiterName", required=true) String waiterName) {
Employee waiter = employeeService.getEmployeeByName(waiterName);
model.put(ITEMS, orderService.filterByWaiter(waiter));
return PATH_ORDERS;
}
@RequestMapping(value = "/filterByTableNumber", method = RequestMethod.GET)
public String filterByName(Map<String, Object> model, @RequestParam(value="tableNumber", required=true) Integer tableNumber) {
model.put(ITEMS, orderService.filterByTableNumber(tableNumber));
return PATH_ORDERS;
}
@InitBinder
public final void initBinderUsuariosFormValidator(final WebDataBinder binder, final Locale locale) {
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy", locale);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
}
| [
"timalex1206@gmail.com"
] | timalex1206@gmail.com |
497b4b0fbaf6dcecf416bd7c6f4bd5dce89eac7a | efcc6f5ba701c0771b3e0714210e0f3a0bcfc5c6 | /src/test/java/org/reaktivity/nukleus/http/internal/util/BufferUtilTest.java | a69853dd0d8e6ef501a5531d1a88a31fed6a7d06 | [
"Apache-2.0"
] | permissive | cmebarrow/nukleus-http.java | ba40e38be6b841418ff97e7ec6e35640c154bead | 56f3b80b52f4b9bed9b7ebf3549f506e5e1f8e9c | refs/heads/develop | 2021-01-17T04:31:33.624737 | 2018-08-23T18:19:13 | 2018-08-23T18:19:13 | 82,972,579 | 0 | 0 | null | 2017-02-23T21:21:14 | 2017-02-23T21:21:14 | null | UTF-8 | Java | false | false | 4,368 | java | /**
* Copyright 2016-2017 The Reaktivity Project
*
* The Reaktivity Project 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.reaktivity.nukleus.http.internal.util;
import static java.nio.charset.StandardCharsets.US_ASCII;
import static org.junit.Assert.assertEquals;
import org.agrona.DirectBuffer;
import org.agrona.concurrent.UnsafeBuffer;
import org.junit.Test;
public class BufferUtilTest
{
private static final byte[] CRLFCRLF = "\r\n\r\n".getBytes(US_ASCII);
@Test
public void shouldLocateLimitWhenValueAtEndBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(buffer2.capacity(), BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "cutter".getBytes()));
}
@Test
public void shouldLocateLimitWhenValueInsideBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals("a nice".length(), BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "nice".getBytes()));
}
@Test
public void shouldReportLimitMinusOneWhenValueNotFound()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(-1, BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "cutlass".getBytes()));
}
@Test
public void shouldReportLimitMinusOneWhenValueLongerThanBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(-1, BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(),
"a nice warm cookie cutter indeed".getBytes()));
}
@Test
public void shouldLocateLimitWhenValueInSecondBuffer()
{
DirectBuffer buffer1 = new UnsafeBuffer("".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("get / HTTP/1.1\r\n\r\n".getBytes(US_ASCII));
assertEquals(buffer2.capacity(), BufferUtil.limitOfBytes(buffer1, 0, 0, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition1()
{
DirectBuffer buffer1 = new UnsafeBuffer("...\r\n\r".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\n....".getBytes(US_ASCII));
assertEquals(1, BufferUtil.limitOfBytes(buffer1, 3, 6, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition2()
{
DirectBuffer buffer1 = new UnsafeBuffer(".\r\n".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\r\n....".getBytes(US_ASCII));
assertEquals(2, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition3()
{
DirectBuffer buffer1 = new UnsafeBuffer("..\r".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\n\r\n....".getBytes(US_ASCII));
assertEquals(3, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition4()
{
DirectBuffer buffer1 = new UnsafeBuffer("...".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\r\n\r\n....".getBytes(US_ASCII));
assertEquals(4, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test(expected=IllegalArgumentException.class)
public void shouldRejectValueWhollyInFragment()
{
DirectBuffer buffer1 = new UnsafeBuffer("\r\n\r\n".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("...\r\n\r\n....".getBytes(US_ASCII));
assertEquals(4, BufferUtil.limitOfBytes(buffer1, 0, 4, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
}
| [
"chris.barrow@kaazing.com"
] | chris.barrow@kaazing.com |
ceb05cb3878a71b4566efb10b7725a46c282e922 | 1ad16febb04ae5541b01a377c0a37682d2966d30 | /src/main/java/lt/vu/entities/Footballer.java | b82ddeeed9ba248431ccac8fe0595369ec3a3da4 | [] | no_license | faskalis11/JavaEEfootball | 564e75ecc9a853abce348e10d19dfa1182762210 | 46281fa55faaac216ad3fe48819e5361fd2a7cac | refs/heads/master | 2022-03-25T11:02:57.334574 | 2017-06-05T17:00:49 | 2017-06-05T17:00:49 | 93,427,191 | 0 | 0 | null | 2022-02-22T09:35:36 | 2017-06-05T16:59:29 | Java | UTF-8 | Java | false | false | 1,246 | java | package lt.vu.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@Getter
@Setter
@Entity
@NamedQueries({
@NamedQuery(name = "Footballer.findAll", query = "SELECT u FROM Footballer u"),
@NamedQuery(name = "Footballer.findTeam", query = "SELECT u FROM Footballer u WHERE u.team = :team"),
@NamedQuery(name = "Footballer.findById", query = "SELECT f FROM Footballer f WHERE f.idf = :id"),
})
@Table(name = "footballer")
public class Footballer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "idf")
private int idf;
@Size(max = 20)
@NotNull
@Column(name = "name")
private String name;
@Column(name = "number")
private int number;
@Column(name = "salary")
private int salary;
@Column(name = "bonus")
private int bonus = 0;
@Column(name = "goals")
private int goals;
@Column(name = "assist")
private int assists;
@JoinColumn(name = "team", referencedColumnName = "id")
@ManyToOne
private Team team;
@Version
@Column(name = "OPT_LOCK_VERSION")
private Integer optLockVersion;
}
| [
"ignasjankauskas9@gmail.com"
] | ignasjankauskas9@gmail.com |
04e7dc527b9e1b0c983741322d6d511530e4783e | 2dc09408af111b6a0b185dbf7fb125bedd3ad55e | /MiotVoiceRobot/src/androidTest/java/com/miot/android/voice/ApplicationTest.java | 67e39ce16da17942b24842544ccd0769d794484c | [] | no_license | qiaozhuang/MiotSmart | fc9c64f41cae1eaa62552e9bb9d88d08dd4f3c74 | 74ea0e8dd5aee5efbc84c4f07809ea03686940b1 | refs/heads/master | 2021-05-16T07:40:54.244331 | 2017-09-18T09:28:12 | 2017-09-18T09:28:12 | 103,918,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 341 | java | package com.miot.android.voice;
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);
}
} | [
"qiaozhuang"
] | qiaozhuang |
905e923c3581297bf92e96c152c3a62f65311446 | 0ba3fd20406df94852a2a68d674d64f2532b76d4 | /build/generated/src/org/apache/jsp/candidate_jsp.java | 63be82a69120b1871ee2cfbad1106c760967e769 | [] | no_license | RISHABHDHIMAN1140/project1 | 953d83c1b69fb1f2326d98fd5b2469c8a2e005e0 | f084cd24781723964909a9e01429d07e43ee0e66 | refs/heads/master | 2020-04-09T05:33:10.564270 | 2018-12-02T16:59:22 | 2018-12-02T16:59:22 | 160,069,105 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,370 | java | package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class candidate_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List<String> _jspx_dependants;
private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;
public java.util.List<String> getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
out.write("<html>\n");
out.write(" <head>\n");
out.write(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n");
out.write(" <style>\n");
out.write(".container {\n");
out.write(" position: relative;\n");
out.write(" width: 50%;\n");
out.write("}\n");
out.write("\n");
out.write(".image {\n");
out.write(" opacity: 1;\n");
out.write(" display: block;\n");
out.write(" width: 70%;\n");
out.write(" height: auto;\n");
out.write(" transition: .5s ease;\n");
out.write(" backface-visibility: hidden;\n");
out.write("}\n");
out.write("\n");
out.write(".middle {\n");
out.write(" transition: .5s ease;\n");
out.write(" opacity: 0;\n");
out.write(" position: absolute;\n");
out.write(" top: 50%;\n");
out.write(" left: 50%;\n");
out.write(" transform: translate(-50%, -50%);\n");
out.write(" -ms-transform: translate(-50%, -50%);\n");
out.write(" text-align: center;\n");
out.write("}\n");
out.write("\n");
out.write(".container:hover .image {\n");
out.write(" opacity: 0.3;\n");
out.write("}\n");
out.write("\n");
out.write(".container:hover .middle {\n");
out.write(" opacity: 1;\n");
out.write("}\n");
out.write("\n");
out.write(".text {\n");
out.write(" background-color: #4CAF50;\n");
out.write(" color: white;\n");
out.write(" font-size: 16px;\n");
out.write(" padding: 16px 32px;\n");
out.write("}\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write(".papu {\n");
out.write(" position: relative;\n");
out.write(" width: 50%;\n");
out.write("}\n");
out.write("\n");
out.write(".image {\n");
out.write(" opacity: 1;\n");
out.write(" display: block;\n");
out.write(" width: 70%;\n");
out.write(" height: auto;\n");
out.write(" transition: .5s ease;\n");
out.write(" backface-visibility: hidden;\n");
out.write("}\n");
out.write("\n");
out.write(".middle {\n");
out.write(" transition: .5s ease;\n");
out.write(" opacity: 0;\n");
out.write(" position: absolute;\n");
out.write(" top: 50%;\n");
out.write(" left: 50%;\n");
out.write(" transform: translate(-50%, -50%);\n");
out.write(" -ms-transform: translate(-50%, -50%);\n");
out.write(" text-align: center;\n");
out.write("}\n");
out.write("\n");
out.write(".papu:hover .image {\n");
out.write(" opacity: 0.3;\n");
out.write("}\n");
out.write("\n");
out.write(".papu:hover .middle {\n");
out.write(" opacity: 1;\n");
out.write("}\n");
out.write("\n");
out.write(".text {\n");
out.write(" background-color: #4CAF50;\n");
out.write(" color: white;\n");
out.write(" font-size: 16px;\n");
out.write(" padding: 16px 32px;\n");
out.write("}\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write(".akki {\n");
out.write(" position: relative;\n");
out.write(" width: 50%;\n");
out.write("}\n");
out.write("\n");
out.write(".image {\n");
out.write(" opacity: 1;\n");
out.write(" display: block;\n");
out.write(" width: 70%;\n");
out.write(" height: auto;\n");
out.write(" transition: .5s ease;\n");
out.write(" backface-visibility: hidden;\n");
out.write("}\n");
out.write("\n");
out.write(".middle {\n");
out.write(" transition: .5s ease;\n");
out.write(" opacity: 0;\n");
out.write(" position: absolute;\n");
out.write(" top: 50%;\n");
out.write(" left: 50%;\n");
out.write(" transform: translate(-50%, -50%);\n");
out.write(" -ms-transform: translate(-50%, -50%);\n");
out.write(" text-align: center;\n");
out.write("}\n");
out.write("\n");
out.write(".akki:hover .image {\n");
out.write(" opacity: 0.3;\n");
out.write("}\n");
out.write("\n");
out.write(".akki:hover .middle {\n");
out.write(" opacity: 1;\n");
out.write("}\n");
out.write("\n");
out.write(".text {\n");
out.write(" background-color: #4CAF50;\n");
out.write(" color: white;\n");
out.write(" font-size: 16px;\n");
out.write(" padding: 16px 32px;\n");
out.write("}\n");
out.write("\n");
out.write("</style>\n");
out.write("</head>\n");
out.write("<body>\n");
out.write("\n");
out.write("<div class=\"container\">\n");
out.write(" <img src=\"F:\\voting photos\\Download-Indian-Prime-Minister-Sri-Narendra-Modi-HD-Wallpaper-for-Desktop-Free-1.jpg\" alt=\"Avatar\" class=\"image\" style=\"width:70%\">\n");
out.write(" <div class=\"middle\">\n");
out.write(" <div class=\"text\">\n");
out.write(" <h1>BJP</h1>\n");
out.write(" <pre>\n");
out.write("Name:Narendra Damodardas Modi\n");
out.write("Born: 17 September 1950 (age 68 years), Vadnagar\n");
out.write("Spouse: Jashodaben Narendrabhai Modi (m. 1968)\n");
out.write("Office: Prime Minister of India since 2014\n");
out.write("Education: Gujarat University (1983), University of Delhi (1978), School of Open Learning\n");
out.write("Previous offices: Member of the Gujarat Legislative Assembly (2002?2014), Chief Minister of Gujarat (2001?2014)</div>\n");
out.write(" </pre></div>\n");
out.write("</div>\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("<div class=\"papu\">\n");
out.write(" <img src=\"F:\\voting photos\\papu.jpg\" alt=\"Avatar\" class=\"image\" style=\"width:70%\">\n");
out.write(" <div class=\"middle\">\n");
out.write(" <div class=\"text\">\n");
out.write(" <h1>INDIAN NATIONAL CONGRESS</h1>\n");
out.write(" <pre>\n");
out.write("Name:Rahul Gandhi\n");
out.write("Born: 48 years\n");
out.write("Education: M.Phil from Trinity College, Cambridge in 1995.\n");
out.write(" </pre></div>\n");
out.write("</div>\n");
out.write(" \n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("<div class=\"akki\">\n");
out.write(" <img src=\"F:\\voting photos\\akki.jpg\" alt=\"Avatar\" class=\"image\" style=\"width:140%\">\n");
out.write(" <div class=\"middle\">\n");
out.write(" <div class=\"text\">\n");
out.write(" <h1>AAM AADMI PARTY</h1>\n");
out.write(" <pre>\n");
out.write("Born: 16 August 1968 (age 50 years), Siwani\n");
out.write("Spouse: Sunita Kejriwal (m. 1994)\n");
out.write("Office: List of Chief Ministers of Delhi until 14 Feb 2019\n");
out.write("Previous office: List of Chief Ministers of Delhi (2013?2014)\n");
out.write("Education: Indian Institute of Technology Kharagpur (1985?1989), Campus School, CCS HAU, Dayanand college\n");
out.write(" </pre></div>\n");
out.write("</div>\n");
out.write("\n");
out.write("</body>\n");
out.write("\n");
out.write("</html>\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
| [
"rishabhdhiman1998@gmail.com"
] | rishabhdhiman1998@gmail.com |
ba08be1453c7c13d39c6ee854685af5af55e1fec | 4fbff1616bf8d0a8eec761de08c8009d48d89758 | /src/main/java/com/apap/tu05/controller/PilotController.java | 4c5613cfa0b781b1cfe432d33489bab18879af5f | [] | no_license | ichsandyrizki/tutorial-05 | 72af823134b8fb4cbe9531d3d95786c424437b9c | 27bd433131365b5ae9f17221bc0b694ea173d748 | refs/heads/master | 2021-02-06T11:55:31.413212 | 2020-03-03T13:19:33 | 2020-03-03T13:19:33 | 243,912,143 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,586 | java | package com.apap.tu05.controller;
import com.apap.tu05.model.FlightModel;
import com.apap.tu05.model.PilotModel;
import com.apap.tu05.service.FlightService;
import com.apap.tu05.service.PilotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
public class PilotController {
@Autowired
private PilotService pilotService;
@Autowired
private FlightService flightService;
@RequestMapping("/")
private String home(Model model){
List<PilotModel> pilotList = pilotService.findAllPilot();
model.addAttribute("pilotList", pilotList);
List<FlightModel> flightList = flightService.flightList();
model.addAttribute("flightList", flightList);
model.addAttribute("navTitle", "APAP");
return "home";
}
@RequestMapping(value = "/pilot/add", method = RequestMethod.GET)
private String add(Model model){
model.addAttribute("pilot", new PilotModel());
model.addAttribute("navTitle","Add Pilot");
return "addPilot";
}
@RequestMapping(value = "/pilot/add", method = RequestMethod.POST)
private String addPilotSubmit(@ModelAttribute PilotModel pilot, Model model){
pilotService.addPilot(pilot);
model.addAttribute("message", "Pilot Berhasil Ditambahkan!");
return "successPage";
}
/* @RequestMapping("/pilot/view")
private String view(@RequestParam(value = "licenseNumber") String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
if(pilot != null){
List<FlightModel> flightList = flightService.findAllFlightByPilotLicenseNumber(licenseNumber);
model.addAttribute("flightList", flightList);
model.addAttribute("pilot", pilot);
return "viewPilot";
}else{
model.addAttribute("message", "License number tidak ditemukan");
return "errorPage";
}
}*/
@RequestMapping(value = "/pilot/view", method = RequestMethod.GET)
public String viewPilot(@RequestParam("licenseNumber")String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
model.addAttribute("pilot",pilot);
model.addAttribute("navTitle","Pilot Detail");
return "viewPilot";
}
@RequestMapping(value = "/pilot/delete/{id}", method= RequestMethod.GET)
private String delete(@PathVariable(value = "id") Long id, Model model){
pilotService.removePilot(id);
model.addAttribute("message", "Pilot berhasil Dihapus!");
model.addAttribute("navTitle", "Confirmation");
return "successPage";
}
@RequestMapping(value = "/pilot/update/{licenseNumber}", method = RequestMethod.GET)
private String update(@PathVariable(value = "licenseNumber") String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
model.addAttribute("pilot",pilot);
model.addAttribute("navTitle", "Update Pilot");
return "updatePilot";
}
@RequestMapping(value = "/pilot/update", method = RequestMethod.POST)
private String updateSubmit(@ModelAttribute PilotModel pilotModel, Model model){
pilotService.updatePilot(pilotModel);
return "redirect:/pilot/view?licenseNumber="+pilotModel.getLicenseNumber();
}
}
| [
"ichsandy.rizki@ui.ac.id"
] | ichsandy.rizki@ui.ac.id |
5429729e91b4191ea8378156c7b1c1137fdf8473 | 4dfb8e6b738e2e9f93a3e27f07b3cf7309780636 | /src/main/java/com/zefun/common/consts/View.java | b368326bb007f558ac2d35e28e4b5ab7415e55ee | [] | no_license | xiajngsi/zefun | 8981cd6e5769c58533e130111ffb7bac9201235e | 017ef34f5e6dc4d9a025dc3cd0cd4762a50ab824 | refs/heads/master | 2021-01-10T01:17:32.738892 | 2015-12-22T11:49:48 | 2015-12-22T11:49:48 | 48,429,308 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,752 | java | package com.zefun.common.consts;
/**
* 视图地址常量类,定义时使用根目录/WEB-INF/view/下对绝对地址
* @author 张进军
* @date Aug 4, 2015 9:21:29 AM
*/
public interface View {
/**
* 首页处理
* @author 高国藩
* @date 2015年10月26日 下午4:54:58
*/
class Index{
/** 登陆页面 */
public static final String LOGIN = "login";
}
/**
* 角色权限控制
* @author 高国藩
* @date 2015年11月25日 上午11:53:07
*/
class Authority{
/**角色权限配置页面*/
public static final String VIEW = "authority/view";
}
/**
* 门店管理制度模块
* @author 张进军
* @date Dec 5, 2015 7:17:45 PM
*/
class StoreManageRule {
/**管理规则页面*/
public static final String RULE = "employee/manage/rule";
}
/**
* 设置类模块
* @author 张进军
* @date Nov 9, 2015 11:36:48 AM
*/
class Setting {
/** 店铺设置 */
public static final String STORE_SETTING = "setting/storeSetting";
/** 门店基础设置 */
public static final String BASE_SETTING = "setting/baseSetting";
/** 个人账户 */
public static final String PERSON_SETTING = "setting/personSetting";
/** 分店列表 */
public static final String BRANCH_LIST = "setting/branchList";
}
/**
* 人脸模块相关页面
* @author 张进军
* @date Jul 2, 2015 2:57:02 PM
*/
class Face{
/** 添加face页面 */
public static final String ADD = "face/add";
/** 搜索face页面 */
public static final String SEARCH = "face/search";
}
/**
* 会员等级相关页面
* @author 张进军
* @date Aug 5, 2015 7:49:53 PM
*/
class MemberLevel{
/** 会员等级列表页面 */
public static final String LIST = "member/memberLevel/list";
}
/**
* 会员信息页面
* @author 高国藩
* @date 2015年9月8日 下午6:04:08
*/
class MemberInfo{
/** 会员展示*/
public static final String MEMBER_LIST_VIEW = "member/memberLevel/member-list";
/**会员展示*/
public static final String GROUP_LIST_VIEW = "member/memberLevel/group-list";
/**会员导入错误数据展示页面*/
public static final String VEIW_ERROR_MEMBER = "member/memberLevel/errorMember";
/**总店会员页面*/
public static final String BASE_MEMBER_VIEW = "member/memberLevel/baseMember";
}
/**
* 微信会员中心相关页面
* @author 张进军
* @date Aug 19, 2015 5:46:43 PM
*/
class MemberCenter{
/** 会员主页面 */
public static final String HOME = "mobile/member/home";
/**个人资料*/
public static final String INFO = "mobile/member/info";
/**密码设置页面*/
public static final String SET_PWD = "mobile/member/setPwd";
/** 会员注册页面 */
public static final String REGISTER = "mobile/member/register";
/** 会员充值页面 */
public static final String ACCOUNT = "mobile/member/account";
/** 完善会员信息页面 */
public static final String REGISTER_INFO = "mobile/member/registerInfo";
/** 分享发型页面 */
public static final String SHARE_SHOW = "mobile/member/shareShow";
/** 预约页面 */
public static final String ORDER_APPOINTMENT = "mobile/member/orderAppointment";
/**项目详情*/
public static final String PROJECT_DETAIL = "mobile/member/projectDetail";
/**时间预约*/
public static final String DATE_APPOINTMENT = "mobile/member/dateAppointment";
/**积分流水*/
public static final String INTEGRAL_FLOW = "mobile/member/integralFlow";
/**卡金流水记录页面*/
public static final String CARD_MONEY_FLOW = "mobile/member/cardmoneyFlow";
/**礼金流水记录页面*/
public static final String GIFT_MONEY_FLOW = "mobile/member/giftmoneyFlow";
/**积分商城*/
public static final String SHOP_CENTER = "mobile/member/shopCenter";
/**会员优惠券*/
public static final String MEMBER_COUPON = "mobile/member/memberCoupon";
/**店铺信息*/
public static final String STORE_INFO = "mobile/member/storeInfo";
/**店铺展示*/
public static final String STORE_SHOW = "mobile/member/storeShow";
/**会员预约列表*/
public static final String APPOINTMENT_LIST = "mobile/member/appointmentList";
/**会员订单列表*/
public static final String ORDER_LIST = "mobile/member/orderList";
/**会员订单确认*/
public static final String ORDER_PAY = "mobile/member/orderPay";
/**会员订单支付明细*/
public static final String PAYMENT_DETAIL = "mobile/member/paymentDetail";
/**会员订单评价*/
public static final String ORDER_EVALUATE = "mobile/member/orderEvaluate";
/**会员套餐列表*/
public static final String COMBO_LIST = "mobile/member/comboList";
/**门店列表*/
public static final String STORE_LIST = "mobile/member/storeList";
}
/**
* 员工手机端
* @author 王大爷
* @date 2015年8月21日 上午10:15:25
*/
class StaffPage{
/** 员工登录页面*/
public static final String STAFF_LOGIN = "mobile/staff/login";
/** 员工操作中心*/
public static final String STAFF_CENTER = "mobile/staff/staffCenter";
/** 员工个人信息*/
public static final String STAFF_INFO = "mobile/staff/staffInfo";
/** 员工密码页面*/
public static final String UPDATE_PWD = "mobile/staff/updatePwd";
/** 更多操作界面*/
public static final String STAFF_MORE = "mobile/staff/more";
/** 员工预约列表*/
public static final String STAFF_APPOINT = "mobile/staff/staffAppoint";
/** 员工业绩排行*/
public static final String ALL_ERANING = "mobile/staff/allEarning";
/** 员工个人业绩*/
public static final String STAFF_ERANING = "mobile/staff/staffEarning";
/** 员工接待页面*/
public static final String RECEPTION = "mobile/staff/reception";
/** 选择类别页面*/
public static final String PROJECT_CATEGORY = "mobile/staff/projectCategory";
/** 轮牌指定*/
public static final String MEMBER_SHIFTMAHJONG_SERVE = "mobile/staff/memberShiftMahjongServe";
/** 项目列表*/
public static final String PROJECT_LIST = "mobile/staff/projectList";
/** 会员结账界面*/
public static final String MEMBER_PAY = "mobile/staff/memberPay";
/** 员工工资*/
public static final String STAFF_SALARY = "mobile/staff/staffSalary";
/** 员工业绩详情*//*
public static final String STAFF_DETAILS = "mobile/staff/staffDetails";*/
/** 员工服务界面*/
public static final String STAFF_SERVE = "mobile/staff/staffServe";
/** 等待中订单列表*/
public static final String WAITING_ORDER = "mobile/staff/waitingOrder";
/** 已完成订单*/
public static final String ORDER_LIST = "mobile/staff/orderList";
/** 订单详情*/
public static final String ORDER_DETAILS = "mobile/staff/orderDetails";
/** 服务移交轮牌显示*/
public static final String TURN_SHIFTMAHJONG_SERVE = "mobile/staff/turnShiftMahjongServe";
/** 修改项目*/
public static final String CHANGE_PROJECT = "mobile/staff/changeProject";
/** 修改项目轮牌*/
public static final String UPDATE_SHIFTMAHJONG_SERVE = "mobile/staff/updateShiftMahjongServe";
/** 等待中心轮牌*/
public static final String WAITING_SHIFTMAHJONG_SERVE = "mobile/staff/waitingShiftMahjongServe";
/** 订单明细*/
public static final String ORDER_DETAIL = "mobile/staff/orderdetail";
/** 所有轮牌界面*/
public static final String ALL_SHIFTMAHJONG = "mobile/staff/allShiftMahjong";
/** 我的轮牌界面*/
public static final String MY_SHIFTMAHJONG = "mobile/staff/myShiftMahjong";
}
/** 发型设置 */
class HairstyleDesign{
/** 发型设置页面 */
public static final String HAIRSTYLEDESIGN = "commodity/hairstyleDesign";
}
/**
* 项目
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:20
*/
class Project{
/** 项目价格设置页面 */
public static final String PROJECTSETTING = "commodity/projectSetting";
}
/**
* 套餐
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:32
*/
class ComboInfo{
/**套餐设置页面*/
public static final String COMBOINFO = "commodity/comboInfo";
}
/**
* 商品
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:50
*/
class GoodsInfo{
/** 商品设置页面*/
public static final String GOODSINFO = "commodity/goodsInfo";
/** 商品库存页面 */
public static final String GOODSSTOCK = "commodity/goodsStock";
/** 商品出货记录*/
public static final String SHIP_MENT_RECORD = "commodity/shipMentRecord";
/** 品牌管理页面*/
public static final String BRAND = "commodity/goodsBrand";
/** 商品进货页面*/
public static final String GOODS_PURCHASE_RECORDS = "commodity/purchaseRecords";
}
/**
* 供应商
* @author 洪秋霞
* @date 2015年8月12日 下午2:40:56
*/
class SupplierInfo{
/**供应商设置页面*/
public static final String SUPPLIERINFO = "commodity/supplierInfo";
/**进货记录页面*/
public static final String PURCHASE_RECORDS = "commodity/purchaseRecords";
}
/**
* 岗位信息
* @author 陈端斌
* @date 2015年8月4日 下午4:32:30
*/
class Position{
/** 岗位信息页面 */
public static final String POSITION = "employee/positioninfo/positioninfo";
}
/**
* 职位信息页面
* @author chendb
* @date 2015年8月11日 上午10:10:38
*/
class Employeelevel{
/** 职位信息页面*/
public static final String EMPLOYEELEVEL = "employee/employeelevel/employeelevel";
}
/**
* 自助收银
* @author 王大爷
* @date 2015年8月11日 上午11:21:37
*/
class KeepAccounts{
/** 开支记账*/
public static final String STOREFLOW = "keepAccounts/storeFlow";
/** 轮职排班*/
public static final String SHIFT_MAHJONG ="keepAccounts/shiftMahjong";
/** 开卡充值*/
public static final String OPEN_CARD ="keepAccounts/openCard";
/** 手工收银*/
public static final String MANUALLY_OPEN_ORDER = "keepAccounts/manuallyOpenOrder";
}
/**
* 微信模块
* @author 高国藩
* @date 2015年8月7日 上午10:03:21
*
*/
class Wechat{
/**菜单页面*/
public static final String MENU = "wechat/menu";
/**新增图文消息页面*/
public static final String ARTIC_MANAGER = "wechat/article-manage";
/**展示图文消息*/
public static final String SHOW_ITEMS = "wechat/items-manage";
/**修改摸一个图文消息,展示其中一个*/
public static final String CHATE_ITME = "wechat/update-article-manage";
/**图文消息发送*/
public static final String SEND_ITEMS = "wechat/send-items";
/**图文消息统计*/
public static final String ITEMS_STATUS = "wechat/items-msg-status";
/**图文消息设置页面*/
public static final String VIEW_AUTO_REPLY = "wechat/auto-reply";
/**门店菜单设置页面*/
public static final String STORE_MENU = "wechat/store-menu";
/**我的公众号*/
public static final String VIEW_OFFICAL = "wechat/offical";
}
/**
* 人员目标
* @author chendb
* @date 2015年8月17日 下午3:21:41
*/
class Objective{
/** 职位信息页面*/
public static final String OBJECTIVE = "employee/objective/objective";
}
/**
* 优惠券
* @author 高国藩
* @date 2015年8月18日 上午11:40:55
*/
class Coupon{
/**优惠券展示页面*/
public static final String VIEW_COUPON = "coupon/coupon-list";
}
/**
* 自助收银
* @author luhw
* @date 2015年10月21日 下午15:27:49
*/
class SelfCashier {
/**优惠券展示页面*/
public static final String VIEW_SELF_CASHIER = "cashier/payment";
/** 预约列表 */
public static final String APPOINT_LIST = "cashier/appointList";
}
/** 订单流水 */
class DayBook {
/** 订单流水查询页面 */
public static final String VIEW_DAYBOOK_INDEX = "daybook/view/index";
/** 订单流水查询 */
public static final String ACTION_DAYBOOK_LIST = "daybook/action/list";
}
/**
* 登陆
* @author 高国藩
* @date 2015年9月20日 上午11:21:38
*/
class Login{
}
/**
* 门店
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月24日
*/
class Store {
/**
*
*/
public static final String STORE_APPLY = "mobile/store/apply";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class Agent {
/**
*
*/
public static final String AGENT_APPLY = "mobile/agent/apply";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class StoreDetail {
/**
*
*/
public static final String SINGLE_STORE = "mobile/store/single";
/**
*
*/
public static final String CHAIN_HQ_STORE = "mobile/store/chain_hq";
/**
*
*/
public static final String CHAIN_STORE = "mobile/store/chain";
/**
*
*/
public static final String SINGLE_STORE_INFO = "mobile/store/single_info";
/**
*
*/
public static final String CHAIN_HQ_STORE_INFO = "mobile/store/chain_hq_info";
/**
*
*/
public static final String CHAIN_STORE_INFO = "mobile/store/chain_info";
/**
*
*/
public static final String CHAIN_STORE_CHAINS = "mobile/store/chain_hq_chains";
/**
*
*/
public static final String STORE_RENEW_SYS = "mobile/store/renew_sys";
/**
*
*/
public static final String STORE_RENEW_SMS = "mobile/store/renew_sms";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class AgentDetail {
/** 渠道个人账户页面(已审核) */
public static final String INDEX = "mobile/agent/index";
/** 渠道个人账户页面(审核中) */
public static final String APPLY_INFO = "mobile/agent/applyInfo";
/**
*
*/
public static final String INFO = "mobile/agent/info";
/**
*
*/
public static final String NEW_STORE_SELF = "mobile/agent/new_store_self";
/**
*
*/
public static final String NEW_STORE_OTHER = "mobile/agent/new_store_other";
/**
*
*/
public static final String STORE_NORMAL = "mobile/agent/store_normal";
/**
*
*/
public static final String STORE_RENEW = "mobile/agent/store_renew";
/**
*
*/
public static final String STORE_OVER = "mobile/agent/store_over";
/**
*
*/
public static final String STORE_MY_RECOMMEND = "mobile/agent/store_my_recommend";
/**
*
*/
public static final String AGENT_MY_RECOMMEND = "mobile/agent/agent_my_recommend";
/**
*
*/
public static final String STORE_RECOMMEMND_TO_ME = "mobile/agent/store_recommend_me";
/**
*
*/
public static final String INCOME = "mobile/agent/income";
}
/**
* 员工出勤记录
* @author lzc
*
*/
class AttendanceRecord {
/** 员工考勤首页 */
public static final String HOME = "employee/attendance/attendance";
}
/**
* 员工奖惩
* @author lzc
*
*/
class EmployeeReward {
/** 员工奖惩首页 */
public static final String HOME = "employee/rewards/rewards";
}
}
| [
"xiajingsi00@163.com"
] | xiajingsi00@163.com |
d57f4f7aa9bdd2bc363a7edf52988b1fc9936054 | 4892393e28b0280adfc0b0353ef8774e6d77897c | /imooc-coupon-service/coupon-settlement/src/main/java/com/imooc/coupon/SettlementApplication.java | 10b7d6f5489deba8968d0285ec2560ca9f474b74 | [] | no_license | Boneshade/imooc-coupon | eeae5b8d26e2125bb1958493bd4640fdf93bc7d7 | c3d20e8f2ad18bf3bca95035423512fff64bc76e | refs/heads/master | 2023-03-18T00:47:58.820003 | 2021-03-12T05:47:04 | 2021-03-12T05:47:04 | 321,247,967 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | package com.imooc.coupon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
/**
* <h1>优惠券结算微服务的启动入口<h1/>
* @author xubr 2021/2/8
*/
@EnableEurekaClient
@SpringBootApplication
public class SettlementApplication {
public static void main(String[] args) {
SpringApplication.run(SettlementApplication.class, args);
}
}
| [
"2658696789@qq.com"
] | 2658696789@qq.com |
9714984cc114b4a38755146857bc0945d4474025 | 1c544bcce02aff62b778f83d443ac469284aa3c6 | /clientCore/src/main/java/com/mark/zumo/client/core/payment/kakao/KakaoPayAdapter.java | bc3e11da98e18e784e2eaca043d6869c229d8b9b | [] | no_license | Mark-Yun/zumun_client | 63afdfb0f558d426f016a1d7f0e14f604438393c | 0bac03015ab5b085b57d4429bc9da833b62cdb14 | refs/heads/master | 2020-07-09T08:16:12.467227 | 2019-09-25T12:01:33 | 2019-09-25T12:01:33 | 203,921,452 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,247 | java | /*
* Copyright (c) 2018. Mark Soft - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/
/*
* Copyright (c) 2018. Mark Soft - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/
package com.mark.zumo.client.core.payment.kakao;
import com.mark.zumo.client.core.database.entity.MenuOrder;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentApprovalRequest;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentApprovalResponse;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentReadyRequest;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentReadyResponse;
import com.mark.zumo.client.core.payment.kakao.server.KakaoPayService;
import com.mark.zumo.client.core.payment.kakao.server.KakaoPayServiceProvider;
import io.reactivex.Maybe;
import io.reactivex.schedulers.Schedulers;
/**
* Created by mark on 18. 6. 6.
*/
public enum KakaoPayAdapter {
INSTANCE;
private static final String TAG = "KakaoPayAdapter";
private KakaoPayService kakaoPayService;
KakaoPayAdapter() {
}
public KakaoPayService buildService(String accessToken) {
return kakaoPayService = KakaoPayServiceProvider.INSTANCE.buildService(accessToken);
}
public Maybe<PaymentReadyResponse> preparePayment(final PaymentReadyRequest paymentReadyRequest) {
return kakaoPayService.readyPayment(
paymentReadyRequest.cId,
paymentReadyRequest.partnerOrderId,
paymentReadyRequest.partnerUserId,
paymentReadyRequest.itemName,
paymentReadyRequest.itemCode,
paymentReadyRequest.quantity,
paymentReadyRequest.totalAmount,
paymentReadyRequest.taxFreeAmount,
paymentReadyRequest.vatAmount,
paymentReadyRequest.approvalUrl,
paymentReadyRequest.cancelUrl,
paymentReadyRequest.failUrl,
paymentReadyRequest.availableCards,
paymentReadyRequest.paymentMethodType,
paymentReadyRequest.installMonth,
paymentReadyRequest.customJson)
.subscribeOn(Schedulers.io());
}
public Maybe<PaymentApprovalResponse> approvalPayment(final MenuOrder menuOrder, final String pgToken, final String tId) {
PaymentApprovalRequest paymentApprovalRequest = new PaymentApprovalRequest.Builder()
.setcId(KakaoPayService.CID)
.setPartnerOrderId(menuOrder.uuid)
.setPartnerUserId(menuOrder.customerUuid)
.setPgToken(pgToken)
.settId(tId)
.setTotalAmount(menuOrder.totalPrice)
.build();
return kakaoPayService.approvalPayment(paymentApprovalRequest.cId,
paymentApprovalRequest.tId,
paymentApprovalRequest.partnerOrderId,
paymentApprovalRequest.partnerUserId,
paymentApprovalRequest.pgToken,
paymentApprovalRequest.payload,
paymentApprovalRequest.totalAmount);
}
}
| [
"mark.yun89@gmail.com"
] | mark.yun89@gmail.com |
7758c47df672e0d4eef177607187dcf2122feb79 | a965262d4f33f01263f5050574bc6b1b397639b2 | /plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmGlobalProperty.java | 6e5864c856cf1dc21d97c44d5de41164999bad68 | [
"Apache-2.0"
] | permissive | mattyen/zstack | e2b4cff83e196c52636b958dd2dc3880e8a29225 | 515c5aa7cdba158d4f60daacd094bdf290422e5c | refs/heads/master | 2021-01-21T18:34:53.347813 | 2015-12-08T06:53:41 | 2015-12-08T06:53:41 | 44,942,834 | 0 | 1 | null | 2015-10-26T03:09:55 | 2015-10-26T03:09:55 | null | UTF-8 | Java | false | false | 983 | java | package org.zstack.appliancevm;
import org.zstack.core.GlobalProperty;
import org.zstack.core.GlobalPropertyDefinition;
/**
*/
@GlobalPropertyDefinition
public class ApplianceVmGlobalProperty {
@GlobalProperty(name = "ApplianceVm.noRollbackOnPostFailure", defaultValue = "false")
public static boolean NO_ROLLBACK_ON_POST_FAILURE;
@GlobalProperty(name = "ApplianceVm.connectVerbose", defaultValue = "false")
public static boolean CONNECT_VERBOSE;
@GlobalProperty(name="ApplianceVm.agentPackageName", defaultValue = "appliancevm-0.9.tar.gz")
public static String AGENT_PACKAGE_NAME;
@GlobalProperty(name="ApplianceVm.agentPort", defaultValue = "7759")
public static int AGENT_PORT;
@GlobalProperty(name="ApplianceVm.agentUrlScheme", defaultValue = "http")
public static String AGENT_URL_SCHEME;
@GlobalProperty(name="ApplianceVm.agentUrlRootPath", defaultValue = "")
public static String AGENT_URL_ROOT_PATH;
}
| [
"xing5820@gmail.com"
] | xing5820@gmail.com |
4c1e61e024c51386c8eeaee7710739bf97c284ca | 686f61ceae34c75e8ff1f0b75cea1f9d61a24d3e | /src/com/javcoder/game/statistics/History.java | 2bcdbca7a9e5a2696ad980e3c87172bbdce8ee16 | [] | no_license | javcoder/GameTK | 13618a84149620d00c4369829c4bf7874f6cd30d | 5069996ea25ef0e3a3477a85ca60f002e646c41d | refs/heads/master | 2016-09-05T11:00:58.570526 | 2011-10-20T00:18:25 | 2011-10-20T00:18:25 | 2,610,063 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 65 | java | package com.javcoder.game.statistics;
public class History {
}
| [
"javcoder@gmail.com"
] | javcoder@gmail.com |
6633f277807db9e3b22d5b0605cd9dd4d16cd443 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/j2objc/2015/8/LambdaExpressionTest.java | 577b86ead34aac03023c5d06efe839f8a761d301 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 8,529 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.devtools.j2objc.ast;
import com.google.devtools.j2objc.GenerationTest;
import com.google.devtools.j2objc.Options;
import com.google.devtools.j2objc.util.FileUtil;
import java.io.IOException;
/**
* Unit tests for {@link LambdaExpression}.
*
* @author Seth Kirby
*/
public class LambdaExpressionTest extends GenerationTest {
@Override
protected void setUp() throws IOException {
tempDir = FileUtil.createTempDir("testout");
Options.load(new String[] { "-d", tempDir.getAbsolutePath(), "-sourcepath",
tempDir.getAbsolutePath(), "-q", // Suppress console output.
"-encoding", "UTF-8", // Translate strings correctly when encodings are nonstandard.
"-source", "8", // Treat as Java 8 source.
"-Xforce-incomplete-java8" // Internal flag to force Java 8 support.
});
parser = GenerationTest.initializeParser(tempDir);
}
private String functionHeader = "interface Function<T, R> { R apply(T t); }";
private String callableHeader = "interface Callable<R> { R call(); }";
private String fourToOneHeader = "interface FourToOne<F, G, H, I, R> {"
+ " R apply(F f, G g, H h, I i); }";
// Test the creation of explicit blocks for lambdas with expression bodies.
public void testBlockBodyCreation() throws IOException {
String translation = translateSourceFile(functionHeader + "class Test { Function f = x -> x;}",
"Test", "Test.m");
assertTranslatedLines(translation, "id x){", "return x;");
}
public void testCaptureDetection() throws IOException {
String nonCaptureTranslation = translateSourceFile(
functionHeader + "class Test { Function f = x -> x;}", "Test", "Test.m");
String nonCaptureTranslationOuter = translateSourceFile(
functionHeader + "class Test { int y; Function f = x -> y;}", "Test", "Test.m");
String captureTranslation = translateSourceFile(
functionHeader + "class Test { Function<Function, Function> f = y -> x -> y;}", "Test",
"Test.m");
assertTranslation(nonCaptureTranslation, "GetNonCapturingLambda");
assertTranslation(nonCaptureTranslationOuter, "GetNonCapturingLambda");
assertTranslatedSegments(captureTranslation, "GetNonCapturingLambda", "GetCapturingLambda");
}
public void testObjectSelfAddition() throws IOException {
String translation = translateSourceFile(callableHeader + "class Test { Callable f = () -> 1;}",
"Test", "Test.m");
assertTranslation(translation, "^id(id _self)");
}
public void testTypeInference() throws IOException {
String quadObjectTranslation = translateSourceFile(
fourToOneHeader + "class Test { FourToOne f = (a, b, c, d) -> 1;}", "Test", "Test.m");
assertTranslatedSegments(quadObjectTranslation, "@selector(applyWithId:withId:withId:withId:)",
"^id(id _self, id a, id b, id c, id d)");
String mixedObjectTranslation = translateSourceFile(fourToOneHeader
+ "class Test { FourToOne<String, Double, Integer, Boolean, String> f = "
+ "(a, b, c, d) -> \"1\";}", "Test", "Test.m");
assertTranslation(mixedObjectTranslation,
"^NSString *(id _self, NSString * a, JavaLangDouble * b, JavaLangInteger * c, JavaLangBoolean * d)");
}
public void testOuterFunctions() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function outerF = (x) -> x;}", "Test", "Test.m");
assertTranslation(translation, "JreStrongAssign(&self->outerF_, GetNonCapturingLambda");
}
public void testStaticFunctions() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { static Function staticF = (x) -> x;}", "Test", "Test.m");
assertTranslatedSegments(translation, "id<Function> Test_staticF_;",
"if (self == [Test class]) {", "JreStrongAssign(&Test_staticF_, GetNonCapturingLambda");
}
public void testNestedLambdas() throws IOException {
String outerCapture = translateSourceFile(functionHeader
+ "class Test { Function<String, Function<String, String>> f = x -> y -> x;}", "Test",
"Test.m");
assertTranslatedSegments(outerCapture, "GetNonCapturingLambda", "@selector(applyWithId:)",
"^id<Function>(id _self, NSString * x)", "return GetCapturingLambda",
"@selector(applyWithId:)", "^NSString *(id _self, NSString * y)", "return x;");
String noCapture = translateSourceFile(functionHeader
+ "class Test { Function<String, Function<String, String>> f = x -> y -> y;}", "Test",
"Test.m");
assertTranslatedSegments(noCapture, "GetNonCapturingLambda",
"@selector(applyWithId:)", "^id<Function>(id _self, NSString * x)",
"return GetNonCapturingLambda", "@selector(applyWithId:)",
"^NSString *(id _self, NSString * y)", "return y;");
}
// Test that we are properly adding protocols for casting.
public void testProtocolCast() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function f = (Function) (x) -> x;}", "Test", "Test.m");
assertTranslatedSegments(translation,
"(id<Function>) check_protocol_cast(GetNonCapturingLambda(@protocol(Function), ",
"Function_class_()");
}
// Test that we aren't trying to import lambda types.
public void testImportExclusion() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function f = (Function) (x) -> x;}", "Test", "Test.m");
assertNotInTranslation(translation, "lambda$0.h");
}
// Check that lambdas are uniquely named.
public void testLambdaUniquify() throws IOException {
String translation = translateSourceFile(functionHeader
+ "class Test { class Foo{ class Bar { Function f = x -> x; }}\n"
+ "Function f = x -> x;}",
"Test", "Test.m");
assertTranslatedSegments(translation, "@\"Test_lambda$", "@\"Test_Foo_Bar_lambda");
}
public void testLargeArgumentCount() throws IOException {
String interfaceHeader = "interface TooManyArgs<T> { T f(T a, T b, T c, T d, T e, T f, T g,"
+ " T h, T i, T j, T k, T l, T m, T n, T o, T p, T q, T r, T s, T t, T u, T v, T w, T x,"
+ " T y, T z, T aa, T ab, T ac, T ad, T ae, T af, T ag, T ah, T ai, T aj, T ak, T al,"
+ " T am, T an, T ao, T ap, T aq, T ar, T as, T at, T au, T av, T aw, T ax, T ay, T az,"
+ " T ba, T bb, T bc, T bd, T be, T bf, T bg, T bh, T bi, T bj, T bk, T bl, T bm, T bn,"
+ " T bo, T bp, T bq, T br, T bs, T bt, T bu, T bv, T bw, T bx, T by, T bz, T foo);}";
String translation = translateSourceFile(interfaceHeader + "class Test { void a() {"
+ "Object foo = \"Foo\";"
+ "TooManyArgs fun = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,"
+ " x, y, z, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as,"
+ " at, au, av, aw, ax, ay, az, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn,"
+ " bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bar) -> foo;}}",
"Test", "Test.m");
assertTranslatedSegments(translation, "^id(id _self, id a, id b, id c, id d, id e, id f, id g,",
" id bs, id bt, id bu, id bv, id bw, id bx, id by, id bz, id ca)",
"return block(_self, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, ",
"bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, ca);",
"^id(id _self, id a, id b, id c, id d, id e, id f, id g, id h, id i, id j, id k, id l, ",
"id bw, id bx, id by, id bz, id bar){");
}
public void testCapturingBasicTypeReturn() throws IOException {
String header = "interface I { int foo(); }";
String translation = translateSourceFile(
header + "class Test { int f = 1234; " + " void foo() { I i = () -> f; } }", "Test",
"Test.m");
assertTranslatedLines(translation, "^jint(id _self){", "return f_;");
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
5c7cf285d6c0d683806c35b3427d3b863bec4fb2 | 56456387c8a2ff1062f34780b471712cc2a49b71 | /b/a/a/a/i/b/s.java | 87a5fc5e2051307213b57f07f21998063e58cfe2 | [] | no_license | nendraharyo/presensimahasiswa-sourcecode | 55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50 | 890fc86782e9b2b4748bdb9f3db946bfb830b252 | refs/heads/master | 2020-05-21T11:21:55.143420 | 2019-05-10T19:03:56 | 2019-05-10T19:03:56 | 186,022,425 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 563 | java | package b.a.a.a.i.b;
import b.a.a.a.a.h;
import b.a.a.a.b.c;
import b.a.a.a.h.b;
import b.a.a.a.i.a.f;
import b.a.a.a.n;
import b.a.a.a.n.e;
public class s
extends f
{
public s() {}
public s(b paramb)
{
super(paramb);
}
public boolean c(n paramn, b.a.a.a.s params, c paramc, h paramh, e parame)
{
return b(paramn, params, paramc, paramh, parame);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\b\a\a\a\i\b\s.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"haryo.nendra@gmail.com"
] | haryo.nendra@gmail.com |
2baa304ecb1768307b17119282df4dc396b63ea6 | 0a68993d4dbb04c4555ad7ec4b922281718b1ff8 | /app/src/main/java/com/ising99/intelligentremotecontrol/modules/MediaShare/MediaShareSectionDelegate.java | 7c0e6503394b273840e8c2dd1ac949ef659ce3e3 | [] | no_license | qi-shun-wang/irc-android | 85103b07c31a5c4eb6a49bddfd92ec7239dba77b | be7335ae4fb83c6cc37566479e7603cbbcb3c3b8 | refs/heads/master | 2021-01-14T17:40:57.540887 | 2018-08-19T04:30:00 | 2018-08-19T04:30:00 | 242,699,226 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.ising99.intelligentremotecontrol.modules.MediaShare;
/**
* Created by shun on 2018/5/2.
* .
*/
public interface MediaShareSectionDelegate {
void didSelectedAt(int position);
}
| [
"shun@bysocity.com"
] | shun@bysocity.com |
c06dcab0244660eb7e0dccdb4a7aae5903895f4e | 596d59292b2355e93f57c1d55f107664adda4e10 | /app/src/main/java/com/rackluxury/lamborghini/activities/FavItemCategories.java | b1870df97c9c683c60192524d821578b7cd44932 | [] | no_license | HarshAProgrammer/Lamborghini | 25dd82af51f29c4d2c4fa4a90c651c3a59b57434 | 6e2a4eda873a376f2d05b74048d7f2e8ea227811 | refs/heads/master | 2023-08-01T03:33:05.151537 | 2021-09-13T16:26:58 | 2021-09-13T16:26:58 | 405,989,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 872 | java | package com.rackluxury.lamborghini.activities;
public class FavItemCategories {
private String item_title;
private String key_id;
private int item_image;
public FavItemCategories() {
}
public FavItemCategories(String item_title, String key_id, int item_image) {
this.item_title = item_title;
this.key_id = key_id;
this.item_image = item_image;
}
public String getItem_title() {
return item_title;
}
public void setItem_title(String item_title) {
this.item_title = item_title;
}
public String getKey_id() {
return key_id;
}
public void setKey_id(String key_id) {
this.key_id = key_id;
}
public int getItem_image() {
return item_image;
}
public void setItem_image(int item_image) {
this.item_image = item_image;
}
}
| [
"App.Lavishly@Gmail.com"
] | App.Lavishly@Gmail.com |
3943218cd56f1a1278f1fc8970b38d839bebbef6 | a1237efcfc0271d8037acfc35c21f7429a243d4b | /enity/Tag.java | 92f591ab096f1f56db5cde663cafb7750ccb613b | [] | no_license | Alex44def/epam-module3-PatternTask2 | 742d922eba5f3d610df1e26348818bedc88aa5c0 | 88060c356529755e923e6aa710cb034e629ddf38 | refs/heads/master | 2022-12-17T21:05:33.305989 | 2020-09-12T06:30:21 | 2020-09-12T06:30:21 | 294,885,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,170 | java | package ru.epam.jonline.module3.work_with_patterns.pattern_task2.enity;
import java.util.Map;
public class Tag {
private String nameTag = "";
private String typeTag = "";
private Map<String, String> attributes;
private String contentTag = "";
public Tag() {
this.nameTag = "";
this.typeTag = "";
this.attributes = null;
this.contentTag = "";
}
public String getContentTag() {
return contentTag;
}
public void setContentTag(String contentTag) {
this.contentTag = contentTag;
}
public String getNameTag() {
return nameTag;
}
public void setNameTag(String nameTag) {
this.nameTag = nameTag;
}
public String getTypeTag() {
return typeTag;
}
public void setTypeTag(String typeTag) {
this.typeTag = typeTag;
}
public Map<String, String> getAttributes() {
return attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes = attributes;
}
@Override
public String toString() {
return "{" + "name='" + nameTag + '\'' + ", type='" + typeTag + '\'' + ", attributes=" + attributes
+ ", content='" + contentTag + '\'' + '}';
}
}
| [
"kuzmin@nextmail.ru"
] | kuzmin@nextmail.ru |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.