blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
4f8e23ccf45c1f6896e6066533f3a2197b47d8e4
5f71f084aafc399789a8f614e9dd831e45001ea6
/app/src/main/java/edu/curso/android/appstarships/res/RetrofitClient.java
0dc04fbbd397285453b606a2eda34197ba8c06de
[]
no_license
ElianaOcampo/starships-android-app
8f2dbfedc6a3cf2f984e58e2bc1ea22a5327f6c7
b8c31835c0e8ff3dd1184941baa6c7cf8ddc9e77
refs/heads/master
2020-12-10T18:57:24.616689
2020-01-13T19:56:53
2020-01-13T19:56:53
233,680,602
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
package edu.curso.android.appstarships.res; import android.util.Log; import retrofit2.*; import retrofit2.converter.gson.GsonConverterFactory; public class RetrofitClient { private static Retrofit retrofit; private static final String URL_BASE = "https://swapi.co/api/"; public static Retrofit recuperarRetrofit() { if(retrofit==null) { retrofit = new retrofit2.Retrofit.Builder().baseUrl(URL_BASE).addConverterFactory(GsonConverterFactory.create()).build(); } return retrofit; } }
[ "eliana.ocampo@uala.com.ar" ]
eliana.ocampo@uala.com.ar
77eabc61d8430149fa4494bb361c4ebf91bae075
6b59d73858048da73cdb544d8d0875fbcf11ca6d
/dts-common/src/main/java/com/le/dts/com/caucho/hessian/io/AbstractListDeserializer.java
f77c60f23d9ab21af158e2b92e2a4bc784f20c0c
[]
no_license
suzuizui/dts-all
e63c2a901ca8c473faa9c490fe014089fb39d018
605b51b6ad53bc05871ee4755af4f19052eadea1
refs/heads/master
2021-01-01T19:50:20.484429
2017-07-29T03:20:59
2017-07-29T03:21:01
98,704,868
2
1
null
null
null
null
UTF-8
Java
false
false
2,808
java
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Caucho Technology (http://www.caucho.com/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Hessian", "Resin", and "Caucho" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * info@caucho.com. * * 5. Products derived from this software may not be called "Resin" * nor may "Resin" appear in their names without prior written * permission of Caucho Technology. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS * 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. * * @author Scott Ferguson */ package com.le.dts.com.caucho.hessian.io; import java.io.IOException; /** * Deserializing a JDK 1.2 Collection. */ public class AbstractListDeserializer extends AbstractDeserializer { public Object readObject(AbstractHessianInput in) throws IOException { Object obj = in.readObject(); if (obj != null) throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")"); else throw error("expected list at null"); } }
[ "shangqiit@foxmail.com" ]
shangqiit@foxmail.com
c327c7ee6ad4a4476d6d9982fdcd21f6b093a266
322720a96f12bbe15ad7f470b84a85a2df85cf3f
/app/src/main/java/com/example/android/flickrbrowser/MainActivity.java
e1cec5db94a1697368cf703a8b9de9fc37a23949
[]
no_license
yishaycooper/FlickrBrowser
e2ecf8ac0c90755efb6e9a3e4dddda18d552a0bb
6000e578bf10c5088f88811d549ab8b67abe14d7
refs/heads/master
2020-03-15T20:30:33.944446
2018-05-06T11:59:52
2018-05-06T11:59:52
132,334,207
0
0
null
null
null
null
UTF-8
Java
false
false
4,185
java
package com.example.android.flickrbrowser; import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; import java.util.ArrayList; import java.util.List; public class MainActivity extends BaseActivity implements GetFlickrJsonData.OnDataAvailable, RecycletItemClickListener.OnRecyclerClickListener { private static final String TAG = "MainActivity"; private FlickrRecyclerViewAdapter mFlickrRecyclerViewAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // uses the method in BaseActivity to diable toolbar home button because it doesn't need navigation activateToolbar(false); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.addOnItemTouchListener(new RecycletItemClickListener(this, recyclerView, this)); mFlickrRecyclerViewAdapter = new FlickrRecyclerViewAdapter(this, new ArrayList<Photo>()); recyclerView.setAdapter(mFlickrRecyclerViewAdapter); } // loadin data should be in onResume() because MainActivity is launched after coming back from SearchActivity @Override protected void onResume() { super.onResume(); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); String queryResult = sharedPreferences.getString(FLICKR_QUERY, "");// the first time sharedPreferences will contain an empty string (if statement won't be executed) if (queryResult.length() > 0) { GetFlickrJsonData getFlickrJsonData = new GetFlickrJsonData(this, "https://api.flickr.com/services/feeds/photos_public.gne", "en-us", true); getFlickrJsonData.execute(queryResult);// pass in the query to execute } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); Log.d(TAG, "onCreateOptionsMenu() returned: " + true); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } if (id == R.id.action_search) { Intent intent = new Intent(this, SearchActivity.class); startActivity(intent); return true; } return super.onOptionsItemSelected(item); } @Override public void onDataAvailable(List<Photo> data, DownloadStatus status) { if (status == DownloadStatus.OK) { mFlickrRecyclerViewAdapter.loadNewData(data); } else { Log.e(TAG, "onDataAvailable: failed with status " + status); } } // these two callback methods respond to taps on the recyclerview @Override public void onItemClick(View view, int position) { Toast.makeText(MainActivity.this, "Tap a long press to display a full photo size", Toast.LENGTH_LONG).show(); } @Override public void onItemLongClick(View view, int position) { Intent intent = new Intent(this, PhotoDetailActivity.class); intent.putExtra(PHOTO_TRANSFER, mFlickrRecyclerViewAdapter.getPhoto(position));//get photo at position startActivity(intent); } }
[ "yishaycooper@email.com" ]
yishaycooper@email.com
eb42fa700cd150a08e2760b17fec58cb4977faf2
00d88896decce4f224ca38e257002e76be0ce8df
/src/java/com/wdw/hive/hbase/QPreExecuteHbaseHandler.java
5e95af9a6561fc77a2b9bb44669bb741e0b5f00c
[]
no_license
sevenseablue/hive-hbase-handler
1f4e86708d45f2628fa80235471eccee4e4053c3
720bece55462a7858f0f25640f832501152aca65
refs/heads/master
2021-04-01T19:36:34.410038
2020-03-21T09:13:48
2020-03-21T09:13:48
248,210,022
0
0
null
null
null
null
UTF-8
Java
false
false
3,748
java
package com.wdw.hive.hbase; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext; import org.apache.hadoop.hive.ql.hooks.HookContext; import org.apache.hadoop.hive.ql.hooks.HookContext.HookType; import org.apache.hadoop.hive.ql.hooks.ReadEntity; import org.apache.hadoop.hive.ql.hooks.WriteEntity; import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState.LogHelper; import org.apache.log4j.Logger; import java.io.IOException; import java.util.Map; import java.util.Set; /** * When the hfile is successfully generated, it is moved to hbase in batches * */ public class QPreExecuteHbaseHandler implements ExecuteWithHookContext { private static final Logger LOG = Logger.getLogger(FileSystemUtil.class); boolean iswrite = false; boolean ishivehbasehandler = false; LogHelper console = SessionState.getConsole(); /** * Defines the path of hfile temporary directory */ private String hbasetablename = null; private String hivetablename = null; @Override public void run(HookContext hookContext) throws Exception { assert (hookContext.getHookType() == HookType.POST_EXEC_HOOK); Set<WriteEntity> outputs = hookContext.getOutputs(); this.run(hookContext, outputs); } public void run(HookContext hookContext, Set<WriteEntity> outputs) throws Exception { if (console == null) { return; } getHiveMetaInfo(outputs); if (hivetablename != null && iswrite && ishivehbasehandler) { Configuration sessionConf = SessionState.getSessionConf(); int numParts = 1; try { numParts = HBaseUtils.getTabKeys(hbasetablename).length; } catch (IOException e) { e.printStackTrace(); } sessionConf.set("mapred.reduce.tasks", String.valueOf(numParts)); String partFile = sessionConf.get("mapreduce.totalorderpartitioner.path"); Map<String, String> vars = SessionState.get().getHiveVariables(); String partFileWriteAuto = vars.get("mapreduce.totalorderpartitioner.path.auto"); if (partFileWriteAuto != null && partFileWriteAuto.equals("true")) { try { HBaseUtils.writePartitionFile(sessionConf, partFile, hbasetablename); } catch (IOException e) { e.printStackTrace(); } catch (Throwable throwable) { throwable.printStackTrace(); } } // sessionConf.set("mapreduce.totalorderpartitioner.path", partFile); } } /** * Get hive and hbase table info from meta * * @param outputs This object may be a table, partition, dfs directory or a local directory. */ public void getHiveMetaInfo(Set<WriteEntity> outputs) throws Exception { for (WriteEntity we : outputs) { WriteEntity.WriteType writeType = we.getWriteType(); switch (writeType) { case INSERT: case INSERT_OVERWRITE: { iswrite = true; break; } default: break; } } if (iswrite) { for (WriteEntity we : outputs) { ReadEntity.Type typ = we.getType(); switch (typ) { case TABLE: { Table t = we.getTable(); ishivehbasehandler = isHiveHbaseHandler(t); hbasetablename = t.getProperty(Constant.HBASE_TABLE_NAME); hivetablename = t.getTableName(); break; } default: break; } } } } /** * Returns true iff the table is a HiveHBaseHandler * * @param t * @return */ public boolean isHiveHbaseHandler(Table t) { return t.getStorageHandler() instanceof HBaseStorageHandler; } }
[ "sevenseablue@gmail.com" ]
sevenseablue@gmail.com
f007da8a02e9e3f88a13878ae2e5331f6f127bed
ed8640955823b84cb0a268f66591423dbc62d2e0
/src/main/java/com/springframework/spring5webapp/domain/Author.java
9f58c3d00337e4984e0db3347f75d773769a6b16
[]
no_license
tsaijs/Spring5WebApplication
2051e0d1e45749ac991c15e80eae37c1e41091e6
4f01f688d2003faf28d27e16d34eacd8aafa8636
refs/heads/master
2023-02-17T00:38:57.587613
2021-01-05T20:32:28
2021-01-05T20:32:28
322,098,754
0
0
null
2021-01-05T20:32:30
2020-12-16T20:50:55
Java
UTF-8
Java
false
false
1,718
java
package com.springframework.spring5webapp.domain; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity public class Author { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String firstName; private String lastName; @ManyToMany(mappedBy = "authors") private Set<Book> books = new HashSet<>(); public Author() { } public Author(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public Set<Book> getBooks() { return books; } public void setBooks(Set<Book> books) { this.books = books; } @Override public String toString() { return "Author{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Author author = (Author) o; return id != null ? id.equals(author.id) : author.id == null; } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } }
[ "jonathon@codeparticle.com" ]
jonathon@codeparticle.com
bafbfdaccdd61e221aaefdffd8c7dea6a15ba334
ea9deb97fbd3a5e0c87ac60449dbd659facb64db
/baseio-extend/src/main/java/com/generallycloud/nio/extend/plugin/jms/server/ConsumerQueue.java
9de79d9d09e20be52eb605b5e6426bb2a4a5646b
[]
no_license
DONGXUE1/baseio
a16f44a1da7d66fcd7991ce601ec0886269251bb
0aaed42b625cc41e6f1b5c42f372b8c6006f045b
refs/heads/master
2021-01-13T09:26:58.125086
2017-10-24T14:15:55
2017-10-24T14:15:55
72,083,553
0
0
null
2016-10-27T07:41:18
2016-10-27T07:41:17
null
UTF-8
Java
false
false
296
java
package com.generallycloud.nio.extend.plugin.jms.server; import java.util.List; public interface ConsumerQueue { public abstract int size(); public abstract void offer(Consumer consumer); public abstract void remove(Consumer consumer); public abstract List<Consumer> getSnapshot(); }
[ "8738115@qq.com" ]
8738115@qq.com
04e472be0533a8bcc53e7cc2221ba4327ce435cf
7662bb9e4c775591420e3d92e5363915a21b027a
/src/main/java/com/robertsawyer/task/luhn/controller/CheckedNumberController.java
783d99684a75e63bf7ba2797dd1b7218b4281316
[]
no_license
Robert-Sawyer/AlgorithmTask
5841cbee3d172ff12485190f144e941e3a47ea68
2391e66f47df88d0a07cb0d9114b87224ce0d8f9
refs/heads/master
2020-11-24T08:20:14.067795
2019-12-15T15:00:28
2019-12-15T15:00:28
228,047,957
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.robertsawyer.task.luhn.controller; import com.robertsawyer.task.luhn.service.NumberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @Controller public class CheckedNumberController { @Autowired private NumberService numberService; public CheckedNumberController(NumberService numberService) { this.numberService = numberService; } @GetMapping("/checked") public String showCheckedNumber(Model model) { model.addAttribute("showNumber", numberService.getLastNumber()); return "/checked"; } }
[ "robert.olbrychowski@hotmail.com" ]
robert.olbrychowski@hotmail.com
da81ab282f17e28327ebed2af5d9a4212183ad7d
90707ffeb59cf3cd790e6600e5c099f84e38e3dd
/boss-bes-paper-pojo/src/main/java/com/boss/bes/paper/pojo/dto/CombExamConfigDTO.java
a65e668e31c4830c7c3fdb0df70b34985df760d4
[]
no_license
yuhyjj/NEU-G01-boss-exam-platform
718fe9678a311418b757a834d64d8557bade4fcc
70efd5feab5d75fe54d668bff5e1ac5722316873
refs/heads/master
2022-12-03T04:38:27.918545
2020-08-09T16:06:06
2020-08-09T16:06:06
286,062,651
0
0
null
null
null
null
UTF-8
Java
false
false
705
java
package com.boss.bes.paper.pojo.dto; import boss.brs.xtrain.dataconvention.pojo.dto.BaseDTO; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.*; import java.util.List; @NoArgsConstructor @Data @AllArgsConstructor @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class CombExamConfigDTO extends BaseDTO { private String name; private String remark; @JsonFormat(shape = JsonFormat.Shape.STRING) private Long totalDifficultId; @JsonFormat(shape = JsonFormat.Shape.STRING) private Long orgId; @JsonFormat(shape = JsonFormat.Shape.STRING) private Long companyId; private List<CombExamConfigItemDTO> combExamConfigItemDTOList; }
[ "1424373051@qq.com" ]
1424373051@qq.com
f6aecc0e0c692d8ffba4b46d9847adf7f70b18a6
3e6f65dd40cdb5cdc2ac721bc61530fdff2e1b93
/src/test/java/net/unicon/mycourses/portlet/MockSakaiServiceContextFactorySessionAwareImpl.java
a27d7ea749e9e7c19d48a7ce365c6d05f05812b7
[]
no_license
nickbolton/my-courses-portlet
4986e5bd8d70bfd338d98a0158686c9e82d78a1e
a49904ebefe6157fb8f52e1a8d125bed352aa32f
refs/heads/master
2021-01-23T07:03:26.056813
2008-10-14T23:42:24
2008-10-14T23:42:24
32,112,377
0
0
null
null
null
null
UTF-8
Java
false
false
2,338
java
/* * Copyright (C) 2007 Unicon, Inc. * * This program 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this distribution. It is also available here: * http://www.fsf.org/licensing/licenses/gpl.html * * As a special exception to the terms and conditions of version * 2 of the GPL, you may redistribute this Program in connection * with Free/Libre and Open Source Software ("FLOSS") applications * as described in the GPL FLOSS exception. You should have received * a copy of the text describing the FLOSS exception along with this * distribution. */ package net.unicon.mycourses.portlet; import javax.portlet.PortletRequest; import net.unicon.mycourses.services.SakaiServiceContext; public class MockSakaiServiceContextFactorySessionAwareImpl extends SakaiServiceContextFactorySessionAwareImpl { private int configureContextCallCount; private SakaiServiceContext lastConfigureContextCall_ContextArg; private PortletRequest lastConfigureContextCall_RequestArg; protected void configureContext(SakaiServiceContext context, PortletRequest request) { logConfigureContextCall(context,request); super.configureContext(context,request); } protected void logConfigureContextCall(SakaiServiceContext context, PortletRequest request) { configureContextCallCount++; lastConfigureContextCall_ContextArg = context; lastConfigureContextCall_RequestArg = request; } public int getConfigureContextCallCount() { return configureContextCallCount; } public SakaiServiceContext getLastConfigureContextCall_ContextArg() { return lastConfigureContextCall_ContextArg; } public PortletRequest getLastConfigureContextCall_RequestArg() { return lastConfigureContextCall_RequestArg; } }
[ "microcline@d91ff8c8-273c-0410-a1c6-b3718876d141" ]
microcline@d91ff8c8-273c-0410-a1c6-b3718876d141
9cf1e7414cdf80a5b98411fc12837b20166c7b86
1efe20d416f25b24c84b9c9c1863c2556e3ee845
/ITStep_course/SuperMarket/src/storesim/Humans/Customer.java
7425405bffeb55c0a2fb8194943067d254e993ae
[]
no_license
vildapavlicek/Java
35bef13baa681748636c2f10f00f8165248db6cf
93caac355fe17dfe75571c58cb7ef8669066c3a1
refs/heads/master
2020-04-20T09:43:18.401434
2019-02-01T23:22:28
2019-02-01T23:22:28
168,772,189
0
0
null
null
null
null
UTF-8
Java
false
false
3,478
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 storesim.Humans; import storesim.Items.Item; import java.util.HashMap; import java.util.Map; import storesim.Shops.Shop; /** * Extends Human, adds credit so can do shopping Adds sex * * @author vilda * @version 1.0 */ public class Customer extends Human { /** * We're using credit instead of money */ protected float credit; HashMap<Item, Integer> shoppingCart = new HashMap<>(); HashMap<Item, Integer> shoppingList = new HashMap<>(); public Customer(String name, String surname, int capacity, Sex sex, int hunger, int tired, float credit) { super(name, surname, capacity, sex, hunger, tired); this.credit = credit; shoppingCart = new HashMap<>(); } public Customer(String name, String surname, int capacity, Sex sex, int hunger, int tired, float credit, HashMap shoppingList) { super(name, surname, capacity, sex, hunger, tired); this.credit = credit; shoppingCart = new HashMap<>(); this.shoppingList = shoppingList; } /** * Returns the HashMap shoppingCart * * @return HashMap */ public HashMap<Item, Integer> getShoppingCart() { return this.shoppingCart; } /** * Setter for credit * * @param credit */ public void setCredit(float credit) { this.credit = credit; } /** * Returns runtime value of credit * * @return credit */ public float getCredit() { return this.credit; } /** * Adds item to shoppingCart, requires item and count * * @param item * @param count */ public void addToShoppingCart(Item item, int count) { this.shoppingCart.put(item, count); } /** * Removes item from shoppingCart based on key * * @param item */ public void removeFromShoppingCart(Item item) { this.shoppingCart.remove(item); } /** * Returns boolean if inventory contains item * * @param Item * @return Boolean */ public boolean hasItemInShoppingCart(Item item) { return this.shoppingCart.containsKey(item); } /** * Returns count of specified item in shoppingCart * * @param item * @return Integer */ public Integer getItemCountFromShoppingCart(Item item) { return this.shoppingCart.get(item); } /** * * Method that gets item from shop and adds it to the customer's * shoppingCart * * Checks if item is already in shoppingCart, if true adds only count * * @param shop * @param item * @param count */ public void getItemFromShop(Shop shop, Item item, int count) { if (!this.hasItemInShoppingCart(item)) { this.addToShoppingCart(item, count); } else { this.shoppingCart.replace(item, this.getCountOfItemInInventory(item) + count); } } @Override public String toString() { return "Jmeno: " + this.name + "\n" + "Prijmeni: " + this.surname + "\n" + "Pohlavi je: " + this.sex + "\n" + "Kapacita: " + this.capacity + "\n" + "Hlad: " + this.hunger + "\n" + "Unava: " + this.tired + "\n" + "Kredity: " + this.credit + "\n"; } }
[ "vildapavlicek@gmail.com" ]
vildapavlicek@gmail.com
3d8ab4d409cdf7410f89141e481128d0827aba25
645dd67fa312511e4fdb0dc8facae5832cb8dbdc
/dubbo-samples-zookeeper/src/main/java/com/alibaba/dubbo/samples/ProviderBootstrap.java
33072d3125f45dec10e5df9bf0f80ccb9cd29a9e
[ "Apache-2.0" ]
permissive
tianku123/dubbo-samples
5213596baf645fcfe414a629b331c1a3c4e46907
a09d264cc14e8a94a0fa7f4bad291ee46da8906b
refs/heads/master
2021-05-18T07:11:06.919803
2020-04-01T11:50:54
2020-04-01T11:50:54
251,173,027
0
0
Apache-2.0
2020-03-30T01:36:27
2020-03-30T01:36:27
null
UTF-8
Java
false
false
1,627
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 com.alibaba.dubbo.samples; import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; public class ProviderBootstrap { public static void main(String[] args) throws Exception { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ProviderConfiguration.class); context.start(); System.in.read(); } @Configuration @EnableDubbo(scanBasePackages = "com.alibaba.dubbo.samples.impl") @PropertySource("classpath:/spring/dubbo-provider.properties") static class ProviderConfiguration { } }
[ "beiwei.ly@alibaba-inc.com" ]
beiwei.ly@alibaba-inc.com
0116460c0282829dbc02c706cd03eb344c5edc03
29b4803f46ba2240ba9ae138001055baa8d0bae6
/src/main/java/com/google/codeu/servlets/CommunityPageServlet.java
26038016a9431b4c58fbbcf6b17fa6a2fc141dc4
[ "Apache-2.0" ]
permissive
Ivyzhang1998/team-16-codeu
55cb956c0a809ae0cbc7dfdd02d83b0fa5629f9a
a30929136b64c3a575c47c6d427eb27f70bb4147
refs/heads/master
2022-09-21T07:43:36.239679
2019-08-02T17:09:54
2019-08-02T17:09:54
187,125,619
1
0
Apache-2.0
2022-09-01T23:07:02
2019-05-17T01:28:59
Java
UTF-8
Java
false
false
588
java
package com.google.codeu.servlets; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/community") public class CommunityPageServlet extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { request.getRequestDispatcher("/WEB-INF/views/community.jsp").forward(request, response); } }
[ "openfusegames@gmail.com" ]
openfusegames@gmail.com
8c0d02bec493197da33480e1d1d078f2c6dd4bd3
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app19/source/com/upay/billing/engine/PackageData.java
d57ef9baa362720aab2a6fc6da31fc439a0e76ca
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
4,034
java
package com.upay.billing.engine; import com.upay.billing.utils.Util; import java.util.Date; public class PackageData { private static final String BUILD_DATE = "20150402"; private static final String ENGINES = "[ {\"key\":\"upayc\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"upayu\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"upayt\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"alipay\",\"class\":\"com.upay.billing.engine.alipay.Main\",\"args\":\"\"}, {\"key\":\"zcwap\",\"class\":\"com.upay.billing.engine.zcwap.Main\",\"args\":\"\"}, {\"key\":\"rdowap\",\"class\":\"com.upay.billing.engine.rdowap.Main\",\"args\":\"\"}, {\"key\":\"rdosms\",\"class\":\"com.upay.billing.engine.rdosms.Main\",\"args\":\"\"}, {\"key\":\"tenpay\",\"class\":\"com.upay.billing.engine.tenpay.Main\",\"args\":\"\"}, {\"key\":\"wypj\",\"class\":\"com.upay.billing.engine.wypj.Main\",\"args\":\"\"}, {\"key\":\"he_danji\",\"class\":\"com.upay.billing.engine.he_danji.Main\",\"args\":\"\"}, {\"key\":\"ck_mdo\",\"class\":\"com.upay.billing.engine.ck_mdo.Main\",\"args\":\"\"}, {\"key\":\"bj_rdo\",\"class\":\"com.upay.billing.engine.bj_rdo.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_c\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_u\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_t\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"he_nc_wy\",\"class\":\"com.upay.billing.engine.he_nc.Main\",\"args\":\"\"}, {\"key\":\"he_nc_dj\",\"class\":\"com.upay.billing.engine.he_nc.Main\",\"args\":\"\"}, {\"key\":\"zcwap_u\",\"class\":\"com.upay.billing.engine.zcwap_u.Main\",\"args\":\"\"}, {\"key\":\"xt_ddo\",\"class\":\"com.upay.billing.engine.xt_ddo.Main\",\"args\":\"\"}, {\"key\":\"cmcc_mm_dj\",\"class\":\"com.upay.billing.engine.cmcc_mm_dj.Main\",\"args\":\"\"} ]"; private static final String VERSION = "and_sdk"; public PackageData() {} public String getBuildDate() { if ("20150402".startsWith("@")) { return Util.formatDate("yyyyMMdd", new Date(0L)); } return "20150402"; } public String getEnginesJson() { return "[ {\"key\":\"upayc\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"upayu\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"upayt\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"alipay\",\"class\":\"com.upay.billing.engine.alipay.Main\",\"args\":\"\"}, {\"key\":\"zcwap\",\"class\":\"com.upay.billing.engine.zcwap.Main\",\"args\":\"\"}, {\"key\":\"rdowap\",\"class\":\"com.upay.billing.engine.rdowap.Main\",\"args\":\"\"}, {\"key\":\"rdosms\",\"class\":\"com.upay.billing.engine.rdosms.Main\",\"args\":\"\"}, {\"key\":\"tenpay\",\"class\":\"com.upay.billing.engine.tenpay.Main\",\"args\":\"\"}, {\"key\":\"wypj\",\"class\":\"com.upay.billing.engine.wypj.Main\",\"args\":\"\"}, {\"key\":\"he_danji\",\"class\":\"com.upay.billing.engine.he_danji.Main\",\"args\":\"\"}, {\"key\":\"ck_mdo\",\"class\":\"com.upay.billing.engine.ck_mdo.Main\",\"args\":\"\"}, {\"key\":\"bj_rdo\",\"class\":\"com.upay.billing.engine.bj_rdo.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_c\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_u\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"dt_sms_t\",\"class\":\"com.upay.billing.engine.upay.Main\",\"args\":\"\"}, {\"key\":\"he_nc_wy\",\"class\":\"com.upay.billing.engine.he_nc.Main\",\"args\":\"\"}, {\"key\":\"he_nc_dj\",\"class\":\"com.upay.billing.engine.he_nc.Main\",\"args\":\"\"}, {\"key\":\"zcwap_u\",\"class\":\"com.upay.billing.engine.zcwap_u.Main\",\"args\":\"\"}, {\"key\":\"xt_ddo\",\"class\":\"com.upay.billing.engine.xt_ddo.Main\",\"args\":\"\"}, {\"key\":\"cmcc_mm_dj\",\"class\":\"com.upay.billing.engine.cmcc_mm_dj.Main\",\"args\":\"\"} ]"; } public String getVersion() { return "and_sdk"; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
3855c4ddb1926b9df697582ee44779120ee2830d
576a42ae08d56588365ff0236d0bc58f3c1677ef
/app/src/main/java/com/example/yeswanth/aaro_project/Registeruser.java
ab8c4504245b39965344a12843775f0dae004859
[]
no_license
iamRAJASHEKAR/AaroSenderMe
eddc8462fdbe8cde743ae62f33d42d1853817f55
72a711ec8c2efc3c44a0ca05054fa66e6ac667cd
refs/heads/master
2020-03-24T20:41:36.896165
2018-07-31T09:23:20
2018-07-31T09:23:20
142,991,967
0
0
null
null
null
null
UTF-8
Java
false
false
13,682
java
package com.example.yeswanth.aaro_project; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.Html; import android.text.TextWatcher; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import android.widget.ToggleButton; import java.util.ArrayList; import java.util.Collections; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Registeruser extends AppCompatActivity { EditText editText1, editText2, editText3; ToggleButton toggleButton; Spinner spinner; Button continuebutton; ImageView imageback; Toolbar toolbar; RelativeLayout rl1; TextView textView1, privacy, terms; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_registeruser); getWindow().setBackgroundDrawableResource(R.drawable.bg); toggleButton = (ToggleButton) findViewById(R.id.toggle_button); privacy = (TextView) findViewById(R.id.privacypolicy); terms = (TextView) findViewById(R.id.termsofservices); privacy.setTypeface(privacy.getTypeface(), Typeface.BOLD); terms.setTypeface(terms.getTypeface(), Typeface.BOLD); editText1 = (EditText) findViewById(R.id.register_fname); editText2 = (EditText) findViewById(R.id.register_lname); editText3 = (EditText) findViewById(R.id.register_email); Checkfiledsforemptyvalues(); editText1.addTextChangedListener(mtextWatcher); editText2.addTextChangedListener(mtextWatcher); editText3.addTextChangedListener(mtextWatcher); initilize(); // paser(); // texter(); // textla(); spinner = (Spinner) findViewById(R.id.spinner); spinner.setPrompt("Where are you from"); Locale[] locale = Locale.getAvailableLocales(); ArrayList<String> countries = new ArrayList<String>(); String country; for (Locale loc : locale) { country = loc.getDisplayCountry(); if (country.length() > 0 && !countries.contains(country)) { // countries.add("Where are you from"); countries.add(country); } } Collections.sort(countries, String.CASE_INSENSITIVE_ORDER); /* List<String> languages = new ArrayList<String>(); languages.add("Where are you from"); languages.add("Hindupur"); languages.add("Yelloti"); languages.add("Banglore"); languages.add("Kanalanagar");*/ ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, countries); dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // attaching data adapter to spinner spinner.setAdapter(dataAdapter); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int i, long l) { String item = parent.getItemAtPosition(i).toString(); if (i > 0) { Toast.makeText(parent.getContext(), item, Toast.LENGTH_LONG).show(); } } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); continuebutton = (Button) findViewById(R.id.button_continue); continuebutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (toggleButton.isChecked()) { /*Intent intent = new Intent(Registeruser.this, signin_cancel.class); intent.putExtra("firstname",editText1); startActivity(intent); */ String user = editText1.getText().toString().trim(); String last = editText2.getText().toString().trim(); String mail = editText3.getText().toString().trim(); String country = spinner.getSelectedItem().toString(); Log.e("country", user + country); Intent intent = new Intent(getApplicationContext(), signin_cancel.class); intent.putExtra("first_name", user); intent.putExtra("last_name", last); intent.putExtra("mail", mail); intent.putExtra("country", country); startActivity(intent); editText1.setText(""); editText2.setText(""); editText3.setText(""); finish(); } else { // Toast.makeText(Registeruser.this, "PLease accept our terms of services", Toast.LENGTH_LONG).show(); LayoutInflater inflater = LayoutInflater.from(Registeruser.this); final View alertview = inflater.inflate(R.layout.alert_dialog, null); final AlertDialog alertDialog = new AlertDialog.Builder(Registeruser.this).create(); alertDialog.setView(alertview); alertDialog.setCancelable(false); alertview.findViewById(R.id.alertbutton).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { alertDialog.dismiss(); } }); alertDialog.show(); /* AlertDialog.Builder builder = new AlertDialog.Builder(Registeruser.this); // builder.setTitle(Html.fromHtml("<font color='#993300'>Alert !</font>")); builder.setMessage("Please accept our privacy policy and terms of services"); builder.setCancelable(false); builder.setPositiveButton("ok", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.cancel(); } }); AlertDialog alertDialog = builder.create(); alertDialog.show();*/ } } }); // attaching data adapter to spinner /* toggleButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (toggleButton.isActivated()) { continuebutton.setEnabled(true); } else { // Toast.makeText(Registeruser.this, "Agree for terms of services to use our app", Toast.LENGTH_LONG).show(); } } }); */ } public void textla() { editText2.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { String fname = editText2.getText().toString().trim(); if (fname.length() < 2) { editText2.setError("Username too short "); continuebutton.setEnabled(false); } } @Override public void afterTextChanged(Editable editable) { String fname = editText2.getText().toString().trim(); if (fname.length() > 2) { continuebutton.setEnabled(true); } } }); } private boolean isValidEmail(String email) { String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; Pattern pattern = Pattern.compile(EMAIL_PATTERN); Matcher matcher = pattern.matcher(email); return matcher.matches(); } /* public void paser() { editText3.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { String fname = editText3.getText().toString().trim(); if (!isValidEmail(fname)) { continuebutton.setEnabled(false); editText3.setError("Invalid Email"); } } @Override public void afterTextChanged(Editable editable) { String fname = editText3.getText().toString().trim(); if (isValidEmail(fname)) { continuebutton.setEnabled(true); } } }); } public void texter() { editText1.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { String fname = editText1.getText().toString().trim(); if (fname.length() < 3) { editText1.setError("Username too short "); continuebutton.setEnabled(false); } } @Override public void afterTextChanged(Editable editable) { String fname = editText1.getText().toString().trim(); if (fname.length() > 3) { continuebutton.setEnabled(true); } } }); }*/ private void initilize() { rl1 = (RelativeLayout) findViewById(R.id.imgrelative); toolbar = (Toolbar) findViewById(R.id.signuptoolbar); toolbar.setBackgroundColor(getResources().getColor(R.color.colorWhite)); imageback = (ImageView) findViewById(R.id.image1); imageback.setBackgroundResource(R.drawable.ic_back); imageback.setVisibility(View.VISIBLE); imageback.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(Registeruser.this, Login.class); startActivity(intent); } }); textView1 = (TextView) findViewById(R.id.text1); textView1.setText(R.string.signup); textView1.setTextColor(getResources().getColor(R.color.colorBlack)); textView1.setVisibility(View.VISIBLE); } private TextWatcher mtextWatcher = new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { Checkfiledsforemptyvalues(); } }; private void Checkfiledsforemptyvalues() { continuebutton = (Button) findViewById(R.id.button_continue); String s1 = editText1.getText().toString(); String s2 = editText2.getText().toString(); String s3 = editText3.getText().toString(); if (s1.length() < 4 || s2.length() < 4 || !isValidEmail(s3)) { continuebutton.setEnabled(false); } else { continuebutton.setEnabled(true); } } /* private boolean isValidEmail(String email) { String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; Pattern pattern = Pattern.compile(EMAIL_PATTERN); Matcher matcher = pattern.matcher(email); return matcher.matches(); }*/ @Override public boolean dispatchTouchEvent(MotionEvent ev) { final View currentFocus = getCurrentFocus(); if (!(currentFocus instanceof EditText) || !isTouchInsideView(ev, currentFocus)) { ((InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } return super.dispatchTouchEvent(ev); } private boolean isTouchInsideView(final MotionEvent ev, final View currentFocus) { final int[] loc = new int[2]; currentFocus.getLocationOnScreen(loc); return ev.getRawX() > loc[0] && ev.getRawY() > loc[1] && ev.getRawX() < (loc[0] + currentFocus.getWidth()) && ev.getRawY() < (loc[1] + currentFocus.getHeight()); } }
[ "rajashekar.reddy1995@gmail.com" ]
rajashekar.reddy1995@gmail.com
1001a17fa7276b6745c3acce933ad38fab8ea4b5
a358d0c561264114d165b906a2379dd9ec5faf72
/src/main/java/com/pro47x/demo/dao/AccountDao.java
4434e8213de572588fbd1ad8abf046bbf4c3bdc7
[]
no_license
Pro47x/jjj
e692db8d4e8a2ba8ab8fef8e0840c515f148c7b9
a8e21d6dc20e90f2dfd0c0881c527e8984869181
refs/heads/master
2020-04-02T02:18:57.036436
2018-10-20T12:11:37
2018-10-20T12:11:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.pro47x.demo.dao; public interface AccountDao { /** * 汇款 * @param outer * @param money */ public void out(String outer, Integer money); /** * 收款 * @param inner * @param money */ public void in(String inner, Integer money); }
[ "lisiqi@edspay.com" ]
lisiqi@edspay.com
d47699d95a5740714c0d4e91a6f682d4c6c9afe0
39fd5042f816708258263c4c1c37754594cf7e72
/client/src/main/java/org/xhubacubi/jarhalla/client/ui/components/JLabelInput.java
d560eebe8782d8bd1533979187befa8989b67165
[]
no_license
andresaquino/jarhalla-local
82ca43c237dce9a64d59c234916ca5a9f98d951b
38f3fb6cb4846f19253fb56f1ec70b284311f878
refs/heads/master
2021-01-18T08:42:19.576609
2011-12-29T04:09:55
2011-12-29T04:09:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
java
/* * To change this template, choose Tools | Templates and open the template in * the editor. */ package org.xhubacubi.jarhalla.client.ui.components; import java.awt.BorderLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; /** * Componente que agrupa un JLabel y un JTextField * para facilitar su manejo. * @author rugi */ public class JLabelInput extends JPanel { private JLabel label; private JTextField input; private BorderLayout layout; public JLabelInput(){ this("Value:"); } public JLabelInput(String label){ this(label, ""); } public JLabelInput(String label, String text) { this(new BorderLayout(),new JLabel(label),new JTextField(text)); } private JLabelInput(BorderLayout layout, JLabel label, JTextField input) { super(); this.layout = layout; this.label = label; this.input = input; initComponents(); } private void initComponents() { this.setLayout(layout); this.add(label,BorderLayout.WEST); this.add(input,BorderLayout.CENTER); this.validate(); } public String getTextInput(){ return this.input.getText(); } }
[ "rugi.eolos@gmail.com" ]
rugi.eolos@gmail.com
2651cf845b64a9c6bf4c2fa227b3338de0700b83
b9559e00a99cc08ee72efb30d3a04166054651e2
/Java/Notepad/NotepadGanovSvetoslav/Find/notepad/Notepad.java
681d4a27f2efa4ace5714089f9231c0977ffc13f
[]
no_license
joliebig/featurehouse_fstcomp_examples
d4dd7d90a77ae3b20b6118677a17001fdb53ee93
20dd7dc9a807ec0c20939eb5c6e00fcc1ce19d20
refs/heads/master
2021-01-19T08:08:37.797995
2013-01-29T13:48:20
2013-01-29T13:48:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,358
java
package notepad; class Notepad { //FIND FEATURE //fields private JMenuItem finD, findNexT; private JButton findButton; //initialization Notepad() { //MENU //menu items //find finD = new JMenuItem("Find", new ImageIcon(this.getClass().getResource("images/find.gif"))); finD.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK)); //find next findNexT = new JMenuItem("Find Next"); findNexT.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, ActionEvent.CTRL_MASK)); //add items to menu if (ediT == null) { ediT = new JMenu("Edit"); } ediT.add(finD); ediT.add(findNexT); ediT.addSeparator(); menubar.add(ediT); //find finD.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ actions.finD(); } }); //find next findNexT.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ actions.findNexT(); } }); //TOOLBAR //find toolBar.add(findButton = new JButton(new ImageIcon(this.getClass().getResource("images/find.gif")))); toolBar.addSeparator(); //button listeners //find findButton.setToolTipText("Find"); //button/menu listeners findButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ actions.finD(); } }); } }
[ "sven.apel@googlemail.com" ]
sven.apel@googlemail.com
6b51e412a5b1c6275800300cb30fe05701ceb00e
37216e9852119b52507308b44a66a769c04e50b3
/app/src/main/java/com/alextarchini/android/topquiz/controller/GameActivity.java
b1704e700fb10a737a0e23e2b1fef85b5e42ce77
[]
no_license
alextarchini/AndroidQuizApp
1daec7296866cbef86342efeafc00cef0cf7512d
73283719a5fce588f69dc8731cf7864e2ba90974
refs/heads/master
2021-02-03T21:52:13.281937
2020-02-27T15:38:25
2020-02-27T15:38:25
243,551,408
0
0
null
null
null
null
UTF-8
Java
false
false
8,103
java
package com.alextarchini.android.topquiz.controller; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.MotionEvent; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import com.alextarchini.android.topquiz.R; import com.alextarchini.android.topquiz.model.Question; import com.alextarchini.android.topquiz.model.QuestionBank; import java.util.Arrays; public class GameActivity extends AppCompatActivity implements View.OnClickListener { private TextView mQuestionTextView; private Button mAnswerButton1; private Button mAnswerButton2; private Button mAnswerButton3; private Button mAnswerButton4; private QuestionBank mQuestionBank; private Question mCurrentQuestion; private int mScore; private int mNumberOfQuestions; public static final String BUNDLE_EXTRA_SCORE = "BUNDLE_EXTRA_SCORE"; public static final String BUNDLE_STATE_SCORE = "currentScore"; public static final String BUNDLE_STATE_QUESTION = "currentQuestion"; private boolean mEnableTouchEvents; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game); System.out.println("GameActivity::onCreate()"); mQuestionBank = this.generateQuestions(); if (savedInstanceState != null) { mScore = savedInstanceState.getInt(BUNDLE_STATE_SCORE); mNumberOfQuestions = savedInstanceState.getInt(BUNDLE_STATE_QUESTION); } else { mScore = 0; mNumberOfQuestions = 4; } mEnableTouchEvents = true; // Wire widgets mQuestionTextView = (TextView) findViewById(R.id.activity_game_question_text); mAnswerButton1 = (Button) findViewById(R.id.activity_game_answer1_btn); mAnswerButton2 = (Button) findViewById(R.id.activity_game_answer2_btn); mAnswerButton3 = (Button) findViewById(R.id.activity_game_answer3_btn); mAnswerButton4 = (Button) findViewById(R.id.activity_game_answer4_btn); // Use the tag property to 'name' the buttons mAnswerButton1.setTag(0); mAnswerButton2.setTag(1); mAnswerButton3.setTag(2); mAnswerButton4.setTag(3); mAnswerButton1.setOnClickListener(this); mAnswerButton2.setOnClickListener(this); mAnswerButton3.setOnClickListener(this); mAnswerButton4.setOnClickListener(this); mCurrentQuestion = mQuestionBank.getQuestion(); this.displayQuestion(mCurrentQuestion); } @Override protected void onSaveInstanceState(Bundle outState) { outState.putInt(BUNDLE_STATE_SCORE, mScore); outState.putInt(BUNDLE_STATE_QUESTION, mNumberOfQuestions); super.onSaveInstanceState(outState); } @Override public void onClick(View v) { int responseIndex = (int) v.getTag(); if (responseIndex == mCurrentQuestion.getAnswerIndex()) { // Good answer Toast.makeText(this, "Correct", Toast.LENGTH_SHORT).show(); mScore++; } else { // Wrong answer Toast.makeText(this, "Wrong answer!", Toast.LENGTH_SHORT).show(); } mEnableTouchEvents = false; new Handler().postDelayed(new Runnable() { @Override public void run() { mEnableTouchEvents = true; // If this is the last question, ends the game. // Else, display the next question. if (--mNumberOfQuestions == 0) { // End the game endGame(); } else { mCurrentQuestion = mQuestionBank.getQuestion(); displayQuestion(mCurrentQuestion); } } }, 2000); // LENGTH_SHORT is usually 2 second long } @Override public boolean dispatchTouchEvent(MotionEvent ev) { return mEnableTouchEvents && super.dispatchTouchEvent(ev); } private void endGame() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Well done!") .setMessage("Your score is " + mScore) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // End the activity Intent intent = new Intent(); intent.putExtra(BUNDLE_EXTRA_SCORE, mScore); setResult(RESULT_OK, intent); finish(); } }) .setCancelable(false) .create() .show(); } private void displayQuestion(final Question question) { mQuestionTextView.setText(question.getQuestion()); mAnswerButton1.setText(question.getChoiceList().get(0)); mAnswerButton2.setText(question.getChoiceList().get(1)); mAnswerButton3.setText(question.getChoiceList().get(2)); mAnswerButton4.setText(question.getChoiceList().get(3)); } private QuestionBank generateQuestions() { Question question1 = new Question("What is the name of the current french president?", Arrays.asList("François Hollande", "Emmanuel Macron", "Jacques Chirac", "François Mitterand"), 1); Question question2 = new Question("How many countries are there in the European Union?", Arrays.asList("15", "24", "28", "32"), 2); Question question3 = new Question("Who is the creator of the Android operating system?", Arrays.asList("Andy Rubin", "Steve Wozniak", "Jake Wharton", "Paul Smith"), 0); Question question4 = new Question("When did the first man land on the moon?", Arrays.asList("1958", "1962", "1967", "1969"), 3); Question question5 = new Question("What is the capital of Romania?", Arrays.asList("Bucarest", "Warsaw", "Budapest", "Berlin"), 0); Question question6 = new Question("Who did the Mona Lisa paint?", Arrays.asList("Michelangelo", "Leonardo Da Vinci", "Raphael", "Carravagio"), 1); Question question7 = new Question("In which city is the composer Frédéric Chopin buried?", Arrays.asList("Strasbourg", "Warsaw", "Paris", "Moscow"), 2); Question question8 = new Question("What is the country top-level domain of Belgium?", Arrays.asList(".bg", ".bm", ".bl", ".be"), 3); Question question9 = new Question("What is the house number of The Simpsons?", Arrays.asList("42", "101", "666", "742"), 3); return new QuestionBank(Arrays.asList(question1, question2, question3, question4, question5, question6, question7, question8, question9)); } @Override protected void onStart() { super.onStart(); System.out.println("GameActivity::onStart()"); } @Override protected void onResume() { super.onResume(); System.out.println("GameActivity::onResume()"); } @Override protected void onPause() { super.onPause(); System.out.println("GameActivity::onPause()"); } @Override protected void onStop() { super.onStop(); System.out.println("GameActivity::onStop()"); } @Override protected void onDestroy() { super.onDestroy(); System.out.println("GameActivity::onDestroy()"); } }
[ "alex.tarchini@gmail.com" ]
alex.tarchini@gmail.com
a432566d60daacb293bc3fe1928a626c787e1922
aa337ad175416f97ab1870d9b4e6769ac1bda596
/app/src/main/java/handlers/PassworHandler.java
f24011fbb25ad19c8bf93cd62088c2c434186d2b
[]
no_license
Xaz0g/GroupOut1
12306a08e4c1a0fe30c42ee85468f7598e691b25
a4d051432afd94e608d234b3beb707397544cf1a
refs/heads/master
2021-01-20T12:29:37.655301
2017-06-01T06:43:18
2017-06-01T06:43:18
90,373,248
5
0
null
2017-05-08T19:10:50
2017-05-05T12:26:35
Java
UTF-8
Java
false
false
1,021
java
package handlers; import java.math.BigInteger; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; /** * Created by Xaz0g on 2017-05-15. */ public class PassworHandler { private static final int ITERATIONS = 1000; private static final int KEY_LENGTH = 192; public static String hashPassword(String password, String salt) throws NoSuchAlgorithmException, InvalidKeySpecException { char[] passwordChars = password.toCharArray(); byte[] saltBytes = salt.getBytes(); PBEKeySpec spec = new PBEKeySpec( passwordChars, saltBytes, ITERATIONS, KEY_LENGTH ); SecretKeyFactory key = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); byte[] hashedPassword = key.generateSecret(spec).getEncoded(); return String.format("%x", new BigInteger(hashedPassword)); } }
[ "lexa.andersson@gmail.com" ]
lexa.andersson@gmail.com
53ecd72f0b5858e49c825887edc61d1c5ae9cb0c
793c8bc1761a40e7ee4072321d4e19aee87fb82b
/Chap_5/6- Doubly Linked List/DoublyLinkedApp.java
c6045be8285415250ec3daf8cfac976a5d6b2fa2
[]
no_license
Manish-Giri/Data-Structures
4796faf767a563d27860011a90027d1bf02d125b
f13c09f429e07d835cd43d3c8bb921f4a680dfe8
refs/heads/master
2020-04-15T18:05:18.425235
2015-11-25T20:58:41
2015-11-25T20:58:41
41,609,688
1
2
null
null
null
null
UTF-8
Java
false
false
10,403
java
package Chap_5; /** * Created by Manish on 10/25/2015. * this is an implementation of a doubly linked list, it differs from a singly linked list in that you can traverse * backwards along the list. For this, every Link(node) in the list has a reference to the previous link called previous * Insertion routine has 3 methods - insertFirst(), insertLast() and insertAfter() which allows you to insert a node * at the beginning, at the end or after a specific item in the list * Deletion routine has 3 methods - deleteFirst(), deleteLast() and deleteKey(). the deleteKey() method allows to look * up a specific node and then delete it. * this doubly linked list is also a double ended list in that it always keeps a reference to the last node in the list * (along with the firs) */ class Link3 { //fields - int and 2 references to next and previous public int iData; public Link3 next; public Link3 previous; //constructor - initialize data and references are set to null auto. public Link3(int data) { iData = data; } //display the current link's data public void displayLink() { System.out.print("{" + iData + "} "); } } class DoublyLinkedList { //store 2 refernces to first and last link in list; private Link3 first; private Link3 last; //constructor to set references to null public DoublyLinkedList() { first = null; last = null; } //------------------------------------------------------------------ //isEmpty() to check if list is empty public boolean isEmpty() { return (first == null); } //------------------------------------------------------------------ //----------------INSERTION ROUTINES-------------- //------------------------------------------------------------------ //insertFirst() - to insert a node at the beginning of the list public void insertFirst(int data) { /** * inserts a link with given data at the front of the list */ //create new link with data Link3 newLink = new Link3(data); //special case - if list is empty, set last accordingly if(isEmpty()) { last = newLink; } else { //else if list !empty, connect current first link's previous field to newlink first.previous = newLink; } //set next field of newlink to refer to old first newLink.next = first; //and set newlink as current first first = newLink; } //------------------------------------------------------------------ //method to insert at last of list public void insertLast(int data) { /** * inserts a link with given data at the end of linked list */ //create new link with data Link3 newLink = new Link3(data); //special case - if list is empty if(isEmpty()) { first = newLink; } else { //if list not empty, make the current last's next refer to newlink last.next = newLink; //and set newlink's previous to current last newLink.previous = last; } //finally set last as newlink last = newLink; } //------------------------------------------------------------------ //method to insert at end of a specific link public boolean insertAfter(int key, int data) { /** * inserts a link with given data after the link whose data matches given key */ //first search for link with given key, starting at beginning Link3 current = first; //until key with data is found while(current.iData != key) { current = current.next; //if end of list is reached without given key, exit if(current == null) { return false; } } //when link with key is found, create new link with data to be inserted after it Link3 newLink = new Link3(data); //if current link is the last one in the list if(current == last) { newLink.next = null; last = newLink; } //else if current link is not last one in the list else { //first modify the links towards the right //make the newlink's next field refer to current link's next field ie: following node newLink.next = current.next; //make the following node's previous field refer to newlink //NOTE: current.next.previous refers to the previous field of the link referred to by next field of the current link current.next.previous = newLink; } //then modify the links on the left //make newlink's previous field refer to current newLink.previous = current; //make current's next refer to newlink current.next = newLink; //return status of insertion return true; } //------------------------------------------------------------------ //----------------DELETION ROUTINES-------------- //------------------------------------------------------------------ public Link3 deleteFirst() { /** * deletes first node from the linked list */ //create link to be returned Link3 temp = first; //special case: if only 1 link in list if(first.next == null) { //set last as null as there will be no more links in list last = null; } //else if not just 1 link in next else { //set following node(after first)'s previous field to null as this will be the new first first.next.previous = null; } first = first.next; //and return deleted link return temp; } //------------------------------------------------------------------ public Link3 deleteLast() { /** * deletes last link from the linked list */ //create link to be deleted Link3 temp = last; //special case - if only 1 link in list if(first.next == null) { //set first to null as no links in list anymore first = null; } else { //set current second last's next field to null as this is now the new last last.previous.next = null; } //and make the second last link as the new last last = last.previous; //and return deleted link return temp; } //------------------------------------------------------------------ public Link3 deleteKey(int key){ /** * deletes link with given data, if found */ //start searching for link from the first Link3 current = first; while (current.iData != key) { //move forward until link found current = current.next; if (current == null) { //if not found, return null return null; } } //when link found, adjust connections accordingly //special case 1 - if this is the first link if(current == first) { //set new first as the first's next link first = current.next; } else { //if this is not the first link // set preceeding link's next to refer to following link by current's next current.previous.next = current.next; } //special case 2 - if this is the last link if(current == last) { //set new last as the current last's previous link last = current.previous; } else { //set current link's next link's previous field to refer to current link's preceeding link current.next.previous = current.previous; } return current; } //------------------------------------------------------------------ //----------TRAVERSAL ROUTINES---------- //------------------------------------------------------------------ public void displayForward() { /** * display links forward ie: left -> right */ System.out.println("List (first -> last)"); //start at first and move forward Link3 current = first; while (current != null) { current.displayLink(); //change current to refer to following node current = current.next; } System.out.println(" "); } //------------------------------------------------------------------ public void displayBackward() { /** * display links backward ie: right -> left */ System.out.println("List (last -> first)"); //start at last and move backward Link3 current = last; while (current != null) { current.displayLink(); //change current to refer to previous node current = current.previous; } System.out.println(" "); } } public class DoublyLinkedApp { public static void main(String[] args) { //create new list DoublyLinkedList theList = new DoublyLinkedList(); //insert 3 at front theList.insertFirst(22); theList.insertFirst(44); theList.insertFirst(66); //insert 3 items at end theList.insertLast(11); theList.insertLast(33); theList.insertLast(55); //display list forward theList.displayForward(); //display list backward theList.displayBackward(); //delete first item System.out.println("Deleted: " + theList.deleteFirst().iData); //delete last item System.out.println("Deleted: " + theList.deleteLast().iData); //delete a specific link - with key 11 System.out.println("Deleted: " + theList.deleteKey(11).iData); //display list forward again theList.displayForward(); //insert 2 items after a specific link //insert after link with data 22 theList.insertAfter(22, 77); theList.displayForward(); //insert after link with 33 theList.insertAfter(33, 89); theList.displayForward(); } }
[ "manish.giri.me@gmail.com" ]
manish.giri.me@gmail.com
4bd7b89d4854b634361b44355c872f05644cba84
f4a6fd95c65293ee5e758f2f94f1c5311a287886
/project/src/main/java/com/javeriana/web/project/Shared/Bus/Aggregate/AggregateRoot.java
336f3dcf97798bb1d108791b5a3b19deef4e258c
[]
no_license
diegomateus/Desarrollo-web-proyecto
7929d28099afebb60c0bb00c98d46c384a7cc232
a15868898d2fe84aadd817c9ec241a8c85a94704
refs/heads/main
2023-05-29T11:00:52.233618
2021-06-04T22:23:23
2021-06-04T22:23:23
353,134,294
0
0
null
2021-06-04T22:43:11
2021-03-30T20:34:40
Java
UTF-8
Java
false
false
597
java
package com.javeriana.web.project.Shared.Bus.Aggregate; import com.javeriana.web.project.Shared.Bus.Event.DomainEvent; import java.util.ArrayList; import java.util.Collections; import java.util.List; public abstract class AggregateRoot { private List<DomainEvent> domainEvents = new ArrayList<>(); final public List<DomainEvent> pullDomainEvents(){ List<DomainEvent> events= this.domainEvents; this.domainEvents = Collections.emptyList(); return events; } final protected void record(DomainEvent event){ this.domainEvents.add(event); } }
[ "danieldanih97@gmail.com" ]
danieldanih97@gmail.com
ad79c48d59bff185ad8df9ed70cc1851f27521bc
deb6e605af137f4a3b7c19695cf3e582920df406
/src/string/problems/DuplicateWord.java
c19364de3a4e76bde1d00501a0941dc26acc4a2b
[]
no_license
Jugham512/JavaMidterm-
4f1b97462c6764e45dd77444d83a42e7c77c3543
16c282836c3591a37202a6b1cb6e584ef8c1763d
refs/heads/master
2023-07-17T05:02:53.586197
2021-08-30T00:46:07
2021-08-30T00:46:07
400,006,056
0
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package string.problems; public class DuplicateWord { public static void main(String[] args) { /* Write a java program to find the duplicate words and their number of occurrences in the string. Also Find the average length of the words. */ String st = "Java is a programming Language. Java is also an Island of Indonesia. Java is widely used language"; int count; st.toLowerCase(); String words[] = st.split(" "); System.out.println("Duplicate Words are :"); for (int i = 0; i < words.length; i++) { count = 1; for (int j = i + 1; j < words.length; j++) { if (words[i].equals(words[j])) { count++; words[j] = "0"; if (count > 1 && words[i] != "0") for (int k = i + 1; k < words.length; k++) { if (words[i].equals(words[k])) { count++; System.out.println(words[i]); } } } } } } }
[ "=" ]
=
2c2cadda744bcd2d74d08308d3e430ac5437846d
1e34704ac6ad3784488227e282e4fd4a872b6765
/app/src/main/java/com/aapkabazzaar/abchat/Friends.java
d975cb8b7daac2bb41337824942f076619fa7d2a
[]
no_license
hahsanayub/ABchat
9d2ffbfd5febfde963dda5a16acae79f37216083
e4c7dc9eafd6bf482dafd400a31c0d56cc0d530d
refs/heads/master
2023-06-03T12:09:55.750422
2021-06-21T05:38:18
2021-06-21T05:38:18
378,816,668
1
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.aapkabazzaar.abchat; public class Friends { String date; public Friends() { } public Friends( String date) { this.date = date; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } }
[ "h.ahsanayub@gmail.com" ]
h.ahsanayub@gmail.com
a8fae9d9e0b2e3dfe7575a6695a617020b3f4182
86ffe8c14ba8d2055831e3b0bd2874f409fc4c63
/TuringSB/src/algo/Programm.java
fd66970615d79d316999eee785b7448455344361
[]
no_license
RainbowDash37/TuringSB
9a1b052746c548115b155b90d12ed172593f724b
0ba81d867e2952c81aaac3cf1cdfcef9b3dac08c
refs/heads/master
2020-12-24T15:14:07.886233
2013-06-19T15:31:48
2013-06-19T15:31:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,465
java
package algo; public class Programm { State def = new State(); State back = new State(); State parse = new State(); State count = new State(); State check = new State(); int currentState = 1; public Programm(){ String[] bp = {"r", "goto check"}; String[] bpn = {"l"}; back.init("#", bp, bpn); String[] pp = {"write #", "goto count"}; String[] ppn = {"r", "goto check"}; parse.init("a", pp, ppn); String[] cp = {"r", "add 1", "goto back"}; String[] cpn = {"r"}; count.init("*", cp, cpn); String[] chp = {"print", "END"}; String[] chpn = {"goto parse"}; check.init("*", chp, chpn); } public String[] sendNext(String parseIn){ String[] defa = {""}; System.out.println("letzter State: " + stateName()); switch (currentState){ case 0: {return back.giveNext(parseIn);} case 1: {return parse.giveNext(parseIn);} case 2: {return count.giveNext(parseIn);} case 3: {return check.giveNext(parseIn);} default: {return defa;} } } public String stateName(){ switch (currentState){ case 0: {return "back";} case 1: {return "parse";} case 2: {return "count";} case 3: {return "check";} default : {return "NULL";} } } public int getStart(){ return 1; } public void changeState(String i){ switch(i){ case "back": {currentState = 0; break;} case "parse": {currentState = 1; break;} case "count": {currentState = 2; break;} case "check": {currentState = 3; break;} } } }
[ "dashtherainbow37@gmail.com" ]
dashtherainbow37@gmail.com
aa1487c7f098c46c24b47718e4b6d42c6e640061
d988416113114b32c3281178ccef34359b35f3f0
/app/src/main/java/th/co/thiensurat/toss_installer/utils/helper/ItemTouchHelperViewHolder.java
8f840e791282219ab7457cf7b2e887b5f200f6de
[]
no_license
tsrmobile/Toss_Installer
722a62512ad83994bbc2f508e782d3f672b8caec
e9bc0212dc330121b80744393e7d9848eb5563a0
refs/heads/master
2021-09-15T10:14:07.607379
2018-05-30T09:52:01
2018-05-30T09:52:03
111,386,906
0
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
/* * Copyright (C) 2015 Paul Burke * * 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 th.co.thiensurat.toss_installer.utils.helper; import android.support.v7.widget.helper.ItemTouchHelper; /** * Interface to notify an item ViewHolder of relevant callbacks from {@link * ItemTouchHelper.Callback}. * * @author Paul Burke (ipaulpro) */ public interface ItemTouchHelperViewHolder { /** * Called when the {@link ItemTouchHelper} first registers an item as being moved or swiped. * Implementations should update the item view to indicate it's active state. */ void onItemSelected(); /** * Called when the {@link ItemTouchHelper} has completed the move or swipe, and the active item * state should be cleared. */ void onItemClear(); }
[ "teerayut.k@thiensurat.co.th" ]
teerayut.k@thiensurat.co.th
051c7bcac5981fa73d866fbb591ad6ad60c97f87
ad6e8b0045da994603642675c48d930465aea9a2
/edu.clarkson.serl.critic/src/edu/clarkson/serl/critic/interpreter/model/ExprCmp.java
3fca5f6e76944044607e439789523f8a8c2cdc5d
[]
no_license
RhitSerg/critical
b45c35a06b20d2ddd372105c69b2e7012b13233c
596e7d024dac432b47ef86f570be246573dcdef3
refs/heads/master
2021-01-13T14:20:47.212824
2014-07-12T15:39:03
2014-07-12T15:39:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,627
java
/* * ExprCmp.java * Jul 4, 2011 * * CriticAL: A Critic for APIs and Libraries * * Copyright (C) 2011 Chandan Raj Rupakheti & Daqing Hou, Clarkson University * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation, either * version 3 of the License, or any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * Contact Us: * Chandan Raj Rupakheti <rupakhcr@clarkson.edu> * Daqing Hou <dhou@clarkson.edu> * Clarkson University * Potsdam * NY 13699-5722 * USA * http://critical.sf.net */ package edu.clarkson.serl.critic.interpreter.model; import edu.clarkson.serl.critic.interpreter.ISymbol; import soot.Value; import soot.jimple.CmpExpr; /** * * @author <a href="http://clarkson.edu/~rupakhcr">Chandan R. Rupakheti</a> (rupakhcr@clarkson.edu) */ public class ExprCmp extends ExprNumeric<CmpExpr> { /** * @param sootValue */ public ExprCmp(CmpExpr sootValue, ISymbol<? extends Value> left, ISymbol<? extends Value> right) { super(sootValue, left, right); } @Override protected double execute(double l, double r) { if(l < r) return -1; else if(l > r) return 1; return 0; } }
[ "chandanrrk@gmail.com" ]
chandanrrk@gmail.com
fc2f5384b923e4645c79f10277a243b59b2a2144
e7e4ff0be27ff8a2956dbcbe1b983afb163a6ca1
/CliWSWS/src/main/java/com/shdp/websockets/webservice/JsonConvertIF.java
54e86e8f28480c816a6eb121fcc0a3338bb4db74
[]
no_license
safwathannadeif/WSWSCli
beb719c77d800d6ef4fa4740c4637642641cd981
11b2d52f4de82c206fbf2f02fe2c81d47f3e01db
refs/heads/master
2021-01-19T05:57:42.584644
2015-12-27T20:39:44
2015-12-27T20:39:44
41,261,031
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package com.shdp.websockets.webservice; import java.io.IOException; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; public interface JsonConvertIF<RqRs> { RqRs convertToPOJO(String jsonStrjx,Class<RqRs> clzr) throws InstantiationException, IllegalAccessException, JsonParseException, JsonMappingException, IOException ; String convertToJsonStr (RqRs rqRs) throws JsonGenerationException, JsonMappingException, IOException ; }
[ "safwatdeif@gmail.com" ]
safwatdeif@gmail.com
0bc9e503ac136a424a0841d1b3bb491908859fff
3d1116ddb79576651175877491fce6caa49229b3
/SmokeStack/app/src/main/java/org/purple/smokestack/Messages.java
4c7dcabe674cce9aac5cc42f8df8963f9b431ce7
[ "BSD-2-Clause" ]
permissive
Kpatel114/smokestack
40ebc4dc29e7c235614297b582b761158d89d9c5
ad8618099cb98c0578ea106316739174a9a89b40
refs/heads/master
2022-12-23T10:59:58.889980
2020-09-23T16:20:53
2020-09-23T16:20:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,509
java
/* ** Copyright (c) Alexis Megas. ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** 1. Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** 2. 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. ** 3. The name of the author may not be used to endorse or promote products ** derived from SmokeStack without specific prior written permission. ** ** SMOKESTACK IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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 ** SMOKESTACK, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.purple.smokestack; import android.util.Base64; import java.nio.charset.StandardCharsets; import java.util.Arrays; public class Messages { public final static String EOM = "\r\n\r\n\r\n"; public final static byte CHAT_KEY_TYPE[] = new byte[] {0x00}; public final static byte CHAT_MESSAGE_READ[] = new byte[] {0x04}; public final static byte CHAT_MESSAGE_RETRIEVAL[] = new byte[] {0x00}; public final static byte PKP_MESSAGE_REQUEST[] = new byte[] {0x01}; public final static byte SHARE_SIPHASH_ID[] = new byte[] {0x02}; public final static byte SHARE_SIPHASH_IDENTITY_CONFIRIMATION[] = new byte[] {0x03}; public final static int EPKS_GROUP_ONE_ELEMENT_COUNT = 7; public static String bytesToMessageString(byte bytes[]) { if(bytes == null || bytes.length == 0) return ""; try { StringBuilder results = new StringBuilder(); results.append("POST HTTP/1.1\r\n"); results.append ("Content-Type: application/x-www-form-urlencoded\r\n"); results.append("Content-Length: %1\r\n"); results.append("\r\n"); results.append("content=%2\r\n"); results.append("\r\n\r\n"); String base64 = Base64.encodeToString(bytes, Base64.NO_WRAP); int indexOf = results.indexOf("%1"); int length = base64.length() + "content=\r\n\r\n\r\n".length(); results = results.replace (indexOf, indexOf + 2, String.valueOf(length)); indexOf = results.indexOf("%2"); results = results.replace(indexOf, indexOf + 2, base64); return results.toString(); } catch(Exception exception) { } return ""; } public static String identitiesMessage(byte bytes[]) { if(bytes == null || bytes.length == 0) return ""; try { StringBuilder results = new StringBuilder(); results.append("POST HTTP/1.1\r\n"); results.append ("Content-Type: application/x-www-form-urlencoded\r\n"); results.append("Content-Length: %1\r\n"); results.append("\r\n"); results.append("type=0095b&content=%2\r\n"); results.append("\r\n\r\n"); String base64 = Base64.encodeToString(bytes, Base64.NO_WRAP); int indexOf = results.indexOf("%1"); int length = base64.length() + "type=0095b&content=\r\n\r\n\r\n".length(); results = results.replace (indexOf, indexOf + 2, String.valueOf(length)); indexOf = results.indexOf("%2"); results = results.replace(indexOf, indexOf + 2, base64); return results.toString(); } catch(Exception exception) { } return ""; } public static String requestAuthentication(StringBuffer stringBuffer) { if(stringBuffer == null || stringBuffer.length() == 0) return ""; try { StringBuilder results = new StringBuilder(); results.append("POST HTTP/1.1\r\n"); results.append ("Content-Type: application/x-www-form-urlencoded\r\n"); results.append("Content-Length: %1\r\n"); results.append("\r\n"); results.append("type=0097a&content=%2\r\n"); results.append("\r\n\r\n"); int indexOf = results.indexOf("%1"); int length = stringBuffer.length() + "type=0097a&content=\r\n\r\n\r\n".length(); results = results.replace (indexOf, indexOf + 2, String.valueOf(length)); indexOf = results.indexOf("%2"); results = results.replace (indexOf, indexOf + 2, stringBuffer.toString()); return results.toString(); } catch(Exception exception) { } return ""; } public static String requestUnsolicited() { try { StringBuilder results = new StringBuilder(); results.append("POST HTTP/1.1\r\n"); results.append ("Content-Type: application/x-www-form-urlencoded\r\n"); results.append("Content-Length: %1\r\n"); results.append("\r\n"); results.append("type=0096&content=%2\r\n"); results.append("\r\n\r\n"); String base64 = Base64.encodeToString ("true".getBytes(), Base64.NO_WRAP); int indexOf = results.indexOf("%1"); int length = base64.length() + "type=0096&content=\r\n\r\n\r\n".length(); results = results.replace (indexOf, indexOf + 2, String.valueOf(length)); indexOf = results.indexOf("%2"); results = results.replace(indexOf, indexOf + 2, base64); return results.toString(); } catch(Exception exception) { } return ""; } public static String stripMessage(String message) { if(message == null) return ""; /* ** Remove SmokeStack-specific leading and trailing data. */ int indexOf = message.indexOf("content="); if(indexOf >= 0) message = message.substring(indexOf + 8); return message.trim(); } public static byte[] epksMessage(String sipHashId, String strings[]) { if(strings == null || strings.length != EPKS_GROUP_ONE_ELEMENT_COUNT - 1) return null; /* ** keyStream ** [0 ... 31] - AES-256 Encryption Key ** [32 ... 95] - SHA-512 HMAC Key */ try { byte keyStream[] = Cryptography.sipHashIdStream(sipHashId); if(keyStream == null) return null; StringBuilder stringBuilder = new StringBuilder(); /* ** [ A Timestamp ] */ stringBuilder.append (Base64.encodeToString(Miscellaneous. longToByteArray(System. currentTimeMillis()), Base64.NO_WRAP)); stringBuilder.append("\n"); /* ** [ Key Type ] */ stringBuilder.append(strings[0]); stringBuilder.append("\n"); /* ** [ Sender's Smoke Identity ] */ stringBuilder.append(strings[5]); stringBuilder.append("\n"); /* ** [ Encryption Public Key ] */ stringBuilder.append(strings[1]); stringBuilder.append("\n"); /* ** [ Encryption Public Key Signature ] */ stringBuilder.append(strings[2]); stringBuilder.append("\n"); /* ** [ Signature Public Key ] */ stringBuilder.append(strings[3]); stringBuilder.append("\n"); /* ** [ Signature Public Key Signature ] */ stringBuilder.append(strings[4]); byte aes256[] = Cryptography.encrypt (stringBuilder.toString().getBytes(), Arrays.copyOfRange(keyStream, 0, 32)); stringBuilder.delete(0, stringBuilder.length()); if(aes256 == null) return null; /* ** [ SHA-512 HMAC ] */ byte sha512[] = Cryptography.hmac (aes256, Arrays.copyOfRange(keyStream, 32, keyStream.length)); if(sha512 == null) return null; /* ** [ Destination ] */ byte destination[] = Cryptography.hmac (Miscellaneous.joinByteArrays(aes256, sha512), Cryptography. sha512(sipHashId.getBytes(StandardCharsets.UTF_8))); return Miscellaneous.joinByteArrays(aes256, sha512, destination); } catch(Exception exception) { } return null; } public static byte[] shareSipHashIdMessageConfirmation (Cryptography cryptography, String sipHashId, byte identity[], byte keyStream[]) { if(cryptography == null) return null; try { byte bytes[] = Miscellaneous.joinByteArrays ( /* ** [ A Byte ] */ SHARE_SIPHASH_IDENTITY_CONFIRIMATION, /* ** [ A Timestamp ] */ Miscellaneous.longToByteArray(System.currentTimeMillis()), /* ** [ SipHash Identity ] */ sipHashId.getBytes(StandardCharsets.UTF_8), /* ** [ Temporary Identity ] */ identity); /* ** [ AES-256 ] */ byte aes256[] = Cryptography.encrypt (bytes, Arrays.copyOfRange(keyStream, 0, 32)); if(aes256 == null) return null; /* ** [ SHA-512 HMAC ] */ byte sha512[] = Cryptography.hmac (aes256, Arrays.copyOfRange(keyStream, 32, keyStream.length)); if(sha512 == null) return null; /* ** [ Destination ] */ byte destination[] = Cryptography.hmac (Miscellaneous.joinByteArrays(aes256, sha512), Cryptography. sha512(sipHashId.getBytes(StandardCharsets.UTF_8))); return Miscellaneous.joinByteArrays(aes256, sha512, destination); } catch(Exception exception) { } return null; } }
[ "textbrowser@gmail.com" ]
textbrowser@gmail.com
98caf7156895ab75a7468401368117fafd3abd6a
d1df297e72ae934ab626f2bcdac56ffcc08f656f
/sp/test-rp/src/test/java/uk/gov/ida/rp/testrp/resources/AuthnResponseReceiverResourceTest.java
ed831a9d1de6f08305f2978fe53dba9369e7ff9d
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
stub-idp/stub-idp
7e69a1879bcb697cfb472ab02f56818d230c0bb7
2ea95f20802aa5492fe108160faf3957d87ed691
refs/heads/monorepo
2023-08-03T04:33:37.308918
2023-06-30T18:38:45
2023-07-02T14:00:07
171,540,622
0
0
MIT
2023-09-13T18:09:56
2019-02-19T20:00:38
Java
UTF-8
Java
false
false
1,905
java
package uk.gov.ida.rp.testrp.resources; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import stubidp.saml.domain.assertions.TransactionIdaStatus; import stubidp.utils.rest.common.SessionId; import uk.gov.ida.rp.testrp.TestRpConfiguration; import uk.gov.ida.rp.testrp.controllogic.AuthnResponseReceiverHandler; import uk.gov.ida.rp.testrp.domain.ResponseFromHub; import javax.ws.rs.core.Response; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) public class AuthnResponseReceiverResourceTest { @Mock private AuthnResponseReceiverHandler authnResponseReceiverHandler; @Mock private TestRpConfiguration testRpConfiguration; @Test public void assertCorrectRedirectUrlWhenReceivingNoAuthnContextResponseFromHub() { String samlResponse = "no-authn-context-saml-response"; ResponseFromHub responseFromHub = new ResponseFromHub( TransactionIdaStatus.NoAuthenticationContext, List.of(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); when(authnResponseReceiverHandler.handleResponse(eq(samlResponse), any())).thenReturn(responseFromHub); AuthnResponseReceiverResource resource = new AuthnResponseReceiverResource(authnResponseReceiverHandler, testRpConfiguration); Response response = resource.doLogin(samlResponse, SessionId.createNewSessionId(), null); assertThat(response.getLocation().toString()).isEqualTo("/test-rp?errorCode=NoAuthenticationContext"); } }
[ "willpdp@users.noreply.github.com" ]
willpdp@users.noreply.github.com
63160b69bcb265ae7d259e479d45fd93e1b348e3
5c8192c9b8aa010f5cd3882e76f200a477fe2881
/backend_proj/src/test/java/com/niit/dao/ProductDaoImplTest.java
7617bc9dc07ab8794a811618dd1b6313aeb6e05f
[]
no_license
NavoneelDas/Workspace2
cb917ba25f4fb58a53b87cb03e4afd0b613cb20b
0f70019dd1b432d8d2bf704c2997523c4307a00e
refs/heads/master
2020-04-02T10:37:54.860146
2018-10-23T14:57:33
2018-10-23T14:57:33
154,347,624
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
package com.niit.dao; import java.util.List; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.niit.configuration.DBConfig; import com.niit.model.Product; import junit.framework.TestCase; public class ProductDaoImplTest extends TestCase { ApplicationContext context= new AnnotationConfigApplicationContext(DBConfig.class,ProductDaoImpl.class); ProductDao productDao=(ProductDao)context.getBean("productDaoImpl"); public void testSaveOrUpdateProduct() { Product p=new Product(); } public void testGetProduct() { Product product1=productDao.getProduct(2); Product product2=productDao.getProduct(4); assertNull(product1); assertNotNull(product2); assertEquals(product2.getProductname(),"Toy Car"); } public void testDeleteProduct() { productDao.deleteProduct(6); Product product=productDao.getProduct(6); assertNull(product); } public void testGetAllProducts() { List<Product> products=productDao.getAllProducts(); assertTrue("products size " + products.size(),products.size()>0); } }
[ "44024297+NavoneelDas@users.noreply.github.com" ]
44024297+NavoneelDas@users.noreply.github.com
7e7598c3b098b0506ab2327011f599cdbbb301b5
e702e21e6c7609e86db78bb4feca168dcc9fef16
/PatternDesign/src/com/pen/FactoryPattern/Impl/SquareImpl.java
acaed33a47eff4f6174707ea948d1f89e4035510
[]
no_license
pengchenwei/PatternSet
7c99e078e347711ccf4af44bf9d712451c2e186d
aa9cea26295f6b01e59e015defbe90f846723331
refs/heads/master
2020-12-04T20:29:10.068407
2016-10-13T13:57:08
2016-10-13T14:29:42
66,330,153
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.pen.FactoryPattern.Impl; import com.pen.FactoryPattern.Inter.IShape; /** * SquareImpl:图形接口IShape 的接口实现类 * @author pen * */ public class SquareImpl implements IShape { @Override public void draw() { System.out.println("This is a draw square method"); } }
[ "pen@Lenovo-Laptops" ]
pen@Lenovo-Laptops
f388f3e09ac0c044b10d7c60d95e3d06f62c0975
7c1430c53b4d66ad0e96dd9fc7465a5826fdfb77
/uims-support/src/cn/edu/sdu/uims/graph/GraphConstants.java
85f6bd867eb8233b0fadf489dca17673747257c5
[]
no_license
wang3624270/online-learning-server
ef97fb676485f2bfdd4b479235b05a95ad62f841
2d81920fef594a2d0ac482efd76669c8d95561f1
refs/heads/master
2020-03-20T04:33:38.305236
2019-05-22T06:31:05
2019-05-22T06:31:05
137,187,026
1
0
null
null
null
null
UTF-8
Java
false
false
1,051
java
package cn.edu.sdu.uims.graph; public interface GraphConstants { int GRAPH_SELECT_STATUS_NO = 0; int GRAPH_SELECT_STATUS_VECTOR = 1; int GRAPH_SELECT_STATUS_BOUND = 2; int GRAPH_SELECT_STATUS_INNER = 3; int GRAPH_SELECT_STATUS_OUTER = 4; int GRAPH_SELECT_STATUS_VECTOR_LEFTTOP = 11; // 表示选中左上角顶点 int GRAPH_SELECT_STATUS_VECTOR_RIGHTTOP = 12;// 表示选中左下角顶点 int GRAPH_SELECT_STATUS_VECTOR_LEFTBOTTOM = 13; // 表示选中右上角顶点 int GRAPH_SELECT_STATUS_VECTOR_RIGHTBOTTOM = 14; // 表示选中右下角顶点 String GRAPH_TYPE_BASIC = "B"; String GRAPH_TYPE_GENERAL = "G"; String GRAPH_TYPE_COMPLICATED = "C"; String GRAPH_COLOR_RED = "colorRed"; String GRAPH_COLOR_BLUE = "colorBlue"; String GRAPH_COLOR_GREEN = "colorGreen"; String GRAPH_COLOR_BLACK = "colorBlack"; String GRAPH_COLOR_WRITE = "colorWhite"; String GRAPH_COLOR_GRAY = "colorGray"; String GRAPH_COLOR_SELECTION = "colorRed"; float MIN_BOUND = 5; // List points = new ArrayList(); // 存放原element的点的信息 }
[ "3624270@qq.com" ]
3624270@qq.com
2607bff4fea28208df6cff21905f31ce910c6f6e
c553fdca8e99ce1a403ea59ca0f27237a300375b
/src/main/java/dsl/typeset/ListTypeSet.java
13ab64139c7f3855ce6f1b4b0b60e4640f1972ce
[]
no_license
lzach/javadsl
5586df0e223bb75b25495c203ab06bb535b2e7a8
2de400d8661b79d22d880baa61bff2e16ff0348c
refs/heads/master
2021-06-25T09:09:27.611203
2021-06-12T08:52:04
2021-06-12T08:52:04
170,097,310
0
0
null
2020-10-13T13:16:38
2019-02-11T08:56:11
Java
UTF-8
Java
false
false
600
java
package dsl.typeset; import java.util.Collection; public class ListTypeSet<E> extends PredicateTypeSet<E> { private final Collection<E> members; public ListTypeSet(Collection<E> members) { super(members::contains); this.members = members; } @Override public boolean contains(E value) { return members.contains(value); } @Override public boolean isSubset(TypeSet<E> other) { return other.contains(members); } @Override public boolean isEqual(TypeSet<E> other) { return other instanceof ListTypeSet && ((ListTypeSet)other).members.equals(members); } }
[ "ludvig.kihlman@ed.ac.uk" ]
ludvig.kihlman@ed.ac.uk
4cf8e3df319d3e013f5dd200a3c19d2bfd78e169
dce31adaa99c3cb558ac9e0b3b8f0e1b3437f400
/src/com/temp/ReadEmail.java
88c5417ea21b4997a62a24eaef451cab6a2ec736
[]
no_license
893001794/lcims
db56a2e36eeda718b8cabfcbaf714da5a849a914
ce1126d99cd42720c81f6c27de11150de274714f
refs/heads/master
2021-06-28T04:01:46.251717
2020-09-14T03:20:46
2020-09-14T03:20:46
132,843,718
0
0
null
null
null
null
UTF-8
Java
false
false
2,756
java
package com.temp; import java.util.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; public class ReadEmail { public static void main(String args[]) throws Exception{ display(new File("C:\\1.eml")); } public static void display(File emlFile) throws Exception{ Properties props = System.getProperties(); props.put("mail.host", "smtp.dummydomain.com"); props.put("mail.transport.protocol", "smtp"); Session mailSession = Session.getDefaultInstance(props, null); InputStream source = new FileInputStream(emlFile); MimeMessage message = new MimeMessage(mailSession, source); System.out.println("Subject : " + message.getSubject()); System.out.println("From : " + message.getFrom()[0]); System.out.println("--------------"); System.out.println("Body : " + message.getContent()); //2 Multipart mp = (Multipart)message.getContent(); int count = mp.getCount(); MimeBodyPart body_part=null; for (int i = 0; i < count; i++){ body_part = (MimeBodyPart) mp.getBodyPart(i); System.out.println(body_part.getContent()); } //BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));// Get directoryMessage message[] = folder.getMessages();for (int i=0, n=message.length; i<n; i++) { System.out.println(i + ": " + message[i].getFrom()[0] + "\t" + message[i].getSubject()); System.out.println("Do you want to read message? " + "[YES to read/QUIT to end]"); String line = reader.readLine(); if ("YES".equals(line)) { message[i].writeTo(System.out); } else if ("QUIT".equals(line)) { break; }} } public static Object getContent(Part part) throws MessagingException, IOException{ /*1. if (part.isMimeType("text/plain")) { return (String) part.getContent(); } else if (part.isMimeType("text/html")) { return (String) part.getContent(); }else if (part.isMimeType("multipart/*")) { Multipart multipart = (Multipart) part.getContent(); return getContent(multipart.getBodyPart(0)); }else if (part.isMimeType("message/rfc822")) { return getContent((Part) part.getContent()); } return "";*/ //2 Multipart mp = (Multipart)part.getContent(); int count = mp.getCount(); MimeBodyPart body_part=null; for (int i = 0; i < count; i++){ body_part = (MimeBodyPart) mp.getBodyPart(i); return (Object) body_part.getContent(); } return ""; } }
[ "tangzhouping@qtone.cn" ]
tangzhouping@qtone.cn
90657f0b9fc26af3b717c6a313db47f70074a550
29fa5fadb8332cd95f13b5afc77d8939d18cdddf
/src/dv360updater/UpdaterEngine.java
6a755457895bbf696439065171ace00301aa3711
[]
no_license
ArturoMartinez/DV360WorkbenchUpdater
ba1c5249fb88914fada1e39b8513034cfc7f2152
3f55328c89be7789a8fe760116e1d6189a7ca3ea
refs/heads/master
2020-05-18T08:19:02.460881
2014-10-17T13:07:44
2014-10-17T13:07:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,494
java
package dv360updater; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.ResourceBundle; import javax.swing.JProgressBar; import javax.swing.SwingWorker; /** * @version 1.0.00 * @author Arturo Martínez <arturo.martinez@gdsmodellica.com> */ public class UpdaterEngine extends SwingWorker{ private static Object _settings = null; private List<String> _extensions; private JProgressBar _status; private JProgressBar _global; private File _dest; private String _version; private EngineLogger _log; public EngineLogger getLog(){ return _log; } public UpdaterEngine(){} public UpdaterEngine(List<String> aExt){ this(); _extensions = aExt; } public UpdaterEngine(List<String> aExt, JProgressBar globalBar){ this(aExt); _global = globalBar; } public UpdaterEngine(List<String> aExt, JProgressBar globalBar, JProgressBar fileBar){ this(aExt, globalBar); _status = fileBar; } public UpdaterEngine(List<String> aExt, JProgressBar globalBar, JProgressBar fileBar, boolean defSettings, String exePath) throws IOException{ this(aExt, globalBar, fileBar); _log = new EngineLogger(exePath); setSettingsBundle(defSettings, exePath); } public UpdaterEngine(List<String> aExt, JProgressBar globalBar, JProgressBar fileBar, boolean defSettings, String exePath, DV360Versions version, File destination) throws IOException{ this(aExt, globalBar, fileBar, defSettings, exePath); _version = version.getSelected(); _dest = destination; } private void setSettingsBundle(boolean byDefault, String exePath) throws FileNotFoundException, IOException{ if (byDefault){ _settings = ResourceBundle.getBundle("resources.conf.settings"); }else{ Properties settings = new Properties(); FileInputStream fis = new FileInputStream(new File((new File(exePath).getParentFile().getPath())+File.separator+"resources"+File.separator+"conf"+File.separator+"settings.properties")); settings.load(fis); _settings = settings; } } private boolean copyAllFilesByExtensions() throws IOException{ File[] filesInDir = null; if (_settings instanceof ResourceBundle){ ResourceBundle settings = (ResourceBundle) _settings; filesInDir = new File(settings.getString("UPD_PATH")+settings.getString("UPD_FOLD")+"-"+_version).listFiles(); _log.info("Source folder: \""+settings.getString("UPD_PATH")+settings.getString("UPD_FOLD")+"-"+_version+"\""); } if (_settings instanceof Properties){ Properties settings = (Properties) _settings; filesInDir = new File(settings.getProperty("UPD_PATH")+settings.getProperty("UPD_FOLD")+"-"+_version).listFiles(); _log.info("Source folder: \""+settings.getProperty("UPD_PATH")+settings.getProperty("UPD_FOLD")+"-"+_version+"\""); } Iterator<String> extensions = _extensions.iterator(); _global.setMaximum(_extensions.size()); _global.setValue(0); while (extensions.hasNext()){ String extension = extensions.next(); _log.info("Start coping all \""+extension+"\" file/s"); _global.setString("Step: "+_global.getValue()+1+"/"+_extensions.size()+" Coping \""+extension+"\" file/s"); _global.setValue(_global.getValue()+1); _global.repaint(); copyFilesByExtension(filesInDir, extension); }//while return true; } private void copyFilesByExtension(File[] files, String ext) throws IOException{ for (File pf : files){ if (extensionMatch(pf, ext) || isMatchName(pf, ext)){ _status.setMaximum(Integer.parseInt(String.valueOf(pf.length()))); _status.setValue(0); copyFile(pf); } }//for:pf } private boolean extensionMatch(File file, String ext){ return (file.getName().indexOf("."+ext) != -1); } private boolean isMatchName(File file, String name){ return (file.getName().toLowerCase().equals(name.toLowerCase())); } private void copyFile(File file) throws IOException{ OutputStream os = new FileOutputStream(_dest+File.separator+file.getName()); InputStream is = new FileInputStream(file); _log.info("Coping "+file.getName()); byte[] buffer = new byte[1024]; int length; while((length = is.read(buffer)) > 0){ os.write(buffer, 0, length); _status.setString("Coping: "+file.getName()+" - "+length+"/"+_status.getMaximum()+" bytes"); _status.setValue(_status.getValue()+length); _status.repaint(); }//while is.close(); os.close(); } @Override protected Object doInBackground() throws Exception { return copyAllFilesByExtensions(); } }
[ "arturo.martinez@gdsmodellica.com" ]
arturo.martinez@gdsmodellica.com
b06ce847dd3040a4d61c3ef8e50a8657e241fa71
b7428a4b39b1000a64c0d9ebd8fc4e3322693542
/src/main/java/com/bertazoli/charity/shared/beans/Donation.java
3b199c04d2c69e4d870f0fb03b05647d861e3337
[]
no_license
yawenc/Charity
655dc836e13ecf2025a5111bbe70ef0247ccd5d2
6183e4266f7875ce4da56e1e4b4e13297181c7cc
refs/heads/master
2020-12-25T08:50:28.086988
2014-05-24T12:36:55
2014-05-24T12:36:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,748
java
package com.bertazoli.charity.shared.beans; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import urn.ebay.apis.eBLBaseComponents.CurrencyCodeType; import urn.ebay.apis.eBLBaseComponents.PaymentCodeType; import urn.ebay.apis.eBLBaseComponents.PaymentStatusCodeType; import com.google.gwt.user.client.rpc.IsSerializable; @Entity @Table(name = "donation") public class Donation implements IsSerializable { @Id @GeneratedValue private Long id; private Long userId; private Long drawId; private Long charityId; private Integer percentageToKeep; private Timestamp donationDate; private String transaction; private CurrencyCodeType feeAmountCurrency; private Double feeAmountValue; private CurrencyCodeType grossAmountCurrency; private Double grossAmountValue; private PaymentStatusCodeType paymentStatus; private PaymentCodeType paymentType; private Boolean completed; private String paypalToken; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public Long getDrawId() { return drawId; } public void setDrawId(Long drawId) { this.drawId = drawId; } public Timestamp getDonationDate() { return donationDate; } public void setDonationDate(Timestamp donationDate) { this.donationDate = donationDate; } public String getTransaction() { return transaction; } public void setTransaction(String transaction) { this.transaction = transaction; } public CurrencyCodeType getFeeAmountCurrency() { return feeAmountCurrency; } public void setFeeAmountCurrency(CurrencyCodeType feeAmountCurrency) { this.feeAmountCurrency = feeAmountCurrency; } public Double getFeeAmountValue() { return feeAmountValue; } public void setFeeAmountValue(Double feeAmountValue) { this.feeAmountValue = feeAmountValue; } public CurrencyCodeType getGrossAmountCurrency() { return grossAmountCurrency; } public void setGrossAmountCurrency(CurrencyCodeType grossAmountCurrency) { this.grossAmountCurrency = grossAmountCurrency; } public Double getGrossAmountValue() { return grossAmountValue; } public void setGrossAmountValue(Double grossAmountValue) { this.grossAmountValue = grossAmountValue; } public PaymentStatusCodeType getPaymentStatus() { return paymentStatus; } public void setPaymentStatus(PaymentStatusCodeType paymentStatus) { this.paymentStatus = paymentStatus; } public PaymentCodeType getPaymentType() { return paymentType; } public void setPaymentType(PaymentCodeType paymentType) { this.paymentType = paymentType; } public Boolean getCompleted() { return completed; } public void setCompleted(Boolean completed) { this.completed = completed; } public Long getCharityId() { return charityId; } public void setCharityId(Long charityId) { this.charityId = charityId; } public String getPaypalToken() { return paypalToken; } public void setPaypalToken(String paypalToken) { this.paypalToken = paypalToken; } public Integer getPercentageToKeep() { return percentageToKeep; } public void setPercentageToKeep(Integer percentageToKeep) { this.percentageToKeep = percentageToKeep; } }
[ "vitor@bertazoli.com" ]
vitor@bertazoli.com
59b3dba0da06005be17b70410a64f9b7dbb22cb4
ca81b1d6c08352297ab04a7267433badea5a263d
/test/ru/javawebinar/basejava/storage/AbstractStorageTest.java
8b17187be004bbb419cba385904543492327adcd
[]
no_license
Scaryman/basejava
7c3d067df21e9afac5360f101fed96463e203217
6c17a734cb02cd4dddccd1ced7c621365897be39
refs/heads/master
2020-03-22T21:55:06.331048
2018-12-10T03:48:35
2018-12-10T03:48:35
140,706,818
0
0
null
null
null
null
UTF-8
Java
false
false
2,944
java
package ru.javawebinar.basejava.storage; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import ru.javawebinar.basejava.exception.ExistStorageException; import ru.javawebinar.basejava.exception.NotExistStorageException; import ru.javawebinar.basejava.model.Resume; import java.util.List; public abstract class AbstractStorageTest { Storage storage; private static final String UUID_1 = "uuid1"; private static final String UUID_2 = "uuid2"; private static final String UUID_3 = "uuid3"; private static final String UUID_4 = "uuid4"; private static final Resume R1; private static final Resume R2; private static final Resume R3; private static final Resume R4; static { R1 = new Resume(UUID_1, "Name1"); R2 = new Resume(UUID_2, "Name2"); R3 = new Resume(UUID_3, "Name3"); R4 = new Resume(UUID_4, "Name4"); } AbstractStorageTest(Storage storage) { this.storage = storage; } @Before public void setUp() { storage.clear(); storage.save(R1); storage.save(R2); storage.save(R3); } @Test public void save() { storage.save(R4); Assert.assertEquals(4, storage.size()); Assert.assertEquals(R4, storage.get(UUID_4)); } @Test(expected = ExistStorageException.class) public void saveExist() { storage.save(R1); } @Test public void update() { Resume rUpdate = new Resume(UUID_1, "Name1"); storage.update(rUpdate); Assert.assertEquals(rUpdate, storage.get(UUID_1)); } @Test(expected = NotExistStorageException.class) public void updateNotExist() { Resume rUpdate = new Resume("Name"); storage.update(rUpdate); } @Test(expected = NotExistStorageException.class) public void delete() { storage.delete(UUID_1); Assert.assertEquals(2, storage.size()); storage.get(UUID_1); } @Test(expected = NotExistStorageException.class) public void deleteNotExist() { storage.delete("dummy"); } @Test public void clear() { storage.clear(); Assert.assertEquals(0, storage.size()); } @Test public void size() { Assert.assertEquals(3, storage.size()); } @Test public void get() { Assert.assertEquals(R1, storage.get(UUID_1)); Assert.assertEquals(R2, storage.get(UUID_2)); Assert.assertEquals(R3, storage.get(UUID_3)); } @Test(expected = NotExistStorageException.class) public void getNotExist() { storage.get("dummy"); } @Test public void getAllSorted() { List<Resume> result = storage.getAllSorted(); Assert.assertEquals(3, result.size()); Assert.assertEquals(R1, result.get(0)); Assert.assertEquals(R2, result.get(1)); Assert.assertEquals(R3, result.get(2)); } }
[ "scaryman86@gmail.com" ]
scaryman86@gmail.com
036c6344c605e8e7968eff9e5cbdf9c75e743188
9d7124d9f7c4ed77cc40abcaf2c4686bdba75635
/app/src/main/java/com/example/administrator/helloandroid/pkg_material/FloatingMenuLibrary_01_Exams.java
d46edf3972416d22a51127ec74146e614386472c
[]
no_license
hyunkiung/HelloAndroid
53c5a2b84c3aa5bc0044eb980583942f7b2ff89a
f382b5b63bb2cd01ffca2fa96cb64c7836a74d58
refs/heads/master
2021-01-21T12:36:43.697345
2015-06-23T04:12:43
2015-06-23T04:12:43
32,372,998
0
1
null
null
null
null
UTF-8
Java
false
false
8,379
java
package com.example.administrator.helloandroid.pkg_material; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.view.ContextThemeWrapper; import android.view.MenuItem; import android.view.View; import android.view.animation.AnimationUtils; import android.view.animation.OvershootInterpolator; import android.widget.Toast; import com.example.administrator.helloandroid.R; import com.github.clans.fab.FloatingActionButton; import com.github.clans.fab.FloatingActionMenu; import java.util.ArrayList; import java.util.List; public class FloatingMenuLibrary_01_Exams extends AppCompatActivity { private FloatingActionButton fab1; private FloatingActionButton fab2; private FloatingActionButton fab3; private FloatingActionButton fab12; private FloatingActionButton fab22; private FloatingActionButton fab32; private List<FloatingActionMenu> menus = new ArrayList<>(); private Handler mUiHandler = new Handler(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_floating_menu_library_01__exams); getSupportActionBar().setDisplayHomeAsUpEnabled(true); FloatingActionMenu menu1 = (FloatingActionMenu) findViewById(R.id.menu1); final FloatingActionMenu menu2 = (FloatingActionMenu) findViewById(R.id.menu2); final FloatingActionMenu menu3 = (FloatingActionMenu) findViewById(R.id.menu3); FloatingActionMenu menu4 = (FloatingActionMenu) findViewById(R.id.menu4); FloatingActionMenu menuDown = (FloatingActionMenu) findViewById(R.id.menu_down); FloatingActionMenu menuLabelsRight = (FloatingActionMenu) findViewById(R.id.menu_labels_right); final FloatingActionButton programFab1 = new FloatingActionButton(this); programFab1.setButtonSize(FloatingActionButton.SIZE_MINI); programFab1.setLabelText("Programmatically added button"); programFab1.setImageResource(R.drawable.ic_edit); menu1.addMenuButton(programFab1); programFab1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(), programFab1.getLabelText(), Toast.LENGTH_SHORT).show(); } }); ContextThemeWrapper context = new ContextThemeWrapper(this, R.style.MenuButtonsStyle); FloatingActionButton programFab2 = new FloatingActionButton(context); programFab2.setLabelText("Programmatically added button"); programFab2.setImageResource(R.drawable.ic_edit); menu2.addMenuButton(programFab2); menus.add(menuDown); menus.add(menu1); menus.add(menu2); menus.add(menu3); menus.add(menu4); menus.add(menuLabelsRight); menuDown.hideMenuButton(false); menu1.hideMenuButton(false); menu2.hideMenuButton(false); menu3.hideMenuButton(false); menu4.hideMenuButton(false); menuLabelsRight.hideMenuButton(false); int delay = 400; for (final FloatingActionMenu menu : menus) { mUiHandler.postDelayed(new Runnable() { @Override public void run() { menu.showMenuButton(true); } }, delay); delay += 150; } menu1.setClosedOnTouchOutside(true); menu4.setIconAnimated(false); menu2.setOnMenuToggleListener(new FloatingActionMenu.OnMenuToggleListener() { @Override public void onMenuToggle(boolean opened) { String text = ""; if (opened) { text = "Menu opened"; } else { text = "Menu closed"; } Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show(); } }); fab1 = (FloatingActionButton) findViewById(R.id.fab1); fab2 = (FloatingActionButton) findViewById(R.id.fab2); fab3 = (FloatingActionButton) findViewById(R.id.fab3); fab12 = (FloatingActionButton) findViewById(R.id.fab12); fab22 = (FloatingActionButton) findViewById(R.id.fab22); fab32 = (FloatingActionButton) findViewById(R.id.fab32); fab1.setEnabled(false); fab1.setOnClickListener(clickListener); fab2.setOnClickListener(clickListener); fab3.setOnClickListener(clickListener); fab12.setOnClickListener(clickListener); fab22.setOnClickListener(clickListener); fab32.setOnClickListener(clickListener); final FloatingActionButton fabEdit = (FloatingActionButton) findViewById(R.id.fab_edit); fabEdit.setShowAnimation(AnimationUtils.loadAnimation(this, R.anim.scale_up)); fabEdit.setHideAnimation(AnimationUtils.loadAnimation(this, R.anim.scale_down)); new Handler().postDelayed(new Runnable() { @Override public void run() { fabEdit.show(true); } }, delay + 150); findViewById(R.id.fab_edit).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //startActivity(new Intent(FloatingMenusActivity.this, RecyclerViewActivity.class)); Toast.makeText(getApplicationContext(), "어디로 갈까요", Toast.LENGTH_SHORT).show(); } }); createCustomAnimation(); } private void createCustomAnimation() { final FloatingActionMenu menu3 = (FloatingActionMenu) findViewById(R.id.menu3); AnimatorSet set = new AnimatorSet(); ObjectAnimator scaleOutX = ObjectAnimator.ofFloat(menu3.getMenuIconView(), "scaleX", 1.0f, 0.2f); ObjectAnimator scaleOutY = ObjectAnimator.ofFloat(menu3.getMenuIconView(), "scaleY", 1.0f, 0.2f); ObjectAnimator scaleInX = ObjectAnimator.ofFloat(menu3.getMenuIconView(), "scaleX", 0.2f, 1.0f); ObjectAnimator scaleInY = ObjectAnimator.ofFloat(menu3.getMenuIconView(), "scaleY", 0.2f, 1.0f); scaleOutX.setDuration(50); scaleOutY.setDuration(50); scaleInX.setDuration(150); scaleInY.setDuration(150); scaleInX.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { menu3.getMenuIconView().setImageResource(menu3.isOpened() ? R.drawable.ic_close : R.drawable.ic_star); } }); set.play(scaleOutX).with(scaleOutY); set.play(scaleInX).with(scaleInY).after(scaleOutX); set.setInterpolator(new OvershootInterpolator(2)); menu3.setIconToggleAnimatorSet(set); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; } return super.onOptionsItemSelected(item); } private View.OnClickListener clickListener = new View.OnClickListener() { @Override public void onClick(View v) { String text = ""; switch (v.getId()) { case R.id.fab1: text = fab1.getLabelText(); break; case R.id.fab2: text = fab2.getLabelText(); fab2.setVisibility(View.GONE); break; case R.id.fab3: text = fab3.getLabelText(); fab2.setVisibility(View.VISIBLE); break; case R.id.fab12: text = fab12.getLabelText(); break; case R.id.fab22: text = fab22.getLabelText(); break; case R.id.fab32: text = fab32.getLabelText(); break; } Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show(); } }; }
[ "euroeaster@hanmail.net" ]
euroeaster@hanmail.net
f62a875cee7861a8f23a279c9b57b70dbeae717c
351709cfd3a6c6ef1bb313ac2e5f4bedf50421a4
/src/main/java/org/rdfhdt/hdt/rdf/parsers/RDFParserRAR.java
2fe6e98d6340b312cb728c11ec2a60c506af9fe1
[ "MIT" ]
permissive
dkw-aau/ColChain-Java
937b310c593394b3106ae12a34129a7646b4e220
eafb98ee88e551b735cb1e9f568cc61a3a75f091
refs/heads/main
2023-06-27T12:16:46.446241
2021-07-05T13:27:58
2021-07-05T13:27:58
490,197,945
0
1
MIT
2023-06-20T09:11:53
2022-05-09T08:30:34
null
UTF-8
Java
false
false
3,482
java
package org.rdfhdt.hdt.rdf.parsers; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Arrays; import org.rdfhdt.hdt.enums.RDFNotation; import org.rdfhdt.hdt.exceptions.NotImplementedException; import org.rdfhdt.hdt.exceptions.ParserException; import org.rdfhdt.hdt.rdf.RDFParserCallback; import org.rdfhdt.hdt.rdf.RDFParserFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static java.nio.charset.StandardCharsets.UTF_8; /** * Parses a RAR file directly, processing each file that contains rdf separately. * * It uses RDFNotation.guess() to guess the format of each specific file. If not recognised, each file of the tar is ignored. * * * @author * */ public class RDFParserRAR implements RDFParserCallback { private static final Logger log = LoggerFactory.getLogger(RDFParserRAR.class); private final static String [] cmdList = { "unrar", "vb" , "<RAR>"}; private final static String [] cmdExtractFile = { "unrar", "p", "-inul", "<RAR>", "<FILE>" }; private static Boolean available; // List files in rar // unrar vb FILE.rar // Read a file // unrar p -inul FILE.rar path/to/file.txt public static boolean isAvailable() { if(available==null) { try { new ProcessBuilder(cmdList[0]).start(); available=true; } catch (IOException e) { available=false; } } return available; } // // FIXME: Implements /* (non-Javadoc) * @see hdt.rdf.RDFParserCallback#doParse(java.lang.String, java.lang.String, hdt.enums.RDFNotation, hdt.rdf.RDFParserCallback.Callback) */ @Override public void doParse(String rarFile, String baseUri, RDFNotation notation, RDFCallback callback) throws ParserException { try { String [] cmdList1 = Arrays.copyOf(cmdList, cmdList.length); cmdList1[2]=rarFile; ProcessBuilder listProcessBuilder = new ProcessBuilder(cmdList1); // listProcess.redirectInput(tempFile); Process processList = listProcessBuilder.start(); BufferedReader reader = new BufferedReader(new InputStreamReader(processList.getInputStream(), UTF_8)); String [] cmdExtract = Arrays.copyOf(cmdExtractFile, cmdExtractFile.length); cmdExtract[3]=rarFile; String fileName; // Read file name from list while ((fileName = reader.readLine()) != null) { // FIXME: Create several processes in background? log.info("File: {}", fileName); RDFNotation guessnot = RDFNotation.guess(fileName); if(guessnot!=null) { // Create log.info("Parse from rar: {} as {}", fileName, guessnot); RDFParserCallback parser = RDFParserFactory.getParserCallback(guessnot); cmdExtract[4]=fileName; ProcessBuilder extractProcessBuilder = new ProcessBuilder(cmdExtract); Process processExtract = extractProcessBuilder.start(); InputStream in = processExtract.getInputStream(); parser.doParse(in, baseUri, guessnot, callback); in.close(); processExtract.waitFor(); } else { log.info("Parse from rar {}: No suitable parser found.", fileName); } } reader.close(); processList.waitFor(); } catch (Exception e) { log.error("Unexpected exception parsing file: {}", rarFile, e); throw new ParserException(); } } @Override public void doParse(InputStream input, String baseUri, RDFNotation notation, RDFCallback callback) throws ParserException { throw new NotImplementedException(); } }
[ "colchainorg@gmail.com" ]
colchainorg@gmail.com
fd1d35fc208ff6bd557e5d8827a1d1f38655c7a6
870582464bcc2ad1572fca3eccd98debd05b69fa
/src/main/java/com/java1234/service/impl/BlogServiceImpl.java
ff6d708ac6744381edfc4174ca8a17afa4eccc2e
[]
no_license
xiaoXinO/Blog-test
ed75bec4b6a84e7e4ebd2b31dd9e4bd5ebae785c
1ca83a0b6a088ffc9d5ccd4158a9bbb650719085
refs/heads/master
2021-01-22T01:48:34.131044
2017-09-03T04:12:34
2017-09-03T04:12:34
102,240,626
0
0
null
null
null
null
IBM852
Java
false
false
1,443
java
package com.java1234.service.impl; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.java1234.dao.BlogDao; import com.java1234.entity.Blog; import com.java1234.service.BlogService; /** * ▓ę┐═Service╩Á¤Í└Ó * * @author Administrator */ @Service("blogService") public class BlogServiceImpl implements BlogService { @Resource private BlogDao blogDao; public List<Blog> countList() { return blogDao.countList(); } public List<Blog> list(Map<String, Object> map) { return blogDao.list(map); } public Long getTotal(Map<String, Object> map) { return blogDao.getTotal(map); } @Override public Blog findById(Integer id) { return blogDao.findById(id); } @Override public Integer update(Blog blog) { return blogDao.update(blog); } @Override public Blog getLastBlog(Integer id) { return blogDao.getLastBlog(id); } @Override public Blog getNextBlog(Integer id) { return blogDao.getNextBlog(id); } @Override public Integer add(Blog blog) { return blogDao.add(blog); } @Override public Integer delete(Integer id) { return blogDao.delete(id); } @Override public Integer findByTypeId(Integer typeId) { return blogDao.findByTypeId(typeId); } }
[ "624126837@qq.com" ]
624126837@qq.com
5f91b322c80cf6e9395a2ddfbc389f14cf840dd6
9e4cf7be48b8c717f14316d56554aa2ad505d450
/src/main/java/com/peng/news/controller/management/NewsTransitController.java
84e328607a96fd9cfd1195db54dde5cb1431e6e3
[]
no_license
X-PENG/news
a0b2074c7ba76d65a727661b3377222e4203800a
1e83fd69c364877abfd30c4acc8f7b95067b3f4c
refs/heads/main
2023-08-25T08:25:12.367949
2021-10-21T15:59:31
2021-10-21T15:59:31
361,796,349
2
0
null
null
null
null
UTF-8
Java
false
false
4,031
java
package com.peng.news.controller.management; import com.peng.news.model.CustomizedPage; import com.peng.news.model.Result; import com.peng.news.model.dto.ReModificationInfoDTO; import com.peng.news.model.dto.ReviewFailInfoDTO; import com.peng.news.model.enums.NewsStatus; import com.peng.news.model.paramBean.NewsBeanForEditorSave; import com.peng.news.model.paramBean.QueryNewsBeanForEditor; import com.peng.news.model.po.NewsPO; import com.peng.news.model.po.UserPO; import com.peng.news.model.vo.NewsVO; import com.peng.news.service.NewsServiceForEditor; import com.peng.news.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 新闻中转站菜单相关接口 * @author PENG * @version 1.0 * @date 2021/3/24 10:39 */ @RestController @RequestMapping("/management/news/transit") public class NewsTransitController { @Autowired NewsServiceForEditor newsServiceForEditor; @Autowired UserService userService; @GetMapping("/hello") public String hello(){ return this.getClass().getName() + " hello"; } /** * 分页+条件查询中转状态的新闻列表 * @param page * @param pageSize * @param queryBean * @return */ @GetMapping("/") public Result<CustomizedPage<NewsVO>> transitNewsList(Integer page, Integer pageSize, QueryNewsBeanForEditor queryBean) { return Result.success(newsServiceForEditor.transitNewsList(page, pageSize, queryBean)); } /** * 查询所有中转状态,用于状态下拉列表 * @return */ @GetMapping("/transitStatusList") public Result<NewsStatus[]> transitStatusList() { return Result.success(NewsStatus.TRANSIT_STATUS_ARRAY); } /** * 查询所有传稿人,用于录入人下拉列表 * @return */ @GetMapping("/userSelectData") public Result<List<UserPO>> userSelectData() { return Result.success(userService.userSelectData()); } /** * 查询一个中转状态的新闻,用于预览或编辑时查询 * @return */ @GetMapping("/{newsId}") public Result<NewsPO> selectTransitNews(@PathVariable int newsId) { return Result.success(newsServiceForEditor.selectTransitNews(newsId)); } /** * 删除一个中转状态的新闻 * @return */ @DeleteMapping("/{newsId}") public Result deleteTransitNews(@PathVariable int newsId) { newsServiceForEditor.deleteTransitNews(newsId); return Result.success("删除成功!"); } /** * 提交审核中转状态的新闻 * @return */ @PutMapping("/{newsId}") public Result submitTransitNewsToReview(@PathVariable int newsId) { newsServiceForEditor.submitTransitNewsToReview(newsId); return Result.success("提交成功!"); } /** * 保存修改 或 保存并提交审核 * @param tag 等于1,就是保存修改;等于2,就是保存并提交审核;其他值,非法请求! * @param news * @return */ @PostMapping("/{tag}") public Result saveOrSaveAndSubmitReview(@PathVariable int tag, @RequestBody NewsBeanForEditorSave news) { newsServiceForEditor.saveOrSaveAndSubmitReview(tag, news); return Result.success(tag == 1 ? "保存成功!" : "成功保存并提交审核!"); } /** * 查询审核失败相关信息 * @return */ @GetMapping("/reviewFailInfo/{newsId}") public Result<ReviewFailInfoDTO> queryReviewFailInfo(@PathVariable int newsId){ return Result.success(newsServiceForEditor.queryReviewFailInfo(newsId)); } /** * 查询打回修改相关信息 * @return */ @GetMapping("/reModification/{newsId}") public Result<ReModificationInfoDTO> queryReModificationInfo(@PathVariable int newsId){ return Result.success(newsServiceForEditor.queryReModificationInfo(newsId)); } }
[ "2318511681@qq.com" ]
2318511681@qq.com
94d25c37262f96289aa3a4a69e36f6a07319aa10
ee19cc3f94e1f4696c0aed8b27291026c232d65b
/DLP/src/ast/tipo/TipoStruct.java
3bdc92f8997e416c46413b5b1167e0ada1a3fd55
[]
no_license
MiriamLynx/Current-DLP
3bf119d02e1ff5a131c8c3bea7217b079b6b8c28
87bb3ceffa0939807cb12d3f65937f7a4d40c962
refs/heads/master
2020-04-15T23:37:18.422155
2015-05-13T16:22:34
2015-05-13T16:22:34
30,656,648
0
0
null
null
null
null
UTF-8
Java
false
false
708
java
package ast.tipo; import ast.AbstractAST; import ast.visitor.Visitor; public class TipoStruct extends AbstractAST implements Tipo { public String nombre; public TipoStruct(int linea, int columna, String nombre) { super(linea, columna); this.nombre = nombre; } @Override public String toString() { return "Tipo struct [ " + nombre + " ]"; } public void accept(Visitor visitor, Object param) { visitor.visit(this, param); } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public int size() { return 0; } public String getMAPLname() { return getNombre(); } public String getSufijo() { return "nope"; } }
[ "mirylynx@gmail.com" ]
mirylynx@gmail.com
5a6e2281ba4d8dd1a0d5bf91a3a3669bd17389a0
16bfe4d91fa6d8c7cd1dce4db0d409e9c3ddc2af
/raj/graph/GraphValidTree.java
53d7d71ce27e7751aef0e89d1bfa5290628f398b
[]
no_license
passionatecoderraj/dsa
84eb03b524efeb81012c91491fc3dce9aa65aa7a
b8a9654fed1183e464915fb4b8481ae10fe266d6
refs/heads/master
2020-05-21T12:24:38.812925
2020-01-21T04:29:58
2020-01-21T04:29:58
48,559,484
8
6
null
null
null
null
UTF-8
Java
false
false
3,593
java
package com.raj.graph; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.Map; import java.util.Queue; import java.util.Set; /** * * @author Raj * * Given n nodes labeled from 0 to n - 1 and a list of undirected edges * (each edge is a pair of nodes), check if these edges form a valid * tree. */ public class GraphValidTree { public static boolean validTreeBfs(int n, int[][] edges) { Map<Integer, Set<Integer>> map = new HashMap<>(); // construct graph for (int[] edge : edges) { map.compute(edge[0], (key, value) -> { if (null == value) { value = new HashSet<>(); } value.add(edge[1]); return value; }); map.compute(edge[1], (key, value) -> { if (null == value) { value = new HashSet<>(); } value.add(edge[0]); return value; }); } Set<Integer> visited = new HashSet<>(); Queue<Integer> queue = new LinkedList<>(); queue.offer(map.keySet().iterator().next()); while (!queue.isEmpty()) { int cur = queue.poll(); if (visited.contains(cur)) return false; visited.add(cur); if (map.containsKey(cur)) { for (int neighbour : map.get(cur)) { if (!visited.contains(neighbour)) { queue.offer(neighbour); } } } } for (int i = 0; i < n; i++) { if (!visited.contains(i)) { return false; } } return true; } public static boolean validTreeDfs(int n, int[][] edges) { Map<Integer, Set<Integer>> map = new HashMap<>(); // construct graph for (int[] edge : edges) { map.compute(edge[0], (key, value) -> { if (null == value) { value = new HashSet<>(); } value.add(edge[1]); return value; }); map.compute(edge[1], (key, value) -> { if (null == value) { value = new HashSet<>(); } value.add(edge[0]); return value; }); } Set<Integer> visited = new HashSet<>(); if (!dfs(map.keySet().iterator().next(), -1, visited, map)) { return false; } for (int i = 0; i < n; i++) { if (!visited.contains(i)) { return false; } } return true; } private static boolean dfs(int cur, int parent, Set<Integer> visited, Map<Integer, Set<Integer>> map) { if (visited.contains(cur)) return false; visited.add(cur); if (map.containsKey(cur)) { for (int neighbour : map.get(cur)) { if (parent == neighbour) continue; if (!dfs(neighbour, cur, visited, map)) { return false; } } } return true; } // Time : O(V), Space : O(V) public static boolean validTreeUnionFind(int n, int[][] edges) { if (n == 0 || edges.length == 0) return true; DisjointSet ds = new DisjointSet(); for (int i = 0; i < n; i++) { ds.makeSet(i); } for (int[] edge : edges) { long parent1 = ds.findSet(edge[0]); long parent2 = ds.findSet(edge[1]); if (parent1 == parent2) return false; ds.union(parent1, parent2); } return true; } public static void main(String[] args) { int edges[][] = { { 0, 1 }, { 1, 2 }, { 0, 3 }, { 3, 4 }, { 4, 5 }, { 5, 1 } }; int edges2[][] = { { 0, 1 }, { 1, 2 }, { 0, 3 }, { 3, 4 }, { 4, 5 } }; boolean result = false; result = validTreeUnionFind(6, edges); System.out.println(result); result = validTreeUnionFind(6, edges2); System.out.println(result); result = validTreeDfs(6, edges); System.out.println(result); result = validTreeDfs(6, edges2); System.out.println(result); result = validTreeBfs(6, edges); System.out.println(result); result = validTreeBfs(6, edges2); System.out.println(result); } }
[ "passionatecoderraj@gmail.com" ]
passionatecoderraj@gmail.com
491443baaf58ef20365673a670cf059eb993c55b
72abce1e50ec671ae27aecef16faedd109dbf91d
/app/src/main/java/com/foad/usama/popularmovies/models/Review.java
45fffd610e117f1306a72e4d2235fec740bb446f
[ "MIT" ]
permissive
UsamaFoad/PopularMovies
66022bca2fce566bd564cafb3bcb29ea8286337a
f3ee7295cf7d839e3f925aad5b0a6cd3677b9728
refs/heads/master
2020-04-07T20:42:47.566899
2018-11-22T15:03:33
2018-11-22T15:03:33
158,695,160
0
0
null
null
null
null
UTF-8
Java
false
false
980
java
package com.foad.usama.popularmovies.models; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.SerializedName; public class Review implements Parcelable { public static final Parcelable.Creator<Review> CREATOR = new Parcelable.Creator<Review>() { public Review createFromParcel(Parcel in) { return new Review(in); } public Review[] newArray(int size) { return new Review[size]; } }; @SerializedName("author") public String author; @SerializedName("content") public String content; public Review() { } private Review(Parcel in) { author = in.readString(); content = in.readString(); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeString(author); parcel.writeString(content); } }
[ "usamafoad@gmail.com" ]
usamafoad@gmail.com
8a106bd684c39c5c5ba9a4915c7d26a973c3eeb8
3f632a4645cbfe245030e7613554cb5526fe4a39
/app/src/main/java/it/polimi/dmw/wit/slidingTabs/SlidingTabStrip.java
0499163ec0483a1bb368a59d7232fcac5d3c26d9
[]
no_license
desoss/WIT
524a606607a38ed521ec08e17a4f98768335bf6a
74cdb0ef6ebfc4feb0389d5217dde2c14af17661
refs/heads/master
2020-12-01T13:04:57.536828
2016-05-03T13:54:19
2016-05-03T13:54:19
29,439,806
0
0
null
null
null
null
UTF-8
Java
false
false
6,486
java
package it.polimi.dmw.wit.slidingTabs; /* * Copyright 2014 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. */ import android.R; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.util.AttributeSet; import android.util.TypedValue; import android.view.View; import android.widget.LinearLayout; class SlidingTabStrip extends LinearLayout { private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0; private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26; private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 3; private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5; private final int mBottomBorderThickness; private final Paint mBottomBorderPaint; private final int mSelectedIndicatorThickness; private final Paint mSelectedIndicatorPaint; private final int mDefaultBottomBorderColor; private int mSelectedPosition; private float mSelectionOffset; private SlidingTabLayout.TabColorizer mCustomTabColorizer; private final SimpleTabColorizer mDefaultTabColorizer; SlidingTabStrip(Context context) { this(context, null); } SlidingTabStrip(Context context, AttributeSet attrs) { super(context, attrs); setWillNotDraw(false); final float density = getResources().getDisplayMetrics().density; TypedValue outValue = new TypedValue(); context.getTheme().resolveAttribute(R.attr.colorForeground, outValue, true); final int themeForegroundColor = outValue.data; mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor, DEFAULT_BOTTOM_BORDER_COLOR_ALPHA); mDefaultTabColorizer = new SimpleTabColorizer(); mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR); mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density); mBottomBorderPaint = new Paint(); mBottomBorderPaint.setColor(mDefaultBottomBorderColor); mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density); mSelectedIndicatorPaint = new Paint(); } void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) { mCustomTabColorizer = customTabColorizer; invalidate(); } void setSelectedIndicatorColors(int... colors) { // Make sure that the custom colorizer is removed mCustomTabColorizer = null; mDefaultTabColorizer.setIndicatorColors(colors); invalidate(); } void onViewPagerPageChanged(int position, float positionOffset) { mSelectedPosition = position; mSelectionOffset = positionOffset; invalidate(); } @Override protected void onDraw(Canvas canvas) { final int height = getHeight(); final int childCount = getChildCount(); final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null ? mCustomTabColorizer : mDefaultTabColorizer; // Thick colored underline below the current selection if (childCount > 0) { View selectedTitle = getChildAt(mSelectedPosition); int left = selectedTitle.getLeft(); int right = selectedTitle.getRight(); int color = tabColorizer.getIndicatorColor(mSelectedPosition); if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) { int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1); if (color != nextColor) { color = blendColors(nextColor, color, mSelectionOffset); } // Draw the selection partway between the tabs View nextTitle = getChildAt(mSelectedPosition + 1); left = (int) (mSelectionOffset * nextTitle.getLeft() + (1.0f - mSelectionOffset) * left); right = (int) (mSelectionOffset * nextTitle.getRight() + (1.0f - mSelectionOffset) * right); } mSelectedIndicatorPaint.setColor(color); canvas.drawRect(left, height - mSelectedIndicatorThickness, right, height, mSelectedIndicatorPaint); } // Thin underline along the entire bottom edge canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); } /** * Set the alpha value of the {@code color} to be the given {@code alpha} value. */ private static int setColorAlpha(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); } /** * Blend {@code color1} and {@code color2} using the given ratio. * * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, * 0.0 will return {@code color2}. */ private static int blendColors(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation); return Color.rgb((int) r, (int) g, (int) b); } private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer { private int[] mIndicatorColors; @Override public final int getIndicatorColor(int position) { return mIndicatorColors[position % mIndicatorColors.length]; } void setIndicatorColors(int... colors) { mIndicatorColors = colors; } } }
[ "mattia.zannin@alice.it" ]
mattia.zannin@alice.it
c02de5a8ca59493f536f02f3c54bd0c9a53138bd
6f574896b3470f98c447fd69fc60fed23c7cb11d
/src/com/paperbenni/setup/event/player/PlayerGamemode.java
dc32415899dd3f85b209dd02853b6cbba14c939b
[]
no_license
paperbenni/MinegloryPlugin
aa23036b0a89d6583e2b8d1b813d79d91a594d3f
b3d5d1386aa4008d0e20e2232b5e9d54085510dc
refs/heads/master
2022-07-26T21:23:27.839670
2018-05-23T21:32:50
2018-05-23T21:32:50
131,852,986
0
0
null
2022-07-13T10:32:18
2018-05-02T13:16:24
Java
UTF-8
Java
false
false
832
java
package com.paperbenni.setup.event.player; import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerGameModeChangeEvent; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; public class PlayerGamemode implements Listener { @EventHandler public void onChange(PlayerGameModeChangeEvent event) { Player player = event.getPlayer(); player.sendMessage("changed gamemode"); if (event.getNewGameMode().equals(GameMode.SURVIVAL)) { player.sendMessage("to survival!"); PotionEffect effect = new PotionEffect(PotionEffectType.SPEED, 10000, 2, false); player.addPotionEffect(effect); player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000, 1, false)); } } }
[ "paperbenni@gmail.com" ]
paperbenni@gmail.com
2f0bfb29d13e21d55396287d880d9f7498360d97
58df55b0daff8c1892c00369f02bf4bf41804576
/src/qk.java
e7396345780942646058e49ab247f724b27cf4ed
[]
no_license
gafesinremedio/com.google.android.gm
0b0689f869a2a1161535b19c77b4b520af295174
278118754ea2a262fd3b5960ef9780c658b1ce7b
refs/heads/master
2020-05-04T15:52:52.660697
2016-07-21T03:39:17
2016-07-21T03:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
import android.os.Build.VERSION; import android.view.MotionEvent; public final class qk { static final qp a = new ql(); static { if (Build.VERSION.SDK_INT >= 12) { a = new qo(); return; } if (Build.VERSION.SDK_INT >= 9) { a = new qn(); return; } if (Build.VERSION.SDK_INT >= 5) { a = new qm(); return; } } public static int a(MotionEvent paramMotionEvent) { return paramMotionEvent.getAction() & 0xFF; } public static int a(MotionEvent paramMotionEvent, int paramInt) { return a.a(paramMotionEvent, paramInt); } public static int b(MotionEvent paramMotionEvent) { return (paramMotionEvent.getAction() & 0xFF00) >> 8; } public static int b(MotionEvent paramMotionEvent, int paramInt) { return a.b(paramMotionEvent, paramInt); } public static float c(MotionEvent paramMotionEvent, int paramInt) { return a.c(paramMotionEvent, paramInt); } public static int c(MotionEvent paramMotionEvent) { return a.a(paramMotionEvent); } public static float d(MotionEvent paramMotionEvent, int paramInt) { return a.d(paramMotionEvent, paramInt); } public static int d(MotionEvent paramMotionEvent) { return a.b(paramMotionEvent); } public static float e(MotionEvent paramMotionEvent, int paramInt) { return a.e(paramMotionEvent, paramInt); } } /* Location: * Qualified Name: qk * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
420f80e65d288e69fd2fd47f2e3843939f280d09
431174dd1ba5b466fd9bccf091b4f02f767a47ed
/app/src/main/java/com/example/laptopgaumeo/adapter/Item_Laptop.java
dfbd416bb5a907bb8ee857ae5120d7add5b27d23
[]
no_license
vietthuan1998/android2
5fe17d00ec5eb010fe1cfc92ff1b7653c50a41a8
51159e9247c6bd0f75a2cbc5a5c2e0f8cb0342ae
refs/heads/master
2020-11-25T21:06:44.233265
2019-12-18T13:42:20
2019-12-18T13:42:20
228,847,816
0
0
null
null
null
null
UTF-8
Java
false
false
3,684
java
package com.example.laptopgaumeo.adapter; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.laptopgaumeo.MainActivity; import com.example.laptopgaumeo.R; import com.example.laptopgaumeo.bean.Laptop; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Locale; public class Item_Laptop extends RecyclerView.Adapter<Item_Laptop.ViewHolder> { private Context context; private LayoutInflater layoutInflater; public ArrayList<Laptop> listlap; private OnItemClickListener listener; public static Laptop laptop; public interface OnItemClickListener{ void onItemClick(int position); } public void setOnItemClickListener(OnItemClickListener listener){ this.listener=listener; } public static String getGia(long x){ Locale locale = new Locale("vi","VN"); NumberFormat numberFormat = NumberFormat.getCurrencyInstance(locale); String st=numberFormat.format(x); return st; } public Item_Laptop(Context context, ArrayList<Laptop> listlap) { this.context = context; this.listlap = listlap; this.layoutInflater = layoutInflater.from(context); } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = layoutInflater.inflate(R.layout.item_single_laptop,parent,false); ViewHolder viewHolder =new ViewHolder(view,listener); return viewHolder; } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { Laptop laptop = listlap.get(position); int id =this.getIdAvatar(laptop.getImage()); holder.imageView.setImageResource(id); holder.cauhinhView.setText(laptop.getCauHinh()); holder.giaview.setText(this.getGia(laptop.getGia())); } @Override public long getItemId(int position) { return super.getItemId(position); } @Override public int getItemCount() { return listlap.size(); } public static class ViewHolder extends RecyclerView.ViewHolder { ImageView imageView; TextView cauhinhView,giaview; public ViewHolder(@NonNull final View itemView, final OnItemClickListener listener) { super(itemView); imageView =(ImageView)itemView.findViewById(R.id.item_single_laptop_image); cauhinhView = (TextView) itemView.findViewById(R.id.item_single_laptop_cauhinh); giaview = (TextView)itemView.findViewById(R.id.item_single_laptop_gia); itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(listener != null){ int position = getAdapterPosition(); if(position != RecyclerView.NO_POSITION){ listener.onItemClick(position); } } } }); } } public int getIdAvatar(String name){ String pkgName = context.getPackageName(); // Trả về 0 nếu không tìm thấy. int resID = context.getResources().getIdentifier(name.toLowerCase() , "drawable", pkgName); Log.i("CustomListView", "Res Name: "+ name+"==> Res ID = "+ resID); return resID; } }
[ "vietthuan1998@gmail.com" ]
vietthuan1998@gmail.com
90f096b3d9c81f3cb5c221f603a86be80d21afe3
6a0e382a1980436979f2e4cf9f97720451cc1eb9
/jsf-exporter-test/src/main/java/com/lapis/jsfexporter/test/DynamicColumnsTableBean.java
cb0b229f2253753e106d0dbfaa82260e5378b9dc
[ "Apache-2.0" ]
permissive
elitcenk/jsfexporter
0461b7a6ab37f77840c3846b3ad4b002386526ad
ec58577b27459fd0124f538aeb35eca5a44bc40e
refs/heads/master
2021-01-22T19:22:24.406408
2015-11-26T09:06:20
2015-11-26T09:06:20
46,914,899
2
1
null
2015-11-26T08:51:33
2015-11-26T08:51:33
null
UTF-8
Java
false
false
1,680
java
/* * #%L * Lapis JSF Exporter - Test WAR * %% * Copyright (C) 2013 - 2015 Lapis Software Associates * %% * 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. * #L% */ package com.lapis.jsfexporter.test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; @ManagedBean @ViewScoped public class DynamicColumnsTableBean { private List<Integer> columns; private List<Map<Integer, Integer>> data; @PostConstruct void init() { columns = new ArrayList<Integer>(); for (int i = 0; i < 3; i++) { columns.add(i); } Random rng = new Random(); data = new ArrayList<Map<Integer,Integer>>(); for (int i = 0; i < 50; i++) { Map<Integer, Integer> row = new HashMap<Integer, Integer>(); for (int j = 0; j < columns.size(); j++) { row.put(j, rng.nextInt()); } data.add(row); } } public List<Integer> getColumns() { return columns; } public List<Map<Integer, Integer>> getData() { return data; } }
[ "rdicroce@lapis.com" ]
rdicroce@lapis.com
767e7fcb6599f53fc78adf4076a0dba660802a1b
af21e93a5c904708963a31582ff0a5412bbe4098
/201802 3UI/WIP/Aastha and Woongbeen/Releases/Version 2.0/core/src/gdx/game/Main.java
11fd9c22cfcec66577c90f8db48c9d962a55c883
[]
no_license
Mrgfhci/201802-projects
56deaa95c56befebcba2542d12013d23ebf2e491
7712a9136277f92db3ffa3836cf0b6c2fea3bbd0
refs/heads/master
2020-03-21T05:35:44.103163
2018-06-21T12:37:34
2018-06-21T12:37:34
138,168,018
0
0
null
null
null
null
UTF-8
Java
false
false
1,300
java
package gdx.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.TextureRegion; public class Main extends ApplicationAdapter { SpriteBatch batch; Texture img; Sprite sprite; TextureRegion trBackground; @Override public void create() { batch = new SpriteBatch(); trBackground = new TextureRegion(new Texture("background.png"), 0, 0, 700, 525); img = new Texture("Spongebob.png"); sprite = new Sprite(img); sprite.setPosition( Gdx.graphics.getWidth() / 4 - sprite.getWidth() / 2, Gdx.graphics.getHeight() / 2 - sprite.getHeight()); } @Override public void render() { Gdx.gl.glClearColor(45 / 255f, 233 / 255f, 255 / 255f, 1); //colour Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.begin(); batch.draw(trBackground, 0, 0); batch.draw(trBackground, 0, Gdx.graphics.getHeight()); sprite.draw(batch); batch.end(); } @Override public void dispose() { batch.dispose(); } }
[ "scott_grondin@wrdsb.on.ca" ]
scott_grondin@wrdsb.on.ca
25c0f0f82a214c85dbe044e273bcdb7dcd431931
b6d8f4ff0151c194343effcbdccd3f1665e9e4be
/MailService/src/rs/ac/uns/ftn/informatika/osa/mailService/service/RuleServiceInterface.java
1187303c985e8b9454e0ea60c622accd18272acf
[]
no_license
AleksandarBudimirovic/OsaShiet
5bb9695ce1224fbfd61aa82b20edfed33ba39687
ee687469a193e26bc899c21f4cf751ddf3a4c0a6
refs/heads/master
2021-01-05T17:19:04.567667
2020-02-17T21:24:48
2020-02-17T21:24:48
241,088,087
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package rs.ac.uns.ftn.informatika.osa.mailService.service; import java.util.List; import rs.ac.uns.ftn.informatika.osa.mailService.entity.Rule; public interface RuleServiceInterface { List<Rule> findByParent(Rule parent); Rule findOne(Integer ruleId); List<Rule> findAll(); Rule save(Rule rule); void remove(Integer id); }
[ "aleksandar.budimirovic97@gmail.com" ]
aleksandar.budimirovic97@gmail.com
de6724e3c3c224069d4140662f7dcda9162ef55d
2402c850da81ed2d6dcf6f97d1aa69c4c3a6be31
/okay-ad/ad-service/ad-service-sponsor/src/main/java/com/okay/ad/entity/Creative.java
51c73798e1a8fd7965c0fe0988009d4eca554522
[]
no_license
Pamgo/spring-sourceStudy
4e48ddde8fdf0f27287028d502745fe310dc14f7
ef787796d4ccdcab2c7891c58411445c1ffaf815
refs/heads/master
2022-12-23T01:44:20.833824
2019-06-03T13:12:04
2019-06-03T13:12:04
145,417,608
0
0
null
2022-12-16T08:53:36
2018-08-20T12:55:32
Java
UTF-8
Java
false
false
1,661
java
package com.okay.ad.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.Date; /** * 创意 * Created by OKali on 2019/1/19. */ @Data @NoArgsConstructor @AllArgsConstructor @Entity @Table(name = "ad_creative") public class Creative { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) private Long id; @Basic @Column(name = "name", nullable = false) private String name; @Basic @Column(name = "type", nullable = false) private Integer type; /**物料类型,比如图片可以是bmp,jpg等*/ @Basic @Column(name = "material_type", nullable = false) private Integer materialType; @Basic @Column(name = "height", nullable = false) private Integer height; @Basic @Column(name = "width", nullable = false) private Integer width; /**物料大小*/ @Basic @Column(name = "size", nullable = false) private Long size; /**持续时长,只有视频不为0*/ @Basic @Column(name = "duration", nullable = false) private Integer duration; /**审核状态*/ @Basic @Column(name = "audit_status", nullable = false) private Integer auditStatus; @Basic @Column(name = "user_id", nullable = false) private Long userId; @Basic @Column(name = "url", nullable = false) private String url; @Basic @Column(name = "create_time", nullable = false) private Date createTime; @Basic @Column(name = "update_time", nullable = false) private Date updateTime; }
[ "pamgogdpyc@163.com" ]
pamgogdpyc@163.com
23b186d76d24cf1f9697f0fe1bdbdb1711a3b51f
44231ccf0dc7961101edf99be67d9eae1af6f355
/src/com/bookshop/service/impl/IdeaServiceImpl.java
9936b93ce12b43664302566c54a4481eefa419db
[]
no_license
lyh-git/bookshop
602e6aaa57683f8bd497295d2a12744936210802
502adc6dd52a071399a29c38bf2ea7ebc2ec7179
refs/heads/master
2022-11-17T06:59:31.896101
2020-07-10T01:47:55
2020-07-10T01:47:55
277,790,181
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
package com.bookshop.service.impl; import com.bookshop.dao.impl.IdeaDaoImpl; import com.bookshop.entity.Ideas; import com.bookshop.service.IdeaService; import java.util.List; public class IdeaServiceImpl implements IdeaService { IdeaDaoImpl ideaDao=new IdeaDaoImpl(); @Override public int insert(Ideas news) { return ideaDao.insert(news); } @Override public int delete(Integer id) { return ideaDao.delete(id); } @Override public int update(Ideas news) { return ideaDao.update(news); } @Override public List<Ideas> queryAll() { return ideaDao.queryAll(); } }
[ "1374061712@qq.com" ]
1374061712@qq.com
f3524f35a9fc7d0d640262ade252fe87c3766e1b
33ab6237b0db3b6b45c9dcac6baad064a2ad9602
/src/digitalanimals/food/foods/Beef.java
67e147ed0d8bf6e62dd33bf4a21216b145032ddf
[]
no_license
TeamProjectZ/digitalanimals
8917061eff814524d8c6cb24551f35731b9018f5
76477b391b8e9306f5125da2656db09a4226dee2
refs/heads/master
2016-09-14T03:34:05.319806
2016-06-05T10:16:34
2016-06-05T10:16:34
58,803,683
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package digitalanimals.food.foods; import digitalanimals.food.Food; import digitalanimals.food.FoodEnum; public class Beef extends Food { public Beef() { } public Beef(FoodEnum food) { this.setName(food.getName()); this.setEnergy(food.getEnergy()); this.setPrice(food.getPrice()); this.setSize(food.getSize()); this.setType(food.getType()); this.setQuality(1); } }
[ "b.anton.m.1986@gmail.com" ]
b.anton.m.1986@gmail.com
00c2da4af4f2a0f6838d8b9d7d9b727c33cda167
8bf67e3dde92e88447c607f9a1a2665778918e7d
/cloud-biz-core/src/main/java/com/qweib/cloud/biz/system/service/ws/SysThorderWebService.java
5b6e162a4a06f3057e02c45a537e81354476195d
[]
no_license
yeshenggen532432/test02
1f87235ba8822bd460f7c997dd977c3e68371898
52279089299a010f99c60bc6656476d68f19050f
refs/heads/master
2022-12-11T01:38:24.097948
2020-09-07T06:36:51
2020-09-07T06:36:51
293,404,392
0
0
null
null
null
null
UTF-8
Java
false
false
3,034
java
package com.qweib.cloud.biz.system.service.ws; import com.qweib.cloud.biz.system.service.plat.SysDeptmempowerService; import com.qweib.cloud.core.domain.OnlineUser; import com.qweib.cloud.core.domain.SysThorder; import com.qweib.cloud.core.domain.SysThorderDetail; import com.qweib.cloud.core.exception.ServiceException; import com.qweib.cloud.repository.SysThorderWebDao; import com.qweib.cloud.utils.Page; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; import java.util.Map; @Service public class SysThorderWebService { @Resource private SysThorderWebDao thorderWebDao; @Resource private SysDeptmempowerService deptmempowerService; public int addThorder(SysThorder thorder,List<SysThorderDetail> detail,String database) { try { this.thorderWebDao.addThorder(thorder, database); int id=this.thorderWebDao.getAutoId(); for(SysThorderDetail orderDetail:detail){ orderDetail.setOrderId(id); this.thorderWebDao.addThorderDetail(orderDetail, database); } return id; } catch (Exception e) { throw new ServiceException(e); } } public void updateThorder(SysThorder thorder,List<SysThorderDetail> detail,String database) { try { this.thorderWebDao.updateThorder(thorder, database); this.thorderWebDao.deleteThorderDetail(database, thorder.getId()); for(SysThorderDetail orderDetail:detail){ orderDetail.setOrderId(thorder.getId()); this.thorderWebDao.addThorderDetail(orderDetail, database); } } catch (Exception e) { throw new ServiceException(e); } } public SysThorder queryThorderOne(String database,Integer mid,Integer cid,String oddate){ try { return this.thorderWebDao.queryThorderOne(database, mid, cid,oddate); } catch (Exception e) { throw new ServiceException(e); } } public SysThorder queryThorderOne2(String database,Integer id){ try { return this.thorderWebDao.queryThorderOne2(database, id); } catch (Exception e) { throw new ServiceException(e); } } public List<SysThorderDetail> queryThorderDetail(String database,Integer orderId){ try { return this.thorderWebDao.queryThorderDetail(database, orderId); } catch (Exception e) { throw new ServiceException(e); } } // ----------------------------订货下单------------------------------ public Page queryDhorder(OnlineUser user, String dataTp,Integer page,Integer limit,String kmNm,String sdate,String edate,String mids){ try { String datasource = user.getDatabase(); Integer memberId = user.getMemId(); Map<String, Object> map = deptmempowerService.getPowerDept(dataTp, memberId, datasource); return this.thorderWebDao.queryDhorder(datasource, map, page, limit,kmNm,sdate,edate,mids); } catch (Exception e) { throw new ServiceException(e); } } public int queryOrderDetailCount(String database,Integer orderId){ try { return this.thorderWebDao.queryOrderDetailCount(database, orderId); } catch (Exception e) { throw new ServiceException(e); } } }
[ "1617683532@qq.com" ]
1617683532@qq.com
656aa8a1ac41405af2d2425512a1d0266531a86f
20c5373e5e9282a9c611dbc080f41897b00d1704
/Crypto/server/irc/StreamParameterProvider.java
87caf7fe60a4f5c5fa1b524ed3dc9b9f347e1884
[]
no_license
zoubata/java_utilities
19ba181333edea5e1b5b9d8a79a8bdd96e47f371
cf9a9999c72eeafeb1bb42394d40e7dd82111d1d
refs/heads/master
2023-08-31T20:45:53.805269
2023-08-21T14:35:12
2023-08-21T14:35:12
185,672,323
0
0
null
null
null
null
UTF-8
Java
false
false
2,929
java
/*****************************************************/ /* This java file is a part of the */ /* */ /* - Plouf's Java IRC Client - */ /* */ /* Copyright (C) 2002 - 2004 Philippe Detournay */ /* */ /* All contacts : theplouf@yahoo.com */ /* */ /* PJIRC 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; version 2 or later of */ /* the License. */ /* */ /* PJIRC 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 PJIRC; if */ /* not, write to the Free Software Foundation, */ /* Inc., 59 Temple Place, Suite 330, Boston, */ /* MA 02111-1307 USA */ /* */ /*****************************************************/ package com.zoubworld.Crypto.server.irc; import java.io.*; import java.util.*; /** * Parameter provider from a text stream. */ public class StreamParameterProvider implements ParameterProvider { private Hashtable _table; /** * Create a new StreamParameterProvider loading the given input stream. * @param is the input stream to load from. If is is null, then the * parameter list will be empty. */ public StreamParameterProvider(InputStream is) { _table=new Hashtable(); if(is==null) return; try { BufferedReader reader=new BufferedReader(new InputStreamReader(is)); String line=reader.readLine(); while(line!=null) { line=line.trim(); if(line.length()>0) { if(line.charAt(0)!='#') { parse(line); } } line=reader.readLine(); } reader.close(); } catch(Exception ex) { ex.printStackTrace(); } } private void parse(String str) { int pos=str.indexOf('='); if(pos<0) return; String before=str.substring(0,pos).trim().toLowerCase(java.util.Locale.ENGLISH); String after=str.substring(pos+1).trim(); _table.put(before,after); } public String getParameter(String name) { return (String)_table.get(name.toLowerCase(java.util.Locale.ENGLISH)); } }
[ "zoubata@yahoo.fr" ]
zoubata@yahoo.fr
5c5ba646c09f92695192e228dc4370f222d20efa
1e30b018d1f8102a7bf9229e860f5602a8703c93
/dkpro-core-io-lcc-asl/src/main/java/org/dkpro/core/io/lcc/LccReader.java
4c2c7783c932875ffe145c6e5cc4e66b008ebbd9
[ "Apache-2.0" ]
permissive
mischor/dkpro-core
c7c237dfe7d8d911e47cb29b6f300e5e7879770d
cc3251bd262d6e2f3f6ad3e3d31da872283866ba
refs/heads/master
2021-05-05T08:09:11.712804
2019-10-29T17:52:54
2019-10-29T17:52:54
118,929,580
0
0
null
2018-01-25T15:19:42
2018-01-25T15:19:41
null
UTF-8
Java
false
false
6,575
java
/* * Licensed to the Technische Universität Darmstadt under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The Technische Universität Darmstadt * 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. * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.dkpro.core.io.lcc; import static org.apache.commons.io.IOUtils.closeQuietly; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.apache.uima.UimaContext; import org.apache.uima.collection.CollectionException; import org.apache.uima.fit.descriptor.ConfigurationParameter; import org.apache.uima.fit.descriptor.MimeTypeCapability; import org.apache.uima.fit.descriptor.ResourceMetaData; import org.apache.uima.fit.descriptor.TypeCapability; import org.apache.uima.jcas.JCas; import org.apache.uima.resource.ResourceInitializationException; import org.apache.uima.util.Progress; import org.apache.uima.util.ProgressImpl; import de.tudarmstadt.ukp.dkpro.core.api.io.JCasResourceCollectionReader_ImplBase; import de.tudarmstadt.ukp.dkpro.core.api.parameter.ComponentParameters; import de.tudarmstadt.ukp.dkpro.core.api.parameter.MimeTypes; import de.tudarmstadt.ukp.dkpro.core.api.resources.CompressionUtils; import de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence; /** * Reader for sentence-based Leipzig Corpora Collection files. */ @ResourceMetaData(name="Leipzig Corpora Collection Reader") @MimeTypeCapability({MimeTypes.TEXT_X_LCC}) @TypeCapability( outputs = { "de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData" }) public class LccReader extends JCasResourceCollectionReader_ImplBase { /** * Name of configuration parameter that contains the character encoding used by the input files. */ public static final String PARAM_SOURCE_ENCODING = ComponentParameters.PARAM_SOURCE_ENCODING; @ConfigurationParameter(name = PARAM_SOURCE_ENCODING, mandatory = true, defaultValue = ComponentParameters.DEFAULT_ENCODING) private String sourceEncoding; /** * Whether sentences should be written by the reader or not. */ public static final String PARAM_WRITE_SENTENCE = ComponentParameters.PARAM_WRITE_SENTENCE; @ConfigurationParameter(name = PARAM_WRITE_SENTENCE, mandatory = true, defaultValue = "false") private boolean writeSentence; /** * How many input sentences should be merged into one CAS. */ public static final String PARAM_SENTENCES_PER_CAS = "sentencesPerCAS"; @ConfigurationParameter(name = PARAM_SENTENCES_PER_CAS, mandatory = true, defaultValue = "100") private int sentencesPerCAS; private Resource res; private int casOffset; private BufferedReader br; private List<String> sentenceBuffer; @Override public void initialize(UimaContext context) throws ResourceInitializationException { super.initialize(context); casOffset = 0; sentenceBuffer = new ArrayList<>(); // Seek first article try { step(); } catch (IOException e) { throw new ResourceInitializationException(e); } } @Override public boolean hasNext() throws IOException, CollectionException { // If there is still a buffer, then there is still data. This requires that we call // step() already during initialization. return !sentenceBuffer.isEmpty(); } @Override public void getNext(JCas aJCas) throws IOException, CollectionException { initCas(aJCas, res, String.valueOf(casOffset)); StringBuilder sb = new StringBuilder(); int offset = 0; for (String sentence : sentenceBuffer) { if (writeSentence) { Sentence sAnno = new Sentence(aJCas, offset, offset + sentence.length()); sAnno.addToIndexes(); } sb.append(sentence); offset += sentence.length(); sb.append("\n"); offset++; } aJCas.setDocumentText(sb.toString()); sentenceBuffer.clear(); casOffset++; step(); } // TODO find some way to properly estimate progress @Override public Progress[] getProgress() { return new Progress[] { new ProgressImpl(casOffset, casOffset, "document") }; } @Override public void destroy() { closeAll(); super.destroy(); } private void closeAll() { res = null; closeQuietly(br); br = null; } /** * Seek article in file. Stop once article element has been found without reading it. */ private void step() throws IOException { // Open next file while (true) { if (res == null) { // Call to super here because we want to know about the resources, not the articles if (getResourceIterator().hasNext()) { // There are still resources left to read res = nextFile(); br = new BufferedReader(new InputStreamReader(CompressionUtils.getInputStream( res.getLocation(), res.getInputStream()), sourceEncoding)); } else { // No more files to read return; } } // Fill buffer String line; while (sentenceBuffer.size() < sentencesPerCAS && (line = br.readLine()) != null) { String[] parts = line.split("\t"); if (parts.length != 2) { throw new IOException("File not in LCC format: " + line); } sentenceBuffer.add(parts[1]); } // If buffer could be filled, return if (!sentenceBuffer.isEmpty()) { return; } // End of file reached closeAll(); } } }
[ "reckart@users.noreply.github.com" ]
reckart@users.noreply.github.com
567bb975b615ee5faa77f75abc6828ec77cc7444
409f31763e3b364d14cdce176e60eb81a97bfcba
/src/main/java/example/bootframe/controller/BookShelfController.java
cc94a1c6d965ee061a5e3aff97ca582df33af655
[]
no_license
k-jimmy/bootframe
720370bbf0b6ee9e6d4fa59a977ef716db3a2023
381bdb6b266e3286e263d2edc610833342392c85
refs/heads/master
2022-09-15T02:21:10.611792
2019-07-08T16:06:11
2019-07-08T16:06:11
176,118,905
0
0
null
2022-09-01T23:04:28
2019-03-17T15:12:49
Java
UTF-8
Java
false
false
844
java
package example.bootframe.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest; @Controller public class BookShelfController { // @Resource // private BookService bookService; @RequestMapping("/") public String index(HttpServletRequest request, Model model) { return "default"; } // @RequestMapping("/") // public String index(HttpServletRequest request, Model model) { // return "index"; // } @RequestMapping("/bookShelf") public String bookShelf(HttpServletRequest request, Model model) { // String bookName = request.getParameter("bookName"); // model.addAttribute("book", bookName); return "bookShelf"; } }
[ "43307602@qq.com" ]
43307602@qq.com
f6aa77f79b913f4e53a6b353839da5e85eb79cf9
847ea40fccc24b2239cb03e1d6f95c0f84b49322
/src/jeengbe/qol/FleeDamager.java
0649be0d08430e618e3944934cc3acaabd898ac9
[]
no_license
jeengbe/QOL
7c481faa405e1052b51d8b1930c0f5aa0a830c8f
bb1d44fa6f632027c14c22ac67b50baabb463c1e
refs/heads/master
2023-01-09T04:09:09.730482
2020-11-05T18:01:45
2020-11-05T18:01:45
308,433,062
0
0
null
null
null
null
UTF-8
Java
false
false
2,320
java
package jeengbe.qol; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.bukkit.craftbukkit.v1_16_R2.entity.CraftLivingEntity; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.world.ChunkLoadEvent; import jeengbe.qol.ai.PathfinderGoalAvoidDamager; import net.minecraft.server.v1_16_R2.EntityCreature; import net.minecraft.server.v1_16_R2.GenericAttributes; import net.minecraft.server.v1_16_R2.PathfinderGoal; import net.minecraft.server.v1_16_R2.PathfinderGoalPanic; import net.minecraft.server.v1_16_R2.PathfinderGoalWrapped; /** * Animals flee from their last damager */ public class FleeDamager implements Listener { private EntityType[] FLEE = new EntityType[] { EntityType.CHICKEN, EntityType.COW, EntityType.TROPICAL_FISH, EntityType.PUFFERFISH, EntityType.HORSE, EntityType.LLAMA, EntityType.TRADER_LLAMA, EntityType.PARROT, EntityType.PIG, EntityType.SHEEP, EntityType.STRIDER, EntityType.WANDERING_TRADER }; @EventHandler public void onLoad(ChunkLoadEvent e) { List<Entity> patch = new ArrayList<>(); for (Entity ent : e.getChunk().getEntities()) { if (!Arrays.stream(FLEE).anyMatch(entityType -> ent.getType() == entityType)) { continue; } patch.add(ent); } patch.forEach(ent -> patchAI(ent)); } @EventHandler public void onSpawn(CreatureSpawnEvent e) { if (!Arrays.stream(FLEE).anyMatch(entityType -> e.getEntity().getType() == entityType)) return; patchAI(e.getEntity()); } private void patchAI(Entity entity) { EntityCreature nmsEntity = (EntityCreature) ((CraftLivingEntity) entity).getHandle(); PathfinderGoalWrapped panicGoalWrapper = nmsEntity.goalSelector.getTasks().stream().filter(goal -> goal.getGoal() instanceof PathfinderGoalPanic).findFirst().orElseGet(() -> null); if (panicGoalWrapper == null) return; PathfinderGoal panicGoal = panicGoalWrapper.getGoal(); nmsEntity.goalSelector.a(panicGoal); nmsEntity.goalSelector.a(panicGoalWrapper.h(), new PathfinderGoalAvoidDamager(nmsEntity, 9F, nmsEntity.getAttributeMap().a(GenericAttributes.MOVEMENT_SPEED).getValue() * 5.5)); } }
[ "jesper.engberg@gmx.at" ]
jesper.engberg@gmx.at
55f0f8b0064223098f5613edfe490445347e93b6
ecfc0123b44c0aa9a0aecdb744e379a3f8b08b81
/KaiserPermanente/src/test/java/testresults/TestMedicalRecord.java
5348ac585bcf43ef0e4f0df58c6c8d53db383762
[]
no_license
guancao/TeamSeven
2c1d9fb545d79346da83681f20ee368692a5be6b
8740c4bc7423886e80593bfb7e12f036a51823c5
refs/heads/master
2020-03-14T04:53:53.862394
2018-06-22T03:51:10
2018-06-22T03:51:10
131,452,158
0
4
null
2018-06-05T11:42:41
2018-04-28T23:45:18
Java
UTF-8
Java
false
false
739
java
package testresults; import authentication.SignInPage; import authentication.popup.HandlePopup; import base.CommonAPI; import org.openqa.selenium.support.PageFactory; import org.testng.annotations.Test; public class TestMedicalRecord extends CommonAPI { @Test public void testMedicalRecords()throws InterruptedException { SignInPage signInPage = PageFactory.initElements(driver, SignInPage.class); signInPage.signInToKaiser(driver); HandlePopup handlePopUp = PageFactory.initElements(driver, HandlePopup.class); handlePopUp.closePopUpWindow(driver); MedicalRecord medicalRecord=PageFactory.initElements(driver,MedicalRecord.class); medicalRecord.getTestResults(driver); } }
[ "fatimafayyaz79@gmail.com" ]
fatimafayyaz79@gmail.com
86bd904ecd9a3daf1eb4ebe9f79230e7fb45a7ff
33c9d42d6bea6d10fc99dd868c4f45cc0e9432ec
/Fence/fence-core/src/main/java/com/abner/fence/web/SessionContext.java
8f2a9709e6d46808da1feb2742fc3694d95838a8
[]
no_license
Jorik2015/fence
1bb7ec08bd28ad68f6232891b7cfee25a902c411
6d8261aaad27f9cd8fd5f14973c260b98a6a1f93
refs/heads/master
2021-01-10T16:39:26.633049
2012-08-13T13:28:30
2012-08-13T13:28:30
45,328,232
0
0
null
null
null
null
UTF-8
Java
false
false
1,784
java
/** * This software is under the license of GNU Lesser General Public License(LGPL). * You may obtain a copy of the License at * http://www.gnu.org/copyleft/lesser.html. */ package com.abner.fence.web; import java.util.HashMap; import java.util.Map; import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletRequest; /** * @author abner * */ public class SessionContext implements Context { private final static String KEY = "_sessionContext"; int maxKeyIndex = 0; private final Map<Object, Object> cachedData = new HashMap<Object, Object>(); private SessionContext() { } synchronized public static SessionContext instance() { return instance(FacesContext.getCurrentInstance()); } synchronized public static SessionContext instance(FacesContext facesContext) { return instance((HttpServletRequest) facesContext.getExternalContext().getRequest()); } synchronized public static SessionContext instance(HttpServletRequest request) { SessionContext inst = (SessionContext) request.getSession().getAttribute(KEY); if (inst == null) { inst = new SessionContext(); request.getSession().setAttribute(KEY, inst); } return inst; } synchronized public Object get(Object key) { if (key == null) return null; return cachedData.get(key); } synchronized public void put(Object key, Object value) { cachedData.put(key, value); } synchronized public void remove(Object key) { cachedData.remove(key); } public void reset() { cachedData.clear(); } synchronized public String genUniqueKey(String prefix) { String key; maxKeyIndex++; while (cachedData.containsKey((key = prefix + maxKeyIndex))) maxKeyIndex++; return key; } }
[ "wu.arron@gmail.com" ]
wu.arron@gmail.com
6e60fc9b627d441a5e50cf94eec46c295c677693
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/gradle--gradle/fe2d547e689979562edb86810f205d301cf12248/after/UnresolvedDependency.java
2029553aea011921ec90c9a41e29e678b09c21da
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
/* * Copyright 2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.api.artifacts; /** * Unsuccessfully resolved dependency. */ public interface UnresolvedDependency { /** * Returns the identifier of the dependency, for example GAV */ String getId(); /** * Returns the configuration */ Configuration getGradleConfiguration(); /** * the exception that is the cause of unresolved state */ Exception getProblem(); }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
1009f5d4c693d1f7bb497643d94458f5455f5098
41f0785135633076e74f1d7f8df64285b40fbf6c
/src/main/java/eiffelis/anthology/tags/TagService.java
d9df921478ed434588b2facf49b7e208593090c7
[]
no_license
fleveillee/anthology
1117617f81ea389bd1f1ae0a7567e783fe59b8e9
a94667c588f54c7ea28e4705e0798b198cf2c500
refs/heads/main
2023-04-14T21:27:54.591147
2021-04-24T20:40:25
2021-04-24T20:40:25
350,451,215
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package eiffelis.anthology.tags; import eiffelis.anthology.stories.StoryRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class TagService { private final StoryRepository storyRepository; private final TagRepository tagRepository; @Autowired public TagService(StoryRepository storyRepository, TagRepository tagRepository) { this.storyRepository = storyRepository; this.tagRepository = tagRepository; } public Tag findOneByName(String name) { return tagRepository.findOneByName(name); } public Tag findOneBySlug(String slug) { return tagRepository.findOneBySlug(slug); } public List<Tag> findAll() { List<Tag> tags = tagRepository.findAll(); for (Tag tag : tags) { int storiesCount = storyRepository.countByTags(tag.getId()); tag.setStoriesCount(storiesCount); } return tags; } }
[ "fleveillee@gmail.com" ]
fleveillee@gmail.com
8bb310234fb211729aa2564839f5902e28fb513d
e85d49cd8e14c23fc4ae8391d4494fd4511d47fb
/src/main/java/com/yeyu/service/UserMapper.java
85d48e3e9b82f1aa58be941de2b20898a5548425
[]
no_license
ganyeyu/supermarket
51d83a811dfcdd014f2177f67aca928089f8b00c
dd6386bb3042319e11875be2ff859cc0e88c7b6f
refs/heads/master
2020-09-05T07:05:49.789095
2019-11-06T15:19:44
2019-11-06T15:19:44
220,020,798
1
0
null
null
null
null
UTF-8
Java
false
false
61
java
package com.yeyu.service; public class UserMapper { }
[ "'446197219@qq.com'" ]
'446197219@qq.com'
c23dce4e66001d7e9d8077959b28c7c2bcf6b744
9da9e6e560b0e2c8dd93fec63bc762bf8e8a8495
/src/main/java/com/jgoodies/forms/internal/InternalFocusSetupUtils.java
576f625f41dd45ec5f3b96a5d11f032b93f7224a
[ "BSD-3-Clause" ]
permissive
JFormDesigner/swing-jgoodies-forms
5e19613ec1a103cc8cbaed25e3b2c48a655247ed
a5c0db927e48976123d868521299f632f250c90f
refs/heads/master
2021-01-01T05:20:46.813984
2016-04-28T09:02:06
2016-04-28T09:02:06
57,280,183
16
7
null
null
null
null
UTF-8
Java
false
false
7,641
java
/* * Copyright (c) 2002-2015 JGoodies Software GmbH. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * o 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. * * o Neither the name of JGoodies Software GmbH 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 THE COPYRIGHT OWNER OR * CONTRIBUTORS 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 com.jgoodies.forms.internal; import static com.jgoodies.common.base.Preconditions.checkState; import java.awt.Component; import java.awt.ContainerOrderFocusTraversalPolicy; import java.awt.FocusTraversalPolicy; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import javax.swing.JComponent; import javax.swing.LayoutFocusTraversalPolicy; import com.jgoodies.forms.util.FocusTraversalType; /** * Provides internal convenience behavior for builders that * setup a focus traversal policy directly or implicitly * by specifying a focus traversal type plus optional initial component.<p> * * <strong>Note: This class is not part of the public Forms API. * It's intended for implementation purposes only. * The class's API may change at any time.</strong> * * @author Karsten Lentzsch * @version $Revision: 1.1 $ * * @since 1.9 */ public final class InternalFocusSetupUtils { /** * The name of the commercial {@code JGContainerOrderFocusTraversalPolicy} * from the JSDL Common library that supports grouping buttons. */ private static final String JGContainerOrderFocusTraversalPolicy_NAME = "com.jgoodies.jsdl.common.focus.JGContainerOrderFocusTraversalPolicy"; /** * The name of the commercial {@code JGLayoutFocusTraversalPolicy} * from the JSDL Common library that supports grouping buttons. */ private static final String JGLayoutFocusTraversalPolicy_NAME = "com.jgoodies.jsdl.common.focus.JGLayoutFocusTraversalPolicy"; /** * Holds the {@code JGContainerOrderFocusTraversalPolicy}'s constructor * - if in the class path. */ private static Constructor<FocusTraversalPolicy> containerOrderFTPConstructor = null; /** * Holds the {@code JGLayoutFocusTraversalPolicy}'s constructor * - if in the class path. */ private static Constructor<FocusTraversalPolicy> layoutFTPConstructor = null; static { containerOrderFTPConstructor = getContainerOrderFTPConstructor(); layoutFTPConstructor = getLayoutFTPConstructor(); } private InternalFocusSetupUtils() { // Overrides default constructor; prevents instantiation. } // Implementation ********************************************************* /** * Checks that if the API user has set a focus traversal policy, * no focus traversal type and no initial component has been set. */ public static void checkValidFocusTraversalSetup( FocusTraversalPolicy policy, FocusTraversalType type, Component initialComponent) { checkState(policy != null && type == null && initialComponent == null || policy == null, "Either use #focusTraversalPolicy or #focusTraversalType plus optional #initialComponent); don't mix them."); } public static void setupFocusTraversalPolicyAndProvider( JComponent container, FocusTraversalPolicy policy, FocusTraversalType type, Component initialComponent) { container.setFocusTraversalPolicy( getOrCreateFocusTraversalPolicy(policy, type, initialComponent)); container.setFocusTraversalPolicyProvider(true); } public static FocusTraversalPolicy getOrCreateFocusTraversalPolicy( FocusTraversalPolicy policy, FocusTraversalType type, Component initialComponent) { if (policy != null) { return policy; } if (type == FocusTraversalType.CONTAINER_ORDER) { return createContainerOrderFocusTraversalPolicy(initialComponent); } return createLayoutFocusTraversalPolicy(initialComponent); } // Helper Code ************************************************************ private static FocusTraversalPolicy createContainerOrderFocusTraversalPolicy(Component initialComponent) { if (containerOrderFTPConstructor != null) { try { return containerOrderFTPConstructor.newInstance(initialComponent); } catch (IllegalArgumentException ex) { // Ignore } catch (InstantiationException ex) { // Ignore } catch (IllegalAccessException ex) { // Ignore } catch (InvocationTargetException ex) { // Ignore } } return new ContainerOrderFocusTraversalPolicy(); } private static FocusTraversalPolicy createLayoutFocusTraversalPolicy(Component initialComponent) { if (layoutFTPConstructor != null) { try { return layoutFTPConstructor.newInstance(initialComponent); } catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException ex) { // Ignore } } return new LayoutFocusTraversalPolicy(); } private static Constructor<FocusTraversalPolicy> getContainerOrderFTPConstructor() { try { return (Constructor<FocusTraversalPolicy>) Class.forName(JGContainerOrderFocusTraversalPolicy_NAME).getConstructor(Component.class); } catch (ClassNotFoundException | SecurityException | NoSuchMethodException e) { return null; } } private static Constructor<FocusTraversalPolicy> getLayoutFTPConstructor() { try { return (Constructor<FocusTraversalPolicy>) Class.forName(JGLayoutFocusTraversalPolicy_NAME).getConstructor(Component.class); } catch (ClassNotFoundException | SecurityException | NoSuchMethodException e) { return null; } } }
[ "karsten@106c21d4-d539-c70d-aa97-d2a26c09264f" ]
karsten@106c21d4-d539-c70d-aa97-d2a26c09264f
b72d09dc272b593f676a285fdfa2d0ce019de89e
4ffc5d8c63367a874d38351b87da04a7a5fb1717
/src/gipsyking/demeter/PlantationCallback.java
273e4436d34c08b0d738517e3dfe968282e23341
[]
no_license
benjajaja/demeter
e9e911fbc052ad8d300c1ab6d2eacae9ec98ac6a
98d19c1f7ed99c0b018015e849befe0f1a7370ad
refs/heads/master
2022-01-28T06:35:58.181710
2014-02-08T23:42:52
2014-02-08T23:42:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
package gipsyking.demeter; import org.bukkit.Location; import org.bukkit.World; public interface PlantationCallback { void plant(World world, Location target); }
[ "benja@maletin.(none)" ]
benja@maletin.(none)
db49e86831b09f65b679690e1c0bcb59fbde4e1e
64ba6cb3cc5e7859a12334dca8662cbc53f49e2d
/retrofitdemo/src/main/java/com/cx/retrofitdemo/mvp/mvp_cardtop/a.java
daeddac4f546d1f92c918753da5f0f8adac19485
[]
no_license
cxqq123/HelloAndroid
73de88ae8dc928077d37fbcfe8d9bcd5ec40c20b
b5ba5be0d12ec77485553ca9c877a75fc3736a98
refs/heads/master
2021-01-02T09:45:27.336384
2017-10-11T01:55:25
2017-10-11T01:55:25
99,290,238
1
0
null
null
null
null
UTF-8
Java
false
false
115
java
package com.cx.retrofitdemo.mvp.mvp_cardtop; /** * Created by Administrator on 2017/9/6. */ public class a { }
[ "744185734@qq.com" ]
744185734@qq.com
b10599efb3af4d43a59b555e2f282f23e53f96e1
ca928d33152ae95af9759b80707afdc4a344ef49
/src/main/java/com/company/quartz/mapper/QuartzJobMapper.java
cdbb7208ec68ac8235ecb79aacbb4ed25358cef0
[ "Apache-2.0" ]
permissive
wangyx0055/springboot-seed-1
8c073559e4fdf3dc80da92754d3b24f433782db5
6a303d7224edd9117dd905dd361d27f5ff4f42a4
refs/heads/master
2023-09-04T02:16:03.580429
2019-01-21T01:33:40
2019-01-21T01:33:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
890
java
package com.company.quartz.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.company.quartz.entity.QuartzJob; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * <p> * Mapper 接口 * </p> * * @author 张俊辉 * @since 2019-01-11 */ public interface QuartzJobMapper extends BaseMapper<QuartzJob> { /** * 更新状态 * @param id */ @Transactional(rollbackFor = Exception.class) @Update("update quartz_job set pause = 1 where id = #{id}") void updatePause(@Param("id") Long id); /** * 查询不是启用的任务 * @return */ @Select("SELECT * FROM quartz_job WHERE pause = 0") List<QuartzJob> findByPauseIsFalse(); }
[ "zergwangj@163.com" ]
zergwangj@163.com
22031d00384d5d30cb3cd3f79fa9d3db0bdce4f5
73fc5b30202d4baf633b8e00336a612530336ee5
/app/src/main/java/com/hackingbuzz/activitylifecycle2/MainActivity.java
96150ce6701ea9e0c21b9190a698d044c44200a5
[]
no_license
kirti13/activitylifecycle2
649fd21752d797da8a7ff68c025553124b2d09a9
1353d7218ecd67deaa7e5811ae385957af0c9dd8
refs/heads/master
2021-08-08T20:49:05.278538
2017-01-30T17:57:35
2017-01-30T17:57:35
110,323,508
0
0
null
null
null
null
UTF-8
Java
false
false
2,491
java
package com.hackingbuzz.activitylifecycle2; import android.os.PersistableBundle; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; public class MainActivity extends AppCompatActivity { // see Which activity methods gets called when orientation changes occur? public static final String TAG = "ActivityLifecycle"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.i(TAG," onCreate() Called"); } @Override protected void onStart() { super.onStart(); Log.i(TAG, "onStart() Called"); } @Override protected void onResume() { super.onResume(); Log.i(TAG, "onResume() Called"); } @Override protected void onPause() { super.onPause(); Log.i(TAG, "onPause() Called"); } @Override protected void onStop() { super.onStop(); Log.i(TAG, "onStop() Called"); } @Override protected void onDestroy() { super.onDestroy(); Log.i(TAG, "onDestroy() called"); } @Override protected void onRestart() { super.onRestart(); Log.i(TAG, "onRestart() called"); } // this method called because to save data before it all wiped away ....when orientation changes.. @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); // you can control this method to save all your data // you can save a particular element of xml by giving it (id ) attribute...but thats not enough we need to save the data with all the logics ...so this method comes to play.. // go verbose we also got Log.e rather than info Log.e(TAG, "onSaveInstanceState() called"); // Log.e because we want to notice these two methods ...e gives us red color to differentiate .. } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); Log.e(TAG, "onRestoreInstanceState() called"); } } // this is not the saveInstance method ( the lifecycle method has only one paramenter that is bundle) /* @Override public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) { super.onSaveInstanceState(outState, outPersistentState); }*/
[ "ajay32mehta@gmail.com" ]
ajay32mehta@gmail.com
d0ee261fa54794e2dd6c33fbcddb95bb78c48f2e
229d4a691ec92a494a3416ae71c12dcfe59fa38f
/src/main/java/com/mainul/fleetapp/model/User.java
46b4ea0d73ee09b0b47492c2d9ca248cd1d1da2e
[]
no_license
maainul/fleet-app
16fda52305fb71b967cda1db43fefebcee07ff50
f9971c1c866169c8d13dd20e5f21556a100a9713
refs/heads/main
2023-04-08T17:01:51.048866
2021-03-31T17:22:21
2021-03-31T17:22:21
349,564,845
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.mainul.fleetapp.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Entity @Data @NoArgsConstructor @AllArgsConstructor @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") public class User { @GeneratedValue(strategy = GenerationType.IDENTITY) @Id private int id; private String username; private String password; }
[ "mainul080@yahoo.com" ]
mainul080@yahoo.com
4df9effa2e794a4e39bdb6447f16fb495a7c463a
59fb07b4eac93a8c495ec50d2191798e34cbc3a9
/nifi-signal-messenger-processors/src/test/java/org/signal/TestPutSignalMessage.java
b58ce6b850cc2b55711be1ba07de14f81f2f59ee
[]
no_license
christofferlind/nifi-signal-messenger
d7a3b71d51a2209eba73b09113d781537139fff6
705079cc6a49115fc93f4c5edddd3950ea51f301
refs/heads/master
2023-06-26T05:39:25.322253
2023-05-06T13:33:41
2023-05-06T13:33:41
249,559,773
4
1
null
2023-06-14T22:42:53
2020-03-23T22:39:03
Java
UTF-8
Java
false
false
9,399
java
package org.signal; import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import org.apache.nifi.flowfile.attributes.CoreAttributes; import org.apache.nifi.reporting.InitializationException; import org.apache.nifi.util.MockFlowFile; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.signal.model.SignalData; import org.signal.model.SignalMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TestPutSignalMessage extends AbstractMultiNumberTest { private static final Logger LOGGER = LoggerFactory.getLogger(TestPutSignalMessage.class); private TestRunner runner; @Before public void init() throws InitializationException { if(isSettingsEmpty()) { return; } runner = TestRunners.newTestRunner(PutSignalMessage.class); setSignaleService(runner); runner.setProperty(AbstractSignalSenderProcessor.PROP_SIGNAL_SERVICE, serviceIdentifierA); runner.enableControllerService(serviceA); } @After public void deactivate() throws InitializationException { if(runner == null) return; if(runner.isControllerServiceEnabled(serviceA)) { runner.disableControllerService(serviceA); } } @Test public void putMessage() throws InterruptedException { if(isSettingsEmpty()) { IllegalStateException exc = new IllegalStateException("No configuration set, skipping test"); LOGGER.warn(exc.getMessage(), exc); return; } String content = "Testing " + TestPutSignalMessage.class.getSimpleName() + " " + Math.random(); AtomicReference<String> refContent = new AtomicReference<String>(null); Consumer<SignalData> listener = msg -> { if(!numberB.equals(msg.getAccount())) return; if(msg instanceof SignalMessage) refContent.set(((SignalMessage) msg).getMessage()); }; serviceA.addMessageListener(listener); runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, numberB); runner.setProperty(PutSignalMessage.PROP_MESSAGE_CONTENT, content); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA); runner.enqueue(new byte[0]); runner.run(); String result = Constants.getAndWait(refContent); serviceA.removeMessageListener(listener); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.SUCCESS); assertEquals(content, result); } @Test public void testNoRecipietsNoGroup() throws InterruptedException { if(isSettingsEmpty()) { IllegalStateException exc = new IllegalStateException("No configuration set, skipping test"); LOGGER.warn(exc.getMessage(), exc); return; } String content = "Testing " + TestPutSignalMessage.class.getSimpleName() + " " + Math.random(); runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, ""); runner.setProperty(AbstractSignalSenderProcessor.PROP_GROUPS, ""); runner.setProperty(PutSignalMessage.PROP_MESSAGE_CONTENT, content); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA); runner.enqueue(new byte[0]); runner.run(); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.FAILURE, 1); MockFlowFile flowFile = runner.getFlowFilesForRelationship(AbstractSignalSenderProcessor.FAILURE).get(0); flowFile.assertAttributeEquals(Constants.ATTRIBUTE_ERROR_MESSAGE, Constants.MSG_MISSING_RECIPIENT_AND_GROUP); } @Test public void putMessageContent() throws InterruptedException { if(isSettingsEmpty()) { IllegalStateException exc = new IllegalStateException("No configuration set, skipping test"); LOGGER.warn(exc.getMessage(), exc); return; } String content = "Testing " + TestPutSignalMessage.class.getSimpleName() + " " + Math.random(); AtomicReference<String> refContent = new AtomicReference<String>(null); Consumer<SignalData> listener = msg -> { if(!numberB.equals(msg.getAccount())) return; if(msg instanceof SignalMessage) refContent.set(((SignalMessage) msg).getMessage()); }; serviceA.addMessageListener(listener); runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, numberB); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA); runner.enqueue(content.getBytes(StandardCharsets.UTF_8)); runner.run(); String result = Constants.getAndWait(refContent); serviceA.removeMessageListener(listener); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.SUCCESS, 1); assertEquals(content, result); MockFlowFile flowFile = runner.getFlowFilesForRelationship(AbstractSignalSenderProcessor.SUCCESS).get(0); flowFile.assertAttributeNotEquals(Constants.ATTRIBUTE_TIMESTAMP, ""); } @Test @Ignore("Manual testing") public void putMessageReply() throws InterruptedException, InitializationException { if(isSettingsEmpty()) { IllegalStateException exc = new IllegalStateException("No configuration set, skipping test"); LOGGER.warn(exc.getMessage(), exc); return; } TestRunner runnerConsumer = TestRunners.newTestRunner(ConsumeSignalMessage.class); setSignaleService(runnerConsumer); runnerConsumer.setProperty(ConsumeSignalMessage.PROP_SIGNAL_SERVICE, serviceIdentifierA); runnerConsumer.enableControllerService(serviceA); assertTrue(runnerConsumer.isControllerServiceEnabled(serviceA)); runnerConsumer.setRunSchedule(1_000); runnerConsumer.run(5); runnerConsumer.assertAllFlowFilesTransferred(ConsumeSignalMessage.SUCCESS); List<MockFlowFile> flowFiles = runnerConsumer.getFlowFilesForRelationship(ConsumeSignalMessage.SUCCESS); MockFlowFile flowFile = flowFiles.get(0); flowFile.assertAttributeExists(Constants.ATTRIBUTE_TIMESTAMP); flowFile.assertAttributeExists(Constants.ATTRIBUTE_SENDER_NUMBER); LOGGER.info("Received message at {}: {}", flowFile.getAttribute(Constants.ATTRIBUTE_TIMESTAMP), flowFile.getAttribute(Constants.ATTRIBUTE_MESSAGE)); String content = "Testing quote: " + " " + Math.random(); runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, flowFile.getAttribute(Constants.ATTRIBUTE_SENDER_NUMBER)); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA); runner.setProperty(PutSignalMessage.PROP_MESSAGE_QUOTE, Boolean.toString(Boolean.TRUE)); runner.setProperty(PutSignalMessage.PROP_MESSAGE_CONTENT, content); runner.enqueue(flowFile); runner.run(); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.SUCCESS); } @Test public void putMessageFail() { if(isSettingsEmpty()) { IllegalStateException exc = new IllegalStateException("No configuration set, skipping test"); LOGGER.warn(exc.getMessage(), exc); return; } runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA+"213123"); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, numberB+"12332,"+numberB); runner.setProperty(PutSignalMessage.PROP_MESSAGE_CONTENT, "Testing " + PutSignalMessage.class.getSimpleName()); runner.enqueue(new byte[0]); runner.run(); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.FAILURE, 1); MockFlowFile ff = runner.getFlowFilesForRelationship(AbstractSignalSenderProcessor.FAILURE).get(0); ff.assertAttributeEquals(Constants.ATTRIBUTE_ERROR_MESSAGE, "Specified account does not exist (ErrorCode: -32602)"); } @Test @Ignore("Manual test") public void putMessageAttachment() throws IOException { Path attachment = Paths.get("/tmp/attachment.png"); if(!Files.exists(attachment)) return; String contentType = Files.probeContentType(attachment); Map<String, String> attributes = Map.of( Constants.ATTRIBUTE_SENDER_NUMBER, numberManual, CoreAttributes.MIME_TYPE.key(), contentType ); runner.clearTransferState(); runner.setProperty(AbstractSignalSenderProcessor.PROP_SIGNAL_SERVICE, serviceIdentifierA); runner.setProperty(AbstractSignalSenderProcessor.PROP_ACCOUNT, numberA); runner.setProperty(AbstractSignalSenderProcessor.PROP_RECIPIENTS, numberManual); runner.setProperty(PutSignalMessage.PROP_MESSAGE_CONTENT, "Testing attachment"); runner.setProperty(PutSignalMessage.PROP_ATTACHMENT, Boolean.toString(Boolean.TRUE)); runner.enqueue(Files.readAllBytes(attachment), attributes); runner.run(); runner.assertAllFlowFilesTransferred(AbstractSignalSenderProcessor.SUCCESS, 1); } }
[ "christoffer.lind@yandex.com" ]
christoffer.lind@yandex.com
8b1047b8b5847717cf8f0d24ae3ca73dede0baa7
f1ffe21b3c5887596c15e0a124141e0644425c6a
/app/src/main/java/com/example/nikechallenge/main/ResultViewModel.java
94bb56bfa60fca475bc7c2e79ab2ae8891c057ce
[]
no_license
abdultanveer/Nikechallenge
9bdb1d1f0a311144a134c96c8ec68544e9de2774
dca9ef2ee1e8c7f7a4772c3fd56f63d28ca576c0
refs/heads/master
2020-07-06T15:38:21.844900
2019-08-22T10:03:36
2019-08-22T10:03:36
203,069,692
0
0
null
null
null
null
UTF-8
Java
false
false
2,389
java
package com.example.nikechallenge.main; import android.util.Log; import android.view.View; import android.widget.ProgressBar; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; import com.example.nikechallenge.data.SearchResponse; import com.example.nikechallenge.data.SearchResult; import com.example.nikechallenge.data.source.remote.ApiClient; import com.example.nikechallenge.data.source.remote.ApiInterface; import java.util.List; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class ResultViewModel extends ViewModel { private static final String TAG = ResultViewModel.class.getSimpleName(); ProgressBar progressBar; String searchTerm; //this is the data that we will fetch asynchronously private MutableLiveData<List<SearchResult>> resultList; public ResultViewModel(ProgressBar mpProgressBar, String mParam) { progressBar = mpProgressBar; searchTerm = mParam; } //we will call this method to get the data public LiveData<List<SearchResult>> getListSearchResults() { //if the list is null if (resultList == null) { resultList = new MutableLiveData<List<SearchResult>>(); //we will load it asynchronously from server in this method loadResults(searchTerm); } //finally we will return the list return resultList; } //This method is using Retrofit to get the JSON data from URL private void loadResults(String msearchTerm) { ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class); Call<SearchResponse> call = apiService.getListSearchResults(msearchTerm); call.enqueue(new Callback<SearchResponse>() { @Override public void onResponse(Call<SearchResponse> call, Response<SearchResponse> response) { progressBar.setVisibility(View.GONE); Log.i(TAG,"responseitem="+response.body().getResults().get(0).getDefination()); resultList.setValue(response.body().getResults()); } @Override public void onFailure(Call<SearchResponse> call, Throwable t) { Log.i(TAG,"url ="+call.request().url().toString()); } }); } }
[ "abdul.tanveer@gmail.com" ]
abdul.tanveer@gmail.com
520d9c0c9f25a2a6ef1675b86a0d166e1947b429
35648d86dd1f6e14339b31ec713ce74b44660442
/src/test/java/com/xmomen/module/core/controller/DemoControllerTest.java
7b0994aa196c838aa42fdaba577cea085d74ba01
[]
no_license
tanxinzheng/overlays-simple-template-webapp
3352eb489d60dd386b4792ef3097c2de38ccd557
564f95cc47418efcd87808b45ee731558f55eff2
refs/heads/master
2021-01-18T15:19:55.043949
2018-05-11T14:10:34
2018-05-11T14:10:34
84,343,379
1
1
null
null
null
null
UTF-8
Java
false
false
3,052
java
package com.xmomen.module.core.controller; import com.alibaba.fastjson.JSONObject; import com.xmomen.module.core.model.DemoModel; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.WebApplicationContext; import java.util.Date; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup; /** * Created by tanxinzheng on 16/12/11. */ @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration(locations = {"classpath:config/spring-core.xml","classpath:config/spring-servlet.xml"}) @TransactionConfiguration(defaultRollback = true) @Transactional public class DemoControllerTest { @Autowired private WebApplicationContext wac; private MockMvc mockMvc; @Before public void setUp() throws Exception { this.mockMvc = webAppContextSetup(this.wac).build(); } @After public void tearDown() throws Exception { } @Test public void testTest1() throws Exception { Date date = new Date(); JSONObject jsonObject = new JSONObject(); jsonObject.put("name", "测试人员"); jsonObject.put("age", 18); jsonObject.put("createTime", "20161011"); jsonObject.put("updateTime", new Date().getTime()); // jsonObject.put("createTime", 42715.122650463); jsonObject.put("amount", 100.4322); ResultActions actions = mockMvc.perform(post("/test") .contentType(MediaType.APPLICATION_JSON) .content(jsonObject.toJSONString()) .accept(MediaType.APPLICATION_JSON)) .andDo(print()) .andExpect(status().isOk()); String resultJson = actions.andReturn().getResponse().getContentAsString(); DemoModel result = JSONObject.parseObject(resultJson, DemoModel.class); Assert.assertNotNull(result); Assert.assertNotNull(result.getAge()); Assert.assertNotNull(result.getAmount()); Assert.assertNotNull(result.getCreateTime()); Assert.assertNotNull(result.getUpdateTime()); Assert.assertNotNull(result.getName()); } }
[ "jeng.tam@udfex.com" ]
jeng.tam@udfex.com
278d4ba61fd74e2dd68a50d00c4dca37faf54190
c97b3ccd3f407cc2e6f938d482b4ab5f3cb6e713
/Java_Jul21/src/com/ss/jb/four/Increment.java
bdebcde9608ce9e223eee30b80e94c1c7b7d12bb
[]
no_license
psamsotha-ss/jul2021
241fd83da5273169767c7fc51c6ff029d4abeb52
a826f85542c70830625730116704159bf4343668
refs/heads/master
2023-06-27T00:23:08.690040
2021-07-30T22:05:26
2021-07-30T22:05:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
165
java
package com.ss.jb.four; public interface Increment { public Integer increment(Integer a); default Integer decrement(Integer a) { return a-1; }; }
[ "pramodpr316@users.noreply.github.com" ]
pramodpr316@users.noreply.github.com
e888d9c71bb54d3801521f61e966f425b7f5887b
b69ca09d1535e604b60fdfee8db419cd6fc291bf
/Distributed Stock Exchange (Java RMI)/src/Notification.java
7a21f25d06d163e8021726dca632473487ce4c96
[]
no_license
avyakta32/JAVA-Projects
90c4bbea33b735f7e34d6dc481adb31994e99508
8d00042e43444b7d463d4d3a264f3b4ec4d31e86
refs/heads/master
2020-04-30T02:03:10.942201
2015-05-27T14:17:16
2015-05-27T14:17:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
import java.io.Serializable; public class Notification implements Serializable { private static final long serialVersionUID = 1L; private String source; private Object info; public Notification(String source, Object info) { this.source=source; this.info=info; } public String getSource(){ return this.source; } public Object getInfo(){ return this.info; } }
[ "izidor.flajsman@gmail.com" ]
izidor.flajsman@gmail.com
cf3c6571212fb2693c1457fcb064ccabe295e962
9b01ffa3db998c4bca312fd28aa977f370c212e4
/app/src/streamB/java/com/loki/singlemoduleapp/stub/SampleClass3596.java
113e76da387d99e9c0615205c979e5b05b0cd4c1
[]
no_license
SergiiGrechukha/SingleModuleApp
932488a197cb0936785caf0e73f592ceaa842f46
b7fefea9f83fd55dbbb96b506c931cc530a4818a
refs/heads/master
2022-05-13T17:15:21.445747
2017-07-30T09:55:36
2017-07-30T09:56:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package stub; public class SampleClass3596 { private SampleClass3597 sampleClass; public SampleClass3596(){ sampleClass = new SampleClass3597(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
d9876b1f9b59afd4266bfcafa61ad840efc6d88f
499b52c01a5c9f185408d1e734a3f08fbb53434f
/src/com/transinfo/tplus/messaging/validator/DataValidator.java
3ba24adc94d12e65f8d7a7d460d1a2d05de8dba8
[]
no_license
trandaiduong1990/BCEL_ISS_ENGINE_VISA_CUP_JCB
837c6992844e153a50b385f928a0784624181619
b9cdb42ada19c875fa4acd9f5ef9b05964a87425
refs/heads/master
2020-04-02T05:40:54.995262
2016-07-30T04:10:19
2016-07-30T04:10:19
62,431,191
1
2
null
null
null
null
UTF-8
Java
false
false
9,626
java
package com.transinfo.tplus.messaging.validator; import org.jpos.iso.ISOUtil; import com.transinfo.tplus.debug.DebugWriter; import com.transinfo.tplus.messaging.OnlineException; import com.transinfo.tplus.messaging.parser.IParser; public class DataValidator implements BaseValidator { public DataValidator() { } public boolean process(IParser objISO) throws OnlineException { System.out.println(" In DataValidator process..."); try { System.out.println("DataValidator - objISO.isEComTranx()..." + objISO.isEComTranx()); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - objISO.isEComTranx()..." + objISO.isEComTranx()); if(objISO.isEComTranx()) { System.out.println("DataValidator - Return here"); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - Return here"); return true; } String cardScheme = objISO.getCardProduct(); String tranxType = objISO.getTransactionDataBean().getAcqBinType(); System.out.println("DataValidator - tranxType..." + tranxType); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - tranxType..." + tranxType); if("OFFUS".equals(tranxType)) //if(objISO.getMTI().equals("0100") || objISO.getMTI().equals("0101")) { //int[] dataFields = {3,4,7,11,18,19,22,25,32,37,42,43,49,60}; int[] dataFields = {3,4,7,11,18,19,22,25,32,37,42,43,49}; int[] dataFieldsForBal = {3,7,11,18,19,22,25,32,37,42,43,49}; //int[] dataFieldsJCB = {3,4,7,11,18,22,25,32,33,37,42,43,49}; int[] dataFieldsJCB = {3,4,7,11,18,22,25,32,33,37,42,49}; //int[] dataMotoFields = {3,4,7,11,18,19,22,25,32,37,43,49,60}; int[] dataMotoFields = {3,4,7,11,18,19,22,25,32,37,43,49}; //int[] dataMotoFieldsCUP = {3,4,7,11,18,19,22,25,32,37,43,49,61}; int[] dataMotoFieldsCUP = {3,4,7,11,18,19,22,25,32,37,43,49}; int[] dataMotoFieldsJCB = {3,4,7,11,18,22,25,32,37,43,49}; System.out.println("DataValidator - objISO.getValue(25)..." + objISO.getValue(25)); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - objISO.getValue(25)..." + objISO.getValue(25)); System.out.println("DataValidator - objISO.getValue(3)..." + objISO.getValue(3)); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - objISO.getValue(3)..." + objISO.getValue(3)); if(!objISO.getValue(25).equals("08")) { if("JC".equals(cardScheme)){ if(!objISO.hasFields(dataFieldsJCB)) { throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in Normal JCB Request.. "); } }else{ if(objISO.getValue(3).substring(0,2).equals("30") || objISO.getValue(3).substring(0,2).equals("31")){ if(!objISO.hasFields(dataFieldsForBal)) { throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in Normal Bal Request.. "); } }else{ if(!objISO.hasFields(dataFields)) { throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in Normal Request.. "); } } } }else{ // assign transaction code sub type objISO.getTransactionDataBean().setTranxCodeSubType("MOTO"); if("CU".equals(cardScheme)){ if(!objISO.hasFields(dataMotoFieldsCUP)){ throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in CUP Moto Request.. "); } }else if("JC".equals(cardScheme)){ if(!objISO.hasFields(dataMotoFieldsJCB)){ throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in CUP Moto Request.. "); } }else{ if(!objISO.hasFields(dataMotoFields)){ throw new OnlineException("05", "022734","Some of the Mandatory fields not Available in Moto Request.. "); } } } if(!("30".equals(objISO.getValue(3).substring(0,2))) && !("31".equals(objISO.getValue(3).substring(0,2)))){ if(!(new Double(objISO.getValue(4)).doubleValue()>0) && !objISO.isAccountVerification()) { throw new OnlineException("05", "022734","Invalid Amount Value.. "+objISO.getValue(4)); } } System.out.println("2"); String f61jcbMoto = ""; String f61jcbRecur = ""; String f61jcbPreAuth = ""; // get JCB values for validation if("JC".equals(cardScheme)){ if(objISO.getValue(61) != null){ f61jcbMoto = objISO.getValue(61).substring(0, 1); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - JCB f61Moto..." + f61jcbMoto); f61jcbRecur = objISO.getValue(61).substring(1, 2); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - JCB f61Recur..." + f61jcbRecur); f61jcbPreAuth = objISO.getValue(61).substring(2, 3); if (DebugWriter.boolDebugEnabled) DebugWriter.write("DataValidator - JCB f61PreAuth..." + f61jcbPreAuth); } //recurring transaction also must F14 if("1".equals(f61jcbRecur)){ // assign transaction code sub type objISO.getTransactionDataBean().setTranxCodeSubType("RECUR"); String f14ExpDate = objISO.getValue(14); System.out.println("f14ExpDate :: " + f14ExpDate); if(f14ExpDate == null || "".equals(f14ExpDate)){ throw new OnlineException("54", "022734","F14 must to JCB RECUR"); } String f48AD = objISO.getValue(48); System.out.println("f48AD :: " + f48AD); } } if(objISO.getValue(25).equals("08")) // MOTO Indicator Checking { if("VI".equals(cardScheme)){ if(objISO.getValue(60).length()>=10) { System.out.println("objISO.getValue(60)"+objISO.getValue(60)+" "+objISO.getValue(60).substring(8,10)); String strMotoInd = objISO.getValue(60).substring(8,10); if(!strMotoInd.equals("01") && !strMotoInd.equals("02") && !strMotoInd.equals("05") && !strMotoInd.equals("06") && !strMotoInd.equals("07") && !strMotoInd.equals("08")) { throw new OnlineException("05", "022734","Moto Indicator not Correct in F60"); } } }else if("JC".equals(cardScheme)){ if((!"1".equals(f61jcbMoto)) || (("1".equals(f61jcbMoto)) && ("1".equals(f61jcbRecur) || "1".equals(f61jcbPreAuth)) )){ throw new OnlineException("05", "022734","Moto Indicator not Correct in F61 for JCB"); } String f14ExpDate = objISO.getValue(14); System.out.println("f14ExpDate :: " + f14ExpDate); if(f14ExpDate == null || "".equals(f14ExpDate)){ throw new OnlineException("54", "022734","F14 must to JCB MOTO"); } /*String f48AD = objISO.getValue(48); System.out.println("f48AD :: " + f48AD); if(f48AD == null || "".equals(f48AD)){ throw new OnlineException("05", "022734","F48 must to JCB MOTO"); }*/ }else{ // CUP Recurring if(objISO.getValue(60).length()>=23) { String strMotoIndCUP = objISO.getValue(60).substring(22,23); if(!strMotoIndCUP.equals("4") && !strMotoIndCUP.equals("3")) { throw new OnlineException("05", "022734","Moto Indicator not Correct in F60"); } } } } if("CU".equals(cardScheme)){ if(objISO.getValue(25).equals("28")) // Recurring { // assign transaction code sub type objISO.getTransactionDataBean().setTranxCodeSubType("RECUR"); /*if(objISO.getValue(60).length()>=23) { String strRecurIndCUP = objISO.getValue(60).substring(22,23); String f6025 = objISO.getValue(60).substring(8,10); if(!strRecurIndCUP.equals("4") && !"".equals(f6025)){ throw new OnlineException("05", "022734","Recurring Indicator not Correct in F60"); } }*/ }else if(objISO.getValue(25).equals("64")) // Installment { // assign transaction code sub type objISO.getTransactionDataBean().setTranxCodeSubType("INSTAL"); if(objISO.getValue(48) == null || "".equals(objISO.getValue(48))){ throw new OnlineException("05", "022734","Installment Indicator not Correct in F48"); }else{ if (DebugWriter.boolDebugEnabled) DebugWriter.write("objISO.getValue(48) :: " + objISO.getValue(48)); String f48 = new String(ISOUtil.hex2byte(objISO.getValue(48))); if (DebugWriter.boolDebugEnabled) DebugWriter.write("f48 :: "+f48); if(f48.length()>=2 && !"IP".equals(f48)) { throw new OnlineException("05", "022734","Installment Indicator not Correct in F48"); } } } } System.out.println("3"); if(objISO.hasField(18)) { System.out.println("3 "+objISO.getValue(2).substring(0,2)+" "+objISO.getValue(18)); // Check for the MCC value is valid. if(objISO.getValue(3).substring(0,2).equals("01")) { if(!objISO.getValue(18).equals("4829") && !objISO.getValue(18).equals("6051") && !objISO.getValue(18).equals("6010") && !objISO.getValue(18).equals("6011") && !objISO.getValue(18).equals("7995")) { throw new OnlineException("05", "022734","Invalid MCC.. "+objISO.getValue(18)); } } } System.out.println("5"); if(objISO.hasField(52) && !objISO.hasField(53)) { throw new OnlineException("05", "022734","F53 is not avaliable when F52 exists. " +objISO.getValue(22)); } } System.out.println("6"); }catch (OnlineException e){ e.printStackTrace(); throw new OnlineException(e); }catch (Exception e){ e.printStackTrace(); throw new OnlineException("96","G0001","System Error"); } return true; } }
[ "trandaiduong1990@gmail.com" ]
trandaiduong1990@gmail.com
240ec3871ed11d3d198ba79c1f310e56d861c8aa
323c91a3c3d988d9c763b03862754e2c561d48b0
/app/src/main/java/com/aryosatria/submissionexpt3/listmovie/pojo/ResponseMovie.java
73b3c52c51b080482316f6ceb7b06a1f56199fca
[]
no_license
RAFYDHANU/MtvApp
0e3071939169415dbc2cb0c55c9a548070118eda
7346a7aee78633a74650e9bfb3760e15967774d8
refs/heads/master
2023-02-11T06:26:44.160912
2021-01-14T11:44:53
2021-01-14T11:44:53
329,598,646
0
0
null
null
null
null
UTF-8
Java
false
false
928
java
package com.aryosatria.submissionexpt3.listmovie.pojo; import java.util.List; import com.androidnetworking.error.ANError; import com.google.gson.annotations.SerializedName; public class ResponseMovie{ @SerializedName("page") private int page; @SerializedName("total_pages") private int totalPages; @SerializedName("results") private List<ResultsItem> results; @SerializedName("total_results") private int totalResults; private ANError anError; public ANError getAnError() { return anError; } public ResponseMovie() { } public ResponseMovie(ANError anError) { this.anError = anError; } public List<ResultsItem> getResults(){ return results; } @Override public String toString(){ return "ResponseMovie{" + ",page = '" + page + '\'' + ",total_pages = '" + totalPages + '\'' + ",results = '" + results + '\'' + ",total_results = '" + totalResults + '\'' + "}"; } }
[ "rafyfahrezy1@gmail.com" ]
rafyfahrezy1@gmail.com
885cc60a1b75cbc32f51c030b7b4814b076530ed
fd4cdecdc8143962005f7f174a8682a6e6b6c3b7
/app/src/main/java/com/uteeni/developer/swapfragment/PagerAdapter.java
4f0386bccfead01dd1696ad6533569ca21f1d441
[]
no_license
cashlebrun/SwapFragmentExample
f622a65b97dee7d82c533f406e1be3f7471618bb
4e69be436e74289676f02da1965d1033beeaea2e
refs/heads/master
2021-01-10T13:30:24.997779
2015-09-30T10:15:26
2015-09-30T10:15:26
43,426,155
0
0
null
null
null
null
UTF-8
Java
false
false
778
java
package com.uteeni.developer.swapfragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; /** * Created by developer on 30/09/2015. */ public class PagerAdapter extends FragmentPagerAdapter{ public PagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int arg0) { switch (arg0) { case 0: return new FragmentOne(); case 1: return new FragmentTwo(); case 2: return new FragmentThree(); default: break; } return null; } @Override public int getCount() { return 3; } }
[ "cash.lebrun@gmail.com" ]
cash.lebrun@gmail.com
460645309faba5384e39db5e600988e677223458
583f4fb4f3a250533233dbe1899da0ffc08e43b1
/app/src/main/java/hsj/whatever/com/selfviewdemo/older/ThirdView.java
39f028688253bddb175c69be643af48ef21dd534
[]
no_license
Allenknight/SomeTest
b6784a67cd3687880b2cd1d069ffd1dc1bf8ca7b
a1b4469751697fa76c1c41ed6c66fe38414e6009
refs/heads/master
2021-03-12T19:09:17.934003
2018-03-29T15:30:39
2018-03-29T15:30:39
91,455,998
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
package hsj.whatever.com.selfviewdemo.older; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Shader; import android.util.AttributeSet; import android.widget.TextView; /** * Created by HSJ on 2017/5/17. * Version 1.0 */ public class ThirdView extends TextView{ private Paint mPaint; private int mViewWidth = 0; private int mTranslate = 0; private LinearGradient mLinearGradient; private Matrix mGradientMatrix; public ThirdView(Context context) { super(context); } public ThirdView(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); if(mViewWidth == 0){ mViewWidth = getMeasuredWidth(); if(mViewWidth > 0){ mPaint = getPaint(); mLinearGradient = new LinearGradient( 0, 0, mViewWidth, 0, new int[]{ Color.BLUE, 0xffffffff, Color.BLUE }, null, Shader.TileMode.CLAMP ); mPaint.setShader(mLinearGradient); mGradientMatrix = new Matrix(); } } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if(mGradientMatrix != null){ mTranslate += mViewWidth/5; if(mTranslate > 2*mViewWidth){ mTranslate = -mViewWidth; } mGradientMatrix.setTranslate(mTranslate,0); mLinearGradient.setLocalMatrix(mGradientMatrix); postInvalidateDelayed(100); } } }
[ "750959277@qq.com" ]
750959277@qq.com
5e788edf498780b018d262a852aa90c7bcc62306
cbd7ca8b2416317fda0d712429f938bd2fdc0129
/src/com/wj/study/_20180117/MapTest.java
55b280cb32414af4e4b5f0b693439322050d7165
[]
no_license
zpc113/study
03d088d2f32070c9cfc9870c51f4846ff302f1d1
955c8e39aabe541f57578eb29d9753219dea6d99
refs/heads/master
2021-09-09T11:18:30.201911
2018-03-15T14:08:00
2018-03-15T14:08:00
115,422,595
0
0
null
null
null
null
UTF-8
Java
false
false
4,374
java
package com.wj.study._20180117; //1.27 HashMap,无序 import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Scanner; import java.util.Set; import javax.sound.midi.Synthesizer; import org.omg.Messaging.SyncScopeHelper; public class MapTest { //用来承装学生类型对象 public Map < String , Student > students; //在构造器中初始化students属性 public MapTest(){ this.students = new HashMap <String,Student>(); } /* * 测试添加:输入学生ID,判断是否被占用, * 若被占用,则输入姓名,创建新学生对象, * 并且,添加到students中 */ public void testPut(){ Scanner input = new Scanner(System.in); int i = 0 ;//? while (i < 3){ System.out.println("请输入学生ID:"); String ID = input.next(); Student st = students.get(ID); if (st == null){ System.out.println("请输入学生姓名:"); String name = input.next(); Student newStudent = new Student(ID,name); students.put(ID, newStudent); System.out.println("成功添加学生:" + students.get(ID).name ); i++; } else { System.out.println("该学生ID已存在!"); continue; } } } /* * 测试Map的KeySet方法,返回的是键的类型 */ public void testKeySet(){ Set<String> KeySet = students.keySet(); //取得students的容量 System.out.println("总共有" + students.size() + "个学生!"); //用遍历的方法取得每个键,再调用get方法取得对应的v。 for (String stuId : KeySet) { Student st = students.get(stuId); if (st != null) System.out.println("学生:" + st.name); } } //1.29 //测试删除Map中的映射 public void testRemove(){ Scanner input = new Scanner(System.in); while (true){ System.out.println("请输入需要删除的学生ID:"); String ID = input.next(); Student st = students.get(ID);//判断该ID是否有对应的学生 if (st == null){ System.out.println("未找到该学生!"); continue; } students.remove(ID); System.out.println("成功删除学生:" + st.name); break; } } //通过entrySet方法来遍历循环Map,获得所有键值对 public void testEntrySet(){ Set < Entry < String,Student> > entrySet = students.entrySet(); for (Entry <String , Student> entry : entrySet){ System.out.println("取得键:" + entry.getKey()); System.out.println("取得值:" + entry.getValue().name);//getValue返回的是Student } } //利用put方法修改Map中的已有映射 public void testModify(){ System.out.println("请输入要修改的学生ID:"); Scanner input = new Scanner(System.in); while (true){ String stuID = input.next(); Student student = students.get(stuID); if (student == null){ System.out.println("该ID不存在!请重新输入!"); continue; } System.out.println("当前学生信息:" + student.name); System.out.println("请输入新学生的姓名:"); String name = input.next(); Student newStudent = new Student(stuID,name); students.put(stuID, newStudent); System.out.println("修改成功!"); break; } } /*2.24 3.4 * 判断Map中是否包含某个Key值或者某个Value值 */ public void testContainsKeyOrValue (){ //用containsKey()方法判断是否包括某个Key值{返回true,则包含}不需要方法重写 //containsValue()某个Value值,不需要方法重写 System.out.println("请输入学生id:"); Scanner input = new Scanner(System.in); String id = input.next(); System.out.println("您输入的学生id为:" + id + ",在学生映射表中是否存在:" + students.containsKey(id)); if (students.containsKey(id)){ System.out.println("对应的学生为:" + students.get(id).name); } System.out.println("请输入学生姓名:"); String name = input.next(); if (students.containsValue(new Student(null , name))){ System.out.println("表中包含该姓名:" + name); } else { System.out.println("不包含该学生。"); } } public static void main(String[] args) { // TODO Auto-generated method stub MapTest mt = new MapTest(); mt.testPut(); mt.testKeySet(); //mt.testRemove(); //mt.testEntrySet(); // mt.testModify(); // mt.testEntrySet(); mt.testContainsKeyOrValue(); } }
[ "827946303@qq.com" ]
827946303@qq.com
7c839853a1dab3d7f8d099b9b7ce257731a92073
c072af315fc1dd8983b2219df150d9994b9894d3
/app/src/main/java/com/example/iwen/singup/fragment/account/AccountTrigger.java
de531fa1d748939be29b797a1ec68758f6ce624f
[]
no_license
ljr7822/Android_SignUp
4dafec44bb02d5e1c367876e2f118ff65aa5f337
610424f3715cebd33883503e547eac30177b63e7
refs/heads/master
2023-03-21T17:35:14.237717
2021-03-18T17:46:11
2021-03-18T17:46:11
312,443,557
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package com.example.iwen.singup.fragment.account; /** * 登录和注册切换布局的接口 * <p> * @author : Iwen大大怪 * create : 2020/11/16 17:05 */ public interface AccountTrigger { void triggerView(); }
[ "1816807688@qq.com" ]
1816807688@qq.com
01436f24a994b134e9303ec3793ffa4b817e59c2
abe95457e2d6b2be13cc52d8f0a9f064f12f64c1
/src/main/java/org/honor/web/service/UserService.java
e33bbdaca0393447ce5eef09068f10904c56211c
[]
no_license
honorbounds/honor-quick4j
e7ad2e2eb53f63ad9f180607f5cc8268dd6b5316
a74a451c006c53d0c2e6d57f89afc7490ada8768
refs/heads/master
2020-04-03T14:42:36.628608
2018-10-30T05:57:40
2018-10-30T05:57:40
155,332,012
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
package org.honor.web.service; import org.honor.core.generic.GenericService; import org.honor.web.model.User; /** * 用户 业务 接口 * * @author StarZou * @since 2014年7月5日 上午11:53:33 **/ public interface UserService extends GenericService<User, Long> { /** * 用户验证 * * @param user * @return */ User authentication(User user); /** * 根据用户名查询用户 * * @param username * @return */ User selectByUsername(String username); }
[ "honorbound@163.com" ]
honorbound@163.com
3cd75a5dd5489a19e81f0555e0bf4e9639569075
f44ae2a08011668b6b8bdf5d0ad3089f973fcdb3
/src/test/java/gn/traore/demo/modularity/ModularityApplicationTests.java
8cc662611d45769c4288bb133a43a3d18f532ca8
[]
no_license
reotra224/demo-modularity-module2
071f4232621c2e3f70c4dfc92bd78af29bb2318a
67cc71038e9fcd3eb4f2876a6a280b23f384f4cd
refs/heads/master
2022-11-23T06:29:30.990423
2019-12-26T15:41:56
2019-12-26T15:41:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package gn.traore.demo.modularity; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class ModularityApplicationTests { @Test void contextLoads() { } }
[ "ibrahima982011@koonda.fr" ]
ibrahima982011@koonda.fr
c44a35a6793b8943f66d2364b45fc03e8ef2204c
0757663110074113bd59a15c494bb5d9ed056eea
/02 Real Database/src/test/java/com/kchmielewski/sda/java/spring02java/data/config/SqlConfigTest.java
563ae1720dd945cdd9b8cf10f1a0ba1bd946d25c
[]
no_license
krzysztof-chmielewski/SDA-Java-Spring-Data
3b33db8347e5c01432f6ba5c4b7aad23a97eadd7
3519f702cf32ddc4f1ad1b9bdac796080a6ec49f
refs/heads/master
2021-05-02T09:41:20.854424
2018-02-16T12:39:07
2018-02-16T12:39:07
120,780,347
0
1
null
null
null
null
UTF-8
Java
false
false
1,294
java
package com.kchmielewski.sda.java.spring02java.data.config; import com.kchmielewski.sda.java.spring02java.data.player.entity.PlayerEntity; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.sql.DataSource; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = SqlConfig.class) @ActiveProfiles("test") public class SqlConfigTest { @Autowired private DataSource dataSource; @Test public void smoke() { assertThat(dataSource).isNotNull(); } @Test public void selectAllPlayers() { NamedParameterJdbcTemplate template = new NamedParameterJdbcTemplate(dataSource); List<PlayerEntity> players = template.query("SELECT * FROM player", (rs, rowNum) -> new PlayerEntity(rs.getInt("id"), rs.getString("name"), rs.getString("surname"))); assertThat(players).hasSize(2); } }
[ "chmielewski.k.s@gmail.com" ]
chmielewski.k.s@gmail.com
9fbebabbedc6e2f9bf536860b39f14884d552ccf
b06d92478095bb6dfaec047b5ebedae1f9263855
/user-server/src/main/java/com/toloan/pay/exception/SimpleMessageException.java
30e7838f301c3f48a7dd1049afc9a05f85e5f503
[]
no_license
coreyxuy/Spring_Cloud
657d5075d5f2d91197b1a0422ab1d2e92c1b5ed0
a2a66d1964599eef93afd6fe0051a7023ba9b9d8
refs/heads/master
2021-07-11T02:29:35.147590
2020-07-02T02:18:16
2020-07-02T02:18:16
146,242,545
0
0
null
2020-06-16T06:11:35
2018-08-27T03:31:22
Java
UTF-8
Java
false
false
672
java
package com.toloan.pay.exception; public class SimpleMessageException extends RuntimeException { //错误状态 private int errorCode; public SimpleMessageException() { super(); } public SimpleMessageException(String message) { super(message); } public int getErrorCode() { return errorCode; } public void setErrorCode(int errorCode) { this.errorCode = errorCode; } /** * 构造函数 * @param errorCode * @param message * @param */ public SimpleMessageException(int errorCode, String message) { super(message); this.errorCode = errorCode; } }
[ "1595162370@qq.com" ]
1595162370@qq.com
eff440fc39227646fbd513fa9f7c839dbf3ac8f1
848625ae553f0040b74721a266cdb6bdbf7a4b47
/src/main/java/com/leverx/model/GameObject.java
91b4305bbecad7be732aa3763f6888ddd396f8c4
[]
no_license
Sloydeath/dealerStatCloudFoundry
6ac5e8cc18d00868e890c0f77fa3b4b53e240071
17a5b470d729db741ccc89d73881daba8840a19e
refs/heads/master
2023-04-18T19:26:43.426251
2021-05-06T22:09:55
2021-05-06T22:09:55
365,047,176
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package com.leverx.model; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.*; import javax.persistence.*; import java.time.LocalDateTime; import java.util.Objects; /** * Model class of game object * * @author Andrew Panas */ @Getter @Setter @NoArgsConstructor @Table(name = "game_objects") @Entity public class GameObject { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "title") private String title; @Column(name = "text") private String text; @JsonFormat( shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss") @Column(name = "created_at") private LocalDateTime createdAt; @JsonFormat( shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss") @Column(name = "updated_at") private LocalDateTime updatedAt; @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE) @JoinColumn(name = "trader_id_fk", nullable = false) private User user; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GameObject that = (GameObject) o; return Objects.equals(id, that.id) && Objects.equals(title, that.title) && Objects.equals(text, that.text) && Objects.equals(createdAt, that.createdAt) && Objects.equals(updatedAt, that.updatedAt); } @Override public int hashCode() { return Objects.hash(id, title, text, createdAt, updatedAt); } @Override public String toString() { return "GameObject{" + "id=" + id + ", title='" + title + '\'' + ", text='" + text + '\'' + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + '}'; } }
[ "panas.andrew@mail.ru" ]
panas.andrew@mail.ru
c1d2473a9cb017f5e096815750a8cdf51ce8e77f
0cb4672c385d39915bf917f46e5df4cc9b0e1250
/src/main/java/com/fyang/app/GetBeanTest.java
fc08a73a1c6253b163b2072167e44b7e346abf4f
[]
no_license
jinfan1115/springDemo
a8dcb0d15afd60adf39d724514ce45e2727278a6
785a50bb6583d0f1b060e0c649d97c33a527cca9
refs/heads/master
2022-12-21T09:18:26.352484
2020-09-23T09:00:27
2020-09-23T09:00:27
221,109,466
1
0
null
2022-12-16T05:09:27
2019-11-12T02:09:46
Java
UTF-8
Java
false
false
199
java
package com.fyang.app; import com.fyang.model.Person; public abstract class GetBeanTest { public void showMe(){ this.getBean().showMe(); } public abstract Person getBean(); }
[ "fyang@glprop.com" ]
fyang@glprop.com
3e095eaae0bdecc3953518cff19c6066e994b1cf
1922ed4861c44681957961f3486f9cc309d22ab4
/src/main/java/com/felixlaura/springredditclone/service/AuthService.java
43fda1cb07dd7eded94e5a0680027a26f466febf
[]
no_license
felixala/spring-reddit-clone
c7f02773384de86dec5fb742f09819c556faff22
a8e1f28bb2aee6fa273b9b17af2772dfe6eb4af7
refs/heads/master
2023-04-28T12:08:04.851360
2021-05-01T03:42:15
2021-05-01T03:42:15
363,300,080
0
0
null
null
null
null
UTF-8
Java
false
false
1,869
java
package com.felixlaura.springredditclone.service; import com.felixlaura.springredditclone.dto.RegisterRequest; import com.felixlaura.springredditclone.model.User; import com.felixlaura.springredditclone.model.VerificationToken; import com.felixlaura.springredditclone.repository.UserRepository; import com.felixlaura.springredditclone.repository.VerificationTokenRepository; import lombok.AllArgsConstructor; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.UUID; @Service @AllArgsConstructor public class AuthService { private final PasswordEncoder passwordEncoder; private final UserRepository userRepository; private final VerificationTokenRepository verificationTokenRepository; /** * signup method responsible to create User object through registration process and storing in the database */ @Transactional public void signup(RegisterRequest registerRequest){ User user = new User(); user.setUserName(registerRequest.getUsername()); user.setEmail(registerRequest.getEmail()); user.setPassword(passwordEncoder.encode(registerRequest.getPassword())); user.setCreated(Instant.now()); user.setEnabled(false); userRepository.save(user); String token = generateVerificationToken(user); } /** * create a new token */ public String generateVerificationToken(User user){ String token = UUID.randomUUID().toString(); VerificationToken verificationToken = new VerificationToken(); verificationToken.setToken(token); verificationToken.setUser(user); verificationTokenRepository.save(verificationToken); return token; } }
[ "felixgato8@gmail.com" ]
felixgato8@gmail.com
2b85ba51bb61aef28acfebd87a555e66d97d53df
7033053710cf2fd800e11ad609e9abbb57f1f17e
/cardayProject/carday-microservice/carday-api-service/src/test/java/com/cmdt/carday/microservice/api/DepartmentApiTest.java
31f3b0ee070f14f7c7da5b74eb525b2628f01018
[]
no_license
chocoai/cardayforfjga
731080f72c367c7d3b8e7844a1c3cd034cc11ee6
91d7c8314f44024825747e12a60324ffc3d43afb
refs/heads/master
2020-04-29T02:14:07.834535
2018-04-02T09:51:07
2018-04-02T09:51:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,145
java
package com.cmdt.carday.microservice.api; import java.util.ArrayList; import java.util.List; import java.util.Random; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.cmdt.carday.microservice.model.request.department.DepartmentCreateDto; import com.cmdt.carday.microservice.model.request.department.DepartmentCreditModel; import com.cmdt.carday.microservice.model.request.department.DepartmentDeleteDto; import com.cmdt.carday.microservice.model.request.department.DepartmentPageDto; import com.cmdt.carday.microservice.model.request.department.DepartmentUpdateDto; @AutoConfigureMockMvc @AutoConfigureRestDocs(outputDir = "target/generated-snippets") @RunWith(SpringRunner.class) @SpringBootTest public class DepartmentApiTest extends BaseApiTest { @Test public void showListTest() throws Exception{ runGet("/department/list/4", null); } @Test public void showTreeTest() throws Exception{ runGet("/department/tree/4", null); } @Test public void showTreeByOrgIdTest() throws Exception{ runGet("/department/treeByOrgId/46", null); } @Test public void findOrganizationByOrgIdTest() throws Exception{ runGet("/department/findOrganizationByOrgId/2", null); } @Test public void appendChildShowOrganizationByParentIdTest() throws Exception{ runGet("/department/appendChild/show/2", null); } @Test public void createDepartmentTest() throws Exception{ DepartmentCreateDto dto = new DepartmentCreateDto(); dto.setName("子研发部"); dto.setParentId(2L); runPost("/department/create", dto); } @Test public void updateOrganizationTest() throws Exception{ Random r = new Random(); DepartmentUpdateDto dto = new DepartmentUpdateDto(); dto.setName("子研发部"+r.nextInt()); dto.setParentId(2L); dto.setId(5221l); runPut("/department/update", dto); } @Test public void deleteDepartmentTest() throws Exception{ DepartmentDeleteDto dto = new DepartmentDeleteDto(); dto.setId(5222l); runDelete("/department/delete", dto); } @Test public void listDirectChildrenWithCountTest() throws Exception{ DepartmentPageDto dto = new DepartmentPageDto(); dto.setCurrentPage(1); dto.setNumPerPage(10); dto.setUserId(4l); runPost("/department/listDirectChildrenWithCount", dto); } @Test public void findTreeCreditByOrgIdTest() throws Exception{ runGet("/department/findTreeCreditByOrgId/2", null); } @Test public void updateCreditTest() throws Exception{ List<DepartmentCreditModel> modelList = new ArrayList<>(); DepartmentCreditModel model = new DepartmentCreditModel(); model.setAvailableCredit(99.9); model.setLimitedCredit(12.5); model.setOrgId(5221l); modelList.add(model); runPut("/department/updateCredit", modelList); } @Test public void findOrgByIdTest() throws Exception{ runGet("/department/findOrgById/2", null); } }
[ "xiaoxing.zhou@cm-dt.com" ]
xiaoxing.zhou@cm-dt.com
e36d54e4b7a87cf3fe42612b70df8995e76a13a4
11535f5cba084642cb82e95b952eab74b1bde6f7
/src/main/java/com/bzamani/framework/dto/UserGroupDto.java
196f8be84b1c756fb22a2262cd303b224c3e8f3e
[]
no_license
bashirz2004/bz-framework
8e809c07723e309ca7af62bd50fd129a92064200
c301eb7378361f613f1f94ae9548e3f6b432b6fe
refs/heads/main
2023-07-25T23:47:42.320840
2021-08-16T04:47:45
2021-08-16T04:47:45
308,433,131
1
1
null
null
null
null
UTF-8
Java
false
false
209
java
package com.bzamani.framework.dto; import lombok.Getter; import lombok.Setter; import java.util.List; @Getter @Setter public class UserGroupDto { private long userId; private List<Long> groupIds; }
[ "bashir.z2004@gmail.com" ]
bashir.z2004@gmail.com
a6eb9652f28f89694a4cd39568465a07fe82482f
44e5a256fef6f99e87b5649527944678091d8bb7
/main/boofcv-ip/src/test/java/boofcv/abst/filter/convolve/TestGenericConvolveDown.java
b0f48ba0992679f4cfe25f378e7deace1f4219e5
[ "LicenseRef-scancode-takuya-ooura", "Apache-2.0" ]
permissive
lessthanoptimal/BoofCV
3aa27e99056ce3c42814fddb013d6404bd9bdcad
24adbeee4fc1371face00b4c5cacb99c0398de55
refs/heads/SNAPSHOT
2023-09-01T11:14:56.219779
2023-08-31T14:16:30
2023-08-31T14:16:30
1,635,932
955
264
null
2023-09-10T02:12:28
2011-04-19T14:51:10
Java
UTF-8
Java
false
false
1,071
java
/* * Copyright (c) 2023, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.abst.filter.convolve; import boofcv.testing.BoofStandardJUnit; import org.junit.jupiter.api.Test; public class TestGenericConvolveDown extends BoofStandardJUnit { /** * No test is provided here since {@link boofcv.abst.filter.convolve.TestFactoryConvolveDown} already does an exhaustive test * of this class. */ @Test void emptyTest() { // intentionally empty } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
e15d318bc3c8ef1ecf6e997a4cccdebd83c36ae8
3d3ff468b19b619ac0a85c84ebb46cd77ae7950a
/EcoBill/src/ecobill/module/base/ui/component/FormularDataPanel.java
59b37524be80434656a3f2ec28d9e88fc024c354
[]
no_license
BackupTheBerlios/ecobill
a4b9b2eedac3c38263e830f30d54ef9b74ffa3d3
baa9e506ab0bc652713345a7826e6347b31c4a9a
refs/heads/master
2021-01-01T16:55:05.402958
2006-02-09T17:40:09
2006-02-09T17:40:09
40,251,964
0
0
null
null
null
null
UTF-8
Java
false
false
5,990
java
package ecobill.module.base.ui.component; import org.jdesktop.layout.GroupLayout; import org.jdesktop.layout.LayoutStyle; import javax.swing.*; import javax.swing.border.TitledBorder; import java.util.Date; import java.awt.*; import ecobill.core.system.Internationalization; import ecobill.core.system.WorkArea; import com.toedter.calendar.JCalendar; import com.toedter.calendar.JDateChooser; // @todo document me! /** * FormularDataPanel. * <p/> * User: rro * Date: 10.12.2005 * Time: 20:46:47 * * @author Roman R&auml;dle * @version $Id: FormularDataPanel.java,v 1.3 2006/02/02 22:18:27 raedler Exp $ * @since EcoBill 1.1 */ public class FormularDataPanel extends JPanel implements Internationalization { // The <code>Icon</code> for the <code>JDateChooser</code>. private final ImageIcon ICON_DATE_CHOOSE = new ImageIcon("images/component/date_choose.gif"); /** * Die Konstante f�r den <code>JPanel</code> Rahmen. */ private final String BORDER_TITLE_KEY; /** * Die Konstante f�r den Nummern <code>JLabel</code> Text. */ private final String NUMBER_LABEL_TEXT; /** * Die Konstante f�r den Datum <code>JLabel</code> Text. */ private final String DATE_LABEL_TEXT; /** * Der Rahmen der im <code>JPanel</code> liegt. */ private TitledBorder border; /** * Das <code>JLabel</code> f�r das Datum. */ private JLabel dateL = new JLabel(); /** * The <code>JDateChooser</code> shows a date choosing panel. */ private JCalendar calendar = new JCalendar(new Date(), true); private JDateChooser dateChooser = new JDateChooser(calendar, "dd.MM.yyyy", false, ICON_DATE_CHOOSE); /** * Das <code>JLabel</code> f�r die Formularnummer. */ private JLabel numberL = new JLabel(); /** * Das <code>JTextField</code> f�r Formularnummer Angaben. */ private JTextField numberTF = new JTextField(); /** * TODO: document me!!! */ public FormularDataPanel(final String BORDER_TITLE_KEY, final String NUMBER_LABEL_TEXT, final String DATE_LABEL_TEXT) { // Setzt den Konstanten this.BORDER_TITLE_KEY = BORDER_TITLE_KEY; this.NUMBER_LABEL_TEXT = NUMBER_LABEL_TEXT; this.DATE_LABEL_TEXT = DATE_LABEL_TEXT; // Initialisiert den Rahmen zum ersten Mal. border = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), WorkArea.getMessage(BORDER_TITLE_KEY), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 0, 11), new Color(0, 0, 0)); // Initialisiert die Komponenten. initComponents(); // Initialisiert das Layout. initLayout(); reinitI18N(); } /** * TODO: document me!!! */ private void initComponents() { // Setzt den Rahmen f�r das <code>JPanel</code>. setBorder(border); dateChooser.getSpinner().setFont(new Font("Tahoma", Font.PLAIN, 11)); dateChooser.setMinimumSize(new Dimension(100, 20)); dateChooser.setPreferredSize(new Dimension(100, 20)); } private void initLayout() { GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(GroupLayout.LEADING) .add(GroupLayout.LEADING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(GroupLayout.LEADING, false) .add(numberL) .add(GroupLayout.TRAILING, dateL, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(numberTF, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(dateChooser, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(GroupLayout.LEADING) .add(GroupLayout.LEADING, layout.createSequentialGroup() .add(numberL) .addPreferredGap(LayoutStyle.RELATED) .add(numberTF, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.RELATED) .add(dateL) .addPreferredGap(LayoutStyle.RELATED) .add(dateChooser, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); } /** * @see ecobill.core.system.Internationalization#reinitI18N() */ public void reinitI18N() { // Erneuert den Titel des <code>JPanel</code> in die landesspezifisch // eingestellte Sprache. border.setTitle(WorkArea.getMessage(BORDER_TITLE_KEY)); // Erneuert den Text der <code>JLabel</code> in den landesspezifischen // eingestellten Texten. numberL.setText(WorkArea.getMessage(NUMBER_LABEL_TEXT)); dateL.setText(WorkArea.getMessage(DATE_LABEL_TEXT)); } /** * TODO: document me!!! * * @return */ public Date getDate() { return (Date) dateChooser.getDate();//getValue(); } /** * TODO: document me!!! * * @param date */ public void setDate(Date date) { this.dateChooser.setDate(date);//setValue(date); } /** * TODO: document me!!! * * @return */ public String getNumber() { return numberTF.getText(); } /** * TODO: document me!!! * * @param number */ public void setNumber(String number) { this.numberTF.setText(number); } }
[ "raedler" ]
raedler
5a70ee8cf990aa5da6024b2526ca54896eb80ffd
de42f35277613e19e7d68438ae9314ec502ee608
/src/main/java/com/vepilef/cursomc/resources/exception/ResourceExceptionHandler.java
125f4cb3ede7596487a906825f93d21318b50f6f
[]
no_license
fjedi9/jedi1
5439436e7393bdae2721f41aba1b7f0a60c8a1ce
bc4ac01b718587602773c630d389a6bcfb0d9771
refs/heads/master
2020-03-26T01:59:31.396517
2018-08-11T14:36:23
2018-08-11T14:36:23
144,391,706
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package com.vepilef.cursomc.resources.exception; import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import com.vepilef.cursomc.services.exceptions.ObjectNotFoundException; @ControllerAdvice public class ResourceExceptionHandler { @ExceptionHandler(ObjectNotFoundException.class) public ResponseEntity<StandardError> ObjectNotFound(ObjectNotFoundException e, HttpServletRequest request){ StandardError err = new StandardError(System.currentTimeMillis(), HttpStatus.NOT_FOUND.value(), "Não encontrado", e.getMessage(), request.getRequestURI()); return ResponseEntity.status(HttpStatus.NOT_FOUND).body(err); } }
[ "vieira.felipe@gmail.com" ]
vieira.felipe@gmail.com
b477d650fc962a6ca788c86e6d376cca48bae9fb
e5e3bb5ee65f1a1d9f2a8313fcb6f3aaa25924d6
/com.faug.mvc.js.ide/xtend-gen/com/faug/mvc/js/ide/FaugIdeModule.java
56d50da277e16e68f932992cd4bdcbafe3e46f41
[ "Apache-2.0" ]
permissive
sumeetchhetri/faugjs-eclipse-plugin
9905b2121dfd8f931ebee5182218667842d9765e
2e1afc400a2167fe82e15e84e20d965f45aeb7b2
refs/heads/master
2020-05-23T06:53:04.014705
2019-05-30T17:24:00
2019-05-30T17:24:00
186,667,378
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
/** * generated by Xtext 2.17.1 */ package com.faug.mvc.js.ide; import com.faug.mvc.js.ide.AbstractFaugIdeModule; /** * Use this class to register ide components. */ @SuppressWarnings("all") public class FaugIdeModule extends AbstractFaugIdeModule { }
[ "sumeet.chhetri@gmail.com" ]
sumeet.chhetri@gmail.com
997cb23e17ed73940c9b3d96481dba3acf5a68c8
c8bfb8cb33aa80e37bd3ae4b24dc804b9dcd755d
/Urban Marginal/src/outils/connexion/ServeurSocket.java
75bffbf67d9534f84d8debc5f96c17e60af26b5c
[]
no_license
THANPhilippe/UrbanMarginal
e16cf975b9ac00737b9b3ec9ff0d22108bb1d96d
b39c6c2dd778092b8b080e39803fcc71440f1c75
refs/heads/master
2020-04-11T01:21:27.152273
2016-11-06T19:57:30
2016-11-06T19:57:30
68,131,335
0
0
null
null
null
null
ISO-8859-1
Java
false
false
940
java
package outils.connexion; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class ServeurSocket extends Thread { private Object leRecepteur; private ServerSocket serverSocket; public void run() { Socket socket; while(true){ try { System.out.println("Le serveur attends"); socket = serverSocket.accept(); System.out.println("Un client s'est connecté"); Connection connection = new Connection(socket, leRecepteur); } catch (IOException e) { System.out.println("erreur grave à l'acceptation du client : "+e); System.exit(0); } } } public ServeurSocket(Object leRecepteur, int port){ this.leRecepteur = leRecepteur; try { serverSocket = new ServerSocket(port); } catch (IOException e) { System.out.println("erreur grave création socket serveur : "+e); System.exit(0); } start(); } }
[ "phili@DESKTOP-QEGHPOI" ]
phili@DESKTOP-QEGHPOI
b8f0fe00aaa5125d39819277e52a413e2680dc0b
e2b70555e88e96654630683e89946b44bddd1c8b
/health/src/main/java/com/mouritech/healthapp/fitbitauth/AuthenticationConfiguration.java
e4da98ad1943d158d11185cdae7e038b793b2149
[]
no_license
udyakumargk22/FitApp
14a557c589744f56879001a3295d7a62317bef47
82f44f2a19cedbb6d858dde5b3a1b70558907568
refs/heads/master
2023-06-03T21:26:54.336254
2021-06-18T05:22:52
2021-06-18T05:22:52
374,571,595
0
0
null
null
null
null
UTF-8
Java
false
false
2,117
java
package com.mouritech.healthapp.fitbitauth; import android.content.Intent; import java.util.Set; public class AuthenticationConfiguration { private ClientCredentials clientCredentials; private Set<Scope> requiredScopes; private Set<Scope> optionalScopes; private Intent beforeLoginActivity; private boolean logoutOnAuthFailure; private RequestSigner requestSigner; private String encryptionKey; private Long tokenExpiresIn; AuthenticationConfiguration() { //Package only! } public ClientCredentials getClientCredentials() { return clientCredentials; } void setClientCredentials(ClientCredentials clientCredentials) { this.clientCredentials = clientCredentials; } public Set<Scope> getRequiredScopes() { return requiredScopes; } void setRequiredScopes(Set<Scope> requiredScopes) { this.requiredScopes = requiredScopes; } public Set<Scope> getOptionalScopes() { return optionalScopes; } void setOptionalScopes(Set<Scope> optionalScopes) { this.optionalScopes = optionalScopes; } public Intent getBeforeLoginActivity() { return beforeLoginActivity; } void setBeforeLoginActivity(Intent beforeLoginActivity) { this.beforeLoginActivity = beforeLoginActivity; } public boolean isLogoutOnAuthFailure() { return logoutOnAuthFailure; } public void setLogoutOnAuthFailure(boolean logoutOnAuthFailure) { this.logoutOnAuthFailure = logoutOnAuthFailure; } public RequestSigner getRequestSigner() { return requestSigner; } void setRequestSigner(RequestSigner requestSigner) { this.requestSigner = requestSigner; } public String getEncryptionKey() { return encryptionKey; } void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } public Long getTokenExpiresIn() { return tokenExpiresIn; } void setTokenExpiresIn(Long tokenExpiresIn) { this.tokenExpiresIn = tokenExpiresIn; } }
[ "udayv.in@mouritech.com" ]
udayv.in@mouritech.com
42ea30ea8316afd29528523e81d86803062d1824
a5cddb85be5fbd1924e579e76446d66ad123a3b6
/src/main/java/com/example/demo/src/community/model/PostCommPictureRes.java
ded9515ed5f5b14d9bd37953d557805486c205e6
[]
no_license
juwon9733/Youtube_Clone_Coding_API
1364a93fa2607541e47106b1e2763da6f7a92556
e8b3741bb1c481132dbc2dcdab394c2360449412
refs/heads/main
2023-06-30T09:15:51.052081
2021-07-27T15:10:52
2021-07-27T15:10:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package com.example.demo.src.community.model; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; @Getter @Setter @AllArgsConstructor public class PostCommPictureRes { private int imageUrlIdx; }
[ "wndnjs0249@naver.com" ]
wndnjs0249@naver.com
a408567f8b51c46809d16ff7f70aba6cc1e931a1
62c27ec6837ecba7c1ceae8395ef16ab2367fb53
/app/src/main/java/com/rozdoum/socialcomponents/main/search/news/SearchNewsView.java
9af0dd0b6eb90d1b7e9198eafefec214fc1a79d0
[ "Apache-2.0" ]
permissive
Eurekainc/BaBaberes
5ae106f2b48d52914b8b8f5504e6adecfca4dbf1
e61f4e6d5c115dc5d7d6eed78486dca50ed5fe4d
refs/heads/master
2020-04-09T21:02:43.184571
2018-10-18T09:53:45
2018-10-18T09:53:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.rozdoum.socialcomponents.main.search.news; import com.rozdoum.socialcomponents.main.base.BaseFragmentView; import com.rozdoum.socialcomponents.model.News; import com.rozdoum.socialcomponents.model.Post; import java.util.List; public interface SearchNewsView extends BaseFragmentView { void onSearchResultsReady(List<News> news); void showLocalProgress(); void hideLocalProgress(); void showEmptyListLayout(); }
[ "helmiismail20@gmail.com" ]
helmiismail20@gmail.com
f66e5f5e1ff99c1ed5701ba1a083b4c4dfa0e969
17089134a1ec1d8e06df33439fe5e5c84a558db9
/news_google/src/together/news/download/content/sohu/ContentProcessor4Sohu.java
4cd0005d3f5a73bf94fff8450af3bb74fd0c9529
[]
no_license
xiejames/goodnews
1fc333697d4b417ea09224da32372bd8d24e8cdf
1b91400f957c9941ad49204185ffc441ad5618e2
refs/heads/master
2016-09-06T00:52:35.299505
2014-11-21T12:45:35
2014-11-21T12:45:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
456
java
package together.news.download.content.sohu; import java.io.IOException; import java.util.List; import together.news.common.NewsDTO; import together.news.download.content.common.JsoupContentProcessorWithRSSAtom; public class ContentProcessor4Sohu extends JsoupContentProcessorWithRSSAtom{ @Override protected void loadPictureData(List<NewsDTO> list, int max) throws IOException { // TODO Auto-generated method stub } }
[ "xie.james@hotmail.com" ]
xie.james@hotmail.com