blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18e6f60cd625f8a9b08935f3fbc52a925007408f | 91e0da2806cf86d57644e818e335cfa20d34dee6 | /DSPlite/test/com/cetiti/dsp/filter/soapclient/SelectErrorCodeWithDsql.java | c0fb97f03ec44ffd4bed1eb96775b756149a8c2b | [] | no_license | haowwuu/webMybatis | 8365ef1bf9621190b96de0693dda688d7ebacfcc | 6df4bd6427d728c8b505e5bc1b2c4350dfd3dab7 | refs/heads/master | 2021-01-19T13:08:50.641051 | 2017-02-18T06:32:43 | 2017-02-18T06:32:43 | 82,365,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,388 | java |
package com.cetiti.dsp.filter.soapclient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for selectErrorCodeWithDsql complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="selectErrorCodeWithDsql">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="sqlpop" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "selectErrorCodeWithDsql", propOrder = {
"sqlpop"
})
public class SelectErrorCodeWithDsql {
protected String sqlpop;
/**
* Gets the value of the sqlpop property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSqlpop() {
return sqlpop;
}
/**
* Sets the value of the sqlpop property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSqlpop(String value) {
this.sqlpop = value;
}
}
| [
"haogit@126.com"
] | haogit@126.com |
dcb3ce4650a5f433dca93c1d394423def42b7ab0 | fcdb97c58f00c78a8d26d0628243069552ddd307 | /app/src/main/java/com/example/assignment2/weather/Root.java | bd4ba191eedc5f0e3e8ea292bd9b51bc05abbeee | [] | no_license | ldai0008/5046Ass | a4876fb850f7207417220ff6a7da4bf460dccbb1 | ee576ed0bd2d9ffaa27890472d69d4ca1ab453a6 | refs/heads/master | 2023-06-10T15:12:14.207605 | 2021-07-03T06:39:05 | 2021-07-03T06:39:05 | 382,544,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 748 | java | package com.example.assignment2.weather;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class Root {
@SerializedName("weather")
public List<Weather> weather;
@SerializedName("main")
public Main main;
/**
* Get method
* @return the weather
*/
public List<Weather> getWeather() {
return weather;
}
/**
* Mutator method
*
*/
public void setWeather(List<Weather> weather) {
this.weather = weather;
}
/**
* Get method
* @return the main
*/
public Main getMain() {
return main;
}
/**
* Mutator method
*
*/
public void setMain(Main main) {
this.main = main;
}
}
| [
"ldai0008@student.monash.edu"
] | ldai0008@student.monash.edu |
faa57cdaefcfc6b4a9971ffda061d70f2996347d | c9d417950f6cb1ccf37d13c871c70c6c9a8bfa0a | /src/main/java/com/qi/model/SeatState.java | 8717b8230a50471733cc6105277b2a586c79e827 | [] | no_license | qichen90/ticket-service-coding-challenge | bddaa6bacb732f460c5e74ce8fbcedaa1088614b | 29d908838c49621450149d9d3fc452992a888c98 | refs/heads/master | 2020-03-18T05:36:06.538845 | 2018-05-23T03:39:05 | 2018-05-23T03:39:05 | 134,216,583 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 119 | java | package com.qi.model;
/**
* SeatSate is the state of one Seat
*/
public enum SeatState {
HELD, RESERVED, OPEN
}
| [
"chittychen90@gmail.com"
] | chittychen90@gmail.com |
221d079ec54b79735aad2d0d293105f21491aafb | 1572f27a7087746cad0f5d6e3258a23c1e177108 | /Assignments/chapter3Lab.java | 5b39545ce60d0e59a10b2bfb8af1f108190160ab | [] | no_license | BrianOrozco29/CS113 | 123aa748ac20c56f02e5511120cd8a6f76718fb5 | 06396e8b0039f3861b1371553f5fa86c6a6bacaf | refs/heads/master | 2020-03-17T02:45:03.604533 | 2018-05-13T04:05:18 | 2018-05-13T04:05:18 | 133,203,819 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 653 | java | package Assignments;
public class chapter3Lab {
public static void main (String[] args)
{
String college = new String ("PoDunk College");
String town = "Anytown, USA"; // part (a)
int stringLength;
String change1, change2, change3;
stringLength = college.length(); // part (b)
System.out.println (college + " contains " + stringLength + " characters.");
change1 = college.toUpperCase(); // part (c)
change2 = change1.replace('O', '*'); // part (d)
change3 = college.concat(town); // part (e)
System.out.println(change1);
System.out.println(change2);
System.out.println ("The final string is " + change3);
}
} | [
"noreply@github.com"
] | noreply@github.com |
3592d3803e1737aa6c54846d5297214e67f89f24 | c0a8d39dc70d5f70d3873845ceb89feb67d94e7c | /src/util/GeradorUtil.java | 1fa2aa7d0f29d82493c6073cfbfdd2bb86d08cc3 | [] | no_license | OkumaMartyin/Projeto01 | 048d7d62adea7cd35cca222a914c134563ab4cca | 6398fa20066dde9e65b2691f4252b145471dc85f | refs/heads/master | 2023-07-15T11:31:26.115270 | 2021-08-10T00:58:11 | 2021-08-10T00:58:11 | 392,110,494 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,885 | java | package util;
public class GeradorUtil {
//devolve o valor string conforme a quantidade de número solicitado
public static String gerarNumero(int qtd) {
String senha = "";
int numero;
for (int i = 0; i < qtd; i++) {
numero = (int) (Math.random() * 10);
senha += numero;
}
return senha;
}
public double gerarSalario() {
int numero = (int) (Math.random() * 100); //ta forçando a ser inteiro
return numero;
}
public static String gerarCPF() {
return gerarNumero(3) + "." + gerarNumero(3) + "." + gerarNumero(3) + "-" + gerarNumero(2);
}
public static String gerarCNPJ() {
return gerarNumero(2) + "." + gerarNumero(3) + "." + gerarNumero(3) + "/" + gerarNumero(4) + "-" + gerarNumero(2);
}
public static String gerarTelFix() {
return "(48)3" + gerarNumero(3) + "-" + gerarNumero(4);
}
public static String gerarCelular() {
return "(48)9" + gerarNumero(3) + "-" + gerarNumero(4);
}
public static String gerarCEP() {
return gerarNumero(5) + "-" + gerarNumero(3);
}
public String gerarNome() {
String[] nomes = {"Martao", "Silvio", "Maria Eugenia", "Pedro",
"Carlos dos Santos", "Vinicius", "Tânia mt gatinhaa", "Tati", "Tonio",
"Chico", "Gigio", "Samira", "Mariele", "William", "Hugo", "Otavio",
"Ana", "Bolsonaro", "Lula", "Marisa"};
int tamanhoLista = nomes.length;
int indice = (int) (Math.random() * tamanhoLista);
return nomes[indice] + " "+ gerarSobrenome();
}
private String gerarSobrenome() {
String[] sobrenomes = {"Muuuito gato", "Silva", "Eugenia", "Mota",
"dos Santos", "Abravanel", "Gostosa", "Safadinha", "Pirocudo",
"Bucetuda", "Cu de engole pica", "22cm de fimose", "Lenhador",
"Mestre de obra", "Maconha!", "Cavalos", "Luiza", "Petista", "PSDB", "Kegler"};
int tamanhoLista = sobrenomes.length;
int indice = (int) (Math.random() * tamanhoLista);
return sobrenomes[indice];
}
public static void main(String[] args) {
GeradorUtil util = new GeradorUtil();
String cpf = util.gerarCPF();
String cnpj = util.gerarCNPJ();
String telefoneFixo = util.gerarTelFix();
String telefoneCelular = util.gerarCelular();
String cep = util.gerarCEP();
String nome = util.gerarNome();
System.out.println("CPF " + cpf);
System.out.println("CNPJ " + cnpj);
System.out.println("Telefone Fixo: " + telefoneFixo);
System.out.println("Telefone Celular: " + telefoneCelular);
System.out.println("CEP " + cep);
System.out.println("Nome: " + nome);
}
}
| [
"martyin.okuma@PLE111D16.alunos.sc.senac.br"
] | martyin.okuma@PLE111D16.alunos.sc.senac.br |
7d290e83e7496c5460710c9d9bf9d7a46a7fa6d5 | 7e1da91e3d10f133c5d1204983d7bda11223da2e | /app/src/main/java/com/example/mashaweer/notificatios/MyFirebaseMessagingService.java | 7380288a3d6f150624fd5fee12c8a8056982a29c | [] | no_license | Middle-east1/app | 3ca38bab799e95f5aa0413c08dfc139177b6a728 | cc5d530148cd4913e8edc269cbc5fcedbd39c9e9 | refs/heads/master | 2020-06-09T16:00:12.584739 | 2019-06-26T14:57:32 | 2019-06-26T14:57:32 | 193,464,357 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,529 | java | package com.example.mashaweer.notificatios;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
import com.example.mashaweer.R;
import com.example.mashaweer.ui.HomeActivity;
import com.example.mashaweer.ui.NotificationActivity;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import java.util.Random;
public class MyFirebaseMessagingService extends FirebaseMessagingService {
// Sets an ID for the notification
int mNotificationId = 001;
private NotificationManager notificationManager;
private static final String ADMIN_CHANNEL_ID = "admin_channel";
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
//You should use an actual ID instead
int notificationId = new Random().nextInt(60000);
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
setupChannels();
}
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, ADMIN_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_launcher_background)
.setContentTitle(remoteMessage.getData().get("title"))
.setStyle(new NotificationCompat.BigPictureStyle()
.setSummaryText(remoteMessage.getData().get("message")))
.setContentText(remoteMessage.getData().get("message"))
.setAutoCancel(true)
.setSound(defaultSoundUri);
// Create pending intent, mention the Activity which needs to be
//triggered when user clicks on notification(StopScript.class in this case)
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
new Intent(this, NotificationActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
notificationBuilder.setContentIntent(contentIntent);
// Gets an instance of the NotificationManager service
NotificationManager mNotificationManager =
(NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
// Builds the notification and issues it.
mNotificationManager.notify(mNotificationId, notificationBuilder.build());
}
@RequiresApi(api = Build.VERSION_CODES.O)
private void setupChannels() {
CharSequence adminChannelName = "";
String adminChannelDescription = "";
NotificationChannel adminChannel;
adminChannel = new NotificationChannel(ADMIN_CHANNEL_ID, adminChannelName, NotificationManager.IMPORTANCE_LOW);
adminChannel.setDescription(adminChannelDescription);
adminChannel.enableLights(true);
adminChannel.setLightColor(Color.RED);
adminChannel.enableVibration(true);
if (notificationManager != null) {
notificationManager.createNotificationChannel(adminChannel);
}
}
} | [
"middleeastapp67@gmail.com"
] | middleeastapp67@gmail.com |
e37529651d8a022aa5f6b8db4ae9b4bde43b0bcd | beddbceaee62ec25d4ec31198aad8b309d9bc10b | /src/main/java/com/springboot/ybt/util/TreeUtil.java | 3a6b1c862c96f601975fd697f97dd74d7a156434 | [] | no_license | liuc8023/ybt | 2de025953f01fc997b01fa234429184153670949 | 4a60d6c28b62d631330cc09ab657cf02505be3b2 | refs/heads/master | 2021-01-13T09:19:25.195231 | 2018-01-16T08:10:31 | 2018-01-16T08:10:31 | 68,994,740 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 894 | java | package com.springboot.ybt.util;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.springboot.ybt.base.pojo.TreeNode;
/**
* Created by billJiang on 2017/2/12.
* e-mail:jrn1012@petrochina.com.cn qq:475572229
*/
public class TreeUtil {
public static List<TreeNode> getNodeList(Map<String, TreeNode> nodelist) {
List<TreeNode> tnlist=new ArrayList<>();
for (String id : nodelist.keySet()) {
TreeNode node = nodelist.get(id);
if (StrUtil.isEmpty(node.getParentId())) {
tnlist.add(node);
} else {
if (nodelist.get(node.getParentId()).getNodes() == null)
nodelist.get(node.getParentId()).setNodes(new ArrayList<TreeNode>());
nodelist.get(node.getParentId()).getNodes().add(node);
}
}
return tnlist;
}
}
| [
"13764402356@163.com"
] | 13764402356@163.com |
0790700c446f62fe832299c3e418388b80b26346 | b868a1cce5820782ba696981211d93e5caa8f623 | /org.summer.dsl.builder/src/org/summer/dsl/builder/resourceloader/IResourceLoader.java | ada1945baeef9897f66bffc90aed151dbd0af770 | [] | no_license | zwgirl/summer | 220693d71294f8ccffe1b58e8bc1dea44536c47c | 1da11dfb5c323d805422c9870382fb0a81d5a8f1 | refs/heads/master | 2021-01-22T22:57:46.801255 | 2014-04-29T22:00:21 | 2014-04-29T22:00:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,054 | java | /*******************************************************************************
* Copyright (c) 2011 Sigasi NV (http://www.sigasi.com) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Lieven Lemiengre - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.summer.dsl.builder.resourceloader;
import java.util.Collection;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import com.google.common.collect.Lists;
import com.google.inject.ImplementedBy;
/**
*
* @author Lieven Lemiengre - Initial contribution and API
* @since 2.1
*/
@ImplementedBy(SerialResourceLoader.class)
public interface IResourceLoader {
/**
* Create a LoadOperation.
* Be careful, while the load operation is running the parent ResourceSet may be read from different threads.
* Synchronize on the parent ResourceSet when you interact with it!
*
* @param parent the parent ResourceSet
* @return a LoadOperation
*/
LoadOperation create(ResourceSet parent, IProject project);
/**
* The Interface LoadOperation.
*/
interface LoadOperation {
/**
* Load the resources.
*
* @param uris the uris
* @throws IllegalStateException If the loading was already started or it was cancelled
*/
void load(Collection<URI> uris);
/**
* Checks if the ResourceLoader is still processing resources.
*
* @return true, if successful
* @throws IllegalStateException If the loading was cancelled or it hasn't started yet.
*/
boolean hasNext();
/**
* Get the next {@link LoadResult}.
* This is a blocking call, it returns the next result that was finished processing.
*
* @return the next available load result
* @throws IllegalStateException If the loading was cancelled or it hasn't started yet.
* @throws LoadOperationException the load operation exception
*/
LoadResult next() throws LoadOperationException;
/**
* Cancel loading the resources. This method can be executed multiple times.
*
* @return the collection
*/
Collection<URI> cancel();
}
/**
* Represents a resource with its associated {@link URI}, which was used to load or look up the resource from its {@link ResourceSet}
*
* Note, that the {@link URI} returned from {@link #getUri()} must not neccessarily be equals to what'S returned by {@link #getResource()}.getURI().
*/
static class LoadResult {
private Resource resource;
private URI uri;
public Resource getResource() {
return resource;
}
public URI getUri() {
return uri;
}
public LoadResult(Resource resource, URI uri) {
super();
this.resource = resource;
this.uri = uri;
}
}
@ImplementedBy(org.summer.dsl.builder.resourceloader.IResourceLoader.Sorter.NoSorting.class)
interface Sorter {
Collection<URI> sort(Collection<URI> uris);
class NoSorting implements Sorter {
public Collection<URI> sort(Collection<URI> uris) {
return Lists.newArrayList(uris);
}
}
}
/**
* The Class LoadOperationException.
*/
class LoadOperationException extends WrappedException {
private static final long serialVersionUID = 8499010336607816601L;
private final URI uri;
/**
* Instantiates a new load operation exception.
*
* @param uri the uri of the resource that failed to load
* @param exception the exception
*/
public LoadOperationException(URI uri, Exception exception) {
super(exception);
this.uri = uri;
}
/**
* Gets the URI of the resource that failed to load.
*
* @return the uri
*/
public URI getUri() {
return uri;
}
}
}
| [
"1141196380@qq.com"
] | 1141196380@qq.com |
aff8201d5025b3a64887d2341bdf62f16819c8c9 | 0742ece6d9240c9780de585b4ad41395826da371 | /prestamos/src/prestamos/ItemType.java | 6b5f360f21275e7e6621703207d4712dfe09a387 | [] | no_license | rduqueuc/prestamos | ecb0b8badd537bd072d3ebb99c8e3e0d3227ab7d | 781d2984a4af6ea8d68120ea4e6aea0c2d009be9 | refs/heads/master | 2021-01-18T16:30:16.830144 | 2014-03-26T08:11:57 | 2014-03-26T08:11:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 546 | java | package prestamos;
public class ItemType {
private String typeName = null;
public ItemType(String name) {
setName(name);
}
private void setName(String name) {
typeName = name;
}
public String getName() {
return typeName;
}
public boolean equals(Object obj) {
if (obj instanceof ItemType) {
ItemType other = (ItemType) obj;
return this.getName().equals(other.getName());
}
return false;
}
public String toString() {
return getName().toString();
}
}
| [
"rduquemedina@gmail.com"
] | rduquemedina@gmail.com |
ac3636260e691721a369af874c19aed1bac528fe | 52f726ee3a68fc7aa90626525ee65aded1e538f2 | /api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/model/support/services/stream/hazelcast/StreamServicesHazelcastProperties.java | 89923919cb1915b1471191f1d3c9d8f721cd4f54 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | williame-uah/cas | 7840e157c7f6d9ea1829a0a166b1c34786d2bab9 | ec9bf669c99141996dfce24f557b8dac83408ff8 | refs/heads/master | 2020-03-10T03:54:35.089517 | 2018-04-11T21:02:03 | 2018-04-11T21:02:03 | 129,178,333 | 0 | 0 | Apache-2.0 | 2018-04-12T02:00:44 | 2018-04-12T02:00:44 | null | UTF-8 | Java | false | false | 1,820 | java | package org.apereo.cas.configuration.model.support.services.stream.hazelcast;
import lombok.extern.slf4j.Slf4j;
import org.apereo.cas.configuration.model.support.hazelcast.BaseHazelcastProperties;
import org.apereo.cas.configuration.model.support.services.stream.BaseStreamServicesProperties;
import org.apereo.cas.configuration.support.RequiresModule;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import lombok.Getter;
import lombok.Setter;
/**
* This is {@link StreamServicesHazelcastProperties}.
*
* @author Misagh Moayyed
* @since 5.2.0
*/
@RequiresModule(name = "cas-server-support-service-registry-stream-hazelcast")
@Slf4j
@Getter
@Setter
public class StreamServicesHazelcastProperties extends BaseStreamServicesProperties {
private static final long serialVersionUID = -1583614089051161614L;
/**
* Default port.
*/
private static final int PORT = 5801;
/**
* Duration that indicates how long should items be kept in the hazelcast cache.
* Note that generally this number needs to be short as once an item is delivered
* to a target, it is explicitly removed from the cache/queue. This duration needs to be
* adjusted if the latency between the CAS nodes in the cluster is too large. Having too
* short a value will cause the record to expire before it reaches other members of the cluster.
*/
private String duration = "PT1M";
/**
* Configuration of the hazelcast instance to queue and stream items.
*/
@NestedConfigurationProperty
private BaseHazelcastProperties config = new BaseHazelcastProperties();
public StreamServicesHazelcastProperties() {
config.getCluster().setPort(PORT);
config.getCluster().setInstanceName("localhost-services-replication");
}
}
| [
"mmoayyed@unicon.net"
] | mmoayyed@unicon.net |
cd7fad8ba0a943c1a49c5856ea9292629705a7b4 | 7596b13ad3a84feb67f05aeda486e8b9fc93f65f | /getAndroidAPI/src/java/security/cert/CertificateExpiredException.java | 04850742d101ba6013dc137ab7161f9dfe8d3e49 | [] | no_license | WinterPan2017/Android-Malware-Detection | 7aeacfa03ca1431e7f3ba3ec8902cfe2498fd3de | ff38c91dc6985112e958291867d87bfb41c32a0f | refs/heads/main | 2023-02-08T00:02:28.775711 | 2020-12-20T06:58:01 | 2020-12-20T06:58:01 | 303,900,592 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 612 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: CertificateExpiredException.java
package java.security.cert;
// Referenced classes of package java.security.cert:
// CertificateException
public class CertificateExpiredException extends CertificateException
{
public CertificateExpiredException()
{
throw new RuntimeException("Stub!");
}
public CertificateExpiredException(String message)
{
throw new RuntimeException("Stub!");
}
}
| [
"panwentao1301@163.com"
] | panwentao1301@163.com |
b121de822cbb4d45086866befa5635b62620a8dc | cb20347ca732a3b58d9cb5a6339baf289083b171 | /omts-booking-ms/src/main/java/com/capg/omts/booking/model/Customer.java | 00cbb29015ee13d82bfc65dfb90a7d132ebc25ed | [] | no_license | rahul9230/BookingMS | 1977365f396c22ff32c2599cfd7b3b5344a4c8d3 | 74dc55f8c1314ea4a424b346fcefb051c5f1ce11 | refs/heads/master | 2022-12-16T07:33:20.776463 | 2020-09-10T11:38:35 | 2020-09-10T11:38:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,962 | java | package com.capg.omts.booking.model;
import java.time.LocalDate;
import java.util.List;
public class Customer {
private String customerId;
private String customerName;
private String customerPassword;
private LocalDate dateOfBirth;
private List<Integer> myTickets;
private String customerContact;
public Customer() {
super();
}
public Customer(String customerId, String customerName, String customerPassword, LocalDate dateOfBirth,
List<Integer> myTickets, String customerContact) {
super();
this.customerId = customerId;
this.customerName = customerName;
this.customerPassword = customerPassword;
this.dateOfBirth = dateOfBirth;
this.myTickets = myTickets;
this.customerContact = customerContact;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPassword() {
return customerPassword;
}
public void setCustomerPassword(String customerPassword) {
this.customerPassword = customerPassword;
}
public LocalDate getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(LocalDate dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
public List<Integer> getMyTickets() {
return myTickets;
}
public void setMyTickets(List<Integer> myTickets) {
this.myTickets = myTickets;
}
public String getCustomerContact() {
return customerContact;
}
public void setCustomerContact(String customerContact) {
this.customerContact = customerContact;
}
@Override
public String toString() {
return "Customer [customerId=" + customerId + ", customerName=" + customerName + ", customerPassword="
+ customerPassword + ", dateOfBirth=" + dateOfBirth + ", myTickets=" + myTickets + ", customerContact="
+ customerContact + "]";
}
} | [
"rahulkasturi92300@gmail.com"
] | rahulkasturi92300@gmail.com |
4e46debd4ea1a664f80994159c219adb638b9ab6 | 55ec8400194f26d6ad1e26fc79743dacedafd772 | /src/main/java/Lab3VVSS/Exceptions/ServiceException.java | e51db5222e168279ea0454bb1bee48070f6bb0e9 | [] | no_license | AlexMurariu/vvss | 83de4371f5350ed2b9efd58775a8b8cab37dca92 | 79b6b3b2404f06a47dffd5eafc271c2628fff257 | refs/heads/master | 2021-03-24T05:27:33.541819 | 2020-04-08T08:45:38 | 2020-04-08T08:45:38 | 247,521,524 | 0 | 0 | null | 2020-10-13T20:23:15 | 2020-03-15T17:59:27 | Java | UTF-8 | Java | false | false | 256 | java | package Lab3VVSS.Exceptions;
public class ServiceException extends RuntimeException {
String message;
public ServiceException(String message){
this.message=message;
}
public String getMessage(){
return this.message;
}
} | [
"alexmurariu97@yahoo.com"
] | alexmurariu97@yahoo.com |
46c0f8dfb9a72c315f9c268812324fcb8eb3d610 | ac7f1905cefa2716f0562fe396275e6fa725f0b5 | /Singleton/src/singleton/Singleton_02.java | c57edb0ca6b465ea07aad37cf0278b0f94639877 | [
"MIT"
] | permissive | raylia-w/workspace | 41db8e69e06d8adc3da4c9c8d1d5129115178a7e | b8e26d609c7c891a728e98df6ceefb0ecadf6d6c | refs/heads/master | 2020-03-17T16:34:58.510296 | 2018-05-17T03:26:01 | 2018-05-17T03:26:01 | 133,754,124 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package singleton;
public class Singleton_02 {
private static Singleton_02 instance;
//private 생성자
private Singleton_02() {
}
//static 초기화 블록
//최초 1회만 수행되는 코드
static {
try {
instance = new Singleton_02();
}catch(Exception e) {
e.printStackTrace();
}
}
//인스턴스 반환 메소드
public static Singleton_02 getInstance() {
return instance;
}
}
| [
"august9510@naver.com"
] | august9510@naver.com |
d1b835b82aee416002f315704e4b92104c336c82 | c5d7f6169c90441d7a71600d0a19cfc76b8caadc | /src/java/Utilidades/VerificarConexion.java | e23cc307e0f0e7d81f3424b23d4fe3b8dd5c9e9f | [] | no_license | MrCanchila/SIGEMED | ed06f6c3bb6bce406a44538174dec4817b12aaf4 | 1338ca24aac172622be90e8f96aebd98cb637969 | refs/heads/master | 2020-04-06T03:57:08.449096 | 2015-03-31T17:35:41 | 2015-03-31T17:35:41 | 33,199,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,417 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Utilidades;
//import Autorizaciones.AutorizacionDAO;
//import Autorizaciones.AutorizacionDTO;
import Persona.PersonaDAO;
import Persona.PersonaDTO;
import Usuarios.UsuarioDAO;
import Usuarios.UsuarioDTO;
//import Usuarios.UsuarioDAO;
//import Usuarios.UsuarioDTO;
//import Usuarios.UsuarioDAO;
//import Usuarios.UsuarioDTO;
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.util.ArrayList;
/**
*
* @author SONY
*/
public class VerificarConexion {
public static void main(String[] arg) {
// UsuarioDTO userDTO = new UsuarioDTO();
// UsuarioDAO userDAO = new UsuarioDAO();
////
//// userDTO.setIdusuario(3);
//// userDTO.setIdpersona(101923444);
// userDTO.setUsuario("ambalanta");
// userDTO.setClave("ambalanta2014");
////
// System.out.println(userDAO.registrarUsuario(userDTO));
PersonaDTO perDTO = new PersonaDTO();
PersonaDAO perDAO = new PersonaDAO();
UsuarioDTO usDTO = new UsuarioDTO();
UsuarioDAO usDAO = new UsuarioDAO();
perDTO.setNom1("Miguel");
perDTO.setNom2("");
perDTO.setApe1("Hernández");
perDTO.setApe2("");
perDTO.setTpdoc(1);
perDTO.setIdPersona(1023896797);
perDTO.setCorreo("mhernandez@mdiee.edu.co");
System.out.println(perDAO.registrarPersona(perDTO));
// UsuarioDTO userDTO = new UsuarioDTO();
// UsuarioDAO userDAO = new UsuarioDAO();
//
// userDTO.setIdusuario(3);
// userDTO.setIdpersona(101923444);
// userDTO.setUsuario("ambalanta");
// userDTO.setClave("ambalanta2014");
//
// System.out.println(userDAO.registrarUsuario(userDTO));
// AutorizacionDTO autozDTO = new AutorizacionDTO();
// AutorizacionDAO autozDAO = new AutorizacionDAO();
//
// autozDTO.setIdautoriz(20150022);
// autozDTO.setIdpaciente(23);
//
}
}
| [
"amcanchila@misena.edu.co"
] | amcanchila@misena.edu.co |
befa63bd6cd07a5e6127f506f53f57a85cc0560e | c68b40a5368ec202494eb96f5e25f98f98fa86b6 | /geek-market/src/test/java/com/geekbrains/geekmarket/GeekMarketApplicationTests.java | 9cce44fc014ccf0ee97d0fd4ef6265c76a72ee4c | [] | no_license | soloyes/geekbrains | c7c3987f7ed9299ce1edb9dd62958c1b1297ad62 | d80e12301736889b65eeab79e6581a851cef49e8 | refs/heads/master | 2022-12-25T04:17:51.114185 | 2019-11-12T05:32:17 | 2019-11-12T05:32:17 | 104,780,441 | 0 | 4 | null | 2022-12-16T00:46:49 | 2017-09-25T17:25:56 | Java | UTF-8 | Java | false | false | 304 | java | package com.geekbrains.geekmarket;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class GeekMarketApplicationTests {
}
| [
"solo-yes@mail.ru"
] | solo-yes@mail.ru |
bdb7161b0d76ae3ba0f415d3fa6549dbdc222ca3 | 039994029410c98ea2004004ff85f228c6ec374b | /second_kill/miaosha_1/src/main/java/com/imooc/miaosha/validator/IsMobileValidator.java | 92b2b1a9cc50bf3a26bae09446d8ddf62baa3b36 | [] | no_license | niepugithub/comprehensive_project | 983de1e337c25edab6bf5e2d977799685dce44a9 | c638284ab383b20a36ba3593b11957f4a94bb6d1 | refs/heads/master | 2020-03-29T22:53:18.731482 | 2019-01-05T07:01:48 | 2019-01-05T07:01:48 | 150,445,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 945 | java | package com.imooc.miaosha.validator;
import com.imooc.miaosha.util.ValidatorUtil;
import org.thymeleaf.util.StringUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* @description:光有IsMobile注解是不行的,还需要校验器
* @author:niepu
* @version:1.0
* @date:2018/10/5 10:15
**/
public class IsMobileValidator implements ConstraintValidator<IsMobile,String>{
private boolean required=false;
@Override
public void initialize(IsMobile isMobile) {
required=isMobile.required();
}
@Override
public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
if(required){
return ValidatorUtil.isMobile(s);
}else {
if(StringUtils.isEmpty(s)){
return true;
}else{
return ValidatorUtil.isMobile(s);
}
}
}
}
| [
"niepu1991@163.com"
] | niepu1991@163.com |
cf3e12f27b4973611b66953e755011e09724f9d8 | 2a065702f39978e7245dc35b15441c867b961125 | /app/src/main/java/cn/co/com/newpanda/module/home/contract/VideoContract.java | e262377890923b6c60859253bf8d875b0e5745ff | [] | no_license | zj1173171513/IPanda | 46d8e25b5a7497023ed2842b1985f68be6dff6d1 | 6c9240656015d25cc76d26b29306877441b10677 | refs/heads/master | 2021-07-02T21:00:06.026856 | 2017-09-22T14:06:46 | 2017-09-22T14:06:46 | 103,404,462 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 558 | java | package cn.co.com.newpanda.module.home.contract;
import cn.co.com.newpanda.base.BasePresenter;
import cn.co.com.newpanda.base.BaseView;
import cn.co.com.newpanda.model.entity.pandaliveBean.VideoBeans;
/**
* Created by 丶 on 2017/9/20.
*/
public interface VideoContract {
interface View extends BaseView<ActivityPresnter> {
void setResult(VideoBeans videoBeans);
void showProgressDialog();
void dismissDialog();
void showMessage(String msg);
}
interface ActivityPresnter extends BasePresenter {
}
}
| [
"930901714@qq.com"
] | 930901714@qq.com |
74218c6b47f8f5b9d012309ca99e445b4b4fc119 | 34283f1f223530073844120ba95f2070a0ee6ff0 | /Java/DistinctCount.java | 87ed0270af4f4bef377c4afa3ffa11d0b410592e | [] | no_license | hienmv/Problems-Solving | 7275dee51bd77a3e1e7e54d73cf2fdbdb879efd6 | deaaaac9668a749f379ecc2b5e399fe0565b3138 | refs/heads/develop | 2021-06-06T04:04:38.069944 | 2021-05-04T11:32:08 | 2021-05-04T11:39:11 | 135,049,232 | 8 | 0 | null | 2021-05-03T11:51:23 | 2018-05-27T13:33:39 | Java | UTF-8 | Java | false | false | 796 | java | /**
* https://www.hackerearth.com/practice/data-structures/trees/binary-search-tree/practice-problems/algorithm/distinct-count/
* #binary-search-tree
*/
import java.util.Scanner;
import java.util.TreeSet;
public class DistinctCount {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tc = sc.nextInt();
int x, n, tmp;
for (int t = 0; t < tc; t++) {
n = sc.nextInt();
x = sc.nextInt();
TreeSet<Integer> ts = new TreeSet<>();
for (int i = 0; i < n; i++) {
tmp = sc.nextInt();
ts.add(tmp);
}
if (x == ts.size()) {
System.out.println("Good");
} else if (x < ts.size()) {
System.out.println("Average");
} else {
System.out.println("Bad");
}
}
}
}
| [
"hienmv.vn@gmail.com"
] | hienmv.vn@gmail.com |
f62de507e604fd38f85a51622135d14827b8b764 | 4c41b6becf56fb1848aca6180a6b1339c7ae3936 | /app/src/main/java/org/chat/lib/widget/IndicatorView.java | 40b3a59cacb5e39b8a8b1753a6a1fff73865d91b | [
"MIT"
] | permissive | elastos/Elastos.App.Wallet.Elephant.Android | b8ba602d22141fe1cbd2ce2ccafb3b30c4fd2f64 | 90cfbe56eae978dee5235966f86c5f5749d7d8dd | refs/heads/master | 2021-07-11T16:56:33.707397 | 2020-06-30T04:43:17 | 2020-06-30T04:43:17 | 152,515,497 | 4 | 9 | MIT | 2020-06-30T04:43:19 | 2018-10-11T01:56:58 | Java | UTF-8 | Java | false | false | 2,277 | java | package org.chat.lib.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import com.breadwallet.R;
import org.chat.lib.utils.Utils;
import java.util.ArrayList;
public class IndicatorView extends LinearLayout {
private Context mContext;
private ArrayList<View> mImageViews;//所有指示器集合
private int size = 6;
private int marginSize = 15;
private int pointSize;//指示器的大小
private int marginLeft;//间距
public IndicatorView(Context context) {
this(context, null);
}
public IndicatorView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public IndicatorView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mContext = context;
pointSize = Utils.dp2px(context, size);
marginLeft = Utils.dp2px(context, marginSize);
}
/**
* 初始化指示器
*
* @param count 指示器的数量
*/
public void initIndicator(int count) {
mImageViews = new ArrayList<>();
this.removeAllViews();
LayoutParams lp;
for (int i = 0; i < count; i++) {
View v = new View(mContext);
lp = new LayoutParams(pointSize, pointSize);
if (i != 0)
lp.leftMargin = marginLeft;
v.setLayoutParams(lp);
if (i == 0) {
v.setBackgroundResource(R.drawable.bg_circle_white);
} else {
v.setBackgroundResource(R.drawable.bg_circle_gary);
}
mImageViews.add(v);
this.addView(v);
}
}
/**
* 页面移动时切换指示器
*/
public void playByStartPointToNext(int startPosition, int nextPosition) {
if (startPosition < 0 || nextPosition < 0 || nextPosition == startPosition) {
startPosition = nextPosition = 0;
}
final View ViewStrat = mImageViews.get(startPosition);
final View ViewNext = mImageViews.get(nextPosition);
ViewNext.setBackgroundResource(R.drawable.bg_circle_white);
ViewStrat.setBackgroundResource(R.drawable.bg_circle_gary);
}
}
| [
"xidaokun@elastos.org"
] | xidaokun@elastos.org |
c42d5443deb7352fc92db5adf7b344d1eef4c2c0 | b2a66e2e04d9e646ec6b7827d3f7b9583ae28be2 | /bank/src/main/java/com/elt/bank/service/CustomerService.java | a0317c83c6b85174f21434783d5fb47fd954b250 | [] | no_license | vjymits/eltropytest | b85ffdb2bc2fe3edcdf8954d7d48671dd864f4f1 | 8ab8de62ed222d955f62ee960277052b83c1418f | refs/heads/master | 2023-02-06T00:05:16.333794 | 2020-12-28T13:30:15 | 2020-12-28T13:30:15 | 324,528,818 | 0 | 0 | null | 2020-12-28T13:24:14 | 2020-12-26T10:13:32 | Java | UTF-8 | Java | false | false | 461 | java | package com.elt.bank.service;
import com.elt.bank.modal.Customer;
import java.util.Map;
import java.util.Optional;
public interface CustomerService {
public Customer createCustomer(Map<String, String> m);
public Optional<Customer> getCustomerById(long id);
public Customer deleteCustomer(Customer c);
public Customer updateCustomer(Customer c, Map<String, String> m);
public Customer updateKYC(Customer c, String pan, String aadhar);
}
| [
"vjymits@gmail.com"
] | vjymits@gmail.com |
c0a5bf71b7a1836a1c86e5580d65d45a2bd0195a | 81ae03175fa4708a57fac059bdcc3669232a9021 | /FirmaElectronica/src/es/mityc/firmaJava/libreria/xades/elementos/XMLDataIntegerType.java | c12e4734d741490957e7b58c004d31feb5078145 | [] | no_license | Idonius/rsp | 0889965b83b0adaff0a9a0406ab60db9672500ee | bb7dbbcad047fd2cf1c2e4a07e3c1135f555534a | refs/heads/master | 2020-04-25T12:21:30.005604 | 2015-08-22T00:43:11 | 2015-08-22T00:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,017 | java | /**
* Copyright 2013 Ministerio de Industria, Energía y Turismo
*
* Este fichero es parte de "Componentes de Firma XAdES".
*
* Licencia con arreglo a la EUPL, Versión 1.1 o –en cuanto sean aprobadas por la Comisión Europea– versiones posteriores de la EUPL (la Licencia);
* Solo podrá usarse esta obra si se respeta la Licencia.
*
* Puede obtenerse una copia de la Licencia en:
*
* http://joinup.ec.europa.eu/software/page/eupl/licence-eupl
*
* Salvo cuando lo exija la legislación aplicable o se acuerde por escrito, el programa distribuido con arreglo a la Licencia se distribuye «TAL CUAL»,
* SIN GARANTÍAS NI CONDICIONES DE NINGÚN TIPO, ni expresas ni implícitas.
* Véase la Licencia en el idioma concreto que rige los permisos y limitaciones que establece la Licencia.
*/
package es.mityc.firmaJava.libreria.xades.elementos;
import java.math.BigInteger;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import es.mityc.firmaJava.libreria.xades.errores.InvalidInfoNodeException;
public class XMLDataIntegerType extends AbstractXMLElement {
protected BigInteger value;
/**
*
*/
public XMLDataIntegerType(BigInteger value) {
this.value = value;
}
/**
* @see es.mityc.firmaJava.libreria.xades.elementos.AbstractXMLElement#addContent(org.w3c.dom.Element)
*/
@Override
public void addContent(Element element) throws InvalidInfoNodeException {
if (value == null)
throw new InvalidInfoNodeException("Información insuficiente para escribir nodo XMLDataStringType");
element.setTextContent(value.toString());
}
/**
* @see es.mityc.firmaJava.libreria.xades.elementos.AbstractXMLElement#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj instanceof XMLDataIntegerType) {
XMLDataIntegerType xdst = (XMLDataIntegerType) obj;
if (value.equals(xdst))
return true;
} else if (obj instanceof String) {
String data = (String) obj;
if (value.equals(data))
return true;
}
return false;
}
/**
* @see es.mityc.firmaJava.libreria.xades.elementos.AbstractXMLElement#load(org.w3c.dom.Element)
*/
@Override
public void load(Element element) throws InvalidInfoNodeException {
Node node = getFirstNonvoidNode(element);
if (node.getNodeType() != Node.TEXT_NODE)
throw new InvalidInfoNodeException("Nodo xsd:string no contiene CDATA como primer valor");
try {
String strvalue = node.getNodeValue();
if (strvalue == null)
throw new InvalidInfoNodeException("Contenido de valor de xsd.string vacío");
this.value = new BigInteger(strvalue);
} catch (NumberFormatException ex) {
throw new InvalidInfoNodeException("Contenido de valor de xsd.integer no numérico");
}
}
/**
* @return the value
*/
public BigInteger getValue() {
return value;
}
/**
* @param value the value to set
*/
public void setValue(BigInteger value) {
this.value = value;
}
}
| [
"fensefernando@gmail.com"
] | fensefernando@gmail.com |
99ad56063cd03ccce30039d045eb2d51cd3d61c6 | 10e7d16c0deb7ee1eefa5b4c87d2229f831bedc5 | /org.piacere.dsl.parent/org.piacere.dsl.rmdf.ui/src/org/piacere/dsl/ui/RMDFUiModule.java | b9d338a58d7c951aaff3f8fb9b3e87799a5123df | [
"MIT"
] | permissive | tasiomendez/iac-modelling-doml | b624e296d1aefa816943c95a5092bf63906120e8 | 2ae73977485e386d7ce6ea194b90c872c7374784 | refs/heads/master | 2023-08-10T19:34:57.470152 | 2021-09-30T16:22:00 | 2021-09-30T16:22:00 | 362,755,434 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | /*
* generated by Xtext 2.25.0
*/
package org.piacere.dsl.ui;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider;
import org.piacere.dsl.ui.hovering.RMDFHoverProvider;
/**
* Use this class to register components to be used within the Eclipse IDE.
*/
public class RMDFUiModule extends AbstractRMDFUiModule {
public RMDFUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
return RMDFHoverProvider.class;
}
}
| [
"tm.tasio@gmail.com"
] | tm.tasio@gmail.com |
0f625bf11ee8e8d15e13136985feb6a60c01f9bf | 94243e15cfe9cccdf3638d53527fa58327efac29 | /habeascorpus_tokens/batik-1.7/sources/org/apache/batik/extension/svg/FlowRegionElement.java | e44a3655fb482b7440be031b200e28ab7d8d8aba | [] | no_license | habeascorpus/habeascorpus-data-withComments | 4e0193450273f2d46ea9ef497746aaf93b5fc491 | 3a516954b42b24c93a8d1e292ff0a0907bed97ad | refs/heads/master | 2021-01-20T21:53:35.264690 | 2015-05-22T14:59:36 | 2015-05-22T14:59:36 | 18,139,450 | 3 | 1 | null | 2023-03-20T11:51:26 | 2014-03-26T13:45:05 | Java | UTF-8 | Java | false | false | 5,961 | java | /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ TokenNameCOMMENT_BLOCK Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package TokenNamepackage
org TokenNameIdentifier org
. TokenNameDOT
apache TokenNameIdentifier apache
. TokenNameDOT
batik TokenNameIdentifier batik
. TokenNameDOT
extension TokenNameIdentifier extension
. TokenNameDOT
svg TokenNameIdentifier svg
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier org
. TokenNameDOT
apache TokenNameIdentifier apache
. TokenNameDOT
batik TokenNameIdentifier batik
. TokenNameDOT
dom TokenNameIdentifier dom
. TokenNameDOT
AbstractDocument TokenNameIdentifier Abstract Document
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier org
. TokenNameDOT
apache TokenNameIdentifier apache
. TokenNameDOT
batik TokenNameIdentifier batik
. TokenNameDOT
extension TokenNameIdentifier extension
. TokenNameDOT
PrefixableStylableExtensionElement TokenNameIdentifier Prefixable Stylable Extension Element
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier org
. TokenNameDOT
w3c TokenNameIdentifier w3c
. TokenNameDOT
dom TokenNameIdentifier dom
. TokenNameDOT
Node TokenNameIdentifier Node
; TokenNameSEMICOLON
/** * This class implements a regular polygon extension to SVG * * @author <a href="mailto:thomas.deweese@kodak.com">Thomas DeWeese</a> * @version $Id: FlowRegionElement.java 475477 2006-11-15 22:44:28Z cam $ */ TokenNameCOMMENT_JAVADOC This class implements a regular polygon extension to SVG * @author <a href="mailto:thomas.deweese@kodak.com">Thomas DeWeese</a> @version $Id: FlowRegionElement.java 475477 2006-11-15 22:44:28Z cam $
public TokenNamepublic
class TokenNameclass
FlowRegionElement TokenNameIdentifier Flow Region Element
extends TokenNameextends
PrefixableStylableExtensionElement TokenNameIdentifier Prefixable Stylable Extension Element
implements TokenNameimplements
BatikExtConstants TokenNameIdentifier Batik Ext Constants
{ TokenNameLBRACE
/** * Creates a new BatikRegularPolygonElement object. */ TokenNameCOMMENT_JAVADOC Creates a new BatikRegularPolygonElement object.
protected TokenNameprotected
FlowRegionElement TokenNameIdentifier Flow Region Element
( TokenNameLPAREN
) TokenNameRPAREN
{ TokenNameLBRACE
} TokenNameRBRACE
/** * Creates a new BatikRegularPolygonElement object. * @param prefix The namespace prefix. * @param owner The owner document. */ TokenNameCOMMENT_JAVADOC Creates a new BatikRegularPolygonElement object. @param prefix The namespace prefix. @param owner The owner document.
public TokenNamepublic
FlowRegionElement TokenNameIdentifier Flow Region Element
( TokenNameLPAREN
String TokenNameIdentifier String
prefix TokenNameIdentifier prefix
, TokenNameCOMMA
AbstractDocument TokenNameIdentifier Abstract Document
owner TokenNameIdentifier owner
) TokenNameRPAREN
{ TokenNameLBRACE
super TokenNamesuper
( TokenNameLPAREN
prefix TokenNameIdentifier prefix
, TokenNameCOMMA
owner TokenNameIdentifier owner
) TokenNameRPAREN
; TokenNameSEMICOLON
} TokenNameRBRACE
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}. */ TokenNameCOMMENT_JAVADOC <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}.
public TokenNamepublic
String TokenNameIdentifier String
getLocalName TokenNameIdentifier get Local Name
( TokenNameLPAREN
) TokenNameRPAREN
{ TokenNameLBRACE
return TokenNamereturn
BATIK_EXT_FLOW_REGION_TAG TokenNameIdentifier BATIK EXT FLOW REGION TAG
; TokenNameSEMICOLON
} TokenNameRBRACE
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getNamespaceURI()}. */ TokenNameCOMMENT_JAVADOC <b>DOM</b>: Implements {@link org.w3c.dom.Node#getNamespaceURI()}.
public TokenNamepublic
String TokenNameIdentifier String
getNamespaceURI TokenNameIdentifier get Namespace URI
( TokenNameLPAREN
) TokenNameRPAREN
{ TokenNameLBRACE
return TokenNamereturn
BATIK_12_NAMESPACE_URI TokenNameIdentifier BATIK 12 NAMESPACE URI
; TokenNameSEMICOLON
} TokenNameRBRACE
/** * Returns a new uninitialized instance of this object's class. */ TokenNameCOMMENT_JAVADOC Returns a new uninitialized instance of this object's class.
protected TokenNameprotected
Node TokenNameIdentifier Node
newNode TokenNameIdentifier new Node
( TokenNameLPAREN
) TokenNameRPAREN
{ TokenNameLBRACE
return TokenNamereturn
new TokenNamenew
FlowRegionElement TokenNameIdentifier Flow Region Element
( TokenNameLPAREN
) TokenNameRPAREN
; TokenNameSEMICOLON
} TokenNameRBRACE
} TokenNameRBRACE
| [
"dma@cs.cmu.edu"
] | dma@cs.cmu.edu |
b2821298e010e7a38824d9db7eaa59d9e138cb1e | b8a00480de8ec244057558582a810730fedc8b5a | /PowerOriginator.java | bd4f170d7ccd6813802387a7ca359c2f4e529185 | [] | no_license | Himani-R-Patel/Implementation-of-Power-function-without-using-libraries | 2b5d6cd1e1aaf3dc4a6bcf737df5f00ea1ee0b77 | 876f939b4a5cc8c2920c1c45622b334889e8c646 | refs/heads/master | 2022-01-07T16:41:16.200165 | 2019-08-12T17:34:30 | 2019-08-12T17:34:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 995 | java | /**
* Represent the class to creates and stores the existing value.
* @author Himani Patel
* @version 1.0
*/
public class PowerOriginator {
private Double state;
/**
* Represents setter method to set the value.
* @param state This is a current value.
*/
public void setState(Double state) {
this.state = state;
}
/**
* Represents getter method to get the value.
* @return state It returns the previously stored value.
*/
public Double getState() {
return state;
}
/**
* Represents the method to store value in PowerMemento object.
* @return powerMemento object.
*/
public PowerMemento saveStateToMemento() {
return new PowerMemento(state);
}
/**
* Represents the method to get the value of the PowerMemento object.
* @param memento It is a PowerMemento object.
*/
public void getStateFromMemento(PowerMemento memento) {
state = memento.getState();
}
}
| [
"noreply@github.com"
] | noreply@github.com |
338460369aea864d52a22472a3df60c887975f58 | b24090a98950c7d78cbf62e1e1f94e760032b95e | /app/src/main/java/com/example/summarisingtweets/ViewSet.java | 502dd12633e4a5f768468aa5a013c6c8ff08a417 | [] | no_license | BillRob99/SummarisingTweets | 9877a8152ccc42046e1c9fec09245006fc9aa55f | f5fb0b7b1bbf803e6f60379d6dcf4c47fdf69775 | refs/heads/master | 2022-04-05T01:28:01.562474 | 2020-02-11T15:26:43 | 2020-02-11T15:26:43 | 239,785,454 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,254 | java | package com.example.summarisingtweets;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import twitter4j.Twitter;
import twitter4j.User;
public class ViewSet extends AppCompatActivity {
private Twitter twitter;
private AccountSet set;
private AccountAdapter adapter;
private final int ADD_ACCOUNTS_REQUEST_CODE = 1;
private RecyclerView recyclerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_set);
androidx.appcompat.widget.Toolbar toolBar = findViewById(R.id.toolbar);
toolBar.setTitle("View Set");
toolBar.setTitleTextColor(0xFFFFFFFF);
setSupportActionBar(toolBar);
Bundle extras = getIntent().getExtras();
if(extras != null) {
twitter = (Twitter) extras.get("Twitter");
set = (AccountSet) extras.get("Set");
}
TextView titleTxt = findViewById(R.id.setTitleTxt);
titleTxt.setText(set.getName());
updateNumberOfAccounts();
recyclerView = findViewById(R.id.recyclerView);
adapter = new AccountAdapter(this, set.getAccountList());
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
recyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
}
@Override
public boolean onCreateOptionsMenu(Menu menu){
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.home_toolbar_layout, menu);
return true;
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ADD_ACCOUNTS_REQUEST_CODE) {
if(resultCode == Activity.RESULT_OK){
Bundle bundle = data.getExtras();
set = (AccountSet) bundle.get("Set");
writeSetInfo();
recyclerView = findViewById(R.id.recyclerView);
adapter = new AccountAdapter(this, set.getAccountList());
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
recyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
updateNumberOfAccounts();
}
}
}
public void addAccounts(View v) {
Intent intent = new Intent(this, AddAccounts.class);
intent.putExtra("Twitter", twitter);
intent.putExtra("Set", set);
startActivityForResult(intent, ADD_ACCOUNTS_REQUEST_CODE);
}
public void deleteAccount(int position) {
User account = set.getAccountList().get(position);
set.removeAccount(account);
recyclerView.getAdapter().notifyDataSetChanged();
updateNumberOfAccounts();
writeSetInfo();
}
private void updateNumberOfAccounts() {
TextView noOfAccountsTxt = findViewById(R.id.noOfAccountsTxt);
noOfAccountsTxt.setText("Number of accounts: " + set.getNoOfAccounts());
}
private void writeSetInfo() {
SharedPreferences sharedPref = getSharedPreferences("Data", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
String data = "";
ArrayList<User> accountList = set.getAccountList();
for(int i = 0; i < set.getNoOfAccounts() - 1; i++) {
data += accountList.get(i).getId() + System.lineSeparator();
}
data += accountList.get(set.getNoOfAccounts() - 1).getId();
editor.putString(set.getName(), data);
editor.commit();
}
}
| [
"billyjamesroberts@hotmail.com"
] | billyjamesroberts@hotmail.com |
a5e901ce8cdd2b3bd56b61bdef7b95f2100900a0 | 0357ee0d0490a6beb6f79f7d6e31bac809abda6b | /app/src/main/java/gallery/photoapp/gallerypro/photoviewer/adapter/ImageAdapter.java | f3eaa38f08c3798fa097783e91345ce63c561a92 | [] | no_license | MeghaPatel2022/Gallery-Viewer-Data-Binding | 93bf4439987904548af82415471f065579aec3d4 | 0bef390ee5bb596516c30443a69093e113bbbc95 | refs/heads/master | 2023-08-12T22:39:53.901836 | 2021-10-12T07:29:52 | 2021-10-12T07:29:52 | 416,228,066 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,428 | java | package gallery.photoapp.gallerypro.photoviewer.adapter;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import org.jetbrains.annotations.NotNull;
import java.util.Calendar;
import java.util.List;
import gallery.photoapp.gallerypro.photoviewer.ImageViewActivity;
import gallery.photoapp.gallerypro.photoviewer.R;
import gallery.photoapp.gallerypro.photoviewer.databinding.DateLayoutBinding;
import gallery.photoapp.gallerypro.photoviewer.databinding.ImageViewBinding;
import gallery.photoapp.gallerypro.photoviewer.model.ImageFile;
public class ImageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
public static final int DATE_TYPE = 1;
public static final int ITEM = 0;
public List<ImageFile> objects;
Activity activity;
public ImageAdapter(List<ImageFile> files, Activity activity) {
this.objects = files;
this.activity = activity;
}
@NonNull
@NotNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
RecyclerView.ViewHolder holder;
if (viewType == DATE_TYPE) {
DateLayoutBinding layoutBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()),
R.layout.date_layout, parent, false);
holder = new MyClassView(layoutBinding);
} else {
ImageViewBinding imageViewBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.image_view, parent, false);
holder = new ImageClassView(imageViewBinding);
}
return holder;
}
@Override
public void onBindViewHolder(@NonNull @NotNull RecyclerView.ViewHolder viewHolder, int position) {
ImageFile directory = objects.get(position);
if (viewHolder instanceof MyClassView) {
MyClassView holder = (MyClassView) viewHolder;
String dateString = directory.getDateTitle();
holder.layoutBinding.dateTv.setText(dateString);
} else {
ImageClassView holder = (ImageClassView) viewHolder;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
holder.imageViewBinding.mImage.setClipToOutline(true);
}
RequestOptions options = new RequestOptions();
if (directory.getPath().endsWith(".PNG") || directory.getPath().endsWith(".png")) {
Glide.with(activity)
.load(directory.getPath())
.apply(options.centerCrop()
.skipMemoryCache(true)
.priority(Priority.LOW)
.format(DecodeFormat.PREFER_ARGB_8888))
.dontAnimate()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.thumbnail(0.5f)
.centerCrop()
.into(holder.imageViewBinding.mImage);
} else {
Glide.with(activity)
.load(directory.getPath())
.apply(options.centerCrop()
.skipMemoryCache(true)
.priority(Priority.LOW))
.dontAnimate()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.thumbnail(0.5f)
.centerCrop()
.into(holder.imageViewBinding.mImage);
}
holder.itemView.setOnClickListener(v -> {
Intent intent = new Intent(activity, ImageViewActivity.class);
intent.putExtra("Position", position);
intent.putExtra("from", "ImageFragment");
intent.putExtra("directoryPosition", directory.getPosition());
activity.startActivity(intent);
activity.finish();
});
}
}
@Override
public int getItemCount() {
return objects.size();
}
@Override
public int getItemViewType(int position) {
ImageFile directory = objects.get(position);
if (!directory.isDirectory()) {
return ITEM;
} else {
return DATE_TYPE;
}
}
public void addAll(List<ImageFile> imgMain1DownloadList) {
this.objects.addAll(imgMain1DownloadList);
}
public void clear() {
objects.clear();
notifyDataSetChanged();
}
public String getFormattedDate(long smsTimeInMilis) {
Calendar smsTime = Calendar.getInstance();
smsTime.setTimeInMillis(smsTimeInMilis);
Calendar now = Calendar.getInstance();
final String timeFormatString = "h:mm aa";
final String dateTimeFormatString = "dd MMM yyyy";
final long HOURS = 60 * 60 * 60;
if (now.get(Calendar.DATE) == smsTime.get(Calendar.DATE)) {
return "Today ";
} else if (now.get(Calendar.DATE) - smsTime.get(Calendar.DATE) == 1) {
return "Yesterday ";
} else if (now.get(Calendar.YEAR) == smsTime.get(Calendar.YEAR)) {
return DateFormat.format(dateTimeFormatString, smsTime).toString();
} else {
return DateFormat.format("dd MMM yyyy", smsTime).toString();
}
}
public class MyClassView extends RecyclerView.ViewHolder {
private final DateLayoutBinding layoutBinding;
public MyClassView(DateLayoutBinding layoutBinding) {
super(layoutBinding.getRoot());
this.layoutBinding = layoutBinding;
}
}
public class ImageClassView extends RecyclerView.ViewHolder {
private final ImageViewBinding imageViewBinding;
public ImageClassView(ImageViewBinding imageViewBinding) {
super(imageViewBinding.getRoot());
this.imageViewBinding = imageViewBinding;
}
}
}
| [
"megha.bpatel2022@gmail.com"
] | megha.bpatel2022@gmail.com |
d1dfce4fde4f810cf47f4ff131b4fcc6fc3be335 | 355b3946df1f9917aa3b51066d48ed65d3bb68e1 | /project01/src/main/java/com/myproject/project01/HomeController.java | 7502bb94f2d5b563988e49e028d862fcefdaf8c8 | [] | no_license | ssmin0216/RepProject01 | 273f59c234825d54ce8289052e49569e34b106fe | 3ff9f768d9650f4d40d156a40446a5c1c0864873 | refs/heads/master | 2023-03-13T03:56:50.371966 | 2021-03-05T07:50:11 | 2021-03-05T07:50:11 | 344,643,519 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,085 | java | package com.myproject.project01;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Handles requests for the application home page.
*/
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
/**
* Simply selects the home view to render by returning its name.
*/
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model) {
logger.info("Welcome home! The client locale is {}.", locale);
Date date = new Date();
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
String formattedDate = dateFormat.format(date);
model.addAttribute("serverTime", formattedDate );
return "home";
}
}
| [
"dkrpqk@gmail.com"
] | dkrpqk@gmail.com |
cbed46c1f787f103188ae17fcf064187b3489caa | 0a3c0b6dc05a46f0f05365e575a164caa482a09d | /src/main/java/ch07/ParserTest.java | d9f13ae083eb92de16121c10a94cf1c87d7b1fd5 | [] | no_license | HongEunbeen/book-standard-java | 9e96bd09d4c720132a7aba9d744c9e2a14fc3f7b | 4ccc16b4d6639c263563dcbebfe4e63c3c4d91a9 | refs/heads/master | 2023-08-21T06:37:54.173780 | 2021-10-09T09:44:16 | 2021-10-09T09:44:16 | 369,827,760 | 0 | 0 | null | 2021-10-09T09:44:16 | 2021-05-22T14:25:00 | Java | UTF-8 | Java | false | false | 776 | java | package ch07;
interface Parseable{
public abstract void parse(String fileName);
}
class ParserManager {
public static Parseable getParser(String type){
if(type.equals("HTML")) return new HTMLParser();
else return new XMLParser();
}
}
class XMLParser implements Parseable{
@Override
public void parse(String fileName) {
System.out.println(fileName + " - XML parsing success");
}
}
class HTMLParser implements Parseable{
@Override
public void parse(String fileName) {
System.out.println(fileName + " - HTML parsing success");
}
}
public class ParserTest {
public static void main(String[] args) {
Parseable parser = ParserManager.getParser("HTML");
parser.parse("document.html");
}
}
| [
"vvvv980@gmail.com"
] | vvvv980@gmail.com |
9af5b118a2070b56e1fc8d3cb218affae0a24a64 | a09564302969af351a2955f3f6330113db52b627 | /app/src/main/java/com/industrialmaster/doc98/MainActivity.java | 53c8c3001e8369df56562c01ef612f741b02636c | [] | no_license | ishara11rathnayake/DOC98 | cc05bc9f986da1a3c6e9022b38937c99865ee1ce | a415fbb47d0e63130568e14ba4e3b342b97915e2 | refs/heads/master | 2020-05-22T08:18:26.396590 | 2019-05-12T16:01:17 | 2019-05-12T16:01:17 | 186,274,716 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,580 | java | package com.industrialmaster.doc98;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.ListView;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonArrayRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
AutoCompleteTextView actvHospitals, actvSpecialities, actvDoctors;
int HID, DID, SID; //selected values
Map<String, Integer> data1 = new HashMap<>(); //Hospital list
Map<String, Integer> data2 = new HashMap<>(); //Speciality list
Map<String, Integer> data3 = new HashMap<>(); //Doctor list
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences profile = getSharedPreferences("profile", Context.MODE_PRIVATE);
if(profile.contains("NAME")) {
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
actvHospitals = findViewById(R.id.actv_hospital);
actvSpecialities = findViewById(R.id.actv_speciality);
actvDoctors = findViewById(R.id.actv_doctor);
}else{
Intent intent = new Intent(getApplicationContext(), ProfileActivity.class);
startActivity(intent);
}
}
@Override
protected void onResume() {
super.onResume();
loadDoctors();
loadHospitals();
loadSpecialities();
}
public void loadHospitals(){
RequestQueue queue = Volley.newRequestQueue(this);
String url ="http://idexserver.tk/im/channel/hospital/list.php";
JsonArrayRequest request1 = new JsonArrayRequest(Request.Method.GET, url,
null,
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
List<String> list = new ArrayList<String>();
for (int i = 0; i<response.length(); i++){
try{
JSONObject obj = response.getJSONObject(i);
list.add(obj.getString("name"));
data1.put(obj.getString("name"), obj.getInt("id"));
}catch (Exception e){
e.printStackTrace();
}
}
int layout = android.R.layout.simple_list_item_1;
ArrayAdapter adapter = new ArrayAdapter(MainActivity.this, layout, list);
actvHospitals.setAdapter(adapter);
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(MainActivity.this, "Error :"+error, Toast.LENGTH_SHORT).show();
}
});
queue.add(request1);
}
public void loadSpecialities(){
RequestQueue queue = Volley.newRequestQueue(this);
String url ="http://idexserver.tk/im/channel/speciality/list.php";
JsonArrayRequest request1 = new JsonArrayRequest(Request.Method.GET, url,
null,
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
List<String> list = new ArrayList<String>();
for (int i = 0; i<response.length(); i++){
try{
JSONObject obj = response.getJSONObject(i);
list.add(obj.getString("name"));
data2.put(obj.getString("name"), obj.getInt("id"));
}catch (Exception e){
e.printStackTrace();
}
}
int layout = android.R.layout.simple_list_item_1;
ArrayAdapter adapter = new ArrayAdapter(MainActivity.this, layout, list);
actvSpecialities.setAdapter(adapter);
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(MainActivity.this, "Error :"+error, Toast.LENGTH_SHORT).show();
}
});
queue.add(request1);
}
public void loadDoctors(){
RequestQueue queue = Volley.newRequestQueue(this);
String url ="http://idexserver.tk/im/channel/doctor/list.php";
JsonArrayRequest request1 = new JsonArrayRequest(Request.Method.GET, url,
null,
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
List<String> list = new ArrayList<String>();
for (int i = 0; i<response.length(); i++){
try{
JSONObject obj = response.getJSONObject(i);
list.add(obj.getString("name"));
data3.put(obj.getString("name"), obj.getInt("id"));
}catch (Exception e){
e.printStackTrace();
}
}
int layout = android.R.layout.simple_list_item_1;
ArrayAdapter adapter = new ArrayAdapter(MainActivity.this, layout, list);
actvDoctors.setAdapter(adapter);
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(MainActivity.this, "Error :"+error, Toast.LENGTH_SHORT).show();
}
});
queue.add(request1);
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_appointments) {
Intent intent = new Intent(this, AppointmentsActivity.class);
startActivity(intent);
} else if (id == R.id.nav_profile) {
Intent intent = new Intent(this, ProfileActivity.class);
startActivity(intent);
} else if (id == R.id.nav_doctors) {
Intent intent = new Intent(this, DoctorListActivity.class);
startActivity(intent);
} else if (id == R.id.nav_hospitals) {
Intent intent = new Intent(this, HospitalListActivity.class);
startActivity(intent);
} else if (id == R.id.nav_specialities) {
Intent intent = new Intent(this, SpecialityListActivity.class);
startActivity(intent);
} else if (id == R.id.nav_exit) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
public void search(View view){
if(actvHospitals.getText().toString().equals("")){
HID = 0;
}else{
if(data1.get(actvHospitals.getText().toString()) != null){
HID = data1.get(actvHospitals.getText().toString());
}
}
if(actvSpecialities.getText().toString().equals("")){
SID = 0;
}else{
if(data1.get(actvSpecialities.getText().toString()) != null){
SID = data2.get(actvSpecialities.getText().toString());
}
}
if(actvDoctors.getText().toString().equals("")){
DID = 0;
}else{
if(data1.get(actvDoctors.getText().toString()) != null){
DID = data3.get(actvDoctors.getText().toString());
}
}
Intent intent = new Intent(this, SessionListActivity.class);
intent.putExtra("HID", HID);
intent.putExtra("SID", SID);
intent.putExtra("DID", DID);
startActivity(intent);
}
public void clear(View view){
actvDoctors.setText("");
actvSpecialities.setText("");
actvHospitals.setText("");
}
}
| [
"ishara11rathnayake@gmail.com"
] | ishara11rathnayake@gmail.com |
d9fc836580192f4d0d6fb07da257fc955b28bde3 | ce73342f70cf100df72762584bf6eec04d020cff | /PPDatabase/src/main/java/com/pp/database/model/scrapper/descriptor/DescriptorScrapingResult.java | 0e3c0c629f6efed11fb5818d4b171486640a6d0f | [] | no_license | AhmedRiahi/Scraper | 1a908e54753746783fcff64e9d37800d8dc08806 | e83e241eb0529349dbebb5923fde45b6bb415b25 | refs/heads/master | 2023-04-27T01:53:29.644423 | 2021-01-31T08:34:26 | 2021-01-31T08:34:26 | 168,478,234 | 0 | 0 | null | 2023-04-14T17:25:50 | 2019-01-31T06:57:27 | Java | UTF-8 | Java | false | false | 2,025 | java | package com.pp.database.model.scrapper.descriptor;
import com.pp.database.kernel.PPEntity;
import com.pp.database.model.scrapper.descriptor.listeners.ContentListenerModel;
import com.pp.database.model.scrapper.descriptor.listeners.ScrapedContent;
import lombok.Data;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Reference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Data
@Entity
public class DescriptorScrapingResult extends PPEntity{
@Reference
private DescriptorModel descriptor;
private String dsmId;
private Map<ScrapedContent,List<ScrapedContent>> scrapedContents;
public DescriptorScrapingResult(){
this.scrapedContents = new HashMap<>();
}
public void addScrapedContent(ScrapedContent scParent,ScrapedContent sc){
List<ScrapedContent> scChilds = this.scrapedContents.getOrDefault(scParent, new ArrayList<>());
scChilds.add(sc);
this.scrapedContents.put(scParent,scChilds);
this.scrapedContents.put(sc, new ArrayList<>());
}
public List<ScrapedContent> getScrapedContentByCL(ContentListenerModel cl){
return this.scrapedContents.keySet()
.stream()
.filter(s -> s.getContentListenerName().equals(cl.getName()))
.collect(Collectors.toList());
}
public List<ScrapedContent> getScrapedContentByParent(ScrapedContent scParent,String clName){
return this.scrapedContents.getOrDefault(scParent,new ArrayList<>()).stream().filter(scChild -> scChild.getContentListenerName().equals(clName)).collect(Collectors.toList());
}
public List<ScrapedContent> getAllScrapedContents(){
List<ScrapedContent> allScrapedContents = new ArrayList<>();
allScrapedContents.addAll(this.scrapedContents.keySet().stream().collect(Collectors.toList()));
allScrapedContents.addAll(this.scrapedContents.values().stream().flatMap(List::stream).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()));
return allScrapedContents;
}
}
| [
"ahmed.riahi@talan.com"
] | ahmed.riahi@talan.com |
0b69a3d8dff4153e2a0bc5a788cae14b224fd0b6 | 8b9facbaf9c57ee998aba63d57b14d93a5d95b8e | /src/org/xpande/financial/model/X_Z_MedioPagoFolio.java | 9213ef66b651ea5901123b4c21bdfe7cc178d2cd | [] | no_license | gvilauy/XpandeFinancial | e5270094176d43da3017e7213ef75d634426627a | 4a69c6203b54d685af686be630b18b7d79378cd9 | refs/heads/master | 2023-06-30T07:32:45.286633 | 2023-06-15T12:07:47 | 2023-06-15T12:07:47 | 98,096,052 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,278 | java | /******************************************************************************
* Product: ADempiere ERP & CRM Smart Business Solution *
* Copyright (C) 2006-2017 ADempiere Foundation, All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* or (at your option) any later version. *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* or via info@adempiere.net or http://www.adempiere.net/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.xpande.financial.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.*;
/** Generated Model for Z_MedioPagoFolio
* @author Adempiere (generated)
* @version Release 3.9.0 - $Id$ */
public class X_Z_MedioPagoFolio extends PO implements I_Z_MedioPagoFolio, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20190107L;
/** Standard Constructor */
public X_Z_MedioPagoFolio (Properties ctx, int Z_MedioPagoFolio_ID, String trxName)
{
super (ctx, Z_MedioPagoFolio_ID, trxName);
/** if (Z_MedioPagoFolio_ID == 0)
{
setC_BankAccount_ID (0);
setC_Currency_ID (0);
setDisponible (true);
// Y
setEmisionManual (false);
// N
setIsExecuted (false);
// N
setName (null);
setNumeroDesde (0);
setNumeroHasta (0);
setZ_MedioPagoFolio_ID (0);
setZ_MedioPago_ID (0);
} */
}
/** Load Constructor */
public X_Z_MedioPagoFolio (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_Z_MedioPagoFolio[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_C_BankAccount getC_BankAccount() throws RuntimeException
{
return (I_C_BankAccount)MTable.get(getCtx(), I_C_BankAccount.Table_Name)
.getPO(getC_BankAccount_ID(), get_TrxName()); }
/** Set Bank Account.
@param C_BankAccount_ID
Account at the Bank
*/
public void setC_BankAccount_ID (int C_BankAccount_ID)
{
if (C_BankAccount_ID < 1)
set_Value (COLUMNNAME_C_BankAccount_ID, null);
else
set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID));
}
/** Get Bank Account.
@return Account at the Bank
*/
public int getC_BankAccount_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_Currency getC_Currency() throws RuntimeException
{
return (I_C_Currency)MTable.get(getCtx(), I_C_Currency.Table_Name)
.getPO(getC_Currency_ID(), get_TrxName()); }
/** Set Currency.
@param C_Currency_ID
The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID)
{
if (C_Currency_ID < 1)
set_Value (COLUMNNAME_C_Currency_ID, null);
else
set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
}
/** Get Currency.
@return The Currency for this record
*/
public int getC_Currency_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Disponible.
@param Disponible
Si un elemento esta Disponible o no
*/
public void setDisponible (boolean Disponible)
{
set_Value (COLUMNNAME_Disponible, Boolean.valueOf(Disponible));
}
/** Get Disponible.
@return Si un elemento esta Disponible o no
*/
public boolean isDisponible ()
{
Object oo = get_Value(COLUMNNAME_Disponible);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set DocumentSerie.
@param DocumentSerie
Serie de un Documento
*/
public void setDocumentSerie (String DocumentSerie)
{
set_Value (COLUMNNAME_DocumentSerie, DocumentSerie);
}
/** Get DocumentSerie.
@return Serie de un Documento
*/
public String getDocumentSerie ()
{
return (String)get_Value(COLUMNNAME_DocumentSerie);
}
/** Set EmisionManual.
@param EmisionManual
Emisión manual de documentos
*/
public void setEmisionManual (boolean EmisionManual)
{
set_Value (COLUMNNAME_EmisionManual, Boolean.valueOf(EmisionManual));
}
/** Get EmisionManual.
@return Emisión manual de documentos
*/
public boolean isEmisionManual ()
{
Object oo = get_Value(COLUMNNAME_EmisionManual);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set IsExecuted.
@param IsExecuted IsExecuted */
public void setIsExecuted (boolean IsExecuted)
{
set_Value (COLUMNNAME_IsExecuted, Boolean.valueOf(IsExecuted));
}
/** Get IsExecuted.
@return IsExecuted */
public boolean isExecuted ()
{
Object oo = get_Value(COLUMNNAME_IsExecuted);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set NroMedioPagoDesde.
@param NroMedioPagoDesde
Nunero de medio de pago desde
*/
public void setNroMedioPagoDesde (String NroMedioPagoDesde)
{
set_Value (COLUMNNAME_NroMedioPagoDesde, NroMedioPagoDesde);
}
/** Get NroMedioPagoDesde.
@return Nunero de medio de pago desde
*/
public String getNroMedioPagoDesde ()
{
return (String)get_Value(COLUMNNAME_NroMedioPagoDesde);
}
/** Set NumeroDesde.
@param NumeroDesde
Numero desde para Rango de Enteros
*/
public void setNumeroDesde (int NumeroDesde)
{
set_Value (COLUMNNAME_NumeroDesde, Integer.valueOf(NumeroDesde));
}
/** Get NumeroDesde.
@return Numero desde para Rango de Enteros
*/
public int getNumeroDesde ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NumeroDesde);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set NumeroHasta.
@param NumeroHasta
Numero hasta para Rango de Enteros
*/
public void setNumeroHasta (int NumeroHasta)
{
set_Value (COLUMNNAME_NumeroHasta, Integer.valueOf(NumeroHasta));
}
/** Get NumeroHasta.
@return Numero hasta para Rango de Enteros
*/
public int getNumeroHasta ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NumeroHasta);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set ProcessButton.
@param ProcessButton ProcessButton */
public void setProcessButton (String ProcessButton)
{
set_Value (COLUMNNAME_ProcessButton, ProcessButton);
}
/** Get ProcessButton.
@return ProcessButton */
public String getProcessButton ()
{
return (String)get_Value(COLUMNNAME_ProcessButton);
}
/** TIpoCheque AD_Reference_ID=1000015 */
public static final int TIPOCHEQUE_AD_Reference_ID=1000015;
/** DIFERIDO = DIFERIDO */
public static final String TIPOCHEQUE_DIFERIDO = "DIFERIDO";
/** DIA = DIA */
public static final String TIPOCHEQUE_DIA = "DIA";
/** Set TIpoCheque.
@param TIpoCheque
Tipo de cheque: diferido o día
*/
public void setTIpoCheque (String TIpoCheque)
{
set_Value (COLUMNNAME_TIpoCheque, TIpoCheque);
}
/** Get TIpoCheque.
@return Tipo de cheque: diferido o día
*/
public String getTIpoCheque ()
{
return (String)get_Value(COLUMNNAME_TIpoCheque);
}
/** Set Z_MedioPagoFolio ID.
@param Z_MedioPagoFolio_ID Z_MedioPagoFolio ID */
public void setZ_MedioPagoFolio_ID (int Z_MedioPagoFolio_ID)
{
if (Z_MedioPagoFolio_ID < 1)
set_ValueNoCheck (COLUMNNAME_Z_MedioPagoFolio_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Z_MedioPagoFolio_ID, Integer.valueOf(Z_MedioPagoFolio_ID));
}
/** Get Z_MedioPagoFolio ID.
@return Z_MedioPagoFolio ID */
public int getZ_MedioPagoFolio_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Z_MedioPagoFolio_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_Z_MedioPago getZ_MedioPago() throws RuntimeException
{
return (I_Z_MedioPago)MTable.get(getCtx(), I_Z_MedioPago.Table_Name)
.getPO(getZ_MedioPago_ID(), get_TrxName()); }
/** Set Z_MedioPago ID.
@param Z_MedioPago_ID Z_MedioPago ID */
public void setZ_MedioPago_ID (int Z_MedioPago_ID)
{
if (Z_MedioPago_ID < 1)
set_Value (COLUMNNAME_Z_MedioPago_ID, null);
else
set_Value (COLUMNNAME_Z_MedioPago_ID, Integer.valueOf(Z_MedioPago_ID));
}
/** Get Z_MedioPago ID.
@return Z_MedioPago ID */
public int getZ_MedioPago_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Z_MedioPago_ID);
if (ii == null)
return 0;
return ii.intValue();
}
} | [
"gabrielvila13@gmail.com"
] | gabrielvila13@gmail.com |
d5e1386bf0c6149965583c847f54fc4101e09774 | bf2d48a419f0889f9e71dddff3ab1ceafad71f38 | /app/src/main/java/com/cyanbirds/ttjy/entity/Picture.java | a5010c93e48da80d81dcb24aeaffc3e6bd364d69 | [] | no_license | wybilold1999/TTProject | fbb9985f9b406280904e1e7da829c4bc17ce185c | 268a3e111e963bce42bb052dacb151bb608ddd5e | refs/heads/master | 2021-01-19T08:59:22.641211 | 2017-09-20T07:18:50 | 2017-09-20T07:18:50 | 87,704,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 369 | java | package com.cyanbirds.ttjy.entity;
/**
* @author Cloudsoar(wangyb)
* @datetime 2016-04-29 17:46 GMT+8
* @email 395044952@qq.com
*/
public class Picture {
public Integer id;
public ClientUser users;
public String createTime;
public Integer size;
public Integer width;
public Integer height;
public String path;
public String form;
}
| [
"395044952@qq.com"
] | 395044952@qq.com |
a9615cdbbf85052aa814e8d0ce741ae424cda96d | 820e56191d233be2cec0a459953d8f93e519a51e | /flour-cms/flour-cms-services/src/main/java/com/rrkj/flour/cms/entities/FCModel.java | aed84aaf8bf66f8e754ff3c7b2dea7700a013a01 | [
"Apache-2.0"
] | permissive | jinisu/flour | b681a19f47e6ddda605093a55a98cceaa901de57 | f3cf0833f8833c363b10a6055b6b1b3557bdd7f1 | refs/heads/master | 2022-10-29T04:50:46.316827 | 2020-09-01T07:50:56 | 2020-09-01T07:50:56 | 183,347,964 | 1 | 0 | Apache-2.0 | 2022-10-12T20:25:54 | 2019-04-25T03:17:28 | Java | UTF-8 | Java | false | false | 2,313 | java | /**
* 文件名:FCModel.java
*
* 创建人:jinisu - jinisu@163.com
*
* 创建时间:2019年4月28日 下午5:05:52
*
* 版权所有:软软科技
*/
package com.rrkj.flour.cms.entities;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.rrkj.flour.data.StatefulEntity;
/**
* <p> Title: [名称]</p>
* <p> Description: [描述]</p>
* <p> Created on 2019年4月28日</p>
* <p> Copyright: Copyright (c) 2019</p>
* <p> Company: 软软科技</p>
* @author jinisu - jinisu@163.com
* @version 1.0
*/
@Entity
@Table(name = "rrkj_flour_cms_model")
public class FCModel extends StatefulEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Column
private long userid;
@Column
private int version = 0;
@Column(length = 256, nullable = false)
private String name;
@Column(length = 256, nullable = false)
private String tableName;
@Column(length = 3, nullable = false)
private short tableCreated;
@Column(length = 1024, nullable = true)
private String label;
@Transient
private List<FCModelAttribute> attributes;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getUserid() {
return userid;
}
public void setUserid(long userid) {
this.userid = userid;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public short getTableCreated() {
return tableCreated;
}
public void setTableCreated(short tableCreated) {
this.tableCreated = tableCreated;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public List<FCModelAttribute> getAttributes() {
return attributes;
}
public void setAttributes(List<FCModelAttribute> attributes) {
this.attributes = attributes;
}
}
| [
"bob.su@noboedu.com"
] | bob.su@noboedu.com |
dd02688f599b38b6a5be42fd49dd2328c3ff4566 | 3324ef01a73f4d157bb27bb793f4df4a76a50b20 | /geeknews2/app/src/main/java/com/example/geeknews/model/HotModel.java | 45f0b9e321c738544c580d25465d6a0e121cc91a | [] | no_license | zzc517685668/geeknews | a38ed204ef1d139232d99f87c6aaf4ea024e8b26 | ea89e212472335680143a1024be3df6fca6bcfcf | refs/heads/master | 2020-06-22T00:31:09.820828 | 2019-07-19T00:29:12 | 2019-07-19T00:29:12 | 197,589,035 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,406 | java | package com.example.geeknews.model;
import com.example.geeknews.api.ApiService;
import com.example.geeknews.api.ZhiHuService;
import com.example.geeknews.base.BaseCallBack;
import com.example.geeknews.base.BaseModel;
import com.example.geeknews.bean.HotBean;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
public class HotModel extends BaseModel {
public void getHotDataList(final BaseCallBack<HotBean> callBack){
ApiService apiService = ZhiHuService.getApiService();
apiService.getHotData().subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<HotBean>() {
@Override
public void onSubscribe(Disposable d) {
compositeDisposable.add(d);
}
@Override
public void onNext(HotBean hotBean) {
callBack.onSuccess(hotBean);
}
@Override
public void onError(Throwable e) {
callBack.onFail(e.getMessage());
}
@Override
public void onComplete() {
}
});
}
}
| [
"879083421@qq,com"
] | 879083421@qq,com |
246d0bad43fca5282f035d24aba2dbd761187b0b | 8861d5a6ed129350db0ac5ddb8a402df88a76e3b | /plugin/org.seasar.kvasir.cms/src/main/java/org/seasar/kvasir/cms/handler/impl/FilteredPageExceptionHandler.java | 41973aabe7476a4c6ed2299c7f90646045beff49 | [] | no_license | seasarorg/test-kvasir-package-1 | 01a8726126a20124eb9678e09a413641af0ee3f4 | 99595d1da154c924acdb8e0821e84f4293f76ff5 | refs/heads/master | 2016-09-03T07:28:21.262021 | 2013-10-09T04:08:41 | 2013-10-09T04:08:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,845 | java | package org.seasar.kvasir.cms.handler.impl;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.seasar.kvasir.cms.GardIdProvider;
import org.seasar.kvasir.cms.PageRequest;
import org.seasar.kvasir.cms.handler.PageExceptionHandler;
import org.seasar.kvasir.cms.handler.PageExceptionHandlerChain;
import org.seasar.kvasir.cms.impl.AbstractPageMatcher;
import org.seasar.kvasir.webapp.handler.ExceptionHandlerConfig;
public class FilteredPageExceptionHandler extends AbstractPageMatcher
implements PageExceptionHandler
{
private PageExceptionHandler handler_;
private Class<?> type_;
public FilteredPageExceptionHandler(PageExceptionHandler handler,
String what, String how, String except, boolean not, boolean regex,
GardIdProvider gardIdProvider, Class<?> type)
{
super(what, how, except, not, regex, gardIdProvider);
handler_ = handler;
type_ = type;
}
public String toString()
{
return "FilteredPageExceptionHandler(" + handler_ + ")";
}
public void destroy()
{
handler_.destroy();
}
public void doHandle(HttpServletRequest request,
HttpServletResponse response, Exception ex, PageRequest pageRequest,
PageExceptionHandlerChain chain)
{
if (isMatched(pageRequest) && isMatched(ex)) {
handler_.doHandle(request, response, ex, pageRequest, chain);
} else {
chain.doHandle(request, response, ex, pageRequest);
}
}
boolean isMatched(Exception ex)
{
return (type_ == null || type_.isAssignableFrom(ex.getClass()));
}
public void init(ExceptionHandlerConfig config)
{
handler_.init(config);
}
}
| [
"skirnir@gmail.com"
] | skirnir@gmail.com |
ff2a9b2a7bc527e57c305ac0c91951a5fec3f9da | b9d7dea6b35d4623163bbe4a004aa651232b4ded | /app/src/test/java/org/traccar/client/DatabaseHelperTest.java | 32712ea546f337674f8b87a68a4471080dc6059b | [] | no_license | fabian-garzon/TTracker-Device | 245ce1f2a127e56646482c4c923b459ef1fb9078 | 0049f12b4acc04e19d1d04d7ccd862f5ee081160 | refs/heads/master | 2021-01-10T12:08:45.841033 | 2015-11-13T15:08:33 | 2015-11-13T15:08:33 | 46,122,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,320 | java |
package org.ttracker.client;
import android.database.sqlite.SQLiteDatabase;
import android.location.Location;
import com.ttracker.client.BuildConfig;
import com.ttracker.client.DatabaseHelper;
import com.ttracker.client.Position;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.util.Date;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@RunWith(RobolectricGradleTestRunner.class)
@Config(constants = BuildConfig.class, sdk = 21)
public class DatabaseHelperTest {
@Test
public void test() throws Exception {
DatabaseHelper databaseHelper = new DatabaseHelper(RuntimeEnvironment.application);
SQLiteDatabase db = databaseHelper.getWritableDatabase();
Position position = new Position("123456789012345", new Location("gps"), 0);
position.setTime(new Date(0));
assertNull(databaseHelper.selectPosition());
databaseHelper.insertPosition(position);
position = databaseHelper.selectPosition();
assertNotNull(position);
databaseHelper.deletePosition(position.getId());
assertNull(databaseHelper.selectPosition());
}
}
| [
"monse40@gmail.com"
] | monse40@gmail.com |
3ab211f442d45306a9d4a05ccc4ae8da503c52b7 | e0dc6969bfaa6044c163d59e71192ff4993125a6 | /app/src/main/java/com/rowland/hashtrace/ui/fragments/SearchFragment.java | 12175c0260df89739fe311aeac14fc24e7b2e9c5 | [] | no_license | RowlandOti/HashTrace | 1d2d03c09d7c0d949f4f9b30b1be840ba1e0dcc8 | 98953caad2e3609c117c0ae9eacc24b244c8dbff | refs/heads/master | 2021-01-10T15:34:30.446233 | 2016-03-25T14:19:51 | 2016-03-25T14:19:51 | 36,616,851 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 17,467 | java | /*
*
* * Copyright (c) 2016 Oti Rowland
* *
* * 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.rowland.hashtrace.ui.fragments;
import android.app.SearchManager;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.BounceInterpolator;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import com.baoyz.swipemenulistview.SwipeMenu;
import com.baoyz.swipemenulistview.SwipeMenuCreator;
import com.baoyz.swipemenulistview.SwipeMenuItem;
import com.baoyz.swipemenulistview.SwipeMenuListView;
import com.rowland.hashtrace.ui.adapters.TweetListAdapter;
import com.rowland.hashtrace.data.provider.TweetHashTracerContract;
import com.rowland.hashtrace.data.provider.TweetHashTracerContract.HashTagEntry;
import com.rowland.hashtrace.data.provider.TweetHashTracerContract.TweetEntry;
import com.rowland.hashtrace.data.provider.TweetHashTracerContract.TweetFavEntry;
import com.rowland.hashtrace.R;
import com.rowland.hashtrace.utility.Utility;
public class SearchFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> {
private static final int SEARCH_LOADER = 4;
private static final String SELECTED_KEY = "selected_position";
// For the tweet view we're showing only a small subset of the stored data.
// Specify the columns we need.
private static final String[] TWEET_COLUMNS = {
// In this case the id needs to be fully qualified with a table
// name, since the content provider joins the hastag & tweet tables in the background (both have an _id column)
// On the one hand, that's annoying. On the other, you can search
// the tweet table using the hashtag set by the user, which is only in the Hashtag table. So the convenience is worth it.
TweetEntry.TABLE_NAME + "." +
TweetEntry._ID, //0
TweetEntry.COLUMN_HASHTAG_KEY, //1
TweetEntry.COLUMN_TWEET_ID, //2
TweetEntry.COLUMN_TWEET_TEXT, //3
TweetEntry.COLUMN_TWEET_TEXT_DATE, //4
TweetEntry.COLUMN_TWEET_TEXT_RETWEET_COUNT, //5
TweetEntry.COLUMN_TWEET_TEXT_FAVOURITE_COUNT, //6
TweetEntry.COLUMN_TWEET_TEXT_MENTIONS_COUNT, //7
TweetEntry.COLUMN_TWEET_USERNAME, //8
TweetEntry.COLUMN_TWEET_USERNAME_IMAGE_URL, //9
TweetEntry.COLUMN_TWEET_USERNAME_LOCATION, //10
TweetEntry.COLUMN_TWEET_USERNAME_DESCRIPTION, //11
TweetEntry.COLUMN_TWEET_FAVOURITED_STATE, //12
HashTagEntry.COLUMN_HASHTAG_NAME //13
};
private static SearchFragment fragmentInstance = null;
private final String LOG_TAG = SearchFragment.class.getSimpleName();
private SwipeMenuListView mListView;
private TweetListAdapter mTweetListAdapter;
private SwipeMenuCreator creator;
private int mPosition = ListView.INVALID_POSITION;
private String mQuery;
public SearchFragment()
{
setRetainInstance(true);
}
public static SearchFragment newInstance(Bundle args)
{
fragmentInstance = new SearchFragment();
if (args != null)
{
fragmentInstance.setArguments(args);
}
return fragmentInstance;
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null)
{
mQuery = arguments.getString(SearchManager.QUERY);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// The CursorAdapter will take data from a source and use it to populate the ListView it's attached to.
mTweetListAdapter = new TweetListAdapter(getActivity(), null, 0);
creator = new SwipeMenuCreator() {
@Override
public void create(SwipeMenu menu)
{
// create "share" item
SwipeMenuItem shareItem = new SwipeMenuItem(getActivity().getApplicationContext());
// set item background
shareItem.setBackground(new ColorDrawable(Color.rgb(211, 214, 219)));
// set item width
shareItem.setWidth(Utility.convertDpToPixel(100, getResources().getDisplayMetrics()));
// set icon resource
shareItem.setIcon(R.drawable.selector_swipemenuitem_share);
// set item title
shareItem.setTitle("Share");
// set item title fontsize
shareItem.setTitleSize(18);
// set item title font color
shareItem.setTitleColor(Color.WHITE);
// add to menu
menu.addMenuItem(shareItem);
// create "favour" item
SwipeMenuItem favourItem = new SwipeMenuItem(getActivity().getApplicationContext());
// set item background
favourItem.setBackground(new ColorDrawable(Color.rgb(211, 214, 219)));
// set item width
favourItem.setWidth(Utility.convertDpToPixel(100, getResources().getDisplayMetrics()));
// set icon resource
favourItem.setIcon(R.drawable.selector_swipemenuitem_favorite);
// set item title
favourItem.setTitle("Like");
// set item title fontsize
favourItem.setTitleSize(18);
// set item title font color
favourItem.setTitleColor(Color.WHITE);
// add to menu
menu.addMenuItem(favourItem);
}
};
View rootView = inflater.inflate(R.layout.fragment_search, container, false);
//txtQuery = (TextView) rootView.findViewById(R.id.listview_tweet_empty);
mListView = (SwipeMenuListView) rootView.findViewById(android.R.id.list);
mListView.setAdapter(mTweetListAdapter);
mListView.setMenuCreator(creator);
mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view,int position, long id)
{
// Do the onItemLongClick action
mListView.smoothOpenMenu(position);
return true;
}
});
mListView.setOnMenuItemClickListener(new SwipeMenuListView.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(int position, SwipeMenu menu, int index)
{
switch (index) {
case 0:
// Share
shareTweet();
break;
case 1:
// Favourite
favouriteTweet();
break;
}
// false : close the menu; true : not close the menu
return false;
}
});
mListView.setCloseInterpolator(new BounceInterpolator());
// If there's instance state, mine it for useful information.
// The end-goal here is that the user never knows that turning their
// device sideways does crazy lifecycle related things. It should
// feel like some stuff stretched out, or magically appeared to take
// advantage of room, but data or place in the app was never actually *lost*.
if (savedInstanceState != null && savedInstanceState.containsKey(SELECTED_KEY))
{
// The listview probably hasn't even been populated yet. Actually
// perform the
// swapout in onLoadFinished.
mPosition = savedInstanceState.getInt(SELECTED_KEY);
}
return rootView;
}
@Override
public void onActivityCreated(Bundle savedInstanceState)
{
super.onActivityCreated(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null && arguments.containsKey(SearchManager.QUERY))
{
/**
* Use this query to display search results like 1. Getting the data
* from SQLite and showing in listview 2. Making webrequest and
* displaying the data For now we just display the query only
*/
Bundle data = new Bundle();
data.putString(SearchManager.QUERY, mQuery);
getLoaderManager().initLoader(SEARCH_LOADER, data, this);
}
}
@Override
public void onSaveInstanceState(Bundle outState)
{
// When tablets rotate, the currently selected list item needs to be saved.
// When no item is selected, mPosition will be set to Listview.INVALID_POSITION,
// so check for that before storing.
if (mPosition != ListView.INVALID_POSITION)
{
outState.putInt(SELECTED_KEY, mPosition);
}
super.onSaveInstanceState(outState);
}
@Override
public void onResume()
{
super.onResume();
}
@Override
public void onListItemClick(ListView lv, View view, int position, long rowID)
{
super.onListItemClick(lv, view, position, rowID);
// Do the onItemClick action
Cursor cursor = mTweetListAdapter.getCursor();
if (cursor != null && cursor.moveToPosition(position))
{
((onTweetItemSelectedCallback) getActivity()).onTweetItemSelected((int) rowID);
}
mPosition = position;
Log.d("ROWSELECT", "" + rowID);
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle query) {
//String startDate = TweetHashTracerContract.getDbDateString(new Date(),EDbDateLimit.DATE_FORMAT_DAY_LIMIT);
// Sort order: Ascending, by date.
String sortOrder = TweetEntry.COLUMN_TWEET_TEXT_DATE + " DESC";
String[] selectionArgs = new String[]{ mQuery};
String mHashTag = Utility.getPreferredHashTag(getActivity());
Uri tweetForHashTagUri = TweetEntry.buildTweetHashTagWithSearchKey(mHashTag, mQuery);
Log.w(LOG_TAG, "" + tweetForHashTagUri);
// Now create and return a CursorLoader that will take care of creating a Cursor for the data being displayed.
//CursorLoader cursorLoader = new CursorLoader(getActivity().getApplicationContext(), tweetForHashTagUri, TWEET_COLUMNS, null, null, sortOrder);
CursorLoader cursorLoader = new CursorLoader(getActivity().getApplicationContext(), tweetForHashTagUri, TWEET_COLUMNS, null, selectionArgs, null);
return cursorLoader;
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data)
{
mTweetListAdapter.swapCursor(data);
if (mPosition != ListView.INVALID_POSITION)
{
// If we don't need to restart the loader, and there's a desired
// position to restore to, do so now.
mListView.smoothScrollToPosition(mPosition);
}
updateEmptyView();
}
@Override
public void onLoaderReset(Loader<Cursor> loader)
{
mTweetListAdapter.swapCursor(null);
}
public void updateEmptyView()
{
TextView emptyTextView = (TextView) getView().findViewById(R.id.empty_text_view);
if(mTweetListAdapter.getCount() == 0)
{
if (null != emptyTextView)
{
emptyTextView.setVisibility(View.VISIBLE);
//If cursor is empty why do we have an invalid position
int message = R.string.empty_tweet_list_none_found;
emptyTextView.setText(message);
}
}
else
{
if (null != emptyTextView)
{
emptyTextView.setVisibility(View.GONE);
}
}
}
private void shareTweet()
{
Cursor cursor = mTweetListAdapter.getCursor();
String tweet_text = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT));
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, tweet_text);
startActivity(Intent.createChooser(share, "Share Tweet"));
}
private void favouriteTweet()
{
Cursor cursor = mTweetListAdapter.getCursor();
int _id = cursor.getInt(cursor.getColumnIndex(TweetEntry._ID));
int hash_tag_id = cursor.getInt(cursor.getColumnIndex(TweetEntry.COLUMN_HASHTAG_KEY));
long tweet_id = cursor.getLong(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_ID));
String tweet_text = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT));
String tweet_text_date = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT_DATE));
String tweet_text_retweet_count = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT_RETWEET_COUNT));
String tweet_text_favourite_count = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT_FAVOURITE_COUNT));
String tweet_text_mentions_count = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_TEXT_MENTIONS_COUNT));
String tweet_user_name = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_USERNAME));
String tweet_user_name_image_url = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_USERNAME_IMAGE_URL));
String tweet_user_name_location = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_USERNAME_LOCATION));
String tweet_user_name_description = cursor.getString(cursor.getColumnIndex(TweetEntry.COLUMN_TWEET_USERNAME_DESCRIPTION));
ContentValues tweetFavValues = new ContentValues();
ContentValues tweetValues = new ContentValues();
tweetFavValues.put(TweetFavEntry.COLUMN_HASHTAG_KEY, hash_tag_id);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_TEXT_DATE, tweet_text_date);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_ID, tweet_id);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_TEXT, tweet_text);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_TEXT_RETWEET_COUNT, tweet_text_retweet_count);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_TEXT_FAVOURITE_COUNT, tweet_text_favourite_count);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_TEXT_MENTIONS_COUNT, tweet_text_mentions_count);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_USERNAME, tweet_user_name);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_USERNAME_IMAGE_URL, tweet_user_name_image_url);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_USERNAME_LOCATION, tweet_user_name_location);
tweetFavValues.put(TweetFavEntry.COLUMN_TWEETFAV_USERNAME_DESCRIPTION, tweet_user_name_location);
tweetValues.put(TweetEntry.COLUMN_TWEET_FAVOURITED_STATE, 1);
String whereClause = TweetEntry._ID + " = ?";
String[] selectionArgs = new String[]{String.valueOf(_id)};
getActivity().getApplicationContext().getContentResolver().insert(TweetHashTracerContract.TweetFavEntry.CONTENT_URI, tweetFavValues);
getActivity().getApplicationContext().getContentResolver().update(TweetEntry.CONTENT_URI, tweetValues, whereClause, selectionArgs);
mTweetListAdapter.notifyDataSetChanged();
getLoaderManager().restartLoader(SEARCH_LOADER, null, this);
}
/**
* A callback interface that all activities containing this fragment must
* implement. This mechanism allows activities to be notified of item
* selections.
*/
public interface onTweetItemSelectedCallback
{
/**
* TweetItemFragmentCallback for when an item has been selected.
*/
void onTweetItemSelected(int date);
}
}
| [
"rowlandotienoo@gmail.com"
] | rowlandotienoo@gmail.com |
271d2579833aa8265e567a84db9431a67cd07e02 | 5cd957051630149ad647fbf3a7b5c4e969db531b | / ie3/E3Table/src/net/jcreate/e3/table/util/ClassUtils.java | fa1a26cc8768b041016eea11469b044660426692 | [] | no_license | cxc3214/ie3 | 1f45f1b35d9a152851ebfe1fbf11b1feebfe5607 | b7340801a3c8cde7a61a8cfe79b3f401e909b46d | refs/heads/master | 2020-05-31T08:24:56.920824 | 2015-05-18T12:09:56 | 2015-05-18T12:09:56 | 35,815,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,833 | java | /*
* Copyright 2002-2005 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* 欢迎加入 E3平台联盟QQ群:21523645
*/
package net.jcreate.e3.table.util;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.io.InputStream;
/**
* 代码来自velocity
* Simple utility functions for manipulating classes and resources
* from the classloader.
*
* @author <a href="mailto:wglass@apache.org">Will Glass-Husain</a>
* @version $Id: ClassUtils.java 463298 2006-10-12 16:10:32Z henning $
*/
public class ClassUtils {
/**
* Utility class; cannot be instantiated.
*/
private ClassUtils()
{
}
/**
* Return the specified class. Checks the ThreadContext classloader first,
* then uses the System classloader. Should replace all calls to
* <code>Class.forName( claz )</code> (which only calls the System class
* loader) when the class might be in a different classloader (e.g. in a
* webapp).
*
* @param clazz the name of the class to instantiate
* @return the requested Class object
* @throws ClassNotFoundException
*/
public static Class getClass(String clazz) throws ClassNotFoundException
{
/**
* Use the Thread context classloader if possible
*/
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader != null)
{
try
{
return Class.forName(clazz, true, loader);
}
catch (ClassNotFoundException E)
{
/**
* If not found with ThreadContext loader, fall thru to
* try System classloader below (works around bug in ant).
*/
}
}
/**
* Thread context classloader isn't working out, so use system loader.
*/
return Class.forName(clazz);
}
/**
* Return a new instance of the given class. Checks the ThreadContext
* classloader first, then uses the System classloader. Should replace all
* calls to <code>Class.forName( claz ).newInstance()</code> (which only
* calls the System class loader) when the class might be in a different
* classloader (e.g. in a webapp).
*
* @param clazz the name of the class to instantiate
* @return an instance of the specified class
* @throws ClassNotFoundException
* @throws IllegalAccessException
* @throws InstantiationException
*/
public static Object getNewInstance(String clazz)
throws ClassNotFoundException,IllegalAccessException,InstantiationException
{
return getClass(clazz).newInstance();
}
/**
* Finds a resource with the given name. Checks the Thread Context
* classloader, then uses the System classloader. Should replace all
* calls to <code>Class.getResourceAsString</code> when the resource
* might come from a different classloader. (e.g. a webapp).
* @param claz Class to use when getting the System classloader (used if no Thread
* Context classloader available or fails to get resource).
* @param name name of the resource
* @return InputStream for the resource.
*/
public static InputStream getResourceAsStream(Class claz, String name)
{
InputStream result = null;
/**
* remove leading slash so path will work with classes in a JAR file
*/
while (name.startsWith("/"))
{
name = name.substring(1);
}
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
if (classLoader == null)
{
classLoader = claz.getClassLoader();
result = classLoader.getResourceAsStream( name );
}
else
{
result= classLoader.getResourceAsStream( name );
/**
* for compatibility with texen / ant tasks, fall back to
* old method when resource is not found.
*/
if (result == null)
{
classLoader = claz.getClassLoader();
if (classLoader != null)
result = classLoader.getResourceAsStream( name );
}
}
return result;
}
}
| [
"sunky1@126.com@54e5c230-1e40-0410-bff9-c16e65a43d13"
] | sunky1@126.com@54e5c230-1e40-0410-bff9-c16e65a43d13 |
f337680c3695c51f6a4d76ee5c9a183fe0e996d6 | a52207b00199c0f185e2301ed0063988e0e0fdcf | /src/rpc/Login.java | 99b28869ec6ab87d82f434be6b2777878facc99d | [] | no_license | jasonmy419/Jupiter | 1844dd2e45c4bb6b27107cac3a53bb65bc57575b | 2a353eae1f8545b1c2bed11e38516265246767c8 | refs/heads/master | 2020-04-16T17:25:32.533961 | 2019-01-15T03:02:48 | 2019-01-15T03:02:48 | 165,771,820 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,785 | java | package rpc;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import db.DBConnection;
import db.DBConnectionFactory;
import entity.Item;
/**
* Servlet implementation class Login
*/
@WebServlet("/login")
public class Login extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Login() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
DBConnection connection = DBConnectionFactory.getConnection();
try {
HttpSession session = request.getSession(false);
JSONObject obj = new JSONObject();
if(session != null){
String userId = session.getAttribute("user_id").toString();
obj.put("status", "OK").put("user_id", userId).put("name", connection.getFullname(userId));
}else {
response.setStatus(403);
obj.put("status", "Session expired");
}
RpcHelper.writeJsonObject(response, obj);
}catch (Exception e) {
e.printStackTrace();
}finally {
if(connection != null) {
connection.close();
}
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
DBConnection connection = DBConnectionFactory.getConnection();
try {
JSONObject input = RpcHelper.readJSONObject(request);
String userId = input.getString("user_id");
String password = input.getString("password");
JSONObject obj = new JSONObject();
if(connection.verifyLogin(userId, password)) {
HttpSession session = request.getSession();
session.setAttribute("user_id", userId);
session.setMaxInactiveInterval(6000);
obj.put("status", "OK").put("user_id", userId).put("name", connection.getFullname(userId));
}else {
response.setStatus(401);
obj.put("status", "User does not exist");
}
RpcHelper.writeJsonObject(response, obj);
}catch (Exception e) {
e.printStackTrace();
}finally {
if(connection != null) {
connection.close();
}
}
}
}
| [
"jasonmy419@gmail.com"
] | jasonmy419@gmail.com |
b12ca80d2ce649359834b20b56a4bdb3461f5e86 | 95d1ef1befee7d89e0a2a0dd00a38cd6301a964f | /src/Primit/PrimitiveWrapper.java | e9a2cc0f08a94a73465ece9a2bd0ad6fdd478293 | [] | no_license | olkovmv/Lesson | 3e4d3e1c6cdb690febe00cf9f861a337c6a7b0a4 | 1c2bd9ddb585d61b339ef37d5fbd68aa643c24d9 | refs/heads/master | 2021-03-10T19:49:26.282233 | 2020-05-13T17:08:57 | 2020-05-13T17:08:57 | 246,481,011 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,390 | java | package Primit;
import java.lang.reflect.Array;
public class PrimitiveWrapper {
public static void main(String[] args) {
// int num;
// PrimitiveWrapper.sqr(21);
// }
//
// private static void sqr(Integer num){
// System.out.println(num * num);
// }
//
// private static void kons(Double[] newArr) {
// for (Double d : newArr) {
// System.out.println("" + d);
// }
//
//
// double[] doubles = {3.42, 23.4, 31.54, 43};
// Double[] doubles1;
// Методы оберток
Integer num = 32;
num.byteValue();
num.byteValue();
num.intValue();
System.out.println(Byte.parseByte("2"));
System.out.println(Integer.parseInt("2244")); // int
System.out.println(Integer.valueOf("3232"));
//Строка должна содержать только число
Integer inegers = 3223;
System.out.println(inegers.toString());
Integer first = 45;
Integer second = 23;
System.out.println(first.equals(second));
System.out.println(first.getClass());
System.out.println(first.compareTo(second));
Integer first1 = 452;
Integer second1 = 233;
System.out.println(first == second);
}} | [
"olkovmav@gmail.com"
] | olkovmav@gmail.com |
cd6d3f80fcdae0361484460a42eb72e3f8a822aa | c0604a3dc1a1b336e826fd457a4616a93c5ca4b6 | /Project1_Unit2_partB_mengyuy/src/Adapter/ProxyAutomobile.java | 3a81942eac902696de52d28a940959e2d642af15 | [] | no_license | rainyyang5/JavaSmartPhone | 8d3432dc0952b14b232aaa3ca77ae3bbff5bf70f | decf4eec9633a4ab51c11847ff4a4ef30822ffab | refs/heads/master | 2021-01-10T20:18:14.554205 | 2015-10-05T07:12:14 | 2015-10-05T07:12:14 | 42,027,183 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,016 | java | package Adapter;
import java.util.LinkedHashMap;
import exception.AutoException;
import util.FileIO;
import model.Automobile;
/*
* Created by Mengyu Yang(Mengyu Yang)
* This is the abstract class that implements build, update and print for automobile.
*/
public abstract class ProxyAutomobile {
//private Automobile auto;
private LinkedHashMap<String, Automobile> autos = new LinkedHashMap<String, Automobile>();
public LinkedHashMap<String, Automobile> getAutos() {
return autos;
}
public void setAutos(LinkedHashMap<String, Automobile> autos) {
this.autos = autos;
}
// Searches the model for a given OptionSet and sets the name of OptionSet to newName
public void updateOptionSetName(String modelName, String optionSetName, String newName) {
if (autos.containsKey(modelName)) {
if (autos.get(modelName).getModel().equals(modelName)) {
if (!autos.get(modelName).updateOptionSetName(optionSetName, newName)) {
System.out.println("Fail to update optionSet name.");
}
}
}
}
// searches the model for a given OptionSet and Option name and set the price to newPrice
public void updateOptionPrice(String modelName, String optionSetName, String option, float newPrice){
if (autos.containsKey(modelName)) {
Automobile auto = autos.get(modelName);
if (auto.getModel().equals(modelName)) {
if (!auto.updateOptionPrice(optionSetName, option, newPrice)) {
System.out.println("Fail to update option price.");
}
}
}
}
// Build an instance of Automobile given a text file
public void buildAuto(String filename) {
FileIO fileIO = new FileIO();
Automobile auto = fileIO.buildAutoObject(filename);
if (auto != null) {
autos.put(auto.getModel(), auto);
}
}
// Searches and prints the properties of a given Automodel
public void printAuto(String modelName) {
if (autos.containsKey(modelName)) {
Automobile auto = autos.get(modelName);
if (auto == null) {
return;
}
if (auto.getModel().equals(modelName)) {
auto.print();
} else {
System.out.println("Model is not found given the modelName: " + modelName);
}
}
}
public void fix(AutoException autoExp, String model) {
Automobile auto = autos.get(model);
autoExp.fix(auto);
}
// Get total price
public int getTotalPrice(String model) {
return autos.get(model).getTotalPrice();
}
// Get price for a choice
public int getOptionChoicePrice(String optSetName, String modelName) {
Automobile auto = autos.get(modelName);
return auto.getOptionChoicePrice(optSetName);
}
// Get choice for a optionSet
public String getOptionChoice(String optSetName, String modelName) {
try {
Automobile auto = autos.get(modelName);
return auto.getOptionChoice(optSetName);
} catch (Exception e) {
return null;
}
}
// Set choice for a optionSet
public void setOptionChoice(String optSetName, String optionName, String modelName) {
Automobile auto = autos.get(modelName);
auto.setOptionChoice(optSetName, optionName);
}
}
| [
"rainyyang5@gmail.com"
] | rainyyang5@gmail.com |
acf76b2f84ecfa894d383aa15d5966e231160456 | 4cc3bb729aab619052595f53f333c42e8727bfe8 | /gmall-sms/src/main/java/com/atguigu/gmall/sms/entity/SeckillSessionEntity.java | ea343a1f5eaa448077e46548ba1e869d4a273551 | [
"Apache-2.0"
] | permissive | zhukehui/gmall | 12bc934f946c1d8cb8793c71b5f8320ca597fbda | 8f6652bb4e2f2a084c293bf11225fab727ca1560 | refs/heads/master | 2022-12-27T04:14:04.246755 | 2019-11-21T02:24:18 | 2019-11-21T02:24:18 | 218,018,924 | 0 | 1 | Apache-2.0 | 2022-12-16T14:50:54 | 2019-10-28T10:13:45 | JavaScript | UTF-8 | Java | false | false | 1,250 | java | package com.atguigu.gmall.sms.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 秒杀活动场次
*
* @author huigege
* @email 574059694@qq.com
* @date 2019-10-28 23:20:36
*/
@ApiModel
@Data
@TableName("sms_seckill_session")
public class SeckillSessionEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
@ApiModelProperty(name = "id",value = "id")
private Long id;
/**
* 场次名称
*/
@ApiModelProperty(name = "name",value = "场次名称")
private String name;
/**
* 每日开始时间
*/
@ApiModelProperty(name = "startTime",value = "每日开始时间")
private Date startTime;
/**
* 每日结束时间
*/
@ApiModelProperty(name = "endTime",value = "每日结束时间")
private Date endTime;
/**
* 启用状态
*/
@ApiModelProperty(name = "status",value = "启用状态")
private Integer status;
/**
* 创建时间
*/
@ApiModelProperty(name = "createTime",value = "创建时间")
private Date createTime;
}
| [
"574059694@qq.com"
] | 574059694@qq.com |
12c60ffd26d5f94d14710d9e80254823e446ab51 | 8d24c7c789acc971a9af3280816d5de1b1daecc7 | /services/classicmodels/src/com/sharedtestproject/classicmodels/service/ClassicmodelsQueryExecutorService.java | 50a52e395573f4510aab762e00572793831fca79 | [] | no_license | Sushma-M/sharedtestproject | 55e175114406ee62c6721930c57bfd00b521980c | 6426f65ca690c9eaa997987e9a3cedf4dc016430 | refs/heads/master | 2021-01-01T05:14:20.893582 | 2016-04-27T07:19:15 | 2016-04-27T07:19:15 | 57,191,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | /*Copyright (c) 2016-2017 testing.com All Rights Reserved.
This software is the confidential and proprietary information of testing.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with testing.com*/
package com.sharedtestproject.classicmodels.service;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import java.util.Map;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.wavemaker.runtime.data.model.CustomQuery;
import com.wavemaker.runtime.data.exception.QueryParameterMismatchException;
public interface ClassicmodelsQueryExecutorService {
Page<Object> executeWMCustomQuerySelect(CustomQuery query, Pageable pageable) ;
int executeWMCustomQueryUpdate(CustomQuery query) ;
}
| [
"sairama.bonala@automate.com"
] | sairama.bonala@automate.com |
638285fff6c3cc7f7f78d6850cad7c39c54dac0a | f10c6b43c23c690d007e6cbd861b520551a57121 | /TKO/src/test/java/com/pages/tko_95_DeleteON.java | f997ff43a79b795adb9f00fec7a0504f3f4923e3 | [] | no_license | Kolywan/AutoTKO | 3c325a9a48feb1e8dcbfdbda2321663fa8bb50d7 | 6773fa88e567f4bea99465981f17fe653cbb2d6f | refs/heads/master | 2021-06-25T12:45:21.998405 | 2021-01-13T07:05:41 | 2021-01-13T07:05:41 | 198,403,681 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,068 | java | package com.pages;
import static com.codeborne.selenide.Condition.visible;
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Selenide.sleep;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import com.codeborne.selenide.SelenideElement;
import com.main.appmanager.ApplicationManager;
public class tko_95_DeleteON {
public static ApplicationManager app;
WebDriver driver;
public tko_95_DeleteON() {
app = new ApplicationManager();
}
public SelenideElement login() {
return $(By.xpath("//input[@placeholder='Логин']")).waitUntil(visible, app.timeOut);
}
public SelenideElement password() {
return $(By.xpath("//input[@placeholder='Пароль']")).waitUntil(visible, app.timeOut);
}
public SelenideElement buttonGo() {
return $(By.xpath("//div[@class='v-button v-widget c-login-submit-button v-button-c-login-submit-button icon v-button-icon']")).waitUntil(visible, app.timeOut);
}
public SelenideElement menuApp() {
return $(By.xpath("//div[@class='v-menubar v-widget c-main-menu v-menubar-c-main-menu v-has-width']/span[3]")).waitUntil(visible, app.timeOut);
}
public SelenideElement menuClient() {
return $(By.xpath("//div[@class='v-menubar-submenu v-widget c-main-menu v-menubar-submenu-c-main-menu v-has-width']/span[1]")).waitUntil(visible, app.timeOut);
}
public SelenideElement menuAccount() {
return $(By.xpath("//div[@class='v-menubar-submenu v-widget c-main-menu v-menubar-submenu-c-main-menu v-has-width v-menubar-submenu-has-icons']/span[2]")).waitUntil(visible, app.timeOut);
}
public SelenideElement agent() {
return $(By.xpath("//div[@class='v-table-cell-wrapper' or @class='v-captiontext']")).waitUntil(visible, app.timeOut);
}
public SelenideElement textNameAccount() {
return $(By.xpath("//div[text()='Лицевой счет']/../../div[3]/div")).waitUntil(visible, app.timeOut);
}
public SelenideElement exit() {
return $(By.xpath("//div[@class='v-button v-widget c-logout-button v-button-c-logout-button icon v-button-icon v-button-empty-caption']")).waitUntil(visible, app.timeOut);
}
public SelenideElement maximizebox() {
return $(By.xpath("//div[@class='v-window-maximizebox']")).waitUntil(visible, app.timeOut);
}
public SelenideElement searchAccount() {
return $(By.xpath("//span[text()='Лицевой счет']/..")).waitUntil(visible,
app.timeOut);
}
public SelenideElement menuON() {
return $(By.xpath("//div[text()='Объекты недвижимости']")).waitUntil(visible, app.timeOut);
}
public SelenideElement searchCondition() {
return $(By.xpath("//div[@class='v-slot v-slot-link v-align-middle']")).waitUntil(visible, app.timeOut);
}
public SelenideElement searchLogin() {
return $(By.xpath("//div[@class='v-tree-node-caption']//span[text()='Логин']")).waitUntil(visible, app.timeOut);
}
public SelenideElement searchText() {
return $(By.xpath("//div[@class='v-slot v-slot-param-field']/input")).waitUntil(visible, app.timeOut);
}
public SelenideElement searchButton() {
return $(By.xpath("//div[@class='v-button v-widget filter-search-button v-button-filter-search-button icon v-button-icon']")).waitUntil(visible, app.timeOut);
}
public SelenideElement user() {
return $(By.xpath("//div[@class='v-table-cell-wrapper' and text()='6783']")).waitUntil(visible, app.timeOut);
}
public SelenideElement selectON() {
return $(By.xpath("//td[@class='v-grid-cell']")).waitUntil(visible, app.timeOut);
}
public SelenideElement buttonDelete() {
return $(By.xpath("//span[text()='Удалить']/../..")).waitUntil(visible, app.timeOut);
}
public SelenideElement buttonOkDelete() {
return $(By.xpath("//span[text()='OK']/../..")).waitUntil(visible, app.timeOut);
}
public void start() {
// Авторизоваться под пользователем
login().sendKeys("6783");
sleep(1000);
password().sendKeys("6783");
sleep(1000);
buttonGo().click();
sleep(1500);
// Двойным щелчком мыши заходим в контрагента (Открывается окно "Карточка л/с")
agent().doubleClick();
sleep(1000);
// Сохраняем данные лицевого счета
String account = textNameAccount().getText();
System.out.println(account);
// Выходим из учетной записи пользователя (Открывается страница авторизации)
exit().click();
sleep(5000);
// Авторизация под администратором
login().sendKeys("d-150788@mail.ru");
sleep(1000);
password().sendKeys("123456789");
sleep(1000);
buttonGo().click();
sleep(1500);
//Зайти в "Приложение"
menuApp().click();
sleep(1000);
//Выбрать "Клиенты"
menuClient().click();
sleep(1000);
//Выбрать "Лицевые счета"
menuAccount().click();
sleep(5000);
// Кликаем "Добавить условие поиска"
searchCondition().click();
sleep(1000);
// разворачиваем окно на весь экран
maximizebox().click();
sleep(1000);
$(By.xpath("//input[@class='v-textfield v-widget v-has-width c-empty-value']")).sendKeys("Лицевой счет");
// Из предложенного списка двойным щелчком мыши выбираем "Лицевой счет"
sleep(1000);
searchAccount().click();
sleep(1000);
searchAccount().doubleClick();
sleep(1000);
// Вписываем условие поиска(Лицевой счет который был ранее сохранен)
searchText().sendKeys(account);
sleep(1000);
// Нажимаем кнопку "Поиск"
searchButton().click();
sleep(4000);
// Выбираем контрагента из списка двойным щелчком мыши
$(By.xpath("//div[text()='"+ account +"']")).doubleClick();
sleep(1000);
//Открываем вкладку ОН
menuON().click();
sleep(1500);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
// Выбираем ОН
selectON().click();
sleep(1000);
//Кликаем "Удалить"
buttonDelete().click();
sleep(1000);
buttonOkDelete().click();
sleep(1000);
}
public void DeleteON() {
app.tko_95().start();
}
}
| [
"d-150788@mail.ru"
] | d-150788@mail.ru |
30d6e1dc75ee02d0b4d52a6f11634179131db89e | fc307b5b29a872d1204e83cf96fb44b3f5631381 | /program4/Bee.java | dece9ee7be746764ec70594b86382a358805c234 | [] | no_license | jguttman94/CS-1114----Introduction-to-Data-Structures | 0adc79d9e21da84b81c1a22e09d3ff426fd6c7af | 0261bc6dc3f059748a50d2257f7095520b9dce21 | refs/heads/master | 2021-06-08T10:04:51.230553 | 2016-11-21T23:25:11 | 2016-11-21T23:25:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,339 | java | import sofia.micro.*;
import java.util.*;
//-------------------------------------------------------------------------
/**
* bee moves continuously
* unless obstructed by ant, in that case
* it attacks every 40 turns.
*
* @author jackrg94
* @version 2015.03.26
*/
public class Bee extends AntsAndBees
{
//~ Fields ................................................................
private boolean moveFlag;
//~ Constructor ...........................................................
// ----------------------------------------------------------
/**
* Creates a new Bees object.
*/
public Bee()
{
super();
setHealth(3);
setRotation(180);
setTimerPeriod(40);
moveFlag = false;
}
//~ Methods ...............................................................
/**
* on time 0, this method is executed.
*/
public void onTimer()
{
sting();
}
/**
* attacks the ant that has made contact
* with bee
*/
public void sting()
{
if (this.getIntersectingObjects(Ants.class).isEmpty())
{
moveFlag = false;
}
if (moveFlag)
{
(this.getIntersectingObjects(Ants.class).get(0)).injure(1);
resetTimer();
}
}
/**
* moves across world unless obstructed.
*/
public void movement()
{
if (this.getIntersectingObjects(Ants.class).isEmpty())
{
this.move(0.0125);
}
else
{
moveFlag = true;
resetTimer();
}
}
/**
* called every turn for movement purposes
*/
public void act()
{
super.act();
if (!moveFlag)
{
this.movement();
}
}
/**
* getter for variable moveFlag,
* which is set to true when something
* is obstructing bee's movement
* @return boolean current state of moveFlag
*/
public boolean getMoveFlag()
{
return moveFlag;
}
/**
* sets moveFlag to true for testing
* purposes.
* @param x set next bool
* @return boolean current state of moveFlag
*/
public boolean setMoveFlag(boolean x)
{
moveFlag = x;
return moveFlag;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
1d111847529e49157950ca5d3f9fa220498e3137 | c0833c46e94fc98067157bdf478d2cfaef45a2cf | /MVCProject03/src/com/sist/news/Rss.java | 5b2a0d02009dd4847c1aadf5167eb8e3a2f4fd95 | [] | no_license | hajieun1218/WebStudy | e1345b3a8532cf1fcd97c7b99703f96a8c8b946b | 6d4718d0d297482745580482a6b46d69bf9e9faf | refs/heads/master | 2021-03-03T20:14:59.271350 | 2020-04-24T04:56:11 | 2020-04-24T04:56:11 | 245,985,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,495 | java | package com.sist.news;
// XML 파싱
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/*
* JAXP => Java Api for XML Parse
* 설정 파일 읽기 (Mybatis,Spring,...)
* = DOM (Document Object Model) => 메모리에 저장 (수정,삭제,추가)
* = SAX (Simple Api for XML) => 읽기전용
*
* JAXB => Java Api for XML Bind => Annotation 이용 (빅데이터용)
* = 마셸 ===> Java class에 있는 데이터 => XML변환
* = 언마셸 ===> XML => Java Object 변환
*
* <rss>
* <channel>
* <item>
* <title></title>
* <author></author>
* <description></description>
* <link></link>
* </item>
* <item>
* <title></title>
* <author></author>
* <description></description>
* <link></link>
* </item>
* <item>
* <title></title>
* <author></author>
* <description></description>
* <link></link>
* </item>
* </channel>
* </rss>
*
* 태그와 태그 사이에 태그가 있으면 class : rss, channel, item
* 태그와 태그 사이에 값이 있으면 변수 : title, author, description, link
*
* newssearch.naver.com/search.naver?where=rss&query=코로나
*/
@XmlRootElement
public class Rss {
private Channel channel=new Channel();
public Channel getChannel() {
return channel;
}
@XmlElement
public void setChannel(Channel channel) {
this.channel = channel;
}
}
| [
"gkwldms1218@naver.com"
] | gkwldms1218@naver.com |
e7d1ecba41c053f1f8868324b25808a5cf66752a | b712cec619830a06f850b7d7ea90a31b29ce9224 | /app/src/main/java/com/itboy/dj/examtool/modules/ftpage/megagamefragment/MegagameIntroduceFragment.java | 34213ed8c020eb495f4e5b9d0f886ea713dc3e36 | [] | no_license | liuguangjun12/ksb | 67a7c193089396076ae7c25298449f10707e1613 | 876366b2a45c248ec6894a3cab5025441f2bfd01 | refs/heads/master | 2022-03-29T21:45:13.834923 | 2017-08-17T09:56:47 | 2017-08-17T09:56:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,782 | java | package com.itboy.dj.examtool.modules.ftpage.megagamefragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import com.itboy.dj.examtool.R;
import com.itboy.dj.examtool.modules.base.BaseFragment;
import com.itboy.dj.examtool.utils.SharedPreferencesUtils;
import com.itboy.dj.examtool.utils.WebViewHelper;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public class MegagameIntroduceFragment extends BaseFragment {
@BindView(R.id.web)
WebView web;
Unbinder unbinder;
private WebViewHelper webViewHelper;
private String mArgumentId;
private String mArgumentImgUrl;
public static final String ARGUMENT_ME_INTRODUCE = "id";
public static final String ARGUMENT_ME_INTRODUCE_IMG = "img";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle = getArguments();
if (bundle != null)
mArgumentId = bundle.getString(ARGUMENT_ME_INTRODUCE);
mArgumentImgUrl = bundle.getString(ARGUMENT_ME_INTRODUCE_IMG);
}
public static MegagameIntroduceFragment newInstance(String id, String imgUrl) {
Bundle bundle = new Bundle();
bundle.putString(ARGUMENT_ME_INTRODUCE, id);
bundle.putString(ARGUMENT_ME_INTRODUCE_IMG, imgUrl);
MegagameIntroduceFragment megagameIntroduceFragment = new MegagameIntroduceFragment();
megagameIntroduceFragment.setArguments(bundle);
return megagameIntroduceFragment;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = super.onCreateView(inflater, container, savedInstanceState);
unbinder = ButterKnife.bind(this, rootView);
return rootView;
}
@Override
protected int attachLayoutRes() {
return R.layout.fragment_megagame_introduce;
}
@Override
protected void initInjector() {
}
@Override
protected void initViews() {
webViewHelper = new WebViewHelper(getActivity(), web);
final String token = (String) SharedPreferencesUtils.getParam(getActivity(), "Token", "");
String url = "http://demo.kspx.ccla.com.cn/kspx-cgi/api/view/dasai-" + mArgumentId + ".html?access_token=" + token;
Log.d("MegagameIntroduceFragme", url + "-----" + mArgumentImgUrl);
webViewHelper.loadUrl(url);
}
@Override
protected void updateViews(boolean isRefresh) {
}
@Override
public void onDestroy() {
super.onDestroy();
unbinder.unbind();
}
}
| [
"dongjie"
] | dongjie |
1d10ba6b720d339c401c6f0035723c75d4046fdb | aaba1e2d103c82be1996fc20dd32634952714e3b | /src/main/java/com/esas/taskmanager/security/SecurityConfig.java | 75c055aad1b87f20a89109c94c7ac7e7d1aa68ff | [] | no_license | Ordash/TaskManagerServer | 69a9ecadcdfa1265a845a7adb4c76d5432c20d58 | f3b3da48b4acc33f4408881e5c68f0aaf9fabf23 | refs/heads/master | 2020-08-04T11:51:00.094921 | 2019-10-09T14:48:37 | 2019-10-09T14:48:37 | 212,128,078 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,477 | java | package com.esas.taskmanager.security;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import javax.servlet.http.HttpServletResponse;
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.cors().and().csrf().disable()
.exceptionHandling()
.authenticationEntryPoint((request, response, e) -> { ;
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.getWriter().write("Access Denied");})
.and()
.authorizeRequests()
.antMatchers("/authenticate")
.permitAll()
.and()
.authorizeRequests()
.antMatchers(HttpMethod.OPTIONS, "/**")
.permitAll()
.anyRequest()
.authenticated()
.and()
.httpBasic();
}
}
| [
"farkas.bako@gmail.com"
] | farkas.bako@gmail.com |
0424440dfb9e139ab4d31ccbbcc41060c1f653dc | 5622d518bac15a05590055a147628a728ca19b23 | /jcore-xmi-splitter/src/test/java/de/julielab/jcore/types/Enzyme_Type.java | b60bb6e82d83b6bc1db6569a37ffbdfb43203f0c | [
"BSD-2-Clause"
] | permissive | JULIELab/jcore-dependencies | e51349ccf6f26c7b7dab777a9e6baacd7068b853 | a303c6a067add1f4b05c4d2fe31c1d81ecaa7073 | refs/heads/master | 2023-03-19T20:26:55.083193 | 2023-03-09T20:32:13 | 2023-03-09T20:32:13 | 44,806,492 | 4 | 2 | BSD-2-Clause | 2022-11-16T19:48:08 | 2015-10-23T10:32:10 | Java | UTF-8 | Java | false | false | 983 | java |
/* First created by JCasGen Tue Sep 03 12:34:17 CEST 2019 */
package de.julielab.jcore.types;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
/**
* Updated by JCasGen Tue Sep 03 12:34:17 CEST 2019
* @generated */
public class Enzyme_Type extends BioEntityMention_Type {
/** @generated */
@SuppressWarnings ("hiding")
public final static int typeIndexID = Enzyme.typeIndexID;
/** @generated
@modifiable */
@SuppressWarnings ("hiding")
public final static boolean featOkTst = JCasRegistry.getFeatOkTst("de.julielab.jcore.types.Enzyme");
/** initialize variables to correspond with Cas Type and Features
* @generated
* @param jcas JCas
* @param casType Type
*/
public Enzyme_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
}
}
| [
"chew@gmx.net"
] | chew@gmx.net |
6bf7e2a6455f3b6661a43f5322a81ca67d3207f8 | 167de922121ef88fb7fcbfd9a954cea7b45da63b | /Code/com/bokecc/sparkview/view/BigBtnViewMediator.java | 4695ff85e3899cb3a2e31abf3169f139a164964f | [] | no_license | 404neko/PCF2 | a60ea7c0f2e18629bd75feb20c18cbbb3b45387b | 8d420c22b2146702065cac808c4dd9d29966acac | refs/heads/master | 2021-01-13T00:37:55.964347 | 2013-08-26T18:06:58 | 2013-08-26T18:06:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,438 | java | package com.bokecc.sparkview.view {
import org.puremvc.as3.interfaces.*;
import com.bokecc.player.ui.*;
import com.bokecc.player.events.*;
import org.puremvc.as3.patterns.mediator.*;
import com.bokecc.sparkview.step.*;
import com.bokecc.sparkview.command.*;
import com.bokecc.sparkview.Module.*;
public class BigBtnViewMediator extends Mediator implements IMediator {
public static const Name:String = "BigBtnViewMediator.Name";
public static const ShowBigPlayButton:String = "SparkView.ShowBigPlayButton";
public static const AlwaysHidePlayButton:String = "SparkView.AlwaysHidePlayButton";
private var alwaysHide:Boolean;
private var playFinished:Boolean;
private var playing:Boolean;
private var showed:Boolean;
public function BigBtnViewMediator(_arg1:Object){
super(Name, _arg1);
}
public function get playerUI():PlayerUI{
return ((viewComponent as PlayerView).playerUI);
}
override public function onRegister():void{
this.playerUI.showBasePlayButton = (this.playFinished = (this.showed = false));
}
override public function onRemove():void{
this.playerUI.showBasePlayButton = false;
}
override public function listNotificationInterests():Array{
return ([ShowBigPlayButton, AlwaysHidePlayButton, PlayFinish.PlayFish, ControlViewMediator.SetPlayStatus]);
}
override public function handleNotification(_arg1:INotification):void{
var _local3:Object;
var _local4:Boolean;
var _local2:String = _arg1.getName();
_local3 = _arg1.getBody();
switch (_local2){
case ShowBigPlayButton:
this.showed = true;
_local4 = ((Boolean(_local3)) && (!(this.alwaysHide)));
this.playerUI.showBasePlayButton = _local4;
if (_local4){
this.playerUI.addEventListener(ControlEvent.BASE_PLAY_BUTTON_CLICK, this.onClick);
};
break;
case AlwaysHidePlayButton:
this.alwaysHide = _local3;
this.onCheckCustom();
break;
case PlayFinish.PlayFish:
this.playFinished = true;
this.playing = false;
break;
case ControlViewMediator.SetPlayStatus:
this.playerUI.showBasePlayButton = false;
this.playing = true;
break;
};
}
private function onClick(_arg1:ControlEvent):void{
if (!this.playFinished){
sendNotification(PlayReadyStep.Step_ReadyPlay, null, PlayReadyStep.VerifySuccess);
this.playerUI.removeEventListener(ControlEvent.BASE_PLAY_BUTTON_CLICK, this.onClick);
} else {
sendNotification(OperateEventHandler.OperateEvent, false, OperateEventHandler.Pause);
};
this.playerUI.showBasePlayButton = false;
}
private function onCheckCustom():void{
if (this.showed){
this.playerUI.showBasePlayButton = ((!(this.alwaysHide)) && (!(this.playing)));
};
}
}
}//package com.bokecc.sparkview.view
| [
"you@example.com"
] | you@example.com |
02562dbef6d90bc70e16ba0c3b01f85bd7ad26fe | e6b75d845b4929976ba09ad3967e1bffec5ef6dd | /src/test/java/i/am/jameshughkim/interviewsPrep/code_rust/array/permutation/AllSumCombinations.java | 14d0bf2e3b55abadbd883d03225a3c1664ce22d2 | [] | no_license | zhackay/algorithms-in-java | 1d2bab4aa569647cf6f2b29bddf7567591e6af11 | 43ad34457b697bbbb7a3731344a2c13110fcf8de | refs/heads/master | 2021-01-01T19:49:02.866886 | 2017-09-15T22:44:10 | 2017-09-15T22:44:10 | 98,696,714 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,299 | java | package i.am.jameshughkim.interviewsPrep.code_rust.array.permutation;
import java.util.ArrayList;
import java.util.List;
/**
* Given a positive integer, print all possible sum combinations using positive integers.
*
* For example, if we are given input '5', these are the possible sum combinations.
1, 4
2, 3
1, 1, 3
1, 2, 2
1, 1, 1, 2
1, 1, 1, 1, 1
*/
public class AllSumCombinations {
static void printAllPossibleSumCombinations(int target) {
List<Integer> output = new ArrayList<Integer>();
printAllPossibleSumCombinations(target, 0, 1, output);
}
static void printAllPossibleSumCombinations(int target, int current_sum, int start, List<Integer> output) {
if (target == current_sum) print_list(output);
for (int i = start; i < target; ++i) {
int temp_sum = current_sum + i;
if (temp_sum <= target) {
output.add(i);
printAllPossibleSumCombinations(target, temp_sum, i, output);
output.remove(output.size() - 1);
} else return;
}
}
static void print_list(List<Integer> v) {
for (int i : v) {
System.out.print(i + ",");
}
System.out.println("");
}
}
| [
"zhackay@gmail.com"
] | zhackay@gmail.com |
b66d0a7a6c0eb497dfbdba869a48986cb6677f33 | dcb8ef738a3b0763240a45ef45ba813f707056f9 | /Calculatrice/src/CalcLauncher.java | a64995c18eca21300b9fac26508afe5138b86620 | [] | no_license | edlenoir/Tp | dcfa746960fb92b054df7a4eba10be6dc13cde71 | b85790d53113484813ba72acd9d6ac88209453e2 | refs/heads/master | 2023-01-06T10:58:08.411243 | 2020-11-07T18:32:42 | 2020-11-07T18:32:42 | 303,811,203 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 634 | java |
import java.awt.EventQueue;
/**
* The main launcher for java calculator. Creates the {@code Calculator} object.
* @author <a href="http://www.mdtareque.in" target="_blank">mtk</a>
* @version 1.0 Nov 25, 2012
* @see Calculator
*/
public class CalcLauncher {
/**
* @param args
* Currently no arguments required to be passed to this program.
*/
public static void main(String[] args) {
// Use the event dispatch thread for Swing components
EventQueue.invokeLater(new Runnable() {
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
new Calculator();
}
});
}
} | [
"flolombard@hotmail.fr"
] | flolombard@hotmail.fr |
dfbed91b576192da89740bdcb8ff90fdd87faac0 | c3546799255038dc2f9c1ec14590982250dc8f34 | /src/main/java/j3d/pure_immediate/PureImmediateStereo.java | 8b01d079d92ecb445d48e3484c4401c32ec1d20a | [] | no_license | icstreispe/ogl | c1c4397266c0c49102fa5ec01e75bd917c7f04c7 | 60a76480d7609009e62dc596748687d9fa74104c | refs/heads/master | 2022-12-10T05:59:49.291768 | 2020-09-02T21:56:23 | 2020-09-02T21:56:23 | 292,358,558 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 9,767 | java | /*
* $RCSfile: PureImmediateStereo.java,v $
*
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any
* kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
* EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL
* NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
* USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
* ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
* CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
* REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
* INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed, licensed or
* intended for use in the design, construction, operation or
* maintenance of any nuclear facility.
*
* $Revision: 1.3 $
* $Date: 2007/02/09 17:21:51 $
* $State: Exp $
*/
package j3d.pure_immediate;
import java.util.*;
import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
/**
* Pure immediate mode stereo example program for stereo. In pure
* immediate mode, the renderer must be stopped on the Canvas being
* rendered into. In our example, this is done immediately after the
* canvas is created. A separate thread is started up to do the
* immediate mode rendering.
*/
public class PureImmediateStereo extends javax.swing.JFrame implements Runnable {
private SimpleUniverse univ = null;
private BranchGroup scene = null;
// Set this to true when the graphics card use shared z buffer
// in stereo mode.
public static String defaultSharedStereoZbuffer = Boolean.TRUE.toString();
private boolean sharedStereoZbuffer;
private boolean stereoSupport;
private Canvas3D canvas;
private GraphicsContext3D gc;
private Shape3D leftConeBody, rightConeBody;
private Shape3D leftConeCap, rightConeCap;
private Transform3D cmt = new Transform3D();
private Vector3f leftTrans, rightTrans;
// One rotation (2*PI radians) every 6 seconds
private Alpha rotAlpha = new Alpha(-1, 6000);
private double angle;
// Compute data which is common for both
// left and right eye
void computeSharedData() {
// Compute angle of rotation based on alpha value
angle = rotAlpha.value() * 2.0*Math.PI;
cmt.rotY(angle);
}
// Render the geometry in right eye
void renderLeft() {
cmt.setTranslation(leftTrans);
gc.setModelTransform(cmt);
if (sharedStereoZbuffer) {
// Graphics card shared same z buffer in stereo mode,
// in this case we have to explicitly clearing both
// frame buffers.
gc.clear();
}
gc.draw(leftConeBody);
gc.draw(leftConeCap);
}
// Render the geometry for right eye
void renderRight() {
cmt.setTranslation(rightTrans);
gc.setModelTransform(cmt);
if (sharedStereoZbuffer) {
// Graphics card shared same z buffer in stereo mode,
// in this case we have to explicitly clearing both
// frame buffers.
gc.clear();
}
gc.draw(rightConeBody);
gc.draw(rightConeCap);
}
//
// Run method for our immediate mode rendering thread.
//
public void run() {
// Set up Graphics context
gc = canvas.getGraphicsContext3D();
// We always need to set this for PureImmediate
// stereo mode
gc.setBufferOverride(true);
Color3f lightColor = new Color3f(1, 1, 1);
Vector3f lightDir = new Vector3f(0, 0, -1);
DirectionalLight light = new DirectionalLight(lightColor,
lightDir);
gc.addLight(light);
Appearance redApp = new Appearance();
Appearance greenApp = new Appearance();
Color3f ambientColor = new Color3f(0, 0, 0);
Color3f emissiveColor = new Color3f(0, 0, 0);
Color3f diffuseColor = new Color3f(1, 0, 0);
Color3f specularColor = new Color3f(1, 1, 1);
redApp.setMaterial(new Material(ambientColor, emissiveColor,
diffuseColor, specularColor, 5));
diffuseColor = new Color3f(0, 1, 0);
greenApp.setMaterial(new Material(ambientColor, emissiveColor,
diffuseColor, specularColor, 5));
// Set up geometry
Cone leftCone = new Cone(0.4f, 0.6f,
Primitive.GENERATE_NORMALS, redApp);
Cone rightCone = new Cone(0.4f, 0.6f,
Primitive.GENERATE_NORMALS, greenApp);
leftConeBody = leftCone.getShape(Cone.BODY);
leftConeCap = leftCone.getShape(Cone.CAP);
rightConeBody = rightCone.getShape(Cone.BODY);
rightConeCap = rightCone.getShape(Cone.CAP);
leftTrans = new Vector3f(-0.6f, 0, 0);
rightTrans = new Vector3f(0.6f, 0, 0);
while (true) {
// compute data which is can be used
// for both left and right eye
computeSharedData();
if (stereoSupport) {
if (!sharedStereoZbuffer) {
gc.setStereoMode(GraphicsContext3D.STEREO_BOTH);
// This clear both left and right buffers, we
// must set STEREO_BOTH before it. Otherwise
// it only clear LEFT or RIGHT buffer unless
// this is invoke twice for each buffer.
gc.clear();
}
gc.setStereoMode(GraphicsContext3D.STEREO_LEFT);
renderLeft();
gc.setStereoMode(GraphicsContext3D.STEREO_RIGHT);
renderRight();
} else {
gc.clear();
renderLeft();
}
// This swap both left and right buffers so
// there is no need to set STEREO_BOTH before it
canvas.swap();
// Be polite to other threads !
Thread.yield();
}
}
private void createUniverse() {
// Preferred to use Stereo
GraphicsConfigTemplate3D gct = new GraphicsConfigTemplate3D();
gct.setStereo(GraphicsConfigTemplate3D.PREFERRED);
GraphicsConfiguration config =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(gct);
canvas = new Canvas3D(config);
Map map = canvas.queryProperties();
stereoSupport = canvas.getStereoAvailable();
if (stereoSupport) {
System.out.println("This machine support stereo, you should see a red cone on the left and green cone on the right.");
// User can overide the above default behavior using
// java3d property.
String str = System.getProperty("j3d.sharedstereozbuffer",
defaultSharedStereoZbuffer);
sharedStereoZbuffer = (new Boolean(str)).booleanValue();
} else {
System.out.println("Stereo is not support, you should only see the left red cone.");
}
if (!canvas.getDoubleBufferAvailable()) {
System.out.println("Double buffer is not support !");
}
// we must stop the Renderer in PureImmediate mode
canvas.stopRenderer();
// Create simple universe with view branch
univ = new SimpleUniverse(canvas);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
univ.getViewingPlatform().setNominalViewingTransform();
// Ensure at least 5 msec per frame (i.e., < 200Hz)
univ.getViewer().getView().setMinimumFrameCycleTime(5);
// Start a new thread that will continuously render
(new Thread(this)).start();
}
/**
* Creates new form PureImmediateStereo
*/
public PureImmediateStereo() {
// Initialize the GUI components
initComponents();
// Create Canvas3D and SimpleUniverse; add canvas to drawing panel
createUniverse();
drawingPanel.add(canvas, java.awt.BorderLayout.CENTER);
}
// ----------------------------------------------------------------
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
drawingPanel = new javax.swing.JPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("PureImmediateStereo");
drawingPanel.setLayout(new java.awt.BorderLayout());
drawingPanel.setPreferredSize(new java.awt.Dimension(512, 256));
getContentPane().add(drawingPanel, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new PureImmediateStereo().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel drawingPanel;
// End of variables declaration//GEN-END:variables
}
| [
"icstreispe@yahoo.com"
] | icstreispe@yahoo.com |
e5f1eaba6f0f6f8cc46e5238475b3c71b228c3fa | 1c53d5257ea7be9450919e6b9e0491944a93ba80 | /merge-scenarios/elasticsearch/1a434636fe4-plugin-src-main-java-org-elasticsearch-xpack-XPackPlugin/right.java | 69b3a83bcdda12231a82abe8123651e0f8824922 | [] | no_license | anonyFVer/mastery-material | 89062928807a1f859e9e8b9a113b2d2d123dc3f1 | db76ee571b84be5db2d245f3b593b29ebfaaf458 | refs/heads/master | 2023-03-16T13:13:49.798374 | 2021-02-26T04:19:19 | 2021-02-26T04:19:19 | 342,556,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 27,652 | java | package org.elasticsearch.xpack;
import org.bouncycastle.operator.OperatorCreationException;
import org.elasticsearch.SpecialPermission;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.support.ActionFilter;
import org.elasticsearch.bootstrap.BootstrapCheck;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Binder;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.inject.multibindings.Multibinder;
import org.elasticsearch.common.inject.util.Providers;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.IndexScopedSettings;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.index.IndexModule;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.ingest.Processor;
import org.elasticsearch.license.LicenseService;
import org.elasticsearch.license.Licensing;
import org.elasticsearch.license.XPackLicenseState;
import org.elasticsearch.plugins.ActionPlugin;
import org.elasticsearch.plugins.ClusterPlugin;
import org.elasticsearch.plugins.DiscoveryPlugin;
import org.elasticsearch.plugins.IngestPlugin;
import org.elasticsearch.plugins.NetworkPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.ScriptPlugin;
import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestHandler;
import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.threadpool.ExecutorBuilder;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.Transport;
import org.elasticsearch.transport.TransportInterceptor;
import org.elasticsearch.watcher.ResourceWatcherService;
import org.elasticsearch.xpack.action.TransportXPackInfoAction;
import org.elasticsearch.xpack.action.TransportXPackUsageAction;
import org.elasticsearch.xpack.action.XPackInfoAction;
import org.elasticsearch.xpack.action.XPackUsageAction;
import org.elasticsearch.xpack.watcher.common.http.HttpClient;
import org.elasticsearch.xpack.watcher.common.http.HttpRequestTemplate;
import org.elasticsearch.xpack.watcher.common.http.HttpSettings;
import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthFactory;
import org.elasticsearch.xpack.watcher.common.http.auth.HttpAuthRegistry;
import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuth;
import org.elasticsearch.xpack.watcher.common.http.auth.basic.BasicAuthFactory;
import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine;
import org.elasticsearch.xpack.deprecation.Deprecation;
import org.elasticsearch.xpack.extensions.XPackExtension;
import org.elasticsearch.xpack.extensions.XPackExtensionsService;
import org.elasticsearch.xpack.graph.Graph;
import org.elasticsearch.xpack.graph.GraphFeatureSet;
import org.elasticsearch.xpack.logstash.Logstash;
import org.elasticsearch.xpack.logstash.LogstashFeatureSet;
import org.elasticsearch.xpack.ml.MachineLearning;
import org.elasticsearch.xpack.ml.MachineLearningFeatureSet;
import org.elasticsearch.xpack.monitoring.Monitoring;
import org.elasticsearch.xpack.monitoring.MonitoringFeatureSet;
import org.elasticsearch.xpack.watcher.notification.email.Account;
import org.elasticsearch.xpack.watcher.notification.email.EmailService;
import org.elasticsearch.xpack.watcher.notification.email.attachment.DataAttachmentParser;
import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentParser;
import org.elasticsearch.xpack.watcher.notification.email.attachment.EmailAttachmentsParser;
import org.elasticsearch.xpack.watcher.notification.email.attachment.HttpEmailAttachementParser;
import org.elasticsearch.xpack.watcher.notification.email.attachment.ReportingAttachmentParser;
import org.elasticsearch.xpack.watcher.notification.email.support.BodyPartSource;
import org.elasticsearch.xpack.watcher.notification.hipchat.HipChatService;
import org.elasticsearch.xpack.watcher.notification.jira.JiraService;
import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyAccount;
import org.elasticsearch.xpack.watcher.notification.pagerduty.PagerDutyService;
import org.elasticsearch.xpack.watcher.notification.slack.SlackService;
import org.elasticsearch.xpack.rest.action.RestXPackInfoAction;
import org.elasticsearch.xpack.rest.action.RestXPackUsageAction;
import org.elasticsearch.xpack.security.InternalClient;
import org.elasticsearch.xpack.security.Security;
import org.elasticsearch.xpack.security.SecurityFeatureSet;
import org.elasticsearch.xpack.security.authc.AuthenticationService;
import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken;
import org.elasticsearch.xpack.security.crypto.CryptoService;
import org.elasticsearch.xpack.ssl.SSLConfigurationReloader;
import org.elasticsearch.xpack.ssl.SSLService;
import org.elasticsearch.xpack.upgrade.Upgrade;
import org.elasticsearch.xpack.watcher.Watcher;
import org.elasticsearch.xpack.watcher.WatcherFeatureSet;
import javax.security.auth.DestroyFailedException;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Path;
import java.security.AccessController;
import java.security.GeneralSecurityException;
import java.security.PrivilegedAction;
import java.time.Clock;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.Supplier;
import java.util.function.UnaryOperator;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.elasticsearch.xpack.watcher.Watcher.ENCRYPT_SENSITIVE_DATA_SETTING;
public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin, IngestPlugin, NetworkPlugin, ClusterPlugin, DiscoveryPlugin {
public static final String NAME = "x-pack";
public static final String SECURITY = "security";
public static final String MONITORING = "monitoring";
public static final String WATCHER = "watcher";
public static final String GRAPH = "graph";
public static final String MACHINE_LEARNING = "ml";
public static final String LOGSTASH = "logstash";
public static final String DEPRECATION = "deprecation";
public static final String UPGRADE = "upgrade";
private static final String SETTINGS_NAME = "xpack";
static {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SpecialPermission());
}
try {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
@Override
public Void run() {
try {
Class.forName("com.unboundid.util.Debug");
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
return null;
}
});
} catch (ExceptionInInitializerError bogus) {
if (bogus.getCause() instanceof SecurityException == false) {
throw bogus;
}
}
BodyPartSource.init();
Account.init();
}
protected final Settings settings;
private final Environment env;
protected boolean transportClientMode;
protected final XPackExtensionsService extensionsService;
protected XPackLicenseState licenseState;
protected SSLService sslService;
protected Licensing licensing;
protected Security security;
protected Monitoring monitoring;
protected Watcher watcher;
protected Graph graph;
protected MachineLearning machineLearning;
protected Logstash logstash;
protected Deprecation deprecation;
protected Upgrade upgrade;
public XPackPlugin(final Settings settings, final Path configPath) throws IOException, DestroyFailedException, OperatorCreationException, GeneralSecurityException {
this.settings = settings;
this.transportClientMode = transportClientMode(settings);
this.env = transportClientMode ? null : new Environment(settings, configPath);
this.licenseState = new XPackLicenseState();
this.sslService = new SSLService(settings, env);
this.licensing = new Licensing(settings);
this.security = new Security(settings, env, licenseState, sslService);
this.monitoring = new Monitoring(settings, licenseState);
this.watcher = new Watcher(settings);
this.graph = new Graph(settings);
this.machineLearning = new MachineLearning(settings, env, licenseState);
this.logstash = new Logstash(settings);
this.deprecation = new Deprecation();
this.upgrade = new Upgrade(settings);
if (transportClientMode == false) {
this.extensionsService = new XPackExtensionsService(settings, resolveXPackExtensionsFile(env), getExtensions());
} else {
this.extensionsService = null;
}
}
public Collection<Class<? extends XPackExtension>> getExtensions() {
return Collections.emptyList();
}
protected Clock getClock() {
return Clock.systemUTC();
}
@Override
public Collection<Module> createGuiceModules() {
ArrayList<Module> modules = new ArrayList<>();
modules.add(b -> b.bind(Clock.class).toInstance(getClock()));
modules.addAll(security.nodeModules());
modules.addAll(monitoring.nodeModules());
modules.addAll(watcher.nodeModules());
modules.addAll(graph.createGuiceModules());
modules.addAll(machineLearning.nodeModules());
modules.addAll(logstash.nodeModules());
if (transportClientMode) {
modules.add(b -> b.bind(XPackLicenseState.class).toProvider(Providers.of(null)));
}
return modules;
}
@Override
public Collection<Object> createComponents(Client client, ClusterService clusterService, ThreadPool threadPool, ResourceWatcherService resourceWatcherService, ScriptService scriptService, NamedXContentRegistry xContentRegistry, Environment environment, NodeEnvironment nodeEnvironment, NamedWriteableRegistry namedWriteableRegistry) {
List<Object> components = new ArrayList<>();
components.add(sslService);
final InternalClient internalClient = new InternalClient(settings, threadPool, client);
components.add(internalClient);
LicenseService licenseService = new LicenseService(settings, clusterService, getClock(), env, resourceWatcherService, licenseState);
components.add(licenseService);
components.add(licenseState);
try {
components.addAll(security.createComponents(client, threadPool, clusterService, resourceWatcherService, extensionsService.getExtensions()));
} catch (final Exception e) {
throw new IllegalStateException("security initialization failed", e);
}
components.addAll(monitoring.createComponents(internalClient, threadPool, clusterService, licenseService, sslService));
final CryptoService cryptoService;
try {
cryptoService = ENCRYPT_SENSITIVE_DATA_SETTING.get(settings) ? new CryptoService(settings) : null;
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Map<String, HttpAuthFactory> httpAuthFactories = new HashMap<>();
httpAuthFactories.put(BasicAuth.TYPE, new BasicAuthFactory(cryptoService));
HttpAuthRegistry httpAuthRegistry = new HttpAuthRegistry(httpAuthFactories);
HttpRequestTemplate.Parser httpTemplateParser = new HttpRequestTemplate.Parser(httpAuthRegistry);
components.add(httpTemplateParser);
final HttpClient httpClient = new HttpClient(settings, httpAuthRegistry, sslService);
components.add(httpClient);
Collection<Object> notificationComponents = createNotificationComponents(clusterService.getClusterSettings(), httpClient, httpTemplateParser, scriptService, httpAuthRegistry, cryptoService);
components.addAll(notificationComponents);
components.addAll(watcher.createComponents(getClock(), scriptService, internalClient, licenseState, httpClient, httpTemplateParser, threadPool, clusterService, cryptoService, xContentRegistry, components));
components.addAll(machineLearning.createComponents(internalClient, clusterService, threadPool, xContentRegistry));
components.addAll(logstash.createComponents(internalClient, clusterService));
components.addAll(upgrade.createComponents(client, clusterService, threadPool, resourceWatcherService, scriptService, xContentRegistry));
new SSLConfigurationReloader(settings, env, sslService, resourceWatcherService);
return components;
}
private Collection<Object> createNotificationComponents(ClusterSettings clusterSettings, HttpClient httpClient, HttpRequestTemplate.Parser httpTemplateParser, ScriptService scriptService, HttpAuthRegistry httpAuthRegistry, CryptoService cryptoService) {
List<Object> components = new ArrayList<>();
components.add(new EmailService(settings, cryptoService, clusterSettings));
components.add(new HipChatService(settings, httpClient, clusterSettings));
components.add(new JiraService(settings, httpClient, clusterSettings));
components.add(new SlackService(settings, httpClient, clusterSettings));
components.add(new PagerDutyService(settings, httpClient, clusterSettings));
TextTemplateEngine textTemplateEngine = new TextTemplateEngine(settings, scriptService);
components.add(textTemplateEngine);
Map<String, EmailAttachmentParser> parsers = new HashMap<>();
parsers.put(HttpEmailAttachementParser.TYPE, new HttpEmailAttachementParser(httpClient, httpTemplateParser, textTemplateEngine));
parsers.put(DataAttachmentParser.TYPE, new DataAttachmentParser());
parsers.put(ReportingAttachmentParser.TYPE, new ReportingAttachmentParser(settings, httpClient, textTemplateEngine, httpAuthRegistry));
components.add(new EmailAttachmentsParser(parsers));
return components;
}
@Override
public Settings additionalSettings() {
Settings.Builder builder = Settings.builder();
builder.put(security.additionalSettings());
builder.put(watcher.additionalSettings());
builder.put(machineLearning.additionalSettings());
return builder.build();
}
@Override
public Collection<String> getRestHeaders() {
if (transportClientMode) {
return Collections.emptyList();
}
Set<String> headers = new HashSet<>();
headers.add(UsernamePasswordToken.BASIC_AUTH_HEADER);
if (AuthenticationService.RUN_AS_ENABLED.get(settings)) {
headers.add(AuthenticationService.RUN_AS_USER_HEADER);
}
headers.addAll(extensionsService.getExtensions().stream().flatMap(e -> e.getRestHeaders().stream()).collect(Collectors.toList()));
return headers;
}
@Override
public List<ScriptContext> getContexts() {
return Arrays.asList(Watcher.SCRIPT_SEARCH_CONTEXT, Watcher.SCRIPT_EXECUTABLE_CONTEXT, Watcher.SCRIPT_TEMPLATE_CONTEXT);
}
@Override
public List<Setting<?>> getSettings() {
ArrayList<Setting<?>> settings = new ArrayList<>();
settings.addAll(Security.getSettings(transportClientMode, extensionsService));
settings.addAll(monitoring.getSettings());
settings.addAll(watcher.getSettings());
settings.addAll(machineLearning.getSettings());
settings.addAll(licensing.getSettings());
settings.addAll(XPackSettings.getAllSettings());
settings.add(LicenseService.SELF_GENERATED_LICENSE_TYPE);
settings.add(Setting.simpleString("index.xpack.version", Setting.Property.IndexScope));
settings.add(SlackService.SLACK_ACCOUNT_SETTING);
settings.add(EmailService.EMAIL_ACCOUNT_SETTING);
settings.add(HipChatService.HIPCHAT_ACCOUNT_SETTING);
settings.add(JiraService.JIRA_ACCOUNT_SETTING);
settings.add(PagerDutyService.PAGERDUTY_ACCOUNT_SETTING);
settings.add(ReportingAttachmentParser.RETRIES_SETTING);
settings.add(ReportingAttachmentParser.INTERVAL_SETTING);
settings.addAll(HttpSettings.getSettings());
return settings;
}
@Override
public List<String> getSettingsFilter() {
List<String> filters = new ArrayList<>();
filters.add("xpack.notification.email.account.*.smtp.password");
filters.add("xpack.notification.jira.account.*.password");
filters.add("xpack.notification.slack.account.*.url");
filters.add("xpack.notification.pagerduty.account.*.url");
filters.add("xpack.notification.pagerduty." + PagerDutyAccount.SERVICE_KEY_SETTING);
filters.add("xpack.notification.pagerduty.account.*." + PagerDutyAccount.SERVICE_KEY_SETTING);
filters.add("xpack.notification.hipchat.account.*.auth_token");
filters.addAll(security.getSettingsFilter(extensionsService));
filters.addAll(monitoring.getSettingsFilter());
if (transportClientMode == false) {
for (XPackExtension extension : extensionsService.getExtensions()) {
filters.addAll(extension.getSettingsFilter());
}
}
return filters;
}
@Override
public List<ExecutorBuilder<?>> getExecutorBuilders(final Settings settings) {
List<ExecutorBuilder<?>> executorBuilders = new ArrayList<ExecutorBuilder<?>>();
executorBuilders.addAll(watcher.getExecutorBuilders(settings));
executorBuilders.addAll(machineLearning.getExecutorBuilders(settings));
executorBuilders.addAll(security.getExecutorBuilders(settings));
return executorBuilders;
}
@Override
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
actions.add(new ActionHandler<>(XPackInfoAction.INSTANCE, TransportXPackInfoAction.class));
actions.add(new ActionHandler<>(XPackUsageAction.INSTANCE, TransportXPackUsageAction.class));
actions.addAll(licensing.getActions());
actions.addAll(monitoring.getActions());
actions.addAll(security.getActions());
actions.addAll(watcher.getActions());
actions.addAll(graph.getActions());
actions.addAll(machineLearning.getActions());
actions.addAll(deprecation.getActions());
actions.addAll(upgrade.getActions());
return actions;
}
@Override
public List<ActionFilter> getActionFilters() {
List<ActionFilter> filters = new ArrayList<>();
filters.addAll(licensing.getActionFilters());
filters.addAll(monitoring.getActionFilters());
filters.addAll(security.getActionFilters());
filters.addAll(watcher.getActionFilters());
filters.addAll(machineLearning.getActionFilters());
filters.addAll(upgrade.getActionFilters());
return filters;
}
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<DiscoveryNodes> nodesInCluster) {
List<RestHandler> handlers = new ArrayList<>();
handlers.add(new RestXPackInfoAction(settings, restController));
handlers.add(new RestXPackUsageAction(settings, restController));
handlers.addAll(licensing.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(monitoring.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(security.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(watcher.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(graph.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(machineLearning.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(deprecation.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
handlers.addAll(upgrade.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster));
return handlers;
}
@Override
public Map<String, Processor.Factory> getProcessors(Processor.Parameters parameters) {
return security.getProcessors(parameters);
}
@Override
public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
List<NamedWriteableRegistry.Entry> entries = new ArrayList<>();
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, SECURITY, SecurityFeatureSet.Usage::new));
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, WATCHER, WatcherFeatureSet.Usage::new));
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, MONITORING, MonitoringFeatureSet.Usage::new));
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, GRAPH, GraphFeatureSet.Usage::new));
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, MACHINE_LEARNING, MachineLearningFeatureSet.Usage::new));
entries.add(new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, LOGSTASH, LogstashFeatureSet.Usage::new));
entries.addAll(watcher.getNamedWriteables());
entries.addAll(machineLearning.getNamedWriteables());
entries.addAll(licensing.getNamedWriteables());
entries.addAll(Security.getNamedWriteables());
return entries;
}
@Override
public List<NamedXContentRegistry.Entry> getNamedXContent() {
List<NamedXContentRegistry.Entry> entries = new ArrayList<>();
entries.addAll(watcher.getNamedXContent());
entries.addAll(machineLearning.getNamedXContent());
entries.addAll(licensing.getNamedXContent());
return entries;
}
@Override
public UnaryOperator<Map<String, IndexTemplateMetaData>> getIndexTemplateMetaDataUpgrader() {
return templates -> {
templates = watcher.getIndexTemplateMetaDataUpgrader().apply(templates);
templates = security.getIndexTemplateMetaDataUpgrader().apply(templates);
return templates;
};
}
public void onIndexModule(IndexModule module) {
security.onIndexModule(module);
watcher.onIndexModule(module);
}
public static void bindFeatureSet(Binder binder, Class<? extends XPackFeatureSet> featureSet) {
binder.bind(featureSet).asEagerSingleton();
Multibinder<XPackFeatureSet> featureSetBinder = Multibinder.newSetBinder(binder, XPackFeatureSet.class);
featureSetBinder.addBinding().to(featureSet);
}
public static boolean transportClientMode(Settings settings) {
return TransportClient.CLIENT_TYPE.equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey()));
}
public static boolean isTribeNode(Settings settings) {
return settings.getGroups("tribe", true).isEmpty() == false;
}
public static boolean isTribeClientNode(Settings settings) {
return settings.get("tribe.name") != null;
}
public static Path resolveConfigFile(Environment env, String name) {
return env.configFile().resolve(NAME).resolve(name);
}
public static String featureSettingPrefix(String featureName) {
return SETTINGS_NAME + "." + featureName;
}
public static Path resolveXPackExtensionsFile(Environment env) {
return env.pluginsFile().resolve(XPackPlugin.NAME).resolve("extensions");
}
@Override
public List<TransportInterceptor> getTransportInterceptors(NamedWriteableRegistry namedWriteableRegistry, ThreadContext threadContext) {
return security.getTransportInterceptors(namedWriteableRegistry, threadContext);
}
@Override
public Map<String, Supplier<Transport>> getTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, NetworkService networkService) {
return security.getTransports(settings, threadPool, bigArrays, circuitBreakerService, namedWriteableRegistry, networkService);
}
@Override
public Map<String, Supplier<HttpServerTransport>> getHttpTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, NamedXContentRegistry xContentRegistry, NetworkService networkService, HttpServerTransport.Dispatcher dispatcher) {
return security.getHttpTransports(settings, threadPool, bigArrays, circuitBreakerService, namedWriteableRegistry, xContentRegistry, networkService, dispatcher);
}
@Override
public UnaryOperator<RestHandler> getRestHandlerWrapper(ThreadContext threadContext) {
return security.getRestHandlerWrapper(threadContext);
}
@Override
public List<BootstrapCheck> getBootstrapChecks() {
return Collections.unmodifiableList(Stream.of(security.getBootstrapChecks(), watcher.getBootstrapChecks(env)).flatMap(Collection::stream).collect(Collectors.toList()));
}
@Override
public Map<String, Supplier<ClusterState.Custom>> getInitialClusterStateCustomSupplier() {
return security.getInitialClusterStateCustomSupplier();
}
@Override
public BiConsumer<DiscoveryNode, ClusterState> getJoinValidator() {
return security.getJoinValidator();
}
} | [
"namasikanam@gmail.com"
] | namasikanam@gmail.com |
85e148ed9bd83223019d68e53155ecc6319b97ac | c08a9e108db907937f3519afbd5964078affeb2a | /src/myinputformat/SequenceFileDriver.java | 02c733b31ecefcab554e1917e31fabe35149416f | [] | no_license | Jineyremr/hadoop | 2c9702f11bace18de1169ed21fe7552d6de724ce | c0edaaca80581c18756341022527e7a0cfeafa11 | refs/heads/master | 2022-05-30T05:10:55.169838 | 2019-12-03T09:31:00 | 2019-12-03T09:31:00 | 224,077,501 | 0 | 0 | null | 2022-04-12T21:57:45 | 2019-11-26T01:41:30 | Java | UTF-8 | Java | false | false | 1,777 | java | package myinputformat;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;
import java.io.IOException;
public class SequenceFileDriver {
public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
// 1 获取job对象
Configuration conf = new Configuration();
Job job = Job.getInstance(conf);
// 2 设置jar包存储位置、关联自定义的mapper和reducer
job.setJarByClass(SequenceFileDriver.class);
job.setMapperClass(SequenceFileMapper.class);
job.setReducerClass(SequenceFileReducer.class);
// 7设置输入的inputFormat
job.setInputFormatClass(WholeFileInputFormat.class);
// 8设置输出的outputFormat
job.setOutputFormatClass(SequenceFileOutputFormat.class);
// 3 设置map输出端的kv类型
job.setMapOutputKeyClass(Text.class);
job.setMapOutputValueClass(BytesWritable.class);
// 4 设置最终输出端的kv类型
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(BytesWritable.class);
// 5 设置输入输出路径
FileInputFormat.setInputPaths(job, new Path("D:\\inout\\input\\sequence"));
FileOutputFormat.setOutputPath(job, new Path("D:\\inout\\output\\sequence"));
// 6 提交job
boolean result = job.waitForCompletion(true);
System.exit(result ? 0 : 1);
}
}
| [
"chengmx@neusoft.com"
] | chengmx@neusoft.com |
3a0cb31c0c936f968a0bcabef7170a0749b6c712 | d6f31c99b7026f0da0f4816380de33f8813fc061 | /src/main/java/com/hebeu/keyan/dao/ProProjectDomainMapper.java | 32d272f3435830ec89c3942e6de33a0dbf69a506 | [] | no_license | pursuedream0820/keyan | 436cf45b813ea24a996b0dd13ff49e7669a6c574 | 86ef831192c76e9a4baf0d728fe3b1f8a0d1b75c | refs/heads/master | 2021-06-23T13:54:27.509494 | 2017-08-24T12:33:12 | 2017-08-24T12:33:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,070 | java | package com.hebeu.keyan.dao;
import com.hebeu.keyan.po.ProProjectDomain;
import com.hebeu.keyan.po.ProProjectDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface ProProjectDomainMapper {
int countByExample(ProProjectDomainExample example);
int deleteByExample(ProProjectDomainExample example);
int deleteByPrimaryKey(Integer projectDomainId);
int insert(ProProjectDomain record);
int insertSelective(ProProjectDomain record);
List<ProProjectDomain> selectByExample(ProProjectDomainExample example);
ProProjectDomain selectByPrimaryKey(Integer projectDomainId);
int updateByExampleSelective(@Param("record") ProProjectDomain record, @Param("example") ProProjectDomainExample example);
int updateByExample(@Param("record") ProProjectDomain record, @Param("example") ProProjectDomainExample example);
int updateByPrimaryKeySelective(ProProjectDomain record);
int updateByPrimaryKey(ProProjectDomain record);
} | [
"672582330@qq.com"
] | 672582330@qq.com |
0d8006964c42653d1e29ce75e518dd28ddaa032e | e0b274fcedaedb4324171d51ff3e22e9bb53a458 | /common-dps/src/main/java/com/github/prontera/aspect/HibernateValidatorAspect.java | 6fa83373debd8fd0f05d5649550e6cfc60d46ee7 | [] | no_license | deyuanchen/spring-cloud-rest-tcc | 7107509da951df226eb217ae5d8e8ea661d651d5 | ac8b77f7ebe97e443fecd87d210e39216441b64d | refs/heads/master | 2019-07-11T19:07:49.625539 | 2017-10-13T02:23:07 | 2017-10-13T02:23:07 | 91,875,968 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,098 | java | package com.github.prontera.aspect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.prontera.RequestLogging;
import com.github.prontera.RestStatus;
import com.github.prontera.exception.IllegalValidateException;
import com.github.prontera.model.response.ErrorEntity;
import com.github.prontera.web.ServletContextHolder;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.Maps;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.Ordered;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.lang.reflect.Field;
import java.util.HashMap;
/**
* @author 陈德元
* @see RequestLogging
* @see org.springframework.web.bind.annotation.ControllerAdvice
*/
@Aspect
public class HibernateValidatorAspect implements Ordered {
private static final Logger LOGGER = LoggerFactory.getLogger(HibernateValidatorAspect.class);
private final int order;
private final RestStatus throwIfInvalidModel;
public HibernateValidatorAspect() {
this(Byte.MAX_VALUE);
}
public HibernateValidatorAspect(int order) {
this(order, DefaultInvalidModelStatus.INVALID_MODEL_STATUS);
}
public HibernateValidatorAspect(int order, RestStatus throwIfInvalidModel) {
this.order = order;
this.throwIfInvalidModel = throwIfInvalidModel;
}
@Around(value = "within(com.github.prontera..*) " +
"&& (@annotation(org.springframework.web.bind.annotation.ResponseBody)" +
"|| @annotation(org.springframework.web.bind.annotation.RequestMapping))")
public Object aroundMethod(ProceedingJoinPoint joinPoint) throws Throwable {
for (Object arg : joinPoint.getArgs()) {
if (arg instanceof BindingResult) {
throwIfInvalidModel((BindingResult) arg, throwIfInvalidModel);
}
}
return joinPoint.proceed();
}
@Override
public int getOrder() {
return order;
}
/**
* 校验实体合法性, 自动向Map封装错误信息.
*
* @param result Spring MVC中与@Valid成对出现的BindingResult, 用于绑定错误信息
* @throws IllegalValidateException 实体校验失败异常
* @see org.springframework.web.bind.annotation.ControllerAdvice
*/
public static void throwIfInvalidModel(BindingResult result, RestStatus errorStatus) {
Preconditions.checkNotNull(result);
// 默认为true, 检测到错误时赋值为false
boolean isValid = true;
final HashMap<Object, Object> errorMap = Maps.newHashMap();
if (result.getErrorCount() > 0) {
isValid = false;
String errorFieldName;
for (FieldError fieldError : result.getFieldErrors()) {
errorFieldName = acquireFieldName(result, fieldError);
final String errorMessage = fieldError.getDefaultMessage();
LOGGER.debug("request id: {}, error field: {}, error msg: {}",
ServletContextHolder.fetchRequestId(), errorFieldName, errorMessage);
errorMap.put(errorFieldName, errorMessage);
}
}
if (!isValid) {
final ErrorEntity entity = new ErrorEntity(errorStatus, errorMap);
// 以entity中的code为key存入Request中
final String errorCode = String.valueOf(errorStatus.code());
bindStatusCodesInRequestScope(errorCode, entity);
throw new IllegalValidateException(errorCode);
}
}
/**
* 获取错误的字段名, 如果被{@link JsonProperty}修饰则优先选择
*
* @see JsonProperty
*/
private static String acquireFieldName(BindingResult result, FieldError fieldError) {
Preconditions.checkNotNull(result);
Preconditions.checkNotNull(fieldError);
// 获取错误字段名
String errorFieldName = fieldError.getField();
// 获取校验非法的类
Class<?> clazz = result.getTarget().getClass();
final Field field;
try {
// 获取其字段名
field = clazz.getDeclaredField(fieldError.getField());
final JsonProperty annotation = field.getAnnotation(JsonProperty.class);
// 若JsonProperty里value()不为null则覆盖该值
if (annotation != null) {
errorFieldName = annotation.value();
}
} catch (NoSuchFieldException e) {
Throwables.throwIfUnchecked(e);
LOGGER.error("request id: {}, 反射字段名时抛出异常: {}", ServletContextHolder.fetchRequestId(), e.getMessage());
}
return errorFieldName;
}
private static void bindStatusCodesInRequestScope(String key, ErrorEntity entity) {
Preconditions.checkNotNull(entity);
Preconditions.checkNotNull(key);
final RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if (requestAttributes != null) {
((ServletRequestAttributes) requestAttributes).getRequest().setAttribute(key, entity);
}
}
private enum DefaultInvalidModelStatus implements RestStatus {
INVALID_MODEL_STATUS(40001, "invalid request model");
DefaultInvalidModelStatus(int code, String messge) {
this.code = code;
this.message = messge;
}
private final int code;
private final String message;
@Override
public int code() {
return code;
}
@Override
public String message() {
return message;
}
}
}
| [
"321097355@qq.com"
] | 321097355@qq.com |
abb739f637d936de4bbd4d23eb4e360cb359a803 | 92430cf1079d3deed4b0c79a7342c06c61f3577f | /Do_it_chapter02/src/array/primeNumber/PrimeNumber2.java | fb69c114b45e435d0ceba2dce10832f34038f199 | [] | no_license | kyunghwapark/Algorithm_Java | 59c969eff8ec23cd4c237dd5c7034143762feef3 | 9bfa523a939e9f8fadf9b0cf3face57d0c18ce5b | refs/heads/master | 2020-04-09T23:43:17.969622 | 2019-03-02T16:04:22 | 2019-03-02T16:04:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,223 | java | package array.primeNumber;
// 1000이하의 소수를 열거
// 소수 탐색 ver.2 : 2부터 n-1까지의 어떤 소수로도 나누어떨어지지 않습니다.
public class PrimeNumber2 {
public static void main(String[] args) {
int counter = 0; // 나눗셈의 횟수
int ptr = 0; // 판별한 소수의 개수를 저장하는 변수
int[] prime = new int[500]; // 소수를 저장하는 배열
prime[ptr++] = 2; // prime[0]에 2(소수)를 저장하고 ptr을 1 올림
for(int n=3; n<=1000; n+=2) { // 홀수만 판별! 왜냐면 짝수는 2로 나누어 떨어지므로 이미 소수가 아님
int i;
for(i=1; i<ptr; i++) { // prime배열의 마지막 인덱스 : ptr-1
counter++;
if(n%prime[i] == 0) { // 소수로 나누어 떨어지면 소수가 아님.
break; // 더 이상의 반복은 불필요
}
}
if(ptr == i) { // 마지막까지 나누어 떨어지지 않음
prime[ptr++] = n; // 소수이기 때문에 배열에 저장하고 ptr 1만큼 증가
}
}
for(int i=0; i<ptr; i++) { // 찾은 ptr개의 소수를 출력
System.out.println(prime[i]);
}
System.out.println("나눗셈을 수행한 횟수 : " + counter);
}
}
| [
"kyunghwa.park123@gmail.com"
] | kyunghwa.park123@gmail.com |
78817adb62ea4c2d1a54e6a756393a4522565d6b | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-32b-2-28-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math3/geometry/partitioning/AbstractRegion_ESTest.java | 96fd5d265b1e6bb4a500ffa97545b25822cbfe97 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,070 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 13:00:14 UTC 2020
*/
package org.apache.commons.math3.geometry.partitioning;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math3.geometry.euclidean.twod.Euclidean2D;
import org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet;
import org.apache.commons.math3.geometry.partitioning.BSPTree;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractRegion_ESTest extends AbstractRegion_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet();
BSPTree<Euclidean2D> bSPTree0 = new BSPTree<Euclidean2D>(polygonsSet0);
PolygonsSet polygonsSet1 = polygonsSet0.buildNew(bSPTree0);
// Undeclared exception!
polygonsSet1.getSize();
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
b305110549ce38116a69a11fef7c01522a409c14 | 9e457bd38b888ce1b07a1a95cd4067839694d50a | /src/main/java/com/aaa/dao/TakeFoundDao.java | d76fefe73034be9e01fb5dc9e810c83649e6f01f | [] | no_license | wangwuguan/authority-management | 82e2e3bd1edf4346199753f6a8bd0663a6358dd4 | a3b01084e2748dad82bb451eb23c69eee419722f | refs/heads/master | 2022-06-30T09:26:39.091602 | 2020-06-13T17:34:08 | 2020-06-13T17:34:08 | 195,632,471 | 1 | 0 | null | 2022-06-21T01:25:05 | 2019-07-07T09:21:37 | JavaScript | UTF-8 | Java | false | false | 476 | java | package com.aaa.dao;
import java.util.List;
import java.util.Map;
import com.aaa.entity.Person;
import com.aaa.entity.TakeFund;
public interface TakeFoundDao {
/**
* 插入提取公积金记录
* @param t
* @return
*/
int addTake(TakeFund t);
/**
* 提取后 余额相应减少
* @param p
* @param takefundmoney
*/
void updatePmoney(Person p,double takefundmoney);
/**
* 插入约定提取
* @param t
* @return
*/
int addAgreed(TakeFund t);
}
| [
"2047683649@qq.com"
] | 2047683649@qq.com |
d4d5af308c20d73f50b55b23aa996c679185a59b | f4e61380ee4fd0cd58730470687e2a88bcabd6dd | /src/Computer/Mouse.java | d0dda8fb3a0ada04859ac17c7e2386e701799435 | [] | no_license | wupan9726/repo2 | aaa98f019980c4835eede5307358fdc7af7a8697 | 0c5981e61e740d1d6f852ff3aaa1490fa97ffc23 | refs/heads/master | 2023-01-07T18:04:43.943591 | 2020-11-15T12:53:31 | 2020-11-15T12:53:31 | 312,972,299 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 309 | java | package Computer;
public class Mouse implements USB {
@Override
public void open() {
System.out.println("打开鼠标");
}
@Override
public void off() {
System.out.println("关闭鼠标");
}
public void kick(){
System.out.println("点击鼠标");
}
}
| [
"554772361@qq.com"
] | 554772361@qq.com |
05b992762946dc41c5b49806ee4c931236f8329b | 9ed4975c34757de723e5c405617ea56cb964d9ab | /src/com/hani/point/PointDTO.java | 742939bf9cc1726759dc12ec515eaae17d6ff1bd | [] | no_license | SOOKYOUNG-KIM/Servlet_3 | 466e79a5b2ac490caed911b7da9d7afdefa37735 | e613e8b46781916d841f4b76c473fdd87287a0b4 | refs/heads/master | 2021-05-25T08:06:07.486748 | 2020-04-10T09:31:41 | 2020-04-10T09:31:41 | 253,731,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,144 | java | package com.hani.point;
public class PointDTO {
//DTO(Data Transfer Object)
//VO(Value Object)
//변수의 접근제어자는 private
//변수의 데이터 타입과 변수명은 Table의 Column과 일치
//getter, setter
//생성자는 여러개 있어도 되지만 기본생성자는 꼭 필수.
private String name;
private int num;
private int kor;
private int eng;
private int math;
private int total;
private double avg;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int getKor() {
return kor;
}
public void setKor(int kor) {
this.kor = kor;
}
public int getEng() {
return eng;
}
public void setEng(int eng) {
this.eng = eng;
}
public int getMath() {
return math;
}
public void setMath(int math) {
this.math = math;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public double getAvg() {
return avg;
}
public void setAvg(double avg) {
this.avg = avg;
}
}
| [
"tudsid147@gmail.com"
] | tudsid147@gmail.com |
4600f7e66cf90bcc7b9a00d43e16d71b802db37d | 0413fa13dbef125dcc950062ad2b41039cacb5af | /app/src/main/java/com/example/rd/miwok/Word.java | 6a0261a52fd416618a44181fb5dfb2fd2d4cbed0 | [] | no_license | sakshamaggarwal/Basic_Spanish | b9017ea776d324c239367cc72c83f227f5c082e4 | 262a71dba5f52b8f9fec5645bde9e3098e8b9e94 | refs/heads/master | 2023-08-05T00:30:41.166372 | 2023-08-01T22:18:34 | 2023-08-01T22:18:34 | 147,288,628 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,556 | java | package com.example.rd.miwok;
/**
* Created by rd on 14-07-2016.
* vjj
*/
public class Word {
private String mMiwokTranslation;
private String mEnglishTranslation;
private int mImage = NO_IMAGE_PROVIDED;
private static final int NO_IMAGE_PROVIDED = -1;
private int mSound = 0;
/*Constructor for making objects
Two arguments
* */
public Word(String englishTranslation, String miwokTranslation, int Image, int Sound)
{
mMiwokTranslation = miwokTranslation;
mEnglishTranslation = englishTranslation;
mImage = Image;
mSound = Sound;
}
public Word(String englishTranslation, String miwokTranslation, int Sound)
{
mMiwokTranslation = miwokTranslation;
mEnglishTranslation = englishTranslation;
mSound = Sound;
}
/*Get the miwok Translation of the word
Primarily used in WordAdapter.java class which is our Custom Array Adapter
* */
public String getMiwokTranslation()
{
return mMiwokTranslation;
}
/*Get the english Translation of the word
Primarily used in WordAdapter.java class which is our Custom Array Adapter
* */
public String getEnglishTranslation() {
return mEnglishTranslation;
}
/*Get the image for the corresponding word
* */
public int getImageResourceId()
{
return mImage;
}
public int getSoundResourceId()
{
return mSound;
}
public boolean hasImage()
{
return mImage != NO_IMAGE_PROVIDED;
}
}
| [
"mani.saksham12@gmail.com"
] | mani.saksham12@gmail.com |
c2fad23a5e4f0fb8f408da89487cfa62ba8a1982 | 61775117c4d15b05b8a8178d3f9b19a036e3794f | /src/main/java/com/project/entity/ExpositionEntity.java | e44813f2e551f556af137b1fe0243b0463ae9fb8 | [] | no_license | CiteflaZe/Exposition_Calendar | 237b1e9917d8ae6dcfadf1bfad791b9fd5f8f303 | d39a3dcd58f9beb661078222728abc27efb86cf8 | refs/heads/master | 2022-07-03T13:44:03.145385 | 2019-12-11T08:31:21 | 2019-12-11T08:31:21 | 217,887,679 | 1 | 0 | null | 2022-06-21T02:24:08 | 2019-10-27T17:02:37 | Java | UTF-8 | Java | false | false | 4,165 | java | package com.project.entity;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;
public class ExpositionEntity {
private final Long id;
private final String title;
private final String theme;
private final LocalDate startDate;
private final LocalDate endDate;
private final BigDecimal ticketPrice;
private final String description;
private final HallEntity hall;
private ExpositionEntity(Builder builder) {
this.id = builder.id;
this.title = builder.title;
this.theme = builder.theme;
this.startDate = builder.startDate;
this.endDate = builder.endDate;
this.ticketPrice = builder.ticketPrice;
this.description = builder.description;
this.hall = builder.hall;
}
public static Builder builder() {
return new Builder();
}
public Long getId() {
return id;
}
public String getTitle() {
return title;
}
public String getTheme() {
return theme;
}
public LocalDate getStartDate() {
return startDate;
}
public LocalDate getEndDate() {
return endDate;
}
public BigDecimal getTicketPrice() {
return ticketPrice;
}
public String getDescription() {
return description;
}
public HallEntity getHall() {
return hall;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExpositionEntity that = (ExpositionEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(title, that.title) &&
Objects.equals(theme, that.theme) &&
Objects.equals(startDate, that.startDate) &&
Objects.equals(endDate, that.endDate) &&
Objects.equals(ticketPrice, that.ticketPrice) &&
Objects.equals(description, that.description) &&
Objects.equals(hall, that.hall);
}
@Override
public int hashCode() {
return Objects.hash(id, title, theme, startDate, endDate, ticketPrice, description, hall);
}
@Override
public String toString() {
return "ExpositionEntity{" +
"id=" + id +
", title='" + title + '\'' +
", theme='" + theme + '\'' +
", startTime=" + startDate +
", finishTime=" + endDate +
", ticketPrice=" + ticketPrice +
", description='" + description + '\'' +
", hall=" + hall +
'}';
}
public static class Builder {
private Long id;
private String title;
private String theme;
private LocalDate startDate;
private LocalDate endDate;
private BigDecimal ticketPrice;
private String description;
private HallEntity hall;
private Builder() {
}
public ExpositionEntity build() {
return new ExpositionEntity(this);
}
public Builder withId(Long id) {
this.id = id;
return this;
}
public Builder withTitle(String title) {
this.title = title;
return this;
}
public Builder withTheme(String theme) {
this.theme = theme;
return this;
}
public Builder withStartDate(LocalDate startDate) {
this.startDate = startDate;
return this;
}
public Builder withEndDate(LocalDate endDate) {
this.endDate = endDate;
return this;
}
public Builder withTicketPrice(BigDecimal ticketPrice) {
this.ticketPrice = ticketPrice;
return this;
}
public Builder withDescription(String description) {
this.description = description;
return this;
}
public Builder withHall(HallEntity hall) {
this.hall = hall;
return this;
}
}
}
| [
"citeflaze@gmail.com"
] | citeflaze@gmail.com |
f21bf3bf2b12586c84e2fa18b6eec0f9ff5abbaa | 6c5a7a2c958939f4bbfa05ac2bb2d5c1a00af4d4 | /src/com/cmos/ipa/service/video_surveillance/videoOutputV1/GetSessionParametersResponse.java | f05772a1562e332136004bc678dc6e9ffed67257 | [] | no_license | android36524/IPA | a7c9c26ad0add9d459e993753e405520d8c750e4 | 0bff9c67344092bebdb42595f445de25f9e92c7e | refs/heads/master | 2021-01-12T05:11:27.093674 | 2016-09-01T01:25:57 | 2016-09-01T01:25:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,811 | java |
package com.cmos.ipa.service.video_surveillance.videoOutputV1;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>anonymous complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="streamParameters" type="{urn:schemas-pelco-com:service:VideoOutput:1}StreamParameters"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"streamParameters"
})
@XmlRootElement(name = "GetSessionParametersResponse")
public class GetSessionParametersResponse {
@XmlElement(required = true)
protected StreamParameters streamParameters;
/**
* ��ȡstreamParameters���Ե�ֵ��
*
* @return
* possible object is
* {@link com.cmos.ipa.service.video_surveillance.videoOutputV1.StreamParameters }
*
*/
public StreamParameters getStreamParameters() {
return streamParameters;
}
/**
* ����streamParameters���Ե�ֵ��
*
* @param value
* allowed object is
* {@link com.cmos.ipa.service.video_surveillance.videoOutputV1.StreamParameters }
*
*/
public void setStreamParameters(StreamParameters value) {
this.streamParameters = value;
}
}
| [
"wei.zhu@winphone.us"
] | wei.zhu@winphone.us |
7c086cc66a57ffcaa78a2731a51e743dee073d1a | f3a3811cffe1f2433928638121c4c2f727923b82 | /src/DataSet.java | 7b60c939a12c2c9e9809e62f8469ceee81ac3742 | [] | no_license | amm4yv/MachineLearning | 21a652302f6cf1cf425d31e351a94285c6c4b28c | 6171b008a572e82bc6dbe1f597fdff4f7b194f13 | refs/heads/master | 2021-01-14T11:34:31.588280 | 2015-05-02T12:46:33 | 2015-05-02T12:46:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 943 | java | import java.util.ArrayList;
import java.util.HashMap;
public class DataSet {
String output;
double[] outputIndex;
//private HashMap<FeatureHeader, String> data;
double[] matrix;
public DataSet(String[] input, ArrayList<FeatureHeader> features,
String[] output) {
//this.data = new HashMap<FeatureHeader, String>();
this.matrix = new double[input.length];
this.outputIndex = new double[1];
//bias
this.matrix[0] = 1;
for (int i = 0; i < input.length - 1; i++) {
//this.data.put(features.get(i), input[i]);
matrix[i+1] = features.get(i).find(input[i]);
}
this.output = input[input.length - 1];
if (output != null) {
for (int i = 0; i < output.length; i++)
if (this.output.equals(output[i]))
this.outputIndex[0] = i;
}
}
// public String toString() {
// String s = "";
// for (FeatureHeader k : this.data.keySet())
// s += k.name + ":" + this.data.get(k) + " ";
// return s;
// }
}
| [
"amm4yv@virginia.edu"
] | amm4yv@virginia.edu |
b00274c5fade1b1584caf32c1de613f9b051864e | c0760c7dc13d206635e3c0ac515e696b807bdae4 | /TRS-Front-End/src/main/java/trs/front/end/controller/WelcomeController.java | 5b7ec73a4f4696331d4f5b67bd80849ad8176c5d | [] | no_license | DIGIHOOK/TradingSystem_Repo | a1d8d8fae5aa8c1d037c63ceb8717a6be6b784fa | ff4238e27c9d34b5efdb1be2286f504ca62be3cb | refs/heads/master | 2020-03-19T23:06:02.321403 | 2018-06-12T00:44:53 | 2018-06-12T00:44:53 | 136,993,689 | 0 | 0 | null | 2018-07-03T10:19:18 | 2018-06-11T23:56:35 | HTML | UTF-8 | Java | false | false | 561 | java | package trs.front.end.controller;
import java.util.Map;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
//@Controller
public class WelcomeController {
// inject via application.properties
@Value("${welcome.message:test}")
private String message = "Hello World";
@RequestMapping("/welcome")
public String welcome(Map<String, Object> model) {
model.put("message", this.message);
return "welcome";
}
}
| [
"elrafikzakaria@gmail.com"
] | elrafikzakaria@gmail.com |
10dc89780a12eb33ad26a13bd04e19be8ac380b0 | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/apache/pdfbox/pdmodel/fdf/FDFPageInfo.java | ffc05c22c3487e21ceb22e1dc9150e9f3f1ea2d8 | [
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MewX/contendo-viewer-v1.6.3 | 7aa1021e8290378315a480ede6640fd1ef5fdfd7 | 69fba3cea4f9a43e48f43148774cfa61b388e7de | refs/heads/main | 2022-07-30T04:51:40.637912 | 2021-03-28T05:06:26 | 2021-03-28T05:06:26 | 351,630,911 | 2 | 0 | Apache-2.0 | 2021-10-12T22:24:53 | 2021-03-26T01:53:24 | Java | UTF-8 | Java | false | false | 1,240 | java | /* */ package org.apache.pdfbox.pdmodel.fdf;
/* */
/* */ import org.apache.pdfbox.cos.COSBase;
/* */ import org.apache.pdfbox.cos.COSDictionary;
/* */ import org.apache.pdfbox.pdmodel.common.COSObjectable;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class FDFPageInfo
/* */ implements COSObjectable
/* */ {
/* */ private final COSDictionary pageInfo;
/* */
/* */ public FDFPageInfo() {
/* 37 */ this.pageInfo = new COSDictionary();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public FDFPageInfo(COSDictionary p) {
/* 47 */ this.pageInfo = p;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public COSDictionary getCOSObject() {
/* 58 */ return this.pageInfo;
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/pdfbox/pdmodel/fdf/FDFPageInfo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
6cf46b350b6612ee7fc9924f27ad6c8578d9246f | a891a2297ebda8e5a2bb404304925f11587e720e | /src/GCScheduler/dao/AppointmentDao.java | 2f0f05e10719da83d8c5899089576f5a7aa1bf07 | [] | no_license | smithcli/Software2_C195_PA | e7c4fb532778d4a97f6f622d0a24722fafb73276 | 8bc5c702f69c7f0b974535c2aa5349574ef5a0a9 | refs/heads/main | 2023-08-06T21:39:43.420887 | 2021-10-04T22:33:49 | 2021-10-04T22:33:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,511 | java | package GCScheduler.dao;
import GCScheduler.model.Appointment;
import javafx.collections.ObservableList;
/**
* Appointment Data Access Interface for CRUD operations on persistence layer.
*/
public interface AppointmentDao {
/**
* Adds an Appointment.
* @param appointment Appointment to add.
*/
public void createAppt(Appointment appointment);
/**
* Gets an Appointment
* @param apptId Appointment ID.
* @return Appointment Object
*/
public Appointment getAppt(int apptId);
/**
* Gets An Appointment
* @param title Appointment Title
* @param start Appointment Start
* @param customerId Customer ID
* @return Appointment Object
*/
public Appointment getAppt(String title, String start, int customerId);
/**
* Gets all appointments.
* @return ObservableList of Appointments.
*/
public ObservableList<Appointment> getAllAppts();
/**
* Updates an Appointment.
* @param appointment Appointment to update.
*/
public void updateAppt(Appointment appointment);
/**
* Deletes an Appointment.
* @param appointment Appointment to delete.
* @return true if deleted.
*/
public boolean deleteAppt(Appointment appointment);
/**
* Deletes all Appointments.
* @param appointments ObservableList of Appointments to delete.
* @return true if deleted.
*/
public boolean deleteAllAppts(ObservableList<Appointment> appointments);
}
| [
"smithc238@gmail.com"
] | smithc238@gmail.com |
306a9c8ead64dcad4429aead8ea01fdc006af561 | 88c02d49d669c7637bbca9fd1f570cc7292f484f | /AndroidJniGenerate/GetJniCode/xwebruntime_javacode/org/chromium/blink/mojom/ServiceWorkerObjectHost.java | 4a19d6570b4ecffe8f4beeb1603f4563255d3b6b | [] | no_license | ghost461/AndroidMisc | 1af360cf36ae212a81814f9a4057884290dbe12e | dfa4c9115c0198755c9ff6c5e5c9ea3b56c9daff | refs/heads/master | 2020-09-07T19:17:00.028887 | 2019-11-11T02:55:33 | 2019-11-11T02:55:33 | 220,887,476 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 715 | java | package org.chromium.blink.mojom;
import org.chromium.mojo.bindings.Callbacks$Callback0;
import org.chromium.mojo.bindings.Interface$Manager;
import org.chromium.mojo.bindings.Interface;
public interface ServiceWorkerObjectHost extends Interface {
public interface Proxy extends ServiceWorkerObjectHost, org.chromium.mojo.bindings.Interface$Proxy {
}
public interface TerminateForTestingResponse extends Callback0 {
}
public static final Manager MANAGER;
static {
ServiceWorkerObjectHost.MANAGER = ServiceWorkerObjectHost_Internal.MANAGER;
}
void postMessageToServiceWorker(TransferableMessage arg1);
void terminateForTesting(TerminateForTestingResponse arg1);
}
| [
"lingmilch@sina.com"
] | lingmilch@sina.com |
cd6e69f0033e212265d41347e1a038d176194401 | 40d2ed0b2c09de9eae8c5e9957ba3b2641dbf242 | /app/src/main/java/autocool/sam/example/com/autocool/modele/MySQLiteHelper.java | 8166ce50d9dfebe6f93a94c3f34d3282b3d9b3da | [] | no_license | sbelondr/Autocool | 0f4caa069e3e640cf8e43ece98200758395f6a32 | 344b2842ac52d5ec3af41c26b937d6c6e2cce7d6 | refs/heads/master | 2020-07-17T18:59:10.355091 | 2019-09-03T13:11:59 | 2019-09-03T13:11:59 | 206,077,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,206 | java | package autocool.sam.example.com.autocool.modele;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
/**
* Created by samuel on 3/23/18.
*/
public class MySQLiteHelper extends SQLiteOpenHelper {
private static final int versionBD = 2;
private static final String nomBD = "abonne.db";
// Mission 1
private static String requeteAbonne = "CREATE TABLE abonne(numAbonne INTEGER NOT NULL, nom VARCHAR(100), " +
"prenom VARCHAR(100), dateNaissance VARCHAR(100), rue VARCHAR(100), ville VARCHAR(100), " +
"codePostal VARCHAR(100), tel VARCHAR(100), telMobile VARCHAR(100), email VARCHAR(100), " +
"numPermis VARCHAR(100), lieuPermis VARCHAR(100), datePermis VARCHAR(100), " +
"paiementAdhesion BOOLEAN, paiementCaution BOOLEAN, ribFourni VARCHAR(100), " +
"PRIMARY KEY (numAbonne));";
private static String requeteAbonneDrop = "DROP TABLE IF EXISTS abonne;";
private static String requeteFormule = "CREATE TABLE formule(codeFormule INTEGER NOT NULL, " +
"libelleFormule VARCHAR(100), fraisAdhesion DECIMAL(5,2), tarifMensuel DECIMAL(5,2), " +
"partSociale DECIMAL(5,2), depotGarantie DECIMAL(5,2), caution DECIMAL(5,2), " +
"PRIMARY KEY(codeFormule));";
private static String requeteFormuleDrop = "DROP TABLE IF EXISTS formule;";
private static String requeteAdherer = "CREATE TABLE adherer(numAbonne INTEGER NOT NULL, " +
"codeFormule INTEGER NOT NULL, PRIMARY KEY (numAbonne, codeFormule));";
private String requeteAdhererDrop = "DROP TABLE IF EXISTS adherer";
// Mission 2
private static String requeteTrancheHoraire = "CREATE TABLE tranche_horaire(codeTrancheH VARCHAR(1) NOT NULL, " +
"duree INTEGER, PRIMARY KEY(codeTrancheH));";
private static String requeteTrancheHoraireDrop = "DROP TABLE IF EXISTS tranche_horaire";
private static String requeteTrancheKM = "CREATE TABLE tranche_km(codeTrancheKm INTEGER NOT NULL, " +
"minKm INTEGER, maxKm INTEGER, PRIMARY KEY(codeTrancheKm));";
private static String requeteTrancheKMDrop = "DROP TABLE IF EXISTS tranche_km";
private static String requeteCategorieVehicule = "CREATE TABLE categorie_vehicule(codeCateg VARCHAR(1) NOT NULL, " +
"libelleCateg VARCHAR(100), PRIMARY KEY(codeCateg))";
private static String requeteCategorieVehiculeDrop = "DROP TABLE IF EXISTS categorie_vehicule";
private static String requeteFactureH = "CREATE TABLE factureH(codeTrancheH VARCHAR(1) NOT NULL, " +
"codeFormule INTEGER NOT NULL, codeCateg VARCHAR(1) NOT NULL, tarifH DECIMAL(5,2), " +
"PRIMARY KEY(codeTrancheH, codeFormule, codeCateg), FOREIGN KEY(codeTrancheH) REFERENCES tranche_horaire(codeTrancheH)," +
"FOREIGN KEY(codeFormule) REFERENCES formule(codeFormule), FOREIGN KEY(codeCateg) REFERENCES categorie_vehicule(codeCateg));";
private static String requeteFactureHDrop = "DROP TABLE IF EXISTS factureH";
private static String requeteFactureKm = "CREATE TABLE factureKm(codeTrancheKm INTEGER NOT NULL, " +
"codeFormule INTEGER NOT NULL, codeCateg VARCHAR(1) NOT NULL, tarifKm DECIMAL(5,2), " +
"PRIMARY KEY(codeTrancheKm, codeFormule, codeCateg), FOREIGN KEY(codeTrancheKm) REFERENCES tranche_km(codeTrancheKm)," +
"FOREIGN KEY(codeFormule) REFERENCES formule(codeFormule), FOREIGN KEY(codeCateg) REFERENCES categorie_vehicule(codeCateg));";
private static String requeteFactureKmDrop = "DROP TABLE IF EXISTS factureKm";
// Mission 3
private static String requeteVehicule = "CREATE TABLE vehicule(numVehicule INTEGER NOT NULL, " +
"kilometrage DECIMAL(5,2), niveauEssence INTEGER, PRIMARY KEY(numVehicule))";
private static String requeteVehiculeDrop = "DROP TABLE IF EXISTS vehicule";
private static String requeteTypeVehicule = "CREATE TABLE type_vehicule(codeTypeV INTEGER NOT NULL, " +
"libelleTypeV VARCHAR(100), nbPlaces INTEGER, automatique BOOLEAN, PRIMARY KEY(codeTypeV))";
private static String requeteTypeVehiculeDrop = "DROP TABLE IF EXISTS type_vehicule";
private static String requeteStation = "CREATE TABLE station(numStation INTEGER, lieuStation VARCHAR(100), " +
"villeStation VARCHAR(100), cpStation VARCHAR(100), PRIMARY KEY(numStation));";
private static String requeteStationDrop = "DROP TABLE IF EXISTS station";
public MySQLiteHelper(Context context){
super(context, nomBD, null, versionBD);
}
@Override
public void onCreate(SQLiteDatabase db){
Log.d("Test", "Passage dans onCreate");
// Mission 1
db.execSQL(requeteAbonne);
db.execSQL(requeteAdherer);
db.execSQL(requeteFormule);
// Mission 2
db.execSQL(requeteTrancheHoraire);
db.execSQL(requeteTrancheKM);
db.execSQL(requeteCategorieVehicule);
db.execSQL(requeteFactureH);
db.execSQL(requeteFactureKm);
// Mission 3
db.execSQL(requeteVehicule);
db.execSQL(requeteTypeVehicule);
db.execSQL(requeteStation);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.d("Test", "Passage dans onUpgrade");
// Mission 1
db.execSQL(requeteAbonneDrop);
db.execSQL(requeteAdhererDrop);
db.execSQL(requeteFormuleDrop);
// Mission 2
db.execSQL(requeteTrancheHoraireDrop);
db.execSQL(requeteTrancheKMDrop);
db.execSQL(requeteCategorieVehiculeDrop);
db.execSQL(requeteFactureHDrop);
db.execSQL(requeteFactureKmDrop);
// Mission 3
db.execSQL(requeteVehiculeDrop);
db.execSQL(requeteTypeVehiculeDrop);
db.execSQL(requeteStationDrop);
onCreate(db);
}
@Override
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion){
Log.d("Test", "Passage dans onDowngrade");
onUpgrade(db, oldVersion, newVersion);
}
}
| [
"samuelbelondrade@outlook.fr"
] | samuelbelondrade@outlook.fr |
c6656bf860e09ec5c24890d821f5401563ff19bb | fb70e6d16baecf886869e14eb439fe334954b39e | /Lezerkardosjdk/java/sun/util/resources/cldr/kk/CurrencyNames_kk.java | dcb578ba5cc2e41840f839118aa6bbea002c47ff | [] | no_license | Savitar97/Prog2 | ae5dfc46c8fc61974e4c2ddb59ce9e23ab955d23 | 8bc2c19240862218b1b06c4b5abe9081747a54c0 | refs/heads/master | 2020-07-25T00:16:11.948303 | 2020-02-29T23:49:42 | 2020-02-29T23:49:42 | 208,092,693 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,610 | java | /*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT AND PERMISSION NOTICE
*
* Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
* the Terms of Use in http://www.unicode.org/copyright.html.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of the Unicode data files and any associated documentation (the "Data
* Files") or Unicode software and any associated documentation (the
* "Software") to deal in the Data Files or Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, and/or sell copies of the Data Files or Software, and
* to permit persons to whom the Data Files or Software are furnished to do so,
* provided that (a) the above copyright notice(s) and this permission notice
* appear with all copies of the Data Files or Software, (b) both the above
* copyright notice(s) and this permission notice appear in associated
* documentation, and (c) there is clear notice in each modified Data File or
* in the Software as well as in the documentation associated with the Data
* File(s) or Software that the data or software has been modified.
*
* THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
* KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
* CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THE DATA FILES OR SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder shall not
* be used in advertising or otherwise to promote the sale, use or other
* dealings in these Data Files or Software without prior written authorization
* of the copyright holder.
*/
package sun.util.resources.cldr.kk;
import sun.util.resources.OpenListResourceBundle;
public class CurrencyNames_kk extends OpenListResourceBundle {
@Override
protected final Object[][] getContents() {
final Object[][] data = new Object[][] {
{ "KZT", "\u20b8" },
{ "RUB", "\u0440\u0443\u0431." },
{ "brl", "\u0411\u0440\u0430\u0437\u0438\u043b\u0438\u044f \u0440\u0435\u0430\u043b\u044b" },
{ "cny", "\u049a\u044b\u0442\u0430\u0439 \u044e\u0430\u043d\u044b" },
{ "eur", "\u0415\u0443\u0440\u043e" },
{ "gbp", "\u0411\u0440\u0438\u0442\u0430\u043d\u0438\u044f\u00a0\u0444\u0443\u043d\u0442\u044b" },
{ "inr", "\u04ae\u043d\u0434\u0456\u00a0\u0440\u0443\u043f\u0438\u044f" },
{ "jpy", "\u0416\u0430\u043f\u043e\u043d \u0438\u0435\u043d\u0456" },
{ "kzt", "\u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d \u0442\u0435\u04a3\u0433\u0435\u0441\u0456" },
{ "rub", "\u0420\u0435\u0441\u0435\u0439 \u0440\u0443\u0431\u043b\u044c" },
{ "usd", "\u0410\u049a\u0428\u00a0\u0434\u043e\u043b\u043b\u0430\u0440\u044b" },
{ "xxx", "\u0411\u0435\u043b\u0433\u0456\u0441\u0456\u0437 \u0432\u0430\u043b\u044e\u0442\u0430" },
};
return data;
}
}
| [
"atoth1571@gmail.com"
] | atoth1571@gmail.com |
18b827b168a2fcafccf2a96e60f88351ea83b846 | 281f83fa88426efc1d9dd3affdfbe190363b41c6 | /third-library-demo/src/main/java/org/ms/disruptor/entity/LogEvent.java | 0441883ca1c2a819bf461515dc2e0dad0f7a62f9 | [] | no_license | microservices-world/technology-lab | 20163c7549908cf9a5ff1325ff260dfd2d800818 | 3526824bbff6cbf756927125c4f706c2ec0a43f7 | refs/heads/master | 2020-05-07T05:41:32.031060 | 2019-04-15T02:50:39 | 2019-04-15T02:50:39 | 180,280,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 284 | java | package org.ms.disruptor.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 声明一个event,生产者和消费者传递的数据类型
* @author Zhenglai
* @since 2019-04-13 22:33
*/
@Data
@NoArgsConstructor
public class LogEvent {
private Long value;
}
| [
"zhenglai.zhang@bkjk.com"
] | zhenglai.zhang@bkjk.com |
c061aef93651ed49c2dcc39d724ecbe52a5072a6 | a42f8b961c5ae3a4bc999bd7afb88c2340f712f8 | /Recommender_System/src/AllFilters.java | 6b46867d1200ef1e1a605a587114ec5c2329905b | [] | no_license | vacous/Coursera_Java_Fundmental | 72050a2c83ff672d8b57fc1a48ce9ae84b5875ab | 9230e25ea545b63c78e04dc2eefba6fd5693e424 | refs/heads/master | 2021-01-11T15:30:50.161568 | 2017-02-28T06:08:05 | 2017-02-28T06:08:05 | 80,366,159 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 473 | java | import java.util.ArrayList;
public class AllFilters implements Filter {
ArrayList<Filter> filters;
public AllFilters() {
filters = new ArrayList<Filter>();
}
public void addFilter(Filter f) {
filters.add(f);
}
@Override
public boolean satisfies(String id){
for(Filter f : filters) {
if (! f.satisfies(id)) {
return false;
}
}
return true;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
c75884e2d09aa2830ae176cae46287a68cf07a17 | 34204c751653bd10ce761884600e01dc9f3d12a8 | /src/view/dijalozi/DijalogIzmeniStudenta.java | 8d59aa9e1076df4e3891ab1d65741cfff1ab1a46 | [] | no_license | stefanb12/JavaSwing | 17945183076a78856922a9a1e453c3398d5bb087 | fd38792bc9ad5e1c35fc97578005f5b3e95ec4e7 | refs/heads/master | 2022-11-30T03:23:37.283193 | 2020-08-19T18:45:30 | 2020-08-19T18:45:30 | 230,933,199 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,175 | java | package view.dijalozi;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import contoller.StudentiController;
import view.StudentiJTable;
import model.Stanje;
import model.Student;
import model.BazaStudenata;
public class DijalogIzmeniStudenta extends JDialog{
private static final long serialVersionUID = 4102385948297627239L;
private Student student = BazaStudenata.getInstance().getRow(StudentiJTable.rowSelectedIndex);
public DijalogIzmeniStudenta(Frame parent, String title, boolean modal) {
super(parent, title, modal);
setSize(500,630);
setLocationRelativeTo(parent);
JPanel panel = new JPanel();
panel.setLayout(new GridBagLayout());
this.add(panel, BorderLayout.CENTER);
GridBagConstraints gbcIme = new GridBagConstraints();
JLabel ime = new JLabel("Ime* ");
gbcIme.gridx = 0;
gbcIme.gridy = 0;
gbcIme.insets = new Insets(20, 0, 0, 0);
panel.add(ime, gbcIme);
GridBagConstraints gbcImeTekst = new GridBagConstraints();
final TextField imeTekst = new TextField();
gbcImeTekst.gridx = 1;
gbcImeTekst.gridy = 0;
gbcImeTekst.weightx = 100;
gbcImeTekst.fill = GridBagConstraints.HORIZONTAL;
gbcImeTekst.insets = new Insets(20, 0, 0, 20);
panel.add(imeTekst, gbcImeTekst);
imeTekst.setText(student.getIme());
GridBagConstraints gbcPrezime = new GridBagConstraints();
JLabel prezime = new JLabel("Prezime* ");
gbcPrezime.gridx = 0;
gbcPrezime.gridy = 1;
gbcPrezime.insets = new Insets(20, 0, 0, 20);
panel.add(prezime,gbcPrezime);
GridBagConstraints gbcPrezimeTekst = new GridBagConstraints();
final TextField prezimeTekst = new TextField();
gbcPrezimeTekst.gridx = 1;
gbcPrezimeTekst.gridy = 1;
gbcPrezimeTekst.weightx = 100;
gbcPrezimeTekst.fill = GridBagConstraints.HORIZONTAL;
gbcPrezimeTekst.insets = new Insets(20, 0, 0, 20);
panel.add(prezimeTekst, gbcPrezimeTekst);
prezimeTekst.setText(student.getPrezime());
GridBagConstraints gbcDatum = new GridBagConstraints();
JLabel datum = new JLabel("Datum rođenja* ");
gbcDatum.gridx = 0;
gbcDatum.gridy = 2;
gbcDatum.insets = new Insets(20, 0, 0, 20);
panel.add(datum, gbcDatum);
GridBagConstraints gbcDatumTekst = new GridBagConstraints();
final TextField datumTekst = new TextField();
gbcDatumTekst.gridx = 1;
gbcDatumTekst.gridy = 2;
gbcDatumTekst.weightx = 100;
gbcDatumTekst.fill = GridBagConstraints.HORIZONTAL;
gbcDatumTekst.insets = new Insets(20, 0, 0, 20);
panel.add(datumTekst, gbcDatumTekst);
datumTekst.setText(Student.parseDateToString(student.getDatumRodjenja()));
GridBagConstraints gbcAdresaS = new GridBagConstraints();
JLabel adresaS = new JLabel("Adresa stanovanja* ");
gbcAdresaS.gridx = 0;
gbcAdresaS.gridy = 3;
gbcAdresaS.insets = new Insets(20, 0, 0, 20);
panel.add(adresaS, gbcAdresaS);
GridBagConstraints gbcAdresaSTekst = new GridBagConstraints();
final TextField adresaSTekst = new TextField();
gbcAdresaSTekst.gridx = 1;
gbcAdresaSTekst.gridy = 3;
gbcAdresaSTekst.weightx = 100;
gbcAdresaSTekst.fill = GridBagConstraints.HORIZONTAL;
gbcAdresaSTekst.insets = new Insets(20, 0, 0, 20);
panel.add(adresaSTekst, gbcAdresaSTekst);
adresaSTekst.setText(student.getAdresaStanovanja());
GridBagConstraints gbcTelefon = new GridBagConstraints();
JLabel telefon = new JLabel("Kontakt telefon* ");
gbcTelefon.gridx = 0;
gbcTelefon.gridy = 4;
gbcTelefon.insets = new Insets(20, 0, 0, 20);
panel.add(telefon, gbcTelefon);
GridBagConstraints gbcTelefonTekst = new GridBagConstraints();
final TextField telefonTekst = new TextField();
gbcTelefonTekst.gridx = 1;
gbcTelefonTekst.gridy = 4;
gbcTelefonTekst.weightx = 100;
gbcTelefonTekst.fill = GridBagConstraints.HORIZONTAL;
gbcTelefonTekst.insets = new Insets(20, 0, 0, 20);
panel.add(telefonTekst, gbcTelefonTekst);
telefonTekst.setText(student.getKontaktTelefon());
GridBagConstraints gbcBrojIndeksa = new GridBagConstraints();
JLabel indeks = new JLabel("Broj indeksa* ");
gbcBrojIndeksa.gridx = 0;
gbcBrojIndeksa.gridy = 5;
gbcBrojIndeksa.insets = new Insets(20, 0, 0, 20);
panel.add(indeks, gbcBrojIndeksa);
GridBagConstraints gbcBrojIndeksaTekst = new GridBagConstraints();
final TextField indeksTekst = new TextField();
gbcBrojIndeksaTekst.gridx = 1;
gbcBrojIndeksaTekst.gridy = 5;
gbcBrojIndeksaTekst.weightx = 100;
gbcBrojIndeksaTekst.fill = GridBagConstraints.HORIZONTAL;
gbcBrojIndeksaTekst.insets = new Insets(20, 0, 0, 20);
panel.add(indeksTekst, gbcBrojIndeksaTekst);
indeksTekst.setText(student.getBrojIndeksa());
GridBagConstraints gbcEmailAdresa = new GridBagConstraints();
JLabel email = new JLabel("E-mail adresa* ");
gbcEmailAdresa.gridx = 0;
gbcEmailAdresa.gridy = 6;
gbcEmailAdresa.insets = new Insets(20, 0, 0, 20);
panel.add(email, gbcEmailAdresa);
GridBagConstraints gbcEmailAdresaTekst = new GridBagConstraints();
final TextField emailTekst = new TextField();
gbcEmailAdresaTekst.gridx = 1;
gbcEmailAdresaTekst.gridy = 6;
gbcEmailAdresaTekst.weightx = 100;
gbcEmailAdresaTekst.fill = GridBagConstraints.HORIZONTAL;
gbcEmailAdresaTekst.insets = new Insets(20, 0, 0, 20);
panel.add(emailTekst, gbcEmailAdresaTekst);
emailTekst.setText(student.getEmailAdresa());
GridBagConstraints gbcUpisDatum = new GridBagConstraints();
JLabel upisDatum = new JLabel("Datum upisa* ");
gbcUpisDatum.gridx = 0;
gbcUpisDatum.gridy = 7;
gbcUpisDatum.insets = new Insets(20, 0, 0, 20);
panel.add(upisDatum, gbcUpisDatum);
GridBagConstraints gbcUpisDatumTekst = new GridBagConstraints();
final TextField upisTekst = new TextField();
gbcUpisDatumTekst.gridx = 1;
gbcUpisDatumTekst.gridy = 7;
gbcUpisDatumTekst.weightx = 100;
gbcUpisDatumTekst.fill = GridBagConstraints.HORIZONTAL;
gbcUpisDatumTekst.insets = new Insets(20, 0, 0, 20);
panel.add(upisTekst, gbcUpisDatumTekst);
upisTekst.setText(Student.parseDateToString(student.getDatumUpisa()));
GridBagConstraints gbcProsek = new GridBagConstraints();
JLabel prosek = new JLabel("Prosečna ocena* ");
gbcProsek.gridx = 0;
gbcProsek.gridy = 8;
gbcProsek.insets = new Insets(20, 0, 0, 20);
panel.add(prosek, gbcProsek);
GridBagConstraints gbcProsekTekst = new GridBagConstraints();
final TextField prosekTekst = new TextField();
gbcProsekTekst.gridx = 1;
gbcProsekTekst.gridy = 8;
gbcProsekTekst.weightx = 100;
gbcProsekTekst.fill = GridBagConstraints.HORIZONTAL;
gbcProsekTekst.insets = new Insets(20, 0, 0, 20);
panel.add(prosekTekst, gbcProsekTekst);
prosekTekst.setText(String.valueOf(student.getProsecnaOcena()));
GridBagConstraints gbcTrenutnaGodStud = new GridBagConstraints();
JLabel godStud = new JLabel("Trenutna godina studija* ");
gbcTrenutnaGodStud.gridx = 0;
gbcTrenutnaGodStud.gridy = 9;
gbcTrenutnaGodStud.insets = new Insets(20, 0, 0, 20);
panel.add(godStud, gbcTrenutnaGodStud);
GridBagConstraints gbcTrenutnaGodStuds = new GridBagConstraints();
String[] trenutnaGod = new String[] {"I (prva)", "II (druga)","III (treća)", "IV (četvrta)"};
final JComboBox<String> trenutnaGodStud = new JComboBox<>(trenutnaGod);
gbcTrenutnaGodStuds.gridx = 1;
gbcTrenutnaGodStuds.gridy = 9;
gbcTrenutnaGodStuds.weightx = 100;
gbcTrenutnaGodStuds.fill = GridBagConstraints.HORIZONTAL;
gbcTrenutnaGodStuds.insets = new Insets(20, 0, 0, 20);
panel.add(trenutnaGodStud, gbcTrenutnaGodStuds);
trenutnaGodStud.setSelectedIndex(student.getTrenutnaGodinaStudija() - 1);
GridBagConstraints gbcStanjeB = new GridBagConstraints();
final JRadioButton stanjeB = new JRadioButton("Budžet");
gbcStanjeB.gridx = 0;
gbcStanjeB.gridy = 10;
gbcStanjeB.fill = GridBagConstraints.HORIZONTAL;
gbcStanjeB.insets = new Insets(20, 0, 0, 20);
final GridBagConstraints gbcStanjeS = new GridBagConstraints();
JRadioButton stanjeS = new JRadioButton("Samofinansiranje");
gbcStanjeS.gridx = 0;
gbcStanjeS.gridy = 11;
gbcStanjeS.fill = GridBagConstraints.HORIZONTAL;
gbcStanjeS.insets = new Insets(1, 0, 0, 20);
final ButtonGroup grupaD = new ButtonGroup();
grupaD.add(stanjeB);
grupaD.add(stanjeS);
stanjeB.setActionCommand(String.valueOf(Stanje.B));
stanjeS.setActionCommand(String.valueOf(Stanje.S));
panel.add(stanjeB, gbcStanjeB);
panel.add(stanjeS, gbcStanjeS);
if(student.getStanje() == Stanje.S){
stanjeS.setSelected(true);
}else{
stanjeB.setSelected(true);
}
JPanel panelBottom = new JPanel();
JButton potvrda = new JButton("Potvrda");
JButton odustanak = new JButton("Odustanak");
panelBottom.add(potvrda);
panelBottom.add(odustanak);
this.add(panelBottom, BorderLayout.SOUTH);
potvrda.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
student.setBrojIndeksa(indeksTekst.getText());
student.setIme(imeTekst.getText());
student.setPrezime(prezimeTekst.getText());
student.setDatumRodjenja(Student.parseDate((datumTekst.getText())));
student.setAdresaStanovanja(adresaSTekst.getText());
student.setKontaktTelefon(telefonTekst.getText());
student.setEmailAdresa(emailTekst.getText());
student.setDatumUpisa(Student.parseDate(upisTekst.getText()));
student.setTrenutnaGodinaStudija(trenutnaGodStud.getSelectedIndex() + 1);
student.setProsecnaOcena(Double.parseDouble(prosekTekst.getText()));
student.setStanje(Stanje.valueOf(grupaD.getSelection().getActionCommand()));
StudentiController.getInstance().izmeniStudenta(student);
dispose();
}
});
odustanak.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dispose();
}
});
}
}
| [
"stefan.beljic23@gmail.com"
] | stefan.beljic23@gmail.com |
90757629cf2d571854b2e37d2c11c435481f7354 | ca217730cff9435b03347587d61d2ef28b478f7e | /src/main/java/netz/mods/scp/api/SCPItemHelper.java | c22c0cecd524c8f788c2ac9e8ff044b5b4ee133e | [] | no_license | Ordinastie/SCPCraft | e8c4c78cc86ac0e7f364156058f35ce30adf059d | 547a204bb14fc33adefb9926baca2f5188d89421 | refs/heads/master | 2023-07-18T19:50:59.231189 | 2014-03-21T23:59:54 | 2014-03-21T23:59:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | package netz.mods.scp.api;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import cpw.mods.fml.common.registry.GameRegistry;
public class SCPItemHelper
{
public static ToolMaterial toolMaterialMud;
public static ArmorMaterial armorMaterialMud;
public static ToolMaterial toolMaterialAmethyst;
public static ArmorMaterial armorClassD;
public static ArmorMaterial armorMaterialUnprotective;
public static Item get(String name)
{
return GameRegistry.findItem("scp", name);
}
}
| [
"ntzrmtthihu777@gmail.com"
] | ntzrmtthihu777@gmail.com |
45644589da5c4543165e852d4cabd8d4bb3074e8 | d5f78cf192dad094a97aefa3426f66c2a1e99f07 | /src/main/java/sinco/presentation/SisPermisos.java | ef5cfd11cb0af7dc47e10bf7634ebdabd694b1bb | [] | no_license | jherediab/sinco-1 | 8e0df9fe9901ad7ce33dc46e045169cccfeb3da8 | db9ce27ee0969974ec48c411695fa8bbbdbec175 | refs/heads/master | 2022-07-06T22:39:17.632702 | 2019-12-18T21:17:31 | 2019-12-18T21:17:31 | 228,922,758 | 0 | 0 | null | 2022-01-27T16:20:23 | 2019-12-18T21:14:37 | Java | UTF-8 | Java | false | false | 16,211 | java | /* */ package sinco.presentation;
/* */
/* */ import com.lutris.appserver.server.httpPresentation.ClientPageRedirectException;
/* */ import com.lutris.appserver.server.httpPresentation.HttpPresentation;
/* */ import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
/* */ import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
/* */ import com.lutris.util.KeywordValueException;
/* */ import java.util.Collection;
/* */ import java.util.Iterator;
/* */ import org.w3c.dom.Attr;
/* */ import org.w3c.dom.Element;
/* */ import org.w3c.dom.Node;
/* */ import org.w3c.dom.html.HTMLElement;
/* */ import org.w3c.dom.html.HTMLOptionElement;
/* */ import org.w3c.dom.html.HTMLSelectElement;
/* */ import org.w3c.dom.html.HTMLTableSectionElement;
/* */ import sinco.business.RespuestaBD;
/* */ import sinco.business.SisMultiValoresDTO;
/* */ import sinco.business.SisPermisosDTO;
/* */ import sinco.data.SisMultiValoresDAO;
/* */ import sinco.data.SisPermisosDAO;
/* */ import sinco.presentation.SisPermisos;
/* */ import sinco.presentation.SisPermisosHTML;
/* */ import sinco.spec.MenuDO;
/* */ import sinco.spec.Varios;
/* */
/* */
/* */
/* */
/* */
/* */ public class SisPermisos
/* */ implements HttpPresentation
/* */ {
/* */ private SisPermisosHTML pagHTML;
/* */
/* */ public void run(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 37 */ if (!comms.session.getSessionData().containsKey("miId")) {
/* 38 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=NoSesion"));
/* */ }
/* */
/* 41 */ String idNav = (String)comms.session.getSessionData().get("miId");
/* 42 */ String _operacion = comms.request.getParameter("_operacion");
/* 43 */ if (_operacion == null || _operacion.length() == 0) {
/* 44 */ _operacion = "X";
/* */ }
/* */
/* 47 */ if (_operacion.equals("C") || _operacion.equals("M") || _operacion.equals("E")) {
/* 48 */ creacion(comms);
/* */ }
/* */
/* 51 */ this.pagHTML = (SisPermisosHTML)comms.xmlcFactory.create(SisPermisosHTML.class);
/* 52 */ permisos(comms);
/* */
/* 54 */ if (_operacion.equals("L") || _operacion.equals("X")) {
/* 55 */ listar(comms, _operacion);
/* */ }
/* */
/* 58 */ if (_operacion.equals("P")) {
/* 59 */ editar(comms);
/* */ }
/* 61 */ else if (_operacion.equals("Nuevo")) {
/* 62 */ nuevo(comms);
/* */ }
/* */
/* 65 */ if (_operacion.equals("V")) {
/* 66 */ verRegistro(comms);
/* */ }
/* 68 */ this.pagHTML.setTextElMenu(MenuDO.getMenu(idNav));
/* 69 */ comms.response.writeDOM(this.pagHTML);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void creacion(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 81 */ String _operacion = comms.request.getParameter("_operacion");
/* 82 */ String elUsuario = "" + comms.session.getUser().getName();
/* 83 */ String codigo = comms.request.getParameter("codigo");
/* 84 */ if (codigo == null) {
/* 85 */ codigo = "";
/* */ }
/* 87 */ RespuestaBD rta = new RespuestaBD();
/* 88 */ if (_operacion.equals("E")) {
/* 89 */ SisPermisosDAO rs = new SisPermisosDAO();
/* 90 */ if (!rs.getEstadoConexion()) {
/* 91 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=LoginNoValido"));
/* */ }
/* 93 */ rta = rs.eliminarRegistro(codigo);
/* 94 */ if (!rta.isRta()) {
/* 95 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=ErrorSisPermisos&p1=" + rta.getMensaje()));
/* */ }
/* 97 */ rs.close();
/* 98 */ String sPagina = "SisPermisos.po?_operacion=X";
/* 99 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(sPagina));
/* */ }
/* 101 */ String nombre = comms.request.getParameter("nombre");
/* 102 */ String estado = comms.request.getParameter("estado");
/* 103 */ SisPermisosDAO rs = new SisPermisosDAO();
/* 104 */ if (!rs.getEstadoConexion()) {
/* 105 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=LoginNoValido"));
/* */ }
/* 107 */ if (_operacion.equals("C")) {
/* 108 */ rta = rs.crearRegistro(codigo, nombre, estado, elUsuario);
/* */
/* */
/* */ }
/* */ else {
/* */
/* */
/* 115 */ rta = rs.modificarRegistro(codigo, nombre, estado, elUsuario);
/* */ }
/* */
/* */
/* */
/* */
/* 121 */ rs.close();
/* 122 */ if (!rta.isRta()) {
/* 123 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=ErrorSisPermisos&p1=" + rta.getMensaje()));
/* */ }
/* */
/* 126 */ String sPagina = "SisPermisos.po?_operacion=P&codigo=" + codigo + "";
/* 127 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(sPagina));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void editar(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 138 */ String codigo = comms.request.getParameter("codigo");
/* 139 */ SisPermisosDAO rs = new SisPermisosDAO();
/* 140 */ if (!rs.getEstadoConexion()) {
/* 141 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=LoginNoValido"));
/* */ }
/* 143 */ SisPermisosDTO reg = rs.cargarRegistro(codigo);
/* 144 */ rs.close();
/* 145 */ if (reg != null) {
/* 146 */ this.pagHTML.getElementCodigo().setValue("" + reg.getCodigo());
/* 147 */ this.pagHTML.getElementNombre().setValue("" + reg.getNombre());
/* 148 */ this.pagHTML.getElementFechaInsercion().setValue("" + reg.getFechaInsercion());
/* 149 */ this.pagHTML.getElementUsuarioInsercion().setValue("" + reg.getUsuarioInsercion());
/* 150 */ this.pagHTML.getElementFechaModificacion().setValue("" + reg.getFechaModificacion());
/* 151 */ this.pagHTML.getElementUsuarioModificacion().setValue("" + reg.getUsuarioModificacion());
/* 152 */ HTMLSelectElement combo = this.pagHTML.getElementEstado();
/* 153 */ comboMultivalores(combo, "ESTADO_REGISTRO", "" + reg.getEstado(), true);
/* */
/* */
/* 156 */ this.pagHTML.getElementCodigo().setReadOnly(true);
/* */ }
/* 158 */ this.pagHTML.getElement_operacion().setValue("M");
/* 159 */ activarVista("nuevo");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void nuevo(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 171 */ this.pagHTML.getElement_operacion().setValue("C");
/* */ try {
/* 173 */ HTMLElement sel = this.pagHTML.getElementBtnEliminar();
/* 174 */ sel.getParentNode().removeChild(sel);
/* */ }
/* 176 */ catch (Exception e) {}
/* */
/* 178 */ activarVista("nuevo");
/* 179 */ HTMLSelectElement combo = this.pagHTML.getElementEstado();
/* 180 */ comboMultivalores(combo, "ESTADO_REGISTRO", "", true);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void listar(HttpPresentationComms comms, String _operacion) throws HttpPresentationException, KeywordValueException {
/* 192 */ activarVista("consulta");
/* 193 */ String codigo = comms.request.getParameter("codigo");
/* 194 */ if (codigo == null) {
/* 195 */ codigo = "";
/* */ }
/* 197 */ String nombre = comms.request.getParameter("nombre");
/* 198 */ if (nombre == null) {
/* 199 */ nombre = "";
/* */ }
/* 201 */ if (_operacion.equals("X")) {
/* */ return;
/* */ }
/* */
/* */
/* 206 */ SisPermisosDAO rs = new SisPermisosDAO();
/* 207 */ if (!rs.getEstadoConexion()) {
/* 208 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=LoginNoValido"));
/* */ }
/* 210 */ Collection<SisPermisosDTO> arr = rs.cargarTodos(codigo, nombre);
/* */
/* */
/* 213 */ rs.close();
/* 214 */ HTMLTableSectionElement hte = this.pagHTML.getElementDetalle();
/* 215 */ int cuantas = 0;
/* 216 */ Iterator<SisPermisosDTO> iterator = arr.iterator();
/* 217 */ while (iterator.hasNext()) {
/* 218 */ SisPermisosDTO reg = (SisPermisosDTO)iterator.next();
/* 219 */ HTMLElement eltr = (HTMLElement)this.pagHTML.createElement("tr");
/* 220 */ eltr.appendChild(newtd("" + reg.getCodigo()));
/* 221 */ String url = "SisPermisos.po?_operacion=V&codigo=" + reg.getCodigo() + "";
/* 222 */ eltr.appendChild(newtdhref("" + reg.getNombre(), url));
/* 223 */ eltr.appendChild(newtd("" + reg.getNombreEstado()));
/* 224 */ hte.appendChild(eltr);
/* 225 */ cuantas++;
/* */ }
/* 227 */ arr.clear();
/* 228 */ this.pagHTML.setTextNroRegistros("" + cuantas);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void verRegistro(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 241 */ String codigo = comms.request.getParameter("codigo");
/* 242 */ SisPermisosDAO rs = new SisPermisosDAO();
/* 243 */ if (!rs.getEstadoConexion()) {
/* 244 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath("Mensaje.po?codigo=LoginNoValido"));
/* */ }
/* 246 */ SisPermisosDTO reg = rs.cargarRegistro(codigo);
/* 247 */ rs.close();
/* 248 */ if (reg != null) {
/* 249 */ this.pagHTML.setTextCodigoEd("" + reg.getCodigo());
/* 250 */ this.pagHTML.setTextNombreEd("" + reg.getNombre());
/* 251 */ this.pagHTML.setTextEstadoEd("" + reg.getNombreEstado());
/* 252 */ this.pagHTML.setTextFechaInsercionEd("" + reg.getFechaInsercion());
/* 253 */ this.pagHTML.setTextUsuarioInsercionEd("" + reg.getUsuarioInsercion());
/* 254 */ this.pagHTML.setTextFechaModificacionEd("" + reg.getFechaModificacion());
/* 255 */ this.pagHTML.setTextUsuarioModificacionEd("" + reg.getUsuarioModificacion());
/* */
/* 257 */ this.pagHTML.getElementCodigoKey().setValue("" + reg.getCodigo());
/* 258 */ this.pagHTML.getElement_operacion().setValue("P");
/* */ }
/* 260 */ activarVista("editar");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void permisos(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {
/* 271 */ int miGrupo = Integer.parseInt((String)comms.session.getSessionData().get("miGrupo"));
/* */
/* 273 */ Varios oVarios = new Varios();
/* 274 */ boolean oPermisoAct = oVarios.tienePermiso(miGrupo, "Adm_SisPermisosAct");
/* 275 */ boolean oPermisoDel = oVarios.tienePermiso(miGrupo, "Adm_SisPermisosDel");
/* 276 */ if (!oPermisoAct) {
/* 277 */ HTMLElement elem = this.pagHTML.getElementBtnCrear();
/* 278 */ elem.getParentNode().removeChild(elem);
/* 279 */ elem = this.pagHTML.getElementBtnGrabar();
/* 280 */ elem.getParentNode().removeChild(elem);
/* 281 */ elem = this.pagHTML.getElementBtnModificar();
/* 282 */ elem.getParentNode().removeChild(elem);
/* */ }
/* 284 */ if (!oPermisoDel) {
/* 285 */ HTMLElement elem = this.pagHTML.getElementBtnEliminar();
/* 286 */ elem.getParentNode().removeChild(elem);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void activarVista(String vista) {
/* 297 */ if (!vista.equals("nuevo")) {
/* 298 */ HTMLElement sel = this.pagHTML.getElementDivCreacionRegistro();
/* 299 */ sel.getParentNode().removeChild(sel);
/* */ }
/* 301 */ if (!vista.equals("editar")) {
/* 302 */ HTMLElement sel = this.pagHTML.getElementDivEdicion();
/* 303 */ sel.getParentNode().removeChild(sel);
/* */ }
/* 305 */ if (!vista.equals("consulta")) {
/* 306 */ HTMLElement sel = this.pagHTML.getElementDivConsulta();
/* 307 */ sel.getParentNode().removeChild(sel);
/* 308 */ sel = this.pagHTML.getElementDivResultados();
/* 309 */ sel.getParentNode().removeChild(sel);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private Attr newAttr(String tipo, String valor) {
/* 323 */ Attr atrib = this.pagHTML.createAttribute(tipo);
/* 324 */ atrib.setValue(valor);
/* 325 */ return atrib;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private HTMLElement newtdhref(String contenido, String vinculo) {
/* 338 */ HTMLElement td = (HTMLElement)this.pagHTML.createElement("td");
/* 339 */ Element enlace = this.pagHTML.createElement("a");
/* 340 */ Node hijo = this.pagHTML.createTextNode(contenido);
/* 341 */ enlace.appendChild(hijo);
/* 342 */ Attr donde = this.pagHTML.createAttribute("href");
/* 343 */ donde.setValue(vinculo);
/* 344 */ enlace.setAttributeNode(donde);
/* 345 */ td.appendChild(enlace);
/* 346 */ td.setAttributeNode(newAttr("class", "ctd"));
/* 347 */ return td;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private HTMLElement newtd(String contenido) {
/* 357 */ HTMLElement td = (HTMLElement)this.pagHTML.createElement("td");
/* 358 */ td.appendChild(this.pagHTML.createTextNode(contenido));
/* 359 */ td.setAttributeNode(newAttr("class", "ctd"));
/* 360 */ return td;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {
/* 375 */ SisMultiValoresDAO rs = new SisMultiValoresDAO();
/* 376 */ Collection<SisMultiValoresDTO> arr = rs.cargarTabla(tabla);
/* 377 */ rs.close();
/* 378 */ if (dejarBlanco) {
/* 379 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement("option");
/* 380 */ op.setValue("");
/* 381 */ op.appendChild(this.pagHTML.createTextNode(""));
/* 382 */ combo.appendChild(op);
/* */ }
/* 384 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();
/* 385 */ while (iterator.hasNext()) {
/* 386 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();
/* 387 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement("option");
/* 388 */ op.setValue("" + reg.getCodigo());
/* 389 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));
/* 390 */ if (defecto.equals(reg.getCodigo())) {
/* 391 */ Attr escogida = this.pagHTML.createAttribute("selected");
/* 392 */ escogida.setValue("on");
/* 393 */ op.setAttributeNode(escogida);
/* */ }
/* 395 */ combo.appendChild(op);
/* */ }
/* 397 */ arr.clear();
/* */ }
/* */ }
/* Location: D:\Documents\ardulab\Clinica Chiquinquira\fuente\sinco.war!\WEB-INF\classes\sinco\presentation\SisPermisos.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.0.7
*/ | [
"jherediab@gmail.com"
] | jherediab@gmail.com |
b46237305ccc604eef73552605105525aa8a6a7d | cde4358da2cbef4d8ca7caeb4b90939ca3f1f1ef | /java/timebase/test/src/test/java/deltix/qsrv/hf/tickdb/topic/RatePrinter.java | 966357d9de276b9072ea235487765a4fcb2e601f | [
"Apache-2.0"
] | permissive | ptuyo/TimeBase | e17a33e0bfedcbbafd3618189e4de45416ec7259 | 812e178b814a604740da3c15cc64e42c57d69036 | refs/heads/master | 2022-12-18T19:41:46.084759 | 2020-09-29T11:03:50 | 2020-09-29T11:03:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,973 | java | package deltix.qsrv.hf.tickdb.topic;
import deltix.util.time.TimeKeeper;
import java.util.concurrent.TimeUnit;
/**
* <p>Utility class for measurement of invocation rate.
* With this class you can measure how much time some event occurred during given interval.
* This class is designed for case with millions messages per second.
*
* See also {@link deltix.util.time.PrintingStopWatch}.
* See also {@link deltix.util.io.aeron.PrintingCounter}.
* @author Alexei Osipov
*/
final class RatePrinter {
private static final boolean ENABLED = Boolean.getBoolean("deltix.qsrv.hf.RatePrinter.enabled"); // NOTE: MUST NOT BE ENABLED IN PROD!
private final static long timeIntervalMs = TimeUnit.SECONDS.toMillis(5); // Edit this value if you
private final static int checkTimeEachMessages = 1_000;
private long count;
private long startTime = TimeKeeper.currentTime;
private long prevTime = startTime;
private final String name;
/**
* @param name Name for the StopWatch. Will be included into the printed log.
*/
public RatePrinter(String name) {
this.name = name;
}
/**
* Call this method to start measurement.
*/
public void start() {
if (!ENABLED) {
return;
}
startTime = TimeKeeper.currentTimeNanos;
prevTime = startTime;
count = 0;
}
public void inc() {
if (!ENABLED) {
return;
}
count += 1;
if (count % checkTimeEachMessages == 0) {
long currentTime = TimeKeeper.currentTime;
long timeDelta = currentTime - prevTime;
if (timeDelta > timeIntervalMs) {
long secondsFromStart = (currentTime - startTime) / 1000;
System.out.printf("%6d: %s: Rate: %.3f k msg/s\n", secondsFromStart, name, ((float) count) / timeDelta);
prevTime = currentTime;
count = 0;
}
}
}
} | [
"akarpovich@deltixlab.com"
] | akarpovich@deltixlab.com |
49ecd47dda098eea3fe1dc072d689ba31aa53c21 | 49a1215f06f0f2d2b8e485b07d998d373a5a89ed | /concurrent-demo/src/main/java/geym/conc/ch6/flow/FlowDemo.java | 5bcacbd098fb9f5419b271ba00bc359a07a9c11a | [
"MIT"
] | permissive | snx1030/Java-Demos | 408175661de0c44e12af0f30e2023d762f61dd98 | 9c3be4e35fbc3a596e43108d40c8cf32e566aa69 | refs/heads/master | 2022-08-01T13:04:57.553561 | 2020-05-25T04:29:47 | 2020-05-25T04:29:47 | 267,240,318 | 1 | 0 | MIT | 2020-05-27T06:35:57 | 2020-05-27T06:35:57 | null | UTF-8 | Java | false | false | 2,162 | java | package geym.conc.ch6.flow;//package geym.conc.ch6.flow;
//import java.util.Arrays;
//
//import java.util.concurrent.Flow.*;
//import java.util.concurrent.SubmissionPublisher;
//
//public class FlowDemo
//{
// public static void main(String[] args)
// {
// // Create a publisher.
//
// SubmissionPublisher<String> publisher = new SubmissionPublisher<>();
//
// // Create a subscriber and register it with the publisher.
//
// MySubscriber<String> subscriber = new MySubscriber<>();
// MySubscriber<String> subscriber2 = new MySubscriber<>();
// publisher.subscribe(subscriber);
// publisher.subscribe(subscriber2);
//
// // Publish several data items and then close the publisher.
//
// System.out.println("Publishing data items...");
// String[] items = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
// "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
// Arrays.asList(items).stream().forEach(i ->{
// publisher.submit(i);
// System.out.println(Thread.currentThread().getName()+" publish "+i);
// });
// publisher.close();
//
// try
// {
// synchronized("A")
// {
// "A".wait();
// }
// }
// catch (InterruptedException ie)
// {
// }
// }
//}
//
//class MySubscriber<T> implements Subscriber<T>
//{
// private Subscription subscription;
//
// @Override
// public void onSubscribe(Subscription subscription)
// {
// this.subscription = subscription;
// subscription.request(1);
// System.out.println(Thread.currentThread().getName()+" onSubscribe");
// }
//
// @Override
// public void onNext(T item)
// {
// System.out.println(Thread.currentThread().getName()+" Received: " + item);
// subscription.request(1);
// }
//
// @Override
// public void onError(Throwable t)
// {
// t.printStackTrace();
// synchronized("A")
// {
// "A".notifyAll();
// }
// }
//
// @Override
// public void onComplete()
// {
// System.out.println("Done");
// synchronized("A")
// {
// "A".notifyAll();
// }
// }
//} | [
"449700042@qq.com"
] | 449700042@qq.com |
9d2c6234b80fdc113d7d459225dabba7fed6e43e | 50875e54ee8d24495de01b5fd921f68007c7776a | /wms-core/src/main/java/com/lsh/wms/core/service/task/StockTakingTaskService.java | 8dea67a12259c03b7aced3abf115850955036598 | [
"Apache-2.0"
] | permissive | guorongjuan/test | 8edc9e6c70ea3c5a8c467c568eddb2bf5b43333b | 3019526d23f57123a413f670f8a34af96ab996c1 | refs/heads/master | 2020-12-20T01:20:52.471163 | 2016-08-01T04:08:09 | 2016-08-01T04:08:09 | 63,839,563 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,260 | java | package com.lsh.wms.core.service.task;
import com.lsh.base.common.utils.DateUtils;
import com.lsh.wms.core.dao.task.StockTakingTaskDao;
import com.lsh.wms.model.task.StockTakingTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by mali on 16/7/22.
*/
@Component
@Transactional(readOnly = true)
public class StockTakingTaskService {
@Autowired
private StockTakingTaskDao stockTakingTaskDao;
@Transactional(readOnly = false)
public void create(StockTakingTask task) {
task.setCreatedAt(DateUtils.getCurrentSeconds());
task.setUpdatedAt(DateUtils.getCurrentSeconds());
stockTakingTaskDao.insert(task);
}
public List<StockTakingTask> getTakingTask(Map queryMap) {
return stockTakingTaskDao.getStockTakingTaskList(queryMap);
}
public Integer count(Map queryMap) {
return stockTakingTaskDao.countStockTakingTask(queryMap);
}
public StockTakingTask getTakingTaskByTaskId(Long taskId) {
return stockTakingTaskDao.getStockTakingTaskById(taskId);
}
}
| [
"guorongjuan@lsh123.com"
] | guorongjuan@lsh123.com |
d6346df36129e46d715a763525792b987489d5a7 | caa163822c8fd34fde9388b6365ca6bb8419dbd9 | /src/SchoolProduct.java | a6340579a1eb2bd66268e4f1f0670f0c071623a0 | [] | no_license | MiloGuo/Learning-Management-System | bb5fddf2d2ce0a8797197df399ed691b955dcfff | 65287ddf1b64324150bd9a6b4fc115b4fd031246 | refs/heads/master | 2020-06-06T16:05:05.180045 | 2015-10-01T04:08:38 | 2015-10-01T04:08:38 | 34,076,032 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 435 | java | //package Release;
// Common base class for all the persistent elements of the School
public class SchoolProduct
{
public SchoolProduct ( ClassId classId, ObjectId objectId)
{
mClassId = classId;
mObjectId = objectId;
}
public ClassId GetClassId()
{
return mClassId;
}
public ObjectId GetObjectId()
{
return mObjectId;
}
private ClassId mClassId;
private ObjectId mObjectId;
}
| [
"miloguoqi@gmail.com"
] | miloguoqi@gmail.com |
3ed9dde6e996f84c3f93097a172230adacdeef6f | 561d0ab7ccb990f203fe2ea9d6754543ad330021 | /Cliant/src/lk/ijse/gdse/computerParts/Controller/UserSetingController.java | 9fdcf0691e9a4e1be8cab311457d510cf9a9938f | [] | no_license | dananjaya123/click_computer_parts-system | 1566c2d4783396ae8f996ee3e6039a2a448c3517 | 8be142fe2aa580597d6ef267a3304f2fff72d525 | refs/heads/master | 2020-04-14T23:30:41.945433 | 2019-01-05T10:34:51 | 2019-01-05T10:34:51 | 164,204,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,321 | java | package lk.ijse.gdse.computerParts.Controller;
import com.jfoenix.controls.JFXButton;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import lk.ijse.gdse.computerParts.Other.PasswordUtil;
import lk.ijse.gdse.computerParts.Proxy.ProxyHandeler;
import lk.ijse.gdse.computerParts.dto.UserSettiongDTO;
import lk.ijse.gdse.computerParts.service.ServiceFactory;
import lk.ijse.gdse.computerParts.service.custom.UserSettingService;
import java.net.URL;
import java.util.ResourceBundle;
public class UserSetingController implements Initializable {
@FXML
private AnchorPane pnlSetting;
@FXML
private Label lblMassage;
@FXML
private TextField textUserName;
@FXML
private PasswordField textPW;
@FXML
private JFXButton btnAdd;
private UserSettingService userSettingService;
{
try {
userSettingService = ProxyHandeler.getInstance().getSuperService(ServiceFactory.ServiceTypes.USER);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void initialize(URL location, ResourceBundle resources) {
}
@FXML
void btnAddOnaction(ActionEvent event) {
String usarname=textUserName.getText();
String password=textPW.getText();
String slt=PasswordUtil.getSalt(30);
try {
String pw=PasswordUtil.generateSecurePassword(password,slt);
UserSettiongDTO userSettiongDTO=new UserSettiongDTO(usarname,pw,slt);
boolean b=userSettingService.addUser(userSettiongDTO);
if (b){
Alert alert=new Alert(Alert.AlertType.CONFIRMATION," add", ButtonType.OK);
alert.show();
textUserName.clear();
textPW.clear();
}else {
Alert alert=new Alert(Alert.AlertType.CONFIRMATION," not added", ButtonType.OK);
alert.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
@FXML
void textUserNameOnAction(ActionEvent event) {
textPW.requestFocus();
}
@FXML
void textpwOnAction(ActionEvent event) {
btnAdd.requestFocus();
}
}
| [
"asidananjaya123@gmail.com"
] | asidananjaya123@gmail.com |
43a172423da30c5ec23d36ae0ea761f98788a873 | fd230dfc74d58c8f501770cf2e82965aff254793 | /ListaDeEnterosEnlazada.java | 2b1c4a8a1d853a973a1962dd69e1c97e1162fd53 | [] | no_license | matiaspagano/ayed-practica2 | c366697abfa1c80910c9d55c7ff29d7be5671013 | 128ec9e81455dd666bf70e0c3fe33b36687ad005 | refs/heads/master | 2021-01-20T22:51:21.759657 | 2011-03-18T19:17:35 | 2011-03-18T19:17:35 | 1,495,676 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,158 | java | public class ListaDeEnterosEnlazada extends ListaDeEnteros
{
private NodoEntero inicio;
private NodoEntero actual;
public ListaDeEnterosEnlazada() {
actual = null;
inicio = null;
}
public void comenzar() {
actual = inicio;
}
public Object takeLast() {
Object answer = new Object();
NodoEntero aBorrar = new NodoEntero();
this.comenzar();
while (!this.end()) {
answer = this.getactual().getDato();
aBorrar = actual;
this.next();
}
actual = aBorrar;
this.remove();
return (answer);
}
public void addinicio(Integer element) {
this.comenzar();
this.add(element);
}
/*
public void add(Integer elem) {
NodoEntero temp;
temp = new NodoEntero(elem);
if (inicio == null)
inicio = temp;
else {
if (inicio != null && actual == null) {
temp.setNext(inicio);
inicio = temp;
} else {
if (inicio != null && actual != null && inicio == actual) {
temp.setNext(inicio);
inicio = temp;
} else {
if (inicio != null && actual != null && inicio != actual) {
this.previous(actual).setNext(temp);
temp.setNext(actual);
}
}
}
}
}
*/
public void addLast(Integer element) {
NodoEntero temp;
temp = new NodoEntero(element);
if (inicio == null){
inicio = temp;
}
else {
NodoEntero ultimo = new NodoEntero();
this.comenzar();
while (!this.end()) {
ultimo = this.getactual();
this.next();
}
ultimo.setSiguiente(temp);
}
}
public int length() {
int answer = 0;
this.comenzar();
while (!this.end()) {
answer++;
this.next();
}
return (answer);
}
public void next() {
actual = actual.getSiguiente();
}
public boolean end() {
return actual == null;
}
public Object get() {
return actual.getDato();
}
public void add(Integer elem) {
NodoEntero temp;
temp = new NodoEntero(elem);
if (inicio == null)
inicio = temp;
else {
if (inicio != null && actual == null) {
temp.setSiguiente(inicio);
inicio = temp;
} else {
if (inicio != null && actual != null && inicio == actual) {
temp.setSiguiente(inicio);
inicio = temp;
} else {
if (inicio != null && actual != null && inicio != actual) {
this.previous(actual).setSiguiente(temp);
temp.setSiguiente(actual);
}
}
}
}
}
private NodoEntero previous(NodoEntero node) {
if (inicio == node)
return null;
else {
NodoEntero previous = inicio;
while (previous.getSiguiente() != node)
previous = previous.getSiguiente();
return previous;
}
}
public void remove() {
if (actual != null) {
if (actual == inicio)
inicio = inicio.getSiguiente();
else {
this.previous(actual).setSiguiente(actual.getSiguiente());
}
}
}
public void remove(Object elem) {
NodoEntero previousNode;
this.find(elem);
previousNode = this.previous(actual);
if (previousNode != null)
previousNode.setSiguiente(actual.getSiguiente());
else
inicio = actual.getSiguiente();
actual = null; // agregue esto, sino queda referenciando al nodo
// borrado
}
//private void find(Object elem) {
// this.begin();
// while (!this.end() && this.getactual().getData() != elem)
// this.next();
//}
private void find(Object elem) {// no me interesa q apunten al mismo objeto, sino q el contenido sea el mismo!!!
this.comenzar();
while (!this.end() && !this.getactual().getDato().equals(elem))
this.next();
}
public boolean isEmpty() {
return inicio == null;
}
public boolean includes(Object elem) {
this.find(elem);
return (actual != null);
}
public NodoEntero getactual() {
return actual;
}
public NodoEntero getinicio() {
return inicio;
}
}
| [
"matiasp@mono.linti.unlp.edu.ar"
] | matiasp@mono.linti.unlp.edu.ar |
cc53696125312b588079ffcec3bc5b7808f0b24e | a2272f1002da68cc554cd57bf9470322a547c605 | /src/jdk/jdk.localedata/sun/util/resources/cldr/ext/CurrencyNames_gd.java | 8159379cf66f151c36b4c78a604d9d425c79b5f4 | [] | no_license | framework-projects/java | 50af8953ab46c509432c467c9ad69cc63818fa63 | 2d131cb46f232d3bf909face20502e4ba4b84db0 | refs/heads/master | 2023-06-28T05:08:00.482568 | 2021-08-04T08:42:32 | 2021-08-04T08:42:32 | 312,414,414 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 27,292 | java | /*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT AND PERMISSION NOTICE
*
* Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
* Distributed under the Terms of Use in
* http://www.unicode.org/copyright.html.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of the Unicode data files and any associated documentation
* (the "Data Files") or Unicode software and any associated documentation
* (the "Software") to deal in the Data Files or Software
* without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, and/or sell copies of
* the Data Files or Software, and to permit persons to whom the Data Files
* or Software are furnished to do so, provided that
* (a) this copyright and permission notice appear with all copies
* of the Data Files or Software,
* (b) this copyright and permission notice appear in associated
* documentation, and
* (c) there is clear notice in each modified Data File or in the Software
* as well as in the documentation associated with the Data File(s) or
* Software that the data or software has been modified.
*
* THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
* ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT OF THIRD PARTY RIGHTS.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
* NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
* DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THE DATA FILES OR SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in these Data Files or Software without prior
* written authorization of the copyright holder.
*/
package sun.util.resources.cldr.ext;
import sun.util.resources.OpenListResourceBundle;
public class CurrencyNames_gd extends OpenListResourceBundle {
@Override
protected final Object[][] getContents() {
final Object[][] data = new Object[][] {
{ "ADP", "ADP" },
{ "AED", "AED" },
{ "AFA", "AFA" },
{ "AFN", "AFN" },
{ "ALK", "ALK" },
{ "ALL", "ALL" },
{ "AMD", "AMD" },
{ "ANG", "ANG" },
{ "AOA", "AOA" },
{ "AOK", "AOK" },
{ "AON", "AON" },
{ "AOR", "AOR" },
{ "ARA", "ARA" },
{ "ARL", "ARL" },
{ "ARM", "ARM" },
{ "ARP", "ARP" },
{ "ARS", "ARS" },
{ "ATS", "ATS" },
{ "AWG", "AWG" },
{ "AZM", "AZM" },
{ "AZN", "AZN" },
{ "BAD", "BAD" },
{ "BAM", "BAM" },
{ "BAN", "BAN" },
{ "BBD", "BBD" },
{ "BDT", "BDT" },
{ "BEC", "BEC" },
{ "BEF", "BEF" },
{ "BEL", "BEL" },
{ "BGL", "BGL" },
{ "BGM", "BGM" },
{ "BGN", "BGN" },
{ "BGO", "BGO" },
{ "BHD", "BHD" },
{ "BIF", "BIF" },
{ "BMD", "BMD" },
{ "BND", "BND" },
{ "BOB", "BOB" },
{ "BOL", "BOL" },
{ "BOP", "BOP" },
{ "BOV", "BOV" },
{ "BRB", "BRB" },
{ "BRC", "BRC" },
{ "BRE", "BRE" },
{ "BRN", "BRN" },
{ "BRR", "BRR" },
{ "BRZ", "BRZ" },
{ "BSD", "BSD" },
{ "BTN", "BTN" },
{ "BUK", "BUK" },
{ "BWP", "BWP" },
{ "BYB", "BYB" },
{ "BYN", "BYN" },
{ "BYR", "BYR" },
{ "BZD", "BZD" },
{ "CDF", "CDF" },
{ "CHE", "CHE" },
{ "CHF", "CHF" },
{ "CHW", "CHW" },
{ "CLE", "CLE" },
{ "CLF", "CLF" },
{ "CLP", "CLP" },
{ "CNX", "CNX" },
{ "COP", "COP" },
{ "COU", "COU" },
{ "CRC", "CRC" },
{ "CSD", "CSD" },
{ "CSK", "CSK" },
{ "CUC", "CUC" },
{ "CUP", "CUP" },
{ "CVE", "CVE" },
{ "CYP", "CYP" },
{ "CZK", "CZK" },
{ "DDM", "DDM" },
{ "DEM", "DEM" },
{ "DJF", "DJF" },
{ "DKK", "DKK" },
{ "DOP", "DOP" },
{ "DZD", "DZD" },
{ "ECS", "ECS" },
{ "ECV", "ECV" },
{ "EEK", "EEK" },
{ "EGP", "EGP" },
{ "ERN", "ERN" },
{ "ESA", "ESA" },
{ "ESB", "ESB" },
{ "ESP", "ESP" },
{ "ETB", "ETB" },
{ "FIM", "FIM" },
{ "FJD", "FJD" },
{ "FKP", "FKP" },
{ "FRF", "FRF" },
{ "GEK", "GEK" },
{ "GEL", "GEL" },
{ "GHC", "GHC" },
{ "GHS", "GHS" },
{ "GIP", "GIP" },
{ "GMD", "GMD" },
{ "GNF", "GNF" },
{ "GNS", "GNS" },
{ "GQE", "GQE" },
{ "GRD", "GRD" },
{ "GTQ", "GTQ" },
{ "GWE", "GWE" },
{ "GWP", "GWP" },
{ "GYD", "GYD" },
{ "HNL", "HNL" },
{ "HRD", "HRD" },
{ "HRK", "HRK" },
{ "HTG", "HTG" },
{ "HUF", "HUF" },
{ "IDR", "IDR" },
{ "IEP", "IEP" },
{ "ILP", "ILP" },
{ "ILR", "ILR" },
{ "IQD", "IQD" },
{ "IRR", "IRR" },
{ "ISJ", "ISJ" },
{ "ISK", "ISK" },
{ "ITL", "ITL" },
{ "JMD", "JMD" },
{ "JOD", "JOD" },
{ "KES", "KES" },
{ "KGS", "KGS" },
{ "KHR", "KHR" },
{ "KMF", "KMF" },
{ "KPW", "KPW" },
{ "KRH", "KRH" },
{ "KRO", "KRO" },
{ "KWD", "KWD" },
{ "KYD", "KYD" },
{ "KZT", "KZT" },
{ "LAK", "LAK" },
{ "LBP", "LBP" },
{ "LKR", "LKR" },
{ "LRD", "LRD" },
{ "LSL", "LSL" },
{ "LTL", "LTL" },
{ "LTT", "LTT" },
{ "LUC", "LUC" },
{ "LUF", "LUF" },
{ "LUL", "LUL" },
{ "LVL", "LVL" },
{ "LVR", "LVR" },
{ "LYD", "LYD" },
{ "MAD", "MAD" },
{ "MAF", "MAF" },
{ "MCF", "MCF" },
{ "MDC", "MDC" },
{ "MDL", "MDL" },
{ "MGA", "MGA" },
{ "MGF", "MGF" },
{ "MKD", "MKD" },
{ "MKN", "MKN" },
{ "MLF", "MLF" },
{ "MMK", "MMK" },
{ "MNT", "MNT" },
{ "MOP", "MOP" },
{ "MRO", "MRO" },
{ "MTL", "MTL" },
{ "MTP", "MTP" },
{ "MUR", "MUR" },
{ "MVP", "MVP" },
{ "MVR", "MVR" },
{ "MWK", "MWK" },
{ "MXP", "MXP" },
{ "MXV", "MXV" },
{ "MYR", "MYR" },
{ "MZE", "MZE" },
{ "MZM", "MZM" },
{ "MZN", "MZN" },
{ "NAD", "NAD" },
{ "NGN", "NGN" },
{ "NIC", "NIC" },
{ "NIO", "NIO" },
{ "NLG", "NLG" },
{ "NOK", "NOK" },
{ "NPR", "NPR" },
{ "OMR", "OMR" },
{ "PAB", "PAB" },
{ "PEI", "PEI" },
{ "PEN", "PEN" },
{ "PES", "PES" },
{ "PGK", "PGK" },
{ "PHP", "PHP" },
{ "PKR", "PKR" },
{ "PLN", "PLN" },
{ "PLZ", "PLZ" },
{ "PTE", "PTE" },
{ "PYG", "PYG" },
{ "QAR", "QAR" },
{ "RHD", "RHD" },
{ "ROL", "ROL" },
{ "RON", "RON" },
{ "RSD", "RSD" },
{ "RUB", "RUB" },
{ "RUR", "RUR" },
{ "RWF", "RWF" },
{ "SAR", "SAR" },
{ "SBD", "SBD" },
{ "SCR", "SCR" },
{ "SDD", "SDD" },
{ "SDG", "SDG" },
{ "SDP", "SDP" },
{ "SEK", "SEK" },
{ "SGD", "SGD" },
{ "SHP", "SHP" },
{ "SIT", "SIT" },
{ "SKK", "SKK" },
{ "SLL", "SLL" },
{ "SOS", "SOS" },
{ "SRD", "SRD" },
{ "SRG", "SRG" },
{ "SSP", "SSP" },
{ "STD", "STD" },
{ "SUR", "SUR" },
{ "SVC", "SVC" },
{ "SYP", "SYP" },
{ "SZL", "SZL" },
{ "THB", "\u0e3f" },
{ "TJR", "TJR" },
{ "TJS", "TJS" },
{ "TMM", "TMM" },
{ "TMT", "TMT" },
{ "TND", "TND" },
{ "TOP", "TOP" },
{ "TPE", "TPE" },
{ "TRL", "TRL" },
{ "TRY", "TRY" },
{ "TTD", "TTD" },
{ "TZS", "TZS" },
{ "UAH", "UAH" },
{ "UAK", "UAK" },
{ "UGS", "UGS" },
{ "UGX", "UGX" },
{ "USD", "$" },
{ "USN", "USN" },
{ "USS", "USS" },
{ "UYI", "UYI" },
{ "UYP", "UYP" },
{ "UYU", "UYU" },
{ "UZS", "UZS" },
{ "VEB", "VEB" },
{ "VEF", "VEF" },
{ "VNN", "VNN" },
{ "VUV", "VUV" },
{ "WST", "WST" },
{ "XAG", "XAG" },
{ "XAU", "XAU" },
{ "XBA", "XBA" },
{ "XBB", "XBB" },
{ "XBC", "XBC" },
{ "XBD", "XBD" },
{ "XDR", "XDR" },
{ "XEU", "XEU" },
{ "XFO", "XFO" },
{ "XFU", "XFU" },
{ "XPD", "XPD" },
{ "XPT", "XPT" },
{ "XRE", "XRE" },
{ "XSU", "XSU" },
{ "XTS", "XTS" },
{ "XUA", "XUA" },
{ "XXX", "XXX" },
{ "YDD", "YDD" },
{ "YER", "YER" },
{ "YUD", "YUD" },
{ "YUM", "YUM" },
{ "YUN", "YUN" },
{ "YUR", "YUR" },
{ "ZAL", "ZAL" },
{ "ZAR", "ZAR" },
{ "ZMK", "ZMK" },
{ "ZMW", "ZMW" },
{ "ZRN", "ZRN" },
{ "ZRZ", "ZRZ" },
{ "ZWD", "ZWD" },
{ "ZWL", "ZWL" },
{ "ZWR", "ZWR" },
{ "adp", "Peseta Andorrach" },
{ "aed", "Dirham nan Iomaratan Arabach Aonaichte" },
{ "afa", "Afghani Afghanach (1927\u20132002)" },
{ "afn", "Afghani Afghanach" },
{ "alk", "Lek Alb\u00e0ineach (1946\u20131965)" },
{ "all", "Lek Alb\u00e0ineach" },
{ "amd", "Dram Airmeineach" },
{ "ang", "Gulden Eileanan Aintilia nan T\u00ecrean \u00ccsle" },
{ "aoa", "Kwanza Ang\u00f2lach" },
{ "aok", "Kwanza Ang\u00f2lach (1977\u20131991)" },
{ "aon", "Kwanza \u00f9r Ang\u00f2lach (1990\u20132000)" },
{ "aor", "Kwanza ath-ghleusaichte Ang\u00f2lach (1995\u20131999)" },
{ "ara", "Austral Argantaineach" },
{ "arl", "Peso ley Argantaineach (1970\u20131983)" },
{ "arm", "Peso Argantaineach (1881\u20131970)" },
{ "arp", "Peso Argantaineach (1983\u20131985)" },
{ "ars", "Peso Argantaineach" },
{ "ats", "Schilling Ostaireach" },
{ "aud", "Dolar Astr\u00e0ilianach" },
{ "awg", "Florin Ar\u00f9bach" },
{ "azm", "Manat Asarbaide\u00e0nach (1993\u20132006)" },
{ "azn", "Manat Asarbaide\u00e0nach" },
{ "bad", "Dinar Bhosna agus Hearsagobhana (1992\u20131994)" },
{ "bam", "Mark iompachail Bhosna agus Hearsagobhana" },
{ "ban", "Dinar \u00f9r Bhosna agus Hearsagobhana (1994\u20131997)" },
{ "bbd", "Dolar Barbadach" },
{ "bdt", "Taka Bangladaiseach" },
{ "bec", "Franc Beilgeach (iompachail)" },
{ "bef", "Franc Beilgeach" },
{ "bel", "Franc Beilgeach (ionmhasail)" },
{ "bgl", "Lev cruaidh Bulgarach" },
{ "bgm", "Lev s\u00f2isealach Bulgarach" },
{ "bgn", "Lev Bulgarach" },
{ "bgo", "Lev Bulgarach (1879\u20131952)" },
{ "bhd", "Dinar Bachraineach" },
{ "bif", "Franc Burundaidheach" },
{ "bmd", "Dolar Bearm\u00f9dach" },
{ "bnd", "Dolar Br\u00f9naigheach" },
{ "bob", "Boliviano Boilibhiach" },
{ "bol", "Boliviano Boilibhiach (1863\u20131963)" },
{ "bop", "Peso Boilibhiach" },
{ "bov", "Mvdol Boilibhiach" },
{ "brb", "Cruzeiro \u00f9r Braisileach (1967\u20131986)" },
{ "brc", "Cruzado Braisileach (1986\u20131989)" },
{ "bre", "Cruzeiro Braisileach (1990\u20131993)" },
{ "brl", "Real Braisileach" },
{ "brn", "Cruzado \u00f9r Braisileach (1989\u20131990)" },
{ "brr", "Cruzeiro Braisileach (1993\u20131994)" },
{ "brz", "Cruzeiro Braisileach (1942\u20131967)" },
{ "bsd", "Dolar Bathamach" },
{ "btn", "Ngultrum But\u00e0nach" },
{ "buk", "Kyat Burmach" },
{ "bwp", "Pula Botsuanach" },
{ "byb", "R\u00f9bal \u00f9r Bealaruiseach (1994\u20131999)" },
{ "byn", "R\u00f9bal Bealaruiseach" },
{ "byr", "R\u00f9bal Bealaruiseach (2000\u20132016)" },
{ "bzd", "Dolar Beil\u00ecseach" },
{ "cad", "Dolar Canadach" },
{ "cdf", "Franc Congothach" },
{ "che", "E\u00f2ro WIR" },
{ "chf", "Franc Eilbheiseach" },
{ "chw", "Franc WIR" },
{ "cle", "Escudo Sileach" },
{ "clf", "Aonad cunntasachd Sileach (UF)" },
{ "clp", "Peso Sileach" },
{ "cnx", "Dolar an t-sluagh-bhanca Sh\u00ecnich" },
{ "cny", "Yuan S\u00ecneach" },
{ "cop", "Peso Coloimbeach" },
{ "cou", "Aonad f\u00ecor-luach Coloimbeach" },
{ "crc", "Col\u00f3n Costa R\u00ecceach" },
{ "csd", "Dinar S\u00e8irbeach (2002\u20132006)" },
{ "csk", "Koruna cruaidh Seic-Sl\u00f2bhacach" },
{ "cuc", "Peso iompachail C\u00f9bach" },
{ "cup", "Peso C\u00f9bach" },
{ "cve", "Escudo a\u2019 Chip Uaine" },
{ "cyp", "Punnd C\u00ecoprasach" },
{ "czk", "Koruna Seiceach" },
{ "ddm", "Mark na Gearmailte an Ear" },
{ "dem", "Mark Gearmailteach" },
{ "djf", "Franc Diob\u00f9taidheach" },
{ "dkk", "Krone Danmhairgeach" },
{ "dop", "Peso Doiminiceach" },
{ "dzd", "Dinar Aildireach" },
{ "ecs", "Sucre Eacuadorach" },
{ "ecv", "Aonad luach chunbhalaich Eacuadorach" },
{ "eek", "Kroon Eastoineach" },
{ "egp", "Punnd \u00c8ipheiteach" },
{ "ern", "Nakfa Eartrach" },
{ "esa", "Peseta Sp\u00e0innteach (cunntas A)" },
{ "esb", "Peseta Sp\u00e0innteach (cunntas iompachail)" },
{ "esp", "Peseta Sp\u00e0innteach" },
{ "etb", "Birr Itiopach" },
{ "eur", "E\u00f2ro" },
{ "fim", "Markka Fionnlannach" },
{ "fjd", "Dolar F\u00ecditheach" },
{ "fkp", "Punnd F\u00e0clannach" },
{ "frf", "Franc Frangach" },
{ "gbp", "Punnd Sasannach" },
{ "gek", "Kupon larit Cairtbheileach" },
{ "gel", "Lari Cairtbheileach" },
{ "ghc", "Cedi G\u00e0nach (1979\u20132007)" },
{ "ghs", "Cedi G\u00e0nach" },
{ "gip", "Punnd Diobraltarach" },
{ "gmd", "Dalasi Gaimbitheach" },
{ "gnf", "Franc Ginitheach" },
{ "gns", "Syli Ginitheach" },
{ "gqe", "Ekwele Gini Meadhan-Chriosaich" },
{ "grd", "Drachma Greugach" },
{ "gtq", "Quetzal Guatamalach" },
{ "gwe", "Escudo Gini na Portagaile" },
{ "gwp", "Peso Gini-Biosothach" },
{ "gyd", "Dolar Guidhe\u00e0nach" },
{ "hkd", "Dolar Hong Kong" },
{ "hnl", "Lempira Hond\u00f9rach" },
{ "hrd", "Dinar Cr\u00f2thaiseach" },
{ "hrk", "Kuna Cr\u00f2thaiseach" },
{ "htg", "Gourde Haidhteach" },
{ "huf", "Forint Ungaireach" },
{ "idr", "Rupiah Innd-Innseach" },
{ "iep", "Punnd \u00c8ireannach" },
{ "ilp", "Punnd Iosraeleach" },
{ "ilr", "Sheqel Iosraeleach (1980\u20131985)" },
{ "ils", "Sheqel \u00f9r Iosraeleach" },
{ "inr", "Rupee Innseanach" },
{ "iqd", "Dinar Ior\u00e0cach" },
{ "irr", "Rial Ior\u00e0nach" },
{ "isj", "Kr\u00f3na Innis T\u00ecleach (1918\u20131981)" },
{ "isk", "Kr\u00f3na Innis T\u00ecleach" },
{ "itl", "Lira Eadailteach" },
{ "jmd", "Dolar Diameugach" },
{ "jod", "Dinar I\u00f2rdanach" },
{ "jpy", "Yen Seapanach" },
{ "kes", "Shilling Ceineach" },
{ "kgs", "Som C\u00ecorgasach" },
{ "khr", "Riel Cambuideach" },
{ "kmf", "Franc Comorosach" },
{ "kpw", "Won Choir\u00e8a a Tuath" },
{ "krh", "Hwan Choir\u00e8a a Deas (1953\u20131962)" },
{ "kro", "Won Choir\u00e8a a Deas (1945\u20131953)" },
{ "krw", "Won Choir\u00e8a a Deas" },
{ "kwd", "Dinar Cuibh\u00e8iteach" },
{ "kyd", "Dolar Caimeanach" },
{ "kzt", "Tenge Casachach" },
{ "lak", "Kip L\u00e0thosach" },
{ "lbp", "Punnd Leabanach" },
{ "lkr", "Rupee Sri Lancach" },
{ "lrd", "Dolar Lib\u00e8ireach" },
{ "lsl", "Loti Leasotach" },
{ "ltl", "Litas Liotuaineach" },
{ "ltt", "Talonas Liotuaineach" },
{ "luc", "Franc iompachail Lugsamburgach" },
{ "luf", "Franc Lugsamburgach" },
{ "lul", "Franc ionmhasail Lugsamburgach" },
{ "lvl", "Lats Laitbheach" },
{ "lvr", "R\u00f9bal Laitbheach" },
{ "lyd", "Dinar Libitheach" },
{ "mad", "Dirham Morocach" },
{ "maf", "Franc Morocach" },
{ "mcf", "Franc Monacach" },
{ "mdc", "Cupon Moldobhach" },
{ "mdl", "Leu Moldobhach" },
{ "mga", "Ariary Madagasgarach" },
{ "mgf", "Franc Madagasgarach" },
{ "mkd", "Denar Masadonach" },
{ "mkn", "Denar Masadonach (1992\u20131993)" },
{ "mlf", "Franc M\u00e0ilitheach" },
{ "mmk", "Kyat Mi\u00e0nmarach" },
{ "mnt", "Tugrik Mongolach" },
{ "mop", "Pataca Mac\u00e0thuach" },
{ "mro", "Ouguiya Morat\u00e0ineach (1973\u20132017)" },
{ "mru", "Ouguiya Morat\u00e0ineach" },
{ "mtl", "Lira Maltach" },
{ "mtp", "Punnd Maltach" },
{ "mur", "Rupee Moiriseasach" },
{ "mvp", "Rupee Maladaibheach" },
{ "mvr", "Rufiyaa Maladaibheach" },
{ "mwk", "Kwacha Malabhaidheach" },
{ "mxn", "Peso Meagsagach" },
{ "mxp", "Peso airgid Meagsagach (1861\u20131992)" },
{ "mxv", "Aonad inbheistidh Meagsagach" },
{ "myr", "Ringgit Malaidheach" },
{ "mze", "Escudo M\u00f2saimbiceach" },
{ "mzm", "Metical M\u00f2saimbiceach (1980\u20132006)" },
{ "mzn", "Metical M\u00f2saimbiceach" },
{ "nad", "Dolar Naimibitheach" },
{ "ngn", "Naira Nig\u00e8iriach" },
{ "nic", "C\u00f3rdoba Niocaragach (1988\u20131991)" },
{ "nio", "C\u00f3rdoba Niocaragach" },
{ "nlg", "Gulden Duitseach" },
{ "nok", "Krone Nirribheach" },
{ "npr", "Rupee Neap\u00e0lach" },
{ "nzd", "Dolar Shealainn Nuaidh" },
{ "omr", "Rial Om\u00e0nach" },
{ "pab", "Balboa Panamach" },
{ "pei", "Inti Pear\u00f9thach" },
{ "pen", "Sol Pear\u00f9thach" },
{ "pes", "Sol Pear\u00f9thach (1863\u20131965)" },
{ "pgk", "Kina Ghini Nuaidh Paputhaiche" },
{ "php", "Peso Filipineach" },
{ "pkr", "Rupee Pagast\u00e0nach" },
{ "pln", "Z\u0142oty P\u00f2lainneach" },
{ "plz", "Z\u0142oty P\u00f2lainneach (1950\u20131995)" },
{ "pte", "Escudo Portagaileach" },
{ "pyg", "Guaran\u00ed Paraguaidheach" },
{ "qar", "Rial Catarach" },
{ "rhd", "Dolar Rhodesiach" },
{ "rol", "Leu Rom\u00e0ineach (1952\u20132006)" },
{ "ron", "Leu Rom\u00e0ineach" },
{ "rsd", "Dinar S\u00e8irbeach" },
{ "rub", "R\u00f9bal Ruiseach" },
{ "rur", "R\u00f9bal Ruiseach (1991\u20131998)" },
{ "rwf", "Franc Rubhandach" },
{ "sar", "Riyal Sabhdach" },
{ "sbd", "Dolar Eileanan Sholaimh" },
{ "scr", "Rupee Seiseallach" },
{ "sdd", "Dinar Sud\u00e0nach (1992\u20132007)" },
{ "sdg", "Punnd Sud\u00e0nach" },
{ "sdp", "Punnd Sud\u00e0nach (1957\u20131998)" },
{ "sek", "Krona Suaineach" },
{ "sgd", "Dolar Singeap\u00f2rach" },
{ "shp", "Punnd Eilean Naomh Eilidh" },
{ "sit", "Tolar Sl\u00f2bhaineach" },
{ "skk", "Koruna Sl\u00f2bhacach" },
{ "sll", "Leone Siarra Le\u00f2mhannach" },
{ "sos", "Shilling Som\u00e0ilitheach" },
{ "srd", "Dolar Suranamach" },
{ "srg", "Gulden Suranamach" },
{ "ssp", "Punnd Sud\u00e0in a Deas" },
{ "std", "Dobra S\u00e3o Tom\u00e9 agus Pr\u00edncipe (1977\u20132017)" },
{ "stn", "Dobra S\u00e3o Tom\u00e9 agus Pr\u00edncipe" },
{ "sur", "R\u00f9bal Sovietach" },
{ "svc", "Col\u00f3n Salbhadorach" },
{ "syp", "Punnd Siridheach" },
{ "szl", "Lilangeni Suasaidheach" },
{ "thb", "Baht T\u00e0idheach" },
{ "tjr", "R\u00f9bal Taidigeach" },
{ "tjs", "Somoni Taidigeach" },
{ "tmm", "Manat Turcmanach (1993\u20132009)" },
{ "tmt", "Manat Turcmanach" },
{ "tnd", "Dinar Tuiniseach" },
{ "top", "Pa\u02bbanga Tongach" },
{ "tpe", "Escudo T\u00ecomorach" },
{ "trl", "Lira Turcach (1922\u20132005)" },
{ "try", "Lira Turcach" },
{ "ttd", "Dolar Thrianaid agus Thobago" },
{ "twd", "Dolar \u00f9r Taidh-Bh\u00e0nach" },
{ "tzs", "Shilling Tansanaidheach" },
{ "uah", "Hryvnia Ucr\u00e0ineach" },
{ "uak", "Karbovanets Ucr\u00e0ineach" },
{ "ugs", "Shilling Ugandach (1966\u20131987)" },
{ "ugx", "Shilling Ugandach" },
{ "usd", "Dolar nan St\u00e0itean Aonaichte" },
{ "usn", "Dolar nan SA (an ath\u2013latha)" },
{ "uss", "Dolar nan SA (an aon latha)" },
{ "uyi", "Peso Uruguaidheach (aonadan inneacsaichte)" },
{ "uyp", "Peso Uruguaidheach (1975\u20131993)" },
{ "uyu", "Peso Uruguaidheach" },
{ "uzs", "Som Usbagach" },
{ "veb", "Bol\u00edvar Bheinisealach (1871\u20132008)" },
{ "vef", "Bol\u00edvar Bheinisealach" },
{ "vnd", "Dong Bhiet-Namach" },
{ "vnn", "Dong Bhiet-Namach (1978\u20131985)" },
{ "vuv", "Vatu Vanuatuthach" },
{ "wst", "Tala Samothach" },
{ "xaf", "Franc CFA Meadhan-Afragach" },
{ "xag", "Airgead" },
{ "xau", "\u00d2r" },
{ "xba", "Aonad co-dh\u00e8anta E\u00f2rpach" },
{ "xbb", "Aonad airgid E\u00f2rpach" },
{ "xbc", "Aonad cunntasachd E\u00f2rpach (XBC)" },
{ "xbd", "Aonad cunntasachd E\u00f2rpach (XBD)" },
{ "xcd", "Dolar Caraibeach earach" },
{ "xdr", "C\u00f2ir tarraing sh\u00f2nraichte" },
{ "xeu", "Aonad airgeadra E\u00f2rpach" },
{ "xfo", "Franc \u00f2ir Frangach" },
{ "xfu", "Franc UIC Frangach" },
{ "xof", "Franc CFA Afraga an Iar" },
{ "xpd", "Pallaideam" },
{ "xpf", "Franc CFP" },
{ "xpt", "Platanam" },
{ "xre", "Aonad maoine RINET" },
{ "xsu", "Sucre" },
{ "xts", "C\u00f2d airgeadra fo dheuchainn" },
{ "xua", "Aonad cunntasachd ADB" },
{ "xxx", "Airgeadra neo-aithnichte" },
{ "ydd", "Dinar Eamanach" },
{ "yer", "Rial Eamanach" },
{ "yud", "Dinar cruaidh I\u00f9goslabhach (1966\u20131990)" },
{ "yum", "Dinar \u00f9r I\u00f9goslabhach (1994\u20132002)" },
{ "yun", "Dinar iompachail I\u00f9goslabhach (1990\u20131992)" },
{ "yur", "Dinar ath-leasaichte I\u00f9goslabhach (1992\u20131993)" },
{ "zal", "Rand Afraga a Deas (ionmhasail)" },
{ "zar", "Rand Afraga a Deas" },
{ "zmk", "Kwacha S\u00e0imbitheach (1968\u20132012)" },
{ "zmw", "Kwacha S\u00e0imbitheach" },
{ "zrn", "Za\u00efre \u00f9r Za\u00efreach (1993\u20131998)" },
{ "zrz", "Za\u00efre Za\u00efreach (1971\u20131993)" },
{ "zwd", "Dolar S\u00ecombabuthach (1980\u20132008)" },
{ "zwl", "Dolar S\u00ecombabuthach (2009)" },
{ "zwr", "Dolar S\u00ecombabuthach (2008)" },
};
return data;
}
}
| [
"chovavea@outlook.com"
] | chovavea@outlook.com |
40a107c31c445a6295d34bfa6b1c26616622a610 | 45e2239bbfb55232f0fbf9539aff92d3d0c71a6f | /src/pl/sda/java/Day5/Repeat/AbstractClass/Contractor.java | 73cb37c106daf1728675a88b7a457a86d6f80023 | [] | no_license | TomaszMarcinkowski86/01.-JAVA-wprowadzenie | 3a513cf3657e2f16e7c0108d0187c229c0cd833d | cb4e688e218a463659dcbcad583e890f172846cc | refs/heads/master | 2021-12-28T00:32:07.241707 | 2019-09-03T09:03:34 | 2019-09-03T09:03:34 | 167,918,089 | 0 | 0 | null | 2021-12-14T21:32:42 | 2019-01-28T07:29:18 | Java | UTF-8 | Java | false | false | 326 | java | package pl.sda.java.Day5.Repeat.AbstractClass;
public class Contractor extends User {
private String company;
public Contractor(String userName, String email, String company) {
super(userName, email);
this.company = company;
}
public String getCompany() {
return company;
}
}
| [
"9454031marcinkowski@gmail.com"
] | 9454031marcinkowski@gmail.com |
33206b4a60858b3fdcc9c9d88b26f9bbda995e94 | d786946879c8b9f240475ab21fc95d741fd2f46e | /src/main/java/cn/osxm/dashx/core/DashxException.java | d6ab93f083d4dd83f7f82e59df8ce1a88fc34e59 | [] | no_license | osxm/dashx | 129ddd515e7a41a79e9ded94ed3d6903927f8786 | 23b845218ec5dba8c3956b443ed18d08a2c525e2 | refs/heads/master | 2020-04-04T15:29:55.234208 | 2019-03-24T06:12:26 | 2019-03-24T06:12:26 | 156,039,962 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 481 | java | /**
* @Title: DashxException.java
* @Package cn.osxm.dashx.core
* @Description: TODO
* @author osxm:oscarxueming
* @date 2018Äê11ÔÂ20ÈÕ ÉÏÎç5:28:41
* @version V1.0
*/
package cn.osxm.dashx.core;
/**
* @ClassName: DashxException
* @Description: TODO
* @author osxm:oscarxueming
*/
public class DashxException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
public DashxException(String errMsg) {
super(errMsg);
}
}
| [
"oscar999@mail.ustc.edu.cn"
] | oscar999@mail.ustc.edu.cn |
c94208aad992b49d57386b11e44c0e9c8008e13d | d2df62df2d3df71a0279b144172c9f99063624a5 | /app/src/main/java/com/developer/gram/easybilibili/util/CommonUtil.java | a5ee977464eeb123539c2e137d2c97be4608cdef | [
"Apache-2.0"
] | permissive | Zumbalamambo/EasyBilibili | 9f8a754d440e66d7082a0c1110012e211162579a | b5a3c0668bc57da9a59f7d1cafd313da208d3471 | refs/heads/master | 2020-03-18T01:05:02.904486 | 2018-05-20T03:23:34 | 2018-05-20T03:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,625 | java | package com.developer.gram.easybilibili.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Environment;
import android.os.StatFs;
import java.io.File;
/**
* Created by hcc on 16/8/4 21:18
* 100332338@qq.com
* <p/>
* 通用工具类
*/
public class CommonUtil {
/**
* 检查是否有网络
*/
public static boolean isNetworkAvailable(Context context) {
NetworkInfo info = getNetworkInfo(context);
return info != null && info.isAvailable();
}
/**
* 检查是否是WIFI
*/
public static boolean isWifi(Context context) {
NetworkInfo info = getNetworkInfo(context);
if (info != null) {
if (info.getType() == ConnectivityManager.TYPE_WIFI) {
return true;
}
}
return false;
}
/**
* 检查是否是移动网络
*/
public static boolean isMobile(Context context) {
NetworkInfo info = getNetworkInfo(context);
if (info != null) {
if (info.getType() == ConnectivityManager.TYPE_MOBILE) {
return true;
}
}
return false;
}
private static NetworkInfo getNetworkInfo(Context context) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo();
}
/**
* 检查SD卡是否存在
*/
private static boolean checkSdCard() {
return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}
/**
* 获取手机SD卡总空间
*/
private static long getSDcardTotalSize() {
if (checkSdCard()) {
File path = Environment.getExternalStorageDirectory();
StatFs mStatFs = new StatFs(path.getPath());
long blockSizeLong = mStatFs.getBlockSizeLong();
long blockCountLong = mStatFs.getBlockCountLong();
return blockSizeLong * blockCountLong;
} else {
return 0;
}
}
/**
* 获取SDka可用空间
*/
private static long getSDcardAvailableSize() {
if (checkSdCard()) {
File path = Environment.getExternalStorageDirectory();
StatFs mStatFs = new StatFs(path.getPath());
long blockSizeLong = mStatFs.getBlockSizeLong();
long availableBlocksLong = mStatFs.getAvailableBlocksLong();
return blockSizeLong * availableBlocksLong;
} else {
return 0;
}
}
/**
* 获取手机内部存储总空间
*/
public static long getPhoneTotalSize() {
if (!checkSdCard()) {
File path = Environment.getDataDirectory();
StatFs mStatFs = new StatFs(path.getPath());
long blockSizeLong = mStatFs.getBlockSizeLong();
long blockCountLong = mStatFs.getBlockCountLong();
return blockSizeLong * blockCountLong;
} else {
return getSDcardTotalSize();
}
}
/**
* 获取手机内存存储可用空间
*/
public static long getPhoneAvailableSize() {
if (!checkSdCard()) {
File path = Environment.getDataDirectory();
StatFs mStatFs = new StatFs(path.getPath());
long blockSizeLong = mStatFs.getBlockSizeLong();
long availableBlocksLong = mStatFs.getAvailableBlocksLong();
return blockSizeLong * availableBlocksLong;
} else
return getSDcardAvailableSize();
}
}
| [
"804189920@qq.com"
] | 804189920@qq.com |
cb042849c6cd974366f06bb39881b7e43c6be3ac | a5e488848c8a384084f957b10fb9043f9855fc75 | /src/com/bionichill/socialnetwork/dto/FriendshPk.java | 3807db6442a23640516212317aa35f0ee6fb4244 | [] | no_license | lordboss/SocialNetwork | 9b8c3323ad24e1d225115b5207cf79f4d80e692d | 9934686b26e8cc445b17f0f40c83614f80aa7564 | refs/heads/master | 2020-04-24T04:30:08.238040 | 2013-02-20T19:00:32 | 2013-02-20T19:00:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,722 | java | package com.bionichill.socialnetwork.dto;
import java.io.Serializable;
/**
* This class represents the primary key of the friendsh table.
*/
public class FriendshPk implements Serializable {
private Integer idFriendsh;
/**
* Sets the value of idFriendsh
*/
public void setIdFriendsh(Integer idFriendsh) {
this.idFriendsh = idFriendsh;
}
/**
* Gets the value of idFriendsh
*/
public Integer getIdFriendsh() {
return idFriendsh;
}
/**
* Method 'FriendshPk'
*
*/
public FriendshPk() {
}
/**
* Method 'FriendshPk'
*
* @param idFriendsh
*/
public FriendshPk(final Integer idFriendsh) {
this.idFriendsh = idFriendsh;
}
/**
* Method 'equals'
*
* @param _other
* @return boolean
*/
public boolean equals(Object _other) {
if (_other == null) {
return false;
}
if (_other == this) {
return true;
}
if (!(_other instanceof FriendshPk)) {
return false;
}
final FriendshPk _cast = (FriendshPk) _other;
if (idFriendsh == null ? _cast.idFriendsh != idFriendsh : !idFriendsh
.equals(_cast.idFriendsh)) {
return false;
}
return true;
}
/**
* Method 'hashCode'
*
* @return int
*/
public int hashCode() {
int _hashCode = 0;
if (idFriendsh != null) {
_hashCode = 29 * _hashCode + idFriendsh.hashCode();
}
return _hashCode;
}
/**
* Method 'toString'
*
* @return String
*/
public String toString() {
StringBuffer ret = new StringBuffer();
ret.append("ua.bionichill.socialnetwork.dto.FriendshPk: ");
ret.append("idFriendsh=" + idFriendsh);
return ret.toString();
}
}
| [
"baranov.r.p@gmail.com"
] | baranov.r.p@gmail.com |
2c9068bb5694dba1d26c49aea3253fc2620dbd6e | 3ecbd6edc7ba6932deeaa0d0774789e39ebcf19b | /src/main/java/io/github/rajpratik71/infra_controller/config/package-info.java | 9bd71935046efac1916af1c48312e5d589fe4344 | [] | no_license | Container-Projects/docker-api-spring-vue-controller | ca90cd2c9a8ef39f6bb9a4ae0791d26867406cac | 3c8a6d4ac650e1dda6f4f9db1cec7e0e118a4315 | refs/heads/main | 2023-06-09T07:00:32.312548 | 2021-06-28T15:15:47 | 2021-06-28T15:15:47 | 381,079,712 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 104 | java | /**
* Spring Framework configuration files.
*/
package io.github.rajpratik71.infra_controller.config;
| [
"rajpratik71@gmail.com"
] | rajpratik71@gmail.com |
75f92a9d1b40affa65dfb8ea81b639306eb5582f | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/protobuf/cmc.java | bab4799d1808a7f29f213f557046ee7c8e8de2a8 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,887 | java | package com.tencent.p177mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.p205bt.C1331a;
import p690e.p691a.p692a.p693a.C6086a;
import p690e.p691a.p692a.p695b.p697b.C6091a;
import p690e.p691a.p692a.p698c.C6093a;
/* renamed from: com.tencent.mm.protocal.protobuf.cmc */
public final class cmc extends C1331a {
public String qkh;
public int qki;
public String scope;
public int state;
/* renamed from: op */
public final int mo4669op(int i, Object... objArr) {
AppMethodBeat.m2504i(127737);
int f;
if (i == 0) {
C6093a c6093a = (C6093a) objArr[0];
if (this.scope != null) {
c6093a.mo13475e(1, this.scope);
}
if (this.qkh != null) {
c6093a.mo13475e(2, this.qkh);
}
c6093a.mo13480iz(3, this.state);
c6093a.mo13480iz(4, this.qki);
AppMethodBeat.m2505o(127737);
return 0;
} else if (i == 1) {
if (this.scope != null) {
f = C6091a.m9575f(1, this.scope) + 0;
} else {
f = 0;
}
if (this.qkh != null) {
f += C6091a.m9575f(2, this.qkh);
}
int bs = (f + C6091a.m9572bs(3, this.state)) + C6091a.m9572bs(4, this.qki);
AppMethodBeat.m2505o(127737);
return bs;
} else if (i == 2) {
C6086a c6086a = new C6086a((byte[]) objArr[0], unknownTagHandler);
for (f = C1331a.getNextFieldNumber(c6086a); f > 0; f = C1331a.getNextFieldNumber(c6086a)) {
if (!super.populateBuilderWithField(c6086a, this, f)) {
c6086a.ems();
}
}
AppMethodBeat.m2505o(127737);
return 0;
} else if (i == 3) {
C6086a c6086a2 = (C6086a) objArr[0];
cmc cmc = (cmc) objArr[1];
switch (((Integer) objArr[2]).intValue()) {
case 1:
cmc.scope = c6086a2.BTU.readString();
AppMethodBeat.m2505o(127737);
return 0;
case 2:
cmc.qkh = c6086a2.BTU.readString();
AppMethodBeat.m2505o(127737);
return 0;
case 3:
cmc.state = c6086a2.BTU.mo13458vd();
AppMethodBeat.m2505o(127737);
return 0;
case 4:
cmc.qki = c6086a2.BTU.mo13458vd();
AppMethodBeat.m2505o(127737);
return 0;
default:
AppMethodBeat.m2505o(127737);
return -1;
}
} else {
AppMethodBeat.m2505o(127737);
return -1;
}
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
7b37df02d77fed44cbe1c34eb99f0de819749898 | d062fda5686f2dd79da6b243272d2cf48eb758fa | /zms-portal/src/main/java/com/zto/zms/portal/controller/install/InstallManagerController.java | dcdafbe195934bba22734312e020de96faf16043 | [
"Apache-2.0"
] | permissive | objcoding/zms | 0f8214bc956a18b8ae830aadb8774d0714e93b56 | b040c8f5861dd011634dbd78e8b0a427b1d5d2c4 | refs/heads/master | 2022-12-27T22:51:09.608394 | 2020-10-12T14:01:45 | 2020-10-12T14:01:45 | 272,327,008 | 2 | 2 | Apache-2.0 | 2020-06-15T02:48:56 | 2020-06-15T02:48:56 | null | UTF-8 | Java | false | false | 2,271 | 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.zto.zms.portal.controller.install;
import org.apache.commons.compress.utils.IOUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Paths;
/**
* @author yuhao.zhang
* @description 安装包, 安装脚本管理
* @date 2020/2/24
*/
@RestController
@RequestMapping("/api/package")
public class InstallManagerController {
@RequestMapping(value = "/script/download/**/{fileName}", method = {RequestMethod.GET})
public void getInstallScript(@PathVariable(value = "fileName") String fileName, HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName);
String downPath = request.getServletPath().substring("/api/package/script/download/".length());
String path = Paths.get(downPath).toAbsolutePath().toString();
File file = new File(path);
if (!file.exists() || file.isDirectory()) {
response.setStatus(404);
return;
}
try (InputStream inputStream = new FileInputStream(new File(path));) {
IOUtils.copy(inputStream, response.getOutputStream());
}
}
}
| [
"lidawei9103@zto.com"
] | lidawei9103@zto.com |
05a575ad57016e4201027c7a73334fdcceb7bf1c | 79fc70dddfc1fd5157c654a363ee667ea77f1bca | /BOA/src/com/airbus/boa/util/MessageBundle.java | 8cef2a8df02f9808074d455fe761bf9b5c8d56d6 | [] | no_license | fthera/project | d1475fb404103727a708674f2271a2def1ea9231 | 8e54b07bd68d05abcf007d3f71329a6e1cff3927 | refs/heads/master | 2020-03-31T20:49:05.104788 | 2018-10-11T09:33:38 | 2018-10-11T09:33:38 | 152,556,135 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,125 | java | /*
* ------------------------------------------------------------------------
* Class : MessageBundle
* Copyright 2016 by AIRBUS France
* ------------------------------------------------------------------------
*/
package com.airbus.boa.util;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import javax.faces.context.FacesContext;
import com.airbus.boa.service.Constants;
/**
* Class managing the messages Resource Bundle
*/
public class MessageBundle {
private static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
/**
* Search the message corresponding to the provided key into the provided
* locale associated bundle and fill it with the provided arguments values. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pLocale
* the locale to use for searching the bundle
* @param pKey
* the key of message to retrieve
* @param pArguments
* the values to use for filling the message
* @return the message corresponding to the key and containing the arguments
*/
private static String getMessageFormat(Locale pLocale, String pKey,
Object[] pArguments) {
// Default return value
String lResourceString = pKey;
try {
ResourceBundle lBundle =
ResourceBundle.getBundle(Constants.BUNDLE_NAME, pLocale);
lResourceString = lBundle.getString(pKey);
}
catch (MissingResourceException e) {
return pKey;
}
if (pArguments == null) {
return lResourceString;
}
MessageFormat lFormat = new MessageFormat(lResourceString, pLocale);
return lFormat.format(pArguments);
}
/**
* Search the message corresponding to the provided key into the current
* locale associated bundle and fill it with the provided arguments values. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pKey
* the key of message to retrieve
* @param pArguments
* the values to use for filling the message
* @return the message corresponding to the key and containing the arguments
*/
public static String getMessageResource(String pKey, Object[] pArguments) {
FacesContext lContext = FacesContext.getCurrentInstance();
Locale lLocale = DEFAULT_LOCALE;
// Try to find the current Locale
if (lContext != null && lContext.getViewRoot() != null) {
lLocale = lContext.getViewRoot().getLocale();
}
return getMessageFormat(lLocale, pKey, pArguments);
}
/**
* Search the message corresponding to the provided key into the Default
* locale associated bundle and fill it with the provided arguments values. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pKey
* the key of message to retrieve
* @param pArguments
* the values to use for filling the message
* @return the message corresponding to the key and containing the arguments
*/
public static String getMessageResourceDefault(String pKey,
Object[] pArguments) {
return getMessageFormat(DEFAULT_LOCALE, pKey, pArguments);
}
/**
* Search the message corresponding to the provided key into the current
* locale associated bundle. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pKey
* the key of message to retrieve
* @return the message corresponding to the key
*/
public static String getMessage(String pKey) {
return getMessageResource(pKey, null);
}
/**
* Search the message corresponding to the provided key into the Default
* locale associated bundle. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pKey
* the key of message to retrieve
* @return the message corresponding to the key
*/
public static String getMessageDefault(String pKey) {
return getMessageFormat(DEFAULT_LOCALE, pKey, null);
}
/**
* Search the message corresponding to the provided key into the French
* locale associated bundle. <br>
* If the key is not found in bundle, return it instead of a message.
*
* @param pKey
* the key of message to retrieve
* @return the message corresponding to the key
*/
public static String getMessageFrench(String pKey) {
return getMessageFormat(Locale.FRENCH, pKey, null);
}
/**
* @return a three-letter abbreviation for current locale's language.
*/
public static String getIso3Langage() {
FacesContext lContext = FacesContext.getCurrentInstance();
Locale lLocale = DEFAULT_LOCALE;
if (lContext != null && lContext.getViewRoot() != null) {
lLocale = lContext.getViewRoot().getLocale();
}
return lLocale.getISO3Language();
}
/**
* Search the messages corresponding to the provided keys into the current
* locale associated bundle. <br>
* Return a Map containing as keys the provided keys and as values the
* message corresponding to the key. <br>
* When a key is not found in a bundle, the associated value is null.
*
* @param pKeys
* the list of keys of messages to retrieve
* @return a map containing the provided keys and all corresponding found
* messages
*/
public static Map<String, String> getAllMessages(List<String> pKeys) {
Map<String, String> lMap = new HashMap<String, String>();
if (pKeys == null) {
return lMap;
}
try {
for (String lKey : pKeys) {
try {
// Put found message associated to the current key
lMap.put(lKey, getMessage(lKey));
} catch (Exception e) {
// Null message is added when key is not found
lMap.put(lKey, null);
}
}
} catch (Exception e) {
}
return lMap;
}
/**
* Search the messages corresponding to the provided keys into the default
* locale associated bundle. <br>
* Return a Map containing as keys the provided keys and as values the
* message corresponding to the key. <br>
* When a key is not found in a bundle, the associated value is null.
*
* @param pKeys
* the list of keys of messages to retrieve
* @return a map containing the provided keys and all corresponding found
* messages
*/
public static Map<String, String> getAllDefaultMessages(List<String> pKeys) {
Map<String, String> lMap = new HashMap<String, String>();
if (pKeys == null) {
return lMap;
}
try {
for (String lKey : pKeys) {
try {
// Put found message associated to the current key
lMap.put(lKey, getMessageDefault(lKey));
}
catch (Exception e) {
// Null message is added when key is not found
lMap.put(lKey, null);
}
}
}
catch (Exception e) {
}
return lMap;
}
/**
* Search the messages corresponding to the provided keys into the french
* locale associated bundle. <br>
* Return a Map containing as keys the provided keys and as values the
* message corresponding to the key. <br>
* When a key is not found in a bundle, the associated value is null.
*
* @param pKeys
* the list of keys of messages to retrieve
* @return a map containing the provided keys and all corresponding found
* messages
*/
public static Map<String, String> getAllFrenchMessages(List<String> pKeys) {
Map<String, String> lMap = new HashMap<String, String>();
if (pKeys == null) {
return lMap;
}
try {
for (String lKey : pKeys) {
try {
// Put found message associated to the current key
lMap.put(lKey, getMessageFrench(lKey));
} catch (Exception e) {
// Null message is added when key is not found
lMap.put(lKey, null);
}
}
} catch (Exception e) {
}
return lMap;
}
}
| [
"fthera@AUSYNET.FR"
] | fthera@AUSYNET.FR |
0c89110e9fc351babd2807c0236a115ebfe289df | 3b46417b1567b0ac8fedb120307b4ab6a33f3dc5 | /java/chap10/Playground.java | cacd2540a864480513399c65781d02ef3a807f0c | [] | no_license | luketollefson/eclectic-projects | 416cf06831624c5733002fbc4a29ad553c1508d0 | 93c0739d83a8db3fe2634114828fbba38dbc2895 | refs/heads/master | 2020-07-31T14:58:43.904528 | 2019-09-24T16:31:08 | 2019-09-24T16:31:08 | 210,643,464 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,231 | java | /* Testing some stuff
Luke
*/
public class Playground
{
public static void main(String[] args)
{
B b3 = new B();
int n = b3.foo2();
System.out.println(b3.name);
C c1 = new C();
c1.foo1();
}
}
class A
{
private int number;
protected String name;
public double price;
public A()
{
System.out.println("A() called");
}
private void foo1()
{
System.out.println("A version of foo1() called");
}
protected int foo2()
{
System.out.println("A version of foo2() called");
return number;
}
public String foo3()
{
System.out.println("A version of foo3() called");
return "Hi";
}
}
class B extends A
{
private char service;
public B()
{
super();
System.out.println("B() called");
}
public void foo1()
{
System.out.println("B version of foo1() called");
}
protected int foo2()
{
int n = super.foo2();
System.out.println("B version of foo2() called");
return (n + 5);
}
public String foo3()
{
String temp = super.foo3();
System.out.println("B version of foo3()");
return (temp + " foo3");
}
}
class C extends B
{
public C()
{
super();
System.out.println("C() called");
}
public void foo1()
{
System.out.println("C version of foo1() called");
}
}
| [
"lukewtollefson@gmail.com"
] | lukewtollefson@gmail.com |
9cc6f16cf66014423278921d3d35578c13b3d02e | e9253bba61376de11efb551de8bfed25e1ccad9d | /src/duelgame/GameState.java | d127253559e7e1ba22515618a9a7641fdc2904be | [] | no_license | axblueblader/Duel-Game | a633ea727bb2e93f90793bfc15afacc8f1305f29 | 3d0d98ff8569793aa07af1e6219ee0e1b3be825c | refs/heads/master | 2020-03-23T02:09:37.919908 | 2018-08-12T11:42:55 | 2018-08-12T11:43:25 | 140,959,493 | 0 | 0 | null | 2018-08-12T04:07:05 | 2018-07-14T16:05:32 | Java | UTF-8 | Java | false | false | 1,297 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package duelgame;
/**
*
* @author Mikami
*/
public class GameState {
private int selfHealth;
private int selfMana;
private int selfShield;
private int enemyHealth;
private int enemyMana;
private int enemyShield;
private int stateScore;
public GameState(int[] self, int[] enemy) {
selfHealth = self[0];
selfMana = self[1];
selfShield = self[2];
enemyHealth = enemy[0];
enemyMana = enemy[1];
enemyShield = enemy[2];
stateScore = 0;
}
public int getSelfHealth() {
return selfHealth;
}
public int getEnemyHealth() {
return enemyHealth;
}
public int getSelfMana() {
return selfMana;
}
public int getEnemyMana() {
return enemyMana;
}
public int getSelfShield() {
return selfShield;
}
public int getEnemyShield() {
return enemyShield;
}
public int calculateStateScore() {
stateScore = selfHealth - enemyHealth;
return stateScore;
}
}
| [
"blueassassinx@gmail.com"
] | blueassassinx@gmail.com |
7fd4327b6d4415b5cc33c1b29ea9721877f0789d | 908c9f95e52a4a5c265c690c73932aeb3f82dfe8 | /gmall-pms/src/main/java/com/atguigu/gmall/pms/service/SpuImagesService.java | 5b2400b6f428a1743bc52d934c1766ebd6ae751f | [
"Apache-2.0"
] | permissive | ccyj1024/gmall | e8201cc2fea80e77d038f19aac2725755c0ed019 | b13b504204ed411937fc60e9bc829c4cf50b8893 | refs/heads/master | 2022-12-15T21:38:39.858644 | 2019-09-29T01:03:12 | 2019-09-29T01:03:12 | 209,918,123 | 0 | 0 | Apache-2.0 | 2022-12-10T06:26:58 | 2019-09-21T03:23:04 | JavaScript | UTF-8 | Java | false | false | 472 | java | package com.atguigu.gmall.pms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.gmall.pms.entity.SpuImagesEntity;
import com.atguigu.core.bean.PageVo;
import com.atguigu.core.bean.QueryCondition;
/**
* spu图片
*
* @author ccyj
* @email ccyj1024@126.com
* @date 2019-09-21 13:20:07
*/
public interface SpuImagesService extends IService<SpuImagesEntity> {
PageVo queryPage(QueryCondition params);
}
| [
"ccyj1024@126.com"
] | ccyj1024@126.com |
48c4ea0d8ad5689a40ee7035ab3dd81ac4e46c70 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/12/12_8228b6e164d299028393cf4c51d79cfbed2a1ce8/WPSUploadServlet/12_8228b6e164d299028393cf4c51d79cfbed2a1ce8_WPSUploadServlet_s.java | 830345c04dd6a8527976020fcba70e7e0ec389d7 | [] | 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 | 14,394 | java | package com.socialcomputing.wps.server.web;
import java.io.ByteArrayInputStream;
import java.io.CharArrayWriter;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.util.Hashtable;
import java.util.List;
import java.util.jar.JarInputStream;
import java.util.zip.ZipEntry;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import com.socialcomputing.utils.database.HibernateUtil;
import com.socialcomputing.utils.servlet.ExtendedRequest;
import com.socialcomputing.utils.servlet.UploadedFile;
import com.socialcomputing.wps.server.persistence.Dictionary;
import com.socialcomputing.wps.server.persistence.DictionaryManager;
import com.socialcomputing.wps.server.persistence.Swatch;
import com.socialcomputing.wps.server.persistence.SwatchManager;
import com.socialcomputing.wps.server.persistence.hibernate.DictionaryImpl;
import com.socialcomputing.wps.server.persistence.hibernate.DictionaryManagerImpl;
import com.socialcomputing.wps.server.persistence.hibernate.SwatchManagerImpl;
import com.socialcomputing.wps.server.persistence.hibernate.SwatchPk;
/**
* Title: Users Description: Copyright: Copyright (c) 2001 Company: VOYEZ VOUS
*
* @author
* @version 1.0
*/
public class WPSUploadServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1362617337569904439L;
public long getLastModified(HttpServletRequest request) {
return System.currentTimeMillis();
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String action = request.getParameter("action");
if (action != null) {}
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HibernateUtil.currentSession();
ExtendedRequest exrequest = new ExtendedRequest(request);
String action = exrequest.getParameter("action");
String dictionaryName = exrequest.getParameter("dictionary");
if (action != null) {
InternalReport report = null;
if (action.equalsIgnoreCase("updateDictionary") || action.equalsIgnoreCase("updateSwatch")) {
report = updateDefinition(exrequest.getParameter("definition"), action, dictionaryName);
}
else {
report = uploadDefinitionFile(exrequest.getFileParameter("definitionFile"), action, dictionaryName);
}
HttpSession session = request.getSession();
session.setAttribute("UploadDefinitionFileResults", report);
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.print("<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=");
out.print(exrequest.getParameter("redirect"));
out.print("\"></head></html>");
out.close();
HibernateUtil.closeSession();
response.setStatus(HttpServletResponse.SC_OK);
return;
}
HibernateUtil.closeSession();
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
private InternalReport uploadDefinitionFile(UploadedFile file, String action, String dictionaryName)
throws ServletException, IOException {
InternalReport report = new InternalReport();
if (file == null)
return report;
try {
if (file.getContentFilename().endsWith(".xml")) {
SAXBuilder saxBuilder = new SAXBuilder(true);
saxBuilder.setEntityResolver(new WPSResolver());
uploadFile(saxBuilder, report, file.getContentFilename(), new String(file.getBytes()), action,
dictionaryName);
} else
uploadZipFile(report, file.getBytes(), action, dictionaryName);
} catch (Exception e) {
e.printStackTrace();
report.setLastActionResult("Error uploadDefinitionFile : " + e.getMessage());
}
return report;
}
private InternalReport updateDefinition(String definition, String action, String dictionaryName)
throws ServletException, IOException {
InternalReport report = new InternalReport();
if (definition == null)
return report;
try {
SAXBuilder saxBuilder = new SAXBuilder(true);
saxBuilder.setEntityResolver(new WPSResolver());
if (action.equalsIgnoreCase("updateDictionary")) {
definition = "<!DOCTYPE dictionary SYSTEM \"WPS-dictionary.dtd\" >" + definition;
} else {
definition = "<!DOCTYPE swatch SYSTEM \"swatch.dtd\">" + definition;
}
Document doc = saxBuilder.build(new StringReader(definition), ".");
Element root = doc.getRootElement();
CharArrayWriter bout = new CharArrayWriter();
XMLOutputter op = new XMLOutputter();
if (action.equalsIgnoreCase("updateDictionary")) {
// Update dictionary definition
if (root.getName().equalsIgnoreCase("dictionaries")) {
List lst = root.getChildren("dictionary");
for (int i = 0; i < lst.size(); ++i) {
Element subelem = (Element) lst.get(i);
op.output(subelem, bout);
uploadDictionary(subelem.getAttributeValue("name"), bout.toString(), report);
bout.reset();
}
} else if (root.getName().equalsIgnoreCase("dictionary")) {
op.output(root, bout);
uploadDictionary(root.getAttributeValue("name"), bout.toString(), report);
}
} else if (action.equalsIgnoreCase("updateSwatch")) {
// Update swatch definition
if (root.getName().equalsIgnoreCase("swatch")) {
op.output(root, bout);
uploadSwatch(root.getAttributeValue("name"), bout.toString(), report, dictionaryName);
}
}
} catch (Exception e) {
e.printStackTrace();
report.setLastActionResult("Error updateDefinition : " + e.getMessage());
}
return report;
}
private class WPSResolver implements EntityResolver {
Hashtable<String, String> m_dtds = null;
public WPSResolver() {
m_dtds = new Hashtable<String, String>();
}
public WPSResolver(Hashtable<String, String> dtds) {
m_dtds = dtds;
}
public InputSource resolveEntity(String publicId, String systemId) throws java.io.FileNotFoundException {
InputSource iSource = null;
String file = m_dtds.get(extractPath(systemId));
if (file != null) {
iSource = new InputSource(new StringReader(file));
iSource.setSystemId(".");
}
else {
try {
//FileReader fr = new java.io.FileReader(getServletContext().getRealPath("dtd/" + extractPath(systemId)));
//iSource = new InputSource(fr);// new java.io.FileReader( "/" +
// extractPath( systemId)));
iSource = new InputSource(getServletContext().getResourceAsStream("/dtd/" + extractPath(systemId)));
iSource.setSystemId(".");
} catch (Exception e) {
e.printStackTrace();
}
}
return iSource;
}
}
static public String extractPath(String filePath) {
int pos = filePath.lastIndexOf('\\');
String file = (pos > -1) ? filePath.substring(pos + 1) : filePath;
pos = file.lastIndexOf('/');
return (pos > -1) ? file.substring(pos + 1) : file;
}
static public String extractFile(JarInputStream is) throws IOException {
StringBuffer sb = new StringBuffer();
byte[] b = new byte[512];
while (is.available() > 0) {
int n = is.read(b);
if (n > 0)
sb.append(new String(b, 0, n));
}
return sb.toString();
}
private void uploadZipFile(InternalReport output, byte[] definitionFile, String action, String dictionaryName)
throws Exception {
Hashtable<String, String> dtds = new Hashtable<String, String>();
Hashtable<String, String> files = new Hashtable<String, String>();
String name = null;
output.addAction(0, "Reading definition file");
JarInputStream input = new JarInputStream(new ByteArrayInputStream(definitionFile));
// La parserXML ferme le stream : donc lecture et découpage du fichier
// maintenant
ZipEntry entry = input.getNextEntry();
if (entry == null) { // Not a jar file
output.setLastActionResult("bad file format or corrupted file!");
return;
}
while (input.available() > 0) {
name = entry.getName();
if (name.endsWith(".dtd"))
dtds.put(extractPath(name), extractFile(input));
else
files.put(extractPath(name), extractFile(input));
input.closeEntry();
entry = input.getNextEntry();
}
SAXBuilder saxBuilder = new SAXBuilder(true);
saxBuilder.setEntityResolver(new WPSResolver(dtds));
output.setLastActionResult("done.");
output.skipLine();
for (String name1 : files.keySet()) {
if (name1.endsWith(".xml")) {
uploadFile(saxBuilder, output, name1, files.get(name1), action, dictionaryName);
}
}
}
private void uploadFile(SAXBuilder saxBuilder, InternalReport output, String name, String definition,
String action, String dictionaryName) throws Exception {
output.addAction(0, "Reading definition file '" + name + "'");
Document doc = saxBuilder.build(new StringReader(definition), ".");
Element root = doc.getRootElement();
CharArrayWriter bout = new CharArrayWriter();
XMLOutputter op = new XMLOutputter();
if (action.equalsIgnoreCase("uploadDictionaryFile")) {
// Upload dictionary
if (root.getName().equalsIgnoreCase("dictionaries")) {
List lst = root.getChildren("dictionary");
for (int i = 0; i < lst.size(); ++i) {
org.jdom.Element subelem = (org.jdom.Element) lst.get(i);
op.output(subelem, bout);
uploadDictionary(subelem.getAttributeValue("name"), bout.toString(), output);
bout.reset();
}
}
else if (root.getName().equalsIgnoreCase("dictionary")) {
op.output(root, bout);
uploadDictionary(root.getAttributeValue("name"), bout.toString(), output);
}
}
else if (action.equalsIgnoreCase("uploadSwatchFile")) {
// Upload swatch
if (root.getName().equalsIgnoreCase("swatch")) {
op.output(root, bout);
uploadSwatch(root.getAttributeValue("name"), bout.toString(), output, dictionaryName);
}
}
}
private void uploadDictionary(String name, String definition, InternalReport output) {
output.addAction(1, "Dictionary '" + name + "'");
try {
DictionaryManager manager = new DictionaryManagerImpl();
Dictionary dictionary = manager.findByName(name);
if (dictionary == null) {
dictionary = manager.create(name, definition);
output.setLastActionResult("created.");
}
else {
dictionary.setDefinition(definition);
manager.update(dictionary);
output.setLastActionResult("updated.");
}
}
catch (Exception e) {
output.setLastActionResult(e.getMessage());
e.printStackTrace();
}
}
private void uploadSwatch(String name, String definition, InternalReport output, String dictionaryName) {
output.addAction(1, "Swatch '" + name + "'");
try {
SwatchManager swatchManager = new SwatchManagerImpl();
DictionaryManager dictionaryManager = new DictionaryManagerImpl();
Dictionary dictionary = dictionaryManager.findByName(dictionaryName);
Swatch swatch = swatchManager.findByName(name, dictionaryName);
if (swatch == null) {
swatch = swatchManager.create(name, definition, dictionaryName);
output.setLastActionResult("created.");
}
else {
swatch.setDefinition(definition);
swatch.setSwatchPk(new SwatchPk(name, dictionaryName));
swatchManager.update(swatch);
output.setLastActionResult("updated.");
}
}
catch (Exception e) {
output.setLastActionResult(e.getMessage());
e.printStackTrace();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
54c53fa98fbde076c461bffb2675812075ef3d65 | bee4add800e66938c43b37050c0a6c5c5fdc2f02 | /src/main/java/CrackCoding/package8_3/Solution3_2.java | f3c6da631a63ac288e80b2f779ede2b6ba08f25e | [] | no_license | hliyuan/online_programming | 353406a196d20f9cb3b0cb61530204f3009ab620 | 35e09cf2b4d23560bbbf6207b849a4c4d6fbc947 | refs/heads/master | 2021-01-01T17:44:56.918485 | 2017-09-09T14:15:10 | 2017-09-09T14:15:10 | 98,145,781 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 892 | java | package CrackCoding.package8_3;
/**
* Created by liyuan on 2017/7/19.
*/
import java.util.Stack;
/**设计一个栈,除pop与push方法外,还支持min方法,可返回栈元素中的最小值。push,pop和min三个方法的时间复杂度必须为O(1)。*/
public class Solution3_2 extends Stack {
Stack<Integer> stack;
public Solution3_2(){
stack = new Stack<Integer>();
}
public void push(int value){
if (value<= min()){
stack.push(value);
}
super.push(value);
}
public Integer pop(){
int value = Integer.parseInt(String.valueOf(super.pop()));
if (value == min()){
stack.pop();
}
return value;
}
public int min(){
if (stack.empty()){
return Integer.MAX_VALUE;
}else {
return stack.peek();
}
}
}
| [
"liyuan Huang"
] | liyuan Huang |
95f2916b5911043f4507bbb9c893af57360e0ede | f1885aef187208c69972076f4cb380483b2b93a1 | /oap-server/server-tools/profile-exporter/tool-profile-snapshot-server-mock/src/main/java/org/apache/skywalking/oap/server/tool/profile/core/MockCoreModuleProvider.java | b48790fb3c232bfca5ad7135706c21f1604eaf55 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | song90625/skywalking | cff09a6ae1bb27a7bad095fdd192a981a45ac0b2 | 418bdff277179b4660e578b1837f21fd3db514cb | refs/heads/master | 2020-06-12T18:02:20.029097 | 2020-04-21T07:39:18 | 2020-04-21T07:39:18 | 194,379,294 | 0 | 0 | Apache-2.0 | 2020-04-21T08:26:50 | 2019-06-29T07:49:37 | Java | UTF-8 | Java | false | false | 9,094 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.server.tool.profile.core;
import java.io.IOException;
import java.util.Collections;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.CoreModuleConfig;
import org.apache.skywalking.oap.server.core.CoreModuleProvider;
import org.apache.skywalking.oap.server.core.annotation.AnnotationScan;
import org.apache.skywalking.oap.server.core.cache.NetworkAddressAliasCache;
import org.apache.skywalking.oap.server.core.cache.ProfileTaskCache;
import org.apache.skywalking.oap.server.core.command.CommandService;
import org.apache.skywalking.oap.server.core.config.ConfigService;
import org.apache.skywalking.oap.server.core.config.DownSamplingConfigService;
import org.apache.skywalking.oap.server.core.config.IComponentLibraryCatalogService;
import org.apache.skywalking.oap.server.core.config.NamingLengthControl;
import org.apache.skywalking.oap.server.core.profile.ProfileTaskMutationService;
import org.apache.skywalking.oap.server.core.query.AggregationQueryService;
import org.apache.skywalking.oap.server.core.query.AlarmQueryService;
import org.apache.skywalking.oap.server.core.query.LogQueryService;
import org.apache.skywalking.oap.server.core.query.MetadataQueryService;
import org.apache.skywalking.oap.server.core.query.MetricsQueryService;
import org.apache.skywalking.oap.server.core.query.ProfileTaskQueryService;
import org.apache.skywalking.oap.server.core.query.TopNRecordsQueryService;
import org.apache.skywalking.oap.server.core.query.TopologyQueryService;
import org.apache.skywalking.oap.server.core.query.TraceQueryService;
import org.apache.skywalking.oap.server.core.remote.RemoteSenderService;
import org.apache.skywalking.oap.server.core.remote.client.RemoteClientManager;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.core.server.JettyHandlerRegister;
import org.apache.skywalking.oap.server.core.source.DefaultScopeDefine;
import org.apache.skywalking.oap.server.core.source.SourceReceiver;
import org.apache.skywalking.oap.server.core.storage.model.IModelManager;
import org.apache.skywalking.oap.server.core.storage.model.IModelOverride;
import org.apache.skywalking.oap.server.core.storage.model.INewModel;
import org.apache.skywalking.oap.server.core.storage.model.StorageModels;
import org.apache.skywalking.oap.server.core.worker.IWorkerInstanceGetter;
import org.apache.skywalking.oap.server.core.worker.IWorkerInstanceSetter;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
import org.apache.skywalking.oap.server.library.module.ModuleStartException;
import org.apache.skywalking.oap.server.library.module.ServiceNotProvidedException;
import org.apache.skywalking.oap.server.telemetry.TelemetryModule;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockComponentLibraryCatalogService;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockGRPCHandlerRegister;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockJettyHandlerRegister;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockRemoteClientManager;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockSourceReceiver;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockStreamAnnotationListener;
import org.apache.skywalking.oap.server.tool.profile.core.mock.MockWorkerInstancesService;
public class MockCoreModuleProvider extends CoreModuleProvider {
private final StorageModels storageModels;
private final AnnotationScan annotationScan;
public MockCoreModuleProvider() {
this.storageModels = new StorageModels();
this.annotationScan = new AnnotationScan();
}
@Override
public String name() {
return "tool-profile-mock-core";
}
@Override
public Class<? extends ModuleDefine> module() {
return CoreModule.class;
}
@Override
public ModuleConfig createConfigBeanIfAbsent() {
return new MockCoreModuleConfig();
}
@Override
public void prepare() throws ServiceNotProvidedException, ModuleStartException {
this.registerServiceImplementation(NamingLengthControl.class, new NamingLengthControl(50, 50, 150));
MockStreamAnnotationListener streamAnnotationListener = new MockStreamAnnotationListener(getManager());
annotationScan.registerListener(streamAnnotationListener);
AnnotationScan scopeScan = new AnnotationScan();
scopeScan.registerListener(new DefaultScopeDefine.Listener());
try {
scopeScan.scan();
} catch (Exception e) {
throw new ModuleStartException(e.getMessage(), e);
}
CoreModuleConfig moduleConfig = new CoreModuleConfig();
this.registerServiceImplementation(ConfigService.class, new ConfigService(moduleConfig));
this.registerServiceImplementation(
DownSamplingConfigService.class, new DownSamplingConfigService(Collections.emptyList()));
this.registerServiceImplementation(GRPCHandlerRegister.class, new MockGRPCHandlerRegister());
this.registerServiceImplementation(JettyHandlerRegister.class, new MockJettyHandlerRegister());
this.registerServiceImplementation(
IComponentLibraryCatalogService.class, new MockComponentLibraryCatalogService());
this.registerServiceImplementation(SourceReceiver.class, new MockSourceReceiver());
MockWorkerInstancesService instancesService = new MockWorkerInstancesService();
this.registerServiceImplementation(IWorkerInstanceGetter.class, instancesService);
this.registerServiceImplementation(IWorkerInstanceSetter.class, instancesService);
this.registerServiceImplementation(RemoteSenderService.class, new RemoteSenderService(getManager()));
this.registerServiceImplementation(INewModel.class, storageModels);
this.registerServiceImplementation(IModelManager.class, storageModels);
this.registerServiceImplementation(IModelOverride.class, storageModels);
this.registerServiceImplementation(
NetworkAddressAliasCache.class, new NetworkAddressAliasCache(moduleConfig));
this.registerServiceImplementation(TopologyQueryService.class, new TopologyQueryService(getManager()));
this.registerServiceImplementation(MetricsQueryService.class, new MetricsQueryService(getManager()));
this.registerServiceImplementation(TraceQueryService.class, new TraceQueryService(getManager()));
this.registerServiceImplementation(LogQueryService.class, new LogQueryService(getManager()));
this.registerServiceImplementation(MetadataQueryService.class, new MetadataQueryService(getManager()));
this.registerServiceImplementation(AggregationQueryService.class, new AggregationQueryService(getManager()));
this.registerServiceImplementation(AlarmQueryService.class, new AlarmQueryService(getManager()));
this.registerServiceImplementation(TopNRecordsQueryService.class, new TopNRecordsQueryService(getManager()));
// add profile service implementations
this.registerServiceImplementation(
ProfileTaskMutationService.class, new ProfileTaskMutationService(getManager()));
this.registerServiceImplementation(
ProfileTaskQueryService.class, new ProfileTaskQueryService(getManager(), moduleConfig));
this.registerServiceImplementation(ProfileTaskCache.class, new ProfileTaskCache(getManager(), moduleConfig));
this.registerServiceImplementation(CommandService.class, new CommandService(getManager()));
this.registerServiceImplementation(RemoteClientManager.class, new MockRemoteClientManager(getManager(), 0));
}
@Override
public void start() throws ModuleStartException {
try {
annotationScan.scan();
} catch (IOException e) {
throw new ModuleStartException(e.getMessage(), e);
}
}
@Override
public void notifyAfterCompleted() {
}
@Override
public String[] requiredModules() {
return new String[] {
TelemetryModule.NAME
};
}
}
| [
"noreply@github.com"
] | noreply@github.com |
e9a56137afcf740e36c8773cb8abbc34c643eee2 | e1a2d6a136f7ad1845749b19e8169879a1d0fab4 | /app/src/androidTest/java/com/example/voicerecord/ExampleInstrumentedTest.java | cf8658cd63ce0dbac8b2f0f3131b628aa829ea43 | [] | no_license | Nazmul2957/VoiceRecord | a987b0f31880f8c1ce4f943c6e5ec3b5224033bf | 621f57aa62f694ca43a0d9beb0ad4a1da0df9ac4 | refs/heads/master | 2021-04-01T04:06:22.933226 | 2020-03-18T06:26:50 | 2020-03-18T06:26:50 | 248,155,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 762 | java | package com.example.voicerecord;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.voicerecord", appContext.getPackageName());
}
}
| [
"transcend16gb"
] | transcend16gb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.