blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
18f61bdb9d1e5bd8c57503b69c81478288bfd520
5b32059a1ff9e8a8dedc311bc68bba5f5375c381
/src/travel_20190406/order/domain/Order.java
c77de46056bf50680f589f73dc5a32c0a34421e1
[]
no_license
morristech/Travel
7c24b053473f75b9cbbdb373edf4f75440d95d61
1164fb93fbd840daf6347eb57726b1cda09c7ab9
refs/heads/master
2020-07-20T13:33:00.429622
2019-04-14T22:43:11
2019-04-14T22:43:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,213
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 travel_20190406.order.domain; import travel_20190406.common.business.domain.BaseDomain; import travel_20190406.country.domain.BaseCountry; import travel_20190406.user.domain.User; import java.util.List; /** * * @author Виталий */ public class Order extends BaseDomain<Long> { private User user; private double price; private List<BaseCountry> countries; public Order(User user, double price, List<BaseCountry> countries) { super(); this.user = user; this.price = price; this.countries = countries; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public List<BaseCountry> getCountries() { return countries; } public void setCountries(List<BaseCountry> countries) { this.countries = countries; } }
[ "morozov_spmt@mail.ru" ]
morozov_spmt@mail.ru
4ad9ebfe0171d0ab1f656a9e188224e1710c4d32
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/android/java/src/org/chromium/chrome/browser/crash/PureJavaExceptionHandler.java
75f710df37700f63d1ce02a42ed063c11e9b9151
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
2,088
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.crash; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.MainDex; import org.chromium.components.crash.CrashKeys; /** * This UncaughtExceptionHandler will upload the stacktrace when there is an uncaught exception. * * This happens before native is loaded, and will replace by JavaExceptionReporter after native * finishes loading. */ @MainDex public class PureJavaExceptionHandler implements Thread.UncaughtExceptionHandler { private final Thread.UncaughtExceptionHandler mParent; private boolean mHandlingException; private static boolean sIsDisabled; private PureJavaExceptionHandler(Thread.UncaughtExceptionHandler parent) { mParent = parent; } @Override public void uncaughtException(Thread t, Throwable e) { if (!mHandlingException && !sIsDisabled) { mHandlingException = true; reportJavaException(e); } if (mParent != null) { mParent.uncaughtException(t, e); } } public static void installHandler() { if (!sIsDisabled) { Thread.setDefaultUncaughtExceptionHandler( new PureJavaExceptionHandler(Thread.getDefaultUncaughtExceptionHandler())); } } @CalledByNative private static void uninstallHandler() { // The current handler can be in the middle of an exception handler chain. We do not know // about handlers before it. If resetting the uncaught exception handler to mParent, we lost // all the handlers before mParent. In order to disable this handler, globally setting a // flag to ignore it seems to be the easiest way. sIsDisabled = true; CrashKeys.getInstance().flushToNative(); } private void reportJavaException(Throwable e) { PureJavaExceptionReporter.reportJavaException(e); } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
99a933e10fd882108f0a70e63c1b46885f69ff9a
40bea3a6520a5780cae127c12940872e61070305
/src/com/enigma/oop/Circle.java
897c5513307e05efae1205fd41cfbf14b92a3a76
[]
no_license
adil819/BelajarOOPJava
67f2dd0abfe67d9504ede43da63bfa6acfcac07a
488ae89f2d65801f7cd460a2ab5ba2cc606ebffc
refs/heads/main
2023-07-18T07:32:53.785124
2021-09-07T05:49:52
2021-09-07T05:49:52
403,855,799
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package com.enigma.oop; import com.enigma.oop.constant.Constant; public class Circle extends Shape{ private Double radius; public Circle(Double radius) { this.radius = radius; } @Override public Double getArea() { return Constant.PHI + Math.pow(this.radius, 2); } @Override public Double getPerimeter() { return 2 * (Constant.PHI * this.radius); } @Override public String toString() { return "Circle{" + "radius=" + radius + '}'; } }
[ "=" ]
=
4eda84e5d682d751974469168e23aa6c6b0fe11f
b37726900ee16a5b72a6cd7b2a2d72814fffe924
/src/main/java/vn/com/vndirect/domain/IfoStockExchangeViewId.java
9713b69b116e25c61b589c9fa5b01f1828f3862d
[]
no_license
UnsungHero0/portal
6b9cfd7271f2b1d587a6f311de49c67e8dd8ff9f
32325d3e1732d900ee3f874c55890afc8f347700
refs/heads/master
2021-01-20T06:18:01.548033
2014-11-12T10:27:43
2014-11-12T10:27:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,193
java
package vn.com.vndirect.domain; @SuppressWarnings("serial") public class IfoStockExchangeViewId extends BaseBean implements java.io.Serializable { // Fields private String symbol; private String exchangeCode; private String exchangeName; // Constructors /** default constructor */ public IfoStockExchangeViewId() { } /** full constructor */ public IfoStockExchangeViewId(String symbol, String exchangeCode, String exchangeName) { this.symbol = symbol; this.exchangeCode = exchangeCode; this.exchangeName = exchangeName; } // Property accessors public String getSymbol() { return this.symbol; } public void setSymbol(String symbol) { this.symbol = symbol; } public String getExchangeCode() { return this.exchangeCode; } public void setExchangeCode(String exchangeCode) { this.exchangeCode = exchangeCode; } public String getExchangeName() { return this.exchangeName; } public void setExchangeName(String exchangeName) { this.exchangeName = exchangeName; } public boolean equals(Object other) { if ((this == other)) return true; if ((other == null)) return false; if (!(other instanceof IfoStockExchangeViewId)) return false; IfoStockExchangeViewId castOther = (IfoStockExchangeViewId) other; return ((this.getSymbol() == castOther.getSymbol()) || (this.getSymbol() != null && castOther.getSymbol() != null && this.getSymbol().equals(castOther.getSymbol()))) && ((this.getExchangeCode() == castOther.getExchangeCode()) || (this.getExchangeCode() != null && castOther.getExchangeCode() != null && this.getExchangeCode().equals( castOther.getExchangeCode()))) && ((this.getExchangeName() == castOther.getExchangeName()) || (this.getExchangeName() != null && castOther.getExchangeName() != null && this.getExchangeName().equals( castOther.getExchangeName()))); } public int hashCode() { int result = 17; result = 37 * result + (getSymbol() == null ? 0 : this.getSymbol().hashCode()); result = 37 * result + (getExchangeCode() == null ? 0 : this.getExchangeCode().hashCode()); result = 37 * result + (getExchangeName() == null ? 0 : this.getExchangeName().hashCode()); return result; } }
[ "minh.nguyen@vndirect.com.vn" ]
minh.nguyen@vndirect.com.vn
23aba7651936c93f571a7d4a8a61303db54145bd
f6d940ecc5f0e1b844a5727abc90170761ccec18
/src/test/java/me/khmoon/demojpa3/post/PostRepositoryTest.java
6facd7c107024f008e5e60b642ea070c5ef5bd8b
[]
no_license
mgh3326/demo-jpa3
e812b472fc7c2320402b0cc2b46fb820324608b7
4a2c4b686b18310df9e47b3a79498763c416a3e7
refs/heads/master
2022-07-06T01:41:24.646603
2019-07-23T05:10:40
2019-07-23T05:10:40
198,185,286
0
0
null
2019-11-30T06:39:39
2019-07-22T08:56:19
Java
UTF-8
Java
false
false
1,147
java
package me.khmoon.demojpa3.post; import me.khmoon.demojpa3.post.Post; import me.khmoon.demojpa3.post.PostPublishedEvent; import me.khmoon.demojpa3.post.PostRepository; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.jdbc.DataJdbcTest; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) @DataJpaTest @Import(PostRepositoryTestConfig.class) public class PostRepositoryTest { @Autowired PostRepository postRepository; @Test public void crud() { Post post = new Post(); post.setTitle("hipernate"); assertThat(postRepository.contains(post)).isFalse(); postRepository.save(post.publish()); assertThat(postRepository.contains(post)).isTrue(); postRepository.delete(post); postRepository.flush(); } }
[ "mgh3326@naver.com" ]
mgh3326@naver.com
dfacb9ff18df92294580782eeb07b224cadb1a64
6d1f8f90cfbe9cbf0a109e2325ca3f9656e35ba1
/src/com/xiaolianhust/leetcode/easy/BinaryTreeLevelOrderTraversalII.java
63b8568dce0e0c7f2b616352c1b792b6601aa0f4
[]
no_license
hustxiaolian/LeetCodeSulotion
a29841e01952e25f11dc98869cbf6d026b9f131a
1179c45dc963107406e28050d574356a82762aaa
refs/heads/master
2021-07-15T07:27:59.138624
2018-12-11T07:01:56
2018-12-11T07:01:56
129,014,664
0
0
null
null
null
null
GB18030
Java
false
false
1,691
java
package com.xiaolianhust.leetcode.easy; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import com.xiaolianhust.leetcode.medium.UniqueBinarySearchTreesII.TreeNode; public class BinaryTreeLevelOrderTraversalII { public static void main(String[] args) { // TODO Auto-generated method stub } /** * 第一种思路: * 这类似的题目,我貌似在数据结构与算法导论的书上提到过。使用后今后出队列来做. * 具体步骤: * 1. 首先把root放入队列. * 2. 取出队列中最前面的节点。判断它是否有左右节点。有的话放入队列中 * 3. 外层循环为深度向下迭代,内层为当前深度下所有节点的遍历。 * * test1: 2ms, beats 96.27%ε=ε=ε=┏(゜ロ゜;)┛ * @param root * @return */ public List<List<Integer>> levelOrderBottom(TreeNode root) { //初始化变量,并且处理特殊情况 LinkedList<List<Integer>> result = new LinkedList<>(); if(root == null) return result; LinkedList<TreeNode> queue = new LinkedList<>(); int cnt = 1;//记录当前深度下,节点的个数 //将根节点放入队列中 queue.add(root); while(cnt != 0) { int nextCnt = 0;//记录下一个深度下节点的个数 List<Integer> oneAns = new ArrayList<>(); for(int i = 0;i < cnt;++i) { TreeNode t = queue.removeFirst(); oneAns.add(t.val); if(t.left != null) { ++nextCnt; queue.addLast(t.left); } if(t.right != null) { ++nextCnt; queue.addLast(t.right); } } result.addFirst(oneAns); cnt = nextCnt; } return result; } }
[ "2504033134@qq.com" ]
2504033134@qq.com
2ea2e7a8f7200b4512fa7662dc2ff879b04d5ed7
342e571310f8019a4fa8117b08897b9fb5736030
/src/main/java/com/firedata/qtacker/repository/MakerRepository.java
fd9d663e7d3998cb1ac141ef39bd3e9029d8681b
[]
no_license
Marko-Mijovic/qtacker-application
383ae9e2bd6c6d92d2555c8b79bdfca9d801851b
3f97152f208cb3347142b2bbc207c498469b6c6c
refs/heads/master
2022-04-14T04:03:28.834874
2020-04-15T00:32:04
2020-04-15T00:32:04
255,757,303
0
0
null
2020-04-15T00:32:42
2020-04-15T00:04:04
Java
UTF-8
Java
false
false
355
java
package com.firedata.qtacker.repository; import com.firedata.qtacker.domain.Maker; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the Maker entity. */ @SuppressWarnings("unused") @Repository public interface MakerRepository extends JpaRepository<Maker, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d13e7e6dc8c745d43098c2590e977cd939f42bb9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_0f4fe1c7c6f5c3733924d8f080c2451e41cc974c/ComponentRequestRouterFilter/18_0f4fe1c7c6f5c3733924d8f080c2451e41cc974c_ComponentRequestRouterFilter_t.java
12340ad39792b16c102f66040a0a2bb9249635ab
[]
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,576
java
/** * Copyright (C) 2000 - 2011 Silverpeas * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * As a special exception to the terms and conditions of version 3.0 of * the GPL, you may redistribute this Program in connection with Free/Libre * Open Source Software ("FLOSS") applications as described in Silverpeas's * FLOSS exception. You should have received a copy of the text describing * the FLOSS exception, and it is also available here: * "http://repository.silverpeas.com/legal/licensing" * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.silverpeas.whitePages.filters; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import com.stratelia.silverpeas.peasCore.URLManager; /** * Le filtre LoginFilter a pour effet de contrôler que l'utilisateur courant n'a pas une fiche à * remplir dans une instance de whitePages. Si c'est le cas, 2 attributs sont mis en sessions : - * RedirectToComponentId : componentId de l'instance pour que le mecanisme de redirection le renvoie * sur le composant - - forceCardCreation : componentId de l'instance Le filtre RequestRouterFilter * verifie la présence * @author Ludovic Bertin */ public class ComponentRequestRouterFilter implements Filter { /** * Configuration du filtre, permettant de récupérer les paramètres. */ FilterConfig config = null; /* * (non-Javadoc) * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, * javax.servlet.FilterChain) */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest hsRequest = (HttpServletRequest) request; String sURI = hsRequest.getRequestURI(); if (sURI.startsWith(URLManager.getApplicationURL() + "/R")) { /* * Retrieve main session controller */ HttpSession session = hsRequest.getSession(false); if(session == null){ chain.doFilter(request, response); return; } String componentId = (String) session .getAttribute(LoginFilter.ATTRIBUTE_FORCE_CARD_CREATION); // String sServletPath = hsRequest.getServletPath(); // String sPathInfo = hsRequest.getPathInfo(); String sRequestURL = hsRequest.getRequestURL().toString(); /* * If a user must be redirected to a card creation, just do it. */ if ((sRequestURL.indexOf("RpdcClassify") == -1) && (sRequestURL.indexOf("RwhitePages") == -1) && (sRequestURL.indexOf("Rclipboard") == -1) && (sRequestURL.indexOf("importCalendar") == -1) && (componentId != null)) { StringBuffer redirectURL = new StringBuffer(); redirectURL.append(URLManager.getURL(null, componentId)); redirectURL.append("ForceCardCreation"); RequestDispatcher dispatcher = request.getRequestDispatcher(redirectURL .toString()); dispatcher.forward(request, response); } else { chain.doFilter(request, response); } } else { chain.doFilter(request, response); } } /* * (non-Javadoc) * @see javax.servlet.Filter#getFilterConfig() */ public FilterConfig getFilterConfig() { return config; } /* * (non-Javadoc) * @see javax.servlet.Filter#setFilterConfig(javax.servlet.FilterConfig) */ public void setFilterConfig(FilterConfig arg0) { // this.config = config; } public void init(FilterConfig arg0) { // this.config = config; } public void destroy() { } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d595c5821167b6b48854308aef89fcf6d436ede2
2c319d505e8f6a21708be831e9b5426aaa86d61e
/web/security/src/main/java/leap/web/security/cookie/SecurityCookieBean.java
063f3170ca8dca1d712579dc5d77e7a16ab3063c
[ "Apache-2.0" ]
permissive
leapframework/framework
ed0584a1468288b3a6af83c1923fad2fd228a952
0703acbc0e246519ee50aa9957f68d931fab10c5
refs/heads/dev
2023-08-17T02:14:02.236354
2023-08-01T09:39:07
2023-08-01T09:39:07
48,562,236
47
23
Apache-2.0
2022-12-14T20:36:57
2015-12-25T01:54:52
Java
UTF-8
Java
false
false
1,400
java
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package leap.web.security.cookie; import leap.web.config.WebConfig; import leap.web.cookie.CookieBean; import leap.web.security.SecurityConfig; public class SecurityCookieBean extends CookieBean { protected SecurityConfig securityConfig; public SecurityCookieBean(WebConfig webConfig, SecurityConfig securityConfg, String cookieName) { super(webConfig, cookieName); this.securityConfig = securityConfg; } public String getCookieDomain() { String domain = securityConfig.getCookieDomain(); if(null == domain) { return super.getCookieDomain(); }else{ return domain; } } public boolean isCookieCrossContext() { return securityConfig.isCrossContext(); } }
[ "live.evan@gmail.com" ]
live.evan@gmail.com
09d91b8851e3ff8ba237783f672f52c816fdc8f1
9186be97ad0e7856636df4660e00b9a36ceeeb9a
/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/flag/Flag.java
4bb80c19bc2a7b9f9a29cf6743a113e19707faa1
[ "MIT" ]
permissive
gitter-badger/FoxGuard
a66e8cd5a7f3eda06d7fdd19eae6bce8c2810e53
8c4f5b62464073a689a48114e3bfd16910b61bfb
refs/heads/master
2021-01-21T08:33:16.758402
2016-07-18T12:44:15
2016-07-18T12:44:15
63,922,902
0
0
null
2016-07-22T04:12:10
2016-07-22T04:12:10
null
UTF-8
Java
false
false
1,835
java
/* * This file is part of FoxGuard, licensed under the MIT License (MIT). * * Copyright (c) gravityfox - https://gravityfox.net/ * Copyright (c) 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 net.foxdenstudio.sponge.foxguard.plugin.flag; /** * Created by Fox on 5/25/2016. */ public class Flag implements Comparable<Flag> { public final String name; public final int id; Flag(String name, int id) { this.name = name; this.id = id; } @Override public String toString() { return "FlagOld{" + name + "," + id + "}"; } public String getName() { return name; } public int getId() { return id; } @Override public int compareTo(Flag flag) { return this.id - flag.id; } }
[ "gravityreallyhatesme@gmail.com" ]
gravityreallyhatesme@gmail.com
ca3cddf07ec3c49f05b2ee9d191cc2430722e969
de3eb812d5d91cbc5b81e852fc32e25e8dcca05f
/branches/crux/4.1.0/OLD_CruxSite/src/org/cruxframework/cruxsite/client/resource/small/CssCruxSiteSmall.java
12436a2ac063dae1e90aa88538d69a8ad78032d6
[]
no_license
svn2github/crux-framework
7dd52a951587d4635112987301c88db23325c427
58bcb4821752b405a209cfc21fb83e3bf528727b
refs/heads/master
2016-09-06T13:33:41.975737
2015-01-22T08:03:25
2015-01-22T08:03:25
13,135,398
0
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
/* * Copyright 2013 cruxframework.org. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.cruxframework.cruxsite.client.resource.small; import com.google.gwt.resources.client.CssResource; /** * @author Thiago da Rosa de Bustamante * */ public interface CssCruxSiteSmall extends CssResource { // Site String header(); String headerMenu(); String buttonMenu(); String cruxLabel(); String cruxLogo(); // String view(); String footer(); String poweredLabel(); String poweredImage(); // Home View String contentAreas(); String contentLeft(); String contentCenter(); String contentRight(); String bannerAndNews(); String bannerArea(); String promoBanner(); String contentHorizontalSeparator(); String newsBoard(); String rssPanel(); // String shortcutsPanel(); // String menuShortcut(); // String headerMenuLabel(); // String siteContent(); // String siteFooter(); // String cruxLabelFooter(); // String cruxLabelFooter2(); // String cruxLabelFooter3(); // String cruxLabelFooter4(); // String labelFooter(); // String footerContent(); String p(); String h1(); String shyText(); String shyLink(); String divDownTxt(); String divDownTxtTitle(); String communityContent(); String blockTypes(); String blockTypes2(); String siteTutorial(); String donwloadButton(); }
[ "thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c" ]
thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c
237c53ae90a158a3beec925f8ba71cadd29d25ec
d7462ec35d59ed68f306b291bd8e505ff1d65946
/service/template/src/main/java/com/alibaba/citrus/service/template/impl/TemplateSearchingStrategy.java
0b826e4a902d8c4bc1893150ab3775393da0307a
[]
no_license
ixijiass/citrus
e6d10761697392fa51c8a14d4c9f133f0a013265
53426f1d73cc86c44457d43fb8cbe354ecb001fd
refs/heads/master
2023-05-23T13:06:12.253428
2021-06-15T13:05:59
2021-06-15T13:05:59
368,477,372
0
0
null
null
null
null
GB18030
Java
false
false
1,222
java
/* * Copyright 2010 Alibaba Group Holding Limited. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.alibaba.citrus.service.template.impl; /** * 由<code>TemplateService</code>调用的,用来查找template的strategy。 * * @author Michael Zhou */ public interface TemplateSearchingStrategy { /** * 取得用来缓存模板搜索结果的key。 */ Object getKey(String templateName); /** * 查找template,如果找到,则返回<code>true</code>。 * <p> * 可更改matcher参数中的模板名称和后缀。 * </p> */ boolean findTemplate(TemplateMatcher matcher); }
[ "isheng19982qrr@126.com" ]
isheng19982qrr@126.com
51763fffc90a24f38620d5080ffffd5bc41f4470
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_67530fe10a5b83da3780b23d977b809bf82221fb/BlockRedNetLogic/23_67530fe10a5b83da3780b23d977b809bf82221fb_BlockRedNetLogic_t.java
9ff762dbc0294cc998f6881d73d60dd8c298724c
[]
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
7,007
java
package powercrystals.minefactoryreloaded.block; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; import powercrystals.minefactoryreloaded.MineFactoryReloadedCore; import powercrystals.minefactoryreloaded.api.rednet.IConnectableRedNet; import powercrystals.minefactoryreloaded.api.rednet.RedNetConnectionType; import powercrystals.minefactoryreloaded.core.BlockNBTManager; import powercrystals.minefactoryreloaded.core.MFRUtil; import powercrystals.minefactoryreloaded.gui.MFRCreativeTab; import powercrystals.minefactoryreloaded.item.ItemLogicUpgradeCard; import powercrystals.minefactoryreloaded.item.ItemRedNetMemoryCard; import powercrystals.minefactoryreloaded.item.ItemRedNetMeter; import powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetLogic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockRedNetLogic extends BlockContainer implements IConnectableRedNet { private int[] _sideRemap = new int[] { 3, 1, 2, 0 }; public BlockRedNetLogic(int id) { super(id, Material.clay); setUnlocalizedName("mfr.rednet.logic"); setHardness(0.8F); setCreativeTab(MFRCreativeTab.tab); } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity, ItemStack stack) { if(entity == null) { return; } TileEntity te = world.getBlockTileEntity(x, y, z); if(te instanceof TileEntityRedNetLogic) { int facing = MathHelper.floor_double((entity.rotationYaw * 4F) / 360F + 0.5D) & 3; if(facing == 0) { world.setBlockMetadataWithNotify(x, y, z, 3, 3); } else if(facing == 1) { world.setBlockMetadataWithNotify(x, y, z, 0, 3); } else if(facing == 2) { world.setBlockMetadataWithNotify(x, y, z, 1, 3); } else if(facing == 3) { world.setBlockMetadataWithNotify(x, y, z, 2, 3); } if(stack.hasTagCompound()) { stack.getTagCompound().setInteger("x", x); stack.getTagCompound().setInteger("y", y); stack.getTagCompound().setInteger("z", z); te.readFromNBT(stack.getTagCompound()); } } } @Override public void breakBlock(World world, int x, int y, int z, int blockId, int meta) { BlockNBTManager.setForBlock(world.getBlockTileEntity(x, y, z)); super.breakBlock(world, x, y, z, blockId, meta); } @Override public TileEntity createNewTileEntity(World world) { return new TileEntityRedNetLogic(); } @Override public RedNetConnectionType getConnectionType(World world, int x, int y, int z, ForgeDirection side) { TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z); if(logic != null && side.ordinal() > 1 && side.ordinal() < 6) { if(world.getBlockMetadata(x, y, z) == _sideRemap[side.ordinal() - 2]) { return RedNetConnectionType.None; } } return RedNetConnectionType.CableAll; } @Override public int getOutputValue(World world, int x, int y, int z, ForgeDirection side, int subnet) { TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z); if(logic != null) { return logic.getOutputValue(side, subnet); } else { return 0; } } @Override public int[] getOutputValues(World world, int x, int y, int z, ForgeDirection side) { TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z); if(logic != null) { return logic.getOutputValues(side); } else { return new int[16]; } } @Override public void onInputsChanged(World world, int x, int y, int z, ForgeDirection side, int[] inputValues) { TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z); if(logic != null) { logic.onInputsChanged(side, inputValues); } } @Override public void onInputChanged(World world, int x, int y, int z, ForgeDirection side, int inputValue) { } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset) { PlayerInteractEvent e = new PlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, x, y, z, side); if(MinecraftForge.EVENT_BUS.post(e) || e.getResult() == Result.DENY || e.useBlock == Result.DENY) { return false; } if(MFRUtil.isHoldingHammer(player)) { int nextMeta = world.getBlockMetadata(x, y, z) + 1; if(nextMeta > 3) { nextMeta = 0; } world.setBlockMetadataWithNotify(x, y, z, nextMeta, 3); return true; } else if(MFRUtil.isHolding(player, ItemLogicUpgradeCard.class)) { TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z); if(logic != null) { if(logic.insertUpgrade(player.inventory.getCurrentItem().getItemDamage() + 1)); { if(!player.capabilities.isCreativeMode) { player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } return true; } } return false; } else if(!MFRUtil.isHolding(player, ItemRedNetMeter.class) && !MFRUtil.isHolding(player, ItemRedNetMemoryCard.class)) { player.openGui(MineFactoryReloadedCore.instance(), 0, world, x, y, z); return true; } return false; } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister ir) { blockIcon = ir.registerIcon("powercrystals/minefactoryreloaded/" + getUnlocalizedName()); } @Override public int getRenderType() { return MineFactoryReloadedCore.renderIdRedNetLogic; } @Override public boolean isOpaqueCube() { return false; } @Override public boolean isBlockNormalCube(World world, int x, int y, int z) { return false; } @Override public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) { return true; } @Override public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); ItemStack prc = new ItemStack(idDropped(blockID, world.rand, fortune), 1, damageDropped(0)); prc.setTagCompound(BlockNBTManager.getForBlock(x, y, z)); drops.add(prc); return drops; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1b682d5cdc4c765b73b8cd83b8796efc671eb96f
146ab29e1d12a238c01019bb0c331790d97ecde7
/src/main/java/com/mashibing/controller/base/TblDbbackupController.java
42af3779ff870dd9721c32a2f6eb395f63f7dc8f
[]
no_license
DT0352/family_service
9d4477af02e934614bc710b1f3f54bed1fe5856b
50dc5801dd74c0030f80f0c9a0588106174d0d40
refs/heads/master
2023-02-16T14:31:22.413132
2021-01-09T07:37:47
2021-01-09T07:37:47
328,101,063
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.mashibing.controller.base; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; /** * <p> * 数据库备份 前端控制器 * </p> * * @author lian * @since 2021-01-09 */ @Controller @RequestMapping("/tblDbbackup") public class TblDbbackupController { }
[ "18535222330fzd@gmail.com" ]
18535222330fzd@gmail.com
726755b9dd19c72ecc1ec46efc5b3d471970bcb6
04ac638cc2851e216b6edd6578df19ae599f156c
/results/Nopol-Test-Runing-Result/math/57/193/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint_ESTest.java
6f4e9620e2d7c5884c48d978f8c1fcdebb0cf25c
[]
no_license
tdurieux/test4repair-experiments
9f719d72de7d67b53b7e7936b21763dbd2dc48d0
c90e85a1c3759b4c40f0e8f7468bd8213c729674
refs/heads/master
2021-01-25T05:10:07.540557
2017-06-06T12:25:20
2017-06-06T12:25:20
93,516,208
0
0
null
2017-06-06T12:32:05
2017-06-06T12:32:05
null
UTF-8
Java
false
false
8,067
java
package org.apache.commons.math.stat.clustering; public class EuclideanIntegerPoint_ESTest extends org.apache.commons.math.stat.clustering.EuclideanIntegerPoint_ESTest_scaffolding { @org.junit.Test(timeout = 4000) public void test00() throws java.lang.Throwable { int[] intArray0 = new int[9]; intArray0[6] = -1; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); euclideanIntegerPoint0.hashCode(); } @org.junit.Test(timeout = 4000) public void test01() throws java.lang.Throwable { int[] intArray0 = new int[9]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = new int[9]; intArray1[6] = 8; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray1); boolean boolean0 = euclideanIntegerPoint0.equals(euclideanIntegerPoint1); org.junit.Assert.assertFalse(boolean0); org.junit.Assert.assertFalse(euclideanIntegerPoint1.equals(((java.lang.Object)(euclideanIntegerPoint0)))); } @org.junit.Test(timeout = 4000) public void test02() throws java.lang.Throwable { int[] intArray0 = new int[2]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = new int[9]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray1); boolean boolean0 = euclideanIntegerPoint0.equals(euclideanIntegerPoint1); org.junit.Assert.assertFalse(boolean0); } @org.junit.Test(timeout = 4000) public void test03() throws java.lang.Throwable { int[] intArray0 = new int[3]; intArray0[2] = 1135; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); java.util.LinkedList<org.apache.commons.math.stat.clustering.EuclideanIntegerPoint> linkedList0 = new java.util.LinkedList<org.apache.commons.math.stat.clustering.EuclideanIntegerPoint>(); linkedList0.add(euclideanIntegerPoint0); org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = euclideanIntegerPoint0.centroidOf(linkedList0); org.junit.Assert.assertTrue(euclideanIntegerPoint1.equals(((java.lang.Object)(euclideanIntegerPoint0)))); } @org.junit.Test(timeout = 4000) public void test04() throws java.lang.Throwable { int[] intArray0 = new int[3]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = euclideanIntegerPoint0.getPoint(); org.junit.Assert.assertSame(intArray0, intArray1); } @org.junit.Test(timeout = 4000) public void test05() throws java.lang.Throwable { int[] intArray0 = new int[0]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = euclideanIntegerPoint0.getPoint(); org.junit.Assert.assertSame(intArray0, intArray1); } @org.junit.Test(timeout = 4000) public void test06() throws java.lang.Throwable { int[] intArray0 = new int[9]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = new int[9]; intArray1[6] = -1; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray1); double double0 = euclideanIntegerPoint0.distanceFrom(euclideanIntegerPoint1); org.junit.Assert.assertEquals(1.0, double0, 0.01); } @org.junit.Test(timeout = 4000) public void test14() throws java.lang.Throwable { org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(((int[])(null))); int[] intArray0 = euclideanIntegerPoint0.getPoint(); org.junit.Assert.assertNull(intArray0); } @org.junit.Test(timeout = 4000) public void test15() throws java.lang.Throwable { int[] intArray0 = new int[3]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); java.lang.String string0 = euclideanIntegerPoint0.toString(); org.junit.Assert.assertEquals("(0,0,0)", string0); } @org.junit.Test(timeout = 4000) public void test16() throws java.lang.Throwable { int[] intArray0 = new int[9]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = new int[9]; intArray1[6] = -1; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray1); boolean boolean0 = euclideanIntegerPoint0.equals(euclideanIntegerPoint1); org.junit.Assert.assertFalse(boolean0); org.junit.Assert.assertFalse(euclideanIntegerPoint1.equals(((java.lang.Object)(euclideanIntegerPoint0)))); } @org.junit.Test(timeout = 4000) public void test17() throws java.lang.Throwable { int[] intArray0 = new int[11]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); int[] intArray1 = new int[9]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint1 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray1); boolean boolean0 = euclideanIntegerPoint0.equals(euclideanIntegerPoint1); org.junit.Assert.assertFalse(euclideanIntegerPoint1.equals(((java.lang.Object)(euclideanIntegerPoint0)))); org.junit.Assert.assertFalse(boolean0); } @org.junit.Test(timeout = 4000) public void test18() throws java.lang.Throwable { int[] intArray0 = new int[11]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); java.lang.Object object0 = new java.lang.Object(); boolean boolean0 = euclideanIntegerPoint0.equals(object0); org.junit.Assert.assertFalse(boolean0); } @org.junit.Test(timeout = 4000) public void test19() throws java.lang.Throwable { int[] intArray0 = new int[11]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); boolean boolean0 = euclideanIntegerPoint0.equals(euclideanIntegerPoint0); org.junit.Assert.assertTrue(boolean0); } @org.junit.Test(timeout = 4000) public void test21() throws java.lang.Throwable { int[] intArray0 = new int[11]; org.apache.commons.math.stat.clustering.EuclideanIntegerPoint euclideanIntegerPoint0 = new org.apache.commons.math.stat.clustering.EuclideanIntegerPoint(intArray0); euclideanIntegerPoint0.distanceFrom(euclideanIntegerPoint0); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
406703fde2d9f258ab761adbe5b921eade4b704a
fa9772cbce46cf1f0a193238427ceef0f3cf0142
/src/table/model/MediaTableModel.java
1fbd9a3d94e1527dac80f4ee2543304f10d9b69b
[]
no_license
robgura/PictureOrganizer
226cae32ff6ce04450b575da8f5f7df6dc91102f
4f13bc889a2bf151b590f361c83b28805b1f8dfb
refs/heads/master
2022-06-24T15:42:18.883154
2013-01-24T04:42:19
2013-01-24T04:42:19
261,894,569
0
0
null
null
null
null
UTF-8
Java
false
false
4,083
java
package table.model; import java.io.File; import java.util.ArrayList; import java.util.Calendar; import javax.swing.ImageIcon; import javax.swing.table.AbstractTableModel; import cameragroup.model.GroupData; @SuppressWarnings("serial") public class MediaTableModel extends AbstractTableModel { public static final int FILE_NAME_COLUMN = 0; public static final int GROUP_COLUMN = 1; public static final int IMAGE_COLUMN = 2; public static final int MODEL_COLUMN = 3; public static final int DATE_COLUMN = 4; public static final int COLUMN_COUNT = 5; public MediaTableModel() { groupings = new ArrayList<IGrouping>(); } public void addGrouping(IGrouping grouping) { groupings.add(grouping); } @Override public int getColumnCount() { return COLUMN_COUNT; } @Override public String getColumnName(int column) { if(column == FILE_NAME_COLUMN) { return "File Name"; } if(column == GROUP_COLUMN) { return "Group"; } if(column == MODEL_COLUMN) { return "Model"; } if(column == DATE_COLUMN) { return "Date"; } if(column == IMAGE_COLUMN) { return "Image"; } return super.getColumnName(column); } @Override public int getRowCount() { if(mediaDatas == null) { return 0; } return mediaDatas.size(); } @Override public Object getValueAt(int row, int column) { MediaData data = mediaDatas.get(row); if(column == FILE_NAME_COLUMN) { return data.getFile().getAbsolutePath(); } if(column == IMAGE_COLUMN) { return new ImageIcon(data.getImage()); } if(column == GROUP_COLUMN) { return data.getGroupData().getName(); } if(column == MODEL_COLUMN) { return data.getCameraModel(); } if(column == DATE_COLUMN) { return data.getCreationDate(); } if(column == 5) { return data.getNewFileName(); } return Integer.toString(row + 1) + " - " + Integer.toString(column + 1); } @Override public Class<?> getColumnClass(int columnIndex) { if(columnIndex == IMAGE_COLUMN) { return ImageIcon.class; } if(columnIndex == DATE_COLUMN) { return Calendar.class; } return super.getColumnClass(columnIndex); } public void readDirectory(File newDir) { loadDirectoryInfo(newDir); fireTableDataChanged(); } public void updateGroup(String name) { int i = 0; for(MediaData mediaData : mediaDatas) { if(mediaData.getGroupData().getName().compareTo(name) == 0) { this.fireTableRowsUpdated(i, i); } ++i; } } public void showThumbnail(int row) { MediaData mediaData = mediaDatas.get(row); mediaData.createThumbnail(); this.fireTableCellUpdated(row, IMAGE_COLUMN); } public void changeGroup(int row, GroupData groupData) { MediaData mediaData = mediaDatas.get(row); if(mediaData.getGroupData() != groupData) { mediaData.setGroupData(groupData); this.fireTableRowsUpdated(row, row); } } public ArrayList<MediaData> getMediaDatas() { return mediaDatas; } private void addToGroups(MediaData mediaData) { for(IGrouping g : groupings) { g.AddNewMediaDataToGroup(mediaData); } } private void loadDirectoryInfo(File directory) { HackFileNameExtensionFilter filter = new HackFileNameExtensionFilter("Media", "jpg", "jpeg", "avi", "mts", "mpg", "mpeg", "mov"); File[] mediaFiles = directory.listFiles(filter); mediaDatas = new ArrayList<MediaData>(mediaFiles.length); for(int i = 0; i < mediaFiles.length; ++i) { try { MediaData mediaData = new MediaData(mediaFiles[i]); mediaDatas.add(mediaData); addToGroups(mediaData); } catch (NotMedia e) { System.err.println("Found non media type " + mediaFiles[i].getAbsolutePath()); } } } private ArrayList<MediaData> mediaDatas; //private CameraGroupMgr cameraGroupMgr; private ArrayList<IGrouping> groupings; }
[ "devnull@localhost" ]
devnull@localhost
e669f6e7dafe8ed3ca1a4b3d3d89fad71b6645e7
2e18dcce491989de3d765b67b9940c7debbe866b
/catalogo-jee14-java/src/main/java/com/valhala/jee14/catalogo/patterns/factory/Factory.java
bb676b47af5ddc1a60124b1299cfe99646a40eaa
[]
no_license
BrunoLV/catalogo-jee14
6fe6e33a9349d2c2c08ecf97be5603c82e4c10d6
5ede8a8351a707daf2e331697271553d9dcf376d
refs/heads/master
2021-01-01T16:19:32.053924
2015-01-04T18:10:28
2015-01-04T18:14:03
28,726,479
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package com.valhala.jee14.catalogo.patterns.factory; import com.valhala.jee14.catalogo.patterns.factory.exception.FactoryException; public interface Factory { Object obterObjeto() throws FactoryException; Object obterObjeto(final int opcaoDao) throws FactoryException; }
[ "brunolviana22@hotmail.com" ]
brunolviana22@hotmail.com
8f5d3a08bf57591da47dadd3cf253ff61b3a6ca7
c278b2e06e98b0b99ca7350cfc12d2e535db1841
/account/account-api/src/main/java/com/yl/account/api/bean/response/AccountQueryResponse.java
78de4ae311c3297e40bf875b99b3e752640535c7
[]
no_license
SplendorAnLin/paymentSystem
ea778c03179a36755c52498fd3f5f1a5bbeb5d34
db308a354a23bd3a48ff88c16b29a43c4e483e7d
refs/heads/master
2023-02-26T14:16:27.283799
2022-10-20T07:50:35
2022-10-20T07:50:35
191,535,643
5
6
null
2023-02-22T06:42:24
2019-06-12T09:01:15
Java
UTF-8
Java
false
false
947
java
/** * */ package com.yl.account.api.bean.response; import java.util.List; import com.lefu.commons.utils.Page; import com.yl.account.api.bean.AccountBean; import com.yl.account.api.bean.BussinessResponse; /** * 账户信息查询响应 * * @author 聚合支付有限公司 * @since 2016年5月22日 * @version V1.0.0 */ public class AccountQueryResponse extends BussinessResponse { private static final long serialVersionUID = 2738343722378764817L; private Page<?> page; private List<AccountBean> accountBeans; public Page<?> getPage() { return page; } public void setPage(Page<?> page) { this.page = page; } public List<AccountBean> getAccountBeans() { return accountBeans; } public void setAccountBeans(List<AccountBean> accountBeans) { this.accountBeans = accountBeans; } @Override public String toString() { return "AccountQueryResponse [page=" + page + ", accountBeans=" + accountBeans + "]"; } }
[ "zl88888@live.com" ]
zl88888@live.com
d8e038e6cb6e2241043dc0789f63a24ca41cb5bc
ff1fa232add9298921cba67377bdb06ed64544b6
/chapter-07-other-web-frameworks/coursemanager-gwt/src/main/java/org/rooinaction/coursemanager/web/gwt/requests/RegistrationRequest.java
e1974defd2b2979ac2bcd273c166b2d1f5f62300
[]
no_license
tsuji/spring-roo-in-action-examples
a60f1b74997101635caffdd9d19c351d5d0af079
a2dd5af5cdd0a6ae1817bf896c7a3dffc38f954a
refs/heads/master
2021-01-18T08:21:55.457227
2013-01-30T18:26:41
2013-01-30T18:26:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
// WARNING: THIS FILE IS MANAGED BY SPRING ROO. package org.rooinaction.coursemanager.web.gwt.requests; import com.google.web.bindery.requestfactory.shared.InstanceRequest; import com.google.web.bindery.requestfactory.shared.Request; import com.google.web.bindery.requestfactory.shared.RequestContext; import com.google.web.bindery.requestfactory.shared.ServiceName; import java.util.Date; import org.rooinaction.coursemanager.web.gwt.proxies.OfferingProxy; import org.rooinaction.coursemanager.web.gwt.proxies.StudentProxy; import org.springframework.roo.addon.gwt.RooGwtRequest; @RooGwtRequest(value = "org.rooinaction.coursemanager.model.Registration", exclude = { "clear", "entityManager", "equals", "flush", "hashCode", "merge", "toString" }) @ServiceName("org.rooinaction.coursemanager.model.Registration") public interface RegistrationRequest extends RequestContext { abstract Request<java.lang.Long> countRegistrations(); abstract Request<java.util.List<org.rooinaction.coursemanager.web.gwt.proxies.RegistrationProxy>> findAllRegistrations(); abstract Request<java.util.List<org.rooinaction.coursemanager.web.gwt.proxies.RegistrationProxy>> findRegistrationEntries(int firstResult, int maxResults); abstract Request<org.rooinaction.coursemanager.web.gwt.proxies.RegistrationProxy> findRegistration(Long id); abstract InstanceRequest<org.rooinaction.coursemanager.web.gwt.proxies.RegistrationProxy, java.lang.Void> persist(); abstract InstanceRequest<org.rooinaction.coursemanager.web.gwt.proxies.RegistrationProxy, java.lang.Void> remove(); }
[ "krimple@chariotsolutions.com" ]
krimple@chariotsolutions.com
c2c67da366becf64a42fe20f635b5694595fe917
3ccc3cedfd71942692b66b189e21079f93e4fe4c
/AL-Game/src/com/aionemu/gameserver/dataholders/ConquestPortalData.java
8dd6995dfe0d33ba2fdfc9030f7ba91eae61adf2
[]
no_license
Ritchiee/Aion-Lightning-5.0-SRC
5a4d4ce0bb5c88c05d05c9eb1132409e0dcf1c50
6a2f3f6e75572d05f299661373a5a34502f192ab
refs/heads/master
2020-03-10T03:44:00.991145
2018-02-27T17:20:53
2018-02-27T17:20:53
129,173,070
1
0
null
2018-04-12T01:06:26
2018-04-12T01:06:26
null
UTF-8
Java
false
false
1,623
java
/** c * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.dataholders; 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 com.aionemu.gameserver.model.templates.portal.ConquestPortal; import javolution.util.FastList; /** * @author CoolyT */ @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "conquest_portals") public class ConquestPortalData { @XmlElement(name = "portal") public FastList<ConquestPortal> portals = new FastList<ConquestPortal>(); public int size() { return portals.size(); } public ConquestPortal getPortalbyNpcId(int id) { for (ConquestPortal portal : portals) { if (portal.npcId == id) return portal; } return null; } public FastList<ConquestPortal> getPortals() { return portals; } }
[ "michelgorter@outlook.com" ]
michelgorter@outlook.com
1fe137ce1dc519a6003edf9594e299f9c614b492
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/Libraries/layouts/AbstractLayout.java
be8132b6ee69c1a67996eab136c61a610672975f
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,293
java
package com.planet_ink.coffee_mud.Libraries.layouts; import java.util.*; import com.planet_ink.coffee_mud.core.CMStrings; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.AreaGenerationLibrary.LayoutNode; import com.planet_ink.coffee_mud.Libraries.interfaces.AreaGenerationLibrary.*; import com.planet_ink.coffee_mud.core.Directions; /* Copyright 2007-2014 Bo Zimmerman 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. */ /** * Abstract area layout pattern * node tags: * nodetype: surround, leaf, offleaf, street, square, interior * nodeexits: n,s,e,w, n,s, e,w, n,e,w, etc * nodeflags: corner, gate, intersection, tee * NODEGATEEXIT: (for gate, offleaf, square): n s e w etc * noderun: (for surround, street): n,s e,w * * @author Bo Zimmerman */ public abstract class AbstractLayout implements LayoutManager { Random r = new Random(); public int diff(int width, int height, int num) { final int x = width * height; return (x<num) ? (num - x) : (x - num); } @Override public abstract String name(); @Override public abstract List<LayoutNode> generate(int num, int dir); public static int getDirection(LayoutNode from, LayoutNode to) { if(to.coord()[1]<from.coord()[1]) return Directions.NORTH; if(to.coord()[1]>from.coord()[1]) return Directions.SOUTH; if(to.coord()[0]<from.coord()[0]) return Directions.WEST; if(to.coord()[0]>from.coord()[0]) return Directions.EAST; return -1; } public static LayoutRuns getRunDirection(int dirCode) { switch(dirCode) { case Directions.NORTH: case Directions.SOUTH: return LayoutRuns.ns; case Directions.EAST: case Directions.WEST: return LayoutRuns.ew; } return LayoutRuns.ns; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
a0ab78d91e7a3ee4edaf067514ed86680aee5551
72300177cbf06804b025b363d08770abe2e8f8b7
/src/main/java/me/earth/phobos/mixin/mixins/MixinEntityPlayerSP.java
4a945c30316f855397d5cb10aee2a05e9c0620ff
[]
no_license
IceCruelStuff/Phobos-1.9.0-BUILDABLE-SRC
b1f0e5dd8e12d681d3496b556ded70575bc6a331
cabebefe13a9ca747288a0abc1aaa9ff3c49a3fd
refs/heads/main
2023-03-24T18:43:55.223380
2021-03-21T02:05:21
2021-03-21T02:05:21
349,879,386
1
0
null
2021-03-21T02:06:44
2021-03-21T02:05:00
Java
UTF-8
Java
false
false
5,617
java
package me.earth.phobos.mixin.mixins; import me.earth.phobos.Phobos; import me.earth.phobos.event.events.ChatEvent; import me.earth.phobos.event.events.MoveEvent; import me.earth.phobos.event.events.PushEvent; import me.earth.phobos.event.events.UpdateWalkingPlayerEvent; import me.earth.phobos.features.modules.misc.BetterPortals; import me.earth.phobos.features.modules.movement.Speed; import me.earth.phobos.features.modules.movement.Sprint; import me.earth.phobos.util.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.entity.MoverType; import net.minecraft.stats.RecipeBook; import net.minecraft.stats.StatisticsManager; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.Event; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(value={EntityPlayerSP.class}, priority=9998) public abstract class MixinEntityPlayerSP extends AbstractClientPlayer { public MixinEntityPlayerSP(Minecraft p_i47378_1_, World p_i47378_2_, NetHandlerPlayClient p_i47378_3_, StatisticsManager p_i47378_4_, RecipeBook p_i47378_5_) { super(p_i47378_2_, p_i47378_3_.getGameProfile()); } @Inject(method={"sendChatMessage"}, at={@At(value="HEAD")}, cancellable=true) public void sendChatMessage(String message, CallbackInfo callback) { ChatEvent chatEvent = new ChatEvent(message); MinecraftForge.EVENT_BUS.post((Event)chatEvent); } @Redirect(method={"onLivingUpdate"}, at=@At(value="INVOKE", target="Lnet/minecraft/client/entity/EntityPlayerSP;closeScreen()V")) public void closeScreenHook(EntityPlayerSP entityPlayerSP) { if (!BetterPortals.getInstance().isOn() || !BetterPortals.getInstance().portalChat.getValue().booleanValue()) { entityPlayerSP.closeScreen(); } } @Redirect(method={"onLivingUpdate"}, at=@At(value="INVOKE", target="Lnet/minecraft/client/Minecraft;displayGuiScreen(Lnet/minecraft/client/gui/GuiScreen;)V")) public void displayGuiScreenHook(Minecraft mc, GuiScreen screen) { if (!BetterPortals.getInstance().isOn() || !BetterPortals.getInstance().portalChat.getValue().booleanValue()) { mc.displayGuiScreen(screen); } } @Redirect(method={"onLivingUpdate"}, at=@At(value="INVOKE", target="Lnet/minecraft/client/entity/EntityPlayerSP;setSprinting(Z)V", ordinal=2)) public void onLivingUpdate(EntityPlayerSP entityPlayerSP, boolean sprinting) { if (Sprint.getInstance().isOn() && Sprint.getInstance().mode.getValue() == Sprint.Mode.RAGE && (Util.mc.player.movementInput.moveForward != 0.0f || Util.mc.player.movementInput.moveStrafe != 0.0f)) { entityPlayerSP.setSprinting(true); } else { entityPlayerSP.setSprinting(sprinting); } } @Inject(method={"pushOutOfBlocks"}, at={@At(value="HEAD")}, cancellable=true) private void pushOutOfBlocksHook(double x, double y, double z, CallbackInfoReturnable<Boolean> info) { PushEvent event = new PushEvent(1); MinecraftForge.EVENT_BUS.post((Event)event); if (event.isCanceled()) { info.setReturnValue(false); } } @Inject(method={"onUpdateWalkingPlayer"}, at={@At(value="HEAD")}, cancellable=true) private void preMotion(CallbackInfo info) { UpdateWalkingPlayerEvent event = new UpdateWalkingPlayerEvent(0); MinecraftForge.EVENT_BUS.post((Event)event); if (event.isCanceled()) { info.cancel(); } } @Redirect(method={"onUpdateWalkingPlayer"}, at=@At(value="FIELD", target="net/minecraft/util/math/AxisAlignedBB.minY:D")) private double minYHook(AxisAlignedBB bb) { if (Speed.getInstance().isOn() && Speed.getInstance().mode.getValue() == Speed.Mode.VANILLA && Speed.getInstance().changeY) { Speed.getInstance().changeY = false; return Speed.getInstance().minY; } return bb.minY; } @Inject(method={"onUpdateWalkingPlayer"}, at={@At(value="RETURN")}) private void postMotion(CallbackInfo info) { UpdateWalkingPlayerEvent event = new UpdateWalkingPlayerEvent(1); MinecraftForge.EVENT_BUS.post((Event)event); } @Inject(method={"Lnet/minecraft/client/entity/EntityPlayerSP;setServerBrand(Ljava/lang/String;)V"}, at={@At(value="HEAD")}) public void getBrand(String brand, CallbackInfo callbackInfo) { if (Phobos.serverManager != null) { Phobos.serverManager.setServerBrand(brand); } } @Redirect(method={"move"}, at=@At(value="INVOKE", target="Lnet/minecraft/client/entity/AbstractClientPlayer;move(Lnet/minecraft/entity/MoverType;DDD)V")) public void move(AbstractClientPlayer player, MoverType moverType, double x, double y, double z) { MoveEvent event = new MoveEvent(0, moverType, x, y, z); MinecraftForge.EVENT_BUS.post((Event)event); if (!event.isCanceled()) { super.move(event.getType(), event.getX(), event.getY(), event.getZ()); } } }
[ "hqrion@gmail.com" ]
hqrion@gmail.com
c485471d9ab2ebf3fb09f62ce297e2eeda58bc8f
5b8f0cbd2076b07481bd62f26f5916d09a050127
/src/B1358.java
d92af6a49632539adac8800efc42d7add5cba6d7
[]
no_license
micgogi/micgogi_algo
b45664de40ef59962c87fc2a1ee81f86c5d7c7ba
7cffe8122c04059f241270bf45e033b1b91ba5df
refs/heads/master
2022-07-13T00:00:56.090834
2022-06-15T14:02:51
2022-06-15T14:02:51
209,986,655
7
3
null
2020-10-20T07:41:03
2019-09-21T13:06:43
Java
UTF-8
Java
false
false
976
java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.reflect.Array; import java.util.Arrays; /** * @author Micgogi * on 7/1/2020 5:32 PM * Rahul Gogyani */ public class B1358 { public static void main(String[] args) { try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); while(t--!=0){ int n = Integer.parseInt(br.readLine()); int a[]; String s[] = br.readLine().split(" "); a = Arrays.stream(s).mapToInt(Integer::parseInt).toArray(); Arrays.sort(a); System.out.println(ans(a)); } }catch (Exception e){ } } public static int ans(int a[]){ for (int i = a.length-1; i >=0 ; i--) { if(a[i]<=i+1){ return i+2; } } return 1; } }
[ "rahul.gogyani@gmail.com" ]
rahul.gogyani@gmail.com
5cc8af233a63d7801743255301b52b75fc19f40d
b82ac609cb6773f65e283247f673c0f07bf09c6a
/week-07/day-1/src/main/java/spring/sql/practice/repository/ToDo.java
19d101cf9b171f222b3fcc50830217dfbb2d67a1
[]
no_license
green-fox-academy/scerios
03b2c2cc611a02f332b3ce1edd9743446b0a8a12
f829d62bdf1518e3e01dc125a98f90e484c9dce4
refs/heads/master
2020-04-02T22:36:36.470006
2019-01-07T16:38:20
2019-01-07T16:38:20
154,839,007
0
0
null
null
null
null
UTF-8
Java
false
false
612
java
package spring.sql.practice.repository; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class ToDo { @Id @GeneratedValue private long ID; private String title; private boolean isUrgent; private boolean isDone; public ToDo(String title) { this.title = title; this.isUrgent = false; this.isDone = false; } public long getID() { return ID; } public String getTitle() { return title; } public boolean isUrgent() { return isUrgent; } public boolean isDone() { return isDone; } }
[ "89.t.robert@gmail.com" ]
89.t.robert@gmail.com
214e2f6f47566bddd7d6053bce8664a6b7b2df9d
7033d33d0ce820499b58da1d1f86f47e311fd0e1
/org/newdawn/slick/openal/DeferredSound.java
91c8c07155f1437498959152235693bd2381eecd
[ "MIT" ]
permissive
gabrielvicenteYT/melon-client-src
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
refs/heads/master
2023-04-04T05:47:35.053136
2021-04-19T18:34:36
2021-04-19T18:34:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,681
java
package org.newdawn.slick.openal; import org.newdawn.slick.loading.*; import org.newdawn.slick.util.*; import java.io.*; public class DeferredSound extends AudioImpl implements DeferredResource { public static final int OGG = 1; public static final int WAV = 2; public static final int MOD = 3; public static final int AIF = 4; private int type; private String ref; private Audio target; private InputStream in; public DeferredSound(final String ref, final InputStream in, final int type) { this.ref = ref; this.type = type; if (ref.equals(in.toString())) { this.in = in; } LoadingList.get().add(this); } private void checkTarget() { if (this.target == null) { throw new RuntimeException("Attempt to use deferred sound before loading"); } } @Override public void load() throws IOException { final boolean before = SoundStore.get().isDeferredLoading(); SoundStore.get().setDeferredLoading(false); if (this.in != null) { switch (this.type) { case 1: { this.target = SoundStore.get().getOgg(this.in); break; } case 2: { this.target = SoundStore.get().getWAV(this.in); break; } case 3: { this.target = SoundStore.get().getMOD(this.in); break; } case 4: { this.target = SoundStore.get().getAIF(this.in); break; } default: { Log.error("Unrecognised sound type: " + this.type); break; } } } else { switch (this.type) { case 1: { this.target = SoundStore.get().getOgg(this.ref); break; } case 2: { this.target = SoundStore.get().getWAV(this.ref); break; } case 3: { this.target = SoundStore.get().getMOD(this.ref); break; } case 4: { this.target = SoundStore.get().getAIF(this.ref); break; } default: { Log.error("Unrecognised sound type: " + this.type); break; } } } SoundStore.get().setDeferredLoading(before); } @Override public boolean isPlaying() { this.checkTarget(); return this.target.isPlaying(); } @Override public int playAsMusic(final float pitch, final float gain, final boolean loop) { this.checkTarget(); return this.target.playAsMusic(pitch, gain, loop); } @Override public int playAsSoundEffect(final float pitch, final float gain, final boolean loop) { this.checkTarget(); return this.target.playAsSoundEffect(pitch, gain, loop); } @Override public int playAsSoundEffect(final float pitch, final float gain, final boolean loop, final float x, final float y, final float z) { this.checkTarget(); return this.target.playAsSoundEffect(pitch, gain, loop, x, y, z); } @Override public void stop() { this.checkTarget(); this.target.stop(); } @Override public String getDescription() { return this.ref; } }
[ "haroldthesenpai@gmail.com" ]
haroldthesenpai@gmail.com
8883400e3d5ffc5cf905a7b91826729d0245973c
dabc84aeaafa2eb63ffe0397e370ae3794079bba
/src/main/java/cc/before30/service/SchedulerService.java
5ad366b4645c2004d38c57f3e684c312b7b6b752
[]
no_license
before30/ddul-scheduler
3379b3df08693a1a8ff8b6cc5fde8914e2f9e6f5
20b5345b5d8a5e55e89f21bbc45b42a59e0047db
refs/heads/master
2021-01-20T08:36:59.886304
2019-02-15T01:36:20
2019-02-15T01:36:20
89,929,365
0
0
null
null
null
null
UTF-8
Java
false
false
1,750
java
package cc.before30.service; import cc.before30.config.DdulProperties; import com.github.seratch.jslack.Slack; import com.github.seratch.jslack.api.webhook.Payload; import com.github.seratch.jslack.api.webhook.WebhookResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import java.io.IOException; import java.time.ZoneId; import java.time.ZonedDateTime; /** * Created by before30 on 01/05/2017. */ @Slf4j @Component public class SchedulerService { @Autowired private Slack slack; @Autowired private DdulProperties ddulProperties; @Autowired private RestTemplate restTemplate; @Scheduled(cron = "0 1 7-23 * * *", zone = "Asia/Seoul") public void requestToWriteWhatDidUDo() { int hour = ZonedDateTime.now(ZoneId.of("Asia/Seoul")).getHour(); log.info("current hour : {}", hour); hour = (hour-1)>0?(hour-1)%24:23; Payload payload = Payload.builder() .channel(ddulProperties.getSlackChannelName()) .username("coach") .iconEmoji(":smile_cat:") .text("[" + hour + ":00-" + hour + ":59]: What did you do??" ) .build(); try { WebhookResponse send = slack.send(ddulProperties.getSlackWebhookUrl(), payload); log.info("{}", ddulProperties.getSlackWebhookUrl()); log.info("response {} {}", send.getCode(), send.getBody()); } catch (IOException e) { log.error("exception in sending message", e.getMessage()); } } }
[ "before30@gmail.com" ]
before30@gmail.com
1252e14c7f0bc7379791e41952a65165df1320bd
8a43ca36a71b430096c609e96889aae94e93ddc9
/spincast-plugins/spincast-plugins-jdbc-parent/spincast-plugins-jdbc/src/main/java/org/spincast/plugins/jdbc/utils/ItemsAndTotalCountDefault.java
219769027886484ea695779dd59359f388ab8d31
[ "Apache-2.0" ]
permissive
spincast/spincast-framework
18163ee0d5ed3571113ad6f3112cf7f951eee910
fc25e6e61f1d20643662ed94e42003b23fe651f6
refs/heads/master
2022-10-20T11:20:43.008571
2022-10-11T23:21:41
2022-10-11T23:21:41
56,924,959
48
0
null
null
null
null
UTF-8
Java
false
false
709
java
package org.spincast.plugins.jdbc.utils; import java.util.ArrayList; import java.util.List; public class ItemsAndTotalCountDefault<T> implements ItemsAndTotalCount<T> { private final List<T> items; private final long totalCount; /** * Empty result. */ public ItemsAndTotalCountDefault() { this.items = new ArrayList<T>(); this.totalCount = 0; } public ItemsAndTotalCountDefault(List<T> items, long totalCount) { this.items = items; this.totalCount = totalCount; } @Override public List<T> getItems() { return this.items; } @Override public long getTotalCount() { return this.totalCount; } }
[ "electrotype@gmail.com" ]
electrotype@gmail.com
46f3d1a9de5e7d09ae6a808f3acb84a49185df0e
3af6963d156fc1bf7409771d9b7ed30b5a207dc1
/runtime/src/main/java/apple/eventkitui/EKCalendarChooserDelegateAdapter.java
5ed120c6b8c6aa57364fa638069764f7efcbc63d
[ "Apache-2.0" ]
permissive
yava555/j2objc
1761d7ffb861b5469cf7049b51f7b73c6d3652e4
dba753944b8306b9a5b54728a40ca30bd17bdf63
refs/heads/master
2020-12-30T23:23:50.723961
2015-09-03T06:57:20
2015-09-03T06:57:20
48,475,187
0
0
null
2015-12-23T07:08:22
2015-12-23T07:08:22
null
UTF-8
Java
false
false
1,073
java
package apple.eventkitui; import java.io.*; import java.nio.*; import java.util.*; import com.google.j2objc.annotations.*; import com.google.j2objc.runtime.*; import com.google.j2objc.runtime.block.*; import apple.audiotoolbox.*; import apple.corefoundation.*; import apple.coregraphics.*; import apple.coreservices.*; import apple.foundation.*; import apple.eventkit.*; import apple.uikit.*; /*<javadoc>*/ /*</javadoc>*/ @Adapter public abstract class EKCalendarChooserDelegateAdapter extends Object implements EKCalendarChooserDelegate { @NotImplemented("calendarChooserSelectionDidChange:") public void didChangeSelection(EKCalendarChooser calendarChooser) { throw new UnsupportedOperationException(); } @NotImplemented("calendarChooserDidFinish:") public void didFinish(EKCalendarChooser calendarChooser) { throw new UnsupportedOperationException(); } @NotImplemented("calendarChooserDidCancel:") public void didCancel(EKCalendarChooser calendarChooser) { throw new UnsupportedOperationException(); } }
[ "pchen@sellegit.com" ]
pchen@sellegit.com
e76eb16786ccb5aba1f013d17f5e1bf6314a616a
5b14625d9a7851ec40c14a209af9e90acef51e0e
/mahjong/src/main/java/com/rafo/chess/model/battle/BattleStep.java
ae6fa94fc3a9fd7ff685b929a784df42ccc290f2
[]
no_license
leroyBoys/ChaoShanMaJiang
3d5807fac4cbd64e13800ddb5dd8e220fa96ea38
bd2364ed92abc8580f516427735ec9c3e3647bad
refs/heads/master
2020-03-08T02:02:18.317518
2018-05-16T08:37:06
2018-05-16T08:37:06
127,847,893
0
0
null
null
null
null
UTF-8
Java
false
false
4,731
java
package com.rafo.chess.model.battle; import com.rafo.chess.utils.MathUtils; import com.smartfoxserver.v2.entities.data.SFSObject; import org.apache.commons.lang.StringUtils; import java.util.*; /** * Created by Administrator on 2016/9/17. */ public class BattleStep { private int ownerId ; // 出牌玩家id private int targetId ; // 目标玩家id private int playType ; // 战斗类型 private List<Integer> card = new ArrayList<>(); // 牌值 private int remainCardCount ; // 剩余牌数 private boolean ignoreOther; private boolean auto =false; //是否自动打牌 private boolean isBettwenEnter = false;//是否中途进入 private boolean sendClient=true; /** 扩展字段*/ private SFSObject ex=new SFSObject(); public BattleStep(){ } public BattleStep(int ownerId, int targetId, int playType){ this.ownerId = ownerId; this.targetId = targetId; this.playType = playType; } public int getOwnerId() { return ownerId; } public void setOwnerId(int ownerId) { this.ownerId = ownerId; } public int getTargetId() { return targetId; } public boolean isSendClient() { return sendClient; } public void setSendClient(boolean sendClient) { this.sendClient = sendClient; } public boolean isBettwenEnter() { return isBettwenEnter; } public void setBettwenEnter(boolean bettwenEnter) { this.isBettwenEnter = bettwenEnter; } public void setTargetId(int targetId) { this.targetId = targetId; } public int getPlayType() { return playType; } public void setPlayType(int playType) { this.playType = playType; } public List<Integer> getCard() { return card; } public void setCard(List<Integer> card) { this.card = card; } public int getRemainCardCount() { return remainCardCount; } public void setRemainCardCount(int remainCardCount) { this.remainCardCount = remainCardCount; } public void addCard(Integer card) { this.card.add(card); } public boolean isIgnoreOther() { return ignoreOther; } public void setIgnoreOther(boolean ignoreOther) { this.ignoreOther = ignoreOther; } public boolean isAuto() { return auto; } public void setAuto(boolean auto) { this.auto = auto; } public void addExValueInt(exEnum key,int value){ ex.putInt(key.name(), value); } public SFSObject getEx() { return ex; } public void setEx(SFSObject ex) { this.ex = ex; } public BattleStep clone(){ BattleStep step = new BattleStep(); step.setOwnerId(ownerId); step.setTargetId(targetId); step.setPlayType(playType); List<Integer> nCards = new ArrayList<>(); for(Integer c : card){ nCards.add(c); } step.setAuto(auto); step.setCard(nCards); step.setRemainCardCount(remainCardCount); step.setEx(this.ex); step.setBettwenEnter(isBettwenEnter); return step; } public SFSObject toSFSObject(){ SFSObject obj = new SFSObject(); obj.putInt("oid",ownerId); obj.putInt("tid",targetId); obj.putInt("pt",playType); /* if(gangTingTypeCards.size() > 0){ obj.putSFSObject("cd", gangTingCardsToArray()); }else {*/ obj.putIntArray("cd", card); //} obj.putInt("rc",remainCardCount); if(auto) { obj.putInt("auto", 1); } obj.putBool("enter",isBettwenEnter); obj.putSFSObject("ex",ex); return obj; } public String toFormatString(){ StringBuffer sb = new StringBuffer("{"); sb.append("oid=").append(ownerId).append(","); sb.append("tid=").append(targetId).append(","); sb.append("pt=").append(playType).append(","); sb.append("rc=").append(remainCardCount).append(","); if(card != null){ sb.append("cd={").append(StringUtils.join(card, ",")).append("}").append(","); } if(!ex.getKeys().isEmpty()){ sb.append("ex=").append(MathUtils.FormateStringForLua(ex)).append(","); } if(auto){ sb.append("auto=").append(1).append(","); } sb.append("}"); return sb.toString(); } public enum exEnum{ /** * 抢杠胡 */ ht, /** * 抢杠胡的牌的剩余数量 */ qg, /** * 胡牌 */ hi, } }
[ "wlvxiaohui@163.com" ]
wlvxiaohui@163.com
bd5eba3a4fd5f8264f5858c4eb93ea2af704d473
6c8987d48d600fe9ad2640174718b68932ed4a22
/OpenCylocs-Gradle/src/main/java/nl/strohalm/cyclos/dao/access/PasswordHistoryLogDAO.java
8339c0ca115850c440b6f00f71d8863014a48078
[]
no_license
hvarona/ocwg
f89140ee64c48cf52f3903348349cc8de8d3ba76
8d4464ec66ea37e6ad10255efed4236457b1eacc
refs/heads/master
2021-01-11T20:26:38.515141
2017-03-04T19:49:40
2017-03-04T19:49:40
79,115,248
0
0
null
null
null
null
UTF-8
Java
false
false
1,537
java
/* This file is part of Cyclos (www.cyclos.org). A project of the Social Trade Organisation (www.socialtrade.org). Cyclos is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Cyclos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Cyclos; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package nl.strohalm.cyclos.dao.access; import nl.strohalm.cyclos.dao.BaseDAO; import nl.strohalm.cyclos.dao.InsertableDAO; import nl.strohalm.cyclos.entities.access.PasswordHistoryLog; import nl.strohalm.cyclos.entities.access.PasswordHistoryLog.PasswordType; import nl.strohalm.cyclos.entities.access.User; /** * DAO interface for PasswordHistoryLog * * @author luis */ public interface PasswordHistoryLogDAO extends BaseDAO<PasswordHistoryLog>, InsertableDAO<PasswordHistoryLog> { /** * Checks whether the given password was already used for the given user */ public boolean wasAlreadyUsed(User user, PasswordType type, String password); }
[ "wladimir2113@gmail.com" ]
wladimir2113@gmail.com
801526001ecb2737dc2261ca466ad1d9e2c24782
5de63a6ea4a86c68ee6dcee6133cb3610d87ad8e
/wxxr-mobile-client/wxxr-mobile-communicationhelper-android-quanguo/src/com/wxxr/callhelper/qg/widget/ResizeLayout.java
5b8b9bb497d734e16971cc84aa93ada8db575e7f
[]
no_license
richie1412/git_hub_rep
487702601cc655f0213c6a601440a66fba14080b
633be448911fed685139e19e66c6c54d21df7fe3
refs/heads/master
2016-09-05T14:37:19.096475
2014-07-18T01:52:03
2014-07-18T01:52:03
21,963,815
0
2
null
null
null
null
UTF-8
Java
false
false
1,029
java
package com.wxxr.callhelper.qg.widget; import android.content.Context; import android.util.AttributeSet; import android.widget.LinearLayout; /** * * 自定义的view,为了监听高度的变化,来判断键盘的显示和隐藏 * * @since 1.0 */ public class ResizeLayout extends LinearLayout{ private OnResizeListener mListener; private static final int BIGGER = 1; private static final int SMALLER = 2; private static final int MSG_RESIZE = 1; public interface OnResizeListener { void OnResize(int w, int h, int oldw, int oldh); } public void setOnResizeListener(OnResizeListener l) { mListener = l; } public ResizeLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); if (mListener != null) { mListener.OnResize(w, h, oldw, oldh); } } }
[ "richie1412@gmail.com" ]
richie1412@gmail.com
dbf3d6dbc8c4b482dc6914a78d20d30161d4fb2f
1ae6abc37d7844879916e8f612ba1d616bc0c3cb
/src/public/nc/bs/pf/changedir/CHGXC77TOXC69.java
6c61a8ad6a3c3bc51af371f1f18d031242d82990
[]
no_license
menglingrui/xcgl
7a3b3f03f14b21fbd25334042f87fa570758a7ad
525b4e38cf52bb75c83762a9c27862b4f86667e8
refs/heads/master
2020-06-05T20:10:09.263291
2014-09-11T11:00:34
2014-09-11T11:00:34
null
0
0
null
null
null
null
GB18030
Java
false
false
7,680
java
package nc.bs.pf.changedir; import nc.bs.pf.change.ConversionPolicyEnum; import nc.vo.pf.change.UserDefineFunction; /** * 从精粉调拨单到其它入库单的 * 取调入信息 * 后台交换类 * @author Jay * */ public class CHGXC77TOXC69 extends nc.bs.pf.change.VOConversion{ public CHGXC77TOXC69(){ super(); } /** * 获得交换后处理类 全名称 * @return java.lang.String */ public String getAfterClassName() { return null; } /** * 获得交换后处理类 全名称 * @return java.lang.String */ public String getOtherClassName() { return null; } /** * 返回交换类型枚举ConversionPolicyEnum,默认为单据项目-单据项目 * @return ConversionPolicyEnum * @since 5.5 */ public ConversionPolicyEnum getConversionPolicy() { return ConversionPolicyEnum.BILLITEM_BILLITEM; } /** * 获得映射类型的交换规则 * @return java.lang.String[] */ public String[] getField() { return new String[] { "H_pk_corp->H_pk_corp", "H_pk_factory->H_pk_factory1",//调入选厂 //"H_pk_beltline->H_pk_beltline",//生产线 //"H_pk_classorder->H_pk_classorder",//班次 //"H_pk_minarea->H_pk_minarea",//部门--取样单位 "H_pk_stordoc->H_pk_stordoc1",//调入仓库 "H_pk_minarea->B_pk_deptdoc1",//调入部门--取样单位 "B_pk_invmandoc->B_pk_invmandoc", "B_pk_father->B_pk_invmandoc", "B_pk_invbasdoc->B_pk_invbasdoc", //"H_dweighdate->H_dbilldate", "H_dbilldate->H_dbilldate",//单据日期 "H_pk_busitype->H_pk_busitype",//业务流程 //"H_pk_vehicle->B_pk_vehicle", "B_nwetweight->B_ndryweight",//数量 "H_vmemo->H_vmemo", "B_vmemo->B_vmemo", "H_ireserve1->H_ireserve1", "H_ireserve10->H_ireserve10", "H_ireserve2->H_ireserve2", "H_ireserve3->H_ireserve3", "H_ireserve4->H_ireserve4", "H_ireserve5->H_ireserve5", "H_ireserve6->H_ireserve6", "H_ireserve7->H_ireserve7", "H_ireserve8->H_ireserve8", "H_ireserve9->H_ireserve9", "H_nreserve1->H_nreserve1", "H_nreserve10->H_nreserve10", "H_nreserve2->H_nreserve2", "H_nreserve3->H_nreserve3", "H_nreserve4->H_nreserve4", "H_nreserve5->H_nreserve5", "H_nreserve6->H_nreserve6", "H_nreserve7->H_nreserve7", "H_nreserve8->H_nreserve8", "H_nreserve9->H_nreserve9", "H_pk_defdoc1->H_pk_defdoc1", "H_pk_defdoc10->H_pk_defdoc10", "H_pk_defdoc11->H_pk_defdoc11", "H_pk_defdoc12->H_pk_defdoc12", "H_pk_defdoc13->H_pk_defdoc13", "H_pk_defdoc14->H_pk_defdoc14", "H_pk_defdoc15->H_pk_defdoc15", "H_pk_defdoc16->H_pk_defdoc16", "H_pk_defdoc17->H_pk_defdoc17", "H_pk_defdoc18->H_pk_defdoc18", "H_pk_defdoc19->H_pk_defdoc19", "H_pk_defdoc2->H_pk_defdoc2", "H_pk_defdoc20->H_pk_defdoc20", "H_pk_defdoc3->H_pk_defdoc3", "H_pk_defdoc4->H_pk_defdoc4", "H_pk_defdoc5->H_pk_defdoc5", "H_pk_defdoc6->H_pk_defdoc6", "H_pk_defdoc7->H_pk_defdoc7", "H_pk_defdoc8->H_pk_defdoc8", "H_pk_defdoc9->H_pk_defdoc9", //"H_pk_deptdoc->H_pk_deptdoc",//部门档案 "H_ureserve1->H_ureserve1", "H_ureserve10->H_ureserve10", "H_ureserve2->H_ureserve2", "H_ureserve3->H_ureserve3", "H_ureserve4->H_ureserve4", "H_ureserve5->H_ureserve5", "H_ureserve6->H_ureserve6", "H_ureserve7->H_ureserve7", "H_ureserve8->H_ureserve8", "H_ureserve9->H_ureserve9", "H_vdef1->H_vdef1", "H_vdef10->H_vdef10", "H_vdef11->H_vdef11", "H_vdef12->H_vdef12", "H_vdef13->H_vdef13", "H_vdef14->H_vdef14", "H_vdef15->H_vdef15", "H_vdef16->H_vdef16", "H_vdef17->H_vdef17", "H_vdef18->H_vdef18", "H_vdef19->H_vdef19", "H_vdef2->H_vdef2", "H_vdef20->H_vdef20", "H_vdef3->H_vdef3", "H_vdef4->H_vdef4", "H_vdef5->H_vdef5", "H_vdef6->H_vdef6", "H_vdef7->H_vdef7", "H_vdef8->H_vdef8", "H_vdef9->H_vdef9", "H_vreserve1->H_vreserve1", "H_vreserve10->H_vreserve10", "H_vreserve2->H_vreserve2", "H_vreserve3->H_vreserve3", "H_vreserve4->H_vreserve4", "H_vreserve5->H_vreserve5", "H_vreserve6->H_vreserve6", "H_vreserve7->H_vreserve7", "H_vreserve8->H_vreserve8", "H_vreserve9->H_vreserve9", "B_ireserve1->B_ireserve1", "B_ireserve10->B_ireserve10", "B_ireserve2->B_ireserve2", "B_ireserve3->B_ireserve3", "B_ireserve4->B_ireserve4", "B_ireserve5->B_ireserve5", "B_ireserve6->B_ireserve6", "B_ireserve7->B_ireserve7", "B_ireserve8->B_ireserve8", "B_ireserve9->B_ireserve9", "B_nreserve1->B_nreserve1", "B_nreserve10->B_nreserve10", "B_nreserve2->B_nreserve2", "B_nreserve3->B_nreserve3", "B_nreserve4->B_nreserve4", "B_nreserve5->B_nreserve5", "B_nreserve6->B_nreserve6", "B_nreserve7->B_nreserve7", "B_nreserve8->B_nreserve8", "B_nreserve9->B_nreserve9", "B_pk_defdoc1->B_pk_defdoc1", "B_pk_defdoc10->B_pk_defdoc10", "B_pk_defdoc11->B_pk_defdoc11", "B_pk_defdoc12->B_pk_defdoc12", "B_pk_defdoc13->B_pk_defdoc13", "B_pk_defdoc14->B_pk_defdoc14", "B_pk_defdoc15->B_pk_defdoc15", "B_pk_defdoc16->B_pk_defdoc16", "B_pk_defdoc17->B_pk_defdoc17", "B_pk_defdoc18->B_pk_defdoc18", "B_pk_defdoc19->B_pk_defdoc19", "B_pk_defdoc2->B_pk_defdoc2", "B_pk_defdoc20->B_pk_defdoc20", "B_pk_defdoc3->B_pk_defdoc3", "B_pk_defdoc4->B_pk_defdoc4", "B_pk_defdoc5->B_pk_defdoc5", "B_pk_defdoc6->B_pk_defdoc6", "B_pk_defdoc7->B_pk_defdoc7", "B_pk_defdoc8->B_pk_defdoc8", "B_pk_defdoc9->B_pk_defdoc9", "B_ureserve1->B_ureserve1", "B_ureserve10->B_ureserve10", "B_ureserve2->B_ureserve2", "B_ureserve3->B_ureserve3", "B_ureserve4->B_ureserve4", "B_ureserve5->B_ureserve5", "B_ureserve6->B_ureserve6", "B_ureserve7->B_ureserve7", "B_ureserve8->B_ureserve8", "B_ureserve9->B_ureserve9", "B_vdef1->B_vdef1", "B_vdef10->B_vdef10", "B_vdef11->B_vdef11", "B_vdef12->B_vdef12", "B_vdef13->B_vdef13", "B_vdef14->B_vdef14", "B_vdef15->B_vdef15", "B_vdef16->B_vdef16", "B_vdef17->B_vdef17", "B_vdef18->B_vdef18", "B_vdef19->B_vdef19", "B_vdef2->B_vdef2", "B_vdef20->B_vdef20", "B_vdef3->B_vdef3", "B_vdef4->B_vdef4", "B_vdef5->B_vdef5", "B_vdef6->B_vdef6", "B_vdef7->B_vdef7", "B_vdef8->B_vdef8", "B_vdef9->B_vdef9", "B_vreserve1->B_vreserve1", "B_vreserve10->B_vreserve10", "B_vreserve2->B_vreserve2", "B_vreserve3->B_vreserve3", "B_vreserve4->B_vreserve4", "B_vreserve5->B_vreserve5", "B_vreserve6->B_vreserve6", "B_vreserve7->B_vreserve7", "B_vreserve8->B_vreserve8", "B_vreserve9->B_vreserve9", "B_vlastbillcode->H_vbillno", "B_vlastbillid->B_pk_general_h", "B_vlastbillrowid->B_pk_general_b", "B_vlastbilltype->H_pk_billtype", "B_csourcebillcode->H_vbillno", "B_vsourcebillid->B_pk_general_h", "B_vsourcebillrowid->B_pk_general_b", "B_vsourcebilltype->H_pk_billtype", }; } /** * 获得赋值类型的交换规则 * @return java.lang.String[] */ public String[] getAssign() { return null; } /** * 获得公式类型的交换规则 * @return java.lang.String[] */ public String[] getFormulas() { return null; } /** * 返回用户自定义函数 */ public UserDefineFunction[] getUserDefineFunction() { return null; } }
[ "menlging.rui@163.com" ]
menlging.rui@163.com
b5cdefb60d421430e5d8f481bba9e632d544118b
59e6dc1030446132fb451bd711d51afe0c222210
/components/webapp-mgt/org.wso2.carbon.jaxws.webapp.mgt.ui/4.2.0/src/main/java/org/wso2/carbon/jaxws/webapp/mgt/ui/JaxwsWebappAdminClient.java
63e8544946f00c36941bdf53948df1e941606506
[]
no_license
Alsan/turing-chunk07
2f7470b72cc50a567241252e0bd4f27adc987d6e
e9e947718e3844c07361797bd52d3d1391d9fb5e
refs/heads/master
2020-05-26T06:20:24.554039
2014-02-07T12:02:53
2014-02-07T12:02:53
38,284,349
0
1
null
null
null
null
UTF-8
Java
false
false
3,722
java
/* * Copyright 2004,2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wso2.carbon.jaxws.webapp.mgt.ui; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.ConfigurationContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.webapp.mgt.stub.WebappAdminStub; import org.wso2.carbon.webapp.mgt.stub.types.carbon.SessionsWrapper; import org.wso2.carbon.webapp.mgt.stub.types.carbon.WebappMetadata; import org.wso2.carbon.webapp.mgt.stub.types.carbon.WebappUploadData; import org.wso2.carbon.webapp.mgt.stub.types.carbon.WebappsWrapper; import javax.activation.DataHandler; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.rmi.RemoteException; import java.util.Locale; import java.util.ResourceBundle; /** * Client which communicates with the JaxwsWebappAdmin service */ public class JaxwsWebappAdminClient { public static final String BUNDLE = "org.wso2.carbon.jaxws.webapp.mgt.ui.i18n.Resources"; public static final int MILLISECONDS_PER_MINUTE = 60 * 1000; private static final Log log = LogFactory.getLog(JaxwsWebappAdminClient.class); private ResourceBundle bundle; public WebappAdminStub stub; public JaxwsWebappAdminClient(String cookie, String backendServerURL, ConfigurationContext configCtx, Locale locale) throws AxisFault { String serviceURL = backendServerURL + "JaxwsWebappAdmin"; bundle = ResourceBundle.getBundle(BUNDLE, locale); stub = new WebappAdminStub(configCtx, serviceURL); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); } public void uploadWebapp(WebappUploadData [] webappUploadDataList) throws AxisFault { try { stub.uploadWebapp(webappUploadDataList); } catch (RemoteException e) { handleException("cannot.upload.webapps", e); } } private void handleException(String msgKey, Exception e) throws AxisFault { String msg = bundle.getString(msgKey); log.error(msg, e); throw new AxisFault(msg, e); } }
[ "malaka@wso2.com" ]
malaka@wso2.com
9c776e9cfc491af87608c5f4dbf46a889002bdaf
725b0c33af8b93b557657d2a927be1361256362b
/com/planet_ink/coffee_mud/MOBS/GenDeity.java
124579d6559e2a7263c92ab3c270e1c42125fcb6
[ "Apache-2.0" ]
permissive
mcbrown87/CoffeeMud
7546434750d1ae0418ac2c76d27f872106d2df97
0d4403d466271fe5d75bfae8f33089632ac1ddd6
refs/heads/master
2020-12-30T19:23:07.758257
2014-06-25T00:01:20
2014-06-25T00:01:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,423
java
package com.planet_ink.coffee_mud.MOBS; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; /* Copyright 2000-2014 Bo Zimmerman 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. */ public class GenDeity extends StdDeity { @Override public String ID(){return "GenDeity";} public GenDeity() { super(); username="a generic deity"; setDescription("He is a run-of-the-mill deity."); setDisplayText("A generic deity stands here."); basePhyStats().setAbility(11); // his only off-default recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } @Override public boolean isGeneric(){return true;} @Override public String text() { if(CMProps.getBoolVar(CMProps.Bool.MOBCOMPRESS)) miscText=CMLib.encoder().compressString(CMLib.coffeeMaker().getPropertiesStr(this,false)); else miscText=CMLib.coffeeMaker().getPropertiesStr(this,false); return super.text(); } @Override public void setMiscText(String newText) { super.setMiscText(newText); CMLib.coffeeMaker().resetGenMOB(this,newText); } private final static String[] MYCODES={"CLERREQ","CLERRIT","WORREQ","WORRIT","SVCRIT"}; @Override public String getStat(String code) { if(CMLib.coffeeMaker().getGenMobCodeNum(code)>=0) return CMLib.coffeeMaker().getGenMobStat(this,code); switch(getCodeNum(code)) { case 0: return getClericRequirements(); case 1: return getClericRitual(); case 2: return getWorshipRequirements(); case 3: return getWorshipRitual(); case 4: return getServiceRitual(); default: return CMProps.getStatCodeExtensionValue(getStatCodes(), xtraValues, code); } } @Override public void setStat(String code, String val) { if(CMLib.coffeeMaker().getGenMobCodeNum(code)>=0) CMLib.coffeeMaker().setGenMobStat(this,code,val); else switch(getCodeNum(code)) { case 0: setClericRequirements(val); break; case 1: setClericRitual(val); break; case 2: setWorshipRequirements(val); break; case 3: setWorshipRitual(val); break; case 4: setServiceRitual(val); break; default: CMProps.setStatCodeExtensionValue(getStatCodes(), xtraValues, code, val); break; } } @Override protected int getCodeNum(String code) { for(int i=0;i<MYCODES.length;i++) if(code.equalsIgnoreCase(MYCODES[i])) return i; return -1; } private static String[] codes=null; @Override public String[] getStatCodes() { if(codes!=null) return codes; final String[] MYCODES=CMProps.getStatCodesList(GenDeity.MYCODES,this); final String[] superCodes=GenericBuilder.GENMOBCODES; codes=new String[superCodes.length+MYCODES.length]; int i=0; for(;i<superCodes.length;i++) codes[i]=superCodes[i]; for(int x=0;x<MYCODES.length;i++,x++) codes[i]=MYCODES[x]; return codes; } @Override public boolean sameAs(Environmental E) { if(!(E instanceof GenDeity)) return false; final String[] codes=getStatCodes(); for(int i=0;i<codes.length;i++) if(!E.getStat(codes[i]).equals(getStat(codes[i]))) return false; return true; } }
[ "bo@0d6f1817-ed0e-0410-87c9-987e46238f29" ]
bo@0d6f1817-ed0e-0410-87c9-987e46238f29
a050446388b799778cab0c823738fd06eb00103f
67984d7d945b67709b24fda630efe864b9ae9c72
/core/src/main/java/com/ey/piit/core/paginator/domain/Paginator.java
9d67a29a1d50129f36a93e581b761f802b493b60
[]
no_license
JackPaiPaiNi/Piit
76c7fb6762912127a665fa0638ceea1c76893fc6
89b8d79487e6d8ff21319472499b6e255104e1f6
refs/heads/master
2020-04-07T22:30:35.105370
2018-11-23T02:58:31
2018-11-23T02:58:31
158,773,760
0
0
null
null
null
null
UTF-8
Java
false
false
6,027
java
package com.ey.piit.core.paginator.domain; import java.io.Serializable; /** * 分页器,根据page,limit,totalCount用于页面上分页显示多项内容,计算页码和当前页的偏移量,方便页面分页使用. * * @author badqiu * @author miemiedev */ public class Paginator implements Serializable { private static final long serialVersionUID = -2429864663690465105L; private static final int DEFAULT_SLIDERS_COUNT = 7; /** * 分页大小 */ private int limit; /** * 页数 */ private int page; /** * 总记录数 */ private int totalCount; public Paginator(int page, int limit, int totalCount) { super(); this.limit = limit; this.totalCount = totalCount; this.page = computePageNo(page); } /** * 取得当前页。 */ public int getPage() { return page; } public int getLimit() { return limit; } /** * 取得总项数。 * * @return 总项数 */ public int getTotalCount() { return totalCount; } /** * 是否是首页(第一页),第一页页码为1 * * @return 首页标识 */ public boolean isFirstPage() { return page <= 1; } /** * 是否是最后一页 * * @return 末页标识 */ public boolean isLastPage() { return page >= getTotalPages(); } public int getPrePage() { if (isHasPrePage()) { return page - 1; } else { return page; } } public int getNextPage() { if (isHasNextPage()) { return page + 1; } else { return page; } } /** * 判断指定页码是否被禁止,也就是说指定页码超出了范围或等于当前页码。 * * @param page 页码 * @return boolean 是否为禁止的页码 */ public boolean isDisabledPage(int page) { return ((page < 1) || (page > getTotalPages()) || (page == this.page)); } /** * 是否有上一页 * * @return 上一页标识 */ public boolean isHasPrePage() { return (page - 1 >= 1); } /** * 是否有下一页 * * @return 下一页标识 */ public boolean isHasNextPage() { return (page + 1 <= getTotalPages()); } /** * 开始行,可以用于oracle分页使用 (1-based)。 */ public int getStartRow() { if (getLimit() <= 0 || totalCount <= 0) return 0; return page > 0 ? (page - 1) * getLimit() + 1 : 0; } /** * 结束行,可以用于oracle分页使用 (1-based)。 */ public int getEndRow() { return page > 0 ? Math.min(limit * page, getTotalCount()) : 0; } /** * offset,计数从0开始,可以用于mysql分页使用(0-based) */ public int getOffset() { return page > 0 ? (page - 1) * getLimit() : 0; } /** * 得到 总页数 * * @return */ public int getTotalPages() { if (totalCount <= 0) { return 0; } if (limit <= 0) { return 0; } int count = totalCount / limit; if (totalCount % limit > 0) { count++; } return count; } protected int computePageNo(int page) { return computePageNumber(page, limit, totalCount); } /** * 页码滑动窗口,并将当前页尽可能地放在滑动窗口的中间部位。 * * @return */ public Integer[] getSlider() { return slider(DEFAULT_SLIDERS_COUNT); } /** * 页码滑动窗口,并将当前页尽可能地放在滑动窗口的中间部位。 * 注意:不可以使用 getSlider(1)方法名称,因为在JSP中会与 getSlider()方法冲突,报exception * * @return */ public Integer[] slider(int slidersCount) { return generateLinkPageNumbers(getPage(), (int) getTotalPages(), slidersCount); } private static int computeLastPageNumber(int totalItems, int pageSize) { if (pageSize <= 0) return 1; int result = (int) (totalItems % pageSize == 0 ? totalItems / pageSize : totalItems / pageSize + 1); if (result <= 1) result = 1; return result; } private static int computePageNumber(int page, int pageSize, int totalItems) { if (page <= 1) { return 1; } if (Integer.MAX_VALUE == page || page > computeLastPageNumber(totalItems, pageSize)) { //last page return computeLastPageNumber(totalItems, pageSize); } return page; } private static Integer[] generateLinkPageNumbers(int currentPageNumber, int lastPageNumber, int count) { int avg = count / 2; int startPageNumber = currentPageNumber - avg; if (startPageNumber <= 0) { startPageNumber = 1; } int endPageNumber = startPageNumber + count - 1; if (endPageNumber > lastPageNumber) { endPageNumber = lastPageNumber; } if (endPageNumber - startPageNumber < count) { startPageNumber = endPageNumber - count; if (startPageNumber <= 0) { startPageNumber = 1; } } java.util.List<Integer> result = new java.util.ArrayList<Integer>(); for (int i = startPageNumber; i <= endPageNumber; i++) { result.add(new Integer(i)); } return result.toArray(new Integer[result.size()]); } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("Paginator"); sb.append("{page=").append(page); sb.append(", limit=").append(limit); sb.append(", totalCount=").append(totalCount); sb.append('}'); return sb.toString(); } }
[ "1210287515@master" ]
1210287515@master
0b24cc26d755186e1d78588ee93b080f0200e569
26639ec8cc9e12a3f3aa4911f217a2a5d381a870
/.svn/pristine/0b/0b24cc26d755186e1d78588ee93b080f0200e569.svn-base
cf6f5d8428da33e6c63bd778aab99399a5e4f63d
[]
no_license
shaojava/v3.6.3
a8b4d587a48ec166d21bfe791897c6bacced2119
8c2352d67c2282fc587fc90686936e6ce451eb00
refs/heads/master
2021-12-15T02:59:25.593407
2017-07-24T05:55:49
2017-07-24T05:55:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,600
/* Copyright (c) 2011 Rapture In Venice Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.jinr.graph_view; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.animation.AlphaAnimation; import android.widget.*; public class WebImageView extends ImageView { public String urlString; AlphaAnimation animation; private SharedPreferences shared; private SharedPreferences.Editor editor; public WebImageView(Context context) { super(context); } public WebImageView(Context context, AttributeSet attSet) { super(context, attSet); animation = new AlphaAnimation(0, 1); animation.setDuration(500);//设置动画持续时间 } public WebImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public static void setMemoryCachingEnabled(boolean enabled) { WebImageCache.setMemoryCachingEnabled(enabled); } public static void setDiskCachingEnabled(boolean enabled) { WebImageCache.setDiskCachingEnabled(enabled); } public static void setDiskCachingDefaultCacheTimeout(int seconds) { WebImageCache.setDiskCachingDefaultCacheTimeout(seconds); } @Override public void onDetachedFromWindow() { // cancel loading if view is removed cancelCurrentLoad(); } public void setImageWithURL(Context context, String urlString, Drawable placeholderDrawable, int diskCacheTimeoutInSeconds) { if (urlString != null ) { if (null != this.urlString && urlString.compareTo(this.urlString) == 0) { return; } final WebImageManager mgr = WebImageManager.getInstance(); if(null != this.urlString) { cancelCurrentLoad(); } setImageDrawable(placeholderDrawable); this.urlString = urlString; mgr.downloadURL(context, urlString, WebImageView.this, diskCacheTimeoutInSeconds); } } public void setImageWithURL(Context context, String urlString, Drawable placeholderDrawable) { setImageWithURL(context, urlString, placeholderDrawable, -1); } // public void setImageWithURL(final Context context, final String urlString, int diskCacheTimeoutInSeconds) { // setImageWithURL(context, urlString, null, diskCacheTimeoutInSeconds); // } public void setImageWithURL(final Context context, final String urlString, int resId) { Resources rsrc = this.getResources(); Drawable placeholderDrawable = rsrc.getDrawable(resId); setImageWithURL(context, urlString, placeholderDrawable, -1); } public void setImageWithURL(final Context context, final String urlString, int resId,int diskCacheTimeoutInSeconds) { Resources rsrc = this.getResources(); Drawable placeholderDrawable = rsrc.getDrawable(resId); setImageWithURL(context, urlString, placeholderDrawable, diskCacheTimeoutInSeconds); } public void setImageWithURL(final Context context, final String urlString) { setImageWithURL(context, urlString, null, -1); } public void cancelCurrentLoad() { WebImageManager mgr = WebImageManager.getInstance(); // cancel any existing request mgr.cancelForWebImageView(this); } @Override public void setImageBitmap(Bitmap bm) { super.setImageBitmap(bm); this.startAnimation(animation); } }
[ "Zhongrong.Yu@lavainternational.com" ]
Zhongrong.Yu@lavainternational.com
796b7c6f5e7f6a0d60f63918d98a1ea02200db01
86cf61187d22b867d1e5d3c8a23d97e806636020
/src/main/java/base/operators/operator/nlp/word2vec/core/domain/Neuron.java
6e311a6c830d3ec41463cc1380b2c80fd82cd34d
[]
no_license
hitaitengteng/abc-pipeline-engine
f94bb3b1888ad809541c83d6923a64c39fef9b19
165a620b94fb91ae97647135cc15a66d212a39e8
refs/heads/master
2022-02-22T18:49:28.915809
2019-10-27T13:40:58
2019-10-27T13:40:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package base.operators.operator.nlp.word2vec.core.domain; public abstract class Neuron implements Comparable<Neuron> { public double freq; public Neuron parent; public int code; // 语料预分类 public int category = -1; @Override public int compareTo(Neuron neuron) { if (this.category == neuron.category) { if (this.freq > neuron.freq) { return 1; } else { return -1; } } else if (this.category > neuron.category) { return 1; } else { return -1; } } }
[ "wangj_lc@inspur.com" ]
wangj_lc@inspur.com
8d4b31930bf03b27202e7e7d18c28e2ebfb942e4
637b4faf515c75451a10c580287f7e5f44423ba0
/2.JavaCore/src/com/javarush/task/task18/task1814/TxtInputStream.java
8740546dbef40ce100018367d75b1898fa418f99
[]
no_license
Abrekov/JavaRushTasks
ccc51f357ee542801e90811dbbc2a4c99845e0e6
b1703a05303f3b1442e373a853a861bf793031b0
refs/heads/master
2020-09-07T05:57:18.878059
2019-12-08T17:19:18
2019-12-08T17:19:18
220,676,965
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package com.javarush.task.task18.task1814; import java.io.*; /* UnsupportedFileName */ public class TxtInputStream extends FileInputStream { public TxtInputStream(String fileName) throws IOException, UnsupportedFileNameException { super(fileName); if (!fileName.endsWith(".txt")) { super.close(); throw new UnsupportedFileNameException(); } } public static void main(String[] args) { } }
[ "abrekov@ya.ru" ]
abrekov@ya.ru
331ab3a201226f3f2b1e3e5244b71b94f3c7b010
e4aea93f2988e2cf1be4f96a39f6cc3328cbbd50
/src/com/flagleader/builder/a/bt.java
eb8b0fc1bbd2fd56450b3b1c45f995362d7dd9ce
[]
no_license
lannerate/ruleBuilder
18116282ae55e9d56e9eb45d483520f90db4a1a6
b5d87495990aa1988adf026366e92f7cbb579b19
refs/heads/master
2016-09-05T09:13:43.879603
2013-11-10T08:32:58
2013-11-10T08:32:58
14,231,127
0
1
null
null
null
null
UTF-8
Java
false
false
303
java
package com.flagleader.builder.a; public class bt implements bp { public void b() { } public String a() { return ""; } } /* Location: D:\Dev_tools\ruleEngine\rbuilder.jar * Qualified Name: com.flagleader.builder.a.bt * JD-Core Version: 0.6.0 */
[ "zhanghuizaizheli@hotmail.com" ]
zhanghuizaizheli@hotmail.com
17cf60e9214a2a683d069dcf99507a48802fa07d
df6f96898184729604068a013622c5a3b0833c03
/app/src/main/java/com/rose/guojiangzhibo/fragment/TwoFragment.java
5b9f40bcfd3b543e76e5abd0f73c475653589526
[]
no_license
cherry98/huahua
bd0ab7bcc2b304d7f7c1f44afbaeb0aa38f6d934
73ce804da1f0f28f17a57b8eaed376d9d3301ddd
refs/heads/master
2020-12-30T13:09:29.585800
2017-05-15T15:24:58
2017-05-15T15:24:58
91,336,211
0
0
null
null
null
null
UTF-8
Java
false
false
6,466
java
package com.rose.guojiangzhibo.fragment; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.rose.guojiangzhibo.R; import com.rose.guojiangzhibo.bean.SelectionHeaderItem; import com.rose.guojiangzhibo.bean.SelectionItem; import com.rose.guojiangzhibo.fragment.TwoFragments.CircleFragment; import com.rose.guojiangzhibo.fragment.TwoFragments.SelectionFragment; import com.rose.guojiangzhibo.urlconfig.ConfigURL; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.xutils.common.Callback; import org.xutils.http.RequestParams; import org.xutils.x; import java.util.ArrayList; /** * A simple {@link Fragment} subclass. */ public class TwoFragment extends Fragment { private View view; private TextView selection; private TextView circle; private FragmentTransaction fragmentTransaction; private FragmentManager fragmentManager; private ArrayList<SelectionItem> selections; private SelectionFragment selectionFragment; private CircleFragment circleFragment; private ArrayList<SelectionHeaderItem> headers; public TwoFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment view = inflater.inflate(R.layout.fragment_two, container, false); getListViewData(); getHeaderData(); initView(view); return view; } private void initView(View view) { fragmentManager = getFragmentManager(); fragmentTransaction = fragmentManager.beginTransaction(); selectionFragment = new SelectionFragment(); circleFragment = new CircleFragment(); fragmentTransaction.add(R.id.contentframelayout_twofrag, selectionFragment, null); fragmentTransaction.show(selectionFragment); fragmentTransaction.add(R.id.contentframelayout_twofrag, circleFragment, null); fragmentTransaction.hide(circleFragment); fragmentTransaction.commit(); selection = (TextView) view.findViewById(R.id.selectiontitle_twofragment); circle = (TextView) view.findViewById(R.id.circletitle_twofragment); selection.setTextColor(0xffffffff); View.OnClickListener onClickListener = new View.OnClickListener() { @Override public void onClick(View v) { fragmentTransaction = fragmentManager.beginTransaction(); selection.setTextColor(0xffbbbbbb); circle.setTextColor(0xffbbbbbb); switch (v.getId()) { case R.id.selectiontitle_twofragment: selection.setTextColor(0xffffffff); fragmentTransaction.show(selectionFragment); fragmentTransaction.hide(circleFragment); break; case R.id.circletitle_twofragment: circle.setTextColor(0xffffffff); fragmentTransaction.show(circleFragment); fragmentTransaction.hide(selectionFragment); break; } fragmentTransaction.commit(); } }; selection.setOnClickListener(onClickListener); circle.setOnClickListener(onClickListener); } public void getListViewData() { RequestParams requestParams = new RequestParams(ConfigURL.getSelcetion()); x.http().get(requestParams, new Callback.CommonCallback<String>() { @Override public void onSuccess(String result) { try { JSONObject jsonObject = new JSONObject(result); JSONArray jsonArray = jsonObject.optJSONArray("data"); selections = new ArrayList<>(); for (int i = 0; i < jsonArray.length(); i++) { SelectionItem item = new SelectionItem(); item.getJSONObject(jsonArray.getJSONObject(i)); selections.add(item); } initListView(); } catch (JSONException e) { e.printStackTrace(); } } @Override public void onError(Throwable ex, boolean isOnCallback) { } @Override public void onCancelled(CancelledException cex) { } @Override public void onFinished() { } }); } private void initHeader(ArrayList<SelectionHeaderItem> headers) { selectionFragment.setHeader(headers); } private void initListView() { selectionFragment.setList(selections); } public void getHeaderData() { final RequestParams headerString = new RequestParams(ConfigURL.getSelectionHeader()); x.http().get(headerString, new Callback.CommonCallback<String>() { @Override public void onSuccess(String result) { try { JSONObject jsonObject = new JSONObject(result); JSONArray data = jsonObject.optJSONArray("data"); headers = new ArrayList<>(); for (int i = 0; i < data.length(); i++) { SelectionHeaderItem selectionHeaderItem = new SelectionHeaderItem(); JSONObject object = data.optJSONObject(i); selectionHeaderItem.getJSONObject(object); headers.add(selectionHeaderItem); } initHeader(headers); } catch (JSONException e) { e.printStackTrace(); } } @Override public void onError(Throwable ex, boolean isOnCallback) { } @Override public void onCancelled(CancelledException cex) { } @Override public void onFinished() { } }); } }
[ "cherry18515@163.com" ]
cherry18515@163.com
043d60d4b2af48d73909e3334e5ba03e3612c1f7
77fb90c41fd2844cc4350400d786df99e14fa4ca
/com/coremedia/iso/boxes/TitleBox.java
926251eadcfdaee6df93a8a470309ca24eb3d064
[]
no_license
highnes7/umaang_decompiled
341193b25351188d69b4413ebe7f0cde6525c8fb
bcfd90dffe81db012599278928cdcc6207632c56
refs/heads/master
2020-06-19T07:47:18.630455
2019-07-12T17:16:13
2019-07-12T17:16:13
196,615,053
0
0
null
null
null
null
UTF-8
Java
false
false
2,295
java
package com.coremedia.iso.boxes; import f.h.a.MimeMessage; import f.slide.asm.ByteBufferList; import f.slide.asm.Label; import org.aspectj.lang.JoinPoint; public class TitleBox extends MimeMessage { public static final String TYPE = "titl"; public String language; public String title; static {} public TitleBox() { super("titl"); } public void _parseDetails(java.nio.ByteBuffer paramByteBuffer) { parseVersionAndFlags(paramByteBuffer); language = ByteBufferList.nextToken(paramByteBuffer); title = ByteBufferList.readString(paramByteBuffer); } public void getContent(java.nio.ByteBuffer paramByteBuffer) { writeVersionAndFlags(paramByteBuffer); Label.add(paramByteBuffer, language); paramByteBuffer.put(f.slide.asm.ByteBuffer.append(title)); paramByteBuffer.put((byte)0); } public long getContentSize() { return f.slide.asm.ByteBuffer.convert(title) + 7; } public String getLanguage() { JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_0, this, this); f.h.a.Factory.aspectOf().before(localJoinPoint); return language; } public String getTitle() { JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_1, this, this); f.h.a.Factory.aspectOf().before(localJoinPoint); return title; } public void setLanguage(String paramString) { JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_2, this, this, paramString); f.h.a.Factory.aspectOf().before(localJoinPoint); language = paramString; } public void setTitle(String paramString) { JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_3, this, this, paramString); f.h.a.Factory.aspectOf().before(localJoinPoint); title = paramString; } public String toString() { StringBuilder localStringBuilder = f.sufficientlysecure.rootcommands.util.StringBuilder.getTag(org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_4, this, this), "TitleBox[language="); localStringBuilder.append(getLanguage()); localStringBuilder.append(";title="); localStringBuilder.append(getTitle()); localStringBuilder.append("]"); return localStringBuilder.toString(); } }
[ "highnes.7@gmail.com" ]
highnes.7@gmail.com
d2a2f1c031af068b2b9702c4888963734f89bb90
12563229bd1c69d26900d4a2ea34fe4c64c33b7e
/nan21.dnet.module.ad/nan21.dnet.module.ad.presenter/src/main/java/net/nan21/dnet/module/ad/workflow/ds/model/WfDefNodeFieldDs.java
d0d2034848377876d2661bf080afb22e73d5f875
[]
no_license
nan21/nan21.dnet.modules
90b002c6847aa491c54bd38f163ba40a745a5060
83e5f02498db49e3d28f92bd8216fba5d186dd27
refs/heads/master
2023-03-15T16:22:57.059953
2012-08-01T07:36:57
2012-08-01T07:36:57
1,918,395
0
1
null
2012-07-24T03:23:00
2011-06-19T05:56:03
Java
UTF-8
Java
false
false
1,582
java
/* * DNet eBusiness Suite * Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved. * Use is subject to license terms. */ package net.nan21.dnet.module.ad.workflow.ds.model; import net.nan21.dnet.core.api.annotation.Ds; import net.nan21.dnet.core.api.annotation.DsField; import net.nan21.dnet.core.api.annotation.SortField; import net.nan21.dnet.core.presenter.model.base.AbstractTypeDs; import net.nan21.dnet.module.ad.workflow.domain.entity.WfDefNodeField; @Ds(entity = WfDefNodeField.class, sort = { @SortField(field = WfDefNodeFieldDs.fNAME) }) public class WfDefNodeFieldDs extends AbstractTypeDs<WfDefNodeField> { public static final String fTYPE = "type"; public static final String fREQUIRED = "required"; public static final String fNODEID = "nodeId"; @DsField() private String type; @DsField() private Boolean required; @DsField(join = "left", path = "node.id") private Long nodeId; public WfDefNodeFieldDs() { super(); } public WfDefNodeFieldDs(WfDefNodeField e) { super(e); } public String getType() { return this.type; } public void setType(String type) { this.type = type; } public Boolean getRequired() { return this.required; } public void setRequired(Boolean required) { this.required = required; } public Long getNodeId() { return this.nodeId; } public void setNodeId(Long nodeId) { this.nodeId = nodeId; } }
[ "mathe_attila@yahoo.com" ]
mathe_attila@yahoo.com
3c50fb0c9c4358f43f8f7c3eb4ec9bc96d4e8098
d132a32f07cdc583c021e56e61a4befff6228900
/src/main/java/net/minecraft/network/play/server/S05PacketSpawnPosition.java
614c56f53c190ac6c47cfa868c253d0a04248f7a
[]
no_license
TechCatOther/um_clean_forge
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
b4ddabd1ed7830e75df9267e7255c9e79d1324de
refs/heads/master
2020-03-22T03:14:54.717880
2018-07-02T09:28:10
2018-07-02T09:28:10
139,421,233
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
package net.minecraft.network.play.server; import java.io.IOException; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; import net.minecraft.util.BlockPos; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class S05PacketSpawnPosition implements Packet { private BlockPos field_179801_a; private static final String __OBFID = "CL_00001336"; public S05PacketSpawnPosition() {} public S05PacketSpawnPosition(BlockPos p_i45956_1_) { this.field_179801_a = p_i45956_1_; } public void readPacketData(PacketBuffer buf) throws IOException { this.field_179801_a = buf.readBlockPos(); } public void writePacketData(PacketBuffer buf) throws IOException { buf.writeBlockPos(this.field_179801_a); } public void func_180752_a(INetHandlerPlayClient p_180752_1_) { p_180752_1_.handleSpawnPosition(this); } @SideOnly(Side.CLIENT) public BlockPos func_179800_a() { return this.field_179801_a; } public void processPacket(INetHandler handler) { this.func_180752_a((INetHandlerPlayClient)handler); } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
b7542ee03c0073f3bfc73bf7d51119668a981b84
0b5c3fceed7f662ea7224fc9373ff65be027d087
/app/src/main/java/kntryer/downloadapk/util/CustomTools.java
89bb787505bb047b99b1888fc2d2f0c742064eb8
[]
no_license
lipeijian/UpdateApk
c4621cf573259931f95aa20386c64b5321e71cbb
9938a1bcc4ac2d35947c51c06abe7d825357bb7f
refs/heads/master
2021-07-13T13:52:19.470376
2017-10-17T08:18:12
2017-10-17T08:18:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,029
java
package kntryer.downloadapk.util; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.support.v4.content.FileProvider; import android.util.Log; import android.view.View; import java.io.File; import kntryer.downloadapk.BuildConfig; import kntryer.downloadapk.server.DownloadApkService; import me.drakeet.materialdialog.MaterialDialog; /** * Created by kntryer on 2017/10/13. */ public class CustomTools { /** * @param context * @param title * @param msg * @param positive */ public static void showToast(Context context, String title, String msg, String positive) { final MaterialDialog dialog = new MaterialDialog(context); dialog.setTitle(title); dialog.setMessage(msg); dialog.setCanceledOnTouchOutside(true); if (!positive.equals("")) { dialog.setPositiveButton(positive, new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }); } dialog.show(); } /** * 获取应用版本号 * * @param context * @return * @throws Exception */ public static String getVersionName(Context context) { PackageManager packageManager = context.getPackageManager(); // getPackageName()是你当前类的包名,0代表是获取版本信息 PackageInfo packInfo = null; try { packInfo = packageManager.getPackageInfo(context.getPackageName(), 0); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } String version = packInfo.versionName; return version; } /** * 检查版本号是否一致 * * @param context * @param serverVersion * @return */ public static boolean checkVersionUpdate(Context context, String serverVersion) { String[] serverVersions = serverVersion.split("\\."); String[] localVersions = getVersionName(context).split("\\."); int num = serverVersions.length > localVersions.length ? localVersions.length : serverVersions.length; for (int i = 0; i < num; i++) { if (serverVersions[i].compareTo(localVersions[i]) > 0) { return true; } else if (serverVersions[i].compareTo(localVersions[i]) < 0) { return false; } } return serverVersions.length > localVersions.length; } /** * 版本更新 * * @param context * @param status * @param url */ public static void startUpdateApk(final Context context, int status, final String url) { final MaterialDialog dialog = new MaterialDialog(context); dialog.setTitle("更新啦"); dialog.setMessage("快来体验崭新的宝宝!"); dialog.setCanceledOnTouchOutside(status == 0); dialog.setPositiveButton("立即更新", new View.OnClickListener() { @Override public void onClick(View v) { //启动下载服务,显示通知栏 Log.e("---->", "下载更新"); Intent intent = new Intent(context, DownloadApkService.class); intent.setAction(DownloadApkService.ACTION_START); intent.putExtra("id", 0); intent.putExtra("url", url); intent.putExtra("name", "宝宝.apk"); context.startService(intent); dialog.dismiss(); } }); if (status == 0) { dialog.setNegativeButton("稍候更新", new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }); } dialog.show(); } /** * 安装apk文件 * * @param context * @param file */ public static void installApk(Context context, File file) { Intent intent = new Intent(Intent.ACTION_VIEW); //判断是否是AndroidN以及更高的版本 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK); Uri contentUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".fileProvider", file); intent.setDataAndType(contentUri, "application/vnd.android.package-archive"); } else { intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } context.startActivity(intent); } }
[ "l" ]
l
dac5ea3fc002de88b0a86b2e8267451074242239
d00af6c547e629983ff777abe35fc9c36b3b2371
/jboss-all/jetty/src/main/org/mortbay/html/Input.java
410082a08a8c15cd4b8de48de7b03bf9f716d10c
[]
no_license
aosm/JBoss
e4afad3e0d6a50685a55a45209e99e7a92f974ea
75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7
refs/heads/master
2023-07-08T21:50:23.795023
2013-03-20T07:43:51
2013-03-20T07:43:51
8,898,416
1
1
null
null
null
null
UTF-8
Java
false
false
2,820
java
// =========================================================================== // Copyright (c) 1996 Mort Bay Consulting Pty. Ltd. All rights reserved. // $Id: Input.java,v 1.15.2.3 2003/06/04 04:47:37 starksm Exp $ // --------------------------------------------------------------------------- package org.mortbay.html; /* -------------------------------------------------------------------- */ /** HTML Form Input Tag. * <p> * @see Tag * @see Form * @version $Id: Input.java,v 1.15.2.3 2003/06/04 04:47:37 starksm Exp $ * @author Greg Wilkins */ public class Input extends Tag { /* ----------------------------------------------------------------- */ /** Input types */ public final static String Text="text"; public final static String Password="password"; public final static String Checkbox="checkbox"; public final static String Radio="radio"; public final static String Submit="submit"; public final static String Reset="reset"; public final static String Hidden="hidden"; public final static String File="file"; public final static String Image="image"; /* ----------------------------------------------------------------- */ public Input(String type,String name) { super("input"); attribute("type",type); attribute("name",name); } /* ----------------------------------------------------------------- */ public Input(String type,String name, String value) { this(type,name); attribute("value",value); } /* ----------------------------------------------------------------- */ public Input(Image image,String name, String value) { super("input"); attribute("type","image"); attribute("name",name); if (value!=null) attribute("value",value); attribute(image.attributes()); } /* ----------------------------------------------------------------- */ public Input(Image image,String name) { super("input"); attribute("type","image"); attribute("name",name); attribute(image.attributes()); } /* ----------------------------------------------------------------- */ public Input check() { attribute("checked"); return this; } /* ----------------------------------------------------------------- */ public Input setSize(int size) { size(size); return this; } /* ----------------------------------------------------------------- */ public Input setMaxSize(int size) { attribute("maxlength",size); return this; } /* ----------------------------------------------------------------- */ public Input fixed() { setMaxSize(size()); return this; } }
[ "rasmus@dll.nu" ]
rasmus@dll.nu
023b76c002aaf863be60ae0c81cc3f2f5af87a6b
e2904a117b4ba8582579955ad383cbf8250a6ae5
/src/march11Codes/reviewMethods.java
34f7e424b522c274e4fc306c5059a149b5408792
[]
no_license
eyilmaz4/March11
05e24a8d42974333a4128f0071562f47f7baef01
52c239f4b473afd7c51201cdb106a1d072120926
refs/heads/master
2021-03-14T04:11:25.683507
2020-03-12T03:34:17
2020-03-12T03:34:17
246,735,986
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package march11Codes; public class reviewMethods { public static void main(String[] args) { parkFee(true, 12); } public static void parkFee(Boolean member, int hour) { int payment=0; if (member) { System.out.println("no charge");; } else { if (hour >= 1 && hour <= 2) { payment = 3; } else if (hour >= 3 && hour <= 6) { payment = 5; } else if (hour >= 7 && hour <= 12) { payment = 10; } else if (hour > 12) { payment = 15; } }System.out.println("your parking fee is: $"+payment); } }
[ "eyilmaz4@na.edu" ]
eyilmaz4@na.edu
89ebe69b1c1ed3fdea9b4d1028e2bd1b74e67782
7a682dcc4e284bced37d02b31a3cd15af125f18f
/bitcamp-java-basic/src/main/java/ch20/d/Test04.java
1a4a25f2045e0a2013d899ce5b378420d38198ce
[]
no_license
eomjinyoung/bitcamp-java-20190527
a415314b74954f14989042c475a4bf36b7311a8c
09f1b677587225310250078c4371ed94fe428a35
refs/heads/master
2022-03-15T04:33:15.248451
2019-11-11T03:33:58
2019-11-11T03:33:58
194,775,330
4
3
null
null
null
null
UTF-8
Java
false
false
860
java
// HashMap에서 value 목록 꺼내기 package ch20.d; import java.util.Collection; import java.util.HashMap; public class Test04 { public static void main(String[] args) { class Student { String name; int age; public Student(String name, int age) { this.name = name; this.age = age; } @Override public String toString() { return "Student [name=" + name + ", age=" + age + "]"; } } HashMap<String, Student> map = new HashMap<>(); map.put("aaa", new Student("홍길동", 20)); map.put("bbb", new Student("임꺽정", 30)); map.put("ccc", new Student("안중근", 25)); // value 목록 꺼내기 Collection<Student> values = map.values(); for (Student value : values) { System.out.println(value); } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
a92b07f0c4efa162c11e7aafea8dfa4f882201b8
97e29489566dff2c2b309aebc66c91a69db234a3
/asianpaintsb2b/asianpaintsb2bcockpits/src/com/asianpaintsb2b/cockpits/cmscockpit/browser/filters/AbstractUiExperienceFilter.java
2335433573803cbd551cf73a413c7d95118f7d2c
[]
no_license
vamshivushakola/Home_asianpaints_b2b
f8ea6568dca3e87375a100c5d9e8f801e702404c
9ea46652e699fc843f8bb55f94a826bb1a9c4fd0
refs/heads/master
2020-12-31T04:56:13.029311
2016-05-22T18:28:48
2016-05-22T18:28:48
58,956,762
0
1
null
null
null
null
UTF-8
Java
false
false
1,959
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.asianpaintsb2b.cockpits.cmscockpit.browser.filters; import de.hybris.platform.cockpit.model.meta.PropertyDescriptor; import de.hybris.platform.cockpit.model.search.Query; import de.hybris.platform.cockpit.model.search.SearchParameterValue; import de.hybris.platform.cockpit.services.meta.TypeService; import de.hybris.platform.cockpit.session.BrowserFilter; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Required; public abstract class AbstractUiExperienceFilter implements BrowserFilter { private static final String ABSTRACT_PAGE_DEFAULT_PROPERTY_DESC = "abstractPage.defaultPage"; public static final String UI_EXPERIENCE_PARAM = "uiExperienceParam"; private TypeService typeService; public TypeService getTypeService() { return typeService; } @Required public void setTypeService(final TypeService typeService) { this.typeService = typeService; } public void removeDefaultPageFilter(final Query query) { //we have to remove a defaultPage = true filter if we are interested in immediate results.. final PropertyDescriptor propertyDescriptor = typeService.getPropertyDescriptor(ABSTRACT_PAGE_DEFAULT_PROPERTY_DESC); final List<SearchParameterValue> finalSearchParams = new ArrayList<SearchParameterValue>(); for (final SearchParameterValue searchParameter : query.getParameterValues()) { if (!propertyDescriptor.equals(searchParameter.getParameterDescriptor())) { finalSearchParams.add(searchParameter); } } query.setParameterValues(finalSearchParams); } }
[ "vamshi.vshk@gmail.com" ]
vamshi.vshk@gmail.com
da8eedbaf71222ddf0ae0466075cb7a9b07caa47
f4593abde861f751668565d2961d6e75304f98d3
/src/main/java/org/soulwing/jwt/api/PublicKeyLocator.java
24e86d475916dfa82a8298258ff251843501bfea
[ "Apache-2.0" ]
permissive
soulwing/jwt-api
f5fda3d4c7d26a5397b7645fc3166a0dcc23b295
c894bd33001cffb6ebdc3d6e3b6ae81f5bd4f9ae
refs/heads/master
2023-05-10T11:11:07.267683
2023-04-28T11:39:29
2023-04-28T11:39:29
174,628,888
0
0
NOASSERTION
2023-04-28T11:39:30
2019-03-09T00:18:44
Java
UTF-8
Java
false
false
5,250
java
/* * File created on Mar 17, 2019 * * Copyright (c) 2019 Carl Harris, Jr * and others as noted * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.soulwing.jwt.api; import java.net.URI; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.util.List; import java.util.Set; import java.util.function.Predicate; import org.soulwing.jwt.api.exceptions.CertificateException; import org.soulwing.jwt.api.exceptions.CertificateValidationException; import org.soulwing.jwt.api.exceptions.PublicKeyNotFoundException; /** * A service provider that locates a public key given criteria from a JOSE * header. * * @author Carl Harris */ public interface PublicKeyLocator { /** * An enumeration of strategy types for locating public keys. */ enum StrategyType { /** certificate chain in {@code x5c} header claim */ CERT_CHAIN, /** certificate chain URL in {@code x5u} header claim */ CERT_CHAIN_URL, /** JSON web key in {@code jwk} header claim */ JWK, /** JSON web key URL in {@code jku} header claim */ JWK_URL } /** * A builder that creates a {@link PublicKeyLocator}. */ interface Builder { /** * Locator strategies to enable; by default <em>all</em> strategies are * considered in the order given in the {@link StrategyType} enumeration. * @param strategies locator strategies; * @return this builder */ Builder strategies(Set<StrategyType> strategies); /** * Specifies the certificate validator. * @param validator certificate validator * @return this builder */ Builder certificateValidator(X509CertificateValidator validator); /** * Specifies the certificate validator factory. * @param validatorFactory certificate validator factory * @return this builder */ Builder certificateValidatorFactory( X509CertificateValidator.Factory validatorFactory); /** * Builds a locator in accordance with the configuration of this builder. * @return locator */ PublicKeyLocator build(); } /** * Criteria for a public key search as obtained from the JOSE header. */ interface Criteria { /** * Gets the value of the {@code kid} header. * @return header value or {@code null} if the header is not present */ String getKeyId(); /** * Gets the value of the {@code x5c} header. * @return list of certificates or {@code null} if header is not present * @throws CertificateException if an error occurs in producing the * certificate chain */ List<X509Certificate> getCertificateChain() throws CertificateException; /** * Gets the value of the {@code x5u} header. * @return certificate chain URL or {@code null} if header is not present */ URI getCertificateChainUrl(); /** * Gets an object that can be used to match values of the {@code x5t} * and {@code x5t#S256} headers. * @return thumbprint if either header is available, otherwise {@code null} * @throws CertificateException if an error occurs in producing the * thumbprint */ Thumbprint getCertificateThumbprint() throws CertificateException; /** * Gets the value of the {@code jwk} header. * @return web key or {@code null} if header is not present * @throws CertificateException if an error occurs in producing the web key */ JWK getWebKey() throws CertificateException; /** * Gets the value of the {@code jku} header. * @return URL or {@code null} if header is not present */ URI getWebKeyUrl(); } /** * An object that encapsulates the algorithms and matching operations for * certificate thumbprints provided in the JOSE header. */ interface Thumbprint { /** * Gets a predicate that tests whether this thumbprint matches a given * certificate * @return predicate * @throws CertificateException if the matcher cannot be created due to * an error (e.g. a JCA error in obtaining MessageDigest instances) */ Predicate<X509Certificate> matcher() throws CertificateException; } /** * Locates the public key described by the given criteria, if possible. * @param criteria criteria to match * @return public key information * @throws CertificateValidationException if a certificate containing the * matching public key fails validation; e.g. expired, revoked, * untrusted, etc * @throws PublicKeyNotFoundException if a matching public key cannot be * found */ PublicKeyInfo locate(Criteria criteria) throws PublicKeyNotFoundException, CertificateValidationException; }
[ "ceharris@vt.edu" ]
ceharris@vt.edu
025114a4389572ec70ffaa545450a0f55dcd3e12
35b710e9bc210a152cc6cda331e71e9116ba478c
/tc-main/src/main/java/com/topcoder/security/groups/services/dto/ProjectDTO.java
a5fdaf7c17513e723cad06568184ad0bae68db04
[]
no_license
appirio-tech/tc1-tcnode
d17649afb38998868f9a6d51920c4fe34c3e7174
e05a425be705aca8f530caac1da907d9a6c4215a
refs/heads/master
2023-08-04T19:58:39.617425
2016-05-15T00:22:36
2016-05-15T00:22:36
56,892,466
1
8
null
2022-04-05T00:47:40
2016-04-23T00:27:46
Java
UTF-8
Java
false
false
1,656
java
/* * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. */ package com.topcoder.security.groups.services.dto; /** * <p> * This class represents relevant info about a project * </p> * <p> * <strong>Thread Safety:</strong> This class is mutable and not thread safe * </p> * * @author TCSASSEMBLER * @version 1.0 (Topcoder Security Groups Backend Model and Authorization * Assembly v1.0 ) * @since 1.0 */ public class ProjectDTO { /** * <p> * Represents the ID of the project It is managed with a getter and setter, * hence fully mutable. It may have any value. * </p> */ private long projectId; /** * <p> * Represents the name of the project It is managed with a getter and * setter, hence fully mutable. It may have any value. * </p> */ private String name; /** * <p> * Default constructor. * </p> */ public ProjectDTO() { } /** * <p> * Getter of projectId field. * </p> * @return the projectId */ public long getProjectId() { return projectId; } /** * <p> * Setter of projectId field. * </p> * @param projectId the projectId to set */ public void setProjectId(long projectId) { this.projectId = projectId; } /** * <p> * Getter of name field. * </p> * @return the name */ public String getName() { return name; } /** * <p> * Setter of name field. * </p> * @param name the name to set */ public void setName(String name) { this.name = name; } }
[ "dongzhengbin@winterflames-MacBook-Pro.local" ]
dongzhengbin@winterflames-MacBook-Pro.local
817ac7be3914e3f38af4e2a288b7512dc4820b51
17079fa276050a5a7b5994d7fae541d7d0cfa3b3
/yxw-commons/src/main/java/com/yxw/commons/entity/platform/app/color/AppColor.java
8b41c3bb98f9a1d9b9729df505e480e190f95107
[]
no_license
zhiji6/yxw
664f6729b6642affb8ff1ee258b915f8d1ccf666
7f75370fcd425cda11faf3d2c54e6119ecc7d9fd
refs/heads/master
2023-08-17T00:12:03.150081
2019-12-04T07:33:45
2019-12-04T07:33:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
938
java
package com.yxw.commons.entity.platform.app.color; import com.yxw.base.entity.BaseEntity; public class AppColor extends BaseEntity { private static final long serialVersionUID = 8114263231882165544L; // 平台名称 private String appName; // appCode, 银联:unionpay private String appCode; // 3/6位的颜色值,带# private String color; private String payInfoViewType = "iframe"; public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getAppCode() { return appCode; } public void setAppCode(String appCode) { this.appCode = appCode; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getPayInfoViewType() { return payInfoViewType; } public void setPayInfoViewType(String payInfoViewType) { this.payInfoViewType = payInfoViewType; } }
[ "279430985@qq.com" ]
279430985@qq.com
e366e83d008a3f3ada820fa84dac5d40853188fe
8de1aa33a1a5a5cf91b05b87ecf2fb9815c358d8
/basecomponent/src/main/java/com/yuntian/basecomponent/mvp/BaseModel.java
9dc8da5e8580efcc11f98a17718d1b1baa993a2d
[]
no_license
chuzhonglingyan/GankApp
ca93c5df62b4c16ffe8a0a4c68036b42ecba922e
3e3104f9a4716df02915aaa2088e3ee27a3f7617
refs/heads/master
2020-03-18T04:32:14.270742
2018-05-27T10:59:20
2018-05-27T10:59:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
137
java
package com.yuntian.basecomponent.mvp; /** * description . * Created by ChuYingYan on 2018/5/1. */ public interface BaseModel{ }
[ "944610721@qq.com" ]
944610721@qq.com
d2f68a8d5ac0e8ee82a326ca30ef4d6e8fadea0f
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/cbr/src/main/java/com/huaweicloud/sdk/cbr/v1/model/BatchUpdateVaultResponse.java
730c1d7432409d4e0b2ebada43b8dc5745aeab78
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
2,661
java
package com.huaweicloud.sdk.cbr.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.huaweicloud.sdk.core.SdkResponse; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; /** * Response Object */ public class BatchUpdateVaultResponse extends SdkResponse { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "updated_vaults_id") private List<String> updatedVaultsId = null; public BatchUpdateVaultResponse withUpdatedVaultsId(List<String> updatedVaultsId) { this.updatedVaultsId = updatedVaultsId; return this; } public BatchUpdateVaultResponse addUpdatedVaultsIdItem(String updatedVaultsIdItem) { if (this.updatedVaultsId == null) { this.updatedVaultsId = new ArrayList<>(); } this.updatedVaultsId.add(updatedVaultsIdItem); return this; } public BatchUpdateVaultResponse withUpdatedVaultsId(Consumer<List<String>> updatedVaultsIdSetter) { if (this.updatedVaultsId == null) { this.updatedVaultsId = new ArrayList<>(); } updatedVaultsIdSetter.accept(this.updatedVaultsId); return this; } /** * 已批量修改id列表 * @return updatedVaultsId */ public List<String> getUpdatedVaultsId() { return updatedVaultsId; } public void setUpdatedVaultsId(List<String> updatedVaultsId) { this.updatedVaultsId = updatedVaultsId; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } BatchUpdateVaultResponse that = (BatchUpdateVaultResponse) obj; return Objects.equals(this.updatedVaultsId, that.updatedVaultsId); } @Override public int hashCode() { return Objects.hash(updatedVaultsId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchUpdateVaultResponse {\n"); sb.append(" updatedVaultsId: ").append(toIndentedString(updatedVaultsId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
9d23c20a1fbfae3e15067dc2e2902a9f906c41a5
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/game/luggage/b/c.java
bd6d7909e356825714e91bc4b2c29f4fa5a08446
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,280
java
package com.tencent.mm.plugin.game.luggage.b; import android.content.Context; import com.tencent.luggage.d.a.a; import com.tencent.luggage.g.i; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.g.a.vv; import com.tencent.mm.plugin.game.luggage.d.e; import com.tencent.mm.plugin.webview.luggage.jsapi.bc; import com.tencent.mm.plugin.webview.luggage.jsapi.bd; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.sdk.platformtools.bo; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class c extends bd<e> { public final int biG() { return 1; } public final void b(a aVar) { } public final void a(Context context, String str, bc.a aVar) { AppMethodBeat.i(135868); ab.i("MicroMsg.JsApiBatchUpdateWepkg", "invokeInMM"); JSONObject bQ = i.bQ(str); if (bQ == null) { ab.e("MicroMsg.JsApiBatchUpdateWepkg", "data is null"); aVar.d("fail", null); AppMethodBeat.o(135868); return; } String optString = bQ.optString("pkgIdList"); if (!bo.isNullOrNil(optString)) { try { JSONArray jSONArray = new JSONArray(optString); if (jSONArray.length() > 0) { ArrayList arrayList = new ArrayList(); for (int i = 0; i < jSONArray.length(); i++) { arrayList.add(jSONArray.optString(i)); } if (!bo.ek(arrayList)) { vv vvVar = new vv(); vvVar.cSX.cuy = 8; vvVar.cSX.scene = 0; vvVar.cSX.cTc = arrayList; com.tencent.mm.sdk.b.a.xxA.m(vvVar); aVar.d(null, null); AppMethodBeat.o(135868); return; } } } catch (JSONException e) { ab.e("MicroMsg.JsApiBatchUpdateWepkg", "data is not json"); } } aVar.d("fail", null); AppMethodBeat.o(135868); } public final String name() { return "batchUpdateWepkg"; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
bf5ba58598700cce8d9fd3f8d0314749d0c2fc09
9146970ff0b5a2f60128c80d0bc85d95de2549d4
/log-center/src/main/java/com/cloud/log/service/impl/LogServiceImpl.java
17e0d02f6fa299db644d60049b3911fe99d736b9
[]
no_license
anhengchangyua/sc-server
31e378628fd3faeea0835fc8bdb70024e4247cd2
359bc709b8227c722e658088efc1096a2fed8129
refs/heads/master
2020-03-16T01:16:26.230076
2018-05-08T12:58:46
2018-05-08T12:58:46
132,436,225
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package com.cloud.log.service.impl; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import com.cloud.common.utils.PageUtil; import com.cloud.log.dao.LogDao; import com.cloud.log.service.LogService; import com.cloud.model.common.Page; import com.cloud.model.log.Log; @Service public class LogServiceImpl implements LogService { @Autowired private LogDao logDao; @Async @Override public void save(Log log) { if (log.getCreateTime() == null) { log.setCreateTime(new Date()); } if (log.getFlag() == null) { log.setFlag(Boolean.TRUE); } logDao.save(log); } @Override public Page<Log> findLogs(Map<String, Object> params) { int total = logDao.count(params); List<Log> list = Collections.emptyList(); if (total > 0) { PageUtil.pageParamConver(params); list = logDao.findData(params); } return new Page<>(total, list); } }
[ "188851312@qq.com" ]
188851312@qq.com
fef400b499b00a6ef29a9ffa0496874bf9362540
62867c0debba4090f6debdf9e8649293fdcf2886
/博客系统(struts+hibernate+spring)/博客/文档源码和数据库文件/src/dlog4j/security/RangeAllow.java
64e60a87965c096854cea784d63131ecf006011e
[]
no_license
luomo135/26-
ac1a56a2d2c78a10bf22e31a7bc6d291dd7a8bcc
349538f5cdebae979910c11150962a72cc2f799c
refs/heads/master
2022-01-26T08:25:48.015257
2018-08-01T02:55:06
2018-08-01T02:55:06
null
0
0
null
null
null
null
WINDOWS-1253
Java
false
false
1,305
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package dlog4j.security; import web.security.Range; import web.security.impl.RangeImpl; /** * ΛωΣΠ·¶Ξ§ * @author Winter Lau */ public class RangeAllow extends RangeImpl { public boolean equals(Range range) { Class thisClass = getClass(); Class thatClass = range.getClass(); if(thisClass.equals(thatClass)) return super.equals(range); Class superClass = thisClass; do{ superClass = superClass.getSuperclass(); if(superClass==null) break; if(superClass.equals(thatClass)) return true; }while(true); return false; } }
[ "huangwutongdd@163.com" ]
huangwutongdd@163.com
37130428d003525e3041abdee6a8d639e434d59d
a15e6062d97bd4e18f7cefa4fe4a561443cc7bc8
/src/combit/ListLabel24/LLSTG_AccessDenied_Exception.java
334561d75659561225071dc500cd772f77ec84fd
[]
no_license
Javonet-io-user/e66e9f78-68be-483d-977e-48d29182c947
017cf3f4110df45e8ba4a657ba3caba7789b5a6e
02ec974222f9bb03a938466bd6eb2421bb3e2065
refs/heads/master
2020-04-15T22:55:05.972920
2019-01-10T16:01:59
2019-01-10T16:01:59
165,089,187
0
0
null
null
null
null
UTF-8
Java
false
false
2,441
java
package combit.ListLabel24; import Common.Activation; import static Common.Helper.Convert; import static Common.Helper.getGetObjectName; import static Common.Helper.getReturnObjectName; import static Common.Helper.ConvertToConcreteInterfaceImplementation; import Common.Helper; import com.javonet.Javonet; import com.javonet.JavonetException; import com.javonet.JavonetFramework; import com.javonet.api.NObject; import com.javonet.api.NEnum; import com.javonet.api.keywords.NRef; import com.javonet.api.keywords.NOut; import com.javonet.api.NControlContainer; import java.util.concurrent.atomic.AtomicReference; import java.util.Iterator; import java.lang.*; import combit.ListLabel24.*; import jio.System.*; import jio.System.Runtime.Serialization.*; import jio.System.Runtime.InteropServices.*; public class LLSTG_AccessDenied_Exception extends ListLabelException implements ISerializable, _Exception { protected NObject javonetHandle; public LLSTG_AccessDenied_Exception() { super((NObject) null); try { javonetHandle = Javonet.New("combit.ListLabel24.LLSTG_AccessDenied_Exception"); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } public LLSTG_AccessDenied_Exception(java.lang.String message) { super((NObject) null); try { javonetHandle = Javonet.New("combit.ListLabel24.LLSTG_AccessDenied_Exception", message); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } public LLSTG_AccessDenied_Exception( java.lang.String message, jio.System.Exception innerException) { super((NObject) null); try { javonetHandle = Javonet.New("combit.ListLabel24.LLSTG_AccessDenied_Exception", message, innerException); super.setJavonetHandle(javonetHandle); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } public LLSTG_AccessDenied_Exception(NObject handle) { super(handle); this.javonetHandle = handle; } public void setJavonetHandle(NObject handle) { this.javonetHandle = handle; } static { try { Activation.initializeJavonet(); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
[ "support@javonet.com" ]
support@javonet.com
4aa8354430683bca16bb63b553df2442cb3c7432
aaef3516558bfdbad0f64917c1e1c2dfe840bc8c
/Arnold can not drive today/arnold can not drive today/Arnold-android/gen/com/rhymes/arnold/R.java
fdde74d57dc1ff9d59e1eeaf1013fdbfd8a9e168
[]
no_license
RDeepakkrishna/games
f3366490c78ab26b33def390f7230ab01ded0682
9c854718ec7504b861c2e2f15b377a9d14c77e82
refs/heads/master
2021-01-11T03:17:59.104294
2015-06-25T11:44:10
2015-06-25T11:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
616
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.rhymes.arnold; public final class R { public static final class attr { } public static final class drawable { public static final int icon=0x7f020000; } public static final class layout { public static final int main=0x7f030000; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; } }
[ "kdgupta87@gmail.com" ]
kdgupta87@gmail.com
4cf99dc1fdaafc2377cb871bed67c2f16a6391eb
ce7f089378d817e242793649785b097c9be3f96b
/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set9/gondor/Card9_034.java
56a99887bb7efcf15d29799d604a44cdc3d093ee
[]
no_license
TheSkyGold/gemp-lotr
aaba1f461a3d9237d12ca340a7e899b00e4151e4
aab299c87fc9cabd10b284c25b699f10a84fe622
refs/heads/master
2021-01-11T07:39:27.678795
2014-11-21T00:44:25
2014-11-21T00:44:25
32,382,766
1
0
null
null
null
null
UTF-8
Java
false
false
2,925
java
package com.gempukku.lotro.cards.set9.gondor; import com.gempukku.lotro.cards.AbstractAttachableFPPossession; import com.gempukku.lotro.cards.PlayConditions; import com.gempukku.lotro.cards.TriggerConditions; import com.gempukku.lotro.cards.effects.PreventCardEffect; import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect; import com.gempukku.lotro.cards.modifiers.evaluator.CountActiveEvaluator; import com.gempukku.lotro.common.*; import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.logic.actions.ActivateCardAction; import com.gempukku.lotro.logic.effects.WoundCharactersEffect; import com.gempukku.lotro.logic.modifiers.Modifier; import com.gempukku.lotro.logic.modifiers.StrengthModifier; import com.gempukku.lotro.logic.timing.Action; import com.gempukku.lotro.logic.timing.Effect; import java.util.Collections; import java.util.List; /** * Set: Reflections * Side: Free * Culture: Gondor * Twilight Cost: 2 * Type: Artifact • Hand Weapon * Vitality: +1 * Game Text: Bearer must be a [GONDOR] Man. If bearer is Elendil or Isildur, he is strength +1 for each [GONDOR] * artifact you can spot (limit +6). Response: If bearer is about to take a wound, exert 2 [GONDOR] Men to prevent that. */ public class Card9_034 extends AbstractAttachableFPPossession { public Card9_034() { super(2, 0, 1, Culture.GONDOR, CardType.ARTIFACT, PossessionClass.HAND_WEAPON, "Narsil", "Blade of the Faithful", true); } @Override protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) { return Filters.and(Culture.GONDOR, Race.MAN); } @Override protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) { return Collections.singletonList( new StrengthModifier(self, Filters.and(Filters.hasAttached(self), Filters.or(Filters.name("Elendil"), Filters.name("Isildur"))), null, new CountActiveEvaluator(6, Culture.GONDOR, CardType.ARTIFACT))); } @Override public List<? extends Action> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { if (TriggerConditions.isGettingWounded(effect, game, self.getAttachedTo()) && PlayConditions.canExert(self, game, 1, 2, Culture.GONDOR, Race.MAN)) { ActivateCardAction action = new ActivateCardAction(self); action.appendCost( new ChooseAndExertCharactersEffect(action, playerId, 2, 2, Culture.GONDOR, Race.MAN)); action.appendEffect( new PreventCardEffect((WoundCharactersEffect) effect, self.getAttachedTo())); return Collections.singletonList(action); } return null; } }
[ "marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f" ]
marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f
cdc0df0d20bcd1398b5536570e494e03b1830d9a
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/tomcat70/519.java
fd753b085da0a56c709da752ca15e28827e00b0f
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
5,146
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.startup; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Enumeration; import java.util.Properties; import org.apache.catalina.Globals; public class CatalinaProperties { // ------------------------------------------------------- Static Variables private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(CatalinaProperties.class); private static Properties properties = null; static { loadProperties(); } // --------------------------------------------------------- Public Methods /** * Return specified property value. */ public static String getProperty(String name) { return properties.getProperty(name); } /** * Return specified property value. * * @deprecated Unused - will be removed in 8.0.x */ @Deprecated public static String getProperty(String name, String defaultValue) { return properties.getProperty(name, defaultValue); } // --------------------------------------------------------- Public Methods /** * Load properties. */ private static void loadProperties() { InputStream is = null; Throwable error = null; try { String configUrl = getConfigUrl(); if (configUrl != null) { is = (new URL(configUrl)).openStream(); } } catch (Throwable t) { handleThrowable(t); } if (is == null) { try { File home = new File(getCatalinaBase()); File conf = new File(home, "conf"); File propsFile = new File(conf, "catalina.properties"); is = new FileInputStream(propsFile); } catch (Throwable t) { handleThrowable(t); } } if (is == null) { try { is = CatalinaProperties.class.getResourceAsStream("/org/apache/catalina/startup/catalina.properties"); } catch (Throwable t) { handleThrowable(t); } } if (is != null) { try { properties = new Properties(); properties.load(is); } catch (Throwable t) { handleThrowable(t); error = t; } finally { try { is.close(); } catch (IOException ioe) { log.warn("Could not close catalina.properties", ioe); } } } if ((is == null) || (error != null)) { // Do something log.warn("Failed to load catalina.properties", error); // That's fine - we have reasonable defaults. properties = new Properties(); } // Register the properties as system properties Enumeration<?> enumeration = properties.propertyNames(); while (enumeration.hasMoreElements()) { String name = (String) enumeration.nextElement(); String value = properties.getProperty(name); if (value != null) { System.setProperty(name, value); } } } /** * Get the value of the catalina.home environment variable. */ private static String getCatalinaHome() { return System.getProperty(Globals.CATALINA_HOME_PROP, System.getProperty("user.dir")); } /** * Get the value of the catalina.base environment variable. */ private static String getCatalinaBase() { return System.getProperty(Globals.CATALINA_BASE_PROP, getCatalinaHome()); } /** * Get the value of the configuration URL. */ private static String getConfigUrl() { return System.getProperty("catalina.config"); } // Copied from ExceptionUtils since that class is not visible during start private static void handleThrowable(Throwable t) { if (t instanceof ThreadDeath) { throw (ThreadDeath) t; } if (t instanceof VirtualMachineError) { throw (VirtualMachineError) t; } // All other instances of Throwable will be silently swallowed } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
f86ad6f5f4121d53b82c9bb4d17d302f662926e4
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-32b-7-9-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/partitioning/BSPTree_ESTest.java
93947476309fe6a75e201b12f82f48bf8797dfaa
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
/* * This file was automatically generated by EvoSuite * Tue Apr 07 15:11:12 UTC 2020 */ package org.apache.commons.math3.geometry.partitioning; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BSPTree_ESTest extends BSPTree_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
babdb081ea65a28f71434f94f5b6a9af458f8401
f421916482b846ddaa3890f6bee71bd173e4cc80
/app/src/main/java/com/example/login_demo/SelectSchoolActivity.java
da046560fc7ee2fddd349104799e92d94f1fbbaf
[]
no_license
liudididi/XueYe
51382f3284a3a5ed5135d96747ff13dd65274fcc
b334ba229634b115ecbc995951cf5cd9da183696
refs/heads/master
2021-04-12T04:23:15.151358
2018-06-30T05:51:40
2018-06-30T05:51:40
125,950,213
0
0
null
null
null
null
UTF-8
Java
false
false
2,517
java
package com.example.login_demo; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.widget.ImageView; import android.widget.TextView; import java.util.List; import adapter.SelecSchool_Adapter; import base.BaseActivity; import bean.AreaBean; import bean.CityBean; import bean.ProviceBean; import bean.SelectSchoolBean; import butterknife.BindView; import butterknife.OnClick; import presenter.SelectSchoolPrsent; import untils.SPUtils; import view.SelectSchoolView; public class SelectSchoolActivity extends BaseActivity implements SelectSchoolView{ @BindView(R.id.school_iv_back) ImageView schoolIvBack; @BindView(R.id.school_tvtitle) TextView schoolTvtitle; @BindView(R.id.school_recycle) RecyclerView schoolRecycle; private SelectSchoolPrsent selectSchoolPrsent; @Override public int getId() { return R.layout.activity_select_school; } @Override public void InIt() { String province = (String) SPUtils.get(MyApp.context, "province", ""); String city = (String) SPUtils.get(MyApp.context, "city", ""); String area = getIntent().getStringExtra("area"); SPUtils.put(MyApp.context,"area",area); schoolTvtitle.setText(area); schoolRecycle.setLayoutManager(new LinearLayoutManager(this)); selectSchoolPrsent = new SelectSchoolPrsent(this); selectSchoolPrsent.getschools(province,city,area); } @Override protected void onDestroy() { super.onDestroy(); selectSchoolPrsent.onDestory(); } @OnClick(R.id.school_iv_back) public void onViewClicked() { finish(); } @Override public void getProvicesuccess(List<ProviceBean> list, String msg) { } @Override public void getProvicefail(String msg) { } @Override public void getCitysuccess(List<CityBean> list, String msg) { } @Override public void getCityfail(String msg) { } @Override public void getAreassuccess(List<AreaBean> list, String msg) { } @Override public void getAreasfail(String msg) { } @Override public void getSchoolssuccess(List<SelectSchoolBean> list, String msg) { if(list!=null&&list.size()>=1){ SelecSchool_Adapter selecSchool_adapter=new SelecSchool_Adapter(this,list); schoolRecycle.setAdapter(selecSchool_adapter); } } @Override public void getSchoolfail(String msg) { } }
[ "31385116+liudididi@users.noreply.github.com" ]
31385116+liudididi@users.noreply.github.com
7fa0db19c9b2fd12bb091db0fe6b4d082e20c974
9e72d2ec74a613a586499360707910e983a14370
/web/org/ace/insurance/web/manage/report/medical/HealthMonthlyReportDTO.java
056c2aed8fede471af2672c08916e4a0ac6d247c
[]
no_license
pyaesonehein1141991/FNI-LIFE
30ecefca8b12455c0a90906004f85f32217c5bf4
a40b502147b32193d467c2db7d49e2872f2fcab6
refs/heads/master
2020-08-31T11:20:22.757995
2019-10-30T11:02:47
2019-10-30T11:02:47
218,678,685
0
2
null
null
null
null
UTF-8
Java
false
false
2,732
java
package org.ace.insurance.web.manage.report.medical; public class HealthMonthlyReportDTO { private String policyNo; private String insuredName; private String nrc; private String occupation; private int age; private String address; private String unit; private String periodOfInsurance; private double premium; private float comission; private String reNoAndDate; private String agentName; public HealthMonthlyReportDTO() { } public HealthMonthlyReportDTO(String policyNo, String insuredName, String nrc, String occupation, int age, String address, String unit, String periodOfInsurance, double premium, float comission, String reNoAndDate, String agentName) { this.policyNo = policyNo; this.insuredName = insuredName; this.nrc = nrc; this.occupation = occupation; this.age = age; this.address = address; this.unit = unit; this.periodOfInsurance = periodOfInsurance; this.premium = premium; this.comission = comission; this.reNoAndDate = reNoAndDate; this.agentName = agentName; } public String getPolicyNo() { return policyNo; } public void setPolicyNo(String policyNo) { this.policyNo = policyNo; } public String getInsuredName() { return insuredName; } public void setInsuredName(String insuredName) { this.insuredName = insuredName; } public String getNrc() { return nrc; } public void setNrc(String nrc) { this.nrc = nrc; } public String getOccupation() { return occupation; } public void setOccupation(String occupation) { this.occupation = occupation; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public String getPeriodOfInsurance() { return periodOfInsurance; } public void setPeriodOfInsurance(String periodOfInsurance) { this.periodOfInsurance = periodOfInsurance; } public double getPremium() { return premium; } public void setPremium(double premium) { this.premium = premium; } public float getComission() { return comission; } public void setComission(float comission) { this.comission = comission; } public String getReNoAndDate() { return reNoAndDate; } public void setReNoAndDate(String reNoAndDate) { this.reNoAndDate = reNoAndDate; } public String getAgentName() { return agentName; } public void setAgentName(String agentName) { this.agentName = agentName; } }
[ "ASUS@DESKTOP-37IOB4I" ]
ASUS@DESKTOP-37IOB4I
9b7fa629dffcc402f810d6d8b187bb75fec19e59
13da4b96dea7e2d32b9509244ba1413f15e735d0
/src/main/java/com/cofc/service/aida/PositionService.java
b4a1105827c222bd6ebd7dafc1c25965d267de4d
[]
no_license
gateshibill/shares100
f178d8a7377c72e705e1e337d18bdf61e2a222e4
7ccad7a4696873372cb6fb5d0bb60ca6183df76f
refs/heads/master
2022-12-21T07:55:00.747148
2020-09-24T03:23:13
2020-09-24T03:23:41
235,473,835
0
0
null
2022-12-10T03:56:33
2020-01-22T01:12:34
Java
UTF-8
Java
false
false
592
java
package com.cofc.service.aida; import java.util.List; import org.apache.ibatis.annotations.Param; import com.cofc.pojo.aida.Position; public interface PositionService { public void addPosition(Position position); public void updatePosition(Position position); public void delPosition(@Param("positionId")Integer positionId); public int getPositionCount(@Param("pos")Position pos); public List<Position> getPositionList(@Param("pos")Position pos,@Param("page")Integer page, @Param("limit")Integer limit); public Position getPositionInfo(@Param("positionId")Integer positionId); }
[ "z1-bill@ik8s.com" ]
z1-bill@ik8s.com
19ec3d65ad20d970c4148c9081c473f90d77cfba
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/response/KoubeiRetailWmsProducerQueryResponse.java
d8c32cc9dceaf3a273482d016a11742bd203b5a7
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,074
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.domain.ProducerVO; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.retail.wms.producer.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiRetailWmsProducerQueryResponse extends AlipayResponse { private static final long serialVersionUID = 2411494615944687982L; /** * 生产厂商信息 */ @ApiListField("producers") @ApiField("producer_v_o") private List<ProducerVO> producers; /** * 记录总数 */ @ApiField("total_count") private Long totalCount; public void setProducers(List<ProducerVO> producers) { this.producers = producers; } public List<ProducerVO> getProducers( ) { return this.producers; } public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } public Long getTotalCount( ) { return this.totalCount; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
eca55bcf6afcef78cc6f2916e09c62ccd998ea19
8566e4dc054f0a9c1979b807d6a23ac3cce4d379
/java8-Tests/src/ma/tests/lambdas/ConvertArray.java
5139c4e715ea3f6f72bc421a6ab3ffdbc078a848
[]
no_license
KhalilMar/JavaTests
55108d8deea6cf3675979f725896c9f6d6812203
f8eb36ccbdb8acda77d58d3d7d582d618959a814
refs/heads/master
2021-06-09T10:13:05.966867
2021-04-04T16:02:48
2021-04-04T16:02:48
150,307,040
0
1
null
2018-10-11T22:59:50
2018-09-25T17:55:08
Java
UTF-8
Java
false
false
1,079
java
package ma.tests.lambdas; import java.util.Arrays; import java.util.stream.IntStream; import java.util.stream.Stream; public class ConvertArray { public static void main(String[] args) { String[] array = {"a", "b", "c", "d", "e"}; //Arrays.stream Stream<String> stream1 = Arrays.stream(array); stream1.forEach(x -> System.out.println(x)); //Stream.of Stream<String> stream2 = Stream.of(array); stream2.forEach(x -> System.out.println(x)); // int[] intArray = {1, 2, 3, 4, 5}; // 1. Arrays.stream -> IntStream IntStream intStream1 = Arrays.stream(intArray); intStream1.forEach(x -> System.out.println(x)); // 2. Stream.of -> Stream<int[]> Stream<int[]> temp = Stream.of(intArray); // Cant print Stream<int[]> directly, convert / flat it to IntStream IntStream intStream2 = temp.flatMapToInt(x -> Arrays.stream(x)); intStream2.forEach(x -> System.out.println(x)); } }
[ "HP@HP-PC" ]
HP@HP-PC
272c848a1b4644e8f1d48051d7bae3bdec549899
9bfa71d23e70e514dd9be5f47781b1178833130d
/SQLPlugin/gen/com/sqlplugin/psi/impl/SqlOldOrNewValuesAliasListImpl.java
f1252888b1717fd4e57c420d330f5bcf03b23619
[ "MIT" ]
permissive
smoothwind/SQL-IDEAplugin
de341884b77c2c61e0b4d6ceefd7c16ff3b7b469
3efa434095b4cac4772a0a7df18b34042a4c7557
refs/heads/master
2020-04-16T22:37:44.776363
2019-01-28T09:43:25
2019-01-28T09:43:25
165,976,439
0
0
null
null
null
null
UTF-8
Java
false
true
1,060
java
// This is a generated file. Not intended for manual editing. package com.sqlplugin.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static com.sqlplugin.psi.SqlTypes.*; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.sqlplugin.psi.*; public class SqlOldOrNewValuesAliasListImpl extends ASTWrapperPsiElement implements SqlOldOrNewValuesAliasList { public SqlOldOrNewValuesAliasListImpl(@NotNull ASTNode node) { super(node); } public void accept(@NotNull SqlVisitor visitor) { visitor.visitOldOrNewValuesAliasList(this); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof SqlVisitor) accept((SqlVisitor)visitor); else super.accept(visitor); } @Override @NotNull public SqlOldOrNewValuesAlias getOldOrNewValuesAlias() { return findNotNullChildByClass(SqlOldOrNewValuesAlias.class); } }
[ "stephen.idle@qq.com" ]
stephen.idle@qq.com
cbce87a294463b8fa681541a635d89b4cc9ebc2d
1c0633968730b12f567f790825b840c277ae07c5
/src/org/uecide/TreeUpdaterService.java
04f7d13eca822cfecae60764d345d9919b4c2fed
[]
no_license
UECIDE/UECIDE
d5f8334c693a9ed774969b9c656551afa0b06c66
5c5de111b375f00721f69de64d9ef2e278487527
refs/heads/master
2021-07-18T05:25:26.267435
2021-05-25T15:54:21
2021-05-25T15:54:21
10,887,191
64
18
null
2021-02-03T19:35:07
2013-06-23T15:47:52
Java
UTF-8
Java
false
false
2,464
java
/* * Copyright (c) 2015, Majenko Technologies * 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 Majenko Technologies 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. */ package org.uecide; public class TreeUpdaterService extends Service { public TreeUpdaterService() { setName("Tree Updater"); setInterval(1000); } public void setup() { } public void cleanup() { } public void loop() { synchronized (Editor.editorList) { boolean doneSomething = false; for (Editor e : Editor.editorList) { if (!e.compilerRunning()) { if (e.getUpdateFlag()) { e.loadedSketch.findAllFunctions(); e.loadedSketch.updateKeywords(); e.loadedSketch.updateLibraryList(); e.updateKeywords(); e.updateLibrariesTree(); e.updateSourceTree(); } } } } } }
[ "matt@majenko.co.uk" ]
matt@majenko.co.uk
ea656ce2e807764d603c617b0cf5a45c86a368c4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_6815fb87def575dffec16f3e4a049b263d4e2a82/HttpRequests/20_6815fb87def575dffec16f3e4a049b263d4e2a82_HttpRequests_s.java
feeead8fd3ffd558f706c36b63fbedfae20053b5
[]
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,734
java
package com.example.friendzyapp; import java.io.Serializable; import java.util.List; import java.util.Map; import org.osmdroid.util.GeoPoint; import android.util.Log; /* * A non-static container for all the request objects. * * Refactored out here so initServer can access them in a non-android environment * for Robotium testing. */ public class HttpRequests { private static final String TAG = "HttpRequests"; public static class LoginRequest { public LoginRequest(String _userID, List<String> _facebookFriends, String ri, String pn) { userID = _userID; facebookFriends = _facebookFriends; this.regId = ri; this.phone_number = pn; } public String userID; public List<String> facebookFriends; public String regId; public String phone_number; } public static class PostStatusRequest { public String userID; public String status; public String is_public; public PostStatusRequest(String userID, String status) { this.userID = userID; this.status = status; this.is_public = "true"; } } public static class AcceptMatchRequest { public String userID; public String friendID; public Map<String, String> userLocation; public AcceptMatchRequest(String userID, String friendID, Map<String, String> userLocation) { this.userID = userID; this.friendID = friendID; this.userLocation = userLocation; } } public static class PostMsgRequest { public String userID; public String friendID; public String msg; public ServerMeetupLocation meetup_location; // make an object for this!! public PostMsgRequest(String userID, String friendID, String msg, ServerMeetupLocation meetup_location) { Log.d(TAG, "I'm user :" + userID); this.userID = userID; this.friendID = friendID; this.msg = msg; this.meetup_location = meetup_location; } } /* * To be jsoned and sent to server only */ public static class ServerMeetupLocation { public String meeting_name; public newLocation meeting_location; public ServerMeetupLocation(String meeting_name, newLocation meeting_location) { this.meeting_name = meeting_name; this.meeting_location = meeting_location; } public ServerMeetupLocation() { //emtpy one; don't update the sever } } public static class newLocation { public String latitude; public String longitude; public newLocation(String latitude, String longitude) { this.latitude = latitude; this.longitude = longitude; } } /* * To be used in receiving only */ public static class MeetupLocation implements Serializable { private static final long serialVersionUID = 1L; public String meetingName; public GeoPoint meetingLocation; public MeetupLocation(String meetingName, GeoPoint meetingLocation) { Log.d(TAG, "Someone is trying to instantiate a MeetupLocation!"); this.meetingName = meetingName; this.meetingLocation = meetingLocation; } public MeetupLocation() { // empty one used for if location is not set. } } public static class SubUpdateRequest { public String userID; public String type; // available types: "add", "delete" public String subscribe_topic; public List<String> subscribe_to; public SubUpdateRequest(String userID, String type, String subscribe_topic, List<String> subscribe_to) { Log.wtf(TAG, "I'm user :" + userID); this.userID = userID; this.type = type; this.subscribe_topic = subscribe_topic; this.subscribe_to = subscribe_to; } } public static class SetSMSRequest { public String userID; public Boolean sms; public SetSMSRequest(String userID, Boolean sms) { this.userID = userID; this.sms = sms; } } public static class GetEventsRequest { public String userID; public Map<String, String> userLocation; public GetEventsRequest(String userID, Map<String, String> userLocation) { this.userID = userID; this.userLocation = userLocation; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
11f3bafdf85d263d9c525495365b1ddbfc0fcb8e
4eea13dc72e0ff8ec79c7a94deca38e55868b603
/chapter9/RanderFactory.java
c411914348d2f2713b11ece2800c49767fd47313
[ "Apache-2.0" ]
permissive
helloShen/thinkinginjava
1a9bfad9afa68b226684f6e063e9fa2ae36d898c
8986b74b2b7ea1753df33af84cd56287b21b4239
refs/heads/master
2021-01-11T20:38:09.259654
2017-03-07T03:52:54
2017-03-07T03:52:54
79,158,702
3
0
null
null
null
null
UTF-8
Java
false
false
535
java
/** * Chapter 9 - Exercise 19 * @author wei.shen@iro.umontreal.ca * @version 1.0 */ package com.ciaoshen.thinkinjava.chapter9; import java.util.*; /** * Only package access */ interface RanderFactory { /** * PUBLIC PROXY OF CONSTUCTOR */ /** * METHODS */ public Rander getRander(); /** * PRIVATE CONSTRUCTOR */ /** * PRIVATE FIELDS */ /** * MAIN void */ public static void main(String[] args){ } }
[ "symantec__@hotmail.com" ]
symantec__@hotmail.com
0ffe7d5c448f332a075fe8d5db697efb176d42e3
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13138-17-4-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
d1d245cdb008662bdcd5ee60177a11e311909920
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 07:02:08 UTC 2020 */ package org.xwiki.job; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
29304ae398e1df193e5b92c195f5e9d990534c1b
123ce15a7c917681a4d48974cda9b41c3b9ca36d
/magic-api/src/main/java/org/ssssssss/magicapi/model/Header.java
e39c7906d645def52da0aab76689e7aaf7a4cf72
[ "MIT" ]
permissive
ZyGravel/magic-api
c1cbe8c561a9ed832a0289bca2812db832183056
d0041940ae03c6e0a717b3f71911f41424009b6e
refs/heads/master
2023-09-02T13:14:24.435243
2021-11-21T02:10:34
2021-11-21T02:10:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package org.ssssssss.magicapi.model; /** * Header参数信息 * * @author mxd */ public class Header extends BaseDefinition { public Header() { } public Header(String name, String value) { super(name, value); } }
[ "838425805@qq.com" ]
838425805@qq.com
2bb62e11a5212e3a4b8f79e232e7e0b75479ebfc
aeada48fb548995312d2117f2a97b05242348abf
/bundles/com.zeligsoft.domain.omg.corba.dsl/src-gen/com/zeligsoft/domain/omg/corba/dsl/idl/Connector.java
d6f29ecf5b9c88ef35c37458967fa20124e44753
[ "Apache-2.0" ]
permissive
elder4p/CX4CBDDS
8f103d5375595f583ceb30b343ae4c7cc240f18b
11296d3076c6d667ad86bc83fa47f708e8b5bf01
refs/heads/master
2023-03-16T01:51:59.122707
2022-08-04T22:13:10
2022-08-04T22:13:10
198,875,329
0
0
Apache-2.0
2019-08-22T17:33:21
2019-07-25T17:33:51
Java
UTF-8
Java
false
false
2,299
java
/** */ package com.zeligsoft.domain.omg.corba.dsl.idl; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Connector</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link com.zeligsoft.domain.omg.corba.dsl.idl.Connector#getHeader <em>Header</em>}</li> * <li>{@link com.zeligsoft.domain.omg.corba.dsl.idl.Connector#getExports <em>Exports</em>}</li> * </ul> * </p> * * @see com.zeligsoft.domain.omg.corba.dsl.idl.IdlPackage#getConnector() * @model * @generated */ public interface Connector extends Definition, TemplateDefinition, FixedDefinition { /** * Returns the value of the '<em><b>Header</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Header</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Header</em>' containment reference. * @see #setHeader(ConnectorHeader) * @see com.zeligsoft.domain.omg.corba.dsl.idl.IdlPackage#getConnector_Header() * @model containment="true" * @generated */ ConnectorHeader getHeader(); /** * Sets the value of the '{@link com.zeligsoft.domain.omg.corba.dsl.idl.Connector#getHeader <em>Header</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Header</em>' containment reference. * @see #getHeader() * @generated */ void setHeader(ConnectorHeader value); /** * Returns the value of the '<em><b>Exports</b></em>' containment reference list. * The list contents are of type {@link com.zeligsoft.domain.omg.corba.dsl.idl.ConnectorExport}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Exports</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Exports</em>' containment reference list. * @see com.zeligsoft.domain.omg.corba.dsl.idl.IdlPackage#getConnector_Exports() * @model containment="true" * @generated */ EList<ConnectorExport> getExports(); } // Connector
[ "tuhin@zeligsoft.com" ]
tuhin@zeligsoft.com
0d2f5de4a32e9b66cddf119e290039a00bc844d9
9e632588def0ba64442d92485b6d155ccb89a283
/mx-webadmin/webadmin-dao/src/main/java/com/balicamp/soap/ws/sertifikasi/Inquiry.java
bd8c41bff0a154b370d5ef6f5a57f009409738a6
[]
no_license
prihako/sims2019
6986bccbbd35ec4d1e5741aa77393f01287d752a
f5e82e3d46c405d4c3c34d529c8d67e8627adb71
refs/heads/master
2022-12-21T07:38:06.400588
2021-04-29T07:30:37
2021-04-29T07:30:37
212,565,332
0
0
null
2022-12-16T00:41:00
2019-10-03T11:41:00
Java
UTF-8
Java
false
false
1,489
java
package com.balicamp.soap.ws.sertifikasi; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="req" type="{urn:PaymentManagerControllerwsdl}InquiryRequest"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "req" }) @XmlRootElement(name = "inquiry") public class Inquiry { @XmlElement(required = true, nillable = true) protected InquiryRequest req; /** * Gets the value of the req property. * * @return * possible object is * {@link InquiryRequest } * */ public InquiryRequest getReq() { return req; } /** * Sets the value of the req property. * * @param value * allowed object is * {@link InquiryRequest } * */ public void setReq(InquiryRequest value) { this.req = value; } }
[ "nurukat@gmail.com" ]
nurukat@gmail.com
4a3653d699215c33e6ef381436689a69994137da
7991248e6bccacd46a5673638a4e089c8ff72a79
/web/application/src/main/java/org/artifactory/webapp/servlet/SessionFilter.java
81213ddba814aa40acd7ca14d7a42c5a684a78b2
[]
no_license
theoriginalshaheedra/artifactory-oss
69b7f6274cb35c79db3a3cd613302de2ae019b31
415df9a9467fee9663850b4b8b4ee5bd4c23adeb
refs/heads/master
2023-04-23T15:48:36.923648
2021-05-05T06:15:24
2021-05-05T06:15:24
364,455,815
1
0
null
2021-05-05T07:11:40
2021-05-05T03:57:33
Java
UTF-8
Java
false
false
2,173
java
/* * * Artifactory is a binaries repository manager. * Copyright (C) 2018 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Artifactory. If not, see <http://www.gnu.org/licenses/>. * */ package org.artifactory.webapp.servlet; import org.artifactory.api.context.ArtifactoryContext; import org.springframework.session.SessionRepository; import org.springframework.session.web.http.SessionRepositoryFilter; import javax.servlet.*; import java.io.IOException; /** * Delegating filter from a delayed context filter to {@link SessionRepositoryFilter} * * @author Shay Yaakov */ public class SessionFilter extends DelayedFilterBase { private SessionRepositoryFilter delegate; @Override public void initLater(FilterConfig filterConfig) throws ServletException { ServletContext servletContext = filterConfig.getServletContext(); ArtifactoryContext context = RequestUtils.getArtifactoryContext(servletContext); SessionRepository sessionRepository = context.beanForType(SessionRepository.class); delegate = new SessionRepositoryFilter(sessionRepository); delegate.setServletContext(servletContext); } @Override public void destroy() { if (delegate != null) { delegate.destroy(); } } @Override public void doFilter(final ServletRequest req, final ServletResponse resp, final FilterChain chain) throws IOException, ServletException { if (shouldSkipFilter(req)) { chain.doFilter(req, resp); return; } delegate.doFilter(req, resp, chain); } }
[ "david.monichi@gmail.com" ]
david.monichi@gmail.com
7b3cdf3f14b1c7c574782b11bfc16e0df37d153a
7565725272da0b194a7a6b1a06a7037e6e6929a0
/spring-cql/src/test/java/org/springframework/cassandra/core/ConsistencyLevelResolverUnitTests.java
12b0b75d335b5f2c6b2d282fa02facd7fdc6d4fd
[ "LicenseRef-scancode-generic-cla" ]
no_license
paulokinho/spring-data-cassandra
460abd2b3f6160b67464f3a86b1c7171a8e94e35
44671e4854e8395ac33efcc144c1de3bd3d3f270
refs/heads/master
2020-02-26T16:12:25.391964
2017-03-05T22:17:01
2017-03-05T22:17:01
68,550,589
0
3
null
2017-03-05T22:17:02
2016-09-18T22:25:43
Java
UTF-8
Java
false
false
3,462
java
/* * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.cassandra.core; import static org.assertj.core.api.Assertions.*; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; /** * Unit tests for {@link ConsistencyLevelResolver}. * * @author Mark Paluch */ @RunWith(Parameterized.class) public class ConsistencyLevelResolverUnitTests { private final ConsistencyLevel from; private final com.datastax.driver.core.ConsistencyLevel expected; public ConsistencyLevelResolverUnitTests(ConsistencyLevel from, com.datastax.driver.core.ConsistencyLevel expected) { this.from = from; this.expected = expected; } @Parameters(name = "{0}") public static List<Object[]> parameters() { Map<ConsistencyLevel, com.datastax.driver.core.ConsistencyLevel> expectations = new LinkedHashMap<ConsistencyLevel, com.datastax.driver.core.ConsistencyLevel>(); expectations.put(ConsistencyLevel.ALL, com.datastax.driver.core.ConsistencyLevel.ALL); expectations.put(ConsistencyLevel.ANY, com.datastax.driver.core.ConsistencyLevel.ANY); expectations.put(ConsistencyLevel.QUOROM, com.datastax.driver.core.ConsistencyLevel.QUORUM); expectations.put(ConsistencyLevel.QUORUM, com.datastax.driver.core.ConsistencyLevel.QUORUM); expectations.put(ConsistencyLevel.LOCAL_QUOROM, com.datastax.driver.core.ConsistencyLevel.LOCAL_QUORUM); expectations.put(ConsistencyLevel.LOCAL_QUORUM, com.datastax.driver.core.ConsistencyLevel.LOCAL_QUORUM); expectations.put(ConsistencyLevel.EACH_QUOROM, com.datastax.driver.core.ConsistencyLevel.EACH_QUORUM); expectations.put(ConsistencyLevel.EACH_QUORUM, com.datastax.driver.core.ConsistencyLevel.EACH_QUORUM); expectations.put(ConsistencyLevel.LOCAL_ONE, com.datastax.driver.core.ConsistencyLevel.LOCAL_ONE); expectations.put(ConsistencyLevel.LOCAL_SERIAL, com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL); expectations.put(ConsistencyLevel.SERIAL, com.datastax.driver.core.ConsistencyLevel.SERIAL); expectations.put(ConsistencyLevel.ONE, com.datastax.driver.core.ConsistencyLevel.ONE); expectations.put(ConsistencyLevel.TWO, com.datastax.driver.core.ConsistencyLevel.TWO); expectations.put(ConsistencyLevel.THREE, com.datastax.driver.core.ConsistencyLevel.THREE); List<Object[]> parameters = new ArrayList<Object[]>(); for (Entry<ConsistencyLevel, com.datastax.driver.core.ConsistencyLevel> entry : expectations.entrySet()) { parameters.add(new Object[] { entry.getKey(), entry.getValue() }); } return parameters; } @Test // DATACASS-202 public void shouldResolveCorrectly() { assertThat(ConsistencyLevelResolver.resolve(from)).isEqualTo(expected); } }
[ "mpaluch@pivotal.io" ]
mpaluch@pivotal.io
ff211d7d0001ced7244e221d715aa476bc67cfd5
2843dcee70a0a0408eeb46345401b93214071f8b
/app/src/main/java/com/abct/tljr/ui/activity/tools/OneBasis.java
c49c0d0f72cb9d84b88b816fbcca62b25a914c74
[]
no_license
xiaozhugua/tuling
16ac6a778e18c99bd1433912195b186a30fbf86a
f3470c5dfca05b47d8d96a9dc33d4738175de59a
refs/heads/master
2021-01-12T16:42:27.496392
2016-10-20T07:00:12
2016-10-20T07:00:12
71,434,177
1
0
null
null
null
null
UTF-8
Java
false
false
792
java
package com.abct.tljr.ui.activity.tools; /** * @author xbw * @version 创建时间:2015年11月14日 下午6:27:45 */ public class OneBasis { private long time; private float basis; private float close; private String name; public long getVolume() { return volume; } public void setVolume(long volume) { this.volume = volume; } private long volume; public long getTime() { return time; } public void setTime(long time) { this.time = time; } public float getBasis() { return basis; } public void setBasis(float basis) { this.basis = basis; } public float getClose() { return close; } public void setClose(float close) { this.close = close; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "1343012815@qq.com" ]
1343012815@qq.com
b29253d55354bee9c21322c7a1cac90dce259e15
66ac0f0289e1c2308463f0422a04e100a9a14d98
/server/modules/platform/api/src/org/labkey/api/query/QueryNestingOption.java
7a174f3c6aa7284a04a09a01787565855e8add39
[ "MIT" ]
permissive
praveenmunagapati/ms-registration-server
b4f860978f4b371cfb1fcb3c794d1315298638c2
49a851285dfbccbd0dc667f4a5ba1fcdbb2f0665
refs/heads/master
2022-04-19T00:15:59.055397
2020-04-14T06:12:38
2020-04-14T06:12:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,685
java
/* * Copyright (c) 2012-2019 LabKey Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.labkey.api.query; import org.labkey.api.data.*; import java.io.Writer; import java.util.List; import java.util.Map; import java.util.Collections; import java.util.ArrayList; /** * Configuration for a NestedQueryView that understands which columns should be associated with the outer and inner * grids. Also tracks the URL at which a specific nested grid can be requested independently via AJAX. * * User: jeckels * Date: Apr 9, 2007 */ public class QueryNestingOption { private FieldKey _rowIdFieldKey; private FieldKey _aggregateRowIdFieldKey; private final String _ajaxNestedGridURL; private DataColumn _groupIdColumn; /** * @param aggregateRowIdColumn the column that's an FK to the table that should be shown in the parent grids * @param rowIdColumn the column that's the PK (the target of the FK from aggregateRowIdColumn) * @param ajaxNestedGridURL the URL to use to request the child grid via AJAX */ public QueryNestingOption(FieldKey aggregateRowIdColumn, FieldKey rowIdColumn, String ajaxNestedGridURL) { _aggregateRowIdFieldKey = aggregateRowIdColumn; _rowIdFieldKey = rowIdColumn; _ajaxNestedGridURL = ajaxNestedGridURL; } public void setupGroupIdColumn(List<DisplayColumn> allColumns, List<DisplayColumn> outerColumns, TableInfo parentTable) { if (_groupIdColumn != null) { return; } Map<FieldKey, ColumnInfo> infos = QueryService.get().getColumns(parentTable, Collections.singleton(_rowIdFieldKey)); assert infos.size() == 1; ColumnInfo info = infos.values().iterator().next(); _groupIdColumn = new DataColumn(info); _groupIdColumn.setVisible(false); allColumns.add(_groupIdColumn); outerColumns.add(_groupIdColumn); } public boolean isNested(List<DisplayColumn> columns) { boolean foundInner = false; boolean foundOuter = false; for (DisplayColumn column : columns) { if (isOuter(column)) { foundOuter = true; } else { foundInner = true; } } return foundOuter && foundInner; } private boolean isOuter(DisplayColumn column) { ColumnInfo colInfo = column.getColumnInfo(); return colInfo != null && isOuter(colInfo.getFieldKey()); } public boolean isOuter(FieldKey fieldKey) { return fieldKey.toString().toLowerCase().startsWith(_aggregateRowIdFieldKey.toString().toLowerCase() + "/"); } public FieldKey getRowIdFieldKey() { return _rowIdFieldKey; } public FieldKey getAggregateRowIdFieldKey() { return _aggregateRowIdFieldKey; } public NestableDataRegion createDataRegion(List<DisplayColumn> originalColumns, String dataRegionName, boolean expanded) { List<DisplayColumn> innerColumns = new ArrayList<>(); List<DisplayColumn> outerColumns = new ArrayList<>(); List<DisplayColumn> allColumns = new ArrayList<>(originalColumns); for (DisplayColumn column : originalColumns) { if (isOuter(column)) { setupGroupIdColumn(allColumns, outerColumns, column.getColumnInfo().getParentTable()); outerColumns.add(column); } else { innerColumns.add(column); } } NestableDataRegion dataRegion = new NestableDataRegion(allColumns, _groupIdColumn.getColumnInfo().getAlias(), _ajaxNestedGridURL); // Set the nested button bar as not visible so that we don't render a bunch of nested <form>s which mess up IE. dataRegion.setButtonBar(new ButtonBar()); dataRegion.setExpanded(expanded); dataRegion.setRecordSelectorValueColumns(_groupIdColumn.getColumnInfo().getAlias()); DataRegion nestedRgn = new DataRegion() { @Override protected void renderHeaderScript(RenderContext ctx, Writer out, Map<String, String> messages, boolean showRecordSelectors) { // Issue 11405: customized grid does not work MS2 query based views. // Nested DataRegions don't need to re-render the "new LABKEY.DataRegion(...)" script. } }; nestedRgn.setName(dataRegionName); ButtonBar bar = new ButtonBar(); bar.setVisible(false); nestedRgn.setShowFilterDescription(false); nestedRgn.setButtonBar(bar); nestedRgn.setDisplayColumns(innerColumns); dataRegion.setNestedRegion(nestedRgn); for (DisplayColumn column : outerColumns) { column.setCaption(column.getColumnInfo().getLabel()); } dataRegion.setDisplayColumns(outerColumns); return dataRegion; } }
[ "risto.autio@wunderdog.fi" ]
risto.autio@wunderdog.fi
631f611e99fbc6a1771e2c972f4d5d8306a56e5c
461619a84c6617ceaf2b7913ef58c99ff32c0fb5
/android/SimpleCursorAdapter/setViewBinder/src/SimpleCursorAdapter/SimpleCursorAdapter_/src/com/bgstation0/android/sample/simplecursoradapter_/MainActivity.java
13a80ec04ffe6a9e578d869018cdfa85117906ed
[ "MIT" ]
permissive
bg1bgst333/Sample
cf066e48facac8ecd203c56665251fa1aa103844
298a4253dd8123b29bc90a3569f2117d7f6858f8
refs/heads/master
2023-09-02T00:46:31.139148
2023-09-01T02:41:42
2023-09-01T02:41:42
27,908,184
9
10
MIT
2023-09-06T20:49:55
2014-12-12T06:22:49
Java
SHIFT_JIS
Java
false
false
4,971
java
package com.bgstation0.android.sample.simplecursoradapter_; import android.app.Activity; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import android.widget.TextView; public class MainActivity extends Activity { // メンバフィールドの定義. public CustomDBHelper mHlpr = null; // CustomDBHelperオブジェクトmHlprをnullにしておく. public SQLiteDatabase mSqlite = null; // SQLiteDatabaseオブジェクトmSqliteをnullにしておく. public SimpleCursorAdapter mAdapter = null; // SimpleCursorAdapterオブジェクトmAdapterをnullにしておく. public Cursor mCursor = null; // CursorオブジェクトmCursorをnullにしておく. // Activityが生成されたとき. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // ListViewの取得. ListView listView1 = (ListView)findViewById(R.id.listview1); // listView1を取得. // DBへの行の挿入. mCursor = null; // mCursorにnullをセット. try{ if (mHlpr == null){ // mHlprがnullなら. mHlpr = new CustomDBHelper(getApplicationContext()); // mHlpr作成. if (mSqlite == null){ // mSqliteがnullなら. mSqlite = mHlpr.getWritableDatabase(); // mSqlite取得. if (mSqlite != null){ // mSqliteが取得できれば. // 挿入. ContentValues values1 = new ContentValues(); // values1の生成. values1.put("name", "Taro"); // キーが"name", 値が"Taro". values1.put("age", "20"); // キーが"age", 値が"20". long i = mSqlite.insert("custom", null, values1); // 挿入. ContentValues values2 = new ContentValues(); // values2の生成. values2.put("name", "Jiro"); // キーが"name", 値が"Jiro". values2.put("age", "18"); // キーが"age", 値が"18". long i2 = mSqlite.insert("custom", null, values2); // 挿入. ContentValues values3 = new ContentValues(); // values3の生成. values3.put("name", "Saburo"); // キーが"name", 値が"Saburo". values3.put("age", "16"); // キーが"age", 値が"16". long i3 = mSqlite.insert("custom", null, values3); // 挿入. // 選択. String[] projection = new String[]{ "_id", // ID. "name", // 名前. "age" // 年齢. }; mCursor = mSqlite.query("custom", projection, null, null, null, null, "age desc"); // クエリ結果をmCursorに格納. mAdapter = new SimpleCursorAdapter(this, R.layout.list_item, mCursor, new String[]{"name", "age"}, new int[]{R.id.list_item_name, R.id.list_item_age}, 0); // SimpleCursorAdapterオブジェクトmAdapterの生成. mAdapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() { @Override public boolean setViewValue(View view, Cursor cursor, int columnIndex) { // TODO Auto-generated method stub // カラムが1番目かどうか.(_idが0番目.) if (columnIndex == 1){ // 1番目.(name) int color = getResources().getColor(android.R.color.holo_red_light); // 赤のcolor取得. ((TextView)view).setTextColor(color); //viewにセット. } else{ // 1番目以外.(age) int color = getResources().getColor(android.R.color.holo_blue_light); // 青のcolor取得. ((TextView)view).setTextColor(color); //viewにセット. } return false; } }); listView1.setAdapter(mAdapter); // listView1にmAdapterをセット. } } } } catch (Exception ex){ // 例外. Log.e("SimpleCursorAdapter_", ex.toString()); // ex.toStringをLogに出力. } finally{ // 必須処理 if (mSqlite != null){ // mSqliteがあれば. mSqlite.close(); // 閉じる. mSqlite = null; // nullをセット. } if (mHlpr != null){ // mHlprがあれば. mHlpr.close(); // 閉じる. mHlpr = null; // nullをセット. } } } // Activityが破棄されたとき. protected void onDestroy() { // onDestroyの定義 // 親クラスの処理 super.onDestroy(); // super.onDestroyで親クラスの既定処理. // カーソルを閉じる. if (mCursor != null){ // mCursorがあれば. mCursor.close(); // 閉じる. mCursor = null; // nullをセット. } } }
[ "bg1bgst333@gmail.com" ]
bg1bgst333@gmail.com
f09465ccc736891a77c0a237be9a7437d5739e12
9254e7279570ac8ef687c416a79bb472146e9b35
/sae-20190506/src/main/java/com/aliyun/sae20190506/models/ListTagResourcesQuery.java
085bced636330ce0d9d26b455c8598405d0d524a
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sae20190506.models; import com.aliyun.tea.*; public class ListTagResourcesQuery extends TeaModel { @NameInMap("RegionId") @Validation(required = true) public String regionId; @NameInMap("ResourceType") @Validation(required = true) public String resourceType; @NameInMap("NextToken") public String nextToken; @NameInMap("ResourceIds") public String resourceIds; @NameInMap("Tags") public String tags; public static ListTagResourcesQuery build(java.util.Map<String, ?> map) throws Exception { ListTagResourcesQuery self = new ListTagResourcesQuery(); return TeaModel.build(map, self); } public ListTagResourcesQuery setRegionId(String regionId) { this.regionId = regionId; return this; } public String getRegionId() { return this.regionId; } public ListTagResourcesQuery setResourceType(String resourceType) { this.resourceType = resourceType; return this; } public String getResourceType() { return this.resourceType; } public ListTagResourcesQuery setNextToken(String nextToken) { this.nextToken = nextToken; return this; } public String getNextToken() { return this.nextToken; } public ListTagResourcesQuery setResourceIds(String resourceIds) { this.resourceIds = resourceIds; return this; } public String getResourceIds() { return this.resourceIds; } public ListTagResourcesQuery setTags(String tags) { this.tags = tags; return this; } public String getTags() { return this.tags; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
509f84bcdea6521d38131796541fc26947a82cc6
4ab11aac2a3b4e8d11902dfcfb967d5742d5ecb9
/knowledge/demo/boot/empty/src/main/java/com/mg/empty/demo/alt/sort/SelectSort.java
a36e050e13da71540134193697893077fbd72e01
[]
no_license
MT-GMZ/mg
af72d0d71ce1b6a8100cddc84af4bbaa14efb9e8
020a6796fafa494a6a875689da202835c680f04e
refs/heads/master
2023-01-19T23:56:13.961811
2020-11-29T06:06:21
2020-11-29T06:06:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
875
java
package com.mg.empty.demo.alt.sort; import com.mg.empty.demo.alt.util.ShowUtill; /** * 算法思路,将最小的放在第一个 * 然后 获取出剩余的最小值 放在第二个位置 * 依次排序成功 */ public class SelectSort { public void selectSort(int[] array) { for(int i=0;i<array.length-1;i++) { int index =i; for(int j=i+1;j<array.length;j++) { if(array[j]<array[index]) { index = j; } } int tmp = array[i]; array[i] = array[index]; array[index] = tmp; } ShowUtill.showArray(array); } public static void main(String[] args) { SelectSort selectSort = new SelectSort(); selectSort.selectSort(new int[]{100,9,3,2,7,15,300,12}); } }
[ "mataoshou@163.com" ]
mataoshou@163.com
a1249ef747983c30f42fe89008933ad966eead8c
aa10130655e199caab844460ec3a53b8e1947e47
/Trabajos/cesarvicuna/TrabajoNota/src/pe/eeob/consolidadnotas/dto/consolidadDto.java
8d89e422ab795e10fd454ea56b37e53f519602f2
[]
no_license
Vobregon/SISTUNI_PROG_JAVA_003
0ace48fbc731798b2565bc970cac93adfa60aff3
f920a8fd2a63fffeba52575f41d1d897d3c2a456
refs/heads/master
2021-01-24T01:30:13.231379
2016-02-21T06:14:55
2016-02-21T06:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
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 pe.eeob.consolidadnotas.dto; /** * * @author Cesar Vicuña */ public class consolidadDto { public float notaeparcial; public float notaefinal; public float notaproyecto; public int tipo; public float notafinal; public consolidadDto() { } public float getNotaeparcial() { return notaeparcial; } public void setNotaeparcial(float notaeparcial) { this.notaeparcial = notaeparcial; } public float getNotaefinal() { return notaefinal; } public void setNotaefinal(float notaefinal) { this.notaefinal = notaefinal; } public float getNotaproyecto() { return notaproyecto; } public void setNotaproyecto(float notaproyecto) { this.notaproyecto = notaproyecto; } public int getTipo() { return tipo; } public void setTipo(int tipo) { this.tipo = tipo; } public float getNotafinal() { return notafinal; } public void setNotafinal(float notafinal) { this.notafinal = notafinal; } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
ef91c8a2509e9c62d65b1a569a5aef75611c6e54
e53daa94a988135b8b1379c2a1e19e25bb045091
/new_application/app/src/main/java/com/example/new_application/adapter/ServerInfoAdapter.java
e642872ee88e8e710175d77974b37539f8708a60
[]
no_license
2020xiaotu/trunk
f90c9bf15c9000a1bb18c7c0a3c0a96d4daf8e68
ba19836c64828c2994e1f0db22fb5d26b4a014f5
refs/heads/master
2023-08-27T08:10:41.709940
2021-10-05T06:27:12
2021-10-05T06:27:12
413,684,673
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package com.example.new_application.adapter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.viewholder.BaseViewHolder; import com.example.new_application.bean.ServerInfoEntity; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; public class ServerInfoAdapter extends BaseQuickAdapter<ServerInfoEntity, BaseViewHolder> { public ServerInfoAdapter(int layoutResId, @Nullable List<ServerInfoEntity> data) { super(layoutResId, data); } @Override protected void convert(@NotNull BaseViewHolder baseViewHolder, ServerInfoEntity serverInfoEntity) { } }
[ "xiaotu20201016@gmail.com" ]
xiaotu20201016@gmail.com
c962914e0d6422d188c1a9fcbf5e14b9b98c173c
65981f65e5d1dd676e4b5f48f3b81e1f55ed39ce
/konig-gae-generator/src/test/java/io/konig/gae/datastore/SimpleDaoNamerTest.java
747f0722bb8c1fcd1a363ab3081103159313bad9
[]
no_license
konigio/konig
dd49aa70aa63e6bdeb1161f26cf9fba8020e1bfb
2c093aa94be40ee6a0fa533020f4ef14cecc6f1d
refs/heads/master
2023-08-11T12:12:53.634492
2019-12-02T17:05:03
2019-12-02T17:05:03
48,807,429
4
3
null
2022-12-14T20:21:51
2015-12-30T15:42:21
Java
UTF-8
Java
false
false
1,436
java
package io.konig.gae.datastore; /* * #%L * Konig GAE Generator * %% * Copyright (C) 2015 - 2017 Gregory McFall * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.Test; import io.konig.core.NamespaceManager; import io.konig.core.impl.MemoryNamespaceManager; import io.konig.core.vocab.Schema; import io.konig.gae.datastore.SimpleDaoNamer; public class SimpleDaoNamerTest { @Test public void test() { NamespaceManager nsManager = new MemoryNamespaceManager(); nsManager.add("schema", Schema.NAMESPACE); String basePackage = "com.example.gae.datastore"; SimpleDaoNamer namer = new SimpleDaoNamer(basePackage, nsManager); String daoClass = namer.daoName(Schema.Person); assertEquals("com.example.gae.datastore.schema.PersonDao", daoClass); } }
[ "gregory.mcfall@gmail.com" ]
gregory.mcfall@gmail.com
647095b097c37d767412178c676c68b3d767fbe3
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/domain/NoticeTemplateArgs.java
d255e9b147217a7e3901bd2baebb17558aa99435
[ "Apache-2.0" ]
permissive
WindLee05-17/alipay-sdk-java-all
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
19ccb203268316b346ead9c36ff8aa5f1eac6c77
refs/heads/master
2022-11-30T18:42:42.077288
2020-08-17T05:57:47
2020-08-17T05:57:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 通知内容模板 * * @author auto create * @since 1.0, 2019-01-03 10:33:05 */ public class NoticeTemplateArgs extends AlipayObject { private static final long serialVersionUID = 1175121918517641389L; /** * 课程开始时间 */ @ApiField("course_start_time") private Date courseStartTime; public Date getCourseStartTime() { return this.courseStartTime; } public void setCourseStartTime(Date courseStartTime) { this.courseStartTime = courseStartTime; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b1f94dc86be746bde3413fd92e0707b8e7f7da28
efa7935f77f5368e655c072b236d598059badcff
/src/com/sammyun/plugin/alipayDual/AlipayDualPlugin.java
e6f7a62bbbcfc1fbc21b918e5affef82b9f9963b
[]
no_license
ma-xu/Library
c1404f4f5e909be3e5b56f9884355e431c40f51b
766744898745f8fad31766cafae9fd4db0318534
refs/heads/master
2022-02-23T13:34:47.439654
2016-06-03T11:27:21
2016-06-03T11:27:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,109
java
/* * Copyright 2012-2014 sammyun.com.cn. All rights reserved. * Support: http://www.sammyun.com.cn * License: http://www.sammyun.com.cn/license */ package com.sammyun.plugin.alipayDual; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Component; import com.sammyun.Setting; import com.sammyun.entity.Payment; import com.sammyun.entity.PluginConfig; import com.sammyun.plugin.PaymentPlugin; import com.sammyun.util.SettingUtils; /** * Plugin - 支付宝(双接口) * */ @Component("alipayDualPlugin") public class AlipayDualPlugin extends PaymentPlugin { @Override public String getName() { return "支付宝(双接口)"; } @Override public String getVersion() { return "1.0"; } @Override public String getAuthor() { return "Sencloud"; } @Override public String getSiteUrl() { return "http://www.sammyun.com.cn"; } @Override public String getInstallUrl() { return "alipay_dual/install.ct"; } @Override public String getUninstallUrl() { return "alipay_dual/uninstall.ct"; } @Override public String getSettingUrl() { return "alipay_dual/setting.ct"; } @Override public String getRequestUrl() { return "https://mapi.alipay.com/gateway.do"; } @Override public RequestMethod getRequestMethod() { return RequestMethod.get; } @Override public String getRequestCharset() { return "UTF-8"; } @Override public Map<String, Object> getParameterMap(String sn, String description, HttpServletRequest request) { Setting setting = SettingUtils.get(); PluginConfig pluginConfig = getPluginConfig(); Payment payment = getPayment(sn); Map<String, Object> parameterMap = new HashMap<String, Object>(); parameterMap.put("service", "trade_create_by_buyer"); parameterMap.put("partner", pluginConfig.getAttribute("partner")); parameterMap.put("_input_charset", "utf-8"); parameterMap.put("sign_type", "MD5"); parameterMap.put("return_url", getNotifyUrl(sn, NotifyMethod.sync)); parameterMap.put("notify_url", getNotifyUrl(sn, NotifyMethod.async)); parameterMap.put("out_trade_no", sn); parameterMap.put("subject", StringUtils.abbreviate(description.replaceAll("[^0-9a-zA-Z\\u4e00-\\u9fa5 ]", ""), 60)); parameterMap.put("body", StringUtils.abbreviate(description.replaceAll("[^0-9a-zA-Z\\u4e00-\\u9fa5 ]", ""), 600)); parameterMap.put("payment_type", "1"); parameterMap.put("logistics_type", "EXPRESS"); parameterMap.put("logistics_fee", "0"); parameterMap.put("logistics_payment", "SELLER_PAY"); parameterMap.put("price", payment.getAmount().setScale(2).toString()); parameterMap.put("quantity", "1"); parameterMap.put("seller_id", pluginConfig.getAttribute("partner")); parameterMap.put("total_fee", payment.getAmount().setScale(2).toString()); parameterMap.put("show_url", setting.getSiteUrl()); parameterMap.put("paymethod", "directPay"); parameterMap.put("exter_invoke_ip", request.getLocalAddr()); parameterMap.put("extra_common_param", "preschoolEdu"); parameterMap.put("sign", generateSign(parameterMap)); return parameterMap; } @Override public boolean verifyNotify(String sn, NotifyMethod notifyMethod, HttpServletRequest request) { PluginConfig pluginConfig = getPluginConfig(); Payment payment = getPayment(sn); if (generateSign(request.getParameterMap()).equals(request.getParameter("sign")) && pluginConfig.getAttribute("partner").equals(request.getParameter("seller_id")) && sn.equals(request.getParameter("out_trade_no")) && ("WAIT_SELLER_SEND_GOODS".equals(request.getParameter("trade_status")) || "TRADE_SUCCESS".equals(request.getParameter("trade_status")) || "TRADE_FINISHED".equals(request.getParameter("trade_status"))) && payment.getAmount().compareTo(new BigDecimal(request.getParameter("total_fee"))) == 0) { Map<String, Object> parameterMap = new HashMap<String, Object>(); parameterMap.put("service", "notify_verify"); parameterMap.put("partner", pluginConfig.getAttribute("partner")); parameterMap.put("notify_id", request.getParameter("notify_id")); if ("true".equals(post("https://mapi.alipay.com/gateway.do", parameterMap))) { return true; } } return false; } @Override public boolean verifyMobileNotify(String sn, NotifyMethod notifyMethod, HttpServletRequest request) { // TODO Auto-generated method stub return false; } @Override public String getNotifyMessage(String sn, NotifyMethod notifyMethod, HttpServletRequest request) { if (notifyMethod == NotifyMethod.async) { return "success"; } return null; } @Override public Integer getTimeout() { return 21600; } /** * 生成签名 * * @param parameterMap 参数 * @return 签名 */ private String generateSign(Map<String, ?> parameterMap) { PluginConfig pluginConfig = getPluginConfig(); return DigestUtils.md5Hex(joinKeyValue(new TreeMap<String, Object>(parameterMap), null, pluginConfig.getAttribute("key"), "&", true, "sign_type", "sign")); } }
[ "melody@maxudeMacBook-Pro.local" ]
melody@maxudeMacBook-Pro.local
e85d71650af54f0988c74600034ceaa80f698e32
9fe800087ef8cc6e5b17fa00f944993b12696639
/batik-svggen/src/main/java/org/apache/batik/svggen/font/table/Coverage.java
e527b12c9f8c0d1e57d75bba5abdbeb9e3ef5616
[ "Apache-2.0" ]
permissive
balabit-deps/balabit-os-7-batik
14b80a316321cbd2bc29b79a1754cc4099ce10a2
652608f9d210de2d918d6fb2146b84c0cc771842
refs/heads/master
2023-08-09T03:24:18.809678
2023-05-22T20:34:34
2023-05-27T08:21:21
158,242,898
0
0
Apache-2.0
2023-07-20T04:18:04
2018-11-19T15:03:51
Java
UTF-8
Java
false
false
1,688
java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.svggen.font.table; import java.io.IOException; import java.io.RandomAccessFile; /** * * @author <a href="mailto:david@steadystate.co.uk">David Schweinsberg</a> * @version $Id: Coverage.java 1733416 2016-03-03 07:07:13Z gadams $ */ public abstract class Coverage { public abstract int getFormat(); /** * @param glyphId The ID of the glyph to find. * @return The index of the glyph within the coverage, or -1 if the glyph * can't be found. */ public abstract int findGlyph(int glyphId); protected static Coverage read(RandomAccessFile raf) throws IOException { Coverage c = null; int format = raf.readUnsignedShort(); if (format == 1) { c = new CoverageFormat1(raf); } else if (format == 2) { c = new CoverageFormat2(raf); } return c; } }
[ "testbot@balabit.com" ]
testbot@balabit.com
85f9081f53935390b550d98d9edd593e4e44b056
8d935d44c34751b53895ce3383dde49073503251
/src/main/java/org/iii/ideas/catering_service/rest/api/QuerySfschoolproductsetBySchoolResponse.java
97892598b4f9f500e6ae0ab89ea481fcc5f09815
[ "Apache-2.0" ]
permissive
NoahChian/Devops
b3483394b8e8189f4647a4ee41d8ceb8267eaebb
3d310dedfd1bd07fcda3d5f4f7ac45a07b90489f
refs/heads/master
2016-09-14T05:41:37.471624
2016-05-11T07:29:28
2016-05-11T07:29:28
58,521,704
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package org.iii.ideas.catering_service.rest.api; import java.util.ArrayList; import java.util.List; import org.iii.ideas.catering_service.rest.bo.SfSchoolproductsetBO; public class QuerySfschoolproductsetBySchoolResponse extends AbstractApiResponse { private static final long serialVersionUID = -1904135875588581166L; private List<SfSchoolproductsetBO> sfschoolproductsetList = new ArrayList<SfSchoolproductsetBO>(); public List<SfSchoolproductsetBO> getSfschoolproductsetList() { return sfschoolproductsetList; } public void setSfschoolproductsetList(List<SfSchoolproductsetBO> sfschoolproductsetList) { this.sfschoolproductsetList = sfschoolproductsetList; } }
[ "noahjian@iii.org.tw" ]
noahjian@iii.org.tw
dcd91a6698983f3e9d16c37728d2a8744971e059
9c190f0377d1374d98ccf6866dbd8719aba0be06
/app/src/main/java/me/lancer/pocket/util/FileTypeRefereeUtil.java
f7548759411fee2c701c140f341e8d512f9a128d
[]
no_license
1anc3r/Pocket
e7bb03e98947d984ef225971fbfc8610f110766d
68a49bc2ecabcbf536d7daa12145766aca05c586
refs/heads/master
2020-03-28T19:47:22.647719
2019-03-02T10:40:54
2019-03-02T10:40:54
94,602,624
11
0
null
null
null
null
UTF-8
Java
false
false
3,448
java
package me.lancer.pocket.util; import java.io.File; public class FileTypeRefereeUtil { public static final String[][] FILE_TYPE_TABLE = { {".3gp", "video/3gpp"}, {".apk", "application/vnd.android.package-archive"}, {".asf", "video/x-ms-asf"}, {".avi", "video/x-msvideo"}, {".bin", "application/octet-stream"}, {".bmp", "image/bmp"}, {".c", "text/plain"}, {".class", "application/octet-stream"}, {".conf", "text/plain"}, {".cpp", "text/plain"}, {".doc", "application/msword"}, {".exe", "application/octet-stream"}, {".gif", "image/gif"}, {".gtar", "application/x-gtar"}, {".gz", "application/x-gzip"}, {".h", "text/plain"}, {".htm", "text/html"}, {".html", "text/html"}, {".jar", "application/java-archive"}, {".java", "text/plain"}, {".jpeg", "image/jpeg"}, {".jpg", "image/jpeg"}, {".js", "application/x-javascript"}, {".log", "text/plain"}, {".m3u", "audio/x-mpegurl"}, {".m4a", "audio/mp4a-latm"}, {".m4b", "audio/mp4a-latm"}, {".m4p", "audio/mp4a-latm"}, {".m4u", "video/vnd.mpegurl"}, {".m4v", "video/x-m4v"}, {".mov", "video/quicktime"}, {".mp2", "audio/x-mpeg"}, {".mp3", "audio/x-mpeg"}, {".mp4", "video/mp4"}, {".mpc", "application/vnd.mpohun.certificate"}, {".mpe", "video/mpeg"}, {".mpeg", "video/mpeg"}, {".mpg", "video/mpeg"}, {".mpg4", "video/mp4"}, {".mpga", "audio/mpeg"}, {".msg", "application/vnd.ms-outlook"}, {".ogg", "audio/ogg"}, {".pdf", "application/pdf"}, {".png", "image/png"}, {".pps", "application/vnd.ms-powerpoint"}, {".ppt", "application/vnd.ms-powerpoint"}, {".prop", "text/plain"}, {".rar", "application/x-rar-compressed"}, {".rc", "text/plain"}, {".rmvb", "audio/x-pn-realaudio"}, {".rtf", "application/rtf"}, {".sh", "text/plain"}, {".tar", "application/x-tar"}, {".tgz", "application/x-compressed"}, {".txt", "text/plain"}, {".wav", "audio/x-wav"}, {".wma", "audio/x-ms-wma"}, {".wmv", "audio/x-ms-wmv"}, {".wps", "application/vnd.ms-works"}, {".xml", "text/plain"}, {".z", "application/x-compress"}, {".zip", "application/zip"}, {"", "*/*"} }; File file; public FileTypeRefereeUtil() { } public FileTypeRefereeUtil(File file) { this.file = file; } public String getFileType(File file) { String type = "*/*"; String name = file.getName(); int dot = name.lastIndexOf("."); if (dot < 0) { return type; } String suffix = name.substring(dot, name.length()).toLowerCase(); if (suffix == "") { return type; } for (int i = 0; i < FILE_TYPE_TABLE.length; i++) { if (suffix.equals(FILE_TYPE_TABLE[i][0])) { type = FILE_TYPE_TABLE[i][1]; } } return type; } }
[ "huangfangzhi@icloud.com" ]
huangfangzhi@icloud.com
bd833eb22407b2cb66551415cc8a48d64085e0a1
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_17_5/Inventory/SiteCreate.java
cc5ad09ad26daefb45a870f681ce1517fcb3722f
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
1,526
java
package Netspan.NBI_17_5.Inventory; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="Site" type="{http://Airspan.Netspan.WebServices}Site" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "site" }) @XmlRootElement(name = "SiteCreate") public class SiteCreate { @XmlElement(name = "Site") protected Site site; /** * Gets the value of the site property. * * @return * possible object is * {@link Site } * */ public Site getSite() { return site; } /** * Sets the value of the site property. * * @param value * allowed object is * {@link Site } * */ public void setSite(Site value) { this.site = value; } }
[ "ggrunwald@airspan.com" ]
ggrunwald@airspan.com
98f791ef2795e928086f79407fe1b7c591e6fd53
8b9190a8c5855d5753eb8ba7003e1db875f5d28f
/sources/com/google/android/gms/common/util/DefaultClock.java
3568b89067bfaae77c087ab6ef48409351cd7251
[]
no_license
stevehav/iowa-caucus-app
6aeb7de7487bd800f69cb0b51cc901f79bd4666b
e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044
refs/heads/master
2020-12-29T10:25:28.354117
2020-02-05T23:15:52
2020-02-05T23:15:52
238,565,283
21
3
null
null
null
null
UTF-8
Java
false
false
733
java
package com.google.android.gms.common.util; import android.os.SystemClock; import com.google.android.gms.common.annotation.KeepForSdk; @KeepForSdk public class DefaultClock implements Clock { private static final DefaultClock zzgm = new DefaultClock(); @KeepForSdk public static Clock getInstance() { return zzgm; } public long currentTimeMillis() { return System.currentTimeMillis(); } public long elapsedRealtime() { return SystemClock.elapsedRealtime(); } public long nanoTime() { return System.nanoTime(); } public long currentThreadTimeMillis() { return SystemClock.currentThreadTimeMillis(); } private DefaultClock() { } }
[ "steve@havelka.co" ]
steve@havelka.co
d059a98a15b85fff863e0421549ef4b0905ecdb1
e5d9269646f276fd4c9cf110ae7ad6e660ad220a
/app/src/main/java/com/example/android/quizapp/MainActivity.java
826c9399667cb36158de411df84367d6791818ab
[]
no_license
erickibz/QuizApp
c8b6c9eafa845d0cf33ac96adcbc6905844bb900
659b64f1e32804c5ea9252a0e365613a36ecf678
refs/heads/master
2020-03-22T00:18:22.164162
2018-06-30T09:51:17
2018-06-30T09:51:17
139,236,560
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package com.example.android.quizapp; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.RadioButton; import android.widget.RadioGroup; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
124478b0e7f18f98c8a3447230ff7f2b0dd39d86
fbf27d453d933352a2c8ef76e0445f59e6b5d304
/server/src/com/fy/engineserver/message/JIAZU_RELEVANT_DES_REQ.java
97e57f021fffc9e68daf3bf4965aa8008babccea
[]
no_license
JoyPanda/wangxian_server
0996a03d86fa12a5a884a4c792100b04980d3445
d4a526ecb29dc1babffaf607859b2ed6947480bb
refs/heads/main
2023-06-29T05:33:57.988077
2021-04-06T07:29:03
2021-04-06T07:29:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,078
java
package com.fy.engineserver.message; import com.xuanzhi.tools.transport.*; import java.nio.ByteBuffer; /** * 网络数据包,此数据包是由MessageComplier自动生成,请不要手动修改。<br> * 版本号:null<br> * 请求家族界面相关描述<br> * 数据包的格式如下:<br><br> * <table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#000000" align="center"> * <tr bgcolor="#00FFFF" align="center"><td>字段名</td><td>数据类型</td><td>长度(字节数)</td><td>说明</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>length</td><td>int</td><td>getNumOfByteForMessageLength()个字节</td><td>包的整体长度,包头的一部分</td></tr> * <tr bgcolor="#FAFAFA" align="center"><td>type</td><td>int</td><td>4个字节</td><td>包的类型,包头的一部分</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>seqNum</td><td>int</td><td>4个字节</td><td>包的序列号,包头的一部分</td></tr> * <tr bgcolor="#FAFAFA" align="center"><td>windowId</td><td>int</td><td>4个字节</td><td>配置的长度</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>targetName.length</td><td>short</td><td>2个字节</td><td>字符串实际长度</td></tr> * <tr bgcolor="#FAFAFA" align="center"><td>targetName</td><td>String</td><td>targetName.length</td><td>字符串对应的byte数组</td></tr> * </table> */ public class JIAZU_RELEVANT_DES_REQ implements RequestMessage{ static GameMessageFactory mf = GameMessageFactory.getInstance(); long seqNum; int windowId; String targetName; public JIAZU_RELEVANT_DES_REQ(){ } public JIAZU_RELEVANT_DES_REQ(long seqNum,int windowId,String targetName){ this.seqNum = seqNum; this.windowId = windowId; this.targetName = targetName; } public JIAZU_RELEVANT_DES_REQ(long seqNum,byte[] content,int offset,int size) throws Exception{ this.seqNum = seqNum; windowId = (int)mf.byteArrayToNumber(content,offset,4); offset += 4; int len = 0; len = (int)mf.byteArrayToNumber(content,offset,2); offset += 2; if(len < 0 || len > 16384) throw new Exception("string length ["+len+"] big than the max length [16384]"); targetName = new String(content,offset,len); offset += len; } public int getType() { return 0x00FF0064; } public String getTypeDescription() { return "JIAZU_RELEVANT_DES_REQ"; } public String getSequenceNumAsString() { return String.valueOf(seqNum); } public long getSequnceNum(){ return seqNum; } private int packet_length = 0; public int getLength() { if(packet_length > 0) return packet_length; int len = mf.getNumOfByteForMessageLength() + 4 + 4; len += 4; len += 2; len +=targetName.getBytes().length; packet_length = len; return len; } public int writeTo(ByteBuffer buffer) { int messageLength = getLength(); if(buffer.remaining() < messageLength) return 0; int oldPos = buffer.position(); buffer.mark(); try{ buffer.put(mf.numberToByteArray(messageLength,mf.getNumOfByteForMessageLength())); buffer.putInt(getType()); buffer.putInt((int)seqNum); buffer.putInt(windowId); byte[] tmpBytes1; tmpBytes1 = targetName.getBytes(); buffer.putShort((short)tmpBytes1.length); buffer.put(tmpBytes1); }catch(Exception e){ e.printStackTrace(); buffer.reset(); throw new RuntimeException("in writeTo method catch exception :",e); } int newPos = buffer.position(); buffer.position(oldPos); buffer.put(mf.numberToByteArray(newPos-oldPos,mf.getNumOfByteForMessageLength())); buffer.position(newPos); return newPos-oldPos; } /** * 获取属性: * 窗口id,用以区分 1:家族面板 */ public int getWindowId(){ return windowId; } /** * 设置属性: * 窗口id,用以区分 1:家族面板 */ public void setWindowId(int windowId){ this.windowId = windowId; } /** * 获取属性: * 按钮名 */ public String getTargetName(){ return targetName; } /** * 设置属性: * 按钮名 */ public void setTargetName(String targetName){ this.targetName = targetName; } }
[ "1414464063@qq.com" ]
1414464063@qq.com
0117105663f07264fcb5384a5c68b4f8c8dbf63a
585fd0a0d83b4eeaf47e4f0cadacaff507d2154d
/codeworld-cloud-order/src/main/java/com/codeworld/fc/order/client/MerchantClient.java
6a538747c8b2c74e9d66cde8e4306f932081478f
[]
no_license
sengeiou/codeworld-cloud-shop-api
accce2ca5686dcf2dc0c0bc65c4c1eb6a467a8e9
2297f0e97d1327a9f4a48a341a08ea3a58905a62
refs/heads/master
2023-02-16T05:51:21.778190
2021-01-15T09:48:56
2021-01-15T09:48:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.codeworld.fc.order.client; import com.codeworld.fc.common.response.FCResponse; import com.codeworld.fc.order.domain.MerchantResponse; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @FeignClient(name = "codeworld-cloud-merchant") public interface MerchantClient { @PostMapping("/codeworld-merchant/get-merchant-number-name-id") @ApiOperation("根据商户id获取商户号和名称") FCResponse<MerchantResponse> getMerchantNumberAndNameById(@RequestParam("merchantId") Long merchantId); }
[ "1692454247@qq.com" ]
1692454247@qq.com
c2eb7f8394e9b806919605e00a14b591ff909d03
ebbd4e78b717ec83ca7ee55765ac8eb725ae869a
/app/src/main/java/com/gy/recyclerviewadapter/adapter/HomeAdapter.java
0a26f5c3237ef2d82c9791b2042214a9fa8e19a6
[]
no_license
newPersonKing/baseAdapter
9132593b80bb296435a156ac9fbbb502a7e75357
c1bdf08199e637786262c1a10ec54bbd49571d5b
refs/heads/master
2020-03-25T01:40:19.015129
2018-08-02T06:11:48
2018-08-02T06:11:48
143,250,223
0
0
null
null
null
null
UTF-8
Java
false
false
717
java
package com.gy.recyclerviewadapter.adapter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.gy.recyclerviewadapter.R; import com.gy.recyclerviewadapter.entity.HomeItem; import java.util.List; /** * https://github.com/CymChad/BaseRecyclerViewAdapterHelper */ public class HomeAdapter extends BaseQuickAdapter<HomeItem, BaseViewHolder> { public HomeAdapter(int layoutResId, List data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, HomeItem item) { helper.setText(R.id.text, item.getTitle()); helper.setImageResource(R.id.icon, item.getImageResource()); } }
[ "guoyong@emcc.net.com" ]
guoyong@emcc.net.com
d8ac84be6bbce7ac3d5f5a1f0e0fba655e66b6dc
ec67ea62dbc0fa30ee42065aa92ca53ee4b25a04
/FCMDemo/app/src/main/java/com/adityadua/fcmdemo/MyFirebaseMessagingService.java
c31d796608d4c08c560851a071483431ee64854a
[]
no_license
aditya-dua/Android28July
6de5004e0e494dadd896186cd866eed878e5abf0
18781fd19fcd31be8ebd70bff48f21812dff7526
refs/heads/master
2021-07-17T05:16:47.517747
2017-10-24T17:25:56
2017-10-24T17:25:56
100,294,024
0
0
null
null
null
null
UTF-8
Java
false
false
1,910
java
package com.adityadua.fcmdemo; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.util.Log; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; /** * Created by AdityaDua on 12/10/17. */ public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = "MyFirebaseMessaging"; @Override public void onMessageReceived(RemoteMessage remoteMessage) { super.onMessageReceived(remoteMessage); // Fire a notification Log.d(TAG,"From ::"+remoteMessage.getFrom()); Log.d(TAG,"Notification / Message Body :"+remoteMessage.getNotification().getBody()); sendNotification(remoteMessage.getNotification().getBody()); } private void sendNotification(String body){ Intent intent = new Intent(this,MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this,0,intent,PendingIntent.FLAG_ONE_SHOT); Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificaBuilder= new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("Push Notification") .setContentText(body) .setAutoCancel(true) .setSound(soundUri) .setContentIntent(pendingIntent); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(0,notificaBuilder.build()); } }
[ "adityaduatechm@gmail.com" ]
adityaduatechm@gmail.com
e220e862c9be523f8a4a5e323ea7860dae948ccb
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/facebook/stetho/inspector/elements/android/AndroidDocumentProviderFactory.java
87310d32bfcd4e63dc43e60773eef58f9fb8d84b
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
2,450
java
package com.facebook.stetho.inspector.elements.android; import android.app.Application; import android.os.Handler; import android.os.Looper; import com.facebook.stetho.common.ThreadBound; import com.facebook.stetho.common.UncheckedCallable; import com.facebook.stetho.common.Util; import com.facebook.stetho.common.android.HandlerUtil; import com.facebook.stetho.inspector.elements.DescriptorProvider; import com.facebook.stetho.inspector.elements.DocumentProvider; import com.facebook.stetho.inspector.elements.DocumentProviderFactory; import java.util.List; public final class AndroidDocumentProviderFactory implements DocumentProviderFactory, ThreadBound { private final Application mApplication; private final List<DescriptorProvider> mDescriptorProviders; private final Handler mHandler = new Handler(Looper.getMainLooper()); public AndroidDocumentProviderFactory(Application application, List<DescriptorProvider> list) { this.mApplication = (Application) Util.throwIfNull(application); this.mDescriptorProviders = (List) Util.throwIfNull(list); } @Override // com.facebook.stetho.inspector.elements.DocumentProviderFactory public DocumentProvider create() { return new AndroidDocumentProvider(this.mApplication, this.mDescriptorProviders, this); } @Override // com.facebook.stetho.common.ThreadBound public boolean checkThreadAccess() { return HandlerUtil.checkThreadAccess(this.mHandler); } @Override // com.facebook.stetho.common.ThreadBound public void verifyThreadAccess() { HandlerUtil.verifyThreadAccess(this.mHandler); } @Override // com.facebook.stetho.common.ThreadBound public <V> V postAndWait(UncheckedCallable<V> uncheckedCallable) { return (V) HandlerUtil.postAndWait(this.mHandler, uncheckedCallable); } @Override // com.facebook.stetho.common.ThreadBound public void postAndWait(Runnable runnable) { HandlerUtil.postAndWait(this.mHandler, runnable); } @Override // com.facebook.stetho.common.ThreadBound public void postDelayed(Runnable runnable, long j) { if (!this.mHandler.postDelayed(runnable, j)) { throw new RuntimeException("Handler.postDelayed() returned false"); } } @Override // com.facebook.stetho.common.ThreadBound public void removeCallbacks(Runnable runnable) { this.mHandler.removeCallbacks(runnable); } }
[ "test@gmail.com" ]
test@gmail.com
b81dd271bb77249e2edf7fae34aed807c3914d51
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_79d5a8f82f78a42fe64c9077a3b810f9c15f2d9d/MyMediaPlayerActivity/2_79d5a8f82f78a42fe64c9077a3b810f9c15f2d9d_MyMediaPlayerActivity_s.java
2ea333f7932d7eabaade0f842de7cc0b4978fa65
[]
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
8,108
java
package com.example.testapplication; import android.app.Activity; import android.content.Context; import android.content.res.AssetFileDescriptor; import android.content.res.AssetManager; import android.media.AudioManager; import android.os.Bundle; import android.os.Environment; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class MyMediaPlayerActivity extends Activity { WakeLock wakeLock; private static final String[] EXTENSIONS = {".mp3", ".mid", ".wav", ".ogg", ".mp4"}; //Playable Extensions List<String> trackNames; //Playable Track Titles List<String> trackArtworks; //Track artwork names AssetManager assets; //Assets (Compiled with APK) Music track; //currently loaded track Button btnPlay; //The play button will need to change from 'play' to 'pause', so we need an instance of it boolean isTuning; //is user currently jammin out, if so automatically start playing the next track int currentTrack; //index of current track selected int type; //0 for loading from assets, 1 for loading from SD card @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setVolumeControlStream(AudioManager.STREAM_MUSIC); PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "Lexiconda"); setContentView(R.layout.musicplayer); initialize(0); } @Override public void onResume() { super.onResume(); wakeLock.acquire(); } @Override public void onPause() { super.onPause(); wakeLock.release(); if (track != null) { if (track.isPlaying()) { track.pause(); isTuning = false; btnPlay.setBackgroundResource(R.drawable.play); } if (isFinishing()) { track.dispose(); finish(); } } else { if (isFinishing()) { finish(); } } } private void initialize(int type) { btnPlay = (Button) findViewById(R.id.btnPlay); btnPlay.setBackgroundResource(R.drawable.play); trackNames = new ArrayList<String>(); trackArtworks = new ArrayList<String>(); assets = getAssets(); currentTrack = 0; isTuning = false; this.type = type; addTracks(getTracks()); loadTrack(); } //Generate a String Array that represents all of the files found private String[] getTracks() { try { String[] temp = getAssets().list(""); return temp; } catch (IOException e) { e.printStackTrace(); } return null; } //Adds the playable files to the trackNames List private void addTracks(String[] temp) { if (temp != null) { for (int i = 0; i < temp.length; i++) { //Only accept files that have one of the extensions in the EXTENSIONS array if (trackChecker(temp[i])) { trackNames.add(temp[i]); trackArtworks.add(temp[i].substring(0, temp[i].length() - 4)); } } } } //Checks to make sure that the track to be loaded has a correct extenson private boolean trackChecker(String trackToTest) { for (int j = 0; j < EXTENSIONS.length; j++) { if (trackToTest.contains(EXTENSIONS[j])) { return true; } } return false; } //Loads the track by calling loadMusic private void loadTrack() { if (track != null) { track.dispose(); } if (trackNames.size() > 0) { track = loadMusic(type); } } //loads a Music instance using either a built in asset or an external resource private Music loadMusic(int type) { switch (type) { case 0: try { AssetFileDescriptor assetDescriptor = assets.openFd(trackNames.get(currentTrack)); return new Music(assetDescriptor); } catch (IOException e) { e.printStackTrace(); } return null; case 1: try { FileInputStream fis = new FileInputStream(new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC), trackNames.get(currentTrack))); FileDescriptor fileDescriptor = fis.getFD(); return new Music(fileDescriptor); } catch (IOException e) { e.printStackTrace(); } return null; default: return null; } } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); createMenu(menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case 0: //Set Looping synchronized (this) { if (track.isLooping()) { track.setLooping(false); } else { track.setLooping(true); } } return true; case 1: //Stop Music synchronized (this) { track.switchTracks(); btnPlay.setBackgroundResource(R.drawable.play); } return true; default: return false; } } private void createMenu(Menu menu) { MenuItem miLooping = menu.add(0, 0, 0, "Looping"); { miLooping.setIcon(R.drawable.looping); } MenuItem miStop = menu.add(0, 1, 1, "Stop"); { miStop.setIcon(R.drawable.stop); } } public void click(View view) { int id = view.getId(); switch (id) { case R.id.btnPlay: synchronized (this) { if (isTuning) { isTuning = false; btnPlay.setBackgroundResource(R.drawable.play); track.pause(); } else { isTuning = true; btnPlay.setBackgroundResource(R.drawable.pause); playTrack(); } } return; case R.id.btnPrevious: setTrack(0); loadTrack(); playTrack(); return; case R.id.btnNext: setTrack(1); loadTrack(); playTrack(); return; default: return; } } private void setTrack(int direction) { if (direction == 0) { currentTrack--; if (currentTrack < 0) { currentTrack = trackNames.size() - 1; } } else if (direction == 1) { currentTrack++; if (currentTrack > trackNames.size() - 1) { currentTrack = 0; } } } //Plays the Track private void playTrack() { if (isTuning && track != null) { track.play(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
635b2011b1a9e0ae47ca18cadf57c377123884f3
f0c8eb22449d567e8a215e84fbe68e4e8c5a0893
/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CompositeFieldValidator.java
7aa075edb2a676235a671f65898f12ccbc27e41c
[ "Apache-2.0", "MIT", "BSD-3-Clause", "MIT-0", "CC-BY-2.5", "LGPL-2.0-or-later", "LicenseRef-scancode-proprietary-license", "MPL-1.0", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "GPL-1.0-or-later", "MPL-1.1" ]
permissive
apache/tapestry-5
6c8c9d5f1f28abe03f424b21b1ff96af9955f76d
b5bda40756c5e946901d18694a094f023ba6d2b5
refs/heads/master
2023-08-28T16:05:10.291603
2023-07-13T17:25:04
2023-07-13T17:25:04
4,416,959
89
103
Apache-2.0
2023-09-14T11:59:30
2012-05-23T07:00:11
Java
UTF-8
Java
false
false
1,700
java
// Copyright 2007, 2008 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.services; import org.apache.tapestry5.FieldValidator; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.ValidationException; import java.util.List; /** * Aggregates together a number of field validator instances as a single unit. */ public final class CompositeFieldValidator implements FieldValidator { private final FieldValidator[] validators; public CompositeFieldValidator(List<FieldValidator> validators) { this.validators = validators.toArray(new FieldValidator[validators.size()]); } @SuppressWarnings("unchecked") public void validate(Object value) throws ValidationException { for (FieldValidator fv : validators) fv.validate(value); } public void render(MarkupWriter writer) { for (FieldValidator fv : validators) fv.render(writer); } public boolean isRequired() { for (FieldValidator fv : validators) { if (fv.isRequired()) return true; } return false; } }
[ "hlship@apache.org" ]
hlship@apache.org
2062b36e0d6668eb87d6554a2addfd668cb60722
38933bae7638a11fef6836475fef0d73e14c89b5
/magma-func-builder/src/test/java/eu/lunisolar/magma/func/build/function/to/LTieDblFunctionBuilderTest.java
ab5845f44426c6abaecb13af009465530df06da2
[ "Apache-2.0" ]
permissive
lunisolar/magma
b50ed45ce2f52daa5c598e4760c1e662efbbc0d4
41d3db2491db950685fe403c934cfa71f516c7dd
refs/heads/master
2023-08-03T10:13:20.113127
2023-07-24T15:01:49
2023-07-24T15:01:49
29,874,142
5
0
Apache-2.0
2023-05-09T18:25:01
2015-01-26T18:03:44
Java
UTF-8
Java
false
false
5,617
java
/* * This file is part of "lunisolar-magma". * * (C) Copyright 2014-2023 Lunisolar (http://lunisolar.eu/). * * 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 eu.lunisolar.magma.func.build.function.to; import eu.lunisolar.magma.asserts.func.FuncAttests; import eu.lunisolar.magma.func.supp.Be; import eu.lunisolar.magma.func.supp.check.Checks; import eu.lunisolar.magma.func.*; // NOSONAR import eu.lunisolar.magma.asserts.*; // NOSONAR import javax.annotation.Nonnull; // NOSONAR import javax.annotation.Nullable; // NOSONAR import java.util.Objects;// NOSONAR import eu.lunisolar.magma.basics.meta.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.type.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.domain.*; // NOSONAR import org.testng.Assert; import eu.lunisolar.magma.func.action.*; // NOSONAR import eu.lunisolar.magma.func.consumer.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.bi.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.obj.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.tri.*; // NOSONAR import eu.lunisolar.magma.func.function.*; // NOSONAR import eu.lunisolar.magma.func.function.conversion.*; // NOSONAR import eu.lunisolar.magma.func.function.from.*; // NOSONAR import eu.lunisolar.magma.func.function.to.*; // NOSONAR import eu.lunisolar.magma.func.operator.binary.*; // NOSONAR import eu.lunisolar.magma.func.operator.ternary.*; // NOSONAR import eu.lunisolar.magma.func.operator.unary.*; // NOSONAR import eu.lunisolar.magma.func.predicate.*; // NOSONAR import eu.lunisolar.magma.func.supplier.*; // NOSONAR import org.testng.annotations.*; //NOSONAR import java.util.regex.Pattern; //NOSONAR import java.text.ParseException; //NOSONAR import eu.lunisolar.magma.basics.exceptions.*; //NOSONAR import java.util.concurrent.atomic.AtomicInteger; //NOSONAR import java.util.function.*; //NOSONAR import static eu.lunisolar.magma.func.build.function.to.LTieDblFunctionBuilder.tieDblFunction; import static eu.lunisolar.magma.func.build.function.to.LTieDblFunctionBuilder.tieDblFunctionFrom; public class LTieDblFunctionBuilderTest<T>{ @Test public void testOtherwiseThrow() { try { LTieDblFunction<Integer> function = tieDblFunctionFrom(b-> b .build() ); function.applyAsInt(100,100,100d); Assert.fail("No exception was thrown."); } catch (Throwable e) { Assert.assertSame(e.getClass(), IllegalStateException.class); Assert.assertTrue(e.getMessage().contains("There is no case configured for the arguments (if any).")); } } @Test public void testHandlingCanBeSetOnlyOnce() { try { LTieDblFunction<Integer> function = tieDblFunctionFrom(b-> b .withHandling(h -> h.wrapIf(RuntimeException.class::isInstance, RuntimeException::new)) .build(h -> h.wrapIf(RuntimeException.class::isInstance, RuntimeException::new)) ); Assert.fail("No exception was thrown."); } catch (Throwable e) { Assert.assertSame(e.getClass(), UnsupportedOperationException.class); Assert.assertTrue(e.getMessage().contains("Handling is already set for this builder.")); } } @Test public void testHandling() { try { LTieDblFunction<Integer> function = tieDblFunctionFrom(b -> b .otherwise((a1,a2,a3) -> { throw new RuntimeException("ORIGINAL"); }) .build(h -> h.wrapIf(RuntimeException.class::isInstance, IllegalStateException::new, "NEW EXCEPTION")) ); function.applyAsInt(100,100,100d); Assert.fail("No exception was thrown."); } catch (Throwable e) { Assert.assertSame(e.getClass(), IllegalStateException.class); Assert.assertTrue(e.getMessage().contains("NEW EXCEPTION")); Assert.assertSame(e.getCause().getClass(), RuntimeException.class); } } @Test public void testBuild() { LTieDblFunction<Integer> function = tieDblFunctionFrom( b -> b .aCase(ce -> ce.of((a1,a2,a3) -> a1 == 0) .evaluate((a1,a2,a3) -> 0)) .inCase((a1,a2,a3) -> a1 > 0 && a1 < 10).evaluate((a1,a2,a3) -> 1) .inCase((a1,a2,a3) -> a1 > 10 && a1 < 20).evaluate((a1,a2,a3) -> 2) .otherwise((a1,a2,a3) -> 99) .build() ); FuncAttests.attestTieDblFunc(function) .doesApplyAsInt(0,0,0d).when(null).to(a -> a.mustEx(Be::equalEx, 0)) .doesApplyAsInt(5,5,5d).when(null).to(a -> a.mustEx(Be::equalEx, 1)) .doesApplyAsInt(15,15,15d).when(null).to(a -> a.mustEx(Be::equalEx, 2)) .doesApplyAsInt(10,10,10d).when(null).to(a -> a.mustEx(Be::equalEx, 99)) ; } }
[ "open@lunisolar.eu" ]
open@lunisolar.eu