blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
3294668aef9c14294dc5ce91c282a3374e687bfc
4663dabf54894c4f373f33ecc31e45b08ebaa7d2
/core/src/main/java/com/aliyun/odps/cupid/runtime/ContainerStatus.java
ed8788885bd7ab808ff0893323eb0b84489181a0
[ "Apache-2.0" ]
permissive
waitinfuture/aliyun-cupid-sdk
b22925e8c12c54c5397af1d3e0af53ef68e45162
4ed882d574f0d2d1dd89b672ed849cd26cdb671e
refs/heads/master
2020-03-26T23:53:59.257858
2018-08-10T03:35:21
2018-08-10T03:35:21
145,575,907
0
0
Apache-2.0
2018-08-21T14:31:45
2018-08-21T14:31:43
null
UTF-8
Java
false
false
1,087
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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.aliyun.odps.cupid.runtime; public enum ContainerStatus { START(1), TERMINATED(2), RUNNING(3); private int value; private ContainerStatus(int value) { this.value = value; } public int value() { return value; } }
[ "xuewei.linxuewei@alibaba-inc.com" ]
xuewei.linxuewei@alibaba-inc.com
a1cb79e59883ca8bd03b243d4cb2ea937b482bfa
261ba4a1381cad081692c9c3f44beb4f7281ea16
/src/main/java/dao/SiteDao.java
b8d9b698b8b4934b148aed06fc171b904e2e834a
[ "MIT" ]
permissive
mopiata/site-maintenance-manager
c64c811e316aed757261d4b17afc60969c9e74bb
7ee55e37d9943e47f4db9c7eabf92a708925b204
refs/heads/master
2020-05-29T21:01:12.353548
2019-06-01T07:13:45
2019-06-01T07:13:45
189,367,870
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package dao; import models.Site; import java.util.List; public interface SiteDao { //CREATE void save(Site site); //READ AND LIST List<Site> all(); Site findById(int id); //UPDATE void update(int id, String name, String location, int engineerId); //DELETE void deleteById(int id); void clearAllSites(); }
[ "mopiata@safaricomdigitalacademy.co.ke" ]
mopiata@safaricomdigitalacademy.co.ke
d7341822f08e4e1f7717d24c52432ecff0319990
462e7a27236d977137e932ba521c87df32796b76
/restfb-2.0.0-rc.2/source/library/com/restfb/util/CachedDateFormatStrategy.java
a81b4c44c0a765a0fa5200e9094e03c872fbaff0
[ "MIT" ]
permissive
DanielRubinstein/Tower-Defense-Maker
e7f73853ec85dc355a78f2dfef8c398370d4d76f
9313982f35f432464e39c677d7353daa9225a66d
refs/heads/master
2021-01-20T03:06:34.162636
2017-10-27T15:33:12
2017-10-27T15:33:12
101,345,802
2
0
null
null
null
null
UTF-8
Java
false
false
3,148
java
/** * Copyright (c) 2010-2017 Mark Allen, Norbert Bartels. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.restfb.util; import java.lang.ref.SoftReference; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; import java.util.TimeZone; /** * a DateFormat strategy that returns a cached SimpleDateFormat instance. * * For every format string an instance of the SimpleDateFormat is saved on a per thread base, so the SimpleDateFormat * instance is reused and you get an major speedup. * * Attention: to prevent a possible memory leak while using this strategy you have to clean up the inner ThreadLocal * with the {@code clearThreadLocal} method. * * @since 1.7.0 */ public class CachedDateFormatStrategy implements DateFormatStrategy { @Override public DateFormat formatFor(String format) { return SimpleDateFormatHolder.formatFor(format); } public void clearThreadLocal() { SimpleDateFormatHolder.clearThreadLocal(); } final static class SimpleDateFormatHolder { private static final ThreadLocal<SoftReference> THREADLOCAL_FORMATTER_MAP = new ThreadLocal<SoftReference>() { @Override protected SoftReference<Map> initialValue() { return new SoftReference<Map>(new HashMap<String, SimpleDateFormat>()); } }; public static SimpleDateFormat formatFor(String pattern) { SoftReference<Map> ref = THREADLOCAL_FORMATTER_MAP.get(); Map<String, SimpleDateFormat> formatterMap = ref.get(); if (formatterMap == null) { formatterMap = new HashMap<String, SimpleDateFormat>(); THREADLOCAL_FORMATTER_MAP.set(new SoftReference<Map>(formatterMap)); } SimpleDateFormat formatter = formatterMap.get(pattern); if (formatter == null) { formatter = new SimpleDateFormat(pattern); formatter.setTimeZone(TimeZone.getTimeZone("UTC")); formatterMap.put(pattern, formatter); } return formatter; } public static void clearThreadLocal() { THREADLOCAL_FORMATTER_MAP.remove(); } } }
[ "to41@duke.edu" ]
to41@duke.edu
7484ba94283c468354c390f8e126e24397adc0a9
d46e46a8974dfa52fcc2fd3b8c314c6e574a35e0
/Server/15_ProjectGladiator/src/main/java/com/lti/misc/SMSOtp.java
2e3e89847f5e58f967ba853b39d3e0c2e2092a65
[]
no_license
AnmolJalan/Numero1-finkart
72043e2e6615172aa65d46f88835e6bc1b46bcec
f12f0d52346d87ffeed4365135402ff97ad2be5a
refs/heads/master
2022-12-28T07:32:35.179007
2020-10-15T15:48:36
2020-10-15T15:48:36
304,365,394
0
0
null
null
null
null
UTF-8
Java
false
false
1,434
java
package com.lti.misc; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class SMSOtp { public static void sendSms(String apiKey1, String message1,String mobileNo) { try { // Construct data String apiKey = "apikey=" + apiKey1; String message = "&message=" +message1; String sender = "&sender=" + "TXTLCL"; String numbers = "&numbers=" + mobileNo; // Send data HttpURLConnection conn = (HttpURLConnection) new URL("https://api.textlocal.in/send/?").openConnection(); String data = apiKey + numbers + message + sender; conn.setDoOutput(true); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Length", Integer.toString(data.length())); conn.getOutputStream().write(data.getBytes("UTF-8")); BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); StringBuffer stringBuffer = new StringBuffer(); String line; while ((line = rd.readLine()) != null) { stringBuffer.append(line).append("\n"); } System.out.println(stringBuffer.toString()); rd.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "Anmol Jalan" ]
Anmol Jalan
4831c0b6a07e8d3638b961f1a42fc62b93b32b58
ada90d39dea4784835e28adf590529d0b43c200a
/app/src/main/java/xit/zubrein/opa/adapter/PoliceStationAdapter.java
599ac603a86eb7448830617d1a7a454ceef8ead3
[]
no_license
zubrein/tourismbd
086be056c9bcd196bcdfb1592781c38d55ea8d15
eed57f08f4b5efd6e062a0c2b733d3a2a525c0af
refs/heads/main
2023-05-03T00:41:36.092754
2021-05-28T13:44:00
2021-05-28T13:44:00
312,183,654
0
0
null
null
null
null
UTF-8
Java
false
false
2,157
java
package xit.zubrein.opa.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; import java.util.List; import xit.zubrein.opa.R; import xit.zubrein.opa.model.ModelPoliceStation; public class PoliceStationAdapter extends RecyclerView.Adapter<PoliceStationAdapter.PoliceStationViewHolder> { List<ModelPoliceStation> list; Context c; public static class PoliceStationViewHolder extends RecyclerView.ViewHolder { public TextView name,address,contact,position; CardView parent; public PoliceStationViewHolder(@NonNull View itemView) { super(itemView); contact = itemView.findViewById(R.id.contact); address = itemView.findViewById(R.id.address); name = itemView.findViewById(R.id.name); parent = itemView.findViewById(R.id.parent); position = itemView.findViewById(R.id.position); } } public PoliceStationAdapter(List<ModelPoliceStation> list, Context c) { this.list = list; this.c = c; } @NonNull @Override public PoliceStationViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.hospital_item, parent, false); PoliceStationViewHolder evh = new PoliceStationViewHolder(v); return evh; } @Override public void onBindViewHolder(@NonNull PoliceStationViewHolder holder, int position) { holder.setIsRecyclable(false); final ModelPoliceStation currentitem = list.get(position); holder.position.setText(String.valueOf(position+1)); holder.name.setText(currentitem.getPolice_station_name()); holder.address.setText(currentitem.getAddress()); holder.contact.setText(currentitem.getContact_no()); } @Override public int getItemCount() { return list.size(); } }
[ "robi3443@gmail.com" ]
robi3443@gmail.com
336dd16710cd6148ba90272e5e91ca82a074f71a
44167dd83d765514e6f95977acf926945f34936b
/desktop/src/main/java/org/freehep/graphicsio/emf/EMFTag.java
b2f1e44a63d5b08a9dd6c7bfa74343d0ff4d5ed4
[]
no_license
westybsa/geogebra
3c1f2811c6ae7aea1f8babd1f30ef8242d2c0490
5b886613f406f976e7d7120505d0e03fbccdbfc2
refs/heads/master
2021-05-01T23:57:40.785075
2017-01-01T22:25:10
2017-01-01T22:25:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,862
java
// Copyright 2001-2006, FreeHEP. package org.freehep.graphicsio.emf; import java.io.IOException; import org.freehep.util.io.Tag; import org.freehep.util.io.TaggedInputStream; import org.freehep.util.io.TaggedOutputStream; /** * EMF specific tag, from which all other EMF Tags inherit. * * @author Mark Donszelmann * @version $Id: EMFTag.java,v 1.5 2009-08-17 21:44:45 murkle Exp $ */ public abstract class EMFTag extends Tag { protected int flags = 0; /** * Constructs a EMFTag. * * @param id * id of the element * @param version * emf version in which this element was first supported */ protected EMFTag(int id, int version) { super(id, version); } public Tag read(int tagID, TaggedInputStream input, int len) throws IOException { EMFInputStream emf = (EMFInputStream) input; EMFTagHeader tagHeader = (EMFTagHeader) emf.getTagHeader(); flags = tagHeader.getFlags(); return read(tagID, emf, len); } public abstract EMFTag read(int tagID, EMFInputStream emf, int len) throws IOException; public void write(int tagID, TaggedOutputStream output) throws IOException { write(tagID, (EMFOutputStream) output); } /** * Writes the extra tag information to the outputstream in binary format. * This implementation writes nothing, but concrete tags may override this * method. This method is called just after the TagHeader is written. * * @param tagID * id of the tag * @param emf * Binary EMF output stream */ public void write(int tagID, EMFOutputStream emf) throws IOException { // empty } public int getFlags() { return flags; } /** * @return a description of the tagName and tagID */ public String toString() { int id = getTag(); return "EMFTag " + getName() + " (" + id + ") (0x" + Integer.toHexString(id) + ")"; } }
[ "michael@geogebra.org" ]
michael@geogebra.org
8718e12d850560b920d73c08683db34ab293616c
ca6645b45cdc6f00523404e4d513d794ba45693a
/addressbook-web-tests/src/test/java/ru/stqa/pft/addressbook/tests/GroupDeletionTests.java
2f61caf319a899393647def20f545fa1c91f8729
[ "Apache-2.0" ]
permissive
dmi-vor/java_pft
cc17344e3e579b006803bbcd1e2a360033b81c0f
89ca041723dd0b9c23badcccd898c68c2264dc37
refs/heads/master
2020-04-20T23:25:43.028452
2019-02-24T18:18:44
2019-02-24T18:18:44
169,167,592
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package ru.stqa.pft.addressbook.tests; import org.testng.annotations.*; public class GroupDeletionTests extends TestBase { @Test public void testGroupDeletion() throws Exception { app.getNavigationHelper().gotoGroupPage(); app.getGroupHelper().selectGroup(); app.getGroupHelper().deleteSelectedGroup(); app.getGroupHelper().returnToGroupPage(); } }
[ "janeon@bk.ru" ]
janeon@bk.ru
c16244625ce0366a4d0c0a274d23844ec347c9c8
8dc2fcda0ee06b1e486976f3c3c973b68752dcad
/app/src/main/java/testapp/android/com/echartslearn/media_player/vedio/video_list/VideoBaseAdapter.java
165c663c0ec041e33e778a5c656ec325adfe3199
[]
no_license
ILoveFryingPan/EChartsLearn
a1c0b463ae42666e3ab1539d335a101f19fccda8
08d535f47f861310ee3436f1a68060b48efb6df8
refs/heads/master
2020-12-13T04:23:48.192782
2020-08-31T02:11:35
2020-08-31T02:11:35
234,312,975
0
0
null
null
null
null
UTF-8
Java
false
false
3,601
java
package testapp.android.com.echartslearn.media_player.vedio.video_list; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.squareup.picasso.Picasso; import java.util.List; import testapp.android.com.echartslearn.R; public class VideoBaseAdapter extends BaseAdapter{ private Context mContext; private List<VideoBucket> bucketList; private List<VideoItem> itemList; public VideoBaseAdapter(Context mContext, List<VideoBucket> bucketList) { this.mContext = mContext; this.bucketList = bucketList; this.itemList = null; } public VideoBaseAdapter(List<VideoItem> itemList, Context mContext) { this.mContext = mContext; this.itemList = itemList; this.bucketList = null; } @Override public int getCount() { if (bucketList == null && itemList == null){ return 0; }else if (bucketList != null && itemList == null){ return bucketList.size(); }else { return itemList.size(); } } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { MyViewHolder myViewHolder = null; if (convertView == null){ convertView = LayoutInflater.from(mContext).inflate(R.layout.item_image_bucket, parent, false); myViewHolder = new MyViewHolder(convertView); convertView.setTag(myViewHolder); }else { myViewHolder = (MyViewHolder) convertView.getTag(); } // Log.d("VideoBaseAdapter", bucketList.get(position).thumbnailPath); if (bucketList != null) { if (!TextUtils.isEmpty(bucketList.get(position).thumbnailPath)) { Picasso.get().load("file://" + bucketList.get(position).thumbnailPath).config(Bitmap.Config.ARGB_4444).into(myViewHolder.image); } else if (bucketList.get(position).thumbnailBitmap != null) { myViewHolder.image.setImageBitmap(bucketList.get(position).thumbnailBitmap); } myViewHolder.name.setText(bucketList.get(position).bucketName); myViewHolder.count.setText(bucketList.get(position).count + ""); }else { if (!TextUtils.isEmpty(itemList.get(position).imagePath)){ Picasso.get().load("file://" + itemList.get(position).imagePath).config(Bitmap.Config.ARGB_4444).into(myViewHolder.image); }else if (itemList.get(position).imageBitmap != null){ myViewHolder.image.setImageBitmap(itemList.get(position).imageBitmap); } myViewHolder.name.setText(itemList.get(position).name); myViewHolder.count.setVisibility(View.GONE); } return convertView; } public class MyViewHolder{ private final ImageView image; private final TextView name; private final TextView count; public MyViewHolder(View itemView) { image = itemView.findViewById(R.id.image); name = itemView.findViewById(R.id.name); count = itemView.findViewById(R.id.count); itemView.findViewById(R.id.isselected).setVisibility(View.GONE); } } }
[ "matingkai@fangxiaoer.com" ]
matingkai@fangxiaoer.com
fe74a78ee069369be2444ad068c745899d53f3da
1e9984400563eff69230106c03200be7a091c906
/源代码/Android/app/src/main/java/com/bignerdranch/android/lipstick/FaceDatabaseActivity.java
f5a5587c105c98c6d79bd42eaeeed515179f4bd6
[]
no_license
fengyunliu/lipstick-projrct
219326839183cf65dc3bc3a878995054bb58514b
21d732cb672556558769740779cb9c4ac48351c6
refs/heads/master
2022-04-09T11:48:44.788240
2019-11-16T08:35:40
2019-11-16T08:35:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,090
java
package com.bignerdranch.android.lipstick; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.provider.MediaStore; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import com.bumptech.glide.Glide; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import okhttp3.MediaType; import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public class FaceDatabaseActivity extends AppCompatActivity { private Button select_button; private Button face_database_button; public static final int CHOOSE_PHOTO = 1; private ImageView photo; private String uploadFileName; private byte[] fileBuf; private String uploadUrl = "http://114.55.66.169:3000/upload2"; // 打开相册 选择照片 private void openGallery() { Intent intent = new Intent("android.intent.action.GET_CONTENT"); intent.setType("image/*"); // 如果第二个参数大于或等于0 // 那么当用户操作完成后会返回到本程序的onActivityResult方法 startActivityForResult(intent, CHOOSE_PHOTO); } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_face_database); photo = (ImageView) findViewById(R.id.photo); select_button = (Button) findViewById(R.id.select_photo_button); select_button.getBackground().setAlpha(75); select_button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { openGallery(); } }); face_database_button = (Button)findViewById(R.id.face_database_button); face_database_button.getBackground().setAlpha(75); face_database_button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (fileBuf == null){ Toast.makeText(FaceDatabaseActivity.this,"请选择一张照片",Toast.LENGTH_LONG).show(); return; } new Thread() { @Override public void run() { OkHttpClient client = new OkHttpClient(); //上传文件域的请求体部分 RequestBody formBody = RequestBody .create(fileBuf, MediaType.parse("image/jpeg")); //整个上传的请求体部分(普通表单+文件上传域) RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo") //filename:avatar,originname:abc.jpg .addFormDataPart("avatar", uploadFileName, formBody) .build(); Request request = new Request.Builder() .url(uploadUrl) .post(requestBody) .build(); try { Response response = client.newCall(request).execute(); // Log.i("数据", response.body().string() + "...."); // responseData = response.body().string(); // Start FaceDatabaseReactionActivity Intent intent = new Intent(FaceDatabaseActivity.this,FaceDatabaseReactionActivity.class); startActivity(intent); } catch (IOException e) { e.printStackTrace(); } } }.start(); } }); } // 用户选择的图片显示在ImageView中 @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case CHOOSE_PHOTO: handleSelect(data); break; } } // 选择后照片的读取工作 private void handleSelect(Intent intent) { Cursor cursor = null; Uri uri = intent.getData(); cursor = getContentResolver().query(uri, null, null, null, null); if (cursor.moveToFirst()) { int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DISPLAY_NAME); uploadFileName = cursor.getString(columnIndex); } // 改良优化 try { InputStream inputStream = getContentResolver().openInputStream(uri); fileBuf = convertToBytes(inputStream); Bitmap bitmap = BitmapFactory.decodeByteArray(fileBuf, 0, fileBuf.length); photo.setImageBitmap(bitmap); // } catch (Exception e) { // e.printStackTrace(); // } Glide.with(this).load(uri) .fitCenter() .into(photo); } catch (Exception e) { e.printStackTrace(); } cursor.close(); } private byte[] convertToBytes(InputStream inputStream) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; int len = 0; while ((len = inputStream.read(buf)) > 0) { out.write(buf, 0, len); } out.close(); inputStream.close(); return out.toByteArray(); } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); switch (requestCode) { case 1: if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { openGallery(); } else { Toast.makeText(this, "读取相册的请求被拒绝", Toast.LENGTH_LONG).show(); } } } @RequiresApi(api = Build.VERSION_CODES.M) public void getPermission(View view) { if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1); } } }
[ "lianghd1997@163.com" ]
lianghd1997@163.com
814885f33a0bb86e5884877e6be4c1d9beba89e2
10378c580b62125a184f74f595d2c37be90a5769
/com/github/steveice10/netty/handler/codec/redis/RedisCodecUtil.java
97cb9bb38d7f911e78823b3b514f299d39f4c190
[]
no_license
ClientPlayground/Melon-Client
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
afc9b11493e15745b78dec1c2b62bb9e01573c3d
refs/heads/beta-v2
2023-04-05T20:17:00.521159
2021-03-14T19:13:31
2021-03-14T19:13:31
347,509,882
33
19
null
2021-03-14T19:13:32
2021-03-14T00:27:40
null
UTF-8
Java
false
false
841
java
package com.github.steveice10.netty.handler.codec.redis; import com.github.steveice10.netty.util.CharsetUtil; import com.github.steveice10.netty.util.internal.PlatformDependent; final class RedisCodecUtil { static byte[] longToAsciiBytes(long value) { return Long.toString(value).getBytes(CharsetUtil.US_ASCII); } static short makeShort(char first, char second) { return PlatformDependent.BIG_ENDIAN_NATIVE_ORDER ? (short)(second << 8 | first) : (short)(first << 8 | second); } static byte[] shortToBytes(short value) { byte[] bytes = new byte[2]; if (PlatformDependent.BIG_ENDIAN_NATIVE_ORDER) { bytes[1] = (byte)(value >> 8 & 0xFF); bytes[0] = (byte)(value & 0xFF); } else { bytes[0] = (byte)(value >> 8 & 0xFF); bytes[1] = (byte)(value & 0xFF); } return bytes; } }
[ "Hot-Tutorials@users.noreply.github.com" ]
Hot-Tutorials@users.noreply.github.com
1be2cde95a08383eb58d2462f3662e92bd2ea1c4
9345841e9b8af27752d2f39d49fe53730e65a93a
/advmon-web/src/main/java/com/advmon/webapp/datamodel/content/VideoContent.java
646d756719a8e46a9c8e344c0ae87aeebba43cc0
[]
no_license
samcoer/admo
119673578109bc5862a24607d249fe44905d25fe
e89d4ec427d08b775c7cef411bf8cfa1b3a0afb9
refs/heads/master
2021-03-16T08:37:58.098155
2013-07-22T15:01:00
2013-07-22T15:01:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.advmon.webapp.datamodel.content; import javax.persistence.DiscriminatorValue; import org.springframework.roo.addon.javabean.RooJavaBean; import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord; import org.springframework.roo.addon.tostring.RooToString; import com.advmon.webapp.utils.Util; @RooJavaBean @RooToString @RooJpaActiveRecord @DiscriminatorValue(Util.AD_CONTENT_TYPES.VIDEO_CONTENT) public class VideoContent extends AdContent{ private String youTubeURL; }
[ "bhatt@adobe.com" ]
bhatt@adobe.com
91e291b58abb7dce6ae5ce90b5a0dbf89c1ce6df
b7b061f0a1c77e83cbcd201bba94f1b8d8a168cb
/src/com/douzone/mysite/action/board/DeleteAction.java
7e9004fc78af4600789c494240bdba4a71a4c621
[]
no_license
kjooyoung/mysite2
e35bc6be0345832652632b8e3bae74d6635db803
247f56efd8bb133e2d1dcf6f00515345fbd3fd99
refs/heads/master
2020-04-18T06:33:54.861637
2019-02-15T10:51:37
2019-02-15T10:51:37
167,326,384
0
0
null
null
null
null
UTF-8
Java
false
false
706
java
package com.douzone.mysite.action.board; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.douzone.mvc.action.Action; import com.douzone.mvc.util.WebUtils; import com.douzone.mysite.repository.BoardDao; public class DeleteAction implements Action { @Override public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { long no = Long.parseLong(request.getParameter("no")); new BoardDao().delete(no); WebUtils.redirect(request, response, request.getContextPath()+"/board?a=list&page=1"); } }
[ "jooyoung@DESKTOP-KUP8SIT" ]
jooyoung@DESKTOP-KUP8SIT
c9f129de02aa9923421b463cb34cdd3f0000873c
9ad25103bda1fbd97eaf2a9f1bbe94307c90c701
/app/src/test/java/com/jorgesys/wifibroadcastreceiver/ExampleUnitTest.java
bb4b8cc66347c7dd5e311204cedf24bf83073096
[]
no_license
Jorgesys/Android-detect-Wifi
e61a06535be42ca5f39f5fac782c2fdf8b33da70
adb1495ed050897b229f6b45d1f45b08df232653
refs/heads/master
2020-03-18T07:01:22.317850
2018-05-22T14:35:01
2018-05-22T14:35:01
134,427,817
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package com.jorgesys.wifibroadcastreceiver; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "noreply@github.com" ]
Jorgesys.noreply@github.com
7f609e90115a0c012e4051b7eb1c151d9784c1e6
5b1f57cf56bf09e0dc9615be1c71feb2f8f8d714
/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java
aaa98597b0ff79ba6272702d33ef5e9481e4cce9
[]
no_license
BigniuJava/spring
6f9f819f767442c8da8a0e6139b933da2734d9ca
f1e5931c337af0683d89009144c378bb7affab71
refs/heads/master
2023-01-08T17:40:06.856833
2020-11-07T17:16:25
2020-11-07T17:16:25
310,892,996
0
0
null
null
null
null
UTF-8
Java
false
false
38,840
java
/* * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.springframework.beans.factory.support; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import java.util.function.Supplier; import org.springframework.beans.BeanMetadataAttributeAccessor; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.core.io.DescriptiveResource; import org.springframework.core.io.Resource; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** * Base class for concrete, full-fledged {@link BeanDefinition} classes, * factoring out common properties of {@link GenericBeanDefinition}, * {@link RootBeanDefinition}, and {@link ChildBeanDefinition}. * * <p>The autowire constants match the ones defined in the * {@link org.springframework.beans.factory.config.AutowireCapableBeanFactory} * interface. * * @author Rod Johnson * @author Juergen Hoeller * @author Rob Harrop * @author Mark Fisher * @see GenericBeanDefinition * @see RootBeanDefinition * @see ChildBeanDefinition */ @SuppressWarnings("serial") public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccessor implements BeanDefinition, Cloneable { /** * Constant for the default scope name: {@code ""}, equivalent to singleton * status unless overridden from a parent bean definition (if applicable). */ public static final String SCOPE_DEFAULT = ""; /** * Constant that indicates no external autowiring at all. * @see #setAutowireMode */ public static final int AUTOWIRE_NO = AutowireCapableBeanFactory.AUTOWIRE_NO; /** * Constant that indicates autowiring bean properties by name. * @see #setAutowireMode */ public static final int AUTOWIRE_BY_NAME = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME; /** * Constant that indicates autowiring bean properties by type. * @see #setAutowireMode */ public static final int AUTOWIRE_BY_TYPE = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE; /** * Constant that indicates autowiring a constructor. * @see #setAutowireMode */ public static final int AUTOWIRE_CONSTRUCTOR = AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR; /** * Constant that indicates determining an appropriate autowire strategy * through introspection of the bean class. * @see #setAutowireMode * @deprecated as of Spring 3.0: If you are using mixed autowiring strategies, * use annotation-based autowiring for clearer demarcation of autowiring needs. */ @Deprecated public static final int AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT; /** * Constant that indicates no dependency check at all. * @see #setDependencyCheck */ public static final int DEPENDENCY_CHECK_NONE = 0; /** * Constant that indicates dependency checking for object references. * @see #setDependencyCheck */ public static final int DEPENDENCY_CHECK_OBJECTS = 1; /** * Constant that indicates dependency checking for "simple" properties. * @see #setDependencyCheck * @see org.springframework.beans.BeanUtils#isSimpleProperty */ public static final int DEPENDENCY_CHECK_SIMPLE = 2; /** * Constant that indicates dependency checking for all properties * (object references as well as "simple" properties). * @see #setDependencyCheck */ public static final int DEPENDENCY_CHECK_ALL = 3; /** * Constant that indicates the container should attempt to infer the * {@link #setDestroyMethodName destroy method name} for a bean as opposed to * explicit specification of a method name. The value {@value} is specifically * designed to include characters otherwise illegal in a method name, ensuring * no possibility of collisions with legitimately named methods having the same * name. * <p>Currently, the method names detected during destroy method inference * are "close" and "shutdown", if present on the specific bean class. */ public static final String INFER_METHOD = "(inferred)"; @Nullable private volatile Object beanClass; @Nullable private String scope = SCOPE_DEFAULT; private boolean abstractFlag = false; private boolean lazyInit = false; private int autowireMode = AUTOWIRE_NO; private int dependencyCheck = DEPENDENCY_CHECK_NONE; @Nullable private String[] dependsOn; private boolean autowireCandidate = true; private boolean primary = false; private final Map<String, AutowireCandidateQualifier> qualifiers = new LinkedHashMap<>(); @Nullable private Supplier<?> instanceSupplier; //允许访问非公开方法,构造方法====反射 private boolean nonPublicAccessAllowed = true; //调用构造方法采用宽松匹配 private boolean lenientConstructorResolution = true; @Nullable private String factoryBeanName; @Nullable private String factoryMethodName; @Nullable private ConstructorArgumentValues constructorArgumentValues; @Nullable private MutablePropertyValues propertyValues; @Nullable private MethodOverrides methodOverrides; @Nullable private String initMethodName; @Nullable private String destroyMethodName; private boolean enforceInitMethod = true; private boolean enforceDestroyMethod = true; private boolean synthetic = false; private int role = BeanDefinition.ROLE_APPLICATION; @Nullable private String description; @Nullable private Resource resource; /** * Create a new AbstractBeanDefinition with default settings. */ protected AbstractBeanDefinition() { this(null, null); } /** * Create a new AbstractBeanDefinition with the given * constructor argument values and property values. */ protected AbstractBeanDefinition(@Nullable ConstructorArgumentValues cargs, @Nullable MutablePropertyValues pvs) { this.constructorArgumentValues = cargs; this.propertyValues = pvs; } /** * Create a new AbstractBeanDefinition as a deep copy of the given * bean definition. * @param original the original bean definition to copy from */ protected AbstractBeanDefinition(BeanDefinition original) { setParentName(original.getParentName()); setBeanClassName(original.getBeanClassName()); setScope(original.getScope()); setAbstract(original.isAbstract()); setLazyInit(original.isLazyInit()); setFactoryBeanName(original.getFactoryBeanName()); setFactoryMethodName(original.getFactoryMethodName()); setRole(original.getRole()); setSource(original.getSource()); copyAttributesFrom(original); if (original instanceof AbstractBeanDefinition) { AbstractBeanDefinition originalAbd = (AbstractBeanDefinition) original; if (originalAbd.hasBeanClass()) { setBeanClass(originalAbd.getBeanClass()); } if (originalAbd.hasConstructorArgumentValues()) { setConstructorArgumentValues(new ConstructorArgumentValues(original.getConstructorArgumentValues())); } if (originalAbd.hasPropertyValues()) { setPropertyValues(new MutablePropertyValues(original.getPropertyValues())); } if (originalAbd.hasMethodOverrides()) { setMethodOverrides(new MethodOverrides(originalAbd.getMethodOverrides())); } setAutowireMode(originalAbd.getAutowireMode()); setDependencyCheck(originalAbd.getDependencyCheck()); setDependsOn(originalAbd.getDependsOn()); setAutowireCandidate(originalAbd.isAutowireCandidate()); setPrimary(originalAbd.isPrimary()); copyQualifiersFrom(originalAbd); setInstanceSupplier(originalAbd.getInstanceSupplier()); setNonPublicAccessAllowed(originalAbd.isNonPublicAccessAllowed()); setLenientConstructorResolution(originalAbd.isLenientConstructorResolution()); setInitMethodName(originalAbd.getInitMethodName()); setEnforceInitMethod(originalAbd.isEnforceInitMethod()); setDestroyMethodName(originalAbd.getDestroyMethodName()); setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod()); setSynthetic(originalAbd.isSynthetic()); setResource(originalAbd.getResource()); } else { setConstructorArgumentValues(new ConstructorArgumentValues(original.getConstructorArgumentValues())); setPropertyValues(new MutablePropertyValues(original.getPropertyValues())); setResourceDescription(original.getResourceDescription()); } } /** * Override settings in this bean definition (presumably a copied parent * from a parent-child inheritance relationship) from the given bean * definition (presumably the child). * <ul> * <li>Will override beanClass if specified in the given bean definition. * <li>Will always take {@code abstract}, {@code scope}, * {@code lazyInit}, {@code autowireMode}, {@code dependencyCheck}, * and {@code dependsOn} from the given bean definition. * <li>Will add {@code constructorArgumentValues}, {@code propertyValues}, * {@code methodOverrides} from the given bean definition to existing ones. * <li>Will override {@code factoryBeanName}, {@code factoryMethodName}, * {@code initMethodName}, and {@code destroyMethodName} if specified * in the given bean definition. * </ul> */ public void overrideFrom(BeanDefinition other) { if (StringUtils.hasLength(other.getBeanClassName())) { setBeanClassName(other.getBeanClassName()); } if (StringUtils.hasLength(other.getScope())) { setScope(other.getScope()); } setAbstract(other.isAbstract()); setLazyInit(other.isLazyInit()); if (StringUtils.hasLength(other.getFactoryBeanName())) { setFactoryBeanName(other.getFactoryBeanName()); } if (StringUtils.hasLength(other.getFactoryMethodName())) { setFactoryMethodName(other.getFactoryMethodName()); } setRole(other.getRole()); setSource(other.getSource()); copyAttributesFrom(other); if (other instanceof AbstractBeanDefinition) { AbstractBeanDefinition otherAbd = (AbstractBeanDefinition) other; if (otherAbd.hasBeanClass()) { setBeanClass(otherAbd.getBeanClass()); } if (otherAbd.hasConstructorArgumentValues()) { getConstructorArgumentValues().addArgumentValues(other.getConstructorArgumentValues()); } if (otherAbd.hasPropertyValues()) { getPropertyValues().addPropertyValues(other.getPropertyValues()); } if (otherAbd.hasMethodOverrides()) { getMethodOverrides().addOverrides(otherAbd.getMethodOverrides()); } setAutowireMode(otherAbd.getAutowireMode()); setDependencyCheck(otherAbd.getDependencyCheck()); setDependsOn(otherAbd.getDependsOn()); setAutowireCandidate(otherAbd.isAutowireCandidate()); setPrimary(otherAbd.isPrimary()); copyQualifiersFrom(otherAbd); setInstanceSupplier(otherAbd.getInstanceSupplier()); setNonPublicAccessAllowed(otherAbd.isNonPublicAccessAllowed()); setLenientConstructorResolution(otherAbd.isLenientConstructorResolution()); if (otherAbd.getInitMethodName() != null) { setInitMethodName(otherAbd.getInitMethodName()); setEnforceInitMethod(otherAbd.isEnforceInitMethod()); } if (otherAbd.getDestroyMethodName() != null) { setDestroyMethodName(otherAbd.getDestroyMethodName()); setEnforceDestroyMethod(otherAbd.isEnforceDestroyMethod()); } setSynthetic(otherAbd.isSynthetic()); setResource(otherAbd.getResource()); } else { getConstructorArgumentValues().addArgumentValues(other.getConstructorArgumentValues()); getPropertyValues().addPropertyValues(other.getPropertyValues()); setResourceDescription(other.getResourceDescription()); } } /** * Apply the provided default values to this bean. * @param defaults the default settings to apply * @since 2.5 */ public void applyDefaults(BeanDefinitionDefaults defaults) { setLazyInit(defaults.isLazyInit()); setAutowireMode(defaults.getAutowireMode()); setDependencyCheck(defaults.getDependencyCheck()); setInitMethodName(defaults.getInitMethodName()); setEnforceInitMethod(false); setDestroyMethodName(defaults.getDestroyMethodName()); setEnforceDestroyMethod(false); } /** * Specify the bean class name of this bean definition. */ @Override public void setBeanClassName(@Nullable String beanClassName) { this.beanClass = beanClassName; } /** * Return the current bean class name of this bean definition. */ @Override @Nullable public String getBeanClassName() { Object beanClassObject = this.beanClass; if (beanClassObject instanceof Class) { return ((Class<?>) beanClassObject).getName(); } else { return (String) beanClassObject; } } /** * Specify the class for this bean. */ public void setBeanClass(@Nullable Class<?> beanClass) { this.beanClass = beanClass; } /** * Return the class of the wrapped bean (assuming it is resolved already). * @return the bean class (never {@code null}) * @throws IllegalStateException if the bean definition does not define a bean class, * or a specified bean class name has not been resolved into an actual Class yet * @see #hasBeanClass() * @see #setBeanClass(Class) * @see #resolveBeanClass(ClassLoader) */ public Class<?> getBeanClass() throws IllegalStateException { Object beanClassObject = this.beanClass; if (beanClassObject == null) { throw new IllegalStateException("No bean class specified on bean definition"); } if (!(beanClassObject instanceof Class)) { throw new IllegalStateException( "Bean class name [" + beanClassObject + "] has not been resolved into an actual Class"); } return (Class<?>) beanClassObject; } /** * Return whether this definition specifies a bean class. * @see #getBeanClass() * @see #setBeanClass(Class) * @see #resolveBeanClass(ClassLoader) */ public boolean hasBeanClass() { return (this.beanClass instanceof Class); } /** * Determine the class of the wrapped bean, resolving it from a * specified class name if necessary. Will also reload a specified * Class from its name when called with the bean class already resolved. * @param classLoader the ClassLoader to use for resolving a (potential) class name * @return the resolved bean class * @throws ClassNotFoundException if the class name could be resolved */ @Nullable public Class<?> resolveBeanClass(@Nullable ClassLoader classLoader) throws ClassNotFoundException { String className = getBeanClassName(); if (className == null) { return null; } Class<?> resolvedClass = ClassUtils.forName(className, classLoader); this.beanClass = resolvedClass; return resolvedClass; } /** * Set the name of the target scope for the bean. * <p>The default is singleton status, although this is only applied once * a bean definition becomes active in the containing factory. A bean * definition may eventually inherit its scope from a parent bean definition. * For this reason, the default scope name is an empty string (i.e., {@code ""}), * with singleton status being assumed until a resolved scope is set. * @see #SCOPE_SINGLETON * @see #SCOPE_PROTOTYPE */ @Override public void setScope(@Nullable String scope) { this.scope = scope; } /** * Return the name of the target scope for the bean. */ @Override @Nullable public String getScope() { return this.scope; } /** * Return whether this a <b>Singleton</b>, with a single shared instance * returned from all calls. * @see #SCOPE_SINGLETON */ @Override public boolean isSingleton() { return SCOPE_SINGLETON.equals(this.scope) || SCOPE_DEFAULT.equals(this.scope); } /** * Return whether this a <b>Prototype</b>, with an independent instance * returned for each call. * @see #SCOPE_PROTOTYPE */ @Override public boolean isPrototype() { return SCOPE_PROTOTYPE.equals(this.scope); } /** * Set if this bean is "abstract", i.e. not meant to be instantiated itself but * rather just serving as parent for concrete child bean definitions. * <p>Default is "false". Specify true to tell the bean factory to not try to * instantiate that particular bean in any case. */ public void setAbstract(boolean abstractFlag) { this.abstractFlag = abstractFlag; } /** * Return whether this bean is "abstract", i.e. not meant to be instantiated * itself but rather just serving as parent for concrete child bean definitions. */ @Override public boolean isAbstract() { return this.abstractFlag; } /** * Set whether this bean should be lazily initialized. * <p>If {@code false}, the bean will get instantiated on startup by bean * factories that perform eager initialization of singletons. */ @Override public void setLazyInit(boolean lazyInit) { this.lazyInit = lazyInit; } /** * Return whether this bean should be lazily initialized, i.e. not * eagerly instantiated on startup. Only applicable to a singleton bean. * @return whether to apply lazy-init semantics ({@code false} by default) */ @Override public boolean isLazyInit() { return this.lazyInit; } /** * Set the autowire mode. This determines whether any automagical detection * and setting of bean references will happen. Default is AUTOWIRE_NO * which means there won't be convention-based autowiring by name or type * (however, there may still be explicit annotation-driven autowiring). * @param autowireMode the autowire mode to set. * Must be one of the constants defined in this class. * @see #AUTOWIRE_NO * @see #AUTOWIRE_BY_NAME * @see #AUTOWIRE_BY_TYPE * @see #AUTOWIRE_CONSTRUCTOR * @see #AUTOWIRE_AUTODETECT */ public void setAutowireMode(int autowireMode) { this.autowireMode = autowireMode; } /** * Return the autowire mode as specified in the bean definition. */ public int getAutowireMode() { return this.autowireMode; } /** * Return the resolved autowire code, * (resolving AUTOWIRE_AUTODETECT to AUTOWIRE_CONSTRUCTOR or AUTOWIRE_BY_TYPE). * @see #AUTOWIRE_AUTODETECT * @see #AUTOWIRE_CONSTRUCTOR * @see #AUTOWIRE_BY_TYPE */ public int getResolvedAutowireMode() { if (this.autowireMode == AUTOWIRE_AUTODETECT) { // Work out whether to apply setter autowiring or constructor autowiring. // If it has a no-arg constructor it's deemed to be setter autowiring, // otherwise we'll try constructor autowiring. Constructor<?>[] constructors = getBeanClass().getConstructors(); for (Constructor<?> constructor : constructors) { if (constructor.getParameterCount() == 0) { return AUTOWIRE_BY_TYPE; } } return AUTOWIRE_CONSTRUCTOR; } else { return this.autowireMode; } } /** * Set the dependency check code. * @param dependencyCheck the code to set. * Must be one of the four constants defined in this class. * @see #DEPENDENCY_CHECK_NONE * @see #DEPENDENCY_CHECK_OBJECTS * @see #DEPENDENCY_CHECK_SIMPLE * @see #DEPENDENCY_CHECK_ALL */ public void setDependencyCheck(int dependencyCheck) { this.dependencyCheck = dependencyCheck; } /** * Return the dependency check code. */ public int getDependencyCheck() { return this.dependencyCheck; } /** * Set the names of the beans that this bean depends on being initialized. * The bean factory will guarantee that these beans get initialized first. * <p>Note that dependencies are normally expressed through bean properties or * constructor arguments. This property should just be necessary for other kinds * of dependencies like statics (*ugh*) or database preparation on startup. */ @Override public void setDependsOn(@Nullable String... dependsOn) { this.dependsOn = dependsOn; } /** * Return the bean names that this bean depends on. */ @Override @Nullable public String[] getDependsOn() { return this.dependsOn; } /** * Set whether this bean is a candidate for getting autowired into some other bean. * <p>Note that this flag is designed to only affect type-based autowiring. * It does not affect explicit references by name, which will get resolved even * if the specified bean is not marked as an autowire candidate. As a consequence, * autowiring by name will nevertheless inject a bean if the name matches. * @see #AUTOWIRE_BY_TYPE * @see #AUTOWIRE_BY_NAME */ @Override public void setAutowireCandidate(boolean autowireCandidate) { this.autowireCandidate = autowireCandidate; } /** * Return whether this bean is a candidate for getting autowired into some other bean. */ @Override public boolean isAutowireCandidate() { return this.autowireCandidate; } /** * Set whether this bean is a primary autowire candidate. * <p>If this value is {@code true} for exactly one bean among multiple * matching candidates, it will serve as a tie-breaker. */ @Override public void setPrimary(boolean primary) { this.primary = primary; } /** * Return whether this bean is a primary autowire candidate. */ @Override public boolean isPrimary() { return this.primary; } /** * Register a qualifier to be used for autowire candidate resolution, * keyed by the qualifier's type name. * @see AutowireCandidateQualifier#getTypeName() */ public void addQualifier(AutowireCandidateQualifier qualifier) { this.qualifiers.put(qualifier.getTypeName(), qualifier); } /** * Return whether this bean has the specified qualifier. */ public boolean hasQualifier(String typeName) { return this.qualifiers.containsKey(typeName); } /** * Return the qualifier mapped to the provided type name. */ @Nullable public AutowireCandidateQualifier getQualifier(String typeName) { return this.qualifiers.get(typeName); } /** * Return all registered qualifiers. * @return the Set of {@link AutowireCandidateQualifier} objects. */ public Set<AutowireCandidateQualifier> getQualifiers() { return new LinkedHashSet<>(this.qualifiers.values()); } /** * Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. * @param source the AbstractBeanDefinition to copy from */ public void copyQualifiersFrom(AbstractBeanDefinition source) { Assert.notNull(source, "Source must not be null"); this.qualifiers.putAll(source.qualifiers); } /** * Specify a callback for creating an instance of the bean, * as an alternative to a declaratively specified factory method. * <p>If such a callback is set, it will override any other constructor * or factory method metadata. However, bean property population and * potential annotation-driven injection will still apply as usual. * @since 5.0 * @see #setConstructorArgumentValues(ConstructorArgumentValues) * @see #setPropertyValues(MutablePropertyValues) */ public void setInstanceSupplier(@Nullable Supplier<?> instanceSupplier) { this.instanceSupplier = instanceSupplier; } /** * Return a callback for creating an instance of the bean, if any. * @since 5.0 */ @Nullable public Supplier<?> getInstanceSupplier() { return this.instanceSupplier; } /** * Specify whether to allow access to non-public constructors and methods, * for the case of externalized metadata pointing to those. The default is * {@code true}; switch this to {@code false} for public access only. * <p>This applies to constructor resolution, factory method resolution, * and also init/destroy methods. Bean property accessors have to be public * in any case and are not affected by this setting. * <p>Note that annotation-driven configuration will still access non-public * members as far as they have been annotated. This setting applies to * externalized metadata in this bean definition only. */ public void setNonPublicAccessAllowed(boolean nonPublicAccessAllowed) { this.nonPublicAccessAllowed = nonPublicAccessAllowed; } /** * Return whether to allow access to non-public constructors and methods. */ public boolean isNonPublicAccessAllowed() { return this.nonPublicAccessAllowed; } /** * Specify whether to resolve constructors in lenient mode ({@code true}, * which is the default) or to switch to strict resolution (throwing an exception * in case of ambiguous constructors that all match when converting the arguments, * whereas lenient mode would use the one with the 'closest' type matches). */ public void setLenientConstructorResolution(boolean lenientConstructorResolution) { this.lenientConstructorResolution = lenientConstructorResolution; } /** * Return whether to resolve constructors in lenient mode or in strict mode. */ public boolean isLenientConstructorResolution() { return this.lenientConstructorResolution; } /** * Specify the factory bean to use, if any. * This the name of the bean to call the specified factory method on. * @see #setFactoryMethodName */ @Override public void setFactoryBeanName(@Nullable String factoryBeanName) { this.factoryBeanName = factoryBeanName; } /** * Return the factory bean name, if any. */ @Override @Nullable public String getFactoryBeanName() { return this.factoryBeanName; } /** * Specify a factory method, if any. This method will be invoked with * constructor arguments, or with no arguments if none are specified. * The method will be invoked on the specified factory bean, if any, * or otherwise as a static method on the local bean class. * @see #setFactoryBeanName * @see #setBeanClassName */ @Override public void setFactoryMethodName(@Nullable String factoryMethodName) { this.factoryMethodName = factoryMethodName; } /** * Return a factory method, if any. */ @Override @Nullable public String getFactoryMethodName() { return this.factoryMethodName; } /** * Specify constructor argument values for this bean. */ public void setConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) { this.constructorArgumentValues = constructorArgumentValues; } /** * Return constructor argument values for this bean (never {@code null}). */ @Override public ConstructorArgumentValues getConstructorArgumentValues() { if (this.constructorArgumentValues == null) { this.constructorArgumentValues = new ConstructorArgumentValues(); } return this.constructorArgumentValues; } /** * Return if there are constructor argument values defined for this bean. */ @Override public boolean hasConstructorArgumentValues() { return (this.constructorArgumentValues != null && !this.constructorArgumentValues.isEmpty()); } /** * Specify property values for this bean, if any. */ public void setPropertyValues(MutablePropertyValues propertyValues) { this.propertyValues = propertyValues; } /** * Return property values for this bean (never {@code null}). */ @Override public MutablePropertyValues getPropertyValues() { if (this.propertyValues == null) { this.propertyValues = new MutablePropertyValues(); } return this.propertyValues; } /** * Return if there are property values values defined for this bean. * @since 5.0.2 */ @Override public boolean hasPropertyValues() { return (this.propertyValues != null && !this.propertyValues.isEmpty()); } /** * Specify method overrides for the bean, if any. */ public void setMethodOverrides(MethodOverrides methodOverrides) { this.methodOverrides = methodOverrides; } /** * Return information about methods to be overridden by the IoC * container. This will be empty if there are no method overrides. * <p>Never returns {@code null}. */ public MethodOverrides getMethodOverrides() { if (this.methodOverrides == null) { this.methodOverrides = new MethodOverrides(); } return this.methodOverrides; } /** * Return if there are method overrides defined for this bean. * @since 5.0.2 */ public boolean hasMethodOverrides() { return (this.methodOverrides != null && !this.methodOverrides.isEmpty()); } /** * Set the name of the initializer method. * <p>The default is {@code null} in which case there is no initializer method. */ public void setInitMethodName(@Nullable String initMethodName) { this.initMethodName = initMethodName; } /** * Return the name of the initializer method. */ @Nullable public String getInitMethodName() { return this.initMethodName; } /** * Specify whether or not the configured init method is the default. * <p>The default value is {@code false}. * @see #setInitMethodName */ public void setEnforceInitMethod(boolean enforceInitMethod) { this.enforceInitMethod = enforceInitMethod; } /** * Indicate whether the configured init method is the default. * @see #getInitMethodName() */ public boolean isEnforceInitMethod() { return this.enforceInitMethod; } /** * Set the name of the destroy method. * <p>The default is {@code null} in which case there is no destroy method. */ public void setDestroyMethodName(@Nullable String destroyMethodName) { this.destroyMethodName = destroyMethodName; } /** * Return the name of the destroy method. */ @Nullable public String getDestroyMethodName() { return this.destroyMethodName; } /** * Specify whether or not the configured destroy method is the default. * <p>The default value is {@code false}. * @see #setDestroyMethodName */ public void setEnforceDestroyMethod(boolean enforceDestroyMethod) { this.enforceDestroyMethod = enforceDestroyMethod; } /** * Indicate whether the configured destroy method is the default. * @see #getDestroyMethodName */ public boolean isEnforceDestroyMethod() { return this.enforceDestroyMethod; } /** * Set whether this bean definition is 'synthetic', that is, not defined * by the application itself (for example, an infrastructure bean such * as a helper for auto-proxying, created through {@code <aop:config>}). */ public void setSynthetic(boolean synthetic) { this.synthetic = synthetic; } /** * Return whether this bean definition is 'synthetic', that is, * not defined by the application itself. */ public boolean isSynthetic() { return this.synthetic; } /** * Set the role hint for this {@code BeanDefinition}. */ public void setRole(int role) { this.role = role; } /** * Return the role hint for this {@code BeanDefinition}. */ @Override public int getRole() { return this.role; } /** * Set a human-readable description of this bean definition. */ public void setDescription(@Nullable String description) { this.description = description; } /** * Return a human-readable description of this bean definition. */ @Override @Nullable public String getDescription() { return this.description; } /** * Set the resource that this bean definition came from * (for the purpose of showing context in case of errors). */ public void setResource(@Nullable Resource resource) { this.resource = resource; } /** * Return the resource that this bean definition came from. */ @Nullable public Resource getResource() { return this.resource; } /** * Set a description of the resource that this bean definition * came from (for the purpose of showing context in case of errors). */ public void setResourceDescription(@Nullable String resourceDescription) { this.resource = (resourceDescription != null ? new DescriptiveResource(resourceDescription) : null); } /** * Return a description of the resource that this bean definition * came from (for the purpose of showing context in case of errors). */ @Override @Nullable public String getResourceDescription() { return (this.resource != null ? this.resource.getDescription() : null); } /** * Set the originating (e.g. decorated) BeanDefinition, if any. */ public void setOriginatingBeanDefinition(BeanDefinition originatingBd) { this.resource = new BeanDefinitionResource(originatingBd); } /** * Return the originating BeanDefinition, or {@code null} if none. * Allows for retrieving the decorated bean definition, if any. * <p>Note that this method returns the immediate originator. Iterate through the * originator chain to find the original BeanDefinition as defined by the user. */ @Override @Nullable public BeanDefinition getOriginatingBeanDefinition() { return (this.resource instanceof BeanDefinitionResource ? ((BeanDefinitionResource) this.resource).getBeanDefinition() : null); } /** * Validate this bean definition. * @throws BeanDefinitionValidationException in case of validation failure */ public void validate() throws BeanDefinitionValidationException { if (hasMethodOverrides() && getFactoryMethodName() != null) { throw new BeanDefinitionValidationException( "Cannot combine static factory method with method overrides: " + "the static factory method must create the instance"); } if (hasBeanClass()) { prepareMethodOverrides(); } } /** * Validate and prepare the method overrides defined for this bean. * Checks for existence of a method with the specified name. * @throws BeanDefinitionValidationException in case of validation failure */ public void prepareMethodOverrides() throws BeanDefinitionValidationException { // Check that lookup methods exists. if (hasMethodOverrides()) { Set<MethodOverride> overrides = getMethodOverrides().getOverrides(); synchronized (overrides) { for (MethodOverride mo : overrides) { prepareMethodOverride(mo); } } } } /** * Validate and prepare the given method override. * Checks for existence of a method with the specified name, * marking it as not overloaded if none found. * @param mo the MethodOverride object to validate * @throws BeanDefinitionValidationException in case of validation failure */ protected void prepareMethodOverride(MethodOverride mo) throws BeanDefinitionValidationException { int count = ClassUtils.getMethodCountForName(getBeanClass(), mo.getMethodName()); if (count == 0) { throw new BeanDefinitionValidationException( "Invalid method override: no method with name '" + mo.getMethodName() + "' on class [" + getBeanClassName() + "]"); } else if (count == 1) { // Mark override as not overloaded, to avoid the overhead of arg type checking. mo.setOverloaded(false); } } /** * Public declaration of Object's {@code clone()} method. * Delegates to {@link #cloneBeanDefinition()}. * @see Object#clone() */ @Override public Object clone() { return cloneBeanDefinition(); } /** * Clone this bean definition. * To be implemented by concrete subclasses. * @return the cloned bean definition object */ public abstract AbstractBeanDefinition cloneBeanDefinition(); @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof AbstractBeanDefinition)) { return false; } AbstractBeanDefinition that = (AbstractBeanDefinition) other; if (!ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName())) return false; if (!ObjectUtils.nullSafeEquals(this.scope, that.scope)) return false; if (this.abstractFlag != that.abstractFlag) return false; if (this.lazyInit != that.lazyInit) return false; if (this.autowireMode != that.autowireMode) return false; if (this.dependencyCheck != that.dependencyCheck) return false; if (!Arrays.equals(this.dependsOn, that.dependsOn)) return false; if (this.autowireCandidate != that.autowireCandidate) return false; if (!ObjectUtils.nullSafeEquals(this.qualifiers, that.qualifiers)) return false; if (this.primary != that.primary) return false; if (this.nonPublicAccessAllowed != that.nonPublicAccessAllowed) return false; if (this.lenientConstructorResolution != that.lenientConstructorResolution) return false; if (!ObjectUtils.nullSafeEquals(this.constructorArgumentValues, that.constructorArgumentValues)) return false; if (!ObjectUtils.nullSafeEquals(this.propertyValues, that.propertyValues)) return false; if (!ObjectUtils.nullSafeEquals(this.methodOverrides, that.methodOverrides)) return false; if (!ObjectUtils.nullSafeEquals(this.factoryBeanName, that.factoryBeanName)) return false; if (!ObjectUtils.nullSafeEquals(this.factoryMethodName, that.factoryMethodName)) return false; if (!ObjectUtils.nullSafeEquals(this.initMethodName, that.initMethodName)) return false; if (this.enforceInitMethod != that.enforceInitMethod) return false; if (!ObjectUtils.nullSafeEquals(this.destroyMethodName, that.destroyMethodName)) return false; if (this.enforceDestroyMethod != that.enforceDestroyMethod) return false; if (this.synthetic != that.synthetic) return false; if (this.role != that.role) return false; return super.equals(other); } @Override public int hashCode() { int hashCode = ObjectUtils.nullSafeHashCode(getBeanClassName()); hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.scope); hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.constructorArgumentValues); hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.propertyValues); hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryBeanName); hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryMethodName); hashCode = 29 * hashCode + super.hashCode(); return hashCode; } @Override public String toString() { StringBuilder sb = new StringBuilder("class ["); sb.append(getBeanClassName()).append("]"); sb.append("; scope=").append(this.scope); sb.append("; abstract=").append(this.abstractFlag); sb.append("; lazyInit=").append(this.lazyInit); sb.append("; autowireMode=").append(this.autowireMode); sb.append("; dependencyCheck=").append(this.dependencyCheck); sb.append("; autowireCandidate=").append(this.autowireCandidate); sb.append("; primary=").append(this.primary); sb.append("; factoryBeanName=").append(this.factoryBeanName); sb.append("; factoryMethodName=").append(this.factoryMethodName); sb.append("; initMethodName=").append(this.initMethodName); sb.append("; destroyMethodName=").append(this.destroyMethodName); if (this.resource != null) { sb.append("; defined in ").append(this.resource.getDescription()); } return sb.toString(); } }
[ "niuchangmeng@sunline.cn" ]
niuchangmeng@sunline.cn
6e0f854b5acf6536908e0d3a3bacf81dfd734e4e
dc0afaa5b63e1bf4ee195fa1bf56629a32d8d57a
/java/spring/first-spring-security-oauth2/oauth2-authorization-server/src/main/java/me/test/oauth2/authorization/repo/BaseRepo.java
3707e6edf30cb01889d9c57434a4832868d6702b
[]
no_license
btpka3/btpka3.github.com
370e6954af485bd6aee35fa5944007aab131e416
e5435d201641a2f21c632a28eae5ef408d2e799c
refs/heads/master
2023-08-23T18:37:31.643843
2023-08-16T11:48:38
2023-08-16T11:48:38
8,571,000
19
19
null
2021-04-12T10:01:13
2013-03-05T03:08:08
Java
UTF-8
Java
false
false
416
java
package me.test.oauth2.authorization.repo; import org.springframework.data.mongodb.repository.*; import org.springframework.data.querydsl.*; import org.springframework.data.repository.*; import java.io.*; /** * 保留该接口,方法统一追加自定义方法 */ @NoRepositoryBean public interface BaseRepo<T, ID extends Serializable> extends MongoRepository<T, ID>, QueryDslPredicateExecutor<T> { }
[ "btpka3@163.com" ]
btpka3@163.com
58d28d9053da936004ccee813a1b975861cdffd8
c087845a21b9fdc9da24e1fc253de25bbda1d3c5
/MovieFinder/app/src/main/java/omsu/imit/moviefinder/favorites/FavoritesInteractorImpl.java
c1b549d23d9e5f170f23328ec301cbc7f3523d43
[]
no_license
LiMeow/OmSU-Android
6460e0bd2b17c3d8c14e85c6b319b471e3bcf674
c627a5d21f753edf46ecfd0ea90abe34a309f502
refs/heads/master
2022-03-23T06:01:13.037491
2019-12-17T03:04:17
2019-12-17T03:04:17
220,671,657
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
package omsu.imit.moviefinder.favorites; import java.util.List; import omsu.imit.moviefinder.Movie; class FavoritesInteractorImpl implements FavoritesInteractor { private FavoritesStore favoritesStore; FavoritesInteractorImpl(FavoritesStore store) { favoritesStore = store; } @Override public void setFavorite(Movie movie) { favoritesStore.setFavorite(movie); } @Override public boolean isFavorite(String id) { return favoritesStore.isFavorite(id); } @Override public List<Movie> getFavorites() { return favoritesStore.getFavorites(); } @Override public void unFavorite(String id) { favoritesStore.unfavorite(id); } }
[ "cactuscatoo@gmail.com" ]
cactuscatoo@gmail.com
50b3a5616f657f0bd2c466bd2b85a32ecae34cb3
05042ad855b22b5ba8fabb20dd1da5d9ac43c583
/blood-donation/Project/donation-core/src/main/java/ro/ubb/donation/core/service/ProfileServiceImpl.java
fa91162fe81b841071b7491f29b445633e75fc58
[]
no_license
Pufcorina/Software-Engineering
f4b42314942cee927ba0ada40e6c46f18354cccc
4014a7f301b3518467a242b414d4da4c4165dd15
refs/heads/master
2020-04-11T22:24:35.591668
2019-02-28T12:05:19
2019-02-28T12:05:19
162,135,326
0
1
null
null
null
null
UTF-8
Java
false
false
3,928
java
package ro.ubb.donation.core.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ro.ubb.donation.core.model.Address; import ro.ubb.donation.core.model.Profile; import ro.ubb.donation.core.model.User; import ro.ubb.donation.core.repository.ProfileRepository; import java.util.Date; import java.util.List; import java.util.Optional; @Service public class ProfileServiceImpl implements ProfileService { private static final Logger log = LoggerFactory.getLogger(ProfileServiceImpl.class); @Autowired private ProfileRepository profileRepository; @Override public Optional<Profile> findProfile(int profileId) { return profileRepository.findById(profileId); } @Override public List<Profile> findAll() { return profileRepository.findAll(); } @Override @Transactional public Profile updateProfile(int profileId, String firstName, String lastName, String birthDate, String gender, String bloodType, String cnp, String rh, String email, String phone, String allergies, String diseases, String chronicIllness) { log.trace("updateProfile: profileId={}, firstName={}, lastName={}, birthDate={}, gender={}, bloodType={}, cnp={}, rh={}, email={}, phone={}, allergies={}, diseases={}, chronicIllness={}", profileId, firstName, lastName, birthDate, gender, bloodType, cnp, rh, email, phone, allergies, diseases, chronicIllness); Optional<Profile> profile = profileRepository.findById(profileId); profile.ifPresent(p -> { p.setFirstName(firstName); p.setLastName(lastName); p.setBirthDate(birthDate); p.setGender(gender); p.setBloodType(bloodType); p.setEmail(email); p.setPhone(phone); p.setCnp(cnp); p.setRh(rh); p.setDiseases(diseases); p.setAllergies(allergies); p.setChronicIllness(chronicIllness); } ); log.trace("updateProfile={}"); return profile.orElse(null); } @Override @Transactional public Profile createProfile(String firstName, String lastName, String birthDate, String gender, String bloodType, String cnp, String rh, String email, String phone, String allergies, String diseases, String chronicIllness) { log.trace("createProfile: profileId={}, firstName={}, lastName={}, birthDate={}, gender={}, bloodType={}, address={}, cnp={}, rh={}, email={}, phone={}, allergies={}, diseases={}, chronicIllness={}", firstName, lastName, birthDate, gender, bloodType, cnp, rh, email, phone, allergies, diseases, chronicIllness); Profile profile = Profile.builder() .firstName(firstName) .lastName(lastName) .birthDate(birthDate) .gender(gender) .bloodType(bloodType) .email(email) .phone(phone) .cnp(cnp) .rh(rh) .diseases(diseases) .allergies(allergies) .chronicIllness(chronicIllness) .build(); profileRepository.save(profile); log.trace("updateProfile={}"); return profile; } @Override @Transactional public void deleteProfile(int profileId) { log.trace("deleteProfile: profileId={}", profileId); Optional<Profile> profile = profileRepository.findById(profileId); profile.ifPresent(p -> profileRepository.delete(p)); } @Override public Optional<Profile> getProfileByUser(User user) { log.trace("getProfileByUser: user = {}", user); return profileRepository.findAll().stream().filter(p -> user.equals(user)).findFirst(); } }
[ "todorananacorina13@gmail.com" ]
todorananacorina13@gmail.com
2c1019d8e5e7ffade2eb0ed075f097e3ef182870
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/android/dazhihui/ui/screen/stock/hx.java
93d0f6dd81b50ef611a22e24abf1c1dc283409e9
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
496
java
package com.android.dazhihui.ui.screen.stock; import android.os.Handler; import android.os.Message; import com.android.dazhihui.ui.model.stock.MarketManager; class hx extends Handler { hx(hw paramhw) {} public void handleMessage(Message paramMessage) { MarketManager.get().sendMarketType(); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\screen\stock\hx.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
67d7882dc19e4b8c4996b23d14ba28e290c0d555
7a95ba463bd2f47bd0f21e324793008c02b4cf2f
/src/com/twu/biblioteca/entities/Biblioteca.java
d88e1c46eaf5658bf00fe7c1721d7aa2421cc91e
[ "Apache-2.0" ]
permissive
palaciowagner/twu-biblioteca-wpalacio
f583261f629f4c11d7ee2e8191ecc8855a1f637e
13656980ae4fe9c0bb5094956c96cf0d193fa9dc
refs/heads/master
2021-05-12T19:59:36.673961
2018-01-15T01:42:33
2018-01-15T01:42:33
117,108,509
0
0
null
null
null
null
UTF-8
Java
false
false
2,065
java
package com.twu.biblioteca.entities; import com.twu.biblioteca.exceptions.IncorrectPasswordException; import com.twu.biblioteca.exceptions.ItemNotFoundException; import com.twu.biblioteca.exceptions.UserNotFoundException; import java.util.List; import java.util.NoSuchElementException; public class Biblioteca { private BibliotecaItems items; private UserAccounts userAccounts; private User loggedInUser; public Biblioteca(BibliotecaItems items, UserAccounts userAccounts) { this.setItems(items); this.setUserAccounts(userAccounts); } public String checkout(String title) { try { Item item = this.items.find(title); return item.checkout(item); } catch (ItemNotFoundException e) { return e.getMessage(); } } public String returnItem(String title) { try { Item item = this.items.find(title); return item.returnItem(item); } catch (ItemNotFoundException e) { return e.getMessage(); } } public BibliotecaItems getItems(){ return items; } public List<Item> getAllItems(){ return items.all(); } public void setItems(BibliotecaItems items) { this.items = items; } public boolean signIn(String libraryNumber, String password) throws UserNotFoundException, IncorrectPasswordException{ try{ User user = this.userAccounts.findUser(libraryNumber); this.setLoggedInUser(user); return user.isPasswordCorrect(password); } catch (NoSuchElementException ex){ throw new UserNotFoundException(); } catch (IncorrectPasswordException ex){ throw ex; } } public void setUserAccounts(UserAccounts userAccounts) { this.userAccounts = userAccounts; } public User getLoggedInUser() { return loggedInUser; } public void setLoggedInUser(User loggedInUser) { this.loggedInUser = loggedInUser; } }
[ "palaciowagner@gmail.com" ]
palaciowagner@gmail.com
f53877d943cbcf8549cc9595b9c2925a1d2ca0ab
09999b89f5dc0705d02df20aedbdf1568a958797
/BlogLGPD/src/br/usjt/devweb/bloglgpd/DetalhePostagemServlet.java
7f33603d20caeb29e76e0e39bf3966fa792f51ae
[]
no_license
GustavoMenezes01/bloglgpd
800c7f882405bcea77e77b77416243b32bfc353e
3fc135dadaa1ad6271ea611b41669913ab65179d
refs/heads/master
2022-10-10T06:28:10.285271
2020-06-08T20:20:26
2020-06-08T20:20:26
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,416
java
package br.usjt.devweb.bloglgpd; import java.io.IOException; import java.util.ArrayList; import javax.servlet.RequestDispatcher; 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 br.usjt.devweb.bloglgpd.dao.BlogDAO; import br.usjt.devweb.bloglgpd.model.Postagem; import br.usjt.devweb.bloglgpd.service.BlogService; @WebServlet("/AprovacaoPostagem") public class DetalhePostagemServlet extends HttpServlet{ private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { BlogDAO dao = new BlogDAO(); //BlogService service = new BlogService(); try { ArrayList<Postagem> allPosts = dao.getAllPosts(); //ArrayList<Postagem> allPosts = service.getPostagensAprovacaoModerador(); request.setAttribute("allPosts", allPosts); RequestDispatcher view = request.getRequestDispatcher("moderacaoPostagem.jsp"); view.forward(request, response); }catch (Exception e) { throw new ServletException("Não foi possivel obter posts do banco", e); } } }
[ "ricardo_l.h.p@hotmail.com" ]
ricardo_l.h.p@hotmail.com
c1ff8d68e07bb2ea785e1270805e1f61643de3a0
c9d0468c12a2d79d594f168e0c695a5f9b09d151
/src/main/java/com/fzj/test/MBGTest.java
f4f4fc91b499e19ab586205702d3ae95d064f5c3
[]
no_license
FanZejie/SSM-CRUD
8f3c6f28fe52b1bc678f63a2c6dd8b8225696516
e054a2b459cfae788d02874d1693f1243d133fe7
refs/heads/master
2022-12-22T00:33:35.440152
2020-03-16T04:30:56
2020-03-16T04:30:56
247,591,221
0
0
null
2022-12-15T23:53:32
2020-03-16T02:18:47
Java
UTF-8
Java
false
false
913
java
package com.fzj.test; import java.io.File; import java.util.ArrayList; import java.util.List; import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.exception.InvalidConfigurationException; import org.mybatis.generator.internal.DefaultShellCallback; public class MBGTest { public static void main(String[] args) throws Exception { List<String> warnings = new ArrayList<String>(); boolean overwrite = true; File configFile = new File("mbg.xml"); ConfigurationParser cp = new ConfigurationParser(warnings); Configuration config = cp.parseConfiguration(configFile); DefaultShellCallback callback = new DefaultShellCallback(overwrite); MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); myBatisGenerator.generate(null); } }
[ "ZeJie_Fan@163.com" ]
ZeJie_Fan@163.com
90998ae7db8a30d34a05f1d9809ac17433ecd46d
257655abd725e7d39b46941c25b6d39d8a7ad191
/src/main/java/com/example/uam/model/StepOperationRequest.java
918dbb6fa2941846b2737e33623584a71adc585f
[]
no_license
Oluwasakin-Tobi/uam
be23d36dc5acfeb722aae97d072409d08db6707d
b8b2d5e6587a4e00da7a61e0b1d0ce249a9d67ac
refs/heads/master
2022-12-30T19:39:03.116341
2020-04-23T12:54:38
2020-04-23T12:54:38
258,199,397
0
0
null
2020-10-13T21:27:03
2020-04-23T12:46:27
CSS
UTF-8
Java
false
false
921
java
package com.example.uam.model; public class StepOperationRequest { private long stepid; private long productid; private String userName; private String serverIP; private String serviceClient; public long getProductid() { return productid; } public void setProductid(long productid) { this.productid = productid; } public long getStepid() { return stepid; } public void setStepid(long stepid) { this.stepid = stepid; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getServerIP() { return serverIP; } public void setServerIP(String serverIP) { this.serverIP = serverIP; } public String getServiceClient() { return serviceClient; } public void setServiceClient(String serviceClient) { this.serviceClient = serviceClient; } }
[ "ooluwasakin@ecobank.com" ]
ooluwasakin@ecobank.com
956f5f028af4fa9aa5ad781f744f9a7c2c4cf764
4e9a444ca91a13cb34b0f7609737ded210c0697b
/src/com/ipartek/Herencias/EjercicioElectrodomesticos.java
cc09f649322da253bd51d91586def54a109c4ece
[]
no_license
kulentxo/IpartekEjercicios
d5eff4ef834f82e42f862f6aecd57ca3ba9688a7
bf0af6b20d8255cbcdaf3930bd3f18ba2c716d18
refs/heads/master
2023-01-21T12:15:59.302713
2020-11-16T11:15:28
2020-11-16T11:15:28
305,314,871
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
java
package com.ipartek.Herencias; import com.ipartek.pojo.Electrodomestico; import com.ipartek.pojo.televisionPlana; public class EjercicioElectrodomesticos { public static void main(String[] args) { Electrodomestico[] televisionesPlanas; televisionesPlanas = new Electrodomestico[5]; televisionPlana tele1 = new televisionPlana("tele1", 200, 5); televisionPlana tele2 = new televisionPlana("tele2", 400, 7); televisionPlana tele3 = new televisionPlana("tele3", 500, 8); televisionPlana tele4 = new televisionPlana("tele4", 100, 3); televisionPlana tele5 = new televisionPlana("tele5", 300, 4); televisionesPlanas[0] = tele1; televisionesPlanas[1] = tele2; televisionesPlanas[2] = tele3; televisionesPlanas[3] = tele4; televisionesPlanas[4] = tele5; for (Electrodomestico electrodomestico : televisionesPlanas) { if (electrodomestico instanceof televisionPlana) { ((televisionPlana) electrodomestico).getTipoPantalla(); } } } }
[ "julenmartin.martin@gmail.com" ]
julenmartin.martin@gmail.com
147974060a83a38393b8666b2fec7f401d97249b
7ac8852d3cb027bd5e7bf966af4e1dfd32b35690
/x7-repo/x7-redis-integration/src/main/java/io/xream/x7/repository/redis/id/DefaultIdGeneratorPolicy.java
58f90e7ec2e0290171d337d511d3f231c2e0288f
[ "Apache-2.0" ]
permissive
saikumar427/x7
b6f32643244259e0df773071c541ac6ccb71e30d
7b5b3733e1a8e7bbd95bef7b3a79d62d2265b958
refs/heads/master
2022-10-25T14:56:33.939517
2020-06-15T09:23:27
2020-06-15T09:23:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,763
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 io.xream.x7.repository.redis.id; import io.xream.x7.common.bean.*; import io.xream.x7.common.repository.X; import io.xream.x7.repository.BaseRepository; import io.xream.x7.repository.id.IdGeneratorPolicy; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; import java.util.List; @Component public class DefaultIdGeneratorPolicy implements IdGeneratorPolicy { @Autowired private StringRedisTemplate stringRedisTemplate; public void setStringRedisTemplate(StringRedisTemplate stringRedisTemplate) { this.stringRedisTemplate = stringRedisTemplate; } @Override public long createId(String clzName) { return this.stringRedisTemplate.opsForHash().increment(ID_MAP_KEY,clzName,1); } @Override public void onStart(List<BaseRepository> repositoryList) { if (repositoryList == null) return; for (BaseRepository baseRepository : repositoryList) { CriteriaBuilder.ResultMappedBuilder builder = CriteriaBuilder.buildResultMapped(); Class clzz = baseRepository.getClz(); Parsed parsed = Parser.get(clzz); String key = parsed.getKey(X.KEY_ONE); BeanElement be = parsed.getElement(key); if (be.clz == String.class) continue; builder.reduce(ReduceType.MAX, be.property).paged().ignoreTotalRows(); Criteria.ResultMappedCriteria resultMappedCriteria = builder.get(); List<Long> idList = baseRepository.listPlainValue(Long.class,resultMappedCriteria); Long maxId = idList.stream().filter(id -> id != null).findFirst().orElse(0L); String name = baseRepository.getClz().getName(); this.stringRedisTemplate.opsForHash().put(IdGeneratorPolicy.ID_MAP_KEY, name, String.valueOf(maxId)); } } }
[ "cooperation@qq.com" ]
cooperation@qq.com
c31127c1d13b51e2434edc04e9dd9607d01bf67a
daa384d9043689dc75da302cdfc7975741385881
/pdd/user-service/src/main/java/com/scau/userservice/mapper/UserMapper.java
b85ab9522201a3dd64ca745560004cc4643dcde3
[]
no_license
yeyujian/SCAU-PDD
e10ad4de4281b817341502008c2c53725a317bf8
9451562f5d5ec537d6f64850a1f93ca7827bfd0a
refs/heads/master
2023-03-22T04:02:22.875430
2021-03-20T03:26:11
2021-03-20T03:26:11
349,616,142
0
0
null
null
null
null
UTF-8
Java
false
false
2,253
java
package com.scau.userservice.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import model.Shop; import model.User; import org.apache.ibatis.annotations.*; import org.apache.ibatis.mapping.FetchType; import java.util.List; /** * @program: pdd * @description: 用户管理数据库接口 * @create: 2020-11-18 19:41 **/ @Mapper public interface UserMapper extends BaseMapper<User> { @Select("select * from sys_user where username=#{username}") @Results(id="userMap",value = { @Result(id=true,column="id",property="id"), @Result(column="username",property="username"), @Result(column="password",property="password"), @Result(column="phone",property="phone"), @Result(column="sex",property="sex"), @Result(column="email",property="email"), @Result(column="nickname",property="nickname"), @Result(column="lastLogin",property="lastLogin"), @Result(column="loginIp",property="loginIp"), @Result(column="imageUrl",property="imageUrl"), @Result(column="regTime",property="regTime"), @Result(column="id",property="roles", many=@Many( select="com.scau.userservice.mapper.RoleMapper.getRolesByUserId", fetchType= FetchType.LAZY ) ) }) User getUserByUsername(String username); @Select("select * from sys_user where id=#{userid}") @ResultMap(value = "userMap") User getUserByUserId(String userid); @Select("select * from sys_user where email=#{email}") @ResultMap(value = "userMap") User getUserByUserEmail(String email); @Select("select * from sys_user where id in (select toid from user_followed where fromid=#{userid})") List<User> getFollowsByUserid(String userid); @Insert("insert into user_followed (fromid,toid) values (#{fromid},#{toid})") int followedToUser(String fromid,String toid); @Insert("insert into pdd_shop_info (id,shop_name) values (#{fromid},#{toid})") int createShop(String id,String shopName); @Select("select * from pdd_shop_info where id=#{shopid}") Shop selectShopById(String shopid); }
[ "2783880381@qq.com" ]
2783880381@qq.com
dd1497c9fb907c38c8d3c68bcd6e66c80faff70a
ca3a11eca5eb71b88da16093bbd10d36a59fa2ae
/studyolle/src/main/java/com/studyolle/settings/form/TagForm.java
e6fff40e532da0b6341bd8e345792a20b6dde7d8
[]
no_license
kevinntech/spring-jpa-app
31df690529b5f4f86d84489f981fe890011990e0
9263c577c5941a969d9a579f3f282c17fcfdc8d6
refs/heads/main
2023-03-15T15:18:54.002043
2021-02-25T06:17:57
2021-02-25T06:17:57
338,985,283
1
0
null
null
null
null
UTF-8
Java
false
false
121
java
package com.studyolle.settings.form; import lombok.Data; @Data public class TagForm { private String tagTitle; }
[ "kevinntech@nate.com" ]
kevinntech@nate.com
57ab1b4785bb7479e0fe163875e8c0bf0d4a63fd
fa3c3e1bbe35a9c1e7af0c158cd0ff56984a5d06
/src/main/java/com/hleast/utils/MergeSort.java
e806af88fe2f675d8233e4652b22849f6e0110cc
[]
no_license
LP1991/gatherdata
29c6ba5fdb57c470b507bc05e7b10cda13211ffb
e7d605be33c3e452835e9414f60983cd1f3b45bc
refs/heads/master
2021-01-20T14:15:05.255610
2017-05-22T03:31:25
2017-05-22T03:31:25
90,573,147
0
0
null
null
null
null
UTF-8
Java
false
false
3,083
java
/********************** 版权声明 ************************* * 文件名: MergeSort.java * 包名: com.hleast.utils * 版权: 杭州华量软件 gatherdata * 职责: ******************************************************** * * 创建者:Primo 创建时间:2017/5/8 * 文件版本:V1.0 * *******************************************************/ package com.hleast.utils; //package algorithm; public class MergeSort { // private static long sum = 0; /** *  * <pre> *  * 二路归并 *  * 原理:将两个有序表合并和一个有序表 *  * </pre> *  * *  * @param a *  * @param s *  * 第一个有序表的起始下标 *  * @param m *  * 第二个有序表的起始下标 *  * @param t *  * 第二个有序表的结束小标 *  * */ private static void merge(int[] a, int s, int m, int t) { int[] tmp = new int[t - s + 1]; int i = s, j = m, k = 0; System.out.println("s="+s+",m="+m+",t="+t); while (i < m && j <= t) { if (a[i] <= a[j]) { tmp[k] = a[i]; k++; i++; } else { tmp[k] = a[j]; j++; k++; } } while (i < m) { tmp[k] = a[i]; i++; k++; } while (j <= t) { tmp[k] = a[j]; j++; k++; } System.arraycopy(tmp, 0, a, s, tmp.length); for ( k = 0; k < a.length; ++k) { System.out.print(a[k] + " "); } } /** *  * *  * @param a *  * @param s *  * @param len *  * 每次归并的有序集合的长度 */ public static void mergeSort(int[] a, int s, int len) { int size = a.length; int mid = size / (len << 1); int c = size & ((len << 1) - 1); // System.out.println("c="+c+",size="+size+",((len << 1) - 1) = "+((len << 1) - 1)+",mid= "+mid); // -------归并到只剩一个有序集合的时候结束算法-------// if (mid == 0) return; // ------进行一趟归并排序-------// for (int i = 0; i < mid; ++i) { s = i * 2 * len; // System.out.println("a="+a+",s="+s+",len="+len+",(len << 1) + s - 1 = "+((len << 1) + s - 1)); merge(a, s, s + len, (len << 1) + s - 1); } // -------将剩下的数和倒数一个有序集合归并-------// if (c != 0) { // System.out.println(c); merge(a, size - c - 2 * len, size - c, size - 1); } // -------递归执行下一趟归并排序------// mergeSort(a, 0, 2 * len); } public static void main(String[] args) { int[] a = new int[]{4, 3, 6, 1, 2, 5}; mergeSort(a, 0, 1); for (int i = 0; i < a.length; ++i) { System.out.print(a[i] + " "); } } }
[ "857912753@qq.com" ]
857912753@qq.com
40b45edce62c69b17b4bf7b7f4efddc47aa81e5b
b0492717d5588a089043c4d900ebbb7c26d15e06
/Topic4_Practice_SpringTDD/src/main/java/com/bootcamp/userservice/UserWebServiceClient.java
2a21c5cdf25f1b47a4da22f38611020cce472510
[ "Apache-2.0" ]
permissive
edu-go/java-bootcamp
f41b566d96030fe416a44bb89c751640d1e66e0c
02703ff6c08edc27bf77670e3eb7bf649b6c2553
refs/heads/master
2023-06-11T09:16:31.139774
2016-02-17T02:43:35
2016-02-17T02:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.bootcamp.userservice; public class UserWebServiceClient implements UserService { UserService imp = new UserServiceImpl(); public void deleteUser(User userToDelete) { imp.deleteUser(userToDelete); } public String getUser() { return imp.getUser(); } public void addUser(User newUser) { imp.addUser(newUser); } public void updateUser(User user) { imp.updateUser(user); } }
[ "eduardo.g@gmail.com" ]
eduardo.g@gmail.com
618959b751b589155078b27e41075eee2d5665f1
4917bcfe0f4d1b8a974ca02ba1a28e0dcad7aaaf
/src/main/java/com/google/schemaorg/core/RealEstateAgent.java
4ce17dbc69ce5cfca5b765a066ec0792f1523025
[ "Apache-2.0" ]
permissive
google/schemaorg-java
e9a74eb5c5a69014a9763d961103a32254e792b7
d11c8edf686de6446c34e92f9b3243079d8cb76e
refs/heads/master
2023-08-23T12:49:26.774277
2022-08-25T12:49:06
2022-08-25T12:49:06
58,669,416
77
48
Apache-2.0
2022-08-06T11:35:15
2016-05-12T19:08:04
Java
UTF-8
Java
false
false
23,034
java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.schemaorg.core; import com.google.schemaorg.JsonLdContext; import com.google.schemaorg.SchemaOrgType; import com.google.schemaorg.core.datatype.Date; import com.google.schemaorg.core.datatype.Text; import com.google.schemaorg.core.datatype.URL; import com.google.schemaorg.goog.PopularityScoreSpecification; import javax.annotation.Nullable; /** * Interface of <a href="http://schema.org/RealEstateAgent}">http://schema.org/RealEstateAgent}</a>. */ public interface RealEstateAgent extends LocalBusiness { /** * Builder interface of <a * href="http://schema.org/RealEstateAgent}">http://schema.org/RealEstateAgent}</a>. */ public interface Builder extends LocalBusiness.Builder { @Override Builder addJsonLdContext(@Nullable JsonLdContext context); @Override Builder addJsonLdContext(@Nullable JsonLdContext.Builder context); @Override Builder setJsonLdId(@Nullable String value); @Override Builder setJsonLdReverse(String property, Thing obj); @Override Builder setJsonLdReverse(String property, Thing.Builder builder); /** Add a value to property additionalProperty. */ Builder addAdditionalProperty(PropertyValue value); /** Add a value to property additionalProperty. */ Builder addAdditionalProperty(PropertyValue.Builder value); /** Add a value to property additionalProperty. */ Builder addAdditionalProperty(String value); /** Add a value to property additionalType. */ Builder addAdditionalType(URL value); /** Add a value to property additionalType. */ Builder addAdditionalType(String value); /** Add a value to property address. */ Builder addAddress(PostalAddress value); /** Add a value to property address. */ Builder addAddress(PostalAddress.Builder value); /** Add a value to property address. */ Builder addAddress(Text value); /** Add a value to property address. */ Builder addAddress(String value); /** Add a value to property aggregateRating. */ Builder addAggregateRating(AggregateRating value); /** Add a value to property aggregateRating. */ Builder addAggregateRating(AggregateRating.Builder value); /** Add a value to property aggregateRating. */ Builder addAggregateRating(String value); /** Add a value to property alternateName. */ Builder addAlternateName(Text value); /** Add a value to property alternateName. */ Builder addAlternateName(String value); /** Add a value to property alumni. */ Builder addAlumni(Person value); /** Add a value to property alumni. */ Builder addAlumni(Person.Builder value); /** Add a value to property alumni. */ Builder addAlumni(String value); /** Add a value to property areaServed. */ Builder addAreaServed(AdministrativeArea value); /** Add a value to property areaServed. */ Builder addAreaServed(AdministrativeArea.Builder value); /** Add a value to property areaServed. */ Builder addAreaServed(GeoShape value); /** Add a value to property areaServed. */ Builder addAreaServed(GeoShape.Builder value); /** Add a value to property areaServed. */ Builder addAreaServed(Place value); /** Add a value to property areaServed. */ Builder addAreaServed(Place.Builder value); /** Add a value to property areaServed. */ Builder addAreaServed(Text value); /** Add a value to property areaServed. */ Builder addAreaServed(String value); /** Add a value to property award. */ Builder addAward(Text value); /** Add a value to property award. */ Builder addAward(String value); /** Add a value to property awards. */ Builder addAwards(Text value); /** Add a value to property awards. */ Builder addAwards(String value); /** Add a value to property branchCode. */ Builder addBranchCode(Text value); /** Add a value to property branchCode. */ Builder addBranchCode(String value); /** Add a value to property branchOf. */ Builder addBranchOf(Organization value); /** Add a value to property branchOf. */ Builder addBranchOf(Organization.Builder value); /** Add a value to property branchOf. */ Builder addBranchOf(String value); /** Add a value to property brand. */ Builder addBrand(Brand value); /** Add a value to property brand. */ Builder addBrand(Brand.Builder value); /** Add a value to property brand. */ Builder addBrand(Organization value); /** Add a value to property brand. */ Builder addBrand(Organization.Builder value); /** Add a value to property brand. */ Builder addBrand(String value); /** Add a value to property contactPoint. */ Builder addContactPoint(ContactPoint value); /** Add a value to property contactPoint. */ Builder addContactPoint(ContactPoint.Builder value); /** Add a value to property contactPoint. */ Builder addContactPoint(String value); /** Add a value to property contactPoints. */ Builder addContactPoints(ContactPoint value); /** Add a value to property contactPoints. */ Builder addContactPoints(ContactPoint.Builder value); /** Add a value to property contactPoints. */ Builder addContactPoints(String value); /** Add a value to property containedIn. */ Builder addContainedIn(Place value); /** Add a value to property containedIn. */ Builder addContainedIn(Place.Builder value); /** Add a value to property containedIn. */ Builder addContainedIn(String value); /** Add a value to property containedInPlace. */ Builder addContainedInPlace(Place value); /** Add a value to property containedInPlace. */ Builder addContainedInPlace(Place.Builder value); /** Add a value to property containedInPlace. */ Builder addContainedInPlace(String value); /** Add a value to property containsPlace. */ Builder addContainsPlace(Place value); /** Add a value to property containsPlace. */ Builder addContainsPlace(Place.Builder value); /** Add a value to property containsPlace. */ Builder addContainsPlace(String value); /** Add a value to property currenciesAccepted. */ Builder addCurrenciesAccepted(Text value); /** Add a value to property currenciesAccepted. */ Builder addCurrenciesAccepted(String value); /** Add a value to property department. */ Builder addDepartment(Organization value); /** Add a value to property department. */ Builder addDepartment(Organization.Builder value); /** Add a value to property department. */ Builder addDepartment(String value); /** Add a value to property description. */ Builder addDescription(Text value); /** Add a value to property description. */ Builder addDescription(String value); /** Add a value to property dissolutionDate. */ Builder addDissolutionDate(Date value); /** Add a value to property dissolutionDate. */ Builder addDissolutionDate(String value); /** Add a value to property duns. */ Builder addDuns(Text value); /** Add a value to property duns. */ Builder addDuns(String value); /** Add a value to property email. */ Builder addEmail(Text value); /** Add a value to property email. */ Builder addEmail(String value); /** Add a value to property employee. */ Builder addEmployee(Person value); /** Add a value to property employee. */ Builder addEmployee(Person.Builder value); /** Add a value to property employee. */ Builder addEmployee(String value); /** Add a value to property employees. */ Builder addEmployees(Person value); /** Add a value to property employees. */ Builder addEmployees(Person.Builder value); /** Add a value to property employees. */ Builder addEmployees(String value); /** Add a value to property event. */ Builder addEvent(Event value); /** Add a value to property event. */ Builder addEvent(Event.Builder value); /** Add a value to property event. */ Builder addEvent(String value); /** Add a value to property events. */ Builder addEvents(Event value); /** Add a value to property events. */ Builder addEvents(Event.Builder value); /** Add a value to property events. */ Builder addEvents(String value); /** Add a value to property faxNumber. */ Builder addFaxNumber(Text value); /** Add a value to property faxNumber. */ Builder addFaxNumber(String value); /** Add a value to property founder. */ Builder addFounder(Person value); /** Add a value to property founder. */ Builder addFounder(Person.Builder value); /** Add a value to property founder. */ Builder addFounder(String value); /** Add a value to property founders. */ Builder addFounders(Person value); /** Add a value to property founders. */ Builder addFounders(Person.Builder value); /** Add a value to property founders. */ Builder addFounders(String value); /** Add a value to property foundingDate. */ Builder addFoundingDate(Date value); /** Add a value to property foundingDate. */ Builder addFoundingDate(String value); /** Add a value to property foundingLocation. */ Builder addFoundingLocation(Place value); /** Add a value to property foundingLocation. */ Builder addFoundingLocation(Place.Builder value); /** Add a value to property foundingLocation. */ Builder addFoundingLocation(String value); /** Add a value to property geo. */ Builder addGeo(GeoCoordinates value); /** Add a value to property geo. */ Builder addGeo(GeoCoordinates.Builder value); /** Add a value to property geo. */ Builder addGeo(GeoShape value); /** Add a value to property geo. */ Builder addGeo(GeoShape.Builder value); /** Add a value to property geo. */ Builder addGeo(String value); /** Add a value to property globalLocationNumber. */ Builder addGlobalLocationNumber(Text value); /** Add a value to property globalLocationNumber. */ Builder addGlobalLocationNumber(String value); /** Add a value to property hasMap. */ Builder addHasMap(Map value); /** Add a value to property hasMap. */ Builder addHasMap(Map.Builder value); /** Add a value to property hasMap. */ Builder addHasMap(URL value); /** Add a value to property hasMap. */ Builder addHasMap(String value); /** Add a value to property hasOfferCatalog. */ Builder addHasOfferCatalog(OfferCatalog value); /** Add a value to property hasOfferCatalog. */ Builder addHasOfferCatalog(OfferCatalog.Builder value); /** Add a value to property hasOfferCatalog. */ Builder addHasOfferCatalog(String value); /** Add a value to property hasPOS. */ Builder addHasPOS(Place value); /** Add a value to property hasPOS. */ Builder addHasPOS(Place.Builder value); /** Add a value to property hasPOS. */ Builder addHasPOS(String value); /** Add a value to property image. */ Builder addImage(ImageObject value); /** Add a value to property image. */ Builder addImage(ImageObject.Builder value); /** Add a value to property image. */ Builder addImage(URL value); /** Add a value to property image. */ Builder addImage(String value); /** Add a value to property isicV4. */ Builder addIsicV4(Text value); /** Add a value to property isicV4. */ Builder addIsicV4(String value); /** Add a value to property legalName. */ Builder addLegalName(Text value); /** Add a value to property legalName. */ Builder addLegalName(String value); /** Add a value to property location. */ Builder addLocation(Place value); /** Add a value to property location. */ Builder addLocation(Place.Builder value); /** Add a value to property location. */ Builder addLocation(PostalAddress value); /** Add a value to property location. */ Builder addLocation(PostalAddress.Builder value); /** Add a value to property location. */ Builder addLocation(Text value); /** Add a value to property location. */ Builder addLocation(String value); /** Add a value to property logo. */ Builder addLogo(ImageObject value); /** Add a value to property logo. */ Builder addLogo(ImageObject.Builder value); /** Add a value to property logo. */ Builder addLogo(URL value); /** Add a value to property logo. */ Builder addLogo(String value); /** Add a value to property mainEntityOfPage. */ Builder addMainEntityOfPage(CreativeWork value); /** Add a value to property mainEntityOfPage. */ Builder addMainEntityOfPage(CreativeWork.Builder value); /** Add a value to property mainEntityOfPage. */ Builder addMainEntityOfPage(URL value); /** Add a value to property mainEntityOfPage. */ Builder addMainEntityOfPage(String value); /** Add a value to property makesOffer. */ Builder addMakesOffer(Offer value); /** Add a value to property makesOffer. */ Builder addMakesOffer(Offer.Builder value); /** Add a value to property makesOffer. */ Builder addMakesOffer(String value); /** Add a value to property map. */ Builder addMap(URL value); /** Add a value to property map. */ Builder addMap(String value); /** Add a value to property maps. */ Builder addMaps(URL value); /** Add a value to property maps. */ Builder addMaps(String value); /** Add a value to property member. */ Builder addMember(Organization value); /** Add a value to property member. */ Builder addMember(Organization.Builder value); /** Add a value to property member. */ Builder addMember(Person value); /** Add a value to property member. */ Builder addMember(Person.Builder value); /** Add a value to property member. */ Builder addMember(String value); /** Add a value to property memberOf. */ Builder addMemberOf(Organization value); /** Add a value to property memberOf. */ Builder addMemberOf(Organization.Builder value); /** Add a value to property memberOf. */ Builder addMemberOf(ProgramMembership value); /** Add a value to property memberOf. */ Builder addMemberOf(ProgramMembership.Builder value); /** Add a value to property memberOf. */ Builder addMemberOf(String value); /** Add a value to property members. */ Builder addMembers(Organization value); /** Add a value to property members. */ Builder addMembers(Organization.Builder value); /** Add a value to property members. */ Builder addMembers(Person value); /** Add a value to property members. */ Builder addMembers(Person.Builder value); /** Add a value to property members. */ Builder addMembers(String value); /** Add a value to property naics. */ Builder addNaics(Text value); /** Add a value to property naics. */ Builder addNaics(String value); /** Add a value to property name. */ Builder addName(Text value); /** Add a value to property name. */ Builder addName(String value); /** Add a value to property numberOfEmployees. */ Builder addNumberOfEmployees(QuantitativeValue value); /** Add a value to property numberOfEmployees. */ Builder addNumberOfEmployees(QuantitativeValue.Builder value); /** Add a value to property numberOfEmployees. */ Builder addNumberOfEmployees(String value); /** Add a value to property openingHours. */ Builder addOpeningHours(Text value); /** Add a value to property openingHours. */ Builder addOpeningHours(String value); /** Add a value to property openingHoursSpecification. */ Builder addOpeningHoursSpecification(OpeningHoursSpecification value); /** Add a value to property openingHoursSpecification. */ Builder addOpeningHoursSpecification(OpeningHoursSpecification.Builder value); /** Add a value to property openingHoursSpecification. */ Builder addOpeningHoursSpecification(String value); /** Add a value to property owns. */ Builder addOwns(OwnershipInfo value); /** Add a value to property owns. */ Builder addOwns(OwnershipInfo.Builder value); /** Add a value to property owns. */ Builder addOwns(Product value); /** Add a value to property owns. */ Builder addOwns(Product.Builder value); /** Add a value to property owns. */ Builder addOwns(String value); /** Add a value to property parentOrganization. */ Builder addParentOrganization(Organization value); /** Add a value to property parentOrganization. */ Builder addParentOrganization(Organization.Builder value); /** Add a value to property parentOrganization. */ Builder addParentOrganization(String value); /** Add a value to property paymentAccepted. */ Builder addPaymentAccepted(Text value); /** Add a value to property paymentAccepted. */ Builder addPaymentAccepted(String value); /** Add a value to property photo. */ Builder addPhoto(ImageObject value); /** Add a value to property photo. */ Builder addPhoto(ImageObject.Builder value); /** Add a value to property photo. */ Builder addPhoto(Photograph value); /** Add a value to property photo. */ Builder addPhoto(Photograph.Builder value); /** Add a value to property photo. */ Builder addPhoto(String value); /** Add a value to property photos. */ Builder addPhotos(ImageObject value); /** Add a value to property photos. */ Builder addPhotos(ImageObject.Builder value); /** Add a value to property photos. */ Builder addPhotos(Photograph value); /** Add a value to property photos. */ Builder addPhotos(Photograph.Builder value); /** Add a value to property photos. */ Builder addPhotos(String value); /** Add a value to property potentialAction. */ Builder addPotentialAction(Action value); /** Add a value to property potentialAction. */ Builder addPotentialAction(Action.Builder value); /** Add a value to property potentialAction. */ Builder addPotentialAction(String value); /** Add a value to property priceRange. */ Builder addPriceRange(Text value); /** Add a value to property priceRange. */ Builder addPriceRange(String value); /** Add a value to property review. */ Builder addReview(Review value); /** Add a value to property review. */ Builder addReview(Review.Builder value); /** Add a value to property review. */ Builder addReview(String value); /** Add a value to property reviews. */ Builder addReviews(Review value); /** Add a value to property reviews. */ Builder addReviews(Review.Builder value); /** Add a value to property reviews. */ Builder addReviews(String value); /** Add a value to property sameAs. */ Builder addSameAs(URL value); /** Add a value to property sameAs. */ Builder addSameAs(String value); /** Add a value to property seeks. */ Builder addSeeks(Demand value); /** Add a value to property seeks. */ Builder addSeeks(Demand.Builder value); /** Add a value to property seeks. */ Builder addSeeks(String value); /** Add a value to property serviceArea. */ Builder addServiceArea(AdministrativeArea value); /** Add a value to property serviceArea. */ Builder addServiceArea(AdministrativeArea.Builder value); /** Add a value to property serviceArea. */ Builder addServiceArea(GeoShape value); /** Add a value to property serviceArea. */ Builder addServiceArea(GeoShape.Builder value); /** Add a value to property serviceArea. */ Builder addServiceArea(Place value); /** Add a value to property serviceArea. */ Builder addServiceArea(Place.Builder value); /** Add a value to property serviceArea. */ Builder addServiceArea(String value); /** Add a value to property subOrganization. */ Builder addSubOrganization(Organization value); /** Add a value to property subOrganization. */ Builder addSubOrganization(Organization.Builder value); /** Add a value to property subOrganization. */ Builder addSubOrganization(String value); /** Add a value to property taxID. */ Builder addTaxID(Text value); /** Add a value to property taxID. */ Builder addTaxID(String value); /** Add a value to property telephone. */ Builder addTelephone(Text value); /** Add a value to property telephone. */ Builder addTelephone(String value); /** Add a value to property url. */ Builder addUrl(URL value); /** Add a value to property url. */ Builder addUrl(String value); /** Add a value to property vatID. */ Builder addVatID(Text value); /** Add a value to property vatID. */ Builder addVatID(String value); /** Add a value to property detailedDescription. */ Builder addDetailedDescription(Article value); /** Add a value to property detailedDescription. */ Builder addDetailedDescription(Article.Builder value); /** Add a value to property detailedDescription. */ Builder addDetailedDescription(String value); /** Add a value to property popularityScore. */ Builder addPopularityScore(PopularityScoreSpecification value); /** Add a value to property popularityScore. */ Builder addPopularityScore(PopularityScoreSpecification.Builder value); /** Add a value to property popularityScore. */ Builder addPopularityScore(String value); /** * Add a value to property. * * @param name The property name. * @param value The value of the property. */ Builder addProperty(String name, SchemaOrgType value); /** * Add a value to property. * * @param name The property name. * @param builder The schema.org object builder for the property value. */ Builder addProperty(String name, Thing.Builder builder); /** * Add a value to property. * * @param name The property name. * @param value The string value of the property. */ Builder addProperty(String name, String value); /** Build a {@link RealEstateAgent} object. */ RealEstateAgent build(); } }
[ "yuanzh@google.com" ]
yuanzh@google.com
d9357abf48b8b53aae98b8e79e39fb84cae205c8
b9517b8662e137c8f5fae72d5d830259a803c525
/src/components/StandartShoigiField.java
7283a521841bd92b10a24fca3fc4ab55cc3a85f9
[]
no_license
istimaldar/Shogi
ff318c9edb4cefc4b2b2a81c99cc357ce5eba522
257433172c2fae03f2dacd1ff9e60b7784d112fc
refs/heads/master
2021-01-21T14:04:16.780570
2016-06-14T18:36:02
2016-06-14T18:36:02
57,180,502
0
0
null
null
null
null
UTF-8
Java
false
false
2,657
java
package components; import application.Storage; import components.Field; import logic.FieldModel; public class StandartShoigiField extends Field { public StandartShoigiField(double x, double y, double width, double height) { super(9, 9, 20, x, y, width, height); } public void createStartPosition() { Figure figure = new King(0, 0, 50, 50, true); getChildren().add(figure); cells[4][8].addFigure(figure); figure = new Bishop(0, 0, 50, 50, true); getChildren().add(figure); cells[1][7].addFigure(figure); figure = new Rook(0, 0, 50, 50, true); getChildren().add(figure); cells[7][7].addFigure(figure); for (int i = 0; i < 2; i++) { figure = new Gold(0, 0, 50, 50, true); getChildren().add(figure); cells[Math.abs(i * 8 - 3)][8].addFigure(figure); figure = new Silver(0, 0, 50, 50, true); getChildren().add(figure); cells[Math.abs(i * 8 - 2)][8].addFigure(figure); figure = new Knight(0, 0, 50, 50, true); getChildren().add(figure); cells[Math.abs(i * 8 - 1)][8].addFigure(figure); figure = new Lance(0, 0, 50, 50, true); getChildren().add(figure); cells[Math.abs(i * 8 - 0)][8].addFigure(figure); } for (int i = 0; i < 9; i++) { figure = new Pawn(0, 0, 50, 50, true); getChildren().add(figure); cells[i][6].addFigure(figure); } figure = new King(0, 0, 50, 40, false); getChildren().add(figure); cells[4][0].addFigure(figure); figure = new Bishop(0, 0, 50, 40, false); getChildren().add(figure); cells[7][1].addFigure(figure); figure = new Rook(0, 0, 50, 40, false); getChildren().add(figure); cells[1][1].addFigure(figure); for (int i = 0; i < 2; i++) { figure = new Gold(0, 0, 50, 50, false); getChildren().add(figure); cells[Math.abs(i * 8 - 3)][0].addFigure(figure); figure = new Silver(0, 0, 50, 50, false); getChildren().add(figure); cells[Math.abs(i * 8 - 2)][0].addFigure(figure); figure = new Knight(0, 0, 50, 50, false); getChildren().add(figure); cells[Math.abs(i * 8 - 1)][0].addFigure(figure); figure = new Lance(0, 0, 50, 50, false); getChildren().add(figure); cells[Math.abs(i * 8 - 0)][0].addFigure(figure); } for (int i = 0; i < 9; i++) { figure = new Pawn(0, 0, 50, 50, false); getChildren().add(figure); cells[i][2].addFigure(figure); } model = new FieldModel(9, 9, cells, this); if (Storage.isFirstPlayerAComputer == true) model.endOfMapping(); } }
[ "istimaldar@gmail.com" ]
istimaldar@gmail.com
25fbedae1fb1809aa57315dd71df882ba8b5e556
3a5f18cbd4733eb8539fbcc8d68d378ca496575a
/backend/src/test/java/com/scopic/auction/repository/jpa/MoneyConverterTest.java
f8bc2faa1e86ccb237f2fae01e05d79a263f011b
[]
no_license
rlagoue/auction
e67c9f18bab3abe2d7df92a2e5214e4dfebca121
44941dfde78bae265bdbd9c52a987c98e107e34e
refs/heads/main
2023-05-07T16:39:20.268532
2021-05-31T16:09:21
2021-05-31T16:09:21
370,709,438
0
0
null
null
null
null
UTF-8
Java
false
false
1,836
java
package com.scopic.auction.repository.jpa; import com.scopic.auction.domain.Money; import com.scopic.auction.dto.MoneyDto; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.util.Currency; import static com.scopic.auction.utils.Whitebox.getFieldValue; import static org.junit.jupiter.api.Assertions.*; class MoneyConverterTest { public MoneyConverter objectToTest = new MoneyConverter(); @Test public void convertToDatabaseColumnTest() { Money money = new Money(20L, "XAF", 0); String databaseColumnValue = objectToTest.convertToDatabaseColumn(money); assertEquals("XAF;0;20", databaseColumnValue); } @Test public void convertToDatabaseColumnNullArgumentTest() { assertNull(objectToTest.convertToDatabaseColumn(null)); } @Test public void convertToEntityAttributeTest() { Money entityAttribute = objectToTest.convertToEntityAttribute("XAF;0;20"); assertEquals(Currency.getInstance("XAF"), getFieldValue(entityAttribute, "currency")); assertEquals(0, (int) getFieldValue(entityAttribute, "defaultFractionDigits")); assertEquals(20L, (long) getFieldValue(entityAttribute, "value")); } @Test public void convertToEntityAttributeNullTest() { assertNull(objectToTest.convertToEntityAttribute(null)); } @Test public void convertToEntityAttributeEmptyTest() { assertNull(objectToTest.convertToEntityAttribute("")); } @Test public void convertToEntityAttributeMalformedTest() { IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> objectToTest.convertToEntityAttribute("XAF;;4")); assertEquals("'XAF;;4' is an illegal argument for Money object creation", exception.getMessage()); } }
[ "lagoue.njinthe@bao-sarl.cm" ]
lagoue.njinthe@bao-sarl.cm
a52170b09abfaa73a891a8ba00e24072b36410d1
093e296906751d313c17f1c5c966036ce7129d9e
/Lab13Compulsory/src/com/SetLocale.java
a151b04e263baffcb14abd2d241de2723a380758
[]
no_license
Alin-bot/AdvancedProgramming
612bb0ddb9cdc86de6e7526f69451a36365418f4
c8f4facd081695043e805b62898e5048ba5a30f4
refs/heads/main
2023-05-15T01:08:56.658055
2021-06-08T12:38:33
2021-06-08T12:38:33
338,988,070
0
0
null
null
null
null
UTF-8
Java
false
false
41
java
package com; public class SetLocale { }
[ "alin.vezeteu@yahoo.ro" ]
alin.vezeteu@yahoo.ro
edc3bc52a357903c8af1e8d4f82c2245d63e6931
d1dd69d116f13bbc467fc1ef33e6e765ab7b5deb
/src/main/java/com/example/demo/repo/question_repo.java
a99123a3ad1f858f1626d01fee07e02de8fc28b1
[]
no_license
Yogeshtalreja/QuizApp
fc609c2467b4c730cf8bb140b8ec6c39e620f794
c2a312fd570c0599964c64b7a717446e3134f45b
refs/heads/master
2023-06-01T13:36:05.524781
2021-06-12T15:13:51
2021-06-12T15:13:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
208
java
package com.example.demo.repo; import com.example.demo.model.Question; import org.springframework.data.repository.CrudRepository; public interface question_repo extends CrudRepository<Question,Integer> { }
[ "yogeshtalreja54@gmail.com" ]
yogeshtalreja54@gmail.com
ef6eeed3b9c5a9e668f451ee13638fa10f49eb72
f80fcb5ba1de922083a5a17311b53fc4f9e5a7dd
/src/main/java/org/jboss/cache/marshall/ReplicationObserver.java
9d0ba1e27930f92ca72bb9a002413f50ed741867
[]
no_license
SummaNetworks/jbosscache-core
c93d588aebab91f94cf36470c2939799e7b3717c
7d880bbe35274d1a00bd6b06a00d9416005f871e
refs/heads/master
2020-04-05T12:08:14.889656
2019-09-25T15:44:22
2019-09-25T15:44:22
156,860,363
0
1
null
null
null
null
UTF-8
Java
false
false
348
java
package org.jboss.cache.marshall; import org.jboss.cache.commands.ReplicableCommand; /** * This is a hook for observing remotely replicated commands on this instance. Mainly used for unit testing. * * @author Mircea.Markus@jboss.com */ public interface ReplicationObserver { public void afterExecutingCommand(ReplicableCommand command); }
[ "blackpent@gmail.com" ]
blackpent@gmail.com
031f4182645b635a3b9f8d4f9ae9406959b91b47
b04a04b297f6b6032d2558f21d6ace73f740454a
/src/sda/homework/Fibonacci.java
24e4a89b60d5fac858fda1f486758ac579fe3fbc
[]
no_license
chrzasz/sda.training
e6f9fe1a59a354179ef5864b93fd55835003e4a9
6457b4090015cbb208ba530aa34d803597eda2db
refs/heads/master
2020-04-10T19:49:44.247390
2019-01-18T14:16:25
2019-01-18T14:16:25
152,871,567
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
package sda.homework; import java.util.Scanner; /** * Created by Grzegorz Chrzaszczyk on 15-10-2018 01:37 AM */ public class Fibonacci { public static void main(String[] args) { int n = 1; String str; System.out.println("Enter Fibonacci range: "); Scanner scanner = new Scanner(System.in); str = scanner.nextLine(); n = Integer.parseInt(str); for (int i = 0; i < n ; i++) { System.out.println(i + ": " + fibonacci(i)); } System.out.print("First " + n + " terms: "); int t1 = 0, t2 = 1; for (int i = 1; i <= n; ++i) { System.out.print(t1 + ","); int sum = t1 + t2; t1 = t2; t2 = sum; } } //Fibonacci Series using Recursion public static long fibonacci(int n) { if (n <= 1) return n; else return fibonacci(n-1) + fibonacci(n-2); } }
[ "chrzaszczyk@gmail.com" ]
chrzaszczyk@gmail.com
d46eafc6c7fa461b6ecc0747b34a668748ab9fcd
8a7167477b7067593039d817da43310616d1e4e3
/swiftboot-sheet/src/main/java/org/swiftboot/sheet/meta/SheetInfo.java
6a723368361a6ce596deb57d47c4ba7a816a45aa
[ "Apache-2.0" ]
permissive
swiftech/swiftboot
43f0c7ec568df447f3c38f622ef21da8571cdc51
414e99150c6cde05602c5b742149f97a4f9b59d4
refs/heads/master
2023-08-31T14:31:41.371754
2023-08-29T10:06:22
2023-08-29T10:06:22
162,388,276
10
1
Apache-2.0
2023-02-05T03:17:34
2018-12-19T05:42:15
Java
UTF-8
Java
false
false
94
java
package org.swiftboot.sheet.meta; /** * @author swiftech */ public interface SheetInfo { }
[ "awsksupport@gmail.com" ]
awsksupport@gmail.com
d8c09acb14e89b42f0f73f9e589dcaa68f60a3d2
86930ce4706f59ac1bb0c4b076106917d877fd99
/src/main/java/com/hanyun/scm/api/domain/request/purchase/plan/PurchasePlanConfirmRequest.java
2514694caf82edc1791c822a84d20518a7b78f3b
[]
no_license
fengqingyuns/erp
61efe476e8926f2df8324fc7af66b16d80716785
bc6c654afe76fed0ba8eb515cc7ddd7acc577060
refs/heads/master
2022-07-13T11:18:10.661271
2019-12-05T14:21:30
2019-12-05T14:21:30
226,119,652
0
0
null
2022-06-29T17:49:35
2019-12-05T14:23:18
Java
UTF-8
Java
false
false
926
java
package com.hanyun.scm.api.domain.request.purchase.plan; import org.hibernate.validator.constraints.NotEmpty; public class PurchasePlanConfirmRequest extends PurchasePlanBaseRequest{ @NotEmpty private String planId; private String brandId; private String userId; private Boolean auditStatus; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Boolean getAuditStatus() { return auditStatus; } public void setAuditStatus(Boolean auditStatus) { this.auditStatus = auditStatus; } public String getPlanId() { return planId; } public void setPlanId(String planId) { this.planId = planId; } public String getBrandId() { return brandId; } public void setBrandId(String brandId) { this.brandId = brandId; } }
[ "litao@winshang.com" ]
litao@winshang.com
f0618c111155cf16488f0414563bed2e841debdc
55860c6be017e240c24cac51cd77cd10257c562e
/app/src/main/java/com/test/dynamic/presenter/MyInfoAtPresenter.java
1aa0d04453ab94839179acaf061a74c9ed00c88d
[ "Apache-2.0" ]
permissive
1960176680/GitExpressHome
64525d5323153f511b77b21ade06515ea4383ed6
109e72b499b494c3b58dd1f2ce6aec24f04845b0
refs/heads/master
2021-04-06T08:13:06.545552
2018-03-22T07:27:13
2018-03-22T07:27:13
124,870,691
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.test.dynamic.presenter; import com.test.dynamic.presenter.base.BasePresenter; import com.test.dynamic.ui.common.BaseActivity; import com.test.dynamic.ui.view.IMyInfoAtView; /** * Created by Administrator on 2018-03-15. */ public class MyInfoAtPresenter extends BasePresenter<IMyInfoAtView> { public MyInfoAtPresenter(BaseActivity context) { super(context); } }
[ "1960176680@qq.com" ]
1960176680@qq.com
45f6040acd1b7e91922573e050a8a14bec7209a9
6764467eaeab6271d09373c59873a5c45fbdaad7
/src/org/usfirst/frc/team5906/robot/commands/ExampleCommand.java
ca9f1a82d8b86f7f00252a485341d22c54e6a3e9
[]
no_license
Bennington-FIRST-Robotics-Dev-Org/5906-POWERUP
939ed43f45d9ad2843b79fc1ca7ef8aa21712d3d
6df0e9fd623ac1ba9a4d10322ca4b5f8b8ab260e
refs/heads/master
2021-09-07T03:47:14.017822
2018-02-07T02:20:21
2018-02-07T02:20:21
119,769,680
0
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package org.usfirst.frc.team5906.robot.commands; import edu.wpi.first.wpilibj.command.Command; import org.usfirst.frc.team5906.robot.Robot; /** * An example command. You can replace me with your own command. */ public class ExampleCommand extends Command { public ExampleCommand() { // Use requires() here to declare subsystem dependencies requires(Robot.kExampleSubsystem); } // Called just before this Command runs the first time @Override protected void initialize() { } // Called repeatedly when this Command is scheduled to run @Override protected void execute() { } // Make this return true when this Command no longer needs to run execute() @Override protected boolean isFinished() { return false; } // Called once after isFinished returns true @Override protected void end() { } // Called when another command which requires one or more of the same // subsystems is scheduled to run @Override protected void interrupted() { } }
[ "gspribil@gmail.com" ]
gspribil@gmail.com
81fb4a57f51e0c0413b8e059859eb210fd04cfe0
3cb331bb52b46027deb67db4290cba91ec11b049
/src/application/toLPDash.java
0284cf3614e231bf0a760030ac9e55a5ec0eec75
[]
no_license
BurritoSlayer/CITLMS
1b37eeb6e0d641ca8a8b4d1d47e0728ca70babfd
362eb49f47d3fcfecbb9035f3a8cadcd9319f57d
refs/heads/master
2016-09-06T05:07:31.778572
2015-06-24T22:58:23
2015-06-24T22:58:23
38,015,565
0
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
package application; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class toLPDash */ @WebServlet("/toLPDash") public class toLPDash extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public toLPDash() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher requestDispatcher = null; request.setAttribute("UsersName", indexController.cUser.getName()); requestDispatcher = request.getRequestDispatcher("LessonPlanDash.jsp"); requestDispatcher.forward(request, response); } }
[ "ntacey@PC30071.catalystsolves.com" ]
ntacey@PC30071.catalystsolves.com
4e606eea41654c5683142fe013eb13d9329a0cbc
76e37cf48101fccba272f84445aa1012e53dc0a5
/gmall-bean/src/main/java/com/atguigu/gmall/enums/PaymentStatus.java
ce928abe524f2926114ad9c39719dbaa648138da
[]
no_license
machao666/mcgmall
7aa8c3a1eba45b68946353f12b7eaa6744a810de
810ce84e520bdfd98188ec94d946da515a789326
refs/heads/master
2020-03-23T21:24:45.871477
2018-08-10T12:54:58
2018-08-10T12:54:58
142,104,676
4
0
null
2018-08-10T12:54:59
2018-07-24T04:34:53
CSS
UTF-8
Java
false
false
259
java
package com.atguigu.gmall.enums; public enum PaymentStatus { UNPAID("支付中"), PAID("已支付"), PAY_FAIL("支付失败"), ClOSED("已关闭"); private String name ; PaymentStatus(String name) { this.name=name; } }
[ "834997481@qq.com" ]
834997481@qq.com
2e75d66183b5a4036adb9fd0bcb893fa13a9586f
f313a2d62d2dbb6d3f276a7252f8cb425cface2a
/src/main/java/com/imooc/sell/enums/OrderStatusEnum.java
34cb253960d84019fb77d96dd7769563aa84ce55
[]
no_license
zhouyihang3818/wechatSell
40d37887c419709defe65941326b86d8bfe58046
1dccc2068c661222c6607c3a6ce05e04ddeeb3cc
refs/heads/master
2020-04-26T13:32:47.832404
2019-03-03T14:07:36
2019-03-03T14:07:36
173,582,649
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.imooc.sell.enums; import lombok.Getter; @Getter public enum OrderStatusEnum implements CodeEnum{ NEW(0,"新订单"), FINISHED(1,"完结"), CANCEL(2,"已取消"), ; private Integer code; private String msg; OrderStatusEnum(Integer code, String msg) { this.code = code; this.msg = msg; } }
[ "504039145@qq.com" ]
504039145@qq.com
b625dfe1051c4880077dccb2d2a1c20e416f74ba
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_15_2/Lte/LteCellAdvancedProfileGetResult.java
b338ef1783ac2a46fc808e48db1dc462790d56fe
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
2,338
java
package Netspan.NBI_15_2.Lte; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LteCellAdvancedProfileGetResult complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LteCellAdvancedProfileGetResult"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://Airspan.Netspan.WebServices}WsResponse"&gt; * &lt;sequence&gt; * &lt;element name="CellAdvancedProfileResult" type="{http://Airspan.Netspan.WebServices}LteCellAdvancedProfileResult" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LteCellAdvancedProfileGetResult", propOrder = { "cellAdvancedProfileResult" }) public class LteCellAdvancedProfileGetResult extends WsResponse { @XmlElement(name = "CellAdvancedProfileResult") protected List<LteCellAdvancedProfileResult> cellAdvancedProfileResult; /** * Gets the value of the cellAdvancedProfileResult property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the cellAdvancedProfileResult property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCellAdvancedProfileResult().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link LteCellAdvancedProfileResult } * * */ public List<LteCellAdvancedProfileResult> getCellAdvancedProfileResult() { if (cellAdvancedProfileResult == null) { cellAdvancedProfileResult = new ArrayList<LteCellAdvancedProfileResult>(); } return this.cellAdvancedProfileResult; } }
[ "dshalom@airspan.com" ]
dshalom@airspan.com
b82d09bce5d6e409f20a99ce9129516a895d221a
5d61005c4229c4ba148780e3f937bfde4bef0015
/repo/src/main/java/org/alfresco/reporting/ReportingBootstrap.java
dd06dbf38eda980b17f1b91117ddb0cb211efc38
[]
no_license
p4535992/alfresco-business-reporting
eadb51f2feb0e6f9025a1c77720e807d27e71149
bf31fce45958d9bf5b23700e1f5d00c5b866c0ab
refs/heads/master
2021-12-06T11:18:09.871833
2015-09-22T11:41:48
2015-09-22T11:41:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
674
java
package org.alfresco.reporting; import org.alfresco.reporting.db.DatabaseHelperBean; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class ReportingBootstrap { private DatabaseHelperBean dbhb = null; private static Log logger = LogFactory.getLog(ReportingBootstrap.class); public void setDatabaseHelperBean(DatabaseHelperBean databaseHelperBean) { this.dbhb = databaseHelperBean; } public void init(){ try{ if (logger.isInfoEnabled()) logger.info("Reset all statusses to DONE - starting"); dbhb.setAllStatusesDoneForTable(); } catch (Exception e){ logger.error(e.getMessage()); } } }
[ "tjarda.peelen@incentro.com" ]
tjarda.peelen@incentro.com
3c8e831515006127b26498c34a3ca0b4c8419cfb
289e03ee2dca7ebd8babb3b62496b25c6409e828
/src/main/java/thaumcraftextras/proxies/client/renders/RenderNoMove.java
9b92fa7d81d5e6f29d48ac51630b518c88988087
[]
no_license
zetti68/ThaumcraftExtras2
7083e84b43a70c04c6cc973f8ae2becf7c560580
90f6c95138cc36cbbe308245c4a144eb45108377
refs/heads/master
2021-01-20T06:42:52.262654
2014-12-30T19:15:10
2014-12-30T19:15:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
package thaumcraftextras.proxies.client.renders; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; import thaumcraft.client.renderers.block.BlockRenderer; import thaumcraftextras.blocks.tiles.TileEntityNoMove; import thaumcraftextras.helpers.RenderingHelper; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; public class RenderNoMove extends BlockRenderer implements ISimpleBlockRenderingHandler{ @Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { GL11.glPushMatrix(); GL11.glScalef(1, 0.6f, 1); TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityNoMove(), 0.0D, 0.0D, 0.0D, 0.0F); GL11.glPopMatrix(); } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return false; } @Override public boolean shouldRender3DInInventory(int modelId) { return true; } @Override public int getRenderId() { return RenderingHelper.render_noMove; } }
[ "wasliebob@live.nl" ]
wasliebob@live.nl
7fcffec7f597dc15f04ee706379abeefe144c22d
7205e0a2cf43bfbece0e474fae2cd31568212e33
/Hospital/src/Hospital/Cardiology.java
bb87113dd6b896826e8e607f0771a2d88276cb61
[]
no_license
AKokoshyan/JavaT
89c242439ef597f6ceca3b391af4ef141e5cf319
4b7e27109bbbd81eaeaebe27896a89b5e4bc981a
refs/heads/master
2021-06-22T20:56:35.076807
2017-08-17T21:04:13
2017-08-17T21:04:13
100,280,552
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package Hospital; public class Cardiology extends Ordinatory { public Cardiology() { this.type = "Кардиология"; } }
[ "akokoshqn@gmail.com" ]
akokoshqn@gmail.com
9a4ea49fad4aca68b2014b37d02733a723a78d03
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava10/Foo380.java
526dbed688675cca722c702b5f9b5e7fc05824fc
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava10; public class Foo380 { public void foo0() { new applicationModulepackageJava10.Foo379().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
99a7190b2cfbe4553bc2a5b09a7a5996273ccc5f
927887b06e52b2ef77b12f6acbf50cd6db2e9c5e
/Calculator.java
b813bc955e579cd2539764d83bab681ae5133ad1
[]
no_license
gcaldera127/HW-9-16
467fdc5629272142137ea27dca4a3f0b7b37cafa
2a7246d5ac997ad2753fa702599176c80035cdd9
refs/heads/main
2023-01-13T04:33:04.577881
2020-11-17T04:20:06
2020-11-17T04:20:06
313,495,767
0
0
null
null
null
null
UTF-8
Java
false
false
2,281
java
import java.util.*; import java.lang.Math; import java.io.*; public class Calculator { public static void main(String[] args) { int num1 = 0; int num2 = 0; char operator; double answer = 0.0; Scanner scanObj = new Scanner(System.in); System.out.println("Enter first number:"); num1 = scanObj.nextInt(); System.out.println("Want to square that number? Yes or No "); if(answer.equals "Yes"){ int square = Math.pow(num1, 2); } else { break; } System.out.println("Enter second number:"); num2 = scanObj.nextInt(); System.out.println("What operation to use?"); operator = scanObj.next().charAt(0); switch (operator) { case '+': answer = num1 + num2; break; case '-': answer = num 1 - num2; break; case '*': answer = num1 * num2; break; case '/': answer = num1/num2; break; } } class MagicCalculator extends Calculator{ //square a number static long squareRoot(int num1) { int x = num1; int y = 1; while (x > y) { x = (x + y) / 2; y = n / x; } return (long)x; } // find the sin of a number public static double sin(double num1) double a = num1; double b = Math.toRadians(num1); System.out.println(Math.sin(b)); //find the cosine of a number public static double cos(int num1) double a = num1; double b = Math.toRadians(num1); System.out.println(Math.cos(b)); //find the tangent of a number public static double atan(double num1) double num1 = Math.PI / 2; num1 = Math.toRadians(num1); System.out.println("Math.atan(" + num1 + ")" + Math.atan(num1)); //find the factorial of a number int i,fact=1; int number=num1; for(i=1;i<=number;i++){ fact=fact*i; } System.out.println("Factorial of "+number+" is: "+fact); } } }
[ "noreply@github.com" ]
gcaldera127.noreply@github.com
1aa37b62b603582b553d197f8e275988d7f9f766
0d4c52fabca0583aabd15312605958c4ef2b3f27
/src/java/amm2017/Descrizione.java
1da71eb1a8af96a5db548cb3e18d116fa8f7741e
[]
no_license
8VonBismarck/AMM2017
5a9910d9342c0ebd1ee403c79a98f78641d99bed
a65e34a04716adcfe23bfa830d200b733065405a
refs/heads/master
2019-07-01T16:07:18.557957
2018-01-21T18:58:48
2018-01-21T18:58:48
102,279,781
0
0
null
null
null
null
UTF-8
Java
false
false
2,520
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 amm2017; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author admin */ public class Descrizione extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); request.getRequestDispatcher("M3/Descrizione.jsp").forward(request, response); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "creed844@gmail.com" ]
creed844@gmail.com
9fe47a30fb177468ed5bcc4a8993dc7d89acfbb8
b32cc8cbee42047d73f2dab3449cefa80b719054
/src/main/java/ru/geekbrains/pocket/backend/service/impl/UserMessageServiceImpl.java
4b1da23472bbb55c2eb758cedfc8a7b4bbf3621c
[ "Apache-2.0" ]
permissive
romanungefuk/pocket-java-backend
c922413156c7eecdd231a5fde4da6d84e1ec4471
baee7749c7019ad48a500da3f01d1c9f508a3838
refs/heads/master
2022-04-01T06:24:24.988013
2019-04-17T12:55:21
2019-04-17T12:55:44
474,847,515
0
0
null
null
null
null
UTF-8
Java
false
false
3,464
java
package ru.geekbrains.pocket.backend.service.impl; import org.bson.types.ObjectId; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import ru.geekbrains.pocket.backend.domain.db.User; import ru.geekbrains.pocket.backend.domain.db.UserMessage; import ru.geekbrains.pocket.backend.exception.UserMessageNotFoundException; import ru.geekbrains.pocket.backend.repository.UserMessageRepository; import ru.geekbrains.pocket.backend.service.UserMessageService; import java.util.Date; import java.util.List; @Service public class UserMessageServiceImpl implements UserMessageService { @Autowired private UserMessageRepository repository; @Override public UserMessage createMessage(UserMessage message) { message.setSent_at(new Date()); message.setRead(false); return repository.insert(message); } public UserMessage createMessage(User sender, User recipient, String text) { UserMessage messageNew = new UserMessage(sender, recipient, text); messageNew.setSent_at(new Date()); return repository.insert(messageNew); } @Override public void deleteMessage(UserMessage message) { repository.delete(message); } @Override public void deleteAllMessages() { repository.deleteAll(); } @Override public UserMessage getMessage(ObjectId id) { UserMessage userMessage = repository.findById(id).orElseThrow( () -> new UserMessageNotFoundException("User message with id = " + id + " not found")); return userMessage; } @Override public UserMessage getMessage(User sender, User recipient, String text) { return repository.findFirstBySenderAndRecipientAndText(sender, recipient, text); } @Override public List<UserMessage> getAllMessagesUser(User user) { return repository.findBySenderOrRecipient(user, user); } @Override public List<UserMessage> getAllMessagesUser(User user, Integer offset) { Pageable pageable = PageRequest.of(offset, 100, Sort.by(Sort.Direction.ASC,"id")); Page<UserMessage> page = repository.findBySenderOrRecipient(user, user, pageable); return page.getContent(); } @Override public List<UserMessage> getMessagesBySender(User sender) { return repository.findBySender(sender); } @Override public List<UserMessage> getMessagesByRecipient(User recipient) { return repository.findByRecipient(recipient); } @Override public List<UserMessage> getUnreadMessagesFromUser(User sender) { return repository.findBySenderAndReadFalse(sender); } @Override public List<UserMessage> getUnreadMessagesToUser(User recipient) { return repository.findByRecipientAndReadFalse(recipient); } public UserMessage sendMessageFromTo(User sender, User recipient, String message) { UserMessage messageNew = new UserMessage(sender, recipient, message); messageNew.setSent_at(new Date()); messageNew.setRead(false); return repository.save(messageNew); } @Override public UserMessage updateMessage(UserMessage message) { return null; } }
[ "zundarik@gmail.com" ]
zundarik@gmail.com
e8e1b21b67a1133ba16c21f268727e26a19698d9
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/sun/reflect/NativeConstructorAccessorImpl.java
7a2a52d7adb12cacb3100212766363f1058f3aa1
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
2,464
java
/* * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.reflect; import java.lang.reflect.*; /** * Used only for the first few invocations of a Constructor; * afterward, switches to bytecode-based implementation */ class NativeConstructorAccessorImpl extends ConstructorAccessorImpl { private Constructor c; private DelegatingConstructorAccessorImpl parent; private int numInvocations; NativeConstructorAccessorImpl(Constructor c) { this.c = c; } public Object newInstance(Object[] args) throws InstantiationException, IllegalArgumentException, InvocationTargetException { if (++numInvocations > ReflectionFactory.inflationThreshold()) { ConstructorAccessorImpl acc = (ConstructorAccessorImpl) new MethodAccessorGenerator(). generateConstructor(c.getDeclaringClass(), c.getParameterTypes(), c.getExceptionTypes(), c.getModifiers()); parent.setDelegate(acc); } return newInstance0(c, args); } void setParent(DelegatingConstructorAccessorImpl parent) { this.parent = parent; } private static native Object newInstance0(Constructor c, Object[] args) throws InstantiationException, IllegalArgumentException, InvocationTargetException; }
[ "763803382@qq.com" ]
763803382@qq.com
f8e1954c569eb928f887e92390fd7c6e00556b2d
57ce4188ec525d6d4e7629c26ea932632ebaaa53
/yggdrasil/trunk/src/org.socialmusicdiscovery.yggdrasil.core/src/org/socialmusicdiscovery/yggdrasil/core/editors/artist/ContributionsPanel.java
afddbd2c9f1d43ea6e8e28fc3a0d77cbdcb2f916
[]
no_license
erland/socialmusicdiscovery
c47f30218a23666c0afd67a2f77dd652a367cacb
398e5591bde9270a85db23d732758f579bea8512
refs/heads/master
2016-09-05T15:09:30.662765
2013-06-30T07:59:44
2013-06-30T07:59:44
48,808,856
0
1
null
null
null
null
UTF-8
Java
false
false
7,702
java
/* * Copyright 2010-2011, Social Music Discovery project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Social Music Discovery project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL SOCIAL MUSIC DISCOVERY PROJECT BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.socialmusicdiscovery.yggdrasil.core.editors.artist; import java.util.Collection; import java.util.Set; import org.eclipse.core.databinding.observable.set.IObservableSet; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.nebula.jface.gridviewer.GridTableViewer; import org.eclipse.nebula.jface.gridviewer.GridViewerColumn; import org.eclipse.nebula.widgets.grid.Grid; import org.eclipse.nebula.widgets.grid.GridColumn; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; import org.socialmusicdiscovery.yggdrasil.foundation.content.ObservableArtist; import org.socialmusicdiscovery.yggdrasil.foundation.grid.GridTableColumnLayout; import org.socialmusicdiscovery.yggdrasil.foundation.util.Debug; import org.socialmusicdiscovery.yggdrasil.foundation.util.ViewerUtil; import org.socialmusicdiscovery.yggdrasil.foundation.views.util.AbstractComposite; import org.socialmusicdiscovery.yggdrasil.foundation.views.util.LabelProviderFactory; import org.socialmusicdiscovery.yggdrasil.foundation.views.util.OpenListener; /** * A grid composite for maintaining artist contributions. Similar to * {@link ContributionsPanel}, but focused on what entities an artist contributes * rather than what artists contribute to a specific entity. * * @author Peer Törngren * */ /* package */ class ContributionsPanel extends AbstractComposite<ObservableArtist> { private static final String PROP_filters = "filters"; private final FormToolkit toolkit = new FormToolkit(Display.getCurrent()); private GridTableViewer gridTableViewer; private GridColumn roleColumn; private GridViewerColumn roleGVC; private GridColumn entityColumn; private GridViewerColumn entityGVC; private ViewerFilter[] filters = new ViewerFilter[0]; private GridColumn typeColumn; private GridViewerColumn typeGVC; /** * Create the composite with optional {@link TableColumnLayout}. Separate * constructor since WindowBuilder doesn't appear to like this. * * @param parent * @param isAdjustColumnLayout */ public ContributionsPanel(Composite parent, boolean isAdjustColumnLayout) { this(parent, SWT.NONE); if (isAdjustColumnLayout) { GridTableColumnLayout gridTableColumnLayout = new GridTableColumnLayout(); gridTableColumnLayout.computeWeights(gridTableViewer.getGrid()); setLayout(gridTableColumnLayout); } } /** * Create the composite. * @param parent * @param style */ public ContributionsPanel(Composite parent, int style) { super(parent, style); addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { toolkit.dispose(); } }); toolkit.adapt(this); toolkit.paintBordersFor(this); setLayout(new FillLayout()); gridTableViewer = new GridTableViewer(this, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI); Grid grid = gridTableViewer.getGrid(); grid.setHeaderVisible(true); gridTableViewer.setContentProvider(new ArrayContentProvider()); toolkit.paintBordersFor(grid); roleGVC = new GridViewerColumn(gridTableViewer, SWT.NONE); roleColumn = roleGVC.getColumn(); roleColumn.setMoveable(true); roleColumn.setResizeable(true); roleColumn.setWidth(100); roleColumn.setText("Role"); typeGVC = new GridViewerColumn(gridTableViewer, SWT.NONE); typeColumn = typeGVC.getColumn(); typeColumn.setMoveable(true); typeColumn.setWidth(100); typeColumn.setText("Entity Type"); entityGVC = new GridViewerColumn(gridTableViewer, SWT.NONE); entityColumn = entityGVC.getColumn(); entityColumn.setMoveable(true); entityColumn.setResizeable(true); entityColumn.setWidth(400); entityColumn.setText("Entity"); hookListeners(); } private void hookListeners() { ViewerUtil.hookSorter(roleGVC, entityGVC); gridTableViewer.addOpenListener(new OpenListener()); // default edit (double-click) } public GridTableViewer getGridViewer() { return gridTableViewer; } @Override protected void afterSetModel(ObservableArtist model) { IObservableSet set = getModel().getContributions(); ViewerUtil.bind(gridTableViewer, set, LabelProviderFactory.newContributorTypeDelegate(), LabelProviderFactory.newEntityTypeDelegate("owner"), LabelProviderFactory.newModelObjectDelegate("owner") ); } public ViewerFilter[] getFilters() { return filters; } public void setFilters(ViewerFilter... filters) { gridTableViewer.setFilters(filters); // debug(gridTableViewer); firePropertyChange(PROP_filters, this.filters, this.filters = filters); } @SuppressWarnings("unused") private void debug(StructuredViewer v) { if (getModel()!=null) { ViewerFilter[] viewerFilters = v.getFilters(); Set contributors = getModel().getContributions(); Debug.debug(this, "Track", getModel()); Debug.debug(this, "All", contributors); Debug.debug(this, "Filters", (Object[]) viewerFilters); Debug.debug(this, "Filtered result", filter(v, viewerFilters, contributors)); } } @SuppressWarnings("unchecked") private static Object[] filter(StructuredViewer v, ViewerFilter[] filters, Collection objects) { Object[] result = objects.toArray(new Object[objects.size()]); for (ViewerFilter f: filters) { Object[] tmp = f.filter(v, (Object) null, result); result = tmp; } return result; } public GridViewerColumn getRoleGVC() { return roleGVC; } public GridViewerColumn getEntityGVC() { return entityGVC; } public GridViewerColumn getTypeGVC() { return typeGVC; } }
[ "peer.torngren@gmail.com" ]
peer.torngren@gmail.com
20b9d8d3614464ff96aed19d848d91f18c6c8466
fb7dd3d895c9823866aaa4c3aa5508e241aac920
/CuttingFile/src/com/cuttingfile/JTextFiledCollection.java
fd52a19b625c222d3421dc8d16ebad2518a605a1
[]
no_license
adminho/java-examples
132165e25d43e327c19d7029df68443531c30b2b
759d077167f198113af2c07ab78b7aba98635f54
refs/heads/master
2020-12-26T01:48:47.041110
2017-02-13T10:01:41
2017-02-13T10:01:41
80,726,150
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
package com.cuttingfile; import javax.swing.JTextField; public class JTextFiledCollection extends SubCollection{ private final JTextField select,cut,asm; public JTextFiledCollection(){ Mediator med=SingleMediator.med(); select=new SelectField(20,med); cut=new CutField(20,med); asm=new AssemField(20,med); } public JTextField get(String str){ if(str.toLowerCase()=="select"){return select;} else if(str.toLowerCase()=="cut"){return cut;} else if(str.toLowerCase()=="assemble"){return asm;} else{throw new IllegalArgumentException("JTextFiledFactory=>wrong parameter");} } }
[ "couragor@gmail.com" ]
couragor@gmail.com
acd92bd92b7b326b42a5efd657ba74ae7ad816e5
b949083f2dd8d208eacdd08f5df1588bab237d64
/src/main/java/io/spring/guides/gs_producing_web_service/Country.java
59c5823c6ec24c5bc8193f0ada3980769c41d17b
[]
no_license
Fordclifford/Learning-SOAP
e1cda757efb5c5413bcec0044675d1cdea890a76
1bf6668ce7bf6dc7acaf80f6e48b2451a0e3b91a
refs/heads/master
2020-04-04T14:58:29.935179
2018-11-04T11:27:08
2018-11-04T11:27:08
156,020,287
0
0
null
null
null
null
UTF-8
Java
false
false
3,432
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2018.11.04 at 12:34:07 AM EAT // package io.spring.guides.gs_producing_web_service; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for country complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="country"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="population" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="capital" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="currency" type="{http://spring.io/guides/gs-producing-web-service}currency"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "country", propOrder = { "name", "population", "capital", "currency" }) public class Country { @XmlElement(required = true) protected String name; protected int population; @XmlElement(required = true) protected String capital; @XmlElement(required = true) protected Currency currency; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the population property. * */ public int getPopulation() { return population; } /** * Sets the value of the population property. * */ public void setPopulation(int value) { this.population = value; } /** * Gets the value of the capital property. * * @return * possible object is * {@link String } * */ public String getCapital() { return capital; } /** * Sets the value of the capital property. * * @param value * allowed object is * {@link String } * */ public void setCapital(String value) { this.capital = value; } /** * Gets the value of the currency property. * * @return * possible object is * {@link Currency } * */ public Currency getCurrency() { return currency; } /** * Sets the value of the currency property. * * @param value * allowed object is * {@link Currency } * */ public void setCurrency(Currency value) { this.currency = value; } }
[ "cliffordmasi07@gmail.com" ]
cliffordmasi07@gmail.com
e866c3ea787351abab06b183d86ee8f9a015a395
f732c31eb5018aaf85a52d16e6d976261e52d66b
/Role/src/main/java/ru/sapteh/service/UserService.java
82a8903e8808dbbbe442df9c818c26d0bf9e40dc
[]
no_license
catBoris453alexmol/Data
24e1952b0036c7eadf93806199dff1c8a5e99f2f
b3b5d2d88b307661e6de7ec091cbb9ef42fbf640
refs/heads/main
2023-03-01T16:21:51.369032
2021-02-09T12:55:02
2021-02-09T12:55:02
337,403,378
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
package ru.sapteh.service; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.query.Query; import ru.sapteh.Dao.Dao; import ru.sapteh.model.User; import java.util.List; public class UserService implements Dao<User, Integer> { private final SessionFactory factory; public UserService(SessionFactory factory) { this.factory = factory; } @Override public User read(Integer id) { try (Session session = factory.openSession()) { User user = session.get(User.class, id); return user; } } @Override public List<User> readByAll() { try (Session session = factory.openSession()) { Query<User> result = session.createQuery("FROM User"); return result.list(); } } @Override public void create(User user) { try (Session session = factory.openSession()) { session.beginTransaction(); session.save(user); session.getTransaction().commit(); } } @Override public void update(User user) { try (Session session = factory.openSession()) { session.beginTransaction(); session.update(user); session.getTransaction().commit(); } } @Override public void delete(User user) { try (Session session = factory.openSession()) { session.beginTransaction(); session.delete(user); session.getTransaction().commit(); } } }
[ "noreply@github.com" ]
catBoris453alexmol.noreply@github.com
c95afeab2b8fe685a712be6eac50b6bbe751e29f
3841f7991232e02c850b7e2ff6e02712e9128b17
/小浪底泥沙三维/EV_Xld/jni/src/JAVA/EV_SpatialInterfaceWrapper/src/com/earthview/world/spatial/geodataset/DataSourceFactoryEnumeratorClassFactory.java
3c485a19cefc8d990346f1009df83976cd5a2af7
[]
no_license
15831944/BeijingEVProjects
62bf734f1cb0a8be6fed42cf6b207f9dbdf99e71
3b5fa4c4889557008529958fc7cb51927259f66e
refs/heads/master
2021-07-22T14:12:15.106616
2017-10-15T11:33:06
2017-10-15T11:33:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
package com.earthview.world.spatial.geodataset; import global.*; import com.earthview.world.base.*; import com.earthview.world.util.*; import com.earthview.world.core.*; public class DataSourceFactoryEnumeratorClassFactory implements IClassFactory { public BaseObject create() { DataSourceFactoryEnumerator emptyInstance = new DataSourceFactoryEnumerator(CreatedWhenConstruct.CWC_NotToCreate); return emptyInstance; } }
[ "yanguanqi@aliyun.com" ]
yanguanqi@aliyun.com
a3c046d0c22349c8a77148e142f40d368c4326af
c76c9d304b1339675ecfacfda2fee0e1147ff6b0
/core/src/main/java/eu/darken/rxshell/shell/LineReader.java
1bc35a056c417b519b2731489922ce139884a198
[ "Apache-2.0" ]
permissive
d4rken/RxShell
db6ad1b97c02a3249571b83fe2b62bbe2ef5ec5a
cf9521c22c90d638636f74e2b894ecbede989b2c
refs/heads/master
2022-12-24T05:52:07.945282
2022-12-10T17:38:13
2022-12-10T17:38:13
110,054,572
307
80
Apache-2.0
2022-02-08T21:28:27
2017-11-09T02:04:54
Java
UTF-8
Java
false
false
1,594
java
package eu.darken.rxshell.shell; import android.annotation.SuppressLint; import java.io.IOException; import java.io.Reader; import eu.darken.rxshell.extra.ApiWrap; public class LineReader { private final char[] lineSeparator; public LineReader() { lineSeparator = getLineSeparator().toCharArray(); } public LineReader(String lineSeparator) { this.lineSeparator = lineSeparator.toCharArray(); } @SuppressLint("NewApi") public static String getLineSeparator() { if (ApiWrap.hasKitKat()) return System.lineSeparator(); else return System.getProperty("line.separator", "\n"); } public String readLine(Reader reader) throws IOException { char curChar; int val; StringBuilder sb = new StringBuilder(40); while ((val = reader.read()) != -1) { curChar = (char) val; if (curChar == '\n' && lineSeparator.length == 1 && curChar == lineSeparator[0]) { return sb.toString(); } else if (curChar == '\r' && lineSeparator.length == 1 && curChar == lineSeparator[0]) { return sb.toString(); } else if (curChar == '\n' && lineSeparator.length == 2 && curChar == lineSeparator[1]) { if (sb.length() > 0 && sb.charAt(sb.length() - 1) == lineSeparator[0]) { sb.deleteCharAt(sb.length() - 1); return sb.toString(); } } sb.append(curChar); } if (sb.length() == 0) return null; return sb.toString(); } }
[ "darken@darken.eu" ]
darken@darken.eu
9dbd2f2cbe42a2fc9dcb9d449bee532b5ae2ac65
a494b35558bc2bbb0f4c137da934ea86f3c72fe2
/src/main/java/itgarden/controller/homevisit/M_Current_HelpController.java
1b7080137e18063aad31227d19819df100e9f512
[]
no_license
belayetsumon/bims
067487d832dcb1fccbd6da61ee36ec0672bc6879
5acc0dee4ebe742cd014230a525d9ef5c0c584d6
refs/heads/master
2021-06-28T09:25:03.402445
2020-12-31T17:34:26
2020-12-31T17:34:26
188,711,616
0
0
null
2020-12-31T17:42:59
2019-05-26T17:18:37
HTML
UTF-8
Java
false
false
3,773
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 itgarden.controller.homevisit; import itgarden.model.homevisit.M_Current_Help; import itgarden.model.homevisit.MotherMasterData; import itgarden.repository.homevisit.Aid_TypeRepository; import itgarden.repository.homevisit.M_Current_HelpRepository; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.mvc.support.RedirectAttributes; /** * * @author Md Belayet Hossin */ @Controller @RequestMapping("/m_current_help") public class M_Current_HelpController { @Autowired M_Current_HelpRepository m_Current_HelpRepository; @Autowired Aid_TypeRepository aid_TypeRepository; @RequestMapping("/index") public String index(Model model, M_Current_Help m_Current_Help) { model.addAttribute("list", m_Current_HelpRepository.findAll()); return "homevisit/lookup/m_current_help"; } @RequestMapping("/create/{m_id}") public String add(Model model, @PathVariable Long m_id, M_Current_Help m_Current_Help) { MotherMasterData motherMasterData = new MotherMasterData(); motherMasterData.setId(m_id); m_Current_Help.setMotherMasterCode(motherMasterData); model.addAttribute("form_title", "Mother current support or help add"); model.addAttribute("aidType", aid_TypeRepository.findAll()); return "homevisit/motherdetails/m_current_help"; } @RequestMapping("/save/{m_id}") public String save(Model model, @PathVariable Long m_id, @Valid M_Current_Help m_Current_Help, BindingResult bindingResult) { if (bindingResult.hasErrors()) { model.addAttribute("form_title", "Mother Current Aid/ Help Save/Update"); MotherMasterData motherMasterData = new MotherMasterData(); motherMasterData.setId(m_id); m_Current_Help.setMotherMasterCode(motherMasterData); model.addAttribute("aidType", aid_TypeRepository.findAll()); return "homevisit/motherdetails/m_current_help"; } m_Current_HelpRepository.save(m_Current_Help); return "redirect:/motherdetails/motherdetails/{m_id}"; } @GetMapping(value = "/edit/{id}") public String edit(Model model, @PathVariable Long id, M_Current_Help m_Current_Help) { model.addAttribute("m_Current_Help", m_Current_HelpRepository.findOne(id)); model.addAttribute("aidType", aid_TypeRepository.findAll()); model.addAttribute("form_title", "Mother Current Aid/ Help edit"); return "/homevisit/motherdetails/m_current_help"; } @GetMapping(value = "/delete/{id}") public String delete(@PathVariable Long id, M_Current_Help m_Current_Help, RedirectAttributes redirectAttrs) { m_Current_Help = m_Current_HelpRepository.findOne(id); redirectAttrs.addAttribute("m_id", m_Current_Help.motherMasterCode.getId()); m_Current_HelpRepository.delete(id); redirectAttrs.addFlashAttribute("delete_message"," Current help data delete successfully."+ m_Current_Help.getId()); return "redirect:/motherdetails/motherdetails/{m_id}"; } }
[ "belayetsumon@gmail.com" ]
belayetsumon@gmail.com
e8b2d0da920956d8f640dbcd81c867df2b6530ec
153f4ec5e054a4c0bb3673e234361efc429337ae
/src/Basic/FibonacciDP.java
489a86d22899bae459e6127921563f2a9fbdae72
[]
no_license
liteshpatil17/Java-Practice
69e9ca436e60a66ae035a4d9a402dcd774aed7ea
7f7881df4a0e899a052684711d8ba64b1ee085d8
refs/heads/master
2020-03-22T07:49:02.159485
2018-07-04T13:34:38
2018-07-04T13:34:38
139,726,356
0
0
null
null
null
null
UTF-8
Java
false
false
1,294
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 Basic; /** * * @author Litesh */ public class FibonacciDP /* Java program for Memoized version */ { // final int MAX = 100; // final int NIL = -1; // // int lookup[] = new int[MAX]; // // /* Function to initialize NIL values in lookup table */ // void _initialize() // { // for (int i = 0; i < MAX; i++) // lookup[i] = NIL; // } // // /* function for nth Fibonacci number */ // int fib(int n) // { // if (lookup[n] == NIL) // { // if (n <= 1) // lookup[n] = n; // else // lookup[n] = fib(n-1) + fib(n-2); // } // return lookup[n]; // } // // public static void main(String[] args) // { // FibonacciDP f = new FibonacciDP(); // int n = 5; // f._initialize(); // System.out.println("Fibonacci number is" + " " + f.fib(n)); // } // //} int fib(int n) { int f[]= new int[n+1]; f[0]=0; f[1]=1; for(int i=2;i<=n;i++) f[i]=f[i-1]+f[i-2]; return f[n]; } public static void main(String args[]) { FibonacciDP f=new FibonacciDP(); System.out.print(f.fib(9)); } }
[ "liteshpatil17@gmail.com" ]
liteshpatil17@gmail.com
00f2d1ba3ab0ed9cb6b4724eb0fe350572a395ce
a62612ffb68bddc2924e95c42037d15746427317
/src/main/java/com/googlecode/hibernate/memcached/utils/MemcachedRegionSettingsUtils.java
bfa0c1d8974b42679a3d7dd50f56e6a9fa498498
[ "Apache-2.0" ]
permissive
blinc/hibernate-memcached
9e0648b914db8a97f4e8efdf8741977a39dd45ac
42edebf6145eb724f22c51f77621a270a08d4705
refs/heads/master
2021-01-21T00:04:41.291797
2012-09-19T20:30:09
2012-09-19T20:30:09
5,299,289
0
1
null
null
null
null
UTF-8
Java
false
false
4,427
java
package com.googlecode.hibernate.memcached.utils; import com.googlecode.hibernate.memcached.MemcachedRegionSettings; import com.googlecode.hibernate.memcached.region.MemcachedRegion; import com.googlecode.hibernate.memcached.strategy.clear.ClearStrategy; import com.googlecode.hibernate.memcached.strategy.key.encoding.KeyEncodingStrategy; import com.googlecode.hibernate.memcached.strategy.key.encoding.NestedKeyEncodingStrategy; import com.googlecode.hibernate.memcached.strategy.key.encoding.ValidMemcachedKeyEncodingStrategy; /** * A utility class for {@link MemcachedRegionSettings} * * @see MemcachedRegionSettings */ public class MemcachedRegionSettingsUtils { /** * Gets the current clear index using the given settings * {@link ClearStrategy}. * * @param settings {@link MemcachedRegionSettings} * @return the current clear index */ public static long getCurrentClearIndex(MemcachedRegionSettings settings) { return settings.getClearStrategy().getClearIndex(); } /** * Creates the full dogpile token key prefix using given settings settings * {@link MemcachedRegionSettings#getNamespaceSeparator()}, * {@link MemcachedRegionSettings#getDogpileTokenKeyPrefix()}, * and {@link MemcachedRegionSettings#getName()}. * * @param settings {@link MemcachedRegionSettings} * @return the full dogpile token key prefix */ public static String getFullDogpileTokenKeyPrefix(MemcachedRegionSettings settings) { return StringUtils.join(settings.getNamespaceSeparator(), settings.getDogpileTokenKeyPrefix(), settings.getName()); } /** * Creates the full read lock key prefix using given settings settings * {@link MemcachedRegionSettings#getNamespaceSeparator()}, * {@link MemcachedRegionSettings#getReadLockKeyPrefix()}, * and {@link MemcachedRegionSettings#getName()}. * * @param settings {@link MemcachedRegionSettings} * @return the full read lock key prefix */ public static String getFullReadLockKeyPrefix(MemcachedRegionSettings settings) { return StringUtils.join(settings.getNamespaceSeparator(), settings.getReadLockKeyPrefix(), settings.getName()); } /** * Creates the full write lock key prefix using given settings settings * {@link MemcachedRegionSettings#getNamespaceSeparator()}, * {@link MemcachedRegionSettings#getWriteLockKeyPrefix()}, * and {@link MemcachedRegionSettings#getName()}. * * @param settings {@link MemcachedRegionSettings} * @return the full write lock key prefix */ public static String getFullWriteLockKeyPrefix(MemcachedRegionSettings settings) { return StringUtils.join(settings.getNamespaceSeparator(), settings.getWriteLockKeyPrefix(), settings.getName()); } /** * Creates the full clear index key prefix using given settings settings * {@link MemcachedRegionSettings#getNamespaceSeparator()}, * {@link MemcachedRegionSettings#getClearIndexKeyPrefix()}, * and {@link MemcachedRegionSettings#getName()}. * * @param settings {@link MemcachedRegionSettings} * @return the full clear index key prefix */ public static String getFullClearIndexKeyPrefix(MemcachedRegionSettings settings) { return StringUtils.join(settings.getNamespaceSeparator(), settings.getClearIndexKeyPrefix(), settings.getName()); } /** * Creates a {@link KeyEncodingStrategy} that ensures any key generated by * given settings settings * {@link MemcachedRegionSettings#getKeyEncodingStrategy()} will produce a * valid Memcached key. * * @param settings {@link MemcachedRegionSettings} * @return a {@link KeyEncodingStrategy} that produces valid * Memcached keys */ public static KeyEncodingStrategy getValidatedMemcachedKeyEncodingStrategy(MemcachedRegionSettings settings) { // Order matters here, add settings encoding first. NestedKeyEncodingStrategy encodingStrategy = new NestedKeyEncodingStrategy(); encodingStrategy.addStrategy(settings.getKeyEncodingStrategy()); encodingStrategy.addStrategy(new ValidMemcachedKeyEncodingStrategy()); return encodingStrategy; } }
[ "blinc737@yahoo.com" ]
blinc737@yahoo.com
58637c2f331cdb85ea518e1ec9051fdb77dac4b0
42409ce9f8d75d87c40e297ff4b36e8b72b3e44a
/app/src/main/java/com/prasan/weather/utils/VolleySingleton.java
06f3f718e36207ac5d185efe33b2ad8a766ae37f
[]
no_license
prasannajeet/Weather
2656dc720040aa119985da383b537f248ce7b007
1b77d2107c47f40f7a69a6d22b59faaf778c3fdf
refs/heads/master
2021-01-19T22:56:29.727719
2017-04-20T19:43:01
2017-04-20T19:43:01
88,896,221
0
0
null
null
null
null
UTF-8
Java
false
false
1,254
java
package com.prasan.weather.utils; import android.annotation.SuppressLint; import android.content.Context; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; /** * Singleton pattern implementation for the Volley RequestQueue as recommended by Google */ public class VolleySingleton { @SuppressLint("StaticFieldLeak") private static volatile VolleySingleton mInstance; private final Context mCtx; private RequestQueue mRequestQueue; private VolleySingleton(Context context) { mCtx = context; mRequestQueue = getRequestQueue(); } public static synchronized VolleySingleton getInstance(Context context) { if (mInstance == null) { mInstance = new VolleySingleton(context); } return mInstance; } /** * Lazy initialization for RequestQueue * @return Volley RequestQueue */ private RequestQueue getRequestQueue() { if (mRequestQueue == null) { mRequestQueue = Volley.newRequestQueue(mCtx.getApplicationContext()); } return mRequestQueue; } public <T> void addToRequestQueue(Request<T> req) { getRequestQueue().add(req); } }
[ "prasannajeet89@gmail.com" ]
prasannajeet89@gmail.com
95a97d3eb06c11f9c22067f682371fafec847f09
804e95805a78e9a35e970df7df1cd38e0463593d
/set.java
15472dfd2e8065a501154cf1b7762e395374df78
[]
no_license
serkanaydin-github/cache-simulator
24fa6d7ae9e6281ca0fe80ba91b7dea4225907f7
a291e7ba469d861007fd899d596d98124a9348f3
refs/heads/master
2020-06-26T01:48:57.919283
2019-07-29T17:11:04
2019-07-29T17:11:04
199,488,077
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
import java.util.ArrayList; public class set { int E; int B; int setNumber; ArrayList<line> lineList; set(int E,int B,int setNumber){ this.E=E; this.B=B; this.setNumber=setNumber; this.lineList = new ArrayList<line>(E); createLines(E); } public int getE() { return this.E; } public void setE(int e) { this.E = e; } public int getB() { return B; } public void setB(int b) { this.B = b; } public int getSetNumber() { return this.setNumber; } public void setSetNumber(int setNumber) { this.setNumber = setNumber; } public ArrayList<line> getLineList() { return lineList; } public void setLineList(ArrayList<line> lineList) { this.lineList = lineList; } void createLines(int E) { for(int i=0;i<E;i++) { lineList.add(new line(i,B)); } } }
[ "noreply@github.com" ]
serkanaydin-github.noreply@github.com
8248f55519e200862b797e19246f2e04b6acda0f
81a7520a944a634e5b976babde131007cc95af7b
/src/twitter/ml/classifications/NaiveBayes.java
617e4d4a957997c88ba72f833a89ea2db00e0249
[]
no_license
Jeky/twitter
125887e980de70e52801e542b1402ab1c7bec747
cdfa047132c7bba325b1da8dc1549fa302d23a48
refs/heads/master
2021-01-13T01:13:25.335108
2016-03-17T19:53:47
2016-03-17T19:53:47
37,091,352
0
0
null
null
null
null
UTF-8
Java
false
false
2,517
java
package twitter.ml.classifications; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import twitter.ml.Dataset; import twitter.ml.Instance; import twitter.utils.Logger; import twitter.utils.Utils; public class NaiveBayes implements Classifier { public NaiveBayes() { clsProb = new HashMap<>(); clsFeatureProb = new HashMap<>(); } @Override public void reset() { clsProb.clear(); clsFeatureProb.clear(); } @Override public void train(Dataset dataset) { HashMap<Double, Double> clsWordCount = new HashMap<>(); Set<String> featureSet = new HashSet<>(); for (Instance instance : dataset) { double cls = instance.getClassValue(); if (!clsProb.containsKey(cls)) { clsFeatureProb.put(cls, new HashMap<String, Double>()); } Utils.mapAdd(clsProb, cls, 1.0); for (Entry<String, Double> features : instance) { String n = features.getKey(); double v = features.getValue(); if (!n.equals(dataset.getClassLabel())) { Utils.mapAdd(clsFeatureProb.get(cls), n, v); Utils.mapAdd(clsWordCount, cls, v); featureSet.add(n); } } } for (Entry<Double, Double> e : clsProb.entrySet()) { double cls = e.getKey(); double v = e.getValue(); clsProb.put(cls, Math.log(v / dataset.size())); } int featureSize = featureSet.size(); for (Entry<Double, Map<String, Double>> e : clsFeatureProb.entrySet()) { double cls = e.getKey(); Map<String, Double> featureProb = e.getValue(); for (String n : featureSet) { double v = 0.0; if (featureProb.containsKey(n)) { v = featureProb.get(n); } featureProb.put(n, Math.log((v + 1) / (clsWordCount.get(cls) + featureSize))); } } } @Override public double classify(Instance instance) { if (clsProb == null) { Logger.error("Train Classifier First!"); } double cls = 0.0; double prob = -1; for (Entry<Double, Map<String, Double>> e : clsFeatureProb.entrySet()) { double thisCls = e.getKey(); double thisProb = clsProb.get(thisCls); for (Entry<String, Double> fe : instance) { String n = fe.getKey(); double v = fe.getValue(); if (clsFeatureProb.get(thisCls).containsKey(n)) { thisProb += clsFeatureProb.get(thisCls).get(n) * v; } } if (thisProb > prob || prob == -1) { cls = thisCls; prob = thisProb; } } return cls; } private Map<Double, Double> clsProb; private Map<Double, Map<String, Double>> clsFeatureProb; }
[ "jeky.cui@gmail.com" ]
jeky.cui@gmail.com
0af531bc0538b380d2de07bfd51491752b5e511b
1af3711e9a2f40af19c9bfbe6cdbe05cda343f7f
/AndroidExpert/app/src/main/java/com/example/androidexpert5/notification/NotificationReceiver.java
7af8092c6c874a4f0792fad2ace61655648b3223
[]
no_license
StilleRein/android-expert
9f257f4f5f09931739ffde19cb352074a79c9e5f
d7c36544dab9b6aa4ae9173e5bc2c1f1fc0762bf
refs/heads/master
2020-12-07T11:55:38.993755
2020-01-09T03:57:21
2020-01-09T03:57:21
232,716,594
0
0
null
null
null
null
UTF-8
Java
false
false
9,362
java
package com.example.androidexpert5.notification; import android.annotation.SuppressLint; import android.app.AlarmManager; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Build; import android.util.Log; import androidx.core.app.NotificationCompat; import com.androidnetworking.AndroidNetworking; import com.androidnetworking.common.Priority; import com.androidnetworking.error.ANError; import com.androidnetworking.interfaces.JSONObjectRequestListener; import com.example.androidexpert5.BuildConfig; import com.example.androidexpert5.MainActivity; import com.example.androidexpert5.R; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class NotificationReceiver extends BroadcastReceiver { private final int NOTIFICATION_DAILY_ID = 1; private final int NOTIFICATION_RELEASE_ID = 2; private final String NOTIFICATION_ID = "notification_id"; private final String CHANNEL_ID = "channel_01"; private final CharSequence CHANNEL_NAME = "my channel"; @Override public void onReceive(Context context, Intent intent) { int flag = intent.getIntExtra(NOTIFICATION_ID, 0); if (flag == NOTIFICATION_DAILY_ID) { dailyReminder(context); } else if (flag == NOTIFICATION_RELEASE_ID) { releaseReminder(context); } } public void startAlarmDaily(Context context, Boolean isNotification) { AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(context, NotificationReceiver.class); PendingIntent pendingIntent; if (isNotification) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 7); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); Calendar currTime = Calendar.getInstance(); if (currTime.after(calendar)) { calendar.add(Calendar.DATE, 1); } intent.putExtra(NOTIFICATION_ID, NOTIFICATION_DAILY_ID); pendingIntent = PendingIntent.getBroadcast(context, NOTIFICATION_DAILY_ID, intent, PendingIntent.FLAG_ONE_SHOT); if (alarmManager != null) { alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent); } } else { pendingIntent = PendingIntent.getBroadcast(context, NOTIFICATION_DAILY_ID, intent, PendingIntent.FLAG_ONE_SHOT); pendingIntent.cancel(); if (alarmManager != null) { alarmManager.cancel(pendingIntent); } } } public void startAlarmRelease(Context context, Boolean isNotification) { AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(context, NotificationReceiver.class); PendingIntent pendingIntent; if (isNotification) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 8); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); Calendar currTime = Calendar.getInstance(); if (currTime.after(calendar)) { calendar.add(Calendar.DATE, 1); } intent.putExtra(NOTIFICATION_ID, NOTIFICATION_RELEASE_ID); pendingIntent = PendingIntent.getBroadcast(context, NOTIFICATION_RELEASE_ID, intent, PendingIntent.FLAG_ONE_SHOT); if (alarmManager != null) { alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent); } } else { pendingIntent = PendingIntent.getBroadcast(context, NOTIFICATION_RELEASE_ID, intent, PendingIntent.FLAG_ONE_SHOT); pendingIntent.cancel(); if (alarmManager != null) { alarmManager.cancel(pendingIntent); } } } private void dailyReminder(Context context) { long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); Intent notificationIntent = new Intent(context, MainActivity.class); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0); NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID) .setSmallIcon(R.drawable.ic_notifications_24dp) .setContentTitle(context.getResources().getString(R.string.content_daily_title)) .setContentText(context.getResources().getString(R.string.content_text)) .setAutoCancel(true) .setWhen(when) .setContentIntent(pendingIntent); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); builder.setChannelId(CHANNEL_ID); if (notificationManager != null) { notificationManager.createNotificationChannel(channel); } } if (notificationManager != null) { notificationManager.notify(NOTIFICATION_DAILY_ID, builder.build()); } } private void releaseReminder(Context context) { long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); Intent notificationIntent = new Intent(context, MainActivity.class); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); Date currDate = Calendar.getInstance().getTime(); @SuppressLint("SimpleDateFormat") SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); String today = simpleDateFormat.format(currDate); String url = "https://api.themoviedb.org/3/discover/movie?api_key=" + BuildConfig.API_KEY + "&primary_release_date.gte=" + today + "&primary_release_date.lte=" + today; AndroidNetworking.get(url) .setPriority(Priority.MEDIUM) .build() .getAsJSONObject(new JSONObjectRequestListener() { @Override public void onResponse(JSONObject response) { try { JSONArray list = response.getJSONArray("results"); NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle() .setBigContentTitle("New Movie Release"); for (int i = 0; i < list.length(); i++) { JSONObject newMovie = list.getJSONObject(i); inboxStyle.addLine(newMovie.getString("title") + " has been release today!"); } NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID) .setSmallIcon(R.drawable.ic_notifications_24dp) .setContentTitle(context.getResources().getString(R.string.content_release_title)) .setContentText(context.getResources().getString(R.string.content_text)) .setStyle(inboxStyle) .setWhen(when) .setContentIntent(pendingIntent) .setAutoCancel(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); builder.setChannelId(CHANNEL_ID); if (notificationManager != null) { notificationManager.createNotificationChannel(channel); } } if (notificationManager != null) { notificationManager.notify(NOTIFICATION_RELEASE_ID, builder.build()); } } catch (JSONException e) { e.printStackTrace(); } } @Override public void onError(ANError anError) { Log.d("onError", anError + ""); } }); } }
[ "faustina.sidik@gmail.com" ]
faustina.sidik@gmail.com
e1ba5909156a90919abecff8463f7e81b6a6a1f9
ad82f7d86f1c9bc83b9e2a9bf37fbade2c2faf7d
/ngcontentmanager/src/main/java/com/nousdigital/ngcontentmanager/data/db/entities/NGGameActive.java
85ac083d2245ad2182954428f1d45f2e14c12513
[]
no_license
mahmoudfathy01010/ContentManagerTest2
70b8b125c98b31b3ba5bd79245498e8c44376f13
9a6ca97c72b7b5c5631381a2a46e8913b6cc01e6
refs/heads/main
2023-07-04T08:41:42.156323
2021-08-07T21:57:41
2021-08-07T21:57:41
393,122,347
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
/* * created by Silvana Podaras * © NOUS Wissensmanagement GmbH, 2020 */ package com.nousdigital.ngcontentmanager.data.db.entities; import com.nousdigital.ngcontentmanager.data.db.NGDatabase; import com.raizlabs.android.dbflow.annotation.Column; import com.raizlabs.android.dbflow.annotation.PrimaryKey; import com.raizlabs.android.dbflow.annotation.Table; import lombok.Getter; import lombok.Setter; @Table(database = NGDatabase.class, name = "GameActive") @Getter @Setter public class NGGameActive extends NGBaseModel { @Column @PrimaryKey private int gameId; @Column @PrimaryKey private String language; @Column private boolean active; }
[ "mahmoudfathy01010@gmail.com" ]
mahmoudfathy01010@gmail.com
91e85708b64850288a6235bbdd8674bc39546717
08d6705152d0a06ba78a43960d7ab7cbc5f51479
/src/main/java/com/grupo07/banca/proyecto01/personal/domain/Personal.java
0040f3abd5ec5cdd9c6002171295bd7540410b69
[]
no_license
hrosillo2021/personal-microservice
897ca44d447ea3c7673b07ece45ded4678b00cb0
8024d8f12206e114357cb7c0e2345572d74f4593
refs/heads/main
2023-06-14T02:06:34.082961
2021-06-30T16:12:59
2021-06-30T16:12:59
380,131,936
0
0
null
null
null
null
UTF-8
Java
false
false
716
java
package com.grupo07.banca.proyecto01.personal.domain; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.util.Date; @Document @AllArgsConstructor @NoArgsConstructor @Getter @Setter //@JsonIgnoreProperties({"model", "seatingCapacity"}) public class Personal { @Id protected String _id; private String dni; private String name; private String fatherLastname; private String motherLastname; private String gender; private Integer age; protected Date creationDate; protected Boolean isActive; }
[ "heberto.rosillo.c@gmail.com" ]
heberto.rosillo.c@gmail.com
08ba64b1636085ed703d996a9da44cf20b226768
ccea2bf5b4a42d2f7ed251c706321b76740f9235
/src/main/java/com/kbpark9898/BoooardGame/web/IndexController.java
e01c2389b84cd22b17d23707b1d05487f9d8173b
[]
no_license
kbpark9898/DCPRG_assign_3
ef9d33239519daf3d72de3894d5e823daf77ef01
6793f8c9474558cf0b68fc7ea9e4a9dd4d128eb6
refs/heads/master
2023-07-11T03:54:17.509991
2021-08-28T14:40:16
2021-08-28T14:40:16
373,810,441
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package com.kbpark9898.BoooardGame.web; import com.kbpark9898.BoooardGame.Service.Posts.PostsService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @RequiredArgsConstructor @Controller public class IndexController { private final PostsService postsService; @GetMapping("/") public String index(Model model){ model.addAttribute("posts", postsService.findAllDesc()); return "index"; } @GetMapping("/posts/save") public String postsSave(){ return "layout/posts-save"; } }
[ "kbpark9898@gmail.com" ]
kbpark9898@gmail.com
17a1d0cce20ef37f19e46b0ccb246670d17b2376
22760d44298a94a27b800917f9376714685d70d4
/src/com/zyf0811/gyj/Student.java
d6d7bb20f271a7168d892fc666d8d3708672dffc
[]
no_license
ZLYLF/JavaBasic
077e712437e3c3d4206fbbdbc6d548ff2048680b
a808dddcdd3aed2ce878902944d68f4cd4895480
refs/heads/master
2022-12-05T19:30:07.332362
2020-08-23T08:48:03
2020-08-23T08:48:03
null
0
0
null
null
null
null
GB18030
Java
false
false
736
java
package com.zyf0811.gyj; public class Student { // 属性 String name; int age; double score; int stuid; // 方法 public void exam(int stuid) { if(this.stuid==stuid) { // 输出语句 System.out.println("学号校验成功!可以开始考试!"); score+=5; System.out.println("考试通过!成绩是95分,学分增加5分,现在的学分是"+score+"分"); }else { System.out.println("学号校验错误!请重试!"); } } public static void main(String[] args) { Student stu1= new Student(); stu1.name="高誉静"; stu1.score=10; stu1.stuid=20190606; stu1.exam(20190601); Student stu2= new Student(); stu2.name="王俊"; System.out.println(); } }
[ "ZLYLF@outlook.com" ]
ZLYLF@outlook.com
fcea02212808a63538dc7ddea1461440abd51df3
eef7b1cb14ced8cc2c47036b3ebb0d9f8cd03d97
/03/src/TrianglesCentroid.java
2b036cd0f4fca2c5639f87e2214fda4b2bdc31c2
[]
no_license
yusei0329/object_pro
64da244978074c1b14ad44327488195c9365cf5d
32a4a1d02225c5fc3a07131afab9f763a6306529
refs/heads/main
2023-05-04T01:10:25.682578
2021-05-20T08:43:55
2021-05-20T08:43:55
358,134,453
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
public class TrianglesCentroid { Point point1 = new Point(); Point point2 = new Point(); Point point3 = new Point(); Point calc() { double dx = (point1.x + point2.x + point3.x) / 3.0; double dy = (point1.y + point2.y + point3.y) / 3.0; Point ret = new Point(); ret.x = dx; ret.y = dy; return ret; } }
[ "nwys.28@gmail.com" ]
nwys.28@gmail.com
1e5c32d20301145811e7860b95d6e0e164cbc064
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/com/tencent/map/lbsapi/api/SOSOMapLBSApiListener.java
7a34c3542c41107a1fd2639300f08dd5f5900314
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,591
java
package com.tencent.map.lbsapi.api; import com.tencent.map.location.h; public class SOSOMapLBSApiListener { private int mReqDelay = 12; private int mReqGeoType = 1; private int mReqLevel = 0; private int mReqType = 1; public SOSOMapLBSApiListener(int paramInt1, int paramInt2, int paramInt3, int paramInt4) { h.a("argument: " + this.mReqType + " " + this.mReqGeoType + " " + this.mReqLevel); if ((paramInt1 >= 0) && (paramInt1 <= 1)) { this.mReqType = paramInt1; } if ((paramInt2 >= 0) && (paramInt2 <= 1)) { this.mReqGeoType = paramInt2; } if ((paramInt3 == 0) || (paramInt3 == 1) || (paramInt3 == 3) || (paramInt3 == 4) || (paramInt3 == 7)) { this.mReqLevel = paramInt3; } if (this.mReqGeoType == 0) { this.mReqLevel = 0; } this.mReqDelay = paramInt4; } public int getReqDelay() { return this.mReqDelay; } public int getReqGeoType() { return this.mReqGeoType; } public int getReqLevel() { return this.mReqLevel; } public int getReqType() { return this.mReqType; } public void onLocationDataUpdate(byte[] paramArrayOfByte, int paramInt) {} public void onLocationUpdate(SOSOMapLBSApiResult paramSOSOMapLBSApiResult) {} public void onStatusUpdate(int paramInt) {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar * Qualified Name: com.tencent.map.lbsapi.api.SOSOMapLBSApiListener * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
32e663a68118e5571ea3324d2a4f898044c63a2a
11949cbd43806226f06f146d5934bed78f443495
/src/Node.java
840062b37ddd1e295b2f6d28fcb8e353f9551198
[]
no_license
PinkFuryAlpha/Wolfpack_Digital_problem2
27047dd4c3ed0995aec3a8aab3b4e4628c43f860
00f604452931bfda7d7bc0fd145204e044a6e4cc
refs/heads/master
2022-10-29T10:44:19.922487
2020-06-20T09:25:33
2020-06-20T09:25:33
273,676,747
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
public class Node<T extends Comparable<T>> { // I made Node to be of generic type so that it can be any data type we want public T data; public Node<T> next; public Node(T data){ this.data=data; } }
[ "tinteanu.tudor@gmail.com" ]
tinteanu.tudor@gmail.com
7eaf59484d2abb95429a24912cdd4d8ed1e356c2
ba2eef5e3c914673103afb944dd125a9e846b2f6
/AL-Game/src/com/aionemu/gameserver/network/aion/gmhandler/CmdGiveTitle.java
e0f918c44a415edfd883b26d07927a331e298ab3
[]
no_license
makifgokce/Aion-Server-4.6
519d1d113f483b3e6532d86659932a266d4da2f8
0a6716a7aac1f8fe88780aeed68a676b9524ff15
refs/heads/master
2022-10-07T11:32:43.716259
2020-06-10T20:14:47
2020-06-10T20:14:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,930
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.network.aion.gmhandler; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.utils.PacketSendUtility; /** * @author Antraxx */ public final class CmdGiveTitle extends AbstractGMHandler { public CmdGiveTitle(Player admin, String params) { super(admin, params); run(); } public void run() { Player t = target != null ? target : admin; String parts[] = params.split(" "); if (parts.length == 2) { Integer titleId = Integer.parseInt(parts[1]); if ((titleId > 272) || (titleId < 1)) { PacketSendUtility.sendMessage(admin, "title id " + titleId + " is invalid (must be between 1 and 272)"); } else { if (t != null) { if (!t.getTitleList().addTitle(titleId, false, 0)) { PacketSendUtility.sendMessage(admin, "you can't add title #" + titleId + " to " + (t.equals(admin) ? "yourself" : t.getName())); } else { PacketSendUtility.sendMessage(admin, "you added to " + t.getName() + " title #" + titleId); PacketSendUtility.sendMessage(t, admin.getName() + " gave you title #" + titleId); } } } } } }
[ "Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7" ]
Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7
83ea0aedf50d1eb571abc26610139542ee3e0918
5c7f98f4d9dedea530e76f19a6cd29b5f40e81b0
/common/src/main/java/org/endeavourhealth/informationmanager/common/transform/model/EntityKey.java
959b0c6f1c456f4f4f371c5cf11b425de7fd3ca6
[ "Apache-2.0" ]
permissive
DavidStables/InformationManager
d1dcf7587eb893f35e65dfe0c732abaedc23c0e1
f0458111497e6af0e677369ff1477e8d0a5b83c4
refs/heads/master
2022-07-16T17:55:09.139191
2020-05-20T09:46:35
2020-05-20T09:46:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package org.endeavourhealth.informationmanager.common.transform.model; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class EntityKey { private List<String> property; @JsonProperty("Property") public List<String> getProperty() { return property; } public EntityKey setProperty(List<String> property) { this.property = property; return this; } }
[ "ergosoftuk@gmail.com" ]
ergosoftuk@gmail.com
d33804e632a39529814731f1ed285037c9733b07
a0030240a27f45890625da3d01b560e86da22298
/day7/overriding/OverrideTest.java
429b0bd678ff247f526624957f68225f62e410e0
[]
no_license
Samk312/Test
55f7ebf1bb18dd83a5f2ee83c88424d53b81b6ce
969fc52b3bec443925daa25bb9cb5a7567924708
refs/heads/master
2021-01-02T09:42:06.997554
2019-07-17T05:35:38
2019-07-17T05:35:38
99,283,248
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
package com.training.day7.overriding; import java.io.IOException; public class OverrideTest { public static void main(String[] args) throws IOException { A a = new A(); B b = new B(); a.test(); b.test(); a.test2(); b.test2(); A a1 = new B(); System.out.println("Hello"); a1.test(); a1.test2(); a1.m1(); a1.m2(10); System.out.println(a.i); System.out.println(a.j); System.out.println(b.i); System.out.println(b.j); System.out.println(a1.i); System.out.println(a1.j); } }
[ "noreply@github.com" ]
Samk312.noreply@github.com
3d070766213b5e0c3acc589b8c86bed7296450fb
5c8bddb31b81c10a25a157219786f29647e28d0a
/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java
09fc9842535821bc4cf4c2b09fe719011c630887
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
snobu/azure-sdk-for-java
a881062839d89dc73326ab2c5806e34ef6cd346b
7913a62b595172232bf520afe67cac15b6964c74
refs/heads/master
2020-09-22T05:55:01.024805
2019-11-27T20:25:23
2019-11-27T20:25:23
225,071,233
0
0
MIT
2019-11-30T21:20:41
2019-11-30T21:20:41
null
UTF-8
Java
false
false
2,432
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.storage.queue; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.queue.sas.QueueSasPermission; import com.azure.storage.queue.sas.QueueServiceSasQueryParameters; import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; /** * Code snippets for {@link QueueServiceSasSignatureValues}. */ public class QueueServiceSasSignatureValuesJavaDocCodeSnippets { public void generateSasExpiryTime() { // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); // The expiry time and permissions are required to create a valid SAS // if a stored access policy identifier is not set. QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() .setPermissions(QueueSasPermission.parse("rau")) .setProtocol(SasProtocol.HTTPS_ONLY) .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(2))) .generateSasQueryParameters(credential); // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential } public void generateWithStoredAccessPolicy() { // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); // The shared access policy, "read-write-user" exists in the storage account. The SAS generated from this has // the same duration and permissions as the policy. // The expiry and permissions should not be set explicitly. QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() .setIdentifier("read-write-user") .setProtocol(SasProtocol.HTTPS_ONLY) .generateSasQueryParameters(credential); // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential } }
[ "noreply@github.com" ]
snobu.noreply@github.com
09d32b08e52a0b4c74dcb79851ae7ce5b1cb65af
d5fc8382183b368cc25482b28827e4f7b4ebead0
/src/main/java/com/zc/pattern/adapter/poweradapter/PowerAdapter.java
93ebc496a2cbc744601b1de5ba7b8d3e0b8f9581
[]
no_license
ITzhoucong/AdapterPattern
aa7e41525370341c1d50216a03ecd6f0033dba90
b1c21dc5b12c8a90676eb74e69d646ced5ace6f3
refs/heads/main
2023-02-17T05:59:05.500774
2021-01-12T10:50:18
2021-01-12T10:50:18
328,919,693
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package com.zc.pattern.adapter.poweradapter; /** * @author: ZhouCong * @date: Create in 2021/1/12 11:41 * @description: */ public class PowerAdapter implements DC5 { private AC220 ac220; public PowerAdapter(AC220 ac220) { this.ac220 = ac220; } @Override public int outputDC5V() { int adapterInput = ac220.outputAC220V(); int adapterOutput = adapterInput / 44; System.out.println("使用PowerAdapter输入AC:" + adapterInput + "V,输出DC:" + adapterOutput + "V"); return adapterOutput; } }
[ "4181772312qq.com" ]
4181772312qq.com
a7ce31d4e869252822eaa6b091755c1cda409289
2d061aa08f68768d51c0ca7bcae8824587a669fc
/src/main/java/org/webservice/common/ArrayOfString.java
7571149075b71e4da752d9eba189bce27cf8fee1
[]
no_license
Shiiiiiy/ams-common
9c63ff6d45a46a285f52d7d5c337d69fe22b3a16
9ac2a4a72e37e1ff7f6505cc05b985c586746fdb
refs/heads/master
2021-01-19T20:03:57.142542
2017-04-17T07:08:56
2017-04-17T07:08:56
88,481,875
0
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
package org.webservice.common; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p> * Java class for ArrayOfString complex type. * * <p> * The following schema fragment specifies the expected content contained within * this class. * * <pre> * &lt;complexType name="ArrayOfString"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="string" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfString", propOrder = { "string" }) public class ArrayOfString { @XmlElement(nillable = true) protected List<String> string; /** * Gets the value of the string property. * * <p> * This accessor method returns a reference to the live list, not a * snapshot. Therefore any modification you make to the returned list will * be present inside the JAXB object. This is why there is not a * <CODE>set</CODE> method for the string property. * * <p> * For example, to add a new item, do as follows: * * <pre> * getString().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list {@link String } * * */ public List<String> getString() { if (string == null) { string = new ArrayList<String>(); } return this.string; } }
[ "shiyan19941123@qq.com" ]
shiyan19941123@qq.com
e84b4675b4715fd9e59a74bed37a5312502f73f4
16212d742fc44742105d5bfa08ce025c0955df1c
/fix-trading-technologies/src/main/java/quickfix/tt/field/ManualOrderIndicator.java
98ed00b4b475b36ce647e003eb44e4095f718624
[ "Apache-2.0" ]
permissive
WojciechZankowski/fix-dictionaries
83c7ea194f28edbaba2124418fa2ab05ad256114
94b299972ade7597c4b581d752858b873102796e
refs/heads/master
2021-01-19T13:26:18.927116
2017-04-14T22:09:15
2017-04-14T22:09:16
88,088,490
10
2
null
null
null
null
UTF-8
Java
false
false
1,298
java
/* Generated Java Source File */ /******************************************************************************* * Copyright (c) quickfixengine.org All rights reserved. * * This file is part of the QuickFIX FIX Engine * * This file may be distributed under the terms of the quickfixengine.org * license as defined by quickfixengine.org and appearing in the file * LICENSE included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. * * See http://www.quickfixengine.org/LICENSE for licensing information. * * Contact ask@quickfixengine.org if any conditions of this licensing * are not clear to you. ******************************************************************************/ package quickfix.tt.field; import quickfix.CharField; public class ManualOrderIndicator extends CharField { static final long serialVersionUID = 20050617; public static final int FIELD = 11028; public static final char Order_was_sent_manually = 'Y'; public static final char Order_was_generated_by_automated_trading_logic = 'N'; public ManualOrderIndicator() { super(11028); } public ManualOrderIndicator(char data) { super(11028, data); } }
[ "info@zankowski.pl" ]
info@zankowski.pl
4cbf854eccd79cf3b4ad513e010ce86d874c1354
fcec499132ca67bc2047a1bbcf7ffe21a46bf109
/TMessagesProj/src/main/java/ir/amin/HaftTeen/ui/Components/SeekBarView.java
15ff16e3edb12b59ada20e1325be25c7abbd600b
[]
no_license
amirreza-rostamian/aan-client
29881c09ae81b2dc2902dc72b025c4847472b428
c2cc8dd1e1657d41b8f0a55d293ec4fbc936c5df
refs/heads/master
2020-08-31T02:52:56.440025
2019-10-30T15:36:15
2019-10-30T15:36:15
218,558,479
0
0
null
null
null
null
UTF-8
Java
false
false
6,100
java
/* * This is the source code of aan for Android v. 3.x.x. * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Nikolai Kudashov, 2013-2017. */ package ir.amin.HaftTeen.ui.Components; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.view.MotionEvent; import android.widget.FrameLayout; import ir.amin.HaftTeen.messenger.AndroidUtilities; import ir.amin.HaftTeen.ui.ActionBar.Theme; public class SeekBarView extends FrameLayout { private Paint innerPaint1; private Paint outerPaint1; private int thumbWidth; private int thumbHeight; private int thumbX; private int thumbDX; private float progressToSet; private boolean pressed; private SeekBarViewDelegate delegate; private boolean reportChanges; private float bufferedProgress; public SeekBarView(Context context) { super(context); setWillNotDraw(false); innerPaint1 = new Paint(Paint.ANTI_ALIAS_FLAG); innerPaint1.setColor(Theme.getColor(Theme.key_player_progressBackground)); outerPaint1 = new Paint(Paint.ANTI_ALIAS_FLAG); outerPaint1.setColor(Theme.getColor(Theme.key_player_progress)); thumbWidth = AndroidUtilities.dp(24); thumbHeight = AndroidUtilities.dp(24); } public void setColors(int inner, int outer) { innerPaint1.setColor(inner); outerPaint1.setColor(outer); } public void setInnerColor(int inner) { innerPaint1.setColor(inner); } public void setOuterColor(int outer) { outerPaint1.setColor(outer); } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { return onTouch(ev); } @Override public boolean onTouchEvent(MotionEvent event) { return onTouch(event); } public void setReportChanges(boolean value) { reportChanges = value; } public void setDelegate(SeekBarViewDelegate seekBarViewDelegate) { delegate = seekBarViewDelegate; } boolean onTouch(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { getParent().requestDisallowInterceptTouchEvent(true); int additionWidth = (getMeasuredHeight() - thumbWidth) / 2; if (ev.getY() >= 0 && ev.getY() <= getMeasuredHeight()) { if (!(thumbX - additionWidth <= ev.getX() && ev.getX() <= thumbX + thumbWidth + additionWidth)) { thumbX = (int) ev.getX() - thumbWidth / 2; if (thumbX < 0) { thumbX = 0; } else if (thumbX > getMeasuredWidth() - thumbWidth) { thumbX = getMeasuredWidth() - thumbWidth; } } thumbDX = (int) (ev.getX() - thumbX); pressed = true; invalidate(); return true; } } else if (ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_CANCEL) { if (pressed) { if (ev.getAction() == MotionEvent.ACTION_UP) { delegate.onSeekBarDrag((float) thumbX / (float) (getMeasuredWidth() - thumbWidth)); } pressed = false; invalidate(); return true; } } else if (ev.getAction() == MotionEvent.ACTION_MOVE) { if (pressed) { thumbX = (int) (ev.getX() - thumbDX); if (thumbX < 0) { thumbX = 0; } else if (thumbX > getMeasuredWidth() - thumbWidth) { thumbX = getMeasuredWidth() - thumbWidth; } if (reportChanges) { delegate.onSeekBarDrag((float) thumbX / (float) (getMeasuredWidth() - thumbWidth)); } invalidate(); return true; } } return false; } public void setProgress(float progress) { if (getMeasuredWidth() == 0) { progressToSet = progress; return; } progressToSet = -1; int newThumbX = (int) Math.ceil((getMeasuredWidth() - thumbWidth) * progress); if (thumbX != newThumbX) { thumbX = newThumbX; if (thumbX < 0) { thumbX = 0; } else if (thumbX > getMeasuredWidth() - thumbWidth) { thumbX = getMeasuredWidth() - thumbWidth; } invalidate(); } } public void setBufferedProgress(float progress) { bufferedProgress = progress; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (progressToSet >= 0 && getMeasuredWidth() > 0) { setProgress(progressToSet); progressToSet = -1; } } public boolean isDragging() { return pressed; } @Override protected void onDraw(Canvas canvas) { int y = (getMeasuredHeight() - thumbHeight) / 2; canvas.drawRect(thumbWidth / 2, getMeasuredHeight() / 2 - AndroidUtilities.dp(1), getMeasuredWidth() - thumbWidth / 2, getMeasuredHeight() / 2 + AndroidUtilities.dp(1), innerPaint1); if (bufferedProgress > 0) { canvas.drawRect(thumbWidth / 2, getMeasuredHeight() / 2 - AndroidUtilities.dp(1), thumbWidth / 2 + bufferedProgress * (getMeasuredWidth() - thumbWidth), getMeasuredHeight() / 2 + AndroidUtilities.dp(1), innerPaint1); } canvas.drawRect(thumbWidth / 2, getMeasuredHeight() / 2 - AndroidUtilities.dp(1), thumbWidth / 2 + thumbX, getMeasuredHeight() / 2 + AndroidUtilities.dp(1), outerPaint1); canvas.drawCircle(thumbX + thumbWidth / 2, y + thumbHeight / 2, AndroidUtilities.dp(pressed ? 8 : 6), outerPaint1); } public interface SeekBarViewDelegate { void onSeekBarDrag(float progress); } }
[ "rostamianamirreza@yahoo.com" ]
rostamianamirreza@yahoo.com
4b2bcc94fd395d9a419d5e460c3d7aee30b52dec
d3ec8d92d31a6619c0ec87638398ee0095192a25
/store/src/main/java/cn/tedu/store/util/JsonResult.java
d509b46c306b6b16330feb8e4bb4317958e4f432
[]
no_license
zt-faker/test
811060476c796760e2ff22eb05ffa5bcbc48efb7
7b0603a9c7a5bb5cea8d1e401ad8dc7d2d5ee04d
refs/heads/master
2021-01-04T10:44:41.142018
2020-02-21T05:50:31
2020-02-21T05:50:31
240,511,601
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
package cn.tedu.store.util; /** * 用于封装向客户端响应结果的类 * @author 原来你是光啊! * * @param <T> 向客户端响应的数据的类型 * */ public class JsonResult<T> { private Integer state;//状态 private String message;//错误信息 private T data;//数据 public JsonResult() { } public JsonResult(Integer state) { super(); this.state = state; } public JsonResult(String message) { super(); this.message = message; } public JsonResult(Throwable ex) { this.message=ex.getMessage(); } public JsonResult(Integer state, T data) { super(); this.state = state; this.data = data; } public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
[ "1261999565@qq.com" ]
1261999565@qq.com
c2027462023d6ed0d7f586dda1d5e0388c77b5b0
c94f888541c0c430331110818ed7f3d6b27b788a
/appex/java/src/main/java/com/antgroup/antchain/openapi/appex/models/CreateMypocketDidaccountbyalipayResponse.java
4f30c22321c2ce4cfaaa240d0e6593b019c8ea91
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,707
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.appex.models; import com.aliyun.tea.*; public class CreateMypocketDidaccountbyalipayResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; // 用户的DID @NameInMap("did") public String did; public static CreateMypocketDidaccountbyalipayResponse build(java.util.Map<String, ?> map) throws Exception { CreateMypocketDidaccountbyalipayResponse self = new CreateMypocketDidaccountbyalipayResponse(); return TeaModel.build(map, self); } public CreateMypocketDidaccountbyalipayResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public CreateMypocketDidaccountbyalipayResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public CreateMypocketDidaccountbyalipayResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } public CreateMypocketDidaccountbyalipayResponse setDid(String did) { this.did = did; return this; } public String getDid() { return this.did; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7b4c6541d97d0e7cb1dd8ab29d95fe14088d7852
2a97cd99780529ffc64a3a577acab639c5ce4aa7
/app/src/main/java/com/example/aaa1/myapplication/RecordActivity.java
3196c072212d44c07af21b8421aca03d60382222
[]
no_license
Team3G/hearingAid
e7a92d7130b4943ccec8d87187e0b2522c5a27a7
32e18cfad535949592631cf5c796560e088dc313
refs/heads/master
2020-04-10T12:22:05.463285
2018-12-09T09:23:43
2018-12-09T09:23:43
161,020,116
2
0
null
null
null
null
UTF-8
Java
false
false
5,130
java
package com.example.aaa1.myapplication; import android.content.Intent; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TabHost; import android.widget.TextView; public class RecordActivity extends AppCompatActivity { ImageView backBtn; TabHost tabHost; FrameLayout frameLayout; TextView userNameText,a_left,b_left,c_left,d_left,e_left,f_left,g_left,b2_left,c2_left,e2_left,f2_left,g2_left; TextView a_right,b_right,c_right,d_right,e_right,f_right,g_right,b2_right,c2_right,e2_right,f2_right,g2_right; TextView[] left = new TextView[12]; TextView[] right = new TextView[12]; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_record); userNameText = (TextView)findViewById(R.id.userNameText); backBtn = (ImageView)findViewById(R.id.backBtn); tabHost = (TabHost) findViewById(R.id.tabhost1); tabHost.setup(); backBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(getApplicationContext(),MainActivity.class); startActivity(intent); finish(); } }); frameLayout = (FrameLayout) findViewById(android.R.id.tabcontent); TabHost.TabSpec tab1 = tabHost.newTabSpec("1").setContent(R.id.tab1).setIndicator("왼쪽 귀 검사결과"); TabHost.TabSpec tab2 = tabHost.newTabSpec("2").setContent(R.id.tab2).setIndicator("오른쪽 귀 검사결과"); tabHost.addTab(tab1); tabHost.addTab(tab2); init(); } void init(){ //사용자이름으로 바꿔야 한다. userNameText.setText("박진숙님의 결과"); a_left = (TextView)findViewById(R.id.text_a_left); b_left = (TextView)findViewById(R.id.text_b_left); c_left = (TextView)findViewById(R.id.text_c_left); d_left = (TextView)findViewById(R.id.text_d_left); e_left = (TextView)findViewById(R.id.text_e_left); f_left = (TextView)findViewById(R.id.text_f_left); g_left = (TextView)findViewById(R.id.text_g_left); b2_left = (TextView)findViewById(R.id.text_b2_left); c2_left = (TextView)findViewById(R.id.text_c2_left); e2_left = (TextView)findViewById(R.id.text_e2_left); f2_left = (TextView)findViewById(R.id.text_f2_left); g2_left = (TextView)findViewById(R.id.text_g2_left); a_right = (TextView)findViewById(R.id.text_a_right); b_right = (TextView)findViewById(R.id.text_b_right); c_right = (TextView)findViewById(R.id.text_c_right); d_right = (TextView)findViewById(R.id.text_d_right); e_right = (TextView)findViewById(R.id.text_e_right); f_right = (TextView)findViewById(R.id.text_f_right); g_right = (TextView)findViewById(R.id.text_g_right); b2_right = (TextView)findViewById(R.id.text_b2_right); c2_right = (TextView)findViewById(R.id.text_c2_right); e2_right = (TextView)findViewById(R.id.text_e2_right); f2_right = (TextView)findViewById(R.id.text_f2_right); g2_right = (TextView)findViewById(R.id.text_g_right2); left[0] = a_left; left[1] = b2_left; left[2]= b_left; left[3] = c_left; left[4] = c2_left; left[5] = d_left; left[6] = e2_left; left[7] = e_left; left[8] = f_left; left[9] = f2_left; left[10] = g_left; left[11] = g2_left; right[0] = a_right; right[1] = b2_right; right[2]= b_right; right[3] = c_right; right[4] = c2_right; right[5] = d_right; right[6] = e2_right; right[7] = e_right; right[8] = f_right; right[9] = f2_right; right[10] = g_right; right[11] = g2_right; changeText_left(); changeText_right(); } @Override public void onBackPressed() { super.onBackPressed(); Intent intent = new Intent(getApplicationContext(),MainActivity.class); startActivity(intent); finish(); } public void changeText_left(){ //db에서 불러온 걸로 바꾸면 될 것 같다. for(int i = 0; i<left.length; i++) { char left_rst = TestingActivity_L.left_result.charAt(i); if(left_rst == '1') left[i].setText("O"); else left[i].setText("X"); } } public void changeText_right(){ //db에서 불러온 걸로 바꾸면 될 것 같다. for(int i = 0; i<left.length; i++) { char right_rst = TestingActivity_R.right_result.charAt(i); if(right_rst == '1') right[i].setText("O"); else right[i].setText("X"); } } }
[ "1_1_1_3g@naver.com" ]
1_1_1_3g@naver.com
59c99034f549f6260121c2419de12f77d954573b
cf4d59d4eae9701b191720e74a1d7a605a3d6f64
/ch09/disruptor/DataEventFactory.java
2862e505ee5b2d1b3134f9dfa36a054e834c6e66
[]
no_license
Bingoli9/Java_billion_code
e721b39b715cd2918176d9b14084c03973ba37a8
eeabc6f3b32222cb93869f21d74c688f07519255
refs/heads/main
2023-07-12T17:22:25.967760
2021-08-10T04:03:28
2021-08-10T04:03:28
394,516,413
2
0
null
null
null
null
UTF-8
Java
false
false
259
java
package com.yanqun.disruptor.base; import com.lmax.disruptor.EventFactory; public class DataEventFactory implements EventFactory { //批量的产生 DataEvent对象 @Override public Object newInstance() { return new DataEvent(); } }
[ "1456728502@qq.com" ]
1456728502@qq.com
a0fcbd98945c153ee7a7de05640fa285d99bd3dc
8b15d5a5f8b21b55066b29e984cef7c7edf2d964
/src/main/java/com/trk/bootdemo/WebSocketHandler.java
d8728977a49fe0be4f35bcdb88bd2d1908c92411
[]
no_license
rwinston/spring-boot-starter
6d02fee1dadb751d7ef30f85bb80ea5a7c4af92a
419c0adb41acf0ff95f7e91ffc6b679031c250c2
refs/heads/master
2021-08-04T12:02:43.957622
2020-07-22T14:45:10
2020-07-22T14:45:10
200,871,600
0
0
null
null
null
null
UTF-8
Java
false
false
925
java
package com.trk.bootdemo; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.springframework.web.socket.BinaryMessage; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.handler.BinaryWebSocketHandler; public class WebSocketHandler extends BinaryWebSocketHandler { final List<WebSocketSession> sessions = new CopyOnWriteArrayList<WebSocketSession>(); @Override public void afterConnectionEstablished(WebSocketSession session) throws Exception { super.afterConnectionEstablished(session); sessions.add(session); } @Override public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception { sessions.remove(session); } @Override protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception { } }
[ "rory@theresearchkitchen.com" ]
rory@theresearchkitchen.com
9dddc02ab8cacba69afa8c8fc16f85927eb28064
b06bf8028b990b5112f0278e2f132489d3dcfeed
/src/main/java/GeneratorMain.java
1d95dcc06b4badad3c20829718523e88507f964c
[]
no_license
shc573/newmybatis2
a8b82e01066020d300c8b4a2674b88cf88faa6f4
ed8b34be09b6289249e3a76dba71f1c47c92a92b
refs/heads/master
2022-07-19T04:54:58.253667
2019-12-22T09:34:34
2019-12-22T09:34:34
229,545,749
0
0
null
2022-06-21T02:29:50
2019-12-22T09:34:28
Java
UTF-8
Java
false
false
1,826
java
import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.exception.InvalidConfigurationException; import org.mybatis.generator.exception.XMLParserException; import org.mybatis.generator.internal.DefaultShellCallback; import java.io.File; import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public class GeneratorMain { public static void main(String[] args) { List<String> warings = new ArrayList<String>(); boolean overwrite = true; String genCig = "/config.xml"; File configFile = new File(GeneratorMain.class.getResource(genCig).getFile()); ConfigurationParser configurationParser = new ConfigurationParser(warings); Configuration configuration = null; try { configuration = configurationParser.parseConfiguration(configFile); } catch (IOException e) { e.printStackTrace(); } catch (XMLParserException e) { e.printStackTrace(); } DefaultShellCallback callback = new DefaultShellCallback(overwrite); MyBatisGenerator myBatisGenerator = null; try { myBatisGenerator = new MyBatisGenerator(configuration,callback,warings); } catch (InvalidConfigurationException e) { e.printStackTrace(); } try { myBatisGenerator.generate(null); } catch (SQLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "1102921612@qq.com" ]
1102921612@qq.com
6b26bc7ef487db3c553fb59c624acbbd9d06a20a
cab07cb930e4c487d12f0197d5818048023fd88c
/ccweb/src/main/java/com/knet51/ccweb/util/aop/SystemArchitecture.java
b490ae8904fd681b76efc2d57790bd63980b41f5
[]
no_license
maidoulubiubiu/RuleIsRule
41cca13108df1986b505d27c39877bb6c024885d
ae4c200bf885e1df1c452fef246981459a17a2a8
refs/heads/master
2021-01-10T07:48:39.337767
2014-10-14T14:22:57
2014-10-14T14:22:57
48,677,619
0
0
null
null
null
null
UTF-8
Java
false
false
2,923
java
package com.knet51.ccweb.util.aop; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Component; @Component @Aspect public class SystemArchitecture { private static final Logger logger = LoggerFactory .getLogger(SystemArchitecture.class); /** * A join point is in the web layer if the method is defined * in a type in the com.xyz.someapp.web package or any sub-package * under that. */ @Pointcut("within(com.knet51.ccweb.controllers..*)") public void inWebLayer() {} /** * A join point is in the service layer if the method is defined * in a type in the com.xyz.someapp.service package or any sub-package * under that. */ @Pointcut("within(com.knet51.ccweb.jpa.service..*)") public void inServiceLayer() {} /** * A join point is in the data access layer if the method is defined * in a type in the com.xyz.someapp.dao package or any sub-package * under that. */ @Pointcut("within(com.knet51.ccweb.jpa.dao..*)") public void inDataAccessLayer() {} /** * A business service is the execution of any method defined on a service * interface. This definition assumes that interfaces are placed in the * "service" package, and that implementation types are in sub-packages. * * If you group service interfaces by functional area (for example, * in packages com.xyz.someapp.abc.service and com.xyz.def.service) then * the pointcut expression "execution(* com.xyz.someapp..service.*.*(..))" * could be used instead. * * Alternatively, you can write the expression using the 'bean' * PCD, like so "bean(*Service)". (This assumes that you have * named your Spring service beans in a consistent fashion.) */ @Pointcut("execution(* com.knet51.ccweb.jpa.services.*.*(..))") public void businessService() {} /** * A data access operation is the execution of any method defined on a * dao interface. This definition assumes that interfaces are placed in the * "dao" package, and that implementation types are in sub-packages. */ @Pointcut("execution(* com.knet51.ccweb.jpa.dao.*.*(..))") public void dataAccessOperation() { logger.info("ARRIVED HERE"); } @Before("dataAccessOperation()") public void beforeDataAccessOperation() { logger.info("beforeDataAccessOperation"); } @AfterThrowing(pointcut="com.knet51.ccweb.util.aop.SystemArchitecture.dataAccessOperation()", throwing="ex") public void doRecoveryActions(JoinPoint jp, DataAccessException ex) { logger.info(jp.toString()+"\n"+ex.toString()); } }
[ "jacky.jihao@gmail.com" ]
jacky.jihao@gmail.com
f0c5075b1f69e10cc335b3818ccace6a0e3602ba
04a041afc9f3c7c5aa54ba3218af5a04b3eab3f7
/vrp-gui/src/main/java/de/rwth/lofip/gui/TestPanel.java
901d50df23387d21ce250e8416cea8a033ff94b2
[]
no_license
amikey/vrptwsd
48c00cd5eb0e1c7164cbbda5eaa674e17fa94bcd
8bcfbbe5da9e9041bd7a5fd4594897ffdacb16e5
refs/heads/master
2020-04-14T07:25:55.195351
2016-10-03T08:32:19
2016-10-03T08:32:19
163,711,954
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package de.rwth.lofip.gui; import javax.swing.JPanel; public class TestPanel extends JPanel { private static final long serialVersionUID = 3969355473565991507L; /** * Create the panel. */ public TestPanel() { } }
[ "andreasbraun@rwth-aachen.de" ]
andreasbraun@rwth-aachen.de
2deedabd9f5ac6e95fb522ad8484c658745ccc03
647b1232e7bd89039ebeb13088460bab0faad36c
/projects/stage-1/shopizer/sm-shop/src/main/java/com/salesmanager/shop/store/controller/customer/CustomerRegistrationController.java
08cede6e4cd6e96ab40afbc8fdd71f01f7e25a01
[ "Apache-2.0" ]
permissive
bestzhangtao/geekbang-lessons
8ebf986e4416e352a9c649dc97433680a308452d
35e8e6ce0a2296225ce699def7ec8bdd6f200252
refs/heads/master
2023-05-27T13:02:08.732705
2023-05-17T19:14:38
2023-05-17T19:14:38
229,888,436
1
0
Apache-2.0
2020-04-14T07:23:27
2019-12-24T06:54:13
null
UTF-8
Java
false
false
12,634
java
package com.salesmanager.shop.store.controller.customer; import java.util.Collections; import java.util.List; import java.util.Locale; import javax.inject.Inject; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.salesmanager.core.business.exception.ConversionException; import com.salesmanager.core.business.exception.ServiceException; import com.salesmanager.core.business.services.catalog.product.PricingService; import com.salesmanager.core.business.services.reference.country.CountryService; import com.salesmanager.core.business.services.reference.language.LanguageService; import com.salesmanager.core.business.services.reference.zone.ZoneService; import com.salesmanager.core.business.services.shoppingcart.ShoppingCartCalculationService; import com.salesmanager.core.business.services.system.EmailService; import com.salesmanager.core.model.customer.Customer; import com.salesmanager.core.model.merchant.MerchantStore; import com.salesmanager.core.model.reference.country.Country; import com.salesmanager.core.model.reference.language.Language; import com.salesmanager.core.model.reference.zone.Zone; import com.salesmanager.core.model.shoppingcart.ShoppingCart; import com.salesmanager.shop.constants.Constants; import com.salesmanager.shop.model.customer.AnonymousCustomer; import com.salesmanager.shop.model.customer.CustomerEntity; import com.salesmanager.shop.model.customer.SecuredShopPersistableCustomer; import com.salesmanager.shop.model.shoppingcart.ShoppingCartData; import com.salesmanager.shop.populator.shoppingCart.ShoppingCartDataPopulator; import com.salesmanager.shop.store.controller.AbstractController; import com.salesmanager.shop.store.controller.ControllerConstants; import com.salesmanager.shop.store.controller.customer.facade.CustomerFacade; import com.salesmanager.shop.utils.CaptchaRequestUtils; import com.salesmanager.shop.utils.EmailTemplatesUtils; import com.salesmanager.shop.utils.ImageFilePath; import com.salesmanager.shop.utils.LabelUtils; //import com.salesmanager.core.business.customer.CustomerRegistrationException; /** * Registration of a new customer * @author Carl Samson * */ // http://stackoverflow.com/questions/17444258/how-to-use-new-passwordencoder-from-spring-security @Controller @RequestMapping("/shop/customer") public class CustomerRegistrationController extends AbstractController { private static final Logger LOGGER = LoggerFactory.getLogger(CustomerRegistrationController.class); @Inject private LanguageService languageService; @Inject private CountryService countryService; @Inject private ZoneService zoneService; @Inject EmailService emailService; @Inject private LabelUtils messages; @Inject private CustomerFacade customerFacade; @Inject private EmailTemplatesUtils emailTemplatesUtils; @Inject private CaptchaRequestUtils captchaRequestUtils; @Inject @Qualifier("img") private ImageFilePath imageUtils; @Inject private ShoppingCartCalculationService shoppingCartCalculationService; @Inject private PricingService pricingService; @Value("${config.recaptcha.siteKey}") private String siteKeyKey; @RequestMapping(value="/registration.html", method=RequestMethod.GET) public String displayRegistration(final Model model, final HttpServletRequest request, final HttpServletResponse response) throws Exception { MerchantStore store = (MerchantStore)request.getAttribute(Constants.MERCHANT_STORE); model.addAttribute( "recapatcha_public_key", siteKeyKey); SecuredShopPersistableCustomer customer = new SecuredShopPersistableCustomer(); AnonymousCustomer anonymousCustomer = (AnonymousCustomer)request.getAttribute(Constants.ANONYMOUS_CUSTOMER); if(anonymousCustomer!=null) { customer.setBilling(anonymousCustomer.getBilling()); } model.addAttribute("customer", customer); /** template **/ StringBuilder template = new StringBuilder().append(ControllerConstants.Tiles.Customer.register).append(".").append(store.getStoreTemplate()); return template.toString(); } @RequestMapping( value = "/register.html", method = RequestMethod.POST ) public String registerCustomer( @Valid @ModelAttribute("customer") SecuredShopPersistableCustomer customer, BindingResult bindingResult, Model model, HttpServletRequest request, HttpServletResponse response, final Locale locale ) throws Exception { MerchantStore merchantStore = (MerchantStore) request.getAttribute( Constants.MERCHANT_STORE ); Language language = super.getLanguage(request); String userName = null; String password = null; model.addAttribute( "recapatcha_public_key", siteKeyKey); if(!StringUtils.isBlank(request.getParameter("g-recaptcha-response"))) { boolean validateCaptcha = captchaRequestUtils.checkCaptcha(request.getParameter("g-recaptcha-response")); if ( !validateCaptcha ) { LOGGER.debug( "Captcha response does not matched" ); FieldError error = new FieldError("captchaChallengeField","captchaChallengeField",messages.getMessage("validaion.recaptcha.not.matched", locale)); bindingResult.addError(error); } } if ( StringUtils.isNotBlank( customer.getUserName() ) ) { if ( customerFacade.checkIfUserExists( customer.getUserName(), merchantStore ) ) { LOGGER.debug( "Customer with username {} already exists for this store ", customer.getUserName() ); FieldError error = new FieldError("userName","userName",messages.getMessage("registration.username.already.exists", locale)); bindingResult.addError(error); } userName = customer.getUserName(); } if ( StringUtils.isNotBlank( customer.getPassword() ) && StringUtils.isNotBlank( customer.getCheckPassword() )) { if (! customer.getPassword().equals(customer.getCheckPassword()) ) { FieldError error = new FieldError("password","password",messages.getMessage("message.password.checkpassword.identical", locale)); bindingResult.addError(error); } password = customer.getPassword(); } if ( bindingResult.hasErrors() ) { LOGGER.debug( "found {} validation error while validating in customer registration ", bindingResult.getErrorCount() ); StringBuilder template = new StringBuilder().append( ControllerConstants.Tiles.Customer.register ).append( "." ).append( merchantStore.getStoreTemplate() ); return template.toString(); } @SuppressWarnings( "unused" ) CustomerEntity customerData = null; try { //set user clear password customer.setPassword(password); customerData = customerFacade.registerCustomer( customer, merchantStore, language ); } catch ( Exception e ) { LOGGER.error( "Error while registering customer.. ", e); ObjectError error = new ObjectError("registration",messages.getMessage("registration.failed", locale)); bindingResult.addError(error); StringBuilder template = new StringBuilder().append( ControllerConstants.Tiles.Customer.register ).append( "." ).append( merchantStore.getStoreTemplate() ); return template.toString(); } try { /** * Send registration email */ emailTemplatesUtils.sendRegistrationEmail( customer, merchantStore, locale, request.getContextPath() ); } catch(Exception e) { LOGGER.error("Cannot send email to customer ",e); } /** * Login user */ try { //refresh customer Customer c = customerFacade.getCustomerByUserName(customer.getUserName(), merchantStore); //authenticate customerFacade.authenticate(c, userName, password); super.setSessionAttribute(Constants.CUSTOMER, c, request); StringBuilder cookieValue = new StringBuilder(); cookieValue.append(merchantStore.getCode()).append("_").append(c.getNick()); //set username in the cookie Cookie cookie = new Cookie(Constants.COOKIE_NAME_USER, cookieValue.toString()); cookie.setMaxAge(60 * 24 * 3600); cookie.setPath(Constants.SLASH); response.addCookie(cookie); String sessionShoppingCartCode= (String)request.getSession().getAttribute( Constants.SHOPPING_CART ); if(!StringUtils.isBlank(sessionShoppingCartCode)) { ShoppingCart shoppingCart = customerFacade.mergeCart( c, sessionShoppingCartCode, merchantStore, language ); ShoppingCartData shoppingCartData=this.populateShoppingCartData(shoppingCart, merchantStore, language); if(shoppingCartData !=null) { request.getSession().setAttribute(Constants.SHOPPING_CART, shoppingCartData.getCode()); } //set username in the cookie Cookie c1 = new Cookie(Constants.COOKIE_NAME_CART, shoppingCartData.getCode()); c1.setMaxAge(60 * 24 * 3600); c1.setPath(Constants.SLASH); response.addCookie(c1); } return "redirect:/shop/customer/dashboard.html"; } catch(Exception e) { LOGGER.error("Cannot authenticate user ",e); ObjectError error = new ObjectError("registration",messages.getMessage("registration.failed", locale)); bindingResult.addError(error); } StringBuilder template = new StringBuilder().append( ControllerConstants.Tiles.Customer.register ).append( "." ).append( merchantStore.getStoreTemplate() ); return template.toString(); } @ModelAttribute("countryList") public List<Country> getCountries(final HttpServletRequest request){ Language language = (Language) request.getAttribute( "LANGUAGE" ); try { if ( language == null ) { language = (Language) request.getAttribute( "LANGUAGE" ); } if ( language == null ) { language = languageService.getByCode( Constants.DEFAULT_LANGUAGE ); } List<Country> countryList=countryService.getCountries( language ); return countryList; } catch ( ServiceException e ) { LOGGER.error( "Error while fetching country list ", e ); } return Collections.emptyList(); } @ModelAttribute("zoneList") public List<Zone> getZones(final HttpServletRequest request){ return zoneService.list(); } private ShoppingCartData populateShoppingCartData(final ShoppingCart cartModel , final MerchantStore store, final Language language){ ShoppingCartDataPopulator shoppingCartDataPopulator = new ShoppingCartDataPopulator(); shoppingCartDataPopulator.setShoppingCartCalculationService( shoppingCartCalculationService ); shoppingCartDataPopulator.setPricingService( pricingService ); try { return shoppingCartDataPopulator.populate( cartModel , store, language); } catch ( ConversionException ce ) { LOGGER.error( "Error in converting shopping cart to shopping cart data", ce ); } return null; } }
[ "mercyblitz@gmail.com" ]
mercyblitz@gmail.com
36192782dbdd514ada76ec7db43347830e88fa7f
8ffb161ff168ef9430770a393a3d8d42bafd5681
/demoselenium3plus/src/test/java/demoselenium3plus/workingwithSet.java
134055237d030a4b8eac4c850d797e65b60834cb
[]
no_license
MadhaniB/Selenium3Plus
83e0fa310828a1e56ba5b5af97ff45b28f14f593
356d969bfd6a03310f102aa02e321d8722223581
refs/heads/master
2020-03-29T01:42:17.226852
2018-09-19T06:21:32
2018-09-19T06:21:32
149,402,048
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package demoselenium3plus; import java.util.HashSet; import java.util.Set; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import javax.swing.text.html.HTMLDocument.Iterator; public class workingwithSet { }
[ "A07208trng_B4A.04.28@BDC4-D-5ST0RG2.dir.svc.accenture.com" ]
A07208trng_B4A.04.28@BDC4-D-5ST0RG2.dir.svc.accenture.com
d2ff3876071e839c58e00512895b1a0264688f7e
12f47deaf44c525ca5c824ece79ec5339cc6a211
/DoglianiMatteoVerifica/src/Ata.java
25ee55e3be0520773018faf8a4954cd175bf5ee8
[]
no_license
MatteoDogliani/DoglianiMatteoVerifica
2178785f727ad2cc0c12bab22e20594923af6cc5
d7199bf3297028429295846da49dc8c9d1c57033
refs/heads/main
2023-03-21T05:08:16.292605
2021-03-03T08:55:31
2021-03-03T08:55:31
344,031,517
0
0
null
null
null
null
UTF-8
Java
false
false
905
java
public class Ata extends Persona{ private String inquadr; private String cogn; private String nome; private String cod_fis; private String data; public Ata (String cogn, String nome, String cod_fis, String data, String inquadr) { super(cogn, nome,cod_fis, data); this.inquadr= inquadr; } public String getInquadr() { return inquadr; } public void setInquadr(String inquadr) { this.inquadr = inquadr; } public String getCogn() { return cogn; } public void setCogn(String cogn) { this.cogn = cogn; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getCod_fis() { return cod_fis; } public void setCod_fis(String cod_fis) { this.cod_fis = cod_fis; } public String getData() { return data; } public void setData(String data) { this.data = data; } }
[ "m.dogliani@PC-INFO3-13.liceo.local" ]
m.dogliani@PC-INFO3-13.liceo.local
9ff8e0b8762f8b9ce8121bc1fa7430248f1da014
2c80aa752c98f75ebaa277f0cae8d03059f69367
/src/main/java/com/koowakchai/store/service/impl/TLogisticsOrderServiceImpl.java
b25b259e27bc9750e292d41c644f1393c8586ac9
[]
no_license
xuzhe0205/koowakchai-platform-springmvc
d32017af63beb4cde65606db24635a07dc03e830
5420a508a3f055f6e70aa710c9c0d001e90a0c0e
refs/heads/master
2022-12-25T23:28:23.307355
2020-04-05T22:15:12
2020-04-05T22:15:12
209,697,348
0
0
null
2022-12-16T10:32:08
2019-09-20T03:27:25
Java
UTF-8
Java
false
false
3,060
java
package com.koowakchai.store.service.impl; import com.koowakchai.common.email.AnnexEMailService; import com.koowakchai.hibernate.entity.TLogisticsCompanyEntity; import com.koowakchai.hibernate.entity.TLogisticsOrderEntity; import com.koowakchai.hibernate.entity.TTotalOrderEntity; import com.koowakchai.store.dao.TLogisticsCompanyDao; import com.koowakchai.store.dao.TLogisticsOrderDao; import com.koowakchai.store.dao.TTotalOrderDao; import com.koowakchai.store.service.StoreEmailService; import com.koowakchai.store.service.TLogisticsOrderService; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set; @Service public class TLogisticsOrderServiceImpl implements TLogisticsOrderService { @Autowired private TLogisticsCompanyDao tLogisticsCompanyDao; @Autowired private TLogisticsOrderDao tLogisticsOrderDao; @Autowired private TTotalOrderDao tTotalOrderDao; @Autowired private StoreEmailService storeEmailService; @Override public void addShippingOrders(List<Long> orderIds, int logisticsComapnyId) throws Exception { String trackingNumber = RandomStringUtils.randomAlphanumeric(12).toUpperCase(); Set<TTotalOrderEntity> tTotalOrderEntitySet = new HashSet<>(); TLogisticsCompanyEntity tLogisticsCompanyEntity = tLogisticsCompanyDao.getTLogisticsCompanyEntity(logisticsComapnyId); for (long orderId : orderIds){ // TLogisticsOrderEntity tLogisticsOrderEntity = new TLogisticsOrderEntity(); // tLogisticsOrderEntity.setLogisticsCompany(tLogisticsCompanyEntity.getCompanyName()); // tLogisticsOrderEntity.setStaffPhone(tLogisticsCompanyEntity.getStaffPhone()); // tLogisticsOrderEntity.setTrackingNumber(trackingNumber); // long logisticsId = tLogisticsOrderDao.addShippingOrders(tLogisticsOrderEntity); Date dt = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String currentTime = sdf.format(dt); Timestamp ts = Timestamp.valueOf(currentTime) ; tTotalOrderDao.updateShippingTotalOrderEntity(orderId, trackingNumber, ts, "shipped"); tTotalOrderEntitySet.add(tTotalOrderDao.getTTotalOrderEntity(orderId)); } TLogisticsOrderEntity tLogisticsOrderEntity = new TLogisticsOrderEntity(); tLogisticsOrderEntity.settTotalOrderEntitySet(tTotalOrderEntitySet); tLogisticsOrderEntity.setTrackingNumber(trackingNumber); tLogisticsOrderEntity.setLogisticsCompany(tLogisticsCompanyEntity.getCompanyName()); tLogisticsOrderEntity.setStaffPhone(tLogisticsCompanyEntity.getStaffPhone()); tLogisticsOrderDao.addShippingOrders(tLogisticsOrderEntity); storeEmailService.sendConfirmationEmail(orderIds); } }
[ "xuzhe1@genomics.cn" ]
xuzhe1@genomics.cn
4afe31294476f37d0094a600e58bed786715d7af
4359cc4eb26427dd532928b3e5a0339a8a0abdec
/gen-source/gen/example/jooq/tables/SalesByStore.java
56e82af4a3c800d0f90b276ed65f7895ac9100a2
[ "MIT" ]
permissive
bjansen/ceylon-jooq-example
a979b6ee6058a5977882fb9abac63d5cb927b4d4
b6a1b7baeb823eb594babe91776036b3821b6c28
refs/heads/master
2021-06-08T20:40:07.431719
2017-07-18T20:07:42
2017-07-18T20:07:42
40,964,883
3
3
null
2017-08-17T22:32:30
2015-08-18T10:07:17
Java
UTF-8
Java
false
false
2,607
java
/** * This class is generated by jOOQ */ package gen.example.jooq.tables; import ceylon.language.String; import com.github.bjansen.ceylon.jooqadapter.StringConverter; import gen.example.jooq.Sakila; import gen.example.jooq.tables.records.SalesByStoreRecord; import java.math.BigDecimal; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Table; import org.jooq.TableField; import org.jooq.impl.TableImpl; /** * VIEW */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.6.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class SalesByStore extends TableImpl<SalesByStoreRecord> { private static final long serialVersionUID = 1282661376; /** * The reference instance of <code>sakila.sales_by_store</code> */ public static final SalesByStore salesByStore = new SalesByStore(); /** * The class holding records for this type */ @Override public Class<SalesByStoreRecord> getRecordType() { return SalesByStoreRecord.class; } /** * The column <code>sakila.sales_by_store.store</code>. */ public final TableField<SalesByStoreRecord, String> store = createField("store", org.jooq.impl.SQLDataType.VARCHAR.length(101), this, "", new StringConverter()); /** * The column <code>sakila.sales_by_store.manager</code>. */ public final TableField<SalesByStoreRecord, String> manager = createField("manager", org.jooq.impl.SQLDataType.VARCHAR.length(91), this, "", new StringConverter()); /** * The column <code>sakila.sales_by_store.total_sales</code>. */ public final TableField<SalesByStoreRecord, BigDecimal> totalSales = createField("total_sales", org.jooq.impl.SQLDataType.DECIMAL.precision(27, 2), this, ""); /** * Create a <code>sakila.sales_by_store</code> table reference */ public SalesByStore() { this("sales_by_store", null); } /** * Create an aliased <code>sakila.sales_by_store</code> table reference */ public SalesByStore(java.lang.String alias) { this(alias, salesByStore); } private SalesByStore(java.lang.String alias, Table<SalesByStoreRecord> aliased) { this(alias, aliased, null); } private SalesByStore(java.lang.String alias, Table<SalesByStoreRecord> aliased, Field<?>[] parameters) { super(alias, Sakila.sakila, aliased, parameters, "VIEW"); } /** * {@inheritDoc} */ @Override public SalesByStore as(java.lang.String alias) { return new SalesByStore(alias, this); } /** * Rename this table */ public SalesByStore rename(java.lang.String name) { return new SalesByStore(name, null); } }
[ "bastien.jansen@gmx.com" ]
bastien.jansen@gmx.com
1bcc6066a5dc23675b39d372c714ce8a08f39e9d
1f60e5770b84da8b5c2bfba842a2051c4fb7665d
/src/main/java/de/embl/schwab/crosshair/targetingaccuracy/AccuracyBdvBehaviours.java
4038cb60d4ae57b5b1c551073803b5987a25a751
[ "MIT" ]
permissive
automated-ultramicrotomy/crosshair
a3e729af90efbea7e873e778da9dcb4a07ca9093
ac6a6a82c6166a0b62f236899b90fa8fee8e8e13
refs/heads/master
2023-08-31T18:01:21.124034
2023-08-13T17:19:14
2023-08-13T17:19:14
272,431,908
1
0
MIT
2023-08-13T17:19:16
2020-06-15T12:24:35
Java
UTF-8
Java
false
false
4,726
java
package de.embl.schwab.crosshair.targetingaccuracy; import bdv.util.BdvHandle; import de.embl.cba.bdv.utils.popup.BdvPopupMenus; import de.embl.schwab.crosshair.Crosshair; import de.embl.schwab.crosshair.plane.Plane; import de.embl.schwab.crosshair.plane.PlaneManager; import ij.IJ; import net.imglib2.realtransform.AffineTransform3D; import org.scijava.ui.behaviour.ClickBehaviour; import org.scijava.ui.behaviour.io.InputTriggerConfig; import org.scijava.ui.behaviour.util.Behaviours; import static de.embl.schwab.crosshair.utils.BdvUtils.flipCurrentView; public class AccuracyBdvBehaviours { private final BdvHandle bdvHandle; private final PlaneManager planeManager; public AccuracyBdvBehaviours( BdvHandle bdvHandle, PlaneManager planeManager ) { this.bdvHandle = bdvHandle; this.planeManager = planeManager; installBehaviours(); } private void addPointBehaviour() { if ( planeManager.isTrackingPlane() ) { IJ.log("Can't change points when tracking a plane"); } else { if ( !planeManager.checkNamedPlaneExists( TargetingAccuracy.afterBlock ) ) { planeManager.addPlane( TargetingAccuracy.afterBlock ); } planeManager.getPointsToFitPlaneDisplay( TargetingAccuracy.afterBlock ).addOrRemoveCurrentPositionFromPointsToFitPlane(); } } private void addVertexBehaviour() { if ( planeManager.isTrackingPlane() ) { IJ.log("Can't change points when tracking a plane"); } else if ( !planeManager.checkNamedPlaneExistsAndOrientationIsSet( TargetingAccuracy.beforeTarget )) { IJ.log("Before target plane doesn't exist - vertices must lie on this plane!"); } else { Plane blockPlane = planeManager.getPlane( TargetingAccuracy.beforeTarget ); planeManager.getVertexDisplay( TargetingAccuracy.beforeTarget ).addOrRemoveCurrentPositionFromVertices( blockPlane ); } } private void addFitToPointsBehaviour() { if ( planeManager.isTrackingPlane() && planeManager.getTrackedPlaneName().equals( TargetingAccuracy.afterBlock ) ) { IJ.log("Can't fit to points when tracking after block plane"); } else { if ( planeManager.checkNamedPlaneExists( TargetingAccuracy.afterBlock ) ) { planeManager.fitToPoints(TargetingAccuracy.afterBlock); } } } private void addFlipViewBehaviour() { if ( planeManager.isTrackingPlane() ) { IJ.log("Can't flip view while tracking a plane."); } else { flipCurrentView( bdvHandle ); } } private void installBehaviours() { final Behaviours behaviours = new Behaviours(new InputTriggerConfig()); behaviours.install( bdvHandle.getTriggerbindings(), "accuracy" ); bdvHandle.getViewerPanel().addTransformListener(new bdv.viewer.TransformListener<AffineTransform3D>() { @Override public void transformChanged(AffineTransform3D affineTransform3D) { if ( planeManager.isTrackingPlane() ) { planeManager.updatePlaneOnTransformChange( affineTransform3D, planeManager.getTrackedPlaneName() ); } } }); behaviours.behaviour( ( ClickBehaviour ) ( x, y ) -> { if ( planeManager.isInPointMode() ) { addPointBehaviour(); } else if ( planeManager.isInVertexMode() ) { addVertexBehaviour(); } }, "Left Click behaviours", "button1" ); BdvPopupMenus.addAction(bdvHandle, "Toggle Point Mode", ( x, y ) -> { if ( !planeManager.isInPointMode() ) { if ( planeManager.isInVertexMode() ) { planeManager.setVertexMode( false ); } planeManager.setPointMode( true ); } else { planeManager.setPointMode( false ); } }); BdvPopupMenus.addAction(bdvHandle, "Toggle Target Vertex Mode", ( x, y ) -> { if ( !planeManager.isInVertexMode() ) { if ( planeManager.isInPointMode() ) { planeManager.setPointMode( false ); } planeManager.setVertexMode( true ); } else { planeManager.setVertexMode( false ); } }); BdvPopupMenus.addAction(bdvHandle, "Fit To Points", ( x, y ) -> { addFitToPointsBehaviour(); }); BdvPopupMenus.addAction(bdvHandle, "Flip view", ( x, y ) -> { addFlipViewBehaviour(); }); } }
[ "kimberly.meechan@embl.de" ]
kimberly.meechan@embl.de
a7005748602d85cb1ab82f93c922ad02231dbb99
9cf81bdff866cb5fa3a5a3ffd9cc7a144e4d3495
/abstract-factory/src/java/br/com/fiap/dp/abstractfactory/dao/rdb/HsqldbCountryDAO.java
5c0db7d52e985ee6a2da2498dbbe7e509735f623
[]
no_license
madruga81/Design-Pattern-Development
f49f596f6c78d68f845a6ecf04fba44e0af6df2d
cafdbaa59062219adce910a9b5c07f14261cc1c1
refs/heads/master
2021-01-23T18:08:09.790871
2017-02-24T02:39:59
2017-02-24T02:39:59
82,992,705
0
0
null
null
null
null
UTF-8
Java
false
false
2,328
java
package br.com.fiap.dp.abstractfactory.dao.rdb ; import java.sql.Connection ; import java.sql.PreparedStatement ; import java.sql.ResultSet ; import java.sql.SQLException ; import java.sql.Statement ; import java.util.HashSet ; import java.util.Set ; import br.com.fiap.dp.abstractfactory.ReportException ; import br.com.fiap.dp.abstractfactory.dao.CountryDAO ; import br.com.fiap.dp.abstractfactory.domain.Country ; public class HsqldbCountryDAO implements CountryDAO { private static final String GET_COUNTRIES = "select NM_COUNTRY from COUNTRY" ; private static final String GET_COUNTRY_BY_NAME = "select NM_COUNTRY from COUNTRY where NM_COUNTRY = ?" ; public HsqldbCountryDAO( ) { super( ) ; } public Set getCountries( ) { Set result = new HashSet( ) ; Connection conn = null ; Statement stmt = null ; ResultSet rset = null ; try { conn = HsqldbHelper.getDataSource( ).getConnection( ) ; stmt = conn.createStatement( ) ; rset = stmt.executeQuery( GET_COUNTRIES ) ; while (rset.next( )) { String countryName = rset.getString( 1 ) ; Country country = new Country( countryName ) ; result.add( country ) ; } } catch (SQLException sqle) { throw new ReportException( "SQL error querying database", sqle ) ; } finally { try { rset.close( ) ; } catch (Exception e) { } try { stmt.close( ) ; } catch (Exception e) { } try { conn.close( ) ; } catch (Exception e) { } } return result ; } public Country getCountry( String name ) { Connection conn = null ; PreparedStatement stmt = null ; ResultSet rset = null ; try { conn = HsqldbHelper.getDataSource( ).getConnection( ) ; stmt = conn.prepareStatement( GET_COUNTRY_BY_NAME ) ; stmt.setString( 1, name ) ; rset = stmt.executeQuery( ) ; if (rset.next( )) { String countryName = rset.getString( 1 ) ; return new Country( countryName ) ; } } catch (SQLException sqle) { throw new ReportException( "SQL error querying database", sqle ) ; } finally { try { rset.close( ) ; } catch (Exception e) { } try { stmt.close( ) ; } catch (Exception e) { } try { conn.close( ) ; } catch (Exception e) { } } return null ; } }
[ "1267991@SOAM.TCS.com" ]
1267991@SOAM.TCS.com
883a802a44225fd1d095969e291198a3112a88af
cbb73601d36bb85d4c2c5e431a42e2978f73cbd4
/Number121.java
b43df39aa756d198eabfa4e1d0558c901850d05f
[]
no_license
enrikkoo/Some_Java_Practice
56245a4480e3504f88eb5614c7613ff7d500e254
a597fc067b3803be9a17c2e6ac52aed6a3a6b8f5
refs/heads/master
2020-12-26T23:45:03.430423
2020-05-09T13:51:41
2020-05-09T13:51:41
237,692,168
0
0
null
2020-10-13T21:09:31
2020-02-01T23:23:24
Java
UTF-8
Java
false
false
592
java
package Practice; public class Number121 { public static int maxProfit(int[] prices) { int maxProfit = 0; for (int i =0;i<prices.length;i++){ for (int j =i;j<prices.length;j++){ int profit = (prices[i]-prices[j])*(-1); if (profit>maxProfit){ maxProfit = profit; } } } return maxProfit; } public static void main(String[] args) { int[] prices = {7,1,5,3,6,4}; System.out.println(maxProfit(prices)); } }
[ "noreply@github.com" ]
enrikkoo.noreply@github.com
f8d2524b47648645c662aa01d135f9627b354248
4e832f69e7baa9c4faae84e1f66be7a16432210e
/src/main/java/cn/bdqn/photography/shootuser/mapper/ShootRoleMapper.java
9221bb4b2fabda41373d690fb0c6362d35fa4485
[]
no_license
fwh744877953/shoot-1
28c31ff3aab9cdc721e9d4eaa25b6c7d2975779f
582521ccdda6bab9927e41cfb849bdf1725ca797
refs/heads/master
2021-03-10T12:08:21.511478
2020-03-11T01:36:20
2020-03-11T01:36:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
309
java
package cn.bdqn.photography.shootuser.mapper; import cn.bdqn.photography.shootuser.entity.ShootRole; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * Mapper 接口 * </p> * * @author jobob * @since 2020-01-15 */ public interface ShootRoleMapper extends BaseMapper<ShootRole> { }
[ "jyk18339281537@163.com" ]
jyk18339281537@163.com
cd9c26dbdd6752dbb3982a5e7d299bf7cea0189e
4771edd416f5e3f8cfc99f6652de4e761f61429b
/AndroidArtSearchC6/chaptersix/app/src/main/java/startimes/com/chaptersix/MainActivity.java
9a5c7c2fa7db474a38d60ddf68004ea7d38bf3b0
[]
no_license
HotBloodMan/CommonCode
26453bc3ba325663be78d4dd4a5afc83e60285d1
3198b2b48da39b21e7295c0bf6db5aac7db18622
refs/heads/master
2020-05-21T23:55:22.128001
2016-12-04T07:11:17
2016-12-04T07:11:17
62,364,448
6
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
package startimes.com.chaptersix; import android.app.Activity; import android.graphics.Color; import android.graphics.drawable.ClipDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.ScaleDrawable; import android.graphics.drawable.TransitionDrawable; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ImageView; import android.widget.TextView; public class MainActivity extends Activity { private static final String TAG = "MainActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView textView = (TextView) findViewById(R.id.test_size); Drawable drawable = textView.getBackground(); Log.e(TAG, "bg:" + drawable + "w:" + drawable.getIntrinsicWidth() + "h:" + drawable.getIntrinsicWidth()); } public void onButtonClick(View v) { } @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if(hasFocus){ //test transition View v = findViewById(R.id.test_transition); TransitionDrawable drawable = (TransitionDrawable) v.getBackground(); drawable.startTransition(1000); //test scale View testScale = findViewById(R.id.test_scale); ScaleDrawable testScaleBackground = (ScaleDrawable) testScale.getBackground(); testScaleBackground.setLevel(10); //test clip ImageView testClip = (ImageView) findViewById(R.id.test_clip); ClipDrawable testClipDrawable = (ClipDrawable) testClip.getDrawable(); testClipDrawable.setLevel(8000); //test custom drawable View testCustomDrawable = findViewById(R.id.test_custom_drawable); CustomDrawable customDrawable = new CustomDrawable(Color.parseColor("#0ac39e")); testCustomDrawable.setBackgroundDrawable(customDrawable); } } }
[ "18303011272@163.com" ]
18303011272@163.com
9ee46a9959eb14aca3cf1363aa7cb37ac8640544
4c5dc76fd46354d89821e7a95ff08c2914f5f5b4
/src/main/java/ru/asd/gradletest/entity/UserRole.java
d83cfddfa5708bda872e6ad8b4c138c44e1c6ed8
[]
no_license
asdne/gradleTest
5c9ceb82039aa64c4ff1a0694a2ef46940004eb9
5d6179be94109ba1f12f5b23aa350880cc90e0e8
refs/heads/master
2020-05-31T12:14:16.088378
2019-06-19T10:50:15
2019-06-19T10:50:15
190,276,463
0
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package ru.asd.gradletest.entity; public class UserRole { @Override public String toString() { return role; } private Long id; private String role; /* public Set<User> getUsers() { return users; }*/ /* public void setUsers(Set<User> users) { this.users = users; }*/ /* @ManyToMany (fetch = FetchType.EAGER,mappedBy = "roles",cascade = CascadeType.PERSIST ) private Set<User> users; */ public Long getId() { return id; } public UserRole(String role) { this.role = role; } public void setId(Long id) { this.id = id; } public String getRole() { return role; } public void setRole(String role) { this.role = role; } public UserRole() { } @Override public boolean equals(Object obj) { boolean result=false; if (obj == null || obj.getClass() != getClass()) { result = false; } else { UserRole userRole = (UserRole) obj; if (this.role == userRole.getRole()) { result = true; } } return result; } }
[ "asd555@gmail.com" ]
asd555@gmail.com
7be1d2db68ecb5a6b84782cf535dddacf9f54633
5c388c5496617c92a2a71060c2bde31052a06685
/testXMLStreaming/src/main/java/examples/StAX/testReadXML.java
7d9fb390c3f816912520d05525560f6916174b66
[]
no_license
kothapet/testJavaProjects
c6c1064d81a5cae94e03390dbccfebf5e5a6c8ed
e35a1e20431d34d91f4d3c543f44004e6e2a4fab
refs/heads/master
2020-04-15T05:55:40.676269
2019-10-29T22:11:48
2019-10-29T22:11:48
164,442,071
0
0
null
null
null
null
UTF-8
Java
false
false
6,127
java
package examples.StAX; import java.io.FileReader; import javax.xml.stream.*; /** */ public class testReadXML { private static String filename = null; private static void printUsage() { System.out.println("usage: java examples.basic.Parse <xmlfile>"); } public static void main(String[] args) throws Exception { try { String inputDir = "C:/EclipseNeonWorkSpace/OmniXML/data/"; String inputFile = "omnilogsubset.txt"; //String inputDir = "C:/EclipseNeonWorkSpace/OmniXML/omni_data/"; //String inputFile = "omnilog20181212-135913.xml"; //String inputDir = "C:/EclipseNeonWorkSpace/OmniXML/omni_data/OmniXML/In/"; //String inputFile = "PLPL.xml"; // filename = args[0]; // filename = args[1]; filename = inputDir + inputFile; } catch (ArrayIndexOutOfBoundsException aioobe) { printUsage(); System.exit(0); } XMLInputFactory xmlInFactory = XMLInputFactory.newInstance(); System.out.println("FACTORY: " + xmlInFactory); XMLStreamReader xmlReader = xmlInFactory.createXMLStreamReader(new FileReader(filename)); System.out.println("READER: " + xmlReader + "\n"); while (xmlReader.hasNext()) { printEvent(xmlReader); xmlReader.next(); } xmlReader.close(); } private static void printEvent(XMLStreamReader xmlReader) { System.out.print("EVENT: " + getEventString(xmlReader.getEventType()) + " :[" + xmlReader.getLocation().getLineNumber() + "][" + xmlReader.getLocation().getColumnNumber() + "] "); System.out.print(" ["); switch (xmlReader.getEventType()) { case XMLStreamConstants.START_ELEMENT: System.out.print("<"); printName(xmlReader); printNamespaces(xmlReader); printAttributes(xmlReader); System.out.print(">"); break; case XMLStreamConstants.END_ELEMENT: System.out.print("</"); printName(xmlReader); System.out.print(">"); break; case XMLStreamConstants.SPACE: case XMLStreamConstants.CHARACTERS: int start = xmlReader.getTextStart(); int length = xmlReader.getTextLength(); System.out.print(new String(xmlReader.getTextCharacters(), start, length)); break; case XMLStreamConstants.PROCESSING_INSTRUCTION: System.out.print("<?"); if (xmlReader.hasText()) System.out.print(xmlReader.getText()); System.out.print("?>"); break; case XMLStreamConstants.CDATA: System.out.print("<![CDATA["); start = xmlReader.getTextStart(); length = xmlReader.getTextLength(); System.out.print(new String(xmlReader.getTextCharacters(), start, length)); System.out.print("]]>"); break; case XMLStreamConstants.COMMENT: System.out.print("<!--"); if (xmlReader.hasText()) System.out.print(xmlReader.getText()); System.out.print("-->"); break; case XMLStreamConstants.ENTITY_REFERENCE: System.out.print(xmlReader.getLocalName() + "="); if (xmlReader.hasText()) System.out.print("[" + xmlReader.getText() + "]"); break; case XMLStreamConstants.START_DOCUMENT: System.out.print("<?xml"); System.out.print(" version='" + xmlReader.getVersion() + "'"); System.out.print(" encoding='" + xmlReader.getCharacterEncodingScheme() + "'"); if (xmlReader.isStandalone()) System.out.print(" standalone='yes'"); else System.out.print(" standalone='no'"); System.out.print("?>"); break; } System.out.println("]"); } private static String getEventString(int eventTypeC) { String eventTypeStr = ""; switch (eventTypeC) { case XMLStreamConstants.START_ELEMENT: eventTypeStr = "START_ELEMENT"; break; case XMLStreamConstants.END_ELEMENT: eventTypeStr = "END_ELEMENT"; break; case XMLStreamConstants.SPACE: eventTypeStr = "SPACE"; break; case XMLStreamConstants.CHARACTERS: eventTypeStr = "CHARACTERS"; break; case XMLStreamConstants.PROCESSING_INSTRUCTION: eventTypeStr = "PROCESSING_INSTRUCTION"; break; case XMLStreamConstants.CDATA: eventTypeStr = "CDATA"; break; case XMLStreamConstants.COMMENT: eventTypeStr = "COMMENT"; break; case XMLStreamConstants.ENTITY_REFERENCE: eventTypeStr = "ENTITY_REFERENCE"; break; case XMLStreamConstants.START_DOCUMENT: eventTypeStr = "START_DOCUMENT"; break; } return eventTypeStr; } private static void printName(XMLStreamReader xmlReader) { if (xmlReader.hasName()) { String prefix = xmlReader.getPrefix(); String uri = xmlReader.getNamespaceURI(); String localName = xmlReader.getLocalName(); printName(prefix, uri, localName); } } private static void printName(String prefix, String uri, String localName) { if (uri != null && !("".equals(uri))) System.out.print("['" + uri + "']:"); if (prefix != null && !("".equals(prefix))) System.out.print(prefix + ":"); if (localName != null) System.out.print(localName); } private static void printAttributes(XMLStreamReader xmlReader) { for (int i = 0; i < xmlReader.getAttributeCount(); i++) { printAttribute(xmlReader, i); } } private static void printAttribute(XMLStreamReader xmlReader, int index) { String prefix = xmlReader.getAttributePrefix(index); String namespace = xmlReader.getAttributeNamespace(index); String localName = xmlReader.getAttributeLocalName(index); String value = xmlReader.getAttributeValue(index); System.out.print(" "); printName(prefix, namespace, localName); System.out.print("='" + value + "'"); } private static void printNamespaces(XMLStreamReader xmlReader) { for (int i = 0; i < xmlReader.getNamespaceCount(); i++) { printNamespace(xmlReader, i); } } private static void printNamespace(XMLStreamReader xmlReader, int index) { String prefix = xmlReader.getNamespacePrefix(index); String uri = xmlReader.getNamespaceURI(index); System.out.print(" "); if (prefix == null) System.out.print("xmlns='" + uri + "'"); else System.out.print("xmlns:" + prefix + "='" + uri + "'"); } }
[ "kothapet@hotmail.com" ]
kothapet@hotmail.com
ce74b63473b06fcd234fd59df8f3a2ba05363323
bab9f88869e3c71d6f0445e6f1d64546e6a9f5da
/src/main/java/com/thread/test/patterns/mediator/SeniorEmployee.java
911757d023ee50d0b1012ed3027fcdf315082d4e
[]
no_license
guolei1204/adt
ae6f11be302aae66438f68bbb112c574e7949ade
e04c803b4073beb349bfcc449f489d7d2ad25359
refs/heads/master
2022-05-01T00:26:17.854829
2022-03-17T10:58:53
2022-03-17T10:58:53
136,132,276
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package com.thread.test.patterns.mediator; public class SeniorEmployee extends Employee { public SeniorEmployee(Mediator mediator, String name) { super(mediator); this.name = name; } @Override String employeeType() { return "Senior Employee"; } }
[ "guolei_1204@foxmail.com" ]
guolei_1204@foxmail.com