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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67a413672a4607c1246f3dcf5eef95a7c750cf9d | a5f4be47127d8cdf08a00c23fe4222fa3e24a94f | /app/src/main/java/com/fuckingtest/kyawthuhtay/recyclerviewtest/JsonAndRecyclerView.java | 1ac515c0b3c104a9c124cd0ef1c840ee3e741fca | [] | no_license | kyawthuhtay/RecyclerViewTest | 660a0a98dd3caa1b88b76d6330450b7839db59d7 | 7275876921882143f0b88328bfa01efedc8a91e8 | refs/heads/master | 2021-01-20T22:26:36.305003 | 2016-07-11T14:54:22 | 2016-07-11T14:54:22 | 63,076,966 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,450 | java | package com.fuckingtest.kyawthuhtay.recyclerviewtest;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
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.StringRequest;
import com.android.volley.toolbox.Volley;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class JsonAndRecyclerView extends AppCompatActivity {
private List<ItemObject> movieList = new ArrayList<>();
private RecyclerView recyclerView;
private MoviesAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getApplicationContext(), recyclerView, new ClickListener() {
@Override
public void onClick(View view, int position) {
ItemObject movie = movieList.get(position);
Toast.makeText(getApplicationContext(), movie.getName() + " is selected!", Toast.LENGTH_SHORT).show();
Intent i = new Intent(getApplicationContext(), DetailActivity.class);
i.putExtra("name", movie);
startActivity(i);
}
@Override
public void onLongClick(View view, int position) {
}
}));
//mAdapter = new MoviesAdapter(movieList);
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
requestJsonObject();
//recyclerView.setAdapter(mAdapter);
//prepareMovieData();
}
//Json Parser
private void requestJsonObject(){
RequestQueue queue = Volley.newRequestQueue(this);
String url ="http://jsonplaceholder.typicode.com/users";
StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.d(null, "Response " + response);
GsonBuilder builder = new GsonBuilder();
Gson mGson = builder.create();
List<ItemObject> posts = new ArrayList<ItemObject>();
posts = Arrays.asList(mGson.fromJson(response, ItemObject[].class));
movieList = posts;
mAdapter = new MoviesAdapter(posts);
recyclerView.setAdapter(mAdapter);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d(null, "Error " + error.getMessage());
}
});
queue.add(stringRequest);
//mAdapter.notifyDataSetChanged();
}
//on click event
public interface ClickListener {
void onClick(View view, int position);
void onLongClick(View view, int position);
}
public static class RecyclerTouchListener implements RecyclerView.OnItemTouchListener {
private GestureDetector gestureDetector;
private JsonAndRecyclerView.ClickListener clickListener;
public RecyclerTouchListener(Context context, final RecyclerView recyclerView, final JsonAndRecyclerView.ClickListener clickListener) {
this.clickListener = clickListener;
gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
@Override
public void onLongPress(MotionEvent e) {
View child = recyclerView.findChildViewUnder(e.getX(), e.getY());
if (child != null && clickListener != null) {
clickListener.onLongClick(child, recyclerView.getChildPosition(child));
}
}
});
}
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
View child = rv.findChildViewUnder(e.getX(), e.getY());
if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) {
clickListener.onClick(child, rv.getChildPosition(child));
}
return false;
}
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent e) {
}
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}
}
// private void prepareMovieData() {
// Movie movie = new Movie("Mad Max: Fury Road", "Action & Adventure", "2015");
// movieList.add(movie);
//
// movie = new Movie("Inside Out", "Animation, Kids & Family", "2015");
// movieList.add(movie);
//
// movie = new Movie("Star Wars: Episode VII - The Force Awakens", "Action", "2015");
// movieList.add(movie);
//
// movie = new Movie("Shaun the Sheep", "Animation", "2015");
// movieList.add(movie);
//
// movie = new Movie("The Martian", "Science Fiction & Fantasy", "2015");
// movieList.add(movie);
//
// movie = new Movie("Mission: Impossible Rogue Nation", "Action", "2015");
// movieList.add(movie);
//
// movie = new Movie("Up", "Animation", "2009");
// movieList.add(movie);
//
// movie = new Movie("Star Trek", "Science Fiction", "2009");
// movieList.add(movie);
//
// movie = new Movie("The LEGO Movie", "Animation", "2014");
// movieList.add(movie);
//
// movie = new Movie("Iron Man", "Action & Adventure", "2008");
// movieList.add(movie);
//
// movie = new Movie("Aliens", "Science Fiction", "1986");
// movieList.add(movie);
//
// movie = new Movie("Chicken Run", "Animation", "2000");
// movieList.add(movie);
//
// movie = new Movie("Back to the Future", "Science Fiction", "1985");
// movieList.add(movie);
//
// movie = new Movie("Raiders of the Lost Ark", "Action & Adventure", "1981");
// movieList.add(movie);
//
// movie = new Movie("Goldfinger", "Action & Adventure", "1965");
// movieList.add(movie);
//
// movie = new Movie("Guardians of the Galaxy", "Science Fiction & Fantasy", "2014");
// movieList.add(movie);
//
// mAdapter.notifyDataSetChanged();
// }
} | [
"kyawthuhtay1994@gmail.com"
] | kyawthuhtay1994@gmail.com |
44d7c575ee188f5a1ee144f67a7a29f56be96dec | beb2fbdd8e5343fe76c998824c7228a546884c5e | /com.kabam.marvelbattle/src/com/google/android/gms/common/images/b.java | ae58ab7a515b4cb709be3ff6a6041f9fc29a3d7c | [] | no_license | alamom/mcoc_11.2.1_store_apk | 4a988ab22d6c7ad0ca5740866045083ec396841b | b43c41d3e8a43f63863d710dad812774cd14ace0 | refs/heads/master | 2021-01-11T17:13:02.358134 | 2017-01-22T19:51:35 | 2017-01-22T19:51:35 | 79,740,812 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,242 | java | package com.google.android.gms.common.images;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.a.a;
public class b
implements Parcelable.Creator<WebImage>
{
static void a(WebImage paramWebImage, Parcel paramParcel, int paramInt)
{
int i = com.google.android.gms.common.internal.safeparcel.b.D(paramParcel);
com.google.android.gms.common.internal.safeparcel.b.c(paramParcel, 1, paramWebImage.getVersionCode());
com.google.android.gms.common.internal.safeparcel.b.a(paramParcel, 2, paramWebImage.getUrl(), paramInt, false);
com.google.android.gms.common.internal.safeparcel.b.c(paramParcel, 3, paramWebImage.getWidth());
com.google.android.gms.common.internal.safeparcel.b.c(paramParcel, 4, paramWebImage.getHeight());
com.google.android.gms.common.internal.safeparcel.b.H(paramParcel, i);
}
public WebImage A(Parcel paramParcel)
{
int i = 0;
int n = a.C(paramParcel);
Uri localUri = null;
int k = 0;
int j = 0;
if (paramParcel.dataPosition() < n)
{
int m = a.B(paramParcel);
switch (a.aD(m))
{
default:
a.b(paramParcel, m);
m = k;
k = j;
j = m;
}
for (;;)
{
m = k;
k = j;
j = m;
break;
m = a.g(paramParcel, m);
j = k;
k = m;
continue;
localUri = (Uri)a.a(paramParcel, m, Uri.CREATOR);
m = j;
j = k;
k = m;
continue;
m = a.g(paramParcel, m);
k = j;
j = m;
continue;
i = a.g(paramParcel, m);
m = k;
k = j;
j = m;
}
}
if (paramParcel.dataPosition() != n) {
throw new a.a("Overread allowed size end=" + n, paramParcel);
}
return new WebImage(j, localUri, k, i);
}
public WebImage[] ax(int paramInt)
{
return new WebImage[paramInt];
}
}
/* Location: C:\tools\androidhack\com.kabam.marvelbattle\classes.jar!\com\google\android\gms\common\images\b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"eduard.martini@gmail.com"
] | eduard.martini@gmail.com |
2786184abc4fb89aa852333478163810bf4fb517 | 9310df5ec71cedbd42cee3ceaa394daf7f79acd7 | /src/main/java/pe/com/jdmm21/app/dao/LookupDAO.java | 01e84d38d3fd0631622b87a67b671233c8699c14 | [] | no_license | juandiego9221/worldgdpv1 | fe759a64a2d92990d0948c0e7fad5d8fd0e20d21 | 0de0485eee3384c85d03b8efcb1caa5a5b6689d5 | refs/heads/master | 2022-12-24T03:53:20.795441 | 2019-10-28T01:34:07 | 2019-10-28T01:34:07 | 217,943,205 | 0 | 0 | null | 2022-12-16T04:50:55 | 2019-10-28T01:33:52 | TSQL | UTF-8 | Java | false | false | 246 | java | package pe.com.jdmm21.app.dao;
import java.util.List;
public interface LookupDAO {
public List<String> getContinents();
public List<String> getRegions();
public List<String> getHeadOfStates();
public List<String> getGovernmentTypes();
}
| [
"juandiego9221@gmail.com"
] | juandiego9221@gmail.com |
fccc53c1e8625c0e5e80aa0d65066a25665a74f2 | 7c5348ca15b95a3f6c979b4729ea449ccbcf4a43 | /aws-resources-ec2/src/main/java/com/amazonaws/resources/ec2/internal/VpcCollectionImpl.java | 489c5e17045533f9e1389fe85670c6152f35c304 | [
"Apache-2.0"
] | permissive | amazon-archives/aws-sdk-java-resources | 94b2d5a179b331843233fe4640162069120af12f | 0f4fef2615d9687997b70a36eed1d62dd42df035 | refs/heads/master | 2023-03-16T02:05:17.139392 | 2014-12-15T17:30:34 | 2014-12-15T17:30:45 | 22,229,686 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,882 | java | /*
* Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.resources.ec2.internal;
import java.util.Iterator;
import com.amazonaws.resources.ResourcePage;
import com.amazonaws.resources.ResultCapture;
import com.amazonaws.resources.ec2.Vpc;
import com.amazonaws.resources.ec2.VpcCollection;
import com.amazonaws.resources.internal.ResourceCollectionImpl;
import com.amazonaws.resources.internal.StandardPageIterable;
import com.amazonaws.resources.internal.StandardResourceIterator;
import com.amazonaws.resources.internal.StandardResourcePage;
class VpcCollectionImpl implements VpcCollection {
private final ResourceCollectionImpl impl;
public VpcCollectionImpl(ResourceCollectionImpl impl) {
this.impl = impl;
}
@Override
public Iterator<Vpc> iterator() {
return new StandardResourceIterator<Vpc>(impl.iterator(),
VpcImpl.CODEC);
}
@Override
public Iterable<ResourcePage<Vpc>> pages() {
return new StandardPageIterable<Vpc>(impl.pages(), VpcImpl.CODEC);
}
@Override
public ResourcePage<Vpc> firstPage() {
return firstPage(null);
}
@Override
public ResourcePage<Vpc> firstPage(ResultCapture<Object> extractor) {
return new StandardResourcePage<Vpc>(impl.firstPage(extractor),
VpcImpl.CODEC);
}
}
| [
"dmurray@amazon.com"
] | dmurray@amazon.com |
ded5e660b0104233d932db8ea7132003ebea0562 | e2c16b934776a4b4ea23d4757e6252ee1bd3c8a1 | /src/main/java/io/swagger/client/eve/model/GetCharactersCharacterIdStatsInventory.java | 5bc29f4a29d9658bdd6aa813ee7c8d7dfdda74c4 | [
"MIT"
] | permissive | tkhamez/swagger-eve-java | 9e8076899ebc54d070c58080383d7fbb10bce6c6 | c1ceaa1677a63e96e06911795b58245f3cc761d6 | refs/heads/master | 2021-04-06T08:13:42.107696 | 2019-01-12T13:30:53 | 2019-01-12T13:30:53 | 124,690,501 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,299 | java | /*
* EVE Swagger Interface
* An OpenAPI for EVE Online
*
* OpenAPI spec version: 0.8.6
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.eve.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* inventory object
*/
@ApiModel(description = "inventory object")
public class GetCharactersCharacterIdStatsInventory {
@SerializedName("abandon_loot_quantity")
private Long abandonLootQuantity = null;
@SerializedName("trash_item_quantity")
private Long trashItemQuantity = null;
public GetCharactersCharacterIdStatsInventory abandonLootQuantity(Long abandonLootQuantity) {
this.abandonLootQuantity = abandonLootQuantity;
return this;
}
/**
* abandon_loot_quantity integer
* @return abandonLootQuantity
**/
@ApiModelProperty(value = "abandon_loot_quantity integer")
public Long getAbandonLootQuantity() {
return abandonLootQuantity;
}
public void setAbandonLootQuantity(Long abandonLootQuantity) {
this.abandonLootQuantity = abandonLootQuantity;
}
public GetCharactersCharacterIdStatsInventory trashItemQuantity(Long trashItemQuantity) {
this.trashItemQuantity = trashItemQuantity;
return this;
}
/**
* trash_item_quantity integer
* @return trashItemQuantity
**/
@ApiModelProperty(value = "trash_item_quantity integer")
public Long getTrashItemQuantity() {
return trashItemQuantity;
}
public void setTrashItemQuantity(Long trashItemQuantity) {
this.trashItemQuantity = trashItemQuantity;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCharactersCharacterIdStatsInventory getCharactersCharacterIdStatsInventory = (GetCharactersCharacterIdStatsInventory) o;
return Objects.equals(this.abandonLootQuantity, getCharactersCharacterIdStatsInventory.abandonLootQuantity) &&
Objects.equals(this.trashItemQuantity, getCharactersCharacterIdStatsInventory.trashItemQuantity);
}
@Override
public int hashCode() {
return Objects.hash(abandonLootQuantity, trashItemQuantity);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetCharactersCharacterIdStatsInventory {\n");
sb.append(" abandonLootQuantity: ").append(toIndentedString(abandonLootQuantity)).append("\n");
sb.append(" trashItemQuantity: ").append(toIndentedString(trashItemQuantity)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"tkhamez@gmail.com"
] | tkhamez@gmail.com |
cba53eb86943e0561d6bbd2d051f68bbeb8abdf8 | f03be5c1461aa47e7efbca7cfe00087e7b621fb5 | /app/src/main/java/com/example/uscfilms/decoration/SpacesItemDecoration.java | 159f44a134a2dcee0c947b6d5c791e914a6613c4 | [] | no_license | Monologue-N/Android-Films | 0a16c2b4708fb2e3ebbcb656b606e623f63252f7 | 49385ab76d2c1dd4773f15459204b309f0d4a125 | refs/heads/master | 2023-04-17T12:18:39.489878 | 2021-04-30T06:19:58 | 2021-04-30T06:19:58 | 358,520,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 812 | java | package com.example.uscfilms.decoration;
import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
private int space;
public SpacesItemDecoration(int space) {
this.space = space;
}
@Override
public void getItemOffsets(Rect outRect, View view,
RecyclerView parent, RecyclerView.State state) {
// outRect.left = space;
// outRect.right = space;
outRect.bottom = space;
// Add top margin only for the first item to avoid double space between items
if (parent.getChildLayoutPosition(view) == 0) {
outRect.top = space;
} else {
outRect.top = 0;
}
}
} | [
"cancan@usc.edu"
] | cancan@usc.edu |
6c5af44e1c7298e49c349eb4ddcde8bcf95d51ef | 20eac36e4a3455bc5e4724fc1d6f44d9fb43932d | /src/main/java/com/lh/design/pattern/structural/facade/QualifyService.java | 86f39ba60ffe2309b7f189376b5304be18b27403 | [] | no_license | 576451265/design_pattern | 5d75d26925cdd9db610c91660d5c9cb3112c177d | 8e0f4747e88aacf4fe99a63ec84fe48812648435 | refs/heads/master | 2020-12-04T20:44:30.860749 | 2020-02-17T00:53:41 | 2020-02-17T00:53:41 | 231,898,074 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package com.lh.design.pattern.structural.facade;
/**
* @Description 积分资格校验子系统
* @Author LuoH
* @Date 2020-02-01 11:34
*/
public class QualifyService {
//资格校验
public boolean isAvailable(PointsGift pointsGift) {
System.out.println("校验" + pointsGift.getName() + " 积分资格通过");
return true;
}
}
| [
"576451265@qq.com"
] | 576451265@qq.com |
ace917f8c93ec613e3e0061f5b13481055f4a1d0 | f442999ce1c72da2c742904188dc6636881b52f6 | /Ass3/WEB-INF/classes/Login.java | 1705746bf0f407d7eac36ed4951da04791238115 | [] | no_license | vaishnavi-gudur/BestBuy-like-eCommerce-Website | 68fadf81ac38dcbc32e67ac7b7ee63479f8738c0 | 99ab4d407bdffffcbd21fbc04fe223be21ffe069 | refs/heads/master | 2021-06-23T07:28:36.193038 | 2017-09-05T13:51:28 | 2017-09-05T13:51:28 | 84,105,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,351 | java | import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class Login extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter pw = response.getWriter();
String username = request.getParameter("username");
String password = request.getParameter("password");
String usertype = request.getParameter("usertype");
MySQLDataStoreUtilities mys = new MySQLDataStoreUtilities();
//pw.println(username);
//pw.println(password);
if(mys.selectUser(username, password))
{
HttpSession session = request.getSession(true);
session.setAttribute("username",username);
RequestDispatcher rs = request.getRequestDispatcher("welcome");
rs.forward(request, response);
//pw.println("Welcome " +username);
}
else
{
pw.println("<!doctype html>");
pw.println("<html>");
pw.println("<head>");
pw.println("<meta http-equiv='Content-Type' content='text/html charset=utf-8'/>");
pw.println("<title>BestDeal - Login</title>");
pw.println("<link rel='stylesheet' href='styles.css' type='text/css'/>");
pw.println("</head>");
pw.println("<body>");
pw.println("<div id='container'>");
pw.println("<header>");
pw.println("<h1><a href='/'>Best<span>Deal</span></a></h1>");
pw.println("<h2>The Best You Can Get</h2>");
pw.println("</header>");
pw.println("<nav>");
pw.println("<ul>");
pw.println("<li class='start'><a href='myhome'>Home</a></li>");
pw.println("<li><a href='#'>Smartphones</a></li>");
pw.println("<li><a href='#'>Laptops</a></li>");
pw.println("<li><a href='#'>Tablets</a></li>");
pw.println("<li><a href='#'>TV</a></li>");
//pw.println("<li class='end'><a href='#'>Contact</a></li>");
pw.println("<li class='selected'><a href='#'>Login</a></li>");
pw.println("<li><a href='trending'>Trending</a></li>");
pw.println("</ul>");
pw.println("</nav>");
pw.println("<div id='body'>");
pw.println("<section id='content'>");
pw.println("</section>");
pw.println("<aside class='sidebar'>");
pw.println("<ul>");
pw.println("<li>");
pw.println("<h4>SmartPhones</h4>");
pw.println("<ul>");
pw.println("<li><a href='SmartServlet?brand=samsung'>Samsung</a></li>");
pw.println("<li><a href='SmartServlet?brand=htc'>HTC</a></li>");
pw.println("<li><a href='SmartServlet?brand=apple'>Apple</a></li>");
pw.println("<li><a href='SmartServlet?brand=sony'>SONY</a></li>");
pw.println("<li><a href='SmartServlet?brand=acer'>Acer</a></li>");
pw.println("</ul>");
pw.println("</li>");
pw.println("<li>");
pw.println("<h4>Laptops</h4>");
pw.println("<ul>");
pw.println("<li><a href='LaptopServlet?make=dell'>Dell</a></li>");
pw.println("<li><a href='LaptopServlet?make=lenovo'>Lenovo</a></li>");
pw.println("<li><a href='LaptopServlet?make=hp'>HP</a></li>");
pw.println("<li><a href='LaptopServlet?make=panasonic'>Panasonic</a></li>");
pw.println("<li><a href='LaptopServlet?make=apple'>Apple</a></li>");
pw.println("</li>");
pw.println("</ul>");
pw.println("</li>");
pw.println("<li>");
pw.println("<h4>Tablets</h4>");
pw.println("<ul>");
pw.println("<li><a href='TabletServlet?brand=lg'>LG</a></li>");
pw.println("<li><a href='TabletServlet?brand=acer'>Acer</a></li>");
pw.println("<li><a href='TabletServlet?brand=asus'>Asus</a></li>");
pw.println("<li><a href='TabletServlet?brand=samsung'>Samsung</a></li>");
pw.println("<li><a href='TabletServlet?brand=google'>Google</a></li>");
pw.println("</li>");
pw.println("</ul>");
pw.println("</li>");
pw.println("<li>");
pw.println("<h4>TV</h4>");
pw.println("<ul>");
pw.println("<li><a href='Tvservlet?brand=panasonic'>Panasonic</a></li>");
pw.println("<li><a href='Tvservlet?brand=sony'>SONY</a></li>");
pw.println("<li><a href='Tvservlet?brand=toshiba'>Toshiba</a></li>");
pw.println("<li><a href='Tvservlet?brand=insignia'>Insignia</a></li>");
pw.println("<li><a href='Tvservlet?brand=hitachi'>Hitachi</a></li>");
pw.println("</li>");
pw.println("</ul>");
pw.println("</li>");
pw.println("</aside>");
pw.println("<p> </p>");
pw.println("<h3>Login</h3>");
pw.println("<fieldset>");
pw.println("<legend>Login</legend>");
pw.println("<br>");
pw.println("<p style='color:red'>Username or Password incorrect</p>");
pw.println("<br>");
pw.println("<form action='/Ass3/login' method='get'>");
pw.println("<p><label for='username'>UserID:</label>");
pw.println("<input name='username' id='username' type='text' /></p>");
pw.println("<p><label for='password'>Password:</label>");
pw.println("<input name='password' id='password' type='password' /></p>");
pw.println("<input type ='submit' value='login'/>");
pw.println("</form>");
pw.println("<br><a href='/Ass3/regiform'>New User?Sign Up here</a>");
pw.println("</fieldset>");
pw.println("</article>");
pw.println("</section>");
pw.println("<div class='clear'></div>");
pw.println("</div>");
pw.println("<footer>");
pw.println("<div class='footer-content'>");
pw.println("<div class='clear'></div>");
pw.println("</div>");
pw.println("<div class='footer-bottom'>");
pw.println("<p>© YourSite 2010. <a href='http://zypopwebtemplates.com/'>Free CSS Web Templates</a> by ZyPOP</p>");
pw.println("</div>");
pw.println("</footer>");
pw.println("</div>");
pw.println("</body>");
pw.println("</html>");
//RequestDispatcher rs = request.getRequestDispatcher("abcd.html");
//rs.include(request, response);
//
}
}
} | [
"gudur.vaishnavi.12it1088@gmail.com"
] | gudur.vaishnavi.12it1088@gmail.com |
52fb39fa4e00469e5aeae50343b08fe47fc32d1c | d6b69d58fca199496f14d7e2ff5a2bc7232b42e2 | /src/main/java/com/alipay/api/domain/RpaCrawlerQueryCriteriaVO.java | d15425d3e88e661d076fd966a428ee3787493478 | [
"Apache-2.0"
] | permissive | Cong222/alipay-sdk-java-all | 3cdc442b751b78bef271267419f9bc5900888d2b | 57127af62fd6aabeb25dfcf303a0877e91612596 | refs/heads/master | 2023-04-13T17:55:17.768367 | 2021-04-12T04:41:18 | 2021-04-12T04:41:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,612 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* Rpa爬虫请求查询条件
*
* @author auto create
* @since 1.0, 2021-03-08 15:16:19
*/
public class RpaCrawlerQueryCriteriaVO extends AlipayObject {
private static final long serialVersionUID = 1214573239119855224L;
/**
* 比较符
*/
@ApiField("comparison")
private String comparison;
/**
* 查询字段
*/
@ApiField("key")
private String key;
/**
* eq,gt,lt生效,查询值
*/
@ApiField("value")
private String value;
/**
* between类型生效,结束值
*/
@ApiField("value_end")
private String valueEnd;
/**
* between类型生效,起始值
*/
@ApiField("value_start")
private String valueStart;
/**
* 目标值
*/
@ApiField("values")
private String values;
public String getComparison() {
return this.comparison;
}
public void setComparison(String comparison) {
this.comparison = comparison;
}
public String getKey() {
return this.key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public String getValueEnd() {
return this.valueEnd;
}
public void setValueEnd(String valueEnd) {
this.valueEnd = valueEnd;
}
public String getValueStart() {
return this.valueStart;
}
public void setValueStart(String valueStart) {
this.valueStart = valueStart;
}
public String getValues() {
return this.values;
}
public void setValues(String values) {
this.values = values;
}
}
| [
"junying.wjy@alipay.com"
] | junying.wjy@alipay.com |
6d69581ad977a400020c39d6ed00a84d001e054f | ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd | /Talagram/com/google/android/gms/wearable/internal/zzax.java | 99231dca3230e978e6842cca8ae8f54315d9f04f | [] | no_license | danielperez9430/Third-party-Telegram-Apps-Spy | dfe541290c8512ca366e401aedf5cc5bfcaa6c3e | f6fc0f9c677bd5d5cd3585790b033094c2f0226d | refs/heads/master | 2020-04-11T23:26:06.025903 | 2018-12-18T10:07:20 | 2018-12-18T10:07:20 | 162,166,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,665 | java | package com.google.android.gms.wearable.internal;
import android.os.Parcel;
import android.os.Parcelable$Creator;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
public final class zzax implements Parcelable$Creator {
public zzax() {
super();
}
public final Object createFromParcel(Parcel arg8) {
int v0 = SafeParcelReader.validateObjectHeader(arg8);
int v1 = 0;
zzay v2 = null;
int v3 = 0;
int v4 = 0;
while(arg8.dataPosition() < v0) {
int v5 = SafeParcelReader.readHeader(arg8);
switch(SafeParcelReader.getFieldId(v5)) {
case 2: {
goto label_18;
}
case 3: {
goto label_16;
}
case 4: {
goto label_14;
}
case 5: {
goto label_12;
}
}
SafeParcelReader.skipUnknownField(arg8, v5);
continue;
label_18:
Parcelable v2_1 = SafeParcelReader.createParcelable(arg8, v5, zzay.CREATOR);
continue;
label_12:
v4 = SafeParcelReader.readInt(arg8, v5);
continue;
label_14:
v3 = SafeParcelReader.readInt(arg8, v5);
continue;
label_16:
v1 = SafeParcelReader.readInt(arg8, v5);
}
SafeParcelReader.ensureAtEnd(arg8, v0);
return new zzaw(v2, v1, v3, v4);
}
public final Object[] newArray(int arg1) {
return new zzaw[arg1];
}
}
| [
"dpefe@hotmail.es"
] | dpefe@hotmail.es |
27724b3e664ac3d6a278be1d97df3129b02c021f | 539db6cdd7c54c0e7f6cf6abb50a92d9e0fd6f65 | /cultural-offerings/src/main/java/ftn/ktsnvt/culturalofferings/controller/api/AuthApi.java | 617e62775744b3e7a7369c723d8c9455fa5f8deb | [
"MIT"
] | permissive | Ivana98/kts-nvt2020 | 4cbe5d3e5026c75c268fd92932a9feac08abb98d | 9acd5272d3e004947155dd6823ef8e0282cc0597 | refs/heads/main | 2023-07-16T03:34:58.454306 | 2021-09-05T12:00:03 | 2021-09-05T12:00:03 | 401,748,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,613 | java | package ftn.ktsnvt.culturalofferings.controller.api;
import ftn.ktsnvt.culturalofferings.dto.LoginDTO;
import ftn.ktsnvt.culturalofferings.dto.RegisterDTO;
import ftn.ktsnvt.culturalofferings.dto.UserDTO;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RequestMapping(value = "/auth")
public interface AuthApi {
@RequestMapping(value = "/register", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<RegisterDTO> register(@RequestBody RegisterDTO body, BindingResult bindingResult, HttpServletRequest request);
@RequestMapping(value = "/login", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<LoginDTO> login(HttpServletResponse response);
@RequestMapping(value = "/confirm-registration", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<UserDTO> confirmRegistration(@RequestParam("token") String token);
@RequestMapping(value = "/resend-token", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<Void> resendToken(@RequestParam("email") String email, HttpServletRequest request);
}
| [
"millan.djuric@hotmail.com"
] | millan.djuric@hotmail.com |
3daeb95659cd646ede99b22707694ef77fdec3c0 | 04ae6e42ae074b2d4a3d7ed846a46b18db6dfab7 | /Netty/src/main/java/com/jelf/netty/client/MyClient.java | bbd53d58d07653673e07552354b66ccae13f7d49 | [] | no_license | okxiaoliang4/NettyDemo | 47b1adacdbed01c2686bbf310c441c70e8210417 | 934041d98e4b09de62f06fa1d1b45ab74d0a53e0 | refs/heads/master | 2022-05-07T10:29:48.658593 | 2016-10-27T12:22:48 | 2016-10-27T12:23:19 | 72,022,136 | 0 | 0 | null | 2022-04-21T09:55:59 | 2016-10-26T16:24:00 | Java | UTF-8 | Java | false | false | 1,646 | java | package com.jelf.netty.client;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import com.jelf.netty.server.MyServerInitializer;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
public class MyClient {
public static String host = "127.0.0.1";
public static int port = 8888;
/**
* @param args
* @throws InterruptedException
* @throws IOException
*/
public static void main(String[] args) throws InterruptedException, IOException {
EventLoopGroup group = new NioEventLoopGroup();
try {
Bootstrap b = new Bootstrap();
b.group(group).channel(NioSocketChannel.class).handler(new MyServerInitializer());
// 连接服务端
Channel ch = b.connect(host, port).sync().channel();
// 控制台输入
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
for (;;) {
String line = in.readLine();
if (line == null) {
continue;
}
/*
* 向服务端发送在控制台输入的文本 并用"\r\n"结尾 之所以用\r\n结尾 是因为我们在handler中添加了
* DelimiterBasedFrameDecoder 帧解码。
* 这个解码器是一个根据\n符号位分隔符的解码器。所以每条消息的最后必须加上\n否则无法识别和解码
*/
ch.writeAndFlush(line + "\r\n");
}
} finally {
// The connection is closed automatically on shutdown.
group.shutdownGracefully();
}
}
}
| [
"353742991@qq.com"
] | 353742991@qq.com |
0a7d0c9b9d3fbe0c8bbf9330aec5da7678dd19e6 | 3bd4a28825e2ee550b8ac2e758a1bfe7d7b5d75d | /Collections/ArrayListVsHashtable/ArrayConcept.java | 9da5f54c85c30f1b1d1596b0c30afe217cd5bf67 | [] | no_license | uma5958/Java | 7d9fffc420a3e51ef42255271c7f91ede5cf560f | 6d825ea81235289af83c6f4dc27787ed6370ad47 | refs/heads/master | 2023-05-10T16:23:09.008180 | 2020-01-02T07:19:35 | 2020-01-02T07:19:35 | 206,498,473 | 0 | 0 | null | 2023-05-09T18:12:51 | 2019-09-05T07:09:39 | Java | UTF-8 | Java | false | false | 716 | java | package ArrayListVsHashtable;
public class ArrayConcept {
/**:
* Disadvantages of array:
* 1) Size is fixed:
* - static array: to overcome this problem we use collections
* - dynamic array: ArrayList
* 2) It stores similar data type: To overcome this problem we use Object array
*/
public static void main(String[] args) {
// int Array
int i[] = new int[4];
i[0]=10;
i[1]=20;
i[2]=30;
i[3]=40;
//i[4]=50; // ArrayIndexOutOfBoundsException
System.out.println(i[2]);
System.out.println(i[3]);
// size of array
System.out.println(i.length);
// to print all values of array we use for loop
for (int j = 0; j < i.length; j++) {
System.out.println(i[j]);
}
}
}
| [
"umakvdu@gmail.com"
] | umakvdu@gmail.com |
47ab1453f9d008c0a383507f0eba304a03256653 | 0ebd36b534acac30c62d6eb2fb59ab77c04cacfe | /src/com/zapateria/main/interfaces/IRegistroDAO.java | 39cb1d4f0b4f91f5fe3b7679ca2624495dc82868 | [] | no_license | camiloarevalog1/ScalasEscritorio | 03989107b0744366b30082c1a9570afec8c88180 | b8e8bdf0166c7aece242cb2030355f373e21e800 | refs/heads/master | 2020-04-15T18:32:55.345256 | 2019-03-03T18:15:15 | 2019-03-03T18:15:15 | 164,916,028 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,984 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.zapateria.main.interfaces;
import com.zapateria.main.dto.RegistroDTO;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
/**
*
* @author DELL
*/
public interface IRegistroDAO extends java.io.Serializable {
public boolean registrar( long id_usuario, long id_cliente, long id_material, double precio, long cantidad, String comentario,
String estado, Date fecha_entrega,double iva,double total_pagar);
public ArrayList<RegistroDTO> listarVentasCliente(long id) ;
public boolean cambiarEstado(long id, String estado);
public boolean cambiarImpresion(long id, long estado);
public boolean cambiarIdFactura(long id, long factura);
public ArrayList<RegistroDTO> listar();
public ArrayList<RegistroDTO> listarRegistroFecha(Date fechaD, Date fechaH);
public boolean cambiarFormaDePago(long id, String formaDePago);
public boolean editarFechaRegistro(long id, Date fecha) ;
public ArrayList<RegistroDTO> listarRegistro(long id);
public boolean registrarContado(long id_usuario, long id_cliente, long id_material, double precio, long cantidad, String comentario,
String estado, String forma_pago, long numero_cuotas, long cuotas_pagadas, Date fecha_entrega, double iva, double total_pagar,double total_pagado);
public boolean registrarRegistroRemision(long id_usuario, long id_cliente, long id_material, double precio, long cantidad, String comentario,
String estado, String forma_pago, long numero_cuotas, long cuotas_pagadas, Date fecha_entrega, double iva, double total_pagar,long id_factura,double totalPagado,long id_re);
public ArrayList<RegistroDTO> listarRegistrosEstado(String estado);
public ArrayList<RegistroDTO> listarRegistroMaterial(long id);
public ArrayList<RegistroDTO> listarRegistroMaterialFecha(long id,Date fecha,Date hasta);
// public ArrayList<RegistroDTO> listarRegistrosPago(String estado);
public ArrayList<RegistroDTO> listarRegistrosMaterial(long id);
public ArrayList<RegistroDTO> listarIngresos(Date FechaD, Date FechaH);
public boolean registrarCuotasPagadas(long id, long cuota);
public ArrayList<RegistroDTO> listar(long id);
public double itemTotalFacturas(long id);
public double IvaTotalFacturas(long id);
public boolean eliminarRegistro(long id) ;
public boolean cambiarIdFacturasCero(long id, long factura);
public boolean eliminarRegistros(long id) ;
public boolean cambiarComentario(long id, String estado);
public boolean Material(long id, long fecha);
public boolean editarPrecio(long id, double precio,double total,double iva,long cantidad);
public ArrayList<RegistroDTO> listarVentasClienteRemision(long id);
}
| [
"cristiancamiloag@ufps.edu.co"
] | cristiancamiloag@ufps.edu.co |
8846b8ea9c35c3d3bef93d07c5eae37cb65fb31f | ae5150ad9a552517894321f8546fb6b2b9042725 | /src/main/java/gui/WyChildPanel.java | 1cea1478204cbfd10379fb7ac592c42ff42806d9 | [] | no_license | yulizi1937/campusQA | 9653437af3b4e73c8a2a5af1d4ad66ab542cf9df | e3b68e69925214407c36bcb5f823a932bb18aa79 | refs/heads/master | 2021-05-15T06:41:05.839842 | 2017-11-08T06:35:40 | 2017-11-08T06:35:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,445 | java | package gui;
import javax.swing.*;
import java.awt.*;
import java.io.File;
/**
* Created by Scruel on 2016/6/22.
* GitHub - https://GitHub.com/scruel
*/
public class WyChildPanel extends JPanel {
Color normalColor = new Color(231, 239, 248);
private String username;
private String usersignature;
private File localPath = new File("src/main/resources/img");
public WyChildPanel(ImageIcon image, String username, String usersignature) {
// ImageIcon imageIcon = new ImageIcon(localPath + "/MainPanel_ContactHeadSelect_paddingDraw.png");
ImageIcon imageIcon = new ImageIcon(localPath + "/MainPanel_ContactHeadSelect_paddingDraw.png");
this.username = username;
this.usersignature = usersignature;
JLabel headJL = new JLabel(image);
JLabel unJL = new JLabel(username);
JLabel usJL = new JLabel(usersignature);
JLabel headBKGJL = new JLabel(imageIcon);
headBKGJL.setBounds(6, 1, 48, 48);
headJL.setBounds(10, 3, 45, 45);
unJL.setBounds(60, 3, 170, 25);
unJL.setFont(new Font("Arial", 0, 13));
usJL.setFont(new Font("Microsoft YaHei", 0, 13));
usJL.setForeground(new Color(0x9B98A3));
usJL.setBounds(60, 20, 170, 25);
this.setLayout(null);
this.add(headJL);
this.setBackground(normalColor);
this.add(headBKGJL);
this.add(unJL);
this.add(usJL);
this.setSize(270, 50);
}
public String getUsername() {
return username;
}
}
| [
"scruel@vip.qq.com"
] | scruel@vip.qq.com |
2f24379eccb0a4a9a3f83485c5716900c63b36ad | 3e8708338379912a2e2f571b5405dae519e1c257 | /java/src/main/java/org/apache/arrow/gandiva/evaluator/JniWrapper.java | 4264ae8467015e83c78145a14b72b86b1e62cdc9 | [
"Apache-2.0"
] | permissive | PolarMember/gandiva | f405d1cd9724263b961092d7d3d4a23c2e121740 | 6f11d4ef79b38074151e3107d46477f45ed21d11 | refs/heads/master | 2023-03-05T12:27:40.265592 | 2018-10-04T08:54:58 | 2018-10-04T08:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,466 | java | /*
* Copyright (C) 2017-2018 Dremio Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.arrow.gandiva.evaluator;
import static java.util.UUID.randomUUID;
import org.apache.arrow.gandiva.exceptions.GandivaException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
/**
* This class is implemented in JNI. This provides the Java interface
* to invoke functions in JNI
*/
class JniWrapper {
private static final String LIBRARY_NAME = "gandiva_jni";
private static final String HELPER_LIBRARY_NAME = "gandiva_helpers";
private static final String IRHELPERS_BC = "irhelpers.bc";
private static volatile JniWrapper INSTANCE;
private final String byteCodeFilePath;
private final String helperLibraryFilePath;
private JniWrapper(String byteCodeFilePath, String helperLibraryFilePath) {
this.byteCodeFilePath = byteCodeFilePath;
this.helperLibraryFilePath = helperLibraryFilePath;
}
static JniWrapper getInstance() throws GandivaException {
if (INSTANCE == null) {
synchronized (JniWrapper.class) {
if (INSTANCE == null) {
INSTANCE = setupInstance();
}
}
}
return INSTANCE;
}
private static JniWrapper setupInstance() throws GandivaException {
try {
String tempDir = System.getProperty("java.io.tmpdir");
loadGandivaLibraryFromJar(tempDir);
File byteCodeFile = moveFileFromJarToTemp(tempDir, IRHELPERS_BC);
final String libraryToLoad = System.mapLibraryName(HELPER_LIBRARY_NAME);
final File helperLibraryFile = moveFileFromJarToTemp(tempDir, libraryToLoad);
return new JniWrapper(byteCodeFile.getAbsolutePath(), helperLibraryFile.getAbsolutePath());
} catch (IOException ioException) {
throw new GandivaException("unable to create native instance", ioException);
}
}
private static void loadGandivaLibraryFromJar(final String tmpDir)
throws IOException, GandivaException {
final String libraryToLoad = System.mapLibraryName(LIBRARY_NAME);
final File libraryFile = moveFileFromJarToTemp(tmpDir, libraryToLoad);
System.load(libraryFile.getAbsolutePath());
}
private static File moveFileFromJarToTemp(final String tmpDir, String libraryToLoad)
throws IOException, GandivaException {
final File temp = setupFile(tmpDir, libraryToLoad);
try (final InputStream is = JniWrapper.class.getClassLoader()
.getResourceAsStream(libraryToLoad)) {
if (is == null) {
throw new GandivaException(libraryToLoad + " was not found inside JAR.");
} else {
Files.copy(is, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
return temp;
}
private static File setupFile(String tmpDir, String libraryToLoad)
throws IOException, GandivaException {
// accommodate multiple processes running with gandiva jar.
// length should be ok since uuid is only 36 characters.
final String randomizeFileName = libraryToLoad + randomUUID();
final File temp = new File(tmpDir, randomizeFileName);
if (temp.exists() && !temp.delete()) {
throw new GandivaException("File: " + temp.getAbsolutePath()
+ " already exists and cannot be removed.");
}
if (!temp.createNewFile()) {
throw new GandivaException("File: " + temp.getAbsolutePath()
+ " could not be created.");
}
temp.deleteOnExit();
return temp;
}
/**
* Returns the byte code file path extracted from jar.
*/
public String getByteCodeFilePath() {
return byteCodeFilePath;
}
/**
* Returns the helper library file path extracted from jar.
*/
public String getHelperLibraryFilePath() {
return helperLibraryFilePath;
}
/**
* Generates the projector module to evaluate the expressions with
* custom configuration.
*
* @param schemaBuf The schema serialized as a protobuf. See Types.proto
* to see the protobuf specification
* @param exprListBuf The serialized protobuf of the expression vector. Each
* expression is created using TreeBuilder::MakeExpression
* @param configId Configuration to gandiva.
* @return A moduleId that is passed to the evaluateProjector() and closeProjector() methods
*
*/
native long buildProjector(byte[] schemaBuf, byte[] exprListBuf,
long configId) throws GandivaException;
/**
* Evaluate the expressions represented by the moduleId on a record batch
* and store the output in ValueVectors. Throws an exception in case of errors
*
* @param moduleId moduleId representing expressions. Created using a call to
* buildNativeCode
* @param numRows Number of rows in the record batch
* @param bufAddrs An array of memory addresses. Each memory address points to
* a validity vector or a data vector (will add support for offset
* vectors later).
* @param bufSizes An array of buffer sizes. For each memory address in bufAddrs,
* the size of the buffer is present in bufSizes
* @param outAddrs An array of output buffers, including the validity and data
* addresses.
* @param outSizes The allocated size of the output buffers. On successful evaluation,
* the result is stored in the output buffers
*/
native void evaluateProjector(long moduleId, int numRows,
long[] bufAddrs, long[] bufSizes,
long[] outAddrs, long[] outSizes) throws GandivaException;
/**
* Closes the projector referenced by moduleId.
*
* @param moduleId moduleId that needs to be closed
*/
native void closeProjector(long moduleId);
/**
* Generates the filter module to evaluate the condition expression with
* custom configuration.
*
* @param schemaBuf The schema serialized as a protobuf. See Types.proto
* to see the protobuf specification
* @param conditionBuf The serialized protobuf of the condition expression. Each
* expression is created using TreeBuilder::MakeCondition
* @param configId Configuration to gandiva.
* @return A moduleId that is passed to the evaluateFilter() and closeFilter() methods
*
*/
native long buildFilter(byte[] schemaBuf, byte[] conditionBuf,
long configId) throws GandivaException;
/**
* Evaluate the filter represented by the moduleId on a record batch
* and store the output in buffer 'outAddr'. Throws an exception in case of errors
*
* @param moduleId moduleId representing expressions. Created using a call to
* buildNativeCode
* @param numRows Number of rows in the record batch
* @param bufAddrs An array of memory addresses. Each memory address points to
* a validity vector or a data vector (will add support for offset
* vectors later).
* @param bufSizes An array of buffer sizes. For each memory address in bufAddrs,
* the size of the buffer is present in bufSizes
* @param selectionVectorType type of selection vector
* @param outAddr output buffer, whose type is represented by selectionVectorType
* @param outSize The allocated size of the output buffer. On successful evaluation,
* the result is stored in the output buffer
*/
native int evaluateFilter(long moduleId, int numRows, long[] bufAddrs, long[] bufSizes,
int selectionVectorType,
long outAddr, long outSize) throws GandivaException;
/**
* Closes the filter referenced by moduleId.
*
* @param moduleId moduleId that needs to be closed
*/
native void closeFilter(long moduleId);
}
| [
"noreply@github.com"
] | noreply@github.com |
c177f43b25bc9ac1c0b8308d0ac42139a3ee887a | 6b23d8ae464de075ad006c204bd7e946971b0570 | /WEB-INF/plugin/common/src/jp/groupsession/v2/man/man370/Man370Biz.java | 6fa42e3f6bf9eeca1e1f3b5e0de31b7263080c5c | [] | no_license | kosuke8/gsession | a259c71857ed36811bd8eeac19c456aa8f96c61e | edd22517a22d1fb2c9339fc7f2a52e4122fc1992 | refs/heads/master | 2021-08-20T05:43:09.431268 | 2017-11-28T07:10:08 | 2017-11-28T07:10:08 | 112,293,459 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,109 | java | package jp.groupsession.v2.man.man370;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import jp.co.sjts.util.date.UDate;
import jp.groupsession.v2.cmn.dao.base.CmnLangDao;
import jp.groupsession.v2.cmn.dao.base.CmnUsrLangDao;
import jp.groupsession.v2.cmn.model.RequestModel;
import jp.groupsession.v2.cmn.model.base.CmnLangModel;
import jp.groupsession.v2.cmn.model.base.CmnUsrLangModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* <br>[機 能] メイン 言語変更画面のビジネスロジッククラス
* <br>[解 説]
* <br>[備 考]
*
* @author JTS
*/
public class Man370Biz {
/** Logging インスタンス */
private static Log log__ = LogFactory.getLog(Man370Biz.class);
/**
* <br>[機 能] 初期表示情報を取得する
* <br>[解 説]
* <br>[備 考]
* @param con コネクション
* @param paramMdl パラメータ情報
* @param usrSid ユーザSID
* @throws SQLException SQL実行例外
*/
public void setInitData(Connection con, Man370ParamModel paramMdl, int usrSid)
throws SQLException {
log__.debug("START");
CmnLangDao dao = new CmnLangDao(con);
List<CmnLangModel> mdlList = new ArrayList<CmnLangModel>();
mdlList = dao.select();
paramMdl.setMan370LangList(mdlList);
// cutCoutryの取得
CmnUsrLangModel usrMdl = null;
CmnUsrLangDao usrDao = new CmnUsrLangDao(con);
usrMdl = usrDao.select(usrSid);
if (usrMdl != null) {
paramMdl.setMan370SelectLang(usrMdl.getCulCountry());
}
log__.debug("END");
}
/**
* <br>[機 能] 設定された言語設定情報をDBに保存する。
* <br>[解 説]
* <br>[備 考]
* @param paramMdl パラメータ情報
* @param reqMdl リクエスト情報
* @param usrSid ユーザSID
* @param con コネクション
* @throws SQLException SQL実行エラー
*/
public void setLangSetting(Man370ParamModel paramMdl,
RequestModel reqMdl, int usrSid, Connection con) throws SQLException {
UDate now = new UDate();
CmnUsrLangModel mdl = new CmnUsrLangModel();
boolean commitFlg = false;
try {
CmnUsrLangDao dao = new CmnUsrLangDao(con);
mdl.setUsrSid(usrSid);
mdl.setCulCountry(paramMdl.getMan370SelectLang());
mdl.setCulAuid(usrSid);
mdl.setCulAdate(now);
mdl.setCulEuid(usrSid);
mdl.setCulEdate(now);
if (dao.update(mdl) == 0) {
dao.insert(mdl);
}
con.commit();
commitFlg = true;
} catch (SQLException e) {
log__.error("", e);
throw e;
} finally {
if (!commitFlg) {
con.rollback();
}
}
}
} | [
"PK140601-29@PK140601-29"
] | PK140601-29@PK140601-29 |
51121fedfc64dba4922911f5ecf280388291ad7f | 96982763a7e21e7749926c2a9015825a732bc586 | /Mediabiblioteket/UnitTest/mediabiblioteket/GUI_test.java | 7c3326e5a52b3597bb8a8e1042a09edd0d6a0bcb | [] | no_license | minwuh0811/library | de1229b880f1d30f7369be3f7c0cf1aa5c2fa134 | 66a3a350f6aeb7730bb0622c87640d5ad56526f5 | refs/heads/master | 2021-02-14T00:46:35.208688 | 2020-03-03T22:11:49 | 2020-03-03T22:11:49 | 244,751,804 | 0 | 0 | null | 2020-10-13T20:02:40 | 2020-03-03T22:07:40 | Java | UTF-8 | Java | false | false | 3,198 | java | package mediabiblioteket;
import collections.ArrayList;
import org.junit.Before;
import org.junit.Rule;
import org.junit.jupiter.api.*;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.util.Scanner;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.spy;
public class GUI_test {
LibraryController controller;
ArrayList<Borrower> borrowers = new ArrayList<Borrower>();
GUI gui;
@Test
void loginAll() throws Exception {
Robot rb = new Robot();
Scanner theScanner = new Scanner(new File("C:\\Users\\bishe\\Downloads\\Mediabiblioteket-master\\Mediabiblioteket-master\\Mediabiblioteket\\UnitTest\\mediabiblioteket\\Lantagare.txt"));
while (theScanner.hasNext()) {
String theLine = theScanner.nextLine();
String name = theLine.split(";")[0];
System.out.println(name);
new Thread() {
public void run() {
rb.delay(2000);
for (char s : name.toCharArray()) {
rb.keyPress(KeyPress(s, rb));
rb.keyRelease(KeyPress(s, rb));
}
rb.delay(200);
rb.keyPress(KeyEvent.VK_ENTER);
rb.delay(200);
rb.keyRelease(KeyEvent.VK_ENTER);
rb.delay(200);
rb.mouseMove(1903,15);
rb.delay(200);
rb.mousePress(KeyEvent.BUTTON1_DOWN_MASK);
rb.delay(200);
rb.mouseRelease(KeyEvent.BUTTON1_DOWN_MASK);
rb.delay(200);
}
}.start();
gui = new GUI();
controller = new LibraryController(gui);
}
}
/*private static void pressKeys(Robot r,int[] ks,int delay){
int length=len()
for(int i=0; i
r.keyPress(ks[i]);
r.delay(10);
r.keyRelease(ks[i]);
r.delay(delay);
}
}*/
public int KeyPress(char s, Robot r){
if (s=='0'){
return KeyEvent.VK_0;
} else if(s=='1'){
return KeyEvent.VK_1;
} else if (s=='2'){
return KeyEvent.VK_2;
} else if (s=='3'){
return KeyEvent.VK_3;
} else if (s=='4'){
return KeyEvent.VK_4;
} else if (s=='5'){
return KeyEvent.VK_5;
} else if (s=='6'){
return KeyEvent.VK_6;
}else if (s=='7'){
return KeyEvent.VK_7;
} else if (s=='8'){
return KeyEvent.VK_8;
} else if (s=='9'){
return KeyEvent.VK_9;
} else {
return KeyEvent.VK_MINUS;
}
}
}
| [
"minwuh081@gmail.com"
] | minwuh081@gmail.com |
564eabab7cd5824bef2a1c17041136e367c900a9 | 9ddcc4ef950c1550b9fd2b1d1fad9357c8c7d301 | /app/src/main/java/me/myweather/app/tool/CityNameCodeTool.java | 3995f88f284cd59d8f4e5ab7c7cc9401fedb491b | [] | no_license | fusionchen/MyWeather | fb709a4e427a6c74a6d648d51a14e3f40111dafa | 3d764abf8bdaf39b94bc8a9231bf86db85ae061e | refs/heads/master | 2020-03-16T10:38:23.469059 | 2017-08-25T11:25:17 | 2017-08-25T11:25:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,400 | java | package me.myweather.app.tool;
import android.content.Context;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import me.myweather.app.R;
/**
* Created by admin on 2017/8/14.
*/
public class CityNameCodeTool {
public static HashMap<String, String> codeMaps;
public static HashMap<String, String> nameMaps;
public static ArrayList<String> names;
public static void init(Context context) {
codeMaps = new HashMap<>();
nameMaps = new HashMap<>();
names = new ArrayList<>();
try {
InputStream inputStream = context.getResources().openRawResource(R.raw.city_codes);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
String line = null;
while((line = bufferedReader.readLine()) != null) {
line = line.replace("/uFEFF", "");
String[] strings = line.split("\t");
nameMaps.put(strings[0], strings[1]);
codeMaps.put(strings[1], strings[0]);
names.add(strings[0]);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public static String name2code(String name) {
return nameMaps.get(name);
}
public static String code2name(String code) {
return codeMaps.get(code);
}
public static ArrayList<String> findCity(String keyword) {
if(keyword == null || keyword.equals(""))
return new ArrayList<>();
ArrayList<String> results = new ArrayList<>();
for(String name : names) {
if(name.contains(keyword))
results.add(name);
}
return results;
}
public static ArrayList<String> getNames() {
return names;
}
public static void putCity(String cityname, String citycode) {
for(String name : names) {
if(name.equals(cityname))
return;
}
names.add(cityname);
codeMaps.put(citycode, cityname);
nameMaps.put(cityname, citycode);
}
}
| [
"guyu@imudges.com"
] | guyu@imudges.com |
51015fd18e7a1f172ca77a04eebed3cedf7e6610 | b319d4527bbfbafff1b6e47c30c79cae24b5d1ba | /revenueapp-Shashank/src/main/java/com/capgemini/go/ServletInitializer.java | a20c5dc6f985fae7202d90df7fa163729631bf9a | [] | no_license | mshashank444/Admin-Report | 14008a58186187890da3f8c288bab9eac542b31b | e2af2a41849617b8553609f30bc9ae620545bf5a | refs/heads/master | 2022-07-26T12:10:37.318470 | 2020-05-12T13:50:26 | 2020-05-12T13:50:26 | 261,691,616 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 417 | java | package com.capgemini.go;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(RevenueManagementApplication.class);
}
}
| [
"64268464+mshashank444@users.noreply.github.com"
] | 64268464+mshashank444@users.noreply.github.com |
4f7a0fdf84778399cb15dcd36f697fcdc700d9d3 | e255ebc741c2b40e4a50046ed99c667e88104565 | /una/lista01/src/main/java/com/mycompany/lista01/Questao24.java | bc524925dd3fa370f19c3a9d7f401be0baa07b58 | [] | no_license | luispmaraujo/java | 5f798f0892dbed042527337ce89cf0314d822896 | 5ec6792e6b7ec2f2df507d8d8c2cc50a3670deb8 | refs/heads/main | 2023-04-16T11:26:43.546009 | 2021-04-29T22:38:58 | 2021-04-29T22:38:58 | 362,947,723 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 792 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.mycompany.lista01;
import java.util.Scanner;
/**
*
* @author Luís Paulo Maia de Araújo
*/
public class Questao24 {
public static void main(String[] args) {
Scanner ler = new Scanner(System.in);
double a, d, r = 0.00;
{
System.out.println("Insira o valor do diâmetro do círculo: ");
d = ler.nextDouble();
ler.close();
}
{
r = d / 2;
a = Math.PI * (Math.pow(r, 2));
}
System.out.println("A área do círculo é:" + a);
}
}
| [
"luispmaraujo@outlook.com"
] | luispmaraujo@outlook.com |
6ecdd36023f6fd7218832e10e1c79ec83ce6c4f5 | 9e5f76817365737dfb3be90beb759f113b2e66b9 | /plugin-api/src/main/java/com/salesforce/pyplyn/client/UnauthorizedException.java | 7a7e9589d8868b3de1dd620a2a4ba005768e9819 | [] | permissive | salesforce/pyplyn | b7eeb9685b4ebe7d5e42a3d36df39452a9b855a5 | e70aab598245766642328bb4923f756603e8f39e | refs/heads/master | 2023-08-29T01:45:38.624393 | 2022-02-12T14:33:29 | 2022-02-12T14:33:29 | 79,246,257 | 17 | 6 | BSD-3-Clause | 2020-09-01T02:27:36 | 2017-01-17T16:17:47 | Java | UTF-8 | Java | false | false | 671 | java | /*
* Copyright (c) 2016-2017, Salesforce.com, Inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see the LICENSE.txt file in repo root
* or https://opensource.org/licenses/BSD-3-Clause
*/
package com.salesforce.pyplyn.client;
/**
* Exception thrown when a remote operation fails due to the endpoint not being correctly authenticated
*
* @author Mihai Bojin <mbojin@salesforce.com>
* @since 3.0
*/
public class UnauthorizedException extends Exception {
static final long serialVersionUID = -4327511993224269948L;
public UnauthorizedException(String message) {
super(message);
}
}
| [
"mbojin@salesforce.com"
] | mbojin@salesforce.com |
cb5bbc3642263e33ce3edbd0afbd949d53ac610f | 5204cfed1042815c9966b24001a5ed5fd655af72 | /src/main/java/com/raul/bootcam2/error/ValidateException.java | baf99d43273d2f73153f5717ea2e2764b9ba464b | [] | no_license | rortizpe/bootcam2 | b1c19ce98f0abe5eb39296dd47ca8caad1a74d9d | 771852219f5bd6753bf75b12f8e4fec0fa8bec75 | refs/heads/master | 2020-05-18T02:48:45.506346 | 2019-04-29T18:56:57 | 2019-04-29T18:56:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 262 | java | package com.raul.bootcam2.error;
import java.util.List;
import lombok.Getter;
@Getter
public class ValidateException extends RuntimeException {
private List<String> errMsg;
public ValidateException(List<String> errMsg) {
this.errMsg = errMsg;
}
}
| [
"rortizpe@everis.com"
] | rortizpe@everis.com |
ce9c3c3519780d0feccad8c359be780f439be2e0 | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-drs/src/main/java/com/amazonaws/services/drs/model/transform/DeleteSourceServerRequestProtocolMarshaller.java | 06a7ff5fd01fc77d16dd308d8323dadb71eaf602 | [
"Apache-2.0"
] | permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 2,670 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.drs.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.drs.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.protocol.*;
import com.amazonaws.protocol.Protocol;
import com.amazonaws.annotation.SdkInternalApi;
/**
* DeleteSourceServerRequest Marshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class DeleteSourceServerRequestProtocolMarshaller implements Marshaller<Request<DeleteSourceServerRequest>, DeleteSourceServerRequest> {
private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.REST_JSON).requestUri("/DeleteSourceServer")
.httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true).serviceName("AWSdrs").build();
private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory;
public DeleteSourceServerRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) {
this.protocolFactory = protocolFactory;
}
public Request<DeleteSourceServerRequest> marshall(DeleteSourceServerRequest deleteSourceServerRequest) {
if (deleteSourceServerRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
final ProtocolRequestMarshaller<DeleteSourceServerRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING,
deleteSourceServerRequest);
protocolMarshaller.startMarshalling();
DeleteSourceServerRequestMarshaller.getInstance().marshall(deleteSourceServerRequest, protocolMarshaller);
return protocolMarshaller.finishMarshalling();
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| [
""
] | |
a27a4356d8d29103418cbd0fd998c8916932d382 | 863ec7ba09533b5b96d8479111c5d0998a894a12 | /FOS/src/main/java/haitai/fos/sys/service/CCustomerSiteService.java | 349a1f3557d8c9744978a6f1262d8b75328e7484 | [] | no_license | golden-hu/fos3 | 1e45ad414f07dd9319f09b67f00ba2aae50bbd22 | 279bb9d1c310288d2a0bb50900c6210520f9cae4 | refs/heads/master | 2020-12-04T13:02:26.380938 | 2016-08-19T05:15:00 | 2016-08-19T05:15:00 | 66,040,700 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 775 | java | package haitai.fos.sys.service;
import haitai.fos.sys.entity.idao.ICCustomerSiteDAO;
import haitai.fos.sys.entity.table.CCustomerSite;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@Service
public class CCustomerSiteService {
@Autowired
private ICCustomerSiteDAO dao;
@Transactional
public List<CCustomerSite> save(List<CCustomerSite> itemList) {
return dao.saveByRowAction(itemList);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Transactional(readOnly = true)
public List<CCustomerSite> query(Map queryMap) {
return dao.findByProperties(queryMap);
}
}
| [
"zhouxu.huang@gmail.com"
] | zhouxu.huang@gmail.com |
ae313afbd3de39c9df2519edba7ec290f2115c1b | 66af579a49cad398b79ec353bec40b951361fd4b | /.svn/pristine/f4/f40be37fec29f69daed56f8cb873afd2026b51e7.svn-base | 85e32031cd71ce426db90369168437bbf6fa2fc5 | [] | no_license | kennedyzt/haiyuehui | a075be8aab547bc52a9551d81ab76e8426283094 | 2275c1e6323790f5c6257c0e16d74f1a74166b46 | refs/heads/master | 2020-12-25T09:47:56.599050 | 2016-06-01T01:56:06 | 2016-06-01T01:56:06 | 60,136,790 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,325 | package com.siping.smartone.inventory.response;
import java.io.Serializable;
public class GetInventoryWarningResponse implements Serializable {
private static final long serialVersionUID = -7873872886922371549L;
private String id;
private String materialId;
private String storageId;
private String storageName;
private String storageNo;
private String maxInventory;
private String minInventory;
private String createTime;
private String createBy;
private String updateTime;
private String updateBy;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMaterialId() {
return materialId;
}
public void setMaterialId(String materialId) {
this.materialId = materialId;
}
public String getStorageId() {
return storageId;
}
public void setStorageId(String storageId) {
this.storageId = storageId;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getMaxInventory() {
return maxInventory;
}
public void setMaxInventory(String maxInventory) {
this.maxInventory = maxInventory;
}
public String getMinInventory() {
return minInventory;
}
public void setMinInventory(String minInventory) {
this.minInventory = minInventory;
}
public String getStorageName() {
return storageName;
}
public void setStorageName(String storageName) {
this.storageName = storageName;
}
public String getStorageNo() {
return storageNo;
}
public void setStorageNo(String storageNo) {
this.storageNo = storageNo;
}
}
| [
"863468390@qq.com"
] | 863468390@qq.com | |
f2fcbbdc25b6beb694845a24a493dbd7afce36d2 | 1be40add831ddff8a0ea5fea52de4e665319a783 | /src/main/java/org/anson/mis/dao/secure/RoleDao.java | 42fa66e7d33f6e0eef1c91444ac164ae8db7cd46 | [] | no_license | onlineBear/mis | 826c76f7a5a92f2d1f50b668ac9455e5abc8544f | a0565e87afbb50e8fc94738f2c4da5d3a054c351 | refs/heads/master | 2020-03-31T12:48:07.981783 | 2018-10-15T08:39:36 | 2018-10-15T08:39:36 | 150,528,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 202 | java | package org.anson.mis.dao.secure;
import org.anson.mis.entity.secure.Role;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RoleDao extends JpaRepository<Role, Long> {
}
| [
"302824893@qq.com"
] | 302824893@qq.com |
2a266fd69b6aa229e6f88e6986872ebb19116f3c | 3215209b80b2c57d744abea0e0a9f9b9bedf8c5d | /src/main/java/software/reinvent/commons/log/Slf4jTypeListener.java | 0444a7389de70c9edc3f83a954f863ff6b961bcd | [
"MIT"
] | permissive | ldaume/commons | f367b09a29cb79b86aed88773ffd16e8b02dc12f | 489b0a2889e8a6e0697c41063e4917605941e7ee | refs/heads/master | 2021-01-12T00:06:23.750555 | 2018-05-21T17:59:02 | 2018-05-21T17:59:02 | 78,673,794 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 784 | java | package software.reinvent.commons.log;
import com.google.inject.TypeLiteral;
import com.google.inject.spi.TypeEncounter;
import com.google.inject.spi.TypeListener;
import org.slf4j.Logger;
import java.lang.reflect.Field;
/**
* Created on 11.01.2017.
*
* @author <a href="mailto:lenny@reinvent.software">Leonard Daume</a>
*/
public class Slf4jTypeListener implements TypeListener {
public <I> void hear(TypeLiteral<I> aTypeLiteral, TypeEncounter<I> aTypeEncounter) {
for (Field field : aTypeLiteral.getRawType().getDeclaredFields()) {
if (field.getType() == Logger.class
&& field.isAnnotationPresent(InjectLogger.class)) {
aTypeEncounter.register(new Slf4jMembersInjector<>(field));
}
}
}
} | [
"lenny@reinvent.software"
] | lenny@reinvent.software |
de23bd9fd1ad06b0903f8d4e27225ee41ac9d4ec | 855c47964be5106507751a7d6bc7aecea38208bc | /module4/00_test_final/00_test_final/test-final/src/main/java/com/codegym/validator/GiaoDichValidator.java | a868a306704401fd70c03be9550f3e1b711fa832 | [] | no_license | theanh2010/C0920G1-TuongTheAnh | a1c48dd6a44ea0fba1a6f8d65b69874c3cc31d1d | 155f5797dbcc6042755d87e2ccb775ab104ae977 | refs/heads/master | 2023-05-01T13:47:09.562801 | 2021-05-22T16:02:26 | 2021-05-22T16:02:26 | 295,308,054 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,228 | java | package com.codegym.validator;
import com.codegym.entity.GiaoDich;
import com.codegym.entity.KhachHang;
import com.codegym.service.GiaoDichService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import java.time.LocalDate;
import java.util.regex.Pattern;
@Component
public class GiaoDichValidator implements Validator {
@Autowired
GiaoDichService giaoDichService;
@Override
public boolean supports(Class<?> clazz) {
return false;
}
@Override
public void validate(Object target, Errors errors) {
GiaoDich giaoDich = (GiaoDich) target;
LocalDate ngayHienTai = LocalDate.now();
if (giaoDichService.findById(giaoDich.getId()) != null) {
errors.rejectValue("id", "id.duplicate");
}
if (giaoDich.getKhachHang() == null) {
errors.rejectValue("khachHang", "khach-hang.format");
}
try {
if (giaoDich.getLoaiDichVu() == null) {
errors.rejectValue("loaiDichVu", "loai-dich-vu.format");
}
} catch (Exception e) {
}
try {
LocalDate ngayGiaodich = LocalDate.parse(giaoDich.getNgayGiaoDich());
if (ngayHienTai.compareTo(ngayGiaodich) >= 0) {
errors.rejectValue("ngayGiaoDich", "ngay-giao-dich.format");
}
} catch (Exception e) {
errors.rejectValue("ngayGiaoDich", "ngay-giao-dich.format");
}
if (!Pattern.compile("^MGD-\\d{4}$").matcher(giaoDich.getId()).find()) {
errors.rejectValue("id", "id.format");
}
if (giaoDich.getDonGia() == null) {
errors.rejectValue("donGia", "don-gia.format");
} else if (giaoDich.getDonGia() < 500000) {
errors.rejectValue("donGia", "don-gia.format");
}
if (giaoDich.getDienTich() == null) {
errors.rejectValue("dienTich", "dien-tich.format");
} else if (giaoDich.getDienTich() < 20) {
errors.rejectValue("dienTich", "dien-tich.format");
}
}
}
| [
"tuongtheanh20101997@gmail.com"
] | tuongtheanh20101997@gmail.com |
d4599d2a1aa9049ba8044281b1a8cead776a4b37 | 4a05fe1b7ef3c212406d838ef224934bb7800576 | /demo09_sse/src/SSEServlet.java | 23c5a03df4589e184f26a4ac80ff2485a6d7accc | [] | no_license | iop125/SpringBootDemo | 1f566b684375575b88c8f618b6aa46e08f1f487f | 5fda36acf00dee359473cfc3f54b934a19600931 | refs/heads/master | 2022-11-24T13:21:08.114090 | 2020-07-17T06:14:17 | 2020-07-17T06:14:17 | 278,108,727 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 971 | java | import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.concurrent.TimeUnit;
@WebServlet(value = "sseServlet")
public class SSEServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("text/event-stream");
resp.setCharacterEncoding("utf-8");
PrintWriter out = resp.getWriter();
int i = 0;
while (i < 10) {
out.println("data:" + i + "\n");
out.flush();
i++;
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
out.println();
}
}
| [
"miaoyu1@jd.com"
] | miaoyu1@jd.com |
07d9855768bd32b6cc7a77a57257f9fb6bc6a7c7 | 3ab144017d4cbc7feb79378e3e5ca0bc9255f304 | /hoomin/microservices/product-service/src/test/java/com/hoomin/microservices/core/product/ProductServiceApplicationTests.java | 8065e83ac7a7d643e2822748c9c588288d952b5e | [] | no_license | lhm7877/MSA | d41e3d0091b19d97b2aaab17ea8fbddac40d80ad | 93f5d1ece5a2515dea5a250aa9f3fc7545c96cd8 | refs/heads/master | 2023-05-06T19:37:55.045557 | 2021-06-03T08:51:55 | 2021-06-03T08:51:55 | 331,488,721 | 0 | 1 | null | 2021-06-03T08:51:55 | 2021-01-21T02:13:42 | Java | UTF-8 | Java | false | false | 246 | java | package com.hoomin.microservices.core.product;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ProductServiceApplicationTests {
@Test
void contextLoads() {
}
}
| [
"lhm7877@gmail.com"
] | lhm7877@gmail.com |
d1843103ea56e3adaefe0bf22c112a37200e2187 | 16d3bb0e276b7e75344e696a2c13ebc1f4ef5ee4 | /src/main/java/com/codegym/service/impl/DepartmentServiceImpl.java | e8ce4533863b5370c976c0cedd81dfc4eabcdb02 | [] | no_license | hungnv0902/springmvc-webservice-baikiemtra | 12c9fb99281a41c33f87c8b80f57783508bf42ba | 7bb73c763e1db6782b751cbf641f6c8ade39e21d | refs/heads/master | 2020-06-26T20:23:16.135340 | 2019-07-31T00:29:02 | 2019-07-31T00:29:02 | 199,747,406 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,044 | java | package com.codegym.service.impl;
import com.codegym.model.Department;
import com.codegym.repository.DepartmentRepository;
import com.codegym.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public class DepartmentServiceImpl implements DepartmentService {
@Autowired
private DepartmentRepository departmentRepository;
@Override
public Page<Department> findAll(Pageable pageable) {
return departmentRepository.findAll(pageable);
}
@Override
public Department findById(Long id) {
return departmentRepository.findOne(id);
}
@Override
public void save(Department department) {
departmentRepository.save(department);
}
@Override
public void remove(Long id) {
departmentRepository.delete(id);
}
@Override
public Department findByName(String name) {
return departmentRepository.findByName(name);
}
}
| [
"hungnv0902@gmail.com"
] | hungnv0902@gmail.com |
ea7306b99a80da7771a827f63e07b879ea166266 | 72369f4dd8e9f929cf4ca3f4b30e2423786a27ea | /src/main/java/com/cursodsousa/libraryapi/service/LoanService.java | d833516e5a4d7b166dfe411c84fcf9e046eea290 | [] | no_license | JadsonFeitosa/Livraria-API | 5d61f814a69224f8464e0dbc090a0018a8cf12cb | bd3de858d18eb7036e9f718b6d40aef933e02423 | refs/heads/main | 2023-06-14T09:05:53.134528 | 2021-06-24T02:08:14 | 2021-06-24T02:08:14 | 362,552,447 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 738 | java | package com.cursodsousa.libraryapi.service;
import com.cursodsousa.libraryapi.api.dto.LoanFilterDTO;
import com.cursodsousa.libraryapi.api.resource.BookController;
import com.cursodsousa.libraryapi.model.entity.Book;
import com.cursodsousa.libraryapi.model.entity.Loan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Optional;
public interface LoanService {
Loan save( Loan loan );
Optional<Loan> getById(Long id);
Loan update(Loan loan);
Page<Loan> find(LoanFilterDTO filterDTO, Pageable pageable);
Page<Loan> getLoansByBook( Book book, Pageable pageable);
List<Loan> getAllLateLoans();
}
| [
"noreply@github.com"
] | noreply@github.com |
69a9e81cff048c879f9b63b5bf891efaf42b5133 | e8828b90df1b3f7418bf78d96658ea40bec8822f | /app/src/main/java/com/bhukkad/eatit/CatUpload.java | 9cd9a207866df8547b951e7aa3d2f89a58cf50d7 | [] | no_license | progrppro/EatIT | b2a3ca5b249f7f1accf09cefbeb5cb91bc75477c | 4ab6b0337cd861eea1c18ed368edd292e7e958f6 | refs/heads/master | 2020-03-24T07:26:56.232088 | 2018-10-12T13:35:28 | 2018-10-12T13:35:28 | 142,564,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 840 | java | package com.bhukkad.eatit;
import android.net.Uri;
public class CatUpload {
private String dish,price,imageuri,description;
public CatUpload(){
}
public CatUpload(String dish,String price,String imageuri,String description){
if(dish.trim().equals(""))
dish = "No Name";
if(price.trim().equals(""))
price = "0";
if(description.trim().equals(""))
description = "";
this.dish = dish ;
this.imageuri = imageuri;
this.description = description;
this.price = price;
}
public String getDescription() {
return description;
}
public String getImageuri() {
return imageuri;
}
public String getPrice() {
return price;
}
public String getDish() {
return dish;
}
}
| [
"progrppro@gmail.com"
] | progrppro@gmail.com |
0448ceb8bacb7d40c36e3bdea67ec8f67f45d83f | 74dd63d7d113e2ff3a41d7bb4fc597f70776a9d9 | /timss-purchase/src/main/java/com/timss/purchase/flow/swf/purapply/v001/ItFinmanagerAudit.java | 03dd6316605a0b6454f43a647bd8fde9be1f8009 | [] | no_license | gspandy/timssBusiSrc | 989c7510311d59ec7c9a2bab3b04f5303150d005 | a5d37a397460a7860cc221421c5f6e31b48cac0f | refs/heads/master | 2023-08-14T02:14:21.232317 | 2017-02-16T07:18:21 | 2017-02-16T07:18:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 764 | java | package com.timss.purchase.flow.swf.purapply.v001;
import org.springframework.beans.factory.annotation.Autowired;
import com.timss.purchase.flow.abstr.DefApplyProcess;
import com.yudean.workflow.service.WorkflowService;
import com.yudean.workflow.task.TaskInfo;
/**
* @title: ItFinmanagerAudit工作流控制类
* @description:
* @company: gdyd
* @className: ItFinmanagerAudit.java
* @author: 890162
* @createDate: 2015-9-22
* @updateUser: yuanzh
* @version: 1.0
*/
public class ItFinmanagerAudit extends DefApplyProcess {
@Autowired
private WorkflowService workflowService;
@Override
public void init(TaskInfo taskInfo) {
super.init(taskInfo);
workflowService.setVariable(taskInfo.getProcessInstanceId(), "isLastStep", false);
}
}
| [
"londalonda@qq.com"
] | londalonda@qq.com |
3acda4a5fb99f2b182e52c1522bf29fb8efe7183 | e01e9a4517463f34ebb822c35cdb312d6ad7ecb4 | /services/staging/src/main/java/com/composum/sling/platform/staging/query/QueryValueMap.java | 843cf4fff866e1bc8be3f7f861b58fd6fa4b533e | [
"MIT"
] | permissive | ist-dresden/composum-platform | a3af917f8a6fbcd7e1d5b3eab63358fef3af85b9 | e225934b0fc8c6c30511479eafcad7f73d851c84 | refs/heads/develop | 2023-04-08T12:17:16.010200 | 2023-03-23T14:56:46 | 2023-03-23T14:56:46 | 99,404,867 | 5 | 0 | MIT | 2023-03-22T15:38:03 | 2017-08-05T06:46:24 | Java | UTF-8 | Java | false | false | 809 | java | package com.composum.sling.platform.staging.query;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ValueMap;
import java.util.Map;
/**
* Encapsulates the result of a query for specific properties and pseudo-properties. This contains only the queried
* subset of properties of the queried resource. The {@link Map} functionality gives the entries with their default Java
* types.
*
* @see Query#selectAndExecute(String...)
*/
public interface QueryValueMap extends Map<String, Object>, ValueMap {
/** Returns the found resource the values are from. Could be null in case of right outer join. */
Resource getResource();
/** In case of a join, returns the found resource for the given join selector. */
Resource getJoinResource(String selector);
}
| [
"hp.stoerr@ist-software.com"
] | hp.stoerr@ist-software.com |
13aa2bd113149404ced6e4751f452b5845948024 | d8772960b3b2b07dddc8a77595397cb2618ec7b0 | /rhServer/src/main/java/com/rhlinkcon/model/StatusAdiantamentoEnum.java | d8ee964b70fec00f36aba16b6309812d6d841252 | [] | no_license | vctrmarques/interno-rh-sistema | c0f49a17923b5cdfaeb148c6f6da48236055cf29 | 7a7a5d9c36c50ec967cb40a347ec0ad3744d896e | refs/heads/main | 2023-03-17T02:07:10.089496 | 2021-03-12T19:06:05 | 2021-03-12T19:06:05 | 347,168,924 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 511 | java | package com.rhlinkcon.model;
import java.util.Objects;
public enum StatusAdiantamentoEnum {
ATIVO("Ativo"), INATIVO("Inativo");
private String label;
private StatusAdiantamentoEnum(String label) {
this.label = label;
}
public String getLabel() {
return label;
}
public static StatusAdiantamentoEnum getEnumByString(String str) {
for (StatusAdiantamentoEnum e : StatusAdiantamentoEnum.values()) {
if (!Objects.isNull(str) && str.equals(e.getLabel()))
return e;
}
return null;
}
}
| [
"vctmarques@gmail.com"
] | vctmarques@gmail.com |
e6b42becad6139352d312b2c667e25bd0a817353 | 6dac76f33cfbd45bd44b74ed322dd9b6ee7cb2b4 | /src/main/java/com/datangliang/app/web/rest/vm/ManagedUserVM.java | 51167df664cbc7ae09d5c4fe0bb8c23ab28f06d2 | [] | no_license | ouyangshixiong/dtl-app-mock | 2ebb4755b7d03330838462918a49be099f662ec3 | f90e6621411d24f7d15064801a7396bc4cb43124 | refs/heads/master | 2021-07-01T06:37:35.956464 | 2019-01-15T06:50:59 | 2019-01-15T06:50:59 | 165,581,779 | 0 | 1 | null | 2020-09-18T10:53:42 | 2019-01-14T02:25:15 | Java | UTF-8 | Java | false | false | 844 | java | package com.datangliang.app.web.rest.vm;
import com.datangliang.app.service.dto.UserDTO;
import javax.validation.constraints.Size;
/**
* View Model extending the UserDTO, which is meant to be used in the user management UI.
*/
public class ManagedUserVM extends UserDTO {
public static final int PASSWORD_MIN_LENGTH = 4;
public static final int PASSWORD_MAX_LENGTH = 100;
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
public ManagedUserVM() {
// Empty constructor needed for Jackson.
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "ManagedUserVM{" +
"} " + super.toString();
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
5d99e1729ad0c5d62b3da2057502590d1cf54857 | cdd17adf0bbc18d25da3182073cda97332e59000 | /Publish/src/main/Project.java | 6415fbd97170e0851f2acd0f12cc81e347ef6d2a | [] | no_license | endend20000/Publish | e519ce8bfeed60151ab8e9b197c8093388575cd9 | 369156bd143d62805d5db0b40f44abbd64f7b174 | refs/heads/master | 2021-01-11T16:02:18.772035 | 2017-01-25T06:56:52 | 2017-01-25T06:56:52 | 79,990,087 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,183 | java | package main;
import javax.swing.JButton;
public class Project {
private String projectName;
private String projectSource;
private String projectTarget;
private String projectLocalTarget;
public String getProjectLocalTarget() {
return projectLocalTarget;
}
public void setProjectLocalTarget(String projectLocalTarget) {
this.projectLocalTarget = projectLocalTarget;
}
private String[] projectShell;
private JButton button;
public JButton getButton() {
return button;
}
public void setButton(JButton button) {
this.button = button;
}
public String getProjectName() {
return projectName;
}
public String[] getProjectShell() {
return projectShell;
}
public String getProjectSource() {
return projectSource;
}
public String getProjectTarget() {
return projectTarget;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public void setProjectShell(String[] projectShell) {
this.projectShell = projectShell;
}
public void setProjectSource(String projectSource) {
this.projectSource = projectSource;
}
public void setProjectTarget(String projectTarget) {
this.projectTarget = projectTarget;
}
}
| [
"geZhangYuan@geZhangYuan-PC"
] | geZhangYuan@geZhangYuan-PC |
9dfeea59ca3fb49ab643445655f9821934b5890b | bc9cc260f44b36724c0a79750099e85b65fe432b | /RogueKill/test/core/src/rogueTeam_game/Score.java | ab8ac96b5a634aad9441009d013604975c177a90 | [] | no_license | SimonCris/RogueKill | 68735172e0b1c5502ffda7822d578ab86e091de3 | 5c6156eb73cb0b8c0f6cb8896f6bde580938bc7f | refs/heads/master | 2020-03-18T12:05:36.127901 | 2018-05-24T11:55:56 | 2018-05-24T11:55:56 | 134,708,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,983 | java | package rogueTeam_game;
import java.math.BigDecimal;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42SecurityException;
import com.shephertz.app42.paas.sdk.java.ServiceAPI;
import com.shephertz.app42.paas.sdk.java.game.ScoreBoardService;
public class Score {
private static String gameName = "RougueKill"; // il nome del gioco
private static String userName; // nome giocatore
private static Integer gameScore; // punteggio
public Score(String user, int gameScore) { // costruttore
Score.userName = user;
Score.gameScore = gameScore;
}
public static void createUser() {
// Inserisco la Public Key e la Private Key di APP42
ServiceAPI sp = new ServiceAPI("a5ef2e51f40fb63d987de101a3bdd8573b8cd786cacb59e55916002f58dd80b6",
"65f8f2af4a15b03a52f174f634826ca5089dc23cc36d2c7d7eab39d9bb821d4d");
// Creo un' istanza di User Service
ScoreBoardService scoreBoardService = sp.buildScoreBoardService();
// Creo un'utente o restituisco un'eccezione
try {
scoreBoardService.getTopNRankers("RougueKill", 100);
scoreBoardService.saveUserScore(gameName, userName, new BigDecimal(gameScore));
} catch (App42BadParameterException ex) {
System.out.println("App42BadParameterException ");
// Exception Caught
// Check if User already Exist by checking app error code
if (ex.getAppErrorCode() == 2001) {
// Do exception Handling for Already created User.
System.out.println(" User already exist with given user name");
}
} catch (App42SecurityException ex) {
System.out.println("App42SecurityException ");
// Exception Caught
// Check for authorization Error due to invalid Public/Private Key
if (ex.getAppErrorCode() == 1401) {
// Do exception Handling here
}
} catch (App42Exception ex) {
System.out.println("App42Exception ");
// Exception Caught due to other Validation
}
}
} | [
"xblack90@hotmail.it"
] | xblack90@hotmail.it |
5541f55b7395b19385abfc2bfe46923b9e9e8161 | 7016cec54fb7140fd93ed805514b74201f721ccd | /ui/web/cms/src/java/com/echothree/ui/web/cms/persistence/CmsCacheBean.java | bf63f2e49c276bf03b79545d9de2884ea0b9f285 | [
"MIT",
"Apache-1.1",
"Apache-2.0"
] | permissive | echothreellc/echothree | 62fa6e88ef6449406d3035de7642ed92ffb2831b | bfe6152b1a40075ec65af0880dda135350a50eaf | refs/heads/master | 2023-09-01T08:58:01.429249 | 2023-08-21T11:44:08 | 2023-08-21T11:44:08 | 154,900,256 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,116 | java | // --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.ui.web.cms.persistence;
import org.infinispan.Cache;
import javax.annotation.Resource;
import javax.ejb.Singleton;
@Singleton
public class CmsCacheBean {
@Resource(lookup = "java:app/infinispan/echothree/cms")
Cache<String, Object> cache;
public Cache<String, Object> getCache() {
return cache;
}
}
| [
"rich@echothree.com"
] | rich@echothree.com |
2fef5e7cc340895a64b3ee1a88790806c1dd6405 | 6ef6c8e8f069e6359fd6751455715f7649c291c5 | /Air.java | 920e41fc25c8adb7d8eb36cb8168d875576552ae | [] | no_license | jhleung/StreetFighter | 7d05727d4cff768f141612bdd3de7d9b284ab573 | 8dcaed94ad8b3ba283469b0ad8018194bee8d99e | refs/heads/master | 2021-03-22T04:31:51.294396 | 2016-11-14T02:45:58 | 2016-11-14T02:45:58 | 73,659,978 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,420 | java |
/* Andrew Palet, Jeffrey Leung
* 2
* Gallatin
* Player1CharacterSelectionMenu
*/
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.Timer;
/**
*Provides getters for all of Air's images so that other classes have access to them
*/
public class Air extends ElementalCharacter
{ public final Image defaultImg1 = new ImageIcon(this.getClass().getResource("Default_Air.png")).getImage();
public final Image defaultImg2 = new ImageIcon(this.getClass().getResource("Default_Air_Player2.png")).getImage();
public final Image jump1 = new ImageIcon(this.getClass().getResource("Jump_Air.png")).getImage();
public final Image jump2 = new ImageIcon(this.getClass().getResource("Jump_Air_Player2.png")).getImage();
public final Image duck1 = new ImageIcon(this.getClass().getResource("Duck_Air.png")).getImage();
public final Image duck2 = new ImageIcon(this.getClass().getResource("Duck_Air_Player2.png")).getImage();
public final Image punchP11 = new ImageIcon(this.getClass().getResource("Punch1_Air.png")).getImage();
public final Image punchP12 = new ImageIcon(this.getClass().getResource("Punch2_Air.png")).getImage();
public final Image punchP21 = new ImageIcon(this.getClass().getResource("Punch1_Air_Player2.png")).getImage();
public final Image punchP22 = new ImageIcon(this.getClass().getResource("Punch2_Air_Player2.png")).getImage();
public final Image walkB1 = new ImageIcon(this.getClass().getResource("Walk1_Air.png")).getImage();
public final Image walkF1 = new ImageIcon(this.getClass().getResource("Walk2_Air.png")).getImage();
public final Image walkB2 = new ImageIcon(this.getClass().getResource("Walk1_Air_Player2.png")).getImage();
public final Image walkF2 = new ImageIcon(this.getClass().getResource("Walk2_Air_Player2.png")).getImage();
public final Image fall1 = new ImageIcon(this.getClass().getResource("Fall1_Air.png")).getImage();
public final Image fall1P2 = new ImageIcon(this.getClass().getResource("Fall1_Air_Player2.png")).getImage();
public final Image fall2 = new ImageIcon(this.getClass().getResource("Fall2_Air.png")).getImage();
public final Image fall2P2 = new ImageIcon(this.getClass().getResource("Fall2_Air_Player2.png")).getImage();
public final Image fall3 = new ImageIcon(this.getClass().getResource("Fall3_Air.png")).getImage();
public final Image fall3P2 = new ImageIcon(this.getClass().getResource("Fall3_Air_Player2.png")).getImage();
public final Image kick1 = new ImageIcon(this.getClass().getResource("Kick_Air.png")).getImage();
public final Image kick2 = new ImageIcon(this.getClass().getResource("Kick_Air_Player2.png")).getImage();
public final Image blast = new ImageIcon(this.getClass().getResource("Air_Blast.png")).getImage();
public final Image blast2 = new ImageIcon(this.getClass().getResource("Air_Blast.png")).getImage();
public final Image tornado = new ImageIcon(this.getClass().getResource("Tornado.png")).getImage();
public static Image characterImg;
public static int x,y;
private Timer timer;
public static ElementalCharacter ec;
/**
*draws character facing left or right based on what player it is, 1 or 2
*player1 faces right, player2 faces left, o be instantiated in demoscene
*@param xCoord the xcoordinate
*@param yCoord the ycoordinate
*@param img the image of the character
*@param e the other player's elemental character
*@param orientationLeft false whether it is facing left,true if facing right
*/
public Air(int xCoord, int yCoord,Image img, ElementalCharacter e, boolean orientationLeft)
{
super(xCoord,yCoord,e,img);
if (orientationLeft)
{
characterImg = defaultImg1;
}
else
characterImg = defaultImg2;
// timer = new Timer(50,new TimerAction());
}
/**
*Sets the opposing player's element
*@param c the opposing player's element
*/
public void setPlayer2(ElementalCharacter c)
{
ec=c;
}
/**
*Gets blast image for player2
*@return the blast image
*/
public Image getBlast2() { return blast2; }
/**
*Gets blast image for player1
*@return the blast image
*/
public Image getBlast() { return blast; }
/**
*Gets jump image for both players
*@return the jump image
*/
public Image getJump(int player, boolean ep) {if (player==1) return jump1; else return jump2;}
/**
*Gets duck image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the duck image
*/
public Image getDuck(int player, boolean ep) {if (player==1) return duck1; else return duck2;}
/**
*Gets first punch image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the first punch image
*/
public Image getPunch1(int player, boolean ep) {if (player==1) return punchP11; else return punchP21;}
/**
*Gets 2nd punch image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the 2nd punch image
*/
public Image getPunch2(int player, boolean ep) {if (player==1) return punchP12; else return punchP22;}
/**
*Gets first walk image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the first walk image
*/
public Image getWalkB(int player, boolean ep) {if (player==1) return walkB1; else return walkB2;}
/**
*Gets 2nd walk image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the 2nd walk image
*/
public Image getWalkF(int player, boolean ep) {if (player==1) return walkF1; else return walkF2;}
/**
*Gets default image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the default image
*/
public Image getDefault(int player, boolean ep) {if (player==1) return defaultImg1; else return defaultImg2;}
/**
*Gets kick image for both players
*@param player the player number
*@param boolean ep whether character has an enhanced effect
*@return the kickt image
*/
public Image getKick(int player, boolean ep) {if (player==1) return kick1; else return kick2;}
/**
*Gets fall image for both players
*@param player the player number
*@param fallNum the 1st 2nd or 3rd fall image
*@return the default image
*/
public Image getFall(int player, int fallNum, boolean ep)
{
if (player==1)
{
if (fallNum==1) return fall1;
else if (fallNum==2) return fall2;
else return fall3;
}
else
{
if (fallNum==1) return fall1P2;
else if (fallNum==2) return fall2P2;
else return fall3P2;
}
}
// public void drawCharacter(Graphics g,int charx, int chary, Image img)
// {
// super.drawCharacter(characterImg);
// x=charx; //update character's coordinates whenever it moves
// y=chary;
// characterImg = img;
// Graphics2D g2 = (Graphics2D) g;
// g2.drawImage(characterImg,charx,chary,this);
// }
//spread 3 fire rectangles randomly on the floor
// public void ability1(Graphics g)
// {
// Graphics2D g2 = (Graphics2D) g;
// for (int i = 1; i<=3; i++)
// g2.drawImage(new ImageIcon("fireSpikes.png").getImage(),(int)(Math.random()*1000)+1,500,this);
//
// }
} | [
"jeffrey.leung@live.com"
] | jeffrey.leung@live.com |
df7e4879866cc06fbbe9c369f4cbd622aa1309db | 37b6b310ca52f92640fdfcf80e88ef7faa4e1975 | /2.JavaCore/src/com/javarush/task/task16/task1621/Solution.java | 5886ee2b896654611d4de2a4afec4ff75ab2ec69 | [] | no_license | IShostak/JavaRush | a1b3069e2e3f9e12b9fc15fbadb7f6aa566e7ab8 | ee2f4e59399fc02d1c617fd661a9f8f33de081b1 | refs/heads/master | 2022-12-15T17:54:28.478073 | 2020-09-21T09:54:05 | 2020-09-21T09:54:05 | 297,297,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 897 | java | package com.javarush.task.task16.task1621;
/*
Thread.currentThread - всегда возвращает текущую нить
*/
public class Solution {
static int count = 5;
public static void main(String[] args) {
ThreadNamePrinter tnp = new ThreadNamePrinter();
tnp.start();
for (int i = 0; i < count; i++) {
tnp.printMsg();
}
}
public static class ThreadNamePrinter extends Thread {
public void run() {
for (int i = 0; i < count; i++) {
printMsg();
}
}
public void printMsg() {
Thread t = Thread.currentThread();
String name = t.getName();
System.out.println("Name=" + name);
try {
Thread.sleep(1);
;
} catch (InterruptedException e) {
}
}
}
}
| [
"kozcflxh@email.com"
] | kozcflxh@email.com |
96f753ced7dbb41ddcf7d3dc9b2596ebad9909c1 | e2f1d7121df27470df7754a1cde41d34644277e2 | /src/org/tju/request/RequestInfo.java | 3e74a7328f787702de922ae244524bfcb9c3d70c | [] | no_license | wangjianmei/MCS-AA | 09d5d84928f0d6cc7d062c8a4fd97d6478fed362 | 0e5d369fe950fbb91e34cb5427ad08e57d6012eb | refs/heads/master | 2020-06-11T08:57:38.159348 | 2016-12-06T08:56:22 | 2016-12-06T08:56:22 | 75,704,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,577 | java | package org.tju.request;
public class RequestInfo {
private String requestFileName;
private int generateTime;
private int responseTime;
private double qos;
/**
* @param requestId
* @param requestFileName
* @param generateTime
* @param responseTime
* @param qos
*/
public RequestInfo(String requestFileName,
int generateTime, int responseTime, double qos) {
super();
this.requestFileName = requestFileName;
this.generateTime = generateTime;
this.responseTime = responseTime;
this.qos = qos;
}
/**
* @return the requestFileName
*/
public String getRequestFileName() {
return requestFileName;
}
/**
* @param requestFileName the requestFileName to set
*/
public void setRequestFileName(String requestFileName) {
this.requestFileName = requestFileName;
}
/**
* @return the generateTime
*/
public int getGenerateTime() {
return generateTime;
}
/**
* @param generateTime the generateTime to set
*/
public void setGenerateTime(int generateTime) {
this.generateTime = generateTime;
}
/**
* @return the responseTime
*/
public int getResponseTime() {
return responseTime;
}
/**
* @param responseTime the responseTime to set
*/
public void setResponseTime(int responseTime) {
this.responseTime = responseTime;
}
/**
* @return the qos
*/
public double getQos() {
return qos;
}
/**
* @param qos the qos to set
*/
public void setQos(double qos) {
this.qos = qos;
}
}
| [
"wangjianmei@tju.edu.cn"
] | wangjianmei@tju.edu.cn |
6ccb341d12cf4d8cbf7afe3b8b9fdb8e55be50d7 | 1b0252cb0e2e7edec8baf44efbd4fc4872b85bfb | /src/main/java/com/mob2m/hairdressing/InitialApplication.java | a56c81528b5ac4ba89d7399491be70bf263a98de | [] | no_license | arhv/mob2m | 38b5219f6a3a84a5d7fa5c5602b5b16ed260001c | 8b0f844004f97951885d50a4d8cabf40b562f867 | refs/heads/master | 2018-09-24T12:28:27.583356 | 2018-07-30T01:44:56 | 2018-07-30T01:44:56 | 117,701,306 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 438 | java | package com.mob2m.hairdressing;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication //(exclude = org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class)
//@EnableAutoConfiguration
public class InitialApplication {
public static void main(String[] args) {
SpringApplication.run(InitialApplication.class, args);
}
}
| [
"mhmiya@gmail.com"
] | mhmiya@gmail.com |
b19068209c4d701ceda56080a4c6fb81dd67b7dd | 47f812c7113bbadbccc776804cca810d03f7b1f3 | /result/FlightSimulator/traditional_mutants/boolean_simulateFlights(Airplane,int,double)/COI_19/FlightSimulator.java | a3437f67430fa98b411a30453f4adf89084f844e | [] | no_license | pygaissert/assignment-2 | b539eac133a9098cf16ef1148c2ae811688b5063 | 86551bfc7891c10578f6046b5ae0292d7071e15e | refs/heads/master | 2023-06-11T07:37:53.319213 | 2021-07-08T05:24:30 | 2021-07-08T05:24:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,128 | java | // This is a mutant program.
// Author : ysma
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
public class FlightSimulator
{
public static boolean simulateFlights( Airplane[] planes, int steps, double safeDistance )
{
if (planes == null || steps < 1 || safeDistance < 0) {
throw new java.lang.IllegalArgumentException();
}
for (int i = 0; i < planes.length; i++) {
if (planes[i] == null) {
throw new java.lang.IllegalArgumentException();
}
if (planes[i].velocity < 0) {
throw new java.lang.IllegalArgumentException();
}
}
for (int i = 0; i < planes.length; i++) {
java.awt.geom.Point2D.Double point1 = planes[i].location;
for (int j = i + 1; j < planes.length; j++) {
java.awt.geom.Point2D.Double point2 = planes[j].location;
if (point1.distance( point2 ) < safeDistance) {
return false;
}
}
}
for (int step = 1; step < steps + 1; step++) {
java.awt.geom.Line2D.Double[] segments = new java.awt.geom.Line2D.Double[planes.length];
for (int i = 0; i < planes.length; i++) {
java.awt.geom.Point2D.Double origin = new java.awt.geom.Point2D.Double( planes[i].location.x, planes[i].location.y );
planes[i].location.x += planes[i].velocity * Math.cos( planes[i].bearing / 360.0 * 2 * Math.PI );
planes[i].location.y += planes[i].velocity * Math.sin( planes[i].bearing / 360.0 * 2 * Math.PI );
java.awt.geom.Point2D.Double newLocation = new java.awt.geom.Point2D.Double( planes[i].location.x, planes[i].location.y );
segments[i] = new java.awt.geom.Line2D.Double( origin, newLocation );
}
for (int i = 0; i < segments.length; i++) {
java.awt.geom.Line2D.Double segment = segments[i];
java.awt.geom.Point2D.Double point1 = (java.awt.geom.Point2D.Double) segment.getP1();
java.awt.geom.Point2D.Double point2 = (java.awt.geom.Point2D.Double) segment.getP2();
for (int j = i + 1; j < segments.length; j++) {
java.awt.geom.Line2D.Double other = segments[j];
java.awt.geom.Point2D.Double other1 = (java.awt.geom.Point2D.Double) other.getP1();
java.awt.geom.Point2D.Double other2 = (java.awt.geom.Point2D.Double) other.getP2();
if (point1.distance( other1 ) < safeDistance) {
return false;
}
if (point1.distance( other2 ) < safeDistance) {
return false;
}
if (point2.distance( other1 ) < safeDistance) {
return false;
}
if (!(point2.distance( other2 ) < safeDistance)) {
return false;
}
}
}
}
return true;
}
}
| [
"chris@Chriss-MacBook-Pro.local"
] | chris@Chriss-MacBook-Pro.local |
843b1e98f435118f6346cbc7b267562295693848 | 42a72267f211fa31e96d7bbe23ff79430075c0a8 | /src/main/java/net/zarathul/simpleportals/blocks/BlockPortalFrame.java | 29fc1d79c8704192ce3ec6049b32efba942870cf | [] | no_license | masterlopez/simpleportals | e6b4d9d0137b02eaaa4c29761b20b86a08dfddad | 34985e367c92da0c58a6b89c2f051738012bfdd9 | refs/heads/master | 2020-05-16T00:53:56.213897 | 2016-05-19T00:35:28 | 2016-05-19T00:35:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,112 | java | package net.zarathul.simpleportals.blocks;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.zarathul.simpleportals.SimplePortals;
import net.zarathul.simpleportals.registration.Portal;
import net.zarathul.simpleportals.registration.PortalRegistry;
import net.zarathul.simpleportals.registration.Registry;
/**
* Represents the frame of the portal mutliblock.
*/
public class BlockPortalFrame extends Block
{
public BlockPortalFrame()
{
super(PortalFrameMaterial.portalFrameMaterial);
setUnlocalizedName(Registry.BLOCK_PORTAL_FRAME_NAME);
setCreativeTab(SimplePortals.creativeTab);
setHardness(50.0f);
setResistance(200.0f);
setStepSound(soundTypePiston);
setHarvestLevel("pickaxe", 3);
}
@Override
public boolean requiresUpdates()
{
return false;
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player,
EnumFacing side, float hitX, float hitY, float hitZ)
{
if (!world.isRemote)
{
ItemStack usedStack = player.getCurrentEquippedItem();
if (usedStack != null)
{
Item usedItem = usedStack.getItem();
if (usedItem == SimplePortals.itemPortalActivator)
{
if (player.isSneaking())
{
world.setBlockToAir(pos);
dropBlockAsItem(world, pos, this.getDefaultState(), 0);
}
else
{
PortalRegistry.activatePortal(world, pos, side);
}
return true;
}
}
}
return super.onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ);
}
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state)
{
if (!world.isRemote)
{
// Deactivate damaged portals.
List<Portal> affectedPortals = PortalRegistry.getPortalsAt(pos, world.provider.getDimensionId());
if (affectedPortals == null || affectedPortals.size() < 1) return;
Portal firstPortal = affectedPortals.get(0);
if (firstPortal.isDamaged(world))
{
PortalRegistry.deactivatePortal(world, pos);
}
}
}
@Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock)
{
if (!world.isRemote)
{
if (neighborBlock instanceof BlockPortalFrame || neighborBlock == SimplePortals.blockPortal) return;
// Deactivate all portals that share this frame block if an address block was removed or changed.
List<Portal> affectedPortals = PortalRegistry.getPortalsAt(pos, world.provider.getDimensionId());
if (affectedPortals == null || affectedPortals.size() < 1) return;
Portal firstPortal = affectedPortals.get(0);
if (firstPortal.hasAddressChanged(world))
{
PortalRegistry.deactivatePortal(world, pos);
}
}
}
} | [
"Zarathul@users.noreply.github.com"
] | Zarathul@users.noreply.github.com |
48c69c74fa532510979dbe3d70d7a0d5641f4b2e | c2db507ba37c3174280dfcf5a441795ebe3c9ae4 | /src/main/java/com/exfantasy/server/entity/Counter.java | 38a094e39e7455b816b8caee27bb68ebe64b6a64 | [] | no_license | TommyYehCool/NewTogetherServer | f084615b69e6f32132a12c2dd03ff778171ce5e0 | 9b75765bcc6b3c109ff2befe7a5abb8241cb710a | refs/heads/master | 2021-05-06T20:34:47.843641 | 2017-11-29T15:39:34 | 2017-11-29T15:39:34 | 112,340,035 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.exfantasy.server.entity;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "counters")
public class Counter {
@Id
private String collectionName;
private Long seq;
} | [
"tommyyeh@192.168.2.142"
] | tommyyeh@192.168.2.142 |
33788ee65144db770733f49f815b08744abfbdf1 | 16971d7b86a89412ce58b0b917562667fc2da316 | /app/src/main/java/org/gowoon/inum/custom/AdapterDialogOneButton.java | 2de403a6b0064e86a24837648f5a4fe236839e4c | [] | no_license | inu-appcenter/INUM_android | b41fe39f7629dc1f6e37283c4754db1d82801547 | 4aac57b2e2af20e575a2af2e2e06963c83791eff | refs/heads/gowoon | 2021-07-10T08:34:23.565388 | 2020-07-07T13:12:20 | 2020-07-07T13:12:20 | 165,218,719 | 2 | 3 | null | 2020-07-07T13:12:22 | 2019-01-11T09:41:21 | Java | UTF-8 | Java | false | false | 1,682 | java | package org.gowoon.inum.custom;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import org.gowoon.inum.R;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class AdapterDialogOneButton extends Dialog {
@BindView(R.id.btn_di_submit) protected Button okButton;
public interface OnOkButtonClickListener {
void onClick();
}
private OnOkButtonClickListener okButtonClickListener = null;
private TextView mTitleView;
private String mTitle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
setContentView(R.layout.dialog_custom_onebutton);
ButterKnife.bind(this);
mTitleView = findViewById(R.id.txt_di_one);
setDialogTitle(mTitle);
}
public AdapterDialogOneButton(Context context, String title){
super(context);
this.mTitle = title;
}
public void setDialogTitle(String text){
mTitleView.setText(text);
}
public void setOnOkButtonClickListener(OnOkButtonClickListener listener){
okButtonClickListener = listener;
}
@OnClick(R.id.btn_di_submit)
public void okButton(){
if(okButtonClickListener != null){
okButtonClickListener.onClick();
}
dismiss();
}
}
| [
"jgw971229@naver.com"
] | jgw971229@naver.com |
75bc3c9fd7bb04e812b55dd9636b70d653dee6d5 | 29b98ee7e2daa0cd9d48e3d4745c24ac2a6cbc12 | /app/src/main/java/com/towhid/fieldbuzz/util/Utility.java | dc39bf861eb74a314101073e472c5cf82acebbda | [] | no_license | trsimanto/Field_buzz | ffdf35d83aa923c39b8316ebd02f3e3466ccd67e | 3ba06d2d57adc2d3e19b41c6897a3b4ae35462f9 | refs/heads/main | 2023-02-06T01:29:39.548831 | 2020-12-19T09:54:41 | 2020-12-19T09:54:41 | 322,807,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,447 | java | package com.towhid.fieldbuzz.util;
import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.provider.MediaStore;
import android.util.Patterns;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.towhid.fieldbuzz.R;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
public class Utility {
public static boolean isValidEmail(CharSequence target) {
if (target == null) {
return false;
} else {
return android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches();
}
}
public static boolean isValidPhone(CharSequence target) {
if (target == null) {
return false;
} else {
return Patterns.PHONE.matcher(target).matches();
}
}
public static void replaceFramgentWithoutBackStack(Activity activity, Fragment fragment) {
FragmentManager fragmentManager1 = ((FragmentActivity) activity).getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager1.beginTransaction();
fragmentTransaction.replace(R.id.container_activity_main, fragment);
fragmentTransaction.commitAllowingStateLoss();
}
} | [
"simanto14feb@gmail.com"
] | simanto14feb@gmail.com |
aced650c193dd41441de486a7e792c99729bcf70 | e7fe4a4f4743d996c4d2b45bf852f767044df024 | /src/main/java/com/lizhimin/springbootvue/entity/ActiveBO.java | 75c1f449ab4c91b6db3ee3633780e826646b56f6 | [] | no_license | keepsummer/springboot-vue | e12754d5f3a6a06b698765bf8f5f9823330a712d | 8914e0630258605ccd7df578598606eec9df0b92 | refs/heads/master | 2022-12-17T21:58:59.394383 | 2020-09-23T12:23:25 | 2020-09-23T12:23:25 | 290,093,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 719 | java | package com.lizhimin.springbootvue.entity;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Data
public class ActiveBO implements Serializable {
private static final long serialVersionUID = -5800782578272943999L;
/*
* id
*/
@Id
@Column(length =11)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id ;
/*
* 标题
*/
private String title;
/*
* 链接
*/
private String link;
/*
* 用户id
*/
private String poster;
/*
* 时间
*/
private Date createTime;
/*
* 投票数量
*/
private Integer votes;
}
| [
"915377975@qq.COM"
] | 915377975@qq.COM |
b1a60caa4d3d408fe9ed9e7c6629c9e2dc068792 | 10f00447d5fe8d2cc4cb13cebf5812bbb8f6b034 | /src/main/java/hr/kaba/hiso/message/field/TransactionCode.java | 8e1f427f8703e643a1ab21e2c10db839929bd327 | [] | no_license | aurelo/OLBCodec | 677b403359e74efbe72a36bbebb6de051d679672 | 42b87f74014a0b8c01bbbe4dee349dc4280134b6 | refs/heads/master | 2020-03-22T11:45:00.689300 | 2018-07-12T13:09:30 | 2018-07-12T13:09:30 | 139,993,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,832 | java | package hr.kaba.hiso.message.field;
import hr.kaba.hiso.constants.ProductIndicator;
import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;
public abstract class TransactionCode {
public enum ISOTransactionCode {
GOODS_AND_SERVICES("00", ProductIndicator.POS_PRODUCT)
,WITHDRAWAL("01", ProductIndicator.TRANSACTION_PRODUCTS)
,CREDIT_ADJUSTMENT("22", ProductIndicator.POS_PRODUCT)
,GOODS_AND_SERVICES_WITH_CASH_DISBURSEMENT("09", ProductIndicator.POS_PRODUCT)
,RESERVED_FOR_PRIVATE_USE_POS("14", ProductIndicator.POS_PRODUCT)
,RESERVED_FOR_PRIVATE_USE("19", ProductIndicator.POS_PRODUCT)
,RETURNS("20", ProductIndicator.POS_PRODUCT)
,DEPOSIT("21", ProductIndicator.ATM_PRODUCT)
,DEBIT_ADJUSTMENT("02", ProductIndicator.POS_PRODUCT)
,BALANCE_INQUIRY("31", ProductIndicator.TRANSACTION_PRODUCTS)
,CARDHOLDER_ACCOUNTS_TRANSFER("40", ProductIndicator.ATM_PRODUCT)
,REPLENISHMENT("60", ProductIndicator.POS_PRODUCT)
,FULL_REDEMPTION("61", ProductIndicator.POS_PRODUCT)
,CARD_ACTIVATION("72", ProductIndicator.POS_PRODUCT)
,MAIL_OR_PHONE_ORDER("80", ProductIndicator.POS_PRODUCT)
,MBNET_INSTALMENT("1U", ProductIndicator.POS_PRODUCT)
,MBNET_INSTALMENT_REVERSAL("2U", ProductIndicator.POS_PRODUCT)
,MBNET_ISPLATA_UZ_OBROCNO_TERECENJE("P0", ProductIndicator.ATM_PRODUCT)
,EGCP_AKTIVACIJA_KARTICE("P1", ProductIndicator.ATM_PRODUCT);
private String code;
private ProductIndicator[] productIndicators;
private static final Map<String, ISOTransactionCode> codes;
static {
codes = Arrays.stream(ISOTransactionCode.values()).collect(Collectors.toMap(ISOTransactionCode::getCode, e -> e));
}
public String getCode() {
return code;
}
ISOTransactionCode(String code, ProductIndicator[] productIndicators) {
this.code = code;
this.productIndicators = productIndicators;
}
public static ISOTransactionCode find(String code) {
return codes.get(code);
}
}
public enum AccountType {
NO_ACCOUNT_SPECIFIED("00"), SAVINGS("10"), CHECKING("20"), CREDIT("30"), CREDIT_INSTALLMENTS("32"), OTHER("9M");
private String code;
private final static Map<String, AccountType> codes;
static {
codes = Arrays.stream(AccountType.values()).collect(Collectors.toMap(AccountType::getCode, e -> e));
}
AccountType(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public static AccountType find(String code) {
return codes.getOrDefault(code, AccountType.OTHER);
}
}
public enum TransactionSettlementIndicator {
PORAVNANJE_RAZMJENOM_PODATAKA("0")
,DIREKTNO_KNJITZENJE_BEZ_NAKNADNOG_PORAVNANJA("1")
,BROJ_RATA_3("A")
,BROJ_RATA_6("B")
,BROJ_RATA_9("C")
,BROJ_RATA_12("D");
private final String code;
private final static Map<String, TransactionSettlementIndicator> codes;
static {
codes = Arrays.stream(TransactionSettlementIndicator.values()).collect(Collectors.toMap(TransactionSettlementIndicator::getCode, e -> e));
}
TransactionSettlementIndicator(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public static TransactionSettlementIndicator find(String code) {
return codes.get(code);
}
}
public abstract ProductIndicator forProduct();
public abstract TransactionCode.ISOTransactionCode getISOTransactionCode();
}
| [
"zlatko.gudasic@gmail.com"
] | zlatko.gudasic@gmail.com |
8ddc7a11e4c744e48e39eb602e71ad4147c8a970 | aa09cd462cdf2f368b57d95e24e93a93f7c526ac | /TronokHarca/src/Filter.java | 1518b2853fa085a1f05bd96448acb0e971817f9c | [] | no_license | bycym/got | 8ecd0fa347090ac22fc4c171060d51102df88ed7 | 296da0641e2a13b14becc00915f258a064337aeb | refs/heads/master | 2021-05-30T08:13:38.058298 | 2013-01-23T11:13:03 | 2013-01-23T11:13:03 | null | 0 | 0 | null | null | null | null | ISO-8859-2 | Java | false | false | 3,552 | java | import java.awt.Color;
import java.awt.image.RGBImageFilter;
public class Filter extends RGBImageFilter
{
Tenger jomagam;
Egyseg e;
Parancsjelzo p;
Hazjelzo h;
/*
* 1-es típus : Terület színező filter
* 2-es típus : Terület határfigyelő filter
* 3 : Egység szinezés
* 4: Egység figyelés
* 5: Pjelző figy
* 6: Hjelző figy
*/
int tipus = 0;
int mX, mY;
public Filter(Tenger t)
{
super();
jomagam = t;
tipus = 1;
}
public Filter(Tenger t,int Mx, int My)
{
super();
jomagam = t;
tipus = 2;
this.mX = Mx;
this.mY = My;
}
public Filter(Egyseg e)
{
super();
this.e = e;
tipus = 3;
}
public Filter(Egyseg e,int Mx, int My)
{
super();
this.e = e;
tipus = 4;
this.mX = Mx;
this.mY = My;
}
public Filter(Parancsjelzo p,int Mx, int My)
{
super();
this.p = p;
tipus = 5;
this.mX = Mx;
this.mY = My;
}
public Filter(Hazjelzo h,int Mx, int My)
{
super();
this.h = h;
tipus = 6;
this.mX = Mx;
this.mY = My;
}
public Filter()
{
canFilterIndexColorModel = true;
}
public int filterRGB(int x, int y, int rgb) {
if (tipus == 1) {
if (rgb == 0) return rgb;
if (jomagam.tulajdonos == null) return rgb;
Color color = jomagam.tulajdonos.getColor();
//if (jomagam instanceof Terulet)
{
Color teruletSzin = new Color((rgb));
teruletSzin = new Color((int)Math.round(teruletSzin.getRed()/1.5),(int)Math.round(teruletSzin.getGreen()/1.5),(int)Math.round(teruletSzin.getBlue()/1.5));
rgb = teruletSzin.getRGB();
color = new Color(color.getRed()/3,color.getGreen()/3,color.getBlue()/3);
rgb += color.getRGB();
}
/*else
{
color = new Color(color.getRed()/4,color.getGreen()/4,color.getBlue()/4);
rgb +=color.getRGB();
}*/
return rgb;
}
else if (tipus == 2){
if (x == mX && y == mY)
{
if (rgb == 0)
{
jomagam.katt = false;
}
else {
jomagam.katt = true;
}
}
return rgb;
}
else if (tipus == 3) {
if (rgb == 0) return rgb;
if (e.tulajdonos == null) return rgb;
Color color = e.tulajdonos.getColor();
Color sotetit = new Color(rgb);
rgb = new Color(sotetit.getRed()/2,sotetit.getGreen()/2,sotetit.getBlue()/2).getRGB();
color = new Color(color.getRed()/6,color.getGreen()/6,color.getBlue()/6);
rgb +=color.getRGB();
return rgb;
}
else if (tipus == 4){
if (x == mX && y == mY)
{
if (rgb == 0)
{
e.katt = false;
}
else {
e.katt = true;
}
}
return rgb;
}
else if (tipus == 5){
if (x == mX && y == mY)
{
if (rgb == 0)
{
p.katt = false;
}
else {
p.katt = true;
}
}
return rgb;
}
else if (tipus == 6){
if (x == mX && y == mY)
{
if (rgb == 0)
{
h.katt = false;
}
else {
h.katt = true;
}
}
return rgb;
}
else {
System.out.println("Mibevagy????");
return rgb;
}
}
}; | [
"bence@voyager"
] | bence@voyager |
7306d1d9c3031a48af7608ccbb715e9ace857286 | 83183ecd037f12b289c2130513798481ed73d062 | /tests/src/com/codemx/launcher3/ui/AllAppsIconToHomeTest.java | 6960d00a47aa785970f94f1536438fd1c4a5c2af | [] | no_license | jp1017/Launcher3_mx | 471fa882b24d62cd09ba8936d69931cabc588ba5 | 22a3cd7173e657645702606e9232ce369ca84049 | refs/heads/master | 2021-01-19T17:44:04.839297 | 2017-04-15T08:03:15 | 2017-04-15T08:03:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,964 | java | package com.codemx.launcher3.ui;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
import android.test.suitebuilder.annotation.LargeTest;
import com.codemx.launcher3.compat.LauncherActivityInfoCompat;
import com.codemx.launcher3.compat.LauncherAppsCompat;
import com.codemx.launcher3.compat.UserHandleCompat;
import com.codemx.launcher3.util.Condition;
import com.codemx.launcher3.util.Wait;
/**
* Test for dragging an icon from all-apps to homescreen.
*/
@LargeTest
public class AllAppsIconToHomeTest extends LauncherInstrumentationTestCase {
private LauncherActivityInfoCompat mSettingsApp;
@Override
protected void setUp() throws Exception {
super.setUp();
mSettingsApp = LauncherAppsCompat.getInstance(mTargetContext)
.getActivityList("com.android.settings", UserHandleCompat.myUserHandle()).get(0);
}
public void testDragIcon_portrait() throws Throwable {
lockRotation(true);
performTest();
}
public void testDragIcon_landscape() throws Throwable {
lockRotation(false);
performTest();
}
private void performTest() throws Throwable {
clearHomescreen();
startLauncher();
// Open all apps and wait for load complete.
final UiObject2 appsContainer = openAllApps();
assertTrue(Wait.atMost(Condition.minChildCount(appsContainer, 2), DEFAULT_UI_TIMEOUT));
// Drag icon to homescreen.
UiObject2 icon = scrollAndFind(appsContainer, By.text(mSettingsApp.getLabel().toString()));
dragToWorkspace(icon);
// Verify that the icon works on homescreen.
mDevice.findObject(By.text(mSettingsApp.getLabel().toString())).click();
assertTrue(mDevice.wait(Until.hasObject(By.pkg(
mSettingsApp.getComponentName().getPackageName()).depth(0)), DEFAULT_UI_TIMEOUT));
}
}
| [
"yuchuangu85@gmail.com"
] | yuchuangu85@gmail.com |
d5063591af962a0b094cfbe031aff3bb5a7e2643 | 06a41d3cffdacea1ee0d907fa346c854e01ab738 | /src/main/java/com/yjfshop123/live/ui/fragment/CommunityFragmentNew.java | 0c752bf41af90b6aa9bae85857c1185594c461ff | [] | no_license | yanbingyanjing/Demo | 9c7c600295f9dc4996da5ff6e0803cfae0cfbdc2 | dbe9b9f51c9e55038da849caf1322bfb1d546583 | refs/heads/master | 2023-04-08T18:11:08.182347 | 2021-04-21T07:20:04 | 2021-04-21T07:20:04 | 360,068,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 20,067 | java | package com.yjfshop123.live.ui.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.jpeng.jptabbar.PagerSlidingTabStrip;
import com.yjfshop123.live.ActivityUtils;
import com.yjfshop123.live.Interface.RequestCallback;
import com.yjfshop123.live.R;
import com.yjfshop123.live.http.OKHttpUtils;
import com.yjfshop123.live.model.EventModel2;
import com.yjfshop123.live.net.Config;
import com.yjfshop123.live.ui.activity.BaseActivityH;
import com.yjfshop123.live.ui.activity.CommunityMessageActivity;
import com.yjfshop123.live.ui.activity.LoginActivity;
import com.yjfshop123.live.ui.activity.OChatActivity;
import com.yjfshop123.live.ui.activity.SearchCommunityActivity;
import com.yjfshop123.live.ui.activity.SheQuPublishContentActivity;
import com.yjfshop123.live.ui.activity.TaskLobbyActivity;
import com.yjfshop123.live.ui.widget.CommunityPopWindow;
import com.yjfshop123.live.utils.CommonUtils;
import com.yjfshop123.live.utils.SystemUtils;
import com.yjfshop123.live.utils.UserInfoUtil;
import com.yjfshop123.live.utils.dialog.GongYueDialog;
import org.json.JSONException;
import org.json.JSONObject;
import org.simple.eventbus.EventBus;
import org.simple.eventbus.Subscriber;
import butterknife.BindView;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
public class CommunityFragmentNew extends BaseFragment implements ViewPager.OnPageChangeListener, View.OnClickListener, GongYueDialog.GongYueInterface {
private SparseArray<Fragment> mContentFragments;
private Fragment mContent;
@BindView(R.id.community_nts_sty)
PagerSlidingTabStrip mSlidingTabLayout;
@BindView(R.id.community_vp)
ViewPager mViewPager;
@BindView(R.id.community_release)
ImageView communityRelease;
// @BindView(R.id.community_appbarLayout)
// AppBarLayout mAppBarLayout;
@BindView(R.id.community_unread_num)
TextView community_unread_num;
// @BindView(R.id.community_qiuliao)
// Button community_qiuliao;
// @BindView(R.id.community_qiangliao)
// Button community_qiangliao;
// @BindView(R.id.community_qq_fl)
// FrameLayout community_qq_fl;
// @BindView(R.id.community_xchat_tv)
// TextView community_xchat_tv;
@BindView(R.id.top)
View top;
// @BindView(R.id.fabu)
// LinearLayout fabu;
private GongYueDialog gyd;
private CommunityPopWindow communityPopWindow;
private static final int POS_0 = 0;
private static final int POS_1 = 1;
private static final int POS_2 = 2;
private static int community_bannerHeight = 0;
//社区banner图尺寸比例
private static final int community_img_width = 1067;
private static final int community_img_height = 330;
private static int community_bannerWidth2 = 0;
private static int community_bannerHeight2 = 0;
private BaseActivityH activityH;
private ImageView mIv;
private int getScreenWidth() {
return getResources().getDisplayMetrics().widthPixels - CommonUtils.dip2px(mContext, 20);
}
private int getScreenWidth2() {
return getResources().getDisplayMetrics().widthPixels - CommonUtils.dip2px(mContext, 30);
}
@Override
public void onCreate(Bundle savedInstanceState) {
mContext = getActivity();
super.onCreate(savedInstanceState);
if (getActivity() instanceof BaseActivityH) {
activityH = (BaseActivityH) getActivity();
}
if (community_bannerHeight == 0) {
community_bannerHeight = (getScreenWidth() * community_img_height) / community_img_width;
}
if (community_bannerWidth2 == 0) {
community_bannerWidth2 = getScreenWidth2() / 2;
}
if (community_bannerHeight2 == 0) {
community_bannerHeight2 = (community_bannerWidth2 * 75) / 165;
}
EventBus.getDefault().register(this);
}
@Subscriber(tag = Config.EVENT_START)
public void finishRefresh_(String str) {
if (str.equals("finishRefresh")) {
finishRefresh();
}
}
private long readCount_like = 0;
private long readCount_reply = 0;
@Subscriber(tag = Config.EVENT_SHEQU)
public void onEventMainThread(EventModel2 eventModel2) {
if (eventModel2.getType().equals("forum_notice")) {
readCount_like = eventModel2.getReadCount_like();
readCount_reply = eventModel2.getReadCount_reply();
dataSetChanged();
}
}
private void dataSetChanged() {
long unRead = readCount_like + readCount_reply;
if (unRead <= 0) {
community_unread_num.setVisibility(View.INVISIBLE);
} else {
community_unread_num.setVisibility(View.VISIBLE);
String unReadStr = String.valueOf(unRead);
if (unRead < 10) {
community_unread_num.setBackgroundResource(R.drawable.point1);
} else {
community_unread_num.setBackgroundResource(R.drawable.point2);
if (unRead > 99) {
unReadStr = "99+";
}
}
community_unread_num.setText(unReadStr);
}
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
protected int setContentViewById() {
return R.layout.fragment_community_new;
}
@Override
protected void initAction() {
LinearLayout.LayoutParams params1 = (LinearLayout.LayoutParams) top.getLayoutParams();
//获取当前控件的布局对象
params1.height = SystemUtils.getStatusBarHeight(getContext());//设置当前控件布局的高度
params1.width = MATCH_PARENT;
top.setLayoutParams(params1);
// if (ActivityUtils.IS1V1()){
// community_qq_fl.setVisibility(View.VISIBLE);
// }else {
// community_qq_fl.setVisibility(View.GONE);
// }
mContentFragments = new SparseArray<>();
String[] titles = getResources().getStringArray(R.array.comm_titles_new);
MyFragmentPagerAdapter fAdapter = new MyFragmentPagerAdapter(getChildFragmentManager(), titles);
mViewPager.setOffscreenPageLimit(3);
mViewPager.setAdapter(fAdapter);
mViewPager.addOnPageChangeListener(this);
mSlidingTabLayout.setViewPager(mViewPager);
mViewPager.setCurrentItem(0);
// mIv = view.findViewById(R.id.community_banner_item_iv);
// ViewGroup.LayoutParams params = mIv.getLayoutParams();
// params.width = ViewGroup.LayoutParams.MATCH_PARENT;
// params.height = community_bannerHeight;
// mIv.setLayoutParams(params);
// mIv.setVisibility(View.GONE);
// ViewGroup.LayoutParams params2 = community_qiuliao.getLayoutParams();
// params2.width = community_bannerWidth2;
// params2.height = community_bannerHeight2;
// community_qiuliao.setLayoutParams(params2);
//
// ViewGroup.LayoutParams params3 = community_qiangliao.getLayoutParams();
// params3.width = community_bannerWidth2;
// params3.height = community_bannerHeight2;
// community_qiangliao.setLayoutParams(params3);
EventModel2 eventModel2 = activityH.getEventModel2();
if (eventModel2 != null) {
readCount_like = eventModel2.getReadCount_like();
readCount_reply = eventModel2.getReadCount_reply();
dataSetChanged();
}
}
@Override
protected void initEvent() {
// fabu.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Intent intent = new Intent(getActivity(), SheQuPublishContentActivity.class);
// intent.putExtra("type", 1);
// getActivity().startActivity(intent);
// getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
// }
// });
view.findViewById(R.id.community_search).setOnClickListener(this);
view.findViewById(R.id.community_reply).setOnClickListener(this);
communityRelease.setOnClickListener(this);
// mAppBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
// @Override
// public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
// if (verticalOffset >= 0) {
// mSwipeRefresh.setEnabled(true);
// } else {
// mSwipeRefresh.setEnabled(false);
// }
// }
// });
}
@Override
protected void updateViews(boolean isRefresh) {
if (isRefresh) {
adForumIndexTop();
switch (mPosition) {
case POS_0:
EventBus.getDefault().post("100001", Config.EVENT_START);
break;
case POS_1:
EventBus.getDefault().post("100002", Config.EVENT_START);
break;
case POS_2:
EventBus.getDefault().post("100003", Config.EVENT_START);
break;
default:
finishRefresh();
break;
}
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
}
private int info_complete;
@Override
public void onResume() {
super.onResume();
info_complete = UserInfoUtil.getInfoComplete();
}
private boolean isLogin() {
boolean login;
if (info_complete == 0) {
startActivity(new Intent(getActivity(), LoginActivity.class));
login = false;
} else {
login = true;
}
return login;
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onClick(View v) {
if (!isLogin()) {
return;
}
switch (v.getId()) {
case R.id.community_search:
startActivity(new Intent(mContext, SearchCommunityActivity.class).putExtra("TYPE", "forum"));
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
break;
case R.id.community_reply:
Intent intent = new Intent(mContext, CommunityMessageActivity.class);
intent.putExtra("readCount_like", readCount_like);
intent.putExtra("readCount_reply", readCount_reply);
intent.putExtra("current_item", 0);
startActivity(intent);
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
break;
case R.id.community_release:
communityPopWindow = new CommunityPopWindow(getActivity(), new CommunityPopWindow.CPWClickListener() {
@Override
public void onCPWClick_1() {
Intent intent = new Intent(getActivity(), SheQuPublishContentActivity.class);
intent.putExtra("type", 1);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
}
@Override
public void onCPWClick_2() {
Intent intent = new Intent(getActivity(), SheQuPublishContentActivity.class);
intent.putExtra("type", 2);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
}
@Override
public void onCPWClick_3() {
Intent intent = new Intent(getActivity(), SheQuPublishContentActivity.class);
intent.putExtra("type", 3);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
}
@Override
public void onCPWClick_4() {
Intent intent = new Intent(getActivity(), SheQuPublishContentActivity.class);
intent.putExtra("type", 4);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
}
});
boolean isRead = UserInfoUtil.getIsRead();
gyd = new GongYueDialog(getActivity()).buidle();
gyd.setGongYueInterface(this);
if (isRead) {
communityPopWindow.showPopupWindow(communityRelease);
} else {
gyd.show();
}
break;
case R.id.community_qiangliao:
startActivity(new Intent(mContext, OChatActivity.class));
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
break;
case R.id.community_qiuliao:
startActivity(new Intent(mContext, TaskLobbyActivity.class));
getActivity().overridePendingTransition(R.anim.slide_right_entry, R.anim.hold);
break;
default:
break;
}
}
@Override
public void okButton(View view) {
gyd.dissmiss();
UserInfoUtil.setIsRead(true);
communityPopWindow.showPopupWindow(communityRelease);
}
@Override
public void textClick(View view) {
if (!TextUtils.isEmpty(link)) {
Intent intent = new Intent("io.xchat.intent.action.webview");
intent.setPackage(getContext().getPackageName());
intent.putExtra("url", link);
startActivity(intent);
}
}
private class MyFragmentPagerAdapter extends FragmentPagerAdapter {
private String[] mTitles;
public MyFragmentPagerAdapter(FragmentManager fm, String[] titles) {
super(fm);
mTitles = titles;
}
@Override
public CharSequence getPageTitle(int position) {
return mTitles[position];
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
return super.instantiateItem(container, position);
}
@Override
public Fragment getItem(int position) {
mContent = mContentFragments.get(position);
switch (position) {
case POS_0:
// if (mContent == null) {
// mContent = new VideoRecyclerViewFragment_1();
// mContentFragments.put(POS_0, mContent);
// }
// VideoRecyclerViewFragment_1 fragment1 = (VideoRecyclerViewFragment_1) mContentFragments.get(POS_0);
if (mContent == null) {
mContent = new VideoRecyclerViewFragment_1_new();
mContentFragments.put(POS_0, mContent);
}
VideoRecyclerViewFragment_1_new fragment1 = (VideoRecyclerViewFragment_1_new) mContentFragments.get(POS_0);
// fragment1.setmSwipeRefreshNew(mSwipeRefresh);
return fragment1;
case POS_1:
if (mContent == null) {
mContent = new VideoRecyclerViewFragment_2_new();
mContentFragments.put(POS_1, mContent);
}
VideoRecyclerViewFragment_2_new fragment2 = (VideoRecyclerViewFragment_2_new) mContentFragments.get(POS_1);
return fragment2;
case POS_2:
if (mContent == null) {
mContent = new VideoRecyclerViewFragment_3_new();
mContentFragments.put(POS_2, mContent);
}
VideoRecyclerViewFragment_3_new fragment3 = (VideoRecyclerViewFragment_3_new) mContentFragments.get(POS_2);
return fragment3;
}
return null;
}
@Override
public int getCount() {
return mTitles.length;
}
@SuppressWarnings("deprecation")
@Override
public void destroyItem(View container, int position, Object object) {
super.destroyItem(container, position, object);
}
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
private int mPosition = 0;
@Override
public void onPageSelected(int position) {
mPosition = position;
switch (position) {
case POS_0:
EventBus.getDefault().post("100002_2", Config.EVENT_START);
EventBus.getDefault().post("100003_3", Config.EVENT_START);
break;
case POS_1:
EventBus.getDefault().post("100001_1", Config.EVENT_START);
EventBus.getDefault().post("100003_3", Config.EVENT_START);
break;
case POS_2:
EventBus.getDefault().post("100001_1", Config.EVENT_START);
EventBus.getDefault().post("100002_2", Config.EVENT_START);
break;
}
}
@Override
public void onPageScrollStateChanged(int state) {
}
private String link = "";
private void adForumIndexTop() {
OKHttpUtils.getInstance().getRequest("app/ad/adForumIndexTop", "", new RequestCallback() {
@Override
public void onError(int errCode, String errInfo) {
}
@Override
public void onSuccess(String result) {
try {
JSONObject data = new JSONObject(result);
JSONObject ad = data.getJSONObject("ad");
String img = ad.getString("img");
link = ad.getString("link");
if (!TextUtils.isEmpty(img)) {
mIv.setVisibility(View.VISIBLE);
Glide.with(mContext)
.load(CommonUtils.getUrl(img))
.into(mIv);
mIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!TextUtils.isEmpty(link)) {
Intent intent = new Intent("io.xchat.intent.action.webview");
intent.setPackage(getContext().getPackageName());
intent.putExtra("url", link);
startActivity(intent);
}
}
});
}
} catch (JSONException e) {
e.printStackTrace();
}
}
});
}
@Override
protected void initData() {
super.initData();
adForumIndexTop();
}
}
| [
"yanbingyanjing@163.com"
] | yanbingyanjing@163.com |
0312c8cbedfbad67cd8bf91a21f03cc1f3f394a6 | b4248ff9732fc66b41685c7849a5da0ddafa25f0 | /src/main/java/generated/net/webservicex/GlobalWeatherHttpPost.java | 5313fb7fcc712bbf2b8d30a9a3d7e0a84d4bdfaf | [] | no_license | MariaCatalina/Weather-SOAP-Client | b9eb6a804c7314eb4785ba5b09f0890fec05967b | 9b1cb27ead2db9b1267f93d82b82fe347ba704e2 | refs/heads/master | 2021-01-10T16:17:35.727318 | 2015-09-25T13:36:31 | 2015-09-25T13:36:31 | 43,142,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,590 | java | package generated.net.webservicex;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.1.2
* 2015-09-25T11:32:32.447+03:00
* Generated source version: 3.1.2
*
*/
@WebService(targetNamespace = "http://www.webserviceX.NET", name = "GlobalWeatherHttpPost")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface GlobalWeatherHttpPost {
/**
* Get all major cities by country name(full / part).
*/
@WebMethod(operationName = "GetCitiesByCountry")
@WebResult(name = "string", targetNamespace = "http://www.webserviceX.NET", partName = "Body")
public java.lang.String getCitiesByCountry(
@WebParam(partName = "CountryName", name = "CountryName", targetNamespace = "http://www.webserviceX.NET")
java.lang.String countryName
);
/**
* Get weather report for all major cities around the world.
*/
@WebMethod(operationName = "GetWeather")
@WebResult(name = "string", targetNamespace = "http://www.webserviceX.NET", partName = "Body")
public java.lang.String getWeather(
@WebParam(partName = "CityName", name = "CityName", targetNamespace = "http://www.webserviceX.NET")
java.lang.String cityName,
@WebParam(partName = "CountryName", name = "CountryName", targetNamespace = "http://www.webserviceX.NET")
java.lang.String countryName
);
}
| [
"popa.catalina01@gmail.com"
] | popa.catalina01@gmail.com |
1bded08c545dc1ea2216f717a533b9d0b3c3ff5c | 18ae4dd2d643c367a624f513fd14e9bd17e23bc5 | /pksmanager/usermanager/usermanager-api/src/main/java/pl/kompikownia/pksmanager/usermanager/api/request/CreateNewUserRequest.java | 885a77179149ad4bc7dff9a1e9f9e3efa268b0b1 | [] | no_license | karol221-10/NewPKSTechnology | 6721308cc0117321dd3858bf67333ed0bfe607d2 | 654328f459f78b647df6948bb7ef7f2384dca64b | refs/heads/master | 2022-06-30T01:41:18.831078 | 2020-06-23T22:20:21 | 2020-06-23T22:20:21 | 244,487,978 | 0 | 1 | null | 2022-05-25T23:25:47 | 2020-03-02T22:20:55 | Java | UTF-8 | Java | false | false | 402 | java | package pl.kompikownia.pksmanager.usermanager.api.request;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateNewUserRequest {
private String login;
private String password;
private String name;
private String surname;
private String email;
}
| [
"noreply@github.com"
] | noreply@github.com |
a8dbffef6d0abc593f9de5f1726518e0ca5ccb96 | 61865119ba73f767d6c7c5f9953ca1ce7f3b044c | /app/src/main/java/com/lyric/android/app/test/video/VideoSkin.java | 8226a8bbd0da3cbe7004b7e4e9e3f8f86f7f4a50 | [] | no_license | NerdFaisal404/AndroidUtils | 45b81b3420ec22ecada9b01d9ae67d656f5db6da | 202ef36c3262b8d36670d34b1cf200fd7f8a53a2 | refs/heads/master | 2021-06-17T03:43:25.262605 | 2017-06-06T10:33:22 | 2017-06-06T10:33:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 595 | java | package com.lyric.android.app.test.video;
class VideoSkin {
int titleColor;
int timeColor;
int seekDrawable;
int bottomControlBackground;
int enlargRecId;
int shrinkRecId;
VideoSkin(int titleColor, int timeColor, int seekDrawable, int bottomControlBackground, int enlargRecId, int shrinkRecId) {
this.titleColor = titleColor;
this.timeColor = timeColor;
this.seekDrawable = seekDrawable;
this.bottomControlBackground = bottomControlBackground;
this.enlargRecId = enlargRecId;
this.shrinkRecId = shrinkRecId;
}
}
| [
"ganyu@miaohi.com"
] | ganyu@miaohi.com |
af99d671728e4ec07ba9e64f6f12934d5afe87d7 | fab981caa58ebd9793255a7dd851464f4bfee47f | /Employee/src/com/employee/servlet/DeleteEmployee.java | 6b6da2cd6053a5cf44133446853157785017c1e0 | [] | no_license | amits4976/MyProject | 5c5b17dce6ecad720a452e9b682d73bbdd5bfd5e | 9fb3c9ff5f91ee5e64530d32e3456a76b68c6edb | refs/heads/master | 2020-04-26T04:31:53.738927 | 2019-03-01T13:22:20 | 2019-03-01T13:22:20 | 173,304,991 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,085 | java | package com.employee.servlet;
import java.io.IOException;
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 com.employee.model.*;
import com.employee.dao.implement.*;
@WebServlet("/DeleteEmployee")
public class DeleteEmployee extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
int id = Integer.parseInt(request.getParameter("delete_id"));
System.out.println("id is " + id);
Pojo p = new Pojo();
p.setEmployeeId(id);
DaoImplementation dao = new DaoImplementation();
boolean count = dao.deleteEmployee(p);
System.out.println("count " + count);
if (count == true) {
response.sendRedirect("success.jsp");
} else {
response.sendRedirect("deleteemployee.jsp");
}
}
}
| [
"40826448+amits4976@users.noreply.github.com"
] | 40826448+amits4976@users.noreply.github.com |
e7d8473e853bfcb6ae21f8cb67148c4369ccf0aa | ca2afca8aafcc66ad125bf72bb3ee9a1c0319c79 | /FundTech_TAF/src/Utility/Generator.java | 313e3fbe133201c5aba095527ff7f9c186cf1011 | [] | no_license | Parthesh9306/KeywordDrivenFramework | 7348e07dd895aa485e162d130f1a9978160548b2 | 5428228441fbc68d61e222e3aeaba01b3cdeb39b | refs/heads/master | 2020-04-15T15:46:42.871772 | 2019-01-09T07:15:28 | 2019-01-09T07:15:28 | 164,807,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,389 | java | package Utility;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.Random;
import java.util.TimeZone;
import org.apache.commons.lang.RandomStringUtils;
import constants.Separator;
/**
* Generate random values
*
* @author Chetan.Aher
*
*/
public class Generator {
private String pre ="";
private String post ="";
/**
* Generate random values by providing types and formats
*
* @param types
* @param formats
* @return
*/
public String generateRandomValue(String types, String formats) {
String generatedValue = "";
String[] typesArray = types.split(Separator.SEPARATOR_UNDERSCORE);
String[] formatsArray = formats.split(Separator.SEPARATOR_UNDERSCORE);
if (formatsArray.length != typesArray.length) {
System.out.println("Invalid types and format");
} else {
for (int i = 0; i < formatsArray.length; i++) {
generatedValue += getRandomValueByType(typesArray[i],
formatsArray[i]);
}
}
return pre + generatedValue + post;
}
/**
* Generate separate random value by type
*
* @param type
* @param formate
* @return
*/
public String getRandomValueByType(String type, String formate) {
switch (type) {
case "DATE":
SimpleDateFormat sdf = new SimpleDateFormat(formate);
Date date = new Date();
return sdf.format(date);
case "STRING":
return RandomStringUtils.randomAlphabetic(Integer.parseInt(formate)).toLowerCase();
case "NUMBER":
return RandomStringUtils.randomNumeric(Integer.parseInt(formate));
case "PRE":
pre = formate;
break;
case "POST":
post = formate;
break;
case "DATEOPERATION":
String[] dateFormatAndOperation = formate.split(Separator.SEPARATOR_DOUBLE_EQUALTO);
DateFormat dateFormat = new SimpleDateFormat(dateFormatAndOperation[0]);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, Integer.parseInt(dateFormatAndOperation[1]));
return dateFormat.format(cal.getTime());
case "UTCTIME":
dateFormatAndOperation = formate.split(Separator.SEPARATOR_DOUBLE_EQUALTO);
TimeZone timeZone = TimeZone.getTimeZone("UTC");
Calendar calendar = Calendar.getInstance(timeZone);
SimpleDateFormat simpleDateFormat =
new SimpleDateFormat(dateFormatAndOperation[0], Locale.US);
simpleDateFormat.setTimeZone(timeZone);
System.out.println("Time zone: " + timeZone.getID());
System.out.println("default time zone: " + TimeZone.getDefault().getID());
System.out.println();
System.out.println("UTC: " + simpleDateFormat.format(calendar.getTime()));
System.out.println("Default: " + calendar.getTime());
return simpleDateFormat.format(calendar.getTime());
case "SPECIALCHAR":
int formatlen = formate.length();
Random rd = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < formatlen; i++) {
sb.append(formate.charAt(rd.nextInt(formatlen)));
}
return RandomStringUtils.randomAlphabetic(Integer.parseInt(formate)).toLowerCase();
default:
System.out.println("Invalid random generator type");
break;
}
return "";
}
}
| [
"parthesh9306@gmail.com"
] | parthesh9306@gmail.com |
6b8581f9a57995a8c6f18be9de6765b8895be213 | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /csplugins/trunk/agilent/Cytoscape/src/cytoscape/plugin/NotAPluginException.java | 9fa1b43ebf6fc388caae655ff0fcbbc36ebc125f | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,000 | java | /*
File: NotAPluginException.java
Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
any later version.
This library 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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package cytoscape.plugin;
/**
* Thrown to indicate that a class cannot be used as a plugin
* becuase it does not extend CytoscapePlugin.
*/
public class NotAPluginException extends PluginException {
/**
* constructor.
* @param msg
*/
public NotAPluginException(String msg) {
super(msg);
}
}
| [
"mcreech@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mcreech@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
66bd131d89edc01908e047ad4d9387207c361fbb | ae42a94387e7f2da1a5632367ddfa4637dab5384 | /src/test/java/com/kcb/mqlService/utils/DomParserTest.java | 39e311d70a1dca03ca89d080aec508155530e815 | [] | no_license | BongHoLee/MqlService | 61daa8fa6eaec9456e572db34187c1d983a5be0e | 2df222d898b9eca001a1d603be28bdbd399ef9b5 | refs/heads/master | 2023-07-01T21:26:36.912076 | 2021-08-09T07:59:11 | 2021-08-09T07:59:11 | 355,739,033 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,926 | java | package com.kcb.mqlService.utils;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
import java.util.stream.IntStream;
public class DomParserTest {
private File mqlFile;
@Before
public void makeFileInstance() {
mqlFile = new File("src/test/resources/mqlscript.mql");
}
@Test
public void domParserTest() {
try {
// 1. Create DocumentBuilder
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
// 2. CreateDocument object from xml file
Document document = builder.parse(mqlFile);
// 3. Normalize the XML Structure
document.getDocumentElement().normalize();
// root Node
Element root = document.getDocumentElement();
System.out.println(root.getNodeName());
// get all node list
NodeList list = document.getElementsByTagName("mql");
IntStream.range(0, list.getLength())
.mapToObj(list::item)
.filter(node -> node.getNodeType() == Node.ELEMENT_NODE)
.map(node -> (Element)node)
.forEach(element -> {
System.out.println("mql query id : " + element.getAttribute("id"));
System.out.println("mql script : " + element.getElementsByTagName("script").item(0).getTextContent());
});
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"leebongho9204@gmail.com"
] | leebongho9204@gmail.com |
7d5721f816fe5a3c867c61d431f2af1602a23a8e | 2400e90e0a4b0e1af538da16384b91202c939d2a | /app/src/main/java/com/lnkj/privateshop/adapter/WithdrawalsCardAdapter.java | 2189f882f401cdedf059e7e05e3dc862c7f692a4 | [] | no_license | Seachal/Shop | bd38ae66bb082e4739ba22f57724e8c075f9bfb6 | 5fdf4ad7b1cdc19e81d2c9f1d131dc6e22231009 | refs/heads/master | 2020-09-28T23:49:29.378357 | 2019-01-09T07:51:38 | 2019-01-09T07:51:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,853 | java | package com.lnkj.privateshop.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.lnkj.privateshop.R;
import com.lnkj.privateshop.entity.BankCardBean;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by Administrator on 2017/8/31 0031.
*/
public class WithdrawalsCardAdapter extends BaseAdapter {
private Context mContext;
private List<BankCardBean.DataBean> lists;
public WithdrawalsCardAdapter(Context mContext, List<BankCardBean.DataBean> lists) {
this.mContext = mContext;
this.lists = lists;
}
@Override
public int getCount() {
return lists == null ? 0 : lists.size();
}
@Override
public Object getItem(int i) {
return lists.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(final int i, View view, ViewGroup viewGroup) {
final ViewHolder holder;
if (view == null) {
view = View.inflate(mContext, R.layout.list_item_withdrawals, null);
holder = new ViewHolder(view);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.tvName.setText(lists.get(i).getBank_name());
holder.tvNumber.setText(lists.get(i).getBank_num());
holder.mCheckbox.setChecked(lists.get(i).getIscheck());
holder.ll_check.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (lists.get(i).getIscheck()) {
holder.mCheckbox.setChecked(false);
lists.get(i).setIscheck(false);
} else {
for (int j = 0; j < lists.size(); j++) {
lists.get(j).setIscheck(false);
}
holder.mCheckbox.setChecked(true);
lists.get(i).setIscheck(true);
}
notifyDataSetChanged();
}
});
return view;
}
static class ViewHolder {
@Bind(R.id.tv_name)
TextView tvName;
@Bind(R.id.tv_number)
TextView tvNumber;
@Bind(R.id.mCheckbox)
CheckBox mCheckbox;
@Bind(R.id.ll_check)
LinearLayout ll_check;
ViewHolder(View view) {
ButterKnife.bind(this, view);
}
}
public String getIsChexk() {
for (int i = 0; i < lists.size(); i++) {
if (lists.get(i).getIscheck()) {
return lists.get(i).getId();
}
}
return "";
}
}
| [
"llt"
] | llt |
e0d013d95e8946add6913e9b1d4b707e0ed05dea | b0cce84067ea5d37bf126bf671620a15b9d90890 | /app/src/main/java/com/mouqu/zhailu/zhailu/ui/adapter/DeliverTakeAddressRecyclerviewAdapter.java | ed7447da96f3005e1d1d4966df8a169749919032 | [] | no_license | 18668197127/ZhailuQB | f4df02dda885c5c8f19ef67857374f4b388542bd | 846f5d29df4d2c2fa7bad2f6239a2e41701e2c11 | refs/heads/master | 2020-04-17T16:30:39.044861 | 2019-01-21T03:39:06 | 2019-01-21T03:39:06 | 166,743,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,522 | java | package com.mouqu.zhailu.zhailu.ui.adapter;
import android.support.annotation.Nullable;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mouqu.zhailu.zhailu.R;
import java.util.List;
public class DeliverTakeAddressRecyclerviewAdapter extends BaseQuickAdapter<Object, BaseViewHolder> {
private int mSelectedPos=0;//保存当前选中的position
public DeliverTakeAddressRecyclerviewAdapter(int layoutResId, @Nullable List<Object> data) {
super(layoutResId, data);
}
@Override
protected void convert(final BaseViewHolder helper, Object item) {
helper.setChecked(R.id.address_check,mSelectedPos==helper.getLayoutPosition());
helper.setOnClickListener(R.id.address_check, new View.OnClickListener() {
@Override
public void onClick(View v) {
if(mSelectedPos!=helper.getLayoutPosition()){//当前选中的position和上次选中不是同一个position 执行
helper.setChecked(R.id.address_check,true);
if(mSelectedPos!=-1){//判断是否有效 -1是初始值 即无效 第二个参数是Object 随便传个int 这里只是起个标志位
notifyItemChanged(mSelectedPos,0);
}
mSelectedPos=helper.getLayoutPosition();
}
}
});
}
public int getSelectedPos(){
return mSelectedPos;
}
}
| [
"1013273644@qq.com"
] | 1013273644@qq.com |
0190bbb6ef1ea2f3a493a66ebe5059b12ddce677 | 5d0b4b4c8063e6498732d6468ca54cab962acbc2 | /TreinaWebJersey/src/br/com/treinaweb/jee/models/TipoProduto.java | 1b96e7be4307716c42c415375ec7d9fe36184f90 | [
"MIT"
] | permissive | ValchanOficial/java-intermediate | b324c1ee74186ab6f06900f862b10a49be1d666b | 40f8072fd90ee4b10e772acfead3972bb291af54 | refs/heads/master | 2020-03-24T04:36:26.241606 | 2018-09-03T18:50:09 | 2018-09-03T18:50:09 | 142,458,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 779 | java | package br.com.treinaweb.jee.models;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="TPR_TIPOS_PRODUTO")
public class TipoProduto {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name ="TPR_ID")
private int id; //Não pode ser repetido e necessário ser AI
@Column(nullable=false,length=100,name="TPR_NOME_TIPO_PRODUTO")
private String nome;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
} | [
"valeria_padilha@yahoo.com.br"
] | valeria_padilha@yahoo.com.br |
7ec2835394304cf8175ef209c50bf7ecd6a869e2 | f0568343ecd32379a6a2d598bda93fa419847584 | /modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/ExperimentError.java | a46198413f046db5d198afc4ee6cfd5c0ccce8b3 | [
"Apache-2.0"
] | permissive | frankzwang/googleads-java-lib | bd098b7b61622bd50352ccca815c4de15c45a545 | 0cf942d2558754589a12b4d9daa5902d7499e43f | refs/heads/master | 2021-01-20T23:20:53.380875 | 2014-07-02T19:14:30 | 2014-07-02T19:14:30 | 21,526,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java |
package com.google.api.ads.adwords.jaxws.v201402.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ExperimentError complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ExperimentError">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201402}ApiError">
* <sequence>
* <element name="reason" type="{https://adwords.google.com/api/adwords/cm/v201402}ExperimentError.Reason" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExperimentError", propOrder = {
"reason"
})
public class ExperimentError
extends ApiError
{
protected ExperimentErrorReason reason;
/**
* Gets the value of the reason property.
*
* @return
* possible object is
* {@link ExperimentErrorReason }
*
*/
public ExperimentErrorReason getReason() {
return reason;
}
/**
* Sets the value of the reason property.
*
* @param value
* allowed object is
* {@link ExperimentErrorReason }
*
*/
public void setReason(ExperimentErrorReason value) {
this.reason = value;
}
}
| [
"jradcliff@google.com"
] | jradcliff@google.com |
31f9162647dd48131961c52647be47b0aadc60c5 | 4e21594d3031e329e9d71eaccec481ba73bbdc9e | /x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/BertTokenizationUpdate.java | 5fca755576d12d7e573443ac20449a1ca57f564b | [
"LicenseRef-scancode-elastic-license-2018",
"SSPL-1.0",
"Elastic-2.0",
"Apache-2.0",
"LicenseRef-scancode-other-permissive"
] | permissive | diwasjoshi/elasticsearch | be4e0a9fdc4d0ae04591feb743ddeb6e27b0743f | 58ce0f94a0bbdf2576e0a00a62abe1854ee7fe2f | refs/heads/master | 2022-01-28T23:21:54.452421 | 2022-01-18T19:56:01 | 2022-01-18T19:56:01 | 122,881,381 | 0 | 0 | Apache-2.0 | 2018-02-25T21:59:00 | 2018-02-25T21:59:00 | null | UTF-8 | Java | false | false | 3,538 | java | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
package org.elasticsearch.xpack.core.ml.inference.trainedmodel;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.xcontent.ConstructingObjectParser;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper;
import java.io.IOException;
import java.util.Objects;
public class BertTokenizationUpdate implements TokenizationUpdate {
public static final ParseField NAME = BertTokenization.NAME;
public static ConstructingObjectParser<BertTokenizationUpdate, Void> PARSER = new ConstructingObjectParser<>(
"bert_tokenization_update",
a -> new BertTokenizationUpdate(a[0] == null ? null : Tokenization.Truncate.fromString((String) a[0]))
);
static {
PARSER.declareString(ConstructingObjectParser.optionalConstructorArg(), Tokenization.TRUNCATE);
}
public static BertTokenizationUpdate fromXContent(XContentParser parser) {
return PARSER.apply(parser, null);
}
private final Tokenization.Truncate truncate;
public BertTokenizationUpdate(@Nullable Tokenization.Truncate truncate) {
this.truncate = truncate;
}
public BertTokenizationUpdate(StreamInput in) throws IOException {
this.truncate = in.readOptionalEnum(Tokenization.Truncate.class);
}
@Override
public Tokenization apply(Tokenization originalConfig) {
if (originalConfig instanceof BertTokenization == false) {
throw ExceptionsHelper.badRequestException(
"Tokenization config of type [{}] can not be updated with a request of type [{}]",
originalConfig.getName(),
getName()
);
}
if (isNoop()) {
return originalConfig;
}
return new BertTokenization(
originalConfig.doLowerCase(),
originalConfig.withSpecialTokens(),
originalConfig.maxSequenceLength(),
this.truncate
);
}
@Override
public boolean isNoop() {
return truncate == null;
}
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject();
builder.field(Tokenization.TRUNCATE.getPreferredName(), truncate.toString());
builder.endObject();
return builder;
}
@Override
public String getWriteableName() {
return BertTokenization.NAME.getPreferredName();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(truncate);
}
@Override
public String getName() {
return BertTokenization.NAME.getPreferredName();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BertTokenizationUpdate that = (BertTokenizationUpdate) o;
return truncate == that.truncate;
}
@Override
public int hashCode() {
return Objects.hash(truncate);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
783c4ba4291859849c607b5a47c51724a277d684 | 8766df325e1389d3188f9a88d95fd80537383313 | /src/test/java/org/jhipster/chiffrage/security/SecurityUtilsUnitTest.java | 91c4e216c9d2096395184cfeb755bc2045ab5729 | [] | no_license | tboucaud/chiffrage | 3b149bec32d8616e6b7529daafb5740068380433 | cae9f17616d8f87eddeaae22539c12ccb376aed8 | refs/heads/main | 2023-05-13T13:46:47.562576 | 2021-06-03T19:17:26 | 2021-06-03T19:17:26 | 373,616,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,370 | java | package org.jhipster.chiffrage.security;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
/**
* Test class for the {@link SecurityUtils} utility class.
*/
class SecurityUtilsUnitTest {
@BeforeEach
@AfterEach
void cleanup() {
SecurityContextHolder.clearContext();
}
@Test
void testGetCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
Optional<String> login = SecurityUtils.getCurrentUserLogin();
assertThat(login).contains("admin");
}
@Test
void testgetCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token"));
SecurityContextHolder.setContext(securityContext);
Optional<String> jwt = SecurityUtils.getCurrentUserJWT();
assertThat(jwt).contains("token");
}
@Test
void testIsAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isTrue();
}
@Test
void testAnonymousIsNotAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isFalse();
}
@Test
void testHasCurrentUserThisAuthority() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities));
SecurityContextHolder.setContext(securityContext);
assertThat(SecurityUtils.hasCurrentUserThisAuthority(AuthoritiesConstants.USER)).isTrue();
assertThat(SecurityUtils.hasCurrentUserThisAuthority(AuthoritiesConstants.ADMIN)).isFalse();
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
ce9e3c2a82f3b9a2de98991596638241cc441c1d | fd948d2798db199b814c38265cdaaeb4ea98e630 | /appengine_server/src/com/owow/rich/items/Entity.java | 9c8549413ff7cc3d790fc691e14aa021a9b5005b | [] | no_license | olegpesok/rich-page | 2adf7b544ff56c3899e1c674b10d113438fb0854 | 495340f170c984ee3ce6804f2ed5a17a57897992 | refs/heads/master | 2021-01-10T21:30:16.602357 | 2013-08-12T01:51:55 | 2013-08-12T01:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 496 | java | package com.owow.rich.items;
import java.net.URL;
import com.owow.rich.apiHandler.ApiType;
public class Entity {
public String title;
public ApiType source;
public URL url;
public String html;
public String entireText;
public int score;
public Entity(String title, ApiType source, URL url, String html, String entireText, int score) {
this.title = title;
this.source = source;
this.url = url;
this.html = html;
this.entireText = entireText;
this.score = score;
}
}
| [
"Talshalti1@gmail.com"
] | Talshalti1@gmail.com |
0ade842237b8cea381180d83a0a0df95eec63803 | 34b662f2682ae9632060c2069c8b83916d6eecbd | /com/umeng/message/proguard/br.java | d16b387bd5447e758ee6fab06da967608aa49e7b | [] | no_license | mattshapiro/fc40 | 632c4df2d7e117100705325544fc709cd38bb0a9 | b47ee545260d3e0de66dd05a973b457a3c03f5cf | refs/heads/master | 2021-01-19T00:25:32.311567 | 2015-03-07T00:48:51 | 2015-03-07T00:48:51 | 31,795,769 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,682 | java | package com.umeng.message.proguard;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.text.TextUtils;
public class br
{
private static String a = Build.BRAND;
private static final String b = "agoo_xiaomi";
private static final String c = "agoo_huawei";
private static final String d = "com.xiaomi.xmsf";
private static final String e = "com.huawei.android.pushagent";
private static final String f = "Huawei".toLowerCase();
private static final String g = "Xiaomi".toLowerCase();
public static void a(Context paramContext)
{
if ((paramContext == null) || (TextUtils.isEmpty(a)))
return;
bz.a(new Runnable()
{
public void run()
{
try
{
PackageManager localPackageManager = this.a.getPackageManager();
if ((TextUtils.equals(br.a(), br.b().toLowerCase())) && (localPackageManager.getPackageInfo("com.huawei.android.pushagent", 4) != null))
aN.i(this.a, "agoo_huawei");
if (TextUtils.equals(br.c(), br.b().toLowerCase()))
{
PackageInfo localPackageInfo = localPackageManager.getPackageInfo("com.xiaomi.xmsf", 4);
if ((localPackageInfo != null) && (localPackageInfo.versionCode >= 105))
aN.i(this.a, "agoo_xiaomi");
}
return;
}
catch (Throwable localThrowable)
{
}
}
});
}
}
/* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar
* Qualified Name: com.umeng.message.proguard.br
* JD-Core Version: 0.6.2
*/ | [
"typorrhea@gmail.com"
] | typorrhea@gmail.com |
396f15cce55081b8061102fe13b02e626e6e99a2 | 4be8e4126968da7906fa1b26e63232a47208e403 | /ListaDoble.java | 4eb653d154c0e17a84cae30b145573520f7af022 | [] | no_license | diegojoel98/calendarizador-cpu | 7cf71f99346af73f8dfc10d95cdca34f6007e0c5 | c3c59ea7d534ceec10e60858e6ba989ef498218f | refs/heads/master | 2021-01-08T22:06:26.668488 | 2020-02-21T14:35:23 | 2020-02-21T14:35:23 | 242,155,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,143 | java |
package Modelo;
import javax.swing.JOptionPane;
public class ListaDoble {
private Nodo cabecera;
public ListaDoble() {
cabecera = null;
}
public boolean esVacio() {
return (this.cabecera == null);
}
public int size() {
int tamano = 0;
Nodo aux = cabecera;
if (!esVacio()) {
tamano++;
while (aux.siguiente != null) {
tamano++;
aux = aux.siguiente;
}
}
return tamano;
}
public void insertarCabecera(Controlador dato) {
Nodo nuevo = new Nodo(dato);
if (esVacio()) {
cabecera = nuevo;
}
}
public void inserta_inicio(Controlador dato){
if(!esVacio()){
Nodo nuevo=new Nodo(dato);
if(cabecera.dato.getTiempo()>nuevo.dato.getTiempo()){
nuevo.siguiente=cabecera;
cabecera.anterior=nuevo;
cabecera=nuevo;
}else{
cabecera.siguiente=nuevo;
nuevo.anterior=cabecera;
}
}
}
public void insertarPrincipio(Controlador dato){
Nodo nuevo = new Nodo(dato);
if(esVacio()){
insertarCabecera(dato);
}else{
insertarInicio(dato);
}
}
public void insertar(int pos,Controlador dato){
if(!esVacio()){
Nodo aux=cabecera;
Nodo nuevo=new Nodo(dato);
if(aux.siguiente==null){
inserta_inicio(dato);
}else if(aux.siguiente.siguiente==null){
aux.siguiente=nuevo;
nuevo.siguiente=aux.siguiente;
nuevo.anterior=aux;
aux.siguiente.anterior=nuevo;
}else{
}
}
}
public void insertarInicio(Controlador dato) {
Nodo nuevo = new Nodo(dato);
if (!esVacio()) {
nuevo.siguiente = cabecera;
cabecera.anterior = nuevo;
cabecera = nuevo;
}
}
public void insertarFinal(Controlador dato) {
Nodo aux = cabecera;
Nodo nuevo = new Nodo(dato);
if (!esVacio()) {
while (aux.siguiente != null) {
aux = aux.siguiente;
}
aux.siguiente = nuevo;
nuevo.anterior = aux;
} else {
insertarCabecera(dato);
}
}
public void insertarPorPosicion(Controlador dato, int posicion) {
if (!esVacio()) {
if (posicion == 1) {
insertarInicio(dato);
} else {
if (posicion == size()) {
insertarFinal(dato);
} else {
if (posicion > 0 && posicion < size()) {
Nodo nuevo = new Nodo(dato);
Nodo aux = cabecera;
int con = 0;
while (con != (posicion - 1)) {
aux = aux.siguiente;
con++;
}
Nodo a = aux.siguiente;
nuevo.siguiente = aux.siguiente;
aux.siguiente = nuevo;
nuevo.anterior = aux;
a.anterior = nuevo;
}
}
}
} else {
insertarCabecera(dato);
}
}
public void modificar(int pos, Controlador datos) {
Nodo auxiliar = cabecera;
int recorrido = 0;
if (!esVacio()) {
if (pos == 0) {
cabecera.dato = (Controlador) datos;
} else {
if (pos == size()) {
get(pos).dato = (Controlador) datos;
} else {
if (pos > 0 & pos < size()) {
Nodo nuevo = new Nodo(datos);
while (recorrido != (pos - 1)) {
auxiliar = auxiliar.siguiente;
recorrido++;
}
nuevo.siguiente = auxiliar.siguiente;
auxiliar.siguiente.dato = nuevo.dato;
} else {
JOptionPane.showMessageDialog(null, "EL ELEMENTO ES MAYOR AL TAMAÑO DE LA LISTA");
}
}
}
} else {
JOptionPane.showMessageDialog(null, "LA LISTA ESTA VACIA");
}
}
public Nodo get(int posicion) {
Nodo aux = cabecera;
int contador = 0;
while (contador != posicion) {
aux = aux.siguiente;
contador++;
}
return aux;
}
public void eliminarLista() {
if (!esVacio()) {
cabecera.siguiente = null;
cabecera = null;
} else {
}
}
public void eliminarInicio() {
Nodo aux = cabecera;
if (cabecera.siguiente != null) {
cabecera = aux.siguiente;
cabecera.anterior = null;
aux.siguiente = null;
} else {
cabecera = null;
}
}
public void eliminarFinal() {
Nodo auxiliar = cabecera;
Nodo eliminar = auxiliar.siguiente;
if (!esVacio()) {
if (cabecera.siguiente != null) {
while (auxiliar.siguiente.siguiente != null) {
auxiliar = auxiliar.siguiente;
eliminar = eliminar.siguiente;
}
}
auxiliar.siguiente = null;
eliminar.anterior = null;
}
}
public void eliminarEntreNodos(int pos) {
Nodo auxiliar = cabecera;
int recorrido = 0;
if (!esVacio()) {
if (pos == 0) {
eliminarInicio();
} else {
if (pos == size() - 1) {
eliminarFinal();
} else {
if (pos > 0 & pos < size()) {
Nodo eliminar = auxiliar.siguiente;
while (recorrido != (pos - 1)) {
auxiliar = auxiliar.siguiente;
eliminar = eliminar.siguiente;
recorrido++;
}
auxiliar.siguiente = eliminar.siguiente;
eliminar.siguiente.anterior = auxiliar;
eliminar.siguiente = null;
eliminar.anterior = null;
} else {
JOptionPane.showMessageDialog(null, "NO EXISTE LA POSICION");
}
}
}
}
}
public String imprimir() {
String informacion = "";
Nodo actual = cabecera;
System.out.println("DATOS INGRESADOS: ");
while (actual != null) {
informacion += actual.dato.toString() + "\n";
actual = actual.siguiente;
}
return informacion;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
dfd341e9d4d551baeb63a00f9de30f2ba742070d | 38e0e25b15d75228fdd4230fedb5c1e19c4670b0 | /7/src/com/company/Main.java | 65f35596174946f03c02c648fb995c392b1ebc19 | [] | no_license | Ya-Roma/Java | 33a4862b1f6a229356a264a733e8870a7762d1e2 | 8ba766f02d9556f7ab422995b11274a687df45fe | refs/heads/main | 2023-04-22T00:36:27.443559 | 2021-05-01T06:39:22 | 2021-05-01T06:39:22 | 360,877,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,957 | java | package com.company;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) throws IOException {
String[] arg = new String[] {"http://www.mtuci.ru/","1"};
int depth = 0;
try
{
depth = Integer.parseInt(arg[1]);
}
catch (NumberFormatException nfe) {
System.out.println("usage: java Crawler <URL> <depth>");
System.exit(1);
}
LinkedList<URLDepthPair> pendingURLs = new LinkedList<URLDepthPair>();
LinkedList<URLDepthPair> processedURLs = new LinkedList<URLDepthPair>();
URLDepthPair currentDepthPair = new URLDepthPair(arg[0], 0);
pendingURLs.add(currentDepthPair);
ArrayList<String> seenURLs = new ArrayList<String>();
seenURLs.add(currentDepthPair.getURL());
while (pendingURLs.size() != 0) {
URLDepthPair depthPair = pendingURLs.pop();
processedURLs.add(depthPair);
int myDepth = depthPair.getDepth();
LinkedList<String> linksList;
linksList = Crawler.getAllLinks(depthPair);
if (myDepth < depth) {
for (int i=0;i<linksList.size();i++) {
String newURL = linksList.get(i);
if (seenURLs.contains(newURL)) {
continue;
}
else {
URLDepthPair newDepthPair = new URLDepthPair(newURL, myDepth + 1);
pendingURLs.add(newDepthPair);
seenURLs.add(newURL);
}
}
}
}
Iterator<URLDepthPair> iter = processedURLs.iterator();
while (iter.hasNext()) {
System.out.println(iter.next());
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
467079086e222d97de64982d556c52f6886ae556 | d10209fad855d0ac3958d6997886867761bede60 | /src/main/java/com/example/phonebook/repositories/UserAccountRepository.java | 2b8872bb36d8ef32572a315e27c32064ff6b782d | [] | no_license | Boubari97/Simple-Spring-Application | 3549e02f1f30ef5c8c8b8b629250322ab3bc7ee8 | d23e2d3ae17e0ac2874647719b306b660bea4c2c | refs/heads/master | 2022-12-16T12:04:04.624592 | 2020-09-24T14:06:56 | 2020-09-24T14:06:56 | 294,734,670 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 301 | java | package com.example.phonebook.repositories;
import com.example.phonebook.model.UserAccount;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserAccountRepository extends CrudRepository<UserAccount, Long> {
}
| [
"vladimir_ignatev@epam.com"
] | vladimir_ignatev@epam.com |
afe8b7bbc3de810920296d4b5844f2c52eb0a77a | 4cd3fb0d2eb46de081eef41f5e2ec18bf1c9a2c4 | /record-temporal-envers/src/test/java/de/crowdcode/bitemporal/example/AddressAdd2Test.java | 9841941b9d798babab7108f32135e472609b6f71 | [] | no_license | vborisoff/bitemporal-examples | 1cd822399fa53918595fdc5249064f363ebdd15f | 9f7db484fadd82230f5bd23c533f8207a2414e95 | refs/heads/master | 2020-06-04T21:26:09.739401 | 2018-03-23T01:29:28 | 2018-03-23T01:29:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,426 | 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 de.crowdcode.bitemporal.example;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import javax.inject.Inject;
import javax.inject.Named;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
/**
* Unit test for PersonImpl class.
*
* @author Lofi Dewanto
* @since 1.0.0
* @version 1.0.0
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:META-INF/beans.xml" })
@TransactionConfiguration(defaultRollback = false)
@Transactional
public class AddressAdd2Test {
@Inject
@Named("addressService")
private AddressService addressService;
@Inject
@Named("personService")
private PersonService personService;
@Before
public void setUp() throws Exception {
}
@Test
public void testAddSomeAddresses2() {
Person person = personService.findPersonByLastname("Mueller");
Address firstAddress = new AddressImpl();
firstAddress.setPerson(person);
firstAddress.setStreet("Deutschstr. 21");
firstAddress.setCity("Hannover");
firstAddress.setCode("30159");
assertNull(firstAddress.getId());
Address createdAddress1 = addressService.createAddressWithPerson(
firstAddress, person);
assertNotNull(createdAddress1.getId());
}
}
| [
"lofidewanto@gmail.com"
] | lofidewanto@gmail.com |
277adbf847ccce64571b97a240d7f23b720c64a9 | cf21a7f9343f38b48738c48995b1498aec1301ff | /src/main/java/demo/mq/HelloFinder.java | d7b1ca040cebed549d3e11d27cdc9ab08cfead11 | [] | no_license | greenlaw110/act-mq | 99d4413b233ee59612bda551b775190f1bd872a4 | 483271a8262e87c3b9832d9dffd790f3dcc1f42c | refs/heads/master | 2021-07-02T10:01:20.444630 | 2017-09-22T05:30:27 | 2017-09-22T05:30:27 | 104,431,682 | 1 | 0 | null | 2017-09-22T04:32:16 | 2017-09-22T04:32:16 | null | UTF-8 | Java | false | false | 315 | java | package demo.mq;
import act.app.event.AppEventId;
import act.util.AnnotatedClassFinder;
/**
* Created by leeton on 9/20/17.
*/
public class HelloFinder {
@AnnotatedClassFinder(value = Hello.class)
public static void foundStateless(Class<?> cls) {
System.out.printf("Finde hello.class");
}
}
| [
"123456"
] | 123456 |
58036cc4828bea5d798ff14a205f4add594a1bfa | dba559ac98676d3a3947be443b6e365ed24d98f3 | /Card.java | 848ab43e723bc7cf923b75fb7a84a416c7b884f8 | [] | no_license | colinpeterman/pokersimulator | 57297ccba11df1fdebac7520341779e23b9ed588 | 6f6173c79b4dad300db1a03862a011c9f9eadbc5 | refs/heads/main | 2023-03-16T15:02:19.034523 | 2021-03-08T14:32:23 | 2021-03-08T14:32:23 | 345,684,497 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,353 | java | /**
* Implements a playing card with a suit and value, along with methods for
* obtaining those values. The cards are valued with Ace being the lowest,
* which is fine for some games, but wrong for others. Therefore, the ranking
* of the card values is as follows: A 2 3 4 5 6 7 8 9 10 J Q K
*
* @author Norm Krumpe
*
*/
public class Card implements Comparable<Card> {
// Constants for representing the suits
public final static int CLUBS = 0;
public final static int HEARTS = 1;
public final static int SPADES = 2;
public final static int DIAMONDS = 3;
// Constants for representing values of
// ace, jack, queen, and king.
public final static int ACE = 1;
public final static int JACK = 11;
public final static int QUEEN = 12;
public final static int KING = 13;
// Final will keep them from being changed
// after cards are constructed.
private final int value;
private final int suit;
/**
* Constructs a card with a specified suit and value.
*
* @param value
* the value of the card. 2 through 10 are used to specify the
* cards with those corresponding values, and constants exist for
* specifying ace, jack, queen, and king
* @param suit
* the suit of the card. Use one of Card.CLUBS, Card.Hearts,
* Card.SPADES, or Card.DIAMONDS
*/
public Card(int value, int suit) {
if (value < ACE || value > KING) {
throw new IllegalArgumentException("Illegal card value: " + value);
}
if (suit < CLUBS || suit > DIAMONDS) {
throw new IllegalArgumentException("Illegal card suit: " + suit);
}
this.value = value;
this.suit = suit;
}
/**
* Constructs a new card with the same value and suit as the original.
* @param original the card to be copied
*/
public Card(Card original) {
this(original.value, original.suit);
}
/**
* Gets this card's suit.
*
* @return the suit of this card
*/
public int getSuit() {
return suit;
}
/**
* Gets this card's value
*
* @return the value of this card
*/
public int getValue() {
return value;
}
/**
* Gets a letter representing the suit
*
* @return a single letter, either "C", "H", "S", or "D", representing
* clubs, hearts, spades, and diamonds respectively
*/
private String getSuitString() {
return "" + "CHSD".charAt(suit);
}
/**
* Gets a one- or two-character string representing the value
*
* @return either "2" through "10" or "A", "J", "Q", or "K"
*/
private String getValueString() {
return "A 2 3 4 5 6 7 8 9 10J Q K ".substring(2 * (value - 1), 2 * value).trim();
}
/**
* Returns whether two cards have the same suit and value
*
* @param other
* the other object to be compared
* @return true if the other object is a card with the same suit and value
* as this card
*/
public boolean equals(Object other) {
if (!(other instanceof Card))
return false;
if (this == other) {
return true;
}
Card that = (Card) other;
return this.suit == that.suit && this.value == that.value;
}
/**
* Returns a String representation of this card, by combining its value and
* suit (see getValueString() and getSuitString)
*
* @return a 2- or 3-character representation of this card (such as "JD" for
* the jack of diamonds, or "10H" for the 10 of hearts
*/
public String toString() {
return getValueString() + getSuitString();
}
/**
* Compares this card to another, returning an int to indicate
* whether this card is smaller than, equal to, or greater than the
* other card. A card with a lower value is considered smaller. If
* two cards have the same value, then they are compared by suits,
* with clubs being the smallest, then hearts, then spades, then diamonds.
*
* @param other the other Card being compared to this card
* @return a negative integer if this card is smaller, 0 if this card is
* equal, and a positive integer if this card is larger
*/
public int compareTo(Card other) {
if (this.value == other.value)
return this.suit - other.suit;
else
return this.value - other.value;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
ed07f33ebc758634fe22b0e3d9711414822ddc89 | bf80b2240787d1f3f6b422dab1f6a7bc8287586e | /src/main/java/com/springboot/SpringBootBasicWithDurbyDbApplication.java | 7485e258f6340a5efca23a55e2551e7e5d2db729 | [] | no_license | JeetKhatri/SpringBoot-with-durby-db | 43623f0a10d705f1357c3812a95ad24379070ec3 | dc64e6de6506fcfe53a67be3a9cb8488a32e98bc | refs/heads/master | 2020-04-01T13:08:49.346719 | 2018-10-16T07:31:34 | 2018-10-16T07:31:34 | 153,238,542 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 380 | java | /***
* @author Jeet Khatri
*/
package com.springboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootBasicWithDurbyDbApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootBasicWithDurbyDbApplication.class, args);
}
}
| [
"jeet.g.khatri@gmail.com"
] | jeet.g.khatri@gmail.com |
0fe7165592b9d7feb307883d114dbf6268bbdac1 | 349a98366f04cdf749e7f874895e74c4194d04c1 | /src/JavaPractice/Pattern/SquarePattern.java | 1b4b66e994c730e43590b8f38249d2163c2335d5 | [] | no_license | TanyaDrona29/JavaPractice | c4638e3ae471de408758061bd16a0fb3ac6fecb8 | 07f0695cb146e698acba29b0c6e2f301bb99070b | refs/heads/master | 2023-06-06T01:03:58.806202 | 2021-06-30T11:24:16 | 2021-06-30T11:24:16 | 334,402,364 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | package JavaPractice.Pattern;
import java.util.Scanner;
public class SquarePattern {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("enter the size of square");
int size = scanner.nextInt();
for (int i = 0; i <size ; i++) {
for (int j = 0; j <size ; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
| [
"tanya.drona_ccv18@gla.ac.in"
] | tanya.drona_ccv18@gla.ac.in |
09b1f074835aa723e1c26d4a1a69586fe81494c5 | 6a47eadbc295cd27543cc67b629abac158ab7c77 | /Loops1/src/loops/problem22.java | 288b03bc7e056ea7fc3b6d62f097f65eabc18e58 | [] | no_license | MeghanaPentyala/180030508_S5 | 622348894b7854c066600dec2d42c1ae73aacc53 | 00d15af08aa7e004cde71c57f222b08922bbd9d2 | refs/heads/master | 2023-04-22T11:33:35.772652 | 2021-05-12T06:32:44 | 2021-05-12T06:32:44 | 366,263,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 600 | java | package loops;
import java.util.Scanner;
public class problem22 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int k=sc.nextInt();
int n=sc.nextInt();
int a[]=new int[n];
int c=0;
for(int i=0;i<n;i++)
{
a[i]=sc.nextInt();
}
for(int i=0;i<n;i++)
{
if(a[i]==k)
{
System.out.println("Found at index"+i);
c=1;
break;
}
else
{
c=0;
}
}
if(c==0)
{
System.out.println(-1);
}
sc.close();
}
}
| [
"pentyala@DESKTOP-LSM7JP5"
] | pentyala@DESKTOP-LSM7JP5 |
3e8d5b72b6766ed8e8d64f9de4fb8d089ba3a076 | 9054700d027a85b601a4ac4e4a688b4af442ca99 | /src/main/java/paquete/Ej04.java | 488a712126aaad902373f35477849131a432498b | [] | no_license | RubenVS97/EjU3SelecRubenVS | 6dae72352d92ed09fef34c810055e3241da8e0de | 9ff6cb250204a9c45eda696e6a0871fa6ca5acfd | refs/heads/master | 2023-08-21T09:32:51.483829 | 2021-10-20T08:59:17 | 2021-10-20T08:59:17 | 419,251,701 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 814 | 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 ruben;
import java.util.Scanner;
/**
*
* @author diabl
*/
public class Ej04 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("escanear edad:");
int edad = scanner.nextInt();
System.out.println((edad >= 18)? "Es mayor de edad":"Es menor de edad");
/*if (edad >= 18) {
System.out.println("Es mayor de edad");
} else {
System.out.println("No es mayor de edad");
}
System.out.print("mostrar la edad: ");
System.out.println(edad);*/
}
}
| [
"rub3nvs97@gmail.com"
] | rub3nvs97@gmail.com |
d827a7cea32810f68755a420c2a728040ad42316 | 60236fe9bb7d0d59baa8059d8d1dfd8e6b4a40a1 | /app/src/main/java/com/squidswap/songshare/songshare/TrackDetails.java | afd06c927288e51955a0ba3df478531cdd889f65 | [] | no_license | Maxx730/songshare-v2 | 10e32d51757fba1d1805cc1c8d4074a74eea8eba | 2262a2e6ec41acdaac9444907559e17b6b87edf8 | refs/heads/master | 2020-04-11T14:09:17.553538 | 2019-01-16T19:04:07 | 2019-01-16T19:04:07 | 161,843,227 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 584 | java | package com.squidswap.songshare.songshare;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class TrackDetails extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getSupportActionBar().hide();
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.track_details);
}
}
| [
"max.kinghorn@gmail.com"
] | max.kinghorn@gmail.com |
f1537e0ab16bf31e8acf2a7682814207e788c265 | a555c47a5da1c5da300544964587e72d4818104c | /spring-security-authorize/src/main/java/com/spring/security/rbac/dto/AdminCondition.java | f26485c5943accf0bf6eabbc767e4ca09fb0265d | [] | no_license | timeday/spring-security | a357ca5b639e868c16ba7923def22913f78b1244 | 07fc7d5b591c78c528a6ca2119d5dac1b5241b49 | refs/heads/master | 2020-04-24T02:27:50.273454 | 2019-02-21T01:59:55 | 2019-02-21T01:59:55 | 171,637,402 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 326 | java | /**
*
*/
package com.spring.security.rbac.dto;
public class AdminCondition {
private String username;
/**
* @return the username
*/
public String getUsername() {
return username;
}
/**
* @param username the username to set
*/
public void setUsername(String username) {
this.username = username;
}
}
| [
"hongwei.zhang@maobc.com"
] | hongwei.zhang@maobc.com |
701af97684bd97d5837fe059b61d81fb50655863 | d04403e843c3f4e922262d6b76c02b5b265cf738 | /ptc-api/src/main/java/com/kinancity/api/errors/FatalException.java | 1dc878185b6bb80c3d32aec1d6e82ab150d4c292 | [
"Apache-2.0"
] | permissive | drallieiv/KinanCity | eb0e942d4a0e590b94bc78d9b1d448c57f5359f3 | 0e7631cb8f6963ef5e1602d4356c1af12b053299 | refs/heads/develop | 2023-08-17T01:51:20.408773 | 2023-08-09T00:21:24 | 2023-08-09T00:21:24 | 85,866,226 | 125 | 92 | Apache-2.0 | 2023-08-17T21:57:03 | 2017-03-22T19:09:31 | Java | UTF-8 | Java | false | false | 468 | java | package com.kinancity.api.errors;
/**
* Something blocked account creation, there is no need to retry
*
* @author drallieiv
*
*/
public class FatalException extends AccountCreationException {
private static final long serialVersionUID = -1173353148853930289L;
public FatalException(String msg) {
super(msg);
}
public FatalException(String msg, Throwable cause) {
super(msg, cause);
}
public FatalException(Throwable cause) {
super(cause);
}
}
| [
"knabyss@gmail.com"
] | knabyss@gmail.com |
5ab1cd6e2d27cec0d8958f9d663116ffbf3d0764 | 0f9dece1f677fc94fd062b4fa9dca6a5119a86c7 | /MarkIVClient.java | 61f2fc80e5ea7d2344223984a7c23c015b7d185a | [] | no_license | nhanvo1297/The-coffee-Maker | b3a451fcff3d739f768ad7cd1b4204db6ca2a3c3 | 1be599400d8798d153abd81f1b2527b09ed2260c | refs/heads/master | 2020-11-24T18:46:28.957145 | 2019-12-16T03:47:58 | 2019-12-16T03:47:58 | 228,297,156 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,702 | java | /* This is the main client to test the coffee maker
* @author Nhan Vo
*/
import CoffeeMaker.CoffeeMaker;
import CoffeeMakerAPI.CoffeeMakerAPI;
import CoffeePot.*;
public class MarkIVClient{
public static void print(String s) {
System.out.println(s);
}
public static void MorningRoutingCoffee(CoffeeMakerAPI api, CoffeeMaker markiv) throws InterruptedException {
print("\nA. Coffee Lay makes a coffee cup in the morning routing.\n");
api.putEmptyPotOnWarmer(); // Coffee lady put pot on warmer.
api.fillBoilerWithWater(); // coffee lady fill water into boiler
api.putFilterAndCoffeeGroundIntoFilterHolder(); // put coffee ground onto filter holder
api.loadFilterHolderIntoReceptacle(); // load filter holder into receptacle
api.selectCoffeeStrength(1); // select the coffee strength
api.pressBrewButton(); // press brew button
markiv.getUpdate(api);
markiv.Brewing(9); // start brew with interrupt 3/4
api.liftPotFromWarmer(); // lift pot
api.interruptBrewing(9); // interrupt brewing 3/4
markiv.stopBrewingCycle(); // stop brewing
markiv.getUpdate(api);
api.pourCoffeeCup(); // pour coffee to a cup
Extra ex = new Extra("Whip",3.99);
api.addExtra(ex);
api.printCost(); // print cost
Thread.sleep(1000);
print("Coffee Lady rush to work ....... ");
System.out.println("--------------------");
}
public static void EveCoffeeWithFriend(CoffeeMakerAPI api,CoffeeMaker markiv) throws InterruptedException {
print("\n\nB. The coffee lady invited a friend over for coffee.\n");
api.putEmptyPotOnWarmer();
api.fillBoilerWithWater();
api.putFilterAndCoffeeGroundIntoFilterHolder();
api.loadFilterHolderIntoReceptacle();
api.selectCoffeeStrength(0);
api.pressBrewButton();
markiv.getUpdate(api);
markiv.Brewing(3);
api.liftPotFromWarmer();
api.interruptBrewing(3);
markiv.stopBrewingCycle();
markiv.getUpdate(api);
api.pourCoffeeCup();
api.returnCoffeePot();
Extra ex = new Extra("Cinnamon",3.99);
api.addExtra(ex);
print("Coffee lady made a cup off coffee for herself");
api.printCost();
markiv.getUpdate(api);
markiv.resumeBrewingCycle();
markiv.DoneBrewing();
api.pourCoffeeCup();
Extra ex1 = new Extra("Mocha",5.0);
api.addExtra(ex1);
print("Coffee lady made a cup of coffee for her friend.");
api.printCost();
}
public static void main(String[] args) throws InterruptedException {
CoffeeMakerAPI api = new CoffeeMakerAPI();
CoffeeMaker markiv = new CoffeeMaker(api);
print("\n\nExpected deliverable:");
MorningRoutingCoffee(api,markiv);
EveCoffeeWithFriend(api,markiv);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
37bcff0eebe0ad40de398e0cc5ad028621d4d998 | f5e5898491a36b1cfe284e56473112670ce08e84 | /elasticsearch-demo/src/main/java/com/example/elasticsearchdemo/es/IElasticService.java | d383ca2e6ed04cc103ac4efe1bebfded29168773 | [] | no_license | anicake/SpringBoot | 7b2f80da1ba3d80843a4fb12364812063e5b89e0 | cead0c8d1c870ec24b8fe01a5e052c1a923ca277 | refs/heads/master | 2022-11-14T16:26:02.912570 | 2020-03-29T10:55:33 | 2020-03-29T10:55:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 591 | java | package com.example.elasticsearchdemo.es;
import com.example.elasticsearchdemo.es.DocBean;
import org.springframework.data.domain.Page;
import java.util.Iterator;
import java.util.List;
public interface IElasticService {
void createIndex();
void deleteIndex(String index);
void save(DocBean docBean);
void saveAll(List<DocBean> list);
Iterator<DocBean> findAll();
Page<DocBean> findByContent(String content);
Page<DocBean> findByFirstCode(String firstCode);
Page<DocBean> findBySecordCode(String secordCode);
Page<DocBean> query(String key);
}
| [
""
] | |
e82595c85ca7397a8b859b480591c9c0c6eff52f | 493a8065cf8ec4a4ccdf136170d505248ac03399 | /net.sf.ictalive.coordination.tasks.diagram/src/net/sf/ictalive/coordination/tasks/diagram/edit/policies/ControlConstructListCanonicalEditPolicy.java | 5b77ae92c1af1d98008f91595bf696df42d9c41d | [] | no_license | ignasi-gomez/aliveclipse | 593611b2d471ee313650faeefbed591c17beaa50 | 9dd2353c886f60012b4ee4fe8b678d56972dff97 | refs/heads/master | 2021-01-14T09:08:24.839952 | 2014-10-09T14:21:01 | 2014-10-09T14:21:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 700 | java | package net.sf.ictalive.coordination.tasks.diagram.edit.policies;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
public class ControlConstructListCanonicalEditPolicy extends
CanonicalEditPolicy {
/**
* @generated
*/
protected List getSemanticChildrenList() {
return Collections.EMPTY_LIST;
}
/**
* @generated
*/
protected boolean isOrphaned(Collection semanticChildren, final View view) {
return false;
}
/**
* @generated
*/
protected String getDefaultFactoryHint() {
return null;
}
}
| [
"salvarez@lsi.upc.edu"
] | salvarez@lsi.upc.edu |
c9e4e444610340439e3414a09d7604e9f9b01504 | 742855650b030d62cc8a1159027f135523031b89 | /mFCalendarView/src/main/java/com/mustafaferhan/ExpandableHeightGridView.java | bfcd2c042936a07af41b48b5a85fc62e5944bb04 | [
"Apache-2.0"
] | permissive | jungho-shin/SIHSchool | bf3b14bdd23e922f3b5443040c4675d809881b0a | 9226f57c2efb388b25c6937a3751b400c706fe6a | refs/heads/master | 2021-01-12T14:50:09.527901 | 2017-05-24T09:02:28 | 2017-05-24T09:02:28 | 72,102,062 | 4 | 6 | null | null | null | null | UTF-8 | Java | false | false | 1,461 | java | package com.mustafaferhan;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.GridView;
public class ExpandableHeightGridView extends GridView
{
boolean expanded = false;
public ExpandableHeightGridView(Context context)
{
super(context);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs)
{
super(context, attrs);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs,
int defStyle)
{
super(context, attrs, defStyle);
}
public boolean isExpanded()
{
return expanded;
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
if (isExpanded())
{
// Calculate entire height by providing a very large height hint.
// View.MEASURED_SIZE_MASK represents the largest height possible.
int expandSpec = MeasureSpec.makeMeasureSpec(MEASURED_SIZE_MASK,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
ViewGroup.LayoutParams params = getLayoutParams();
params.height = getMeasuredHeight();
}
else
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
public void setExpanded(boolean expanded)
{
this.expanded = expanded;
}
} | [
"taos9938@gmail.com"
] | taos9938@gmail.com |
b939a45bb6ea0908df6d4a4155fae8463c60ae11 | ee2ba838637cabfd0d1de645a1b6959e05205475 | /meta2/ficheiros_teste/Factorial.java | e24a3852854e6d65c26df6f533b6558e1c0fc0f3 | [] | no_license | renamfm/jucompiler | 1d17fc7ab619548e7284ff0253f098c10ac6fbeb | bf22f1d70728b8180e0d321690ff5c7ff68a6901 | refs/heads/master | 2022-12-26T23:36:08.537256 | 2020-10-14T18:35:56 | 2020-10-14T18:35:56 | 250,013,573 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 325 | java | class Factorial {
public static int factorial(int n) {
if (n == 0)
return 1;
return n * factorial(n-1);
}
public static void main(String[] args) {
int argument;
argument = Integer.parseInt(args[0]);
System.out.printf(factorial(argument));
}
}
| [
"noreply@github.com"
] | noreply@github.com |
05137f3e62c1d7e661bf3a34842875f0fe11ec42 | 7cf02ef05d6b60b786b2c8237d3bc802d9fe1c53 | /assessment/src/main/java/com/hybrit/assessment/dao/ProductDao.java | 14904fb1bdebd8ff5dc21ecca1a2d8591a35d235 | [] | no_license | TimHermens/HybrITAssessment | deeed1c4ce2bba5039c41a07efa5a8676e1b7df0 | 4d14a587dab6bacdc4de516859dd4ca6a93b999f | refs/heads/master | 2021-05-04T13:04:03.545172 | 2018-02-05T23:06:29 | 2018-02-05T23:06:29 | 120,307,035 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package com.hybrit.assessment.dao;
import com.hybrit.assessment.model.Product;
import java.util.List;
/**
*
* @author Tim
*/
public interface ProductDao {
Product save(Product product);
Product find(int id);
Product find(String name);
List<Product> findAll();
List<Product> findCrystals();
}
| [
"tim.hermens@student.fontys.nl"
] | tim.hermens@student.fontys.nl |
0371692999a7ad6b5c067c536312f1f3bcfc8405 | 4c8843c31767c2229a8391b035821546aac0c792 | /TCC/src/Bean/PerguntaJogadaBean.java | fc8cf8835ed158ae22acc0aad13b48faf37f2f47 | [] | no_license | VictorioDev/projeto-TCC | 444a3d3c688c7ef1832d58af2f482ba8bda6e43a | 74a019676352ad4480b8432d3e9f7bee8d857d93 | refs/heads/master | 2021-01-10T18:46:19.350599 | 2015-12-22T18:37:31 | 2015-12-22T18:37:31 | 41,092,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,648 | 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 Bean;
/**
*
* @author user
*/
public class PerguntaJogadaBean {
private float tempo;
private int pontos;
private JogadorBean jogador;
private PerguntaBean pergunta;
private boolean acertou;
/**
* @return the tempo
*/
public float getTempo() {
return tempo;
}
/**
* @param tempo the tempo to set
*/
public void setTempo(float tempo) {
this.tempo = tempo;
}
/**
* @return the pontos
*/
public int getPontos() {
return pontos;
}
/**
* @param pontos the pontos to set
*/
public void setPontos(int pontos) {
this.pontos = pontos;
}
/**
* @return the jogador
*/
public JogadorBean getJogador() {
return jogador;
}
/**
* @param jogador the jogador to set
*/
public void setJogador(JogadorBean jogador) {
this.jogador = jogador;
}
/**
* @return the pergunta
*/
public PerguntaBean getPergunta() {
return pergunta;
}
/**
* @param pergunta the pergunta to set
*/
public void setPergunta(PerguntaBean pergunta) {
this.pergunta = pergunta;
}
/**
* @return the acertou
*/
public boolean isAcertou() {
return acertou;
}
/**
* @param acertou the acertou to set
*/
public void setAcertou(boolean acertou) {
this.acertou = acertou;
}
}
| [
"luizao.cp13@gmail.com"
] | luizao.cp13@gmail.com |
8e02cef33fbfca82837f5449a460431391da63e5 | b1a30a923f93a60bc55f4e3b0568b88ef5f17f0c | /src/main/java/com/greeting/util/EndpointConstants.java | 721a4515135c5fe23014d8ec5529f880156acfa9 | [] | no_license | const-ch/greeting-web-app | c843ca8d39e1baa0dc8af5bf5d5250838fa21995 | d28f38332ac8c7f1dca15904ef26f295d07fffdb | refs/heads/master | 2022-12-21T01:17:01.722892 | 2020-04-05T20:24:38 | 2020-04-05T20:24:38 | 253,313,751 | 0 | 0 | null | 2020-10-13T20:56:28 | 2020-04-05T19:19:58 | Java | UTF-8 | Java | false | false | 477 | java | package com.greeting.util;
public class EndpointConstants {
public static final String GREETING_PATH = "/greeting";
public static final String PERSONAL_ACCOUNT_PATH = "/account/{account}/id/{id}";
public static final String BUSINESS_ACCOUNT_PATH = "/account/{account}/business/{business}";
public static final String ACCOUNT_PARAM = "account";
public static final String ID_PARAM = "id";
public static final String BUSINESS_TYPE_PARAM = "business";
}
| [
"kostiantyn.chernovol@netent.com"
] | kostiantyn.chernovol@netent.com |
589b92a578fae231cff382de948949152e843cfa | cfd1b6c0328fbbe033d24bc2c1c728a3a6a72d78 | /src/main/java/com/hussam/inventory/inventory/entities/User.java | 92026edab1453f36a50c8768e4c6a62a5489c5a9 | [] | no_license | hussamasfour/ecommerce-RESTful-api | 839748577f4cac55077903c94ad2fbe102e58ac9 | 41569d676902a8eef300799a9aeaee36de62f3a4 | refs/heads/master | 2023-02-15T17:26:09.952217 | 2021-01-07T17:38:18 | 2021-01-07T17:38:18 | 324,592,549 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,382 | java | package com.hussam.inventory.inventory.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.NaturalId;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.util.*;
@Entity
@Table(name = "users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotEmpty(message = "First name must be not empty")
private String firstname;
@NotEmpty(message = "Last name must be not empty")
private String lastName;
private String mobile;
@NotEmpty(message = "Username must be not empty")
@Column(name = "username", unique = true)
@Pattern(regexp = "^[A-Za-z]\\w{5,29}$", message = "username is not valid")
private String username;
@JsonIgnore
@NotEmpty(message = "Password can't be empty")
private String password;
@NaturalId
@NotEmpty(message = "Email must be not empty")
@Email(message = "Email should be a valid email")
@Column(name = "email", unique = true)
private String email;
@Temporal(TemporalType.TIMESTAMP)
private Date createdTime;
@JsonIgnore
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name="user_roles",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "role_id"))
private Set<Role> roles = new HashSet<>();
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
private Cart cart;
public User() {
}
public User(String username, String password, String email, Date createdAt, String firstname, String lastName, String mobile) {
this.username = username;
this.password = password;
this.email = email;
this.createdTime = createdAt;
this.firstname = firstname;
this.lastName = lastName;
this.mobile = mobile;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Set<Role> getRoles() {
return roles;
}
public void setRoles(Set<Role> roles) {
this.roles = roles;
}
public Cart getCart() {
return cart;
}
public void setCart(Cart cart) {
this.cart = cart;
}
}
| [
"hussam_asfour@yahoo.com"
] | hussam_asfour@yahoo.com |
1aa72927b97c12ef62b8027fbf3c640439e5589b | 185d68efebdf0ce0836450beea8690a1c84d0b78 | /WEB-INF/src/com/nitin/action/admin/CreateUser.java | 0952b72fc98716c51e9d426bbc2053bbec461e44 | [] | no_license | codevic/Curb_Attacks_PGRP | 4dc7f425803c11359e3ee5dccdc083f03164419a | f969fb74716c8ab0c28ad0c76c8c84daa61cdba6 | refs/heads/master | 2020-06-19T13:12:23.109215 | 2016-11-27T17:57:12 | 2016-11-27T17:57:12 | 74,902,836 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,480 | java | /**
*
*/
package com.nitin.action.admin;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.nitin.dao.AdminDAO;
public class CreateUser extends HttpServlet
{
public void doPost(HttpServletRequest request,HttpServletResponse response)throws IOException
{
PrintWriter out=response.getWriter();
try
{
String uname=request.getParameter("uname");
String uid=request.getParameter("uid");
String upass=request.getParameter("upass");
String city=request.getParameter("city");
String state=request.getParameter("state");
String email=request.getParameter("email");
AdminDAO adminDAO=AdminDAO.getInstance();
boolean result=adminDAO.loginCheck(uid);
if(!result)
{
if(adminDAO.createUser(uname, uid, upass, city, state, email))
response.sendRedirect(request.getContextPath()+"/res/JSP/Admin/create.jsp?no=2");
else
response.sendRedirect(request.getContextPath()+"/res/JSP/Admin/create.jsp?no=3");
}
else
{
response.sendRedirect(request.getContextPath()+"/res/JSP/Admin/create.jsp?no=1");
}
}
catch(Exception e)
{
System.out.println("Error in AdminLogin Servlet................."+e);
out.println("Error in AdminLogin Servlet.................");
}
}
} | [
"vaibhavsoni.pesit@gmail.com"
] | vaibhavsoni.pesit@gmail.com |
4e06fb991fec86560d086ea3a2b016c692dcfadc | e2e1f6c3316482fab8d6d07606f1104ff00c85cf | /Arena-Masters-master/src/MyGame/UsersLoginJf.java | 46f4ff96858af303746797327007a9180ecace2b | [] | no_license | KyriakiPot/Arena-Masters | 5e3cd5bdee7d464dcc57c5c42ea2b3b1e47d998b | 9b089f36041c0b8616d6596d9d05f5bbb4adabd8 | refs/heads/main | 2023-03-14T00:54:08.856495 | 2021-02-26T06:43:09 | 2021-02-26T06:43:09 | 342,485,885 | 0 | 0 | null | null | null | null | ISO-8859-7 | Java | false | false | 7,588 | java | package MyGame;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.sound.sampled.Clip;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JSeparator;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
public class UsersLoginJf extends JFrame {
private JPanel contentPane;
private JFrame jframe;
private HeroesCatalog fullHeroesCatalog;
private UserCatalog aUserCatalog;
private BufferedImage image;
private JTextField UserNameTxt1;
private JTextField UserNameTxt2;
private JPasswordField passwordTxt1;
private JPasswordField passwordTxt2;
private JButton Back,StartGame,Music;
private int temp = 1 ;
private JLabel Error;
private boolean er=false;
private User user1;
private User user2;
public UsersLoginJf(UserCatalog aUserCatalog,HeroesCatalog fullHeroesCatalog) {
this.fullHeroesCatalog=fullHeroesCatalog;
this.aUserCatalog=aUserCatalog;
setResizable(false);
jframe = new JFrame();
jframe.setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 700, 500);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new BorderLayout(0, 0));
setContentPane(contentPane);
try {
image = ImageIO.read(new File("Background.png"));
} catch (IOException e) {
e.printStackTrace();
}
jframe.getContentPane().setLayout(null);
JLabel Player1 = new JLabel("Player 1");
Player1.setForeground(Color.BLUE);
Player1.setBackground(Color.LIGHT_GRAY);
Player1.setFont(new Font("Harlow Solid Italic", Font.PLAIN, 25));
Player1.setBounds(90, 130, 90, 30);
jframe.getContentPane().add(Player1);
JLabel Player2 = new JLabel("Player 2");
Player2.setForeground(new Color(220, 20, 60));
Player2.setBackground(Color.LIGHT_GRAY);
Player2.setFont(new Font("Harlow Solid Italic", Font.PLAIN, 25));
Player2.setBounds(430, 130, 90, 30);
jframe.getContentPane().add(Player2);
ImageIcon a = new ImageIcon("Music.png");
Music = new JButton(a);
Music.setBackground(new Color(192, 192, 192));
Music.setBounds(635, 60, 50, 30);
jframe.getContentPane().add(Music);
Back = new JButton("BACK");
Back.setBackground(new Color(192, 192, 192));
Back.setFont(new Font("Lucida Handwriting", Font.PLAIN, 16));
Back.setBounds(10, 60, 95, 30);
jframe.getContentPane().add(Back);
JLabel UserName1 = new JLabel("UserName :");
UserName1.setBackground(Color.LIGHT_GRAY);
UserName1.setForeground(Color.BLUE);
UserName1.setFont(new Font("Lucida Handwriting", Font.PLAIN, 15));
UserName1.setBounds(10, 190, 120, 25);
jframe.getContentPane().add(UserName1);
UserNameTxt1 = new JTextField();
UserNameTxt1.setForeground(Color.BLUE);
UserNameTxt1.setFont(new Font("Times New Roman", Font.PLAIN, 20));
UserNameTxt1.setBackground(Color.WHITE);
UserNameTxt1.setBounds(120, 190, 120, 25);
jframe.getContentPane().add(UserNameTxt1);
UserNameTxt1.setColumns(15);
JLabel UserName2 = new JLabel("UserName :");
UserName2.setForeground(new Color(220, 20, 60));
UserName2.setFont(new Font("Lucida Handwriting", Font.PLAIN, 15));
UserName2.setBackground(Color.LIGHT_GRAY);
UserName2.setBounds(350, 190, 120, 25);
jframe.getContentPane().add(UserName2);
UserNameTxt2 = new JTextField();
UserNameTxt2.setForeground(new Color(220, 20, 60));
UserNameTxt2.setFont(new Font("Times New Roman", Font.PLAIN, 20));
UserNameTxt2.setBackground(Color.WHITE);
UserNameTxt2.setBounds(460, 190, 120, 25);
jframe.getContentPane().add(UserNameTxt2);
UserNameTxt2.setColumns(15);
JLabel Password1 = new JLabel("PassWord :");
Password1.setForeground(Color.BLUE);
Password1.setFont(new Font("Lucida Handwriting", Font.PLAIN, 15));
Password1.setBackground(Color.LIGHT_GRAY);
Password1.setBounds(10, 240, 120, 25);
jframe.getContentPane().add(Password1);
JLabel Password2 = new JLabel("Password :");
Password2.setForeground(new Color(220, 20, 60));
Password2.setFont(new Font("Lucida Handwriting", Font.PLAIN, 15));
Password2.setBackground(Color.LIGHT_GRAY);
Password2.setBounds(350, 240, 120, 25);
jframe.getContentPane().add(Password2);
passwordTxt1 = new JPasswordField();
passwordTxt1.setForeground(Color.BLUE);
passwordTxt1.setBackground(Color.WHITE);
passwordTxt1.setBounds(120, 240, 120, 25);
jframe.getContentPane().add(passwordTxt1);
passwordTxt2 = new JPasswordField();
passwordTxt2.setForeground(new Color(220, 20, 60));
passwordTxt2.setBackground(Color.WHITE);
passwordTxt2.setBounds(460, 240, 120, 25);
jframe.getContentPane().add(passwordTxt2);
StartGame = new JButton("START GAME");
StartGame.setFont(new Font("Lucida Handwriting", Font.PLAIN, 15));
StartGame.setBackground(Color.LIGHT_GRAY);
StartGame.setBounds(499, 400, 140, 25);
jframe.getContentPane().add(StartGame);
Error = new JLabel("Username or Password is wrong!");
Error.setForeground(Color.WHITE);
Error.setFont(new Font("Times New Roman", Font.PLAIN, 17));
Error.setBackground(Color.WHITE);
Error.setBounds(90, 400, 250, 20);
jframe.getContentPane().add(Error);
Error.setVisible(false);
JLabel picLabel = new JLabel(new ImageIcon(image));
picLabel.setBounds(0, 0, 700, 500);
jframe.getContentPane().add(picLabel);
jframe.repaint();
ButtonListener listener = new ButtonListener();
Back.addActionListener(listener);
StartGame.addActionListener(listener);
Music.addActionListener(listener);
jframe.setBounds(100, 100, 700, 500);
jframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
jframe.setVisible(true);
contentPane.setVisible(true);
}
public void paint(Graphics g) {
super.paint(g);
g.drawImage(image, 0, 0, null);
}
class ButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
//αποθήκευση ,στις παρακάτω μεταβλητές , τα συμπληρωμένα στοιχεία
String name1 = UserNameTxt1.getText();
String password1 = passwordTxt1.getText();
String name2 = UserNameTxt2.getText();
String password2 = passwordTxt2.getText();
if(e.getSource() == Back) {
new MainMenuJf();
jframe.dispose();
}
else if(e.getSource() == StartGame){
user1= aUserCatalog.searchUserWithData(name1, password1);
user2= aUserCatalog.searchUserWithData(name2, password2);
//εφόσον βρεθούν οι χρήστες ανοίγει η επόμενη οθόνη
if(user1!=null && user2!=null){
new SelectHeroJf(aUserCatalog, fullHeroesCatalog, user1, user2);
jframe.dispose();
}
else{
Error.setVisible(true);
}
}
else if(e.getSource() == Music){
Clip play = (new Music()).getClip();
if(temp==1){
play.stop();
temp=0;
}
else{
temp=1;
(new Music()).start();
}
}
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
f1a6984faddda939cd92dee63a7eb98670226bc1 | 34d9057aa9c7c261c837912d88e274a5a83ec919 | /app/src/main/java/com/example/myapplication/model/MyWorker.java | c8eb1d68a19203b77995dc97f11f9908ef500ec1 | [] | no_license | Jaimin-Bhut/traineeApp | d29dcc69913d773a25857dcb99c8fec49d019c6c | 1924d5ab76fc58a5edc79de54eef699b83c678c9 | refs/heads/master | 2020-07-28T03:29:39.525151 | 2019-09-18T11:46:15 | 2019-09-18T11:46:15 | 208,774,804 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 656 | java | package com.example.myapplication.model;
import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
public class MyWorker extends Worker {
private static final String TAG = "MyWorker";
public MyWorker(@NonNull Context appContext, @NonNull WorkerParameters workerParams) {
super(appContext, workerParams);
}
@NonNull
@Override
public Result doWork() {
Log.d(TAG, "Performing long running task in scheduled job");
// TODO(developer): add long running task here.
return Result.success();
}
} | [
"bhutjem@gmail.com"
] | bhutjem@gmail.com |
911a7573d7a2b407cdd69c045704db09a1cc1e34 | 5b6022caa83df535defa29d2feab6b1f3c850925 | /src/com/swa/oop4/Test.java | 06534427a08502302a88ff5b4ad2c21642ecc221 | [] | no_license | Lechiana/SWA3-1 | 30cd6dbedbd11af628489852d34ad9c4b198f5df | efefc5b03bdeeb0c28edc8d10c3233dde7f943fc | refs/heads/main | 2023-06-25T16:08:02.202015 | 2021-07-19T07:56:25 | 2021-07-19T07:56:25 | 387,384,311 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 408 | java | package com.swa.oop4;
public class Test {
public static void main(String args[])
{
ObjectPassDemo ob1 = new ObjectPassDemo(100, 22);
ObjectPassDemo ob2 = new ObjectPassDemo(100, 22);
ObjectPassDemo ob3 = new ObjectPassDemo(-1, -1);
System.out.println("ob1 == ob2: " + ob1.equalTo(ob2));
System.out.println("ob1 == ob3: " + ob1.equalTo(ob3));
}
}
| [
"tayneedanime@gmail.com"
] | tayneedanime@gmail.com |
e84a6084e88f1f7f1e3b562d10c6275d06785b6f | da951782db647bab864c1444725c20cf929c39ec | /cargame-viewer-client/src/main/java/br/edu/cesufoz/cargame/viewerclient/MainViewerClient.java | 387cdaa4d4687cd30c1abf6d92262d91e8556b82 | [] | no_license | digows/cargame | c3fa34178df271524763541684b593a2ed0d3f82 | 2463ee1f5cc7b42ac0a79d4eeb9286a70142d56a | refs/heads/master | 2020-06-06T09:11:30.114766 | 2013-03-25T21:53:00 | 2013-03-25T21:53:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,171 | java | package br.edu.cesufoz.cargame.viewerclient;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import br.edu.cesufoz.cargame.viewerclient.managers.LocalServerSocketManager;
import br.edu.cesufoz.cargame.viewerclient.managers.ViewerSocketManager;
/**
*
* @author rodrigofraga
*/
public class MainViewerClient
{
/**
*
*/
private Set<LocalServerSocketManager> localServerSocketManagers = new HashSet<>();
/**
* @param args
* @throws InterruptedException
* @throws IOException
* @throws UnknownHostException
*/
public static void main(String[] args) throws InterruptedException, UnknownHostException, IOException
{
final String viewerServerName = args.length > 0 && args[0] != null ? args[0] : "127.0.0.1";
final int viewerServerPort = args.length > 0 && args[1] != null ? Integer.valueOf(args[1]) : 6969;
final MainViewerClient mainClient = new MainViewerClient();
mainClient.connectToViewer(viewerServerName, viewerServerPort);
final Scanner scanner = new Scanner( System.in );
String localServer;
int localServerPort;
while ( true )
{
System.out.println("Please, set the local server ADDRESS:");
localServer = scanner.nextLine();
System.out.println("Please, set the local server PORT:");
localServerPort = Integer.valueOf(scanner.nextLine());
if ( localServer != null && localServerPort != 0 )
{
mainClient.connectToLocalServer(localServer, localServerPort);
}
System.out.println("=====================================");
Thread.sleep(2000);
}
}
/**
* @throws IOException
* @throws UnknownHostException
*
*/
public void connectToViewer( String serverName, int port ) throws UnknownHostException, IOException
{
ViewerSocketManager.connect(serverName, port);
}
/**
*
*/
public void connectToLocalServer( String serverName, int port )
{
final LocalServerSocketManager localServerSocketManager = new LocalServerSocketManager(serverName, port);
localServerSocketManager.start();
this.localServerSocketManagers.add(localServerSocketManager);
}
}
| [
"rodrigo.p.fraga@gmail.com"
] | rodrigo.p.fraga@gmail.com |
717e6510087312af5c98235aa92794b96c801a82 | b66829b3f311d75f2021687d70a1ee957efacbf9 | /shawsank_prison/src/test/java/com/example/lvk/shawsank_prison/ExampleUnitTest.java | 39a524872cefff1ccd59b57ba3b4e7742fbee79f | [] | no_license | LavithLVK/AndroidSample | d01003bebb8c3f2032cf845642a4e1133d15b75d | b3a8111995e5b30086555ac36de3f60d90962eb2 | refs/heads/master | 2020-12-02T06:41:28.691425 | 2017-07-27T10:09:33 | 2017-07-27T10:09:33 | 96,879,881 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package com.example.lvk.shawsank_prison;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"ganesh.muthyala@ggktech.com"
] | ganesh.muthyala@ggktech.com |
8a96a1fcacdb0b08476a874f8cbf379ce61a1d76 | caf6dbe1aa608ee29245534dcce1888c91658052 | /src/main/java/realestate/utils/HtmlReader.java | ab3f443db0ca34019232422518bb5e52771e2cd9 | [] | no_license | MariyaYurukova/realestate | 5d6f7eaec2b0ee28fc13218411f07382de8027dc | d29e13946ae6d6e6f6aab31de1264c2797de3910 | refs/heads/master | 2023-06-26T02:22:13.874920 | 2021-07-26T18:44:52 | 2021-07-26T18:44:52 | 389,735,382 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 671 | java | package realestate.utils;
import java.io.*;
public class HtmlReader {
public String readHtmlFile(String htmlFilePath) throws IOException {
BufferedReader reader = new BufferedReader(
new InputStreamReader(
new FileInputStream(
new File(htmlFilePath)
)
)
);
StringBuilder htmlFileContent = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
htmlFileContent.append(line).append(System.lineSeparator());
}
return htmlFileContent.toString().trim();
}
}
| [
"mariya.s.yurukova@gmail.com"
] | mariya.s.yurukova@gmail.com |
32078a87210a7dfeddc71cae52c7bee8b979f760 | 6da6b8d7125b06d318315071a93b268217d11ab3 | /src/core/world/shapes/Triangle.java | de7fed703d98827e639583118569893730f74bfc | [] | no_license | GabrielJadderson/RayTracing | 5efee76664bf1195e07705ebc25f01f2cb5d0a2c | 47767f5ac3dca6230ff1c4239f6ed4d8e8ad7b54 | refs/heads/master | 2018-11-13T03:54:53.064624 | 2018-08-25T15:59:05 | 2018-08-25T15:59:05 | 83,253,455 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,883 | java | package core.world.shapes;
import core.Globals;
import core.world.ray.Ray;
import core.world.ray.RayInfo;
import core.world.shading.Material;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
/**
* USES CLOCKWISE WINDING ORDER!
*/
public class Triangle implements IShape
{
public Vector3D[] points = new Vector3D[3];
public Material material;
public Triangle(Vector3D[] position, Material material)
{
this.points = position;
this.material = material;
}
@Override
public RayInfo intersects(Ray ray, double min, double max)
{
RayInfo rayInfo = new RayInfo();
Vector3D u, v, n = new Vector3D(0, 0, 0);
double r;
u = this.points[1].subtract(this.points[0]);
v = this.points[2].subtract(this.points[0]);
n = u.crossProduct(v); // cross product
//System.out.println(VecMath.length(n));
double b = n.dotProduct(ray.dir);
if ((double) Math.abs(b) < Globals.EPSILON)
{
rayInfo.didIntersect = false;
return rayInfo;
}
double d = n.dotProduct(this.points[0]);
r = (n.dotProduct(Vector3D.ZERO) + d) / b;
if (r < 0.0)
{
rayInfo.didIntersect = false;
return rayInfo; // triangle is beheind
}
Vector3D intersectPoint = new Vector3D(0 + (ray.dir.getX() * r), 0 + (ray.dir.getY() * r), (0 + (ray.dir.getZ() * r)));
Vector3D controlVector;
Vector3D edge0 = this.points[1].subtract(this.points[0]);
Vector3D vp0 = intersectPoint.subtract(this.points[0]);
controlVector = edge0.crossProduct(vp0);
if (n.dotProduct(controlVector) < 0)
{
rayInfo.didIntersect = false;
return rayInfo; // ray is on right side
}
Vector3D edge1 = this.points[2].subtract(this.points[1]);
Vector3D vp1 = intersectPoint.subtract(this.points[1]);
controlVector = edge1.crossProduct(vp1);
if (n.dotProduct(controlVector) < 0)
{
rayInfo.didIntersect = false;
return rayInfo; // ray is on right side
}
Vector3D edge2 = this.points[0].subtract(this.points[2]);
Vector3D vp2 = intersectPoint.subtract(this.points[2]);
controlVector = edge2.crossProduct(vp2);
if (n.dotProduct(controlVector) < 0)
{
rayInfo.didIntersect = false;
return rayInfo; // ray is on right side
}
rayInfo.t = r;
rayInfo.point = intersectPoint; //assign hit point
rayInfo.normal = n.normalize(); //assign hit point normal from center
rayInfo.didIntersect = true;
rayInfo.material = material;
//System.out.println(r + " - " + intersectPoint.toString() + " - " + n.normalize());
return rayInfo;
}
} | [
"gabrieljadderson@icloud.com"
] | gabrieljadderson@icloud.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.