blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0857e0e3b600fada067c29077c1c799718315ffe | fa8bdc2f1a36a88d8db9ca97418a687ae9603251 | /app/src/test/java/com/example/androidmood/heroapi/ExampleUnitTest.java | 7ae24c65de0865ea5f6ee1aaf18ee620c66642de | [] | no_license | rubaroro1999/api-project | 5ba84e97cbda31eeb9eaff994c3855f045b04720 | 2e4a54d9fc70173021da926908675f26a7524511 | refs/heads/master | 2022-11-05T04:16:37.391008 | 2020-06-18T13:28:05 | 2020-06-18T13:28:05 | 273,245,442 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 392 | java | package com.example.androidmood.heroapi;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"43495147+rubafikri@users.noreply.github.com"
] | 43495147+rubafikri@users.noreply.github.com |
009ed8058986c668d890cfb38cbbb40e6869fbb2 | d1d666b3c658359cd431ad20fdb19ddde1c91bee | /仿饿了么点餐系统/ele(接口)/src/controller/Login_controller.java | 0efd8ab60d8fb622cd1155918a28462903911d07 | [] | no_license | NewBeeMrz/Myele | d465679acad8168ddb4fa4009e9c2733dd330061 | 09dc35642aac82a85e06660fac8174d8e4218f54 | refs/heads/master | 2022-12-21T23:15:23.176321 | 2020-09-28T01:28:45 | 2020-09-28T01:28:45 | 299,153,958 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,809 | java | package controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import entity.User;
import service.UserService;
@Controller
public class Login_controller {
@Autowired
@Qualifier("userService")
private UserService userService;
/**
* 直接返回对象,自动转化为JSON格式
* @param teamname
* @param request
* @return
*/
@CrossOrigin
@RequestMapping(value="login/getloginuser.action")
@ResponseBody
public User getLoginUser(String user_name,String user_pass,HttpServletRequest request) {
User user = new User();
user.setUser_name(user_name);
user.setUser_pass(user_pass);
User loginUser = this.userService.getUser(user);
return loginUser;
}
@CrossOrigin
@RequestMapping(value="login/getloginuserbyPhone.action")
@ResponseBody
public User getLoginUserbyPhone(String phonenum,String user_pass,HttpServletRequest request) {
User user = new User();
user.setPhonenum(phonenum);
user.setUser_pass(user_pass);
User loginUser = this.userService.getUserbyPhone(user);
return loginUser;
}
@CrossOrigin
@RequestMapping(value="register/createUser.action")
@ResponseBody
public Integer createUser(User user,HttpServletRequest request) {
int rows = this.userService.createUser(user);
return rows;
}
}
| [
"512316360@qq.com"
] | 512316360@qq.com |
3717775b8f171c9916c327a5bc1bacf581d8c34c | b1c2522b3e1aad967fc616cad4c71d40a8ff1f28 | /tests/compilor/generacion_de_codigo/002cor_inicializadores.java | aba1c9da40d245f61960f3b0a4e6b10ee85c160e | [] | no_license | chiiph/compilor | 65160548e3b6b4f1e72148d53cff3f8504742dfe | ca6b433b0b0a435c5a93d9cdde1d7832cdfb2231 | refs/heads/master | 2016-09-06T10:21:49.192583 | 2011-11-29T18:10:07 | 2011-11-29T18:10:07 | 2,258,111 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 776 | java | public class Algo
{
public int a = 4;
public String h = "hola";
public int d = metodo();
public char j = otro_metodo(this);
public static int m = algo();
public static String jh = "chau";
public static char q = 'm';
public Algo()
{
System.println(a);
System.println(h);
System.println(d);
System.println(j);
System.println(Algo.m);
System.println(Algo.jh);
System.println(Algo.q);
}
public static int algo()
{
return 1;
}
public int metodo()
{
return 3;
}
public char otro_metodo(Algo b)
{
return 'a';
}
public static void main()
{
Algo b = new Algo();
}
}
public class AlgoMas
{
public static int j = 3;
public static char m = '5';
}
| [
"chiiph@torproject.org"
] | chiiph@torproject.org |
f1d04f257c94a3d4e2ac5fb961aa9d5386bb6092 | 16513304da52cdfff51b3a101458fac86a32d758 | /jeecms/portal-backend-web/src/main/java/com/portal/common/WebConstant.java | 361b3564d7cbfcd962ff8f7f338c30446fadf080 | [] | no_license | withub-lyx/app | 4418da9b839cdec02a1133ce0fb7ac543a8e6d2b | f48d44361be7280a0d6d0a0d163d76817274e01b | refs/heads/master | 2021-01-19T13:12:53.384458 | 2017-08-20T04:22:52 | 2017-08-20T04:22:52 | 100,832,749 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 242 | java | package com.portal.common;
/**
* Created by liuquan on 2017/1/11 11:38
*/
public class WebConstant {
public static final String WECHAT_LOGIN_CALLBACK = "wechat_login_callback";
public static final String WECHAT_UT = "wechat_ut";
}
| [
"Administrator@192.168.1.106"
] | Administrator@192.168.1.106 |
1d3f1112a9e6ff21d4cd21826b03b5f71ab5db83 | bc9eec94679228e3cd1b479fce5681456583bf94 | /shoppingbackend/src/test/java/com/ecommerce/shoppingbackend/AppTest.java | 31edcd971d9fd6cb46d96f5615365f0960ce0bde | [] | no_license | Adil93/onlineshopping | 14c6d2818abbe6356ea73dc72591bc37e12c3234 | f923732867c6bc1e7e8ef38cc3ec61ef66d3419e | refs/heads/master | 2021-09-02T12:43:47.966659 | 2018-01-02T18:33:31 | 2018-01-02T18:33:31 | 114,675,762 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 657 | java | package com.ecommerce.shoppingbackend;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
| [
"adil93.mec@gmail.com"
] | adil93.mec@gmail.com |
35f1c4b9670a7476c286d06bafd76548c70284f1 | b1b35e8642e2e59a01d316c4493d0de8ce968dd3 | /EStore/src/Java/atg/projects/store/droplet/DefaultProductDetailsDroplet.java | de36f5155c47143caae532b781d460f85c3e72cc | [] | no_license | ilias500/atg-store | 76205be5b81bad16d1f56ba4ed0477b8ccb73d61 | 77de9dad445207e7d7c8d0dbfa8bfe398dc9e61a | refs/heads/master | 2021-01-20T04:22:54.665951 | 2014-05-21T16:30:48 | 2014-05-21T16:30:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 28,561 | java | /*<ORACLECOPYRIGHT>
* Copyright (C) 1994-2013 Oracle and/or its affiliates. All rights reserved.
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
* UNIX is a registered trademark of The Open Group.
*
* This software and related documentation are provided under a license agreement
* containing restrictions on use and disclosure and are protected by intellectual property laws.
* Except as expressly permitted in your license agreement or allowed by law, you may not use, copy,
* reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish,
* or display any part, in any form, or by any means. Reverse engineering, disassembly,
* or decompilation of this software, unless required by law for interoperability, is prohibited.
*
* The information contained herein is subject to change without notice and is not warranted to be error-free.
* If you find any errors, please report them to us in writing.
*
* U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S.
* Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable
* Federal Acquisition Regulation and agency-specific supplemental regulations.
* As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and
* license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the
* Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License
* (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
*
* This software or hardware is developed for general use in a variety of information management applications.
* It is not developed or intended for use in any inherently dangerous applications, including applications that
* may create a risk of personal injury. If you use this software or hardware in dangerous applications,
* then you shall be responsible to take all appropriate fail-safe, backup, redundancy,
* and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any
* damages caused by use of this software or hardware in dangerous applications.
*
* This software or hardware and documentation may provide access to or information on content,
* products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and
* expressly disclaim all warranties of any kind with respect to third-party content, products, and services.
* Oracle Corporation and its affiliates will not be responsible for any loss, costs,
* or damages incurred due to your access to or use of third-party content, products, or services.
</ORACLECOPYRIGHT>*/
package atg.projects.store.droplet;
import atg.commerce.gifts.GiftlistSiteFilter;
import atg.commerce.gifts.GiftlistTools;
import atg.commerce.inventory.InventoryException;
import atg.multisite.Site;
import atg.multisite.SiteContextManager;
import atg.projects.store.catalog.StoreCatalogTools;
import atg.projects.store.catalog.comparison.StoreProductComparisonList;
import atg.projects.store.inventory.StoreInventoryManager;
import atg.projects.store.multisite.StoreSitePropertiesManager;
import atg.projects.store.profile.StorePropertyManager;
import atg.repository.RepositoryException;
import atg.repository.RepositoryItem;
import atg.service.collections.filter.FilterException;
import atg.service.util.CurrentDate;
import atg.servlet.DynamoHttpServletRequest;
import atg.servlet.DynamoHttpServletResponse;
import atg.servlet.DynamoServlet;
import atg.servlet.ServletUtil;
import atg.userprofiling.Profile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
/**
* This droplet should be used on the Single/Multiple SKU Product Details Pages.
*
* <p>
* This droplet obtains currently viewed product and SKU from the current
* request and saves into request all necessary data to be displayed on the PDP.
* </p>
*
* <p><b>Input parameters:</b>
* <dl>
* <dt>product</dt>
* <dd>Currently viewed product.</dd>
* <dt>skus</dt>
* <dd>Product's child SKUs. Will be used if selectedSku is not specified.</dd>
* <dt>selectedSku</dt>
* <dd>Currently viewed SKU. For a multi-SKU PDP this droplet should be called for each displayed SKU.</dd>
* </dl>
* </p>
*
* <p><b>Output parameters:</b>
* <dl>
* <dt>quantity</dt>
* <dd>Default quantity to be displayed on the page.</dd>
* <dt>availabilityType</dt>
* <dd>Specifies availability of the currently selected SKU. Can be one of the following:
* <ol>
* <li>available</li>
* <li>preorderable</li>
* <li>backorderable</li>
* <li>unavailable</li>
* </ol>
* </dd>
* <dt>availabilityDate</dt>
* <dd>If <code>availabilityType</code> is <code>preorderable</code> or <code>backorderable</code>, this parameter will be set.
* Contains date when the SKU specified will be available.</dd>
* <dt>comparisonsContainsProduct</dt>
* <dd>Flags, if current product is already added to the Comparisons List.</dd>
* <dt>showEmailAFriend</dt>
* <dd>Flags, if 'Email a Friend' button should be displayed.</dd>
* <dt>showGiftlists</dt>
* <dd>Flags, if 'Add to Giftlist' button should be displayed.</dd>
* <dt>wishlistContainsSku</dt>
* <dd>Flags, if user wishlist already contains the SKU specified.</dd>
* <dt>giftlists</dt>
* <dd>Collection of user's giftlists. Note that these giftlists are filtered by site already.</dd>
* <dt>selectedSku</dt>
* <dd>The selected SKU, will be the same as passed in. If no SKU is passed and product
* contains only one SKU then selectedSku parameter will be set to this SKU.</dd>
* </dl>
* </p>
*
* <p><b>Open parameters:</b>
* <dl>
* <dt>output</dt>
* <dd>Always rendered</dd>
* </dl>
* </p>
*
* @author ATG
* @version $Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/droplet/DefaultProductDetailsDroplet.java#3 $$Change: 800944 $
* @updated $DateTime: 2013/04/03 07:00:26 $$Author: ckearney $
*/
public class DefaultProductDetailsDroplet extends DynamoServlet {
/** Class version string. */
public static final String CLASS_VERSION =
"$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/droplet/DefaultProductDetailsDroplet.java#3 $$Change: 800944 $";
//----------------------------------------------------------------------------
// STATIC
//----------------------------------------------------------------------------
protected static final String AVAILABILITY_STATUS_UNAVAILABLE = "unavailable";
protected static final String AVAILABILITY_STATUS_AVAILABLE = "available";
protected static final String AVAILABILITY_STATUS_BACKORDERABLE = "backorderable";
protected static final String AVAILABILITY_STATUS_PREORDERABLE = "preorderable";
protected static final String OPEN_PARAMETER_OUTPUT = "output";
protected static final String PARAMETER_AVAILABILITY_DATE = "availabilityDate";
protected static final String PARAMETER_AVAILABILITY_TYPE = "availabilityType";
protected static final String PARAMETER_COMPARISONS_CONTAINS_PRODUCT = "comparisonsContainsProduct";
protected static final String PARAMETER_PRODUCT = "product";
protected static final String PARAMETER_QUANTITY = "quantity";
protected static final String PARAMETER_SELECTED_SKU = "selectedSku";
protected static final String PARAMETER_SHOW_EMAIL_A_FRIEND = "showEmailAFriend";
protected static final String PARAMETER_SHOW_GIFTLISTS = "showGiftlists";
protected static final String PARAMETER_SKUS = "skus";
protected static final String PARAMETER_WISHLIST_CONTAINS_SKU = "wishlistContainsSku";
protected static final String PARAMETER_GIFTLISTS = "giftlists";
protected static final String PARAMETER_GIFTLIST_CONTAINS_SKU = "giftlistsContainingSku";
//----------------------------------------------------------------------------
// PROPERTIES
//----------------------------------------------------------------------------
//-----------------------------------
// property: giftListSiteFilter
private GiftlistSiteFilter mGiftListSiteFilter = null;
/**
* @return the giftListSiteFilter
*/
public GiftlistSiteFilter getGiftListSiteFilter() {
return mGiftListSiteFilter;
}
/**
* @param pGiftListSiteFilter the giftListSiteFilter to set
*/
public void setGiftListSiteFilter(GiftlistSiteFilter pGiftListSiteFilter) {
mGiftListSiteFilter = pGiftListSiteFilter;
}
//------------------------------------
// property: inventoryManager
private StoreInventoryManager mInventoryManager;
/**
* @return the inventoryManager
*/
public StoreInventoryManager getInventoryManager() {
return mInventoryManager;
}
/**
* @param pInventoryManager the inventoryManager to set
*/
public void setInventoryManager(StoreInventoryManager pInventoryManager) {
mInventoryManager = pInventoryManager;
}
//-----------------------------------
// property: profilePropertyManager
private StorePropertyManager mProfilePropertyManager;
/**
* @return the profilePropertyManager
*/
public StorePropertyManager getProfilePropertyManager() {
return mProfilePropertyManager;
}
/**
* @param pProfilePropertyManager the profilePropertyManager to set
*/
public void setProfilePropertyManager(StorePropertyManager pProfilePropertyManager) {
mProfilePropertyManager = pProfilePropertyManager;
}
//-----------------------------------
// property: giftlistTools
private GiftlistTools mGiftlistTools;
/**
* @return the giftlistTools
*/
public GiftlistTools getGiftlistTools() {
return mGiftlistTools;
}
/**
* @param pGiftlistTools the giftlistTools to set
*/
public void setGiftlistTools(GiftlistTools pGiftlistTools) {
mGiftlistTools = pGiftlistTools;
}
//-----------------------------------
// property: sitePropertyManager
private StoreSitePropertiesManager mSitePropertiesManager;
/**
* @return the sitePropertiesManager
*/
public StoreSitePropertiesManager getSitePropertiesManager() {
return mSitePropertiesManager;
}
/**
* @param pSitePropertiesManager the sitePropertiesManager to set
*/
public void setSitePropertiesManager(StoreSitePropertiesManager pSitePropertiesManager) {
mSitePropertiesManager = pSitePropertiesManager;
}
//-----------------------------------
// property: catalogTools
private StoreCatalogTools mCatalogTools;
/**
* Gets the mCatalogTools
* @return mCatalogTools
*/
public StoreCatalogTools getCatalogTools() {
return mCatalogTools;
}
/**
* Sets the mCatalogTools
* @param pCatalogTools Value to set
*/
public void setCatalogTools(StoreCatalogTools pCatalogTools) {
mCatalogTools = pCatalogTools;
}
//-----------------------------------
// property: currentDate
private CurrentDate mCurrentDate;
/**
* Sets the CurrentDate component.
*/
public void setCurrentDate(CurrentDate pCurrentDate) {
mCurrentDate = pCurrentDate;
}
/**
* Gets the CurrentDate component.
*/
public CurrentDate getCurrentDate() {
return mCurrentDate;
}
//-------------------------------------
// property: productComparisonList
private StoreProductComparisonList mProductComparisonList;
/**
* Sets property productComparisonList. Our store comparison list.
*/
public void setProductComparisonList(StoreProductComparisonList pProductComparisonList) {
mProductComparisonList = pProductComparisonList;
}
/** Returns property productComparisonList. Our store comparison
* list. */
public StoreProductComparisonList getProductComparisonList() {
return mProductComparisonList;
}
//-------------------------------------
// property: profile
private Profile mProfile;
/** Sets property currentProfile. The current profile. */
public void setProfile(Profile pProfile) {
mProfile = pProfile;
}
/** Returns property currentProfile. The current profile. */
public Profile getProfile() {
return mProfile;
}
//----------------------------------------------------------------------------
// METHODS
//----------------------------------------------------------------------------
/**
* This method provides the default implementation of service, by dispatching
* to conventionally named methods which begin with "do".
*
* @param pRequest the request to be processed
* @param pResponse the response object for this request
*
* @throws ServletException an application specific error occurred processing
* this request
* @throws IOException an error occurred reading data from the request or
* writing data to the response.
*/
@Override
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
throws ServletException, IOException
{
String availabilityType = getAvailabilityType(getSelectedSku(pRequest), getCurrentProduct(pRequest));
RepositoryItem selectedSkuRepositoryItem = getSelectedSku(pRequest);
if(AVAILABILITY_STATUS_BACKORDERABLE.equals(availabilityType)
|| AVAILABILITY_STATUS_PREORDERABLE.equals(availabilityType))
{
pRequest.setParameter(PARAMETER_AVAILABILITY_DATE, getAvailabilityDate(getSelectedSku(pRequest), getCurrentProduct(pRequest), availabilityType));
}
pRequest.setParameter(PARAMETER_AVAILABILITY_TYPE, availabilityType);
pRequest.setParameter(PARAMETER_QUANTITY, getQuantity(pRequest));
pRequest.setParameter(PARAMETER_SHOW_GIFTLISTS, areGiftlistsAvailable(pRequest));
pRequest.setParameter(PARAMETER_GIFTLISTS, getCurrentProfileGiftlists(pRequest));
pRequest.setParameter(PARAMETER_WISHLIST_CONTAINS_SKU, isCurrentSkuAddedToWishlist(pRequest));
pRequest.setParameter(PARAMETER_COMPARISONS_CONTAINS_PRODUCT, isCurrentProductAddedToComparisons(pRequest));
pRequest.setParameter(PARAMETER_SHOW_EMAIL_A_FRIEND, isEmailEnabled(pRequest));
pRequest.setParameter(PARAMETER_SELECTED_SKU, selectedSkuRepositoryItem);
pRequest.setParameter(PARAMETER_GIFTLIST_CONTAINS_SKU, giftlistsContainingSku(selectedSkuRepositoryItem));
serviceContents(pRequest, pResponse);
}
/**
* This method specifies, which open parameters should be serviced. Current
* implementation services 'output' oparam only.
*
* @param pRequest current request.
* @param pResponse current response.
*
* @throws ServletException if something goes wrong.
* @throws IOException if something goes wrong.
*/
protected void serviceContents(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
throws ServletException, IOException
{
pRequest.serviceLocalParameter(OPEN_PARAMETER_OUTPUT, pRequest, pResponse);
}
/**
* This method retrieves current profile from the request specified.
*
* @param pRequest current request.
*
* @return currently served profile.
*/
protected Profile getCurrentProfile(DynamoHttpServletRequest pRequest) {
return getProfile();
}
/**
* This method retrieves current Comparisons List from the request specified.
*
* @param pRequest current request.
*
* @return currently served comparisons list.
*/
protected StoreProductComparisonList getCurrentComparisonsList(DynamoHttpServletRequest pRequest) {
return getProductComparisonList();
}
/**
* This method calculates the quantity to be displayed on the PDP.Current
* implementation returns 1.
*
* @param pRequest current request.
*
* @return 1.
*/
protected long getQuantity(DynamoHttpServletRequest pRequest) {
return 1;
}
/**
* This method takes currently selected SKU from the request. If it's not passed
* but product contains only single SKU then this SKU is returned.
*
* @param pRequest current request.
*
* @return currently selected SKU.
*/
protected RepositoryItem getSelectedSku(DynamoHttpServletRequest pRequest) {
RepositoryItem selectedSku = (RepositoryItem) pRequest.getObjectParameter(PARAMETER_SELECTED_SKU);
if (selectedSku == null) {
RepositoryItem product = getCurrentProduct(pRequest);
if (product != null){
Collection<RepositoryItem> skus = getAllSkus(pRequest);
if (skus!= null && skus.size()==1){
selectedSku = skus.iterator().next();
}
}
}
return selectedSku;
}
/**
* This method takes currently viewed product from the request specified.
*
* @param pRequest current request.
*
* @return currently viewed product.
*/
protected RepositoryItem getCurrentProduct(DynamoHttpServletRequest pRequest) {
return (RepositoryItem) pRequest.getObjectParameter(PARAMETER_PRODUCT);
}
/**
* This method obtains a <code>Collection</code> of all specified product
* SKUs. These SKU should be specified as <code>skus</code> request parameter.
*
* @param pRequest current request.
*
* @return product's child SKUs.
*/
protected Collection<RepositoryItem> getAllSkus(DynamoHttpServletRequest pRequest) {
return (Collection<RepositoryItem>) pRequest.getObjectParameter(PARAMETER_SKUS);
}
/**
* This method calculates availability date for the product and SKU specified.
* Current implementation takes availability from the inventory manager.
*
* @param pSku currently selected SKU.
* @param pProduct currently viewed product.
* @param pAvailabilityType product/SKU availability (i.e. 'available',
* 'preorderable', etc.)
*
* @return availability date.
*/
protected Date getAvailabilityDate(RepositoryItem pSku, RepositoryItem pProduct,
String pAvailabilityType)
{
// If SKU is not selected yet, do not calculate availability date.
if (pSku == null) {
return null;
}
try {
// Caluclate this date for backorderable and preorderable SKUs only.
if (AVAILABILITY_STATUS_BACKORDERABLE.equals(pAvailabilityType)) {
Date backorderAvailableDate = getInventoryManager().getBackorderAvailabilityDate(pSku.getRepositoryId());
// Get the current system time.
CurrentDate cd = getCurrentDate();
Date currentDate = cd.getTimeAsDate();
if (backorderAvailableDate != null && backorderAvailableDate.after(currentDate)) {
return backorderAvailableDate;
}
} else if (AVAILABILITY_STATUS_PREORDERABLE.equals(pAvailabilityType)) {
return getInventoryManager().getPreorderAvailabilityDate(pProduct);
}
} catch (InventoryException ex) {
// Surpress inventory exception, we can live without availability date set.
return null;
}
return null;
}
/**
* This method calculates availability type for the product/SKU specified.
* Current implementation takes availability from the inventory manager.
* Return value may be one of the following:
* <ol>
* <li>{@link #AVAILABILITY_STATUS_AVAILABLE}</li>
* <li>{@link #AVAILABILITY_STATUS_BACKORDERABLE}</li>
* <li>{@link #AVAILABILITY_STATUS_PREORDERABLE}</li>
* <li>{@link #AVAILABILITY_STATUS_UNAVAILABLE}</li>
* </ol>
*
* @param pSku currently selected SKU.
* @param pProduct currently viewed product.
*
* @return availability type in form of <code>String</code>
*/
protected String getAvailabilityType(RepositoryItem pSku, RepositoryItem pProduct) {
if (pSku == null) {
return null;
}
try {
int availabilityType = getInventoryManager().queryAvailabilityStatus(pProduct, pSku.getRepositoryId());
if (availabilityType == getInventoryManager().getAvailabilityStatusInStockValue()) {
return AVAILABILITY_STATUS_AVAILABLE;
} else if (availabilityType == getInventoryManager().getAvailabilityStatusBackorderableValue()) {
return AVAILABILITY_STATUS_BACKORDERABLE;
} else if (availabilityType == getInventoryManager().getAvailabilityStatusPreorderableValue()) {
return AVAILABILITY_STATUS_PREORDERABLE;
} else {
return AVAILABILITY_STATUS_UNAVAILABLE;
}
}
catch (InventoryException ex) {
// Suppress inventory exception, we can live without availability status.
return null;
}
}
/**
* This method calculates all user's giftlists to be displayed on the page.
* Current implementation filters giftlists created on the current site group
* only.
*
* @param pRequest current request.
*
* @return user's giftlists.
*/
protected Collection<RepositoryItem> getCurrentProfileGiftlists(DynamoHttpServletRequest pRequest) {
// Get all user's giftlists...
Collection<RepositoryItem> allGiftlists = (Collection<RepositoryItem>) getCurrentProfile(pRequest).
getPropertyValue(getProfilePropertyManager().getGiftlistsPropertyName());
try {
// ...and filter out giftlists created on wrong sites.
return getGiftListSiteFilter().filterCollection(allGiftlists, null, getCurrentProfile(pRequest));
}
catch (FilterException ex) {
// Suppress filtering exception, we can live without giftlists.
return null;
}
}
/**
* This method calculates <code>boolean</code> flag, specifying if 'Add to
* Giftlist' button should be displayed on the page. Current implementation
* does not show this button to transient users or users without giftlists.
*
* @param pRequest current request.
*
* @return <code>boolean</code> flag.
*/
protected boolean areGiftlistsAvailable(DynamoHttpServletRequest pRequest) {
// User is transient? do not display the button.
if (getCurrentProfile(pRequest).isTransient()) {
return false;
}
Collection<RepositoryItem> giftlists = getCurrentProfileGiftlists(pRequest);
// There are no giftlists created by this user? do not dislpay the button.
if (giftlists == null || giftlists.isEmpty()) {
return false;
}
return true;
}
/**
* This method calculates a <code>boolean</code> flag, specifying if currently
* selected SKU is already added to the user's wishlist.
*
* @param pRequest current request.
*
* @return <code>true</code> if SKU already added to the wishlist,
* <code>false</code> otherwise.
*/
protected boolean isCurrentSkuAddedToWishlist(DynamoHttpServletRequest pRequest) {
RepositoryItem currentSku = getSelectedSku(pRequest);
// No SKU selected? then it's not added yet.
if (currentSku == null) {
return false;
}
RepositoryItem wishlist = (RepositoryItem) getCurrentProfile(pRequest).
getPropertyValue(getProfilePropertyManager().getWishlistPropertyName());
// No wishlist created for user? then SKU is not added yet.
if (wishlist == null) {
return false;
}
Collection<RepositoryItem> wishlistItems = (Collection<RepositoryItem>) wishlist.getPropertyValue(getGiftlistTools().getGiftlistItemsProperty());
// Wishlist is created, but it's empty? then SKU is not added yet.
if (wishlistItems == null || wishlistItems.isEmpty()) {
return false;
}
try {
// Filter out items came from other sites.
Collection<RepositoryItem> filteredItems = getGiftListSiteFilter().filterCollection(wishlistItems, null, getCurrentProfile(pRequest));
// Search for currently selected SKU.
for (RepositoryItem item : filteredItems) {
String catalogRefId = (String) item.getPropertyValue(getGiftlistTools().getCatalogRefIdProperty());
if (catalogRefId != null && catalogRefId.equals(currentSku.getRepositoryId())) {
// Found?! wishlist contains current SKU.
return true;
}
}
return false;
}
catch (FilterException ex) {
// Surpress filtering exception, if unable to filter wishlist items, just do not display wishlist link.
return false;
}
}
/**
* This method calculates <code>boolean</code> flag, specifying if currently
* viewed product is already added to the Comparisons list.
*
* @param pRequest current request.
*
* @return <code>true</code> if current product is already added to the list,
* <code>false</code> otherwise.
*/
protected boolean isCurrentProductAddedToComparisons(DynamoHttpServletRequest pRequest) {
RepositoryItem currentProduct = getCurrentProduct(pRequest);
if (currentProduct == null) {
return false;
}
try {
return getCurrentComparisonsList(pRequest).contains(currentProduct.getRepositoryId());
}
catch (RepositoryException ex) {
// Surpress repository exception, we can leave without comparisons determined.
return false;
}
}
/**
* This method calculates <code>boolean</code> flag, specifying if currently
* viewed product can be emailed to a friend.
*
* @param pRequest current request.
*
* @return <code>true</code> if 'Email a Friend' button should be displayed,
* <code>false</code> otherwise.
*/
protected boolean isEmailEnabled(DynamoHttpServletRequest pRequest) {
// For this button to be displayed, both product and current site must have
// an 'emailAFriendEnabled' property set to true.
RepositoryItem currentProduct = getCurrentProduct(pRequest);
Site currentSite = SiteContextManager.getCurrentSite();
if (currentProduct == null || currentSite == null) {
return false;
}
Boolean siteEmailEnabled = (Boolean) currentSite.getPropertyValue(getSitePropertiesManager().getEmailAFriendEnabledPropertyName());
Boolean productEmailEnabled = (Boolean) currentProduct.getPropertyValue(getSitePropertiesManager().getEmailAFriendEnabledPropertyName());
if (siteEmailEnabled == null || productEmailEnabled == null) {
return false;
}
return siteEmailEnabled && productEmailEnabled;
}
/**
* This method creates a list of Giftlist Ids by checking if currently
* selected SKU is already added to the user's giftlist.
*
* @param pSelectedSkuRepositoryItem selected SKU.
*
* @return The List of giftlist ids if SKU is already present in that Giftlist
*/
protected List giftlistsContainingSku (RepositoryItem pSelectedSkuRepositoryItem) {
if(pSelectedSkuRepositoryItem == null){
return Collections.EMPTY_LIST;
}
List giftlistsContainingSku = new ArrayList();
String currentSkuId = pSelectedSkuRepositoryItem.getRepositoryId();
Collection<RepositoryItem> allGiftlists = (Collection<RepositoryItem>) ServletUtil.getCurrentUserProfile().getPropertyValue(getProfilePropertyManager().getGiftlistsPropertyName());
if (allGiftlists != null && allGiftlists.size() > 0) {
for (RepositoryItem giftList : allGiftlists) {
try {
Object giftItems = giftList.getPropertyValue(getGiftlistTools().getGiftlistItemsProperty());
// Filter out items came from other sites.
Collection<RepositoryItem> filteredItems = getGiftListSiteFilter().filterCollection( (Collection) giftItems, null, ServletUtil.getCurrentUserProfile());
// Search for currently selected SKU.
for (RepositoryItem item : filteredItems) {
String catalogRefId = (String) item.getPropertyValue(getGiftlistTools().getCatalogRefIdProperty());
// Check if the SKU id is same as the selected SKU id
if(catalogRefId.equals(currentSkuId)){
// Found?! giftlist contains current SKU.
giftlistsContainingSku.add(giftList.getRepositoryId());
break;
}
}
}
catch(FilterException ex) {
// Surpress filtering exception, if unable to filter giftlist items, just do not display giftlist link.
if(isLoggingError()) {
logError("Unable to filter giftlist items and hence can not display GiftList link ", ex);
}
}
}
return giftlistsContainingSku;
}
return Collections.EMPTY_LIST;
}
}
| [
"dzamaruev@qubell.com"
] | dzamaruev@qubell.com |
ee483978035337e4985aa9bc5cd9f5f5d6466d70 | ff61eb8d054c8636f11193d610ca9507af57c82c | /android/Multi-Media/app/src/main/java/demo/org/ichanging/multi_media/VideoRecorderDemo.java | 0776e535a5e852abb80597fa6654080262d1d897 | [] | no_license | neil-pan-s/kata | 793a2ca7ca70738b8041b14387cf2a933087566e | 831ca6ded1daada647f4b2b4a7c60face298cfe0 | refs/heads/master | 2020-04-16T02:59:41.014746 | 2019-02-19T10:08:03 | 2019-02-19T10:08:03 | 165,216,236 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,835 | java | package demo.org.ichanging.multi_media;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView;
import java.io.File;
import java.io.IOException;
public class VideoRecorderDemo extends AppCompatActivity {
File recordFile = null;
MediaRecorder mRecorder;
SurfaceView sView;
private boolean isRecording = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video_recorder_demo);
final VideoView videoView = (VideoView) findViewById(R.id.videoView1);
final MediaController mediaController = new MediaController(this);
mediaController.setMediaPlayer(videoView);
//mediaController.hide();
sView = (SurfaceView) findViewById(R.id.surfaceView);
sView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
sView.getHolder().setFixedSize(320, 280);
sView.getHolder().setKeepScreenOn(true);
try {
recordFile = new File(getCacheDir().getCanonicalPath() + "/record.mp4");
} catch (IOException e) {
e.printStackTrace();
}
findViewById(R.id.button8).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
mRecorder = new MediaRecorder();
mRecorder.reset();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); // 设置声音来源
mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
//设置视频的输出格式 必须在设置音频 视频编码格式前
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
//mRecorder.setVideoSize(320, 280); //cause error MediaRecorder: start failed: -19
mRecorder.setVideoFrameRate(4);
mRecorder.setOutputFile(recordFile.getAbsolutePath());
mRecorder.setPreviewDisplay(sView.getHolder().getSurface());
mRecorder.prepare();
mRecorder.start();
isRecording = true;
} catch (IOException e) {
e.printStackTrace();
}
}
});
findViewById(R.id.button9).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(mRecorder != null)
{
mRecorder.stop();
mRecorder.release();
mRecorder = null;
}
if(recordFile != null && recordFile.exists())
{
videoView.setVideoPath(recordFile.getAbsolutePath());
videoView.setMediaController(mediaController);
videoView.requestFocus();
videoView.start();
}
}
});
}
@Override
protected void onDestroy() {
if(mRecorder != null)
{
mRecorder.stop();
mRecorder.release();
mRecorder = null;
}
super.onDestroy();
}
}
| [
"p.changing@qq.com"
] | p.changing@qq.com |
43dffa783cd956ac568f6cacd582645300f41dfc | a991847fa1715a793d9031e29c60eb9410cae3dd | /smartstation-client/app/src/main/java/braudeproject/smartstations/Activities/RoutesListActivity.java | 17a4b8f64a9c44c1f946ea60dfb79e92ce0ab150 | [] | no_license | ajbolous/smartstation | 701d20319f43dfc0c2b3f4b9f9a8c6293d44b86d | 280e0cfadd5a4a2b09c9dc5848c4e8d8d06d569a | refs/heads/master | 2020-03-10T00:28:27.172813 | 2018-06-30T15:43:39 | 2018-06-30T15:43:39 | 129,082,517 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,265 | java | package braudeproject.smartstations.Activities;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.android.volley.toolbox.StringRequest;
import java.util.ArrayList;
import java.util.List;
import braudeproject.smartstations.Models.Route;
import braudeproject.smartstations.R;
import braudeproject.smartstations.Services.RequestCallback;
import braudeproject.smartstations.Services.RoutesService;
import braudeproject.smartstations.Services.WebServices;
public class RoutesListActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_routes_list);
RoutesService.getAvailableRoutes("user1", new RequestCallback<Route[]>(){
@Override
public void onSuccess(Route[] routes) {
BaseAdapter adapter = new MyAdapter(routes);
((ListView)findViewById(R.id.routesListView)).setAdapter(adapter);
}
});
AdapterView.OnItemClickListener onItemClickListener = new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Route route = (Route)adapterView.getItemAtPosition(i);
Snackbar.make(view, "Assigning new Driver (Bus) to Route " + route.getRouteNumber(), Snackbar.LENGTH_LONG).setAction("Action", null).show();
startActivity(new Intent(RoutesListActivity.this, DriverMapActivity.class));
}
};
((ListView)findViewById(R.id.routesListView)).setOnItemClickListener(onItemClickListener);
}
class MyAdapter extends BaseAdapter {
private Route[] mRoutes;
public MyAdapter(Route[] routes){
mRoutes = routes;
}
// override other abstract methods here
@Override
public int getCount() {
return mRoutes.length;
}
@Override
public Route getItem(int i) {
return mRoutes[i];
}
@Override
public long getItemId(int i) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup container) {
if (convertView == null) {
convertView = getLayoutInflater().inflate(R.layout.view_route, container, false);
}
Route route = getItem(position);
((TextView) convertView.findViewById(R.id.routeTextViewName)).setText("Route: " + route.getRouteNumber());
((TextView) convertView.findViewById(R.id.routeTextViewDesc)).setText("Stops: " + route.getStops().length + " , Length: " + route.getStops()[route.getStops().length -1].distanceFromOrigin + " KM");
return convertView;
}
}
}
| [
"ajbolous@gmail.com"
] | ajbolous@gmail.com |
aa975cbfcf7b4146cda5a999076ce426ef8ffbc4 | 7ca70374638f92072e87f591cd16794d9f2215df | /Patiente.java | 5fcfaa062ff479b3b2f8f78d91ae150782d8cd13 | [] | no_license | VilmaCLL/SecondYear | 017999d6a3e44676ba60a535aceacb7a4739ec0c | 5ac1dfe92267925ddad988770d9a120ad798ba31 | refs/heads/master | 2021-04-28T15:16:33.089147 | 2018-02-18T19:53:54 | 2018-02-18T19:53:54 | 121,984,153 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,259 | java | // This is the object called "Patient", which will be instantiated each time a patient is created.
public class Patiente {
String Pat_Name = null;
String Pat_SurName = null;
int Pat_Age = 0;
String Pat_Address = null;
String Pat_ContactNumber = null;
int Pat_id = 0;
int docRefer = 0;
public int getPat_id() {
return Pat_id;
}
public void setPat_id(int pat_id) {
Pat_id = pat_id;
}
public String getPat_Name() {
return Pat_Name;
}
public void setPat_Name(String pat_Name) {
Pat_Name = pat_Name;
}
public String getPat_SurName() {
return Pat_SurName;
}
public void setPat_SurName(String pat_SurName) {
Pat_SurName = pat_SurName;
}
public int getPat_Age() {
return Pat_Age;
}
public void setPat_Age(int pat_Age) {
Pat_Age = pat_Age;
}
public String getPat_Address() {
return Pat_Address;
}
public void setPat_Address(String pat_Address) {
Pat_Address = pat_Address;
}
public String getPat_ContactNumber() {
return Pat_ContactNumber;
}
public void setPat_ContactNumber(String pat_ContactNumber) {
Pat_ContactNumber = pat_ContactNumber;
}
public int getDocRefer() {
return docRefer;
}
public void setDocRefer(int docRefer) {
this.docRefer = docRefer;
}
}
//or Patients_Surname = '"+searchName+"' | [
"noreply@github.com"
] | VilmaCLL.noreply@github.com |
098c951185b720330533b204f7dd44dc0de8fdca | e10ac3b4533b3053bc7e978f889e8b575fabadfc | /Java4Android_AndroidStudio+IDEA_Jan2015/android-bootstrap/app/src/main/java/com/yourapp/package/appp2/core/Constants.java | 8a22ee4cd4a7d7f839a3f93ad15da9ce27443c41 | [
"Apache-2.0"
] | permissive | suddenven/java4android | b40572a899bb379cc633eb2b6e4d6f4587dab6c6 | 8b0a6abffc7cd8958611aba44275a1b318e04e7d | refs/heads/master | 2020-05-05T08:14:17.897142 | 2015-09-10T09:41:22 | 2015-09-10T09:41:22 | 42,235,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,348 | java |
package com.yourapp.package.appp2.core;
/**
* Bootstrap constants
*/
public final class Constants {
private Constants() {}
public static final class Auth {
private Auth() {}
/**
* Account type id
*/
public static final String BOOTSTRAP_ACCOUNT_TYPE = "com.yourapp.package.appp2";
/**
* Account name
*/
public static final String BOOTSTRAP_ACCOUNT_NAME = "Appp2";
/**
* Provider id
*/
public static final String BOOTSTRAP_PROVIDER_AUTHORITY = "com.yourapp.package.appp2.sync";
/**
* Auth token type
*/
public static final String AUTHTOKEN_TYPE = BOOTSTRAP_ACCOUNT_TYPE;
}
/**
* All HTTP is done through a REST style API built for demonstration purposes on Parse.com
* Thanks to the nice people at Parse for creating such a nice system for us to use for bootstrap!
*/
public static final class Http {
private Http() {}
/**
* Base URL for all requests
*/
public static final String URL_BASE = "https://api.parse.com";
/**
* Authentication URL
*/
public static final String URL_AUTH_FRAG = "/1/login";
public static final String URL_AUTH = URL_BASE + URL_AUTH_FRAG;
/**
* List Users URL
*/
public static final String URL_USERS_FRAG = "/1/users";
public static final String URL_USERS = URL_BASE + URL_USERS_FRAG;
/**
* List News URL
*/
public static final String URL_NEWS_FRAG = "/1/classes/News";
public static final String URL_NEWS = URL_BASE + URL_NEWS_FRAG;
/**
* List Checkin's URL
*/
public static final String URL_CHECKINS_FRAG = "/1/classes/Locations";
public static final String URL_CHECKINS = URL_BASE + URL_CHECKINS_FRAG;
/**
* PARAMS for auth
*/
public static final String PARAM_USERNAME = "username";
public static final String PARAM_PASSWORD = "password";
public static final String PARSE_APP_ID = "zHb2bVia6kgilYRWWdmTiEJooYA17NnkBSUVsr4H";
public static final String PARSE_REST_API_KEY = "N2kCY1T3t3Jfhf9zpJ5MCURn3b25UpACILhnf5u9";
public static final String HEADER_PARSE_REST_API_KEY = "X-Parse-REST-API-Key";
public static final String HEADER_PARSE_APP_ID = "X-Parse-Application-Id";
public static final String CONTENT_TYPE_JSON = "application/json";
public static final String USERNAME = "username";
public static final String PASSWORD = "password";
public static final String SESSION_TOKEN = "sessionToken";
}
public static final class Extra {
private Extra() {}
public static final String NEWS_ITEM = "news_item";
public static final String USER = "user";
}
public static final class Intent {
private Intent() {}
/**
* Action prefix for all intents created
*/
public static final String INTENT_PREFIX = "com.yourapp.package.appp2.";
}
public static class Notification {
private Notification() {
}
public static final int TIMER_NOTIFICATION_ID = 1000; // Why 1000? Why not? :)
}
}
| [
"suddenven@gmail.com"
] | suddenven@gmail.com |
d8230b685fc33a888d23bab9cfd2f4f0a72b0abb | fe60158b3c58a39be817c9206e6350ba60ff1202 | /src/main/java/com/example/ordering/resources/JerseyConfig.java | 6f22d907c76aa20d56cb227cb3ca5e20dd82b781 | [] | no_license | alex-gab/Restbucks | eee158bf6893eb7cd9fab6ed971a53f71d672f3f | 32e13cd1cfa8be240a0b7f50c7c85124c312b05b | refs/heads/master | 2021-01-21T04:39:45.509784 | 2016-07-30T16:03:46 | 2016-07-30T16:03:46 | 51,394,894 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | package com.example.ordering.resources;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.annotation.Configuration;
@Configuration
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(OrderResource.class);
}
}
| [
"dragoi.alex@gmail.com"
] | dragoi.alex@gmail.com |
3712b8636859a08cfe0fd8099b2a891a45abbfc4 | 4e7f9df78cf5833d3989b20dbeaa8272e752b342 | /CSC207--Software-Design/WebShoppingApp/PIII/src/finalproject/TestCheckout.java | cb92252e7ce947b0eba8e4cec756a446b0c729f9 | [
"MIT"
] | permissive | MattScicluna/CourseWork-UofT | 11d8bc4902929f6bedc559b4158ba959695279f7 | ab482fada032a9b11378272dd8962f14ff288bc4 | refs/heads/master | 2021-06-16T09:10:51.205005 | 2017-05-31T22:30:33 | 2017-05-31T22:30:33 | 92,779,032 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 7,194 | java | package finalproject;
import java.util.ArrayList;
import java.util.List;
import finalproject.ProjectV1.ShoppingCartItem;
public class TestCheckout {
public static void main(String[] args) {
// TODO Auto-generated method stub
ProjectV1 p = new ProjectV1();
boolean result = p.addUser("Ilir","pass",true); //add admin
System.out.println("tried addeding Ilir as Admin" + result);
boolean result1 = p.addUser("Vince","pass",false); //add Shopper
System.out.println("tried addeding Vincent as Shopper" +result1);
boolean result2 = p.addUser("Conrad","pass",false); //add Shopper
System.out.println("tried addeding Conrad as Shopper" +result2);
//
int mySession = p.login("Ilir","pass"); // expected result is a positive integer (session id)
System.out.println("Ilir Admin Logged in; sessionID: " + mySession);
int mySession2 = p.login("Vince","pass"); // expected result is a positive integer (session id)
System.out.println(mySession2);
System.out.println("Vince Shopper Logged in; sessionID: " + mySession);
int mySession3 = p.login("Conrad", "pass"); // expected result is a positive integer (session id)
System.out.println(mySession3);
p.addDistributionCenter("Narnia", mySession);
System.out.println("Narnia DistributionCentre added by Admin");
p.addDistributionCenter("Toronto", mySession);
System.out.println("Toronto DistributionCentre Added by Admin");
p.addDistributionCenter("Taipei", mySession);
System.out.println("Taipei DistributionCentre Added by Admin");
p.addRoute("Narnia", "Toronto", 5000, mySession);
System.out.println("Narnia-Toronto route added by admin");
p.addRoute("Toronto", "Montreal", 5, mySession);
System.out.println("Toronto-Montreal Route Added by Admin");
p.addRoute("Toronto", "Taipei", 50, mySession);
System.out.println("Toronto-Taipei Route Added by Admin");
p.addRoute("Narnia", "Toronto", 500, mySession);
System.out.println("Narnia-Toronto Route Added by Admin");
int customerID1 = p.addCustomer("Vincent Huor", "Montreal", "Bahen Street", mySession2);
System.out.println("Customer Vincent Huor Added Under Shopper Vince; CustomerID: " + customerID1);
int customerID2 = p.addCustomer("Conrad Chan", "Montreal", "Bahen Street", mySession3);
System.out.println("Customer Conrad Chan Added Under Shopper Conrad; CustomerID: " + customerID2);
int catID = p.addCategory("TSHIRT",mySession); // expected result is a positive integer, the category ID you have assigned to the new category "TSHIRT"
System.out.println("Categoty TSHIRT Added; CatID: " + catID);
int catID2 = p.addCategory("TOY CARS",mySession); // expected result is a positive integer, the category ID you have assigned to the new category "TSHIRT"
System.out.println(catID2);
int prodID0 = p.addProduct("Cardboard Box", catID2, 3.0 ,mySession, null);
System.out.println("Added cardboard box by Admin; CatID: " + catID2 + "; ProductID: " +prodID0); // must be positive int
int prodID1 = p.addProduct("Red Shirt", catID, 2.0 ,mySession, null);
System.out.println("Red Shirt Added to TSHIRT Category by Admin; CatID: " + catID + "; ProductID: " +prodID1); // must be positive int
int prodID2 = p.addProduct("Red Car", catID2, 5.0 ,mySession, null);
System.out.println("added Red Car. productID: " +prodID2); // must be positive int
boolean updateQty1 = p.updateQuantity(prodID1 ,"Toronto", 4, mySession); // admin session
System.out.println("Red shirt Quantity Updated by Admin in Toronto to 4?: " + updateQty1);
int avail = p.prodInquiry(prodID1,"Toronto");
System.out.println("Red Shirt avail in Toronto after updateQuantity 4?: " + avail);
boolean updateQty2 = p.updateQuantity(prodID1 ,"Taipei", 30, mySession); // admin session
System.out.println("Red Shirt updated + 30?: " + updateQty2);
boolean updateQty3 = p.updateQuantity(prodID0 ,"Narnia", 35, mySession); // admin session
System.out.println("Cardboard updated + 35?: " + updateQty3);
boolean updateQty4 = p.updateQuantity(prodID1 ,"Narnia", 35, mySession); // admin session
System.out.println("Red Shirt updated + 35?: " + updateQty4);
boolean updateQty5 = p.updateQuantity(prodID2 ,"Narnia", 15, mySession); // admin session
System.out.println("Red Car updated + 15?: " + updateQty5);
int avail0 = p.prodInquiry(prodID1,"Taipei");
System.out.println("Red Car avail in Taipei after updateQuantity 30?: " + avail0);
boolean item = p.addToShoppingCart(prodID1, 40, mySession2, customerID1);
System.out.println("Added 45 Red Shirt; " + item);
List<ShoppingCartItem> cart0 = p.getShoppingCart("Vince");
System.out.println(cart0);
boolean item01 = p.addToShoppingCart(prodID1, 5, mySession2, customerID1);
System.out.println("Added 45 Red Shirt; " + item01);
List<ShoppingCartItem> cart01 = p.getShoppingCart("Vince");
System.out.println(cart01);
boolean item2 = p.addToShoppingCart(prodID2, 15, mySession2, customerID1);
System.out.println("Added 4 Red Car; " + item2);
boolean item3 = p.addToShoppingCart(prodID0, 13, mySession2, customerID1);
System.out.println("Added 13 Cardboard Box; " + item3);
List<ShoppingCartItem> cart1 = p.getShoppingCart("Vince");
System.out.println(cart1);
/*boolean item5 = p.updateCartQuantity(prodID0, 3, mySession2, customerID1);
System.out.println("Updated Carboard Box in cart:"+item5);
List<ShoppingCartItem> cart3 = p.getShoppingCart("Vince");
System.out.println(cart3);
boolean item6 = p.updateCartQuantity(prodID0, 20, mySession2, customerID1);
System.out.println("Updated Carboard Box in cart:"+item6);
List<ShoppingCartItem> cart4 = p.getShoppingCart("Vince");
System.out.println(cart4);
boolean item4 = p.removeFromShoppingCart(prodID0, mySession2, customerID1);
System.out.println("Removed Cardboard Box from cart:" + item4);
List<ShoppingCartItem> cart2 = p.getShoppingCart("Vince");
System.out.println(cart2);
int avail12 = p.prodInquiry(prodID0, "Narnia");
System.out.println(avail12);
p.cancelCart("Vince");
System.out.println(p.getShoppingCart("Vince"));*/
System.out.println(p.prodInquiry(prodID1, "Taipei"));
System.out.println(p.prodInquiry(prodID1, "Narnia"));
System.out.println(p.prodInquiry(prodID1, "Toronto"));
int invoice1 = p.checkout(customerID1, mySession2);
double invoiceAmount1 = p.invoiceAmount(invoice1, mySession2);
System.out.println("vince $149 + shipping: " + invoiceAmount1);
int afteravail = p.prodInquiry(prodID1,"Toronto");
System.out.println("Red Shirt avail in Toronto after updateQuantity 0?: " + afteravail);
int afteravail0 = p.prodInquiry(prodID1,"Taipei");
System.out.println("Red Car avail in Taipei after updateQuantity 24?: " + afteravail0);
int afteravail2 = p.prodInquiry(prodID1,"Narnia");
System.out.println("Red Shirt avail in Narnia after updateQuantity 0?: " + afteravail2);
System.out.println(p.getSalesReport(mySession, catID));
}
}
| [
"mattcscicluna@gmail.com"
] | mattcscicluna@gmail.com |
e89df1f49ece85ebe188653d19dcfc13b8a61863 | ffe1a384a24136733e52f2e99d7dd3f06d0ab326 | /src/main/java/com/liang/design/proxy/JdkProxy.java | d5635e4dc9ec6c0df4217f02d642071bcf2b5556 | [] | no_license | xchliang/webDemo | b4a67a821df0191227a901e9cc0e9add55939e4f | ee70c53d157955a5648140c9ab4b571df2429e26 | refs/heads/master | 2023-02-08T10:08:19.610691 | 2023-01-28T08:42:05 | 2023-01-28T08:42:05 | 148,568,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,655 | java | package com.liang.design.proxy;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
/**
* @author xcl
* JDK动态代理
* 前提:业务类实现了接口
* 1、实现JDK的InvocationHandler接口,自定义handler
* 2、在接口实现方法invoke中调用目标对象方法
* 3、用handler对象作参数,调用JDK自带的Proxy类的静态方法创建代理对象并返回
*/
public class JdkProxy implements InvocationHandler {
//代理目标对象
private Object target;
public JdkProxy(Object target){
this.target=target;
}
public static Object getProxy(Object target) {
JdkProxy h = new JdkProxy(target);
//创建代理对象
Object proxy = Proxy.newProxyInstance(target.getClass().getClassLoader(),
target.getClass().getInterfaces(), h);
return proxy;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
//调用目标对象方法前处理
System.out.println("目标对象方法执行前。。。");
//调用目标对象方法
Object invoke = method.invoke(target, args);
System.out.println("方法名:"+method.getName());
//调用目标对象方法后处理
System.out.println("目标对象方法执行后。。。");
return invoke;
}
public static void main(String[] args) {
Bird bird = new Bird("Swan");
//用接口类接收对象,不可用实现类接收
IBird instance = (IBird)JdkProxy.getProxy(bird);
instance.fly();
}
}
| [
"xclcba@163.com"
] | xclcba@163.com |
81f0f3aa13c665e11491866c40946d80c8cc3cd0 | 718b173ae7059e8056d0fb5b78efbfb2e26bd4ee | /Axa/build/generated-sources/jax-ws/com/tcs/bancsapiwebservicescommon/bancsapiwebservicescommon/SearchType.java | bf32bae6dbdf77a6552ecf0c76cc50a713afb576 | [] | no_license | sazke8/my-first-blog | 0f8591655b87a7a691ab87e333731aa25794cdfa | b616fb2d7fad08a16ab3c94872674c571560983c | refs/heads/master | 2021-01-21T02:01:45.239843 | 2016-06-03T15:43:43 | 2016-06-03T15:43:43 | 60,360,078 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 857 | java |
package com.tcs.bancsapiwebservicescommon.bancsapiwebservicescommon;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for searchType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="searchType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="POLICY"/>
* <enumeration value="QUOTE"/>
* <enumeration value="RENEWAL_QUOTE"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "searchType")
@XmlEnum
public enum SearchType {
POLICY,
QUOTE,
RENEWAL_QUOTE;
public String value() {
return name();
}
public static SearchType fromValue(String v) {
return valueOf(v);
}
}
| [
"brandongd8@gmail.com"
] | brandongd8@gmail.com |
599849d81825189dae58cd4aa842dda6097d7107 | 5d0dfeb816ad98fa917cc7f44cb68514b97e34d0 | /src/main/java/com/behere/video/domain/OnlineUser.java | 8416b48d36fcd3f2c326f9132bb40977472a39e6 | [] | no_license | zmy1123347389/platformwebAPI-mysql | 7dc8d1f14154366c30f98d060cdd2e797e430cf0 | c8028bb662d18a9ef20a9c6e06c25db9c4bb8e02 | refs/heads/master | 2023-04-21T08:02:52.308092 | 2021-05-19T03:11:38 | 2021-05-19T03:11:38 | 368,729,984 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,602 | java | package com.behere.video.domain;
import com.behere.common.constant.Constant;
import com.behere.common.utils.StringUtils;
/**
* @author: Behere
*/
public class OnlineUser {
private long id;
private String headPortrait;
private String nickName;
private String city;
private int age;
private String professionName;
private String signature;
private String wechatCode;
private String mobile;
private short gender;
private String neteaseToken;
private int servicePrice;
private short vip;
private long balance;
private int online;
private int auth;
private long flower;
private int faceTime;
private short deleted;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getHeadPortrait() {
return headPortrait;
}
public void setHeadPortrait(String headPortrait) {
this.headPortrait = headPortrait;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getProfessionName() {
return professionName;
}
public void setProfessionName(String professionName) {
this.professionName = professionName;
}
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
if (StringUtils.isEmpty(signature)) {
signature = Constant.DEFAULT_SIGNATURE;
}
this.signature = signature;
}
public String getWechatCode() {
return wechatCode;
}
public void setWechatCode(String wechatCode) {
this.wechatCode = wechatCode;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public short getGender() {
return gender;
}
public void setGender(short gender) {
this.gender = gender;
}
public String getNeteaseToken() {
return neteaseToken;
}
public void setNeteaseToken(String neteaseToken) {
this.neteaseToken = neteaseToken;
}
public void setServicePrice(int servicePrice) {
this.servicePrice = servicePrice;
}
public int getServicePrice() {
return servicePrice;
}
public void setVip(short vip) {
this.vip = vip;
}
public short getVip() {
return vip;
}
public long getBalance() {
return balance;
}
public void setBalance(long balance) {
this.balance = balance;
}
public int getAuth() {
return auth;
}
public void setAuth(int auth) {
this.auth = auth;
}
public long getFlower() {
return flower;
}
public void setFlower(long flower) {
this.flower = flower;
}
public short getDeleted() {
return deleted;
}
public void setDeleted(short deleted) {
this.deleted = deleted;
}
public int getOnline() {
return online;
}
public void setOnline(int online) {
this.online = online;
}
public int getFaceTime() {
return faceTime;
}
public void setFaceTime(int faceTime) {
this.faceTime = faceTime;
}
} | [
"993070367@qq.com"
] | 993070367@qq.com |
e131f81ef8cfcb8f358c1f86c81d6167c2b094e7 | 941a72f2eecfe63940a46115a28edab788a09a8e | /src/main/java/Demo1.java | 2e4beddd802384f4facb150980351dcca16884cc | [] | no_license | 670020705/demo | 67290964018b2c5c8f630834b175be803d90fa6c | 4af493d4a04e801254fa94e3d9b95621527752ea | refs/heads/master | 2023-02-06T07:47:42.558426 | 2020-12-29T14:16:17 | 2020-12-29T14:16:17 | 325,298,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 738 | java | import java.util.concurrent.TimeUnit;
public class Demo1 {
String s1 = "hello";
String s2 = "hello";
public void test1(){
synchronized (s1){
System.out.println("t1 start...");
try {
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("t1 end...");
}
}
public void test2(){
synchronized (s2){
System.out.println("t2 start...");
}
}
public static void main(String[] args) {
Demo1 demo1 = new Demo1();
new Thread(demo1::test1,"test1").start();
new Thread(demo1::test2,"test2").start();
}
}
| [
"670020705@qq.com"
] | 670020705@qq.com |
2d8c34949537d1144d313f9acb33f825925f9f85 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/JacksonDatabind-103/com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer/BBC-F0-opt-60/29/com/fasterxml/jackson/databind/deser/std/StdKeyDeserializer_ESTest_scaffolding.java | ea58e4852929d5ed78daefbe34a359b108a78504 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 60,885 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Oct 24 03:48:02 GMT 2021
*/
package com.fasterxml.jackson.databind.deser.std;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class StdKeyDeserializer_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StdKeyDeserializer_ESTest_scaffolding.class.getClassLoader() ,
"com.fasterxml.jackson.databind.MappingIterator",
"com.fasterxml.jackson.databind.deser.BeanDeserializerModifier",
"com.fasterxml.jackson.databind.deser.impl.FieldProperty",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$ShortSerializer",
"com.fasterxml.jackson.databind.deser.std.EnumDeserializer",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$Base",
"com.fasterxml.jackson.annotation.JsonFormat$Features",
"com.fasterxml.jackson.databind.introspect.AnnotatedConstructor",
"com.fasterxml.jackson.databind.cfg.MapperConfigBase",
"com.fasterxml.jackson.databind.deser.UnresolvedForwardReference",
"com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializerProvider",
"com.fasterxml.jackson.databind.ser.impl.UnknownSerializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializers",
"com.fasterxml.jackson.databind.type.MapLikeType",
"com.fasterxml.jackson.databind.util.LinkedNode",
"com.fasterxml.jackson.core.async.ByteArrayFeeder",
"com.fasterxml.jackson.databind.type.MapType",
"com.fasterxml.jackson.databind.ser.std.UUIDSerializer",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer",
"com.fasterxml.jackson.databind.ObjectWriter",
"com.fasterxml.jackson.databind.type.TypeBase",
"com.fasterxml.jackson.core.util.BufferRecyclers",
"com.fasterxml.jackson.databind.node.TextNode",
"com.fasterxml.jackson.core.util.Instantiatable",
"com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase",
"com.fasterxml.jackson.core.json.UTF8DataInputJsonParser",
"com.fasterxml.jackson.annotation.Nulls",
"com.fasterxml.jackson.databind.deser.impl.ReadableObjectId",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter$Indenter",
"com.fasterxml.jackson.annotation.JsonSetter$Value",
"com.fasterxml.jackson.databind.node.DecimalNode",
"com.fasterxml.jackson.annotation.JsonIgnoreProperties$Value",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$EmptyCollector",
"com.fasterxml.jackson.databind.deser.Deserializers",
"com.fasterxml.jackson.databind.util.Annotations",
"com.fasterxml.jackson.databind.ser.std.CollectionSerializer",
"com.fasterxml.jackson.databind.deser.KeyDeserializers",
"com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable",
"com.fasterxml.jackson.databind.util.CompactStringObjectMap",
"com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std",
"com.fasterxml.jackson.databind.type.CollectionLikeType",
"com.fasterxml.jackson.core.FormatFeature",
"com.fasterxml.jackson.core.TreeNode",
"com.fasterxml.jackson.databind.node.NumericNode",
"com.fasterxml.jackson.databind.deser.ValueInstantiator",
"com.fasterxml.jackson.databind.ser.std.StaticListSerializerBase",
"com.fasterxml.jackson.databind.type.ResolvedRecursiveType",
"com.fasterxml.jackson.databind.introspect.AnnotatedClass$Creators",
"com.fasterxml.jackson.databind.introspect.BasicClassIntrospector",
"com.fasterxml.jackson.core.base.ParserMinimalBase",
"com.fasterxml.jackson.databind.deser.std.MapEntryDeserializer",
"com.fasterxml.jackson.databind.deser.BeanDeserializerBase",
"com.fasterxml.jackson.databind.ObjectMapper$DefaultTyping",
"com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition",
"com.fasterxml.jackson.databind.util.Converter",
"com.fasterxml.jackson.databind.ser.std.FileSerializer",
"com.fasterxml.jackson.core.SerializableString",
"com.fasterxml.jackson.databind.deser.ValueInstantiators",
"com.fasterxml.jackson.core.Versioned",
"com.fasterxml.jackson.databind.introspect.VirtualAnnotatedMember",
"com.fasterxml.jackson.databind.introspect.BasicBeanDescription",
"com.fasterxml.jackson.databind.deser.std.EnumSetDeserializer",
"com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer",
"com.fasterxml.jackson.core.util.RequestPayload",
"com.fasterxml.jackson.databind.JsonSerializable",
"com.fasterxml.jackson.databind.introspect.AnnotatedMember",
"com.fasterxml.jackson.databind.BeanDescription",
"com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer",
"com.fasterxml.jackson.databind.introspect.AnnotatedWithParams",
"com.fasterxml.jackson.core.Base64Variant",
"com.fasterxml.jackson.databind.jsontype.impl.AsExistingPropertyTypeSerializer",
"com.fasterxml.jackson.core.io.MergedStream",
"com.fasterxml.jackson.databind.ser.SerializerFactory",
"com.fasterxml.jackson.databind.type.SimpleType",
"com.fasterxml.jackson.databind.ser.ContextualSerializer",
"com.fasterxml.jackson.databind.DeserializationConfig",
"com.fasterxml.jackson.databind.MapperFeature",
"com.fasterxml.jackson.databind.ser.std.ClassSerializer",
"com.fasterxml.jackson.databind.Module$SetupContext",
"com.fasterxml.jackson.databind.ext.Java7SupportImpl",
"com.fasterxml.jackson.databind.util.ClassUtil",
"com.fasterxml.jackson.databind.node.ContainerNode",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$LongSerializer",
"com.fasterxml.jackson.databind.deser.BeanDeserializerFactory",
"com.fasterxml.jackson.databind.ser.std.StdSerializer",
"com.fasterxml.jackson.databind.ser.BeanSerializerFactory",
"com.fasterxml.jackson.databind.PropertyNamingStrategy",
"com.fasterxml.jackson.databind.jsonschema.SchemaAware",
"com.fasterxml.jackson.databind.AbstractTypeResolver",
"com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$DoubleSerializer",
"com.fasterxml.jackson.databind.ser.std.ByteBufferSerializer",
"com.fasterxml.jackson.databind.deser.std.StdDelegatingDeserializer",
"com.fasterxml.jackson.core.Base64Variants",
"com.fasterxml.jackson.databind.deser.std.ArrayBlockingQueueDeserializer",
"com.fasterxml.jackson.databind.util.ArrayBuilders",
"com.fasterxml.jackson.databind.ser.std.IterableSerializer",
"com.fasterxml.jackson.databind.ser.std.StdJdkSerializers$AtomicIntegerSerializer",
"com.fasterxml.jackson.databind.ser.VirtualBeanPropertyWriter",
"com.fasterxml.jackson.core.io.IOContext",
"com.fasterxml.jackson.core.PrettyPrinter",
"com.fasterxml.jackson.databind.util.RawValue",
"com.fasterxml.jackson.core.base.GeneratorBase",
"com.fasterxml.jackson.databind.exc.PropertyBindingException",
"com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector",
"com.fasterxml.jackson.databind.ser.BeanSerializer",
"com.fasterxml.jackson.databind.util.TokenBufferReadContext",
"com.fasterxml.jackson.databind.ser.DefaultSerializerProvider",
"com.fasterxml.jackson.databind.node.NullNode",
"com.fasterxml.jackson.databind.deser.ValueInstantiator$Base",
"com.fasterxml.jackson.annotation.JacksonInject$Value",
"com.fasterxml.jackson.core.util.Separators",
"com.fasterxml.jackson.databind.ser.BeanSerializerModifier",
"com.fasterxml.jackson.databind.jsontype.NamedType",
"com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder",
"com.fasterxml.jackson.databind.introspect.ObjectIdInfo",
"com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector",
"com.fasterxml.jackson.databind.ser.impl.MapEntrySerializer",
"com.fasterxml.jackson.core.json.JsonWriteContext",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$PropertyGenerator",
"com.fasterxml.jackson.core.io.UTF8Writer",
"com.fasterxml.jackson.databind.BeanProperty",
"com.fasterxml.jackson.core.Version",
"com.fasterxml.jackson.databind.ser.std.StdDelegatingSerializer",
"com.fasterxml.jackson.core.io.InputDecorator",
"com.fasterxml.jackson.databind.introspect.TypeResolutionContext",
"com.fasterxml.jackson.core.base.ParserBase",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntLikeSerializer",
"com.fasterxml.jackson.databind.node.BinaryNode",
"com.fasterxml.jackson.databind.ser.std.ToStringSerializer",
"com.fasterxml.jackson.core.JsonGenerator",
"com.fasterxml.jackson.databind.deser.DefaultDeserializationContext",
"com.fasterxml.jackson.databind.ser.Serializers",
"com.fasterxml.jackson.core.JsonEncoding",
"com.fasterxml.jackson.core.JsonGenerationException",
"com.fasterxml.jackson.annotation.JsonProperty$Access",
"com.fasterxml.jackson.databind.ser.std.JsonValueSerializer",
"com.fasterxml.jackson.core.TreeCodec",
"com.fasterxml.jackson.annotation.JsonAutoDetect$Value",
"com.fasterxml.jackson.databind.deser.impl.SetterlessProperty",
"com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDeserializer",
"com.fasterxml.jackson.core.json.UTF8JsonGenerator",
"com.fasterxml.jackson.databind.ser.std.EnumSetSerializer",
"com.fasterxml.jackson.databind.ser.std.SerializableSerializer",
"com.fasterxml.jackson.databind.introspect.Annotated",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$DelegatingKD",
"com.fasterxml.jackson.databind.util.TokenBuffer",
"com.fasterxml.jackson.core.JsonParser$NumberType",
"com.fasterxml.jackson.core.JsonGenerator$1",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter$NopIndenter",
"com.fasterxml.jackson.databind.type.PlaceholderForType",
"com.fasterxml.jackson.core.json.WriterBasedJsonGenerator",
"com.fasterxml.jackson.databind.jsontype.TypeDeserializer",
"com.fasterxml.jackson.databind.node.LongNode",
"com.fasterxml.jackson.databind.annotation.JsonSerialize$Typing",
"com.fasterxml.jackson.databind.deser.CreatorProperty",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringCtorKeyDeserializer",
"com.fasterxml.jackson.core.type.TypeReference",
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase",
"com.fasterxml.jackson.databind.annotation.JacksonStdImpl",
"com.fasterxml.jackson.databind.ser.std.TokenBufferSerializer",
"com.fasterxml.jackson.annotation.JsonBackReference",
"com.fasterxml.jackson.databind.ObjectMapper$3",
"com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig",
"com.fasterxml.jackson.databind.ser.std.MapSerializer",
"com.fasterxml.jackson.databind.ser.std.SqlDateSerializer",
"com.fasterxml.jackson.databind.util.RootNameLookup",
"com.fasterxml.jackson.databind.introspect.AnnotatedClass",
"com.fasterxml.jackson.databind.deser.std.AtomicReferenceDeserializer",
"com.fasterxml.jackson.databind.ser.impl.FailingSerializer",
"com.fasterxml.jackson.databind.JsonMappingException",
"com.fasterxml.jackson.core.io.OutputDecorator",
"com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer",
"com.fasterxml.jackson.databind.ser.impl.TypeWrappedSerializer",
"com.fasterxml.jackson.annotation.JsonTypeInfo$As",
"com.fasterxml.jackson.databind.ser.std.SqlTimeSerializer",
"com.fasterxml.jackson.databind.DatabindContext",
"com.fasterxml.jackson.databind.node.ObjectNode",
"com.fasterxml.jackson.databind.cfg.ConfigOverride",
"com.fasterxml.jackson.core.JsonParser$Feature",
"com.fasterxml.jackson.core.JsonPointer",
"com.fasterxml.jackson.databind.util.TokenBuffer$Parser",
"com.fasterxml.jackson.annotation.JsonMerge",
"com.fasterxml.jackson.core.io.SerializedString",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter$FixedSpaceIndenter",
"com.fasterxml.jackson.databind.deser.DeserializationProblemHandler",
"com.fasterxml.jackson.annotation.JsonFormat$Shape",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector",
"com.fasterxml.jackson.annotation.PropertyAccessor",
"com.fasterxml.jackson.databind.introspect.AnnotatedField",
"com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase",
"com.fasterxml.jackson.annotation.JsonFormat$Feature",
"com.fasterxml.jackson.databind.deser.ContextualDeserializer",
"com.fasterxml.jackson.databind.ser.std.ArraySerializerBase",
"com.fasterxml.jackson.databind.cfg.HandlerInstantiator",
"com.fasterxml.jackson.annotation.ObjectIdGenerator",
"com.fasterxml.jackson.databind.ser.std.CalendarSerializer",
"com.fasterxml.jackson.databind.ext.Java7Support",
"com.fasterxml.jackson.databind.ser.std.BooleanSerializer$AsNumber",
"com.fasterxml.jackson.databind.exc.InvalidDefinitionException",
"com.fasterxml.jackson.databind.ser.std.BooleanSerializer",
"com.fasterxml.jackson.databind.introspect.ClassIntrospector",
"com.fasterxml.jackson.databind.JsonSerializable$Base",
"com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer",
"com.fasterxml.jackson.databind.ObjectMapper$DefaultTypeResolverBuilder",
"com.fasterxml.jackson.databind.node.NodeCursor",
"com.fasterxml.jackson.databind.util.AccessPattern",
"com.fasterxml.jackson.databind.cfg.ConfigOverride$Empty",
"com.fasterxml.jackson.databind.node.TreeTraversingParser",
"com.fasterxml.jackson.databind.deser.std.CollectionDeserializer",
"com.fasterxml.jackson.databind.jsontype.TypeSerializer",
"com.fasterxml.jackson.databind.jsonschema.JsonSchema",
"com.fasterxml.jackson.databind.deser.std.UUIDDeserializer",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer$Std",
"com.fasterxml.jackson.databind.type.TypeFactory",
"com.fasterxml.jackson.databind.type.ArrayType",
"com.fasterxml.jackson.databind.node.NodeCursor$ArrayCursor",
"com.fasterxml.jackson.databind.deser.impl.ObjectIdReader",
"com.fasterxml.jackson.databind.jsontype.impl.AsExternalTypeSerializer",
"com.fasterxml.jackson.databind.util.Named",
"com.fasterxml.jackson.databind.util.TokenBuffer$Segment",
"com.fasterxml.jackson.databind.cfg.ConfigOverrides",
"com.fasterxml.jackson.databind.type.CollectionType",
"com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer",
"com.fasterxml.jackson.databind.ser.std.StdScalarSerializer",
"com.fasterxml.jackson.core.format.InputAccessor",
"com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector$1",
"com.fasterxml.jackson.databind.node.ValueNode",
"com.fasterxml.jackson.databind.ser.impl.IteratorSerializer",
"com.fasterxml.jackson.databind.ser.BasicSerializerFactory",
"com.fasterxml.jackson.databind.deser.std.EnumMapDeserializer",
"com.fasterxml.jackson.databind.util.ClassUtil$Ctor",
"com.fasterxml.jackson.databind.ext.NioPathDeserializer",
"com.fasterxml.jackson.databind.node.JsonNodeCreator",
"com.fasterxml.jackson.databind.deser.SettableBeanProperty",
"com.fasterxml.jackson.core.async.NonBlockingInputFeeder",
"com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper",
"com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase",
"com.fasterxml.jackson.core.json.ReaderBasedJsonParser",
"com.fasterxml.jackson.core.JsonLocation",
"com.fasterxml.jackson.databind.exc.MismatchedInputException",
"com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper",
"com.fasterxml.jackson.databind.node.IntNode",
"com.fasterxml.jackson.databind.node.FloatNode",
"com.fasterxml.jackson.databind.type.TypeParser",
"com.fasterxml.jackson.databind.jsontype.SubtypeResolver",
"com.fasterxml.jackson.core.ObjectCodec",
"com.fasterxml.jackson.core.json.JsonReadContext",
"com.fasterxml.jackson.databind.ser.std.EnumSerializer",
"com.fasterxml.jackson.databind.cfg.ContextAttributes$Impl",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter",
"com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer",
"com.fasterxml.jackson.databind.KeyDeserializer",
"com.fasterxml.jackson.databind.deser.impl.ErrorThrowingDeserializer",
"com.fasterxml.jackson.core.util.BufferRecycler",
"com.fasterxml.jackson.databind.deser.impl.PropertyBasedObjectIdGenerator",
"com.fasterxml.jackson.databind.ser.impl.StringCollectionSerializer",
"com.fasterxml.jackson.annotation.ObjectIdResolver",
"com.fasterxml.jackson.databind.DeserializationContext",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$Base",
"com.fasterxml.jackson.databind.ser.std.InetSocketAddressSerializer",
"com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer",
"com.fasterxml.jackson.databind.node.DoubleNode",
"com.fasterxml.jackson.databind.node.NodeCursor$ObjectCursor",
"com.fasterxml.jackson.databind.util.EnumResolver",
"com.fasterxml.jackson.databind.ser.PropertyWriter",
"com.fasterxml.jackson.core.util.ByteArrayBuilder",
"com.fasterxml.jackson.databind.type.ReferenceType",
"com.fasterxml.jackson.databind.ser.impl.IndexedStringListSerializer",
"com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$TableInfo",
"com.fasterxml.jackson.databind.ser.std.NumberSerializer",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$NoAnnotations",
"com.fasterxml.jackson.databind.Module",
"com.fasterxml.jackson.annotation.JsonView",
"com.fasterxml.jackson.databind.AnnotationIntrospector",
"com.fasterxml.jackson.databind.ser.ContainerSerializer",
"com.fasterxml.jackson.databind.ser.std.DateSerializer",
"com.fasterxml.jackson.databind.ser.std.NullSerializer",
"com.fasterxml.jackson.databind.InjectableValues$Std",
"com.fasterxml.jackson.databind.deser.std.StringDeserializer",
"com.fasterxml.jackson.databind.deser.std.StringArrayDeserializer",
"com.fasterxml.jackson.databind.DeserializationFeature",
"com.fasterxml.jackson.databind.exc.InvalidTypeIdException",
"com.fasterxml.jackson.databind.node.POJONode",
"com.fasterxml.jackson.annotation.JacksonAnnotation",
"com.fasterxml.jackson.databind.ObjectReader",
"com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeSerializer",
"com.fasterxml.jackson.databind.node.BaseJsonNode",
"com.fasterxml.jackson.databind.node.BigIntegerNode",
"com.fasterxml.jackson.databind.util.LRUMap",
"com.fasterxml.jackson.databind.JsonDeserializer",
"com.fasterxml.jackson.databind.util.SimpleBeanPropertyDefinition",
"com.fasterxml.jackson.databind.deser.impl.MethodProperty",
"com.fasterxml.jackson.annotation.JsonRawValue",
"com.fasterxml.jackson.core.util.DefaultIndenter",
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.fasterxml.jackson.annotation.JsonTypeInfo$Id",
"com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility",
"com.fasterxml.jackson.databind.ser.impl.AttributePropertyWriter",
"com.fasterxml.jackson.databind.deser.std.MapDeserializer",
"com.fasterxml.jackson.databind.exc.InvalidFormatException",
"com.fasterxml.jackson.core.io.CharacterEscapes",
"com.fasterxml.jackson.databind.deser.std.TokenBufferDeserializer",
"com.fasterxml.jackson.databind.jsontype.impl.AsExternalTypeDeserializer",
"com.fasterxml.jackson.core.type.ResolvedType",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers",
"com.fasterxml.jackson.databind.annotation.JsonSerialize",
"com.fasterxml.jackson.databind.ser.impl.PropertyBasedObjectIdGenerator",
"com.fasterxml.jackson.databind.introspect.AnnotatedMethod",
"com.fasterxml.jackson.annotation.ObjectIdGenerator$IdKey",
"com.fasterxml.jackson.databind.jsontype.TypeIdResolver",
"com.fasterxml.jackson.databind.util.ConstantValueInstantiator",
"com.fasterxml.jackson.databind.introspect.VisibilityChecker",
"com.fasterxml.jackson.core.JsonParser",
"com.fasterxml.jackson.databind.introspect.AnnotatedParameter",
"com.fasterxml.jackson.databind.ser.BeanPropertyWriter",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$FloatSerializer",
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.core.JsonStreamContext",
"com.fasterxml.jackson.core.format.MatchStrength",
"com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$Bucket",
"com.fasterxml.jackson.core.io.UTF32Reader",
"com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder$Value",
"com.fasterxml.jackson.databind.cfg.MutableConfigOverride",
"com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer",
"com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl",
"com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException",
"com.fasterxml.jackson.core.io.CharTypes",
"com.fasterxml.jackson.databind.ser.std.StdJdkSerializers$AtomicBooleanSerializer",
"com.fasterxml.jackson.databind.ser.std.StdJdkSerializers$AtomicLongSerializer",
"com.fasterxml.jackson.databind.ser.std.InetAddressSerializer",
"com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeSerializer",
"com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver",
"com.fasterxml.jackson.databind.deser.std.StdDeserializer",
"com.fasterxml.jackson.annotation.JsonInclude$Include",
"com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer$TableInfo",
"com.fasterxml.jackson.databind.JsonSerializer",
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig",
"com.fasterxml.jackson.databind.ser.ResolvableSerializer",
"com.fasterxml.jackson.databind.PropertyName",
"com.fasterxml.jackson.annotation.JsonCreator$Mode",
"com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeSerializer",
"com.fasterxml.jackson.core.util.VersionUtil",
"com.fasterxml.jackson.core.json.async.NonBlockingJsonParser",
"com.fasterxml.jackson.databind.deser.BasicDeserializerFactory",
"com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer",
"com.fasterxml.jackson.core.io.NumberInput",
"com.fasterxml.jackson.databind.node.JsonNodeFactory",
"com.fasterxml.jackson.databind.ser.impl.StringArraySerializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringKD",
"com.fasterxml.jackson.databind.cfg.MapperConfig",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringFactoryKeyDeserializer",
"com.fasterxml.jackson.annotation.JsonManagedReference",
"com.fasterxml.jackson.databind.annotation.JsonDeserialize",
"com.fasterxml.jackson.databind.util.ObjectBuffer",
"com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase",
"com.fasterxml.jackson.core.io.JsonEOFException",
"com.fasterxml.jackson.databind.MappingJsonFactory",
"com.fasterxml.jackson.databind.InjectableValues",
"com.fasterxml.jackson.databind.deser.std.ThrowableDeserializer",
"com.fasterxml.jackson.databind.ser.std.TimeZoneSerializer",
"com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase",
"com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair",
"com.fasterxml.jackson.databind.node.NodeCursor$RootCursor",
"com.fasterxml.jackson.databind.ext.NioPathSerializer",
"com.fasterxml.jackson.databind.ser.std.StringSerializer",
"com.fasterxml.jackson.databind.JavaType",
"com.fasterxml.jackson.databind.deser.BeanDeserializer",
"com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase",
"com.fasterxml.jackson.databind.node.JsonNodeType",
"com.fasterxml.jackson.databind.deser.NullValueProvider",
"com.fasterxml.jackson.core.util.TextBuffer",
"com.fasterxml.jackson.annotation.JacksonAnnotationValue",
"com.fasterxml.jackson.core.JsonFactory",
"com.fasterxml.jackson.databind.util.NameTransformer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$EnumKD",
"com.fasterxml.jackson.databind.node.BooleanNode",
"com.fasterxml.jackson.databind.node.ShortNode",
"com.fasterxml.jackson.databind.node.MissingNode",
"com.fasterxml.jackson.databind.util.StdDateFormat",
"com.fasterxml.jackson.databind.SerializationConfig",
"com.fasterxml.jackson.annotation.JsonFormat$Value",
"com.fasterxml.jackson.databind.PropertyMetadata",
"com.fasterxml.jackson.databind.ser.std.BeanSerializerBase",
"com.fasterxml.jackson.annotation.JsonInclude$Value",
"com.fasterxml.jackson.databind.deser.std.ReferenceTypeDeserializer",
"com.fasterxml.jackson.databind.deser.ResolvableDeserializer",
"com.fasterxml.jackson.core.json.DupDetector",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer",
"com.fasterxml.jackson.databind.ser.FilterProvider",
"com.fasterxml.jackson.databind.introspect.SimpleMixInResolver",
"com.fasterxml.jackson.annotation.JsonFormat",
"com.fasterxml.jackson.databind.ser.std.StdJdkSerializers",
"com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer",
"com.fasterxml.jackson.databind.deser.DeserializerFactory",
"com.fasterxml.jackson.annotation.JsonTypeInfo",
"com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder",
"com.fasterxml.jackson.annotation.JsonUnwrapped",
"com.fasterxml.jackson.databind.introspect.ClassIntrospector$MixInResolver",
"com.fasterxml.jackson.core.json.JsonGeneratorImpl",
"com.fasterxml.jackson.databind.deser.AbstractDeserializer",
"com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer",
"com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer",
"com.fasterxml.jackson.core.JsonFactory$Feature",
"com.fasterxml.jackson.databind.AnnotationIntrospector$ReferenceProperty",
"com.fasterxml.jackson.databind.ser.SerializerCache",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntegerSerializer",
"com.fasterxml.jackson.core.io.DataOutputAsStream",
"com.fasterxml.jackson.core.io.SegmentedStringWriter",
"com.fasterxml.jackson.databind.type.TypeBindings",
"com.fasterxml.jackson.databind.deser.std.JsonLocationInstantiator",
"com.fasterxml.jackson.databind.SerializerProvider",
"com.fasterxml.jackson.core.JsonToken",
"com.fasterxml.jackson.databind.cfg.ContextAttributes",
"com.fasterxml.jackson.core.JsonGenerator$Feature",
"com.fasterxml.jackson.databind.deser.ValueInstantiator$Gettable",
"com.fasterxml.jackson.databind.cfg.BaseSettings",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl",
"com.fasterxml.jackson.databind.deser.DeserializerCache",
"com.fasterxml.jackson.databind.cfg.ConfigFeature",
"com.fasterxml.jackson.core.json.UTF8StreamJsonParser",
"com.fasterxml.jackson.core.FormatSchema",
"com.fasterxml.jackson.databind.SerializationFeature"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("com.fasterxml.jackson.databind.JsonDeserializer", false, StdKeyDeserializer_ESTest_scaffolding.class.getClassLoader()));
mock(Class.forName("com.fasterxml.jackson.databind.deser.DeserializationProblemHandler", false, StdKeyDeserializer_ESTest_scaffolding.class.getClassLoader()));
mock(Class.forName("com.fasterxml.jackson.databind.deser.std.FromStringDeserializer", false, StdKeyDeserializer_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(StdKeyDeserializer_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.fasterxml.jackson.databind.KeyDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringKD",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$EnumKD",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringCtorKeyDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringFactoryKeyDeserializer",
"com.fasterxml.jackson.databind.DeserializationFeature",
"com.fasterxml.jackson.databind.JsonDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$DelegatingKD",
"com.fasterxml.jackson.databind.deser.DeserializerFactory",
"com.fasterxml.jackson.databind.util.ClassUtil",
"com.fasterxml.jackson.databind.PropertyName",
"com.fasterxml.jackson.databind.deser.BasicDeserializerFactory",
"com.fasterxml.jackson.databind.deser.std.StdKeyDeserializers",
"com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig",
"com.fasterxml.jackson.databind.deser.BeanDeserializerFactory",
"com.fasterxml.jackson.databind.deser.ValueInstantiators$Base",
"com.fasterxml.jackson.databind.util.ArrayBuilders",
"com.fasterxml.jackson.databind.DatabindContext",
"com.fasterxml.jackson.databind.DeserializationContext",
"com.fasterxml.jackson.databind.deser.DefaultDeserializationContext",
"com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl",
"com.fasterxml.jackson.databind.deser.DeserializerCache",
"com.fasterxml.jackson.core.JsonGenerator",
"com.fasterxml.jackson.databind.util.TokenBuffer",
"com.fasterxml.jackson.core.io.NumberInput",
"com.fasterxml.jackson.databind.deser.std.StdDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer",
"com.fasterxml.jackson.databind.AbstractTypeResolver",
"com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver",
"com.fasterxml.jackson.core.TreeCodec",
"com.fasterxml.jackson.core.ObjectCodec",
"com.fasterxml.jackson.core.type.ResolvedType",
"com.fasterxml.jackson.databind.JavaType",
"com.fasterxml.jackson.databind.type.TypeBindings",
"com.fasterxml.jackson.databind.type.TypeBase",
"com.fasterxml.jackson.databind.type.SimpleType",
"com.fasterxml.jackson.databind.AnnotationIntrospector",
"com.fasterxml.jackson.databind.ext.Java7SupportImpl",
"com.fasterxml.jackson.databind.ext.Java7Support",
"com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector",
"com.fasterxml.jackson.databind.util.LRUMap",
"com.fasterxml.jackson.databind.cfg.BaseSettings",
"com.fasterxml.jackson.databind.type.TypeParser",
"com.fasterxml.jackson.databind.type.TypeFactory",
"com.fasterxml.jackson.databind.util.StdDateFormat",
"com.fasterxml.jackson.core.Base64Variant",
"com.fasterxml.jackson.core.Base64Variants",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.core.io.SerializedString",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter",
"com.fasterxml.jackson.core.JsonFactory",
"com.fasterxml.jackson.databind.MappingJsonFactory",
"com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer",
"com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$TableInfo",
"com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer",
"com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer$TableInfo",
"com.fasterxml.jackson.databind.jsontype.SubtypeResolver",
"com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver",
"com.fasterxml.jackson.databind.util.RootNameLookup",
"com.fasterxml.jackson.databind.introspect.SimpleMixInResolver",
"com.fasterxml.jackson.databind.introspect.ClassIntrospector",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$NoAnnotations",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector",
"com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver",
"com.fasterxml.jackson.databind.introspect.Annotated",
"com.fasterxml.jackson.databind.introspect.AnnotatedClass$Creators",
"com.fasterxml.jackson.databind.introspect.AnnotatedClass",
"com.fasterxml.jackson.databind.BeanDescription",
"com.fasterxml.jackson.databind.introspect.BasicBeanDescription",
"com.fasterxml.jackson.databind.introspect.BasicClassIntrospector",
"com.fasterxml.jackson.databind.cfg.ConfigOverrides",
"com.fasterxml.jackson.annotation.JsonInclude$Value",
"com.fasterxml.jackson.annotation.Nulls",
"com.fasterxml.jackson.annotation.JsonSetter$Value",
"com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std",
"com.fasterxml.jackson.annotation.JsonFormat$Shape",
"com.fasterxml.jackson.annotation.JsonFormat$Features",
"com.fasterxml.jackson.annotation.JsonFormat$Value",
"com.fasterxml.jackson.databind.cfg.MapperConfig",
"com.fasterxml.jackson.databind.cfg.ConfigOverride",
"com.fasterxml.jackson.databind.cfg.ConfigOverride$Empty",
"com.fasterxml.jackson.databind.MapperFeature",
"com.fasterxml.jackson.databind.cfg.MapperConfigBase",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter$NopIndenter",
"com.fasterxml.jackson.core.util.DefaultPrettyPrinter$FixedSpaceIndenter",
"com.fasterxml.jackson.core.util.DefaultIndenter",
"com.fasterxml.jackson.core.util.Separators",
"com.fasterxml.jackson.core.PrettyPrinter",
"com.fasterxml.jackson.databind.SerializationConfig",
"com.fasterxml.jackson.databind.cfg.ContextAttributes",
"com.fasterxml.jackson.databind.cfg.ContextAttributes$Impl",
"com.fasterxml.jackson.databind.DeserializationConfig",
"com.fasterxml.jackson.databind.node.JsonNodeFactory",
"com.fasterxml.jackson.databind.JsonSerializer",
"com.fasterxml.jackson.databind.ser.std.StdSerializer",
"com.fasterxml.jackson.databind.ser.impl.FailingSerializer",
"com.fasterxml.jackson.databind.ser.impl.UnknownSerializer",
"com.fasterxml.jackson.databind.SerializerProvider",
"com.fasterxml.jackson.databind.ser.DefaultSerializerProvider",
"com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl",
"com.fasterxml.jackson.databind.ser.std.NullSerializer",
"com.fasterxml.jackson.databind.ser.SerializerCache",
"com.fasterxml.jackson.databind.ser.SerializerFactory",
"com.fasterxml.jackson.databind.ser.std.StdScalarSerializer",
"com.fasterxml.jackson.databind.ser.std.StringSerializer",
"com.fasterxml.jackson.databind.ser.std.ToStringSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$Base",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntegerSerializer",
"com.fasterxml.jackson.core.JsonParser$NumberType",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$LongSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntLikeSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$ShortSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$DoubleSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$FloatSerializer",
"com.fasterxml.jackson.databind.ser.std.BooleanSerializer",
"com.fasterxml.jackson.databind.ser.std.NumberSerializer",
"com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase",
"com.fasterxml.jackson.databind.ser.std.CalendarSerializer",
"com.fasterxml.jackson.databind.ser.std.DateSerializer",
"com.fasterxml.jackson.databind.ser.std.StdJdkSerializers",
"com.fasterxml.jackson.databind.ser.std.UUIDSerializer",
"com.fasterxml.jackson.databind.ser.BasicSerializerFactory",
"com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig",
"com.fasterxml.jackson.databind.ser.BeanSerializerFactory",
"com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector$1",
"com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector",
"com.fasterxml.jackson.databind.module.SimpleDeserializers",
"com.fasterxml.jackson.databind.module.SimpleKeyDeserializers",
"com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder",
"com.fasterxml.jackson.databind.ObjectMapper$DefaultTypeResolverBuilder",
"com.fasterxml.jackson.annotation.JsonTypeInfo$Id",
"com.fasterxml.jackson.databind.deser.BeanDeserializerModifier",
"com.fasterxml.jackson.databind.type.ClassKey",
"com.fasterxml.jackson.databind.deser.std.UUIDDeserializer",
"com.fasterxml.jackson.databind.ObjectReader",
"com.fasterxml.jackson.core.JsonParser",
"com.fasterxml.jackson.core.base.ParserMinimalBase",
"com.fasterxml.jackson.core.base.ParserBase",
"com.fasterxml.jackson.core.io.CharTypes",
"com.fasterxml.jackson.core.json.ReaderBasedJsonParser",
"com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector",
"com.fasterxml.jackson.databind.module.SimpleValueInstantiators",
"com.fasterxml.jackson.core.util.BufferRecycler",
"com.fasterxml.jackson.core.io.IOContext",
"com.fasterxml.jackson.core.util.TextBuffer",
"com.fasterxml.jackson.core.json.DupDetector",
"com.fasterxml.jackson.core.JsonStreamContext",
"com.fasterxml.jackson.core.json.JsonReadContext",
"com.fasterxml.jackson.databind.type.ClassStack",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$EmptyCollector",
"com.fasterxml.jackson.databind.util.ArrayIterator",
"com.fasterxml.jackson.databind.ext.OptionalHandlerFactory",
"com.fasterxml.jackson.databind.deser.std.JdkDeserializers",
"com.fasterxml.jackson.databind.jsontype.impl.SubTypeValidator",
"com.fasterxml.jackson.databind.deser.impl.CreatorCollector",
"com.fasterxml.jackson.databind.introspect.CollectorBase",
"com.fasterxml.jackson.databind.introspect.AnnotatedFieldCollector",
"com.fasterxml.jackson.databind.introspect.TypeResolutionContext$Basic",
"com.fasterxml.jackson.databind.introspect.AnnotatedFieldCollector$FieldBuilder",
"com.fasterxml.jackson.databind.introspect.AnnotatedMember",
"com.fasterxml.jackson.databind.introspect.AnnotatedField",
"com.fasterxml.jackson.databind.introspect.AnnotationMap",
"com.fasterxml.jackson.annotation.PropertyAccessor",
"com.fasterxml.jackson.annotation.JsonAutoDetect$1",
"com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition",
"com.fasterxml.jackson.databind.AnnotationIntrospector$ReferenceProperty",
"com.fasterxml.jackson.databind.AnnotationIntrospector$ReferenceProperty$Type",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder",
"com.fasterxml.jackson.core.util.InternCache",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$Linked",
"com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector",
"com.fasterxml.jackson.databind.introspect.MemberKey",
"com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector$MethodBuilder",
"com.fasterxml.jackson.databind.introspect.AnnotatedWithParams",
"com.fasterxml.jackson.databind.introspect.AnnotatedMethod",
"com.fasterxml.jackson.databind.introspect.AnnotatedMethodMap",
"com.fasterxml.jackson.databind.util.BeanUtil",
"com.fasterxml.jackson.databind.introspect.AnnotatedCreatorCollector",
"com.fasterxml.jackson.databind.util.ClassUtil$Ctor",
"com.fasterxml.jackson.databind.introspect.AnnotatedConstructor",
"com.fasterxml.jackson.databind.introspect.AnnotatedParameter",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$9",
"com.fasterxml.jackson.annotation.JsonProperty$Access",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$10",
"com.fasterxml.jackson.databind.deser.impl.CreatorCollector$StdTypeConstructor",
"com.fasterxml.jackson.databind.deser.ValueInstantiator",
"com.fasterxml.jackson.databind.deser.std.StdValueInstantiator",
"com.fasterxml.jackson.databind.deser.BeanDeserializerBuilder",
"com.fasterxml.jackson.annotation.JsonIgnoreProperties$Value",
"com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase",
"com.fasterxml.jackson.databind.deser.impl.FailingDeserializer",
"com.fasterxml.jackson.databind.deser.SettableBeanProperty",
"com.fasterxml.jackson.databind.deser.impl.MethodProperty",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$4",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$5",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$6",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$7",
"com.fasterxml.jackson.databind.PropertyMetadata",
"com.fasterxml.jackson.databind.util.AccessPattern",
"com.fasterxml.jackson.databind.deser.impl.NullsConstantProvider",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$8",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$1",
"com.fasterxml.jackson.databind.deser.AbstractDeserializer",
"com.fasterxml.jackson.databind.util.LinkedNode",
"com.fasterxml.jackson.databind.MappingIterator",
"com.fasterxml.jackson.core.util.MinimalPrettyPrinter",
"com.fasterxml.jackson.annotation.JsonAutoDetect$Value",
"com.fasterxml.jackson.core.io.InputDecorator",
"com.fasterxml.jackson.core.util.BufferRecyclers",
"com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper",
"com.fasterxml.jackson.databind.deser.Deserializers$Base",
"com.fasterxml.jackson.databind.deser.ValueInstantiator$Base",
"com.fasterxml.jackson.databind.introspect.VisibilityChecker$1",
"com.fasterxml.jackson.databind.BeanProperty",
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.core.JsonLocation",
"com.fasterxml.jackson.databind.JsonMappingException",
"com.fasterxml.jackson.databind.exc.MismatchedInputException",
"com.fasterxml.jackson.databind.exc.InvalidFormatException",
"com.fasterxml.jackson.databind.ser.BeanSerializerBuilder",
"com.fasterxml.jackson.databind.InjectableValues",
"com.fasterxml.jackson.databind.InjectableValues$Std",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer$Std",
"com.fasterxml.jackson.databind.type.TypeBindings$AsKey",
"com.fasterxml.jackson.databind.type.TypeBindings$TypeParamStash",
"com.fasterxml.jackson.databind.type.CollectionLikeType",
"com.fasterxml.jackson.databind.type.CollectionType",
"com.fasterxml.jackson.databind.ext.CoreXMLDeserializers$Std",
"com.fasterxml.jackson.databind.introspect.ObjectIdInfo",
"com.fasterxml.jackson.databind.JsonSerializable$Base",
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.node.BaseJsonNode",
"com.fasterxml.jackson.databind.node.ValueNode",
"com.fasterxml.jackson.databind.node.POJONode",
"com.fasterxml.jackson.databind.util.ObjectBuffer",
"com.fasterxml.jackson.databind.type.ArrayType",
"com.fasterxml.jackson.databind.type.MapLikeType",
"com.fasterxml.jackson.databind.type.MapType",
"com.fasterxml.jackson.databind.Module",
"com.fasterxml.jackson.databind.module.SimpleModule",
"com.fasterxml.jackson.core.Version",
"com.fasterxml.jackson.databind.ser.FilterProvider",
"com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider",
"com.fasterxml.jackson.databind.ser.BeanSerializerModifier",
"com.fasterxml.jackson.databind.util.EnumResolver",
"com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair",
"com.fasterxml.jackson.core.io.OutputDecorator",
"com.fasterxml.jackson.core.json.UTF8StreamJsonParser",
"com.fasterxml.jackson.databind.type.ResolvedRecursiveType",
"com.fasterxml.jackson.databind.exc.InvalidTypeIdException",
"com.fasterxml.jackson.databind.ser.std.BeanSerializerBase",
"com.fasterxml.jackson.databind.ser.BeanSerializer",
"com.fasterxml.jackson.annotation.ObjectIdGenerator",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$Base",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$UUIDGenerator",
"com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase",
"com.fasterxml.jackson.core.json.async.NonBlockingJsonParser",
"com.fasterxml.jackson.core.io.CharacterEscapes",
"com.fasterxml.jackson.core.JsonpCharacterEscapes",
"com.fasterxml.jackson.databind.ser.Serializers$Base",
"com.fasterxml.jackson.databind.module.SimpleSerializers",
"com.fasterxml.jackson.databind.jsontype.NamedType",
"com.fasterxml.jackson.databind.BeanProperty$Bogus",
"com.fasterxml.jackson.core.util.JsonParserDelegate",
"com.fasterxml.jackson.databind.PropertyNamingStrategy$PropertyNamingStrategyBase",
"com.fasterxml.jackson.databind.PropertyNamingStrategy$SnakeCaseStrategy",
"com.fasterxml.jackson.databind.PropertyNamingStrategy$UpperCamelCaseStrategy",
"com.fasterxml.jackson.databind.PropertyNamingStrategy$LowerCaseStrategy",
"com.fasterxml.jackson.databind.PropertyNamingStrategy$KebabCaseStrategy",
"com.fasterxml.jackson.databind.PropertyNamingStrategy",
"com.fasterxml.jackson.databind.type.ReferenceType",
"com.fasterxml.jackson.databind.deser.DeserializationProblemHandler",
"com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter",
"com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter$FilterExceptFilter",
"com.fasterxml.jackson.core.util.ByteArrayBuilder",
"com.fasterxml.jackson.core.base.GeneratorBase",
"com.fasterxml.jackson.core.json.JsonGeneratorImpl",
"com.fasterxml.jackson.core.json.UTF8JsonGenerator",
"com.fasterxml.jackson.core.json.JsonWriteContext",
"com.fasterxml.jackson.core.util.JsonGeneratorDelegate",
"com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer",
"com.fasterxml.jackson.annotation.JsonCreator$Mode",
"com.fasterxml.jackson.databind.deser.impl.CreatorCandidate",
"com.fasterxml.jackson.databind.deser.impl.CreatorCandidate$Param",
"com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase",
"com.fasterxml.jackson.databind.deser.std.CollectionDeserializer",
"com.fasterxml.jackson.databind.deser.std.MapDeserializer",
"com.fasterxml.jackson.databind.deser.std.StringDeserializer",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$NumberDeserializer",
"com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla",
"com.fasterxml.jackson.core.filter.TokenFilter",
"com.fasterxml.jackson.core.filter.TokenFilterContext",
"com.fasterxml.jackson.core.JsonPointer",
"com.fasterxml.jackson.core.filter.JsonPointerBasedFilter",
"com.fasterxml.jackson.databind.node.BooleanNode",
"com.fasterxml.jackson.databind.node.TreeTraversingParser",
"com.fasterxml.jackson.databind.node.NodeCursor",
"com.fasterxml.jackson.databind.node.NodeCursor$RootCursor",
"com.fasterxml.jackson.databind.util.NameTransformer$NopTransformer",
"com.fasterxml.jackson.databind.util.NameTransformer",
"com.fasterxml.jackson.databind.util.NameTransformer$1",
"com.fasterxml.jackson.databind.node.ContainerNode",
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.fasterxml.jackson.databind.node.NodeCursor$ArrayCursor",
"com.fasterxml.jackson.databind.type.PlaceholderForType",
"com.fasterxml.jackson.databind.node.ObjectNode",
"com.fasterxml.jackson.databind.node.NumericNode",
"com.fasterxml.jackson.databind.node.ShortNode",
"com.fasterxml.jackson.databind.node.NodeCursor$ObjectCursor",
"com.fasterxml.jackson.core.util.JsonParserSequence",
"com.fasterxml.jackson.databind.ObjectMapper$1",
"com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter$SerializeExceptFilter",
"com.fasterxml.jackson.databind.node.DoubleNode",
"com.fasterxml.jackson.databind.node.IntNode",
"com.fasterxml.jackson.databind.type.TypeParser$MyTokenizer",
"com.fasterxml.jackson.databind.node.MissingNode",
"com.fasterxml.jackson.core.type.TypeReference",
"com.fasterxml.jackson.annotation.SimpleObjectIdResolver",
"com.fasterxml.jackson.databind.deser.impl.ReadableObjectId",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$StringIdGenerator",
"com.fasterxml.jackson.databind.ObjectWriter",
"com.fasterxml.jackson.databind.ObjectWriter$GeneratorSettings",
"com.fasterxml.jackson.databind.ObjectWriter$Prefetch",
"com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap",
"com.fasterxml.jackson.databind.util.TypeKey",
"com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase",
"com.fasterxml.jackson.databind.jsontype.impl.TypeNameIdResolver",
"com.fasterxml.jackson.databind.type.TypeModifier",
"com.fasterxml.jackson.core.json.UTF8DataInputJsonParser",
"com.fasterxml.jackson.core.filter.FilteringParserDelegate",
"com.fasterxml.jackson.databind.util.TokenBuffer$Segment",
"com.fasterxml.jackson.databind.util.TokenBuffer$Parser",
"com.fasterxml.jackson.databind.util.TokenBufferReadContext",
"com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver",
"com.fasterxml.jackson.databind.introspect.VirtualAnnotatedMember",
"com.fasterxml.jackson.core.json.WriterBasedJsonGenerator",
"com.fasterxml.jackson.databind.cfg.MutableConfigOverride",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$PrimitiveOrWrapperDeserializer",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$DoubleDeserializer",
"com.fasterxml.jackson.databind.ObjectMapper$3",
"com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap",
"com.fasterxml.jackson.databind.deser.BeanDeserializerBase",
"com.fasterxml.jackson.databind.deser.BeanDeserializer",
"com.fasterxml.jackson.databind.BeanProperty$Std",
"com.fasterxml.jackson.core.util.VersionUtil",
"com.fasterxml.jackson.databind.cfg.PackageVersion",
"com.fasterxml.jackson.databind.node.BigIntegerNode",
"com.fasterxml.jackson.databind.node.TextNode",
"com.fasterxml.jackson.annotation.ObjectIdGenerators$IntSequenceGenerator",
"com.fasterxml.jackson.databind.util.CompactStringObjectMap",
"com.fasterxml.jackson.databind.PropertyMetadata$MergeInfo",
"com.fasterxml.jackson.databind.ser.std.EnumSerializer",
"com.fasterxml.jackson.databind.util.EnumValues",
"com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer",
"com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer",
"com.fasterxml.jackson.core.io.SegmentedStringWriter",
"com.fasterxml.jackson.core.io.JsonStringEncoder",
"com.fasterxml.jackson.databind.node.BinaryNode",
"com.fasterxml.jackson.databind.ser.std.SerializableSerializer",
"com.fasterxml.jackson.core.filter.FilteringGeneratorDelegate",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer",
"com.fasterxml.jackson.databind.deser.std.DateDeserializers",
"com.fasterxml.jackson.databind.ser.PropertyBuilder",
"com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$3",
"com.fasterxml.jackson.databind.ser.PropertyBuilder$1",
"com.fasterxml.jackson.databind.ser.PropertyWriter",
"com.fasterxml.jackson.databind.ser.BeanPropertyWriter",
"com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap",
"com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap$Empty",
"com.fasterxml.jackson.databind.node.FloatNode",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$OneCollector",
"com.fasterxml.jackson.databind.deser.impl.SetterlessProperty",
"com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer",
"com.fasterxml.jackson.databind.deser.BeanDeserializer$1",
"com.fasterxml.jackson.databind.node.NullNode",
"com.fasterxml.jackson.annotation.OptBoolean",
"com.fasterxml.jackson.databind.ser.std.NumberSerializers$1",
"com.fasterxml.jackson.databind.ser.std.ClassSerializer",
"com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap$SerializerAndMapResult",
"com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap$Single",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$ShortDeserializer",
"com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter",
"com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer",
"com.fasterxml.jackson.databind.exc.InvalidDefinitionException",
"com.fasterxml.jackson.databind.introspect.AnnotationCollector$OneAnnotation",
"com.fasterxml.jackson.core.json.PackageVersion",
"com.fasterxml.jackson.databind.jsontype.TypeDeserializer",
"com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase",
"com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDeserializer",
"com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer",
"com.fasterxml.jackson.databind.node.JsonNodeType",
"com.fasterxml.jackson.databind.deser.DataFormatReaders",
"com.fasterxml.jackson.core.format.MatchStrength",
"com.fasterxml.jackson.databind.node.LongNode",
"com.fasterxml.jackson.annotation.ObjectIdGenerator$IdKey",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$BooleanDeserializer",
"com.fasterxml.jackson.core.format.InputAccessor$Std",
"com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer",
"com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer",
"com.fasterxml.jackson.databind.ser.ContainerSerializer",
"com.fasterxml.jackson.databind.ser.std.ArraySerializerBase",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$BooleanArraySerializer",
"com.fasterxml.jackson.databind.ser.std.ByteArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$CharArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$TypedPrimitiveArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$ShortArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$IntArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$LongArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$FloatArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers$DoubleArraySerializer",
"com.fasterxml.jackson.databind.ser.std.StdArraySerializers",
"com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer",
"com.fasterxml.jackson.databind.ser.std.MapSerializer",
"com.fasterxml.jackson.databind.ser.std.StdKeySerializer",
"com.fasterxml.jackson.databind.ser.std.StdKeySerializers$StringKeySerializer",
"com.fasterxml.jackson.databind.ser.std.StdKeySerializers",
"com.fasterxml.jackson.databind.ser.std.StdKeySerializers$Default",
"com.fasterxml.jackson.databind.JsonMappingException$Reference",
"com.fasterxml.jackson.databind.util.RawValue",
"com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper$Base",
"com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder$1",
"com.fasterxml.jackson.databind.deser.std.EnumDeserializer",
"com.fasterxml.jackson.databind.ext.CoreXMLSerializers$XMLGregorianCalendarSerializer",
"com.fasterxml.jackson.databind.node.DecimalNode",
"com.fasterxml.jackson.core.io.UTF32Reader",
"com.fasterxml.jackson.core.JsonFactory$Feature",
"com.fasterxml.jackson.core.JsonParser$Feature",
"com.fasterxml.jackson.core.JsonGenerator$Feature",
"com.fasterxml.jackson.annotation.JsonInclude$Include",
"com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility",
"com.fasterxml.jackson.databind.SerializationFeature",
"com.fasterxml.jackson.core.JsonToken",
"com.fasterxml.jackson.core.JsonEncoding"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
b1d9a2274a006a709c19b1474d010072fe7e1fde | 4e08e5849e82d3fd4a885cc71beb49ab4944abd2 | /src/main/java/c2/elastic/bucket/EvidenceService/model/baseEvent/EventBO.java | 8b51954547e5f3739fbd193d2cb047fd9ec2c35c | [] | no_license | devBubs/EvidenceService | fb9a965aa4551a7ede7041e5d019f5585dbbb0b3 | 557d8afbf8bec4b39c2e6e65f90035b4f31967d3 | refs/heads/main | 2023-01-04T04:06:09.697136 | 2020-11-05T14:02:57 | 2020-11-05T14:02:57 | 300,570,919 | 1 | 0 | null | 2020-11-05T14:02:58 | 2020-10-02T09:52:14 | Java | UTF-8 | Java | false | false | 635 | java | package c2.elastic.bucket.EvidenceService.model.baseEvent;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
@JsonIgnoreProperties(ignoreUnknown = true)
@SuperBuilder(toBuilder = true)
@ToString(callSuper = true)
@NoArgsConstructor
public abstract class EventBO<DTO extends EventDTO, DO extends EventDO> extends Event {
public EventBO(String userId, String timestamp, String eventType) {
super(userId, timestamp, eventType);
}
public abstract DO convertToDO();
public abstract DTO convertToDTO();
}
| [
"shradha.shankar26@gmail.com"
] | shradha.shankar26@gmail.com |
3227fe13c5c7c78448f4a52d16a9e915e56d25f1 | 71942e2123225c6daf9d5e130507f558d992f496 | /src/test/java/com/wikrgroup/exercise/core/email/email_objects/CreatedAt.java | 1d543c9c345588331171063ab8f227d7e200353e | [] | no_license | shyster/WikrGroup_exercise | 0a99aaa85f9f8c94243c006aee7ef08426cfcc9a | 819b81c1372628a0e190bf8c382e134901abc338 | refs/heads/master | 2021-05-08T14:47:27.920774 | 2018-02-19T16:39:54 | 2018-02-19T16:39:54 | 120,096,475 | 0 | 1 | null | 2018-02-12T14:56:05 | 2018-02-03T14:05:22 | Java | UTF-8 | Java | false | false | 1,111 | java | package com.wikrgroup.exercise.core.email.email_objects;
import com.fasterxml.jackson.annotation.*;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Vladislav Kulasov on 03.02.2018.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"$date"
})
public class CreatedAt {
@JsonProperty("$date")
private Date date;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<>();
@JsonProperty("$date")
public Date getDate() {
return date;
}
@JsonProperty("$date")
public void set$date(Date date) {
this.date = date;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public String toString() {
return "CreatedAt{" +
"date=" + date +
", additionalProperties=" + additionalProperties +
'}';
}
}
| [
"kulasov@gmail.com"
] | kulasov@gmail.com |
4a6106516969c8ac0bdf244acdee3938e53075e8 | 80a3b03affcdb29f311b7ba0fbf6c32bc212b7c6 | /MyApplication/app/src/main/java/com/sds/study/andino/adapter/AddFriendItemAdapter.java | ec74a34e13e11ca6371777b1d97339e83245f1ce | [] | no_license | zenxen1/andino | 3474108c7fec17c5881452a06c9567831ef64439 | 6136fa29ad82e3bfaefb524c7e92a1dba67a77c4 | refs/heads/master | 2020-06-23T10:45:00.587873 | 2016-12-26T07:44:16 | 2016-12-26T07:44:16 | 74,654,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,019 | java | package com.sds.study.andino.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.sds.study.andino.Item.AddFriendItem;
/**
* Created by song_kang on 2016-11-27.
*/
public class AddFriendItemAdapter extends BaseAdapter{
Context context;
public AddFriendItemAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 12;
}
@Override
public Object getItem(int i) {
return null;
}
@Override
public long getItemId(int i) {
return 0;
}
@Override
public View getView(int i, View convertView, ViewGroup viewGroup) {
View view = null;
if(convertView == null){
AddFriendItem item = new AddFriendItem(context);
view = item;
}else{
AddFriendItem item = (AddFriendItem)convertView;
view = item;
}
return view;
}
}
| [
"sytnado.song@gmail.com"
] | sytnado.song@gmail.com |
da0362bd1bc5be1966c1dc41ede6886e1a95df01 | d1daca426f2624bfe4c82fd403632eca764d7075 | /UserManage/src/action/SelectAction.java | a191efe8bba02aefd61e2069cdc5ac08f03e735c | [] | no_license | Qin1133112/UserManage | 5c5ef635eec6e1d5cbedbf164cfc843099ec585b | 2ddf624cc7d7fab0f2f70847613ed99f283e8a18 | refs/heads/master | 2020-07-04T13:27:18.786294 | 2016-08-29T11:19:42 | 2016-08-29T11:19:42 | 66,836,990 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,216 | java | package action;
import java.util.Scanner;
import pojo.User;
import service.UserService;
/**
* 查询类
* @author QinGuangrui
*
*/
public class SelectAction {
Scanner sc=new Scanner(System.in);
User u=new User();
UserService us=new UserService();
/**
* 通过ID号查询
*/
public void selectById(){
System.out.println("输入用户id号:");
int userid=sc.nextInt();
u.setUserId(userid);
us.selectUserById(u);
}
/**
* 通过ID号模糊查询
*/
public void selectByIds(){
System.out.println("输入id相关字段:");
int userid=sc.nextInt();
u.setUserId(userid);
us.selectUserByIds(u);
}
/**
* 通过用户名查询
*/
public void selectByUserName(){
System.out.println("输入用户名:");
String userName=sc.next();
u.setUserName(userName);
us.selectUserByName(u);
}
/**
* 通过用户名模糊查询
*/
public void selectByUserNames(){
System.out.println("输入用户名相关字段:");
String userName=sc.next();
u.setUserName(userName);
us.selectUserByNames(u);
}
/**
* 查询用户的所有信息
*/
public void selectAll(){
us.selectUserAll(u);
}
}
| [
"Admin@Admin-PC"
] | Admin@Admin-PC |
cf09630317fd1e2d4b78fe151ffe5467999f30da | ac614500ded56045857a8d51e2d57af2fe4c7f1c | /ProjetoPizza/src/main/java/com/br/projeto/pizza/ProjetoPizzaApplication.java | 4edf175195c63f5a87621e84552a974077ecb54a | [] | no_license | Diego2207/Programa-pizza | 77d64e8481fba115f021c1f6d595c181ee386330 | 46b57ec9ded124b53881c9efd3828c4c88b25719 | refs/heads/master | 2020-06-12T14:16:02.363804 | 2019-06-28T19:42:20 | 2019-06-28T19:42:20 | 194,325,830 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 325 | java | package com.br.projeto.pizza;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ProjetoPizzaApplication {
public static void main(String[] args) {
SpringApplication.run(ProjetoPizzaApplication.class, args);
}
}
| [
"diego.santos@zup.com.br"
] | diego.santos@zup.com.br |
6a52f4e7a158837ec77c92525ca3e9847369d90e | b0a52b232f66dbe0607cad34bfd43608e8a752c4 | /src/main/java/coffeeMachine/CoffeeApp.java | a709fa9a96abc6f2970717efc168df5d6153e418 | [] | no_license | len201/OODesign | 8817b264ad0e2241629324a6c003e5dd24ecfb5d | f7442d0ad947d6626fecd7ddb4479097081019de | refs/heads/master | 2023-05-26T20:15:21.082384 | 2021-06-10T20:16:52 | 2021-06-10T20:16:52 | 283,320,838 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 808 | java | package coffeeMachine;
import java.util.HashMap;
import java.util.Map;
public class CoffeeApp {
public static void main(String[] args) {
// create a Map of available coffee beans
Map<CoffeeSelection, CoffeeBean> beans = new HashMap<CoffeeSelection, CoffeeBean>();
beans.put(CoffeeSelection.ESPRESSO, new CoffeeBean(
"My favorite espresso bean", 1000));
beans.put(CoffeeSelection.FILTER_COFFEE, new CoffeeBean(
"My favorite filter coffee bean", 1000));
// get a new CoffeeMachine object
BasicCoffeeMachine machine = new BasicCoffeeMachine(beans);
// brew a fresh coffee
try {
Coffee espresso = machine.brewCoffee(CoffeeSelection.ESPRESSO);
System.out.println("Coffee is ready!");
} catch (CoffeeException e) {
e.printStackTrace();
}
} // end main
} // end CoffeeApp
| [
"noreply@github.com"
] | len201.noreply@github.com |
664aa066ee35436903cc8b0edf85ff149f4d3613 | 1f19aec2ecfd756934898cf0ad2758ee18d9eca2 | /u-1/u-11/u-11-111/u-11-111-1111/u-11-111-1111-11111/u-11-111-1111-11111-f4839.java | e250f987ca4b50b40619305018d5f0b66a425d0c | [] | no_license | apertureatf/perftest | f6c6e69efad59265197f43af5072aa7af8393a34 | 584257a0c1ada22e5486052c11395858a87b20d5 | refs/heads/master | 2020-06-07T17:52:51.172890 | 2019-06-21T18:53:01 | 2019-06-21T18:53:01 | 193,039,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 106 | java | mastercard 5555555555554444 4012888888881881 4222222222222 378282246310005 6011111111111117
9509397518469 | [
"jenkins@khan.paloaltonetworks.local"
] | jenkins@khan.paloaltonetworks.local |
2b7969d74d98cb4bba1b33cb1ee8d46df0bb5207 | a29f0aef592203c64c4028e58620da3b9921ec50 | /scm-webapp/src/main/java/sonia/scm/search/IndexableFields.java | cd662edb359db470640be73a9eb9be3472845a07 | [
"MIT"
] | permissive | tpfeng/scm-manager | 659123bdd41fe69a85e19cac19e43d0d61baacfe | ed953b6209e8d4c71996a784a0420657488ef11b | refs/heads/master | 2023-07-14T12:33:31.234608 | 2021-07-30T12:35:36 | 2021-07-30T12:35:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,807 | java | /*
* MIT License
*
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.search;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.IntPoint;
import org.apache.lucene.document.LongPoint;
import org.apache.lucene.document.StoredField;
import org.apache.lucene.document.StringField;
import org.apache.lucene.document.TextField;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.queryparser.flexible.standard.config.PointsConfig;
import java.lang.reflect.Field;
import java.text.DecimalFormat;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static java.util.Collections.singleton;
import static sonia.scm.search.TypeCheck.isBoolean;
import static sonia.scm.search.TypeCheck.isInstant;
import static sonia.scm.search.TypeCheck.isInteger;
import static sonia.scm.search.TypeCheck.isLong;
class IndexableFields {
private IndexableFields() {
}
static PointsConfig pointConfig(Field field) {
Class<?> type = field.getType();
if (isLong(type) || isInstant(type)) {
return new PointsConfig(new DecimalFormat(), Long.class);
} else if (isInteger(type)) {
return new PointsConfig(new DecimalFormat(), Integer.class);
}
return null;
}
static IndexableFieldFactory create(Field field, Indexed indexed) {
Class<?> fieldType = field.getType();
Indexed.Type indexType = indexed.type();
if (fieldType == String.class) {
return new StringFieldFactory(indexType);
} else if (isLong(fieldType)) {
return new LongFieldFactory(indexType);
} else if (isInteger(fieldType)) {
return new IntegerFieldFactory(indexType);
} else if (isBoolean(fieldType)) {
return new BooleanFieldFactory(indexType);
} else if (isInstant(fieldType)) {
return new InstantFieldFactory(indexType);
} else {
throw new UnsupportedTypeOfFieldException(fieldType, field.getName());
}
}
private static class StringFieldFactory implements IndexableFieldFactory {
private final Indexed.Type type;
private StringFieldFactory(Indexed.Type type) {
this.type = type;
}
@Override
public Iterable<IndexableField> create(String name, Object value) {
String stringValue = (String) value;
if (type.isTokenized()) {
return singleton(new TextField(name, stringValue, Store.YES));
} else if (type.isSearchable()) {
return singleton(new StringField(name, stringValue, Store.YES));
} else {
return singleton(new StoredField(name, stringValue));
}
}
}
private static class LongFieldFactory implements IndexableFieldFactory {
private final Indexed.Type type;
private LongFieldFactory(Indexed.Type type) {
this.type = type;
}
@Override
public Iterable<IndexableField> create(String name, Object value) {
Long longValue = (Long) value;
List<IndexableField> fields = new ArrayList<>();
if (type.isSearchable()) {
fields.add(new LongPoint(name, longValue));
}
fields.add(new StoredField(name, longValue));
return Collections.unmodifiableList(fields);
}
}
private static class IntegerFieldFactory implements IndexableFieldFactory {
private final Indexed.Type type;
private IntegerFieldFactory(Indexed.Type type) {
this.type = type;
}
@Override
public Iterable<IndexableField> create(String name, Object value) {
Integer integerValue = (Integer) value;
List<IndexableField> fields = new ArrayList<>();
if (type.isSearchable()) {
fields.add(new IntPoint(name, integerValue));
}
fields.add(new StoredField(name, integerValue));
return Collections.unmodifiableList(fields);
}
}
private static class BooleanFieldFactory implements IndexableFieldFactory {
private final Indexed.Type type;
private BooleanFieldFactory(Indexed.Type type) {
this.type = type;
}
@Override
public Iterable<IndexableField> create(String name, Object value) {
Boolean booleanValue = (Boolean) value;
if (type.isSearchable()) {
return singleton(new StringField(name, booleanValue.toString(), Store.YES));
} else {
return singleton(new StoredField(name, booleanValue.toString()));
}
}
}
private static class InstantFieldFactory extends LongFieldFactory {
private InstantFieldFactory(Indexed.Type type) {
super(type);
}
@Override
public Iterable<IndexableField> create(String name, Object value) {
Instant instant = (Instant) value;
return super.create(name, instant.toEpochMilli());
}
}
}
| [
"noreply@github.com"
] | tpfeng.noreply@github.com |
ce2a0b3ad3f03eb3f2fafc5d33887884475fe16f | b3686f2c8dcc4247cc4f96bd748c0324927a64ae | /code for Android/demo22_notification/gen/com/sxt/zhp/R.java | 6b3cb8781cfb16a3002886fb25cfb885d44e101e | [] | no_license | shinelikeamillion/Ten_thousand_hours | 8e1d62a8b82ebab4b19071f409a435e2db256133 | fd1f32029d892bc000e01107e10d6e966592d1b1 | refs/heads/master | 2020-04-06T04:35:43.196928 | 2017-04-18T06:53:24 | 2017-04-18T06:53:24 | 34,212,332 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 918 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.sxt.zhp;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int btnAdd=0x7f050000;
public static final int btn_add=0x7f050001;
public static final int btn_clear=0x7f050003;
public static final int btn_del=0x7f050002;
}
public static final class layout {
public static final int main=0x7f030000;
public static final int notify=0x7f030001;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f040000;
}
}
| [
"geeks.liu@gmial.com"
] | geeks.liu@gmial.com |
75cc57ff3476f0c190d17810dc361525b4175bfc | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava1/Foo818.java | 9fe7a711b3a1774189608ad860935fc3845be34f | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | package applicationModulepackageJava1;
public class Foo818 {
public void foo0() {
final Runnable anything0 = () -> System.out.println("anything");
new applicationModulepackageJava1.Foo817().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
82e082b840130d97c37957eea665fe6336499925 | d431b36970023985c40437fdbe64ceeb5539ecfc | /java-oop-advanced/open⁄close-and-liskov-sub-princ/exercise/logger/src/loggerLibrary/core/Runnable.java | 17bc6554db76dbd54634bfd14659c1e1abcda57f | [] | no_license | HristoRaykov/JavaOOP-05.2018 | 4cb10766c309f4611c99743f11ef4e3ff341ebf4 | cab2c0cdd35c15312329a2681f9969d8a9276d14 | refs/heads/master | 2021-06-27T21:15:59.601826 | 2019-06-06T11:42:50 | 2019-06-06T11:42:50 | 163,294,049 | 0 | 0 | null | 2020-10-13T11:35:51 | 2018-12-27T12:49:21 | Java | UTF-8 | Java | false | false | 296 | java | package loggerLibrary.core;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
public interface Runnable {
void run() throws IOException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException;
}
| [
"hristocr@gmail.com"
] | hristocr@gmail.com |
a754ba98ab1bb7ef381cd9041c5b1c386371a54b | 3621d05889fb9d8b1bac35ae9201189a3835ed17 | /bootFourth/src/main/java/com/ddoongmause/persistence/ProfileRepository.java | 52fa27d0173e2d1f9fe600f37ffdf1296fc7fda9 | [] | no_license | ddoongmause/startSpringBootEx | cafbddb71053d068bfee433fa903509c01e7e310 | 1197d6f1f36b3966687eb0a26e126161fa4732c5 | refs/heads/master | 2023-02-15T10:50:39.643565 | 2021-01-12T16:18:41 | 2021-01-12T16:18:41 | 299,332,888 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 216 | java | package com.ddoongmause.persistence;
import org.springframework.data.repository.CrudRepository;
import com.ddoongmause.domain.Profile;
public interface ProfileRepository extends CrudRepository<Profile, Long> {
}
| [
"DDoongMause@gmail.com"
] | DDoongMause@gmail.com |
bdf60bc96e3778e89342d7ba1a0b0bc4193ca9c6 | 53875155b40b59a65641a712e4a057175950fac9 | /app/src/main/java/com/simson/www/ui/mine/wallet/red/RedEnvelopesActivity.java | 91b29e139867a5b97b92dcf5eb6d810f7df47d56 | [] | no_license | MyPublicGitHub/Simson2.0 | e4b39ee553c990987f1a060a0317e5a74da20aff | 2a8a71d8555963f4ac20f83254d8153903ca7712 | refs/heads/master | 2021-07-01T00:14:17.042609 | 2019-04-11T07:09:49 | 2019-04-11T07:09:49 | 146,069,561 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,864 | java | package com.simson.www.ui.mine.wallet.red;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.simson.www.R;
import com.simson.www.net.bean.mine.RedEnvelopesBean;
import com.simson.www.ui.adapter.RedEnvelopesAdapter;
import com.simson.www.ui.base.BasePresenterActivity;
import java.util.List;
import butterknife.BindView;
public class RedEnvelopesActivity extends BasePresenterActivity<RedEnvelopesPresenter, RedEnvelopesContract.View>
implements RedEnvelopesContract.View {
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
@BindView(R.id.refresh_layout)
SmartRefreshLayout mRefreshLayout;
private int mPage = 1;
private RedEnvelopesAdapter adapter;
@Override
protected int getLayoutId() {
return R.layout.activity_red_envelopes;
}
@Override
protected void initViews() {
recyclerView.setLayoutManager(new LinearLayoutManager(this));
adapter = new RedEnvelopesAdapter(null);
recyclerView.setAdapter(adapter);
adapter.bindToRecyclerView(recyclerView);
adapter.setEmptyView(R.layout.list_empty_view);
recyclerView.setNestedScrollingEnabled(false);
recyclerView.setFocusable(false);
mRefreshLayout.setEnableLoadMore(false);
// adapter.setOnItemClickListener((adapter, view1, position) -> {
// List<ShopListBean> data = (List<ShopListBean>) adapter.getData();
// ShopListBean shopListBean = data.get(position);
// startActivity(new Intent(this, CommodityDetailActivity.class)
// .putExtra("id", shopListBean.getItem_id()));
// }
// );
setRefresh();
}
@Override
public void showFail(String msg) {
}
@Override
protected void initData() {
mPresenter.redEnvelopesRecord();
}
@Override
protected RedEnvelopesPresenter createPresenter() {
return new RedEnvelopesPresenter();
}
private void setRefresh() {
mRefreshLayout.setOnRefreshListener(refreshLayout -> {
mPage = 1;
mPresenter.redEnvelopesRecord();
mRefreshLayout.setNoMoreData(false);
refreshLayout.finishRefresh();
});
}
@Override
protected boolean initToolbar() {
mTitle.setText("红包记录");
return true;
}
@Override
public void redEnvelopesRecord(List<RedEnvelopesBean> bean) {
if (bean == null) {
return;
}
if (mPage == 1) {
adapter.replaceData(bean);
} else {
adapter.addData(bean);
}
if (bean.size() == 0) {
mRefreshLayout.setNoMoreData(true);
}
}
}
| [
"716774214@qq.com"
] | 716774214@qq.com |
eb2a4300a2baa093c476ac0cc05ff6f1db53df98 | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_2/src/e/j/c/Calc_1_2_4926.java | d3fd193fe35003ba25c745c340293af5ff6b06cb | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 131 | java | package e.j.c;
public class Calc_1_2_4926 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
c79c1fcc19f025dfd7b39586011efd0a942e6a0c | ea78d95d3b45550dbb52a16e262f7a2545d7e31e | /cloud-alibaba/ali-nacos-dubbo-api/src/main/java/com/easy/and/api/service/EchoService.java | 56f4539eeb2dbbea287451182decfa336b1e6e86 | [
"MIT"
] | permissive | noudisan/spring-boot-demo | db549de62d302fff443dd700c65646d609918328 | 7934634baeadead12e949697474dc372546d1d37 | refs/heads/master | 2020-09-17T18:16:14.619710 | 2019-11-26T03:52:14 | 2019-11-26T03:52:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 102 | java | package com.easy.and.api.service;
public interface EchoService {
String echo(String message);
}
| [
"smltq@126.com"
] | smltq@126.com |
fac84332bbada80df0d5830609db7c3850393a37 | 908c9f95e52a4a5c265c690c73932aeb3f82dfe8 | /gmall-sms/src/main/java/com/atguigu/gmall/sms/controller/SeckillPromotionController.java | 49678315aa4bf6345ec079085579597ed6307a79 | [
"Apache-2.0"
] | permissive | ccyj1024/gmall | e8201cc2fea80e77d038f19aac2725755c0ed019 | b13b504204ed411937fc60e9bc829c4cf50b8893 | refs/heads/master | 2022-12-15T21:38:39.858644 | 2019-09-29T01:03:12 | 2019-09-29T01:03:12 | 209,918,123 | 0 | 0 | Apache-2.0 | 2022-12-10T06:26:58 | 2019-09-21T03:23:04 | JavaScript | UTF-8 | Java | false | false | 2,653 | java | package com.atguigu.gmall.sms.controller;
import java.util.Arrays;
import java.util.Map;
import com.atguigu.core.bean.PageVo;
import com.atguigu.core.bean.QueryCondition;
import com.atguigu.core.bean.Resp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.atguigu.gmall.sms.entity.SeckillPromotionEntity;
import com.atguigu.gmall.sms.service.SeckillPromotionService;
/**
* 秒杀活动
*
* @author ccyj
* @email ccyj1024@126.com
* @date 2019-09-21 13:48:58
*/
@Api(tags = "秒杀活动 管理")
@RestController
@RequestMapping("sms/seckillpromotion")
public class SeckillPromotionController {
@Autowired
private SeckillPromotionService seckillPromotionService;
/**
* 列表
*/
@ApiOperation("分页查询(排序)")
@GetMapping("/list")
@PreAuthorize("hasAuthority('sms:seckillpromotion:list')")
public Resp<PageVo> list(QueryCondition queryCondition) {
PageVo page = seckillPromotionService.queryPage(queryCondition);
return Resp.ok(page);
}
/**
* 信息
*/
@ApiOperation("详情查询")
@GetMapping("/info/{id}")
@PreAuthorize("hasAuthority('sms:seckillpromotion:info')")
public Resp<SeckillPromotionEntity> info(@PathVariable("id") Long id){
SeckillPromotionEntity seckillPromotion = seckillPromotionService.getById(id);
return Resp.ok(seckillPromotion);
}
/**
* 保存
*/
@ApiOperation("保存")
@PostMapping("/save")
@PreAuthorize("hasAuthority('sms:seckillpromotion:save')")
public Resp<Object> save(@RequestBody SeckillPromotionEntity seckillPromotion){
seckillPromotionService.save(seckillPromotion);
return Resp.ok(null);
}
/**
* 修改
*/
@ApiOperation("修改")
@PostMapping("/update")
@PreAuthorize("hasAuthority('sms:seckillpromotion:update')")
public Resp<Object> update(@RequestBody SeckillPromotionEntity seckillPromotion){
seckillPromotionService.updateById(seckillPromotion);
return Resp.ok(null);
}
/**
* 删除
*/
@ApiOperation("删除")
@PostMapping("/delete")
@PreAuthorize("hasAuthority('sms:seckillpromotion:delete')")
public Resp<Object> delete(@RequestBody Long[] ids){
seckillPromotionService.removeByIds(Arrays.asList(ids));
return Resp.ok(null);
}
}
| [
"ccyj1024@126.com"
] | ccyj1024@126.com |
e67de5e610a165b5ec269da396dde4ef0d850b75 | e81cff6ba2bc67441b414338e806b54c7e8e614c | /app/src/main/java/com/xh/study/niconico/module/home/ranking/EndLessOnScrollListener.java | 51d02f83b6898a9bf2f2d3e913e1e4cb8a3cc9c6 | [] | no_license | XH888/nico-manga-unofficial | bee0b5f9f5c73df02dec872593fe7c37e0cfba0a | 944afd3eb3fec10b8e4bb69b81ad9d5dd1cdd741 | refs/heads/master | 2020-12-24T20:00:15.165920 | 2018-06-10T23:38:22 | 2018-06-10T23:38:22 | 86,225,785 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,651 | java | package com.xh.study.niconico.module.home.ranking;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
/**
* Created by xh on 1/14/17.
*/
public abstract class EndLessOnScrollListener extends RecyclerView.OnScrollListener {
//声明一个LinearLayoutManager
private LinearLayoutManager mLinearLayoutManager;
//当前页,从0开始 private int currentPage = 0;
//已经加载出来的Item的数量
private int totalItemCount;
//主要用来存储上一个totalItemCount
private int previousTotal = 0;
//在屏幕上可见的item数量
private int visibleItemCount;
//在屏幕可见的Item中的第一个
private int firstVisibleItem;
//是否正在上拉数据
private boolean loading = true;
public EndLessOnScrollListener(LinearLayoutManager linearLayoutManager) {
this.mLinearLayoutManager = linearLayoutManager;
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
visibleItemCount = recyclerView.getChildCount();
totalItemCount = mLinearLayoutManager.getItemCount();
firstVisibleItem = mLinearLayoutManager.findFirstVisibleItemPosition();
if(loading){
if(totalItemCount > previousTotal){
loading = false;
previousTotal = totalItemCount;
}
}
if (!loading && totalItemCount-visibleItemCount <= firstVisibleItem){
onLoadMore();
loading = true;
}
}
public abstract void onLoadMore();
}
| [
"xh@XHs-MacBook-Pro.local"
] | xh@XHs-MacBook-Pro.local |
8f57a653e81d4da0786a7f091c558616d11ace93 | df010cd3ddb4854fedb3c6bd052a43415e385d15 | /app/src/test/java/io/github/mayunfei/simpledownload/ExampleUnitTest.java | 9b949d6909da860e376b8cae4fa0a3ad90ebe156 | [
"Apache-2.0"
] | permissive | MaYunFei/simple-rx-download | c96e7c5a68e8ac67b34a896edc3ae6b66e402be4 | 5a8a0ecd9fe1388f8a1e11c676fcea93187cf822 | refs/heads/master | 2021-01-22T23:33:31.038475 | 2017-03-25T09:48:20 | 2017-03-25T09:48:20 | 85,649,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 399 | java | package io.github.mayunfei.simpledownload;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"mayunfei6@gmail.com"
] | mayunfei6@gmail.com |
1dde9d1a28466f548bb65de41eb2666e68d3a7a3 | 8fcaa23cf810f42046693175910985f3e772fb9b | /src/main/java/asudev/blacksmith/Commands.java | d38f09aa638fed20159411bdbccd25496e3f1f16 | [] | no_license | AsuDev2/Blacksmith | 539d7c4b75f10b3c93c35ca2410300ccab1ece8c | fa36e9dcf8a5a756df2f31ad652b80a3d189304c | refs/heads/master | 2022-11-05T23:59:17.437950 | 2020-06-26T23:32:17 | 2020-06-26T23:32:17 | 275,265,362 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,892 | java | package asudev.blacksmith;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.checkerframework.checker.nullness.qual.NonNull;
public class Commands implements Listener, CommandExecutor {
private Blacksmith plugin = Blacksmith.getPlugin(Blacksmith.class);
private Manager manager = Manager.getInstance();
public String blacksmithmain = "blacksmith";
public boolean onCommand(@NonNull CommandSender sender, @NonNull Command cmd, @NonNull String label, @NonNull String[] args) {
if (cmd.getName().equalsIgnoreCase(blacksmithmain)) {
if(sender.hasPermission("blacksmith.admin")) {
if (args.length == 0) {
manager.send(sender, "&8&m-----------------------------------------------------\n" +
"&7 \n" +
"&a&l&nBlacksmith Admin Commands\n" +
"&7 \n" +
"&b/blacksmith reload &8> &7Reloads all the mmoitems for blacksmith.\n" +
"&b/blacksmith open <player> &8> &7Opens blacksmith shop for a player\n" +
"&7 \n" +
"&8&m-----------------------------------------------------");
return true;
}
if (args[0].equalsIgnoreCase("reload")) {
Long timeNow = System.currentTimeMillis() / 1000;
plugin.reloadCustomConfig();
plugin.reloadCustomConfig2();
manager.setupItems();
Number timeAfter = (System.currentTimeMillis() / 1000) - timeNow;
manager.send(sender, "&7Reloaded &a&l&nBlacksmith &7in &b" + timeAfter + "ms&7.");
} else if (args[0].equalsIgnoreCase("open")) {
if (args.length > 1) {
Player target = Bukkit.getServer().getPlayer(args[1]);
if (target != null) {
manager.openBlacksmithGui(target);
return true;
} else {
manager.send(sender, "&cThe player you specified is not online.");
return true;
}
} else {
manager.send(sender, "&cYou must specify a player to open the shop to!");
return true;
}
}
} else {
manager.send(sender, "&cYou do not have permission to use this command.");
return true;
}
} else {
return false;
}
return false;
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
7138038c20baebfd79eef12a431e66a63d484c4e | 9ba767c1cbd524d30c3576ff9dda6843fbbbad48 | /src/interfaces/HorrorShow.java | ab39a406c0e8ad4a06717e9328e867a33a42c9fa | [] | no_license | Ck1985/Interface | 865ff2c868f97a05c3a7d7320038440b3ad44bb2 | 3a061f19e30bdd7d5f5481dd6582ffea384489e6 | refs/heads/master | 2020-06-22T11:26:17.091405 | 2016-11-23T16:06:09 | 2016-11-23T16:06:09 | 74,592,729 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,193 | java | package interfaces;
/**
* Created by Anonymous11100001 on 6/4/2016.
*/
interface Monster{
void menace();
}
interface DangerousMonster extends Monster{
void destroy();
}
class DragonZilla implements DangerousMonster{
public void menace(){
}
public void destroy(){
}
}
interface Lithall{
void kill();
}
interface Vampire extends DangerousMonster, Lithall{
void drinkBlood();
}
class VeryBadVampire implements Vampire{
public void menace(){
}
public void destroy(){
}
public void kill(){
}
public void drinkBlood(){
}
}
public class HorrorShow {
static void m(Monster monster){
monster.menace();
}
static void d(DangerousMonster dangerousMonster){
dangerousMonster.menace();
dangerousMonster.destroy();
}
static void l(Lithall lithall){
lithall.kill();
}
public static void main(String[] args){
DangerousMonster barney = new DragonZilla();
Vampire vampire = new VeryBadVampire();
barney.destroy();
barney.menace();
vampire.drinkBlood();
vampire.kill();
vampire.menace();
vampire.destroy();
}
}
| [
"caoxuanquy1985@gmail.com"
] | caoxuanquy1985@gmail.com |
30c3192d847871fd96f022f68b7a72a2eb28d133 | 3262ba22e1160dc6c865fd87ba15d33f53e07c28 | /src/test/TestCMatrix.java | 59aca9894173d7a12a413f2e0e8f7be49f9d5d62 | [] | no_license | abdou2008/open-cezeri-library | c2dbec4b5980b1f84c63e827cb87782027703a42 | 2d999f402674a6f7e294cb3e2752c184d4cf265a | refs/heads/master | 2020-05-03T08:26:20.531437 | 2019-03-14T10:06:09 | 2019-03-14T10:06:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,311 | 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 test;
import cezeri.matrix.CMatrix;
import cezeri.utils.FactoryUtils;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
*
* @author BAP1
*/
public class TestCMatrix {
public static void main(String[] args) {
System.out.println("default dir:"+FactoryUtils.getDefaultDirectory());
// CMatrix.getInstance().rand(500,300).imshow().scale(255).imshow();
// String path = ".\\images\\E1.jpg";
// Path p = Paths.get(path);
// String file = p.getFileName().toString();
// System.out.println(file);
// Java approach
// CMatrix.getInstance().readImage().show().showHistogram().showRGB().showHistogramRed().showHistogramGreen().showHistogramBlue().showHistogramAlpha();
// Matlab approach
// CMatrix cm=CMatrix.getInstance().imread("C:\\Machine Vision Images\\BAP\\Test\\450_0.01.bmp").imshow();//.imhist().imhistAlpha().imhistRed().imhistGreen().imhistBlue().imhistGray();//.imshowRGB();//.imhist().imshowRGB().pdf().imshow().imhist().showDataGrid();
// System.out.println("skewness:"+CMatrix.getInstance().imread(".\\images\\t1.bmp").getSkewness());
// System.out.println("kurtosis:"+CMatrix.getInstance().imread(".\\images\\t1.bmp").getKurtosis());
// CMatrix.getInstance().randn(500).timesScalar(10000).imshow();
// CMatrix.getInstance().linspace(0, 360, 360).scale(Math.PI/180).sin().plot().showDataGrid().showImage();
// CMatrix.getInstance().imread(".\\images\\E2.jpg").imshowRGB().imhist();
// CMatrix.getInstance().imread(".\\images\\E3.jpg").imshowRGB().imhist();
// CMatrix.getInstance().readImage().showHistogramAlpha();
// CMatrix.getInstance().vector(0,255).minusScalar(127).pow(2).plot();
// CMatrix y=CMatrix.getInstance().vector(0,255).minusScalar(127).pow(2);
// double n=0.3;
// System.out.println("n:"+n);
// System.out.println("n:"+FactoryUtils.formatDouble(n,2));
// System.out.println("n:"+FactoryUtils.formatDoubleAsString(n, 4));
}
}
| [
"elcezerilab@gmail.com"
] | elcezerilab@gmail.com |
35696eba77a60f565b9fce21d657544bd679057d | d420f22a03458c3403eea03ec50059a591adc344 | /app+glide/src/androidTest/java/com/laka/appglide/ExampleInstrumentedTest.java | 89e8be8d779bf0591326a1d1480c97e4ea5e31a7 | [] | no_license | Seachal/MySmall | aa16e25d1a933eecc6f17060da167030e852ca72 | 7e6cc53678c9f6690ddc8c61a5eec5b35d93c2a0 | refs/heads/master | 2020-12-13T22:06:28.517949 | 2019-11-20T07:42:59 | 2019-11-20T07:42:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 740 | java | package com.laka.appglide;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.laka.appglide.test", appContext.getPackageName());
}
}
| [
"xuhonghui@laka-inc.com"
] | xuhonghui@laka-inc.com |
3f9942047f21f2d1369a113dd7ffd1b9916e49c2 | 0da8cd465a6e458f1e3a07606c7a9c3fd08f5576 | /semestr one/InfaHoWo/src/main/java/ru/itis/services/cars/CarsService.java | 3c1d59803ca3e93768a643a811e82e999be7d82d | [] | no_license | RenatFayzullin/InfaWithSidikov | 735a453907a0863a4ca985fe0403c4d2e6fa6452 | 570af642bdb7488e44991e0ca6177e2ae80fa782 | refs/heads/master | 2023-03-10T07:38:11.972277 | 2021-02-20T14:00:49 | 2021-02-20T14:00:49 | 294,495,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 258 | java | package ru.itis.services.cars;
import ru.itis.dto.CarDto;
import java.util.List;
import java.util.Optional;
public interface CarsService {
List<CarDto> getAll();
CarDto getById(Integer id);
Optional<List<CarDto>> getFitCars(String example);
}
| [
"61165967+RenatFayzullin@users.noreply.github.com"
] | 61165967+RenatFayzullin@users.noreply.github.com |
909893ddc9d3f20730a27b4d94a03082dc4671a6 | 08b2b99874a826718a6f6b4c04a3ad16a95849ef | /src/main/java/com/kavit/docpat/hibernate/pojo/Patient.java | a48cb7d58c68f72290a6764e709fb47a4d341195 | [] | no_license | kavitshah98/Doc_Pat_Management_System | faff93a9983207fa381e2fab82fce2b3d991f699 | c9c216973317992917e70112b782d40a948e4a96 | refs/heads/master | 2023-04-16T11:54:11.542237 | 2021-04-21T21:32:46 | 2021-04-21T21:32:46 | 360,310,689 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package com.kavit.docpat.hibernate.pojo;
// Generated Nov 5, 2020 4:56:18 PM by Hibernate Tools 4.3.5.Final
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* Patient generated by hbm2java
*/
@Entity
@Table(name = "patient", catalog = "db_hms")
public class Patient implements java.io.Serializable {
private Integer id;
private Doctor doctor;
private String name;
public Patient() {
}
public Patient(Doctor doctor, String name) {
this.doctor = doctor;
this.name = name;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "doc_id")
public Doctor getDoctor() {
return this.doctor;
}
public void setDoctor(Doctor doctor) {
this.doctor = doctor;
}
@Column(name = "name", length = 45)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
| [
"kas24698@gmail.com"
] | kas24698@gmail.com |
7cdc203cda77beb7eb62fb78858d9d27e3bbaea4 | eb0a60c77f5c4dbdb0866da41bca14a385b396fa | /src/main/java/com/example/osirisgateapi/OsirisGateApiApplication.java | d0c1263cd9d2dba6b9de89427bc5920a8c7d5fb0 | [] | no_license | ThePureza/OsirisGate | 82c045fc6895352f13597a5637155906ff71f6cc | 849513c5e12e6ea344b14e7b330f36c87ccf37b9 | refs/heads/master | 2023-07-17T05:46:52.973688 | 2021-08-29T21:50:03 | 2021-08-29T21:50:03 | 380,859,917 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 344 | java | package com.example.osirisgateapi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class OsirisGateApiApplication {
public static void main(String[] args) {
SpringApplication.run(OsirisGateApiApplication.class, args);
}
}
| [
"alineneves.a21@gmail.com"
] | alineneves.a21@gmail.com |
3caecf34242493a5fc388695f8aa3e2b4487b856 | 0e89c8af627aba3dd91245afd0296df4681df801 | /src/main/java/se/atg/service/harrykart/services/HarryKartResultService.java | c56cd9766eb989dfbe3f401a324ece4b2f890f9d | [] | no_license | nocdib/HarryKart | 8622dfacc47d2583302b85b5f04d90bf2b906ed1 | 98a7b5555916347b13c0bf879fc010a7f6206a93 | refs/heads/master | 2021-07-16T17:54:39.338899 | 2019-10-30T21:40:16 | 2019-10-30T21:40:16 | 218,632,098 | 1 | 1 | null | 2020-10-13T17:06:43 | 2019-10-30T21:42:58 | Java | UTF-8 | Java | false | false | 3,259 | java | package se.atg.service.harrykart.services;
import se.atg.service.harrykart.model.HarryKart;
import se.atg.service.harrykart.model.Rank;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static java.util.stream.Collectors.toList;
/**
* Class to handle Harry Kart race result calculation and display
*/
public class HarryKartResultService {
private static final double TRACK_LENGTH = 1000.0;
HarryKart race;
/**
* The race to be ranked
* @param race The Harry Kart race to be tabulated
*/
public HarryKartResultService(HarryKart race) {
this.race = race;
}
/**
* Calculate the rank of the race participants
* @return List<Rank> List of participants ranked by their order of race completion
*/
public List<Rank> getResults() {
ArrayList<Rank> standings = new ArrayList<>();
/*
For each participant
1) Go through each race loop
2) Get the lane where lane.number = participant.lane
3) baseSpeed += lane.power. baseSpeed <= 0 means the lap is not run and the horse is out of the race.
4) time += TRACK_LENGTH / baseSpeed
*/
race.getStartList().forEach(participant -> {
Rank rank = new Rank(0, participant.getName(), TRACK_LENGTH/participant.getBaseSpeed());
race.getPowerUps().stream()
.forEach(loop -> loop.getLanes().stream()
.filter(lane -> lane.getNumber() == participant.getLane()).
forEach(lane -> {
int loopSpeed = participant.getBaseSpeed() + lane.getPowerValue();
if(loopSpeed <= 0){
rank.setTime(rank.getTime() + Double.MAX_VALUE); // Time set to the highest possible value. Horse is last place.
} else {
participant.setBaseSpeed(participant.getBaseSpeed() + lane.getPowerValue());
rank.setTime(rank.getTime() + (TRACK_LENGTH/participant.getBaseSpeed()) );
}
}));
standings.add(rank); // Add rank to collection
});
Collections.sort(standings); // Sort with lowest times first
standings.removeIf(rank -> rank.getTime() >= Double.MAX_VALUE); // Remove participants who do not complete the race
// Rank each participant by time. Equal times have the same rank.
int finalPlacement = 1;
standings.get(0).setPosition(finalPlacement);
for(int positionIndex = 1; positionIndex < standings.size(); positionIndex++){
if(standings.get(positionIndex).getTime() == standings.get(positionIndex-1).getTime()){
standings.get(positionIndex).setPosition(finalPlacement);
}else{
standings.get(positionIndex).setPosition(++finalPlacement);
}
}
// Disregard lower than 3rd place.
return standings.stream().filter(rank -> rank.getPosition() <= 3).collect(toList());
}
}
| [
"nocdib@valhalla.local"
] | nocdib@valhalla.local |
d39907e898bcb5e6e9431e0d3d629371270ceaef | cc6b5940d80553bf8a178e8f3108167945fcfb12 | /drools-core/src/main/java/org/drools/core/phreak/ThreadUnsafePropagationList.java | b8d27ca423851e0bd63fa180af0e968903884e69 | [
"Apache-2.0"
] | permissive | yesamer/drools | f0f9889f212a1becb1144ed704e58649f2555bcd | 92b5f4e57755bfd1f4e52af34dfcbf0d608f33c9 | refs/heads/master | 2023-07-06T14:50:31.161516 | 2023-06-27T01:00:28 | 2023-06-27T01:00:28 | 185,600,193 | 0 | 0 | Apache-2.0 | 2022-02-15T11:22:48 | 2019-05-08T12:19:09 | Java | UTF-8 | Java | false | false | 1,938 | java | /*
* Copyright (c) 2021. Red Hat, Inc. and/or its affiliates.
* Licensed 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.drools.core.phreak;
import java.util.Collections;
import java.util.Iterator;
import org.drools.core.common.ReteEvaluator;
public class ThreadUnsafePropagationList implements PropagationList {
private final ReteEvaluator reteEvaluator;
public ThreadUnsafePropagationList( ReteEvaluator reteEvaluator ) {
this.reteEvaluator = reteEvaluator;
}
@Override
public void addEntry( PropagationEntry propagationEntry ) {
propagationEntry.execute( reteEvaluator );
}
@Override
public PropagationEntry takeAll() {
return null;
}
@Override
public void flush() {
}
@Override
public void flush( PropagationEntry currentHead ) {
}
@Override
public void reset() {
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public boolean hasEntriesDeferringExpiration() {
return false;
}
@Override
public Iterator<PropagationEntry> iterator() {
return Collections.emptyIterator();
}
@Override
public void waitOnRest() {
}
@Override
public void notifyWaitOnRest() {
}
@Override
public void onEngineInactive() {
}
@Override
public void dispose() {
}
@Override
public void setFiringUntilHalt( boolean firingUntilHalt ) {
}
}
| [
"noreply@github.com"
] | yesamer.noreply@github.com |
e5b3fda7d50f8ec39c9ceea3aea661f45692296d | f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9 | /src/main/java/com/alipay/api/response/AlipayIserviceMindvJobsbyuserQueryResponse.java | 48ac292c56cdf87c1b29ac8d8ab4285bda10876b | [
"Apache-2.0"
] | permissive | XuYingJie-cmd/alipay-sdk-java-all | 0887fa02f857dac538e6ea7a72d4d9279edbe0f3 | dd18a679f7543a65f8eba2467afa0b88e8ae5446 | refs/heads/master | 2023-07-15T23:01:02.139231 | 2021-09-06T07:57:09 | 2021-09-06T07:57:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 771 | java | package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.iservice.mindv.jobsbyuser.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayIserviceMindvJobsbyuserQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 3237851367296298819L;
/**
* 用户填写的任务id列表
*/
@ApiListField("job_ids")
@ApiField("number")
private List<Long> jobIds;
public void setJobIds(List<Long> jobIds) {
this.jobIds = jobIds;
}
public List<Long> getJobIds( ) {
return this.jobIds;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
11f250ee20a340c9d2714e593c91283463943ac4 | 16791e34f5736556c635ee476771b98b00a006e4 | /src/Node.java | e93a5e7d8cbed42e4ab3a0c9ad3573993419ab3b | [] | no_license | SimmonsCS28/Knight-Path | e6ca61dccfe9967640057683b4f63fd0f31f7380 | 0150a5cb215cadf2aa4e2874f027d639377807f6 | refs/heads/master | 2020-03-07T15:43:15.016438 | 2018-04-04T15:34:24 | 2018-04-04T15:34:24 | 127,562,790 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,526 | java | import java.util.List;
public class Node {
// (x, y) represents chess board coordinates
// dist represent its minimum distance from the source
int x, y, dist;
List<Node> neighbors;
// constructors for a node object.
public Node(int x, int y) {
this.x = x;
this.y = y;
}
public Node(int x, int y, int dist) {
this.x = x;
this.y = y;
this.dist = dist;
}
/*
* Need to implement hashCode() and equals() since we're using class object
* as a key in a HashMap
*
*/
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Node node = (Node) o;
if (x != node.x)
return false;
if (y != node.y)
return false;
return dist == node.dist;
}
@Override
public int hashCode() {
int result = x;
result = 31 * result + y;
result = 31 * result + dist;
return result;
}
/**
* Builds a formatted string output of a node's x and y coordinates.
*
* @return a formated string of a node's coordinates.
*/
public String printString() {
return ("(" + x + "," + y + ")");
}
/**
* Builds a formatted string output of the node and an arrow denoting a move
* to the proceeding node. Used to simplify the code in the main BFS search.
*
* @param n a node object containing the x,y coordinates needed for formatting.
* @return a formated string to display the Knight's path traversal.
*/
public String pathStringBuilding(Node n) {
return ("(" + n.x + "," + n.y + ") -> ");
}
}
| [
"SimmonsCS28@gmail.com"
] | SimmonsCS28@gmail.com |
dbefb0b51b2df68d2f14b9817083411651bdbdc3 | 37261de8bc946480c956ec5fbcb3c170e02107e1 | /src/main/java/com/hdsxtech/tjbhzc_datarecp_tcp/factory/CenterMsgConfig.java | 3ead8ed2ea75e02579b1c719e571822dc1c863b5 | [] | no_license | q799512957/TCP | bd58e6601744f49c01cfe5a928435eb0ced94027 | a9919346cb546ceb6d0cd6db329652ba572ce097 | refs/heads/master | 2020-04-08T14:51:33.541905 | 2018-11-28T07:31:30 | 2018-11-28T07:31:30 | 159,454,569 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,396 | java | package com.hdsxtech.tjbhzc_datarecp_tcp.factory;
import com.hdsxtech.tjbhzc_datarecp_tcp.exception.MsgFactoryException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* 消息模板容器
*
* @author wangxiri
*/
@XmlRootElement(name = "msgconfig")
@XmlAccessorType(XmlAccessType.FIELD)
public class CenterMsgConfig {
private Map<String, MsgSeries> msgseriesMap = new ConcurrentHashMap<String, MsgSeries>();
private boolean inited = false;
private static CenterMsgConfig obj;
@XmlElement(name = "msgseries")
private List<MsgSeries> msgseriesList;
public static CenterMsgConfig getInstance() {
if (obj == null)
obj = new CenterMsgConfig();
return obj;
}
private void init() {
if (!inited) {
for (MsgSeries ms : this.msgseriesList) {
this.msgseriesMap.put(ms.getType(), ms);
}
}
inited = true;
}
@Override
public String toString() {
return "CenterMsgConfig [msgseriesList=" + msgseriesList + "]";
}
/**
* 获取905消息头
*
* @return
*/
public MsgElement get808HeaderCopy(String key_msg) {
init();
if (this.msgseriesMap.containsKey(key_msg)) {
return this.msgseriesMap.get(key_msg).getHeader();
} else {
throw new MsgFactoryException("找不到808消息头配置");
}
}
public MsgElement getElementByID(String id) {
return null;
}
/**
* 根据ID获取808消息体
*
* @param msgid
* @return
*/
public MsgElement get808BodyCopyById(int msgid, String key_msg) {
init();
if (this.msgseriesMap.containsKey(key_msg)) {
return this.msgseriesMap.get(key_msg).getBodyByID(msgid);
} else {
throw new MsgFactoryException("找不到消息体。协议名称:" + key_msg + " 消息ID:" + Integer.toHexString(msgid));
}
}
public void readFromXml(String path) {
InputStream is = null;
try {
// 获取
is = CenterMsgConfig.class.getResourceAsStream(path);
if (is == null) {
throw new MsgFactoryException("配置文件路径错误:" + path);
}
this.obj = this.readConfigFromStream(CenterMsgConfig.class, is);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
@SuppressWarnings("unchecked")
private <T> T readConfigFromStream(Class<T> clazz, final InputStream dataStream) {
try {
JAXBContext jc = JAXBContext.newInstance(clazz);
Unmarshaller u = jc.createUnmarshaller();
return (T) u.unmarshal(dataStream);
} catch (JAXBException e) {
throw new MsgFactoryException(e);
}
}
}
| [
"jijiale521"
] | jijiale521 |
130543a4d59d92f335d75abc2800c5c419cbcee6 | fc0d61917ff110f9681940cec2610efe5c2a58a2 | /AndroidThings/simple-audio/app/src/main/java/com/example/androidthings/myproject/MainActivity.java | 0b92face12e537ca670192ada4e11c2fa11b0448 | [
"Apache-2.0"
] | permissive | tiagospies/dojoIoT | 1f06368c7ea217591c422646c16bdab9bea820df | 6ebcf3994cb6d8682dbf8c2f8670ef46516d2258 | refs/heads/master | 2021-09-14T13:52:29.638470 | 2018-05-14T16:28:28 | 2018-05-14T16:28:28 | 107,553,118 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,675 | java | /*
* Copyright 2016, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.androidthings.myproject;
import android.speech.tts.TextToSpeech;
import java.util.Locale;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import com.google.android.things.pio.PeripheralManagerService;
import com.google.android.things.contrib.driver.button.Button;
import com.google.android.things.contrib.driver.button.ButtonInputDriver;
import com.google.android.things.pio.Gpio;
import android.view.KeyEvent;
/**
* Skeleton of the main Android Things activity. Implement your device's logic
* in this class.
*
* Android Things peripheral APIs are accessible through the class
* PeripheralManagerService. For example, the snippet below will open a GPIO pin and
* set it to HIGH:
*
* <pre>{@code
* PeripheralManagerService service = new PeripheralManagerService();
* mLedGpio = service.openGpio("BCM6");
* mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW);
* mLedGpio.setValue(true);
* }</pre>
*
* For more complex peripherals, look for an existing user-space driver, or implement one if none
* is available.
*
*/
public class MainActivity extends Activity implements TextToSpeech.OnInitListener{
private static final String TAG = MainActivity.class.getSimpleName();
private final String PIN_BUTTON = "BCM21";
private ButtonInputDriver mButtonInputDriver;
private TextToSpeech tts;
private Gpio mLedGpio;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
tts = new TextToSpeech(this, this);
PeripheralManagerService pioService = new PeripheralManagerService();
try {
mButtonInputDriver = new ButtonInputDriver(
PIN_BUTTON,
Button.LogicState.PRESSED_WHEN_LOW,
KeyEvent.KEYCODE_SPACE);
mButtonInputDriver.register();
}catch (Exception e){
}
Log.d(TAG, "onCreate");
}
@Override
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
int result = tts.setLanguage(new Locale("pt"));
if (result == TextToSpeech.LANG_MISSING_DATA
|| result == TextToSpeech.LANG_NOT_SUPPORTED) {
Log.e("TTS", "This Language is not supported");
}
String text = "Bem vindos ao dojo sobre Internet das Coisas.";
tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
} else {
Log.e("TTS", "Initilization Failed!");
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_SPACE) {
// Turn on the LED
String text = "Bem vindos ao dojo sobre Internet das Coisas.";
tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.d(TAG, "onDestroy");
}
}
| [
"tiagospies@gmail.com"
] | tiagospies@gmail.com |
7e9318b3826c118321cf7e9564452f866d6469e6 | 49fa128dee07ed637f76744ecde21b03c59327ab | /src/Message.java | 94b3ba0e11d9211f5315e93a23afb23df2a87e7d | [] | no_license | Bhoomi-shah/Total-Order-Multicast | 469df228052ca53be37ba09bdc4f67f560102e6d | 14e8c41b71c046dc62138a0e256067b336cba303 | refs/heads/master | 2016-09-01T06:54:40.945695 | 2016-02-18T02:22:26 | 2016-02-18T02:22:26 | 51,971,727 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,298 | java | //package replicamain;
import java.io.Serializable;
@SuppressWarnings("serial")
public class Message implements Serializable{
String type;
int versionNumber;
String fileName;
int sourceId;
String operationName;
public Message(String type, int versionNumber,String fileName, int sourceId, String operationName) {
this.type = type;
this.versionNumber = versionNumber;
this.fileName=fileName;
this.sourceId=sourceId;
this.operationName=operationName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getVersionNumber() {
return versionNumber;
}
public void setVersionNumber(int versionNumber) {
this.versionNumber = versionNumber;
}
public int getSourceId() {
return sourceId;
}
public void setSourceId(int sourceId) {
this.sourceId = sourceId;
}
public String getOperationName() {
return operationName;
}
public void setOperationName(String operationName) {
this.operationName = operationName;
}
public String getFileName() {
//System.out.println("Inside get method, filename is : " + fileName);
return fileName;
}
public void setFileName(String file) {
//System.out.println("Inside set method, filename is : " + fileName);
this.fileName = file;
}
}
| [
"bss130430@utdallas.edu"
] | bss130430@utdallas.edu |
23e81ecb64853d9c02d9178dd6dfedd706262b74 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_db6effd015be9a0779793093b09589a46a3398ef/ServiceHandler/2_db6effd015be9a0779793093b09589a46a3398ef_ServiceHandler_t.java | 7b91e81178fb2e226ccc64cacb9fae15830dbe4a | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,581 | java | package com.tomazkovacic.boilerpipe.thrift;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.nio.ByteBuffer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.thrift.TException;
import com.tomazkovacic.boilerpipe.thrift.gen.ExceptionCode;
import com.tomazkovacic.boilerpipe.thrift.gen.ExtractorException;
import com.tomazkovacic.boilerpipe.thrift.gen.ExtractorType;
import de.l3s.boilerpipe.BoilerpipeExtractor;
import de.l3s.boilerpipe.BoilerpipeProcessingException;
import de.l3s.boilerpipe.extractors.ArticleExtractor;
import de.l3s.boilerpipe.extractors.CanolaExtractor;
import de.l3s.boilerpipe.extractors.DefaultExtractor;
import de.l3s.boilerpipe.extractors.KeepEverythingExtractor;
import de.l3s.boilerpipe.extractors.ArticleSentencesExtractor;
public class ServiceHandler
implements com.tomazkovacic.boilerpipe.thrift.gen.ExtractorService.Iface
{
private static Log LOG = LogFactory.getLog(ServiceHandler.class);
/**
* Get stack trace as a string
* */
public static String getStackTrace(Throwable e){
Writer result = new StringWriter();
PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
return result.toString();
}
/**
* Get extractor instance based on the enum selector
* */
private static BoilerpipeExtractor getExtractor(ExtractorType etype){
BoilerpipeExtractor extractor = null;
switch(etype){
case DEFAULT:
extractor = new DefaultExtractor();
break;
case ARTICLE:
extractor = new ArticleExtractor();
break;
case CANOLA:
extractor = new CanolaExtractor();
break;
case ARTICLE_SENTENCE:
extractor = new ArticleSentencesExtractor();
break;
case DEBUG:
extractor = KeepEverythingExtractor.INSTANCE;
break;
}
return extractor;
}
/**
* Extract text from bianry html data
*
* @param htmlData
* Binary html data
* @param encoding
* Encoding of html data
* @param etype
* Extractor selector
* */
public String extract_binary(ByteBuffer htmlData, String encoding,
ExtractorType etype) throws ExtractorException, TException {
if(htmlData.hasArray()){
BoilerpipeExtractor extractor = getExtractor(etype);
try {
String htmlString = new String(htmlData.array(), encoding);
return extractor.getText(htmlString);
} catch (UnsupportedEncodingException e) {
LOG.error("unsupported encoding " + encoding, e);
throw new ExtractorException(ExceptionCode.ENCODING, e.getMessage(), getStackTrace(e));
} catch (BoilerpipeProcessingException e) {
LOG.error("failed to extract text using extract_binary", e);
throw new ExtractorException(ExceptionCode.PROCESSING,
e.getMessage(),getStackTrace(e));
}
}
else{
String msg = "byte buffer not backed by an accseeible array";
LOG.error(msg);
throw new ExtractorException(ExceptionCode.GENERIC,msg, "");
}
}
/**
* Extract text from string html data
*
* @param htmlString
* Html data
* @param etype
* Extractor selector
* */
public String extract_string(String htmlString, ExtractorType etype)
throws ExtractorException, TException {
BoilerpipeExtractor extractor = getExtractor(etype);
try {
return extractor.getText(htmlString);
} catch (BoilerpipeProcessingException e) {
LOG.error("failed to extract text using extract_string", e);
throw new ExtractorException(ExceptionCode.PROCESSING,
e.getMessage(),getStackTrace(e));
}
}
/**
* Debugging utility
* */
public String ping(String input) throws TException {
LOG.debug("pong");
return "pong";
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
16cc1c31630fc0c9f62b9216cb238b5000576bc2 | 91cc93f18148ed3c19892054eb3a1a6fd1210842 | /bo/app/eu.java | b2e2504c30025d4ca982eafb25bd6e513a4344e3 | [] | no_license | zickieloox/EtsyAndroidApp | 9a2729995fb3510d020b203de5cff5df8e73bcfe | 5d9df4e7e639a6aebc10fe0dbde3b6169d074a84 | refs/heads/master | 2021-12-10T02:57:10.888170 | 2016-07-11T11:57:53 | 2016-07-11T11:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,946 | java | package bo.app;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Build.VERSION;
import com.appboy.Constants;
import com.appboy.events.FeedUpdatedEvent;
import com.appboy.models.cards.Card;
import com.etsy.android.lib.models.ResponseConstants;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
public class eu {
public static final String f412a;
public final SharedPreferences f413b;
public final Set<String> f414c;
public final Set<String> f415d;
public bv f416e;
static {
f412a = String.format("%s.%s", new Object[]{Constants.APPBOY_LOG_TAG_PREFIX, eu.class.getName()});
}
public eu(Context context, String str) {
this.f413b = context.getSharedPreferences("com.appboy.storage.feedstorageprovider" + (str == null ? StringUtils.EMPTY : "." + str), 0);
this.f414c = m273a(ev.VIEWED_CARDS);
this.f415d = m273a(ev.READ_CARDS);
Editor edit = this.f413b.edit();
edit.putString("uid", str);
edit.apply();
}
public final void m277a(String str) {
if (!this.f414c.contains(str)) {
this.f414c.add(str);
m278a(this.f414c, ev.VIEWED_CARDS);
}
}
public final FeedUpdatedEvent m276a(JSONArray jSONArray, String str, boolean z, long j) {
List arrayList;
if (jSONArray == null || jSONArray.length() == 0) {
arrayList = new ArrayList();
} else {
arrayList = cs.m129a(jSONArray, Card.class, this.f416e, this);
}
for (Card card : r1) {
if (this.f414c.contains(card.getId())) {
card.setViewed(true);
card.setIsRead(true);
}
if (this.f415d.contains(card.getId())) {
card.setIsRead(true);
}
}
return new FeedUpdatedEvent(r1, str, z, j);
}
private Set<String> m273a(ev evVar) {
String str = evVar.f420c;
String str2 = evVar.f421d;
if (VERSION.SDK_INT < 11) {
return m275b(this.f413b.getString(str2, null));
}
if (!this.f413b.contains(str2)) {
return this.f413b.getStringSet(str, new HashSet());
}
Set<String> b = m275b(this.f413b.getString(str2, null));
Editor edit = this.f413b.edit();
edit.remove(str2);
edit.apply();
m278a(b, evVar);
return b;
}
public final void m278a(Set<String> set, ev evVar) {
String str = evVar.f420c;
String str2 = evVar.f421d;
Editor edit = this.f413b.edit();
if (VERSION.SDK_INT < 11) {
if (set == null || set.isEmpty()) {
edit.remove(str2);
} else {
edit.putString(str2, fj.m350a((Collection) set, ";"));
}
} else if (set == null || set.isEmpty()) {
edit.remove(str);
} else {
edit.putStringSet(str, set);
}
edit.apply();
}
private static Set<String> m275b(String str) {
Object hashSet = new HashSet();
if (str != null) {
Collections.addAll(hashSet, str.split(";"));
}
return hashSet;
}
public static Set<String> m274a(JSONArray jSONArray) {
Set<String> hashSet = new HashSet();
if (jSONArray != null) {
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
if (jSONObject.has(ResponseConstants.ID)) {
hashSet.add(jSONObject.getString(ResponseConstants.ID));
}
}
}
return hashSet;
}
}
| [
"pink2mobydick@gmail.com"
] | pink2mobydick@gmail.com |
6c3fe935c05f248a816a1f75141a4d98ed4e3680 | bb92e5ae3b598c33a6388338a4892b981e6da620 | /src/main/java/com/ubb/projectshare/repository/CustomAuditEventRepository.java | 452a82d4e8277791ea4ecf527887cc70307d670f | [
"Apache-2.0"
] | permissive | GalfiZsolt/projectShare | 7e78eb81631173119b393f76ce863e1cd7d9bd16 | 17ac23031b20085a097c805083449fb6fedd6bda | refs/heads/master | 2020-03-15T01:31:24.220687 | 2018-05-15T17:18:18 | 2018-05-15T17:18:18 | 131,895,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,653 | java | package com.ubb.projectshare.repository;
import com.ubb.projectshare.config.Constants;
import com.ubb.projectshare.config.audit.AuditEventConverter;
import com.ubb.projectshare.domain.PersistentAuditEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* An implementation of Spring Boot's AuditEventRepository.
*/
@Repository
public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
/**
* Should be the same as in Liquibase migration.
*/
protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255;
private final PersistenceAuditEventRepository persistenceAuditEventRepository;
private final AuditEventConverter auditEventConverter;
private final Logger log = LoggerFactory.getLogger(getClass());
public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository,
AuditEventConverter auditEventConverter) {
this.persistenceAuditEventRepository = persistenceAuditEventRepository;
this.auditEventConverter = auditEventConverter;
}
@Override
public List<AuditEvent> find(Date after) {
Iterable<PersistentAuditEvent> persistentAuditEvents =
persistenceAuditEventRepository.findByAuditEventDateAfter(after.toInstant());
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
public List<AuditEvent> find(String principal, Date after) {
Iterable<PersistentAuditEvent> persistentAuditEvents;
if (principal == null && after == null) {
persistentAuditEvents = persistenceAuditEventRepository.findAll();
} else if (after == null) {
persistentAuditEvents = persistenceAuditEventRepository.findByPrincipal(principal);
} else {
persistentAuditEvents =
persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfter(principal, after.toInstant());
}
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
public List<AuditEvent> find(String principal, Date after, String type) {
Iterable<PersistentAuditEvent> persistentAuditEvents =
persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after.toInstant(), type);
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) &&
!Constants.ANONYMOUS_USER.equals(event.getPrincipal())) {
PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());
persistentAuditEvent.setAuditEventType(event.getType());
persistentAuditEvent.setAuditEventDate(event.getTimestamp().toInstant());
Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData());
persistentAuditEvent.setData(truncate(eventData));
persistenceAuditEventRepository.save(persistentAuditEvent);
}
}
/**
* Truncate event data that might exceed column length.
*/
private Map<String, String> truncate(Map<String, String> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
String value = entry.getValue();
if (value != null) {
int length = value.length();
if (length > EVENT_DATA_COLUMN_MAX_LENGTH) {
value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH);
log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.",
entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH);
}
}
results.put(entry.getKey(), value);
}
}
return results;
}
}
| [
"kinga.peleskei@msg-systems.com"
] | kinga.peleskei@msg-systems.com |
0a2fd0e3fef2e4aec13fe61d9bb6bd34086126e0 | 709b22be3cc1e8286a9579c9fb609a195a6863e6 | /app/src/main/java/sinia/com/entertainer/runtimepermissions/PermissionUtils.java | 204f1c6de5dbd2c43c9f96253a522db8c2721e62 | [] | no_license | jackvvv/Entertainer | ad908b21a8e5cd95f33732ea525c36960f0a6c5d | f27231f6b2621899733874c2e7ab583169cb8bed | refs/heads/master | 2021-01-16T02:43:03.271462 | 2017-01-20T11:08:37 | 2017-01-20T11:08:37 | 78,906,284 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,278 | java | package sinia.com.entertainer.runtimepermissions;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import static android.R.attr.permission;
/**
* Created by 忧郁的眼神 on 2017/1/16 0016.
*/
public class PermissionUtils {
/**
* 获取单个权限
*
* @param context
* @param permission 权限名
*/
public static void requestSinglePermission(Context context, String permission) {
if (ContextCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions((Activity) context, new String[]{permission}, 1);
}
}
/**
* 获取多个权限
*
* @param context
* @param permissions 权限数组
*/
public static void requestMorePermission(Context context, String[] permissions) {
for (int i = 0; i < permissions.length; i++) {
if (ContextCompat.checkSelfPermission(context, permissions[i]) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions((Activity) context, permissions, 1);
}
}
}
}
| [
"954828748@qq.com"
] | 954828748@qq.com |
e69bbbf77a85d346a1660f694b456c8e4983477e | 7fdbe21179ce0797d8cbfd63690eadc9b84c4c0f | /src/cCard/View/JDialog_AddCCAccount.java | 3eccd89f91a9c49b7e2ead9ef7c1c16b5775ff5c | [] | no_license | NaftiSlimen/FinCo | d082b93815a444db59d5ed55d3cb1bca76a8c198 | f8718e345974544380ba0dc5cc4c82c3b081c8d6 | refs/heads/main | 2023-04-04T20:17:56.065877 | 2021-04-15T22:37:29 | 2021-04-15T22:37:29 | 358,024,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,489 | java | /*
A basic implementation of the JDialog class.
*/
package cCard.View;
import java.awt.*;
import javax.swing.*;
import bank.model.Address;
import bank.model.BankAccount;
import bank.model.BankDB;
import cCard.Controller.Main;
import cCard.Model.CCDB;
import cCard.Model.Copper;
import cCard.Model.CreditCardAccount;
import cCard.Model.Gold;
import cCard.Model.Owner;
import cCard.Model.Silver;
//import bank.view.BankFrm;
public class JDialog_AddCCAccount extends javax.swing.JDialog
{
private CardFrm parentframe;
private Main main = new Main();
public JDialog_AddCCAccount(CardFrm parent)
{
super(parent);
parentframe=parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parses your Java file into its visual envirenment.
//{{ INIT_CONTROLS
setTitle("Add credit card account");
setModal(true);
getContentPane().setLayout(null);
setSize(301,373);
setVisible(false);
JRadioButton_Gold.setText("Gold");
JRadioButton_Gold.setActionCommand("Checkings");
getContentPane().add(JRadioButton_Gold);
JRadioButton_Gold.setBounds(36,12,84,24);
JRadioButton_Silver.setText("Silver");
JRadioButton_Silver.setActionCommand("Savings");
getContentPane().add(JRadioButton_Silver);
JRadioButton_Silver.setBounds(36,36,84,24);
JLabel1.setText("Name");
getContentPane().add(JLabel1);
JLabel1.setForeground(java.awt.Color.black);
JLabel1.setBounds(12,108,48,24);
JLabel2.setText("Street");
getContentPane().add(JLabel2);
JLabel2.setForeground(java.awt.Color.black);
JLabel2.setBounds(12,132,48,24);
JLabel3.setText("City");
getContentPane().add(JLabel3);
JLabel3.setForeground(java.awt.Color.black);
JLabel3.setBounds(12,156,48,24);
JLabel4.setText("State");
getContentPane().add(JLabel4);
JLabel4.setForeground(java.awt.Color.black);
JLabel4.setBounds(12,180,48,24);
JLabel5.setText("Zip");
getContentPane().add(JLabel5);
JLabel5.setForeground(java.awt.Color.black);
JLabel5.setBounds(12,204,48,24);
JLabel6.setText("CC number");
getContentPane().add(JLabel6);
JLabel6.setForeground(java.awt.Color.black);
JLabel6.setBounds(12,252,96,24);
Label7.setText("Exp. Date");
getContentPane().add(Label7);
Label7.setForeground(java.awt.Color.black);
Label7.setBounds(12,276,72,24);
getContentPane().add(JTextField_NAME);
JTextField_NAME.setBounds(84,108,156,20);
getContentPane().add(JTextField_CT);
JTextField_CT.setBounds(84,156,156,20);
getContentPane().add(JTextField_ST);
JTextField_ST.setBounds(84,180,156,20);
getContentPane().add(JTextField_STR);
JTextField_STR.setBounds(84,132,156,20);
getContentPane().add(JTextField_ZIP);
JTextField_ZIP.setBounds(84,204,156,20);
getContentPane().add(JTextField_CCNR);
JTextField_CCNR.setBounds(84,252,156,20);
getContentPane().add(JTextField_ExpDate);
JTextField_ExpDate.setBounds(84,276,156,20);
JButton_OK.setText("OK");
JButton_OK.setActionCommand("OK");
getContentPane().add(JButton_OK);
JButton_OK.setBounds(48,312,84,24);
JButton_Cancel.setText("Cancel");
JButton_Cancel.setActionCommand("Cancel");
getContentPane().add(JButton_Cancel);
JButton_Cancel.setBounds(156,312,84,24);
JRadioButton_Bronze.setText("Copper");
JRadioButton_Bronze.setActionCommand("Savings");
getContentPane().add(JRadioButton_Bronze);
JRadioButton_Bronze.setBounds(36,60,84,24);
JLabel7.setText("Email");
getContentPane().add(JLabel7);
JLabel7.setForeground(java.awt.Color.black);
JLabel7.setBounds(12,228,48,24);
getContentPane().add(JTextField_Email);
JTextField_Email.setBounds(84,228,156,20);
//}}
//{{REGISTER_LISTENERS
SymMouse aSymMouse = new SymMouse();
JRadioButton_Gold.addMouseListener(aSymMouse);
JRadioButton_Silver.addMouseListener(aSymMouse);
SymAction lSymAction = new SymAction();
JButton_OK.addActionListener(lSymAction);
JButton_Cancel.addActionListener(lSymAction);
JRadioButton_Bronze.addMouseListener(aSymMouse);
//}}
}
//{{DECLARE_CONTROLS
javax.swing.JRadioButton JRadioButton_Gold = new javax.swing.JRadioButton();
javax.swing.JRadioButton JRadioButton_Silver = new javax.swing.JRadioButton();
javax.swing.JLabel JLabel1 = new javax.swing.JLabel();
javax.swing.JLabel JLabel2 = new javax.swing.JLabel();
javax.swing.JLabel JLabel3 = new javax.swing.JLabel();
javax.swing.JLabel JLabel4 = new javax.swing.JLabel();
javax.swing.JLabel JLabel5 = new javax.swing.JLabel();
javax.swing.JLabel JLabel6 = new javax.swing.JLabel();
javax.swing.JLabel Label7 = new javax.swing.JLabel();
javax.swing.JTextField JTextField_NAME = new javax.swing.JTextField();
javax.swing.JTextField JTextField_CT = new javax.swing.JTextField();
javax.swing.JTextField JTextField_ST = new javax.swing.JTextField();
javax.swing.JTextField JTextField_STR = new javax.swing.JTextField();
javax.swing.JTextField JTextField_ZIP = new javax.swing.JTextField();
javax.swing.JTextField JTextField_CCNR = new javax.swing.JTextField();
javax.swing.JTextField JTextField_ExpDate = new javax.swing.JTextField();
javax.swing.JButton JButton_OK = new javax.swing.JButton();
javax.swing.JButton JButton_Cancel = new javax.swing.JButton();
javax.swing.JRadioButton JRadioButton_Bronze = new javax.swing.JRadioButton();
javax.swing.JLabel JLabel7 = new javax.swing.JLabel();
javax.swing.JTextField JTextField_Email = new javax.swing.JTextField();
//}}
class SymMouse extends java.awt.event.MouseAdapter
{
public void mouseClicked(java.awt.event.MouseEvent event)
{
Object object = event.getSource();
if (object == JRadioButton_Gold)
JRadioButtonChk_mouseClicked(event);
else if (object == JRadioButton_Silver)
JRadioButtonSav_mouseClicked(event);
else if (object == JRadioButton_Bronze)
JRadioButtonBronze_mouseClicked(event);
}
}
void JRadioButtonChk_mouseClicked(java.awt.event.MouseEvent event)
{
JRadioButton_Gold.setSelected(true);
JRadioButton_Silver.setSelected(false);
JRadioButton_Bronze.setSelected(false);
}
void JRadioButtonSav_mouseClicked(java.awt.event.MouseEvent event)
{
JRadioButton_Gold.setSelected(false);
JRadioButton_Silver.setSelected(true);
JRadioButton_Bronze.setSelected(false);
}
void JRadioButtonBronze_mouseClicked(java.awt.event.MouseEvent event)
{
JRadioButton_Gold.setSelected(false);
JRadioButton_Silver.setSelected(false);
JRadioButton_Bronze.setSelected(true);
}
class SymAction implements java.awt.event.ActionListener
{
public void actionPerformed(java.awt.event.ActionEvent event)
{
Object object = event.getSource();
if (object == JButton_OK)
JButtonOK_actionPerformed(event);
else if (object == JButton_Cancel)
JButtonCalcel_actionPerformed(event);
}
}
void JButtonOK_actionPerformed(java.awt.event.ActionEvent event)
{
parentframe.clientName=JTextField_NAME.getText();
parentframe.street=JTextField_STR.getText();
parentframe.city=JTextField_CT.getText();
parentframe.zip=JTextField_ZIP.getText();
parentframe.state=JTextField_ST.getText();
parentframe.ccnumber=JTextField_CCNR.getText();
parentframe.expdate=JTextField_ExpDate.getText();
Address a= new Address(parentframe.street,parentframe.zip,parentframe.city,parentframe.state);
Owner p= new Owner(parentframe.clientName,"emailAdress","dateOfbirth");
CreditCardAccount account;
if (JRadioButton_Gold.isSelected()) {
parentframe.accountType="Gold";
account=new Gold(Long.parseLong(parentframe.ccnumber), parentframe.expdate);}
else{
if (JRadioButton_Silver.isSelected()) {
parentframe.accountType="Silver";
account=new Silver(Long.parseLong(parentframe.ccnumber), parentframe.expdate);
}
else {
parentframe.accountType="Bronze";
account=new Copper(Long.parseLong(parentframe.ccnumber), parentframe.expdate);
}
}
main.addCreditCardAccount(p, account);
CCDB.print();
parentframe.newaccount=true;
dispose();
}
void JButtonCalcel_actionPerformed(java.awt.event.ActionEvent event)
{
//make this frame invisible if Cancel button is clicked
dispose();
}
} | [
"44344285+NaftiSlimen@users.noreply.github.com"
] | 44344285+NaftiSlimen@users.noreply.github.com |
20ddb608cdfe90916c0c425af1a23ac3e6b1579e | 77d070b4714f25ebc2670116051f1c0dba992f5e | /server/src/by/cd/server/Main.java | b7272fd79ca511cb305ad1c54698e962ad894447 | [] | no_license | deskach/click-dating | 381b061858271df143cad30c48432c51c11daaf1 | edc0836eeb9b98e08868dff8fe8a55869e3d40f0 | refs/heads/master | 2023-03-14T12:02:06.846467 | 2021-03-05T08:53:29 | 2021-03-05T08:53:29 | 344,114,843 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 407 | java | package by.cd.server;
import by.cd.common.Server;
import by.cd.infra.Application;
import by.cd.infra.ApplicationContext;
import by.cd.server.tcp.TCPServer;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
ApplicationContext context = Application.run("by.cd", new HashMap<>());
Server server = context.getObject(TCPServer.class);
server.start();
}
}
| [
"DzianisKachanau@ibagroup.eu"
] | DzianisKachanau@ibagroup.eu |
c244b68082f805b95784beda946fbdb194b8e3dd | f5e0704be649a6e2eb6b033d63e01ec6cb6c7359 | /XMPP/src/com/xmppclient/SingleUserChatManager.java | 0a69eae235bd46d822ff4ba84ff99e13e0d917f6 | [] | no_license | JuanParker1/Alcomat | 20ead2e3b813cbc414846403264a05c57977909f | 3474e19949df2df0c31d9430ef3b3d45a37f23db | refs/heads/master | 2023-03-16T16:01:53.365078 | 2014-04-27T11:03:19 | 2014-04-27T11:03:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 158 | java | package com.xmppclient;
public interface SingleUserChatManager {
public abstract void sendMessage(String message, String to)
throws Exception;
} | [
"abraun.dev@googlemail.com"
] | abraun.dev@googlemail.com |
b575495f08a8843d1bd92e736892986cc89f3f74 | 3d04f0fa15f15e666adcddc92053bd1d5cd839b4 | /src/main/java/com/builtbroken/discretemath/gui/UpdatedLabel.java | 1dfd2dd1f76fa5df550d327fbdfd773b610d9006 | [] | no_license | DarkGuardsman/DiscreteMathHelper | 617f842fb9b192a45f4e75b98fc3808284063f81 | 0f3514cf35539e99629b0b716a7560b591f145aa | refs/heads/master | 2020-06-09T00:47:17.952799 | 2015-09-11T05:12:59 | 2015-09-11T05:12:59 | 42,253,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 587 | java | package com.builtbroken.discretemath.gui;
import java.awt.*;
/**
* Simple label with an update method
*
* @author Darkguardsman
*/
@SuppressWarnings("serial")
public class UpdatedLabel extends Label implements IGUIUpdate
{
String start_string = "I Am a Label";
public UpdatedLabel(String start)
{
super(start);
this.start_string = start;
}
@Override
public boolean update()
{
this.setText(buildLabel());
return start_string != null;
}
/**
* Recreates then returns the label's string value
*/
public String buildLabel()
{
return start_string;
}
}
| [
"rseifert.phone@gmail.com"
] | rseifert.phone@gmail.com |
32a297da31af67bfa5ffe901fd43d35c01892e8d | cf7ea53ab43a5b153b7bd0c51fb4509bd4d8602d | /src/main/java/com/diliulian/platform/service/utils/CodeGeneratorService.java | 65b2d52fe6f78eb7649dee32482e57c1e44cbf7a | [] | no_license | boluoluo/diliulian | 172e0bc438fc302a1a721540c947640ad60c87ff | 2cc6233bc6bbb451e33d32d9a7a3ffe97dc79224 | refs/heads/master | 2021-06-27T02:08:49.015725 | 2017-09-14T15:44:51 | 2017-09-14T15:44:51 | 103,550,140 | 0 | 0 | null | 2017-09-14T15:33:58 | 2017-09-14T15:33:58 | null | UTF-8 | Java | false | false | 828 | java | package com.diliulian.platform.service.utils;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.diliulian.platform.entity.AjaxJson;
import com.diliulian.platform.entity.code.CodeColumnEntity;
import com.diliulian.platform.entity.code.CodeTableEntity;
/**
* @ClassName: CreateCodeService
* @Description:
* @author 唐亚峰
* @date 2016年10月9日
*/
public interface CodeGeneratorService
{
List<?> queryCodeForList(String tid);
CodeColumnEntity getCodeColumnByUUID(String tid,String cid);
CodeTableEntity getCodeTableByUUID(String uuid);
AjaxJson delete(String[] ids,String tid,String cid);
AjaxJson saveOrUpdate(CodeTableEntity dto);
AjaxJson saveOrUpdateColumn(String tid,CodeColumnEntity column);
void generateCode(HttpServletResponse response,String uuid) throws Exception;
}
| [
"v_feiyuanxing@baidu.com"
] | v_feiyuanxing@baidu.com |
6a89a83bd71abcbc74d40d6c63e3d3d0489cb7c8 | c930de2734bbf4a225bb4fdaa566b7507c747649 | /Hiho/src/algorithm/BinarySearch.java | 929ebbc4376db1c1de9c56bb5e1d6aa730cec88d | [] | no_license | wutongshu1993/code | bd5c062ac7a69a3b3816a3fb74b313cd7588bb7e | 5290b24a2726909a46d7544bb3de347dec7c1c45 | refs/heads/master | 2020-05-21T04:48:41.830157 | 2019-12-23T00:28:22 | 2019-12-23T00:28:22 | 44,908,330 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 583 | java | package algorithm;
/**
* 前提:有序列表
* 平均时间复杂度:log(n)
* @author huiminlu
*
*/
public class BinarySearch {
int search(int[] arr, int item) {
int low = 0;
int high = arr.length - 1;
while(low <= high && low >= 0 && high < arr.length) {
int mid = (low + high + 1) / 2;
if(arr[mid] > item) {
high = mid - 1;
}else if(arr[mid] < item) {
low = mid +1;
}else {
return mid;
}
}
return -1;
}
public static void main(String[] args) {
int[] arr = {1,3,5,7,9};
int ret = new BinarySearch().search(arr, 2);
System.out.println(ret);
}
}
| [
"hermialu@tencent.com"
] | hermialu@tencent.com |
405e4506ea69d01d8bff97266db6ee61d48ad788 | 8022fc2d63011f08d259bccdfb03e6db23fdc6c4 | /microservice-speaker/src/test/java/org/agoncal/application/conference/speaker/data/JSonToDatabase.java | 94ae231353affc50b8f3c146ab8b61105dc1aea6 | [] | no_license | hlemorvan/agoncal-application-conference | 754ca37738a8f32c0fd59035ac5cd17be026fa74 | 9d173246123c83cd51d19436c410c1ef1a1b4d17 | refs/heads/master | 2021-01-15T08:42:03.136273 | 2017-08-09T11:39:55 | 2017-08-09T11:39:55 | 99,568,606 | 0 | 0 | null | 2017-08-07T10:57:21 | 2017-08-07T10:57:21 | null | UTF-8 | Java | false | false | 6,308 | java | package org.agoncal.application.conference.speaker.data;
import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonObject;
import javax.json.JsonReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Antonio Goncalves
* http://www.antoniogoncalves.org
* --
*/
public class JSonToDatabase {
/**
* Data from http://cfp.devoxx.be/api/conferences/DV16/speakers
*
* create table sp_speaker (id varchar(255) not null, avatarUrl varchar(255), bio varchar(5000), blog varchar(255), company varchar(255), firstName varchar(255), language varchar(3), lastName varchar(255), twitter varchar(255), primary key (id))
* create table sp_speaker_sp_talk (Speaker_id varchar(255) not null, acceptedTalks_id varchar(255) not null)
* create table sp_talk (id varchar(255) not null, language varchar(255), title varchar(255), primary key (id))
*/
private static List<String> acceptedTalkCreateSQLStatements;
private static String speakerCreateSQLStatement;
private static Map<String, String> talksAlreadyExist = new HashMap<>();
public static void main(String[] args) throws IOException {
File file = Paths.get("src/test/resources/speakers.json").toFile();
JsonReader rdr = Json.createReader(new FileReader(file.getAbsoluteFile()));
JsonArray results = rdr.readArray();
for (JsonObject result : results.getValuesAs(JsonObject.class)) {
acceptedTalkCreateSQLStatements = new ArrayList<>();
speakerCreateSQLStatement = "INSERT INTO SP_Speaker (id, firstName, lastName, company, twitter, avatarUrl, language, blog, bio) values (";
speakerCreateSQLStatement += getFormattedValue(result, "uuid") + ", ";
speakerCreateSQLStatement += getFormattedValue(result, "firstName") + ", ";
speakerCreateSQLStatement += getFormattedValue(result, "lastName") + ", ";
speakerCreateSQLStatement += getFormattedValue(result, "company") + ", ";
speakerCreateSQLStatement += getFormattedValue(result, "twitter") + ", ";
speakerCreateSQLStatement += getValue(result, "avatarURL") + ", ";
JsonArray links = result.getJsonArray("links");
for (JsonObject link : links.getValuesAs(JsonObject.class)) {
getSpeaker(result.getString("uuid"), link.getString("href"));
}
speakerCreateSQLStatement += ");";
System.out.println(speakerCreateSQLStatement);
for (String acceptedTalkCreateSQLStatement : acceptedTalkCreateSQLStatements) {
System.out.println(acceptedTalkCreateSQLStatement);
}
System.out.println("");
}
}
private static void getSpeaker(String speakerUUID, String hrefSpeaker) throws IOException {
URL url = new URL(hrefSpeaker);
try (InputStream is = url.openStream(); JsonReader rdr = Json.createReader(is)) {
JsonObject result = rdr.readObject();
speakerCreateSQLStatement += getFormattedValue(result, "lang") + ", ";
speakerCreateSQLStatement += getValue(result, "blog") + ", ";
speakerCreateSQLStatement += getFormattedValue(result, "bio");
JsonArray acceptedTalks = result.getJsonArray("acceptedTalks");
for (int i = 0; i < acceptedTalks.size(); i++) {
JsonArray links = acceptedTalks.getJsonObject(i).getJsonArray("links");
for (JsonObject link : links.getValuesAs(JsonObject.class)) {
String hrefTalk = link.getString("href");
if (hrefTalk.contains("/talks"))
acceptedTalkCreateSQLStatements.addAll(getTalk(speakerUUID, hrefTalk));
}
}
}
}
private static List<String> getTalk(String speakerUUID, String hrefTalk) throws IOException {
List<String> sqlStatements = new ArrayList<>();
URL url = new URL(hrefTalk);
String acceptedTalkCreateSQLStatement;
String joinTableCreateSQLStatement;
try (InputStream is = url.openStream(); JsonReader rdr = Json.createReader(is)) {
JsonObject result = rdr.readObject();
if (!talksAlreadyExist.containsKey(result.getString("id"))) {
talksAlreadyExist.put(result.getString("id"), "exists");
acceptedTalkCreateSQLStatement = "INSERT INTO SP_Talk (id, title, language) values (";
acceptedTalkCreateSQLStatement += "'" + result.getString("id") + "', ";
acceptedTalkCreateSQLStatement += getFormattedValue(result, "title") + ", ";
acceptedTalkCreateSQLStatement += getFormattedValue(result, "lang");
acceptedTalkCreateSQLStatement += ");";
sqlStatements.add(acceptedTalkCreateSQLStatement);
}
joinTableCreateSQLStatement = "INSERT INTO SP_Speaker_SP_Talk (Speaker_id, acceptedTalks_id) values (";
joinTableCreateSQLStatement += "'" + speakerUUID + "', ";
joinTableCreateSQLStatement += "'" + result.getString("id") + "', ";
joinTableCreateSQLStatement += ");";
}
sqlStatements.add(joinTableCreateSQLStatement);
return sqlStatements;
}
private static String getFormattedValue(JsonObject jsonObject, String key) {
try {
String value = jsonObject.getString(key);
if (value == null) {
return "null";
} else {
return "'" + value.replaceAll("[\\t\\r\\n\\-\\+\\.\\^:,'“”]", " ").trim() + "'";
}
} catch (Exception e) {
return "null";
}
}
private static String getValue(JsonObject jsonObject, String key) {
try {
String value = jsonObject.getString(key);
if (value == null) {
return "null";
} else {
return "'" + value.trim() + "'";
}
} catch (Exception e) {
return "null";
}
}
}
| [
"antonio.goncalves@gmail.com"
] | antonio.goncalves@gmail.com |
9dd33d73e2460c17fbc6a20f0291bac4ea0f9f69 | 49251bac7e32b1f0ded46ceb6373968cb2a7f958 | /01.IntroToJava/src/IntroToJava/P10ModifyABit.java | bf8444d451c6cdfd88129d3a992e708fc516ac53 | [] | no_license | CarlitoBG/JavaAdvanced | 70de8a783f57819ae8bc5c29501288250c16524b | 851cb61524a9b31eda9917139bb5d8198e63524b | refs/heads/master | 2020-03-10T17:52:31.405707 | 2018-04-14T11:39:04 | 2018-04-14T11:39:04 | 129,510,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | package IntroToJava;
import java.util.Scanner;
public class P10ModifyABit {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int number = scanner.nextInt();
int position = scanner.nextInt();
int value = scanner.nextInt();
int mask = (1 << position);
int result;
if (value == 0) {
result = number & ~mask;
}
else {
result = number | mask;
}
System.out.println(result);
}
} | [
"dimitrov.dians@gmail.com"
] | dimitrov.dians@gmail.com |
c049dd9844fbd2925cadfcfd17bb265a35d448cc | e1b621f7b9aac82f36e7a868f3c60f0883db07a7 | /src/main/java/com/rs/algorithm/TB_L1_MIN.java | 6d93db9d9e4f28687ee4c813691fe67683f4bd84 | [] | no_license | IronLung7/ReputationSystem | 9797b7a2716968b79ec948c8d4dc270d398fa0ee | 7b9471384a77859e8711d0ca1f8a5f19e986ecec | refs/heads/master | 2016-09-10T13:59:23.978801 | 2015-12-20T14:28:49 | 2015-12-20T14:28:49 | 32,155,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,573 | java | package com.rs.algorithm;
import com.rs.data.entity.*;
import com.rs.data.repository.Repository;
import java.util.List;
/**
* Created by leo on 15/3/27.
*/
public class TB_L1_MIN implements BasicAlgorithm {
@Override
public void estimatedScoreCalculation() {
}
@Override
public void userReputationCalculation(List<User> allUsers, Float lamda) {
float reputation = 1f;
for (User user : allUsers) {
List<UserTopic> userTopics = Repository.userTopicRepository.findByUser(user);
List<Rating> ratings = Repository.ratingRepository.findByUser(user);
for (UserTopic userTopic : userTopics) {
Topic topic = userTopic.getTopic();
float min = 100f;
for (Rating rating : ratings) {
List<ItemTopic> itemTopics = Repository.itemTopicRepository.findByItemAndTopic(rating.getItem(), topic);
if (itemTopics.size() != 0) {
if (itemTopics.get(0).getLevel() * Math.abs(rating.getScore() - rating.getItem().getE_score()) < min) {
min = itemTopics.get(0).getLevel() * Math.abs(rating.getScore() - rating.getItem().getE_score());
}
}
}
if(min != 100f)
reputation = 1 - lamda * min;
if(reputation<=0) reputation=0;
userTopic.setReputation(reputation);
Repository.userTopicRepository.save(userTopic);
}
}
}
}
| [
"leo@192.168.18.101"
] | leo@192.168.18.101 |
6a4bb05c4870a576ecfc9cb569608b0fc92f85b0 | c8eb512a4b7d363179c2238fcfd03155ed93033b | /redback/tags/redback-1.2-beta-1/redback-integrations/redback-xwork/redback-xwork-integration/src/main/java/org/codehaus/plexus/redback/xwork/action/LogoutAction.java | 625bc58b4b1faef6083302f6bbb2b87773622b0f | [
"Apache-2.0"
] | permissive | codehaus/redback | 8600e04ee00835bc382b2e67fbf5fc99a1b094a2 | 50337e936e0bb7dae502dd302dd40a1afa7e56cf | refs/heads/master | 2023-07-20T01:31:45.917891 | 2014-03-30T00:37:48 | 2014-03-30T00:37:48 | 36,526,388 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,622 | java | package org.codehaus.plexus.redback.xwork.action;
/*
* Copyright 2005-2006 The Codehaus.
*
* 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 org.codehaus.plexus.ehcache.EhcacheComponent;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.codehaus.redback.integration.util.AutoLoginCookies;
import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.webwork.dispatcher.SessionMap;
/**
* LogoutAction
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action"
* role-hint="redback-logout"
* instantiation-strategy="per-lookup"
*/
public class LogoutAction
extends AbstractSecurityAction
{
// Result Names.
private static final String LOGOUT = "security-logout";
/**
* cache used for user assignments
*
* @plexus.requirement role-hint="userAssignments"
*/
private EhcacheComponent userAssignmentsCache;
/**
* cache used for user permissions
*
* @plexus.requirement role-hint="userPermissions"
*/
private EhcacheComponent userPermissionsCache;
/**
* Cache used for users
*
* @plexus.requirement role-hint="users"
*/
private EhcacheComponent usersCache;
/**
* @plexus.requirement
*/
private AutoLoginCookies autologinCookies;
public String logout()
{
if ( getSecuritySession() != null )
{
// [PLXREDBACK-65] this is a bit of a hack around the cached managers since they don't have the ability to
// purge their caches through the API. Instead try and bring them in here and invalidate
// the keys directly. This will not be required once we move to a different model for pre-calculated
// permission sets since that will not have the overhead that required these caches in the first place.
Object principal = (String)getSecuritySession().getUser().getPrincipal();
if ( userAssignmentsCache != null )
{
userAssignmentsCache.invalidateKey( principal );
}
if ( userPermissionsCache != null )
{
userPermissionsCache.invalidateKey( principal );
}
if ( usersCache != null )
{
usersCache.invalidateKey( principal );
}
}
autologinCookies.removeRememberMeCookie( ServletActionContext.getResponse(), ServletActionContext.getRequest() );
autologinCookies.removeSignonCookie( ServletActionContext.getResponse(), ServletActionContext.getRequest() );
setAuthTokens( null );
if ( session != null )
{
( (SessionMap) session ).invalidate();
}
return LOGOUT;
}
public SecureActionBundle initSecureActionBundle()
throws SecureActionException
{
return SecureActionBundle.OPEN;
}
}
| [
"james.w.dumay@43fd8114-9539-0410-879e-ecb684c985cd"
] | james.w.dumay@43fd8114-9539-0410-879e-ecb684c985cd |
79bfecb3ef816e5b72bda7f6ac87ea59df57bedc | 0c452901bc9eb53bc1f6661d8eb44cfb0eb71ada | /hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/valuesets/PaymentStatusEnumFactory.java | ebc57f9147c093a3e9f8ea9da2595db1d4649b0b | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | sac10nikam/hapi-fhir | 08d5dd9ef74b846c795965dc10450a5833199b3d | 78776a3e79f319ec28111d679068d9208ee585d7 | refs/heads/master | 2021-01-16T22:59:19.067021 | 2015-08-10T19:59:57 | 2015-08-10T19:59:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,430 | java | package org.hl7.fhir.instance.model.valuesets;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 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 HOLDER 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.
*/
// Generated on Fri, Aug 7, 2015 06:45-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.EnumFactory;
public class PaymentStatusEnumFactory implements EnumFactory<PaymentStatus> {
public PaymentStatus fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("paid".equals(codeString))
return PaymentStatus.PAID;
if ("cleared".equals(codeString))
return PaymentStatus.CLEARED;
throw new IllegalArgumentException("Unknown PaymentStatus code '"+codeString+"'");
}
public String toCode(PaymentStatus code) {
if (code == PaymentStatus.PAID)
return "paid";
if (code == PaymentStatus.CLEARED)
return "cleared";
return "?";
}
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
6d2cddddd9eedc976c9fd261742014e77cf8da20 | 145249ce2dfa257a723b7fbb8cde89ef3f121f38 | /src/contribs/com/centerkey/utils/BareBonesBrowserLaunch.java | f4b32a8d7394a8968eacdd2fb933be0cde1dcedc | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | OneboxTM/jets3t | 4ce90a03b6ba038b4d9d00a196ab602ed6fcbd4c | ea74d0f4ccdace671a4f5a915bfa8244ded1268d | refs/heads/master | 2021-08-29T14:03:57.122067 | 2019-07-11T08:07:43 | 2019-07-11T08:07:43 | 145,717,982 | 0 | 0 | Apache-2.0 | 2021-08-13T15:33:22 | 2018-08-22T14:08:20 | Java | UTF-8 | Java | false | false | 2,829 | java | //package com.centerkey.utils;
package contribs.com.centerkey.utils;
import javax.swing.JOptionPane;
import java.util.Arrays;
/**
* <b>Bare Bones Browser Launch for Java</b><br>
* Utility class to open a web page from a Swing application
* in the user's default browser.<br>
* Supports: Mac OS X, GNU/Linux, Unix, Windows XP/Vista/7<br>
* Example Usage:<code><br>
* String url = "http://www.google.com/";<br>
* BareBonesBrowserLaunch.openURL(url);<br></code>
* Latest Version: <a href="http://www.centerkey.com/java/browser/">www.centerkey.com/java/browser</a><br>
* Author: Dem Pilafian<br>
* Public Domain Software -- Free to Use as You Like
* @version 3.1, June 6, 2010
*/
public class BareBonesBrowserLaunch {
static final String[] browsers = { "google-chrome", "firefox", "opera",
"epiphany", "konqueror", "conkeror", "midori", "kazehakase", "mozilla" };
static final String errMsg = "Error attempting to launch web browser";
/**
* Opens the specified web page in the user's default browser
* @param url A web address (URL) of a web page (ex: "http://www.google.com/")
*/
public static void openURL(String url) {
try { //attempt to use Desktop library from JDK 1.6+
Class<?> d = Class.forName("java.awt.Desktop");
d.getDeclaredMethod("browse", new Class[] {java.net.URI.class}).invoke(
d.getDeclaredMethod("getDesktop").invoke(null),
new Object[] {java.net.URI.create(url)});
//above code mimicks: java.awt.Desktop.getDesktop().browse()
}
catch (Exception ignore) { //library not available or failed
String osName = System.getProperty("os.name");
try {
if (osName.startsWith("Mac OS")) {
Class.forName("com.apple.eio.FileManager").getDeclaredMethod(
"openURL", new Class[] {String.class}).invoke(null,
new Object[] {url});
}
else if (osName.startsWith("Windows")) {
Runtime.getRuntime().exec(
"rundll32 url.dll,FileProtocolHandler " + url);
} else { //assume Unix or Linux
String browser = null;
for (String b : browsers) {
if (browser == null && Runtime.getRuntime().exec(new String[]
{"which", b}).getInputStream().read() != -1) {
Runtime.getRuntime().exec(new String[] {browser = b, url});
}
}
if (browser == null) {
throw new Exception(Arrays.toString(browsers));
}
}
}
catch (Exception e) {
JOptionPane.showMessageDialog(null, errMsg + "\n" + e.toString());
}
}
}
}
| [
"mmolinero@oneboxtm.com"
] | mmolinero@oneboxtm.com |
8dcf45ec6abecf91c1fa44843201546a19119a02 | 177ae9c3e5733a563e8ed74f7e24ca5305d6be92 | /app/src/test/java/com/inrotation/andrew/inrotation/SongTestSuite.java | 3b11e6802ecf42865a7b0f3abf4fa0b938291f77 | [] | no_license | cpe305/In-Rotation-Android-App | 0798603b4bd2fb0a509682d6966aa002efc8b551 | db2cee54d50c3a44d48c6e0a7585256b1d8b07c3 | refs/heads/master | 2021-06-11T18:50:11.485142 | 2016-12-08T20:39:56 | 2016-12-08T20:39:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 771 | java | package com.inrotation.andrew.inrotation;
import com.inrotation.andrew.inrotation.model.Song;
import org.junit.Test;
import java.util.ArrayList;
import static org.junit.Assert.*;
public class SongTestSuite {
@Test
public void testSong() throws Exception {
ArrayList<String> albumcovers = new ArrayList<>();
albumcovers.add("url1");
albumcovers.add("url2");
albumcovers.add("url3");
Song newSong = new Song("Blessings", "Chance The Rapper", "Coloring Book", 3000, albumcovers, "songURI", true);
assertEquals(newSong.songName, "Blessings");
assertEquals(newSong.artists, "Chance The Rapper");
assertEquals(newSong.album, "Coloring Book");
assertEquals(newSong.duration, 3000);
}
} | [
"andrewcofano@gmail.com"
] | andrewcofano@gmail.com |
b7fee18c3e1046a07c433b52b327a9daae2e2b1e | 1b81af763f2161078cc450a977a0101a53f4a218 | /CRM/src/java/myconnection/Connect.java | 71b2448d604e52e4b3c7a0cf541f533d6d65171a | [] | no_license | Samarthya-Gupta/sam_repo | d8a986b369b46d1a3384cbc952247caac0e15709 | 19394383f2ea9c91e0ca78790ecc9677f1b9503d | refs/heads/master | 2020-12-12T05:43:49.108823 | 2020-01-21T14:43:15 | 2020-01-21T14:43:15 | 234,055,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myconnection;
import java.sql.*;
/**
*
* @author Rohit Pachouli
*/
public class Connect
{
Connection con=null;
public Connection setCon()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/crm","root","root");
}
catch(Exception e)
{
System.out.println("My connection page has error occuerd"+e);
}
return con;
}
}
| [
"samarthya2409.com"
] | samarthya2409.com |
f1e3f4e312b1c9562dea8a7c72650c4b3922dd39 | 9b1a9d887d35cf4d604f1c23a9a3bd8b53114253 | /app/src/main/java/my/myusri/kompas/SimpleCompassStrategy.java | a65afa230dacd183507e03757c4bb24927fdc492 | [
"MIT"
] | permissive | myusri/Kompas | 9b7d6c1c54541e1cf691069dbe9550542297329a | 5e0754a5cf49d0375b28989988ef726dc33953ad | refs/heads/master | 2020-05-23T18:53:05.596240 | 2017-06-01T02:30:41 | 2017-06-01T02:30:41 | 84,780,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,264 | java | package my.myusri.kompas;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorManager;
/**
* Simple compass implementation that makes use of magnetic sensor only.
* Magnetic inclination not compensated.
*/
class SimpleCompassStrategy extends CompassStrategy {
private float lastVal[];
SimpleCompassStrategy(SensorManager manager, Listener listener) {
super(
manager,
manager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
listener);
valid = sensor != null;
lastVal = new float[3];
reset();
}
@Override
void reset() {
lastVal[0] = lastVal[1] = lastVal[2] = Float.NaN;
}
@Override
public void onSensorChanged(SensorEvent ev) {
if (listener == null || ev.sensor.getType() != Sensor.TYPE_MAGNETIC_FIELD)
return;
if (Float.isNaN(lastVal[0]))
System.arraycopy(ev.values, 0, lastVal, 0, 3);
final float mx = (float) filter(ev.values[0], lastVal[0]);
final float my = (float) filter(ev.values[1], lastVal[1]);
final float mz = (float) filter(ev.values[2], lastVal[2]);
float deg = (float)Math.toDegrees(Math.atan2(mx, my));
lastVal[0] = mx; lastVal[1] = my; lastVal[2] = mz;
listener.newData(deg, mx, my, mz);
}
}
| [
"myusri@gmail.com"
] | myusri@gmail.com |
cef7c0970bb7e415532738b0237b2de954589f85 | f2c2ddfbe9ddfb1fa52d6a11f2b98619269cfe7c | /src/lesson6/Example1.java | 1087bf30e1df424c1a22090221e07f36e2add23a | [] | no_license | maxdiland/QAAutomationCourseExamples | 7cae55e6e9fa28650e1e1089ccdebb4189a36eb8 | f8b565ef0a3c76664bec0c4014f6617fdb6efb45 | refs/heads/master | 2021-01-19T12:31:17.027043 | 2015-04-03T19:03:57 | 2015-04-03T19:03:57 | 32,185,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,285 | java | package lesson6;
import entities.Box;
import entities.BoxWithColor;
import entities.BoxWithMusic;
import entities.Music;
/**
* author Maksim Diland
*/
public class Example1 {
public static void main(String[] args) {
Object box = new BoxWithColor(10,10,10,100, "blue");
System.out.println( box.toString() );
}
}
class Example2 {
public static void main(String[] args) {
Object box = new BoxWithColor(10,10,10,100, "blue");
Object box1 = new BoxWithColor(10,10,10,100, "blue");
System.out.println( box == box1 );
}
}
class Example3 {
public static void main(String[] args) {
Object box = new BoxWithColor(10,10,10,100, "blue");
Object box1 = box;
System.out.println( box == box1 );
}
}
class Example4 {
public static void main(String[] args) {
Box box = new BoxWithColor(10,10,10,100, "blue");
Box box1 = box;
box1.setWeight(2);
System.out.println( box.getWeight() );
}
}
class Example5 {
public static void main(String[] args) {
int a = 5;
int b = a;
b++;
System.out.println( a );
System.out.println( b );
}
}
class Example6 {
public static void main(String[] args) {
BoxWithColor box = new BoxWithColor(10,10,10,100, "blue");
BoxWithColor box1 = new BoxWithColor(10,10,10,100, "blue");
System.out.println( box.equals( box1 ) );
}
}
class Example7 {
public static void main(String[] args) {
BoxWithColor box = new BoxWithColor(10,10,10,100, "blue");
System.out.println(box.hashCode());
System.out.println(box.hashCode());
}
}
class Example8 {
public static void main(String[] args) {
BoxWithColor box = new BoxWithColor(1,10,100,100, "blue");
BoxWithColor box1 = new BoxWithColor(10,10,10,100, "blue");
System.out.println(box.hashCode());
System.out.println(box1.hashCode());
}
}
class Example9 {
public static void main(String[] args) throws CloneNotSupportedException {
BoxWithColor box = new BoxWithColor(1,10,100,100, "blue");
Box box1 = (Box) box.clone();
System.out.println(box == box1);
System.out.println(box.equals(box1));
}
}
class Example10 {
public static void main(String[] args) {
final int number = 10;
// number++;
System.out.println( number );
}
}
class Example11 {
public static void main(String[] args) {
final int number;
number = 10;
System.out.println( number );
}
}
class Example12 {
public static void main(String[] args) {
final Object object;
object = new Object();
}
}
class Example13 {
public static void main(String[] args) {
final int[] numbers = {1,5};
numbers[0] = 14;
// numbers = new int[0];
}
}
class Example14 {
public static void main(String[] args) throws CloneNotSupportedException {
BoxWithMusic boxWithMusic = new BoxWithMusic(10, 10, 10, 100, new Music("ABC", "Hello"));
BoxWithMusic boxWithMusic1 = (BoxWithMusic) boxWithMusic.clone();
boxWithMusic1.getMusic().setAuthor("DEF");
System.out.println( boxWithMusic.getMusic() );
}
}
| [
"maxdiland@gmail.com"
] | maxdiland@gmail.com |
5671aa40b554c7ea1b1fb3c8e44a1837d6b15577 | c6bd2998d873c2b755eef40dc9ef982bb0f26c57 | /platforms/android/app/src/main/java/com/alibaba/weex/WXPageActivity.java | 9b454c8c7afaa6e0b5c5bf42067cef1b01c93db5 | [
"Apache-2.0"
] | permissive | matisha001/weex-demo | a5200c9677e9d70e4b85cec6461f2b5be7a0d8d2 | 3198abc345b992d57c23a2c04aa3ae3f26b3be7f | refs/heads/master | 2021-06-16T23:24:02.422090 | 2017-01-26T04:54:11 | 2017-01-26T04:54:11 | 80,082,959 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,189 | java | package com.alibaba.weex;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.alibaba.weex.commons.AbsWeexActivity;
import com.alibaba.weex.constants.Constants;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.WXRenderErrorCode;
import com.taobao.weex.WXSDKEngine;
import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.ui.component.NestedContainer;
import com.taobao.weex.utils.WXSoInstallMgrSdk;
import java.util.HashMap;
public class WXPageActivity extends AbsWeexActivity implements
WXSDKInstance.NestedInstanceInterceptor {
private static final String TAG = "WXPageActivity";
public static Activity wxPageActivityInstance;
private ProgressBar mProgressBar;
private TextView mTipView;
private HashMap mConfigMap = new HashMap<String, Object>();
public static Activity getCurrentWxPageActivity() {
return wxPageActivityInstance;
}
public static void setCurrentWxPageActivity(Activity activity) {
wxPageActivityInstance = activity;
}
@Override
public void onCreateNestInstance(WXSDKInstance instance, NestedContainer container) {
Log.d(TAG, "Nested Instance created.");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wxpage);
setCurrentWxPageActivity(this);
// mUri = Uri.parse(Constants.TEST_BUNDLE_URL + Constants.WEEX_SAMPLES_KEY);
Uri uri = getIntent().getData();
Bundle bundle = getIntent().getExtras();
if (uri == null && bundle == null) {
mUri = Uri.parse(getTestUrl(Constants.TEST_BUNDLE_URL));
}
if (uri != null) {
mUri = uri;
}
if (bundle != null) {
String bundleUrl = bundle.getString(Constants.PARAM_BUNDLE_URL);
if (bundleUrl != null) {
mUri = Uri.parse(getTestUrl(bundleUrl));
mConfigMap.put(Constants.PARAM_BUNDLE_URL, mUri.toString());
}
}
if (uri == null && bundle == null) {
mUri = Uri.parse(getTestUrl(Constants.TEST_BUNDLE_URL));
}
if (bundle != null) {
String bundleUrl = bundle.getString(Constants.PARAM_BUNDLE_URL);
if (bundleUrl != null) {
mConfigMap.put(Constants.PARAM_BUNDLE_URL, getTestUrl(bundleUrl));
mUri = Uri.parse(getTestUrl(bundleUrl));
}
} else {
mConfigMap.put(Constants.PARAM_BUNDLE_URL, getTestUrl(mUri.toString()));
// mUri = Uri.parse(mUri.toString() + Constants.WEEX_SAMPLES_KEY)
}
if (mUri == null) {
Toast.makeText(this, "the uri is empty!", Toast.LENGTH_SHORT).show();
finish();
return;
}
Log.e("TestScript_Guide mUri==", mUri.toString());
initUIAndData();
if (!WXSoInstallMgrSdk.isCPUSupport()) {
mProgressBar.setVisibility(View.INVISIBLE);
mTipView.setText(R.string.cpu_not_support_tip);
return;
}
loadUrl(getUrl(mUri));
}
private String getTestUrl(String url) {
return url + Constants.WEEX_SAMPLES_KEY;
}
private String getUrl(Uri uri) {
String url = uri.toString();
String scheme = uri.getScheme();
if (uri.isHierarchical()) {
if (TextUtils.equals(scheme, "http") || TextUtils.equals(scheme, "https")) {
String weexTpl = uri.getQueryParameter(Constants.WEEX_TPL_KEY);
if (!TextUtils.isEmpty(weexTpl)) {
url = weexTpl;
}
}
}
return url;
}
private void initUIAndData() {
mContainer = (ViewGroup) findViewById(R.id.container);
mProgressBar = (ProgressBar) findViewById(R.id.progress);
mTipView = (TextView) findViewById(R.id.index_tip);
isLocalUrl = getIntent().getBooleanExtra("isLocal", false);
}
protected void preRenderPage() {
mProgressBar.setVisibility(View.VISIBLE);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
Intent intent = new Intent("requestPermission");
intent.putExtra("REQUEST_PERMISSION_CODE", requestCode);
intent.putExtra("permissions", permissions);
intent.putExtra("grantResults", grantResults);
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
}
@Override
public void onRenderSuccess(WXSDKInstance instance, int width, int height) {
mProgressBar.setVisibility(View.GONE);
mTipView.setVisibility(View.GONE);
}
@Override
public void onException(WXSDKInstance instance, String errCode, String msg) {
mProgressBar.setVisibility(View.GONE);
mTipView.setVisibility(View.VISIBLE);
if (TextUtils.equals(errCode, WXRenderErrorCode.WX_NETWORK_ERROR)) {
mTipView.setText(R.string.index_tip);
} else {
mTipView.setText("render error:" + errCode);
}
// if (!TextUtils.isEmpty(errCode) && errCode.contains("|")) {
// String[] errCodeList = errCode.split("\\|");
// String code = errCodeList[1];
// String codeType = errCode.substring(0, errCode.indexOf("|"));
//
// if (TextUtils.equals("1", codeType)) {
// String errMsg = "codeType:" + codeType + "\n" + " errCode:" + code + "\n" + " ErrorInfo:" + msg;
// degradeAlert(errMsg);
// return;
// } else {
// Toast.makeText(getApplicationContext(), "errCode:" + errCode + " Render ERROR:" + msg, Toast.LENGTH_SHORT).show();
// }
// }
}
private void degradeAlert(String errMsg) {
new AlertDialog.Builder(this)
.setTitle("Downgrade success")
.setMessage(errMsg)
.setPositiveButton("OK", null)
.show();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(isLocalPage() ? R.menu.main_scan : R.menu.main, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_refresh:
createWeexInstance();
renderPage();
break;
case R.id.action_scan:
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
integrator.setPrompt("Scan a barcode");
//integrator.setCameraId(0); // Use a specific camera of the device
integrator.setBeepEnabled(true);
integrator.setOrientationLocked(false);
integrator.setBarcodeImageEnabled(true);
integrator.setPrompt(getString(R.string.capture_qrcode_prompt));
integrator.initiateScan();
//scanQrCode();
break;
case android.R.id.home:
finish();
default:
break;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
if(result != null) {
if(result.getContents() == null) {
Toast.makeText(this, "Cancelled", Toast.LENGTH_LONG).show();
} else {
handleDecodeInternally(result.getContents());
}
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}
// Put up our own UI for how to handle the decoded contents.
private void handleDecodeInternally(String code) {
if (!TextUtils.isEmpty(code)) {
Uri uri = Uri.parse(code);
if (uri.getQueryParameterNames().contains("bundle")) {
WXEnvironment.sDynamicMode = uri.getBooleanQueryParameter("debug", false);
WXEnvironment.sDynamicUrl = uri.getQueryParameter("bundle");
String tip = WXEnvironment.sDynamicMode ? "Has switched to Dynamic Mode" : "Has switched to Normal Mode";
Toast.makeText(this, tip, Toast.LENGTH_SHORT).show();
finish();
return;
} else if (uri.getQueryParameterNames().contains("_wx_devtool")) {
WXEnvironment.sRemoteDebugProxyUrl = uri.getQueryParameter("_wx_devtool");
WXSDKEngine.reload();
Toast.makeText(this, "devtool", Toast.LENGTH_SHORT).show();
return;
}else if (code.contains("_wx_debug")) {
uri = Uri.parse(code);
String debug_url = uri.getQueryParameter("_wx_debug");
WXSDKEngine.switchDebugModel(true, debug_url);
finish();
} else {
Toast.makeText(this, code, Toast.LENGTH_SHORT)
.show();
Intent intent = new Intent(Constants.ACTION_OPEN_URL);
intent.setPackage(getPackageName());
intent.setData(Uri.parse(code));
startActivity(intent);
}
}
}
}
| [
"matisha001@sina.com"
] | matisha001@sina.com |
b57f5547bc77beb8780e058d4b593dde6e22a661 | ea3970f7bbdb1b5af3c3f12b71824861a30cd073 | /ChapterAlgorithm/src/algorithm/leetcode/algorithm/NO56_MergeIntervals.java | 4507ab2026eaa53c5fc15d2ad18602a5758767d8 | [] | no_license | kunkunthree/AlgorithmExercises | 969650173f4c9c205b25dec467dfc26332cddd3e | 3cc193c48127cbb8a74a43919aa4289db7d5c1fd | refs/heads/master | 2020-05-21T01:48:26.619472 | 2017-09-06T10:52:23 | 2017-09-06T10:52:23 | 84,553,290 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,293 | java | package algorithm.leetcode.algorithm;
/*
* medium
* NO56_MergeIntervals
* Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
similar problems:
57. Insert Interval
495. Teemo Attacking
*/
import java.util.*;
public class NO56_MergeIntervals {
public static void main(String[] args) {
Comparator<Interval> cmp = new Comparator<Interval>() {
@Override
public int compare(Interval o1, Interval o2) {
return o1.start-o2.start;
}
};
}
//方法1:
//先对start排序,然后再一一合并重叠的区域
public List<Interval> merge(List<Interval> intervals) {
List<Interval> list = new ArrayList<Interval>();
if(intervals == null || intervals.size() == 0){
return list;
}
Comparator<Interval> cmp = new Comparator<Interval>() {
@Override
public int compare(Interval o1, Interval o2) {
return o1.start-o2.start;
}
};
Collections.sort(intervals,cmp);
int start = intervals.get(0).start,end = intervals.get(0).end;
for(int i = 0 ; i < intervals.size() ; i++){
Interval tmpI = intervals.get(i);
if(end < tmpI.start){
list.add(new Interval(start,end));
start = tmpI.start;
end = tmpI.end;
}else{
end = Math.max(end,tmpI.end);
}
}
list.add(new Interval(start,end));
return list;
}
//方法2:
//分别对start和end排序,如果是区域尾部的话,start[i]<=end[i],start[i+1]>end[i]
public List<Interval> merge2(List<Interval> intervals) {
// sort start&end
int n = intervals.size();
int[] starts = new int[n];
int[] ends = new int[n];
for (int i = 0; i < n; i++) {
starts[i] = intervals.get(i).start;
ends[i] = intervals.get(i).end;
}
Arrays.sort(starts);
Arrays.sort(ends);
// loop through
List<Interval> res = new ArrayList<Interval>();
for (int i = 0, j = 0; i < n; i++) { // j is start of interval.
if (i == n - 1 || starts[i + 1] > ends[i]) {
res.add(new Interval(starts[j], ends[i]));
j = i + 1;
}
}
return res;
}
}
| [
"522905534@qq.com"
] | 522905534@qq.com |
4263ee17aed2090054c75a1cce1bfd32a351d5c7 | 547568fd70d9e25b59ec1b2f7db3d188b721981b | /core/src/main/java/ch/epfl/data/plan_runner/query_plans/debug/ThetaTPCH8_9_P_LPlan.java | 52de357312c0830158ea7538662bf747ba8fd4c8 | [
"Apache-2.0"
] | permissive | qzjqzjqzj/squall | 67b0dd34a1365411f38d9f4b950d31ab8578a2ef | c6bdda108b6da65a7e8f0af9f6ca95f187d9bab2 | refs/heads/master | 2020-04-08T01:22:46.036940 | 2015-03-22T20:38:40 | 2015-03-22T20:38:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,048 | java | package ch.epfl.data.plan_runner.query_plans.debug;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import ch.epfl.data.plan_runner.components.Component;
import ch.epfl.data.plan_runner.components.DataSourceComponent;
import ch.epfl.data.plan_runner.components.theta.ThetaJoinComponentFactory;
import ch.epfl.data.plan_runner.conversion.IntegerConversion;
import ch.epfl.data.plan_runner.conversion.StringConversion;
import ch.epfl.data.plan_runner.expressions.ColumnReference;
import ch.epfl.data.plan_runner.operators.ProjectOperator;
import ch.epfl.data.plan_runner.predicates.ComparisonPredicate;
import ch.epfl.data.plan_runner.query_plans.QueryBuilder;
import ch.epfl.data.plan_runner.query_plans.theta.ThetaQueryPlansParameters;
public class ThetaTPCH8_9_P_LPlan {
private static Logger LOG = Logger.getLogger(ThetaTPCH8_9_P_LPlan.class);
private static final StringConversion _sc = new StringConversion();
private static final IntegerConversion _ic = new IntegerConversion();
private QueryBuilder _queryBuilder = new QueryBuilder();
public ThetaTPCH8_9_P_LPlan(String dataPath, String extension, Map conf) {
int Theta_JoinType = ThetaQueryPlansParameters.getThetaJoinType(conf);
// -------------------------------------------------------------------------------------
List<Integer> hashPart = Arrays.asList(0);
ProjectOperator projectionPart = new ProjectOperator(new int[] { 0 });
DataSourceComponent relationPart = new DataSourceComponent("PART",
dataPath + "part" + extension).setOutputPartKey(hashPart).add(
projectionPart);
_queryBuilder.add(relationPart);
// -------------------------------------------------------------------------------------
List<Integer> hashLineitem = Arrays.asList(1);
ProjectOperator projectionLineitem = new ProjectOperator(new int[] { 0,
1, 2, 4, 5, 6 });
DataSourceComponent relationLineitem = new DataSourceComponent(
"LINEITEM", dataPath + "lineitem" + extension)
.setOutputPartKey(hashLineitem).add(projectionLineitem);
_queryBuilder.add(relationLineitem);
// -------------------------------------------------------------------------------------
// TODO
ColumnReference colP = new ColumnReference(_ic, 0);
ColumnReference colL = new ColumnReference(_ic, 1);
ComparisonPredicate P_L_comp = new ComparisonPredicate(
ComparisonPredicate.EQUAL_OP, colP, colL);
// AggregateCountOperator agg= new AggregateCountOperator(conf);
Component P_Ljoin = ThetaJoinComponentFactory
.createThetaJoinOperator(Theta_JoinType, relationPart,
relationLineitem, _queryBuilder)
.setOutputPartKey(Arrays.asList(0, 2))
.setJoinPredicate(P_L_comp)
.add(new ProjectOperator(new int[] { 0, 1, 3, 4, 5, 6 }))
.setContentSensitiveThetaJoinWrapper(_ic)
// .addOperator(agg)
;
P_Ljoin.setPrintOut(false);
// -------------------------------------------------------------------------------------
}
public QueryBuilder getQueryPlan() {
return _queryBuilder;
}
}
| [
"mohammed.elsaidy@epfl.ch"
] | mohammed.elsaidy@epfl.ch |
9a0c32f9b53284a5bb81b37bd2ba1bc40176b438 | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/android/support/v4/provider/FontRequest.java | 4fa1074c60302a6b3f5cc9b5910a9f835dacdf59 | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,663 | java | package android.support.v4.provider;
import android.support.v4.util.Preconditions;
import android.util.Base64;
import com.raizlabs.android.dbflow.sql.language.Operator.Operation;
import java.util.List;
public final class FontRequest {
private final List<List<byte[]>> mCertificates;
private final int mCertificatesArray;
private final String mIdentifier;
private final String mProviderAuthority;
private final String mProviderPackage;
private final String mQuery;
public FontRequest(String str, String str2, String str3, List<List<byte[]>> list) {
this.mProviderAuthority = (String) Preconditions.m1042a((Object) str);
this.mProviderPackage = (String) Preconditions.m1042a((Object) str2);
this.mQuery = (String) Preconditions.m1042a((Object) str3);
this.mCertificates = (List) Preconditions.m1042a((Object) list);
this.mCertificatesArray = null;
str = new StringBuilder(this.mProviderAuthority);
str.append(Operation.MINUS);
str.append(this.mProviderPackage);
str.append(Operation.MINUS);
str.append(this.mQuery);
this.mIdentifier = str.toString();
}
public FontRequest(String str, String str2, String str3, int i) {
this.mProviderAuthority = (String) Preconditions.m1042a((Object) str);
this.mProviderPackage = (String) Preconditions.m1042a((Object) str2);
this.mQuery = (String) Preconditions.m1042a((Object) str3);
this.mCertificates = null;
Preconditions.m1043a(i != 0 ? true : null);
this.mCertificatesArray = i;
str = new StringBuilder(this.mProviderAuthority);
str.append(Operation.MINUS);
str.append(this.mProviderPackage);
str.append(Operation.MINUS);
str.append(this.mQuery);
this.mIdentifier = str.toString();
}
public final String getProviderAuthority() {
return this.mProviderAuthority;
}
public final String getProviderPackage() {
return this.mProviderPackage;
}
public final String getQuery() {
return this.mQuery;
}
public final List<List<byte[]>> getCertificates() {
return this.mCertificates;
}
public final int getCertificatesArrayResId() {
return this.mCertificatesArray;
}
public final String getIdentifier() {
return this.mIdentifier;
}
public final String toString() {
StringBuilder stringBuilder = new StringBuilder();
StringBuilder stringBuilder2 = new StringBuilder("FontRequest {mProviderAuthority: ");
stringBuilder2.append(this.mProviderAuthority);
stringBuilder2.append(", mProviderPackage: ");
stringBuilder2.append(this.mProviderPackage);
stringBuilder2.append(", mQuery: ");
stringBuilder2.append(this.mQuery);
stringBuilder2.append(", mCertificates:");
stringBuilder.append(stringBuilder2.toString());
for (int i = 0; i < this.mCertificates.size(); i++) {
stringBuilder.append(" [");
List list = (List) this.mCertificates.get(i);
for (int i2 = 0; i2 < list.size(); i2++) {
stringBuilder.append(" \"");
stringBuilder.append(Base64.encodeToString((byte[]) list.get(i2), 0));
stringBuilder.append("\"");
}
stringBuilder.append(" ]");
}
stringBuilder.append("}");
stringBuilder2 = new StringBuilder("mCertificatesArray: ");
stringBuilder2.append(this.mCertificatesArray);
stringBuilder.append(stringBuilder2.toString());
return stringBuilder.toString();
}
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
d87d872db1dd2ecead5bc905102732fb6f356bec | a3e2ed4b1e28a0f80cd11be8e3527b6729bf3602 | /Core Components/template/src/com/globitel/Diameter/Interfaces/IAssociationWrapperMethods.java | ec07493f5ed10052995788fdf53cb95eca0a4fce | [] | no_license | alialshishaniglobitel/cliPOC | 82eb3e186309cad92b29700f870d7449b2135fe4 | e29f7eda3bc4a638514e7bb9e3488738d192a84a | refs/heads/master | 2020-07-31T07:05:34.214084 | 2019-09-24T06:53:23 | 2019-09-24T06:53:23 | 210,524,649 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 316 | java | package com.globitel.Diameter.Interfaces;
import org.mobicents.protocols.api.Association;
public interface IAssociationWrapperMethods
{
IAssociationWrapper getWrapperAndAddToRouteList(String associationName, String detailedName);
IAssociationWrapper createWrapper(Association association, String detailedName);
}
| [
"Ayyoub.Al-Qaissi@Globitel.com"
] | Ayyoub.Al-Qaissi@Globitel.com |
38944339e01dcf4752865154142feafffced9e84 | a602903c73834edbd6b1161dd202d1e36428a7ca | /Java/datawarehouse/src/main/java/com/interop/sql/ScheduleSQL.java | 84c2c285d5cf196f511943a47a3fc8d3ae00c4b7 | [] | no_license | PharahPhat/Selenium | e5e0ce5ca91708f63005fe205b061f23f1cd2c8e | 572fcf773c9e70b7ac168752d11c11b24837cab9 | refs/heads/master | 2022-12-08T12:59:52.010706 | 2020-04-01T04:49:04 | 2020-04-01T04:49:04 | 143,975,962 | 0 | 0 | null | 2022-12-06T00:44:30 | 2018-08-08T07:20:16 | Java | UTF-8 | Java | false | false | 3,067 | java | package com.interop.sql;
public class ScheduleSQL {
private ScheduleSQL() {
}
public static final String SQL_STX_SCHEDULE = "SELECT account," +
"schkey," +
"loc," +
"stx_id," +
"B_DTIME," +
"E_DTIME," +
"FLAG," +
"DUTY_FREE," +
"CTRL_NUM," +
"WEEK_END," +
"PAYRATE," +
"BILLRATE," +
"DISCIPLINE," +
"SERVICE," +
"CONTRACT," +
"AR_NO," +
"BRANCH," +
"VISIT_TYPE," +
"LI_CASE," +
"OT_AB_HOURS," +
"OT_AB_CODE," +
"OT_AB_INITIALS," +
"PROC_CODE," +
"CASENUM," +
"CASESEQ," +
"RESUBMISSION_INDICATOR," +
"RESUBMISSION_CLAIM_NUMBER," +
"TZNAME," +
"BILLCODE," +
"PROC_CODE_QUALIFIER," +
"MODIFIER1," +
"MODIFIER2," +
"MODIFIER3," +
"MODIFIER4," +
"PROGRAM," +
"SCHEDULE_GUID," +
"CONTGY_PLAN_CODE," +
"CASE TO_CHAR(lib.getExplain(NVL(s.SCH_EXPLAIN ,0), 2))\n" +
"\tWHEN '1' THEN 'yes'\n" +
"\tWHEN '0' THEN 'no' \n" +
"ELSE null\n" +
"END AS SCH_EXPLAIN " +
"FROM stx.SCHEDULE s WHERE ACCOUNT = '%s' AND CTRL_NUM = '%s'";
public static final String SQL_STX_SCHEDULE_BY_SCHKEY = "SELECT account," +
"schkey," +
"loc," +
"stx_id," +
"B_DTIME," +
"E_DTIME," +
"FLAG," +
"DUTY_FREE," +
"CTRL_NUM," +
"WEEK_END," +
"PAYRATE," +
"BILLRATE," +
"DISCIPLINE," +
"SERVICE," +
"CONTRACT," +
"AR_NO," +
"BRANCH," +
"VISIT_TYPE," +
"LI_CASE," +
"OT_AB_HOURS," +
"OT_AB_CODE," +
"OT_AB_INITIALS," +
"PROC_CODE," +
"CASENUM," +
"CASESEQ," +
"RESUBMISSION_INDICATOR," +
"RESUBMISSION_CLAIM_NUMBER," +
"TZNAME," +
"BILLCODE," +
"PROC_CODE_QUALIFIER," +
"MODIFIER1," +
"MODIFIER2," +
"MODIFIER3," +
"MODIFIER4," +
"PROGRAM," +
"SCHEDULE_GUID," +
"CONTGY_PLAN_CODE," +
"CASE TO_CHAR(lib.getExplain(NVL(s.SCH_EXPLAIN ,0), 2))\n" +
"\tWHEN '1' THEN 'yes'\n" +
"\tWHEN '0' THEN 'no' \n" +
"ELSE null\n" +
"END AS SCH_EXPLAIN " +
"FROM stx.SCHEDULE s WHERE ACCOUNT = '%s' AND schkey = '%s'";
public static final String SQL_INBOX_SCHEDULE_SCHKEY = "SELECT " +
"SCHKEY," +
"ERROR_CODE " +
"FROM INBOX.SCHEDULE WHERE sid IN " +
"(SELECT sid FROM INBOX.VISITS WHERE account ='%s' AND VISIT_VERSION_NUMBER = '%s');";
}
| [
"phattnguyen@kms-technology.com"
] | phattnguyen@kms-technology.com |
7de041bec46e80a86bbf5cf79a1a3f10b7116fa3 | 404cae1e50b7f2328440fb5262d4132a50263c01 | /OCPJava7/src/main/java/learn/ocp/core/chapter2/MainStatic.java | c46ded63ffb88e4a74284160f54b9f7cf2322e51 | [] | no_license | praveenK92/CoreJavaLearn | 6f0ea43620d7d36663250d1863da53f181802b41 | 6f6b39925cd800be1a0f319731248d153a35bf82 | refs/heads/master | 2021-01-20T00:05:43.513735 | 2017-04-22T15:12:25 | 2017-04-22T15:12:25 | 89,078,125 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 426 | java | package learn.ocp.core.chapter2;
public class MainStatic{
static int x;
public MainStatic() {
x++;
//this.x++;
}
public static void main(String a[]) {
for(int i=0;i<4;i++)
new MainStatic();
MainStatic a1=new MainStatic();
System.out.println("MainStatic.x="+MainStatic.x+"\nx="+x+"\na1.x="+a1.x);
Animal a2[]={new Animal(),new Dog(),new Animal()};
for(Animal a3:a2){
a3.eat();
}
Dog.eat();
}
}
| [
"praveensilu1@gmail.com"
] | praveensilu1@gmail.com |
9673f8757ea7f0ded6f00f5f077e24d4980a89a1 | 2c47c58e2fd04762963de398741504567099b8fc | /day05/src/com/atschool/java1/MyAnnotations.java | cdf53feeff7a62c31da277a718a675ef0555a176 | [] | no_license | Ximu0/JavaSenior | 4e2a041b422e23ba6399d0deb70e725882705a0f | 728196d7c03d1716b03c8549d8479afab60470d7 | refs/heads/master | 2023-05-08T22:06:38.711061 | 2021-05-29T14:45:40 | 2021-05-29T14:45:40 | 371,958,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package com.atschool.java1;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
/**
* @author wms
* @create 2021-03-24-18:46
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, MODULE})
public @interface MyAnnotations {
MyAnnotation[] value();
}
| [
"wmsorigin@126.com"
] | wmsorigin@126.com |
0b0a13a30c49025cbb8da4b1dbeec46e13b4f00b | a9c27b2d42359c9d21679e8c67f3f4cc4a3e9685 | /android/app/src/main/java/com/gdou/jianyue/MainActivity.java | b8f79b7fb89392bcb338dbc4f7424b510945f155 | [] | no_license | Serpit/Janue-Music | 0ab09af0cea53dc9d31412222fbf4624ba1c655c | 376e535f96d9440a6c98b1407571a67c69a021a8 | refs/heads/master | 2020-04-25T09:27:01.523331 | 2019-03-01T09:15:08 | 2019-03-01T09:15:08 | 172,676,001 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package com.gdou.jianyue;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
| [
"serpit@163.com"
] | serpit@163.com |
2ae9f9f2196cd34604e1e64116cdf3ce5887b18d | 6e547fadb03bc4cc9e7dc0ab418e52ace3e0f7d1 | /src/main/java/uk/theretiredprogrammer/extexp/controls/RunControl.java | 87a2f513c421b650b8b2ba7ab6ce354d7ec247da | [
"Apache-2.0"
] | permissive | The-Retired-Programmer/extexp | 35411abef5184b1ff26bb8d4cded5c32e8677dfa | d96076074769bfe0aa4929e6c5e35299fe8f3416 | refs/heads/master | 2021-12-26T17:19:40.155568 | 2021-11-25T23:39:55 | 2021-11-25T23:39:55 | 157,026,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,633 | java | /*
* Copyright 2018-2019 richard linsdale.
*
* 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 uk.theretiredprogrammer.extexp.controls;
import uk.theretiredprogrammer.extexp.support.Control;
import uk.theretiredprogrammer.extexp.support.ExecutionEnvironment;
import uk.theretiredprogrammer.extexp.support.IOPaths;
/**
* The RUN control class.
*
* Executes a command sequence with a new ExecutionEnvironment which includes:
*
* A new empty TemporaryFilestore
*
* A new IOPaths - if path is defined then both input, cache and output paths
* are updated with additional folder in the paths (as defined by the path) - if
* inputpath is defined then input path is updated with additional folder in the
* path (as defined by the inputpath) - otherwise the IOPaths is not updated
*
* Requires two or more parameters:
*
* 'Run' - the name of the command sequence to execute
*
* 'path' - the command to run if name is defined (optional).
*
* OR
*
* 'inputpath' - the command to run if name is undefined (optional).
*
* Other parameters - to create an environment for the sequence execution
*
* @author richard linsdale
*/
public class RunControl extends Control {
private static final String RUNIMAGENAME = "uk/theretiredprogrammer/extexp/visualeditor/arrow_right.png";
@Override
public String getWidgetImageName() {
return RUNIMAGENAME;
}
@Override
public String getDisplayName() {
return "RUN";
}
@Override
public String[] getPrimaryPinData() {
return new String[]{"Run", "path", "inputpath"};
}
@Override
protected void executecommand() {
IOPaths newpaths = getLocalParameter("path")
.map(p -> ee.paths.updateBothPath(p))
.orElse(
getLocalParameter("inputpath")
.map(p -> ee.paths.updatePath(p))
.orElse(ee.paths)
);
ExecutionEnvironment newee = ee.cloneWithNewTFS(newpaths);
execseq(ee.commandsequences.getSequence(getParameter("Run")), newee);
}
}
| [
"richard@theretiredprogrammer.uk"
] | richard@theretiredprogrammer.uk |
5119f434c1923f60acb7b4236178eeaff815335a | 86a1156bf1f57a3750d1d7d9c7e477fa9743ac1a | /src/main/java/com/ensat/services/UserService.java | ddd7034287ad51fe9f3f5027ce5d8f8b05caa91f | [] | no_license | Maysaraodeh/Management-System-Joud- | 524586f7a79e7dd38f5aa4710bc4ee2fb53cae52 | 90dd3253fb1e33d611ca8471a436af131d5b330b | refs/heads/master | 2021-03-19T10:38:36.461917 | 2017-08-01T11:37:34 | 2017-08-01T11:37:34 | 97,710,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package com.ensat.services;
import com.ensat.entities.User;
public interface UserService {
public User findUserByEmail(String email);
public void saveUser(User user);
} | [
"maysaraodeh@MacBook-Pro.local"
] | maysaraodeh@MacBook-Pro.local |
bfc1a744f0b16bb2c030c6376137817057c4f821 | 475cfb63c4bb0e89eec361d814913c68c3022ab5 | /library/src/main/java/io/tammen/stepper/widget/mobile/Vertical.java | 4fde0a8141e4666ee987124aa99f355f40dd5065 | [
"Apache-2.0"
] | permissive | wonderfulm3/stepper-form | 462d575e470518bdf1a674415e49817a54e81ae0 | 94c880e7f69b2956c83363bd1f9e1c7ad3652ccd | refs/heads/master | 2018-11-03T05:23:42.128278 | 2018-10-20T22:37:50 | 2018-10-20T22:37:50 | 115,289,305 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,604 | java | package io.tammen.stepper.widget.mobile;
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.annotation.Size;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import io.tammen.stepper.R;
import io.tammen.stepper.widget.mobile.exception.AnnotationErrorCode;
import io.tammen.stepper.widget.mobile.exception.StepperElementException;
import io.tammen.stepper.widget.mobile.render.VerticalEngine;
/**
* Created by Tammen Bruccoleri on 12/28/2017.
*/
public class Vertical extends RelativeLayout implements View.OnClickListener {
private final String TAG = this.getClass().getSimpleName();
private final int MIN_STEP_ELEMENT_SIZE = 2;
private final RelativeLayout relativeLayout;
private final AppCompatImageView ivWhenRenderException;
private final TextView tvStepElementTitleException;
@Size(min = 2)
private ArrayList<StepElementDetail> stepElementDetailArrayList = null;
public Vertical(Context context) {
this(context, null);
}
public Vertical(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public Vertical(Context context, AttributeSet attributeSet, int defStyleAttr) {
this(context, attributeSet, defStyleAttr, 0);
}
public Vertical(Context context, AttributeSet attributeSet, int defStyleAttr, int defStylesRes) {
super(context, attributeSet, defStyleAttr, defStylesRes);
relativeLayout = (RelativeLayout) inflate(context, R.layout.mobile_vertical_stepper, this);
ivWhenRenderException = (relativeLayout).findViewById(R.id.step_element_exception);
tvStepElementTitleException = (relativeLayout).findViewById(R.id.step_element_title_exception);
}
@Override
public void onClick(View v) {
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
renderStepElements();
}
@RestrictTo(RestrictTo.Scope.LIBRARY)
private void renderStepElements() {
try {
if (stepElementDetailArrayList != null && stepElementDetailArrayList.size() >= MIN_STEP_ELEMENT_SIZE) {
//Start of drawing StepElement's
//Going from an exception to where we now have valid Stepper elements
if (ivWhenRenderException.getVisibility() == View.VISIBLE) {
ivWhenRenderException.setVisibility(View.GONE);
tvStepElementTitleException.setVisibility(View.GONE);
}
StepElement element;
int previousId = 0;
for (int i = 0; i < stepElementDetailArrayList.size(); i++) {
if (i == 0) {
element = VerticalEngine.getInstance().renderStepElement(this.getContext(),
this.stepElementDetailArrayList.get(i), i, previousId);
previousId = element.getId();
relativeLayout.addView(element);
} else {
element = VerticalEngine.getInstance().renderStepElement(this.getContext(),
this.stepElementDetailArrayList.get(i), i, previousId);
previousId = element.getId();
//For the last StepElement we don't want to render the vertical bar
if (i == stepElementDetailArrayList.size() - 1) {
element.verticalBarView.setVisibility(View.GONE);
}
relativeLayout.addView(element);
}
}
} else {
throw new StepperElementException(getResources().getString(R.string.io_ta_mobile_exception_stepper_element_size_invalid),
new AnnotationErrorCode(AnnotationErrorCode.INVALID_ELEMENT_SIZE));
}
} catch (StepperElementException ex) {
Log.e(TAG, "Exception: " + ex.getMessage());
ex.printStackTrace();
ivWhenRenderException.setVisibility(View.VISIBLE);
tvStepElementTitleException.setVisibility(View.VISIBLE);
}
}
/**
* Initializer of the Vertical layout with Step Elements.
*
* @param stepElementDetailArrayList ArrayList elements that contain build objects that represent the StepElementDetail
* @throws StepperElementException Throws an Exception. Better catch/handle it...
*/
public void setStepElementDetail(@Size(min = 2) ArrayList<StepElementDetail> stepElementDetailArrayList) throws StepperElementException {
if (stepElementDetailArrayList.size() >= MIN_STEP_ELEMENT_SIZE) {
Log.d(TAG, "Number of elements: " + stepElementDetailArrayList.size());
//Determining step number assignment based off array index
int size = stepElementDetailArrayList.size();
for (int i = 0; i < size; i++) {
stepElementDetailArrayList.get(i).setStepNumber(i + 1);
}
this.stepElementDetailArrayList = stepElementDetailArrayList;
} else {
throw new StepperElementException(getResources().getString(R.string.io_ta_mobile_exception_stepper_element_size_invalid),
new AnnotationErrorCode(AnnotationErrorCode.INVALID_ELEMENT_SIZE));
}
}
}
| [
"tammen.bruccoleri@gmail.com"
] | tammen.bruccoleri@gmail.com |
9ad469590b58372e4196710db6fc1e63c3b6a735 | c6992ce8db7e5aab6fd959c0c448659ab91b16ce | /sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/models/MetadataApplication.java | 3e1624660165f1f9d2489c5e67d86cc7e62f1978 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"CC0-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later"
] | permissive | g2vinay/azure-sdk-for-java | ae6d94d583cc2983a5088ec8f6146744ee82cb55 | b88918a2ba0c3b3e88a36c985e6f83fc2bae2af2 | refs/heads/master | 2023-09-01T17:46:08.256214 | 2021-09-23T22:20:20 | 2021-09-23T22:20:20 | 161,234,198 | 3 | 1 | MIT | 2020-01-16T20:22:43 | 2018-12-10T20:44:41 | Java | UTF-8 | Java | false | false | 4,292 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.monitor.query.implementation.logs.models;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Application Insights apps that were part of the metadata request and that the user has access to. */
@Fluent
public final class MetadataApplication {
/*
* The ID of the Application Insights app.
*/
@JsonProperty(value = "id", required = true)
private String id;
/*
* The ARM resource ID of the Application Insights app.
*/
@JsonProperty(value = "resourceId", required = true)
private String resourceId;
/*
* The name of the Application Insights app.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* The Azure region of the Application Insights app.
*/
@JsonProperty(value = "region", required = true)
private String region;
/*
* The related metadata items for the Application Insights app.
*/
@JsonProperty(value = "related")
private MetadataApplicationRelated related;
/**
* Creates an instance of MetadataApplication class.
*
* @param id the id value to set.
* @param resourceId the resourceId value to set.
* @param name the name value to set.
* @param region the region value to set.
*/
@JsonCreator
public MetadataApplication(
@JsonProperty(value = "id", required = true) String id,
@JsonProperty(value = "resourceId", required = true) String resourceId,
@JsonProperty(value = "name", required = true) String name,
@JsonProperty(value = "region", required = true) String region) {
this.id = id;
this.resourceId = resourceId;
this.name = name;
this.region = region;
}
/**
* Get the id property: The ID of the Application Insights app.
*
* @return the id value.
*/
public String getId() {
return this.id;
}
/**
* Get the resourceId property: The ARM resource ID of the Application Insights app.
*
* @return the resourceId value.
*/
public String getResourceId() {
return this.resourceId;
}
/**
* Get the name property: The name of the Application Insights app.
*
* @return the name value.
*/
public String getName() {
return this.name;
}
/**
* Get the region property: The Azure region of the Application Insights app.
*
* @return the region value.
*/
public String getRegion() {
return this.region;
}
/**
* Get the related property: The related metadata items for the Application Insights app.
*
* @return the related value.
*/
public MetadataApplicationRelated getRelated() {
return this.related;
}
/**
* Set the related property: The related metadata items for the Application Insights app.
*
* @param related the related value to set.
* @return the MetadataApplication object itself.
*/
public MetadataApplication setRelated(MetadataApplicationRelated related) {
this.related = related;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (getId() == null) {
throw new IllegalArgumentException("Missing required property id in model MetadataApplication");
}
if (getResourceId() == null) {
throw new IllegalArgumentException("Missing required property resourceId in model MetadataApplication");
}
if (getName() == null) {
throw new IllegalArgumentException("Missing required property name in model MetadataApplication");
}
if (getRegion() == null) {
throw new IllegalArgumentException("Missing required property region in model MetadataApplication");
}
if (getRelated() != null) {
getRelated().validate();
}
}
}
| [
"noreply@github.com"
] | g2vinay.noreply@github.com |
75ee55c392bf34918457fd852f54e2b357e60b07 | b73c463f7b62e580e08d9693fa76ef694a67daab | /study_designPattern/src/main/java/com/spt/design/creational/abstract_factory/factorys/AbstractFactory.java | 9bed85ac7d777e160636787ac4a30cfca2959910 | [] | no_license | start-spt/study2020 | 963ef4187982b953e4e523e1df6b2c7736418781 | b22133d6fe2d0f547b976e93ad2ee92fcf811f56 | refs/heads/master | 2023-07-19T17:01:04.959455 | 2023-07-12T09:55:27 | 2023-07-12T09:55:27 | 318,195,837 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package com.spt.design.creational.abstract_factory.factorys;
import com.spt.design.creational.abstract_factory.colorintf.Color;
import com.spt.design.creational.abstract_factory.shapeintf.Shape;
public abstract class AbstractFactory {
public abstract Color getColor(String color);
public abstract Shape getShape(String shape) ;
} | [
"pengtao.song"
] | pengtao.song |
d894e154062f9e98a6df566590fd4b201ee93835 | 04b02886e4ef3053ff567af8c70c77d73e3119eb | /app/src/main/java/com/example/madassignment/userProfile.java | f050853ba31879c3bbc017191bf3c77175f54c2e | [] | no_license | ZhiKai0119/MADAssignment | 6c7ef95f6dbc74ff3ae6fd6359622b62f7119316 | a20771370cf12172e22dab9d5f616b77754bd14a | refs/heads/master | 2022-12-15T04:36:32.836631 | 2020-09-11T14:56:21 | 2020-09-11T14:56:21 | 286,245,039 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,567 | java | package com.example.madassignment;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import com.squareup.picasso.Picasso;
import de.hdodenhof.circleimageview.CircleImageView;
public class userProfile extends AppCompatActivity {
private DatabaseReference mDatabase;
private FirebaseAuth mAuth;
private FirebaseUser mUser;
private StorageReference storageReference;
private TextView fullName, email;
private Button changeProfileImage, resetPwd, logout;
private CircleImageView profileImage;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_profile);
mDatabase = FirebaseDatabase.getInstance().getReference();
mAuth = FirebaseAuth.getInstance();
mUser = mAuth.getCurrentUser();
storageReference = FirebaseStorage.getInstance().getReference();
StorageReference profileRef = storageReference.child("users/"+mAuth.getCurrentUser().getUid()+"/profile.jpg");
profileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Picasso.get().load(uri).into(profileImage);
}
});
fullName = (TextView) findViewById(R.id.hint_name);
email = (TextView) findViewById(R.id.hint_email);
resetPwd = (Button) findViewById(R.id.reset_password);
logout = (Button) findViewById(R.id.logout);
fullName.setText(mAuth.getCurrentUser().getUid());
email.setText(mAuth.getCurrentUser().getEmail());
profileImage = (CircleImageView) findViewById(R.id.imageView);
changeProfileImage = (Button) findViewById(R.id.change_profile);
changeProfileImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
// DatabaseReference databaseReference = mDatabase.child(mAuth.getCurrentUser().getUid());
// databaseReference.setValue(fullName);
// databaseReference.setValue(email);
// databaseReference.setValue(phone);
resetPwd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final EditText resetPassword = new EditText(view.getContext());
final AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());
passwordResetDialog.setTitle("Reset Password?");
passwordResetDialog.setMessage("Enter New Password > 6 Characters long.");
passwordResetDialog.setView(resetPassword);
passwordResetDialog.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
String newPassword = resetPassword.getText().toString();
mUser.updatePassword(newPassword).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(userProfile.this, "Password Reset Successully.", Toast.LENGTH_SHORT).show();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(userProfile.this, "Password Reset Failed.", Toast.LENGTH_SHORT).show();
}
});
}
});
passwordResetDialog.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
//Close
}
});
passwordResetDialog.create().show();
}
});
logout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseAuth.getInstance().signOut();
startActivity(new Intent(userProfile.this, Login.class));
finish();
}
});
changeProfileImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Intent i = new Intent(userProfile.this, EditProfile.class);
// i.putExtra("fullName", fullName.getText().toString());
// i.putExtra("email", email.getText().toString());
// i.putExtra("phone", phone.getText().toString());
// startActivity(i);
Intent openGallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(openGallery, 1000);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1000) {
if (resultCode == Activity.RESULT_OK) {
Uri imageUri = data.getData();
//profileImage.setImageURI(imageUri);
uploadImageToFirebase(imageUri);
}
}
}
private void uploadImageToFirebase(Uri imageUri) {
//upload image to firebase storage
final StorageReference fileRef = storageReference.child("users/"+mAuth.getCurrentUser().getUid()+"/profile.jpg");
fileRef.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
//Toast.makeText(userProfile.this, "Image Uploaded.", Toast.LENGTH_SHORT).show();
fileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Picasso.get().load(uri).into(profileImage);
}
});
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(userProfile.this, "Failed.", Toast.LENGTH_SHORT).show();
}
});
}
}
| [
"chongzk-wm19@student.tarc.edu.my"
] | chongzk-wm19@student.tarc.edu.my |
06d6da4c7b3469282a252abf5668c1e06b52e6c5 | d2a7de2ab1bbf910e3148a3774c67faa26da6d06 | /src/cn/edu/seu/institute/controller/MainController.java | 2edf71fb9e7a1647c64963dc0b96b66e4ca2c59c | [] | no_license | bingluo/institute | 0328c0b12d2d1d269c2f4073e7e8a3b39a455e21 | 19cdada9c85e0228599659615778aab3e2900413 | refs/heads/master | 2016-09-10T19:46:35.453765 | 2015-04-10T13:17:48 | 2015-04-10T13:17:48 | 33,728,841 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,800 | java | package cn.edu.seu.institute.controller;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import cn.edu.seu.institute.entity.Admin;
import cn.edu.seu.institute.entity.Application;
import cn.edu.seu.institute.entity.Article;
import cn.edu.seu.institute.entity.File;
import cn.edu.seu.institute.service.AdminService;
import cn.edu.seu.institute.service.ApplicationService;
import cn.edu.seu.institute.service.ArticleService;
import cn.edu.seu.institute.service.FileService;
import cn.edu.seu.institute.view.velocity.ViewUtil;
@Controller
public class MainController {
@Autowired
private ArticleService articleService;
@Autowired
private FileService fileService;
@Autowired
private AdminService adminService;
@Autowired
private ApplicationService applicationService;
private static int PAGE_SIZE = 10;
@RequestMapping(value = { "/", "/default.html" })
public String index() {
return "default";
}
@RequestMapping(value = "/apply.html")
public String applyPage(Model model) {
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
return "apply";
}
@RequestMapping(value = "/apply.html", method = RequestMethod.POST)
public void apply(Model model, @RequestParam("name") String name,
@RequestParam("phone") String phone,
@RequestParam("mail") String mail,
@RequestParam("file") MultipartFile file,
HttpServletRequest request, HttpServletResponse response) {
if (file != null) {
String path = request.getSession().getServletContext()
.getRealPath("static/applyForms");
String fileName = name + "-" + file.getOriginalFilename();
DateFormat format = new SimpleDateFormat("yyyyMMdd");
String hashString = format.format(new Date());
java.io.File directory = new java.io.File(path + "/" + name + "-"
+ phone + "-" + hashString);
if (!directory.exists() && !directory.isDirectory()) {
directory.mkdir();
}
java.io.File targetFile = new java.io.File(path + "/" + name + "-"
+ phone + "-" + hashString, fileName);
if ((fileName.endsWith(".doc") || fileName.endsWith(".docx"))
&& !targetFile.exists()) {
// 保存
try {
file.transferTo(targetFile);
Application application = new Application();
application.setName(name);
application.setPhone(phone);
application.setMail(mail);
application.setDirectory(name + "-" + phone + "-"
+ hashString);
application.setFilename(fileName);
applicationService.insertApplication(application);
} catch (Exception e) {
e.printStackTrace();
}
}
}
try {
response.sendRedirect(ViewUtil.getContextPath() + "/apply.html");
} catch (IOException e) {
e.printStackTrace();
}
}
@RequestMapping(value = "/contact.html")
public String contact(Model model) {
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
return "contact";
}
@RequestMapping(value = "/document.html", method = RequestMethod.GET)
public String document(Model model, HttpServletRequest request) {
String pageIndex = (String) request.getParameter("pn");
int pn = pageIndexResolve(pageIndex);
List<File> fileList = fileService.getFilesByPnAndSize(pn, PAGE_SIZE);
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
int count = fileService.getFileCount();
int pageCount = (count - 1) / PAGE_SIZE + 1;
model.addAttribute("pageIndex", pn);
model.addAttribute("fileList", fileList);
model.addAttribute("fileCount", count);
model.addAttribute("pageCount", pageCount);
model.addAttribute("url", "/document.html");
return "document";
}
@RequestMapping(value = "/members.html")
public String members(Model model) {
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
return "members";
}
@RequestMapping(value = "/notice.html", method = RequestMethod.GET)
public String notice(Model model, HttpServletRequest request) {
String pageIndex = (String) request.getParameter("pn");
int pn = pageIndexResolve(pageIndex);
List<Article> articleList = articleService.getCatArticlesByPnAndSize(0,
pn, PAGE_SIZE);
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
int count = articleService.getArticleCountByCategory(0);
int pageCount = (count - 1) / PAGE_SIZE + 1;
model.addAttribute("pageIndex", pn);
model.addAttribute("articleList", articleList);
model.addAttribute("articleCount", count);
model.addAttribute("pageCount", pageCount);
model.addAttribute("url", "/notice.html");
return "notice";
}
@RequestMapping(value = "/rules.html")
public String rules(Model model) {
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
return "rules";
}
@RequestMapping(value = "/viewNotice-{id}.html")
public String viewNotice(Model model, @PathVariable("id") int id,
HttpServletResponse response) {
Article article = articleService.getArticleByArticleId(id);
List<Article> recentNotice = articleService.getRecentAnnounce();
model.addAttribute("recentNotice", recentNotice);
List<File> recentFile = fileService.getRecentFile();
model.addAttribute("recentFile", recentFile);
if (article != null) {
model.addAttribute("notice", article);
return "viewNotice";
} else {
try {
response.sendRedirect(ViewUtil.CONTEXT_PATH + "/notice.html");
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}
private int pageIndexResolve(String pageIndex) {
int index = 1;
if (pageIndex != null && !pageIndex.trim().isEmpty()) {
index = Integer.valueOf(pageIndex.trim());
}
return index;
}
@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
private String loginPage(HttpServletResponse response) {
Admin admin = adminService.currentAdmin();
if (admin == null) {
return "manage/login";
} else {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/manage");
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
@RequestMapping(value = "/admin/login", method = RequestMethod.POST)
private void login(HttpServletResponse response,
@RequestParam("name") String name, @RequestParam("pswd") String pswd) {
try {
Admin admin = adminService.login(name, pswd);
if (admin != null) {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/manage");
} else {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
}
} catch (IOException e) {
e.printStackTrace();
}
}
@RequestMapping(value = "/admin/manage", method = RequestMethod.GET)
private String postArticlePage(Model model, HttpServletRequest request,
HttpServletResponse response) {
// 如果已登录
if (adminService.currentAdmin() != null) {
// articles
String pageIndexA = (String) request.getParameter("pnA");
int pnA = pageIndexResolve(pageIndexA);
List<Article> articleList = articleService
.getCatArticlesByPnAndSize(0, pnA, PAGE_SIZE);
int countA = articleService.getArticleCountByCategory(0);
int pageCountA = (countA - 1) / PAGE_SIZE + 1;
model.addAttribute("pageIndexA", pnA);
model.addAttribute("articleList", articleList);
model.addAttribute("articleCount", countA);
model.addAttribute("pageCountA", pageCountA);
// file
String pageIndex = (String) request.getParameter("pn");
int pn = pageIndexResolve(pageIndex);
List<File> fileList = fileService
.getFilesByPnAndSize(pn, PAGE_SIZE);
int count = fileService.getFileCount();
int pageCount = (count - 1) / PAGE_SIZE + 1;
model.addAttribute("pageIndex", pn);
model.addAttribute("fileList", fileList);
model.addAttribute("fileCount", count);
model.addAttribute("pageCount", pageCount);
// application
String pageIndexB = (String) request.getParameter("pnB");
int pnB = pageIndexResolve(pageIndexB);
List<Application> fileListB = applicationService
.getApplicationsByPnAndPageSize(pnB, PAGE_SIZE);
int countB = applicationService.getApplicationCount();
int pageCountB = (countB - 1) / PAGE_SIZE + 1;
model.addAttribute("pageIndexB", pnB);
model.addAttribute("fileListB", fileListB);
model.addAttribute("fileCountB", countB);
model.addAttribute("pageCountB", pageCountB);
String tabType = (String) request.getParameter("tab");
tabType = tabType == null || tabType.isEmpty() ? "1" : tabType;
model.addAttribute("tabType", tabType);
model.addAttribute("url", "/admin/manage");
return "manage/manage";
} else {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
@RequestMapping(value = "/admin/deleteArticle-{id}")
private void deleteArticle(@PathVariable("id") int id,
HttpServletResponse response) {
if (adminService.currentAdmin() == null) {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
return;
} catch (IOException e) {
e.printStackTrace();
}
} else {
try {
articleService.archiveArticle(id);
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/manage");
} catch (IOException e) {
e.printStackTrace();
}
}
}
@RequestMapping(value = "/admin/postArticle", method = RequestMethod.POST)
private void postArticle(@RequestParam("title") String title,
@RequestParam("content") String content,
HttpServletResponse response) {
if (adminService.currentAdmin() == null) {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
return;
} catch (IOException e) {
e.printStackTrace();
}
}
Article article = new Article();
article.setTitle(title);
article.setContent(content);
articleService.insertArticle(article);
try {
response.getWriter().write("1");
response.getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
}
@RequestMapping(value = "/admin/upload", method = RequestMethod.POST)
private void upload(HttpServletRequest request,
HttpServletResponse response, @RequestParam MultipartFile file) {
if (adminService.currentAdmin() == null) {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
return;
} catch (IOException e) {
e.printStackTrace();
}
}
if (file != null) {
String path = request.getSession().getServletContext()
.getRealPath("static/uploads");
String fileName = file.getOriginalFilename();
DateFormat format = new SimpleDateFormat("yyyyMMdd");
String hashString = format.format(new Date());
java.io.File directory = new java.io.File(path + "/" + hashString);
if (!directory.exists() && !directory.isDirectory()) {
directory.mkdir();
}
java.io.File targetFile = new java.io.File(path + "/" + hashString,
fileName);
if (!fileName.endsWith(".exe") && !targetFile.exists()) {
// 保存
try {
file.transferTo(targetFile);
File fileEntity = new File();
fileEntity.setDirectory(hashString);
fileEntity.setFilename(fileName);
fileService.uploadFile(fileEntity);
} catch (Exception e) {
e.printStackTrace();
}
}
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/document.html");
} catch (IOException e) {
e.printStackTrace();
}
}
}
@RequestMapping(value = "/admin/deleteFile-{id}")
private void deleteFile(@PathVariable("id") int id,
HttpServletResponse response) {
if (adminService.currentAdmin() == null) {
try {
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/login");
return;
} catch (IOException e) {
e.printStackTrace();
}
} else {
try {
fileService.deleteFile(id);
response.sendRedirect(ViewUtil.getContextPath()
+ "/admin/manage");
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
| [
"bingluo@foxmail.com"
] | bingluo@foxmail.com |
5229ad4bb2f83860eb6e1a87b9d1f20b08fc6be4 | d746a79a400b1cc6e1c95ff4d33eb94940a9221c | /Main.java | 1cc2464f70fa317afe38f92400465ee68dc824c8 | [] | no_license | unotngrupo5/Vehiculo | 071b76b0bdc3599ebcf01cb97acd5172d88dac61 | 190de3d169af79f0a4baf737d07d7845ac68decb | refs/heads/master | 2020-09-10T16:48:52.196619 | 2019-11-14T18:57:27 | 2019-11-14T18:57:27 | 221,766,443 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 110 | java | package ejercicioHerenciaVehiculos;
public class Main {
public static void main(String[] args) {
}
}
| [
"noreply@github.com"
] | unotngrupo5.noreply@github.com |
f86c46bb94cb8993299b3bc1da98854e9c18b8cf | 8280187a2f64e7d89bdb1cc61027578f55020400 | /app/src/main/java/com/app/util/AppUtils.java | b2a166acce477d1c3e8cf151dc7e40382708d709 | [] | no_license | shitalwakde/GroceryApp | b2fa439d976c6509fe4e15d6749e848da317471f | 128a16219f1859b4f6d61407c5f4728dd2585eb1 | refs/heads/master | 2023-02-24T17:14:40.055112 | 2021-01-30T19:56:18 | 2021-01-30T19:56:18 | 275,238,326 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,520 | java | package com.app.util;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.util.Patterns;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.app.callback.OnItemCountChanged;
import com.app.constant.AppConstant;
import com.app.controller.AppController;
import com.app.features.cart.CartAdapter;
import com.app.features.home.model.Product;
import com.app.features.login.ModLogin;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.RecyclerView;
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
import static com.app.constant.AppConstant.ADDRESS;
import static com.app.constant.AppConstant.LATITUDE_CONS;
import static com.app.constant.AppConstant.LONGITUDE_CONS;
public class AppUtils {
public static void showToast(Context context, String message) {
//Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
public static boolean isNullOrEmpty(String input) {
return input == null || input.isEmpty();
}
public static boolean isValidUsername(Context context, String username) {
return isValidUsername(context, username, "^[a-zA-Z0-9._-]{3,20}$");
}
public static boolean isValidUsername(Context context, String username, String regex) {
if (isNullOrEmpty(username)) {
showToast(context, "Please enter User name first.");
} else if (!Pattern.matches(regex, username)) {
showToast(context, "Please enter a valid User name.");
} else {
return true;
}
return false;
}
public static boolean isValidEmail(Context context, String email) {
if (isNullOrEmpty(email)) {
showToast(context, "Please enter Email first.");
} else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
showToast(context, "Please enter a valid Email address.");
} else {
return true;
}
return false;
}
public static boolean isValidMobile(Context context, String mobile) {
return isValidMobile(context, mobile, "^[0-9]{10}$");
}
public static boolean isValidMobile(Context context, String mobile, String regex) {
if (isNullOrEmpty(mobile)) {
showToast(context, "Please enter Mobile number first.");
} else if (!Pattern.matches(regex, mobile)) {
showToast(context, "Please enter a valid Mobile number.");
} else {
return true;
}
return false;
}
public static boolean isValidPassword(Context context, String password) {
if (isNullOrEmpty(password)) {
showToast(context, "Please enter Password first.");
} /*else if (password.length() < 6) {
showToast(context, "Password length should not be less than 6 characters");
} else if (password.length() > 30) {
showToast(context, "Password length should not be greater than 30 characters");
}*/ else {
return true;
}
return false;
}
public static void setUserDetails(Context context, ModLogin loginModel) {
if (loginModel != null) {
String userDetail = new Gson().toJson(loginModel);
PrefUtil.getInstance(context).putData(AppConstant.PREF_USER_DATA, userDetail);
} else {
PrefUtil.getInstance(context).removeKeyData(AppConstant.PREF_USER_DATA);
}
}
public static void updateUserDetails(Context context, ModLogin loginModel) {
if (loginModel != null) {
String userDetail = new Gson().toJson(loginModel);
PrefUtil.getInstance(context).putData(AppConstant.PREF_USER_DATA, userDetail);
} else {
PrefUtil.getInstance(context).removeKeyData(AppConstant.PREF_USER_DATA);
}
}
public static ModLogin getUserDetails(Context context) {
String userDetail = PrefUtil.getInstance(AppController.getInstance()).getPreferences().getString(AppConstant.PREF_USER_DATA, null);
ModLogin loginModel = null;
if (userDetail != null)
loginModel = new Gson().fromJson(userDetail, ModLogin.class);
return loginModel;
}
public static String getUniqueId(Context context) {
String uuid = PrefUtil.getInstance(context).getPreferences().getString(AppConstant.UUID, null);
if (TextUtils.isEmpty(uuid)) {
UUID uniqueId = UUID.randomUUID();
uuid = uniqueId.toString();
PrefUtil.getInstance(context).putData(AppConstant.UUID, uuid);
}
return uuid;
}
public static String getAddress() {
String address = PrefUtil.getInstance(AppController.getInstance()).getPreferences().getString(ADDRESS, null);
return address;
}
public static void setAddress(String address) {
PrefUtil.getInstance(AppController.getInstance()).putData(AppConstant.ADDRESS, address);
}
public static String getLatitude() {
String latitude = (PrefUtil.getInstance(AppController.getInstance()).getPreferences().getString(String.valueOf(LATITUDE_CONS), null));
return latitude;
}
public static String getLongitude() {
String longitude = (PrefUtil.getInstance(AppController.getInstance()).getPreferences().getString(String.valueOf(LONGITUDE_CONS), null));
return longitude;
}
public static void setLatitude(String latitude) {
PrefUtil.getInstance(AppController.getInstance()).putData(String.valueOf(AppConstant.LATITUDE_CONS), latitude);
}
public static void setLongitude(String longitude) {
PrefUtil.getInstance(AppController.getInstance()).putData(String.valueOf(AppConstant.LONGITUDE_CONS), longitude);
}
public static void setCartCount(String cartCount) {
PrefUtil.getInstance(AppController.getInstance()).putData(AppConstant.PREF_CART_COUNT, cartCount);
}
public static String getCartCount(Context context) {
String cartCount = PrefUtil.getInstance(context).getPreferences().getString(AppConstant.PREF_CART_COUNT, "0");
return cartCount;
}
public static void addTocart(int qty, final int position, List<Product> mdata, RecyclerView.Adapter adapter, Context context, final OnItemCountChanged listener) {
JsonObject jsonObject = new JsonObject();
if (AppConstant.isLogin(null)) {
jsonObject.addProperty("userId", AppUtils.getUserDetails(null).getLoginId());
} else {
jsonObject.addProperty("userId", "");
}
jsonObject.addProperty("tempUserId", AppController.getInstance().getUniqueID());
jsonObject.addProperty("productId", mdata.get(position).getProductId());
jsonObject.addProperty("productVarientId", mdata.get(position).getProductVarientId());
jsonObject.addProperty("quantity", String.valueOf(qty));
new RestClient().getApiService().addToCart(jsonObject, new Callback<Product>() {
@Override
public void success(Product product, Response response) {
mdata.get(position).setLoading(false);
if (product.getSuccess().equals("1")) {
if (product.getCartCount() != null) {
setCartCount(product.getCartCount());
}
listener.onSuccess();
// if(!product.getQuantity().equals("0")){
mdata.get(position).setCartQuantity(qty);
// }
adapter.notifyDataSetChanged();
adapter.notifyItemChanged(position);
// Toast.makeText(itemView.getContext(), product.getMessage(), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(context, product.getMessage(), Toast.LENGTH_SHORT).show();
}
}
@Override
public void failure(RetrofitError error) {
mdata.get(position).setLoading(false);
adapter.notifyItemChanged(position);
Toast.makeText(context, error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
public static void addWishList(String wishList, final int position, List<Product> mdata, RecyclerView.Adapter adapter, Context context) {
JsonObject jsonObject = new JsonObject();
if (AppConstant.isLogin(null)) {
jsonObject.addProperty("userId", AppUtils.getUserDetails(null).getLoginId());
} else {
jsonObject.addProperty("userId", "");
}
jsonObject.addProperty("tempUserId", AppController.getInstance().getUniqueID());
jsonObject.addProperty("productId", mdata.get(position).getProductId());
jsonObject.addProperty("wishList", wishList);
new RestClient().getApiService().addWishList(jsonObject, new Callback<Product>() {
@Override
public void success(Product product, Response response) {
if (product.getSuccess().equals("1")) {
adapter.notifyDataSetChanged();
//Toast.makeText(context, product.getMessage(), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(context, product.getMessage(), Toast.LENGTH_SHORT).show();
}
}
@Override
public void failure(RetrofitError error) {
Toast.makeText(context, error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
public static void changeColor(String color, Toolbar toolbar, View... views) {
if (toolbar != null)
toolbar.setBackgroundColor(Color.parseColor(color));
if (views != null)
for (View view :
views) {
if(view==null)
continue;
if (view instanceof Button)
((Button) view).setBackgroundColor(Color.parseColor(color));
else if (view instanceof TextView)
((TextView) view).setTextColor(Color.parseColor(color));
else
view.setBackgroundColor(Color.parseColor((color)));
}
}
}
| [
"tinawakde@gmail.com"
] | tinawakde@gmail.com |
a89312b42c1413146cb8cea364d575262f1f74b4 | 511b5740e4feb307d3e6bf521b42378939f362b2 | /app/src/main/java/com/example/a336819/jhsapplication/AddClasses/ClassesInformation.java | eba58b1d0b22e43e16c1305d27cec2a9f5f5fcf7 | [] | no_license | DavyHyun/jhsStudentApp-master | 0a1ec6c5204a1359c76e5683532de389e8fe899a | d1cbb15687a055a63cfb3912cd35fec1a82c1823 | refs/heads/master | 2020-05-02T15:21:04.844523 | 2019-03-27T16:58:06 | 2019-03-27T16:58:06 | 178,038,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,110 | java | package com.example.a336819.jhsapplication.AddClasses;
public class ClassesInformation {
String p1, p2, p3, p4, p5, p6;
public ClassesInformation(String p1, String p2, String p3, String p4, String p5, String p6) {
this.p1=p1;
this.p2=p2;
this.p3=p3;
this.p4=p4;
this.p5=p5;
this.p6=p6;
}
public ClassesInformation() {
}
public String getP1() {
return this.p1;
}
public String getP2() {
return this.p2;
}
public String getP3() {
return this.p3;
}
public String getP4() {
return this.p4;
}
public String getP5() {
return this.p5;
}
public String getP6() {
return this.p6;
}
public void setP1(String p1) {
this.p1=p1;
}
public void setP2(String p2) {
this.p2=p2;
}
public void setP3(String p3) {
this.p3=p3;
}
public void setP4(String p4) {
this.p4=p4;
}
public void setP5(String p5) {
this.p5=p5;
}
public void setP6(String p6) {
this.p6=p6;
}
}
| [
"dhyun1124@gmail.com"
] | dhyun1124@gmail.com |
01db7e94e983499b26549d2dd1bcc9a0efe840be | e3e6c551b0ef64a1dd69295616a3e35107670cef | /app/src/main/java/online/himakeit/qrcodekit/ui/adapter/MainRecyclerViewAdapter.java | d24bbb6a38e3177d7f8e611e4a2416d4fe36b76e | [
"Apache-2.0"
] | permissive | skylarklxlong/QRCodeKit | 8684ed5126be8ef755934101bc4b48da86c9d123 | 6c9620a3cad5be1352b09b76b0b6bb8753188d04 | refs/heads/master | 2021-04-03T01:31:40.147267 | 2018-04-12T02:18:20 | 2018-04-12T02:18:20 | 124,383,919 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,610 | java | package online.himakeit.qrcodekit.ui.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import online.himakeit.qrcodekit.R;
import online.himakeit.qrcodekit.callback.OnRecyclerItemClickListener;
/**
* @author:LiXueLong
* @date:2018/3/10
* @mail1:skylarklxlong@outlook.com
* @mail2:li_xuelong@126.com
* @des:
*/
public class MainRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
Context mContext;
ArrayList<String> mDatas;
LayoutInflater mLayoutInflater;
public MainRecyclerViewAdapter(Context mContext, ArrayList<String> mDatas) {
this.mContext = mContext;
this.mDatas = mDatas;
mLayoutInflater = LayoutInflater.from(mContext);
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = mLayoutInflater.inflate(R.layout.item_main_recycler_view, parent, false);
return new MainItemViewHolder(inflate);
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
if (holder instanceof MainItemViewHolder) {
MainItemViewHolder viewHolder = (MainItemViewHolder) holder;
if (mOnRecyclerItemClickListener != null) {
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOnRecyclerItemClickListener.onItemClick(v, position);
}
});
}
String title = mDatas.get(position);
viewHolder.mTvTitle.setText(title);
if ("扫一扫".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_scan_72);
} else if ("普遍模式".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_color_72);
} else if ("高级模式".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_hot_72);
} else if ("二维码百科".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_help_72);
} else if ("淘宝优惠券".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_cart_72);
} else if ("多边形图片".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_poly_72);
} else if ("表情三连".equals(title)) {
viewHolder.mIvImg.setImageResource(R.drawable.icon_three_p_72);
}
}
}
@Override
public int getItemCount() {
return mDatas.size();
}
public class MainItemViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.iv_item_main_recycler_img)
ImageView mIvImg;
@BindView(R.id.tv_item_main_recycler_title)
TextView mTvTitle;
public MainItemViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
private OnRecyclerItemClickListener mOnRecyclerItemClickListener;
public void setmOnRecyclerItemClickListener(OnRecyclerItemClickListener mOnRecyclerItemClickListener) {
this.mOnRecyclerItemClickListener = mOnRecyclerItemClickListener;
}
}
| [
"li_xuelong@126.com"
] | li_xuelong@126.com |
763fc59a6cd94735c2b80a554f07f5333613dbaf | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project445/src/test/java/org/gradle/test/performance/largejavamultiproject/project445/p2229/Test44588.java | 73267078ed1f2a3070505d2edb6e3378efacef06 | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,113 | java | package org.gradle.test.performance.largejavamultiproject.project445.p2229;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test44588 {
Production44588 objectUnderTest = new Production44588();
@Test
public void testProperty0() {
String value = "value";
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
String value = "value";
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
String value = "value";
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"sterling.greene@gmail.com"
] | sterling.greene@gmail.com |
5575b8c6e0f222d987dc200d9324bc45b7f62548 | 2b632f76076fd9429330b25fb52dcc893e8b175c | /lesson_5/Employee.java | 6c8304f6e43409f5cadad49d11fc2dd1169f6fd5 | [] | no_license | rdimio/Java_1 | 8a503cd2e2e78f84514feb8188ba477ebbea135e | 5cd07267f4b23fe4b4dbfe7f3c15caada0d25863 | refs/heads/master | 2022-03-28T17:13:52.600716 | 2020-01-01T08:55:26 | 2020-01-01T08:55:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,652 | java | package lesson_5;
public class Employee {
private String fullName;
private String position;
private String email;
private String phoneNumber;
private int salary;
private int age;
public Employee(String fullName, String position, String email, String phoneNumber, int salary, int age) {
this.fullName = fullName;
this. position = position;
this. email = email;
this.phoneNumber = phoneNumber;
this.salary = salary;
this.age = age;
}
public void info() {
System.out.println("ФИО: " + fullName + " должность: " + position + " email: " + email +
" номер телефона: " + phoneNumber + " зарплата: " + salary + " возраст: " + age);
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public int getSalary() {
return salary;
}
public void setSalary(int salary) {
this.salary = salary;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
| [
"vadimio9217@gmail.com"
] | vadimio9217@gmail.com |
d212bdbae9ecfbbd5d919b4094052199dc500006 | bae6529a622b2782840eb5657757bf55856c6a01 | /src/main/java/Entity/Artist.java | 32cc77530ac0459b2f9280a265c747f06f7034db | [] | no_license | Chizhov98/Homework24 | e3544a5323244af30333c770521646c5377287d3 | b4c9fc700f3136d4d652397672ca4006dee258a8 | refs/heads/master | 2023-08-15T23:13:35.450076 | 2021-09-05T14:08:34 | 2021-09-05T14:08:34 | 389,379,521 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 821 | java | package Entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.HashSet;
import java.util.List;
@Entity
@Getter
@Setter
@Table(name = "artists")
public class Artist {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private int id;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@ManyToMany(mappedBy = "artists")
private List<Album> albums;
public Artist() {
}
@Override
public String toString() {
return "Artist{" +
"id=" + id +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", albums=" + albums +
'}';
}
}
| [
"chizhov1998a@gmail.com"
] | chizhov1998a@gmail.com |
c8b722d292ca9cafa7d81908fa563abbaee70952 | f402f1bf836a1986f8a2925ea31a84452bc7ee80 | /src/com/eivindhagen/training/CriminalIntent/CrimeListActivity.java | 92a6285d201ce564ba33a52bb34a321f10b8a368 | [] | no_license | eivindhagen/CriminalIntent | 04dde113aa31eda07757a84bfe144e5eea38c993 | d60263332ea182e8af8b2b7a4b2f26e0ae8305e8 | refs/heads/master | 2021-01-13T02:18:26.499958 | 2013-10-23T23:37:24 | 2013-10-23T23:37:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,197 | java | package com.eivindhagen.training.CriminalIntent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
/**
* Created with IntelliJ IDEA.
* User: ehagen
* Date: 10/22/13
* Time: 1:47 PM
* To change this template use File | Settings | File Templates.
*/
public class CrimeListActivity extends SingleFragmentActivity {
@Override
protected Fragment createFragment() {
return new CrimeListFragment();
}
@Override
public void onCreate(Bundle savedInstanceState) {
Log.i("CrimeListActivity", "onCreate (before super)");
super.onCreate(savedInstanceState); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onCreate (after super)");
}
@Override
protected void onStart() {
Log.i("CrimeListActivity", "onStart (before super)");
super.onStart(); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onStart (after super)");
}
@Override
protected void onResume() {
Log.i("CrimeListActivity", "onResume (before super)");
super.onResume(); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onResume (after super)");
}
@Override
protected void onPause() {
Log.i("CrimeListActivity", "onPause(before super)");
super.onPause(); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onPause (after super)");
}
@Override
protected void onStop() {
Log.i("CrimeListActivity", "onStop (before super)");
super.onStop(); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onStop (after super)");
}
@Override
protected void onDestroy() {
Log.i("CrimeListActivity", "onDestroy (before super)");
super.onDestroy(); //To change body of overridden methods use File | Settings | File Templates.
Log.i("CrimeListActivity", "onDestroy (after super)");
}
}
| [
"ehagen@fb.com"
] | ehagen@fb.com |
1107d3823419886247dac75845beecd303eb4b9d | 1c1ff9731b1e4d9af91c293ceb9c8b49b9a83ea0 | /section-nine/ScopeChallenge/src/com/company/X.java | 919d7178cb4794b7d752c3899da70f5abbbc94fa | [] | no_license | Frank-Rauen/java-course | 973a19af4047daecda4298ee1c69d25a983fa5de | cdb8507399f9f13e606d31d7b0cbc72558f65b64 | refs/heads/master | 2023-01-09T21:33:54.844512 | 2020-11-17T21:29:52 | 2020-11-17T21:29:52 | 292,410,349 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 358 | java | package com.company;
import java.util.Scanner;
public class X {
private int x;
public X(Scanner x) {
System.out.println("Enter Number: ");
this.x = x.nextInt();
}
public void x() {
for(int x = 0; x <= 12; x++) {
System.out.println(x + " times " + this.x + " equals " + (x * this.x));
}
}
}
| [
"home@Franks-MacBook-Air.local"
] | home@Franks-MacBook-Air.local |
f83cbec9fcc6f73d8a22d3863cecf2e4efd60b1e | 4988272056e912dc4f8aebaa0bedb0e4e19db739 | /graphics/Sprite.java | c3a08b9f380e1a7f953f317fd605cb591611121c | [] | no_license | jcabo001/Platformer-v2.0 | 632d922a639c041052cfdff9f638c454c768b66e | a7909e63a63f28ded2a0aa60a43d2c81d2bd7097 | refs/heads/master | 2020-12-24T15:58:57.824240 | 2011-03-21T05:07:58 | 2011-03-21T05:07:58 | 1,505,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,375 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package graphics;
/**
*
* @author DevKit
*/
import java.awt.Image;
public class Sprite implements Cloneable{
protected Animation anim;
private float x;
private float y;
private float dx;
private float dy;
public Sprite(Animation anim) {
this.anim = anim;
}
public void update(long elapsedTime) {
x += dx * elapsedTime;
y += dy * elapsedTime;
anim.updateAnimation(elapsedTime);
}
public float getX() {
return x;
}
public float getY() {
return y;
}
public void setX(float x) {
this.x = x;
}
public void setY(float y) {
this.y = y;
}
public int getWidth() {
return anim.getImage().getWidth(null);
}
public int getHeight() {
return anim.getImage().getHeight(null);
}
public float getVelocityX() {
return dx;
}
public float getVelocityY() {
return dy;
}
public void setVelocityX(float dx) {
this.dx = dx;
}
public void setVelocityY(float dy) {
this.dy = dy;
}
public Image getImage() {
return anim.getImage();
}
public Object clone() throws CloneNotSupportedException{
return new Sprite(anim);
}
}
| [
"jcabo001@fiu.edu"
] | jcabo001@fiu.edu |
88ee54cd95610cc4f3fda7c78e74a0b6bd986f92 | 46167791cbfeebc8d3ddc97112764d7947fffa22 | /quarkus/src/main/java/com/justexample/entity/Entity0623.java | 0db755ef4bc05a58342317da9737e53ff3a20695 | [] | no_license | kahlai/unrealistictest | 4f668b4822a25b4c1f06c6b543a26506bb1f8870 | fe30034b05f5aacd0ef69523479ae721e234995c | refs/heads/master | 2023-08-25T09:32:16.059555 | 2021-11-09T08:17:22 | 2021-11-09T08:17:22 | 425,726,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,130 | java | package com.example.entity;
import java.sql.Timestamp;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Entity0623 {
@Id
private Long id;
private String code;
private String name;
private String status;
private int seq;
private Timestamp createdDate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public Timestamp getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Timestamp createdDate) {
this.createdDate = createdDate;
}
}
| [
"laikahhoe@gmail.com"
] | laikahhoe@gmail.com |
3072b81b4c9eaf00526b4aad5a172848edd8482e | c56a7e66f1c70c0c340768385c6fd73ca2584e7e | /src/main/java/com/github/pwittchen/kirai/library/Formatter.java | e9a6278bf6283428873d27d199e2758b38b14356 | [
"Apache-2.0"
] | permissive | pwittchen/kirai | 29673f790f9395e696844742bdba77585f5333c3 | 2874bcde3dbb882c788ab89240d7613010ff353c | refs/heads/master | 2020-12-25T17:34:25.902578 | 2020-01-15T11:13:00 | 2020-01-15T11:13:00 | 29,064,226 | 73 | 12 | Apache-2.0 | 2020-01-15T11:13:02 | 2015-01-10T17:07:43 | Java | UTF-8 | Java | false | false | 711 | java | /*
* Copyright (C) 2015 Piotr Wittchen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.pwittchen.kirai.library;
public interface Formatter {
CharSequence format(String input);
}
| [
"piotr@wittchen.biz.pl"
] | piotr@wittchen.biz.pl |
387f646473501a509a7e11419c08f9c9fd2ddb41 | 928db5f3bcb75ad0e38dc76a2915e520fb29a066 | /src/main/java/life/majiang/community/mapper/UserMapper.java | 57999286c56ab0ec006939e12e1eaaac2329389b | [] | no_license | Encounter-with-you/community | 01d7460bea7c65837715427c20e099db93c69a10 | 70af0b9c72477671db5ae6a699db3ac9425ec31b | refs/heads/master | 2022-06-29T05:10:32.626534 | 2020-12-14T06:44:06 | 2020-12-14T06:44:06 | 231,884,036 | 0 | 0 | null | 2022-01-21T23:35:56 | 2020-01-05T07:38:54 | JavaScript | UTF-8 | Java | false | false | 3,191 | java | package life.majiang.community.mapper;
import java.util.List;
import life.majiang.community.model.User;
import life.majiang.community.model.UserExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
public interface UserMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
long countByExample(UserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int deleteByExample(UserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int insert(User record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int insertSelective(User record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
List<User> selectByExampleWithRowbounds(UserExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
List<User> selectByExample(UserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
User selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int updateByExample(@Param("record") User record, @Param("example") UserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int updateByPrimaryKeySelective(User record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table USER
*
* @mbg.generated Wed Jan 29 20:58:27 CST 2020
*/
int updateByPrimaryKey(User record);
} | [
"2461864879@qq.com"
] | 2461864879@qq.com |
7e205989e12ec5015fac6ecd2deadb0e9203243b | ff6405c8ddb9994be9ecd26f56f0cd1dc7c49305 | /src/dina/compiler/builder/VariablePointer.java | 265c8d868b2252d2f1a442206398e9675dd84880 | [] | no_license | Roman-Yefimchuk/my-language | dd7838ebe0a75fb962688baa77626461890c3ee5 | e55867e8dd48e40170916cce7da412ba0e8a3e9d | refs/heads/master | 2020-06-08T15:48:09.918510 | 2015-09-13T15:57:22 | 2015-09-13T15:58:03 | 42,401,890 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 462 | java | package dina.compiler.builder;
import dina.compiler.builder.objects.*;
public class VariablePointer {
private int variableIndex;
private Variable variable;
public VariablePointer(Variable variable, int variableIndex) {
this.variable = variable;
this.variableIndex = variableIndex;
}
public int getVariableIndex() {
return variableIndex;
}
public Variable getVariable() {
return variable;
}
}
| [
"efimchuk.roma@gmail.com"
] | efimchuk.roma@gmail.com |
bf96763db72a83ad35688b2d899ae108bd40ec94 | e391bc796c35a49b1de31d151204aa3ebbe671d7 | /demo/src/test/java/com/example/demo/NativeQueryTests.java | e52e19e1f1ff6288af87492197201c869664779c | [] | no_license | JoseQC/Master-Hibernate-and-JPA-with-Sring-Boot-100-steps | 1ff2ae620c82c881251dc2444f6262a14186bf15 | ff7e732c0226ed2691dc36059ce6f1229b62ca68 | refs/heads/main | 2023-07-26T20:10:20.851877 | 2021-09-11T05:22:37 | 2021-09-11T05:22:37 | 401,161,187 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,774 | java | package com.example.demo;
import com.example.demo.Entity.Course;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import java.util.List;
import java.util.logging.Logger;
@SpringBootTest
class NativeQueryTests {
private final static Logger LOGGER = Logger.getLogger("com.example.demo.CourseRepositoryTests");
@Autowired
EntityManager entityManager;
@Test
void native_queries_basic(){
Query query = entityManager.createNativeQuery("SELECT * from course");
List resultList = query.getResultList();
LOGGER.info("native quires {}"+resultList);
}
@Test
void native_queries_with_parameter(){
Query nativeQuery = entityManager.createNativeQuery("SELECT * FROM course where id=?", Course.class);
nativeQuery.setParameter(1,1L);
List<Course> resultList = nativeQuery.getResultList();
LOGGER.info("test course with parameters {}"+resultList);
}
@Test
void native_queries_with_name_parameter(){
Query nativeQuery = entityManager.createNativeQuery("SELECT * FROM course where id=:id", Course.class);
nativeQuery.setParameter("id",1L);
List<Course> resultList = nativeQuery.getResultList();
LOGGER.info("test course with named parameters {}"+resultList);
}
@Test
void jpql_where(){
TypedQuery<Course> typeQuery = entityManager.createNamedQuery("get_courses_like_a", Course.class);
List<Course> resultList = typeQuery.getResultList();
LOGGER.info("test where {}"+resultList);
}
}
| [
"42150018+JoseQC@users.noreply.github.com"
] | 42150018+JoseQC@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.