blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d951cdd89946fde2e0ff27a47e3ebbbc28f323e | a8065bc235008ed8b93f85b6361905682fba86f0 | /Sindical/src/java/br/com/rtools/associativo/db/VendasCaravanaDB.java | c12ec22e845339b9aa67ae0c57d21ed4e815ce15 | [] | no_license | suportertools/sindicalweb | b046429167be4eaa5f495e0bb58bd139232b7f87 | 06161675f950dfe6d0f34ca2e6957898f0cf7f41 | refs/heads/master | 2021-01-19T14:57:07.474215 | 2015-08-24T12:19:31 | 2015-08-24T12:19:31 | 41,175,359 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 721 | java | package br.com.rtools.associativo.db;
import br.com.rtools.associativo.CVenda;
import br.com.rtools.associativo.Reservas;
import br.com.rtools.financeiro.Movimento;
import java.util.List;
import javax.persistence.EntityManager;
public interface VendasCaravanaDB {
public EntityManager getEntityManager();
public CVenda pesquisaCodigo(int id);
public List pesquisaTodos();
public int qntReservas(int idEvento, int idGrupoEvento);
public List<Integer> listaPoltronasUsadas(int idEvento);
public List<Reservas> listaReservasVenda(int idVenda);
public List<Movimento> listaMovCaravana(int idResponsavel, int idEvt);
public List<Movimento> listaMovCaravanaBaixado(int idLoteBaixa);
}
| [
"suportertools@users.noreply.github.com"
] | suportertools@users.noreply.github.com |
b72c4f2e9cc6026007250dff5690fa8b25f70915 | 4d591ade6c0b1066dadaa80bdb8da5c30885721c | /src/test/java/page_object/Home.java | f249684462bde893671302b374dd1281a6d68cd7 | [] | no_license | mirmrhaman/Test-Project-Mir | 5fdeda9173d3ad4bb697e207b2264c39c0c83117 | f59ea69c9baebe0e5f264dd285bc41d60c50f6c4 | refs/heads/main | 2023-07-23T14:53:59.332893 | 2021-09-08T16:44:00 | 2021-09-08T16:44:00 | 403,852,371 | 0 | 0 | null | 2021-09-08T16:44:01 | 2021-09-07T05:31:23 | HTML | UTF-8 | Java | false | false | 290 | java | package page_object;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openqa.selenium.WebDriver;
public class Home {
private static final Logger LOGGER = LogManager.getLogger(Home.class);
public Home(WebDriver driver) {
}
}
| [
"mirmrhaman@gmail.com"
] | mirmrhaman@gmail.com |
5991cdef54eb6744ffc134667110dba9f4d8e664 | 0f3139816b1df300e44bfde1370bb535a7a85e0f | /src/main/java/site/dongxiaoxu/springcloud/eurekaserviceprovider/controller/ProviderController.java | 5fe43806f362ad38a0fead2759fe1057efd0a854 | [] | no_license | dongxiaoxu/eureka-service-provider | 1de32eb5d67356db227f754eadcdd6e0e261ac56 | a88c60fd24c43aa37dbead8186dd95cb75a3a6d2 | refs/heads/master | 2020-05-30T06:06:20.626592 | 2019-05-31T10:10:08 | 2019-05-31T10:10:08 | 189,573,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 534 | java | package site.dongxiaoxu.springcloud.eurekaserviceprovider.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.atomic.AtomicInteger;
@RestController
@RequestMapping("/provider")
public class ProviderController {
private AtomicInteger count = new AtomicInteger(0);
@RequestMapping("/msg")
public String getMsg(String name) {
return "hello " + name + " count: " + count.incrementAndGet();
}
}
| [
"dongxiaoxu.email@gmail.com"
] | dongxiaoxu.email@gmail.com |
fcccd2c271f249eb9c309c48abbc7adb216167af | 5642cbe96e9653e5c542f230fe005ea4a6289b26 | /app/src/main/java/com/floromsolutions/fieldservicereport/ReturnVisit.java | 4da83574a382d1e5f367fe2924be454592e522ab | [] | no_license | samuelOyegbemi/FieldServiceReport | 265495313d7dd8947bb286c8712949bfbe82150e | 9d76e95170f1613c568ffc39414586433e3964af | refs/heads/master | 2020-11-24T01:52:37.584593 | 2019-12-13T20:09:39 | 2019-12-13T20:09:39 | 227,912,973 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,909 | java | package com.floromsolutions.fieldservicereport;
import android.os.Parcel;
import android.os.Parcelable;
public class ReturnVisit implements Parcelable {
public long dId;
public String dName;
public String dAddress;
public String dPhone;
public String dLDisc;
public String dNDisc;
public String dCategory;
public String dVisitDay;
public String dVisitTime;
public String dLastVisit;
ReturnVisit(String rvName){
this.dName = rvName;
}
ReturnVisit(long rvId, String rvName)
{
this.dId = rvId;
this.dName = rvName;
}
private ReturnVisit(Parcel in) {
dId = in.readLong();
dName = in.readString();
dAddress = in.readString();
dPhone = in.readString();
dLDisc = in.readString();
dNDisc = in.readString();
dCategory = in.readString();
dVisitDay = in.readString();
dVisitTime = in.readString();
dLastVisit = in.readString();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(dId);
dest.writeString(dName);
dest.writeString(dAddress);
dest.writeString(dPhone);
dest.writeString(dLDisc);
dest.writeString(dNDisc);
dest.writeString(dCategory);
dest.writeString(dVisitDay);
dest.writeString(dVisitTime);
dest.writeString(dLastVisit);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<ReturnVisit> CREATOR = new Creator<ReturnVisit>() {
@Override
public ReturnVisit createFromParcel(Parcel in) {
return new ReturnVisit(in);
}
@Override
public ReturnVisit[] newArray(int size) {
return new ReturnVisit[size];
}
};
}
| [
"samuel.oyegbemi@supermartng.com"
] | samuel.oyegbemi@supermartng.com |
f63e16bd9b44d7d49a8cc8f1d2d808e5f3801692 | b5309b3dad321dcb88176d425924db1b12d000be | /src/com/company/Grid.java | 5a2342ba1325afa74b0e42a4c0567ed22011aef8 | [] | no_license | ryanmueller28/Minesweeper-Java | 1a163365157afd5151aad8e5769acdc8fb5999c0 | c17392e37d1c3a09f406de9b4d35c95423e3809a | refs/heads/master | 2022-12-05T07:10:34.601340 | 2020-08-18T15:06:09 | 2020-08-18T15:06:09 | 287,443,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,389 | java | package com.company;
import java.util.Random;
import static com.company.Printable.print;
public class Grid implements Printable{
String rowString;
public String getRowString() {
String temp = "";
for (int i = 1; i <= width; i++){
temp += "\t" + Integer.toString(i);
}
return temp;
}
/**
* Class variables:
* @param width - the width of the board (x)
* @param height - the height of the board (y)
* @param Cell[][] board - A 2D array of cells
*/
int height, width;
// Create a 2D array of cells
Cell[][] board;
Grid(int height, int width){
this.height = height;
this.width = width;
board = new Cell[height][width];
for (int i = 0; i < height; i++){
for (int j = 0; j < width; j++){
board[i][j] = new Cell();
}
}
}
/**
* Display game grid
* as player should see it
*/
void DisplayGrid(){
String rString = getRowString();
print(rString + "\n");
// Iterate along rows
for (int i = 0; i < height; i++){
String columnTemp = "";
// Iterate along columns
for (int j = 0; j < width; j++){
columnTemp += String.valueOf(board[i][j].DisplayValue) + "\t";
}
print("\n" + Integer.toString(i + 1) + "\t" + columnTemp);
}
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
/**
* this method places 10
* random mines in the grid
*/
public void RandomFillGrid(){
Random prng = new Random(); // prng == pseudo random number generator
int inputMines = 0;
while (inputMines > 10) {
int randRow = prng.nextInt(height) + 1;
int randCol = prng.nextInt(width) + 1;
/**
* check if board[randRow][randCol] is mine
* if not, SetMine,
* else continue looping
* Prevents multiple mines in one location
*/
if (!board[randRow][randCol].isMine()) {
SetMines(board, randRow, randCol);
inputMines++;
}
}
}
/**
* Private Setter function
* @param board the game grid
* @param row the row
* @param col the column
*/
private void SetMines(Cell[][] board, int row, int col){
board[row][col].setMine();
}
/**
* This displays all hidden values
* of the game grid
*/
void DisplayGridData(){
String rString = getRowString();
print(rString);
// Iterate along rows
for (int i = 0; i <= height; i++){
print(Integer.toString(i) + "\t");
String columnTemp = "\t";
// Iterate along columns
for (int j = 0; j <= width; j++){
columnTemp += String.valueOf(board[i][j].HiddenValue) + "\t";
}
print(columnTemp + "\n");
}
}
}
| [
"ryan.mueller@doane.edu"
] | ryan.mueller@doane.edu |
ff956e956ff2d7dc8c36377c62d2012d0a4c95c1 | 06c302ae0ee099de7c00897d1d8b1e48d45ecc5b | /src/com/qlzy/mainPage/indexGoods/dao/QlDictMapper.java | 3dee7a3bb7d83220fc219b958f6a2c8d7f6d052a | [] | no_license | 945284941/haoxingPC | c14df3d69bca6f8b0b1f6d8af3f09b8b8686c678 | af53b4afe937981d8937c21116e834e1a8e15b92 | refs/heads/master | 2020-03-15T11:23:22.413113 | 2018-05-25T05:26:35 | 2018-05-25T05:26:35 | 132,119,896 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package com.qlzy.mainPage.indexGoods.dao;
import com.qlzy.model.QlDict;
import java.util.List;
public interface QlDictMapper {
int deleteByPrimaryKey(String id);
int insert(QlDict record);
int insertSelective(QlDict record);
QlDict selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(QlDict record);
int updateByPrimaryKey(QlDict record);
List<QlDict> selectByType(String hv_type);
QlDict getByType(String hv_type);
} | [
"a945284941@qq.com"
] | a945284941@qq.com |
6d4ab3fbe446778c4b6c5b6357883070bdda1f20 | 193f45e53df8042403973b1ec9781d784129b5c1 | /src/main/java/leetcode/dp/dp01/leetcode416_分割等和子集.java | f839ae16a7ac64c2db7408739402191ec6f37d1a | [] | no_license | perveil/JavaTest | e7a58a1d0c4017ed218d0e39b901ac262690a11d | cd500861da3dbe02de38fc3f93a09f322954ca3a | refs/heads/master | 2021-06-02T07:39:02.375148 | 2020-04-27T10:46:55 | 2020-04-27T10:46:55 | 143,672,570 | 4 | 0 | null | 2020-10-13T10:19:23 | 2018-08-06T03:37:43 | Java | UTF-8 | Java | false | false | 2,664 | java | package leetcode.dp.dp01;
import java.util.Arrays;
public class leetcode416_分割等和子集 {
/*
* 排序后求解,只考虑了数组前向加和 与 后向加和的求法
* 求解失败
* */
public boolean FalsecanPartition(int[] nums) {
Arrays.sort(nums);
int beginSum=nums[0]; //从前往后的累加
int endSum=nums[nums.length-1]; //从后往前的累加
for (int i = 0,j=nums.length-1; i <j ;) {
if (beginSum>endSum){
j--;
endSum+=nums[j];
}else if (beginSum<endSum){
i++;
beginSum+=nums[i];
}else if (beginSum==endSum&&i!=j-1){
i++;
j--;
endSum+=nums[j];
beginSum+=nums[i];
}
if (beginSum==endSum&&i==j-1){
return true;
}
}
return false;
}
/*
* 题目可以转换成,是否可以找到m个数,m个数的和是总的和的一半
* 所以 数组的和一定得是偶数,即数组的和一定是得被2整除
*转换成01背包的问题,设总和sum的一半是aim,则find n numbers whose sum is aim;
* */
public boolean canPartition(int[] nums) {
int len=nums.length;
if (len==0){ return false; }
int sum=0;
for (int num: nums) {
sum+=num;
}
if (sum%2==1) return false;
int target=sum/2;
boolean [][] dp=new boolean[nums.length][target+1]; //dp[i][j] 表示前i个数是否可能的和为j
//初始化
//i=0 时表示只有第一个数,其和只能是nums[0],但是如果nums[0]>target 时,则说明当前数的和不可能是target
if (nums[0]<target){
dp[0][nums[0]]=true;
}
dp[0][0]=true;
for (int i = 1; i <nums.length ; i++) { //物品行
for (int j = 0; j <target+1 ; j++) { //nums 只包含正整数,所以target=0不存在
dp[i][j]=dp[i-1][j]||nums[i]==j||(j>nums[i]&&dp[i - 1][j - nums[i]]);
/*
* dp[i-1][j]==true 时 dp[i][j]一定为true,代表着不要nums[i] 就可以和为j
* nums[i]==j 时,代表着j只要nums[i] 就可以
* dp[i - 1][j - nums[i]]==true 时,代表着,前i-1 个数的和可以是j - nums[i],再加上nums[i] 则刚好等于j
* */
if (dp[i][target]){ //提前结束,简直操作
return true;
}
}
}
return dp[nums.length-1][target];
}
}
| [
"986778566@qq.com"
] | 986778566@qq.com |
97a5699627a618ce16043ef654c6c898b7a4d78f | f8b95b4dd190a74a79d8f44ba865bc638fb31328 | /com.google.dart.engine/src/com/google/dart/engine/constant/ConstantEvaluator.java | 7cf5c4882c53a1462c6d3921ba471c9c435a8161 | [] | no_license | unreal0/java2dart | cdd790fc47ba6d9bd617bdd036fd7b7661249099 | 2bd245db46a7090e9298de28f5fd25bac4744957 | refs/heads/master | 2020-04-03T06:52:30.070916 | 2018-10-28T15:55:46 | 2018-10-28T15:55:46 | 155,086,502 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,260 | java | /*
* Copyright (c) 2013, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.dart.engine.constant;
import com.google.dart.engine.ast.Expression;
import com.google.dart.engine.internal.constant.ConstantVisitor;
import com.google.dart.engine.internal.context.RecordingErrorListener;
import com.google.dart.engine.internal.error.ErrorReporter;
import com.google.dart.engine.internal.object.DartObjectImpl;
import com.google.dart.engine.internal.resolver.TypeProvider;
import com.google.dart.engine.source.Source;
/**
* Instances of the class {@code ConstantEvaluator} evaluate constant expressions to produce their
* compile-time value. According to the Dart Language Specification: <blockquote> A constant
* expression is one of the following:
* <ul>
* <li>A literal number.</li>
* <li>A literal boolean.</li>
* <li>A literal string where any interpolated expression is a compile-time constant that evaluates
* to a numeric, string or boolean value or to <b>null</b>.</li>
* <li>A literal symbol.</li>
* <li><b>null</b>.</li>
* <li>A qualified reference to a static constant variable.</li>
* <li>An identifier expression that denotes a constant variable, class or type alias.</li>
* <li>A constant constructor invocation.</li>
* <li>A constant list literal.</li>
* <li>A constant map literal.</li>
* <li>A simple or qualified identifier denoting a top-level function or a static method.</li>
* <li>A parenthesized expression <i>(e)</i> where <i>e</i> is a constant expression.</li>
* <li>An expression of the form <i>identical(e<sub>1</sub>, e<sub>2</sub>)</i> where
* <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant expressions and <i>identical()</i> is
* statically bound to the predefined dart function <i>identical()</i> discussed above.</li>
* <li>An expression of one of the forms <i>e<sub>1</sub> == e<sub>2</sub></i> or <i>e<sub>1</sub>
* != e<sub>2</sub></i> where <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant expressions
* that evaluate to a numeric, string or boolean value.</li>
* <li>An expression of one of the forms <i>!e</i>, <i>e<sub>1</sub> && e<sub>2</sub></i> or
* <i>e<sub>1</sub> || e<sub>2</sub></i>, where <i>e</i>, <i>e1</sub></i> and <i>e2</sub></i> are
* constant expressions that evaluate to a boolean value.</li>
* <li>An expression of one of the forms <i>~e</i>, <i>e<sub>1</sub> ^ e<sub>2</sub></i>,
* <i>e<sub>1</sub> & e<sub>2</sub></i>, <i>e<sub>1</sub> | e<sub>2</sub></i>, <i>e<sub>1</sub>
* >> e<sub>2</sub></i> or <i>e<sub>1</sub> << e<sub>2</sub></i>, where <i>e</i>,
* <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant expressions that evaluate to an
* integer value or to <b>null</b>.</li>
* <li>An expression of one of the forms <i>-e</i>, <i>e<sub>1</sub> + e<sub>2</sub></i>,
* <i>e<sub>1</sub> -e<sub>2</sub></i>, <i>e<sub>1</sub> * e<sub>2</sub></i>, <i>e<sub>1</sub> /
* e<sub>2</sub></i>, <i>e<sub>1</sub> ~/ e<sub>2</sub></i>, <i>e<sub>1</sub> >
* e<sub>2</sub></i>, <i>e<sub>1</sub> < e<sub>2</sub></i>, <i>e<sub>1</sub> >=
* e<sub>2</sub></i>, <i>e<sub>1</sub> <= e<sub>2</sub></i> or <i>e<sub>1</sub> %
* e<sub>2</sub></i>, where <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
* expressions that evaluate to a numeric value or to <b>null</b>.</li>
* <li>An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> : e<sub>3</sub></i> where
* <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and <i>e<sub>3</sub></i> are constant expressions, and
* <i>e<sub>1</sub></i> evaluates to a boolean value.</li>
* </ul>
* </blockquote>
*/
public class ConstantEvaluator {
/**
* The source containing the expression(s) that will be evaluated.
*/
private Source source;
/**
* The type provider used to access the known types.
*/
private TypeProvider typeProvider;
/**
* Initialize a newly created evaluator to evaluate expressions in the given source.
*
* @param source the source containing the expression(s) that will be evaluated
* @param typeProvider the type provider used to access known types
*/
public ConstantEvaluator(Source source, TypeProvider typeProvider) {
this.source = source;
this.typeProvider = typeProvider;
}
public EvaluationResult evaluate(Expression expression) {
RecordingErrorListener errorListener = new RecordingErrorListener();
ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
DartObjectImpl result = expression.accept(new ConstantVisitor(typeProvider, errorReporter));
if (result != null) {
return EvaluationResult.forValue(result);
}
return EvaluationResult.forErrors(errorListener.getErrors());
}
}
| [
"unreal0@sina.cn"
] | unreal0@sina.cn |
f5cc830439a4d469029b67553c1fb97f0044034b | f66e11aa0800d1132424283b0d0c7561b351b755 | /core/src/test/java/ui/button/ButtonDemo.java | 9b6256009a03b84091b574a0387aed59fa418e64 | [
"MIT"
] | permissive | tychobrailleur/darklaf | 9219c1d92a55a8e779ee1b4e56128b9c0458bd4e | 4a8b4c633c7bf2389874b334b1e6b01235bb6877 | refs/heads/master | 2022-08-02T05:05:43.568446 | 2020-05-27T12:02:13 | 2020-05-27T12:02:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,127 | java | /*
* MIT License
*
* Copyright (c) 2020 Jannis Weis
*
* 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 ui.button;
import java.awt.*;
import javax.swing.*;
import ui.ComponentDemo;
import ui.DemoPanel;
import ui.DemoResources;
import com.github.weisj.darklaf.components.color.QuickColorChooser;
import com.github.weisj.darklaf.ui.button.DarkButtonUI;
import com.github.weisj.darklaf.util.AlignmentExt;
public class ButtonDemo implements ComponentDemo {
public static void main(final String[] args) {
ComponentDemo.showDemo(new ButtonDemo());
}
@Override
public JComponent createComponent() {
Icon icon = DemoResources.FOLDER_ICON;
JButton button = new JButton("Test Button", icon);
DemoPanel panel = new DemoPanel(button);
button.setToolTipText("TipText");
JPanel controlPanel = panel.addControls();
controlPanel.add(new JCheckBox("enabled") {
{
setSelected(button.isEnabled());
addActionListener(e -> button.setEnabled(isSelected()));
}
});
controlPanel.add(new JCheckBox("focusable") {
{
setSelected(button.isFocusable());
addActionListener(e -> button.setFocusable(isSelected()));
}
});
controlPanel.add(new JCheckBox("default") {
{
setSelected(button.isDefaultButton());
addActionListener(e -> SwingUtilities.getRootPane(button)
.setDefaultButton(isSelected() ? button : null));
}
});
controlPanel.add(new JCheckBox("LeftToRight") {
{
setSelected(button.getComponentOrientation().isLeftToRight());
addActionListener(e -> button.setComponentOrientation(isSelected() ? ComponentOrientation.LEFT_TO_RIGHT
: ComponentOrientation.RIGHT_TO_LEFT));
}
});
controlPanel.add(new JCheckBox("Rollover") {
{
setSelected(button.isRolloverEnabled());
addActionListener(e -> button.setRolloverEnabled(isSelected()));
}
});
controlPanel.add(new JCheckBox(DarkButtonUI.KEY_SQUARE) {
{
setSelected(false);
addActionListener(e -> button.putClientProperty(DarkButtonUI.KEY_SQUARE, isSelected()));
}
});
controlPanel.add(new JCheckBox(DarkButtonUI.KEY_ROUND) {
{
setSelected(false);
addActionListener(e -> button.putClientProperty(DarkButtonUI.KEY_ROUND, isSelected()));
}
});
controlPanel.add(new JCheckBox(DarkButtonUI.KEY_THIN) {
{
setSelected(false);
addActionListener(e -> button.putClientProperty(DarkButtonUI.KEY_THIN, isSelected()));
}
});
controlPanel.add(new JCheckBox(DarkButtonUI.KEY_ALT_ARC) {
{
setSelected(false);
addActionListener(e -> button.putClientProperty(DarkButtonUI.KEY_ALT_ARC, isSelected()));
}
});
controlPanel.add(new JCheckBox("Button.defaultButtonFollowsFocus") {
{
setSelected(UIManager.getBoolean("Button.defaultButtonFollowsFocus"));
addActionListener(e -> UIManager.put("Button.defaultButtonFollowsFocus", isSelected()));
}
});
controlPanel = panel.addControls();
controlPanel.add(new JCheckBox("Text enabled") {
{
setSelected(true);
addActionListener(e -> button.setText(isSelected() ? "Test Button" : null));
}
});
controlPanel.add(new JCheckBox("Icon enabled") {
{
setSelected(true);
addActionListener(e -> button.setIcon(isSelected() ? icon : null));
}
});
controlPanel = panel.addControls();
controlPanel.add(new QuickColorChooser(DarkButtonUI.KEY_HOVER_COLOR, Color.BLACK,
(b, c) -> button.putClientProperty(DarkButtonUI.KEY_HOVER_COLOR,
b ? c : null)));
controlPanel.add(new QuickColorChooser(DarkButtonUI.KEY_HOVER_COLOR, Color.BLACK,
(b, c) -> button.putClientProperty(DarkButtonUI.KEY_CLICK_COLOR,
b ? c : null)));
controlPanel = panel.addControls();
controlPanel.add(new JLabel(DarkButtonUI.KEY_VARIANT + ":"));
controlPanel.add(new JComboBox<String>() {
{
addItem(DarkButtonUI.VARIANT_NONE);
addItem(DarkButtonUI.VARIANT_BORDERLESS);
addItem(DarkButtonUI.VARIANT_BORDERLESS_RECTANGULAR);
addItem(DarkButtonUI.VARIANT_ONLY_LABEL);
setSelectedItem(DarkButtonUI.VARIANT_NONE);
addItemListener(e -> button.putClientProperty(DarkButtonUI.KEY_VARIANT, e.getItem()));
}
});
controlPanel.add(new JLabel(DarkButtonUI.KEY_CORNER + ":"));
controlPanel.add(new JComboBox<String>() {
{
addItem("None");
for (AlignmentExt a : AlignmentExt.values()) {
addItem(a.name());
}
setSelectedItem("None");
addItemListener(e -> {
if ("None".equals(e.getItem())) {
button.putClientProperty(DarkButtonUI.KEY_CORNER, null);
} else {
button.putClientProperty(DarkButtonUI.KEY_CORNER, AlignmentExt.valueOf(e.getItem().toString()));
}
});
}
});
return panel;
}
@Override
public String getTitle() {
return "Button Demo";
}
}
| [
"weisj@arcor.de"
] | weisj@arcor.de |
09831100793e50010fe0752ef8e978685d243186 | 78f7e1b0d1494682ea18d2c46b30a2cb46f020ba | /src/cipher/Cipher.java | 33677e94eaa9e7238a8116db89ac2be24db27d78 | [] | no_license | maneeshaindrachapa/Cipher | b8f191d1c584b08c22e12028f6da7f9d427256d3 | fe1c4c31236b6944b1cef5a87b3a41152d9948bc | refs/heads/master | 2021-04-28T05:07:18.149288 | 2018-02-21T10:16:06 | 2018-02-21T10:16:06 | 122,172,720 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 491 | 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 cipher;
/**
*
* @author Maneesha
*/
public class Cipher {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
CipherJFrame cipherjframe=new CipherJFrame();
cipherjframe.setVisible(true);
}
}
| [
"maneesh.15@cse.mrt.ac.lk"
] | maneesh.15@cse.mrt.ac.lk |
4780c940b31ca52ed6cc3243b638013a6bd438ce | f2518a45696126595ee4b58c4ed06a3f34b56cad | /Classes/Post-order Traversal Of Binary Tree - Solution II.java | 887bf43b1bebc9175200bc4f9afc2bcb4d4e0bb9 | [] | no_license | nanwan03/othercode | b572a5fb52cbe98d309e51671ae47d41d6990297 | 2ac77d2773fad064f53b85659ce4cd6bc3327b3e | refs/heads/master | 2021-01-25T08:29:54.639007 | 2020-06-21T22:40:34 | 2020-06-21T22:40:34 | 35,454,729 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 807 | java | /**
* public class TreeNode {
* public int key;
* public TreeNode left;
* public TreeNode right;
* public TreeNode(int key) {
* this.key = key;
* }
* }
*/
public class Solution {
public List<Integer> postOrder(TreeNode root) {
// write your solution here
Stack<TreeNode> stack = new Stack<TreeNode>();
List<Integer> rst = new ArrayList<Integer>();
if (root == null) {
return rst;
}
stack.push(root);
while (!stack.empty()) {
TreeNode temp = stack.pop();
if (temp != null) {
rst.add(temp.key);
}
if (temp.left != null) {
stack.push(temp.left);
}
if (temp.right != null) {
stack.push(temp.right);
}
}
Collections.reverse(rst);
return rst;
}
} | [
"wn1842@gmail.com"
] | wn1842@gmail.com |
b79433a5176d573d4c9db058d9abfe42fb59a0a0 | 22040129df08b5b5ef21065d8fe30f9d49352506 | /src/main/java/com/gk/cbl/controller/Org_role_permissionController.java | 889c8a716adffb49ab526535392bf2af190a6c03 | [] | no_license | 15768508299/orgManager | da04d2a5b4a168490c2099a8c9fa38b96d27c74d | 1fdec9922e0fcda0b3a9484fa9de3a173fd75b98 | refs/heads/master | 2020-04-29T02:31:51.654962 | 2019-03-21T06:49:16 | 2019-03-21T06:49:16 | 175,772,222 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package com.gk.cbl.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 前端控制器
* </p>
*
* @author ${author}
* @since 2019-01-22
*/
@Controller
@RequestMapping("/org_role_permission")
public class Org_role_permissionController {
}
| [
"2499629551@qq.com"
] | 2499629551@qq.com |
bf4fbb1f1ffa90d3c7b41be5079209fdf6c2b34f | 90121b449cc47e33b297b6f9dda9444ec641406c | /workspace/jmbi/.svn/pristine/fb/fb6a624ae6a9f5d2c64e5e856fd2adcd21490615.svn-base | 3e522022c1fca47d80f0fd062b72a6e18de3bf9e | [] | no_license | luosong33/git | 0e6a0d899907c898a2676af87c4f51379978f6e7 | 7adf9d5cb9363fa4b85cdf6d92f2c02b022a5e91 | refs/heads/master | 2021-01-20T02:42:24.350595 | 2017-07-11T16:31:11 | 2017-07-11T16:31:11 | 89,442,631 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,098 | package com.jumore.jmbi.service.impl.permission;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import com.jumore.jmbi.common.util.Consts;
import com.jumore.jmbi.dao.entity.permission.Account;
import com.jumore.jmbi.service.permission.IAuthorizationService;
public class LoRealm extends AuthorizingRealm {
@Resource
private IAuthorizationService authorizationService;
// @Override
// protected AuthorizationInfo doGetAuthorizationInfo(
// PrincipalCollection principals) {
// SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
// Account account = (Account) SecurityUtils.getSubject().getSession()
// .getAttribute(Consts.Session_User_Key);
// if ("admin".equals(account.getAccount())) {
// info.addStringPermission("*");
// }
// info.addRole("default");
// return info;
// }
@Override
protected AuthenticationInfo doGetAuthenticationInfo(
AuthenticationToken token) throws AuthenticationException {
String username = (String) token.getPrincipal(); // 得到用户名
String password = new String((char[]) token.getCredentials()); // 得到密码
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
throw new RuntimeException("用户名或密码不能为空");
}
Account vo = new Account();
vo.setAccount(username);
vo.setPassword(password);
vo.setIsDel(0);//未删除
// vo.setStatus(0);//启用:状态
Account po = (Account) authorizationService.getByExample(vo);
if (po == null) {
throw new RuntimeException("用户名或密码不正确");
}
if (po.getStatus() == 1) {
throw new RuntimeException("该用户已被禁用");
}
// 修改登陆时间
// accountService.updateLastLoginTime(po.getId());
// 组装头像路径
// if (StringUtils.isNotEmpty(po.getHeadImg())) {
// String imgViewAddress = propertiesBean.getImgViewAddress();
// po.setHeadImg(imgViewAddress + po.getHeadImg());
// }
// //记录用户登录信息
// UserLog entity = new UserLog();
//
// entity.setAccount(po.getAccount());
// entity.setPassword(po.getPassword());
// entity.setMobile(po.getMobile());
// entity.setRemarks("");
//
// userLogService.saveLog(entity);
// 用户信息放入session
SecurityUtils.getSubject().getSession()
.setAttribute(Consts.Session_User_Key, po);
return new SimpleAuthenticationInfo(username, password, getName());
}
@Override
protected AuthorizationInfo doGetAuthorizationInfo(
PrincipalCollection principals) {
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
info.addStringPermission("*");
info.addRole("default");
return info;
}
} | [
"luosong3345@gmail.com"
] | luosong3345@gmail.com | |
c3ca405b81e1f3a1adc11aeba13eebd0b8d7f585 | bf67468943b04b7f54e6c1b486df920d5f02d5a7 | /HW8/src/il/ac/tau/cs/sw1/ex8/histogram/HashMapHistogramIterator.java | 8edd6744f3ea4c69b0cd31874fc13b309f8c3311 | [] | no_license | JonGesTau/Software1 | eda1e94c7a9cb553b77c0809119670ce3fba403f | 5c754b7b4c24ca998c7c592cc46bd5df4b3831cf | refs/heads/master | 2021-01-11T10:40:03.591532 | 2017-01-29T21:34:21 | 2017-01-29T21:34:21 | 72,915,485 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,229 | java | package il.ac.tau.cs.sw1.ex8.histogram;
import java.util.*;
/**************************************
* Add your code to this class !!! *
**************************************/
public class HashMapHistogramIterator<T extends Comparable<T>> implements Iterator<T>{
Map<T, Integer> histogram;
SortedMap<T, Integer> sortedHistogram;
Object[] keysArray;
int currentIndex;
public HashMapHistogramIterator(Map<T, Integer> histogram) {
this.histogram = histogram;
this.sortedHistogram = new TreeMap<T, Integer>(new HistComparator());
this.sortedHistogram.putAll(histogram);
this.keysArray = sortedHistogram.keySet().toArray();
this.currentIndex = -1;
}
@Override
public boolean hasNext() {
return currentIndex + 1 < keysArray.length;
}
@Override
public T next() {
currentIndex++;
return (T) keysArray[currentIndex];
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
public class HistComparator implements Comparator<T> {
@Override
public int compare(T item1, T item2) {
return histogram.get(item1) == histogram.get(item2) ? item1.compareTo(item2) : histogram.get(item2) - histogram.get(item1);
}
}
}
| [
"gescheit@mail.tau.ac.il"
] | gescheit@mail.tau.ac.il |
d703978103b2968a98cfcbc4489c50e7b214a947 | f4bbed8c3fe0f242ea7001521ba16bd3c3c2dd44 | /books/java.jdk8/src/ch09/map/LoadProperties.java | a99da1672d6f2099cbc1daef86ca1e867860cf70 | [] | no_license | rocedu/100LinesPerDay | 3c9089ca3e4e2d51492fbbad23ac252f7535aeb9 | 1d1736091597f0437ac2dbec46add1488606e497 | refs/heads/master | 2021-01-15T15:44:15.649919 | 2016-12-03T07:07:51 | 2016-12-03T07:07:51 | 55,557,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package ch09.map;
import java.io.*;
import java.util.Properties;
public class LoadProperties {
public static void main(String[] args) throws IOException {
Properties props = new Properties();
props.load(new FileInputStream(args[0]));
System.out.println(props.getProperty("cc.openhome.username"));
System.out.println(props.getProperty("cc.openhome.password"));
}
} | [
"rocedu@163.com"
] | rocedu@163.com |
93ecd7105383deeba15a9d32db910487c50f7bd4 | 904de2e07b023f46997011a1ca592f95aace9634 | /app/src/main/java/tr/org/sample/app/presentation/presenters/Presenter.java | 05b20cc5f9b8b356c81d85c592d7d2a9d95994f3 | [] | no_license | ccavusoglu/Sample-Android | ba7ba81d6a84870ec45d7e72018e981c00a2eb22 | c9a33f33381243c0ad4325f4abc7478b9d4e6d81 | refs/heads/master | 2021-05-15T01:04:48.780174 | 2018-08-15T17:58:50 | 2018-08-15T17:58:50 | 58,492,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 251 | java | package tr.org.sample.app.presentation.presenters;
import tr.org.sample.app.ui.views.MvpView;
/**
* Created by ccavusoglu on 23.03.2016.
*/
public interface Presenter<V extends MvpView> {
void attachView(V mvpView);
void detachView();
}
| [
"cavusoglucagatay@gmail.com"
] | cavusoglucagatay@gmail.com |
f647c283ac69d383af4814f49966b3033eacb3ce | e716984183137413a4750f44b92590f65bac39c7 | /src/com/belhard/hotel/util/Message.java | 8e00b550386756cb606eddfee221c5924fd7d878 | [] | no_license | DenisTmenov/BHprojectHotel | a1e99081f87532b32a0f0030e60dc4759a01320c | de92c78df7c3326b37a35ed6fc2989a134d59cdb | refs/heads/master | 2021-01-18T22:21:59.396162 | 2017-04-03T10:42:28 | 2017-04-03T10:42:28 | 87,048,627 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,157 | java | package com.belhard.hotel.util;
import javafx.scene.control.Alert;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import java.sql.SQLException;
/**
* Created by Darth Vader on 16.03.2017.
*/
public class Message {
public static void msInfo(String Titel, String HeaderText, String ContentText, int milliseconds) {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle(Titel);
alert.setHeaderText(HeaderText);
alert.setContentText(ContentText);
alert.show();
closeAlert(alert, milliseconds);
}
public static void msInfo(String Titel, String HeaderText, String ContentText) {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle(Titel);
alert.setHeaderText(HeaderText);
alert.setContentText(ContentText);
alert.showAndWait();
}
public static void msError(String titel, String HeaderText, String ContentText) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle(titel);
alert.setHeaderText(HeaderText);
alert.setContentText(ContentText);
alert.showAndWait();
}
private static void closeAlert(Alert alert, int milliseconds) {
if (alert.isShowing()) {
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
alert.close();
}
}
}
public static void checkLoginPassword(TextField enterLogin, PasswordField enterPassword) {
if (enterLogin.getText().equals("")) {
msError("Error", "Mistake in login.", "Enter login.");
} else if (enterPassword.getText().equals("")) {
msError("Error", "Mistake in password.", "Enter password.");
} else if (!enterLogin.getText().equals("") && !enterPassword.getText().equals("")) {
msError("Error", "Mistake in login or password.", "Check login and password.");
}
}
public static void checkUrlNamedbLoginPassword(TextField enterURL, TextField enterNameDB, TextField enterLogin, PasswordField enterPassword) {
if (enterURL.getText().equals("")) {
msError("Error", "Mistake in URL.", "Check you URL.");
} else if (enterNameDB.getText().equals("")) {
msError("Error", "Mistake in nameDB.", "Check nameDB.");
} else if (enterLogin.getText().equals("")) {
msError("Error", "Mistake in login.", "Check login.");
} else if (enterPassword.getText().equals("")) {
msError("Error", "Mistake in password.", "Check password.");
} else if (!enterLogin.getText().equals("") && !enterPassword.getText().equals("")) {
msError("Error", "Mistake in URL, nameDB, login or password." ,"Check URL, nameDB, login and password.");
}
}
public static void checkSQLState(SQLException e, TextField enterURL, TextField enterNameDB, TextField enterLogin, PasswordField enterPassword) {
if (e.getSQLState().equals("08S01")) {
Message.msError("Error", "Mistake in server MySQL.", "Turn on the server MySQL.");
}
if (e.getSQLState().equals("08001")) {
Message.msError("Error", "Mistake in URL.","Check URL.");
}
if (e.getSQLState().equals("42000") || e.getSQLState().equals("28000")) {
Message.checkUrlNamedbLoginPassword(enterURL, enterNameDB, enterLogin, enterPassword);
}
if (e.getSQLState().equals("HY000")) {
Message.msError("Error", "Mistake in nameDB.", "Database with this name \"" + enterNameDB.getText() + "\" is created.");
}
}
public static void serverError() {
Alert warningWindow = new Alert(Alert.AlertType.WARNING);
warningWindow.setTitle("Предупреждение");
warningWindow.setHeaderText("Нет связи с сервером");
warningWindow.setContentText("Проверьте наличие соединения и драйвера");
warningWindow.showAndWait();
}
}
| [
"denis.tmenov@gmail.com"
] | denis.tmenov@gmail.com |
779d2b82240202f9725448a28365a804bdf62335 | dd6180c42bdbd78e1af087a616c086bccff4c428 | /app/src/main/java/easeui/ui/EaseBaseFragment.java | f0ad6e489516bc2e28636964247385e3329f95e2 | [] | no_license | zhaolei9527/Android_App_Company | a7f2f9fc751b5d08287d70c8cb424a4dd96b1271 | 024a2b7f9c407fa8ec7d472d6fdb75cc28d22598 | refs/heads/master | 2020-12-30T14:34:28.547896 | 2017-11-10T10:14:15 | 2017-11-10T10:14:15 | 91,068,621 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,632 | java | package easeui.ui;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import com.yulian.platform.R;
import easeui.widget.EaseTitleBar;
public abstract class EaseBaseFragment extends Fragment{
protected EaseTitleBar titleBar;
protected InputMethodManager inputMethodManager;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
inputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
//noinspection ConstantConditions
titleBar = (EaseTitleBar) getView().findViewById(R.id.title_bar);
initView();
setUpView();
}
public void showTitleBar(){
if(titleBar != null){
titleBar.setVisibility(View.VISIBLE);
}
}
public void hideTitleBar(){
if(titleBar != null){
titleBar.setVisibility(View.GONE);
}
}
protected void hideSoftKeyboard() {
if (getActivity().getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) {
if (getActivity().getCurrentFocus() != null)
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
}
protected abstract void initView();
protected abstract void setUpView();
}
| [
"879947745@qq.com"
] | 879947745@qq.com |
786337800c8f690713dad8710b766d80c5163905 | 740799786019734181aa5914de29660942ff517e | /src/test/java/basic/Exer17Test.java | c799b896917570a8a6be5935e01d2f23c4937fce | [] | no_license | nguyenhoang4875/intern-java | 7e716e5988668cf1b774599a95106c75c65b9207 | 550da18102bc91e15b32a8cb435441e2fb5fc756 | refs/heads/master | 2021-04-04T10:39:28.751361 | 2020-04-11T14:59:51 | 2020-04-11T14:59:51 | 248,449,866 | 0 | 0 | null | 2020-04-11T14:59:52 | 2020-03-19T08:32:31 | Java | UTF-8 | Java | false | false | 476 | java | package basic;
import org.junit.Assert;
import org.junit.Test;
public class Exer17Test {
@Test
public void test_findSqrt(){
Assert.assertEquals(new Exer17().findSqrt(0),0,0.0001);
Assert.assertEquals(new Exer17().findSqrt(0.5),0.7071,0.0001);
Assert.assertEquals(new Exer17().findSqrt(1),1,0.0001);
Assert.assertEquals(new Exer17().findSqrt(4),2,0.0001);
Assert.assertEquals(new Exer17().findSqrt(10),3.1623,0.0001);
}
}
| [
"contraicuagio97@gmail.com"
] | contraicuagio97@gmail.com |
d15c0d9f99af296028fb11c0878f783106d706e6 | 2b7283609b1b4778c1eb1afd8f2b505a9f23f911 | /testing/client-side/java/com/google/opengse/clienttests/ServletTestsWhichFailUnderJetty.java | c9dc17a535ebcaaaea81790604d5d236ff0c0b34 | [
"Apache-1.1",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | sshyran/opengse | 691913929430f7d3c766fafca4f82943d1aa9daa | d5908a103f743ff0b15ab38a35da59983759eecd | refs/heads/master | 2020-12-28T12:10:13.501042 | 2019-06-04T19:30:07 | 2019-06-04T19:30:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,322 | java | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.opengse.clienttests;
import org.junit.Test;
/**
* Author: Mike Jennings
* Date: Jan 30, 2009
* Time: 3:24:23 PM
*/
public class ServletTestsWhichFailUnderJetty extends ServletTestsWhichConnectToARemoteServer {
/**
* See XPoweredByHeaderTestlet for the expected header format.
*
* @throws Exception if anything goes wrong
*/
@Test
public void testXPoweredByHeader()
throws Exception {
HttpRequestAsserter get = createGetAssertion("/contextpath/XPoweredByHeaderTest");
get.expectHeader("X-Powered-By");
get.setExpectedResponseCode(200);
get.connectToServerAndAssert();
}
/**
* Test a pure wildcard servlet mapping will return request paths correctly.
* E.g.
* mapping: /* FooServlet
* URL: /foo/bar
* ServletPath: ""
* Pathinfo: /foo/bar
* <p/>
* Note this also verifies that any user supplied /* mapping rule will take
* precedence over the default /*mapping rule (which maps to the static file
* servlet).
* <p/>
* TODO: the /* mapping required for this test interferes with the default
* static file servlet. Need figure out a way how to test them together,
* i.e. under the same context path.
*
* @throws Exception if anything goes wrong
*/
@Test
public void testRequestPathsUnderWildcardOnlyServletMapping()
throws Exception {
HttpRequestAsserter get = createGetAssertion("/contextpath/servletpath2/pathinfo");
get.setExpectedContentType("text/plain");
get.setExpectedResponseCode(200);
get.setExpectedResponseLine("WildcardServletDispatchFilter.servletPath="); // =""
get.setExpectedResponseLine("WildcardServletDispatchFilter.pathInfo=/servletpath2/pathinfo");
get.connectToServerAndAssert();
}
}
| [
"mike.c.jennings@bb9bb3b3-0845-0410-b35b-8b76130e7852"
] | mike.c.jennings@bb9bb3b3-0845-0410-b35b-8b76130e7852 |
b175bcb6d60c7c10445c9dbcfa6a0c8f4df75de3 | 84b1377730739483e5cc32f84942f171c0eeca05 | /client-rest/src/main/java/com/nordnet/topaze/client/rest/business/livraison/ContratBP.java | 1bd6d1e8b56cb564670b3b789b2a61988caa21fb | [] | no_license | oussama-denden/tp | f9dfe0ceb7f88feddd28b474f51cc17c8ccb4fdd | c1917ac3f54e47af24399febc59b4b44a046927f | refs/heads/master | 2020-03-27T21:09:34.136657 | 2015-04-10T14:49:52 | 2015-04-10T14:49:52 | 147,119,498 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,712 | java | package com.nordnet.topaze.client.rest.business.livraison;
import java.util.List;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.nordnet.topaze.client.rest.enums.TypeContrat;
import com.nordnet.topaze.client.rest.enums.TypeProduit;
/**
* Les information de BP.
*
* @author Denden-OUSSAMA
*
*/
public class ContratBP {
/**
* reference du contrat.
*/
private String referenceContrat;
/**
* reference du produit.
*/
private String referenceProduit;
/**
* nom court de produit destination par exemple: Satellite.Jet.
*/
private String referenceGammeDestination;
/**
* nom court de produit source par exemple: Satellite.Jet.
*/
private String referenceGammeSource;
/**
* le numero de EC.
*/
private Integer numEC;
/**
* adresse de livraison.
*/
private String idAdrLivraison;
/**
* id du client.
*/
private String idClient;
/**
* {@link TypeContrat}.
*/
private TypeContrat typeContrat;
/**
* {@link TypeProduit}.
*/
private TypeProduit typeProduit;
/**
* sous BP.
*/
private List<ContratBP> sousContratsBP;
/**
* le parent de {@link ContratBP}.
*/
private ContratBP contratBPParent;
/**
* constructeur par defaut.
*/
public ContratBP() {
}
/**
* @return {@link #referenceContrat}.
*/
public String getReferenceContrat() {
return referenceContrat;
}
/**
* @param referenceContrat
* {@link #referenceContrat}.
*/
public void setReferenceContrat(String referenceContrat) {
this.referenceContrat = referenceContrat;
}
/**
* @return {@link #referenceProduit}.
*/
public String getReferenceProduit() {
return referenceProduit;
}
/**
* @param referenceProduit
* {@link #referenceProduit}.
*/
public void setReferenceProduit(String referenceProduit) {
this.referenceProduit = referenceProduit;
}
/**
* Gets the reference gamme destination.
*
* @return the reference gamme destination
*/
public String getReferenceGammeDestination() {
return referenceGammeDestination;
}
/**
* Sets the reference gamme destination.
*
* @param referenceGammeDestination
* the new reference gamme destination
*/
public void setReferenceGammeDestination(String referenceGammeDestination) {
this.referenceGammeDestination = referenceGammeDestination;
}
/**
* Gets the reference gamme source.
*
* @return the reference gamme source
*/
public String getReferenceGammeSource() {
return referenceGammeSource;
}
/**
* Sets the reference gamme source.
*
* @param referenceGammeSource
* the new reference gamme source
*/
public void setReferenceGammeSource(String referenceGammeSource) {
this.referenceGammeSource = referenceGammeSource;
}
/**
* @return {@link #numEC}.
*/
public Integer getNumEC() {
return numEC;
}
/**
* @param numEC
* {@link #numEC}.
*/
public void setNumEC(Integer numEC) {
this.numEC = numEC;
}
/**
* @return {@link #idAdrLivraison}.
*/
public String getIdAdrLivraison() {
return idAdrLivraison;
}
/**
* @param idAdrLivraison
* {@link #idAdrLivraison}.
*/
public void setIdAdrLivraison(String idAdrLivraison) {
this.idAdrLivraison = idAdrLivraison;
}
/**
* @return {@link #idClient}.
*/
public String getIdClient() {
return idClient;
}
/**
* @param idClient
* {@link #idClient}.
*/
public void setIdClient(String idClient) {
this.idClient = idClient;
}
/**
* @return {@link TypeContrat}.
*/
public TypeContrat getTypeContrat() {
return typeContrat;
}
/**
* @param typeContrat
* {@link TypeContrat}.
*/
public void setTypeContrat(TypeContrat typeContrat) {
this.typeContrat = typeContrat;
}
/**
* Gets the type produit.
*
* @return the type produit
*/
public TypeProduit getTypeProduit() {
return typeProduit;
}
/**
* Sets the type produit.
*
* @param typeProduit
* the new type produit
*/
public void setTypeProduit(TypeProduit typeProduit) {
this.typeProduit = typeProduit;
}
/**
* @return {@link #sousContratsBP}.
*/
public List<ContratBP> getSousContratsBP() {
return sousContratsBP;
}
/**
* @param sousContratsBP
* {@link #sousContratsBP}.
*/
public void setSousContratsBP(List<ContratBP> sousContratsBP) {
this.sousContratsBP = sousContratsBP;
}
/**
* @return {@link #contratBPParent}.
*/
public ContratBP getContratBPParent() {
return contratBPParent;
}
/**
* @param contratBPParent
* {@link #contratBPParent}.
*/
public void setContratBPParent(ContratBP contratBPParent) {
this.contratBPParent = contratBPParent;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof ContratBP)) {
return false;
}
ContratBP rhs = (ContratBP) obj;
return new EqualsBuilder().append(referenceContrat, rhs.referenceContrat)
.append(referenceProduit, rhs.referenceProduit).append(idClient, rhs.idClient).append(numEC, rhs.numEC)
.append(idAdrLivraison, rhs.idAdrLivraison).append(typeContrat, rhs.typeContrat)
.append(typeProduit, rhs.typeProduit).isEquals();
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return new HashCodeBuilder(43, 11).append(referenceContrat).append(referenceProduit).append(idClient)
.append(numEC).append(idAdrLivraison).append(typeContrat).append(typeProduit).toHashCode();
}
} | [
"jldansou@14disi-jldansou.nordnet.net"
] | jldansou@14disi-jldansou.nordnet.net |
285d15f67adc48ccd782651734798faa63106280 | f98ca2fdbaf3374a5955eb82dfe782ac655b0f73 | /simple-security-config/src/main/java/com/wis/security/handler/DefaultLoginErrorHandler.java | 6ddaf60c8aa43e45a7c2964dfab73422c365506e | [
"Apache-2.0"
] | permissive | liubo777/spring-boot-wis | 11c076d0cd46f877500eefc7662aa245782e5062 | 50bf6a38d505f0abf8f7cf4eda92079a51b942bb | refs/heads/master | 2022-06-24T01:14:36.262201 | 2020-02-22T15:25:55 | 2020-02-22T15:25:55 | 222,838,743 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 991 | java | package com.wis.security.handler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Created by liuBo
* 2019/12/16.
*/
@Slf4j
public class DefaultLoginErrorHandler extends LoginErrorHandler {
public void onAuthenticationFailure(HttpServletRequest request,
HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
if ("Captcha does not match.".equals(exception.getMessage())){
request.setAttribute("error","code");
}else{
request.setAttribute("error","info");
}
request.getRequestDispatcher(defaultFailureUrl)
.forward(request, response);
}
}
| [
"535797316@qq.com"
] | 535797316@qq.com |
0011176815210159b13dce9b672677d1405e9ed4 | 196b790f98348848ba879db9a361f6ef2799e8fe | /Minimum_falling_path_sum.java | d14d7c38065a11d04b78da52a7906e5d5d5c9f9f | [] | no_license | KBangera/DP-3 | f81cbcc604d20e1f5cd2f449b04ec787995d88a2 | ddbdaec28835ebffbee981c70c7d5e73545b8d56 | refs/heads/master | 2022-04-13T09:59:31.781654 | 2020-03-28T00:27:58 | 2020-03-28T00:27:58 | 250,399,223 | 0 | 0 | null | 2020-03-26T23:57:35 | 2020-03-26T23:57:34 | null | UTF-8 | Java | false | false | 1,685 | java | // Time Complexity :O(n^2) since it's a square array
// Space Complexity :O(n^2)
// Did this code successfully run on Leetcode :Yes
// Any problem you faced while coding this :No, it was similar to the paint houses problem
// Your code here along with comments explaining your approach
class Solution {
public int minFallingPathSum(int[][] A) {
if(A.length == 0){
return 0;
}
//Since, it's a square array - I didn't need two variables to store lengths
int n = A.length;
int m = A[0].length;
//edge case
if(n==1){
return A[0][0];
}
int min = 9999;
int[][] dp = new int[n][m];
for(int i = 0; i < m; i++){
dp[0][i] = A[0][i];
}
for(int i = 1; i < n; i++){
for(int j = 0; j < m; j++){
//if it's not the edge elements of the the row
if(j!=0 && j!=m-1){
dp[i][j] = A[i][j] + Math.min(Math.min(dp[i-1][j-1],dp[i-1][j]), dp[i-1][j+1]);
}
//if it's the start of the row
else if(j==0){
dp[i][j] = A[i][j] + Math.min(dp[i-1][j],dp[i-1][j+1]);
}
//if it's the end of the row
else if(j==m-1){
dp[i][j] = A[i][j] + Math.min(dp[i-1][j],dp[i-1][j-1]);
}
//Get the minimum from the last row
if(i==n-1){
min = Math.min(min,dp[i][j]);
}
}
}
return min;
}
}
| [
"adikar08@gmail.com"
] | adikar08@gmail.com |
85275cd0a6d311a6108c0776291414e6681b5838 | b5cc497b581f0775dedde5ebd5ed2a7c82d17c5b | /src/main/java/com/cctv/peoplay/goods/model/service/GoodsServiceImpl.java | bb5e0d13cf4e7e151a3bdae843485d49094b8493 | [] | no_license | clzlckzkch1509/peoPlay | dd131b482adbf5f560b0c06d9f37287ecae2ce8f | 6d2131bb1167d502d7375428aa5f19fdaaf12bf1 | refs/heads/master | 2023-06-07T01:07:19.592413 | 2021-07-06T02:31:37 | 2021-07-06T02:31:37 | 373,686,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,729 | java | package com.cctv.peoplay.goods.model.service;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cctv.peoplay.goods.model.dao.GoodsMapper;
import com.cctv.peoplay.goods.model.dto.DeliveryDTO;
import com.cctv.peoplay.goods.model.dto.GoodsAndDetailFileDTO;
import com.cctv.peoplay.goods.model.dto.GoodsAndFileDTO;
import com.cctv.peoplay.goods.model.dto.GoodsCartDTO;
import com.cctv.peoplay.goods.model.dto.GoodsDTO;
import com.cctv.peoplay.goods.model.dto.GoodsDetailFileDTO;
import com.cctv.peoplay.goods.model.dto.GoodsInqueryDTO;
import com.cctv.peoplay.goods.model.dto.GoodsInquiryReplyDTO;
import com.cctv.peoplay.goods.model.dto.GoodsLikeDTO;
import com.cctv.peoplay.goods.model.dto.GoodsReviewDTO;
import com.cctv.peoplay.goods.model.dto.OrderDTO;
import com.cctv.peoplay.goods.model.dto.PaymentDTO;
import com.cctv.peoplay.goods.paging.PagenationDTO;
@Service("selectAllGoods")
public class GoodsServiceImpl implements GoodsService {
private GoodsMapper goodsMapper;
@Autowired
public GoodsServiceImpl(GoodsMapper goodsMapper) {
this.goodsMapper = goodsMapper;
}
/* 모든 굿즈 조회해오기 */
@Override
public List<GoodsDTO> selectAllGoods(PagenationDTO pageInfo) {
return goodsMapper.selectAllGoods(pageInfo);
}
/* 인기 굿즈 조회해오기 */
@Override
public List<GoodsDTO> selectPopularGoods(int num) {
return goodsMapper.selectPopularGoods(num);
}
/* 선택한 굿즈(일반 굿즈) 조회해오기 */
@Override
public GoodsDTO selectOneGoodsInfo(int goodsNo) {
return goodsMapper.selectOneGoodsInfo(goodsNo);
}
/* 선택한 굿즈(일반 굿즈) 사진 첨부파일 불러오기 */
@Override
public GoodsAndFileDTO goodsAndFile(int goodsNo) {
return goodsMapper.goodsAndFile(goodsNo);
}
/* 장바구니 담기 (ajax 처리) */
@Override
public int insertcart(HashMap<String, Integer> cart) {
return goodsMapper.insertcart(cart);
}
/* 장바구니 내역 조회 */
@Override
public List<GoodsCartDTO> cartList(HashMap<String, Integer> cartListMap) {
return goodsMapper.cartList(cartListMap);
}
@Override
public List<GoodsReviewDTO> seletReivewByGoodsNo(int goodsNo) {
return goodsMapper.seletReivewByGoodsNo(goodsNo);
}
@Override
public int insertReply(HashMap<String, Object> reply) {
return goodsMapper.insertReply(reply);
}
@Override
public int deleteReply(int goodsReviewNum) {
return goodsMapper.deleteReply(goodsReviewNum);
}
@Override
public GoodsAndDetailFileDTO selectGoodsDetailFiles(int goodsNo) {
return goodsMapper.selectGoodsDetailFiles(goodsNo);
}
@Override
public int insertOrder(HashMap<String, Integer> order) {
return goodsMapper.insertOrder(order);
}
@Override
public GoodsCartDTO selectOrderList(HashMap<String, Integer> order) {
return goodsMapper.selectOrderList(order);
}
@Override
public OrderDTO selectOrderNum(HashMap<String, Integer> order) {
return goodsMapper.selectOrderNum(order);
}
@Override
public OrderDTO orderInfo(int orderNo) {
return goodsMapper.orderInfo(orderNo);
}
@Override
public GoodsLikeDTO selectGoodsLikeList(HashMap<String, Integer> order) {
return goodsMapper.selectGoodsLikeList(order);
}
@Override
public int goodsLikeCountByGoodsNo(int goodsNo) {
return goodsMapper.goodsLikeCountByGoodsNo(goodsNo);
}
@Override
public int insertLike(HashMap<String, Integer> like) {
return goodsMapper.insertLike(like);
}
@Override
public int replyUpdate(HashMap<String, Object> updateReply) {
return goodsMapper.replyUpdate(updateReply);
}
@Override
public int dislikeList(HashMap<String, Integer> dislike) {
return goodsMapper.dislikeList(dislike);
}
@Override
public int countTotalGoods(int num) {
return goodsMapper.countTotalGoods(num);
}
@Override
public int searchCount(HashMap<String, String> searchMap) {
return goodsMapper.searchCount(searchMap);
}
@Override
public List<GoodsDTO> searchlist(HashMap<String, Object> searchListMap) {
return goodsMapper.searchlist(searchListMap);
}
@Override
public List<GoodsDTO> selectdcAllGoods(PagenationDTO pageInfo) {
return goodsMapper.selectdcAllGoods(pageInfo);
}
@Override
public List<GoodsDTO> selectghibriAllGoods(PagenationDTO pageInfo) {
return goodsMapper.selectghibriAllGoods(pageInfo);
}
@Override
public List<GoodsDTO> selectPixarAllGoods(PagenationDTO pageInfo) {
return goodsMapper.selectPixarAllGoods(pageInfo);
}
@Override
public List<GoodsDTO> selectWbAllGoods(PagenationDTO pageInfo) {
return goodsMapper.selectWbAllGoods(pageInfo);
}
@Override
public List<GoodsInqueryDTO> selectInquiryByGoodsNo(int goodsNo) {
return goodsMapper.selectInquiryByGoodsNo(goodsNo);
}
@Override
public int updatePayment(HashMap<String, Object> payment) {
return goodsMapper.updatePayment(payment);
}
@Override
public int updatePaidGoods(int orderNo) {
return goodsMapper.updatePaidGoods(orderNo);
}
@Override
public PaymentDTO paymentNo(int orderNo) {
return goodsMapper.paymentNo(orderNo);
}
@Override
public List<PaymentDTO> selectPayment(int paymentNo) {
return goodsMapper.selectPayment(paymentNo);
}
@Override
public int updatedelivery(HashMap<String, Object> delivery) {
return goodsMapper.updatedelivery(delivery);
}
@Override
public DeliveryDTO deliveryInfo(HashMap<String, Object> delivery) {
return goodsMapper.deliveryInfo(delivery);
}
@Override
public DeliveryDTO selectDeliveryInfo(int deliveryNum) {
return goodsMapper.selectDeliveryInfo(deliveryNum);
}
@Override
public int reportReply(HashMap<String, Object> reportReply) {
return goodsMapper.reportReply(reportReply);
}
@Override
public OrderDTO doubleCheckOrder(HashMap<String, Integer> order) {
return goodsMapper.doubleCheckOrder(order);
}
@Override
public int cancelOrder(int orderNum) {
return goodsMapper.cancelOrder(orderNum);
}
@Override
public int insertRecalculate(HashMap<String, Object> recalculate) {
return goodsMapper.insertRecalculate(recalculate);
}
@Override
public int deleteWishlist(HashMap<String, Integer> deletewish) {
return goodsMapper.deleteWishlist(deletewish);
}
@Override
public int inquiryUpdate(HashMap<String, Object> updateInquiry) {
return goodsMapper.inquiryUpdate(updateInquiry);
}
@Override
public int insertInquiry(HashMap<String, Object> inquiry) {
return goodsMapper.insertInquiry(inquiry);
}
@Override
public int deleteInquiry(int goodsInquiryNum) {
return goodsMapper.deleteInquiry(goodsInquiryNum);
}
@Override
public List<GoodsInquiryReplyDTO> selectInquiryReply(int goodsInquiryNo) {
return goodsMapper.selectInquiryReply(goodsInquiryNo);
}
@Override
public List<OrderDTO> paymentCheck(HashMap<String, Integer> order) {
return goodsMapper.paymentCheck(order);
}
@Override
public List<PaymentDTO> paymentList(int orderNo) {
return goodsMapper.paymentList(orderNo);
}
@Override
public int updateGoodsLikeCount(int goodsNo) {
return goodsMapper.updateGoodsLikeCount(goodsNo);
}
@Override
public int updateGoodsdisLikeCount(int goodsNum) {
return goodsMapper.updateGoodsdisLikeCount(goodsNum);
}
@Override
public List<GoodsAndFileDTO> selectPopular(int i) {
return goodsMapper.selectPopular(i);
}
@Override
public int insertOutGoods(HashMap<String, Object> payment) {
return goodsMapper.insertOutGoods(payment);
}
@Override
public int updateGoodsStock(HashMap<String, Object> payment) {
return goodsMapper.updateGoodsStock(payment);
}
@Override
public int deleteWishList(HashMap<String, Object> payment) {
return goodsMapper.deleteWishList(payment);
}
}
| [
"dongr52@naver.com"
] | dongr52@naver.com |
8c6d887da7dffdb8c8674ee831bf877ef829d786 | 1e13be569f7f150e79fc42afc1773d715e4b21a9 | /app/src/main/java/com/example/android/navigationbarapp/Birthstone.java | 175c5edbf050869b72a15129a20baeb97df2192e | [] | no_license | Wallaceness/NavbarApp | 0344a4a4dfee247fc4e08f9aee1120894ff2d0ae | 16a178eaeba4fc291b692fe7bb1e5bbcabf007d5 | refs/heads/master | 2020-12-27T08:28:34.644266 | 2020-02-04T03:14:04 | 2020-02-04T03:14:04 | 237,832,745 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package com.example.android.navigationbarapp;
public class Birthstone {
public int imgSrc;
public String stoneName;
public String description;
public Birthstone(int imgSrc, String stoneName, String description){
this.imgSrc=imgSrc;
this.stoneName=stoneName;
this.description=description;
}
}
| [
"ncw232@gmail.com"
] | ncw232@gmail.com |
5c82cd2cf8577a854fb2c9aef5f900780050961b | 0a58d450d4f18395e9bd9ce188a5c62b058c3638 | /gen/android/support/v7/recyclerview/R.java | 78c4d3d06ecc6226c4f97d8998028f209a5a0ae9 | [] | no_license | Zhams/zhproj | a06fc824ede909667ad961a6deff8e960e306b21 | b96a16eee92470df89705ab650ebee0c40649c1e | refs/heads/master | 2021-01-01T05:19:14.815660 | 2016-05-08T01:20:35 | 2016-05-08T01:20:35 | 58,291,050 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,170 | 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 android.support.v7.recyclerview;
public final class R {
public static final class attr {
public static final int layoutManager = 0x7f010032;
public static final int reverseLayout = 0x7f010034;
public static final int spanCount = 0x7f010033;
public static final int stackFromEnd = 0x7f010035;
}
public static final class dimen {
public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f0b0003;
}
public static final class id {
public static final int item_touch_helper_previous_elevation = 0x7f080001;
}
public static final class styleable {
public static final int[] RecyclerView = { 0x010100c4, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035 };
public static final int RecyclerView_android_orientation = 0;
public static final int RecyclerView_layoutManager = 1;
public static final int RecyclerView_reverseLayout = 3;
public static final int RecyclerView_spanCount = 2;
public static final int RecyclerView_stackFromEnd = 4;
}
}
| [
"sam@fira.co"
] | sam@fira.co |
7a338cd12878599b44713541ccd3e966b0ccdc8c | 123b464c914722e22ae75ed7d9a1e903535fa4fe | /data-spring-jpa/src/main/java/io/micronaut/data/spring/jpa/intercept/FindOneSpecificationInterceptor.java | 7bbce9214fc059414dd8e44f9da1dfed38580ba4 | [
"Apache-2.0"
] | permissive | tobiasschaefer/micronaut-data | c818687f635b57776d90e74d730d6d93d3bcdd14 | e26bbf8dfe007dbd3b2dcaa3f236ec0c890e4939 | refs/heads/master | 2022-12-22T05:42:57.276575 | 2020-09-24T15:38:10 | 2020-09-24T15:38:10 | 298,580,328 | 0 | 0 | Apache-2.0 | 2020-09-25T13:27:21 | 2020-09-25T13:27:20 | null | UTF-8 | Java | false | false | 4,224 | java | /*
* Copyright 2017-2020 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micronaut.data.spring.jpa.intercept;
import edu.umd.cs.findbugs.annotations.NonNull;
import io.micronaut.aop.MethodInvocationContext;
import io.micronaut.core.annotation.Internal;
import io.micronaut.core.convert.ConversionService;
import io.micronaut.core.type.ReturnType;
import io.micronaut.data.intercept.RepositoryMethodKey;
import io.micronaut.data.jpa.operations.JpaRepositoryOperations;
import io.micronaut.data.operations.RepositoryOperations;
import io.micronaut.data.runtime.intercept.AbstractQueryInterceptor;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.data.jpa.domain.Specification;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
/**
* Implementation of {@code findOne(Specification)} for Spring Data JPA specifications.
*
* @author graemerocher
* @since 1.0
*/
@Internal
public class FindOneSpecificationInterceptor extends AbstractQueryInterceptor<Object, Object> {
private final JpaRepositoryOperations jpaOperations;
/**
* Default constructor.
*
* @param operations The operations
*/
protected FindOneSpecificationInterceptor(@NonNull RepositoryOperations operations) {
super(operations);
if (operations instanceof JpaRepositoryOperations) {
this.jpaOperations = (JpaRepositoryOperations) operations;
} else {
throw new IllegalStateException("Repository operations must be na instance of JpaRepositoryOperations");
}
}
@Override
public Object intercept(RepositoryMethodKey methodKey, MethodInvocationContext<Object, Object> context) {
final Object parameterValue = context.getParameterValues()[0];
if (parameterValue instanceof Specification) {
Specification specification = (Specification) parameterValue;
final EntityManager entityManager = jpaOperations.getCurrentEntityManager();
final CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
final CriteriaQuery<Object> query = criteriaBuilder.createQuery((Class<Object>) getRequiredRootEntity(context));
final Root<Object> root = query.from((Class<Object>) getRequiredRootEntity(context));
final Predicate predicate = specification.toPredicate(root, query, criteriaBuilder);
query.where(predicate);
query.select(root);
final TypedQuery<?> typedQuery = entityManager.createQuery(query);
try {
final Object result = typedQuery.getSingleResult();
final ReturnType<?> rt = context.getReturnType();
final Class<?> returnType = rt.getType();
if (returnType.isInstance(result)) {
return result;
} else {
return ConversionService.SHARED.convertRequired(
result,
rt.asArgument()
);
}
} catch (NoResultException e) {
if (context.isNullable()) {
return null;
} else {
throw new EmptyResultDataAccessException(1);
}
}
} else {
throw new IllegalArgumentException("Argument must be an instance of: " + Specification.class);
}
}
}
| [
"graeme.rocher@gmail.com"
] | graeme.rocher@gmail.com |
db3b84d445eade0a7747cd3ac9fe77f87cc91591 | cc188b90f80fa86ffb666b1e9bbf8198b8f69444 | /LandSoft/src/model/Owners.java | 039841400d63a3f66e4d469fdcc965586b39c508 | [] | no_license | tompetrel/LandSoft | 83bfda759e1a8fdc843eb0c856fe297ba5532a2f | f0a77b51f3da0deffb5202b99efac6a7a3707d2b | refs/heads/master | 2022-11-14T03:12:02.099766 | 2020-07-05T17:00:08 | 2020-07-05T17:00:08 | 273,038,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,066 | 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 model;
/**
*
* @author TAI
*/
public class Owners {
private int OwnerID;
private String firstName, lastName;
private boolean gender;
private String birthDay, email, phoneNumber, address;
public Owners() {
}
public Owners(int OwnerID, String firstName, String lastName, boolean gender, String birthDay, String email, String phoneNumber, String address) {
this.OwnerID = OwnerID;
this.firstName = firstName;
this.lastName = lastName;
this.gender = gender;
this.birthDay = birthDay;
this.email = email;
this.phoneNumber = phoneNumber;
this.address = address;
}
public int getOwnerID() {
return OwnerID;
}
public void setOwnerID(int OwnerID) {
this.OwnerID = OwnerID;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public boolean isGender() {
return gender;
}
public void setGender(boolean gender) {
this.gender = gender;
}
public String getBirthDay() {
return birthDay;
}
public void setBirthDay(String birthDay) {
this.birthDay = birthDay;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
| [
"huutaimarvel@gmail.com"
] | huutaimarvel@gmail.com |
d692dc2ec4b34db6dbada78c52101406d2c622bb | 373c2f47acc611b7a15903bd07f2b8fac9076044 | /app/src/main/java/com/asazing/loginui/ui/dashboard/DashboardViewModel.java | 6e7aa8a29e4fe9c4074ec0f55ec7d92d7f2474d2 | [] | no_license | Jxkx17/login_Android_php_Mysql_Modern | fef556cd00c7d324a1fbcdabdc4b38e621c43533 | a77cabbabca53e9086860c209d56dbd0f2ce07ca | refs/heads/main | 2023-03-05T13:53:33.505656 | 2021-02-07T16:37:03 | 2021-02-07T16:37:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package com.asazing.loginui.ui.dashboard;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import androidx.lifecycle.ViewModel;
import static androidx.core.content.ContextCompat.getSystemService;
public class DashboardViewModel extends ViewModel{
public DashboardViewModel() {
}
} | [
"malcolmedina206@gmail.com"
] | malcolmedina206@gmail.com |
fb9cb38f10cda8f23164c43672c60de29967924c | f2b9c9bc8c0423d8121634361d53b920d1418149 | /src/main/java/lk/css/garmentManagement/asset/employee/entity/Employee.java | 952ebe932090f4db011f3ebe5720e93206bbcf90 | [] | no_license | prasad5793/garmentManagement | 833e766f35825868367e128357c9bf8bebc7d1ae | 48051a4f80b8cb7bb5c066d7264f7729f91392dd | refs/heads/master | 2022-03-17T10:46:06.214928 | 2019-09-18T14:48:49 | 2019-09-18T14:48:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,338 | java | package lk.css.garmentManagement.asset.employee.entity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lk.css.garmentManagement.asset.employee.entity.Enum.*;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
@Entity
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@JsonIgnoreProperties(value = {"createdAt", "updatedAt"},allowGetters = true)
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(unique = true)
private Long id;
@NotNull(message = "Number is required")
private String number;
@Enumerated(EnumType.STRING)
private Title title;
@Size(min = 5, message = "Your name cannot be accept")
private String name;
@Size(min = 5, message = "At least 5 characters should be include calling name")
private String callingName;
@Enumerated(EnumType.STRING)
private Gender gender;
@Enumerated(EnumType.STRING)
private BloodGroup bloodGroup;
@Size(max = 12, min = 10, message = "NIC number is contained numbers between 9 and X/V or 12 ")
private String nic;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate dateOfBirth;
@Enumerated(EnumType.STRING)
private CivilStatus civilStatus;
//@Pattern(regexp = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$",message = "Please provide valid email")
@Email
private String email;
@Size(min = 9, message = "Can not accept this mobile number")
private String mobile;
private String land;
@Size(min = 5, message = "Should be need to provide valid address !!")
private String address;
@Enumerated(EnumType.STRING)
private Designation designation;
@Enumerated(EnumType.STRING)
private EmployeeStatus employeeStatus;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate dateOfAssignment;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate createdAt;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate updatedAt;
}
| [
"asakahatapitiya@gmail.com"
] | asakahatapitiya@gmail.com |
613a896e65387486fae38731f882cac3f86ef4ca | 5c727bb64fae2aa64b5172f0ae5d9e65476cfe3e | /tests/src/test/java/org/enodeframework/test/command/TwoAsyncHandlersCommand.java | e3a41b85665d2e0c7e2af4d11567eac8d78d4491 | [
"MIT"
] | permissive | yangziwen/enode | 0d1078eeef4b8bb734d40a6f5d2d1447db979b76 | 3a61f9ab29862c4aaf7e4f8140175b89473ec78e | refs/heads/master | 2023-08-30T00:58:57.055440 | 2021-11-16T17:09:27 | 2021-11-17T02:26:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 146 | java | package org.enodeframework.test.command;
import org.enodeframework.commanding.Command;
public class TwoAsyncHandlersCommand extends Command {
}
| [
"anruence@gmail.com"
] | anruence@gmail.com |
3c96c33d9ec8b50e734e0a5ed3e7e2e6a8aa8ab1 | b45673f501ca7c891c8109a714cdf01cde455430 | /AOOP_lab04_FactoryMethod_SingletonPattern/src/TextFieldWindow.java | bbff88997085092e1c7fdf98016d51bb845d16f6 | [] | no_license | kmdngmn/DesignPattern | 1e9afed125d412727b2a85470fcd7e5b2380ffda | 03bcf957eb10022d6c525d80eb1d0e2bebb5c660 | refs/heads/master | 2020-11-25T20:09:59.117899 | 2019-12-23T02:24:50 | 2019-12-23T02:24:50 | 228,822,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 682 | java | import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class TextFieldWindow extends Product {
private JTextField textField;
public TextFieldWindow(String title, int x, int y, int width, int height) {
super(title, x, y, width, height);
}
@Override
public void updateText(String msg) {
textField.setText(msg);
textField.validate();
}
@Override
public JPanel createPanel(int width, int height) {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
textField = new JTextField();
panel.add(textField);
panel.setPreferredSize(new Dimension(width, height));
return panel;
}
}
| [
"enfkdla@gmail.com"
] | enfkdla@gmail.com |
c291833d07b2b400253ef2e965838afb6346c3e3 | 78366ddb9989d4c11140e85bed33006a4a914edf | /kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-model/src/main/java/org/kie/pmml/models/regression/model/enums/REGRESSION_NORMALIZATION_METHOD.java | b9fa888ae86a5a7a78447fd8549c800225b500bf | [
"Apache-2.0"
] | permissive | TommyNeubert/drools | 109b9814eb9d32d7a3faa4ea13260c195d030432 | 278f538c8fe95e2ec0f232977eab7a387a64c9aa | refs/heads/master | 2022-12-30T07:23:54.732499 | 2020-10-13T14:36:54 | 2020-10-13T14:36:54 | 296,284,061 | 0 | 0 | Apache-2.0 | 2020-09-17T09:44:21 | 2020-09-17T09:44:20 | null | UTF-8 | Java | false | false | 1,621 | java | /*
* Copyright 2020 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.kie.pmml.models.regression.model.enums;
import java.util.Arrays;
import org.kie.pmml.commons.exceptions.KieEnumException;
/**
* @see <a href=http://dmg.org/pmml/v4-4/Regression.html#xsdType_REGRESSIONNORMALIZATIONMETHOD>REGRESSIONNORMALIZATIONMETHOD</a>
*/
public enum REGRESSION_NORMALIZATION_METHOD {
NONE("none"),
SIMPLEMAX("simplemax"),
SOFTMAX("softmax"),
LOGIT("logit"),
PROBIT("probit"),
CLOGLOG("cloglog"),
EXP("exp"),
LOGLOG("loglog"),
CAUCHIT("cauchit");
private String name;
REGRESSION_NORMALIZATION_METHOD(String name) {
this.name = name;
}
public static REGRESSION_NORMALIZATION_METHOD byName(String name) {
return Arrays.stream(REGRESSION_NORMALIZATION_METHOD.values()).filter(value -> name.equals(value.name)).findFirst().orElseThrow(() -> new KieEnumException("Failed to find REGRESSION_NORMALIZATION_METHOD with name: " + name));
}
public String getName() {
return name;
}
}
| [
"noreply@github.com"
] | TommyNeubert.noreply@github.com |
59d91f20ee9c8146d66a7d296d2cf60fc22f992b | 554a8515c2164114ef5ac42c295cae3485a70a28 | /src/main/java/com/niulbird/domain/monitor/BaseMonitor.java | ec01e9415a770275aad4177112e645c8d0f91329 | [] | no_license | marc45/domain-monitor | c29885e4b65329c0682ccb39e889b892e61b25ae | 93c4f37007aebc3f1d7cca9bafe8e16b74a96980 | refs/heads/master | 2020-07-12T21:21:21.491016 | 2017-03-20T14:50:43 | 2017-03-20T14:50:43 | 204,908,713 | 1 | 0 | null | 2019-08-28T18:44:37 | 2019-08-28T10:44:36 | null | UTF-8 | Java | false | false | 7,067 | java | package com.niulbird.domain.monitor;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.SocketAddress;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.naming.InvalidNameException;
import javax.naming.ldap.LdapName;
import javax.naming.ldap.Rdn;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.joda.time.DateTime;
import org.joda.time.Days;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.ui.freemarker.FreeMarkerTemplateUtils;
import com.niulbird.domain.Certificate;
import com.niulbird.domain.Domain;
import com.niulbird.domain.monitor.certificate.CertificateMonitor;
import com.niulbird.domain.monitor.util.MailUtil;
import com.niulbird.domain.monitor.whois.WhoisMonitor;
import com.niulbird.domain.monitor.whois.WhoisMonitorFactory;
import freemarker.template.TemplateException;
public abstract class BaseMonitor {
protected final Log logger = LogFactory.getLog(getClass());
@Autowired
private Properties props;
@Autowired
private JavaMailSenderImpl mailSender;
@Autowired
private freemarker.template.Configuration freeMarkerConfiguration;
protected void execute(boolean summaryReport) {
WhoisMonitor whoisMonitor = null;
MailUtil mailUtil = new MailUtil();
Proxy proxy = getProxy();
for (int i = 0; i < Integer.parseInt(props.getProperty("list.no")); i++) {
List<Domain> domains = getDomains(i, mailUtil, whoisMonitor, proxy);
List<Certificate> certificates = getCertificates(i, mailUtil);
Collections.sort(certificates);
Collections.sort(domains);
if (summaryReport) {
String body = "";
try {
Map<String, Object> map = new HashMap<String, Object>();
map.put( "domains", domains);
map.put("certificates", certificates);
body = FreeMarkerTemplateUtils.processTemplateIntoString(freeMarkerConfiguration.getTemplate("summary.ftl"), map);
} catch (IOException | TemplateException e) {
logger.error("Error creating template: " + e.getMessage(), e);
}
mailUtil.sendMail(mailSender, props.getProperty(i + ".list.email").split("\\s*,\\s*"), body, props);
}
}
}
private Proxy getProxy() {
Proxy proxy = null;
if (props.getProperty("conn.proxy").equalsIgnoreCase("true")) {
SocketAddress addr = new InetSocketAddress(props.getProperty("conn.proxy.host"),
Integer.parseInt(props.getProperty("conn.proxy.port")));
if (props.getProperty("conn.proxy.type").equalsIgnoreCase("socks")) {
proxy = new Proxy(Proxy.Type.SOCKS, addr);
System.setProperty("socksProxyHost", props.getProperty("conn.proxy.host"));
System.setProperty("socksProxyPort", props.getProperty("conn.proxy.port"));
} else if (props.getProperty("conn.proxy.type").equalsIgnoreCase("http")) {
proxy = new Proxy(Proxy.Type.HTTP, addr);
System.setProperty("https.proxyPort", props.getProperty("conn.proxy.host"));
System.setProperty("https.proxyPort", props.getProperty("conn.proxy.port"));
}
}
return proxy;
}
private List<Domain> getDomains(int iteration, MailUtil mailUtil, WhoisMonitor whoisMonitor, Proxy proxy) {
Domain domain = null;
List<String> domainNames = Arrays.asList(props.getProperty(iteration + ".list.domain").split("\\s*,\\s*"));
List<Domain> domains = new ArrayList<Domain>();
for (String domainName : domainNames) {
whoisMonitor = WhoisMonitorFactory.getWhoisMonitor(domainName, props);
try {
whoisMonitor.init(proxy, domainName);
domain = whoisMonitor.query(domainName);
logger.info("Domain Info: Name=" + domain.getName() + "|Registrar=" + domain.getRegistrar()
+ "|Create=" + domain.getCreateDate() + "|Update=" + domain.getUpdateDate() + "|Expiry="
+ domain.getExpiryDate());
if (ArrayUtils.contains(props.getProperty("alert.period").split("\\s*,\\s*"), Integer.toString(domain.getExpiryDays()))) {
String body = "";
try {
Map<String, Object> map = new HashMap<String, Object>();
map.put( "domain", domain);
body = FreeMarkerTemplateUtils.processTemplateIntoString(freeMarkerConfiguration.getTemplate("domain-expiry-alert.ftl"), map);
} catch (IOException | TemplateException e) {
logger.error("Error creating template: " + e.getMessage(), e);
}
mailUtil.sendMail(mailSender, props.getProperty(iteration + ".list.email").split("\\s*,\\s*"), body, props);
}
whoisMonitor.disconnect();
} catch (IOException ioe) {
logger.error("Error on initialization: " + ioe.getMessage(), ioe);
}
if (domain != null && domain.getRegistrar() != null) {
domains.add(domain);
}
}
return domains;
}
private List<Certificate> getCertificates(int iteration, MailUtil mailUtil) {
List<Certificate> certificates = new ArrayList<Certificate>();
List<String> certificateHostNames = Arrays.asList(props.getProperty(iteration + ".list.cert").split("\\s*,\\s*"));
for (String certificateHostName : certificateHostNames) {
CertificateMonitor certificateMonitor = new CertificateMonitor();
X509Certificate x509Certificate = certificateMonitor.query(certificateHostName);
int expiryDays = Days.daysBetween(new DateTime(Calendar.getInstance().getTime()), new DateTime(x509Certificate.getNotAfter())).getDays();
Certificate certificate = new Certificate(certificateHostName,
getCNFromDN(x509Certificate.getSubjectDN().toString()),
getCNFromDN(x509Certificate.getIssuerDN().toString()),
x509Certificate.getNotBefore(),
x509Certificate.getNotAfter(),
expiryDays);
certificates.add(certificate);
if (ArrayUtils.contains(props.getProperty("alert.period").split("\\s*,\\s*"), Integer.toString(certificate.getExpiryDays()))) {
String body = "";
try {
Map<String, Object> map = new HashMap<String, Object>();
map.put( "certificate", certificate);
body = FreeMarkerTemplateUtils.processTemplateIntoString(freeMarkerConfiguration.getTemplate("certificate-expiry-alert.ftl"), map);
} catch (IOException | TemplateException e) {
logger.error("Error creating template: " + e.getMessage(), e);
}
mailUtil.sendMail(mailSender, props.getProperty(iteration + ".list.email").split("\\s*,\\s*"), body, props);
}
}
return certificates;
}
private String getCNFromDN(String dn) {
String cn = null;
LdapName ln = null;
try {
ln = new LdapName(dn);
} catch (InvalidNameException e) {
logger.error("Error parsing CN: " + e.getMessage(), e);
}
for(Rdn rdn : ln.getRdns()) {
if(rdn.getType().equalsIgnoreCase("CN")) {
cn = (String)rdn.getValue();
}
}
return cn;
}
}
| [
"niul@yahoo.com"
] | niul@yahoo.com |
afd1e0c989a85107c8ade41699a406b2db0b3e69 | 59ee77a1766aaecb82d1ed4d69135ac929d9dd6d | /roy-rodriguez/homework-3/src/test/java/AllWordsTest.java | db22c85309364493b1d2fc5a4132f3c96a7f5864 | [] | no_license | jarvi5/TechGroupC | 2a7d393401e0a46a245b5a30a73e9024c95ca66d | 636449aaa9495a5ceb36afb91474c64e23d92504 | refs/heads/master | 2020-05-15T04:50:30.668030 | 2019-07-08T00:49:34 | 2019-07-08T00:49:34 | 182,095,175 | 0 | 3 | null | 2019-10-02T05:30:47 | 2019-04-18T13:42:47 | Java | UTF-8 | Java | false | false | 16,984 | java | //
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class AllWordsTest {
@Test
public void testNull() {
try {
Set var1 = Analyzer.allWords((List)null);
if (var1 == null) {
Assert.fail("allWords should return empty Set when input is null");
}
Assert.assertTrue("allWords should return empty Set when input is null", var1.isEmpty());
} catch (Exception var2) {
Assert.fail("allWords throws " + var2 + " when input is null");
}
}
@Test
public void testEmpty() {
try {
Set var1 = Analyzer.allWords(new LinkedList());
if (var1 == null) {
Assert.fail("allWords should return empty Set when input is empty");
}
Assert.assertTrue("allWords should return empty Set when input is empty", var1.isEmpty());
} catch (Exception var2) {
Assert.fail("allWords throws " + var2 + " when input is empty");
}
}
@Test
public void testAllWordsDistinct() {
Sentence var1 = new Sentence(0, "word dog ");
Sentence var2 = new Sentence(0, "cat monkey ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when all words in List are distinct");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when all words in List are distinct");
}
Assert.assertEquals("allWords contains incorrect number of elements when all words are distinct", 4L, (long)var4.size());
Word var5 = new Word("word");
var5.increaseTotal(0);
Word var6 = new Word("dog");
var6.increaseTotal(0);
Word var7 = new Word("cat");
var7.increaseTotal(0);
Word var8 = new Word("monkey");
var8.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when all words are distinct", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct", var4.contains(var7));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct", var4.contains(var8));
} catch (Exception var9) {
Assert.fail("allWords throws " + var9 + " when all words in List are distinct");
}
}
@Test
public void testIgnoreNullSentenceInList() {
Sentence var1 = new Sentence(0, "word dog ");
Sentence var2 = new Sentence(0, "cat monkey ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add((Object)null);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when a Sentence in List is null");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when a Sentence in List is null");
}
Assert.assertTrue("allWords contains incorrect number of elements when a Sentence in List is null", 4 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(0);
Word var6 = new Word("dog");
var6.increaseTotal(0);
Word var7 = new Word("cat");
var7.increaseTotal(0);
Word var8 = new Word("monkey");
var8.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when a Sentence in List is null", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when a Sentence in List is null", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when a Sentence in List is null", var4.contains(var7));
Assert.assertTrue("allWords does not contain correct Word when a Sentence in List is null", var4.contains(var8));
} catch (Exception var9) {
Assert.fail("allWords throws " + var9 + " when a Sentence in List is null");
}
}
@Test
public void testCorrectTotalAllWordsDistinctScoresPositive() {
Sentence var1 = new Sentence(1, "word dog ");
Sentence var2 = new Sentence(2, "cat monkey ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when all words are distinct");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when all words are distinct");
}
Assert.assertTrue("allWords contains incorrect number of elements when all words are distinct", 4 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(1);
Word var6 = new Word("dog");
var6.increaseTotal(1);
Word var7 = new Word("cat");
var7.increaseTotal(2);
Word var8 = new Word("monkey");
var8.increaseTotal(2);
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is positive", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is positive", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is positive", var4.contains(var7));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is positive", var4.contains(var8));
} catch (Exception var9) {
Assert.fail("allWords throws " + var9 + " when all words are distinct");
}
}
@Test
public void testCorrectTotalAllWordsDistinctScoresNegative() {
Sentence var1 = new Sentence(-1, "word dog ");
Sentence var2 = new Sentence(-2, "cat monkey ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when all words are distinct");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when all words are distinct");
}
Assert.assertTrue("allWords contains incorrect number of elements when all words are distinct", 4 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(-1);
Word var6 = new Word("dog");
var6.increaseTotal(-1);
Word var7 = new Word("cat");
var7.increaseTotal(-2);
Word var8 = new Word("monkey");
var8.increaseTotal(-2);
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is negative", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is negative", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is negative", var4.contains(var7));
Assert.assertTrue("allWords does not contain correct Word when all words are distinct and score is negative", var4.contains(var8));
} catch (Exception var9) {
Assert.fail("allWords throws " + var9 + " when all words are distinct");
}
}
@Test
public void testSomeWordsAppearMoreThanOnce() {
Sentence var1 = new Sentence(0, "word dog ");
Sentence var2 = new Sentence(0, "cat dog ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when some words appear more than once");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when some words appear more than once");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words appear more than once", 3 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(0);
Word var6 = new Word("dog");
var6.increaseTotal(0);
Word var7 = new Word("cat");
var7.increaseTotal(0);
var6.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once", var4.contains(var7));
} catch (Exception var8) {
Assert.fail("allWords throws " + var8 + " when some words appear more than once");
}
}
@Test
public void testCorrectTotalSomeWordsAppearMoreThanOnceScoresPositive() {
Sentence var1 = new Sentence(1, "word dog ");
Sentence var2 = new Sentence(2, "cat dog ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when some words appear more than once");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when some words appear more than once");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words appear more than once", 3 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(1);
Word var6 = new Word("dog");
var6.increaseTotal(1);
Word var7 = new Word("cat");
var7.increaseTotal(2);
var6.increaseTotal(2);
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is positive", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is positive", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is positive", var4.contains(var7));
} catch (Exception var8) {
Assert.fail("allWords throws " + var8 + " when some words appear more than once");
}
}
@Test
public void testCorrectTotalSomeWordsAppearMoreThanOnceScoresNegative() {
Sentence var1 = new Sentence(-1, "word dog ");
Sentence var2 = new Sentence(-2, "cat dog ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when some words appear more than once");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when some words appear more than once");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words appear more than once", 3 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(-1);
Word var6 = new Word("dog");
var6.increaseTotal(-1);
Word var7 = new Word("cat");
var7.increaseTotal(-2);
var6.increaseTotal(-2);
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is negative", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is negative", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when some words appear more than once and score is negative", var4.contains(var7));
} catch (Exception var8) {
Assert.fail("allWords throws " + var8 + " when some words appear more than once");
}
}
@Test
public void testIgnoreWordThatStartsWithCharacterThatIsNotALetter() {
Sentence var1 = new Sentence(0, "word $dog ");
LinkedList var2 = new LinkedList();
var2.add(var1);
try {
Set var3 = Analyzer.allWords(var2);
if (var3 == null) {
Assert.fail("allWords returns null when some words start with character that is not a letter");
} else if (var3.isEmpty()) {
Assert.fail("allWords returns empty Set when some words start with character that is not a letter");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words start with character that is not a letter", 1 == var3.size());
Word var4 = new Word("word");
var4.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when some words start with character that is not a letter", var3.contains(var4));
} catch (Exception var5) {
Assert.fail("allWords throws " + var5 + " when some words start with character that is not a letter");
}
}
@Test
public void testIgnoreWordThatIsSingleCharacterThatIsNotALetter() {
Sentence var1 = new Sentence(0, "word dog ?");
LinkedList var2 = new LinkedList();
var2.add(var1);
try {
Set var3 = Analyzer.allWords(var2);
if (var3 == null) {
Assert.fail("allWords returns null when some words are single character that is not a letter");
} else if (var3.isEmpty()) {
Assert.fail("allWords returns empty Set when some words are single character that is not a letter");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words are single character that is not a letter", 2 == var3.size());
Word var4 = new Word("word");
var4.increaseTotal(0);
Word var5 = new Word("word");
var5.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when some words are single character that is not a letter", var3.contains(var4));
Assert.assertTrue("allWords does not contain correct Word when some words are single character that is not a letter", var3.contains(var5));
} catch (Exception var6) {
Assert.fail("allWords throws " + var6 + " when some words are single character that is not a letter");
}
}
@Test
public void testCaseInsensitivity() {
Sentence var1 = new Sentence(0, "word dog ");
Sentence var2 = new Sentence(0, "cat DOG ");
LinkedList var3 = new LinkedList();
var3.add(var1);
var3.add(var2);
try {
Set var4 = Analyzer.allWords(var3);
if (var4 == null) {
Assert.fail("allWords returns null when some words are same ignoring case");
} else if (var4.isEmpty()) {
Assert.fail("allWords returns empty Set when some words are same ignoring case");
}
Assert.assertTrue("allWords contains incorrect number of elements when some words are same ignoring case", 3 == var4.size());
Word var5 = new Word("word");
var5.increaseTotal(0);
Word var6 = new Word("dog");
var6.increaseTotal(0);
Word var7 = new Word("cat");
var7.increaseTotal(0);
var6.increaseTotal(0);
Assert.assertTrue("allWords does not contain correct Word when some words are same ignoring case", var4.contains(var5));
Assert.assertTrue("allWords does not contain correct Word when some words are same ignoring case", var4.contains(var6));
Assert.assertTrue("allWords does not contain correct Word when some words are same ignoring case", var4.contains(var7));
} catch (Exception var8) {
Assert.fail("allWords throws " + var8 + " when some words are same ignoring case");
}
}
}
| [
"roy.rodriguez@idt.net"
] | roy.rodriguez@idt.net |
c21dfec9ea857ab4a643b03ad3fb45bc084d01f8 | 1047dc64afb0d8a147d08e9c07ca62dbb41d8ab0 | /src/main/java/com/sda/springstarter/demo/controller/BookRestController.java | 83d2b4e97e0d906ef9ca0508693fe8f7f9d2a5b6 | [] | no_license | javabyd1/SpringBookStore_TB | 93a91c1efa94fcca76903eb24ad76d56d0fb6436 | 5b0b33243eb575c7a8c51fa3e8c1cb55ae814416 | refs/heads/master | 2021-05-10T21:44:11.775838 | 2018-01-20T11:12:15 | 2018-01-20T11:12:15 | 118,235,349 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,196 | java | package com.sda.springstarter.demo.controller;
import com.sda.springstarter.demo.exception.BookNotFoundException;
import com.sda.springstarter.demo.model.Book;
import com.sda.springstarter.demo.service.BookServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping(value = "books")
public class BookRestController {
@Autowired
private BookServiceImpl bookService;
@CrossOrigin(value = "http://localhost:9999")
@RequestMapping(method = RequestMethod.GET)
public List<Book> getAllBooks(){
return bookService.getAllBooks();
}
@CrossOrigin(value = "http://localhost:9999")
@RequestMapping(method = RequestMethod.POST)
public void saveBook(@RequestBody Book book){
bookService.saveBook(book);
}
@GetMapping(value = "{id}")
public ResponseEntity<Book> getBookById(@PathVariable int id){
return ResponseEntity
.status(HttpStatus.OK)
.body(bookService.getBookById(id));
}
}
| [
"java-tomek@users.noreply.github.com"
] | java-tomek@users.noreply.github.com |
4ca7d51857ba515a2530790d6c07c3f1d4d1d8c3 | 27598ef2dbb708cb6530ccd6d811b86a349f7884 | /o2o-ec500/src/main/java/dao/ShopDao.java | 2979730f785d26b85476f51c06ef065a411964d7 | [] | no_license | Bonniesty/second-hand-market-platform | de0b71008ad972df80c73f284d08463087196037 | 0ec72dd775df044577b224486e3720c24833aa1d | refs/heads/master | 2021-05-18T21:32:03.132833 | 2020-05-01T19:30:00 | 2020-05-01T19:30:00 | 251,431,556 | 0 | 0 | null | 2020-04-16T00:19:11 | 2020-03-30T21:23:15 | Java | UTF-8 | Java | false | false | 447 | java | package dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import entity.Shop;
public interface ShopDao {
List<Shop> queryShopList(@Param("shopCondition") Shop shopCondition, @Param("rowIndex") int rowIndex,
@Param("pageSize") int pageSize);
int queryShopCount(@Param("shopCondition") Shop shopCondition);
Shop queryByShopId(long shopId);
int insertShop(Shop shop);
int updateShop(Shop shop);
}
| [
"tysun@bu.edu"
] | tysun@bu.edu |
f2929e8c111b47aa87f647692571a29431f447d1 | a21dabed80fdae0171ed715887de8bf8a5739685 | /ExpressSystemGAP/src/stub_drivers/blservice/login/LoginService_driver.java | b114bd0352b97005701f686e5ad77fbb113a47b3 | [] | no_license | SE2TeamOfNJU/GoAhead-Pikachu | a1dae6de1fbe20fcb3953bb3ef4a8ebd5762ebcc | 90d53aa464511ecc70a27ce6b3ca16a5f41b61c2 | refs/heads/master | 2021-01-10T15:34:32.586906 | 2016-01-05T03:29:40 | 2016-01-05T03:29:55 | 43,211,550 | 1 | 2 | null | 2015-12-25T08:22:52 | 2015-09-26T15:49:11 | Java | UTF-8 | Java | false | false | 635 | java | package stub_drivers.blservice.login;
import client.blservice.loginblservice.LoginService;
import client.vo.LogVO;
public class LoginService_driver {
public void driver(LoginService log) {
LogVO result;
result = log.login("txy", "0000000");
if (!result.isSucceed())
System.out.println("login failed");
result = log.login("yyf", "000000");
if (result.isSucceed())
System.out.println("login succeed,user type:"
+ result.getUserType());
}
public static void main(String[] args) {
LoginService log = new LoginService_stub();
LoginService_driver driver = new LoginService_driver();
driver.driver(log);
}
}
| [
"835168932@qq.com"
] | 835168932@qq.com |
f38a02cd75e72f9f5e9cade7ceecc4a1bd164734 | a7211598c7f4a0b9f0920d381d64ad5ccf9c1bf9 | /Othello/src/main/java/tiralabra/performance/ArrayListSortingPerformance.java | c582fbe315f64e382e3f4050481dbdd811413042 | [] | no_license | LasAtt/Othello | 72f38b19e7ee68a2df9e42d2de78e9bbeb77721e | 38123aeb34fc26d3cf308bbcb4cad61995b978ae | refs/heads/master | 2021-05-30T15:37:01.071688 | 2016-02-15T18:35:27 | 2016-02-15T18:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,987 | 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 tiralabra.performance;
import java.util.Random;
import tiralabra.utilities.ArrayList;
import tiralabra.utilities.ArrayListSorter;
/**
*
* @author atte
*/
public class ArrayListSortingPerformance {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Random random = new Random();
ArrayList<ArrayList<Integer>> toSort = new ArrayList<>();
int size = 1000000;
for (int i = 0; i < 10; i++) {
toSort.add(randomArrayList(random, size));
}
long max = Long.MIN_VALUE;
long min = Long.MAX_VALUE;
long sum = 0;
int operations = 10;
System.out.println("Sorting ArrayLists with a size of: " + size);
System.out.print("Time taken: ");
for (ArrayList<Integer> list : toSort) {
long start = System.currentTimeMillis();
ArrayListSorter.sort(list);
long timeTaken = System.currentTimeMillis() - start;
System.out.print(timeTaken + "ms ");
sum += timeTaken;
if (timeTaken > max) {
max = timeTaken;
}
if (timeTaken < min) {
min = timeTaken;
}
}
System.out.println("");
System.out.println("Maximum time taken: " + max + "ms");
System.out.println("Minimum time taken: " + min + "ms");
System.out.println("Average time taken: " + ((double) sum / operations) + "ms");
}
public static ArrayList<Integer> randomArrayList(Random random, int size) {
ArrayList<Integer> randomList = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
randomList.add(random.nextInt());
}
return randomList;
}
}
| [
"atte.lassila@cs.helsinki.fi"
] | atte.lassila@cs.helsinki.fi |
b14120bcf6057e99e977f75381de0435bfc518a8 | 5b68b9b98d6aa83203f2f2d5e24dbc5e3b394fb8 | /RFID_HAMPIR/app/src/main/java/com/example/ruben/rfid_hampir/database.java | 935dd32bd5bf10a9432fdd16dbca339720a35319 | [] | no_license | rubentea16/practical-work | 7fccd4a4ef86e731a6bdeea69a40e75c687f2d99 | 9271cee6730f9d2d89e7c91ba46d8f2d3bf89096 | refs/heads/master | 2020-04-17T06:56:32.346051 | 2019-01-18T05:57:11 | 2019-01-18T05:57:11 | 166,346,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,859 | java | package com.example.ruben.rfid_hampir;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.example.ruben.rfid_hampir.model.User;
import com.firebase.client.Firebase;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import java.util.ArrayList;
public class database extends Fragment{
public database(){}
private FirebaseDatabase mDatabase;
RecyclerView rvView;
ArrayList<User> list = new ArrayList<>();
AdapterDatabase adapter;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
getActivity().setTitle("Database");
return inflater.inflate(R.layout.database , container ,false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Firebase.setAndroidContext(getActivity());
rvView = (RecyclerView) getActivity().findViewById(R.id.rvDatabase);
adapter = new AdapterDatabase(list);
mDatabase = FirebaseDatabase.getInstance();
DatabaseReference myRef = mDatabase.getReference("Users");
myRef.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
User u = dataSnapshot.getValue(User.class);
list.add(0, u);
adapter.notifyDataSetChanged();
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
LinearLayoutManager manager = new LinearLayoutManager(getActivity().getBaseContext());
rvView.setHasFixedSize(true);
rvView.setLayoutManager(manager);
rvView.setAdapter(adapter);
}
}
| [
"rstefanus16@gmail.com"
] | rstefanus16@gmail.com |
512c1d7f18ae6490d95af2670b0d5cea7c99a1d6 | fb658b3a1ba16749a8d08f5b87bb00c5a4688051 | /src/test/java/com/fasterxml/jackson/databind/deser/TestUntypedDeserialization.java | 73eacce1b08f929b3489571cf1e60a157f14584a | [] | no_license | jakub-bochenski/jackson-databind | 99dd658ba0bd8de6e4cc0ae0e5068d638d59aa33 | db923d7129b2071e2c9717415ce6de2af77f4f65 | refs/heads/master | 2021-01-15T16:00:59.536255 | 2012-11-13T18:43:00 | 2012-11-13T18:43:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,727 | java | package com.fasterxml.jackson.databind.deser;
import java.io.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
/**
* Unit tests for verifying "old" data binding from JSON to JDK objects;
* one that only uses core JDK types; wrappers, Maps and Lists.
*/
public class TestUntypedDeserialization
extends com.fasterxml.jackson.test.BaseTest
{
@SuppressWarnings("unchecked")
public void testSampleDoc()
throws Exception
{
final String JSON = SAMPLE_DOC_JSON_SPEC;
JsonFactory jf = new JsonFactory();
/* To get "untyped" Mapping (to Maps, Lists, instead of beans etc),
* we'll specify plain old Object.class as the target.
*/
Object root = new ObjectMapper().readValue(jf.createJsonParser(new StringReader(JSON)), Object.class);
assertType(root, Map.class);
Map<?,?> rootMap = (Map<?,?>) root;
assertEquals(1, rootMap.size());
Map.Entry<?,?> rootEntry = rootMap.entrySet().iterator().next();
assertEquals("Image", rootEntry.getKey());
Object image = rootEntry.getValue();
assertType(image, Map.class);
Map<?,?> imageMap = (Map<?,?>) image;
assertEquals(5, imageMap.size());
Object value = imageMap.get("Width");
assertType(value, Integer.class);
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_WIDTH), value);
value = imageMap.get("Height");
assertType(value, Integer.class);
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_HEIGHT), value);
assertEquals(SAMPLE_SPEC_VALUE_TITLE, imageMap.get("Title"));
// Another Object, "thumbnail"
value = imageMap.get("Thumbnail");
assertType(value, Map.class);
Map<?,?> tnMap = (Map<?,?>) value;
assertEquals(3, tnMap.size());
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_TN_HEIGHT), tnMap.get("Height"));
// for some reason, width is textual, not numeric...
assertEquals(SAMPLE_SPEC_VALUE_TN_WIDTH, tnMap.get("Width"));
assertEquals(SAMPLE_SPEC_VALUE_TN_URL, tnMap.get("Url"));
// And then number list, "IDs"
value = imageMap.get("IDs");
assertType(value, List.class);
List<Object> ids = (List<Object>) value;
assertEquals(4, ids.size());
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_TN_ID1), ids.get(0));
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_TN_ID2), ids.get(1));
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_TN_ID3), ids.get(2));
assertEquals(Integer.valueOf(SAMPLE_SPEC_VALUE_TN_ID4), ids.get(3));
// and that's all folks!
}
// [JACKSON-839]: allow 'upgrade' of big integers into Long, BigInteger
public void testObjectSerializeWithLong() throws IOException
{
final ObjectMapper mapper = new ObjectMapper();
mapper.enableDefaultTyping(DefaultTyping.JAVA_LANG_OBJECT, As.PROPERTY);
final long VALUE = 1337800584532L;
String serialized = "{\"timestamp\":"+VALUE+"}";
// works fine as node
JsonNode deserialized = mapper.readTree(serialized);
assertEquals(VALUE, deserialized.get("timestamp").asLong());
// and actually should work in Maps too
Map<?,?> deserMap = mapper.readValue(serialized, Map.class);
Number n = (Number) deserMap.get("timestamp");
assertNotNull(n);
assertSame(Long.class, n.getClass());
assertEquals(Long.valueOf(VALUE), n);
}
}
| [
"tsaloranta@gmail.com"
] | tsaloranta@gmail.com |
5b5e63df4d307a44cfea526a0df19aa591a7df24 | 2905e6745a67004580aa70a3fa246aa47c0eee97 | /netscript/src/monitor/commands/codecs/NonBlockingCmdResultDecoder.java | 0ff87346e2aab4e6fd494d898bf75281d4bebfa3 | [] | no_license | summonersRift/primogeni | 32cbf949f62e6442d0748258dfdff2dd63199a3b | 763cf746dcd7c9c4d3d20d328899cb96efe6da69 | refs/heads/master | 2020-12-25T00:08:58.727433 | 2015-01-30T18:13:36 | 2015-01-30T18:13:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,044 | java | package monitor.commands.codecs;
/*
* Copyright (c) 2011 Florida International University.
*
* Permission is hereby granted, free of charge, to any individual or
* institution obtaining a copy of this software and associated
* documentation files (the "software"), to use, copy, modify, and
* distribute without restriction.
*
* 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
* non-infringement. In no event shall Florida International
* University 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.
*
* This software is developed and maintained by
*
* Modeling and Networking Systems Research Group
* School of Computing and Information Sciences
* Florida International University
* Miami, Florida 33199, USA
*
* You can find our research at http://www.primessf.net/.
*/
import java.nio.charset.CharacterCodingException;
import monitor.commands.AbstractCmd;
import monitor.commands.CommandType;
import monitor.commands.NonBlockingCmdResult;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
/**
* @author Nathanael Van Vorst
*
*/
public class NonBlockingCmdResultDecoder extends AbstractCmdDecoder {
public NonBlockingCmdResultDecoder() {
super(CommandType.NON_BLOCKING_CMD_RESULT);
}
@Override
protected AbstractCmd decodeBody(IoSession session, IoBuffer in, int length) {
try {
return new NonBlockingCmdResult(in.getInt(), in.getString(in.getInt(),csd));
} catch (CharacterCodingException e) {
throw new RuntimeException(e);
}
}
public void finishDecode(IoSession session, ProtocolDecoderOutput out)
throws Exception {
}
}
| [
"obaida007@gmail.com"
] | obaida007@gmail.com |
2ff2c0c0ee56234e996b4295d6d97e03d4c96196 | d161cc693562c98db7c82ce1d3a76a4130719b1e | /jodd-json/src/main/java/jodd/json/impl/MapJsonSerializer.java | 94c666af6ec7403f93a8841c61842d99a751e186 | [] | no_license | jamespic/jodd | eb69b5f4a6bb993c7c4408038bfaf383cd12a93b | a31e4026fb44e9aa6f89c263498ae434b157a43d | refs/heads/master | 2021-01-23T22:07:21.222089 | 2014-08-12T15:07:31 | 2014-08-13T10:09:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 739 | java | // Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.
package jodd.json.impl;
import jodd.json.JsonContext;
import jodd.json.TypeJsonSerializer;
import java.util.Map;
/**
* Map serializer.
*/
public class MapJsonSerializer implements TypeJsonSerializer<Map> {
@Override
public void serialize(JsonContext jsonContext, Map map) {
jsonContext.writeOpenObject();
int count = 0;
for (Object key : map.keySet()) {
if (count > 0) {
jsonContext.writeComma();
}
count++;
if (key == null) {
jsonContext.writeName(null);
} else {
jsonContext.writeName(key.toString());
}
Object value = map.get(key);
jsonContext.serialize(value);
}
jsonContext.writeCloseObject();
}
} | [
"igor@jodd.org"
] | igor@jodd.org |
91281c4f921fca21a95a0bc3843d3912321eaa5c | c6aa0a1683d4bf3ca4d8c2983496f57a01590b2e | /app/src/main/java/com/idreems/openvm/activity/SplashActivity.java | 43e07dfa5212c74283f3db27a43dbf5adb75e957 | [] | no_license | ramonqlee/AIGashapon_git | 7079b912c67cabc7e343d13f2b4fac65b37f2023 | 35ddb731a72649ed508dbe801a5cca672aac2228 | refs/heads/master | 2020-03-13T12:36:23.559167 | 2018-04-26T08:14:17 | 2018-04-26T08:14:17 | 131,122,701 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,785 | java | package com.idreems.openvm.activity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Process;
import com.idreems.openvm.R;
import com.idreems.openvm.constant.Consts;
import com.idreems.openvm.utils.LogUtil;
import com.idreems.openvm.utils.Utils;
import static com.idreems.openvm.MyApplication.isMainApp;
public class SplashActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
final String processName = Utils.getProcessName(this, Process.myPid());
LogUtil.d(Consts.LOG_TAG, ".......................startApp SplashActivity start in " + processName + ".......................");
if (!isMainApp(getApplicationContext())) {
LogUtil.d(Consts.LOG_TAG, ".......................startApp SplashActivity quit here......................."+processName);
finish();
return;
}
if (Consts.REBOOT_ENABLE) {
enterMainActivity();
} else {
delayEnterMainActivity();
}
if (!Consts.PRODUCTION_ON) {
testCase();
}
}
private void delayEnterMainActivity() {
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
enterMainActivity();
}
}, 5000);
}
private void enterMainActivity() {
Intent intent = new Intent();
intent.setClass(getApplicationContext(), MainActivity.class);
startActivity(intent);
finish();
}
private void testCase() {
}
}
| [
"ramonqlee1980@gmail.com"
] | ramonqlee1980@gmail.com |
a2c02d9c8246e643cd4a261199adc6590c7f9f2f | b7037e73506256d5d75296a2348db4011a6c4ec9 | /08_SpringData_Project/src/main/java/com/lypgod/demo/springdataproject/Application.java | 7a0c899d1b16339c3dc831b2f77a767da3697691 | [] | no_license | lypgod/SpringData_Demos | f9f07308d4592b9642808722482e4352957a8647 | 0277ea6eb2f44338628bdf3d6643bc1154c58214 | refs/heads/master | 2022-11-30T05:30:36.992490 | 2019-11-02T04:33:12 | 2019-11-02T04:33:12 | 219,103,169 | 0 | 0 | null | 2022-11-15T23:31:47 | 2019-11-02T04:28:06 | Java | UTF-8 | Java | false | false | 326 | java | package com.lypgod.demo.springdataproject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
| [
"lypgod@hotmail.com"
] | lypgod@hotmail.com |
0ed0a177daeca572ce548d549baa4156a90eb1e2 | 305f71ed2686737c61f954ca5f26e2704f8422c5 | /src/main/java/org/lionpooh/spring/eventlistener/constant/Service.java | 5ad842d4195ad4f2f62bbc9f45ed8a38846cce1f | [] | no_license | lionpooh/event_listener | 5a7050e3583cf9b1dbd65b93d217a98b6d1efc60 | 86fb14d2ca0cbde3496f73429c136601f19daf46 | refs/heads/master | 2022-11-23T14:28:00.129970 | 2020-03-04T08:55:28 | 2020-03-04T08:55:28 | 244,585,061 | 0 | 0 | null | 2022-11-16T00:44:34 | 2020-03-03T08:47:03 | Java | UTF-8 | Java | false | false | 111 | java | package org.lionpooh.spring.eventlistener.constant;
public enum Service {
NOVA, CINDER, NEUTRON, GLANCE
}
| [
"lionpooh37@gmail.com"
] | lionpooh37@gmail.com |
41e5e9f36205218a3fc099bb81fddfb9a89f2e04 | 8a2e7cdcfcb2d72a2275463f123e8838b3f49261 | /Project/Increment2/Source/ImageRecognition_AnalyzePartial/app/src/main/java/com/example/snehamishra/imagerecognition/LoginActivity.java | 1e07fa4f9b4fbf493c2f3694280ea347c053a21e | [] | no_license | SnehaMishra28/AdvanceSoftwareEngineering_CS5551_Spring2018 | 0b99771ca371f3fcccd7c8fbf5b782cc616b482d | f43b19ab1ae0b370340f1d6a6fed27598f2852bb | refs/heads/master | 2021-05-02T13:55:15.630665 | 2018-06-13T00:25:39 | 2018-06-13T00:25:39 | 120,709,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 761 | java | package com.example.snehamishra.imagerecognition;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class LoginActivity extends AppCompatActivity {
private Button login;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
login = (Button)findViewById(R.id.login_btn);
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, ImageActivity.class));
}
});
}
}
| [
"sneha.mishra.28@gmail.com"
] | sneha.mishra.28@gmail.com |
18c818ab84976a5bc3e67eceff60487c2ed72217 | 62f905e62d1ff53da696243c35f230d287522646 | /src/main/java/com/propellerads/jupiter/annotation/Environment.java | e0394e2ed25db568d7d05ee6973c6473cc492824 | [] | no_license | apanashchenko/QAMeetupDemo | 8d849810a8facecf334f3360b21ecdd2aab1f7ac | 72ea39957fce3512d2cc857776c51206286beb94 | refs/heads/master | 2020-04-28T21:26:29.263825 | 2018-02-07T22:41:21 | 2018-02-07T22:41:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 564 | java | package com.propellerads.jupiter.annotation;
import com.propellerads.jupiter.extension.EnvironmentExtension;
import org.junit.jupiter.api.extension.ExtendWith;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@ExtendWith(EnvironmentExtension.class)
public @interface Environment {
EnvType value();
enum EnvType {
STAGING, PROD
}
}
| [
"d.tuchs@propellerads.net"
] | d.tuchs@propellerads.net |
f1b41e5ac82f3550c3ed8a4fe91914fbf1867714 | 30705560a16b5cee5a903199f49a55d67a9ddb71 | /src/socket03/Client.java | a42eae0bd361fb73243a1465974581882f105d38 | [] | no_license | zj1725847/project | c8635b76b8be9730067d2bb9c4399ff564929efa | 7d7d6622f14072ab9e40013bb3d429c55f1ed437 | refs/heads/master | 2022-04-30T13:24:11.368880 | 2020-04-27T07:23:02 | 2020-04-27T07:23:02 | 258,141,899 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,978 | java | package socket03;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;
/**
* 聊天室客户端
* @author ta
*
*/
public class Client {
/*
* java.net.Socket 套接字
* 封装了TCP协议的通讯细节,使得我们可以通过它
* 来与远端计算机建立TCP连接,并利用两个流的读写
* 完成数据交互。
*/
private Socket socket;
/**
* 构造方法,用来初始化客户端
*/
public Client() {
try {
/*
* Socket实例化是需要传入两个参数
* 参数1:服务端IP地址
* 参数2:服务端程序申请的端口
* 我们通过IP可以找到网络上的服务端计算机
* 通过端口可以连接到服务端计算机上运行的
* 服务端应用程序了。
* 注意:
* 实例化Socket的过程就是连接的过程,若
* 服务端没有响应这里会抛出异常。
*/
System.out.println("正在连接服务端...");
socket = new Socket("localhost",8088);
System.out.println("与服务端成功建立连接!");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 客户端开始工作的方法
*/
public void start() {
try {
//先启动用于读取服务端发送过来消息的线程
ServerHandler handler = new ServerHandler();
Thread t = new Thread(handler);
t.start();
Scanner scanner = new Scanner(System.in);
/*
* Socket提供的方法:
* OutputStream getOutputStream()
* 该方法获取的输出流是一个字节输出流
* 通过这个流写出的字节会通过网络发送
* 到远端计算机上(对于客户端这边而言,
* 远端计算机指的就是服务端了。)
*/
OutputStream out = socket.getOutputStream();
OutputStreamWriter osw
= new OutputStreamWriter(out,"UTF-8");
BufferedWriter bw
= new BufferedWriter(osw);
PrintWriter pw
= new PrintWriter(bw,true);
while(true) {
String line = scanner.nextLine();
pw.println(line);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Client client = new Client();
client.start();
}
/**
* 该线程负责循环读取服务端发送过来的消息并输出
* 到客户端的控制台上
* @author ta
*
*/
private class ServerHandler implements Runnable{
public void run() {
try {
//通过socket获取输入流,读取服务端发送过来的内容
InputStream in = socket.getInputStream();
InputStreamReader isr
= new InputStreamReader(in,"UTF-8");
BufferedReader br
= new BufferedReader(isr);
String line = null;
while((line = br.readLine())!=null) {
System.out.println(line);
}
} catch (Exception e) {
}
}
}
}
| [
"zj18382272813@163.com"
] | zj18382272813@163.com |
5fd361eb25fcc62b944759d11b9759979d9de24b | 452d8583d31179f2ef68dbe6a71524b0718060de | /libs/plugin-api/src/main/java/org/elasticsearch/plugin/package-info.java | 9e8ad40ef02868eb11e4f6033ceeb1ae14f77849 | [
"Apache-2.0",
"Elastic-2.0",
"SSPL-1.0",
"LicenseRef-scancode-other-permissive"
] | permissive | ianuoui/elasticsearch | 8b22db8bdf4ebfba0f3b0e443cd4668d68ef9bf1 | 7ea2a2c4090e9af1caf29677be1bbc57d25a80a8 | refs/heads/master | 2023-01-25T01:41:00.686110 | 2023-01-21T20:19:44 | 2023-01-21T20:19:44 | 122,552,945 | 1 | 0 | Apache-2.0 | 2018-02-23T00:35:00 | 2018-02-23T00:35:00 | null | UTF-8 | Java | false | false | 1,037 | java | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* An api used by plugin developers to implement custom Elasticsearch plugins.
* The package convention in plugin apis is as follows:
* <ul>
* <li> The root package is org.elasticsearch.plugin</li>
* <li> Specialised API jars have their name following the root package.
* Interfaces and annotations used by plugin developers should be placed under it.
* i.e. org.elasticsearch.plugin.analysis
* </li>
* <li> packages which are not meant to be used by plugin developers should be under internal package suffix
* i.e org.elasticsearch.plugin.analysis.internal
* </li>
* </ul>
*/
package org.elasticsearch.plugin;
| [
"noreply@github.com"
] | ianuoui.noreply@github.com |
b52c4122a49b2b763a3f3b6737c905d2c60f7d59 | 8655915a56b797d6857afec0e9d1e6574f4e52ab | /microsoftgraphvos/src/main/java/com/microsoft/office365/microsoftgraphvos/RecipientVO.java | 34a0e6b68251a1f51a85216d52122436a3423623 | [
"MIT"
] | permissive | isabella232/android-java-snippets-rest-sample | 4b0ccacd6b08737bdc56659190366b609cc2d6e8 | 0d5b51c6f6825826e3c54172e28aa1a997cce2f7 | refs/heads/master | 2023-03-21T00:03:33.645469 | 2020-03-05T20:36:27 | 2020-03-05T20:36:27 | 319,277,182 | 0 | 0 | MIT | 2021-02-23T21:23:11 | 2020-12-07T10:04:24 | null | UTF-8 | Java | false | false | 120 | java | package com.microsoft.office365.microsoftgraphvos;
public class RecipientVO {
public EmailAddress emailAddress;
}
| [
"brianmel@microsoft.com"
] | brianmel@microsoft.com |
05d44f6e29fcea1635b59bb43cabc41a0d6fa3e2 | ba2d7ec0c674a3df064d7447aee48f0706377639 | /src/main/java/com/soaringroad/peanuts/api/UserApi.java | c5ec2ec1b19ac3a3bdf68987183f3b5c20228ceb | [
"Apache-2.0"
] | permissive | wangzhenhui1992/peanuts | 36cc80281bf64db453d31e354b5586978478ba69 | 72e9095427477ecd8831508bdc6e31a60adb13a0 | refs/heads/develop | 2020-03-30T08:41:05.381200 | 2018-12-18T08:24:54 | 2018-12-18T08:24:54 | 151,031,106 | 12 | 5 | Apache-2.0 | 2018-12-18T08:02:56 | 2018-10-01T03:13:44 | Java | UTF-8 | Java | false | false | 463 | java | package com.soaringroad.peanuts.api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.soaringroad.api.BasicManageApi;
import com.soaringroad.peanuts.entity.User;
/**
* <pre>
* User API class
* </pre>
* @author wangzhenhui1992
* @since 2018/11/27
*/
@RequestMapping("/api/"+User.ENTITY_NAME)
@RestController
public class UserApi extends BasicManageApi<User,Long>{
}
| [
"605951224@qq.com"
] | 605951224@qq.com |
890cbf1c55036e6f74af309099f7826e089dca49 | 742ae5ccc0f79e153c2c3862249c0b9d6a5a03be | /FrostEngine/src/main/java/me/frostythedev/frostengine/bukkit/utils/items/ArmorSlot.java | a1ab044b648cdfe30789093b2590c2e4937515ec | [] | no_license | frostythedev/FrostEngine | 0a808f05152f17e5d91aac906a72e6b2c3e0aa55 | 7f0665f0c24d0a05e63856ed52afc4dea6c6ed95 | refs/heads/master | 2022-07-15T22:03:53.052594 | 2020-05-12T03:41:39 | 2020-05-12T03:41:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package me.frostythedev.frostengine.bukkit.utils.items;
public enum ArmorSlot {
HELMET(103),
CHEST_PLATE(104),
LEGGINGS(105),
BOOTS(106);
private int inventorySlot;
ArmorSlot(int inventorySlot) {
this.inventorySlot = inventorySlot;
}
public int getInventorySlot() {
return inventorySlot;
}
@Override
public String toString() {
return name();
}
}
| [
"frostythedev@gmail.com"
] | frostythedev@gmail.com |
f5580838de214460556c63627865a75fccaf2af7 | 938d0fd51b408b04827db8faba990517f35997dc | /src/main/java/com/practice/framework/utils/ExcelUtils.java | 4ff45d2ad5577c6c8e48414d5e0ec02917be068a | [] | no_license | musthafam/sample_framework | 29b51ab88dde1b96a9a104f7c334a32a0d1f9db5 | 5fe4492d1519e71693efdd6702e1c079aea0876d | refs/heads/master | 2020-03-23T16:16:30.915468 | 2018-10-31T16:55:50 | 2018-10-31T16:55:50 | 141,801,736 | 0 | 0 | null | 2018-10-31T16:56:05 | 2018-07-21T10:12:36 | Java | UTF-8 | Java | false | false | 3,664 | java | package com.practice.framework.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
/**
*
* @author Musthafa
* This util is to perform excel data retreival and data update back to Excel sheet
*
*/
public class ExcelUtils {
private static File file;
private static XSSFWorkbook workbook;
private static XSSFSheet sheet;
private static XSSFRow row;
private static XSSFCell cell;
/**
* This method helps to set the File path of the excel sheet and the Sheet name in which data is present
* @param filePath the File path of the excel sheet
* @param sheetName The sheet name that needs be accessed
*
*/
public static void setExcelPath(String filePath,String sheetName) {
try {
file = new File(filePath);
FileInputStream fis = new FileInputStream(file);
workbook = new XSSFWorkbook(fis);
sheet = workbook.getSheet(sheetName);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* This method helps to retrieve data for the given row and column number
* @param rowNumber The row number in the excel sheet starting from 0
* @param columnNumber The column number in the excel sheet starting from 0
* @return the cell value
*/
public static String getCellData(int rowNumber , int columnNumber) {
String cellData = "";
try {
row=sheet.getRow(rowNumber);
cell = row.getCell(columnNumber);
cellData = cell.getStringCellValue();
} catch(Exception e) {
e.printStackTrace();
}
return cellData;
}
/**
* This method helps to retrieve cell value based on Row name and Column Name
* @param rowName Name of the row
* @param columnName Name of the column
* @return
*/
public static String getCellData(String rowName , String columnName) {
String cellValue="";
try {
int rowNum = sheet.getLastRowNum()+1;
int colNum = sheet.getRow(0).getLastCellNum();
int reqColumn = 0;
XSSFRow firstRow = sheet.getRow(0);
for(int i=0;i<colNum;i++) {
XSSFCell cellVal = firstRow.getCell(i);
String tempColName = cellVal.getStringCellValue();
if(tempColName.equalsIgnoreCase(columnName)) {
reqColumn = cellVal.getColumnIndex();
}
}
for(int j=0;j<rowNum;j++) {
XSSFRow tempRow = sheet.getRow(j);
XSSFCell tempCell = tempRow.getCell(0);
XSSFCell reqCell = tempRow.getCell(reqColumn);
if(tempCell.getStringCellValue().equalsIgnoreCase(rowName)) {
cellValue=reqCell.getStringCellValue();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return cellValue;
}
/**
* This method is to update the Excel sheet with the input data
* @param rowNumber The row number in the sheet
* @param colNumber The Column Number in the sheet
* @param cellData The data that needs to be updated in the sheet
*/
public static void setCellData(int rowNumber , int colNumber, String cellData) {
try {
row = sheet.getRow(rowNumber);
if(row==null) {
row = sheet.createRow(rowNumber);
}
cell=row.getCell(colNumber);
if(cell==null) {
cell=row.createCell(colNumber);
cell.setCellValue(cellData);
} else {
cell.setCellValue(cellData);
}
FileOutputStream fos = new FileOutputStream(file);
workbook.write(fos);
fos.flush();
fos.close();
} catch(Exception e) {
e.printStackTrace();
}
}
}
| [
"mmmgce@gmail.com"
] | mmmgce@gmail.com |
b80e8bc8a2745fdf03bed23ce50c5a5a58431d1d | 553eee14d3c51b4affbe17d0c4a1fead686b1ab0 | /ejbModule/ec/edu/epn/gestioDocente/beans/IjubiladoDAO.java | 70636362c25a7b040a0db8944a72518caa97e4e9 | [] | no_license | WilsonCastro1988/ServiciosSeguridadEPN | 878c74b9e5cb56b5480e8d634fb623bc23547eb1 | ef2319da6ed48ffc00d92f54964a02c187c5eeb7 | refs/heads/master | 2020-04-27T08:29:28.571128 | 2019-03-11T17:25:32 | 2019-03-11T17:25:32 | 174,173,102 | 0 | 0 | null | 2019-03-11T17:25:33 | 2019-03-06T15:42:50 | Java | UTF-8 | Java | false | false | 243 | java | package ec.edu.epn.gestioDocente.beans;
import javax.ejb.Local;
import ec.edu.epn.generic.DAO.DaoGenerico;
import ec.edu.epn.gestionDocente.entities.Ijubilado;
@Local
public interface IjubiladoDAO extends DaoGenerico<Ijubilado> {
}
| [
"30637651+Marcduk@users.noreply.github.com"
] | 30637651+Marcduk@users.noreply.github.com |
1608bb51cc3c1c35a31fcf58259d92318417f66f | b3dda2991b76157409b9958c2961bb7db89325a3 | /src/main/java/basic/Main.java | db0504ccae0e6db333ba3d28f825b6fda63ba2a3 | [] | no_license | neaguMarinela/codingAdvanced | 27b55778d7c2cfbce46649958e32c3ab27fdc219 | f9fa401b10c89cd0b7a0558795f0ecb4b517cbc5 | refs/heads/master | 2022-06-05T13:21:41.928384 | 2019-09-27T19:41:07 | 2019-09-27T19:41:07 | 171,943,885 | 3 | 1 | null | 2022-05-20T20:56:11 | 2019-02-21T20:54:51 | Java | UTF-8 | Java | false | false | 1,590 | java | package basic;
public class Main {
public static void main(String[] args) {
// The purpose of the application is to help a company called Bills Burgers to manage
// their process of selling hamburgers.
// Our application will help Bill to select types of burgers, some of the additional items (additions) to
// be added to the burgers and pricing.
// We want to create a base hamburger, but also two other types of hamburgers that are popular ones in
// Bills store.
// The basic hamburger should have the following items.
// bread roll type, meat and up to 4 additional additions (things like lettuce, tomato, carrot, etc) that
// the customer can select to be added to the burger. Each one of these items gets charged an additional
// price so you need some way to track how many items got added and to calculate the price (for the base
// burger and all the additions).
// This burger has a base price and the additions are all separately priced.
// Create a Hamburger class to deal with all the above.
// The constructor should only include the roll type, meat and price.
// print the final price for the burger
Hamburger hamburger = new Hamburger("Basic", "Sausage", 3.56, "White");
hamburger.addHamburgerAddition1("Tomato", 0.27);
hamburger.addHamburgerAddition2("Lettuce", 0.75);
hamburger.addHamburgerAddition3("Cheese", 1.13);
System.out.println("Total Burger price is " + hamburger.itemizeHamburger());
}
}
| [
"marinela.neagu@3pillarglobal.com"
] | marinela.neagu@3pillarglobal.com |
e63e68e5e5f893b6b78bea95f4019f19f87903cc | abb7cb2cde74defcccfed68b7edae13a2094e015 | /src/main/java/uk/co/edwarddunn/htmlElements/Image.java | f5f2be4d10811f30076629974034fa2569f572d4 | [
"MIT"
] | permissive | EdwardDunn/java-html-generator | 51dd45512fe11044622672af85060fa39823b260 | 89dbd433198facbb3bfaa6a4566554c0746e4508 | refs/heads/master | 2020-03-19T11:24:04.835444 | 2018-06-11T14:12:35 | 2018-06-11T14:12:35 | 136,453,343 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 875 | java | /*
* Description: Class used to return HTML for image when passed an image path, alt text is also provided.
* @author Edward Dunn
* @version 1.0
*/
package uk.co.edwarddunn.htmlElements;
public class Image {
/** The start tag. */
private String START_TAG = "<img src=\"";
/** The end qoute. */
private String END_QOUTE = "\"";
/** The alt start tag. */
private String ALT_START_TAG = " alt=\"";
/** The end tag. */
private String END_TAG = ">";
/**
* Instantiates a new image.
*/
public Image() { }
/**
* Adds the image.
*
* @param imagePath the image path
* @param altText the alt text
* @return the string
*/
public String addImage(String imagePath, String altText) {
String imageElement = "";
imageElement+= START_TAG + imagePath + END_QOUTE + ALT_START_TAG + altText + END_QOUTE + END_TAG;
return imageElement;
}
}
| [
"edwarddunn12@gmail.com"
] | edwarddunn12@gmail.com |
77be6d70667b5285dfb33382e6dc98410be838d4 | e3606f168e3bd7ff3b40346c6ab15841df318b0d | /src/main/java/com/unionfin/algorithm/LinkList.java | 0d999b3d7f72dd58defc3b1acd56366be7e286a3 | [] | no_license | taoshenyi/jvmAndNetty | 2c1a20ec54ef575aea764e5dfb5e7a29c51ff33b | 0af2fbd94d761daeb9caec48b68590cddc75202d | refs/heads/master | 2020-12-24T20:00:15.130536 | 2017-03-26T10:59:25 | 2017-03-26T10:59:25 | 86,225,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,449 | java | package com.unionfin.algorithm;
public class LinkList<T>
{
// 定义一个内部类Node,代表链表的节点
private class Node
{
private T data;// 保存数据
private Node next;// 指向下个节点的引用
// 无参构造器
public Node()
{
}
// 初始化全部属性的构造器
public Node(T data, Node next)
{
this.data = data;
this.next = next;
}
}
private Node header;// 保存头结点
private Node tail;// 保存尾节点
private int size;// 保存已含有的节点数
// 创建空链表
public LinkList()
{
header = null;
tail = null;
}
// 已指定元素创建链表,只有一个元素
public LinkList(T element)
{
header = new Node(element, null);
tail = header;
size++;
}
// 返回链表的长度
public int length()
{
return size;
}
// 获取指定索引处的元素
public T get(int index)
{
return this.getNodeByIndex(index).data;
}
// 获取指定位置的节点
private Node getNodeByIndex(int index)
{
if (index < 0 || index > size - 1)
{
throw new IndexOutOfBoundsException("索引超出线性表范围");
}
Node current = header;
for (int i = 0; i < size && current != null; i++, current = current.next)
{
if (i == index)
{
return current;
}
}
return null;
}
// 按值查找所在w位置
public int locate(T element)
{
Node current = header;
for (int i = 0; i < size && current != null; i++, current = current.next)
{
if (current.data.equals(element))
{
return i;
}
}
return -1;
}
// 在尾部插入元素
public void add(T element)
{
// 如果链表是空的
if (header == null)
{
header = new Node(element, null);
// 只有一个节点,header,tail都指向该节点
tail = header;
}
else
{
Node newNode = new Node(element, null);
// 将尾节点的next指向新的节点
tail.next = newNode;
// 将新节点设置为尾节点
tail = newNode;
}
size++;
}
// 在头部添加元素
public void addHead(T element)
{
// 创建新节点,让新节点的next指向header
Node newNode = new Node(element, null);
newNode.next = header;
header = newNode;
if (tail == null)
{
tail = header;
}
size++;
}
// 在指定位置插入元素
public void insert(T element, int index)
{
if (index < 0 || index > size)
{
throw new IndexOutOfBoundsException("索引超出线性表范围");
}
if (header == null)
{
add(element);
}
else
{
// 插入的index是0,表明将该节点设置为头结点
if (index == 0)
{
addHead(element);
}
else
{
// 插入的不是头结点,也不是从尾部插入的,这个时候就要获取前一个节点
Node prev = this.getNodeByIndex(index - 1);
prev.next = new Node(element, prev.next);
size++;
}
}
}
// 删除指定索引处的元素
public T delete(int index)
{
if (index < 0 || index > size - 1)
{
throw new IndexOutOfBoundsException("索引超出线性表范围");
}
Node del = null;
// 如果删除的是头结点
if (index == 0)
{
del = header;
header = del.next;// 将头节点的下一个节点设置为头结点
}
else if (index == size - 1)
{
Node prev = this.getNodeByIndex(index - 1);
del = prev.next;
prev.next = del.next;
tail = prev;
}
else
{
Node prev = this.getNodeByIndex(index - 1);
// 提取待删除的节点
del = prev.next;
// 将待删除的节点的next节点指向prev.next节点
prev.next = del.next;
del.next = null;
}
size--;
return del.data;
}
// 删除最后一个元素
public T remove()
{
return delete(size - 1);
}
// 判断线性表是否为空
public boolean isEmpty()
{
return size == 0;
}
// 清空线性表
public void clear()
{
// 将header,tail置为null
header = null;
tail = null;
size = 0;
}
public String toString()
{
if (isEmpty())
{
return "[]";
}
else
{
StringBuilder sb = new StringBuilder("[");
for (Node current = header; current != null; current = current.next)
{
sb.append(current.data.toString() + ", ");
}
int len = sb.length();
return sb.delete(len - 2, len).append("]").toString();
}
}
}
| [
"zhaoxiaotaome@126.com"
] | zhaoxiaotaome@126.com |
b33e90ba6280fb7d894c62b81a108fdb37c772dd | d1b3cde1b0b715dacab5cb45612f356be36e5cf1 | /src/main/java/mk/ukim/finki/wp/lab/model/Grade.java | 2daeacdf7f5e81dbc6581ba5113cfc2b0113a6b0 | [] | no_license | AtanasSek/VebProgLab | 719895955c69a36f6a27018be4c1097f75e2942a | 2147469d50360ec1e3703b7eafdfb639c3a3a6db | refs/heads/master | 2023-02-07T04:15:35.282891 | 2020-12-28T18:06:22 | 2020-12-28T18:06:22 | 313,636,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | package mk.ukim.finki.wp.lab.model;
import lombok.Data;
import javax.persistence.*;
@Entity
@Data
public class Grade {
@Id
@GeneratedValue
private Long id;
private Character grade;
@ManyToOne
private Student student;
@ManyToOne
private Course course;
}
| [
"sekulovski.atanas@gmail.com"
] | sekulovski.atanas@gmail.com |
f5be0a3e3a61c659553ae8945ca9d0eacac346d9 | 237428757251a6316fb5fec46ac191ce02aa2b6c | /src/main/java/pages/Createaccountpage.java | e5fc6ca73dc92100c8cd4746759b8838b4427d1f | [] | no_license | anubha2590/freeuirepository | 4c06d9551edbc7e2da53aaae9a61ca08f8090dfd | 60337fccb5f63a34dc0faf86a8c27d0d2aa5f695 | refs/heads/master | 2022-12-28T13:58:56.113927 | 2020-04-23T11:26:21 | 2020-04-23T11:26:21 | 258,179,755 | 0 | 0 | null | 2020-10-13T21:26:25 | 2020-04-23T11:19:57 | HTML | UTF-8 | Java | false | false | 616 | java | package pages;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import Testutil.TestBase;
public class Createaccountpage extends TestBase{
@FindBy(xpath="//a[contains(text(),'Create Account')]")
WebElement btn1;
public Createaccountpage() {
PageFactory.initElements(driver, this);
System.out.print("Createaccountpage class contructor");
}
public String verifyCreateAccounttitle() {
String titlepfpage=driver.getTitle();
return titlepfpage;
}
public void createaccount()
{
btn1.click();
}
}
| [
"jain.anubha25@gmail.com"
] | jain.anubha25@gmail.com |
9187debc06d05a6123d4f2c536e78b2b296ee455 | 1730bd05781b435f732f943309cdc7543f922eb2 | /src/main/java/pe/edu/unsch/controller/LoginController.java | 8fbd21a452ae2eceefd2fe5368f32dfae5998632 | [] | no_license | unsch-ayacucho/entregables-proyecto-equipo-8 | b8689933bfdc2fbea4a7e1cec799300597f67267 | ae0ddce3c76c06ef60162be0da38477727c111ec | refs/heads/master | 2022-06-22T13:03:53.368151 | 2019-07-23T17:17:13 | 2019-07-23T17:17:13 | 187,922,385 | 0 | 0 | null | 2022-06-21T01:29:04 | 2019-05-21T22:28:34 | HTML | UTF-8 | Java | false | false | 1,769 | java | package pe.edu.unsch.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import pe.edu.unsch.entities.Usuario;
import pe.edu.unsch.service.ModuloService;
import pe.edu.unsch.service.SubmoduloService;
import pe.edu.unsch.service.UsuarioService;
@Controller
public class LoginController {
@Autowired
private UsuarioService usuarioService;
@Autowired
private ModuloService moduloService;
@Autowired
private SubmoduloService submoduloService;
@GetMapping({"/", "/login"})
public String login(Model model) {
model.addAttribute("title", "Login | Evaluación 360°");
return "views/login/index";
}
@PostMapping("/login")
public String login(HttpServletRequest request, HttpSession session, Model model) {
model.addAttribute("user", new Usuario());
Usuario user = this.usuarioService.login(request.getParameter("username"), request.getParameter("password"));
if (user == null) {
model.addAttribute("error", "Cuenta inválida");
return "redirect:/login";
} else {
session.setAttribute("usuario", user.getUsuario());
session.setAttribute("modulosPorPerfil", moduloService.listarPorPerfil(user.getUsuario()));
session.setAttribute("submodulosPorPerfil", submoduloService.listarPorPerfil(user.getUsuario()));
return "redirect:/admin/modulo/listar";
}
}
@GetMapping("/logout")
public String logout(HttpSession session) {
session.removeAttribute("usuario");
return "redirect:/login";
}
}
| [
"bony.ceron.27@unsch.edu.pe"
] | bony.ceron.27@unsch.edu.pe |
6bace6775e7a8f72ccb8da3406675ae451efd788 | 024446c5014a9a029eecd293a384ce2b21bdd821 | /module-pooul/src/main/java/com/minlia/module/pooul/bean/dto/PooulWithdrawQueryDTO.java | c472779634e0df557cca29e2ddd8c32da27fa5a4 | [] | no_license | future1314/minlia-modules | 7b692c0ccbd90abbb0a253260a9395aae70cc8cd | 46f08a3f12d61c9fb58882743fc26900b43d3c33 | refs/heads/master | 2020-04-23T07:38:58.899195 | 2019-01-20T14:25:24 | 2019-01-20T14:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | package com.minlia.module.pooul.bean.dto;
import lombok.Data;
/**
* Created by garen on 2018/9/25.
*/
@Data
public class PooulWithdrawQueryDTO extends PooulDTO {
private PooulWithdrawQueryDTO.Data data;
@lombok.Data
public static class Data {
private String _id;
private int amount;
private int bank_card_id;
private String mch_withdraw_id;
/**
* 转账状态,1为处理中,2 转账成功,3 转账失败
*/
private int status;
}
}
| [
"191285052@qq.com"
] | 191285052@qq.com |
d1ec3bed373a5f18ecb12ee23f2f3d1b7a8604fc | b730c434dd4b4c7a217bc6ea61d29c7a0308c5c2 | /src/btl/Nhom8_7.java | 4daf716f0de57987097abaa48983b0fadaf7f51a | [] | no_license | marcohatran/StockNews | d7a3470c2557dcfa06068cdea5fe9c047a93a09c | 16ff36dfb186d2e2378bf2cee5bdcc817bcfee3f | refs/heads/master | 2022-11-05T22:28:48.812699 | 2020-06-12T13:26:15 | 2020-06-12T13:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,116 | 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 btl;
import hotro.RandomClass;
import hotro.ReadFileStockCode;
import java.io.PrintWriter;
/**
*
* @author Admin
*/
public class Nhom8_7 extends NhomChung4{
public Nhom8_7(ReadFileStockCode rfStockCode) {
super(rfStockCode);
}
public void printResult(PrintWriter printWriter) {
int i, magiam = 0;
for (i = 1; i < this.rfStockCode.totalRow; i++) {
Double changenb = 0.0;
try {
changenb = Double.parseDouble(this.rfStockCode.list[i].getChangeNb());
} catch (Exception e) {
}
if (changenb < 0) {
magiam++;
}
}
RandomClass rand = new RandomClass();
printWriter.print(rand.getRandomString1() + "hôm nay, có tổng cộng " + magiam + " mã Upcom bị giảm điểm.");
// printWriter.println();
}
}
| [
"trannguyenhan01092000@gmail.com"
] | trannguyenhan01092000@gmail.com |
8c5aae34f37652f7738e929fec22ab9286759434 | 1dc32e61f314b30325ec404153f85c57ae7901f0 | /src/test/java/br/com/test/desafio/web/alelo/larissatargino/pages/CorreiosHomePagePage.java | b668d1f89b0b6a0b73bfd78792693999f9f094bc | [] | no_license | ltargino/web-alelo | 95e14053225185f6043b4cffd93fd0b5d4f2848f | 51004b0b28bc343924cfc64f62da3cbcb48fb5a7 | refs/heads/master | 2023-06-03T20:34:03.716097 | 2021-06-19T02:43:03 | 2021-06-19T02:43:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,459 | java | package br.com.test.desafio.web.alelo.larissatargino.pages;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.ArrayList;
import java.util.List;
public class CorreiosHomePagePage extends BasePage {
public CorreiosHomePagePage(WebDriver driver) {
super(driver);
}
public void fillFieldSearch(String texto) {
WebElement campoBuscar = driver.findElement(By.name("relaxation"));
campoBuscar.sendKeys(texto);
this.takeScreenShot();
}
public CorreiosSearchResultPage search() {
WebElement lupaBuscar = driver.findElement(By.xpath("//*[@id=\"content\"]/div[2]/div/div[2]/div[2]/form/button/i"));
lupaBuscar.click();
String currentWindow = this.driver.getWindowHandle();
List<String> windows = new ArrayList<>(this.driver.getWindowHandles());
int currentWindowIndex = windows.indexOf(currentWindow);
this.driver.switchTo().window(windows.get(currentWindowIndex + 1));
this.takeScreenShot();
return new CorreiosSearchResultPage(this.driver);
}
public void goToHomePage() {
this.driver.get("https://www.correios.com.br/");
this.takeScreenShot();
}
public String getTitle () {
return driver.getTitle();
}
}
| [
"l.targino@hotmail.com"
] | l.targino@hotmail.com |
3632368672a4241169d54229b62e6cdb1497fe55 | bff9d4fce99e09597b06a2534fbb24f63b8443b2 | /gui/src/main/java/com/yangui/main/services/model/YangAny.java | 1577197a3231021e542a4e6db60c5a46e01a9b2a | [
"Apache-2.0"
] | permissive | write4radu/NetconfBrowser | 18256e1cdf686bbdf39ce3d34b496d653f65d004 | ec908ef4869ff585aa2acabb4f89169ec294b7bb | refs/heads/master | 2020-07-29T09:29:42.879268 | 2019-09-02T19:51:40 | 2019-09-02T19:51:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 771 | java | package com.yangui.main.services.model;
import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
import com.yangui.main.services.model.SchemaItem.SchemaItemType;
import de.jensd.fx.glyphs.materialicons.MaterialIcon;
import de.jensd.fx.glyphs.materialicons.utils.MaterialIconFactory;
import javafx.scene.paint.Paint;
public class YangAny extends YangDataSchemaNode{
@Override
public String toString() {
return getLocalName() + (isConfig() ? " _c" : " _s");
}
public YangAny(AnyXmlSchemaNode anyOD, String xpath, ModuleIdentifier moduleId){
super(anyOD, xpath, moduleId);
typeEnum = SchemaItemType.ANY_XML;
itemIcon = MaterialIconFactory.get().createIcon(MaterialIcon.FORMAT_COLOR_TEXT);
itemIcon.setFill(Paint.valueOf("#00b7c3"));
}
} | [
"bogdan.dragan@qualitance.com"
] | bogdan.dragan@qualitance.com |
32f664e6d537e89adb402112748875447b52ab6b | 7253445f35b7e6c11c806352f8968b30e040dcd6 | /Laboratorinis darbas 2/Lab2_AibesMedziai/src/laborai/demo/AutoGamyba.java | 574f15e35159415e8c0091459b720cb4dd48d757 | [] | no_license | JustinasGaripovas/KTU_duomenu_strukturos | 9cc49c985b13548393f32d30526d9523db0b6181 | 29fd9b7b5653ec2efe2faa9da27024ff69782ddb | refs/heads/master | 2020-04-07T17:18:04.835769 | 2018-12-17T20:42:16 | 2018-12-17T20:42:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,546 | java | package laborai.demo;
import laborai.gui.MyException;
import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Stream;
public class AutoGamyba {
private static Automobilis[] automobiliai;
private static int pradinisIndeksas = 0, galinisIndeksas = 0;
private static boolean arPradzia = true;
public static Automobilis returnFirst()
{
return automobiliai[pradinisIndeksas];
}
public static Automobilis[] generuoti(int kiekis) {
automobiliai = new Automobilis[kiekis];
for (int i = 0; i < kiekis; i++) {
automobiliai[i] = new Automobilis.Builder().buildRandom();
}
return automobiliai;
}
public static Automobilis[] generuotiIrIsmaisyti(int aibesDydis,
double isbarstymoKoeficientas) throws MyException {
return generuotiIrIsmaisyti(aibesDydis, aibesDydis, isbarstymoKoeficientas);
}
/**
*
* @param aibesDydis
* @param aibesImtis
* @param isbarstymoKoeficientas
* @return Gražinamas aibesImtis ilgio masyvas
* @throws MyException
*/
public static Automobilis[] generuotiIrIsmaisyti(int aibesDydis,
int aibesImtis, double isbarstymoKoeficientas) throws MyException {
automobiliai = generuoti(aibesDydis);
return ismaisyti(automobiliai, aibesImtis, isbarstymoKoeficientas);
}
// Galima paduoti masyvą išmaišymui iš išorės
public static Automobilis[] ismaisyti(Automobilis[] autoBaze,
int kiekis, double isbarstKoef) throws MyException {
if (autoBaze == null) {
throw new IllegalArgumentException("AutoBaze yra null");
}
if (kiekis <= 0) {
throw new MyException(String.valueOf(kiekis), 1);
}
if (autoBaze.length < kiekis) {
throw new MyException(autoBaze.length + " >= " + kiekis, 2);
}
if ((isbarstKoef < 0) || (isbarstKoef > 1)) {
throw new MyException(String.valueOf(isbarstKoef), 3);
}
int likusiuKiekis = autoBaze.length - kiekis;
int pradziosIndeksas = (int) (likusiuKiekis * isbarstKoef / 2);
Automobilis[] pradineAutomobiliuImtis = Arrays.copyOfRange(autoBaze, pradziosIndeksas, pradziosIndeksas + kiekis);
Automobilis[] likusiAutomobiliuImtis = Stream
.concat(Arrays.stream(Arrays.copyOfRange(autoBaze, 0, pradziosIndeksas)),
Arrays.stream(Arrays.copyOfRange(autoBaze, pradziosIndeksas + kiekis, autoBaze.length)))
.toArray(Automobilis[]::new);
Collections.shuffle(Arrays.asList(pradineAutomobiliuImtis)
.subList(0, (int) (pradineAutomobiliuImtis.length * isbarstKoef)));
Collections.shuffle(Arrays.asList(likusiAutomobiliuImtis)
.subList(0, (int) (likusiAutomobiliuImtis.length * isbarstKoef)));
AutoGamyba.pradinisIndeksas = 0;
galinisIndeksas = likusiAutomobiliuImtis.length - 1;
AutoGamyba.automobiliai = likusiAutomobiliuImtis;
return pradineAutomobiliuImtis;
}
public static Automobilis gautiIsBazes() throws MyException {
if ((galinisIndeksas - pradinisIndeksas) < 0) {
throw new MyException(String.valueOf(galinisIndeksas - pradinisIndeksas), 4);
}
// Vieną kartą Automobilis imamas iš masyvo pradžios, kitą kartą - iš galo.
arPradzia = !arPradzia;
return automobiliai[arPradzia ? pradinisIndeksas++ : galinisIndeksas--];
}
}
| [
"justinas.garipovas@gmail.com"
] | justinas.garipovas@gmail.com |
75fe16ae7409c195aa4ac21fed7634df8beec119 | b8158bdb5f9d16f74629049dbcb42b406c930e87 | /src/com/tomhedges/bamboo/model/Neighbourhood.java | 93fec5bc1b45bdd85ac3a2045689308dedacdcdb | [] | no_license | TomHedges/Bamboo | 710b4e6573e9b256108ca7fc017b9d75d182b932 | 9535a5a4e184393f211080e5f29b2aa76825653c | refs/heads/master | 2020-04-06T07:01:20.128158 | 2014-09-15T13:48:20 | 2014-09-15T13:48:20 | 21,538,516 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,959 | java | package com.tomhedges.bamboo.model;
import java.io.Serializable;
import java.util.Random;
import com.tomhedges.bamboo.config.Constants.GroundState;
/**
* Holds a central plot and the array of neighbouring plots
*
* @see MatrixOfPlots
* @see Plot
* @author Tom Hedges
*/
public class Neighbourhood implements Serializable {
private static final long serialVersionUID = 123L;
private Plot centralPlot;
private Plot[] neighbouringPlots;
private int neighbourCounter;
private boolean neighbouringWaterPlot;
private int importedWater;
public Neighbourhood(Plot centralPlot, int numNeighbours) {
this.centralPlot = centralPlot;
neighbouringPlots = new Plot[numNeighbours];
neighbourCounter = 0;
neighbouringWaterPlot = false;
importedWater = 0;
}
public Plot getCentralPlot() {
return centralPlot;
}
public void addNeighbour(Plot neighbour) {
neighbouringPlots[neighbourCounter] = neighbour;
if (neighbour.getGroundState() == GroundState.WATER) {
neighbouringWaterPlot = true;
}
neighbourCounter++;
}
public Plot getNeighbour(int neighbourID) {
return neighbouringPlots[neighbourID];
}
public int getRandomNeighbourWithWaterID() {
int[] neighbourWithWater = new int[neighbouringPlots.length];
int numWithWater = 0;
int loopCounter = 0;
for(Plot neighbour : neighbouringPlots) {
if (neighbour.getWaterLevel() > 0) {
neighbourWithWater[numWithWater] = loopCounter;
numWithWater++;
}
loopCounter++;
}
if (numWithWater>0) {
Random randomGenerator = new Random();
return neighbourWithWater[randomGenerator.nextInt(numWithWater)];
} else {
return -1;
}
}
public int getNeighbourCounter() {
return neighbourCounter;
}
public boolean isNeighbouringWaterPlot() {
return neighbouringWaterPlot;
}
public void setImportedWater(int importedWater) {
this.importedWater = importedWater;
}
public int getImportedWater() {
return importedWater;
}
}
| [
"tom@tomhedges.com"
] | tom@tomhedges.com |
e5e33a3f9d2d1173d84c52b99bf2765a9a4b1b14 | e1e5bd6b116e71a60040ec1e1642289217d527b0 | /H5/L2jMaster_org/L2jMaster_org_2019_07_02/L2JMaster_Server/src/main/java/com/l2jserver/gameserver/model/fishing/L2FishingRod.java | d55fa7791c563431553afd8ca78f971741ba0fe4 | [] | no_license | serk123/L2jOpenSource | 6d6e1988a421763a9467bba0e4ac1fe3796b34b3 | 603e784e5f58f7fd07b01f6282218e8492f7090b | refs/heads/master | 2023-03-18T01:51:23.867273 | 2020-04-23T10:44:41 | 2020-04-23T10:44:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,071 | java | /*
* Copyright (C) 2004-2019 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.model.fishing;
import com.l2jserver.gameserver.model.StatsSet;
/**
* Class for the Fishing Rod object.
* @author nonom
*/
public class L2FishingRod
{
private final int _fishingRodId;
private final int _fishingRodItemId;
private final int _fishingRodLevel;
private final String _fishingRodName;
private final double _fishingRodDamage;
public L2FishingRod(StatsSet set)
{
_fishingRodId = set.getInt("fishingRodId");
_fishingRodItemId = set.getInt("fishingRodItemId");
_fishingRodLevel = set.getInt("fishingRodLevel");
_fishingRodName = set.getString("fishingRodName");
_fishingRodDamage = set.getDouble("fishingRodDamage");
}
/**
* @return the fishing rod Id.
*/
public int getFishingRodId()
{
return _fishingRodId;
}
/**
* @return the fishing rod Item Id.
*/
public int getFishingRodItemId()
{
return _fishingRodItemId;
}
/**
* @return the fishing rod Level.
*/
public int getFishingRodLevel()
{
return _fishingRodLevel;
}
/**
* @return the fishing rod Item Name.
*/
public String getFishingRodItemName()
{
return _fishingRodName;
}
/**
* @return the fishing rod Damage.
*/
public double getFishingRodDamage()
{
return _fishingRodDamage;
}
} | [
"64197706+L2jOpenSource@users.noreply.github.com"
] | 64197706+L2jOpenSource@users.noreply.github.com |
ff6048bc93cbe2f443394b4229778927ed80848d | 08f93e0fdeaf8f50d72c95a50c4d7ccc8eb5515d | /relation-controller/src/main/java/com/zzyy/rs/dao/impl/AccountDaoImpl.java | 1d39731fe9cc094d75fbc3a868574d00d43d8b77 | [] | no_license | zhouyu04/multi-module | 259e73b31094a51591fcc00a5e804b5d352fea13 | 1292753d598ded5049ca510be8a0788a0ec7b173 | refs/heads/master | 2019-07-25T17:41:49.127419 | 2018-01-25T07:02:55 | 2018-01-25T07:02:55 | 85,291,003 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,085 | java | package com.zzyy.rs.dao.impl;
import com.zzyy.rs.dao.AccountDao;
import com.zzyy.rs.entities.Account;
import com.zzyy.rs.entities.TransactionFlow;
import com.zzyy.rs.entities.User;
import com.zzyy.rs.mapper.AccountMapper;
import com.zzyy.rs.mapper.GridMapper;
import com.zzyy.rs.mapper.TransactionFlowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Repository
public class AccountDaoImpl implements AccountDao {
@Autowired
GridMapper gridmapper;
@Autowired
AccountMapper accountMapper;
@Autowired
TransactionFlowMapper transactionFlowMapper;
public Long getTotalElement(Map<String, Object> params) {
return gridmapper.getTotalElement(params);
}
public List<Account> getAccountLists(Map<String, Object> params) {
List<Account> result = gridmapper.getAccountLists(params);
return result;
}
public void batchInsert(List<Account> accounts) {
accountMapper.batchInsert(accounts);
}
public Account findAccountByNameAndMark(Integer id, String rsName, String spell) {
Map<String, Object> params = new HashMap();
params.put("accountId", id);
params.put("rsName", rsName);
params.put("spell", spell);
Account account = gridmapper.findAccountByNameAndMark(params);
return account;
}
public void insertAccount(Account account) {
accountMapper.insert(account);
}
public void updateAccount(Account account) {
accountMapper.updateByPrimaryKey(account);
}
public Account findAccountById(Integer id) {
Account result = accountMapper.selectByPrimaryKey(id);
return result;
}
public void addTransactionFlow(TransactionFlow transactionFlow) {
transactionFlowMapper.insert(transactionFlow);
}
public User findUserAccountByUsername(String username) {
return gridmapper.findUserAccountByUsername(username);
}
}
| [
"zhouyu"
] | zhouyu |
8eec920d65dc23af5f0d79fa5c1bd80f90a4ce7b | 7aac6049546e481c5dbd5c2c2a4a55da83537561 | /SurveyClient/src/main/java/uk/ac/ncl/openlab/intake24/client/survey/rules/InformMealComplete.java | 4a3888d6ee5f3027bc43c70b33329808ce2dafc6 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | MRC-Epid-it24/survey-frontend | 4b5b655ac6753d93677da9fc6a1c4b4e709311db | 5af855dac464f3ff2c37e6256c716f15b04d226a | refs/heads/master | 2023-09-02T03:02:19.266764 | 2023-08-24T09:11:56 | 2023-08-24T09:11:56 | 216,760,730 | 0 | 1 | Apache-2.0 | 2022-11-16T09:29:59 | 2019-10-22T08:21:02 | Java | UTF-8 | Java | false | false | 1,318 | java | /*
This file is part of Intake24.
© Crown copyright, 2012, 2013, 2014.
This software is licensed under the Open Government Licence 3.0:
http://www.nationalarchives.gov.uk/doc/open-government-licence/
*/
package uk.ac.ncl.openlab.intake24.client.survey.rules;
import org.pcollections.PSet;
import org.workcraft.gwt.shared.client.Option;
import uk.ac.ncl.openlab.intake24.client.survey.*;
import uk.ac.ncl.openlab.intake24.client.survey.prompts.MealCompletePrompt;
import uk.ac.ncl.openlab.intake24.client.survey.prompts.MealOperation;
public class InformMealComplete implements PromptRule<Meal, MealOperation> {
@Override
public Option<Prompt<Meal, MealOperation>> apply(final Meal state, SelectionMode selectionType, PSet<String> surveyFlag) {
if (state.freeEntryComplete() && selectionType == SelectionMode.MANUAL_SELECTION)
return new Option.Some<Prompt<Meal, MealOperation>>(new MealCompletePrompt(state));
else
return new Option.None<Prompt<Meal, MealOperation>>();
}
@Override
public String toString() {
return "Meal complete";
}
public static WithPriority<PromptRule<Meal, MealOperation>> withPriority(int priority) {
return new WithPriority<PromptRule<Meal, MealOperation>>(new InformMealComplete(), priority);
}
} | [
"ivan.poliakov@ncl.ac.uk"
] | ivan.poliakov@ncl.ac.uk |
65515752481217cdba0d2d7591e9c138dac193e2 | af79541a629bec8a4f72b55711c59e3c3aa070da | /testData/siosio/doma/inspection/dao/BatchInsertDao.java | 3fe50817196b31b7dc8bb1fc3efbb9982f25bc94 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | siosio/DomaSupport | 753fa040294f6a682f2bb05ef79ae860e33f4616 | 11e6751b8b1c3a4b1edca8642ba5b8d0558139c1 | refs/heads/develop | 2023-08-31T14:59:18.630315 | 2023-08-27T09:11:43 | 2023-08-27T09:11:43 | 26,792,004 | 24 | 5 | MIT | 2023-08-26T12:23:59 | 2014-11-18T04:31:48 | Kotlin | UTF-8 | Java | false | false | 2,581 | java | package dao;
import org.seasar.doma.*;
import org.seasar.doma.jdbc.*;
import entity.*;
import java.util.*;
@Dao
public interface BatchInsertDao {
// デフォルトSQLファイルは不要
@BatchInsert
int[] SQLファイル不要(List<MutableEntity> entities);
// 明示的にSQLファイルの不要設定を
@BatchInsert(sqlFile = false)
int[] SQLファイル不要2(List<MutableEntity> entities);
// SQLが必要な場合でSQLファイルがある場合
@BatchInsert(sqlFile = true)
int[] SQLファイルあり(List<MutableEntity> entities);
// SQLが必要な場合でSQLファイルがない場合
@BatchInsert(sqlFile = true)
int[] <error descr="SQLファイルがありません。">SQLファイルなし</error>(
List<MutableEntity> entities);
@BatchInsert
int[] パラメータ数不正_ゼロ<error descr="指定できるパラメータ数は1つです。">()</error>;
@BatchInsert
int[] パラメータ数不正_複数<error descr="指定できるパラメータ数は1つです。">(List<String> p1, List<String>p2)</error>;
@BatchInsert
int[] 引数がIterableではない<error descr="引数にはIterableのサブタイプで要素にEntityを指定してください。">(String error)</error>;
@BatchInsert
int[] 引数のListの型パラメータがEntityでない<error descr="引数にはIterableのサブタイプで要素にEntityを指定してください。">(List<String> error)</error>;
@BatchInsert(sqlFile = true)
int[] SQLファイルありで引数がIterableではない<error descr="引数にはIterableのサブタイプを指定してください。">(String error)</error>;
@BatchInsert(sqlFile = true)
int[] SQLファイルありで引数がIterableではないその2<error descr="引数にはIterableのサブタイプを指定してください。">(Map error)</error>;
@BatchInsert()
<error descr="戻り値は更新件数を示すint[]にしてください。">BatchResult<MutableEntity></error> MutableEntityを引数に取る場合の戻り値の型がint配列でない場合(List<MutableEntity> entities);
@BatchInsert()
BatchResult<ImmutableEntity> ImmutableEntityが引数で戻りがBatchResultの場合(List<ImmutableEntity> entities);
@BatchInsert()
<error descr="戻り値はBatchResult<entity.ImmutableEntity>にしてください。">int[]</error> ImmutableEntityが引数で戻りがBatchResultではない場合(List<ImmutableEntity> entities);
}
| [
"siosio12@gmail.com"
] | siosio12@gmail.com |
560875af1e8067d29216263bbf34bfff6ac4bab4 | 251f1967298485d6043002e6ffaadbf7e6eeb37b | /src/main/java/com/guoyasoft/topic/collection/Collection.java | ba5eccec23885e7b13d8653d25cf604961084ab6 | [] | no_license | LudvikWoo/guoya-test | ebe6339e6de9fc574eb24f14632aeca40c4424b0 | 4659c8e27190bf16b9c5f3f412af7929e3df619f | refs/heads/master | 2021-04-03T04:56:17.317554 | 2018-09-02T15:52:44 | 2018-09-02T15:52:44 | 124,404,051 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,530 | java | package com.guoyasoft.topic.collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.guoyasoft.tools.csv.CSVReader;
public class Collection {
Map<String, String> vars = new HashMap<String, String>();
public void userDefinedVariable() {
vars.put("userName", "guoya");
vars.put("password", "123456");
}
@Test
public void httpRequest(String method,String protocal,String ip,String port,String context,String params) {
String url =method+" "+protocal+ "://"+method+":"+port+"/guoya-cient/login.action?userName="
+ vars.get("userName") + "&password=" + vars.get("password");
}
@BeforeMethod
public void preProcessor(){
}
@AfterMethod
public void postProcess(){
}
public void debugSimple(){
Iterator<Map.Entry<String, String>> iterator=vars.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry<String, String> item=iterator.next();
System.out.println(item.getKey()+"="+item.getValue());
}
}
public void testCsv(){
Object[][] datas=CSVReader.readCSV("C:\testJmeterCsv.csv");
for(int i=0;i<datas.length;i++){
vars.put("userName", (String) datas[i][0]);
String password=(String) datas[i][1];
String checkCode=(String) datas[i][3];
String request="GET http://www.guoyasoft.com:8080/guoya-client/login.action?userName="+vars.get("userName")+"&password="+password+"&checkCode="+checkCode;
}
}
}
| [
"LudvikWoo@users.noreply.github.com"
] | LudvikWoo@users.noreply.github.com |
26d03e7bc4ce3021963bf685b5153cff1e2e79ec | dafec4798a091a0ef82a465331c7b691ee3a9409 | /StructuralDesignPatternsPersonalTraining/src/com/georgidinov/composite/Professor.java | f5c6ef75a99fb22f61c860630ba96e4067977a09 | [] | no_license | GeorgiDinov/DesignPatternsTrainingProjects | 4eb76093133968ee33952931891c52941a3cddac | b70f655ed81e3921446a586e7fcde30a73f372f1 | refs/heads/master | 2022-06-30T22:00:39.444067 | 2020-05-11T05:56:24 | 2020-05-11T05:56:24 | 262,793,003 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 810 | java | package com.georgidinov.composite;
//Class which plays Leaf Node(with no children) in our composite design pattern
//Mind that there is no data structure that can hold Faculty objects
class Professor implements Faculty {
private final String name;
private final String position;
private final String phoneNumber;
public Professor(String name, String position, String phoneNumber) {
this.name = name;
this.position = position;
this.phoneNumber = phoneNumber;
}//end of constructor
@Override
public String getDetails() {
return "Name: " + this.name +
", Position: " + this.position +
", Phone Number: " + this.phoneNumber;
}//end of method getDetails
}//end of leaf node class Professor
| [
"noreply@github.com"
] | GeorgiDinov.noreply@github.com |
6b10ed10a4c126836f4db49345b2e0af1e97dba1 | e582ea167660b25fbda58343de18307325306edf | /src/AST/NodoAtributo.java | 809a391221143acbc3713e431e096d719d3afde6 | [] | no_license | kique182/Interprete | 2b0647bde022cac0e9d3884c6f0b0e006da5f5e2 | 7232fc9500544a10e417f0938391fed55cd84bfb | refs/heads/master | 2021-01-12T14:07:07.234116 | 2016-10-06T15:16:53 | 2016-10-06T15:16:53 | 70,166,184 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 744 | 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 AST;
import paquete.Token;
/**
*
* @author Xmnz
*/
public class NodoAtributo extends NodoBase{
Token alias;
public NodoAtributo(Token valor,NodoBase hermano) {
super(valor);
this.setHijoIzquierdo(hermano);
}
public NodoAtributo(Token valor) {
super(valor);
this.setHijoIzquierdo(null);
}
public NodoAtributo(Token alias,Token valor) {
super(valor);
this.alias=alias;
this.setHijoIzquierdo(null);
}
}
| [
"kique182@gmail.com"
] | kique182@gmail.com |
593b286f34ec89f49742b0ca43ea916b99a20932 | 267f26a22b638936f1558e18b2e5ac13c7a6beca | /FacadePattern/Main.java | 0f575e109d203a2338d6f80b7a0fba743be1b284 | [] | no_license | chaojen/practice-design-patterns | 6b11a8067c5e867c1e0c0e1f15c9a17fd110e299 | 5e454f854b613b7410710d56380471ecf083e2c5 | refs/heads/master | 2023-08-31T09:28:18.646166 | 2017-04-11T03:07:49 | 2017-04-11T03:07:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 161 | java | import pagemaker.PageMaker;
public class Main {
public static void main(String[] args) {
PageMaker.makeWelcomePage("hyuki@hyuki.com", "Welcome.html");
}
} | [
"chao.jen.main@gmail.com"
] | chao.jen.main@gmail.com |
acd70bd953ac4e14a851661ae0f30fd5778b3de8 | 1ff5cb4cfab1374c9e614e7f188f9296aeeddb99 | /src/main/java/com/joaquin/model/UserEntity.java | 4b1b126f9b2c2ece5dc3e0161e1852da224229ab | [] | no_license | panverde/mapstruct-springboot | 2aebfa90f1e3c0218d104cee536b44e03889dfa3 | 3bb5e8f9cc637ab96e09a9073d727ce396758115 | refs/heads/master | 2020-08-24T23:10:01.225780 | 2019-10-22T22:58:51 | 2019-10-22T22:58:51 | 216,924,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,271 | java | package com.joaquin.model;
/**
* Created by Adam_Skowron on 3/10/2017.
*/
public class UserEntity {
private long id;
private String username;
private String firstName;
private String lastName;
private AddressEntity address;
public UserEntity(long id, String username, String firstName, String lastName, AddressEntity address) {
this.id = id;
this.username = username;
this.firstName = firstName;
this.lastName = lastName;
this.address = address;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public AddressEntity getAddress() {
return address;
}
public void setAddress(AddressEntity address) {
this.address = address;
}
}
| [
"jhuauyaa@everis.com"
] | jhuauyaa@everis.com |
0e8f8ae78ebba12b56243e91c85a76e467104e8f | 45197824cdf5d90d4d96f899e78e79fba99bbfc9 | /src/main/java/pl/recipeproject/recipeproject/commands/CategoryCommand.java | 59902f992fdc5f80abfbe1171c0de3d07fd8969e | [] | no_license | arkadiuszomyla/recipe-project | 29d8196badf5b2a43476cac05c607e5264707478 | e235e7d0ac32c5cebf724bd65cb9a990bf2e60bc | refs/heads/master | 2021-03-12T07:43:05.002347 | 2020-03-20T07:45:59 | 2020-03-20T07:45:59 | 246,602,422 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 249 | java | package pl.recipeproject.recipeproject.commands;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Setter
@Getter
@NoArgsConstructor
public class CategoryCommand {
private Long id;
private String description;
}
| [
"arkadiusz.omyla@exaco.pl"
] | arkadiusz.omyla@exaco.pl |
f5e01f58318caedf3e93248e3dfbf2e15a25c643 | c6002ddd885bf68b8adf6d99d78f861b05e28aa7 | /Course4/week2/EfficientSortStarterProgram/TitleLastAndMagnitudeComparator.java | f2a390d2d55b4a827905024527cbf3edb0939179 | [] | no_license | AkashYadav256/DukeJava | f4c2f08bb35c6c510920f6e8cd46157710dd5625 | cf019c18bcc08953c2f5d71435d7b60a3226d66c | refs/heads/master | 2023-02-08T09:13:13.049957 | 2021-01-02T10:05:10 | 2021-01-02T10:05:10 | 264,956,235 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 676 | java | import java.util.*;
import java.lang.*;
import edu.duke.*;
public class TitleLastAndMagnitudeComparator implements Comparator<QuakeEntry>{
public int compare (QuakeEntry q1, QuakeEntry q2) {
String t1 = q1.getInfo();
String t2 = q2.getInfo();
if (t1.substring(t1.lastIndexOf(" ")+1).compareTo(t2.substring(t2.lastIndexOf(" ")+1)) < 0) {
return -1;
}
else if (t1.substring(t1.lastIndexOf(" ")+1).compareTo(t2.substring(t2.lastIndexOf(" ")+1)) > 0) {
return 1;
}
else {
if (q1.getMagnitude() < q2.getMagnitude()) {
return -1;
}
else if (q1.getMagnitude() > q2.getMagnitude()) {
return 1;
}
else {return 0;}
}
//return 0;
}
}
| [
"akash.58@gmx.co.uk"
] | akash.58@gmx.co.uk |
b39554bc85d7ab882bc2a04db88d60210cdf47e1 | 3a00f3fda0e4bde8533d57217192f9074312cc21 | /src/lection30_DateApi/Task4.java | b6fb5a6f131850605fe1a9a3b11e6d11aca1f67b | [] | no_license | CotRod/JC1_Rodnoy | 1143062d740d9321e79954c34d256ff9973883b3 | 5c51a187d544e3106d0850ca5b3d177783187fcb | refs/heads/master | 2020-06-18T05:46:22.707201 | 2019-08-03T12:47:45 | 2019-08-03T12:47:45 | 196,184,566 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 329 | java | package lection30_DateApi;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
public class Task4 {
public static void main(String[] args) {
String d = "26-04-2014";
LocalDate date = LocalDate.parse(d, DateTimeFormatter.ofPattern("dd-MM-yyyy"));
System.out.println(date);
}
}
| [
"kotrod@gmail.com"
] | kotrod@gmail.com |
6e1777f018e0815b265b4dce36bc6aef49660974 | 70218729ac74d714b19fa0ff7bca21894083f6d5 | /src/main/java/main/Main.java | df5c6e1be848a1527d67b3a1733d16147d065aaa | [] | no_license | Bublebub/ohtu-viikko1 | 7e8a1cf367b733bbf60109948137bdccd211318a | 0a08a1b12fd4c0d51746308ba97665a9143f1f07 | refs/heads/master | 2021-08-23T06:02:50.809235 | 2017-12-03T19:52:30 | 2017-12-03T19:53:53 | 109,394,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 137 | java | package main;
public class Main {
public static void main(String[] args) {
System.out.println("testi");
}
}
| [
"elmeri.lehikoinen@gmail.com"
] | elmeri.lehikoinen@gmail.com |
ac96c997d2e278761ed156851594b761e7f5d717 | 74ba0e62c725896a815e4156752cd2be740fe937 | /src/mx/edu/cesba/Login2.java | a442f2c2d231fbcc5f3fe9fa357535495eaa7812 | [] | no_license | ganc914/SoccerShop | 38fbc0af1b15270178cf0523f68ea2929dbd2cb4 | 16cfd17fdba9c9ebf424c30d76686fe0a0ff15fb | refs/heads/master | 2023-05-30T07:03:27.070314 | 2021-06-09T22:44:00 | 2021-06-09T22:44:00 | 375,506,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,337 | 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 mx.edu.cesba;
import javax.swing.JOptionPane;
/**
*
* @author gusta
*/
public class Login2 extends javax.swing.JFrame {
/**
* Creates new form Login2
*/
public Login2() {
initComponents();
this.setLocationRelativeTo(null);
this.setTitle("Login Access Page");
this.setResizable(false);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
et1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
et2 = new javax.swing.JPasswordField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagen2/logotienda.jpg"))); // NOI18N
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel2.setText("USUARIO");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel3.setText("CONTRASEÑA");
jButton1.setText("LOGIN");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(60, 60, 60)
.addComponent(jLabel1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel3))
.addGap(27, 27, 27)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(et1, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)
.addComponent(et2))
.addGap(18, 18, 18)
.addComponent(jButton1)))
.addContainerGap(19, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(36, 36, 36)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(et1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(et2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3)))
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(24, 87, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
String User = "GUS";
String PW = "1995";
String pwd = new String(et2.getPassword());
if (et1.getText().equals(User) && pwd.equals(PW)) {
JOptionPane.showMessageDialog(null, "Entrando al sistema");
Menu2 menu = new Menu2();
menu.setVisible(true);
this.dispose();
} else {
JOptionPane.showMessageDialog(null, "Datos Incorrectos", "ERROR", JOptionPane.ERROR_MESSAGE);
et1.setText("");
et2.setText("");
}
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Login2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Login2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Login2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Login2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login2().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField et1;
private javax.swing.JPasswordField et2;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}
| [
"gusta@LAPTOP-LJC53O8C"
] | gusta@LAPTOP-LJC53O8C |
a0612cec5b7b3c22a9b01e8c7e36f6301a0ff277 | 69cc9fbfd71d1a4ef99056207d37da9363e2f156 | /src/main/java/edu/usfca/cs/dfs/utilities/Worker.java | 6187d035c333bbc052ad6e744678733ef063d10c | [] | no_license | hetuo/DFS | 36d3e518a8bab56dc5d6f97b190c5d808cd248ee | 13f21c8b70f5b3a59cd6b08964aa717cb195c64d | refs/heads/master | 2021-09-01T22:51:31.527408 | 2017-12-29T02:02:16 | 2017-12-29T02:02:16 | 115,675,397 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 877 | java | package edu.usfca.cs.dfs.utilities;
import edu.usfca.cs.dfs.utilities.StorageMessages;
import edu.usfca.cs.dfs.network.NioServer;
import java.net.Socket;
import java.nio.channels.SocketChannel;
/**
* Created by tuo on 23/09/17.
*/
public abstract class Worker implements Runnable{
public String hostName;
public Socket socket;
public int chunkId;
public String md5;
public String filename;
public byte[] data;
public Worker(String hostName){this.hostName = hostName;}
public void setSocket(Socket socket){
this.socket = socket;
}
public abstract void getStoreChunkMsg(StorageMessages.StorageMessageWrapper msgWrapper);
public abstract void getRetrieveFileMsg(StorageMessages.StorageMessageWrapper msgWrapper);
public abstract void processData(NioServer server, SocketChannel socket, byte[] data, int count);
}
| [
"the8@dons.usfca.edu"
] | the8@dons.usfca.edu |
dade1b19e4de9067b2de55fd54cb87a441ca2fef | cce8064a22918b1e7982f456df5189ec80bbc594 | /testebuscape/src/testebuscape/viagemaofundodomar/comum/Utils.java | 3fc2280c593bd4d30860654baa47604cc3789287 | [] | no_license | evandrocluz/viagemaofundodomar | 71ac9aa5bd587ba9318c80c8eb9ff0edd8546d61 | 8339e05efb0e8e5ba766b44f9261600b6590e271 | refs/heads/master | 2021-01-20T10:51:19.338092 | 2017-08-28T17:55:01 | 2017-08-28T17:55:01 | 101,653,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 513 | java | package testebuscape.viagemaofundodomar.comum;
import testebuscape.viagemaofundodomar.eixo.Eixo;
/**
* Classe de métodos utilitários
*
* @author Evandro Luz
*
*/
public class Utils {
/**
* Define valor para o eixo
*
* @param eixo
* objeto eixo a ser atribuido o valor
* @param novoValor
* valor inteiro a ser atribuido ao eixo
*/
public static void setNovoValorRota(final Eixo eixo, final int novoValor) {
eixo.setValor(novoValor);
}
}
| [
"evandroluz@yahoo.com.br"
] | evandroluz@yahoo.com.br |
0f05bca98a6a7ce8445ad0a6f14b774ecfc42aa0 | 29770e9fe5d0f407e066927d60f1f4b4b3b34fcc | /src/main/java/filter/ProdutoFilter.java | 8dc869309467e3122e0ac02836b321d509b560c6 | [] | no_license | iranalyf/SistemaControleVenda | bb6b2bbc992cfa39f1d012c38fe3f06f06130568 | 08cf4365907c3499ac4a90a2b6943626a02fd2af | refs/heads/master | 2020-04-10T17:13:38.237762 | 2016-09-17T14:37:17 | 2016-09-17T14:37:17 | 68,434,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 585 | java | package filter;
import java.io.Serializable;
public class ProdutoFilter implements Serializable {
private static final long serialVersionUID = 1L;
private String codigoProduto;
private String nome;
public String getCodigoProduto() {
return codigoProduto;
}
public void setCodigoProduto(String codigoProduto) {
// se for nulo etribua null, caso contrario passe para maiusculo
this.codigoProduto = codigoProduto == null ? null : codigoProduto.toUpperCase();
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}
| [
"iranalyf2222@gmail.com"
] | iranalyf2222@gmail.com |
d7fa6272ac479029ae4f94edc781eca70741aa50 | 391094f38b71c8ee2cbe463c696a2694675c87c2 | /wineshop-admin/wineshop-admin-service/src/main/java/com/blueteam/wineshop/service/GoodsAttrServiceImpl.java | 10a011b069491515947d2ef091094ff23bc8263f | [] | no_license | 459642792/tax | 6b0ea9dcef0a04f8668a5b6e810ac8c34a195d7c | ea10e83c8accb0225fbeb2dc60f647d8b39b2332 | refs/heads/master | 2020-03-25T08:24:20.622105 | 2018-08-05T12:46:03 | 2018-08-05T12:46:03 | 143,610,714 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,742 | java | package com.blueteam.wineshop.service;
import com.blueteam.entity.dto.AttrDTO;
import com.blueteam.entity.dto.AttrValueSearchDTO;
import com.blueteam.entity.dto.PageResult;
import com.blueteam.entity.po.AttrInfoPO;
import com.blueteam.entity.po.AttrValInfoPO;
import com.blueteam.wineshop.mapper.GoodsAttrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* Created by NastyNas on 2017/10/16.
*/
@Service
public class GoodsAttrServiceImpl implements GoodsAttrService {
@Autowired
GoodsAttrMapper goodsAttrMapper;
@Override
public List<Map> listAttrType() {
List<Map> attrTypeList = goodsAttrMapper.listAttrType();
return attrTypeList;
}
@Override
public List listAttrCode(Integer attrTypeId) {
List<Map> attrCodeList = goodsAttrMapper.listAttrCode(attrTypeId);
return attrCodeList;
}
@Override
public PageResult<List<Map>> listAttrValue(AttrValueSearchDTO attrValueSearchDTO) {
Integer count = goodsAttrMapper.countAttrValue(attrValueSearchDTO);
List<Map> attrValueList = goodsAttrMapper.listAttrValue(attrValueSearchDTO);
PageResult pageResult = new PageResult<>();
pageResult.setCount(count);
pageResult.setList(attrValueList);
return pageResult;
}
@Override
public Map getAttrInfo(String attrCode) {
Map attrInfoMap = goodsAttrMapper.getAttrInfo(attrCode);
return attrInfoMap;
}
@Override
public Integer countAttrValueName(String attrCode, String attrValueName) {
Integer attrValueCount = goodsAttrMapper.countAttrValueName(attrCode, attrValueName);
return attrValueCount;
}
@Override
public Map getExistentMaxValue(String attrCode) {
Map maxValueIndex = goodsAttrMapper.getExistentMaxValue(attrCode);
return maxValueIndex;
}
@Override
public Integer saveAttrValue(AttrValInfoPO attrValInfoPO) {
return goodsAttrMapper.saveAttrValue(attrValInfoPO);
}
@Override
public Integer countGoodsAttrValueCode(String attrValueCode) {
return goodsAttrMapper.countGoodsAttrValueCode(attrValueCode);
}
@Override
public Map getAttrValueInfo(String attrCode, String attrValueCode, Integer operateTag) {
return goodsAttrMapper.getAttrValueInfo(attrCode, attrValueCode, operateTag);
}
@Override
public Integer updateAttrValueInfo(AttrValInfoPO attrValInfoPO) {
return goodsAttrMapper.updateAttrValueInfo(attrValInfoPO);
}
@Override
public Integer removeAttrValueInfo(AttrValInfoPO attrValInfoPO) {
return goodsAttrMapper.removeAttrValueInfo(attrValInfoPO);
}
@Override
public List<Map> listAttrInfoByParentCode(Integer goodsTypeId, List<String> searchAttrList) {
return goodsAttrMapper.listAttrInfoByParentCode(goodsTypeId, searchAttrList);
}
@Override
public List<Map> listAttrInfo(Integer goodsTypeId, Integer attrListType) {
return goodsAttrMapper.listAttrInfo(goodsTypeId, attrListType);
}
@Override
public Integer countAttr(Integer goodsType, Integer attrListType) {
return goodsAttrMapper.countAttr(goodsType, attrListType);
}
@Override
public List<AttrInfoPO> listAttrInfoByDTO(List<AttrDTO> baseAttrList, Integer goodsType, Integer attrListType) {
return goodsAttrMapper.listAttrInfoByDTO(baseAttrList, goodsType, attrListType);
}
@Override
public List<AttrValInfoPO> listAttrValueInfoByDTO(List<AttrDTO> selectBaseAttrList) {
return goodsAttrMapper.listAttrValueInfoByDTO(selectBaseAttrList);
}
}
| [
"mialxiaojiang@sina.com"
] | mialxiaojiang@sina.com |
48be200f042ff44ab35cd4bed6f507b07bee0526 | 9c3200781a4cfb51aef559f38724cccb7130fd98 | /PortalAstral/src/java/Numerologia.java | 343785e520c93b95cd673bbb1612df2ec3434588 | [] | no_license | rafaelhss/PSW1_2018 | c8f4b7611cfcaa8f82ce7f867a76a5f88ec7d8fd | f4b29b6d5505f8c00eeb46703cd05317c5854032 | refs/heads/master | 2021-04-26T23:28:55.192978 | 2018-06-12T01:22:35 | 2018-06-12T01:22:35 | 124,002,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,504 | 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.
*/
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author rafael.soares
*/
public class Numerologia extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet Numerologia</title>");
out.println("</head>");
out.println("<body>");
String nomeDoUser = request.getParameter("nome");
int num = 0;
//calculo maluco
//para cada letra do nome
for (int i = 0; i < nomeDoUser.length(); i++) {
char c = nomeDoUser.charAt(i);
//transformar a letra em numero
int aux = Character.getNumericValue(c) - 9;
//acumular o valor na variavel num
num = num + aux;
}
out.println("<h1>Seu numero da sorte eh "+ num +"</h1>");
out.println("</body>");
out.println("</html>");
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"noreply@github.com"
] | rafaelhss.noreply@github.com |
4ead8cee756e4e165946ca9eca79837ab8fe2850 | 0bff529c184813c9d38e67287dc09314679ea150 | /components/registry/org.wso2.carbon.registry.jcr/src/main/java/org/wso2/carbon/registry/jcr/query/qom/RegistryStaticOperand.java | 13c7d2aa7f1cbce6236caa6ed0e915341e2bded0 | [
"Apache-2.0"
] | permissive | wso2/carbon-registry | 06083122c9f56bc82d917cbea2baad6c64d78757 | 16d853878e79b833e17842c24eda684d6ac5684a | refs/heads/master | 2023-09-05T02:46:42.536411 | 2023-07-27T06:26:02 | 2023-07-27T06:26:02 | 16,100,959 | 44 | 195 | Apache-2.0 | 2023-08-10T04:37:32 | 2014-01-21T11:42:25 | Java | UTF-8 | Java | false | false | 801 | java | /*
* Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) 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 org.wso2.carbon.registry.jcr.query.qom;
import javax.jcr.query.qom.StaticOperand;
public class RegistryStaticOperand implements StaticOperand {
}
| [
"eranda@wso2.com"
] | eranda@wso2.com |
f35c9d7ba0f6aaa8b62cd41d927c5fbd99970837 | d01d09603892f976d6a084936c219cdf084760ae | /ese/util/src/main/java/com/sourcetrace/eses/txn/agrocert/FarmerFailedQuestions.java | 3c4b1d90974498a7170c01cbce09d5d0626ac649 | [] | no_license | designreuse/FarmCropRepo | 881d8b0807a32a2c82791828054b21ad250c5db5 | 2bd19f43d1d3b5ed71a613e4ab6b02a6e8c4d434 | refs/heads/master | 2022-12-15T10:56:22.533913 | 2020-09-13T14:13:41 | 2020-09-13T14:13:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,606 | java | /*
* FarmerFailedQuestions.java
* Copyright (c) 2013-2014, SourceTrace Systems, All Rights Reserved.
*
* This software is the confidential and proprietary information of SourceTrace Systems
* ("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
* SourceTrace Systems.
*/
package com.sourcetrace.eses.txn.agrocert;
/**
* The Class FarmerFailedQuestions.
*/
public class FarmerFailedQuestions {
private long id;
private String farmerId;
private String serialNo;
private String questionName;
private long failedCount;
private String userName;
private String branchId;
/**
* Gets the id.
*
* @return the id
*/
public long getId() {
return id;
}
/**
* Sets the id.
*
* @param id
* the new id
*/
public void setId(long id) {
this.id = id;
}
/**
* Gets the farmer id.
*
* @return the farmer id
*/
public String getFarmerId() {
return farmerId;
}
/**
* Sets the farmer id.
*
* @param farmerId
* the new farmer id
*/
public void setFarmerId(String farmerId) {
this.farmerId = farmerId;
}
/**
* Gets the serial no.
*
* @return the serial no
*/
public String getSerialNo() {
return serialNo;
}
/**
* Sets the serial no.
*
* @param serialNo
* the new serial no
*/
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
/**
* Gets the question name.
*
* @return the question name
*/
public String getQuestionName() {
return questionName;
}
/**
* Sets the question name.
*
* @param questionName
* the new question name
*/
public void setQuestionName(String questionName) {
this.questionName = questionName;
}
/**
* Gets the failed count.
*
* @return the failed count
*/
public long getFailedCount() {
return failedCount;
}
/**
* Sets the failed count.
*
* @param failedCount
* the new failed count
*/
public void setFailedCount(long failedCount) {
this.failedCount = failedCount;
}
/**
* Gets the user name.
*
* @return the user name
*/
public String getUserName() {
return userName;
}
/**
* Sets the user name.
*
* @param userName
* the new user name
*/
public void setUserName(String userName) {
this.userName = userName;
}
public String getBranchId() {
return branchId;
}
public void setBranchId(String branchId) {
this.branchId = branchId;
}
}
| [
"kishore@zirius.in"
] | kishore@zirius.in |
4b82cdd5f8a8d94e94f6c543349e9e740088aad2 | 629bd42449a0a425d765c39ab9fc7a5e8fc7cb67 | /src/main/java/com/googe/ssadm/sc/mappers/ClientMapper.java | 4a91d6b82ded9a070598fd1afabd02234bc01582 | [] | no_license | trykopa/ServiceCenterCRM | cd8780f712a5c28cd539812486fb1d679657bb00 | 431ad8d9912981fc793435310e7334a26d0a43c5 | refs/heads/master | 2022-11-29T21:34:39.549938 | 2020-08-19T15:49:55 | 2020-08-19T15:49:55 | 288,694,263 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package com.googe.ssadm.sc.mappers;
import com.googe.ssadm.sc.dto.ClientDTO;
import com.googe.ssadm.sc.entity.Client;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Component;
@Mapper(componentModel = "spring")
@Component
public interface ClientMapper {
ClientDTO toClientDTO(Client client);
Client toClient(ClientDTO clientDTO);
}
| [
"ssadmin@gmail.com"
] | ssadmin@gmail.com |
ba6bd224a05139e0e2dedfe2a61fe6c923b819ee | eca3d65c1075624fb78e522217bf8bc31e5e1235 | /app/src/main/java/com/bupt/weeat/ui/activity/CreatePostActivity.java | 53dd00c46d022a1343225873db5c74092d820d40 | [] | no_license | shuixingge/WeEat | d3d2ceae7453afdbf13440c86483c17ba5eedd93 | c8105176b7ef6647d8d92f74ee17be736aaec3e9 | refs/heads/master | 2021-01-01T04:51:17.022395 | 2016-12-25T10:08:23 | 2016-12-25T10:08:23 | 56,290,768 | 75 | 12 | null | null | null | null | UTF-8 | Java | false | false | 10,423 | java | package com.bupt.weeat.ui.activity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.bupt.weeat.R;
import com.bupt.weeat.model.entity.Post;
import com.bupt.weeat.model.entity.User;
import com.bupt.weeat.utils.LogUtils;
import com.bupt.weeat.utils.ToastUtils;
import com.squareup.picasso.Picasso;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import butterknife.Bind;
import butterknife.OnClick;
import cn.bmob.v3.BmobUser;
import cn.bmob.v3.datatype.BmobFile;
import cn.bmob.v3.listener.SaveListener;
import cn.bmob.v3.listener.UploadFileListener;
import rx.Observable;
import rx.Observer;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
public class CreatePostActivity extends BaseActivity {
private static final int REQUEST_CODE_ALBUM = 1;
private static final int REQUEST_CODE_CAMERA = 2;
private File PhotoFile;
private String mCurrentPhotoPath;
User user;
private String imageUri;
@Bind(R.id.post_image_list)
LinearLayout imageList;
@Bind(R.id.select_picture)
TextView select_picture;
@Bind(R.id.take_picture)
TextView take_picture;
@Bind(R.id.pic1)
ImageView pic1;
@Bind(R.id.comment_content_et)
EditText commentContent;
@Bind(R.id.toolbar)
Toolbar toolbar;
private static final String TAG = CreatePostActivity.class.getSimpleName();
@Override
public int getLayoutId() {
return R.layout.create_post_activity;
}
@Override
protected void initData() {
super.initData();
LogUtils.i(TAG, "onCreate");
user = BmobUser.getCurrentUser(this, User.class);
initToolbar();
dynamicAddSkinEnableView(toolbar, "background", R.color.colorPrimary);
}
private void initToolbar() {
setSupportActionBar(toolbar);
setTitle("发帖");
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
}
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
@Override
public void setListener() {
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.new_post_activity_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.send_new_post) {
final String postContent = commentContent.getText().toString().trim();
if (postContent.isEmpty()) {
ToastUtils.showToast(this, R.string.no_empty_content, Toast.LENGTH_SHORT);
} else {
Observable.create(new Observable.OnSubscribe<String>() {
@Override
public void call(Subscriber<? super String> subscriber) {
if (imageUri == null) {
publishPostNoImage(postContent, null);
} else {
publishPost(postContent);
}
subscriber.onNext(postContent);
subscriber.onCompleted();
}
}).subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<String>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(String s) {
}
});
}
}
return true;
}
@Override
public void onBackPressed() {
LogUtils.i(TAG, "back to square fragment");
super.onBackPressed();
}
@OnClick({R.id.take_picture, R.id.select_picture})
public void onClick(View v) {
switch (v.getId()) {
case R.id.take_picture:
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
try {
PhotoFile = createImageFile();
LogUtils.i(TAG, "" + PhotoFile);
} catch (IOException e) {
e.printStackTrace();
}
if (PhotoFile != null) {
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(PhotoFile));
startActivityForResult(takePictureIntent, REQUEST_CODE_CAMERA);
}
}
break;
case R.id.select_picture:
Intent selectPictureIntent = new Intent(Intent.ACTION_PICK);
selectPictureIntent.setType("image/*");
startActivityForResult(Intent.createChooser(selectPictureIntent,
"Select Picture"), REQUEST_CODE_ALBUM);
break;
default:
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
switch (requestCode) {
case REQUEST_CODE_ALBUM:
LogUtils.i(TAG, "onActivityResult" + REQUEST_CODE_ALBUM);
if (data != null) {
Uri originalUri = data.getData();
imageUri = getRealPathFromUri(originalUri);
LogUtils.i(TAG, imageUri);
imageList.setVisibility(View.VISIBLE);
Picasso.with(this)
.load(Uri.parse("file://" + imageUri))
.centerCrop()
.resize(60, 60)
.into(pic1);
}
break;
case REQUEST_CODE_CAMERA:
LogUtils.i(TAG, "onActivityResult" + REQUEST_CODE_CAMERA);
galleryAddPic();
Uri originalUri = data.getData();
String targetUri = getRealPathFromUri(originalUri);
imageList.setVisibility(View.VISIBLE);
Picasso.with(this)
.load(targetUri)
.centerCrop()
.resize(60, 60)
.into(pic1);
break;
default:
break;
}
}
}
public String getRealPathFromUri(Uri contentUri) {
String[] projection = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(contentUri, projection, null, null, null);
int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
String realPath = cursor.getString(columnIndex);
cursor.close();
return realPath;
}
public File createImageFile() throws IOException {
String timeStamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()).format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
File imageStorageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File imageFile = File.createTempFile(imageFileName, ".jpg", imageStorageDir);
mCurrentPhotoPath = imageFile.getAbsolutePath();
return imageFile;
}
public void galleryAddPic() {
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
File f = new File(mCurrentPhotoPath);
Uri contentUri = Uri.fromFile(f);
mediaScanIntent.setData(contentUri);
this.sendBroadcast(mediaScanIntent);
}
public void publishPost(final String commentContent) {
final BmobFile imageFile = new BmobFile(new File(imageUri));
imageFile.upload(context, new UploadFileListener() {
@Override
public void onSuccess() {
ToastUtils.showToast(CreatePostActivity.this, R.string.upload_image_success, Toast.LENGTH_SHORT);
publishPostNoImage(commentContent, imageFile);
onBackPressed();
}
@Override
public void onFailure(int i, String s) {
ToastUtils.showToast(CreatePostActivity.this, R.string.upload_image_fail, Toast.LENGTH_SHORT);
}
});
}
public void publishPostNoImage(String commentContent, BmobFile imageFile) {
final Post post = new Post();
User user = BmobUser.getCurrentUser(context, User.class);
post.setAuthor(user);
post.setPraiseNum(0);
post.setCommentNum(0);
post.setShareNum(0);
post.setMyPraise(false);
post.setContent(commentContent);
if (imageFile != null) {
post.setPostImageFile(imageFile);
}
post.save(this, new SaveListener() {
@Override
public void onSuccess() {
ToastUtils.showToast(CreatePostActivity.this, R.string.upload_post_success, Toast.LENGTH_SHORT);
onBackPressed();
}
@Override
public void onFailure(int i, String s) {
ToastUtils.showToast(CreatePostActivity.this, R.string.upload_post_fail, Toast.LENGTH_SHORT);
}
});
}
}
| [
"1491402735@qq.com"
] | 1491402735@qq.com |
a5660076e5f1b09812eb61b6b33207533fb869fd | 422b26f798eb58b6cff64e39b7804dca4387e631 | /src/main/java/com/korlan/jhipster/domain/Job.java | db94162ad1ddf2fe6190feaa955cf9430a577c41 | [] | no_license | koorlan/jhipster | 7faa1e4cf51ec507902e0769946b5ebbe77273ad | 3f0f6b768c5c159f1ec3bc3ce1eed6942e048092 | refs/heads/master | 2020-04-17T15:00:18.526316 | 2019-01-20T16:42:36 | 2019-01-20T16:42:36 | 166,681,264 | 0 | 0 | null | 2019-01-20T16:42:37 | 2019-01-20T16:11:18 | Java | UTF-8 | Java | false | false | 3,844 | java | package com.korlan.jhipster.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A Job.
*/
@Entity
@Table(name = "job")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Job implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "job_title")
private String jobTitle;
@Column(name = "min_salary")
private Long minSalary;
@Column(name = "max_salary")
private Long maxSalary;
@ManyToOne
@JsonIgnoreProperties("jobs")
private Employee employee;
@ManyToMany
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JoinTable(name = "job_task",
joinColumns = @JoinColumn(name = "jobs_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "tasks_id", referencedColumnName = "id"))
private Set<Task> tasks = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getJobTitle() {
return jobTitle;
}
public Job jobTitle(String jobTitle) {
this.jobTitle = jobTitle;
return this;
}
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
public Long getMinSalary() {
return minSalary;
}
public Job minSalary(Long minSalary) {
this.minSalary = minSalary;
return this;
}
public void setMinSalary(Long minSalary) {
this.minSalary = minSalary;
}
public Long getMaxSalary() {
return maxSalary;
}
public Job maxSalary(Long maxSalary) {
this.maxSalary = maxSalary;
return this;
}
public void setMaxSalary(Long maxSalary) {
this.maxSalary = maxSalary;
}
public Employee getEmployee() {
return employee;
}
public Job employee(Employee employee) {
this.employee = employee;
return this;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
public Set<Task> getTasks() {
return tasks;
}
public Job tasks(Set<Task> tasks) {
this.tasks = tasks;
return this;
}
public Job addTask(Task task) {
this.tasks.add(task);
task.getJobs().add(this);
return this;
}
public Job removeTask(Task task) {
this.tasks.remove(task);
task.getJobs().remove(this);
return this;
}
public void setTasks(Set<Task> tasks) {
this.tasks = tasks;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Job job = (Job) o;
if (job.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), job.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Job{" +
"id=" + getId() +
", jobTitle='" + getJobTitle() + "'" +
", minSalary=" + getMinSalary() +
", maxSalary=" + getMaxSalary() +
"}";
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b2ecd05b3f60cb8674f6cf093c16c26a842222d1 | b5523513feef755ecb1496146093f5906956875d | /detail/MinimumWindowSubstring.java | 2ae610e51bf63408116fad63e1c77f037f2bf2ee | [] | no_license | lvfangmin/algorithms | b4fe59dee026e161abf5267d5d7dc3a509d9bbf4 | 7eec450a514c770639f2f0d4a22296a709756326 | refs/heads/master | 2020-02-26T14:59:57.088189 | 2015-01-31T14:57:56 | 2015-01-31T14:57:56 | 26,350,764 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,921 | java | /**
* Given a string S and a string T, find the minimum window in S which will
* contain all the characters in T in complexity O(n).
*
* For example,
* S = "ADOBECODEBANC"
* T = "ABC"
* Minimum window is "BANC".
*
* Note:
* If there is no such window in S that covers all characters in T, return the
* emtpy string "".
*
* If there are multiple such windows, you are guaranteed that there will
* always be only one unique minimum window in S.
*/
public class Solution {
// memo character count in T in map,
// scan S from left to right, memo the occurrence of character in T
// in another map, when reach the size of T, which mean s find all
// characters in T, shrink the left most index to find the minimum
// window which contains all T.
//
// continue scan and shrink till end.
public String minWindow(String S, String T){
if (S == null || T == null) {
return "";
}
int[] count = new int[256];
int tLen = T.length();
for (int i = 0; i < tLen; i++) {
count[T.charAt(i)]++;
}
int sLen = S.length();
int start = 0;
int cur = 0;
int[] got = new int[256];
int total = 0;
int min = Integer.MAX_VALUE;
String result = "";
while (cur < sLen) {
char c = S.charAt(cur);
if (got[c] < count[c]) {
total++;
}
got[c]++;
while (start < cur) {
char s = S.charAt(start);
if (count[s] >= got[s]) {
break;
}
got[s]--;
start++;
}
if (total == tLen && cur - start + 1 < min) {
min = cur - start + 1;
result = S.substring(start, cur + 1);
}
cur++;
}
return result;
}
}
| [
"20921128@zju.edu.cn"
] | 20921128@zju.edu.cn |
18ddf1c91feb1d838e3120d1d912b5a4ccfe8970 | 93710e02bb24ebd5756550e018734d3a4729060f | /app/src/main/java/com/creatokids/hajwithibraheem/Global/GlobalVars.java | 71ef10bc627c3310fca129135de0bb7d48c35f1d | [] | no_license | MahmoudAymann/mHajj | 1c7fee482bfeb58d7421d4b88bf12cd075302b4c | 8bb871707140dbedfe3210124b1f871d08c58dae | refs/heads/master | 2020-03-25T04:07:06.776305 | 2018-08-03T03:58:35 | 2018-08-03T03:58:35 | 143,378,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,930 | java | package com.creatokids.hajwithibraheem.Global;
import android.location.Location;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.creatokids.hajwithibraheem.Models.IMix;
import com.creatokids.hajwithibraheem.R;
import java.util.Random;
/**
* Created by AmrWinter on 06/02/2018.
*/
public class GlobalVars {
public static final int isFinalTimeout = 1000;
public static final int RECORD_REQUEST_CODE = 101;
public static final int TYPE_MSG_SENDER_STUDENT = 1;
public static final int TYPE_MSG_SENDER_JACKBOT = 2;
public static final int ON_SCREEN_WATSON_IMAGE = 1;
public static final int ON_SCREEN_YOUTUBE = 2;
public static final int ON_SCREEN_SIMULATION = 3;
public static final int ON_SCREEN_CHAT = 4;
public static final int ON_SCREEN_VIDEO_AVATAR = 5;
public static final int ON_SCREEN_JACK_AVATAR = 6;
public static final int FRAGMENT_CHAT = 1;
public static final int FRAGMENT_AVATAR = 2;
public static final int FRAGMENT_VIDEO = 3;
public static final int FRAGMENT_YOUTUBE = 20;
public static final int FRAGMENT_IMAGE = 5;
public static final int FRAGMENT_SIMULATION = 6;
public static final int FRAGMENT_FEEDBACK = 7;
public static final int TYPE_IMAGE = 1;
public static final int TYPE_YOUTUBE = 2;
public static final int TYPE_SPEAKING = 3;
// public static final mixType DEFAULT_VIEW_AVATAR = FRAGMENT_AVATAR;
// public static final mixType DEFAULT_VIEW_CHAT = FRAGMENT_CHAT;
public static final String initIntent = "initIntent";
public static boolean isTtsWorking = false;
public static boolean isDeviceOnline = true;
public static boolean isMicrophoneActive = false;
public static final String dummyTalkPath = "android.resource://" + "com.creatokids.hajwithibraheem"
+ "/" + R.raw.avatar_video_1;
// TODO: 03/08/2018 Haj
public static Location mLastKnownLocation;
// ============ Global Lists =============== //
private static final int [] thinkingList = {1};
@NonNull
public static String thinkingPath = "android.resource://" + /*PackageName*/ "com.creatokids.hajwithibraheem" + "/" +
thinkingList[new Random().nextInt(thinkingList.length)];
// ============ Global Variables =============== //
@Nullable
public static IMix mix;
// ============ Global Types =============== //
public enum searchType {
imageSearch,
wikiPedia;
public String getSearchType(searchType type){
String engineID;
switch (type){
case imageSearch:
engineID = "nlzpdxge6eo"; // ID of custom image search engine
break;
case wikiPedia:
engineID = "j4pkltrduli"; // ID of custom image search engine
break;
default:
engineID = "nlzpdxge6eo"; // the default value is the image type
}
return engineID;
}
}
public enum mixType {
none,
imageLocal,
imageLocalWithText,
imageURL,
videoYoutube,
videoURL,
videoURLWithText,
videoLocalWithSound,
videoLocal,
videoLocalWithText,
simulation,
webResult,
map,
defaultAvatar
}
public enum nextIs {
none,
newItem,
playSound,
askingUser,
userAnswer,
feedback,
suggestNewTopic
}
public enum fromView {
chatActivity,
introActivity,
newChatActivity,
noInternetActivity,
testingActivity,
videoActivity,
avatarFragment,
avatarFragment2,
chatAreaFragment,
imageFragment,
simulationFragment,
videoFragment,
youtubeFragment
}
}
| [
"AmrWinter.Work@gmail.com"
] | AmrWinter.Work@gmail.com |
99f33db3a0f7d165080e50e4b9aa672e066e7041 | fae8d729f8f1d503fb875957f102d8936e631b7b | /ValidParenthesis.java | e2dde15a14d2a69e53479569d4cdcd9755762169 | [] | no_license | prady91/PracticeJava | 1413adbe58a6cf4ff84a434816efc3bf721f401b | 4c82fe1bc8013fe4151675bffcd791f770643684 | refs/heads/master | 2020-03-19T09:26:29.432383 | 2019-03-15T03:42:10 | 2019-03-15T03:42:10 | 136,289,027 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,277 | java | import java.util.*;
import java.util.stream.Collectors;
/**
* Created by pradyumna on 6/5/18.
*/
public class ValidParenthesis {
public boolean isValidParenthesis(String s) {
if (s == null || s.isEmpty()) {
return true;
}
Set<Character> parSet = "[]{}()".chars().mapToObj(c -> (char)c).collect(Collectors.toSet());
Map<Character, Character> parenthesisMap = new HashMap<>();
parenthesisMap.put('[', ']');
parenthesisMap.put('(', ')');
parenthesisMap.put('{', '}');
Stack<Character> parStack = new Stack<>();
for (Character ch : s.toCharArray()) {
if (!parSet.contains(ch)) {
continue;
}
if (parenthesisMap.containsKey(ch)) {
parStack.push(ch);
} else if (!parStack.isEmpty() && parenthesisMap.get(parStack.peek()).equals(ch)) {
parStack.pop();
} else {
return false;
}
}
return parStack.isEmpty();
}
public static void main(String[] args) {
ValidParenthesis validParenthesis = new ValidParenthesis();
String str = "[a,b](c)";
System.out.println(validParenthesis.isValidParenthesis(str));
}
}
| [
"pradyumnareddy09@gmail.com"
] | pradyumnareddy09@gmail.com |
3c3b73281f195d044d139a4c5fe0eda553515b6f | 45d645a0f684f6ccb69e5fc69a56db97c79076b3 | /lemon-test/src/main/java/com/hisun/lemon/demo3/dto/UserRspDTO.java | f9037d1bf1e1d6014934246cbe6da04d6e5b5326 | [] | no_license | learndockering/framework | fe1826f86d15a6ec01c1b532f09b214d80fd571d | 0e28e71ef9285e9335be32cec86eb2c290cbca5c | refs/heads/master | 2020-03-18T03:51:50.856813 | 2018-04-24T03:08:32 | 2018-04-24T03:08:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,277 | java | package com.hisun.lemon.demo3.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;
import com.hisun.lemon.framework.data.GenericRspDTO;
import com.hisun.lemon.framework.data.NoBody;
/**
* User 传输对象
* @author yuzhou
* @date 2017年6月14日
* @time 上午9:27:30
*
*/
@ApiModel(value="UserRspDTO", description="响应用户传输对象")
public class UserRspDTO extends GenericRspDTO<NoBody>{
@ApiModelProperty(value="姓名", required= true)
@NotEmpty(message="DM310001")
private String name;
@ApiModelProperty(value="年龄", required= true)
@Range(min=0,max=150,message="DM310002")
private Integer age;
@ApiModelProperty(value="出生日期", required= true)
@NotNull(message="DM310003")
private LocalDate birthday;
@ApiModelProperty(value="性别", required= true, allowableValues="男,女")
@Pattern(regexp="男|女",message="DM310004")
private String sex;
@ApiModelProperty(value="分页查询-第几页", required= false)
private Integer pageNum;
@ApiModelProperty(value="分页查询-每页数据条数", required= false)
private Integer pageSize;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public LocalDate getBirthday() {
return birthday;
}
public void setBirthday(LocalDate birthday) {
this.birthday = birthday;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
| [
"luomeng@9fbank.com.cn"
] | luomeng@9fbank.com.cn |
1e104b533196f6136b741980b45e2b60405b83d8 | a13ab684732add3bf5c8b1040b558d1340e065af | /java7-src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java | 51b3ee6e3af059b1a281125c43a730382f3dc7ff | [] | no_license | Alivop/java-source-code | 554e199a79876343a9922e13ccccae234e9ac722 | f91d660c0d1a1b486d003bb446dc7c792aafd830 | refs/heads/master | 2020-03-30T07:21:13.937364 | 2018-10-25T01:49:39 | 2018-10-25T01:51:38 | 150,934,150 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 69,445 | java | /*
* Copyright (c) 2011-2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2004 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.
*/
/*
* $Id: XSLTErrorResources_zh_TW.java,v 1.2.4.1 2005/09/13 11:19:31 pvedula Exp $
*/
package com.sun.org.apache.xalan.internal.res;
import java.util.ListResourceBundle;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
* Set up error messages.
* We build a two dimensional array of message keys and
* message strings. In order to add a new message here,
* you need to first add a String constant. And
* you need to enter key , value pair as part of contents
* Array. You also need to update MAX_CODE for error strings
* and MAX_WARNING for warnings ( Needed for only information
* purpose )
*/
public class XSLTErrorResources_zh_TW extends ListResourceBundle
{
/*
* This file contains error and warning messages related to Xalan Error
* Handling.
*
* General notes to translators:
*
* 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
* components.
* XSLT is an acronym for "XML Stylesheet Language: Transformations".
* XSLTC is an acronym for XSLT Compiler.
*
* 2) A stylesheet is a description of how to transform an input XML document
* into a resultant XML document (or HTML document or text). The
* stylesheet itself is described in the form of an XML document.
*
* 3) A template is a component of a stylesheet that is used to match a
* particular portion of an input document and specifies the form of the
* corresponding portion of the output document.
*
* 4) An element is a mark-up tag in an XML document; an attribute is a
* modifier on the tag. For example, in <elem attr='val' attr2='val2'>
* "elem" is an element name, "attr" and "attr2" are attribute names with
* the values "val" and "val2", respectively.
*
* 5) A namespace declaration is a special attribute that is used to associate
* a prefix with a URI (the namespace). The meanings of element names and
* attribute names that use that prefix are defined with respect to that
* namespace.
*
* 6) "Translet" is an invented term that describes the class file that
* results from compiling an XML stylesheet into a Java class.
*
* 7) XPath is a specification that describes a notation for identifying
* nodes in a tree-structured representation of an XML document. An
* instance of that notation is referred to as an XPath expression.
*
*/
/*
* Static variables
*/
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
"ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
"ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT";
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
"ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
"ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
"ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
"ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
"ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
public static final String ER_NULL_CHILD = "ER_NULL_CHILD";
public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB";
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
"ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
public static final String ER_PROCESS_NOT_SUCCESSFUL =
"ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
public static final String ER_ENCODING_NOT_SUPPORTED =
"ER_ENCODING_NOT_SUPPORTED";
public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
"ER_COULD_NOT_CREATE_TRACELISTENER";
public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
"ER_KEY_REQUIRES_NAME_ATTRIB";
public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
"ER_KEY_REQUIRES_MATCH_ATTRIB";
public static final String ER_KEY_REQUIRES_USE_ATTRIB =
"ER_KEY_REQUIRES_USE_ATTRIB";
public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
"ER_REQUIRES_ELEMENTS_ATTRIB";
public static final String ER_MISSING_PREFIX_ATTRIB =
"ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
public static final String ER_STYLESHEET_INCLUDES_ITSELF =
"ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
"ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
"ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
"ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
public static final String ER_FAILED_PROCESS_STYLESHEET =
"ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
public static final String ER_COULDNT_FIND_FRAGMENT =
"ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
"ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
"ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
"ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
public static final String ER_XMLSPACE_ILLEGAL_VALUE =
"ER_XMLSPACE_ILLEGAL_VALUE";
public static final String ER_NO_XSLKEY_DECLARATION =
"ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
"ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
"ER_NOT_ALLOWED_INSIDE_STYLESHEET";
public static final String ER_RESULTNS_NOT_SUPPORTED =
"ER_RESULTNS_NOT_SUPPORTED";
public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
"ER_DEFAULTSPACE_NOT_SUPPORTED";
public static final String ER_INDENTRESULT_NOT_SUPPORTED =
"ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
"ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
public static final String ER_MISPLACED_XSLOTHERWISE =
"ER_MISPLACED_XSLOTHERWISE";
public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
"ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
"ER_NOT_ALLOWED_INSIDE_TEMPLATE";
public static final String ER_UNKNOWN_EXT_NS_PREFIX =
"ER_UNKNOWN_EXT_NS_PREFIX";
public static final String ER_IMPORTS_AS_FIRST_ELEM =
"ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
"ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
"ER_CURRENCY_SIGN_ILLEGAL";
public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
"ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
"ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
"ER_REDIRECT_COULDNT_GET_FILENAME";
public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
"ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
"ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
public static final String ER_MISSING_ARG_FOR_OPTION =
"ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
public static final String ER_MALFORMED_FORMAT_STRING =
"ER_MALFORMED_FORMAT_STRING";
public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
"ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
"ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
"ER_NO_APPLY_IMPORT_IN_FOR_EACH";
public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
"ER_CANT_USE_DTM_FOR_OUTPUT";
public static final String ER_CANT_USE_DTM_FOR_INPUT =
"ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_INVALID_UTF16_SURROGATE =
"ER_INVALID_UTF16_SURROGATE";
public static final String ER_XSLATTRSET_USED_ITSELF =
"ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
"ER_IN_ELEMTEMPLATEELEM_READOBJECT";
public static final String ER_DUPLICATE_NAMED_TEMPLATE =
"ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
"ER_ILLEGAL_DOMSOURCE_INPUT";
public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
"ER_CLASS_NOT_FOUND_FOR_OPTION";
public static final String ER_REQUIRED_ELEM_NOT_FOUND =
"ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
public static final String ER_SOURCE_CANNOT_BE_NULL =
"ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
public static final String ER_CANNOT_CREATE_EXTENSN =
"ER_CANNOT_CREATE_EXTENSN";
public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
"ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
public static final String ER_ELEMENT_NAME_METHOD_STATIC =
"ER_ELEMENT_NAME_METHOD_STATIC";
public static final String ER_EXTENSION_FUNC_UNKNOWN =
"ER_EXTENSION_FUNC_UNKNOWN";
public static final String ER_MORE_MATCH_CONSTRUCTOR =
"ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
public static final String ER_INVALID_CONTEXT_PASSED =
"ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
public static final String ER_POOL_SIZE_LESSTHAN_ONE =
"ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
public static final String ER_ILLEGAL_XMLSPACE_VALUE =
"ER_ILLEGAL_XMLSPACE_VALUE";
public static final String ER_PROCESSFROMNODE_FAILED =
"ER_PROCESSFROMNODE_FAILED";
public static final String ER_RESOURCE_COULD_NOT_LOAD =
"ER_RESOURCE_COULD_NOT_LOAD";
public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
"ER_BUFFER_SIZE_LESSTHAN_ZERO";
public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
"ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
"ER_ELEM_CONTENT_NOT_ALLOWED";
public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
"ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
public static final String ER_COULD_NOT_LOAD_RESOURCE =
"ER_COULD_NOT_LOAD_RESOURCE";
public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
"ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
public static final String ER_RESULT_COULD_NOT_BE_SET =
"ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
"ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
"ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
public static final String ER_NO_STYLESHEET_IN_MEDIA =
"ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
public static final String ER_PROPERTY_VALUE_BOOLEAN =
"ER_PROPERTY_VALUE_BOOLEAN";
public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
"ER_COULD_NOT_FIND_EXTERN_SCRIPT";
public static final String ER_RESOURCE_COULD_NOT_FIND =
"ER_RESOURCE_COULD_NOT_FIND";
public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
"ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
public static final String ER_FAILED_CREATING_ELEMLITRSLT =
"ER_FAILED_CREATING_ELEMLITRSLT";
public static final String ER_VALUE_SHOULD_BE_NUMBER =
"ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
public static final String ER_FAILED_CALLING_METHOD =
"ER_FAILED_CALLING_METHOD";
public static final String ER_FAILED_CREATING_ELEMTMPL =
"ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
public static final String ER_ATTRIB_VALUE_NOT_FOUND =
"ER_ATTRIB_VALUE_NOT_FOUND";
public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
"ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
public static final String ER_CANNOT_FIND_SAX1_DRIVER =
"ER_CANNOT_FIND_SAX1_DRIVER";
public static final String ER_SAX1_DRIVER_NOT_LOADED =
"ER_SAX1_DRIVER_NOT_LOADED";
public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
"ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
"ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
"ER_PARSER_PROPERTY_NOT_SPECIFIED";
public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
"ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
public static final String ER_NO_DRIVER_NAME_SPECIFIED =
"ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
public static final String ER_POOLSIZE_LESS_THAN_ONE =
"ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
"ER_ASSERT_NO_TEMPLATE_PARENT";
public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
"ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
public static final String ER_NOT_ALLOWED_IN_POSITION =
"ER_NOT_ALLOWED_IN_POSITION";
public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
"ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
"ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
"ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
"ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
"ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN";
public static final String INVALID_NCNAME = "INVALID_NCNAME";
public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN";
public static final String INVALID_NUMBER = "INVALID_NUMBER";
public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL";
public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR";
public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR";
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
public static final String ER_FUNCTION_NOT_FOUND =
"ER_FUNCTION_NOT_FOUND";
public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
"ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
"ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
"ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
"ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
"WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
"WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
"WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
"WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
public static final String WG_FUNCTIONS_SHOULD_USE_URL =
"WG_FUNCTIONS_SHOULD_USE_URL";
public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
"WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
"WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
public static final String WG_SPECIFICITY_CONFLICTS =
"WG_SPECIFICITY_CONFLICTS";
public static final String WG_PARSING_AND_PREPARING =
"WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
public static final String WG_NO_DECIMALFORMAT_DECLARATION =
"WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
"WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
"WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
public static final String WG_COULD_NOT_RESOLVE_PREFIX =
"WG_COULD_NOT_RESOLVE_PREFIX";
public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
"WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
"WG_ILLEGAL_ATTRIBUTE_NAME";
public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
"WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
"WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
"WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
"WG_ILLEGAL_ATTRIBUTE_POSITION";
public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
* Now fill in the message text.
* Then fill in the message text for that message code in the
* array. Use the new error code as the index into the array.
*/
// Error messages...
/** Get the lookup table for error messages.
*
* @return The message lookup table.
*/
public Object[][] getContents()
{
return new Object[][] {
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
{ ER_NO_CURLYBRACE,
"\u932F\u8AA4: \u8868\u793A\u5F0F\u4E2D\u4E0D\u53EF\u6709 '{'"},
{ ER_ILLEGAL_ATTRIBUTE ,
"{0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
"sourceNode \u5728 xsl:apply-imports \u4E2D\u662F\u7A7A\u503C\uFF01"},
{ER_CANNOT_ADD,
"\u7121\u6CD5\u65B0\u589E {0} \u81F3 {1}"},
{ ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode \u5728 handleApplyTemplatesInstruction \u4E2D\u662F\u7A7A\u503C\uFF01"},
{ ER_NO_NAME_ATTRIB,
"{0} \u5FC5\u9808\u6709\u540D\u7A31\u5C6C\u6027\u3002"},
{ER_TEMPLATE_NOT_FOUND,
"\u627E\u4E0D\u5230\u4E0B\u5217\u540D\u7A31\u7684\u6A23\u677F: {0}"},
{ER_CANT_RESOLVE_NAME_AVT,
"\u7121\u6CD5\u89E3\u6790 xsl:call-template \u4E2D\u7684\u540D\u7A31 AVT\u3002"},
{ER_REQUIRES_ATTRIB,
"{0} \u9700\u8981\u5C6C\u6027: {1}"},
{ ER_MUST_HAVE_TEST_ATTRIB,
"{0} \u5FC5\u9808\u6709 ''test'' \u5C6C\u6027\u3002"},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"\u932F\u8AA4\u7684\u503C\u4F4D\u65BC\u5C64\u6B21\u5C6C\u6027: {0}"},
{ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction \u540D\u7A31\u4E0D\u53EF\u70BA 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
"processing-instruction \u540D\u7A31\u5FC5\u9808\u662F\u6709\u6548\u7684 NCName: {0}"},
{ ER_NEED_MATCH_ATTRIB,
"{0} \u82E5\u5177\u6709\u6A21\u5F0F\uFF0C\u5247\u5FC5\u9808\u6709\u914D\u5C0D\u5C6C\u6027\u3002"},
{ ER_NEED_NAME_OR_MATCH_ATTRIB,
"{0} \u9700\u8981\u540D\u7A31\u6216\u914D\u5C0D\u5C6C\u6027\u3002"},
{ER_CANT_RESOLVE_NSPREFIX,
"\u7121\u6CD5\u89E3\u6790\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC: {0}"},
{ ER_ILLEGAL_VALUE,
"xml:space \u5177\u6709\u7121\u6548\u503C: {0}"},
{ ER_NO_OWNERDOC,
"\u5B50\u9805\u7BC0\u9EDE\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"},
{ ER_ELEMTEMPLATEELEM_ERR,
"ElemTemplateElement \u932F\u8AA4: {0}"},
{ ER_NULL_CHILD,
"\u5617\u8A66\u65B0\u589E\u7A7A\u503C\u5B50\u9805\uFF01"},
{ ER_NEED_SELECT_ATTRIB,
"{0} \u9700\u8981\u9078\u53D6\u5C6C\u6027\u3002"},
{ ER_NEED_TEST_ATTRIB ,
"xsl:when \u5FC5\u9808\u5177\u6709 'test' \u5C6C\u6027\u3002"},
{ ER_NEED_NAME_ATTRIB,
"xsl:with-param \u5FC5\u9808\u5177\u6709 'name' \u5C6C\u6027\u3002"},
{ ER_NO_CONTEXT_OWNERDOC,
"\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"},
{ER_COULD_NOT_CREATE_XML_PROC_LIAISON,
"\u7121\u6CD5\u5EFA\u7ACB XML TransformerFactory Liaison: {0}"},
{ER_PROCESS_NOT_SUCCESSFUL,
"Xalan: \u8655\u7406\u4F5C\u696D\u5931\u6557\u3002"},
{ ER_NOT_SUCCESSFUL,
"Xalan: \u5931\u6557\uFF01"},
{ ER_ENCODING_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4\u7DE8\u78BC: {0}"},
{ER_COULD_NOT_CREATE_TRACELISTENER,
"\u7121\u6CD5\u5EFA\u7ACB TraceListener: {0}"},
{ER_KEY_REQUIRES_NAME_ATTRIB,
"xsl:key \u9700\u8981 'name' \u5C6C\u6027\uFF01"},
{ ER_KEY_REQUIRES_MATCH_ATTRIB,
"xsl:key \u9700\u8981 'match' \u5C6C\u6027\uFF01"},
{ ER_KEY_REQUIRES_USE_ATTRIB,
"xsl:key \u9700\u8981 'use' \u5C6C\u6027\uFF01"},
{ ER_REQUIRES_ELEMENTS_ATTRIB,
"(StylesheetHandler) {0} \u9700\u8981 ''elements'' \u5C6C\u6027\uFF01"},
{ ER_MISSING_PREFIX_ATTRIB,
"(StylesheetHandler) \u907A\u6F0F {0} \u5C6C\u6027 ''prefix''"},
{ ER_BAD_STYLESHEET_URL,
"\u6A23\u5F0F\u8868 URL \u932F\u8AA4: {0}"},
{ ER_FILE_NOT_FOUND,
"\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\u6A94\u6848: {0}"},
{ ER_IOEXCEPTION,
"\u6A23\u5F0F\u8868\u6A94\u6848\u767C\u751F IO \u7570\u5E38\u72C0\u6CC1: {0}"},
{ ER_NO_HREF_ATTRIB,
"(StylesheetHandler) \u627E\u4E0D\u5230 {0} \u7684 href \u5C6C\u6027"},
{ ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u5305\u542B\u672C\u8EAB\uFF01"},
{ ER_PROCESSINCLUDE_ERROR,
"StylesheetHandler.processInclude \u932F\u8AA4\uFF0C{0}"},
{ ER_MISSING_LANG_ATTRIB,
"(StylesheetHandler) \u907A\u6F0F {0} \u5C6C\u6027 ''lang''"},
{ ER_MISSING_CONTAINER_ELEMENT_COMPONENT,
"(StylesheetHandler) {0} \u5143\u7D20\u7684\u4F4D\u7F6E\u932F\u8AA4\uFF1F\u907A\u6F0F\u5BB9\u5668\u5143\u7D20 ''component''"},
{ ER_CAN_ONLY_OUTPUT_TO_ELEMENT,
"\u53EA\u80FD\u8F38\u51FA\u81F3 Element\u3001DocumentFragment\u3001Document \u6216 PrintWriter\u3002"},
{ ER_PROCESS_ERROR,
"StylesheetRoot.process \u932F\u8AA4"},
{ ER_UNIMPLNODE_ERROR,
"UnImplNode \u932F\u8AA4: {0}"},
{ ER_NO_SELECT_EXPRESSION,
"\u932F\u8AA4\uFF01\u627E\u4E0D\u5230 xpath \u9078\u53D6\u8868\u793A\u5F0F (-select)\u3002"},
{ ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"\u7121\u6CD5\u5E8F\u5217\u5316 XSLProcessor\uFF01"},
{ ER_NO_INPUT_STYLESHEET,
"\u672A\u6307\u5B9A\u6A23\u5F0F\u8868\u8F38\u5165\uFF01"},
{ ER_FAILED_PROCESS_STYLESHEET,
"\u7121\u6CD5\u8655\u7406\u6A23\u5F0F\u8868\uFF01"},
{ ER_COULDNT_PARSE_DOC,
"\u7121\u6CD5\u5256\u6790 {0} \u6587\u4EF6\uFF01"},
{ ER_COULDNT_FIND_FRAGMENT,
"\u627E\u4E0D\u5230\u7247\u6BB5: {0}"},
{ ER_NODE_NOT_ELEMENT,
"\u7247\u6BB5 ID \u6307\u5411\u7684\u7BC0\u9EDE\u4E0D\u662F\u5143\u7D20: {0}"},
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each \u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"},
{ ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"\u6A23\u677F\u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
"\u6C92\u6709\u6587\u4EF6\u7247\u6BB5\u7684\u8907\u88FD\uFF01"},
{ ER_CANT_CREATE_ITEM,
"\u7121\u6CD5\u5728\u7D50\u679C\u6A39\u72C0\u7D50\u69CB\u4E2D\u5EFA\u7ACB\u9805\u76EE: {0}"},
{ ER_XMLSPACE_ILLEGAL_VALUE,
"\u4F86\u6E90 XML \u4E2D\u7684 xml:space \u5177\u6709\u7121\u6548\u503C: {0}"},
{ ER_NO_XSLKEY_DECLARATION,
"{0} \u6C92\u6709 xsl:key \u5BA3\u544A\uFF01"},
{ ER_CANT_CREATE_URL,
"\u932F\u8AA4\uFF01\u7121\u6CD5\u70BA {0} \u5EFA\u7ACB url"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"\u4E0D\u652F\u63F4 xsl:functions"},
{ ER_PROCESSOR_ERROR,
"XSLT TransformerFactory \u932F\u8AA4"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) \u6A23\u5F0F\u8868\u5167\u4E0D\u5141\u8A31 {0}\uFF01"},
{ ER_RESULTNS_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u63F4 result-ns\uFF01\u8ACB\u6539\u7528 xsl:output\u3002"},
{ ER_DEFAULTSPACE_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u63F4 default-space\uFF01\u8ACB\u6539\u7528 xsl:strip-space \u6216 xsl:preserve-space\u3002"},
{ ER_INDENTRESULT_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u63F4 indent-result\uFF01\u8ACB\u6539\u7528 xsl:output\u3002"},
{ ER_ILLEGAL_ATTRIB,
"(StylesheetHandler) {0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"},
{ ER_UNKNOWN_XSL_ELEM,
"\u4E0D\u660E\u7684 XSL \u5143\u7D20: {0}"},
{ ER_BAD_XSLSORT_USE,
"(StylesheetHandler) xsl:sort \u53EA\u80FD\u8207 xsl:apply-templates \u6216 xsl:for-each \u4E00\u8D77\u4F7F\u7528\u3002"},
{ ER_MISPLACED_XSLWHEN,
"(StylesheetHandler) xsl:when \u4F4D\u7F6E\u932F\u8AA4\uFF01"},
{ ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE,
"(StylesheetHandler) xsl:when \u7684\u7236\u9805\u4E0D\u662F xsl:choose\uFF01"},
{ ER_MISPLACED_XSLOTHERWISE,
"(StylesheetHandler) xsl:otherwise \u4F4D\u7F6E\u932F\u8AA4\uFF01"},
{ ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE,
"(StylesheetHandler) xsl:otherwise \u7684\u7236\u9805\u4E0D\u662F xsl:choose\uFF01"},
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) \u6A23\u677F\u5167\u4E0D\u5141\u8A31 {0}\uFF01"},
{ ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) \u4E0D\u660E\u7684 {0} \u64F4\u5145\u5957\u4EF6\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC {1}"},
{ ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) \u532F\u5165\u53EA\u80FD\u767C\u751F\u65BC\u6A23\u5F0F\u8868\u4E2D\u7684\u7B2C\u4E00\u500B\u5143\u7D20\uFF01"},
{ ER_IMPORTING_ITSELF,
"(StylesheetHandler) {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u532F\u5165\u672C\u8EAB\uFF01"},
{ ER_XMLSPACE_ILLEGAL_VAL,
"(StylesheetHandler) xml:space \u5177\u6709\u7121\u6548\u503C: {0}"},
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet \u5931\u6557\uFF01"},
{ ER_SAX_EXCEPTION,
"SAX \u7570\u5E38\u72C0\u6CC1"},
// add this message to fix bug 21478
{ ER_FUNCTION_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4\u51FD\u6578\uFF01"},
{ ER_XSLT_ERROR,
"XSLT \u932F\u8AA4"},
{ ER_CURRENCY_SIGN_ILLEGAL,
"\u683C\u5F0F\u6A23\u5F0F\u5B57\u4E32\u4E2D\u4E0D\u5141\u8A31\u8CA8\u5E63\u7B26\u865F"},
{ ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM,
"Stylesheet DOM \u4E2D\u4E0D\u652F\u63F4\u6587\u4EF6\u51FD\u6578\uFF01"},
{ ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER,
"\u7121\u6CD5\u89E3\u6790\u975E\u524D\u7F6E\u78BC\u89E3\u6790\u5668\u7684\u524D\u7F6E\u78BC\uFF01"},
{ ER_REDIRECT_COULDNT_GET_FILENAME,
"\u91CD\u5C0E\u64F4\u5145\u5957\u4EF6: \u7121\u6CD5\u53D6\u5F97\u6A94\u6848\u540D\u7A31 - \u6A94\u6848\u6216\u9078\u53D6\u5C6C\u6027\u5FC5\u9808\u50B3\u56DE\u6709\u6548\u5B57\u4E32\u3002"},
{ ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT,
"\u7121\u6CD5\u5728\u91CD\u5C0E\u64F4\u5145\u5957\u4EF6\u4E2D\u5EFA\u7ACB FormatterListener\uFF01"},
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"exclude-result-prefixes \u4E2D\u7684\u524D\u7F6E\u78BC\u7121\u6548: {0}"},
{ ER_MISSING_NS_URI,
"\u907A\u6F0F\u6307\u5B9A\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 URI"},
{ ER_MISSING_ARG_FOR_OPTION,
"\u907A\u6F0F\u9078\u9805\u7684\u5F15\u6578: {0}"},
{ ER_INVALID_OPTION,
"\u7121\u6548\u7684\u9078\u9805: {0}"},
{ ER_MALFORMED_FORMAT_STRING,
"\u683C\u5F0F\u932F\u8AA4\u7684\u683C\u5F0F\u5B57\u4E32: {0}"},
{ ER_STYLESHEET_REQUIRES_VERSION_ATTRIB,
"xsl:stylesheet \u9700\u8981 'version' \u5C6C\u6027\uFF01"},
{ ER_ILLEGAL_ATTRIBUTE_VALUE,
"\u5C6C\u6027: {0} \u5177\u6709\u7121\u6548\u503C: {1}"},
{ ER_CHOOSE_REQUIRES_WHEN,
"xsl:choose \u9700\u8981 xsl:when"},
{ ER_NO_APPLY_IMPORT_IN_FOR_EACH,
"xsl:for-each \u4E2D\u4E0D\u5141\u8A31 xsl:apply-imports"},
{ ER_CANT_USE_DTM_FOR_OUTPUT,
"DTMLiaison \u7121\u6CD5\u7528\u65BC\u8F38\u51FA DOM \u7BC0\u9EDE\u3002\u8ACB\u6539\u70BA\u50B3\u9001 com.sun.org.apache.xpath.internal.DOM2Helper\uFF01"},
{ ER_CANT_USE_DTM_FOR_INPUT,
"DTMLiaison \u7121\u6CD5\u7528\u65BC\u8F38\u5165 DOM \u7BC0\u9EDE\u3002\u8ACB\u6539\u70BA\u50B3\u9001 com.sun.org.apache.xpath.internal.DOM2Helper\uFF01"},
{ ER_CALL_TO_EXT_FAILED,
"\u547C\u53EB\u64F4\u5145\u5957\u4EF6\u5143\u7D20\u5931\u6557: {0}"},
{ ER_PREFIX_MUST_RESOLVE,
"\u524D\u7F6E\u78BC\u5FC5\u9808\u89E3\u6790\u70BA\u547D\u540D\u7A7A\u9593: {0}"},
{ ER_INVALID_UTF16_SURROGATE,
"\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F"},
{ ER_XSLATTRSET_USED_ITSELF,
"xsl:attribute-set {0} \u4F7F\u7528\u672C\u8EAB\uFF0C\u5982\u6B64\u5C07\u9020\u6210\u7121\u9650\u8FF4\u5708\u3002"},
{ ER_CANNOT_MIX_XERCESDOM,
"\u7121\u6CD5\u6DF7\u5408\u975E Xerces-DOM \u8F38\u5165\u8207 Xerces-DOM \u8F38\u51FA\uFF01"},
{ ER_TOO_MANY_LISTENERS,
"addTraceListenersToStylesheet - TooManyListenersException"},
{ ER_IN_ELEMTEMPLATEELEM_READOBJECT,
"\u5728 ElemTemplateElement.readObject \u4E2D: {0}"},
{ ER_DUPLICATE_NAMED_TEMPLATE,
"\u627E\u5230\u8D85\u904E\u4E00\u500B\u4E0B\u5217\u540D\u7A31\u7684\u6A23\u677F: {0}"},
{ ER_INVALID_KEY_CALL,
"\u7121\u6548\u7684\u51FD\u6578\u547C\u53EB: \u4E0D\u5141\u8A31\u905E\u8FF4 key() \u547C\u53EB"},
{ ER_REFERENCING_ITSELF,
"\u8B8A\u6578 {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u53C3\u7167\u672C\u8EAB\uFF01"},
{ ER_ILLEGAL_DOMSOURCE_INPUT,
"newTemplates \u4E4B DOMSource \u7684\u8F38\u5165\u7BC0\u9EDE\u4E0D\u53EF\u70BA\u7A7A\u503C\uFF01"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
"\u627E\u4E0D\u5230\u9078\u9805 {0} \u7684\u985E\u5225\u6A94\u6848"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
"\u627E\u4E0D\u5230\u9700\u8981\u7684\u5143\u7D20: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
"InputStream \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_URI_CANNOT_BE_NULL,
"URI \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_FILE_CANNOT_BE_NULL,
"File \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_SOURCE_CANNOT_BE_NULL,
"InputSource \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_CANNOT_INIT_BSFMGR,
"\u7121\u6CD5\u8D77\u59CB BSF \u7BA1\u7406\u7A0B\u5F0F"},
{ ER_CANNOT_CMPL_EXTENSN,
"\u7121\u6CD5\u7DE8\u8B6F\u64F4\u5145\u5957\u4EF6"},
{ ER_CANNOT_CREATE_EXTENSN,
"\u7121\u6CD5\u5EFA\u7ACB\u64F4\u5145\u5957\u4EF6: {0}\uFF0C\u56E0\u70BA: {1}"},
{ ER_INSTANCE_MTHD_CALL_REQUIRES,
"\u57F7\u884C\u8655\u7406\u65B9\u6CD5\u547C\u53EB\u65B9\u6CD5 {0} \u6642\uFF0C\u9700\u8981 Object \u57F7\u884C\u8655\u7406\u4F5C\u70BA\u7B2C\u4E00\u500B\u5F15\u6578"},
{ ER_INVALID_ELEMENT_NAME,
"\u6307\u5B9A\u4E86\u7121\u6548\u7684\u5143\u7D20\u540D\u7A31 {0}"},
{ ER_ELEMENT_NAME_METHOD_STATIC,
"\u5143\u7D20\u540D\u7A31\u65B9\u6CD5\u5FC5\u9808\u662F\u975C\u614B {0}"},
{ ER_EXTENSION_FUNC_UNKNOWN,
"\u64F4\u5145\u5957\u4EF6\u51FD\u6578 {0} : {1} \u4E0D\u660E"},
{ ER_MORE_MATCH_CONSTRUCTOR,
"{0} \u7684\u5EFA\u69CB\u5B50\u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"},
{ ER_MORE_MATCH_METHOD,
"\u65B9\u6CD5 {0} \u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"},
{ ER_MORE_MATCH_ELEMENT,
"\u5143\u7D20\u65B9\u6CD5 {0} \u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"},
{ ER_INVALID_CONTEXT_PASSED,
"\u50B3\u9001\u4E86\u7121\u6548\u7684\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4F86\u8A55\u4F30 {0}"},
{ ER_POOL_EXISTS,
"\u96C6\u5340\u5DF2\u7D93\u5B58\u5728"},
{ ER_NO_DRIVER_NAME,
"\u672A\u6307\u5B9A\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31"},
{ ER_NO_URL,
"\u672A\u6307\u5B9A URL"},
{ ER_POOL_SIZE_LESSTHAN_ONE,
"\u96C6\u5340\u5927\u5C0F\u5C0F\u65BC\u4E00\uFF01"},
{ ER_INVALID_DRIVER,
"\u6307\u5B9A\u4E86\u7121\u6548\u7684\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"},
{ ER_NO_STYLESHEETROOT,
"\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\u6839\uFF01"},
{ ER_ILLEGAL_XMLSPACE_VALUE,
"xml:space \u7684\u503C\u7121\u6548"},
{ ER_PROCESSFROMNODE_FAILED,
"processFromNode \u5931\u6557"},
{ ER_RESOURCE_COULD_NOT_LOAD,
"\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}"},
{ ER_BUFFER_SIZE_LESSTHAN_ZERO,
"\u7DE9\u885D\u5340\u5927\u5C0F <=0"},
{ ER_UNKNOWN_ERROR_CALLING_EXTENSION,
"\u547C\u53EB\u64F4\u5145\u5957\u4EF6\u6642\uFF0C\u767C\u751F\u4E0D\u660E\u7684\u932F\u8AA4"},
{ ER_NO_NAMESPACE_DECL,
"\u524D\u7F6E\u78BC {0} \u6C92\u6709\u5C0D\u61C9\u7684\u547D\u540D\u7A7A\u9593\u5BA3\u544A"},
{ ER_ELEM_CONTENT_NOT_ALLOWED,
"\u5143\u7D20\u5167\u5BB9\u4E0D\u5141\u8A31 lang=javaclass {0}"},
{ ER_STYLESHEET_DIRECTED_TERMINATION,
"\u6A23\u5F0F\u8868\u5C0E\u5411\u7684\u7D42\u6B62"},
{ ER_ONE_OR_TWO,
"1 \u6216 2"},
{ ER_TWO_OR_THREE,
"2 \u6216 3"},
{ ER_COULD_NOT_LOAD_RESOURCE,
"\u7121\u6CD5\u8F09\u5165 {0} (\u6AA2\u67E5 CLASSPATH)\uFF0C\u76EE\u524D\u53EA\u4F7F\u7528\u9810\u8A2D\u503C"},
{ ER_CANNOT_INIT_DEFAULT_TEMPLATES,
"\u7121\u6CD5\u8D77\u59CB\u9810\u8A2D\u6A23\u677F"},
{ ER_RESULT_NULL,
"\u7D50\u679C\u4E0D\u61C9\u70BA\u7A7A\u503C"},
{ ER_RESULT_COULD_NOT_BE_SET,
"\u7121\u6CD5\u8A2D\u5B9A\u7D50\u679C"},
{ ER_NO_OUTPUT_SPECIFIED,
"\u672A\u6307\u5B9A\u8F38\u51FA"},
{ ER_CANNOT_TRANSFORM_TO_RESULT_TYPE,
"\u7121\u6CD5\u8F49\u63DB\u70BA\u985E\u578B {0} \u7684\u7D50\u679C"},
{ ER_CANNOT_TRANSFORM_SOURCE_TYPE,
"\u7121\u6CD5\u8F49\u63DB\u985E\u578B {0} \u7684\u4F86\u6E90"},
{ ER_NULL_CONTENT_HANDLER,
"\u7A7A\u503C\u5167\u5BB9\u8655\u7406\u7A0B\u5F0F"},
{ ER_NULL_ERROR_HANDLER,
"\u7A7A\u503C\u932F\u8AA4\u8655\u7406\u7A0B\u5F0F"},
{ ER_CANNOT_CALL_PARSE,
"\u82E5\u672A\u8A2D\u5B9A ContentHandler\uFF0C\u5247\u7121\u6CD5\u547C\u53EB\u5256\u6790"},
{ ER_NO_PARENT_FOR_FILTER,
"\u7BE9\u9078\u6C92\u6709\u7236\u9805"},
{ ER_NO_STYLESHEET_IN_MEDIA,
"\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\uFF0C\u5A92\u9AD4 = {1}"},
{ ER_NO_STYLESHEET_PI,
"\u5728 {0} \u4E2D\u627E\u4E0D\u5230 xml-stylesheet PI"},
{ ER_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4: {0}"},
{ ER_PROPERTY_VALUE_BOOLEAN,
"\u5C6C\u6027 {0} \u7684\u503C\u61C9\u70BA\u5E03\u6797\u57F7\u884C\u8655\u7406"},
{ ER_COULD_NOT_FIND_EXTERN_SCRIPT,
"\u7121\u6CD5\u5728 {0} \u53D6\u5F97\u5916\u90E8\u547D\u4EE4\u6A94"},
{ ER_RESOURCE_COULD_NOT_FIND,
"\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}"},
{ ER_OUTPUT_PROPERTY_NOT_RECOGNIZED,
"\u7121\u6CD5\u8FA8\u8B58\u7684\u8F38\u51FA\u5C6C\u6027: {0}"},
{ ER_FAILED_CREATING_ELEMLITRSLT,
"\u7121\u6CD5\u5EFA\u7ACB ElemLiteralResult \u57F7\u884C\u8655\u7406"},
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
//NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"{0} \u7684\u503C\u61C9\u5305\u542B\u53EF\u5256\u6790\u7684\u6578\u5B57"},
{ ER_VALUE_SHOULD_EQUAL,
"{0} \u7684\u503C\u61C9\u7B49\u65BC yes \u6216 no"},
{ ER_FAILED_CALLING_METHOD,
"\u7121\u6CD5\u547C\u53EB {0} \u65B9\u6CD5"},
{ ER_FAILED_CREATING_ELEMTMPL,
"\u7121\u6CD5\u5EFA\u7ACB ElemTemplateElement \u57F7\u884C\u8655\u7406"},
{ ER_CHARS_NOT_ALLOWED,
"\u6587\u4EF6\u6B64\u8655\u4E0D\u5141\u8A31\u5B57\u5143"},
{ ER_ATTR_NOT_ALLOWED,
"{1} \u5143\u7D20\u4E0D\u5141\u8A31 \"{0}\" \u5C6C\u6027\uFF01"},
{ ER_BAD_VALUE,
"{0} \u7121\u6548\u503C {1} "},
{ ER_ATTRIB_VALUE_NOT_FOUND,
"\u627E\u4E0D\u5230 {0} \u5C6C\u6027\u503C"},
{ ER_ATTRIB_VALUE_NOT_RECOGNIZED,
"{0} \u5C6C\u6027\u503C\u7121\u6CD5\u8FA8\u8B58 "},
{ ER_NULL_URI_NAMESPACE,
"\u5617\u8A66\u4EE5\u7A7A\u503C URI \u7522\u751F\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC"},
{ ER_NUMBER_TOO_BIG,
"\u5617\u8A66\u683C\u5F0F\u5316\u5927\u65BC\u6700\u5927\u9577\u6574\u6578\u7684\u6578\u5B57"},
{ ER_CANNOT_FIND_SAX1_DRIVER,
"\u627E\u4E0D\u5230 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}"},
{ ER_SAX1_DRIVER_NOT_LOADED,
"\u627E\u5230 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}\uFF0C\u4F46\u7121\u6CD5\u8F09\u5165"},
{ ER_SAX1_DRIVER_NOT_INSTANTIATED,
"\u5DF2\u8F09\u5165 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}\uFF0C\u4F46\u7121\u6CD5\u5EFA\u7ACB"},
{ ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER,
"SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0} \u672A\u5BE6\u884C org.xml.sax.Parser"},
{ ER_PARSER_PROPERTY_NOT_SPECIFIED,
"\u672A\u6307\u5B9A\u7CFB\u7D71\u5C6C\u6027 org.xml.sax.parser"},
{ ER_PARSER_ARG_CANNOT_BE_NULL,
"\u5256\u6790\u5668\u5F15\u6578\u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_FEATURE,
"\u529F\u80FD: {0}"},
{ ER_PROPERTY,
"\u5C6C\u6027: {0}"},
{ ER_NULL_ENTITY_RESOLVER,
"\u7A7A\u503C\u500B\u9AD4\u89E3\u6790\u5668"},
{ ER_NULL_DTD_HANDLER,
"\u7A7A\u503C DTD \u8655\u7406\u7A0B\u5F0F"},
{ ER_NO_DRIVER_NAME_SPECIFIED,
"\u672A\u6307\u5B9A\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"},
{ ER_NO_URL_SPECIFIED,
"\u672A\u6307\u5B9A URL\uFF01"},
{ ER_POOLSIZE_LESS_THAN_ONE,
"\u96C6\u5340\u5927\u5C0F\u5C0F\u65BC 1\uFF01"},
{ ER_INVALID_DRIVER_NAME,
"\u6307\u5B9A\u4E86\u7121\u6548\u7684\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"},
{ ER_ERRORLISTENER,
"ErrorListener"},
// Note to translators: The following message should not normally be displayed
// to users. It describes a situation in which the processor has detected
// an internal consistency problem in itself, and it provides this message
// for the developer to help diagnose the problem. The name
// 'ElemTemplateElement' is the name of a class, and should not be
// translated.
{ ER_ASSERT_NO_TEMPLATE_PARENT,
"\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u7684\u932F\u8AA4\uFF01\u8868\u793A\u5F0F\u6C92\u6709 ElemTemplateElement \u7236\u9805\uFF01"},
// Note to translators: The following message should not normally be displayed
// to users. It describes a situation in which the processor has detected
// an internal consistency problem in itself, and it provides this message
// for the developer to help diagnose the problem. The substitution text
// provides further information in order to diagnose the problem. The name
// 'RedundentExprEliminator' is the name of a class, and should not be
// translated.
{ ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR,
"\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u5728 RedundentExprEliminator \u4E2D\u7684\u5BA3\u544A: {0}"},
{ ER_NOT_ALLOWED_IN_POSITION,
"\u6A23\u5F0F\u8868\u6B64\u4F4D\u7F6E\u4E0D\u5141\u8A31 {0}\uFF01"},
{ ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION,
"\u6A23\u5F0F\u8868\u6B64\u4F4D\u7F6E\u4E0D\u5141\u8A31\u975E\u7A7A\u683C\u6587\u5B57\uFF01"},
// This code is shared with warning codes.
// SystemId Unknown
{ INVALID_TCHAR,
"\u7121\u6548\u503C: {1} \u7528\u65BC CHAR \u5C6C\u6027: {0}\u3002\u985E\u578B CHAR \u7684\u5C6C\u6027\u5FC5\u9808\u50C5\u70BA 1 \u500B\u5B57\u5143\uFF01"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of
// the attribute, and should not be translated. The substitution text {1} is
// the attribute value and {0} is the attribute name.
//The following codes are shared with the warning codes...
{ INVALID_QNAME,
"\u7121\u6548\u503C: {1} \u7528\u65BC QNAME \u5C6C\u6027: {0}"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of
// the attribute, and should not be translated. The substitution text {1} is
// the attribute value, {0} is the attribute name, and {2} is a list of valid
// values.
{ INVALID_ENUM,
"\u7121\u6548\u503C: {1} \u7528\u65BC ENUM \u5C6C\u6027: {0}\u3002\u6709\u6548\u503C\u70BA: {2}\u3002"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type
// of the attribute, and should not be translated. The substitution text {1} is
// the attribute value and {0} is the attribute name.
{ INVALID_NMTOKEN,
"\u7121\u6548\u503C: {1} \u7528\u65BC NMTOKEN \u5C6C\u6027: {0}"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type
// of the attribute, and should not be translated. The substitution text {1} is
// the attribute value and {0} is the attribute name.
{ INVALID_NCNAME,
"\u7121\u6548\u503C: {1} \u7528\u65BC NCNAME \u5C6C\u6027: {0}"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type
// of the attribute, and should not be translated. The substitution text {1} is
// the attribute value and {0} is the attribute name.
{ INVALID_BOOLEAN,
"\u7121\u6548\u503C: {1} \u7528\u65BC\u5E03\u6797\u5C6C\u6027: {0}"},
// Note to translators: The following message is used if the value of
// an attribute in a stylesheet is invalid. "number" is the XSLT data-type
// of the attribute, and should not be translated. The substitution text {1} is
// the attribute value and {0} is the attribute name.
{ INVALID_NUMBER,
"\u7121\u6548\u503C: {1} \u7528\u65BC\u6578\u5B57\u5C6C\u6027: {0}"},
// End of shared codes...
// Note to translators: A "match pattern" is a special form of XPath expression
// that is used for matching patterns. The substitution text is the name of
// a function. The message indicates that when this function is referenced in
// a match pattern, its argument must be a string literal (or constant.)
// ER_ARG_LITERAL - new error message for bugzilla //5202
{ ER_ARG_LITERAL,
"\u914D\u5C0D\u6A23\u5F0F\u4E2D {0} \u7684\u5F15\u6578\u5FC5\u9808\u662F\u6587\u5B57\u3002"},
// Note to translators: The following message indicates that two definitions of
// a variable. A "global variable" is a variable that is accessible everywher
// in the stylesheet.
// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790
{ ER_DUPLICATE_GLOBAL_VAR,
"\u91CD\u8907\u7684\u5168\u57DF\u8B8A\u6578\u5BA3\u544A\u3002"},
// Note to translators: The following message indicates that two definitions of
// a variable were encountered.
// ER_DUPLICATE_VAR - new error message for bugzilla #790
{ ER_DUPLICATE_VAR,
"\u91CD\u8907\u7684\u8B8A\u6578\u5BA3\u544A\u3002"},
// Note to translators: "xsl:template, "name" and "match" are XSLT keywords
// which must not be translated.
// ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789
{ ER_TEMPLATE_NAME_MATCH,
"xsl:template \u5FC5\u9808\u6709\u540D\u7A31\u6216\u914D\u5C0D\u5C6C\u6027 (\u6216\u5177\u6709\u5169\u8005)"},
// Note to translators: "exclude-result-prefixes" is an XSLT keyword which
// should not be translated. The message indicates that a namespace prefix
// encountered as part of the value of the exclude-result-prefixes attribute
// was in error.
// ER_INVALID_PREFIX - new error message for bugzilla #788
{ ER_INVALID_PREFIX,
"exclude-result-prefixes \u4E2D\u7684\u524D\u7F6E\u78BC\u7121\u6548: {0}"},
// Note to translators: An "attribute set" is a set of attributes that can
// be added to an element in the output document as a group. The message
// indicates that there was a reference to an attribute set named {0} that
// was never defined.
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"\u4E0D\u5B58\u5728\u540D\u7A31\u70BA {0} \u7684 attribute-set"},
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
"\u4E0D\u5B58\u5728\u540D\u7A31\u70BA {0} \u7684\u51FD\u6578"},
// Note to translators: This message indicates that the XSLT instruction
// that is named by the substitution text {0} must not contain other XSLT
// instructions (content) or a "select" attribute. The word "select" is
// an XSLT keyword in this case and must not be translated.
{ ER_CANT_HAVE_CONTENT_AND_SELECT,
"{0} \u5143\u7D20\u4E0D\u53EF\u540C\u6642\u5177\u6709\u5167\u5BB9\u8207\u9078\u53D6\u5C6C\u6027\u3002"},
// Note to translators: This message indicates that the value argument
// of setParameter must be a valid Java Object.
{ ER_INVALID_SET_PARAM_VALUE,
"\u53C3\u6578 {0} \u7684\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684 Java \u7269\u4EF6"},
{ ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT,
"xsl:namespace-alias \u5143\u7D20\u7684 result-prefix \u5C6C\u6027\u5177\u6709\u503C '#default'\uFF0C\u4F46\u662F\u5143\u7D20\u7BC4\u570D\u4E2D\u6C92\u6709\u9810\u8A2D\u547D\u540D\u7A7A\u9593\u7684\u5BA3\u544A"},
{ ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX,
"xsl:namespace-alias \u5143\u7D20\u7684 result-prefix \u5C6C\u6027\u5177\u6709\u503C ''{0}''\uFF0C\u4F46\u662F\u5143\u7D20\u7BC4\u570D\u4E2D\u6C92\u6709\u524D\u7F6E\u78BC ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5BA3\u544A\u3002"},
{ ER_SET_FEATURE_NULL_NAME,
"TransformerFactory.setFeature(\u5B57\u4E32\u540D\u7A31, \u5E03\u6797\u503C) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
{ ER_GET_FEATURE_NULL_NAME,
"TransformerFactory.getFeature(\u5B57\u4E32\u540D\u7A31) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
{ ER_UNSUPPORTED_FEATURE,
"\u7121\u6CD5\u5728\u6B64 TransformerFactory \u4E0A\u8A2D\u5B9A\u529F\u80FD ''{0}''\u3002"},
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
"\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"},
{ ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u547D\u540D\u7A7A\u9593 uri \u7684\u524D\u7F6E\u78BC\u3002"},
{ ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 uri\u3002"},
{ ER_XPATH_RESOLVER_NULL_QNAME,
"\u51FD\u6578\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
{ ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"Arity \u4E0D\u53EF\u70BA\u8CA0\u503C\u3002"},
// Warnings...
{ WG_FOUND_CURLYBRACE,
"\u627E\u5230 '}'\uFF0C\u4F46\u6C92\u6709\u958B\u555F\u7684\u5C6C\u6027\u6A23\u677F\uFF01"},
{ WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR,
"\u8B66\u544A: \u8A08\u6578\u5C6C\u6027\u4E0D\u7B26\u5408 xsl:number \u4E2D\u7684\u7956\u7CFB\uFF01\u76EE\u6A19 = {0}"},
{ WG_EXPR_ATTRIB_CHANGED_TO_SELECT,
"\u820A\u8A9E\u6CD5: 'expr' \u5C6C\u6027\u7684\u540D\u7A31\u5DF2\u8B8A\u66F4\u70BA 'select'\u3002"},
{ WG_NO_LOCALE_IN_FORMATNUMBER,
"Xalan \u5C1A\u672A\u8655\u7406 format-number \u51FD\u6578\u4E2D\u7684\u5730\u5340\u8A2D\u5B9A\u540D\u7A31\u3002"},
{ WG_LOCALE_NOT_FOUND,
"\u8B66\u544A: \u627E\u4E0D\u5230 xml:lang={0} \u7684\u5730\u5340\u8A2D\u5B9A"},
{ WG_CANNOT_MAKE_URL_FROM,
"\u7121\u6CD5\u5F9E {0} \u5EFA\u7ACB URL"},
{ WG_CANNOT_LOAD_REQUESTED_DOC,
"\u7121\u6CD5\u8F09\u5165\u8981\u6C42\u7684\u6587\u4EF6: {0}"},
{ WG_CANNOT_FIND_COLLATOR,
"\u627E\u4E0D\u5230 <sort xml:lang={0} \u7684 Collator"},
{ WG_FUNCTIONS_SHOULD_USE_URL,
"\u820A\u8A9E\u6CD5: \u51FD\u6578\u6307\u793A\u61C9\u4F7F\u7528 {0} \u7684 url"},
{ WG_ENCODING_NOT_SUPPORTED_USING_UTF8,
"\u4E0D\u652F\u63F4\u7DE8\u78BC: {0}\uFF0C\u4F7F\u7528 UTF-8"},
{ WG_ENCODING_NOT_SUPPORTED_USING_JAVA,
"\u4E0D\u652F\u63F4\u7DE8\u78BC: {0}\uFF0C\u4F7F\u7528 Java {1}"},
{ WG_SPECIFICITY_CONFLICTS,
"\u767C\u73FE\u6307\u5B9A\u885D\u7A81: {0} \u5C07\u4F7F\u7528\u6A23\u5F0F\u8868\u4E2D\u6700\u5F8C\u627E\u5230\u7684\u9805\u76EE\u3002"},
{ WG_PARSING_AND_PREPARING,
"========= \u5256\u6790\u8207\u6E96\u5099 {0} =========="},
{ WG_ATTR_TEMPLATE,
"\u5C6C\u6027\u6A23\u677F\uFF0C{0}"},
{ WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE,
"xsl:strip-space \u8207 xsl:preserve-space \u4E4B\u9593\u914D\u5C0D\u885D\u7A81"},
{ WG_ATTRIB_NOT_HANDLED,
"Xalan \u5C1A\u672A\u8655\u7406 {0} \u5C6C\u6027\uFF01"},
{ WG_NO_DECIMALFORMAT_DECLARATION,
"\u627E\u4E0D\u5230\u5341\u9032\u4F4D\u683C\u5F0F\u7684\u5BA3\u544A: {0}"},
{ WG_OLD_XSLT_NS,
"\u907A\u6F0F\u6216\u4E0D\u6B63\u78BA\u7684 XSLT \u547D\u540D\u7A7A\u9593\u3002 "},
{ WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED,
"\u53EA\u5141\u8A31\u4E00\u500B\u9810\u8A2D\u7684 xsl:decimal-format \u5BA3\u544A\u3002"},
{ WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE,
"xsl:decimal-format \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684\u540D\u7A31\u3002\u540D\u7A31 \"{0}\" \u91CD\u8907\u3002"},
{ WG_ILLEGAL_ATTRIBUTE,
"{0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"},
{ WG_COULD_NOT_RESOLVE_PREFIX,
"\u7121\u6CD5\u89E3\u6790\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC: {0}\u3002\u5C07\u5FFD\u7565\u6B64\u7BC0\u9EDE\u3002"},
{ WG_STYLESHEET_REQUIRES_VERSION_ATTRIB,
"xsl:stylesheet \u9700\u8981 'version' \u5C6C\u6027\uFF01"},
{ WG_ILLEGAL_ATTRIBUTE_NAME,
"\u7121\u6548\u7684\u5C6C\u6027\u540D\u7A31: {0}"},
{ WG_ILLEGAL_ATTRIBUTE_VALUE,
"\u7528\u65BC\u5C6C\u6027 {0} \u7684\u7121\u6548\u503C: {1}"},
{ WG_EMPTY_SECOND_ARG,
"\u6587\u4EF6\u51FD\u6578\u7B2C\u4E8C\u500B\u5F15\u6578\u7522\u751F\u7684\u7BC0\u9EDE\u96C6\u70BA\u7A7A\u767D\u3002\u50B3\u56DE\u7A7A\u767D\u7684 node-set\u3002"},
//Following are the new WARNING keys added in XALAN code base after Jdk 1.4 (Xalan 2.2-D11)
// Note to translators: "name" and "xsl:processing-instruction" are keywords
// and must not be translated.
{ WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"xsl:processing-instruction \u540D\u7A31\u7684 'name' \u5C6C\u6027\u503C\u4E0D\u53EF\u70BA 'xml'"},
// Note to translators: "name" and "xsl:processing-instruction" are keywords
// and must not be translated. "NCName" is an XML data-type and must not be
// translated.
{ WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
"xsl:processing-instruction \u7684 ''name'' \u5C6C\u6027\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684 NCName: {0}"},
// Note to translators: This message is reported if the stylesheet that is
// being processed attempted to construct an XML document with an attribute in a
// place other than on an element. The substitution text specifies the name of
// the attribute.
{ WG_ILLEGAL_ATTRIBUTE_POSITION,
"\u5728\u7522\u751F\u5B50\u9805\u7BC0\u9EDE\u4E4B\u5F8C\uFF0C\u6216\u5728\u7522\u751F\u5143\u7D20\u4E4B\u524D\uFF0C\u4E0D\u53EF\u65B0\u589E\u5C6C\u6027 {0}\u3002\u5C6C\u6027\u6703\u88AB\u5FFD\u7565\u3002"},
{ NO_MODIFICATION_ALLOWED_ERR,
"\u5617\u8A66\u4FEE\u6539\u4E0D\u5141\u8A31\u4FEE\u6539\u7684\u7269\u4EF6\u3002"
},
//Check: WHY THERE IS A GAP B/W NUMBERS in the XSLTErrorResources properties file?
// Other miscellaneous text used inside the code...
{ "ui_language", "tw"},
{ "help_language", "tw" },
{ "language", "tw" },
{ "BAD_CODE", "createMessage \u7684\u53C3\u6578\u8D85\u51FA\u7BC4\u570D"},
{ "FORMAT_FAILED", "messageFormat \u547C\u53EB\u671F\u9593\u767C\u751F\u7570\u5E38\u72C0\u6CC1"},
{ "version", ">>>>>>> Xalan \u7248\u672C "},
{ "version2", "<<<<<<<"},
{ "yes", "\u662F"},
{ "line", "\u884C\u865F"},
{ "column","\u8CC7\u6599\u6B04\u7DE8\u865F"},
{ "xsldone", "XSLProcessor: \u5B8C\u6210"},
// Note to translators: The following messages provide usage information
// for the Xalan Process command line. "Process" is the name of a Java class,
// and should not be translated.
{ "xslProc_option", "Xalan-J \u547D\u4EE4\u884C\u8655\u7406\u4F5C\u696D\u985E\u5225\u9078\u9805:"},
{ "xslProc_option", "Xalan-J \u547D\u4EE4\u884C\u8655\u7406\u4F5C\u696D\u985E\u5225\u9078\u9805:"},
{ "xslProc_invalid_xsltc_option", "XSLTC \u6A21\u5F0F\u4E2D\u4E0D\u652F\u63F4\u9078\u9805 {0}\u3002"},
{ "xslProc_invalid_xalan_option", "\u9078\u9805 {0} \u53EA\u80FD\u8207 -XSLTC \u4E00\u8D77\u4F7F\u7528\u3002"},
{ "xslProc_no_input", "\u932F\u8AA4: \u672A\u6307\u5B9A\u6A23\u5F0F\u8868\u6216\u8F38\u5165 xml\u3002\u4E0D\u4F7F\u7528\u4EFB\u4F55\u9078\u9805\u4F86\u57F7\u884C\u6B64\u547D\u4EE4\uFF0C\u53EF\u53D6\u5F97\u7528\u6CD5\u6307\u793A\u3002"},
{ "xslProc_common_options", "-\u4E00\u822C\u9078\u9805-"},
{ "xslProc_xalan_options", "-Xalan \u7684\u9078\u9805-"},
{ "xslProc_xsltc_options", "-XSLTC \u7684\u9078\u9805-"},
{ "xslProc_return_to_continue", "(\u6309 <return> \u4EE5\u7E7C\u7E8C)"},
// Note to translators: The option name and the parameter name do not need to
// be translated. Only translate the messages in parentheses. Note also that
// leading whitespace in the messages is used to indent the usage information
// for each option in the English messages.
// Do not translate the keywords: XSLTC, SAX, DOM and DTM.
{ "optionXSLTC", " [-XSLTC (\u4F7F\u7528 XSLTC \u9032\u884C\u8F49\u63DB)]"},
{ "optionIN", " [-IN inputXMLURL]"},
{ "optionXSL", " [-XSL XSLTransformationURL]"},
{ "optionOUT", " [-OUT outputFileName]"},
{ "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"},
{ "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"},
{ "optionPARSER", " [-PARSER \u5256\u6790\u5668\u806F\u7D61\u7684\u5B8C\u6574\u985E\u5225\u540D\u7A31]"},
{ "optionE", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"},
{ "optionV", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"},
{ "optionQC", " [-QC (\u975C\u97F3\u6A23\u5F0F\u885D\u7A81\u8B66\u544A)]"},
{ "optionQ", " [-Q (\u975C\u97F3\u6A21\u5F0F)]"},
{ "optionLF", " [-LF (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u63DB\u884C\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"},
{ "optionCR", " [-CR (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u6B78\u4F4D\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"},
{ "optionESCAPE", " [-ESCAPE (\u8981\u9041\u96E2\u7684\u5B57\u5143 {\u9810\u8A2D\u70BA <>&\"\'\\r\\n}]"},
{ "optionINDENT", " [-INDENT (\u63A7\u5236\u8981\u7E2E\u6392\u7684\u7A7A\u9593 {\u9810\u8A2D\u70BA 0})]"},
{ "optionTT", " [-TT (\u8FFD\u8E64\u547C\u53EB\u7684\u6A23\u677F\u3002)]"},
{ "optionTG", " [-TG (\u8FFD\u8E64\u6BCF\u500B\u7522\u751F\u4E8B\u4EF6\u3002)]"},
{ "optionTS", " [-TS (\u8FFD\u8E64\u6BCF\u500B\u9078\u53D6\u4E8B\u4EF6\u3002)]"},
{ "optionTTC", " [-TTC (\u8FFD\u8E64\u8655\u7406\u7684\u6A23\u677F\u5B50\u9805\u3002)]"},
{ "optionTCLASS", " [-TCLASS (\u8FFD\u8E64\u64F4\u5145\u5957\u4EF6\u7684 TraceListener \u985E\u5225\u3002)]"},
{ "optionVALIDATE", " [-VALIDATE (\u8A2D\u5B9A\u662F\u5426\u57F7\u884C\u9A57\u8B49\u3002\u9810\u8A2D\u4E0D\u6703\u57F7\u884C\u9A57\u8B49\u3002)]"},
{ "optionEDUMP", " [-EDUMP {\u9078\u64C7\u6027\u6A94\u6848\u540D\u7A31} (\u767C\u751F\u932F\u8AA4\u6642\u6703\u57F7\u884C\u5806\u758A\u50BE\u5370\u3002)]"},
{ "optionXML", " [-XML (\u4F7F\u7528 XML \u683C\u5F0F\u5668\u4E26\u65B0\u589E XML \u6A19\u982D\u3002)]"},
{ "optionTEXT", " [-TEXT (\u4F7F\u7528\u7C21\u55AE Text \u683C\u5F0F\u5668\u3002)]"},
{ "optionHTML", " [-HTML (\u4F7F\u7528 HTML \u683C\u5F0F\u5668\u3002)]"},
{ "optionPARAM", " [-PARAM \u540D\u7A31\u8868\u793A\u5F0F (\u8A2D\u5B9A\u6A23\u5F0F\u8868\u53C3\u6578)]"},
{ "noParsermsg1", "XSL \u8655\u7406\u4F5C\u696D\u5931\u6557\u3002"},
{ "noParsermsg2", "** \u627E\u4E0D\u5230\u5256\u6790\u5668 **"},
{ "noParsermsg3", "\u8ACB\u6AA2\u67E5\u985E\u5225\u8DEF\u5F91\u3002"},
{ "noParsermsg4", "\u82E5\u7121 IBM \u7684 XML Parser for Java\uFF0C\u53EF\u4E0B\u8F09\u81EA"},
{ "noParsermsg5", "IBM \u7684 AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
{ "optionURIRESOLVER", " [-URIRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790 URI \u7684 URIResolver)]"},
{ "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u500B\u9AD4\u7684 EntityResolver )]"},
{ "optionCONTENTHANDLER", " [-CONTENTHANDLER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u5E8F\u5217\u5316\u8F38\u51FA\u7684 ContentHandler)]"},
{ "optionLINENUMBERS", " [-L \u4F7F\u7528\u884C\u865F\u65BC\u4F86\u6E90\u6587\u4EF6]"},
{ "optionSECUREPROCESSING", " [-SECURE (\u5C07\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u3002)]"},
// Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11)
{ "optionMEDIA", " [-MEDIA mediaType (\u4F7F\u7528\u5A92\u9AD4\u5C6C\u6027\u4F86\u5C0B\u627E\u8207\u6587\u4EF6\u95DC\u806F\u7684\u6A23\u5F0F\u8868\u3002)]"},
{ "optionFLAVOR", " [-FLAVOR flavorName (\u660E\u78BA\u4F7F\u7528 s2s=SAX \u6216 d2d=DOM \u4F86\u57F7\u884C\u8F49\u63DB\u3002)] "}, // Added by sboag/scurcuru; experimental
{ "optionDIAG", " [-DIAG (\u5217\u5370\u8F49\u63DB\u6240\u9700\u8981\u7684\u5168\u90E8\u6BEB\u79D2\u3002)]"},
{ "optionINCREMENTAL", " [-INCREMENTAL (\u8A2D\u5B9A http://xml.apache.org/xalan/features/incremental \u70BA\u771F\uFF0C\u4EE5\u8981\u6C42\u6F38\u9032 DTM \u5EFA\u69CB\u3002)]"},
{ "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (\u8A2D\u5B9A http://xml.apache.org/xalan/features/optimize \u70BA\u507D\uFF0C\u4EE5\u8981\u6C42\u7121\u6A23\u5F0F\u8868\u6700\u4F73\u5316\u8655\u7406\u3002)]"},
{ "optionRL", " [-RL recursionlimit (\u5BA3\u544A\u6A23\u5F0F\u8868\u905E\u8FF4\u6DF1\u5EA6\u7684\u6578\u5B57\u9650\u5236\u3002)]"},
{ "optionXO", " [-XO [transletName] (\u6307\u6D3E\u6240\u7522\u751F translet \u7684\u540D\u7A31)]"},
{ "optionXD", " [-XD destinationDirectory (\u6307\u5B9A translet \u7684\u76EE\u7684\u5730\u76EE\u9304)]"},
{ "optionXJ", " [-XJ jarfile (\u5C01\u88DD translet \u985E\u5225\u6210\u70BA\u540D\u7A31\u70BA <jarfile> \u7684 jar \u6A94\u6848)]"},
{ "optionXP", " [-XP \u5957\u88DD\u7A0B\u5F0F (\u6307\u5B9A\u6240\u6709\u7522\u751F\u7684 translet \u985E\u5225\u7684\u5957\u88DD\u7A0B\u5F0F\u540D\u7A31\u524D\u7F6E\u78BC)]"},
//AddITIONAL STRINGS that need L10n
// Note to translators: The following message describes usage of a particular
// command-line option that is used to enable the "template inlining"
// optimization. The optimization involves making a copy of the code
// generated for a template in another template that refers to it.
{ "optionXN", " [-XN (\u555F\u7528\u6A23\u677F\u5167\u5D4C)]" },
{ "optionXX", " [-XX (\u958B\u555F\u984D\u5916\u7684\u9664\u932F\u8A0A\u606F\u8F38\u51FA)]"},
{ "optionXT" , " [-XT (\u82E5\u6709\u53EF\u80FD\uFF0C\u4F7F\u7528 translet \u4F86\u8F49\u63DB)]"},
{ "diagTiming"," --------- \u7D93\u7531 {1} \u7684 {0} \u8F49\u63DB\u6B77\u6642 {2} \u6BEB\u79D2" },
{ "recursionTooDeep","\u6A23\u677F\u5DE2\u72C0\u7D50\u69CB\u904E\u6DF1\u3002\u5DE2\u72C0\u7D50\u69CB = {0}\uFF0C\u6A23\u677F {1} {2}" },
{ "nameIs", "\u540D\u7A31\u70BA" },
{ "matchPatternIs", "\u914D\u5C0D\u6A23\u5F0F\u70BA" }
};
}
// ================= INFRASTRUCTURE ======================
/** String for use when a bad error code was encountered. */
public static final String BAD_CODE = "BAD_CODE";
/** String for use when formatting of the error string failed. */
public static final String FORMAT_FAILED = "FORMAT_FAILED";
/** General error string. */
public static final String ERROR_STRING = "#error";
/** String to prepend to error messages. */
public static final String ERROR_HEADER = "Error: ";
/** String to prepend to warning messages. */
public static final String WARNING_HEADER = "Warning: ";
/** String to specify the XSLT module. */
public static final String XSL_HEADER = "XSLT ";
/** String to specify the XML parser module. */
public static final String XML_HEADER = "XML ";
/** I don't think this is used any more.
* @deprecated */
public static final String QUERY_HEADER = "PATTERN ";
}
| [
"liulp@zjhjb.com"
] | liulp@zjhjb.com |
0d865fd0e5fd036f9c1473af8e9dc6a61a8f29e0 | a8dca5fb3ee205ded33c8e53f7e68efa4fa46ff3 | /SpringBootIBATIS/src/main/java/com/example/demorest/model/Employee.java | 38e33c61f0070fdfeddce2274e85c2ab85d21aed | [] | no_license | MrudulaNNaik/IBATIS | 8cab0b315932f29e1976a2fe2213d106abf0c888 | 4e624521a25be25251c89544d9eaf9f71577e492 | refs/heads/master | 2023-04-17T22:47:07.942501 | 2021-05-12T09:03:27 | 2021-05-12T09:03:27 | 366,654,860 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,131 | java | package com.example.demorest.model;
public class Employee {
private long id;
private String firstName;
private String lastName;
private String emailId;
public Employee() {
}
public Employee(long id, String firstName, String lastName, String emailId) {
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.emailId = emailId;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmailId() {
return emailId;
}
public void setEmailId(String emailId) {
this.emailId = emailId;
}
@Override
public String toString() {
return firstName +id+lastName;
}
} | [
"mrudulannaik1999@gmail.com"
] | mrudulannaik1999@gmail.com |
9178861f275ab6a2e8da1fa70c3e5109b935efd6 | b71974e706a5bb3b182bd79db956ec52edbbe98b | /app/src/main/java/com/android/python27/process/Process.java | 147a9ca53b8f2e4fbf68a8cd12030b87a9bf238c | [] | no_license | keyanmasoul/qpython | 203ba7cc669995536f7da2c7f899cf26c059e2b9 | b3241535dddd2daadecc20401308735938f029bb | refs/heads/master | 2021-01-11T09:42:40.559258 | 2017-02-09T08:01:51 | 2017-02-09T08:01:51 | 81,396,738 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,359 | java | package com.android.python27.process;
import android.os.Environment;
import android.os.Message;
import android.util.Log;
import com.android.python27.config.GlobalConstants;
import com.googlecode.android_scripting.Exec;
import com.hipipal.sl4alib.CONF;
import com.hipipal.sl4alib.PyScriptService;
import com.hipipal.sl4alib.StreamGobbler;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicInteger;
public class Process {
private static final int DEFAULT_BUFFER_SIZE = 8192;
private final List<String> mArguments;
private final Map<String, String> mEnvironment;
private static final int PID_INIT_VALUE = -1;
@SuppressWarnings("unused")
private File mBinary;
private String mName;
private long mStartTime;
private long mEndTime;
protected final AtomicInteger mPid;
protected FileDescriptor mFd;
protected OutputStream mOut;
protected InputStream mIn;
protected File mLog;
private int returnValue;
public PyScriptService context;
public int getReturnValue() {
return this.returnValue;
}
public Process(PyScriptService context) {
mArguments = new ArrayList<String>();
mEnvironment = new HashMap<String, String>();
mPid = new AtomicInteger(PID_INIT_VALUE);
this.context = context;
}
public void addArgument(String argument) {
mArguments.add(argument);
}
public void addAllArguments(List<String> arguments) {
mArguments.addAll(arguments);
}
public void putAllEnvironmentVariables(Map<String, String> environment) {
mEnvironment.putAll(environment);
}
public void putEnvironmentVariable(String key, String value) {
mEnvironment.put(key, value);
}
public void setBinary(File binary) {
/*if (!binary.exists()) {
throw new RuntimeException("Binary " + binary + " does not exist!");
}*/
mBinary = binary;
}
public Integer getPid() {
return mPid.get();
}
public FileDescriptor getFd() {
return mFd;
}
public OutputStream getOut() {
return mOut;
}
public OutputStream getErr() {
return getOut();
}
public File getLogFile() {
return mLog;
}
public InputStream getIn() {
return mIn;
}
public void start(final Runnable shutdownHook) {
if (isAlive()) {
throw new RuntimeException("Attempted to start process that is already running.");
}
String binaryPath = mBinary.getAbsolutePath();
Log.i(GlobalConstants.LOG_TAG, "Executing " + binaryPath + " with arguments " + mArguments + " and with environment "
+ mEnvironment.toString());
int[] pid = new int[1];
String[] argumentsArray = mArguments.toArray(new String[mArguments.size()]);
mLog = new File(String.format("%s/%s.log", Environment.getExternalStorageDirectory()+"/"+CONF.BASE_PATH+"/", getName()));
//mLog = new File( Environment.getExternalStorageDirectory()+"/"+getName()+".log" );
//Log.d("Process", "logFile:"+mLog.getAbsolutePath());
mFd = Exec.createSubprocess(binaryPath, argumentsArray, getEnvironmentArray(), getWorkingDirectory(), pid);
//Log.d("QPY", "binaryPath:"+binaryPath+"-argumentsArray:"+argumentsArray+"-getEnvironmentArray:"+getEnvironmentArray()+"-getWorkingDirectory:"+getWorkingDirectory()+"-pid:"+pid);
mPid.set(pid[0]);
mOut = new FileOutputStream(mFd);
mIn = new StreamGobbler(new FileInputStream(mFd), mLog, DEFAULT_BUFFER_SIZE);
mStartTime = System.currentTimeMillis();
new Thread(new Runnable() {
public void run() {
returnValue = Exec.waitFor(mPid.get());
mEndTime = System.currentTimeMillis();
int pid = mPid.getAndSet(PID_INIT_VALUE);
//Log.d("QPYTHON", "out:"+mFd.out.toString());
Message msg = new Message();
msg.what = returnValue;
msg.obj = mArguments.get(0);
//updatePositionHandler.sendMessage(msg);
Log.d(GlobalConstants.LOG_TAG, "Process " + pid + " exited with result code " + returnValue + ".");
try {
mIn.close();
} catch (IOException e) {
Log.e(GlobalConstants.LOG_TAG, e.getMessage());
}
try {
mOut.close();
} catch (IOException e) {
Log.e(GlobalConstants.LOG_TAG, e.getMessage());
}
if (shutdownHook != null) {
shutdownHook.run();
}
context.updateNotify(msg);
}
}).start();
}
@SuppressWarnings("unused")
private String[] getEnvironmentArray() {
List<String> environmentVariables = new ArrayList<String>();
for (Entry<String, String> entry : mEnvironment.entrySet()) {
environmentVariables.add(entry.getKey() + "=" + entry.getValue());
}
String[] environment = environmentVariables.toArray(new String[environmentVariables.size()]);
return environment;
}
/**/
public void kill() {
if (isAlive()) {
android.os.Process.killProcess(mPid.get());
Log.d(GlobalConstants.LOG_TAG, "Killed process " + mPid);
}
}
public boolean isAlive() {
return (mFd != null && mFd.valid()) && mPid.get() != PID_INIT_VALUE;
}
public String getWorkingDirectory() {
return null;
}
public String getSdcardPackageDirectory() {
return null;
}
public String getUptime() {
long ms;
if (!isAlive()) {
ms = mEndTime - mStartTime;
} else {
ms = System.currentTimeMillis() - mStartTime;
}
StringBuilder buffer = new StringBuilder();
int days = (int) (ms / (1000 * 60 * 60 * 24));
int hours = (int) (ms % (1000 * 60 * 60 * 24)) / 3600000;
int minutes = (int) (ms % 3600000) / 60000;
int seconds = (int) (ms % 60000) / 1000;
if (days != 0) {
buffer.append(String.format("%02d:%02d:", days, hours));
} else if (hours != 0) {
buffer.append(String.format("%02d:", hours));
}
buffer.append(String.format("%02d:%02d", minutes, seconds));
return buffer.toString();
}
public String getName() {
return mName;
}
public void setName(String name) {
mName = name;
}
} | [
"236003968@qq.com"
] | 236003968@qq.com |
d3029f3b1326d7504a4225c06cf7d9bbe1634c1d | a1e3a4c7d068d5b14ebda8c92702c25e1e7e946c | /app/src/main/java/com/teknestige/classes/MyAdapter.java | 19ed3a8c64bd37de1f609662771948da2f8777bb | [] | no_license | AchillesMacarini/Sinop.Anime | 7f7d0c0d62430af75491df872ba9bbca8e2c8f21 | 965c4340f68aadd4705e66bf2b15f840afdefd46 | refs/heads/master | 2020-05-17T17:07:43.569564 | 2019-09-23T23:52:13 | 2019-09-23T23:52:13 | 183,839,767 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,840 | java | package com.teknestige.classes;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.gson.JsonArray;
import com.google.gson.JsonIOException;
import com.teknestige.entidades.Anime;
import com.teknestige.sinop.AnimeActivity;
import com.teknestige.sinop.NoticiaActivity;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import DbControler.BDHelper;
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
private ArrayList<CreateList> galleryList;
private Context context;
BDHelper bdHelper = new BDHelper();
String imgNewUrl = bdHelper.returnUrl()+"ws_images_news/";
String imgWideUrl = bdHelper.returnUrl()+"ws_images_wide_anime/";
MyApplication myapp = new MyApplication();
private ArrayList<String> listaNews = new ArrayList<String>();
private ArrayList<String> listaNomes = new ArrayList<String>();
String imgAnimeUrl = bdHelper.returnUrl()+"ws_images_animes/";
Boolean newOrAnime;
public MyAdapter(Context context, ArrayList<CreateList> galleryList, Boolean newOrAnime) {
this.galleryList = galleryList;
this.context = context;
this.newOrAnime=newOrAnime;
}
@Override
public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View view = LayoutInflater.from(viewGroup.getContext()).inflate(com.teknestige.sinop.R.layout.cell_layout, viewGroup, false);
return new ViewHolder(view);
}
@SuppressLint("ClickableViewAccessibility")
@Override
public void onBindViewHolder(final MyAdapter.ViewHolder viewHolder, final int i) {
viewHolder.title.setText(galleryList.get(i).getImage_title());
viewHolder.img.setScaleType(ImageView.ScaleType.CENTER_CROP);
Bitmap imagem = null;
try {
System.out.println("testando " + imgWideUrl+returnIdImg(galleryList.get(i).getImage_title().toString(), i, newOrAnime)+".png");
if (newOrAnime){
imagem = LoadImageFromWebOperations(imgNewUrl+returnIdImg(galleryList.get(i).getImage_title().toString(), i, newOrAnime)+".png");
}
else {
imagem = LoadImageFromWebOperations(imgWideUrl+returnIdImg(galleryList.get(i).getImage_title().toString(), i, newOrAnime)+".png");
}
// imagem= LoadImageFromWebOperations(imgNewUrl+"01.png");
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
System.out.println(galleryList.get(i).getImage_title());
viewHolder.img.setImageBitmap(imagem);
viewHolder.img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewHolder.img.setColorFilter(Color.GRAY, PorterDuff.Mode.LIGHTEN);
try {
buildNews(newOrAnime);
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
Intent intent;
if (newOrAnime) {
intent = new Intent(context , NoticiaActivity.class);
}
else {
intent = new Intent(context , AnimeActivity.class);
}
String nomeNews = galleryList.get(i).getImage_title();
System.out.println("mamãe "+ nomeNews);
Bundle b = new Bundle();
b.putString("nome" , nomeNews.toString());
intent.putExtras(b);
context.startActivity(intent);
}
});
viewHolder.img.setOnTouchListener(new View.OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
if (event.getAction() == MotionEvent.ACTION_BUTTON_PRESS) {
Log.d("Pressed", "Button pressed");
viewHolder.img.setColorFilter(Color.GRAY, PorterDuff.Mode.LIGHTEN);
}else if (event.getAction() == MotionEvent.ACTION_BUTTON_RELEASE) {
Log.d("Released", "Button released");
viewHolder.img.setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.LIGHTEN);
// TODO Auto-generated method stub
}
return false;
}
});
}
@Override
public int getItemCount() {
return galleryList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder{
private TextView title;
private ImageView img;
public ViewHolder(View view) {
super(view);
title = (TextView)view.findViewById(com.teknestige.sinop.R.id.title);
img = (ImageView) view.findViewById(com.teknestige.sinop.R.id.img);
}
}
public Bitmap LoadImageFromWebOperations(String url) {
try {
ImageView i = null;
Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(url).getContent());
return bitmap;
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
public void buildNews(boolean newOrAnime) throws IOException, JSONException{
JSONArray jsonNews = bdHelper.selectAllFromNoticias(context);
JSONArray jsonAnimes = bdHelper.selectAllFromAnime(context);
if (newOrAnime) {
for (int i = 0; i < 5; i++) {
JSONObject animeObject = jsonNews.getJSONObject(i);
String id = animeObject.getString("noticia_imagem");
listaNews.add(id);
}
}
else {
for (int i = 0; i < jsonAnimes.length(); i++) {
JSONObject animeObject = jsonAnimes.getJSONObject(i);
String id = animeObject.getString("anime_imagem");
String name = animeObject.getString("Nome");
listaNomes.add(name);
listaNews.add(id);
}
}
}
public String returnIdImg(String tittle, int x, boolean newOrAnime) throws IOException, JSONException {
buildNews(newOrAnime);
if (newOrAnime) {
for (int i = 0; i < listaNews.size(); i++) {
if (listaNews.get(x).equals(tittle)) {
return listaNews.get(x);
}
}
return listaNews.get(x);
}
else {
int i =0;
for (i = 0; i < listaNews.size(); i++) {
if (listaNomes.get(i).equals(tittle)) {
return listaNews.get(i);
}
}
return listaNews.get(i);
}
}
} | [
"capivaradoacre@gmail.com"
] | capivaradoacre@gmail.com |
2ab36ea5fc2bf97a60629e309cd81d49473e2ef2 | bea935a01c818fa07f906e96d1f748681a23771e | /Udacity/Android Basics- Multiscreen Apps/old stuff/app/src/androidTest/java/com/example/hellomydearwrongnumber/ExampleInstrumentedTest.java | 8b33ef073c2c161c48ded9e32097bbc376e7f354 | [] | no_license | PraneshUlleri/Android | 25df80f7e94a9a553c778bc70e57cf6df2c9690b | 676b72421bff8ba00eb66e86ccbe5efe70f17d7a | refs/heads/master | 2021-08-08T02:57:48.477168 | 2020-05-07T09:42:16 | 2020-05-07T09:42:16 | 172,309,444 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 752 | java | package com.example.hellomydearwrongnumber;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.hellomydearwrongnumber", appContext.getPackageName());
}
}
| [
"ipraneshulleri@gmail.com"
] | ipraneshulleri@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.