blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
bca96d4c03311e097beff8af4793df7605fd4541
112a579bcf27a2d63c367bf476b34fcf2faeb707
/spring-framework/spring-context/src/main/java/org/springframework/context/annotation/anno_/PropertySources.java
39616b5921f7e6109003168076cedd1f3bfa198d
[]
no_license
ProSayJ/think-in-spring
78b4a7d0b4f0e08bf42c16fcda48c451fcb41165
507a2bacd16af92b1320781fc4d1739118c8323d
refs/heads/main
2023-06-22T16:58:36.037144
2021-07-21T07:20:34
2021-07-21T07:20:34
332,664,184
0
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
/* * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.context.annotation.anno_; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Container annotation that aggregates several {@link PropertySource} annotations. * * <p>Can be used natively, declaring several nested {@link PropertySource} annotations. * Can also be used in conjunction with Java 8's support for <em>repeatable annotations</em>, * where {@link PropertySource} can simply be declared several times on the same * {@linkplain ElementType#TYPE type}, implicitly generating this container annotation. * * @author Phillip Webb * @since 4.0 * @see PropertySource */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface PropertySources { PropertySource[] value(); }
[ "15665662468@163.com" ]
15665662468@163.com
7256ecbff2abcbcfec515e380ec5a96f0182d285
264a73922d6a8e29a5c20092839972baead33650
/Fan4Fun/app/src/main/java/com/dismas/imaya/fan4fun/extractor/services/youtube/YoutubeStreamPreviewInfoExtractor.java
3165895a005d73de637447b51fce80df373d66da
[]
no_license
00aj99/fan4fun
5838540ae67c8f5fda0d2767445c62f08d7b4a54
9ea8912e736696febb5673874611279c8a3993db
refs/heads/master
2021-05-31T09:44:51.665655
2016-04-02T13:24:10
2016-04-02T13:24:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,982
java
package com.dismas.imaya.fan4fun.extractor.services.youtube; import org.jsoup.nodes.Element; import com.dismas.imaya.fan4fun.extractor.AbstractVideoInfo; import com.dismas.imaya.fan4fun.extractor.Parser; import com.dismas.imaya.fan4fun.extractor.ParsingException; import com.dismas.imaya.fan4fun.extractor.StreamPreviewInfoExtractor; /** * Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org> * YoutubeStreamPreviewInfoExtractor.java is part of NewPipe. * * NewPipe 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. * * NewPipe 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 NewPipe. If not, see <http://www.gnu.org/licenses/>. */ public class YoutubeStreamPreviewInfoExtractor implements StreamPreviewInfoExtractor { private final Element item; public YoutubeStreamPreviewInfoExtractor(Element item) { this.item = item; } @Override public String getWebPageUrl() throws ParsingException { try { Element el = item.select("div[class*=\"yt-lockup-video\"").first(); Element dl = el.select("h3").first().select("a").first(); return dl.attr("abs:href"); } catch (Exception e) { throw new ParsingException("Could not get web page url for the video", e); } } @Override public String getTitle() throws ParsingException { try { Element el = item.select("div[class*=\"yt-lockup-video\"").first(); Element dl = el.select("h3").first().select("a").first(); return dl.text(); } catch (Exception e) { throw new ParsingException("Could not get title", e); } } @Override public int getDuration() throws ParsingException { try { return YoutubeParsingHelper.parseDurationString( item.select("span[class=\"video-time\"]").first().text()); } catch(Exception e) { if(isLiveStream(item)) { // -1 for no duration return -1; } else { throw new ParsingException("Could not get Duration: " + getTitle(), e); } } } @Override public String getUploader() throws ParsingException { try { return item.select("div[class=\"yt-lockup-byline\"]").first() .select("a").first() .text(); } catch (Exception e) { throw new ParsingException("Could not get uploader", e); } } @Override public String getUploadDate() throws ParsingException { try { return item.select("div[class=\"yt-lockup-meta\"]").first() .select("li").first() .text(); } catch(Exception e) { throw new ParsingException("Could not get uplaod date", e); } } @Override public long getViewCount() throws ParsingException { String output; String input; try { input = item.select("div[class=\"yt-lockup-meta\"]").first() .select("li").get(1) .text(); } catch (IndexOutOfBoundsException e) { if(isLiveStream(item)) { // -1 for no view count return -1; } else { throw new ParsingException( "Could not parse yt-lockup-meta although available: " + getTitle(), e); } } output = Parser.matchGroup1("([0-9,\\. ]*)", input) .replace(" ", "") .replace(".", "") .replace(",", ""); try { return Long.parseLong(output); } catch (NumberFormatException e) { // if this happens the video probably has no views if(!input.isEmpty()) { return 0; } else { throw new ParsingException("Could not handle input: " + input, e); } } } @Override public String getThumbnailUrl() throws ParsingException { try { String url; Element te = item.select("div[class=\"yt-thumb video-thumb\"]").first() .select("img").first(); url = te.attr("abs:src"); // Sometimes youtube sends links to gif files which somehow seem to not exist // anymore. Items with such gif also offer a secondary image source. So we are going // to use that if we've caught such an item. if (url.contains(".gif")) { url = te.attr("abs:data-thumb"); } return url; } catch (Exception e) { throw new ParsingException("Could not get thumbnail url", e); } } @Override public AbstractVideoInfo.StreamType getStreamType() { if(isLiveStream(item)) { return AbstractVideoInfo.StreamType.LIVE_STREAM; } else { return AbstractVideoInfo.StreamType.VIDEO_STREAM; } } private boolean isLiveStream(Element item) { Element bla = item.select("span[class*=\"yt-badge-live\"]").first(); if(bla == null) { // sometimes livestreams dont have badges but sill are live streams // if video time is not available we most likly have an offline livestream if(item.select("span[class*=\"video-time\"]").first() == null) { return true; } } return bla != null; } }
[ "imayadismas@gmail.com" ]
imayadismas@gmail.com
ebfc06142199bdde6c90a9228235e6454889c17e
7c2441024d6e61e1068ed2720c7d3ec82972c4ac
/src/main/java/com/tinkerpop/pipes/pgm/PropertyFilterPipe.java
3a455bfbefb1529a2f9ef7be6d4f3002e6aaf6ae
[ "BSD-3-Clause" ]
permissive
peterneubauer/pipes
030d1d77f0b6ab61824bc4b56d1e92595595db9b
3c3dade3f673a068e90abfddbeca370df957dee2
refs/heads/master
2020-12-24T21:55:15.400919
2010-06-03T19:35:13
2010-06-03T19:35:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
969
java
package com.tinkerpop.pipes.pgm; import com.tinkerpop.blueprints.pgm.Element; import com.tinkerpop.pipes.filter.AbstractComparisonFilterPipe; import java.util.NoSuchElementException; /** * The PropertyFilterPipe either allows or disallows all Elements that have the provided value for a particular key. * * @author Marko A. Rodriguez (http://markorodriguez.com) */ public class PropertyFilterPipe<S extends Element, T> extends AbstractComparisonFilterPipe<S, T> { private final String key; public PropertyFilterPipe(String key, final T storedObject, final Filter filter) { super(storedObject, filter); this.key = key; } protected S processNextStart() { while (this.starts.hasNext()) { S element = this.starts.next(); if (this.compareObjectProperty((T) element.getProperty(this.key))) { return element; } } throw new NoSuchElementException(); } }
[ "okrammarko@gmail.com" ]
okrammarko@gmail.com
2a8b4dd26010b187a0b1fc4cf6786dcb1da3834f
cee3a72254436865caa9d54e1fe26b5fc59e63c8
/convertor/java_code/vidhrdw/copsnrob.java
4df80d39e475d3f8c0662554e8d485dfc22037c4
[]
no_license
mameports/arcadeflex-037b8
9eeaa06d89fe1f2b83f2c92ef8fd347e896f8039
4615e52916a9ff4dd82b6badbc7f13e7d5c5d5be
refs/heads/main
2023-04-07T01:19:09.249665
2021-04-15T14:12:30
2021-04-15T14:12:30
356,888,215
0
0
null
null
null
null
UTF-8
Java
false
false
5,573
java
/*************************************************************************** vidhrdw.c Functions to emulate the video hardware of the machine. ***************************************************************************/ /* * ported to v0.37b8 * using automatic conversion tool v0.01 */ package vidhrdw; public class copsnrob { static const struct artwork_element copsnrob_overlay[] = { {{ 0, 71, 0, 255}, 0x40, 0x40, 0xc0, OVERLAY_DEFAULT_OPACITY}, /* blue */ {{ 72, 187, 0, 255}, 0xf0, 0xf0, 0x30, OVERLAY_DEFAULT_OPACITY}, /* yellow */ {{188, 255, 0, 255}, 0xbd, 0x9b, 0x13, OVERLAY_DEFAULT_OPACITY}, /* amber */ {{-1,-1,-1,-1},0,0,0,0} }; UBytePtr copsnrob_bulletsram; UBytePtr copsnrob_carimage; UBytePtr copsnrob_cary; UBytePtr copsnrob_trucky; UBytePtr copsnrob_truckram; public static VhStartPtr copsnrob_vh_start = new VhStartPtr() { public int handler() { overlay_create(copsnrob_overlay, 2, Machine.drv.total_colors - 2); return 0; } }; /*************************************************************************** Draw the game screen in the given osd_bitmap. Do NOT call osd_update_display() from this function, it will be called by the main emulation engine. ***************************************************************************/ public static VhUpdatePtr copsnrob_vh_screenrefresh = new VhUpdatePtr() { public void handler(osd_bitmap bitmap,int full_refresh) { int offs, x, y; palette_recalc(); /* redrawing the entire display is faster in this case */ for (offs = videoram_size[0];offs >= 0;offs--) { int sx,sy; sx = 31 - (offs % 32); sy = offs / 32; drawgfx(bitmap,Machine.gfx[0], videoram.read(offs)& 0x3f,0, 0,0, 8*sx,8*sy, &Machine.visible_area,TRANSPARENCY_NONE,0); } /* Draw the cars. Positioning was based on a screen shot */ if (copsnrob_cary[0]) { drawgfx(bitmap,Machine.gfx[1], copsnrob_carimage[0],0, 1,0, 0xe4,256-copsnrob_cary[0], &Machine.visible_area,TRANSPARENCY_PEN,0); } if (copsnrob_cary[1]) { drawgfx(bitmap,Machine.gfx[1], copsnrob_carimage[1],0, 1,0, 0xc4,256-copsnrob_cary[1], &Machine.visible_area,TRANSPARENCY_PEN,0); } if (copsnrob_cary[2]) { drawgfx(bitmap,Machine.gfx[1], copsnrob_carimage[2],0, 0,0, 0x24,256-copsnrob_cary[2], &Machine.visible_area,TRANSPARENCY_PEN,0); } if (copsnrob_cary[3]) { drawgfx(bitmap,Machine.gfx[1], copsnrob_carimage[3],0, 0,0, 0x04,256-copsnrob_cary[3], &Machine.visible_area,TRANSPARENCY_PEN,0); } /* Draw the beer truck. Positioning was based on a screen shot. We scan the truck's window RAM for a location whose bit is set and which corresponds either to the truck's front end or the truck's back end (based on the value of the truck image line sync register). We then draw a truck image in the proper place and continue scanning. This is not a perfect emulation of the game hardware, but it should suffice for the way the game software uses the hardware. It does take care of the problem of displaying multiple beer trucks and of scrolling truck images smoothly off the top of the screen. */ for (y = 0; y < 256; y++) { /* y is going up the screen, but the truck window RAM locations go down the screen. */ if (copsnrob_truckram[255-y]) { /* The hardware only uses the low 5 bits of the truck image line sync register. */ if ((copsnrob_trucky[0] & 0x1f) == ((y+31) & 0x1f)) { /* We've hit a truck's back end, so draw the truck. The front end may be off the top of the screen, but we don't care. */ drawgfx(bitmap,Machine.gfx[2], 0,0, 0,0, 0x80,256-(y+31), &Machine.visible_area,TRANSPARENCY_PEN,0); /* Skip past this truck's front end so we don't draw this truck twice. */ y += 31; } else if ((copsnrob_trucky[0] & 0x1f) == (y & 0x1f)) { /* We missed a truck's back end (it was off the bottom of the screen) but have hit its front end, so draw the truck. */ drawgfx(bitmap,Machine.gfx[2], 0,0, 0,0, 0x80,256-y, &Machine.visible_area,TRANSPARENCY_PEN,0); } } } /* Draw the bullets. They are flickered on/off every frame by the software, so don't play it with frameskip 1 or 3, as they could become invisible */ for (x = 0; x < 256; x++) { int bullet, mask1, mask2, val; val = copsnrob_bulletsram[x]; // Check for the most common case if (!(val & 0x0f)) continue; mask1 = 0x01; mask2 = 0x10; // Check each bullet for (bullet = 0; bullet < 4; bullet++) { if ((val & mask1) != 0) { for (y = 0; y <= Machine.visible_area.max_y; y++) { if (copsnrob_bulletsram[y] & mask2) { plot_pixel(bitmap, 256-x, y, Machine.pens[1]); } } } mask1 <<= 1; mask2 <<= 1; } } } }; }
[ "giorgosmrls@gmail.com" ]
giorgosmrls@gmail.com
56e00ce3aa4aabce10e942b94b83decb0b465132
25a91c33745c6b4476ea6cc67b8c12d1cf10c472
/TIJ4/src/za/co/coach/learning/tij/arrays/MultiDimWrapperArray.java
ba95054a3f3470ff200e8961bc7a23b494d1b904
[]
no_license
kumbirai/Learning
f3148b90c8d532316397d87b3027d5efff801d5e
73573e416acf26c069a5f5240532e940b4a8fafa
refs/heads/master
2021-01-15T17:07:12.084262
2013-01-03T09:31:14
2013-01-03T09:31:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
package za.co.coach.learning.tij.arrays; //: za.co.coach.learning.tij.arrays/MultiDimWrapperArray.java // Multidimensional za.co.coach.learning.tij.arrays of "wrapper" objects. import java.util.Arrays; public class MultiDimWrapperArray { public static void main(String[] args) { Integer[][] a1 = { // Autoboxing { 1, 2, 3, }, { 4, 5, 6, }, }; Double[][][] a2 = { // Autoboxing { { 1.1, 2.2 }, { 3.3, 4.4 } }, { { 5.5, 6.6 }, { 7.7, 8.8 } }, { { 9.9, 1.2 }, { 2.3, 3.4 } }, }; String[][] a3 = { { "The", "Quick", "Sly", "Fox" }, { "Jumped", "Over" }, { "The", "Lazy", "Brown", "Dog", "and", "friend" }, }; System.out.println("a1: " + Arrays.deepToString(a1)); System.out.println("a2: " + Arrays.deepToString(a2)); System.out.println("a3: " + Arrays.deepToString(a3)); } } /* Output: a1: [[1, 2, 3], [4, 5, 6]] a2: [[[1.1, 2.2], [3.3, 4.4]], [[5.5, 6.6], [7.7, 8.8]], [[9.9, 1.2], [2.3, 3.4]]] a3: [[The, Quick, Sly, Fox], [Jumped, Over], [The, Lazy, Brown, Dog, and, friend]] *///:~
[ "kumbirai@gmail.com" ]
kumbirai@gmail.com
dd84168d7579e227a2556b9449582f00121e8432
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2007-04-09/s2-tiger-2.4.12/src/test/java/org/seasar/framework/container/factory/Hoge18.java
ff43b26fece78df856a7ba4c8adbd3fd8550e628
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
943
java
/* * Copyright 2004-2007 the Seasar Foundation and the Others. * * 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.seasar.framework.container.factory; import javax.annotation.PostConstruct; import javax.ejb.Stateless; @Stateless public class Hoge18 implements IHoge18 { public Hoge18() { } public void hoge() { } @PostConstruct static void init() { } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
292b1be10669538719fee0bfa04863bf528ff905
86393a29a121cd71939e2940fc1767c20253e00f
/code/ch18/SampleUndoableEdit.java
d8e4a136eef17770730b8abfebd691b4047c4030
[ "LicenseRef-scancode-oreilly-notice" ]
permissive
golddusty/javaswingoreilly
5e1722db252fad2844406e27cbaccecba4b7043c
04e730ac18b0ed83e0413594bdbb6d740ab8ca05
refs/heads/master
2020-06-04T05:35:46.751089
2017-06-27T15:33:42
2017-06-27T15:33:42
191,890,826
0
0
null
null
null
null
UTF-8
Java
false
false
2,315
java
// SampleUndoableEdit.java // A simple (?) example of an undoable edit. // import javax.swing.undo.*; import java.util.*; public class SampleUndoableEdit extends AbstractUndoableEdit { private boolean isSignificant; private boolean isReplacer; private int number; private boolean allowAdds; private Vector addedEdits; private UndoableEdit replaced; // Create a new edit with an identifying number. The boolean arguments define // the edit's behavior. public SampleUndoableEdit(int number, boolean allowAdds, boolean isSignificant, boolean isReplacer) { this.number = number; this.allowAdds = allowAdds; if (allowAdds) addedEdits = new Vector(); this.isSignificant = isSignificant; this.isReplacer = isReplacer; } // "Undo" the edit by printing a message to the screen. public void undo() throws CannotUndoException { super.undo(); System.out.print("Undo " + number); dumpState(); } // "Redo" the edit by printing a message to the screen. public void redo() throws CannotRedoException { super.redo(); System.out.print("Redo " + number); dumpState(); } // If allowAdds is true, we store the input edit. If not, just return false. public boolean addEdit(UndoableEdit anEdit) { if (allowAdds) { addedEdits.addElement(anEdit); return true; } else return false; } // If isReplacer is true, we store the edit we are replacing. public boolean replaceEdit(UndoableEdit anEdit) { if (isReplacer) { replaced = anEdit; return true; } else return false; } // Significance is based on constructor parameter. public boolean isSignificant() { return isSignificant; } // Just return our identifier. public String toString() { return "<" + number + ">"; } // Debug output. public void dumpState() { if (allowAdds && addedEdits.size() > 0) { Enumeration e = addedEdits.elements(); System.out.print(" (absorbed: "); while (e.hasMoreElements()) { System.out.print(e.nextElement()); } System.out.print(")"); } if (isReplacer && replaced != null) { System.out.print(" (replaced: " + replaced + ")"); } System.out.println(); } }
[ "booktech@oreilly.com" ]
booktech@oreilly.com
1a0ed6ccf7ced54bf0c611dd84f08ee50a65b860
5fe70f7634032cb77cc57cba778d18d47a764b6c
/openbp-server/src/main/java/org/openbp/server/model/ModelNotificationServiceImpl.java
4339839438e3de34bbef5267268e012995c3478a
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
cleancode1116/OpenBP
cab222b3e336f1c81d6bc832e3c0d53244c13746
460a09c2f396ed1f77add70637644d254326d350
refs/heads/master
2020-07-11T06:07:24.821569
2016-11-18T07:43:22
2016-11-18T07:43:22
74,003,934
0
0
null
null
null
null
UTF-8
Java
false
false
5,395
java
/* * Copyright 2007 skynamics AG * * 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.openbp.server.model; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openbp.common.CollectionUtil; import org.openbp.common.CommonRegistry; import org.openbp.core.OpenBPException; import org.openbp.core.model.ModelQualifier; import org.openbp.core.model.modelmgr.ModelMgr; import org.openbp.core.model.modelmgr.ModelNotificationObserver; import org.openbp.core.model.modelmgr.ModelNotificationService; import org.openbp.core.remote.ClientSession; import org.openbp.core.remote.InvalidSessionException; import org.openbp.server.remote.ClientSessionMgr; /** * This class implements the methods exposed by the {@link ModelNotificationService} interface. * * @author Heiko Erhardt */ public class ModelNotificationServiceImpl implements ModelNotificationService { ////////////////////////////////////////////////// // @@ Data members ////////////////////////////////////////////////// /** Model manager */ private ModelMgr modelMgr; /** Notification observers (list of {@link ModelNotificationObserver} objects) */ private List notificationObservers; ////////////////////////////////////////////////// // @@ Construction ////////////////////////////////////////////////// /** * Default constructor. */ public ModelNotificationServiceImpl() { } ////////////////////////////////////////////////// // @@ Methods ////////////////////////////////////////////////// /** * Adds a model notification observer to the event observer list. * * @param observer Observer */ public void addModelNotificationObserver(ModelNotificationObserver observer) { if (notificationObservers == null) { notificationObservers = new ArrayList(); } if (! notificationObservers.contains(observer)) { notificationObservers.add(observer); } } /** * Removes a model notification observer from the event observer list. * * @param observer Observer */ public void removeModelNotificationObserver(ModelNotificationObserver observer) { if (notificationObservers != null) { notificationObservers.remove(observer); if (notificationObservers.size() == 0) { notificationObservers = null; } } } /** * Sets the notification observers (list of {@link ModelNotificationObserver} objects). * For Spring support only. * @nowarn */ public void setNotificationObservers(List notificationObservers) { this.notificationObservers = notificationObservers; } ////////////////////////////////////////////////// // @@ ModelNotificationService implementation ////////////////////////////////////////////////// /** * Notification method for model updates. * * @param session A session permitting access * @param qualifier Qualifier of the object that has been updated * @param mode Type of model update ({@link ModelNotificationService#ADDED}/{@link ModelNotificationService#UPDATED}/{@link ModelNotificationService#REMOVED}) * @throws InvalidSessionException If the session doesn't permit accessing the model manager * @throws OpenBPException On error */ public void modelUpdated(ClientSession session, ModelQualifier qualifier, int mode) { // Will throw an InvalidSessionException on invalid session ClientSessionMgr.getInstance().checkSession(session); // Delegate to the model mgr getModelMgr().modelUpdated(qualifier, mode); for (Iterator it = CollectionUtil.iterator(notificationObservers); it.hasNext();) { ModelNotificationObserver observer = (ModelNotificationObserver) it.next(); observer.modelUpdated(qualifier, mode); } } /** * Resets all models. * Re-initializes the model classloader and the model properties and reinitializes the components of the model. * * @param session A session permitting access * @throws InvalidSessionException If the session doesn't permit accessing the model manager * @throws OpenBPException On error */ public void requestModelReset(ClientSession session) { // Will throw an InvalidSessionException on invalid session ClientSessionMgr.getInstance().checkSession(session); // Delegate to the model mgr getModelMgr().requestModelReset(); for (Iterator it = CollectionUtil.iterator(notificationObservers); it.hasNext();) { ModelNotificationObserver observer = (ModelNotificationObserver) it.next(); observer.requestModelReset(); } } private ModelMgr getModelMgr() { if (modelMgr == null) { // An instance of the ModelMgr is placed in the core registry by the CoreModule modelMgr = (ModelMgr) CommonRegistry.lookup(ModelMgr.class); } return modelMgr; } }
[ "stephan@blackbuild.com" ]
stephan@blackbuild.com
72a8506fbe83a8293c2cd5637af32ccb83caa8af
eeb50e718d07116f4f0c8b6a6f79a5649bc896ca
/qidao-api-service-dao/src/main/java/com/qidao/application/vo/FeedbackMemberVo.java
d376c8d3bc4a6eacdc3f7f3df99640fd290e534b
[]
no_license
tzbgithub/keqidao2
b161c3f7edc578bc9d70dd74a69785d150e048b1
6d3bc986a81b732b55d30e961773fd87b7dead14
refs/heads/master
2023-04-22T09:19:43.860468
2021-05-10T05:12:02
2021-05-10T05:12:02
365,924,451
0
0
null
null
null
null
UTF-8
Java
false
false
277
java
package com.qidao.application.vo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class FeedbackMemberVo { private Long id; private Integer level; private Byte delFlag; }
[ "564858834@qq.com" ]
564858834@qq.com
93fd321bfac7867edf6373a22101fde351453780
ee8ed8073ca22ea8e1812d96a2f4bb6567253772
/ProductService/src/main/java/com/vielendanke/productservice/core/errorhandler/ProductServiceEventsErrorHandler.java
09733c9602a3aa83b4a09d173dcfded2fa7cd08e
[]
no_license
VielenDanke/event-driven-microservices
4da22238177873f4d6cc9295af0cad29b54ac0db
d7332aa081c91dcc7869b0f1adf19f666749328b
refs/heads/master
2023-07-03T15:42:29.914408
2021-08-08T13:50:31
2021-08-08T13:50:31
390,695,948
1
0
null
null
null
null
UTF-8
Java
false
false
577
java
package com.vielendanke.productservice.core.errorhandler; import org.axonframework.eventhandling.EventMessage; import org.axonframework.eventhandling.EventMessageHandler; import org.axonframework.eventhandling.ListenerInvocationErrorHandler; import org.springframework.stereotype.Component; @Component public class ProductServiceEventsErrorHandler implements ListenerInvocationErrorHandler { @Override public void onError(Exception exception, EventMessage<?> eventMessage, EventMessageHandler eventMessageHandler) throws Exception { throw exception; } }
[ "vielendanke1991@gmail.com" ]
vielendanke1991@gmail.com
5fd8a301fc75b37f6c10fbb29857dd03d656745a
687fbe32adf4099d511abb4d458bfcf9e6be650e
/ReflectViewDemo/app/src/main/java/com/iamasoldier6/reflectviewdemo/ReflectView.java
ac19bd0c63154fc968b7bddc9b1c128d6ba3a14d
[]
no_license
brucejing/AndroidExerciseDemos
2b7b0e5bd38ac3d1c9def8d2bf82fd63526c9e57
02df9d0821e6da016881582d3ad31f1b5180029e
refs/heads/master
2020-06-17T16:38:25.534323
2018-05-06T06:19:35
2018-05-06T06:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,227
java
package com.iamasoldier6.reflectviewdemo; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Shader; import android.util.AttributeSet; import android.view.View; /** * Created by Iamasoldier6 on 6/15/16. */ public class ReflectView extends View { private Bitmap mSrcBitmap, mRefBitmap; private Paint mPaint; private PorterDuffXfermode mXfermode; public ReflectView(Context context) { super(context); initView(context); } public ReflectView(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } public ReflectView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initView(context); } private void initView(Context context) { mSrcBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.beauty); Matrix matrix = new Matrix(); matrix.setScale(1F, -1F); mRefBitmap = Bitmap.createBitmap(mSrcBitmap, 0, 0, mSrcBitmap.getWidth(), mSrcBitmap.getHeight(), matrix, true); mPaint = new Paint(); mPaint.setShader(new LinearGradient(0, mSrcBitmap.getHeight(), 0, mSrcBitmap.getHeight() + mSrcBitmap.getHeight() / 4, 0XDD000000, 0X10000000, Shader.TileMode.CLAMP)); mXfermode = new PorterDuffXfermode(PorterDuff.Mode.DST_IN); } @Override protected void onDraw(Canvas canvas) { canvas.drawColor(Color.BLACK); canvas.drawBitmap(mSrcBitmap, 0, 0, null); canvas.drawBitmap(mRefBitmap, 0, mSrcBitmap.getHeight(), null); mPaint.setXfermode(mXfermode); // 绘制渐变效果矩形 canvas.drawRect(0, mSrcBitmap.getHeight(), mRefBitmap.getWidth(), mSrcBitmap.getHeight() * 2, mPaint); mPaint.setXfermode(null); } }
[ "iamasoldiersix@gmail.com" ]
iamasoldiersix@gmail.com
b460e50d7aab8716967d7671fcbf98ec69cbab2e
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/apache-http/src/org/apache/http/cookie/CookieIdentityComparator.java
4fc701c8170c35147f01d241ae8c1f0147a3bda8
[ "MIT", "Apache-2.0" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
2,463
java
/* * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java $ * $Revision: 618308 $ * $Date: 2008-02-04 07:51:19 -0800 (Mon, 04 Feb 2008) $ * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.cookie; import java.io.Serializable; import java.util.Comparator; /** * This cookie comparator can be used to compare identity of cookies. * * <p> * Cookies are considered identical if their names are equal and * their domain attributes match ignoring case. * </p> * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> */ public class CookieIdentityComparator implements Serializable, Comparator<Cookie> { private static final long serialVersionUID = 4466565437490631532L; public int compare(final Cookie c1, final Cookie c2) { int res = c1.getName().compareTo(c2.getName()); if (res == 0) { // do not differentiate empty and null domains String d1 = c1.getDomain(); if (d1 == null) { d1 = ""; } String d2 = c2.getDomain(); if (d2 == null) { d2 = ""; } res = d1.compareToIgnoreCase(d2); } return res; } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
f9067838148ded1e4b48f525f725cfb0ee17f98f
d76808c5ef5a50f46f5714ed737b85b2603f90dc
/org/json/simple/parser/ParseException.java
48d6192de0f1ccde58c36a97fcfa8bf149729c94
[]
no_license
XeonLyfe/Backdoored-1.6-Deobf-Source-Leak
d5e70e6bc09bf1f8ef971cb2f019492310cf28c0
d01450acd69b1d995931aa3bcaca5c974344e556
refs/heads/master
2022-04-07T07:58:45.140489
2019-11-10T02:56:19
2019-11-10T02:56:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,360
java
package org.json.simple.parser; public class ParseException extends Exception { private static final long serialVersionUID = -7880698968187728548L; public static final int ERROR_UNEXPECTED_CHAR = 0; public static final int ERROR_UNEXPECTED_TOKEN = 1; public static final int ERROR_UNEXPECTED_EXCEPTION = 2; private int errorType; private Object unexpectedObject; private int position; public ParseException(final int errorType) { this(-1, errorType, null); } public ParseException(final int errorType, final Object unexpectedObject) { this(-1, errorType, unexpectedObject); } public ParseException(final int position, final int errorType, final Object unexpectedObject) { super(); this.position = position; this.errorType = errorType; this.unexpectedObject = unexpectedObject; } public int getErrorType() { return this.errorType; } public void setErrorType(final int errorType) { this.errorType = errorType; } public int getPosition() { return this.position; } public void setPosition(final int position) { this.position = position; } public Object getUnexpectedObject() { return this.unexpectedObject; } public void setUnexpectedObject(final Object unexpectedObject) { this.unexpectedObject = unexpectedObject; } public String toString() { final StringBuffer sb = new StringBuffer(); switch (this.errorType) { case 0: { sb.append("Unexpected character (").append(this.unexpectedObject).append(") at position ").append(this.position).append("."); break; } case 1: { sb.append("Unexpected token ").append(this.unexpectedObject).append(" at position ").append(this.position).append("."); break; } case 2: { sb.append("Unexpected exception at position ").append(this.position).append(": ").append(this.unexpectedObject); break; } default: { sb.append("Unkown error at position ").append(this.position).append("."); break; } } return sb.toString(); } }
[ "57571957+RIPBackdoored@users.noreply.github.com" ]
57571957+RIPBackdoored@users.noreply.github.com
05f42f6c2475fa9abb7efd13738eb37a9ae4e93d
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE113_HTTP_Response_Splitting/s02/CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68b.java
9a78831262cd27f5d8f197f60fcfd726b53d34db
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
2,221
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68b.java Label Definition File: CWE113_HTTP_Response_Splitting.label.xml Template File: sources-sinks-68b.tmpl.java */ /* * @description * CWE: 113 HTTP Response Splitting * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: addHeaderServlet * GoodSink: URLEncode input * BadSink : querystring to addHeader() * Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package * * */ package testcases.CWE113_HTTP_Response_Splitting.s02; import testcasesupport.*; import javax.servlet.http.*; import java.net.URLEncoder; public class CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68b { public void badSink(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data = CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68a.data; /* POTENTIAL FLAW: Input from file not verified */ if (data != null) { response.addHeader("Location", "/author.jsp?lang=" + data); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data = CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68a.data; /* POTENTIAL FLAW: Input from file not verified */ if (data != null) { response.addHeader("Location", "/author.jsp?lang=" + data); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data = CWE113_HTTP_Response_Splitting__PropertiesFile_addHeaderServlet_68a.data; /* FIX: use URLEncoder.encode to hex-encode non-alphanumerics */ if (data != null) { data = URLEncoder.encode(data, "UTF-8"); response.addHeader("Location", "/author.jsp?lang=" + data); } } }
[ "you@example.com" ]
you@example.com
6df6bab941d88c6c9c7f78d3a76c9bc717cc0137
f10dc8fb4181c4865cd4797de9d5a79f2c98af7a
/src/yh/core/funcs/dept/logic/YHOrgLogic.java
29b6172c99a4de6049e56e7bb5fe529999cefa6e
[]
no_license
DennisAZ/NewtouchOA
b9c41cc1f4caac53b453c56952af0f5156b6c4fa
881d72d80c83e1f2ad578c92e37a3241498499fc
refs/heads/master
2020-03-30T05:37:21.900004
2018-09-29T02:11:34
2018-09-29T02:11:34
150,809,685
0
3
null
null
null
null
UTF-8
Java
false
false
3,345
java
package yh.core.funcs.dept.logic; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import org.apache.log4j.Logger; import yh.core.funcs.org.data.YHOrganization; import yh.core.util.db.YHDBUtility; public class YHOrgLogic { private static Logger log = Logger.getLogger(YHOrgLogic.class); public YHOrganization get(Connection conn)throws Exception { Statement stmt = null; ResultSet rs = null; YHOrganization org = null; try { String queryStr = "select SEQ_ID, UNIT_NAME, TELEPHONE, MAX, POSTCODE," + " ADDRESS, WEBSITE, EMAIL, SIGN_IN_USER, ACCOUNT from oa_organization"; stmt = conn.createStatement(); rs = stmt.executeQuery(queryStr); //System.out.println(queryStr); if (rs.next()) { org = new YHOrganization(); org.setSeqId(rs.getInt("SEQ_ID")); org.setUnitName(rs.getString("UNIT_NAME")); org.setTelephone(rs.getString("TELEPHONE")); org.setMax(rs.getString("MAX")); org.setPostcode(rs.getString("POSTCODE")); org.setAddress(rs.getString("ADDRESS")); org.setWebsite(rs.getString("WEBSITE")); org.setEmail(rs.getString("EMAIL")); org.setSignInUser(rs.getString("SIGN_IN_USER")); org.setAccount(rs.getString("ACCOUNT")); } }catch(Exception ex) { throw ex; }finally { YHDBUtility.close(stmt, rs, log); } return org; } public void update(Connection conn, YHOrganization org)throws Exception { PreparedStatement pstmt = null; try{ String queryStr = "update oa_organization set UNIT_NAME = ?, TELEPHONE = ?, MAX = ?, POSTCODE = ?," + " ADDRESS = ?, WEBSITE = ?, EMAIL = ?, SIGN_IN_USER = ?, ACCOUNT = ? where SEQ_ID = ?"; pstmt = conn.prepareStatement(queryStr); pstmt.setString(1, org.getUnitName()); pstmt.setString(2, org.getTelephone()); pstmt.setString(3, org.getMax()); pstmt.setString(4, org.getPostcode()); pstmt.setString(5, org.getAddress()); pstmt.setString(6, org.getWebsite()); pstmt.setString(7, org.getEmail()); pstmt.setString(8, org.getSignInUser()); pstmt.setString(9, org.getAccount()); pstmt.setInt(10, org.getSeqId()); pstmt.executeUpdate(); }catch(Exception ex) { throw ex; }finally { YHDBUtility.close(pstmt, null, log); } } public void add(Connection conn, YHOrganization org)throws Exception { PreparedStatement pstmt = null; try{ String queryStr = "insert into oa_organization (UNIT_NAME, TELEPHONE, MAX, POSTCODE" + ",ADDRESS, WEBSITE, EMAIL, SIGN_IN_USER, ACCOUNT) values (?, ?, ?, ?, ?, ?, ?, ?, ?)"; pstmt = conn.prepareStatement(queryStr); pstmt.setString(1, org.getUnitName()); pstmt.setString(2, org.getTelephone()); pstmt.setString(3, org.getMax()); pstmt.setString(4, org.getPostcode()); pstmt.setString(5, org.getAddress()); pstmt.setString(6, org.getWebsite()); pstmt.setString(7, org.getEmail()); pstmt.setString(8, org.getSignInUser()); pstmt.setString(9, org.getAccount()); pstmt.executeUpdate(); }catch(Exception ex) { throw ex; }finally { YHDBUtility.close(pstmt, null, log); } } }
[ "hao.duan@newtouch.cn" ]
hao.duan@newtouch.cn
34dc22c74ca2bbb7a99d0df72bf658b6a4f78a94
995c1b7c61bbf6e28d69bc36d4721be9c1a3b7c4
/xxpay-agent/src/main/java/org/xxpay/agent/subuser/ctrl/SubuserRoleController.java
e03e7bed9d351832bea3ba54c2cd618bf9b4bed8
[]
no_license
launchfirst2020/xxpay4new
94bdb9cf3c974ac51214a13dfec279b8c34029d1
54247cd9cf64aacfffe84455a7ac1bf61420ffc2
refs/heads/master
2023-04-09T21:10:13.344707
2021-01-22T09:10:28
2021-01-22T09:10:28
331,880,197
5
9
null
null
null
null
UTF-8
Java
false
false
7,094
java
package org.xxpay.agent.subuser.ctrl; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.xxpay.agent.common.ctrl.BaseController; import org.xxpay.agent.common.service.RpcCommonService; import org.xxpay.core.common.annotation.MethodLog; import org.xxpay.core.common.constant.Constant; import org.xxpay.core.common.constant.MchConstant; import org.xxpay.core.common.constant.RetEnum; import org.xxpay.core.common.domain.BizResponse; import org.xxpay.core.common.domain.XxPayPageRes; import org.xxpay.core.common.domain.XxPayResponse; import org.xxpay.core.common.vo.PermTreeBuilder; import org.xxpay.core.entity.SysPermission; import org.xxpay.core.entity.SysResource; import org.xxpay.core.entity.SysRole; import javax.servlet.http.HttpServletRequest; import java.util.LinkedList; import java.util.List; @Controller @RequestMapping(Constant.MGR_CONTROLLER_ROOT_PATH + "/subuser/role") public class SubuserRoleController extends BaseController { @Autowired private RpcCommonService rpcCommonService; /** * 查询 * @return */ @RequestMapping("/get") @ResponseBody public ResponseEntity<?> get() { Long roleId = getValLongRequired("roleId"); SysRole sysRole = rpcCommonService.rpcSysService.findRoleById(MchConstant.INFO_TYPE_AGENT, getUser().getBelongInfoId(), roleId); return ResponseEntity.ok(XxPayResponse.buildSuccess(sysRole)); } /** * 新增 * @return */ @RequestMapping("/add") @ResponseBody @MethodLog( remark = "新增角色" ) public ResponseEntity<?> add() { SysRole sysRole = getObject( SysRole.class); sysRole.setBelongInfoId(getUser().getBelongInfoId()); sysRole.setBelongInfoType(MchConstant.INFO_TYPE_AGENT); int count = rpcCommonService.rpcSysService.addRole(sysRole); if(count != 1) ResponseEntity.ok(XxPayResponse.build(RetEnum.RET_COMM_OPERATION_FAIL)); return ResponseEntity.ok(BizResponse.buildSuccess()); } /** * 修改 * @return */ @RequestMapping("/update") @ResponseBody @MethodLog( remark = "修改角色" ) public ResponseEntity<?> update() { SysRole sysRole = getObject( SysRole.class); SysRole dbRecord = rpcCommonService.rpcSysService.findRoleById(MchConstant.INFO_TYPE_AGENT, getUser().getBelongInfoId(), sysRole.getRoleId()); if(dbRecord == null) return ResponseEntity.ok(XxPayResponse.build(RetEnum.RET_COMM_OPERATION_FAIL)); sysRole.setBelongInfoId(getUser().getBelongInfoId()); sysRole.setBelongInfoType(MchConstant.INFO_TYPE_AGENT); int count = rpcCommonService.rpcSysService.updateRole(sysRole); if(count != 1) return ResponseEntity.ok(XxPayResponse.build(RetEnum.RET_COMM_OPERATION_FAIL)); return ResponseEntity.ok(BizResponse.buildSuccess()); } /** * 列表 * @param request * @return */ @RequestMapping("/list") @ResponseBody public ResponseEntity<?> list() { SysRole sysRole = getObject( SysRole.class); sysRole.setBelongInfoType(MchConstant.INFO_TYPE_AGENT); sysRole.setBelongInfoId(getUser().getBelongInfoId()); int count = rpcCommonService.rpcSysService.countRole(sysRole); if(count == 0) return ResponseEntity.ok(XxPayPageRes.buildSuccess()); List<SysRole> sysRoleList = rpcCommonService.rpcSysService.selectRole((getPageIndex() - 1) * getPageSize(), getPageSize(), sysRole); return ResponseEntity.ok(XxPayPageRes.buildSuccess(sysRoleList, count)); } /** * 删除 * @return */ @RequestMapping("/delete") @ResponseBody @MethodLog( remark = "删除角色" ) public ResponseEntity<?> delete() { String roleIds = getValStringRequired( "roleIds"); String[] ids = roleIds.split(","); List<Long> rids = new LinkedList<>(); for(String roleId : ids) { if(NumberUtils.isDigits(roleId)) rids.add(Long.parseLong(roleId)); } rpcCommonService.rpcSysService.batchDeleteRole(MchConstant.INFO_TYPE_AGENT, getUser().getBelongInfoId(), rids); return ResponseEntity.ok(BizResponse.buildSuccess()); } /** * 所有角色列表 * @param request * @return */ @RequestMapping("/all") @ResponseBody public ResponseEntity<?> all() { List<SysRole> sysRoleList = rpcCommonService.rpcSysService.selectAllRole(MchConstant.INFO_TYPE_AGENT, getUser().getBelongInfoId()); return ResponseEntity.ok(XxPayResponse.buildSuccess(sysRoleList)); } /** * 查看角色所有资源 * @param request * @return */ @RequestMapping("/permission_view") @ResponseBody public ResponseEntity<?> viewPermission() { Long roleId = getValLongRequired("roleId"); // 该角色对应的所有权限 List<SysPermission> sysPermissionList = rpcCommonService.rpcSysService.selectPermissionByRoleId(roleId); // 得到系统下所有资源 List<SysResource> sysResourceList = rpcCommonService.rpcSysService.selectAllResource(MchConstant.INFO_TYPE_AGENT); List<PermTreeBuilder.Node> nodeList = new LinkedList<>(); for(SysResource sysResource : sysResourceList) { PermTreeBuilder.Node node = new PermTreeBuilder.Node(); node.setResourceId(sysResource.getResourceId()); node.setTitle(sysResource.getTitle()); node.setValue(sysResource.getResourceId()+""); // 设置是否被选中 for(SysPermission sysPermission : sysPermissionList) { if(sysResource.getResourceId().longValue() == sysPermission.getResourceId().longValue()) { node.setChecked(true); break; } } node.setParentId(sysResource.getParentId()); nodeList.add(node); } return ResponseEntity.ok(XxPayResponse.buildSuccess(PermTreeBuilder.buildListTree(nodeList))); } /** * 保存角色的资源 * @param request * @return */ @RequestMapping("/permission_save") @ResponseBody @MethodLog( remark = "角色分配权限" ) public ResponseEntity<?> savePermission() { Long roleId = getValLongRequired("roleId"); String resourceIds = getValStringRequired( "resourceIds"); String[] ids = resourceIds.split(","); List<Long> rids = new LinkedList<>(); for(String resourceId : ids) { if(NumberUtils.isDigits(resourceId)) rids.add(Long.parseLong(resourceId)); } rpcCommonService.rpcSysService.savePermission(roleId, rids); return ResponseEntity.ok(BizResponse.buildSuccess()); } }
[ "launchfirst_baggio@163.com" ]
launchfirst_baggio@163.com
66bcc3e0098b333398372be913b785e090b1136b
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/android_tools/sdk/sources/android-25/com/android/server/DisplayThread.java
9ef02598c1d382ebed1db67c3a72ee7255f79e45
[ "Apache-2.0", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
Java
false
false
1,945
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server; import android.os.Handler; import android.os.Trace; /** * Shared singleton foreground thread for the system. This is a thread for * operations that affect what's on the display, which needs to have a minimum * of latency. This thread should pretty much only be used by the WindowManager, * DisplayManager, and InputManager to perform quick operations in real time. */ public final class DisplayThread extends ServiceThread { private static DisplayThread sInstance; private static Handler sHandler; private DisplayThread() { super("android.display", android.os.Process.THREAD_PRIORITY_DISPLAY, false /*allowIo*/); } private static void ensureThreadLocked() { if (sInstance == null) { sInstance = new DisplayThread(); sInstance.start(); sInstance.getLooper().setTraceTag(Trace.TRACE_TAG_ACTIVITY_MANAGER); sHandler = new Handler(sInstance.getLooper()); } } public static DisplayThread get() { synchronized (DisplayThread.class) { ensureThreadLocked(); return sInstance; } } public static Handler getHandler() { synchronized (DisplayThread.class) { ensureThreadLocked(); return sHandler; } } }
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
cb61f5a720db1d5b5038dbed8d4a58b660c470b7
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/huawei/nb/model/meta/PresetJobHelper.java
ee8645042e1111c03c176838431dbdc741df78e6
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,072
java
package com.huawei.nb.model.meta; import android.database.Cursor; import com.huawei.odmf.database.Statement; import com.huawei.odmf.model.AEntityHelper; public class PresetJobHelper extends AEntityHelper<PresetJob> { private static final PresetJobHelper INSTANCE = new PresetJobHelper(); private PresetJobHelper() { } public static PresetJobHelper getInstance() { return INSTANCE; } public void bindValue(Statement statement, PresetJob object) { Integer mId = object.getMId(); if (mId != null) { statement.bindLong(1, (long) mId.intValue()); } else { statement.bindNull(1); } String jobName = object.getJobName(); if (jobName != null) { statement.bindString(2, jobName); } else { statement.bindNull(2); } String parameter = object.getParameter(); if (parameter != null) { statement.bindString(3, parameter); } else { statement.bindNull(3); } Integer scheduleType = object.getScheduleType(); if (scheduleType != null) { statement.bindLong(4, (long) scheduleType.intValue()); } else { statement.bindNull(4); } Integer taskType = object.getTaskType(); if (taskType != null) { statement.bindLong(5, (long) taskType.intValue()); } else { statement.bindNull(5); } String jobInfo = object.getJobInfo(); if (jobInfo != null) { statement.bindString(6, jobInfo); } else { statement.bindNull(6); } } public PresetJob readObject(Cursor cursor, int offset) { return new PresetJob(cursor); } public void setPrimaryKeyValue(PresetJob object, long value) { object.setMId(Integer.valueOf((int) value)); } public Object getRelationshipObject(String field, PresetJob object) { return null; } public int getNumberOfRelationships() { return 0; } }
[ "dstmath@163.com" ]
dstmath@163.com
23f8bed58a7a1204a0c71d738a5d123754355c4b
8f946bea32e21255f3498dd7af784f4e863aff5b
/de.wicketpraxis--pom/webapp/src/main/java/de/wicketpraxis/web/thema/komponenten/behaviors/AjaxUpdatingPage.java
55a6d2fffe15cd23921f4660f22b9bad88778a91
[]
no_license
michaelmosmann/wicket-praxis
eba7fafba87114c17339a520484912d3446278d6
e9393c358ac788b0011bee4b0e58a85aebb3b05c
refs/heads/master
2016-09-06T07:11:27.822050
2013-11-12T21:23:41
2013-11-12T21:23:41
757,761
2
2
null
null
null
null
UTF-8
Java
false
false
1,003
java
/***************************************** * Quelltexte zum Buch: Praxisbuch Wicket * (http://www.hanser.de/978-3-446-41909-4) * * Autor: Michael Mosmann * (michael@mosmann.de) *****************************************/ package de.wicketpraxis.web.thema.komponenten.behaviors; import java.util.Date; import org.apache.wicket.ajax.AjaxSelfUpdatingTimerBehavior; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.util.time.Duration; public class AjaxUpdatingPage extends WebPage { public AjaxUpdatingPage() { LoadableDetachableModel<String> uhrModel = new LoadableDetachableModel<String>() { @Override protected String load() { return "Mit dem Zeitzeichen ist es genau " + new Date(); } }; Label uhr = new Label("uhr", uhrModel); uhr.setOutputMarkupId(true); uhr.add(new AjaxSelfUpdatingTimerBehavior(Duration.ONE_SECOND)); add(uhr); } }
[ "michael@mosmann.de" ]
michael@mosmann.de
3a0df6260217fb6c97063cc3130eb937c1ed1499
2c9a383130da3e872596476537eada48195c7436
/Java/src/main/java/org/zhouhy/hz41382/java/thread/nz/md08/Rabbit.java
8d47997bdda8110b6998ca3f4ec2ff1817eb1a8f
[]
no_license
fengandzhy/CoreJava
322c655519f5e6da35e6b6f9d7d1146fa3de1d17
35d8d2b9dec6c07ad11d39547df9206067f60438
refs/heads/master
2021-06-19T14:10:33.110399
2019-09-23T18:57:18
2019-09-23T18:57:18
112,720,758
0
0
null
null
null
null
UTF-8
Java
false
false
1,583
java
package org.zhouhy.hz41382.java.thread.nz.md08; import javax.swing.JTextArea; /** * <p>className: Rabbit</p> * <p>Description: </p> * <p>Company: Citi</p> * @author hz41382 * @date 2019年1月30日 */ public class Rabbit implements Runnable { private JTextArea rabbitTextArea; public Rabbit(JTextArea rabbitTextArea){ this.rabbitTextArea = rabbitTextArea; } @Override public void run() { for (int i = 1; i < 11; i++) {// 循环10次模拟赛跑的过程 String text = rabbitTextArea.getText();// 获得文本域中的信息 try { Thread.sleep(1);// 线程休眠0.001秒,模拟兔子在跑步 } catch (InterruptedException e) { e.printStackTrace(); } rabbitTextArea.setText(text + "兔子跑了" + i + "0米\n");// 显示兔子的跑步距离 if (i == 9) { rabbitTextArea.setText(text + "兔子在睡觉\n");// 当跑了90米时开始睡觉 try { Thread.sleep(10000);// 线程休眠10秒,模拟兔子在睡觉 } catch (InterruptedException e) { e.printStackTrace(); } } if (i == 10) { try { Thread.sleep(1);// 线程休眠0.001秒,模拟兔子在跑步 } catch (InterruptedException e) { e.printStackTrace(); } rabbitTextArea.setText(text + "兔子到达终点\n");// 显示兔子到达了终点 } } } }
[ "fengandzhy@gmail.com" ]
fengandzhy@gmail.com
a06a557ac214eb4e5967e9681966fec1039afd74
af66630bdef2969ea0df431aa86ae1689e03b67f
/app/src/main/java/com/mmy/maimaiyun/model/personal/ui/activity/AssertWebActivity.java
fe35f4c7e6d6bdc555aa6431a11f860f3a9c4a56
[]
no_license
IkeFan/mymyyun
f58650d9aeab2bab2102eec5137d2081fc3e1bf3
2d76528c51e18d8b36a0e109bd0dbc5275557f52
refs/heads/master
2020-03-29T11:43:23.943929
2018-09-28T03:40:42
2018-09-28T03:40:42
149,867,311
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
package com.mmy.maimaiyun.model.personal.ui.activity; import android.webkit.WebView; import android.widget.TextView; import com.mmy.maimaiyun.AppComponent; import com.mmy.maimaiyun.R; import com.mmy.maimaiyun.base.activity.BaseActivity; import butterknife.Bind; /** * 加载资源文件下的HTML文件 */ public class AssertWebActivity extends BaseActivity { @Bind(R.id.content) WebView mContent; @Bind(R.id.title_center_text) TextView mTitle; @Override protected void initDagger(AppComponent appComponent) { } @Override public void initView() { String title = getIntent().getStringExtra("title"); String path = getIntent().getStringExtra("path"); mTitle.setText(title); mContent.getSettings().setJavaScriptEnabled(true); mContent.loadUrl(path); } @Override public void initData() { } @Override public int getContentViewId() { return R.layout.activity_agreement; } }
[ "652918554@qq.com" ]
652918554@qq.com
f833fdcc490c42515d44e8f2451712b07226a589
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/google/android/gms/internal/firebase_ml/zzux.java
8fd4a11aa85b889cab11890fb608323727d87ffe
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.google.android.gms.internal.firebase_ml; import java.util.List; public interface zzux extends List { Object getRaw(int i); void zzc(zzsw zzsw); List<?> zzrv(); zzux zzrw(); }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
58a0a14fa7b56cd5d39683f959d2b02dd0abe3f7
cae9c594e7dc920d17363c5731700088d30ef969
/src/ctci/Ch17Hard/Q17_11_Word_Distance/QuestionB.java
f7aae8a254f267cc334ee6d4527849f0578d2070
[]
no_license
tech-interview-prep/technical-interview-preparation
a0dd552838305d6995bf9e7dfb90f4571e2e2025
8b299d3e282452789f05b8d08135b5ff66c7b890
refs/heads/master
2022-02-08T09:28:35.889755
2022-02-06T22:20:48
2022-02-06T22:20:48
77,586,682
6
3
null
null
null
null
UTF-8
Java
false
false
2,024
java
package ctci.Ch17Hard.Q17_11_Word_Distance; import java.util.ArrayList; import ctci.CtCILibrary.AssortedMethods; import ctci.CtCILibrary.HashMapList; public class QuestionB { public static HashMapList<String, Integer> getWordLocations(String[] words) { HashMapList<String, Integer> locations = new HashMapList<String, Integer>(); for (int i = 0; i < words.length; i++) { locations.put(words[i], i); } return locations; } public static LocationPair findMinDistancePair(ArrayList<Integer> array1, ArrayList<Integer> array2) { if (array1 == null || array2 == null || array1.size() == 0 || array2.size() == 0) { return null; } int index1 = 0; int index2 = 0; LocationPair best = new LocationPair(array1.get(0), array2.get(0)); LocationPair current = new LocationPair(array1.get(0), array2.get(0)); while (index1 < array1.size() && index2 < array2.size()) { current.setLocations(array1.get(index1), array2.get(index2)); best.updateWithMin(current); if (current.location1 < current.location2) { index1++; } else { index2++; } } return best; } public static LocationPair findClosest(String word1, String word2, HashMapList<String, Integer> locations) { ArrayList<Integer> locations1 = locations.get(word1); ArrayList<Integer> locations2 = locations.get(word2); return findMinDistancePair(locations1, locations2); } public static void main(String[] args) { String[] wordlist = AssortedMethods.getLongTextBlobAsStringList(); String word1 = "river"; String word2 = "life"; HashMapList<String, Integer> locations = getWordLocations(wordlist); LocationPair pair = findClosest(word1, word2, locations); System.out.println("Distance between <" + word1 + "> and <" + word2 + ">: " + pair.toString()); } }
[ "bkoteshwarreddy+github@gmail.com" ]
bkoteshwarreddy+github@gmail.com
14f75a385a76afd7ee1670cc3da355eeaf44e043
a0cd546101594e679544d24f92ae8fcc17013142
/refactorit-netbeans/src/test/java/net/sf/refactorit/test/netbeans/vcs/testutil/CvsCommandRunner.java
8a8e01e5181fbadd7a637a831c40a4c08a6772cb
[]
no_license
svn2github/RefactorIT
f65198bb64f6c11e20d35ace5f9563d781b7fe5c
4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c
refs/heads/master
2021-01-10T03:09:28.310366
2008-09-18T10:17:56
2008-09-18T10:17:56
47,540,746
0
1
null
null
null
null
UTF-8
Java
false
false
1,157
java
/* * Copyright 2001-2008 Aqris Software AS. All rights reserved. * * This program is dual-licensed under both the Common Development * and Distribution License ("CDDL") and the GNU General Public * License ("GPL"). You may elect to use one or the other of these * licenses. */ package net.sf.refactorit.test.netbeans.vcs.testutil; import java.io.File; import java.io.IOException; import net.sf.refactorit.commonIDE.IDEController; import net.sf.refactorit.netbeans.common.testmodule.NBTestRunnerModule; import net.sf.refactorit.ui.dialog.RitDialog; public class CvsCommandRunner { private CommandLineRunner cmdLine = new CommandLineRunner(); public void exec(String command, File dir) throws IOException, InterruptedException, NBTestRunnerModule.CancelledException { int result = cmdLine.run("cvs -d " + NBTestRunnerModule.Parameters.getCvsRoot() + " " + command, dir); if (result != 0) { RitDialog.showMessageDialog( IDEController.getInstance().createProjectContext(), "CVS command failed (exit value " + result + "); see logs"); } } }
[ "l950637@285b47d1-db48-0410-a9c5-fb61d244d46c" ]
l950637@285b47d1-db48-0410-a9c5-fb61d244d46c
83fac6f2449c357b75c142874adc3bc13b179260
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
/src/modules/agrega/AdminUsuarios/src/main/java/es/pode/adminusuarios/negocio/dominio/Rol.java
5f5131418a608f90628ac053a007e177e0c183c6
[]
no_license
nwlg/Colony
0170b0990c1f592500d4869ec8583a1c6eccb786
07c908706991fc0979e4b6c41d30812d861776fb
refs/heads/master
2021-01-22T05:24:40.082349
2010-12-23T14:49:00
2010-12-23T14:49:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,334
java
// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: HibernateEntity.vsl in andromda-hibernate-cartridge. // package es.pode.adminusuarios.negocio.dominio; /** * */ public abstract class Rol implements java.io.Serializable { /** * The serial version UID of this class. Needed for serialization. */ private static final long serialVersionUID = 6092073140157700971L; private java.lang.String descripcion; /** * */ public java.lang.String getDescripcion() { return this.descripcion; } public void setDescripcion(java.lang.String descripcion) { this.descripcion = descripcion; } private java.lang.Long id; /** * */ public java.lang.Long getId() { return this.id; } public void setId(java.lang.Long id) { this.id = id; } /** * Returns <code>true</code> if the argument is an Rol instance and all identifiers for this entity * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. */ public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof Rol)) { return false; } final Rol that = (Rol)object; if (this.id == null || that.id == null || !this.id.equals(that.id)) { return false; } return true; } /** * Returns a hash code based on this entity's identifiers. */ public int hashCode() { int hashCode = 0; hashCode = 29 * hashCode + (id == null ? 0 : id.hashCode()); return hashCode; } /** * Constructs new instances of {@link es.pode.adminusuarios.negocio.dominio.Rol}. */ public static final class Factory { /** * Constructs a new instance of {@link es.pode.adminusuarios.negocio.dominio.Rol}. */ public static es.pode.adminusuarios.negocio.dominio.Rol newInstance() { return new es.pode.adminusuarios.negocio.dominio.RolImpl(); } } // HibernateEntity.vsl merge-point }
[ "build@zeno.siriusit.co.uk" ]
build@zeno.siriusit.co.uk
2ed638ee849e3d7a98e6b0659f8b6fa5d2cc27c0
283dbf5926ed93c1cf897eef9314f43864cdfd11
/ch05/item_33/code33-1.java
5695e39cb4810a114a61f1b41606d93ee50b73a6
[]
no_license
freebz/Effective-Java-3-E
34ff41bd15e7140be2f696652b5dcf136104689f
ffbbfa0e1201ac0b3b1d5ee1ac8aaeb07964ed1b
refs/heads/master
2022-01-05T20:20:12.581263
2019-08-12T02:39:21
2019-08-12T02:39:21
201,845,405
1
0
null
null
null
null
UTF-8
Java
false
false
195
java
// 코드 33-1 타입 안전 이종 컨테이너 패턴 - API public class Favorites { public <T> void putFavorite(Class<T> type, T instance); public <T> T getFavorite(Class<T> type); }
[ "freebz@hananet.net" ]
freebz@hananet.net
377d15dacff8c1cb7a3df4eda67e8e8a763dd0fb
40323da1f87a2b47788ffee20e5045cec260fa42
/src/main/java/com/example/godcode_en/interface_/HandlerStrategy.java
69b81e4b1e0755fc604649182a3ac723d5bf054a
[]
no_license
huanglonghu/GodCode_EN
e2e602bcdfcc76c973f2f859dd2bb52c7ef20f8e
42e9fc3d7e2992f48ce08154f2b178dc6dfcfb96
refs/heads/master
2021-03-20T08:14:30.332078
2020-04-27T09:11:57
2020-04-27T09:11:57
247,189,088
0
0
null
null
null
null
UTF-8
Java
false
false
289
java
package com.example.godcode_en.interface_; import android.graphics.Bitmap; import okhttp3.MultipartBody; public abstract class HandlerStrategy { public void onActivityResult(String text) { } public void onActivityResult(MultipartBody.Part filePart, Bitmap bitmap){}; }
[ "952204748@qq.com" ]
952204748@qq.com
9d91378c3b48f90e086f19977c6cc0534b416ac9
0167f77a8364fe86aed16510c97ffc348c0d9132
/src/com/jetcms/cms/entity/assist/base/BaseCmsFriendlinkCtg.java
202e913d0b27af76acbeb904247b467596ee5156
[]
no_license
barrycom/kgmx
1bc379b7472ec11f8d807fbdf38644b59449410f
f2ad7902d06d36fdb908c6c098f36c978907b05f
refs/heads/master
2021-07-13T14:06:20.966837
2017-09-26T03:14:54
2017-09-26T03:16:42
104,827,608
2
0
null
null
null
null
UTF-8
Java
false
false
3,562
java
package com.jetcms.cms.entity.assist.base; import java.io.Serializable; /** * This is an object that contains data related to the jc_friendlink_ctg table. * Do not modify this class because it will be overwritten if the configuration file * related to this class is modified. * * @hibernate.class * table="jc_friendlink_ctg" */ public abstract class BaseCmsFriendlinkCtg implements Serializable { public static String REF = "CmsFriendlinkCtg"; public static String PROP_SITE = "site"; public static String PROP_PRIORITY = "priority"; public static String PROP_NAME = "name"; public static String PROP_ID = "id"; // constructors public BaseCmsFriendlinkCtg () { initialize(); } /** * Constructor for primary key */ public BaseCmsFriendlinkCtg (java.lang.Integer id) { this.setId(id); initialize(); } /** * Constructor for required fields */ public BaseCmsFriendlinkCtg ( java.lang.Integer id, com.jetcms.core.entity.CmsSite site, java.lang.String name, java.lang.Integer priority) { this.setId(id); this.setSite(site); this.setName(name); this.setPriority(priority); initialize(); } protected void initialize () {} private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Integer id; // fields private java.lang.String name; private java.lang.Integer priority; // many to one private com.jetcms.core.entity.CmsSite site; /** * Return the unique identifier of this class * @hibernate.id * generator-class="identity" * column="friendlinkctg_id" */ public java.lang.Integer getId () { return id; } /** * Set the unique identifier of this class * @param id the new ID */ public void setId (java.lang.Integer id) { this.id = id; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: friendlinkctg_name */ public java.lang.String getName () { return name; } /** * Set the value related to the column: friendlinkctg_name * @param name the friendlinkctg_name value */ public void setName (java.lang.String name) { this.name = name; } /** * Return the value associated with the column: priority */ public java.lang.Integer getPriority () { return priority; } /** * Set the value related to the column: priority * @param priority the priority value */ public void setPriority (java.lang.Integer priority) { this.priority = priority; } /** * Return the value associated with the column: site_id */ public com.jetcms.core.entity.CmsSite getSite () { return site; } /** * Set the value related to the column: site_id * @param site the site_id value */ public void setSite (com.jetcms.core.entity.CmsSite site) { this.site = site; } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof com.jetcms.cms.entity.assist.CmsFriendlinkCtg)) return false; else { com.jetcms.cms.entity.assist.CmsFriendlinkCtg cmsFriendlinkCtg = (com.jetcms.cms.entity.assist.CmsFriendlinkCtg) obj; if (null == this.getId() || null == cmsFriendlinkCtg.getId()) return false; else return (this.getId().equals(cmsFriendlinkCtg.getId())); } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getId()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString () { return super.toString(); } }
[ "whlitiger_yp@163.com" ]
whlitiger_yp@163.com
5abe05133d66a8774f2450edd23db1c33784e47f
827436a167bcaed1003f8737cd904644ff1992d1
/old/Farmaco/tag/Farmaco Beta1 revision67/Client/src/com/dudhoo/farmaco/swing/event/BotaoLimparAppFarmacAdapter.java
c2c5d2e8bec8cd51f3f516fb525a8a417e5aeb39
[]
no_license
edpichler/historyprojects
1a21d48484bda5a1115e87d8e1667cac7f8a410a
4b2e109a102717a8223fff32295f45132354c7c2
refs/heads/master
2016-08-05T08:11:40.425601
2010-08-23T13:36:38
2010-08-23T13:36:38
33,085,289
0
0
null
null
null
null
UTF-8
Java
false
false
953
java
package com.dudhoo.farmaco.swing.event; import com.dudhoo.farmaco.dto.ApresentacaoFarmaceutica; import com.dudhoo.farmaco.dto.Posologia; import com.dudhoo.farmaco.swing.component.JPanelPosologia; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JList; public class BotaoLimparAppFarmacAdapter implements ActionListener{ private JList listaApresentacoes; private JPanelPosologia panelPos; public BotaoLimparAppFarmacAdapter(JList _listaApresentacoes, JPanelPosologia _panelPos){ this.listaApresentacoes = _listaApresentacoes; panelPos = _panelPos; } public void actionPerformed(ActionEvent actionEvent){ ApresentacaoFarmaceutica app = (ApresentacaoFarmaceutica)listaApresentacoes.getSelectedValue(); if(app != null){ Posologia pos = panelPos.getPosologia(); pos.setDescricao(null); app.setPosologia( pos ); } } }
[ "edpichler@localhost" ]
edpichler@localhost
ec20bedc2fbe7eaafa4dd98e64135c5f88570b31
07567d1b051d679c203d63b7feaa3429f4599862
/rover.raspirover/src/rover/raspirover/raspirover/Meter.java
8d4ffc4d1b116151dc22dcc772f48abf9459d949
[]
no_license
tdegueul/gemoc-pirover
1bce59c253de235a2a594f5b2ea96c1632100099
b786281099b0cc76f292a0a7f9218c4b8e02cae8
refs/heads/master
2020-04-05T13:00:34.008010
2017-10-10T14:15:57
2017-10-10T14:15:57
95,002,463
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
/** */ package rover.raspirover.raspirover; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Meter</b></em>'. * <!-- end-user-doc --> * * * @see rover.raspirover.raspirover.RaspiroverPackage#getMeter() * @model * @generated */ public interface Meter extends MetricSystemUnit, LengthUnit { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model kind="operation" * @generated */ String getSymbol(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model * @generated */ double toCm(double value); } // Meter
[ "degueule@cwi.nl" ]
degueule@cwi.nl
2ebb4ac6eb376d6f7a09da3bd08e1ac038c03452
489dbf038dc81578ee3d1f3465e10d2148a7d3d5
/web-ide/resource/libsrc/mina/mina-http/src/main/java/org/apache/mina/http/HttpServerCodec.java
0d7173c679dd28bb991710040f918088178668aa
[ "MIT" ]
permissive
MartinGeisse/public
9b3360186be7953d2185608da883916622ec84e3
57b905485322222447187ae78a5a56bf3ce67900
refs/heads/master
2023-01-21T03:00:43.350628
2016-03-20T16:30:09
2016-03-20T16:30:09
4,472,103
1
0
NOASSERTION
2022-12-27T14:45:54
2012-05-28T15:56:16
Java
UTF-8
Java
false
false
1,889
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.mina.http; import org.apache.mina.core.filterchain.IoFilter; import org.apache.mina.core.session.IoSession; import org.apache.mina.filter.codec.ProtocolCodecFilter; import org.apache.mina.filter.codec.ProtocolDecoder; import org.apache.mina.filter.codec.ProtocolEncoder; public class HttpServerCodec extends ProtocolCodecFilter { /** Key for decoder current state */ private static final String DECODER_STATE_ATT = "http.ds"; /** Key for the partial HTTP requests head */ private static final String PARTIAL_HEAD_ATT = "http.ph"; private static ProtocolEncoder encoder = new HttpServerEncoder(); private static ProtocolDecoder decoder = new HttpServerDecoder(); public HttpServerCodec() { super(encoder, decoder); } @Override public void sessionClosed(IoFilter.NextFilter nextFilter, IoSession session) throws Exception { super.sessionClosed(nextFilter, session); session.removeAttribute(DECODER_STATE_ATT); session.removeAttribute(PARTIAL_HEAD_ATT); } }
[ "martingeisse@googlemail.com" ]
martingeisse@googlemail.com
a102793cc80cac63397eb9eb2a601d13b53548ff
4a015f5a9b655f027a4d4e04fdc926bb893d093d
/career-service/src/test/java/mk/ukim/finki/career/web/rest/errors/ExceptionTranslatorTestController.java
203c8d905ed3539dd27168916d3210f310a5e9c2
[ "MIT" ]
permissive
kirkovg/university-microservices
cd1bfe8f92dba3b422c56903b972a2aa9f0b45c7
2c8db22c3337014e3a8aa5de3e6a1a32d35c9ba0
refs/heads/master
2021-12-26T13:05:05.598702
2018-09-11T18:53:35
2018-09-11T18:53:35
147,234,534
0
0
MIT
2021-08-12T22:16:40
2018-09-03T17:25:19
Java
UTF-8
Java
false
false
2,986
java
package mk.ukim.finki.career.web.rest.errors; import org.springframework.dao.ConcurrencyFailureException; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.support.MissingServletRequestPartException; import javax.validation.Valid; import javax.validation.constraints.NotNull; import java.util.HashMap; import java.util.Map; @RestController public class ExceptionTranslatorTestController { @GetMapping("/test/concurrency-failure") public void concurrencyFailure() { throw new ConcurrencyFailureException("test concurrency failure"); } @PostMapping("/test/method-argument") public void methodArgument(@Valid @RequestBody TestDTO testDTO) { } @GetMapping("/test/parameterized-error") public void parameterizedError() { throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); } @GetMapping("/test/parameterized-error2") public void parameterizedError2() { Map<String, Object> params = new HashMap<>(); params.put("foo", "foo_value"); params.put("bar", "bar_value"); throw new CustomParameterizedException("test parameterized error", params); } @GetMapping("/test/missing-servlet-request-part") public void missingServletRequestPartException() throws Exception { throw new MissingServletRequestPartException("missing Servlet request part"); } @GetMapping("/test/missing-servlet-request-parameter") public void missingServletRequestParameterException() throws Exception { throw new MissingServletRequestParameterException("missing Servlet request parameter", "parameter type"); } @GetMapping("/test/access-denied") public void accessdenied() { throw new AccessDeniedException("test access denied!"); } @GetMapping("/test/unauthorized") public void unauthorized() { throw new BadCredentialsException("test authentication failed!"); } @GetMapping("/test/response-status") public void exceptionWithReponseStatus() { throw new TestResponseStatusException(); } @GetMapping("/test/internal-server-error") public void internalServerError() { throw new RuntimeException(); } public static class TestDTO { @NotNull private String test; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") @SuppressWarnings("serial") public static class TestResponseStatusException extends RuntimeException { } }
[ "gjorgjikirkov@gmail.com" ]
gjorgjikirkov@gmail.com
8ac7e18d312dbe5ea9468f6fdf4170d786bfd611
4bbfa242353fe0485fb2a1f75fdd749c7ee05adc
/ims-intfsh/src/main/java/com/ailk/ims/smsts/bean/ScanStartInfo.java
9b2a758bde809c20c2f1039adfbc6068a8cf1c3e
[]
no_license
859162000/infosystem
88b23a5b386600503ec49b14f3b4da4df7a6d091
96d4d50cd9964e713bb95520d6eeb7e4aa32c930
refs/heads/master
2021-01-20T04:39:24.383807
2017-04-01T10:59:24
2017-04-01T10:59:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,441
java
package com.ailk.ims.smsts.bean; import com.ailk.ims.common.DBCondition; /** * @Description:扫描开始信息 * @author wangjt * @Date 2012-8-27 */ public class ScanStartInfo { private String taskDate = null; private Long blockId = null;// 如果有上次未执行完成的任务,则从sms_send_value中获取 private int startCount = 0;// 如果有上次未执行完成的任务,则从sms_send_value中获取 private long startValue = 0;// 如果有上次未执行完成的任务,则从sms_send_value中获取 private DBCondition[] queryCondArr = null; public String getTaskDate() { return taskDate; } public void setTaskDate(String taskDate) { this.taskDate = taskDate; } public Long getBlockId() { return blockId; } public void setBlockId(Long blockId) { this.blockId = blockId; } public int getStartCount() { return startCount; } public void setStartCount(int startCount) { this.startCount = startCount; } public long getStartValue() { return startValue; } public void setStartValue(long startValue) { this.startValue = startValue; } public DBCondition[] getQueryCondArr() { return queryCondArr; } public void setQueryCondArr(DBCondition[] queryCondArr) { this.queryCondArr = queryCondArr; } }
[ "ljyshiqian@126.com" ]
ljyshiqian@126.com
c9ed80a5bcbcb944e127537b5f95f4e53629f400
ce9cddce66fc906a6b14fb787a5629820f3c0993
/Rebate-Mechanism/rebate-pom/rebate-operation/src/main/java/org/rebate/dao/UserRecommendRelationDao.java
482b501a5ff3525c8c2f96c9085a83aa076ee92f
[]
no_license
StoneInCHN/Rebate-Mechanism
ecfb685c81f5c6ce8f98f077e38a7a552cd75dbd
e7bfa49d92578bc4b6d5f2d8b80526118d20a9b8
refs/heads/master
2021-07-16T06:09:01.845090
2017-06-12T02:25:30
2017-06-12T02:25:30
84,913,436
1
0
null
null
null
null
UTF-8
Java
false
false
211
java
package org.rebate.dao; import org.rebate.entity.UserRecommendRelation; import org.rebate.framework.dao.BaseDao; public interface UserRecommendRelationDao extends BaseDao<UserRecommendRelation,Long>{ }
[ "464709367@qq.com" ]
464709367@qq.com
772bc2798dd17d04bf8fc783160733ba5b6efbcd
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/ui/o.java
021ccf14c3b300f50f64d35b824101914294d503
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,556
java
package com.tencent.mm.ui; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.os.Looper; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.R; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.sdk.platformtools.al; import com.tencent.mm.sdk.platformtools.bo; final class o extends Dialog implements DialogInterface { private boolean gHY; private View iUw = this.ykT.findViewById(R.id.d8r); private TextView jao = ((TextView) this.ykT.findViewById(R.id.d8s)); private Context mContext; Button tJz = ((Button) this.ykT.findViewById(R.id.b00)); private LinearLayout ykT = ((LinearLayout) v.hu(this.mContext).inflate(R.layout.ad6, null)); TextView ykU = ((TextView) this.ykT.findViewById(R.id.d8x)); private TextView ykV = ((TextView) this.ykT.findViewById(R.id.b05)); LinearLayout ykW = ((LinearLayout) this.ykT.findViewById(R.id.c6c)); private LinearLayout ykX = ((LinearLayout) this.ykT.findViewById(R.id.d8y)); /* renamed from: com.tencent.mm.ui.o$1 */ class AnonymousClass1 implements OnClickListener { final /* synthetic */ DialogInterface.OnClickListener ykY; final /* synthetic */ boolean ykZ = true; AnonymousClass1(DialogInterface.OnClickListener onClickListener) { this.ykY = onClickListener; } public final void onClick(View view) { AppMethodBeat.i(29536); if (this.ykY != null) { this.ykY.onClick(o.this, -1); } if (this.ykZ) { o.this.dismiss(); } AppMethodBeat.o(29536); } } public o(Context context) { super(context, R.style.zt); AppMethodBeat.i(29538); this.mContext = context; setCanceledOnTouchOutside(true); AppMethodBeat.o(29538); } /* Access modifiers changed, original: protected|final */ public final void onCreate(Bundle bundle) { AppMethodBeat.i(29539); super.onCreate(bundle); setContentView(this.ykT); AppMethodBeat.o(29539); } public final void setTitle(CharSequence charSequence) { AppMethodBeat.i(29540); this.iUw.setVisibility(0); this.jao.setVisibility(0); this.jao.setMaxLines(2); this.jao.setText(charSequence); dxO(); AppMethodBeat.o(29540); } public final void setTitle(int i) { AppMethodBeat.i(29541); this.iUw.setVisibility(0); this.jao.setVisibility(0); this.jao.setMaxLines(2); this.jao.setText(i); dxO(); AppMethodBeat.o(29541); } private void dxO() { AppMethodBeat.i(29542); if (this.ykU != null) { this.ykU.setTextColor(this.ykU.getContext().getResources().getColor(R.color.ma)); } AppMethodBeat.o(29542); } public final void setCancelable(boolean z) { AppMethodBeat.i(29543); super.setCancelable(z); this.gHY = z; setCanceledOnTouchOutside(this.gHY); AppMethodBeat.o(29543); } public final void dxP() { AppMethodBeat.i(29544); super.setCancelable(true); AppMethodBeat.o(29544); } public final void show() { AppMethodBeat.i(29545); try { super.show(); AppMethodBeat.o(29545); } catch (Exception e) { ab.printErrStackTrace("MicroMsg.LiteDependDialog", e, "", new Object[0]); AppMethodBeat.o(29545); } } public final void dismiss() { AppMethodBeat.i(29546); if (Looper.myLooper() != Looper.getMainLooper()) { al.d(new Runnable() { public final void run() { AppMethodBeat.i(29537); o.this.dismiss(); AppMethodBeat.o(29537); } }); ab.e("MicroMsg.LiteDependDialog", bo.dpG().toString()); AppMethodBeat.o(29546); return; } try { super.dismiss(); AppMethodBeat.o(29546); } catch (Exception e) { ab.e("MicroMsg.LiteDependDialog", "dismiss exception, e = " + e.getMessage()); AppMethodBeat.o(29546); } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
686e527b71c601f94e2f09ecf54f43a2b5771ac5
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-task1/src/main/java/com/smate/center/task/dao/pdwh/quartz/EiPublicationDao.java
c6dd37613f3fecb4e07880f2ba0ca33de08798dd
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
3,000
java
package com.smate.center.task.dao.pdwh.quartz; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Repository; import com.smate.center.task.model.pdwh.quartz.EiPubDup; import com.smate.center.task.model.pdwh.quartz.EiPubExtend; import com.smate.center.task.model.pdwh.quartz.EiPublication; import com.smate.core.base.utils.data.PdwhHibernateDao; /** * ei基准库基本信息. * * @author liqinghua * */ @Repository public class EiPublicationDao extends PdwhHibernateDao<EiPublication, Long> { /** * 保存基准库xml. * * @param pubId * @param xmlData */ public void saveEiPubExtend(Long pubId, String xmlData) { EiPubExtend extend = getEiPubExtend(pubId); if (extend == null) { extend = new EiPubExtend(pubId, xmlData); } else { extend.setXmlData(xmlData); } super.getSession().save(extend); } /** * 获取基准库XML. * * @param pubId * @return */ public EiPubExtend getEiPubExtend(Long pubId) { String hql = "from EiPubExtend t where t.pubId = ? "; return super.findUnique(hql, pubId); } /** * 保存查重数据. * * @param pubId * @param sourceIdHash * @param unitHash */ public void saveEiPubDup(Long pubId, Long sourceIdHash, Long titleHash, Long unitHash) { EiPubDup dup = new EiPubDup(pubId, sourceIdHash, titleHash, unitHash); super.getSession().save(dup); } /** * 获取重复的基准库数据. * * @param sourceIdHash * @param titleHash * * @param unitHash * @return */ @SuppressWarnings("unchecked") public EiPubDup getEiPubDup(Long sourceIdHash, Long titleHash, Long unitHash) { // source_id_hash EiPubDup dup = null; if (unitHash != null && titleHash != null) { if (sourceIdHash == null) { sourceIdHash = 0l; } List<EiPubDup> list = super.createQuery("from EiPubDup t where (t.sourceIdHash = ? or t.unitHash = ?) and t.titleHash = ? ", sourceIdHash, unitHash, titleHash).list(); if (CollectionUtils.isNotEmpty(list)) { dup = list.get(0); } } return dup; } /** * 加载标题以及作者. * * @param xmlIds * @return */ @SuppressWarnings("unchecked") public Map<Long, Map<String, Object>> loadPubTitleAuthor(List<Object> pubIds) { String hql = "select pubId,title,authorNames from EiPublication t where t.pubId in(:pubIds) "; List<Object[]> list = super.createQuery(hql).setParameterList("pubIds", pubIds).list(); Map<Long, Map<String, Object>> cacheMap = new HashMap<Long, Map<String, Object>>(); for (Object[] objs : list) { Map<String, Object> map = new HashMap<String, Object>(); map.put("xmlId", objs[0]); map.put("title", objs[1]); map.put("authorNames", objs[2]); cacheMap.put((Long) objs[0], map); } return cacheMap; } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
ac3c8402bac137c706379eb6f682048eec841d4b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_6d77e66312d1284c867189afd83daf91688f2663/InfernosProxyEntityBase/11_6d77e66312d1284c867189afd83daf91688f2663_InfernosProxyEntityBase_t.java
0f05856fa3046d62323a38357e32d602f2e7563a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,263
java
package com.forgetutorials.multientity.base; import java.util.ArrayList; import com.forgetutorials.lib.network.PacketMultiTileEntity; import com.forgetutorials.multientity.InfernosMultiEntity; import com.forgetutorials.multientity.InfernosMultiEntityInv; import com.forgetutorials.multientity.InfernosMultiEntityInvLiq; import com.forgetutorials.multientity.InfernosMultiEntityLiq; import com.forgetutorials.multientity.InfernosMultiEntityType; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.client.IItemRenderer.ItemRenderType; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; abstract public class InfernosProxyEntityBase { public static final InfernosProxyEntityDummy DUMMY = new InfernosProxyEntityDummy(null); protected InfernosMultiEntity entity; public InfernosProxyEntityBase(InfernosMultiEntity entity) { this.entity = entity; } abstract public boolean hasInventory(); abstract public boolean hasLiquids(); public int getSizeInventory() { return 0; } public ItemStack getStackInSlot(int i) { return null; } public ItemStack decrStackSize(int i, int j) { return null; } public ItemStack getStackInSlotOnClosing(int i) { return null; } public void setInventorySlotContents(int i, ItemStack itemstack) { } public String getInvName() { return "multientity." + getTypeName(); } public boolean isItemValidForSlot(int i, ItemStack itemstack) { return false; } public void closeChest() { } public void openChest() { } public boolean isUseableByPlayer(EntityPlayer entityplayer) { return false; } public int getInventoryStackLimit() { return 0; } public boolean isInvNameLocalized() { return true; } int[] nullArray = new int[] {}; public int[] getAccessibleSlotsFromSide(int var1) { return this.nullArray; } public boolean canInsertItem(int i, ItemStack itemstack, int j) { return false; } public boolean canExtractItem(int i, ItemStack itemstack, int j) { return false; } public void invalidate() { this.entity = null; } public FluidStack getFluid(int i) { return null; } public FluidStack getFluid(ForgeDirection direction) { return null; } public void setFluid(int i, FluidStack fluid) { } public int getFluidsCount() { return 0; } public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { return 0; } public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { return null; } public boolean canFill(ForgeDirection from, Fluid fluid) { return false; } public boolean canDrain(ForgeDirection from, Fluid fluid) { return false; } public void readFromNBT(NBTTagCompound tagCompound) { } public void writeToNBT(NBTTagCompound tagCompound) { } public void addToDescriptionPacket(PacketMultiTileEntity packet) { } public void onInventoryChanged() { if (!this.entity.worldObj.isRemote) { this.entity.worldObj.markBlockForUpdate(this.entity.xCoord, this.entity.yCoord, this.entity.zCoord); } } abstract public void renderItem(ItemRenderType type); abstract public void renderTileEntityAt(double x, double y, double z); abstract public void renderStaticBlockAt(RenderBlocks renderer, int x, int y, int z); public String getTypeName() { return "InternalError!"; } public float getBlockHardness() { return 1; } public ItemStack getSilkTouchItemStack() { return null; } public ArrayList<ItemStack> getBlockDropped(int fortune) { ArrayList<ItemStack> droppedItems = new ArrayList<ItemStack>(); return droppedItems; } public void onBlockActivated(EntityPlayer entityplayer, World world, int x, int y, int z, int par1, float par2, float par3, float par4) { } public void tick() { } /** * Returns -1 if entity is valid otherwise meta of entity * * @param infernosMultiEntity */ public int validateTileEntity(InfernosMultiEntity infernosMultiEntity) { boolean entityInv = false; boolean entityLiq = false; if (infernosMultiEntity instanceof InfernosMultiEntityInvLiq) { entityInv = true; entityLiq = true; } else if (infernosMultiEntity instanceof InfernosMultiEntityInv) { entityInv = true; } else if (infernosMultiEntity instanceof InfernosMultiEntityLiq) { entityLiq = true; } int meta = -1; if ((hasInventory() != entityInv) || (hasLiquids() != entityLiq)) { if (hasInventory()) { if (hasLiquids()) { meta = InfernosMultiEntityType.BOTH.ordinal(); } else { meta = InfernosMultiEntityType.INVENTORY.ordinal(); } } else { if (hasLiquids()) { meta = InfernosMultiEntityType.LIQUID.ordinal(); } else { meta = InfernosMultiEntityType.BASIC.ordinal(); } } } return meta; } public Icon getIconFromSide(int side) { return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b759b95fab33ce3f3250da18e7ddd365e7958a61
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/BoilerActuator3336.java
052ffc5bdb46c736ff631244de49920b53863fee
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator3336 { public execute(int temperatureDifference3336, boolean boilerStatus3336) { //sync _bfpnGUbFEeqXnfGWlV3336, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
1a82a8980a28e4dfcdd32579e10362caa719a08f
4e121bfe9778e3accb5c076ca0e57ae939b6b60e
/geoportal/src/com/esri/gpt/catalog/harvest/protocols/HarvestProtocolNone.java
c760010c75533d88f2c58dc53094dceb15aeb966
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unicode", "LGPL-2.0-or-later", "CDDL-1.0", "ICU", "CC-BY-SA-3.0", "MIT", "LicenseRef-scancode-unknown-license-reference", "JSON", "NAIST-2003", "CPL-1.0" ]
permissive
Esri/geoportal-server
79a126cb1808325426ad2ae66466e84459cf4794
29a1c66ebfbcd8f44247fa73b96fed50f52aada1
refs/heads/master
2023-08-22T17:20:42.269458
2023-06-15T18:50:36
2023-06-15T18:50:36
5,485,573
191
89
Apache-2.0
2023-04-16T22:49:39
2012-08-20T19:15:11
C#
UTF-8
Java
false
false
1,815
java
/* See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Esri Inc. licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.esri.gpt.catalog.harvest.protocols; import com.esri.gpt.control.webharvest.IterationContext; import com.esri.gpt.framework.collection.StringAttributeMap; import com.esri.gpt.framework.resource.query.QueryBuilder; /** * None protocol. */ public class HarvestProtocolNone extends HarvestProtocol { // class variables ============================================================= // instance variables ========================================================== // constructors ================================================================ // properties ================================================================== /** * Gets protocol type. * @return protocol type * @deprecated */ @Override @Deprecated public final ProtocolType getType() { return ProtocolType.None; } @Override public String getKind() { return "None"; } // methods ===================================================================== @Override public QueryBuilder newQueryBuilder(IterationContext context, String url) { // there is no query builder here return null; } }
[ "mhogeweg@esri.com" ]
mhogeweg@esri.com
6e93b1ba600e82e47d00ff1a5da43ba28ac815af
072742f580167c59cb6ccf388dd74c486d8efbe7
/sources/com/txznet/comm/ui/dialog/CommonDialog.java
50b3ea51b1ed77f3142a8943f5729b460845e716
[]
no_license
1989rat/libcan59-TsMainUI
3ff2034fc162943419998edab8ad4f1dd9dc8a02
9fe822b23d0f748dd8c6c109a5e93150f54458aa
refs/heads/master
2023-03-20T07:56:55.859764
2021-01-26T05:07:11
2021-01-26T05:07:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,889
java
package com.txznet.comm.ui.dialog; import android.content.res.Resources; import android.graphics.Bitmap; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; import com.txznet.comm.Tr.T; import com.txznet.comm.Tr.Tr.T; import com.txznet.comm.ui.IKeepClass; import com.txznet.txz.comm.R; import com.txznet.txz.util.Tk; /* compiled from: Proguard */ public class CommonDialog extends WinDialog implements IKeepClass { /* access modifiers changed from: private */ /* renamed from: T reason: collision with root package name */ public String[] f566T = new String[0]; private TextView T9; private FrameLayout TB; private ImageView TF; /* access modifiers changed from: private */ public View.OnClickListener TK; /* access modifiers changed from: private */ public View.OnClickListener TO; /* access modifiers changed from: private */ public TextView Te; private Resources Tj; private TextView Tn; /* access modifiers changed from: private */ public TextView Tq; /* access modifiers changed from: private */ public String[] Tr = new String[0]; private ImageView Ty; public CommonDialog() { super(true); } /* access modifiers changed from: protected */ public View T() { this.Tj = T.Tr().getResources(); View view = getLayoutInflater().inflate(R.layout.dialog_common, (ViewGroup) null, false); this.Ty = (ImageView) view.findViewById(R.id.iv_icon); this.Tn = (TextView) view.findViewById(R.id.tv_title); this.T9 = (TextView) view.findViewById(R.id.tv_content); this.Te = (TextView) view.findViewById(R.id.tv_confirm); this.Tq = (TextView) view.findViewById(R.id.tv_cancel); this.TF = (ImageView) view.findViewById(R.id.iv_qrcode); this.TB = (FrameLayout) view.findViewById(R.id.fl_custom_content); return view; } private void T9() { com.txznet.comm.Tr.Tr.T.TZ(toString()); } private void Tk() { int i = 0; com.txznet.comm.Tr.Tr.T.Ty(); T.Tk mWakeupAsrCallback = null; int length = this.f566T == null ? 0 : this.f566T.length; if (this.Tr != null) { i = this.Tr.length; } if (length + i > 0) { mWakeupAsrCallback = new T.Tk() { public boolean needAsrState() { return false; } public String getTaskId() { return CommonDialog.this.toString(); } public boolean onAsrResult(String text) { String[] T2 = CommonDialog.this.f566T; int length = T2.length; int i = 0; while (i < length) { if (!TextUtils.equals(T2[i], text)) { i++; } else if (CommonDialog.this.TK == null) { return true; } else { CommonDialog.this.TK.onClick(CommonDialog.this.Te); return true; } } String[] Tn = CommonDialog.this.Tr; int length2 = Tn.length; int i2 = 0; while (i2 < length2) { if (!TextUtils.equals(Tn[i2], text)) { i2++; } else if (CommonDialog.this.TO == null) { return true; } else { CommonDialog.this.TO.onClick(CommonDialog.this.Tq); return true; } } return false; } public int getPriority() { return 1; } public String[] genKeywords() { return CommonDialog.this.T(CommonDialog.this.f566T, CommonDialog.this.Tr); } }; } if (mWakeupAsrCallback != null) { com.txznet.comm.Tr.Tr.T.T(mWakeupAsrCallback); } } /* access modifiers changed from: private */ public String[] T(String[] sureCmds, String[] cancelCmds) { int i = 0; int length = sureCmds == null ? 0 : sureCmds.length; if (cancelCmds != null) { i = cancelCmds.length; } String[] cmds = new String[(length + i)]; int k = 0; for (String str : sureCmds) { cmds[k] = str; k++; } for (String str2 : cancelCmds) { cmds[k] = str2; k++; } return cmds; } public void show() { getWindow().setLayout((int) this.Tj.getDimension(R.dimen.x400), -2); super.show(); } public void setCustomContentView(View view) { this.T9.setVisibility(8); this.TF.setVisibility(8); this.TB.addView(view); } public void setTitle(String title) { this.Tn.setVisibility(0); this.Tn.setText(title); } public void setTitleIcon(int resId) { this.Ty.setVisibility(0); this.Ty.setImageResource(resId); } public void setContent(String content) { this.T9.setVisibility(0); this.T9.setText(content); } public void setContentGravity(int gravity) { this.T9.setGravity(gravity); } public void setQrCode(String content, int width) { this.TF.setVisibility(0); Bitmap bm = null; try { bm = Tk.T(content, width); } catch (Exception e) { e.printStackTrace(); } this.TF.setImageBitmap(bm); } public void setQrCode(String content) { setQrCode(content, (int) this.Tj.getDimension(R.dimen.y200)); } public void setPositiveButton(String text, View.OnClickListener listener, String... cmds) { this.Te.setVisibility(0); this.Te.setText(text); this.Te.setOnClickListener(listener); this.TK = listener; if (cmds != null) { this.f566T = cmds; } } public void setNegativeButton(String text, View.OnClickListener listener, String... cmds) { this.Tq.setVisibility(0); this.Tq.setText(text); this.Tq.setOnClickListener(listener); this.TO = listener; if (cmds != null) { this.Tr = cmds; } } /* access modifiers changed from: protected */ public void Tr() { Tk(); super.Tr(); } /* access modifiers changed from: protected */ public void Ty() { T9(); super.Ty(); } }
[ "nicholas@prjkt.io" ]
nicholas@prjkt.io
7da3db6eec0c6333bc03a2fed6f45734f272ca2e
351885af55631069ea22dff45b3bed0a25c7239f
/76/SpringCloud课堂案例/C76-S3-Ply-sc-user/src/main/java/com/yc/user/web/IndexAction.java
eb5a5cf1f85446226c4baa5b063258baa6f3d3cb
[]
no_license
llsok/ycdemo
4c3821af92c45c270cda30b8a90f3a8faeb64c14
98d14b7b566ef28c0e32e2fd29ecc524f368eafd
refs/heads/master
2022-12-26T01:09:40.770448
2020-04-08T03:43:55
2020-04-08T03:43:55
216,328,207
7
13
null
2022-12-16T09:45:17
2019-10-20T08:08:52
JavaScript
UTF-8
Java
false
false
848
java
package com.yc.user.web; import java.util.Enumeration; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class IndexAction { @GetMapping("user/way") public String index(HttpServletRequest req, HttpServletResponse resp) { // 遍历所有的头域值 Enumeration<String> enus = req.getHeaderNames(); while (enus.hasMoreElements()) { String name = enus.nextElement(); System.out.println(name + " = " + req.getHeader(name)); } // 添加cookie数据 Cookie cookie = new Cookie("testcookie", "123456"); resp.addCookie(cookie); return "user: " + req.getServerPort(); } }
[ "306529917@qq.com" ]
306529917@qq.com
57a41595a9ab4afa715d71e17860e1ed0436ee62
fdcf2af8597b33110799fed80bb7303fbc7c06e2
/flowable05/src/test/java/org/javaboy/flowable05/Flowable03ApplicationTests.java
ebc5a99720355769c357fbd5db2882c775004f27
[]
no_license
MrDongShan/javaboy-code-samples
82b5ecf245cf14e693ee8e4f14d002572c01f4f2
5e7af1d93a4acc6c50c2ca5ec1e80ee9da42d057
refs/heads/master
2023-07-06T02:48:08.621361
2023-05-14T14:01:53
2023-05-14T14:01:53
245,963,632
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package org.javaboy.flowable05; import org.flowable.engine.IdentityService; import org.flowable.idm.engine.impl.persistence.entity.UserEntityImpl; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class Flowable03ApplicationTests { @Autowired IdentityService identityService; @Test void contextLoads() { UserEntityImpl user = new UserEntityImpl(); user.setId("1"); identityService.saveUser(user); } }
[ "wangsong0210@gmail.com" ]
wangsong0210@gmail.com
8a6e1ccf18881dc73dbf58c5209e5b48d06c54d6
4ea5417ecd70f8c6757603ad463bd1abf394d358
/org.sheepy.lily.vulkan.process.graphic/src/main/java/org/sheepy/lily/vulkan/process/graphic/pipeline/task/DrawRecorder.java
f4de9460292170779acab3f0e9b75ddd8eee9f9b
[ "MIT" ]
permissive
Ealrann/Lily-Vulkan
88fd02373ce7ca390ab3581faf10a7a8b799adea
04c72b506a1db472b9f23dde25c4e1915480f122
refs/heads/master
2023-08-12T16:43:33.403548
2023-08-11T21:05:09
2023-08-11T21:05:09
141,837,401
0
0
null
null
null
null
UTF-8
Java
false
false
976
java
package org.sheepy.lily.vulkan.process.graphic.pipeline.task; import org.logoce.adapter.api.Adapter; import org.logoce.extender.api.ModelExtender; import org.sheepy.lily.vulkan.core.execution.RecordContext; import org.sheepy.lily.vulkan.core.pipeline.IRecordableAdapter; import org.sheepy.lily.vulkan.model.process.graphic.Draw; import static org.lwjgl.vulkan.VK10.vkCmdDraw; @ModelExtender(scope = Draw.class) @Adapter public final class DrawRecorder implements IRecordableAdapter { private final Draw task; private DrawRecorder(Draw task) { this.task = task; } @Override public void record(RecordContext context) { final int vertexCount = task.getVertexCount(); final int instanceCount = task.getInstanceCount(); final int firstVertex = task.getFirstVertex(); final int firstInstance = task.getFirstInstance(); final var commandBuffer = context.commandBuffer; vkCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); } }
[ "ealrann@gmail.com" ]
ealrann@gmail.com
95bfe64a74cc519fc96bd1b581b82c2c6a31e421
9b3dabf54ec1054f717432f3fa19f9f0418cbd62
/src/com/gh4a/EventReceiver.java
6ce39e260f5bffbb7b82a64a01ff0c26b723f14f
[ "Apache-2.0", "CC-BY-3.0" ]
permissive
ocdtrekkie/gh4a
3181fd657f31152feeecd9339feb7cf65b9e2b8f
d29e494a7662404b5da2b8f9c9240094d26b0b52
refs/heads/master
2021-01-20T22:50:40.263012
2015-05-08T17:27:24
2015-05-08T17:27:24
31,077,231
4
0
null
2015-02-20T17:58:26
2015-02-20T17:58:26
null
UTF-8
Java
false
false
1,708
java
/* * Copyright 2014 Danny Baumann * * 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.gh4a; import android.annotation.SuppressLint; import android.app.DownloadManager; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Build; public class EventReceiver extends BroadcastReceiver { @SuppressLint("InlinedApi") @Override public void onReceive(Context context, Intent intent) { if (DownloadManager.ACTION_NOTIFICATION_CLICKED.equals(intent.getAction())) { try { Intent downloadManagerIntent = new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS); downloadManagerIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { downloadManagerIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); } context.startActivity(downloadManagerIntent); } catch (ActivityNotFoundException e) { // ignore, there's nothing we can do about this } } } }
[ "dannybaumann@web.de" ]
dannybaumann@web.de
7638cd46e65276a724ce084adba45626134509d7
f91271cddd61f3b53828086a396612d7a30e676d
/src/main/java/gtl/geom/IsoscelesTriangle.java
b96d43aa34f13cc312ec1f489aba75746a15083b
[]
no_license
xyfigo/gtl_for_java
12f24527846210f68a0691044296b81a14cd53a3
f6ee589655c787e4a4e96e2752067637b11c78c8
refs/heads/master
2020-04-15T15:55:45.152916
2018-02-11T01:06:23
2018-02-11T01:06:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
409
java
package gtl.geom; /** * Created by ZhenwenHe on 2017/3/13. * V0V1==V0V2 */ public class IsoscelesTriangle extends TriangleImpl { private static final long serialVersionUID = 1L; public IsoscelesTriangle() { } public IsoscelesTriangle(Vector[] vertices) { super(vertices); } public IsoscelesTriangle(Vector v0, Vector v1, Vector v2) { super(v0, v1, v2); } }
[ "zwhe@cug.edu.cn" ]
zwhe@cug.edu.cn
6636cdf7c0448277859cd4edbc96afe54ed94f24
ae2603e1775d5fe454196da9c60d7633e908e126
/src/main/java/com/search/documentMapping/DocumentHistory.java
40be430952435094a4adb1b7f1ad4cdeda4e94b2
[]
no_license
obinna240/SearchProject
6f098f0b5083ef2386cd9f997518e78abf57a65f
612e40a12cf1648ba006ea09c1538c7f7703f34c
refs/heads/master
2020-03-07T21:55:20.774370
2018-04-02T10:17:55
2018-04-02T10:17:55
127,740,427
0
0
null
null
null
null
UTF-8
Java
false
false
2,745
java
package com.search.documentMapping; import java.util.Date; import java.util.Map; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; /** * DocumentHistory collection is a catalogue of Saved Documents and * everything that has happened to them. Each document has a shared historyID * For instance, a document titled 'my-phd-thesis' could have 10 versions which will be part * of its history * @author oonyimadu * */ @Document public class DocumentHistory { @Id private String historyID; //same as objectID in DocumentObject private String checkSum; //this is the checksum of the most recent version private String fileLocation; //number of versions should be equal to count(documentAndVersion/2) private Integer numberOfVersions; private Long totalSizeOfHistoryOnDisk; private Boolean isModified; //tells us if the document is modified private Map<String, DocumentObject> documentAndVersion; private Date dateOfIndexing; //date of last index //private Date dateOfDeletion; //date of last deletion private Date dateOfSaving; //date of last save //private Map<String, String> listOfVersionsAndStates; //{"1":"exists"}, {"2":"deleted"} public String getHistoryID() { return historyID; } public void setHistoryID(String historyID) { this.historyID = historyID; } public String getCheckSum() { return checkSum; } public void setCheckSum(String checkSum) { this.checkSum = checkSum; } public Boolean getIsModified() { return isModified; } public void setIsModified(Boolean isModified) { this.isModified = isModified; } public Map<String, DocumentObject> getDocumentAndVersion() { return documentAndVersion; } public void setDocumentAndVersion(Map<String, DocumentObject> documentAndVersion) { this.documentAndVersion = documentAndVersion; } public Date getDateOfIndexing() { return dateOfIndexing; } public void setDateOfIndexing(Date dateOfIndexing) { this.dateOfIndexing = dateOfIndexing; } public Date getDateOfSaving() { return dateOfSaving; } public void setDateOfSaving(Date dateOfSaving) { this.dateOfSaving = dateOfSaving; } public Integer getNumberOfVersions() { return numberOfVersions; } public void setNumberOfVersions(Integer numberOfVersions) { this.numberOfVersions = numberOfVersions; } public Long getTotalSizeOfHistoryOnDisk() { return totalSizeOfHistoryOnDisk; } public void setTotalSizeOfHistoryOnDisk(Long totalSizeOfHistoryOnDisk) { this.totalSizeOfHistoryOnDisk = totalSizeOfHistoryOnDisk; } public String getFileLocation() { return fileLocation; } public void setFileLocation(String fileLocation) { this.fileLocation = fileLocation; } }
[ "obinna240@yahoo.co.uk" ]
obinna240@yahoo.co.uk
c7ca5db0e798102ec9ee4f19a4455c69b06ef239
4c4ae435db4175f209440b3b4f7d46fa98676b07
/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetFeedback.java
9a14b16de724d0a1177fbf09e1d7387b5e199cb2
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
danielaotelea/egeria
20536336efd2f6ab22d188673a02e4a4dc2490c1
1c50ffda7404820203b4e4422e2c8a7829030f43
refs/heads/master
2023-01-25T01:40:00.002563
2020-10-21T11:33:29
2020-10-21T11:33:29
206,025,967
1
0
Apache-2.0
2023-01-23T06:12:10
2019-09-03T08:19:58
Java
UTF-8
Java
false
false
4,806
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; import org.testng.annotations.Test; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; public class TestAssetFeedback { /** * Set up an example object to test. * * @return filled in object */ private AssetFeedback getTestObject() { Asset assetBean = new Asset(); assetBean.setQualifiedName("TestName"); AssetSummary parentAsset = new AssetSummary(assetBean); return new AssetFeedback(parentAsset, new MockAssetInformalTags(parentAsset, 1, 5), null, null, null); } /** * Set up an example object to test. A property from the super class is different. * * @return filled in object */ private AssetFeedback getDifferentObject() { Asset assetBean = new Asset(); assetBean.setQualifiedName("TestName"); AssetSummary parentAsset = new AssetSummary(assetBean); return new AssetFeedback(null, new MockAssetInformalTags(parentAsset, 1, 5), null, null, null); } /** * Set up an example object to test. A property from the subclass is different. * * @return filled in object */ private AssetFeedback getAnotherDifferentObject() { Asset assetBean = new Asset(); assetBean.setQualifiedName("TestName"); AssetSummary parentAsset = new AssetSummary(assetBean); return new AssetFeedback(parentAsset, new MockAssetInformalTags(parentAsset, 1, 5), new MockAssetLikes(parentAsset, 5 , 100), null, null); } @Test public void testAssetFeedback() { AssetSummary parentAsset = new AssetSummary(new Asset()); AssetFeedback assetFeedback = new AssetFeedback(parentAsset, null, null, null, null); assertTrue(assetFeedback.getInformalTags() == null); assertTrue(assetFeedback.getLikes() == null); assertTrue(assetFeedback.getRatings() == null); assertTrue(assetFeedback.getComments() == null); assetFeedback = new AssetFeedback(parentAsset, new MockAssetInformalTags(parentAsset, 0, 0), new MockAssetLikes(parentAsset, 0, 0), new MockAssetRatings(parentAsset, 0, 0), new MockAssetComments(parentAsset, 0, 0)); assertTrue(assetFeedback.getInformalTags() != null); assertTrue(assetFeedback.getLikes() != null); assertTrue(assetFeedback.getRatings() != null); assertTrue(assetFeedback.getComments() != null); AssetFeedback assetFeedbackClone = new AssetFeedback(parentAsset, assetFeedback); assertTrue(assetFeedbackClone.getInformalTags() != null); assertTrue(assetFeedbackClone.getLikes() != null); assertTrue(assetFeedbackClone.getRatings() != null); assertTrue(assetFeedbackClone.getComments() != null); } /** * Validate the subclass constructor works all of the way up the inheritance hierarchy. */ @Test public void testSubclassInitialization() { new AssetFeedback(null); } /** * Validate that 2 different objects with the same content are evaluated as equal. * Also that different objects are considered not equal. */ @Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetFeedback sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); assertFalse(getTestObject().equals(getDifferentObject())); assertFalse(getTestObject().equals(getAnotherDifferentObject())); } /** * Test that toString is overridden. */ @Test public void testToString() { assertTrue(getTestObject().toString().contains("AssetFeedback")); } }
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
6ab4d30ef303853720a1471eccba097684b8c0fb
4c01c1a8acd7bca86b5dc95476c9ff5c700720ea
/library-project/src/main/java/com/hybrid/libraryproject/security/AuthenticationResponse.java
4775b1db84813d31aa76ad075514665a59b14c23
[]
no_license
senka97/library
793e343d7e81bb371d22e995931cf99da7ad1911
a55149534faea049a1f0034d1f2ea2146c7e398e
refs/heads/main
2023-06-17T05:43:52.906181
2021-07-13T19:09:08
2021-07-13T19:09:08
385,707,229
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.hybrid.libraryproject.security; public class AuthenticationResponse { private String accessToken; private Long expiresIn; public AuthenticationResponse() { this.accessToken = null; this.expiresIn = null; } public AuthenticationResponse(String accessToken, long expiresIn) { this.accessToken = accessToken; this.expiresIn = expiresIn; } public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } public Long getExpiresIn() { return expiresIn; } public void setExpiresIn(Long expiresIn) { this.expiresIn = expiresIn; } }
[ "senka.soic@uns.ac.rs" ]
senka.soic@uns.ac.rs
8265b948e2ffd0466a6de0e06283eb1a214e5695
cb5310ae9cb5a81c191a3e2f358b94f463b2fa6b
/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFNumberFormatterOptionFlags.java
26fee0cf1d9031a60039a680f4112511b5f86feb
[ "Apache-2.0" ]
permissive
jiangwh/robovm
a3da6d97083eab70ddeb4942d5bafa82d231aec2
a58b3a1928a60ea132b41cd0e51fae5550e224f5
refs/heads/master
2020-12-25T04:47:23.403516
2014-07-17T00:35:34
2014-07-17T00:35:34
21,945,788
1
0
null
null
null
null
UTF-8
Java
false
false
2,150
java
/* * Copyright (C) 2014 Trillian Mobile AB * * 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.robovm.apple.corefoundation; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.dispatch.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*/@Marshaler(Bits.AsMachineSizedIntMarshaler.class)/*</annotations>*/ public final class /*<name>*/CFNumberFormatterOptionFlags/*</name>*/ extends Bits</*<name>*/CFNumberFormatterOptionFlags/*</name>*/> { /*<values>*/ public static final CFNumberFormatterOptionFlags ParseIntegersOnly = new CFNumberFormatterOptionFlags(1L); /*</values>*/ private static final /*<name>*/CFNumberFormatterOptionFlags/*</name>*/[] values = _values(/*<name>*/CFNumberFormatterOptionFlags/*</name>*/.class); public /*<name>*/CFNumberFormatterOptionFlags/*</name>*/(long value) { super(value); } private /*<name>*/CFNumberFormatterOptionFlags/*</name>*/(long value, long mask) { super(value, mask); } protected /*<name>*/CFNumberFormatterOptionFlags/*</name>*/ wrap(long value, long mask) { return new /*<name>*/CFNumberFormatterOptionFlags/*</name>*/(value, mask); } protected /*<name>*/CFNumberFormatterOptionFlags/*</name>*/[] _values() { return values; } public static /*<name>*/CFNumberFormatterOptionFlags/*</name>*/[] values() { return values.clone(); } }
[ "niklas@therning.org" ]
niklas@therning.org
fa10e545726f994e934774d6ae3b76c84468a870
c227735e87fe9da845e81c994f5a0c4cc410abf9
/Java/LongestCommonPrefix.java
60717ca8466facf4ec82206954c9c60f2c83544f
[ "MIT" ]
permissive
ani03sha/potd
816d5a25c9658eb38dda46352d7518d999a807f2
05ca25039c5462b68dae9d83e856dd4c66e7ab63
refs/heads/main
2023-02-02T18:14:43.273677
2020-12-18T15:31:06
2020-12-18T15:31:06
315,034,076
0
0
null
null
null
null
UTF-8
Java
false
false
1,582
java
/** * Given an array of strings, return the longest common prefix that is shared * amongst all strings. Note: you may assume all strings only contain lowercase * alphabetical characters. */ public class LongestCommonPrefix { private static String longestCommonPrefix(String[] a) { // This variable will store the longest common prefix StringBuilder lcp = new StringBuilder(); // Base condition if (a == null || a.length == 0) { return lcp.toString(); } // Find the length of the shortest string in the array int minimumLength = a[0].length(); for (int i = 1; i < a.length; i++) { minimumLength = Math.min(minimumLength, a[i].length()); } // Loop until the minimum length for (int i = 0; i < minimumLength; i++) { // Get the current character from the first string char c = a[0].charAt(i); // Check if this character is present in all the other strings for (String s : a) { if (s.charAt(i) != c) { return lcp.toString(); } } lcp.append(c); } return lcp.toString(); } public static void main(String[] args) { System.out.println(longestCommonPrefix(new String[] { "flower", "flow", "flight" })); System.out.println(longestCommonPrefix(new String[] { "dog", "racecar", "car" })); System.out.println(longestCommonPrefix(new String[] { "electric", "elephant", "elevator", "element" })); } }
[ "anirudh03sharma@gmail.com" ]
anirudh03sharma@gmail.com
f22c3963db41171d45cb30211ce729a53cb3f39a
a61c77b266585083d8749911c6166dd5e69a3f74
/org/omg/PortableServer/ServantLocatorPOA.java
8ee8b4a390fc68180abe7ccf1ba8925c68a6d728
[]
no_license
zxlooong/jdk16045
1a043c4395bec55db27298056bcc0ed71b4bc24b
4965d78f878cde02ade9f7775590f915623ccda6
refs/heads/master
2016-08-08T02:38:44.040623
2013-12-06T16:53:15
2013-12-06T16:53:15
14,988,211
5
0
null
null
null
null
UTF-8
Java
false
false
2,427
java
package org.omg.PortableServer; /** * org/omg/PortableServer/ServantLocatorPOA.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl * Tuesday, March 26, 2013 8:54:59 PM GMT */ /** * When the POA has the NON_RETAIN policy it uses servant * managers that are ServantLocators. Because the POA * knows that the servant returned by this servant * manager will be used only for a single request, * it can supply extra information to the servant * manager's operations and the servant manager's pair * of operations may be able to cooperate to do * something different than a ServantActivator. * When the POA uses the ServantLocator interface, * immediately after performing the operation invocation * on the servant returned by preinvoke, the POA will * invoke postinvoke on the servant manager, passing the * ObjectId value and the Servant value as parameters * (among others). This feature may be used to force * every request for objects associated with a POA to * be mediated by the servant manager. */ public abstract class ServantLocatorPOA extends org.omg.PortableServer.Servant implements org.omg.PortableServer.ServantLocatorOperations, org.omg.CORBA.portable.InvokeHandler { // Constructors private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("preinvoke", new java.lang.Integer (0)); _methods.put ("postinvoke", new java.lang.Integer (1)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { throw new org.omg.CORBA.BAD_OPERATION(); } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:omg.org/PortableServer/ServantLocator:1.0", "IDL:omg.org/PortableServer/ServantManager:1.0"}; public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) { return (String[])__ids.clone (); } public ServantLocator _this() { return ServantLocatorHelper.narrow( super._this_object()); } public ServantLocator _this(org.omg.CORBA.ORB orb) { return ServantLocatorHelper.narrow( super._this_object(orb)); } } // class ServantLocatorPOA
[ "zxlooong@gmail.com" ]
zxlooong@gmail.com
8bb2767c9ac4cf6fea93d6e7d64fd3019ec337eb
cf017f5bf92c42f7c1717215876cac0436549ae1
/JavaExercise/54_网络编程/module_1/src/cn/lingjian_3/ReceiveDemo.java
fdfccef365c251f9a19cdf571a02b327046729ff
[]
no_license
lj153860134/My-study
a725c020942f8c780f5ad3b0c63c42df99bbbfe7
8736c495682d173bdd26fd8dccea21b28b982733
refs/heads/master
2023-06-29T06:31:03.275518
2021-07-29T01:55:50
2021-07-29T01:55:50
390,532,202
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package cn.lingjian_3; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; /** * @author lingjian * @date 2019/10/25 - 3:15 下午 */ public class ReceiveDemo { public static void main(String[] args) throws IOException { DatagramSocket ds=new DatagramSocket(10098); byte[] bys=new byte[1024]; DatagramPacket dp=new DatagramPacket(bys,bys.length); ds.receive(dp); String ip=dp.getAddress().getHostAddress(); String str=new String(dp.getData(),0,dp.getLength()); System.out.println(ip+"数据为: "+str); ds.close(); } }
[ "153860134@qq.com" ]
153860134@qq.com
1ac14ed7a09deb4e3dd531283721d5a96bca40fe
56315484aa62754316d731c8448f811116aa041c
/sveditor/plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/expr_utils/SVExprUtilsParser.java
0ac1e660e21c431d3fcda27d49a73a6a8cb745c8
[]
no_license
ruspl-afed/sveditor
59467f74c3dd4718308c7a6a4c8f2dd6cdf4870a
98702dcc89d1a6162e469d856ab4d45e561d210a
refs/heads/master
2022-11-10T23:54:45.900321
2020-01-31T02:03:52
2020-01-31T02:03:52
275,615,685
0
0
null
2020-06-28T15:40:14
2020-06-28T15:40:13
null
UTF-8
Java
false
false
3,122
java
/**************************************************************************** * Copyright (c) 2008-2011 Matthew Ballance and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Matthew Ballance - initial implementation ****************************************************************************/ package net.sf.sveditor.core.expr_utils; import net.sf.sveditor.core.SVCorePlugin; import net.sf.sveditor.core.db.ISVDBItemBase; import net.sf.sveditor.core.log.ILogHandle; import net.sf.sveditor.core.log.LogFactory; import net.sf.sveditor.core.log.LogHandle; import net.sf.sveditor.core.parser.ISVParser; import net.sf.sveditor.core.parser.SVLexer; import net.sf.sveditor.core.parser.SVParseException; import net.sf.sveditor.core.parser.SVParserConfig; import net.sf.sveditor.core.parser.SVParsers; import net.sf.sveditor.core.scanutils.StringTextScanner; public class SVExprUtilsParser implements ISVParser { private SVLexer fLexer; private SVParsers fParsers; private LogHandle fLog; public SVExprUtilsParser(SVExprContext context) { this(context, false); } public SVExprUtilsParser(SVExprContext context, boolean parse_full) { fLog = LogFactory.getLogHandle("SVExprUtilsParser", ILogHandle.LOG_CAT_PARSER); StringBuilder content = new StringBuilder(); if (context.fTrigger == null) { content.append(context.fLeaf); } else { content.append(context.fRoot); if (parse_full) { content.append(context.fTrigger); content.append(context.fLeaf); } } fLexer = new SVLexer(); fLexer.init(this, new StringTextScanner(content)); fParsers = new SVParsers(this); fParsers.init(this); } public SVExprUtilsParser(String content) { fLog = LogFactory.getLogHandle("SVExprUtilsParser", ILogHandle.LOG_CAT_PARSER); fLexer = new SVLexer(); fLexer.init(this, new StringTextScanner(content)); fParsers = new SVParsers(this); fParsers.init(this); } public SVLexer lexer() { return fLexer; } public ILogHandle getLogHandle() { return fLog; } public void disableErrors(boolean dis) { } public void error(String msg) throws SVParseException { // TODO Auto-generated method stub } public void error(SVParseException e) throws SVParseException { // TODO Auto-generated method stub } public void warning(String msg, int lineno) { // TODO Auto-generated method stub } public boolean error_limit_reached() { // TODO Auto-generated method stub return false; } public SVParsers parsers() { return fParsers; } public SVParserConfig getConfig() { return SVCorePlugin.getDefault().getParserConfig(); } public void debug(String msg, Exception e) { // TODO Auto-generated method stub } public String getFilename(long loc) { return "UNKNOWN: " + loc; } public void enter_type_scope(ISVDBItemBase item) { // TBD } public void leave_type_scope(ISVDBItemBase item) { // TBD } }
[ "matt.ballance@gmail.com" ]
matt.ballance@gmail.com
05c6bdb4e89399425b2de4d09a5cb3dd1b3a061e
43cfe6a70b464c19d0c492201f173e8f752353e4
/src/main/java/io/jboot/component/shiro/processer/ShiroRequiresGuestProcesser.java
15bb84e457ba557b585815fbee663bf0404de27e
[ "Apache-2.0" ]
permissive
fxdm41202425/jboot
4864205ec1495ef598a8fae803dcdf11a944543d
d15bc3321a002fbb85fd56f4b640e90105b6dca9
refs/heads/master
2021-08-17T10:06:06.026188
2017-11-21T02:59:10
2017-11-21T02:59:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,088
java
/** * Copyright (c) 2015-2017, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.gnu.org/licenses/lgpl-3.0.txt * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jboot.component.shiro.processer; import org.apache.shiro.SecurityUtils; public class ShiroRequiresGuestProcesser implements IShiroAuthorizeProcesser { @Override public AuthorizeResult authorize() { return SecurityUtils.getSubject().getPrincipal() != null ? AuthorizeResult.fail(AuthorizeResult.ERROR_CODE_UNAUTHENTICATED) : AuthorizeResult.ok(); } }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
5cad430f2064803fccdb6d5c7b8af00ca984b82b
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
/bin/platform/bootstrap/gensrc/de/hybris/platform/assistedservicestorefront/user/AutoSuggestionCustomerData.java
e4bf24930497f956968e0f4bb6c22886402fca3b
[]
no_license
sujanrimal/GiftCardProject
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
e0398eec9f4ec436d20764898a0255f32aac3d0c
refs/heads/master
2020-12-11T18:05:17.413472
2020-01-17T18:23:44
2020-01-17T18:23:44
233,911,127
0
0
null
2020-06-18T15:26:11
2020-01-14T18:44:18
null
UTF-8
Java
false
false
2,550
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! * --- Generated at Jan 17, 2020 11:49:29 AM * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("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 SAP. */ package de.hybris.platform.assistedservicestorefront.user; import java.io.Serializable; import java.util.List; public class AutoSuggestionCustomerData implements Serializable { /** Default serialVersionUID value. */ private static final long serialVersionUID = 1L; /** <i>Generated property</i> for <code>AutoSuggestionCustomerData.email</code> property defined at extension <code>assistedservicestorefront</code>. */ private String email; /** <i>Generated property</i> for <code>AutoSuggestionCustomerData.value</code> property defined at extension <code>assistedservicestorefront</code>. */ private String value; /** <i>Generated property</i> for <code>AutoSuggestionCustomerData.date</code> property defined at extension <code>assistedservicestorefront</code>. */ private String date; /** <i>Generated property</i> for <code>AutoSuggestionCustomerData.card</code> property defined at extension <code>assistedservicestorefront</code>. */ private String card; /** <i>Generated property</i> for <code>AutoSuggestionCustomerData.carts</code> property defined at extension <code>assistedservicestorefront</code>. */ private List<String> carts; public AutoSuggestionCustomerData() { // default constructor } public void setEmail(final String email) { this.email = email; } public String getEmail() { return email; } public void setValue(final String value) { this.value = value; } public String getValue() { return value; } public void setDate(final String date) { this.date = date; } public String getDate() { return date; } public void setCard(final String card) { this.card = card; } public String getCard() { return card; } public void setCarts(final List<String> carts) { this.carts = carts; } public List<String> getCarts() { return carts; } }
[ "travis.d.crawford@accenture.com" ]
travis.d.crawford@accenture.com
8a433585cd89a40369ff319c103a9aba080ef099
24bc32e0a59c1def4fe5c42110e48e23c39bd288
/LeetCode/src/Medium/no78/Solution.java
d0c31d04297ef02d163987d1afeb79039cf1de8a
[]
no_license
Sword-Is-Cat/LeetCode
01e47108153d816947cad48f4b073a1743dd46c8
73b08b0945810fb4b976a2a5d3bc46cefbd923b6
refs/heads/master
2023-08-30T21:45:58.136842
2023-08-29T00:22:35
2023-08-29T00:22:35
253,831,514
0
0
null
null
null
null
UTF-8
Java
false
false
639
java
package Medium.no78; import java.util.ArrayList; import java.util.List; class Solution { List<List<Integer>> list; boolean[] flags; public List<List<Integer>> subsets(int[] nums) { list = new ArrayList<>(); flags = new boolean[nums.length]; dfs(0, nums); return list; } void dfs(int index, int[] nums) { if (index == nums.length) { List<Integer> temp = new ArrayList<>(); for (int i = 0; i < nums.length; i++) if (flags[i]) temp.add(nums[i]); list.add(temp); } else { flags[index] = true; dfs(index + 1, nums); flags[index] = false; dfs(index + 1, nums); } } }
[ "jhbsp@naver.com" ]
jhbsp@naver.com
e13885b117b56d1599a593835bf7b5a55b1f8a3c
67350eb68faa9c0f80b9d72df4c780cb8ff25aa5
/src/main/java/org/wildfly/security/authz/AddPrefixRoleMapper.java
3fb230a1e23bb1ae35004bcb8c257a84e3b7556d
[ "Apache-2.0" ]
permissive
mposolda/wildfly-elytron
d3ab82006b48d4428aafa5bb6b1987fc4637f8e2
30bdccb787bd8a5deb0793b03f4cc46e65a01717
refs/heads/master
2020-12-30T17:45:04.570217
2016-02-23T10:42:07
2016-02-23T10:42:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,243
java
/* * JBoss, Home of Professional Open Source. * Copyright 2015 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.wildfly.security.authz; import java.util.AbstractSet; import java.util.Iterator; import java.util.Set; /** * A role mapper which adds a string prefix to the role name. * * @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a> */ public final class AddPrefixRoleMapper implements RoleMapper { private final String prefix; /** * Construct a new instance. * * @param prefix the prefix to add to role names */ public AddPrefixRoleMapper(final String prefix) { this.prefix = prefix; } public Set<String> mapRoles(final Set<String> rolesToMap) { return new AbstractSet<String>() { public Iterator<String> iterator() { final Iterator<String> iterator = rolesToMap.iterator(); return new Iterator<String>() { public boolean hasNext() { return iterator.hasNext(); } public String next() { return prefix + iterator.next(); } }; } public int size() { return rolesToMap.size(); } public boolean contains(final Object o) { return o instanceof String && contains((String) o); } public boolean contains(final String s) { return s != null && s.startsWith(prefix) && rolesToMap.contains(s.substring(prefix.length())); } }; } }
[ "david.lloyd@redhat.com" ]
david.lloyd@redhat.com
3e43f3641147a5c13efba2bbffb9d00156c81823
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_721b384212c96b274d7022578edd24b72a81430f/DaoTestCase/33_721b384212c96b274d7022578edd24b72a81430f_DaoTestCase_s.java
876755ee51b4020e645ad5b0a9ee2cc076d286ed
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,376
java
package edu.northwestern.bioinformatics.studycalendar.testing; import edu.nwu.bioinformatics.commons.StringUtils; import edu.nwu.bioinformatics.commons.DataAuditInfo; import edu.nwu.bioinformatics.commons.testing.DbTestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.jdbc.core.ColumnMapRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.request.WebRequest; import javax.sql.DataSource; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Arrays; import java.util.Collections; /** * @author Rhett Sutphin */ public abstract class DaoTestCase extends DbTestCase { protected final Log log = LogFactory.getLog(getClass()); protected MockHttpServletRequest request = new MockHttpServletRequest(); protected MockHttpServletResponse response = new MockHttpServletResponse(); protected WebRequest webRequest = new ServletWebRequest(request); private boolean shouldFlush = true; protected void setUp() throws Exception { super.setUp(); DataAuditInfo.setLocal(new DataAuditInfo("jo", "127.0.0.8")); beginSession(); } protected void tearDown() throws Exception { endSession(); DataAuditInfo.setLocal(null); super.tearDown(); } public void runBare() throws Throwable { setUp(); try { runTest(); } catch (Throwable throwable) { shouldFlush = false; throw throwable; } finally { tearDown(); } } private void beginSession() { log.info("-- beginning DaoTestCase interceptor session --"); for (OpenSessionInViewInterceptor interceptor : interceptors()) { interceptor.preHandle(webRequest); } } private void endSession() { log.info("-- ending DaoTestCase interceptor session --"); for (OpenSessionInViewInterceptor interceptor : reverseInterceptors()) { if (shouldFlush) { interceptor.postHandle(webRequest, null); } interceptor.afterCompletion(webRequest, null); } } protected void interruptSession() { endSession(); log.info("-- interrupted DaoTestCase session --"); beginSession(); } private List<OpenSessionInViewInterceptor> interceptors() { return Arrays.asList( (OpenSessionInViewInterceptor) getApplicationContext().getBean("auditOpenSessionInViewInterceptor"), (OpenSessionInViewInterceptor) getApplicationContext().getBean("openSessionInViewInterceptor") ); } private List<OpenSessionInViewInterceptor> reverseInterceptors() { List<OpenSessionInViewInterceptor> interceptors = interceptors(); Collections.reverse(interceptors); return interceptors; } protected DataSource getDataSource() { return (DataSource) getApplicationContext().getBean("dataSource"); } public static ApplicationContext getApplicationContext() { return StudyCalendarTestCase.getDeployedApplicationContext(); } protected final void dumpResults(String sql) { List<Map<String, String>> rows = new JdbcTemplate(getDataSource()).query( sql, new ColumnMapRowMapper() { protected Object getColumnValue(ResultSet rs, int index) throws SQLException { Object value = super.getColumnValue(rs, index); return value == null ? "null" : value.toString(); } } ); StringBuffer dump = new StringBuffer(sql).append('\n'); if (rows.size() > 0) { Map<String, Integer> colWidths = new HashMap<String, Integer>(); for (String colName : rows.get(0).keySet()) { colWidths.put(colName, colName.length()); for (Map<String, String> row : rows) { colWidths.put(colName, Math.max(colWidths.get(colName), row.get(colName).length())); } } for (String colName : rows.get(0).keySet()) { StringUtils.appendWithPadding(colName, colWidths.get(colName), false, dump); dump.append(" "); } dump.append('\n'); for (Map<String, String> row : rows) { for (String colName : row.keySet()) { StringUtils.appendWithPadding(row.get(colName), colWidths.get(colName), false, dump); dump.append(" | "); } dump.append('\n'); } } dump.append(" ").append(rows.size()).append(" row").append(rows.size() != 1 ? "s\n" : "\n"); System.out.print(dump); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e5e9744efaa4c357d9c82c89822ae87ae3f134fe
c1a0d2e3896ee507fe4aebc8b4b1798f0ccd3f33
/src/main/java/io/jboot/core/listener/JbootAppListener.java
fe3c4984fd4c0928924843b4a0d5edbe717663e0
[ "Apache-2.0" ]
permissive
zz412000428/jboot
033b8c4d301ea22f7a0e5f31339407291a3c7bb3
a8979aefea823b93dcb002f21f43899d5dcd75a5
refs/heads/master
2021-04-16T09:07:44.623152
2020-03-23T02:59:27
2020-03-23T02:59:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
/** * Copyright (c) 2015-2020, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jboot.core.listener; import com.jfinal.config.Constants; import com.jfinal.config.Interceptors; import com.jfinal.config.Routes; import com.jfinal.template.Engine; import io.jboot.aop.jfinal.JfinalHandlers; import io.jboot.aop.jfinal.JfinalPlugins; import io.jboot.web.fixedinterceptor.FixedInterceptors; public interface JbootAppListener { public void onInit(); public void onConstantConfig(Constants constants); public void onRouteConfig(Routes routes); public void onEngineConfig(Engine engine); public void onPluginConfig(JfinalPlugins plugins); public void onInterceptorConfig(Interceptors interceptors); public void onFixedInterceptorConfig(FixedInterceptors fixedInterceptors); public void onHandlerConfig(JfinalHandlers handlers); public void onStartBefore(); public void onStart(); public void onStop(); }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
1a745826a6ea4f70da01558ebe271761c1bd8aba
274a3f814e12712ad56d463b31e18fcf9d7a6955
/src/main/de/hsmainz/cs/semgis/arqextension/unit/USFootToMeter.java
4ca057ee2c75bed8ae4797c0459a8dfe4b206a2c
[]
no_license
lisha992610/my_jena_geo
a5c80c8345ef7a32dd487ca57400b7947d80d336
fff8e26992a02b5a1c1de731b2e6f9ab09249776
refs/heads/master
2023-04-23T03:11:39.128121
2021-05-12T05:05:29
2021-05-12T05:05:29
366,588,259
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package de.hsmainz.cs.semgis.arqextension.unit; import org.apache.jena.sparql.expr.NodeValue; import org.apache.jena.sparql.function.FunctionBase1; public class USFootToMeter extends FunctionBase1 { @Override public NodeValue exec(NodeValue v) { Double value=Double.valueOf(v.getDouble()); return NodeValue.makeDouble(value/3.28083333); } }
[ "shiying.li@sec.ethz.ch" ]
shiying.li@sec.ethz.ch
ec50900e83cee670dbd06c1aae36f0e2fe6d88f3
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/kr/co/popone/fitts/feature/post/detail/ReportPostActivity$onCreate$2.java
b8905c00e5c129bc9a7a3b50bcb9d2ee45856adc
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
875
java
package kr.co.popone.fitts.feature.post.detail; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import androidx.core.content.ContextCompat; import kr.co.popone.fitts.C0006R$color; import kr.co.popone.fitts.C0010R$id; final class ReportPostActivity$onCreate$2 implements OnClickListener { final /* synthetic */ ReportPostActivity this$0; ReportPostActivity$onCreate$2(ReportPostActivity reportPostActivity) { this.this$0 = reportPostActivity; } public final void onClick(View view) { this.this$0.reportReason = "appropriate"; Button button = (Button) this.this$0._$_findCachedViewById(C0010R$id.report_done_button); button.setClickable(true); button.setBackgroundColor(ContextCompat.getColor(button.getContext(), C0006R$color.point)); } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
67e3346cf2c34ccf0235291630bc3f8b0c245d07
f5e8be3755fb33ee6e548357bc8623eb11bcec74
/src/jp/ats/sheepdog/dataobjects/t_member_orderDTO.java
5d6f738e3e043af4f4e08e27f2b672d539ca3597
[]
no_license
ats-jp/sheepdog
e26bc4db284555c68ec5f8de582d9fc4d4367d31
eec2d929e6466a51d426101e80508f71ae89eccb
refs/heads/master
2021-08-31T16:59:04.711367
2017-12-22T04:44:59
2017-12-22T04:44:59
115,077,005
0
0
null
null
null
null
SHIFT_JIS
Java
false
false
5,959
java
package jp.ats.sheepdog.dataobjects; import jp.ats.liverwort.extension.DTO; import jp.ats.liverwort.jdbc.BatchStatement; import jp.ats.liverwort.ormapping.PrimaryKey; import jp.ats.liverwort.ormapping.UpdatableDataObject; import jp.ats.liverwort.selector.Selector; import jp.ats.liverwort.selector.ValueExtractor; import jp.ats.liverwort.sql.Binder; import jp.ats.liverwort.sql.Relationship; import jp.ats.liverwort.sql.Updater; /** * 自動生成された DTO クラスです。 * * パッケージ名 jp.ats.sheepdog.dataobjects * テーブル名 t_member_order * 親クラス名 java.lang.Object */ public class t_member_orderDTO extends java.lang.Object implements DTO { /** * 内部で使用する {@link UpdatableDataObject} */ private final UpdatableDataObject data; private final Relationship relationship; /** * 登録用コンストラクタです。 */ public t_member_orderDTO() { relationship = Relationship.getInstance(t_member_order.RESOURCE_LOCATOR); data = new UpdatableDataObject(relationship); } /** * 参照、更新用コンストラクタです。 * * @param data 値を持つ {@link UpdatableDataObject} */ public t_member_orderDTO(UpdatableDataObject data) { relationship = Relationship.getInstance(t_member_order.RESOURCE_LOCATOR); this.data = data; } @Override public boolean update() { return data.update(); } @Override public void update(BatchStatement statement) { data.update(statement); } @Override public UpdatableDataObject getDataObject() { return data; } @Override public PrimaryKey getPrimaryKey() { return data.getPrimaryKey(); } @Override public void setValuesTo(Updater updater) { data.setValuesTo(updater); } @Override public void commit() { data.commit(); } @Override public void rollback() { data.rollback(); } /** * setter * * 項目名 owner * 型 java.lang.Integer * * @param value 更新値 */ public void setowner(java.lang.Integer value) { ValueExtractor valueExtractor = Selector.getValueExtractors() .selectValueExtractor(relationship.getColumn("owner").getType()); data.setValue("owner", valueExtractor.extractAsBinder(value)); } /** * getter * * 項目名 owner * 型 java.lang.Integer * * @return 返却値 */ public java.lang.Integer getowner() { Binder binder = data.getBinder("owner"); if (binder == null) return null; return (java.lang.Integer) binder.getValue(); } /** * setter * * 項目名 group_id * 型 java.lang.Integer * * @param value 更新値 */ public void setgroup_id(java.lang.Integer value) { ValueExtractor valueExtractor = Selector.getValueExtractors() .selectValueExtractor(relationship.getColumn("group_id").getType()); data.setValue("group_id", valueExtractor.extractAsBinder(value)); } /** * getter * * 項目名 group_id * 型 java.lang.Integer * * @return 返却値 */ public java.lang.Integer getgroup_id() { Binder binder = data.getBinder("group_id"); if (binder == null) return null; return (java.lang.Integer) binder.getValue(); } /** * setter * * 項目名 member_order * 型 java.lang.String * * @param value 更新値 */ public void setmember_order(java.lang.String value) { ValueExtractor valueExtractor = Selector.getValueExtractors() .selectValueExtractor( relationship.getColumn("member_order").getType()); data.setValue("member_order", valueExtractor.extractAsBinder(value)); } /** * getter * * 項目名 member_order * 型 java.lang.String * * @return 返却値 */ public java.lang.String getmember_order() { Binder binder = data.getBinder("member_order"); if (binder == null) return null; return (java.lang.String) binder.getValue(); } /** * setter * * 項目名 create_time * 型 java.sql.Timestamp * * @param value 更新値 */ public void setcreate_time(java.sql.Timestamp value) { ValueExtractor valueExtractor = Selector.getValueExtractors() .selectValueExtractor( relationship.getColumn("create_time").getType()); data.setValue("create_time", valueExtractor.extractAsBinder(value)); } /** * getter * * 項目名 create_time * 型 java.sql.Timestamp * * @return 返却値 */ public java.sql.Timestamp getcreate_time() { Binder binder = data.getBinder("create_time"); if (binder == null) return null; return (java.sql.Timestamp) binder.getValue(); } /** * setter * * 項目名 update_time * 型 java.sql.Timestamp * * @param value 更新値 */ public void setupdate_time(java.sql.Timestamp value) { ValueExtractor valueExtractor = Selector.getValueExtractors() .selectValueExtractor( relationship.getColumn("update_time").getType()); data.setValue("update_time", valueExtractor.extractAsBinder(value)); } /** * getter * * 項目名 update_time * 型 java.sql.Timestamp * * @return 返却値 */ public java.sql.Timestamp getupdate_time() { Binder binder = data.getBinder("update_time"); if (binder == null) return null; return (java.sql.Timestamp) binder.getValue(); } /** * このレコードが参照しているレコードの DTO を返します。 * * 参照先テーブル名 t_group * 外部キー名 t_member_order_group_id_fkey * 項目名 group_id * * @return 参照しているレコードの DTO */ public t_groupDTO gett_groupByt_member_order_group_id_fkey() { return new t_groupDTO( data.getDataObject(t_member_order.t_group_BY_t_member_order_group_id_fkey)); } /** * このレコードが参照しているレコードの DTO を返します。 * * 参照先テーブル名 t_user * 外部キー名 t_member_order_owner_fkey * 項目名 owner * * @return 参照しているレコードの DTO */ public t_userDTO gett_userByt_member_order_owner_fkey() { return new t_userDTO( data.getDataObject(t_member_order.t_user_BY_t_member_order_owner_fkey)); } }
[ "ats.t.chiba@gmail.com" ]
ats.t.chiba@gmail.com
23f50c465fa71f6bcb28e0cdbdcd83237506c4af
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a151/A151248.java
f145996696a57b4c4dc51723a2e68d87ede593f4
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
585
java
package irvine.oeis.a151; // Generated by gen_seq4.pl walk23 3 5 1 222001010101111 at 2019-07-08 22:06 // DO NOT EDIT here! import irvine.oeis.WalkCubeSequence; /** * A151248 Number of walks within <code>N^3</code> (the first octant of <code>Z^3)</code> starting at <code>(0,0,0)</code> and consisting of n steps taken from <code>{(-1, -1, -1), (0, 0, 1), (0, 1, 0), (1, 0, 1), (1, 1, 1)}</code>. * @author Georg Fischer */ public class A151248 extends WalkCubeSequence { /** Construct the sequence. */ public A151248() { super(0, 3, 5, "", 1, "222001010101111"); } }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
7ed1385d55e971727fc1aaa803dfd13d852d6cd6
45f6140f0b983d681bd36fb489413a6d525ee0f0
/ontrack-extension/ontrack-extension-svnexplorer/src/main/java/net/ontrack/extension/svnexplorer/model/IssueInfo.java
642a87bc69cf7299cdc47541b384927571967df6
[]
no_license
Corab500/ontrack
d6896f1a6ac8858496aacff87a484421be753249
de13e7ba51f79273436c0943e8c72f8e5b109b2f
refs/heads/master
2021-01-18T05:39:04.604144
2013-07-18T09:59:12
2013-07-18T09:59:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package net.ontrack.extension.svnexplorer.model; import lombok.Data; import net.ontrack.extension.jira.service.model.JIRAIssue; import java.util.List; @Data public class IssueInfo { private final JIRAIssue issue; private final String formattedUpdateTime; private final RevisionInfo revisionInfo; private final List<ChangeLogRevision> revisions; }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
d81659720f8153d9f94accbd95b34b61ae6dade8
68f33dfb3b6d50e0c86f2dc204d77ddf1792761c
/src/main/java/lesson03/jmm/statix/StaticApp.java
7fdb2b6a3cb64bca557e2efbae6301e2ed25559d
[]
no_license
Niyaz-H/Java-IBA-Tech
9d2fc54ef2930263e7ef2b0c2200b6354079b950
11122acbaf3b5051c1b87e2b00a1a6384b6cc521
refs/heads/master
2022-11-21T04:51:53.182484
2019-12-28T13:13:35
2019-12-28T13:13:35
215,538,497
0
0
null
2022-11-15T23:53:36
2019-10-16T12:06:10
Java
UTF-8
Java
false
false
508
java
package lesson03.jmm.statix; import lesson03.SmartPerson; public class StaticApp { public static void main(String[] args) { StaticX.smth = 111; StaticX st1 = new StaticX(); StaticX st2 = new StaticX(); st1.age = 33; st2.age = 44; // StaticX.age = 22; st1.smth = 66; st2.smth = 77; StaticX.smth = 88; System.out.println(st1.smth); System.out.println(st2.smth); System.out.println(StaticX.smth); SmartPerson smartPerson = new SmartPerson(); } }
[ "alexey.rykhalskiy@gmail.com" ]
alexey.rykhalskiy@gmail.com
91b0a16290f852a9e9eb113035b44c1ac049ea5f
099a47105cbcc9b4206c6efec223a0cf9cf251a1
/myapplication/src/main/java/com/example/myapplication/view/adapterHotel.java
de4b57d791465074a0d50d77b994063bc17b87d9
[]
no_license
toan882911/DuLichTN
7f41cd30b6fcb8ab160a09f02182024ba55ea6b2
696d4a84668f30c809279df4b3bc785ef748f2c5
refs/heads/master
2020-07-07T00:37:47.779870
2019-08-20T04:39:20
2019-08-20T04:39:20
203,187,552
1
0
null
null
null
null
UTF-8
Java
false
false
2,497
java
package com.example.myapplication.view; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.bumptech.glide.Glide; import com.example.myapplication.R; import com.example.myapplication.model.dataHotel; import com.example.myapplication.model.data_map; import com.example.myapplication.util.SquareImageView; import java.util.Collections; import java.util.List; public class adapterHotel extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private Context context; private LayoutInflater inflater; List<dataHotel> data = Collections.emptyList(); // create constructor to innitilize context and data sent from Home public adapterHotel(Context context, List<dataHotel> data) { this.context = context; inflater = LayoutInflater.from(context); this.data = data; } // Inflate the layout when viewholder created @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = inflater.inflate(R.layout.custom_hotel, parent, false); MyHolder holder = new MyHolder(view); return holder; } // Bind data @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) { // Get current position of item in recyclerview to bind data and assign values from list final MyHolder myHolder = (MyHolder) holder; final dataHotel current = data.get(position); myHolder.ad.setText(current.getAddress()); myHolder.name.setText(current.getName()); int resId = context.getResources().getIdentifier(current.getImg(), "drawable", context.getPackageName()); myHolder.icon.setImageResource(resId); } // return total item from List @Override public int getItemCount() { return data.size(); } class MyHolder extends RecyclerView.ViewHolder { TextView name; TextView ad; SquareImageView icon; // create constructor to get widget reference public MyHolder(View itemView) { super(itemView); name = (TextView) itemView.findViewById(R.id.name); ad = (TextView) itemView.findViewById(R.id.ad); icon = (SquareImageView) itemView.findViewById(R.id.img); } } }
[ "=" ]
=
d52b8e69e67a113a030e030762f17616b8187aa6
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/19/org/jfree/chart/plot/CategoryPlot_setAnchorValue_3540.java
49d8e95719d919db8a604a6f0a22f6b8dc0f4474
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
4,227
java
org jfree chart plot gener plot data link categori dataset categorydataset render data item link categori item render categoryitemrender categori plot categoryplot plot axi plot valueaxisplot set anchor request send link plot chang event plotchangeev regist listen param param notifi notifi listen anchor getanchorvalu set anchor setanchorvalu notifi anchor anchorvalu notifi notifi listen notifylisten plot chang event plotchangeev
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
cee5afee2858addcbf56d1baba17f60f72c713a6
34738ca04ff7d537c2d3460bc96645c8e3805240
/app/src/main/java/me/zhanghai/android/douya/ui/MaxDimensionHelper.java
dfed5be57c723c02b2185478115c50f6337644e9
[]
no_license
king1033/Douya
95089220b15fc5a5c5e61a78b36a618ab539e0e1
648ca74959567fdd7a84f8827eca759bccd38db5
refs/heads/master
2021-01-12T16:52:26.720211
2017-07-03T02:02:14
2017-07-03T02:02:14
71,457,784
2
0
null
2017-07-03T02:02:14
2016-10-20T11:48:42
Java
UTF-8
Java
false
false
1,896
java
/* * Copyright (c) 2015 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> * All Rights Reserved. */ package me.zhanghai.android.douya.ui; import android.content.Context; import android.support.v7.widget.TintTypedArray; import android.util.AttributeSet; import android.view.View; public class MaxDimensionHelper { private static final int[] STYLEABLE = { android.R.attr.maxWidth, android.R.attr.maxHeight }; private static final int STYLEABLE_ANDROID_MAX_WIDTH = 0; private static final int STYLEABLE_ANDROID_MAX_HEIGHT = 1; private Delegate mDelegate; private int mMaxWidth; private int mMaxHeight; public MaxDimensionHelper(Delegate delegate) { mDelegate = delegate; } @SuppressWarnings("RestrictedApi") public void init(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs, STYLEABLE, defStyleAttr, defStyleRes); mMaxWidth = a.getDimensionPixelSize(STYLEABLE_ANDROID_MAX_WIDTH, -1); mMaxHeight = a.getDimensionPixelSize(STYLEABLE_ANDROID_MAX_HEIGHT, -1); a.recycle(); } public void onMeasure(int widthSpec, int heightSpec) { if (mMaxWidth >= 0) { widthSpec = View.MeasureSpec.makeMeasureSpec( Math.min(View.MeasureSpec.getSize(widthSpec), mMaxWidth), View.MeasureSpec.getMode(widthSpec)); } if (mMaxHeight >= 0) { heightSpec = View.MeasureSpec.makeMeasureSpec( Math.min(View.MeasureSpec.getSize(heightSpec), mMaxHeight), View.MeasureSpec.getMode(heightSpec)); } mDelegate.superOnMeasure(widthSpec, heightSpec); } public interface Delegate { void superOnMeasure(int widthSpec, int heightSpec); } }
[ "dreaming.in.code.zh@gmail.com" ]
dreaming.in.code.zh@gmail.com
711da69cb15c220bc13c1e3b5f6414f556a7876f
6e85b4cade8d08ce50ef68c2bb6e57ca2b80dcca
/src/com/moveit/client/model/GoogleMapService.java
fee7887e6442934ff8db3d0f8b841511b2efad60
[]
no_license
jonasgreen/24moveit
fc40cbfa8362ea0039ea91d2e67de9b235cf8d0c
fafc8f58899ee1ed204ca5cac8ed9be0a419dee9
refs/heads/master
2021-01-23T02:41:19.195993
2012-08-16T15:49:17
2012-08-16T15:49:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,620
java
package com.moveit.client.model; import com.google.gwt.maps.client.geocode.Geocoder; import com.google.gwt.maps.client.geocode.LocationCallback; import com.moveit.client.gui.ApplicationController; /** * */ public class GoogleMapService { private static Geocoder geocoder = new Geocoder(); private static ApplicationController appCcontroller = ApplicationController.getInstance(); //--------- this is factory methods with callback functionality ---- public static void newInstance(Address addr, boolean withCity, LocationCallback lcb) { ApplicationController.getInstance().debug("GOOGLE ADRESSE:" + addr); geocoder.setBaseCountryCode(addr.getNationalCode().toLowerCase()); geocoder.getLocations(getGoogleMapAdress(addr, withCity), lcb); } public static void newInstance(String addr, final LocationCallback lcb) { geocoder.getLocations(addr, lcb); } private static String getGoogleMapAdress(Address adr, boolean withCity) { StringBuffer sb = new StringBuffer(); addToGoogleMapAddress(sb, adr.getStreet()); if (withCity) { addToGoogleMapAddress(sb, adr.getCity()); } addToGoogleMapAddress(sb, adr.getCityCode()); addToGoogleMapAddress(sb, adr.getNationalCode()); return sb.toString(); } private static void addToGoogleMapAddress(StringBuffer sb, String s) { if (s == null || s.equals("")) { return; } if (sb.length() != 0) { sb.append(", ").append(s); } else { sb.append(s); } } }
[ "jonasgreen12345@gmail.com" ]
jonasgreen12345@gmail.com
6f5fd098db17abfd565dfa032560b1245c002d6c
492be920fc7178d742199b5aeda54189d9084a4a
/hzero-starter-websocket/src/main/java/org/hzero/websocket/vo/ClientVO.java
46b9c8fe80ce0a2f71ef1af98b359938b3046882
[ "Apache-2.0" ]
permissive
JodenHe/hzero-starter-parent
2a96c787fe05d6f1aeff8a139c3d199058ea635f
c1f642f18e7a0001bc16d1d12eff30d9c6f39fe4
refs/heads/main
2023-06-20T18:47:20.504083
2021-07-25T08:51:39
2021-07-25T08:51:39
308,355,906
0
0
Apache-2.0
2020-10-29T14:37:07
2020-10-29T14:37:06
null
UTF-8
Java
false
false
1,313
java
package org.hzero.websocket.vo; /** * description * * @author shuangfei.zhu@hand-china.com 2020/04/22 15:24 */ public class ClientVO { public ClientVO() { } public ClientVO(String sessionId, String group, String brokerId) { this.sessionId = sessionId; this.group = group; this.brokerId = brokerId; } /** * websocketSession id */ private String sessionId; /** * group */ private String group; /** * brokerId */ private String brokerId; public String getSessionId() { return sessionId; } public ClientVO setSessionId(String sessionId) { this.sessionId = sessionId; return this; } public String getGroup() { return group; } public ClientVO setGroup(String group) { this.group = group; return this; } public String getBrokerId() { return brokerId; } public ClientVO setBrokerId(String brokerId) { this.brokerId = brokerId; return this; } @Override public String toString() { return "ServerVO{" + "sessionId='" + sessionId + '\'' + ", group='" + group + '\'' + ", brokerId='" + brokerId + '\'' + '}'; } }
[ "xiaoyu.zhao@hand-china.com" ]
xiaoyu.zhao@hand-china.com
416b92ee517375b5882ee6d640dbae43d22fedb4
bf4d71dc1ceb45d05cc89a0c4fabbefc6a4d7917
/alogic-rpc/src/main/java/com/alogic/rpc/serializer/gson/GsonSerializer.java
acd56809c5f39deb47284d6b2b99956d653665d0
[]
no_license
yanzhy1001/alogic
feae0e76a92cd66c8bce378c6f5fbe73a611bee6
0d89050bd6f17ce8f68b6999f1f85c772da8af91
refs/heads/master
2021-08-31T18:14:28.723481
2017-12-22T09:52:20
2017-12-22T09:52:20
115,503,417
1
0
null
2017-12-27T09:13:14
2017-12-27T09:13:13
null
UTF-8
Java
false
false
2,052
java
package com.alogic.rpc.serializer.gson; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import com.alogic.rpc.Parameters; import com.alogic.rpc.Result; import com.alogic.rpc.serializer.Serializer; import com.alogic.rpc.serializer.gson.util.ParametersSerializer; import com.alogic.rpc.serializer.gson.util.ResultSerializer; import com.anysoft.util.IOTools; import com.anysoft.util.Properties; import com.esotericsoftware.minlog.Log; import com.google.gson.Gson; import com.google.gson.GsonBuilder; /** * 基于google gson的序列化器 * * @author yyduan * @since 1.6.8.7 * */ public class GsonSerializer extends Serializer.Abstract { protected Gson gson = null; protected String encoding = "utf-8"; @Override public <D> D readObject(InputStream in, Class<D> clazz,Properties ctx) { InputStreamReader reader = null; try { reader = new InputStreamReader(in,encoding); return gson.fromJson(reader, clazz); } catch (UnsupportedEncodingException e) { Log.error(String.format("Encoding %s is not supported.",encoding)); return null; } finally { IOTools.close(reader); } } @Override public void writeObject(OutputStream out, Object object,Properties ctx) { OutputStreamWriter writer = null; try { writer = new OutputStreamWriter(out,encoding); gson.toJson(object, writer); } catch (UnsupportedEncodingException e) { Log.error(String.format("Encoding %s is not supported.",encoding)); }finally { IOTools.close(writer); } } @Override public void configure(Properties p) { ResultSerializer resultSerializer = new ResultSerializer(); resultSerializer.configure(p); ParametersSerializer parametersSerializer = new ParametersSerializer(); parametersSerializer.configure(p); gson = (new GsonBuilder()) .registerTypeAdapter(Result.Default.class, resultSerializer) .registerTypeAdapter(Parameters.Default.class, parametersSerializer).create(); } }
[ "szduanyy@189.cn" ]
szduanyy@189.cn
82f9fc6d7974251dbf61faa2d62078a0ec936ef0
50d4b171133e55d216d7cd45b204958a560cf0a7
/ticket/src/com/interface21/ejb/access/AbstractStatelessSessionBeanDefinition.java
238f8c589567d51c12205ce7ee5905d2b0bcc231
[]
no_license
phlizik/MyStudy
52024c8f0ec4a77a2ecf237b3a6cd3ac716d590a
638309208e15ca3aae9925868c4842283937d78a
refs/heads/master
2020-06-17T15:16:02.966598
2018-04-20T11:17:28
2018-04-20T11:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,891
java
package com.interface21.ejb.access; import java14.java.util.logging.Logger; import javax.ejb.EJBLocalHome; import javax.ejb.EJBLocalObject; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import com.interface21.beans.BeanWrapper; import com.interface21.beans.BeanWrapperImpl; import com.interface21.beans.FatalBeanException; import com.interface21.beans.DynamicProxy; import com.interface21.beans.factory.support.DefaultRootBeanDefinition; /** * Root bean definitions have a class and properties. * ISN:T IT A PROBLEM THAT WE CACHE EJB OBJECT, NOT HOME? * DIRECTLY MAKES BEAn available */ public abstract class AbstractStatelessSessionBeanDefinition extends DefaultRootBeanDefinition { private static String PREFIX = "java:comp/env/"; private String jndiName; /* * public void setProxyInterface(String intfName) throws Exception { setBeanClassName(intfName); // Check it's an interface if (!getBeanClass().isInterface()) throw new Exception("Can proxy only interfaces: " + getBeanClass() + " is a class"); } */ public void setJndiName(String jndiName) throws Exception { if (!jndiName.startsWith(PREFIX)) jndiName = PREFIX + jndiName; this.jndiName = jndiName; } public String getJndiName() { return this.jndiName; } /** * This will be the business methods interface */ public void setBusinessInterface(String intfName) throws Exception { setBeanClassName(intfName); // Check it's an interface if (!getBeanClass().isInterface()) throw new Exception("Must be an interface: " + getBeanClass() + " is a class"); } protected abstract BeanWrapper newBeanWrapper(); //public String toString() { // return "TestRootBeanDefinition: classname is " + getBeanClass().getName(); //} } // class RootBeanDefinition
[ "zhaojian770627@163.com" ]
zhaojian770627@163.com
b4b809084c6196020e253b428a4c476a9fa1fe78
0c1360942d84fc95ef35b4a4094344b75a6d5d83
/StormHookSample/app/src/main/jni/dalvik/tests/068-classloader/src-ex/Inaccessible2.java
85968a77b0f6860303c4ab50bda9eb5a099aebc0
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
shuixi2013/YAHFA-StormHook
c33cb209ebea80b60f2435ad28f387c9514e653a
c1ea36924093c46ad4f38755d8c63dbc9ea5aaf2
refs/heads/master
2020-04-25T07:41:44.568870
2017-11-12T15:12:06
2017-11-12T15:12:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
253
java
// Copyright 2008 The Android Open Source Project /** * Public class that can't access its base. */ public class Inaccessible2 extends InaccessibleBase { public Inaccessible2() { System.out.println("--- inaccessible2"); } }
[ "1093362865@qq.com" ]
1093362865@qq.com
20d0ece1566ce88c208f4c8f5ad6d70de2df96a5
56ba6b4df181285a58fc05d585ca68455750d0ec
/cards/src/main/java/org/rnd/jmagic/cards/FiremaneAngel.java
d2e3735380087eac0fb0d0227e43084248e6d482
[]
no_license
ranjan-rk/jmagic
a5454f92afba9c24b494231915ce750734564239
4c1f6f93081de64cba7db7bd87f843fa8914a2a0
refs/heads/master
2021-01-18T06:30:38.871143
2013-07-22T19:50:51
2013-07-22T19:50:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,577
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Firemane Angel") @Types({Type.CREATURE}) @SubTypes({SubType.ANGEL}) @ManaCost("3RWW") @Printings({@Printings.Printed(ex = Expansion.RAVNICA, r = Rarity.RARE)}) @ColorIdentity({Color.WHITE, Color.RED}) public final class FiremaneAngel extends Card { public static final class FiremaneAngelAbility1 extends EventTriggeredAbility { public FiremaneAngelAbility1(GameState state) { super(state, "At the beginning of your upkeep, if Firemane Angel is in your graveyard or on the battlefield, you may gain 1 life."); this.addPattern(atTheBeginningOfYourUpkeep()); SetGenerator inYourGraveyard = Intersect.instance(ABILITY_SOURCE_OF_THIS, InZone.instance(GraveyardOf.instance(You.instance()))); this.canTrigger = Union.instance(inYourGraveyard, this.canTrigger); this.interveningIf = this.canTrigger; this.addEffect(youMay(gainLife(You.instance(), 1, "Gain 1 life"), "You may gain 1 life")); } } public static final class FiremaneAngelAbility2 extends ActivatedAbility { public FiremaneAngelAbility2(GameState state) { super(state, "(6)(R)(R)(W)(W): Return Firemane Angel from your graveyard to the battlefield. Activate this ability only during your upkeep."); this.setManaCost(new ManaPool("(6)(R)(R)(W)(W)")); EventFactory returnFiremane = new EventFactory(EventType.PUT_ONTO_BATTLEFIELD, "Return Firemane Angel from your graveyard to the battlefield."); returnFiremane.parameters.put(EventType.Parameter.CAUSE, This.instance()); returnFiremane.parameters.put(EventType.Parameter.CONTROLLER, You.instance()); returnFiremane.parameters.put(EventType.Parameter.OBJECT, ABILITY_SOURCE_OF_THIS); this.addEffect(returnFiremane); this.activateOnlyFromGraveyard(); this.activateOnlyDuringYourUpkeep(); } } public FiremaneAngel(GameState state) { super(state); this.setPower(4); this.setToughness(3); // Flying, first strike this.addAbility(new org.rnd.jmagic.abilities.keywords.Flying(state)); this.addAbility(new org.rnd.jmagic.abilities.keywords.FirstStrike(state)); // At the beginning of your upkeep, if Firemane Angel is in your // graveyard or on the battlefield, you may gain 1 life. this.addAbility(new FiremaneAngelAbility1(state)); // (6)(R)(R)(W)(W): Return Firemane Angel from your graveyard to the // battlefield. Activate this ability only during your upkeep. this.addAbility(new FiremaneAngelAbility2(state)); } }
[ "robyter@gmail" ]
robyter@gmail
b8c8f9876389fbc0fb24c265ce8de2953bf4929a
88cfbdc25670de1fba59c029d96acb3abf9900e6
/JavaLectures/src/Week9_Dad/Kid.java
b6cc32d49edc832a5094f880e1e3d75e128ad1a8
[]
no_license
hakankocaknyc/JavaLectures
e6c6754280ed6d4e1a4294df798db95e51369085
940b5c9a1ea45d47bd9b6a157549d1a57c1e9571
refs/heads/master
2022-12-05T05:10:13.468985
2020-08-22T17:36:43
2020-08-22T17:36:43
286,625,020
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package Week9_Dad; public class Kid implements Mam,Dad{ String name = "Ahmet"; public String mom(){ return "Mommy loves you"; } @Override public String dad() { return "Dad loves you"; } }
[ "you@example.com" ]
you@example.com
8e205dcd08b29e2f9565f0e7a670902df906f93f
f77d04f1e0f64a6a5e720ce24b65b1ccb3c546d2
/zyj-hec-master/zyj-hec/src/main/java/com/hand/hec/vat/controllers/VatInvoiceCategoryController.java
4d643e5280c4781d30a709a64063a843201e76fc
[]
no_license
floodboad/zyj-hssp
3139a4e73ec599730a67360cd04aa34bc9eaf611
dc0ef445935fa48b7a6e86522ec64da0042dc0f3
refs/heads/master
2023-05-27T21:28:01.290266
2020-01-03T06:21:59
2020-01-03T06:29:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,422
java
package com.hand.hec.vat.controllers; import com.hand.hap.core.IRequest; import com.hand.hap.fnd.dto.FndManagingOrganization; import com.hand.hap.fnd.service.IFndManagingOrganizationService; import com.hand.hap.mybatis.common.Criteria; import com.hand.hap.mybatis.common.query.Comparison; import com.hand.hap.mybatis.common.query.WhereField; import com.hand.hap.system.controllers.BaseController; import com.hand.hap.system.dto.ResponseData; import com.hand.hec.vat.dto.VatInvoiceCategory; import com.hand.hec.vat.service.IVatInvoiceCategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import java.util.List; /** * * xx控制器 * * @author xxx YYYY-mm-dd */ @Controller public class VatInvoiceCategoryController extends BaseController{ @Autowired private IVatInvoiceCategoryService service; @Autowired private IFndManagingOrganizationService fndManagingOrganizationService; @RequestMapping(value = "vat/VAT1020/vat_invoice_category.screen") public ModelAndView vatInvoiceCategoryView(HttpServletRequest request){ IRequest iRequest = createRequestContext(request); ModelAndView modelAndView = new ModelAndView("vat/VAT1020/vat_invoice_category"); FndManagingOrganization fndManagingOrganization = new FndManagingOrganization(); fndManagingOrganization = fndManagingOrganizationService.defaultManageOrganizationQuery(iRequest,iRequest.getCompanyId()); modelAndView.addObject("VAT1020_defaultMagList",fndManagingOrganization); return modelAndView; } @RequestMapping(value = "/vat/invoice-category/query",method = {RequestMethod.GET,RequestMethod.POST}) @ResponseBody public ResponseData query(VatInvoiceCategory dto, @RequestParam(defaultValue = DEFAULT_PAGE) int page, @RequestParam(defaultValue = DEFAULT_PAGE_SIZE) int pageSize, HttpServletRequest request) { IRequest requestContext = createRequestContext(request); Criteria criteria = new Criteria(dto); criteria.where(VatInvoiceCategory.FIELD_MAG_ORG_ID,new WhereField(VatInvoiceCategory.FIELD_DESCRIPTION, Comparison.LIKE),new WhereField(VatInvoiceCategory.FIELD_INVOICE_CATEGORY_CODE, Comparison.LIKE)); return new ResponseData(service.selectOptions(requestContext,dto,criteria,page,pageSize)); } @RequestMapping(value = "/vat/invoice-category/submit") @ResponseBody public ResponseData update(@RequestBody List<VatInvoiceCategory> dto, BindingResult result, HttpServletRequest request){ getValidator().validate(dto, result); if (result.hasErrors()) { ResponseData responseData = new ResponseData(false); responseData.setMessage(getErrorMessage(result, request)); return responseData; } IRequest requestCtx = createRequestContext(request); return new ResponseData(service.batchUpdate(requestCtx, dto)); } @RequestMapping(value = "/vat/invoice-category/remove") @ResponseBody public ResponseData delete(HttpServletRequest request,@RequestBody List<VatInvoiceCategory> dto){ service.batchDelete(dto); return new ResponseData(); } }
[ "1961187382@qq.com" ]
1961187382@qq.com
c8b21189962da4f812483a1c2898f4b8bde166e6
2e5e62e9a8ab35fee33cf8f22a57f06a617170a9
/src/main/java/com/parking/core/repositories/jpa/JpaParkingRepo.java
351bfaa1daa7765e1b593842727a11d7519c7515
[]
no_license
antoniosignore/parking
820340fb447631877120b85e066131b1cd958fda
17a186d200033613c0b7c1d6f58340181e99d472
refs/heads/master
2021-01-23T07:03:10.755403
2015-01-22T22:48:09
2015-01-22T22:48:09
28,908,480
0
0
null
null
null
null
UTF-8
Java
false
false
1,411
java
package com.parking.core.repositories.jpa; import com.parking.core.models.entities.Connection; import com.parking.core.models.entities.Parking; import com.parking.core.repositories.ParkingRepo; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import java.util.List; @Repository public class JpaParkingRepo implements ParkingRepo { @PersistenceContext private EntityManager em; @Override public List<Parking> findAllParkings() { Query query = em.createQuery("SELECT a FROM Parking a"); return query.getResultList(); } @Override public Parking findParking(Long id) { return em.find(Parking.class, id); } @Override public List<Parking> findParkingsByAccount(Long accountId) { Query query = em.createQuery("SELECT a FROM Parking a WHERE a.account.id=?1"); query.setParameter(1, accountId); return query.getResultList(); } @Override public Parking createParking(Parking data) { em.persist(data); em.flush(); return data; } public List<Parking> findParkingsByAccountName(String name){ Query query = em.createQuery("SELECT a FROM Parking a WHERE a.account.name=?1"); query.setParameter(1, name); return query.getResultList(); } }
[ "antonio.signore@gmail.com" ]
antonio.signore@gmail.com
85b0256e4442f46d398d083c61c57aef7b293a33
0408d9c970ebf010654c30d36aceb1b4022dd6cf
/java/src/generated/java/net/asam/openscenario/v1_0/api/writer/IFollowTrajectoryActionWriter.java
ef4d1409ea0e6619c6d8e51b0193c29780a7a50b
[ "Apache-2.0", "BSD-3-Clause", "MIT", "Zlib" ]
permissive
aprilrain0505/openscenario.api.test
d7c9de1a05437b64bcbff6ee7f953c7218d892fc
a1a373e4a893892f953397af282b01ef774271da
refs/heads/master
2023-06-12T18:50:19.289307
2021-07-02T13:21:12
2021-07-02T13:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,854
java
/* * Copyright 2020 RA Consulting * * RA Consulting GmbH licenses this file 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 net.asam.openscenario.v1_0.api.writer; import net.asam.openscenario.api.writer.IOpenScenarioElementWriter; import net.asam.openscenario.v1_0.api.IFollowTrajectoryAction; /** * This is a automatic generated file according to the OpenSCENARIO specification version 1.0 * * <p>A Writer for the type 'FollowTrajectoryAction' From OpenSCENARIO class model specification: * Controls an entity to follow a trajectory using vertices, timings (optionally) and a * corresponding interpolation strategy. The trajectory can be instantiated from a catalog type, or * defined within this declaration. * * @author RA Consulting OpenSCENARIO generation facility */ public interface IFollowTrajectoryActionWriter extends IFollowTrajectoryAction, IOpenScenarioElementWriter { // Setters for all attributes /** * From OpenSCENARIO class model specification: Trajectory definition. * * @param trajectory value of model property trajectory */ public void setTrajectory(ITrajectoryWriter trajectory); /** * From OpenSCENARIO class model specification: A reference to the trajectory type in a catalog. * * @param catalogReference value of model property catalogReference */ public void setCatalogReference(ICatalogReferenceWriter catalogReference); /** * From OpenSCENARIO class model specification: Defines if time information provided within the * trajectory should be considered. If so, it may be used as either absolute or relative time * along the trajectory in order to define longitudinal velocity of the actor. Moreover, a time * offset or time scaling may be applied. * * @param timeReference value of model property timeReference */ public void setTimeReference(ITimeReferenceWriter timeReference); /** * From OpenSCENARIO class model specification: The mode how to follow the given trajectory. * * @param trajectoryFollowingMode value of model property trajectoryFollowingMode */ public void setTrajectoryFollowingMode(ITrajectoryFollowingModeWriter trajectoryFollowingMode); // children /** * From OpenSCENARIO class model specification: Trajectory definition. * * @return a writer for model property trajectory */ public ITrajectoryWriter getWriterTrajectory(); /** * From OpenSCENARIO class model specification: A reference to the trajectory type in a catalog. * * @return a writer for model property catalogReference */ public ICatalogReferenceWriter getWriterCatalogReference(); /** * From OpenSCENARIO class model specification: Defines if time information provided within the * trajectory should be considered. If so, it may be used as either absolute or relative time * along the trajectory in order to define longitudinal velocity of the actor. Moreover, a time * offset or time scaling may be applied. * * @return a writer for model property timeReference */ public ITimeReferenceWriter getWriterTimeReference(); /** * From OpenSCENARIO class model specification: The mode how to follow the given trajectory. * * @return a writer for model property trajectoryFollowingMode */ public ITrajectoryFollowingModeWriter getWriterTrajectoryFollowingMode(); }
[ "a.hege@rac.de" ]
a.hege@rac.de
11b3d88e58ae816cff0189164cfe88eacafa8833
cd91b86d07bc39afd8bb70b0b149ff5ff047b5ac
/java-base/src/main/java/com/nivelle/base/javacore/datastructures/base/JavaKeyWord.java
e9b81d42497d0efaf5bda332f3264deaa5a5724c
[]
no_license
XiaohuanIT/programdayandnight
84542852b39c82ea9e02aa2be3bc610d846837de
94b082b91498f188b3e26734b5e6f72bbc619c77
refs/heads/master
2022-05-31T11:01:07.649716
2020-05-03T04:36:26
2020-05-03T04:36:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,674
java
package com.nivelle.base.javacore.datastructures.base; import com.nivelle.base.pojo.Parent; import com.nivelle.base.pojo.Son; import com.nivelle.base.pojo.User; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; /** * java 关键字 * * @author nivell * @date 2019/07/18 */ public class JavaKeyWord { private static AtomicInteger atomicInteger = new AtomicInteger(0); public static void main(String[] args) { //retry不是java的关键字 retryTest(); System.out.println("================================"); instanceOfTest(); System.out.println("================================"); finalTest(); continueTest(); } /** * 1. retry:需要放在for,while,do...while的前面声明,变量只跟在break和continue后面。 * <p> * 2. retry后面跟循环,标记这个循环的位置。我们可以在continue或者break后面加retry,表示要跳到这个循环 * ,其中break表示要跳过这个标记的循环,continue表示从这个标记的循环继续执行。 */ private static void retryTest() { //retry: for (; ; ) { System.out.println("再一次来到这里"); retry: for (int i = 0; i < 10; i++) { if (atomicInteger.incrementAndGet() > 14) { return; } if (i == 5) { continue retry; } if (i == 8) { break retry; } System.out.println("当前数字:" + i + " atomicInteger is " + atomicInteger); } } } /** * 1. null是一种特殊类型,null 引用也可以转换为任意引用类型 * 2. 在 JavaSE规范 中对 instanceof 运算符的规定就是:如果 obj 为 null,那么将返回 false。 * 3. 通过 ClassCastException 异常来判断是否是其子类型 */ private static void instanceOfTest() { System.out.println("1. null 属性Object 类型:" + (null instanceof Object)); // int i = 0; //编译不通过 // System.out.println("i 属性 int 类型:" + (i instanceof Integer)); Integer i = 0; System.out.println("2. i实例属于类的实例对象:" + (i instanceof Integer)); ArrayList arrayList = new ArrayList(); System.out.println("3. arrayList 属于接口List的实现类:" + (arrayList instanceof List)); List list = new ArrayList(); System.out.println("4. list是ArrayList的实例,属于List接口的实现类:" + (list instanceof List)); Son son = new Son(1, "nivelle", 10); System.out.println("5. son是其父类的实现类:" + (son instanceof Parent)); String[] strings = new String[]{}; System.out.println("6. 数组类型是否是 Object 的子类型:" + (strings instanceof Object)); System.out.println("6.1. 数组类型是否是 String[] 的子类型:" + (strings instanceof String[])); } /** * final可以修饰变量,方法,方法,类 */ private static void finalTest() { final User user = new User(10, "jessy"); //定义为final 的user引用指向的对象引用这个应用不可以改变,但是对象的内容是可以改变的 // user = null; user.setAge(12); System.out.println("change user " + user); final int temp = 14; int result = changeInt(temp); System.out.println("值传递:" + result); System.out.println("参数不变:" + temp); //定义为final的变量不能改变 //temp = 16; System.out.println("默认的byte值:" + 0); } /** * 值传递, * 值传递(pass by value):是指在调用函数时将实际参数复制一份传递到函数中,这样在函数中如果对参数进行修改,将不会影响到实际参数 * 引用传递(pass by reference):是指在调用函数时将实际参数的地址直接传递到函数中,那么在函数中对参数所进行的修改,将影响到实际参数。 * * @param temp * @return */ private static int changeInt(int temp) { temp++; return temp; } /** * continue :跳转到条件判断处 */ public static void continueTest() { int i = 0; while (i <= 5) { if (i == 3) { i++; continue; } System.err.println(" i=" + i); i += 1; } System.err.println("end i=" + i); } }
[ "fuxinzhong@zhangyue.com" ]
fuxinzhong@zhangyue.com
ea301f179cb78a361d9e84f5fa6750bc2e6e9704
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
/mobile_catalog/src/ong/eu/soon/mobile/json/ifx/element/SegmentValue.java
b7be47cd28e3702664332c33fbcd43661d7428b9
[]
no_license
eusoon/Mobile-Catalog
2e6f766864ea25f659f87548559502358ac5466c
869d7588447117b751fcd1387cd84be0bd66ef26
refs/heads/master
2021-01-22T23:49:12.717052
2013-12-10T08:22:20
2013-12-10T08:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package ong.eu.soon.mobile.json.ifx.element; import ong.eu.soon.mobile.json.ifx.basetypes.IFXString; public class SegmentValue extends IFXString { protected SegmentValue(){ } }
[ "eusoon@gmail.com" ]
eusoon@gmail.com
26b7cc7aa93ef2ba23ed7d3ddac366ca0baf6826
a7e34435d92c2f5080f38b2b8489ddb4b4d20ae5
/src/main/java/com/choupangxia/schedule/demo/Task.java
453a3319e0d641a2db2178cec78ec2798f999083
[]
no_license
akingde/java-schedule
4ce3c6e44b0c5b52e5c7534dc40281117b5ccc53
f3e9f7a7a13799809226574e27bc75d5f5272a50
refs/heads/main
2023-07-06T11:44:34.525966
2021-08-03T05:28:34
2021-08-03T05:28:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package com.choupangxia.schedule.demo; /** * @author sec * @version 1.0 * @date 2021/8/2 **/ public class Task { public static void main(String[] args) { // run in a second final long timeInterval = 1000; Runnable runnable = new Runnable() { @Override public void run() { while (true) { System.out.println("Hello !!"); try { Thread.sleep(timeInterval); } catch (InterruptedException e) { e.printStackTrace(); } } } }; Thread thread = new Thread(runnable); thread.start(); } }
[ "xinyoulingxi2008@126.com" ]
xinyoulingxi2008@126.com
d0fc80a54cdc00a765339f40c645e091159d668b
39854fb04796055a2d157769f43362b59ee9a00c
/DioriteAPI/src/main/java/org/diorite/scheduler/DioriteWorker.java
a23229b80f8290b02965392fefdbcc33553757da
[ "MIT" ]
permissive
tpacce/Diorite
35ed8d0dfd114e8b26afe058494405b6650de9ec
3828c65422e5c04e12ae306c9baebb7227d50ae1
refs/heads/master
2021-01-21T01:34:53.059367
2015-09-12T12:30:49
2015-09-12T12:30:49
42,354,127
1
0
null
2015-09-12T11:05:34
2015-09-12T11:05:34
null
UTF-8
Java
false
false
739
java
package org.diorite.scheduler; import org.diorite.plugin.DioritePlugin; /** * Represents a worker thread for the scheduler. This gives information about the Thread object for the task, owner of the task and the taskId. <br> * Workers are used to execute async tasks. */ public interface DioriteWorker { /** * Returns the taskId for the task being executed by this worker. * * @return Task id number. */ int getTaskId(); /** * Returns the Plugin that owns this task. * * @return The Plugin that owns the task */ DioritePlugin getOwner(); /** * Returns the thread for the worker. * * @return The Thread object for the worker */ Thread getThread(); }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
7858e214924504aba33c8bb46a993e32233ed790
5016a008f190915c45f16acf505729471aeb7427
/feature-login/src/main/java/org/ditto/feature/login/RegisterUsernameFragment.java
40318de3cf1792c09a0fb1099eea721d4d006440
[]
no_license
conanchen/hiask-android-sexyimage
fe89578ea995a2f3f9d95ca7fbc9315a6e336e72
ad3472bb2401edaeb9ed425691bf89dba5a70fe3
refs/heads/master
2021-07-10T21:54:25.989962
2017-10-13T08:38:07
2017-10-13T08:38:07
104,716,967
0
0
null
null
null
null
UTF-8
Java
false
false
2,392
java
package org.ditto.feature.login; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AutoCompleteTextView; import org.ditto.feature.login.controllers.RegisterController; import org.ditto.feature.base.BaseFragment; import org.ditto.lib.Constants; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class RegisterUsernameFragment extends BaseFragment { private RegisterController.Callbacks callbacks; @BindView(R2.id.register_username) AutoCompleteTextView mRegisterUsernameText; public RegisterUsernameFragment() { // Required empty public constructor } public static RegisterUsernameFragment create(String title) { RegisterUsernameFragment fragment = new RegisterUsernameFragment(); Bundle bundle = new Bundle(); bundle.putString(Constants.TITLE, title); fragment.setArguments(bundle); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.register_username_fragment, container, false); ButterKnife.bind(this, view); return view; } @Override public void onResume() { super.onResume(); } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof RegisterController.Callbacks) { callbacks = (RegisterController.Callbacks) context; } else { throw new RuntimeException(context.toString() + " must implement RegisterController.ContentCallbacks"); } } @Override public void onDetach() { super.onDetach(); callbacks = null; } @OnClick(R2.id.register_button) public void onRegisterButtonClicked() { //TODO: call server api to register username+smsauthcode boolean ok = true; if (ok) { callbacks.onUsernameDone(mRegisterUsernameText.getText().toString()); } } }
[ "chenchunhai@changhongit.com" ]
chenchunhai@changhongit.com
b4c9a1a280d0ad5eb16499f71b9ced143fd3d7ce
e2a6ca6c033ea35c098f9ca0b52f445e99e5d1db
/ble-livedata/src/main/java/no/nordicsemi/android/ble/livedata/ObservableBleManager.java
0b79bf3b0d9220485e4f2d2814f87c533e7020f0
[]
permissive
NordicSemiconductor/Android-BLE-Library
bf1db1a8fd4b34a44a83cb10cee78bc1ea1983b4
004e6645dfb391c253c13a8b75d38a86b0aeacc2
refs/heads/main
2023-08-25T03:45:49.585534
2023-04-04T13:28:20
2023-04-04T13:28:20
114,649,434
1,798
429
BSD-3-Clause
2023-05-22T09:56:21
2017-12-18T14:17:43
Java
UTF-8
Java
false
false
1,097
java
package no.nordicsemi.android.ble.livedata; import android.content.Context; import android.os.Handler; import android.os.Looper; import androidx.annotation.NonNull; import androidx.lifecycle.LiveData; import no.nordicsemi.android.ble.BleManager; import no.nordicsemi.android.ble.livedata.state.BondState; import no.nordicsemi.android.ble.livedata.state.ConnectionState; import no.nordicsemi.android.ble.observer.BondingObserver; import no.nordicsemi.android.ble.observer.ConnectionObserver; public abstract class ObservableBleManager extends BleManager { public final LiveData<ConnectionState> state; public final LiveData<BondState> bondingState; public ObservableBleManager(@NonNull final Context context) { this(context, new Handler(Looper.getMainLooper())); } public ObservableBleManager(@NonNull final Context context, @NonNull final Handler handler) { super(context, handler); state = new ConnectionStateLiveData(); bondingState = new BondingStateLiveData(); setConnectionObserver((ConnectionObserver) state); setBondingObserver((BondingObserver) bondingState); } }
[ "aleksander.nowakowski@nordicsemi.no" ]
aleksander.nowakowski@nordicsemi.no
12d33ef805991e29d045a81b56a3aec32506a200
1bc18f151d767dd8b89af869ca3b1c8584201d7f
/src/main/java/com/acme/example/IrcMessage.java
17b63bf9cab40549cc630eab536e0ad557bc1bb5
[]
no_license
vietj/vertx-codegen-example
73269ae66bb22428e99e523b7b7893f446958599
97fd791d6d0013e9d9eae9c62beed2df5bfb199d
refs/heads/master
2021-01-09T20:39:36.204735
2016-05-27T12:46:10
2016-05-27T22:25:30
59,866,211
1
0
null
null
null
null
UTF-8
Java
false
false
306
java
package com.acme.example; import io.vertx.codegen.annotations.VertxGen; /** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> */ @VertxGen public interface IrcMessage { boolean isPrivate(); String nick(); String chatId(); String message(); void reply(String replyMsg); }
[ "julien@julienviet.com" ]
julien@julienviet.com
67a1c26d13ac692c88e5fbefc290526d9fc3d545
3f6e6dee34ec590480166b294d1c09d260ee4578
/src/main/java/ssm/annotation/MyRequstParam.java
32575205ddaea4a21c7aa14388e51eec5b0507a3
[]
no_license
7373/ssm_frame
5d443cdb139a5459a5d9240251dffb08bb4b06ee
9915bd120f0f1d4f6d99d1caeaba2c2081282c74
refs/heads/master
2020-04-17T22:32:27.064566
2019-04-21T03:33:06
2019-04-21T03:33:06
166,998,344
2
1
null
null
null
null
UTF-8
Java
false
false
326
java
package ssm.annotation; import java.lang.annotation.*; /** * Created by Yien on 2018/12/21. * @Desrciption 绑定简单参数类型,暂时支持String,Integer */ @Target({ ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface MyRequstParam { String value() default ""; }
[ "15024454222@qq.com" ]
15024454222@qq.com
c0381186ab4cfbaa1a011c3e044c04b78fc7af8d
f0df1bad758b74c47de59881f88b0674c441cda1
/day19_1/src/com/tcwgq/servlet/AServlet.java
9cac4bbd6b89758cfa4417019e59f6b5357717fd
[]
no_license
tcwgq/learn-java-web
02d7ecb74fa95e681a72a0a7ccd6b054ee6584b3
0264c5f5d72a9c3693fb2091e07b209a044e6432
refs/heads/master
2022-01-14T13:27:37.763798
2019-05-26T05:15:51
2019-05-26T05:15:51
104,644,889
0
0
null
null
null
null
UTF-8
Java
false
false
816
java
package com.tcwgq.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AServlet extends BaseServlet { private static final long serialVersionUID = 1L; public void add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("add..."); } public void update(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("update..."); throw new RuntimeException("我出错了,哈哈哈"); } public void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("delete..."); } }
[ "tcwgq@outlook.com" ]
tcwgq@outlook.com
88f91030a333f65c995cc4ac060195f8ad57ca6c
db2ca48fffaf6689c9db439abaf9d98729548e0b
/minsu-service/minsu-service-entity/src/main/java/com/ziroom/minsu/entity/cms/ActCouponUserEntity.java
f9292164a630c649b5258bd39d06c7904b509acb
[]
no_license
majinwen/sojourn
46a950dbd64442e4ef333c512eb956be9faef50d
ab98247790b1951017fc7dd340e1941d5b76dc39
refs/heads/master
2020-03-22T07:07:05.299160
2018-03-18T13:45:23
2018-03-18T13:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,837
java
package com.ziroom.minsu.entity.cms; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * <p> * 优惠券绑定关系实体 * </p> * * <PRE> * <BR> 修改记录 * <BR>----------------------------------------------- * <BR> 修改日期 修改人 修改内容 * </PRE> * * @author lishaochuan on 2016年6月15日 * @since 1.0 * @version 1.0 */ public class ActCouponUserEntity extends ActCouponEntity { /** * 序列ID */ private static final long serialVersionUID = -817926209180463816L; /** 绑定用户uid */ private String uid; /** 绑定用户手机号 */ private String customerMobile; /** 使用时间 */ private Date usedTime; /** 订单编号 */ private String orderSn; /** * 城市列表 */ List<ActivityCityEntity> cityList = new ArrayList(); /** * 限制房源列表 */ List<ActivityHouseEntity> limitHouseList = new ArrayList<>(); public List<ActivityCityEntity> getCityList() { return cityList; } public void setCityList(List<ActivityCityEntity> cityList) { this.cityList = cityList; } public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } public String getCustomerMobile() { return customerMobile; } public void setCustomerMobile(String customerMobile) { this.customerMobile = customerMobile; } public Date getUsedTime() { return usedTime; } public void setUsedTime(Date usedTime) { this.usedTime = usedTime; } public String getOrderSn() { return orderSn; } public void setOrderSn(String orderSn) { this.orderSn = orderSn; } public List<ActivityHouseEntity> getLimitHouseList() { return limitHouseList; } public void setLimitHouseList(List<ActivityHouseEntity> limitHouseList) { this.limitHouseList = limitHouseList; } }
[ "068411Lsp" ]
068411Lsp
3dd3e0f19c7e823d75220aff3055371ece077810
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_259ae23c43a323796ca8ae18e920df4c78eb6b5c/VarBookDDF/20_259ae23c43a323796ca8ae18e920df4c78eb6b5c_VarBookDDF_t.java
bf3351e777866dda54243bb7983ea5f41d183aae
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,867
java
/** * Copyright (C) 2011-2012 Barchart, Inc. <http://www.barchart.com/> * * All rights reserved. Licensed under the OSI BSD License. * * http://www.opensource.org/licenses/bsd-license.php */ package com.barchart.feed.ddf.market.provider; import static com.barchart.feed.base.provider.MarketConst.NULL_BOOK_ENTRY; import java.util.Collection; import java.util.Comparator; import java.util.EnumSet; import java.util.List; import java.util.Set; import java.util.TreeMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.barchart.feed.api.model.data.Book; import com.barchart.feed.api.model.meta.Instrument; import com.barchart.feed.base.book.api.MarketBook; import com.barchart.feed.base.book.api.MarketBookEntry; import com.barchart.feed.base.book.api.MarketDoBook; import com.barchart.feed.base.book.api.MarketDoBookEntry; import com.barchart.feed.base.book.enums.UniBookResult; import com.barchart.feed.base.provider.DefBook; import com.barchart.feed.base.provider.MarketConst; import com.barchart.feed.base.values.api.PriceValue; import com.barchart.feed.base.values.api.SizeValue; import com.barchart.feed.base.values.api.TimeValue; import com.barchart.feed.base.values.provider.ValueBuilder; import com.barchart.feed.base.values.provider.ValueFreezer; import com.barchart.util.common.anno.Mutable; import com.barchart.util.common.anno.ThreadSafe; import com.barchart.util.value.api.Time; @Mutable @ThreadSafe(rule = "use in runSafe() only") public final class VarBookDDF extends ValueFreezer<MarketBook> implements MarketDoBook { private static final Logger log = LoggerFactory.getLogger(VarBookDDF.class); protected volatile MarketBookEntry lastEntry = MarketConst.NULL_BOOK_ENTRY; private Set<Component> changeSet = EnumSet.noneOf(Component.class); @SuppressWarnings("serial") private static class EntryMap extends TreeMap<PriceValue, MarketBookEntry> { public EntryMap(final Comparator<PriceValue> comp) { super(comp); } } private long millisUTC; private static final Comparator<PriceValue> CMP_ASC = new Comparator<PriceValue>() { @Override public int compare(final PriceValue o1, final PriceValue o2) { return o1.compareTo(o2); } }; private static final Comparator<PriceValue> CMP_DES = new Comparator<PriceValue>() { @Override public int compare(final PriceValue o1, final PriceValue o2) { return o2.compareTo(o1); } }; private final EntryMap bids = new EntryMap(CMP_ASC); private final EntryMap asks = new EntryMap(CMP_DES); private volatile MarketBookEntry topBid = MarketBookEntry.NULL; private volatile MarketBookEntry topAsk = MarketBookEntry.NULL; private final Instrument instrument; VarBookDDF(final Instrument instrument, final Book.Type type, final SizeValue size, final PriceValue step) { // XXX this.instrument = instrument; } // ##################################### @Override public final UniBookResult setEntry(final MarketDoBookEntry entry) { if(entry != null) { lastEntry = entry.freeze(); } changeSet.clear(); final Book.Side side = entry.side(); final int place = entry.place(); // NOTE: This only updates top. //final EntryMap map = map(side); switch (side) { case BID: if (place == ENTRY_TOP) { topBid = entry; changeSet.add(Component.TOP_BID); } break; case ASK: if (place == ENTRY_TOP) { topAsk = entry; changeSet.add(Component.TOP_ASK); } break; default: return UniBookResult.ERROR; } if (place == ENTRY_TOP) { return UniBookResult.TOP; } else { return UniBookResult.NORMAL; } } private EntryMap map(final Book.Side side) { switch (side) { default: case BID: return bids; case ASK: return asks; } } @Override public final MarketBookEntry[] entries(final Book.Side side) { final EntryMap map = map(side); final Collection<MarketBookEntry> values = map.values(); final int size = values.size(); if(size == 0) { if(side == Side.BID) { return new MarketBookEntry[]{topBid}; } else { return new MarketBookEntry[]{topAsk}; } } final MarketBookEntry[] array = new MarketBookEntry[size]; int index = 0; for (final MarketBookEntry entry : values) { array[index] = entry; index++; } return array; } @Override public final DefBook freeze() { return new DefBook(instrument, time(), entries(Book.Side.BID), entries(Book.Side.ASK), topBid, topAsk, lastEntry, EnumSet.copyOf(changeSet)); } @Override public TimeValue time() { return ValueBuilder.newTime(millisUTC); } @Override public final void setTime(final TimeValue time) { millisUTC = time.asMillisUTC(); } @Override public final boolean isFrozen() { return false; } @Override public final MarketBookEntry last() { // log.debug("last called in VarBookDDF"); // final DefBookEntry entry = (DefBookEntry) lastEntry.freeze(); // // return entry == null ? NULL_BOOK_ENTRY : entry; throw new UnsupportedOperationException("UNUSED"); } @Override public final MarketBookEntry top(final Book.Side side) { final MarketBookEntry entry; switch (side) { case BID: entry = topBid; break; case ASK: entry = topAsk; break; default: entry = null; break; } // System.err.println("### TOP : " + side + " ### " + entry); return entry == null ? NULL_BOOK_ENTRY : entry; } /* #################################### */ @Override public PriceValue priceGap() { throw new UnsupportedOperationException("UNUSED"); } @Override public final SizeValue[] sizes(final Book.Side side) { throw new UnsupportedOperationException("UNUSED"); } @Override public PriceValue priceTop(final Book.Side side) { throw new UnsupportedOperationException("UNUSED"); } @Override public SizeValue sizeTop(final Book.Side side) { throw new UnsupportedOperationException("UNUSED"); } @Override public Top top() { throw new UnsupportedOperationException("UNUSED"); } @Override public Entry lastBookUpdate() { throw new UnsupportedOperationException("UNUSED"); } @Override public Time updated() { throw new UnsupportedOperationException("UNUSED"); } /* #################################### */ @Override public void clear() { bids.clear(); asks.clear(); } @Override public UniBookResult setSnapshot(final MarketDoBookEntry[] entries) { if(entries == null) { log.error("SetSnapshot called with null book entries"); return UniBookResult.ERROR; } log.debug("SetSnapshot called"); clear(); changeSet.add(Component.NORMAL_BID); changeSet.add(Component.NORMAL_ASK); changeSet.add(Component.TOP_BID); changeSet.add(Component.TOP_ASK); changeSet.add(Component.ANY_BID); changeSet.add(Component.ANY_ASK); for (final MarketDoBookEntry entry : entries) { if(entry != null && !entry.isNull()) { final EntryMap map = map(entry.side()); map.put(entry.priceValue(), entry); /* * Set top of book from snapshot update */ if(entry.level() == 1) { if(entry.side() == Book.Side.BID) { topBid = entry; } else { topAsk = entry; } } } } /* * */ return UniBookResult.NORMAL; } @Override public List<Entry> entryList(Book.Side side) { throw new UnsupportedOperationException("UNUSED"); } @Override public Instrument instrument() { return instrument; } @Override public Set<Component> change() { throw new UnsupportedOperationException("UNUSED"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6c983c435648f4e7cf204bda186d0bf8feb54024
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/Fantastle5/src/net/worldwizard/fantastle5/objects/NPort.java
30de5cb1730446ee317a487fdf615a480c55da19
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
/* Fantastle: A Maze-Solving Game Copyright (C) 2008-2010 Eric Ahnell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Any questions should be directed to the author via email at: fantastle@worldwizard.net */ package net.worldwizard.fantastle5.objects; import net.worldwizard.fantastle5.generic.GenericPort; public class NPort extends GenericPort { // Constructors public NPort() { super(new NPlug(), 'N'); } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
2fa40767d82046a61a82617dd1f300a9f6244279
37d44625ca52cbaf2be00027fd4c5340e9662d8d
/apps/pda/biz/app/src/main/java/com/zhenlaidian/ui/OldOneKeyQueryActivity.java
31406003ce5b5b179a7779d6834d03d60bdd5517
[]
no_license
uwitec/ParkingOS_cloud
95234dc2c2b19d8bf55c454d02baad90d57c5325
5e03e1b0267fb31ec62bcdbaaae9750b7bb698d4
refs/heads/master
2020-12-24T20:00:39.706918
2017-03-23T09:48:49
2017-03-23T09:48:49
86,226,688
0
1
null
2017-03-26T11:14:19
2017-03-26T11:14:19
null
UTF-8
Java
false
false
4,791
java
package com.zhenlaidian.ui; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.view.MenuItem; import android.view.View; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.androidquery.AQuery; import com.androidquery.callback.AjaxCallback; import com.androidquery.callback.AjaxStatus; import com.google.gson.Gson; import com.zhenlaidian.R; import com.zhenlaidian.bean.OldOneKeyQueryInfo; import com.zhenlaidian.util.IsNetWork; import com.zhenlaidian.util.MyLog; /** * 第一版主页一检查询; */ public class OldOneKeyQueryActivity extends BaseActivity { private TextView tv_in_car; private TextView tv_out_car; private TextView tv_total_money; private TextView tv_date_null; private TextView tv_all_in_car; private RelativeLayout rl_one_key_query; private ActionBar actionBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); actionBar = getSupportActionBar(); setContentView(R.layout.one_key_query_activity); actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP, ActionBar.DISPLAY_HOME_AS_UP); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.show(); initView(); getOneQuery(); } public void onekeyonclicklistening(View view) { Intent intent = new Intent(OldOneKeyQueryActivity.this, CurrentOrderActivity.class); startActivity(intent); OldOneKeyQueryActivity.this.finish(); } // actionBar的点击回调方法 @Override public boolean onOptionsItemSelected(MenuItem item) { // TODO Auto-generated method stub switch (item.getItemId()) { case android.R.id.home: OldOneKeyQueryActivity.this.finish(); return true; default: return super.onOptionsItemSelected(item); } } private void initView() { tv_in_car = (TextView) findViewById(R.id.tv_query_inPark_car_count); tv_out_car = (TextView) findViewById(R.id.tv_query_outPark_car_count); tv_total_money = (TextView) findViewById(R.id.tv_query_total_money); tv_date_null = (TextView) findViewById(R.id.tv_query_null); tv_all_in_car = (TextView) findViewById(R.id.tv_query_accessPark_car_count); rl_one_key_query = (RelativeLayout) findViewById(R.id.rl_location_bottom); } public void setView(OldOneKeyQueryInfo info) { if (info.getCcount() != null) { tv_in_car.setText(info.getCcount()); } if (info.getOcount() != null) { tv_out_car.setText(info.getOcount()); } if (info.getTotal() != null) { tv_total_money.setText(info.getTotal()); } if (info.getTcount() != null) { tv_all_in_car.setText(info.getTcount()); } else { tv_all_in_car.setText("0"); } } public void setNullView() { tv_date_null.setVisibility(View.VISIBLE); rl_one_key_query.setVisibility(View.INVISIBLE); } // http://127.0.0.1/zld/collectorrequest.do?action=corder&token=73de6dcf6987a6c6eb9c28bb8401ef25 // {"ccount":"8","ocount":"11","total":"177.75"} public void getOneQuery() { String path = baseurl; String url = path + "collectorrequest.do?action=corder&token=" + token; MyLog.w("OneKeyQueryActivity", "获取一键查询的URL--->" + url); AQuery aQuery = new AQuery(this); final ProgressDialog dialog = ProgressDialog.show(this, "一键查询...", "查询中...", true, true); if (!IsNetWork.IsHaveInternet(this)) { Toast.makeText(this, "请检查网络", 0).show(); return; } aQuery.ajax(url, String.class, new AjaxCallback<String>() { @Override public void callback(String url, String object, AjaxStatus status) { // TODO Auto-generated method stub super.callback(url, object, status); if (object != null && object != "") { dialog.dismiss(); MyLog.v("OneKeyQueryActivity", "获取到的一键查询结果是--->" + object); Gson gson = new Gson(); OldOneKeyQueryInfo info = gson.fromJson(object, OldOneKeyQueryInfo.class); MyLog.i("OneKeyQueryActivity", "解析到的一键查询结果是--->" + info.toString()); setView(info); } else { dialog.dismiss(); setNullView(); } } }); } }
[ "you@example.com" ]
you@example.com
7d12440abd95ef4f9794a47e06dfbe52ef4f1fbc
440e5bff3d6aaed4b07eca7f88f41dd496911c6b
/myapplication/src/main/java/com/vlocker/ui/widget/view/LockNumberTipView.java
1ffc29d5afea852b08800b1fdcfb0612e9ccc5df
[]
no_license
freemanZYQ/GoogleRankingHook
4d4968cf6b2a6c79335b3ba41c1c9b80e964ddd3
bf9affd70913127f4cd0f374620487b7e39b20bc
refs/heads/master
2021-04-29T06:55:00.833701
2018-01-05T06:14:34
2018-01-05T06:14:34
77,991,340
7
5
null
null
null
null
UTF-8
Java
false
false
1,892
java
package com.vlocker.ui.widget.view; import android.content.Context; import android.util.AttributeSet; import android.widget.FrameLayout.LayoutParams; import android.widget.TextView; import com.vlocker.locker.R; import com.vlocker.ui.widget.a.n; import com.vlocker.ui.widget.c.d; public class LockNumberTipView extends TextView { private n a; private Context b; public LockNumberTipView(Context context) { this(context, null); this.b = context; } public LockNumberTipView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } private void b() { setGravity(17); setTextColor(-1); setText(this.b.getResources().getText(R.string.input_password_txt)); setTextSize(16.0f); if (!(this.a == null || this.a.a == null)) { setBackgroundDrawable(a.a(getContext(), this.a.a, ((float) this.a.k) * d.a, ((float) this.a.l) * d.a)); } a(); } public void a() { if (this.a == null || this.a.E == -1) { setTextColor(-1); } else { setTextColor(this.a.E); } } public float getH() { return this.a == null ? 0.0f : ((float) this.a.l) * d.a; } public float getPaintX() { return this.a == null ? 0.0f : this.a.f * d.a; } public float getPaintY() { return this.a == null ? 0.0f : this.a.g * d.c; } public float getW() { return this.a == null ? 0.0f : ((float) this.a.k) * d.a; } public LayoutParams getmLayoutParams() { LayoutParams layoutParams = new LayoutParams((int) (((float) this.a.k) * d.a), (int) (((float) this.a.l) * d.a)); layoutParams.setMargins((int) getPaintX(), (int) getPaintY(), 0, 0); return layoutParams; } public void setTipData(n nVar) { this.a = nVar; b(); } }
[ "zhengyuqin@youmi.net" ]
zhengyuqin@youmi.net
839a6b3b0dcbe8591beeff40c26a4e485bc82a23
4a7cb14aa934df8f362cf96770e3e724657938d8
/MFES/ATS/Project/structuring/projectsPOO_1920/24/Projeto/MenuLogin.java
e66c8dfbd786b852b343b1c8cbe7da6dda373085
[]
no_license
pCosta99/Masters
7091a5186f581a7d73fd91a3eb31880fa82bff19
f835220de45a3330ac7a8b627e5e4bf0d01d9f1f
refs/heads/master
2023-08-11T01:01:53.554782
2021-09-22T07:51:51
2021-09-22T07:51:51
334,012,667
1
1
null
null
null
null
UTF-8
Java
false
false
1,285
java
import java.io.Serializable; import java.util.InputMismatchException; import java.util.Scanner; public class MenuLogin extends Menu implements Serializable { private String email; private String password; public MenuLogin(String[] opcoes) { super(opcoes); this.email = ""; this.password = ""; } public MenuLogin() { super(); this.email = ""; this.password = ""; } public void executaParametros() { System.out.print("E-mail: "); this.email = leString(); System.out.print("Password: "); this.password = leString(); } public void executaReader(){ showMenu(); int aux; do{ aux=lerOpcao(); } while(aux<0 || aux>2); this.setOpcao(aux); } public String leString(){ String op = null; Scanner sc = new Scanner(System.in); try { op = sc.nextLine(); } catch (InputMismatchException e){ System.out.println("Não leu string"); } return op; } public String getEmail(){ return this.email; } public String getPassword(){ return this.password; } }
[ "costapedro.a1999@gmail.com" ]
costapedro.a1999@gmail.com
9e255dc3fc162ca27ac325efa6eb0461f049335c
596c7846eabd6e8ebb83eab6b83d6cd0801f5124
/example-001-disruptor/example-001-disruptor-03-web/src/main/java/com/github/bjlhx15/disruptor/demo/base/server/ServerApplication.java
edcc744a2db9dd381f009f1178d215d726ab686a
[]
no_license
zzw0598/common
c219c53202cdb5e74a7c76d18f90e18eca983752
76abfb43c93da4090bbb8861d27bbcb990735b80
refs/heads/master
2023-03-10T02:30:44.310940
2021-02-19T07:59:16
2021-02-19T07:59:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.github.bjlhx15.disruptor.demo.base.server; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ServerApplication { public static void main(String[] args) { SpringApplication.run(ServerApplication.class, args); } }
[ "lihongxu6@jd.com" ]
lihongxu6@jd.com
5dd13058af588979b830491286b16957968f76c5
729cecd15f257fbde46fa3acd483670b7399a516
/json/json/protobuf/src/main/java/com/serialize/Test.java
869724c0d11cdf1ee46ee5eb6e74aa16ff79e5fc
[ "MIT", "BSD-2-Clause" ]
permissive
ksfzhaohui/blog
dcb0f573741edc159c45bbce057863078ac70255
9d6994f2d66f760c3dda507f08fcf2b2046814b8
refs/heads/master
2023-06-21T15:14:38.733445
2023-06-18T13:26:26
2023-06-18T13:26:26
140,855,650
107
47
BSD-2-Clause
2022-12-16T00:37:19
2018-07-13T14:18:27
Java
UTF-8
Java
false
false
257
java
package com.serialize; public class Test { public static void main(String[] args) throws Throwable { for (int i = 0; i < 3; i++) { Manual.test(); ASM.test(); Reflex.test(); ReflexMH.test(); System.out.println("=============="); } } }
[ "ksfzhaohui@126.com" ]
ksfzhaohui@126.com
40e76a57bf5bf27cb44dbaf45adf7fa8449ee0ec
d6c041879c662f4882892648fd02e0673a57261c
/com/planet_ink/coffee_mud/Abilities/Common/Engraving.java
085f639c29f0b1ef7526e92c67304f53dc4b66e2
[ "Apache-2.0" ]
permissive
linuxshout/CoffeeMud
15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6
a418aa8685046b08c6d970083e778efb76fd3716
refs/heads/master
2020-04-14T04:17:39.858690
2018-12-29T20:50:15
2018-12-29T20:50:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,641
java
package com.planet_ink.coffee_mud.Abilities.Common; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2002-2018 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Engraving extends CommonSkill { @Override public String ID() { return "Engraving"; } private final static String localizedName = CMLib.lang().L("Engraving"); @Override public String name() { return localizedName; } private static final String[] triggerStrings = I(new String[] { "ENGRAVE", "ENGRAVING" }); @Override public String[] triggerStrings() { return triggerStrings; } @Override public int classificationCode() { return Ability.ACODE_COMMON_SKILL | Ability.DOMAIN_CALLIGRAPHY; } protected Item found = null; protected String writing = ""; @Override protected boolean canBeDoneSittingDown() { return true; } public Engraving() { super(); displayText=L("You are engraving..."); verb=L("engraving"); } @Override public void unInvoke() { if(canBeUninvoked()) { if((affected!=null)&&(affected instanceof MOB)&&(!aborted)&&(!helping)) { final MOB mob=(MOB)affected; if(writing.length()==0) commonTell(mob,L("You mess up your engraving.")); else { String desc=found.description(); final int x=desc.indexOf(" Engraved on it are the words `"); final int y=desc.lastIndexOf('`'); if((x>=0)&&(y>x)) desc=desc.substring(0,x); found.setDescription(L("@x1 Engraved on it are the words `@x2`.",desc,writing)); } } } super.unInvoke(); } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { if(super.checkStop(mob, commands)) return true; if(commands.size()<2) { commonTell(mob,L("You must specify what you want to engrave onto, and what words to engrave on it.")); return false; } Item target=mob.fetchItem(null,Wearable.FILTER_UNWORNONLY,commands.get(0)); if((target==null)||(!CMLib.flags().canBeSeenBy(target,mob))) target=mob.location().findItem(null, commands.get(0)); if((target!=null)&&(CMLib.flags().canBeSeenBy(target,mob))) { final Set<MOB> followers=mob.getGroupMembers(new TreeSet<MOB>()); boolean ok=false; for(final MOB M : followers) { if(target.secretIdentity().indexOf(getBrand(M))>=0) ok=true; } if(!ok) { commonTell(mob,L("You aren't allowed to work on '@x1'.",(commands.get(0)))); return false; } } if((target==null)||(!CMLib.flags().canBeSeenBy(target,mob))) { commonTell(mob,L("You don't seem to have a '@x1'.",(commands.get(0)))); return false; } commands.remove(commands.get(0)); final Ability write=mob.fetchAbility("Skill_Write"); if(write==null) { commonTell(mob,L("You must know how to write to engrave.")); return false; } if((((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_GLASS) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_METAL) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_ROCK) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_PRECIOUS) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_SYNTHETIC) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_WOODEN) &&((target.material()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_MITHRIL)) ||(!target.isGeneric())) { commonTell(mob,L("You can't engrave onto that material.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; writing=CMParms.combine(commands,0); verb=L("engraving on @x1",target.name()); displayText=L("You are @x1",verb); found=target; if((!proficiencyCheck(mob,0,auto))||(!write.proficiencyCheck(mob,0,auto))) writing=""; final int duration=getDuration(30,mob,1,3); final CMMsg msg=CMClass.getMsg(mob,target,this,getActivityMessageType(),L("<S-NAME> start(s) engraving on <T-NAME>.")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); beneficialAffect(mob,mob,asLevel,duration); } return true; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
b3a3ff0a3f065bdd71719646e3578018738df105
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module116/src/main/java/module116packageJava0/Foo388.java
aea1276e5ea14ef44b08a9fbc97a41c740e3ae6a
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
946
java
package module116packageJava0; import java.lang.Integer; public class Foo388 { Integer int0; Integer int1; Integer int2; public void foo0() { new module116packageJava0.Foo387().foo18(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } public void foo10() { foo9(); } public void foo11() { foo10(); } public void foo12() { foo11(); } public void foo13() { foo12(); } public void foo14() { foo13(); } public void foo15() { foo14(); } public void foo16() { foo15(); } public void foo17() { foo16(); } public void foo18() { foo17(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
7ce457e9ec3c77bdcffa0015d9519e3f7bc056c0
5f0a9ab56f5449d800b73c06e2f60eac24656d0d
/1. Entry Module/Programming Basics/3. Simple Conditions/7. SumSeconds/src/Main.java
85fc406457dfe25998a1b9e47fce244b2b2e0d5c
[ "MIT" ]
permissive
uagg/SoftwareUniversity
af33b0c8c7decf341d227d83a615046e95e6fb36
482ee21990bd94ce0dda10afebcd810c6a6a4efa
refs/heads/master
2020-03-19T01:52:15.353631
2018-06-03T23:11:56
2018-06-03T23:11:56
119,178,982
0
0
null
null
null
null
UTF-8
Java
false
false
1,923
java
/* Трима спортни състезатели финишират за някакъв брой секунди (между 1 и 50). Да се напише програма, която въвежда времената на състезателите и пресмята сумарното им време във формат "минути:секунди". Секундите да се изведат с водеща нула (2  "02", 7  "07", 35  "35"). Подсказка: • Сумирайте трите числа и получете резултата в секунди. Понеже 1 минута = 60 секунди, ще трябва да изчислите броя минути и броя секунди в диапазона от 0 до 59. • Ако резултатът е между 0 и 59, отпечатайте 0 минути + изчислените секунди. • Ако резултатът е между 60 и 119, отпечатайте 1 минута + изчислените секунди минус 60. • Ако резултатът е между 120 и 179, отпечатайте 2 минути + изчислените секунди минус 120. • Ако секундите са по-малко от 10, изведете водеща нула преди тях. */ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int sec1 = Integer.parseInt(scanner.nextLine()); int sec2 = Integer.parseInt(scanner.nextLine()); int sec3 = Integer.parseInt(scanner.nextLine()); int sum = sec1 + sec2 + sec3; int minutes = sum / 60; int seconds = sum % 60; if(seconds < 10) { System.out.printf("%d:0%d", minutes, seconds); } else { System.out.printf("%d:%d", minutes, seconds); } } }
[ "lucifercheto@abv.bg" ]
lucifercheto@abv.bg
42ed91e1ec804462d0d596d44d185deb87af96dc
b853da67e565bd1032e93a6639af018de6026ba7
/src/Coalesce.Search/src/main/java/com/incadencecorp/coalesce/search/factory/CoalesceFeatureTypeFactory.java
32ec1d5dc67772d8cbfd71ee543c38257167550a
[ "Apache-2.0" ]
permissive
InCadence/coalesce
616c80cc974eddd7373f093e6705aea4111c18ac
cf6235526ab99e7f21523f529976c65333368d42
refs/heads/master
2023-03-07T02:42:16.574874
2021-09-02T19:28:15
2021-09-02T19:28:15
96,781,112
7
5
Apache-2.0
2023-02-22T01:40:51
2017-07-10T13:33:02
Java
UTF-8
Java
false
false
4,362
java
/*-----------------------------------------------------------------------------' Copyright 2016 - InCadence Strategic Solutions Inc., All Rights Reserved Notwithstanding any contractor copyright notice, the Government has Unlimited Rights in this work as defined by DFARS 252.227-7013 and 252.227-7014. Use of this work other than as specifically authorized by these DFARS Clauses may violate Government rights in this work. DFARS Clause reference: 252.227-7013 (a)(16) and 252.227-7014 (a)(16) Unlimited Rights. The Government has the right to use, modify, reproduce, perform, display, release or disclose this computer software and to have or authorize others to do so. Distribution Statement D. Distribution authorized to the Department of Defense and U.S. DoD contractors only in support of U.S. DoD efforts. -----------------------------------------------------------------------------*/ package com.incadencecorp.coalesce.search.factory; import com.incadencecorp.coalesce.api.ICoalesceMapper; import com.incadencecorp.coalesce.common.exceptions.CoalesceException; import com.incadencecorp.coalesce.framework.datamodel.ECoalesceFieldDataTypes; import com.incadencecorp.coalesce.framework.util.CoalesceTemplateUtil; import com.incadencecorp.coalesce.mapper.impl.JavaMapperImpl; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.geometry.Geometry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; /** * This factory creates different feature types used by geo tools for searching. * * @author n78554 */ public class CoalesceFeatureTypeFactory { private static final Logger LOGGER = LoggerFactory.getLogger(CoalesceFeatureTypeFactory.class); public static SimpleFeatureType createSimpleFeatureType(Map<String, ECoalesceFieldDataTypes> fields) throws CoalesceException { return createSimpleFeatureType("coalesce", fields, null); } /** * @param fields * @return {@link SimpleFeatureType} created from the map of fields passed * in. * @throws CoalesceException */ public static SimpleFeatureType createSimpleFeatureType(String name, Map<String, ECoalesceFieldDataTypes> fields, ICoalesceMapper<Class<?>> mapper) throws CoalesceException { boolean hasGeometry = false; SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder(); builder.setName(name); if (mapper == null) { mapper = new JavaMapperImpl(); } // Create Content for (Map.Entry<String, ECoalesceFieldDataTypes> entry : fields.entrySet()) { Class<?> mappedType = mapper.map(entry.getValue()); if (mappedType != null) { builder.add(entry.getKey(), mappedType); if (LOGGER.isTraceEnabled()) { LOGGER.trace(entry.getKey() + " => " + mappedType.getName()); } if (!hasGeometry && Geometry.class.isAssignableFrom(mappedType)) { builder.setDefaultGeometry(entry.getKey()); hasGeometry = true; } } else { LOGGER.trace(entry.getKey() + "=> null (SKIPPING)"); } } if (LOGGER.isInfoEnabled()) { LOGGER.info("Created Feature ({}) w/ {} Fields (Default Geometry: {})", name, fields.size(), builder.getDefaultGeometry()); } return builder.buildFeatureType(); } /** * @return {@link SimpleFeatureType} created from templates that have been * registered with {@link CoalesceTemplateUtil}. * @throws CoalesceException * @see CoalesceTemplateUtil#addTemplates(com.incadencecorp.coalesce.framework.datamodel.CoalesceEntityTemplate...) * @see CoalesceTemplateUtil#addTemplates(com.incadencecorp.coalesce.framework.persistance.ICoalescePersistor) */ public static SimpleFeatureType createSimpleFeatureType() throws CoalesceException { return createSimpleFeatureType(CoalesceTemplateUtil.getDataTypes()); } }
[ "dclemenzi@incadencecorp.com" ]
dclemenzi@incadencecorp.com
c5b2fbd4bf7dc827e0902deda38d5a86f13f3982
e8b573e4b4a509cf8183701118709dc94f9044fb
/mdapp/src/main/java/com/friendtime/mdapp/adapter/RecyclerItemClickListener.java
44ef7e3041a87c8c0cb7313641fcd0f73de1e5f1
[]
no_license
misty-rain/ft-sdk
3a8c052f48264fea6c9d90f97da22001deb4c458
6b6ae78a90b11bfe18b7dcea1a80aed6f5126a43
refs/heads/master
2021-01-01T04:51:10.015992
2016-04-28T01:33:59
2016-04-28T01:33:59
57,260,453
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
package com.friendtime.mdapp.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; /** * Created by lgp on 2015/4/6. */ public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener { private OnItemClickListener mListener; public interface OnItemClickListener { public void onItemClick(View view, int position); } GestureDetector mGestureDetector; public RecyclerItemClickListener(Context context, OnItemClickListener listener) { mListener = listener; mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onSingleTapUp(MotionEvent e) { return true; } }); } @Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) { View childView = view.findChildViewUnder(e.getX(), e.getY()); if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) { mListener.onItemClick(childView, view.getChildPosition(childView)); return true; } return false; } @Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { } @Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } }
[ "taowu78@gmail.com" ]
taowu78@gmail.com