blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 28 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cdd6924bf0953fa20a9f4a645ad87ccdee1fbac0 | c99ef55f2235d72702ff4dc0691e70ef512e7a96 | /src/com/mctlab/ansight/common/util/L.java | ca5359df439a882c663702fae9f10a6d6f615a68 | [] | no_license | mctlab/salesd | a482a3e6d2171735d25fd7c05fc8399f62dd3601 | 3a77ec7fd63a129bc888b7d33443a66536101520 | refs/heads/master | 2020-04-25T18:07:06.762771 | 2014-07-14T17:03:47 | 2014-07-14T17:03:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,253 | java | package com.mctlab.ansight.common.util;
import android.util.Log;
import com.mctlab.ansight.common.constant.AsEmptyConst;
import com.mctlab.ansight.common.exception.NetworkNotAvailableException;
public class L {
public static void e(Object context, String msg, Object... args) {
e(context, String.format(msg, args));
}
public static void e(Object context, String msg) {
Log.e(contextName(context), msg);
}
public static void e(Object context, String msg, Throwable e) {
if (e != null) {
if (e instanceof NetworkNotAvailableException) {
w(context, msg, e);
return;
}
Log.e(contextName(context), msg, e);
} else {
e(context, msg);
}
}
public static void e(Object context, Throwable e) {
if (e != null) {
if (e instanceof NetworkNotAvailableException) {
w(context, e);
return;
}
Log.e(contextName(context), "", e);
}
}
public static void i(Object context, String msg) {
i(context, msg, null);
}
public static void i(Object context, Throwable e) {
i(context, AsEmptyConst.EMPTY_STRING, e);
}
public static void i(Object context, String msg, Throwable e) {
if (e == null) {
Log.i(contextName(context), msg);
} else {
Log.i(contextName(context), msg, e);
}
}
public static void d(Object context, String msg) {
Log.d(contextName(context), msg);
}
public static void d(Object context, Throwable e) {
Log.d(contextName(context), "", e);
}
public static void w(Object context, String msg) {
Log.w(contextName(context), msg);
}
public static void w(Object context, Throwable e) {
Log.w(contextName(context), "", e);
}
public static void w(Object context, String msg, Throwable e) {
Log.w(contextName(context), msg, e);
}
private static String contextName(Object context) {
String contextName = (context instanceof String) ? (String) context : context.getClass().getSimpleName();
return "ansight-log-" + contextName;
}
}
| [
"liqiang@fenbi.com"
] | liqiang@fenbi.com |
0a9a8ab9999f8c4f79502e0518e6b18458fb6e67 | 323ec86f5879098970454ffd3a94c8da647fd0d2 | /src/main/java/com/sankuai/nio/NonBlockServer.java | 44ec94c376df33b5ca4bb1c4622d53d1b6b3d2a9 | [] | no_license | crisfan/netty-reactor | 5381f9ba6011219b533eb8d5475c47588ec1f643 | ce7208f35fde7401c701394a5cc46030df5ac16e | refs/heads/master | 2022-07-20T06:08:04.370071 | 2021-06-03T15:52:04 | 2021-06-03T15:52:04 | 223,959,721 | 0 | 0 | null | 2022-07-07T22:11:14 | 2019-11-25T13:50:34 | Java | UTF-8 | Java | false | false | 1,383 | java | /**
* meituan.com Inc.
* Copyright (c) 2010-2019 All Rights Reserved.
*/
package com.sankuai.nio;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Objects;
/**
* <p>
* 非阻塞模式 (非多路复用模式)
* </p>
* @author fanyuhao
* @version :NonBlockServer.java v1.0 2019/12/16 下午7:31 fanyuhao Exp $
*/
public class NonBlockServer {
public static void main(String[] args) throws Exception{
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.bind(new InetSocketAddress(10086));
serverSocketChannel.configureBlocking(false);
SocketChannel socketChannel;
while (true){
socketChannel = serverSocketChannel.accept();
if(Objects.nonNull(socketChannel)){
socketChannel.configureBlocking(false);
System.out.println("new connection");
break;
}
System.out.println("waiting conn");
}
while (true){
ByteBuffer buffer = ByteBuffer.allocate(5);
if(socketChannel.read(buffer) == -1){
System.out.println("waiting for data");
continue;
}
System.out.println(buffer);
}
}
}
| [
"13558798397@163.com"
] | 13558798397@163.com |
7518ee64a01730a1ebc3f8f7f4ca8d65970477f7 | 25570b72527a67169856c574570bfc5dd88da850 | /net/suberic/util/swing/ThemeListener.java | fa30c2d1c67dc0e397499d947cbd3f204133fee1 | [] | no_license | JavaQualitasCorpus/pooka-3.0-080505 | c83ec4809435f49c8907752cc7103ec989056f41 | 871be6d1c1fa76d16020bdc4300ba06a8eb8264d | refs/heads/master | 2023-08-12T09:29:35.956486 | 2019-03-13T17:50:47 | 2019-03-13T17:50:47 | 167,005,052 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 267 | java | package net.suberic.util.swing;
/**
* An interface which allows classes to listen to changes to Themes.
*/
public interface ThemeListener {
/**
* Called when the specifics of a Theme change.
*/
public void themeChanged(ConfigurableMetalTheme theme);
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
18eb8c61af15b318ccb91142028af2a9f4181e7b | 124825172040ac22562fc8ab4e6401bd80e5ba09 | /Java/R 2 copy.java | efdaea3c48a4eb4c4cae672b1b6e88427585d7b0 | [] | no_license | nfgallimore/Software | 75e516cbc1f11de39147a5111cff33f2b718f641 | c12c2259dbd23e003554551f5529d7969260e07a | refs/heads/master | 2020-05-24T11:10:25.993491 | 2017-03-14T05:49:39 | 2017-03-14T05:49:39 | 84,850,472 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 151,589 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.virtualtheologies.helloandroid;
public final class R {
public static final class anim {
public static final int abc_fade_in=0x7f040000;
public static final int abc_fade_out=0x7f040001;
public static final int abc_slide_in_bottom=0x7f040002;
public static final int abc_slide_in_top=0x7f040003;
public static final int abc_slide_out_bottom=0x7f040004;
public static final int abc_slide_out_top=0x7f040005;
}
public static final class attr {
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarDivider=0x7f010000;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarItemBackground=0x7f010001;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionBarSize=0x7f010002;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarSplitStyle=0x7f010003;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarStyle=0x7f010004;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabBarStyle=0x7f010005;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabStyle=0x7f010006;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabTextStyle=0x7f010007;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarWidgetTheme=0x7f010008;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionButtonStyle=0x7f010009;
/** Default ActionBar dropdown style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionDropDownStyle=0x7f010062;
/**
An optional layout to be used as an action view.
See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionLayout=0x7f010059;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionMenuTextAppearance=0x7f01000a;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int actionMenuTextColor=0x7f01000b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeBackground=0x7f01000c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCloseButtonStyle=0x7f01000d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCloseDrawable=0x7f01000e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCopyDrawable=0x7f01000f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCutDrawable=0x7f010010;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeFindDrawable=0x7f010011;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModePasteDrawable=0x7f010012;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModePopupWindowStyle=0x7f010013;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeSelectAllDrawable=0x7f010014;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeShareDrawable=0x7f010015;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeSplitBackground=0x7f010016;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeStyle=0x7f010017;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeWebSearchDrawable=0x7f010018;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionOverflowButtonStyle=0x7f010019;
/**
The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.
See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionProviderClass=0x7f01005b;
/**
The name of an optional View class to instantiate and use as an
action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionViewClass=0x7f01005a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int activityChooserViewStyle=0x7f01001a;
/** Specifies a background drawable for the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int background=0x7f010047;
/** Specifies a background drawable for the bottom component of a split action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int backgroundSplit=0x7f010049;
/** Specifies a background drawable for a second stacked row of the action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int backgroundStacked=0x7f010048;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int buttonBarButtonStyle=0x7f01001b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int buttonBarStyle=0x7f01001c;
/** Specifies a layout for custom navigation. Overrides navigationMode.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int customNavigationLayout=0x7f01004a;
/**
Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int disableChildrenWhenDisabled=0x7f010061;
/** Options affecting how the action bar is displayed.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
*/
public static final int displayOptions=0x7f010040;
/** Specifies the drawable used for item dividers.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int divider=0x7f010046;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dividerHorizontal=0x7f01001d;
/** Size of padding on either end of a divider.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int dividerPadding=0x7f010057;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dividerVertical=0x7f01001e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dropDownListViewStyle=0x7f01001f;
/** The preferred item height for dropdown lists.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int dropdownListPreferredItemHeight=0x7f010063;
/**
The drawable to show in the button for expanding the activities overflow popup.
<strong>Note:</strong> Clients would like to set this drawable
as a clue about the action the chosen activity will perform. For
example, if share activity is to be chosen the drawable should
give a clue that sharing is to be performed.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int expandActivityOverflowButtonDrawable=0x7f010054;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int height=0x7f010020;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int homeAsUpIndicator=0x7f010021;
/** Specifies a layout to use for the "home" section of the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int homeLayout=0x7f01004b;
/** Specifies the drawable used for the application icon.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int icon=0x7f010044;
/**
The default state of the SearchView. If true, it will be iconified when not in
use and expanded when clicked.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int iconifiedByDefault=0x7f01005c;
/** Specifies a style resource to use for an indeterminate progress spinner.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int indeterminateProgressStyle=0x7f01004d;
/** The maximal number of items initially shown in the activity list.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int initialActivityCount=0x7f010053;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int isLightTheme=0x7f010022;
/**
Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int itemPadding=0x7f01004f;
/** Drawable used as a background for selected list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int listChoiceBackgroundIndicator=0x7f010067;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int listPopupWindowStyle=0x7f010023;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeight=0x7f010024;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeightLarge=0x7f010025;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeightSmall=0x7f010026;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemPaddingLeft=0x7f010027;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemPaddingRight=0x7f010028;
/** Specifies the drawable used for the application logo.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int logo=0x7f010045;
/** The type of navigation to use.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr>
<tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr>
</table>
*/
public static final int navigationMode=0x7f01003f;
/** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int paddingEnd=0x7f010069;
/** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int paddingStart=0x7f010068;
/** Default Panel Menu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int panelMenuListTheme=0x7f010066;
/** Default Panel Menu width.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int panelMenuListWidth=0x7f010065;
/** Default PopupMenu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int popupMenuStyle=0x7f010064;
/**
Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown". This layout must contain a TextView with the id
{@code @android:id/text1} to be populated with the prompt text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int popupPromptView=0x7f010060;
/** Specifies the horizontal padding on either end for an embedded progress bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int progressBarPadding=0x7f01004e;
/** Specifies a style resource to use for an embedded progress bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int progressBarStyle=0x7f01004c;
/** The prompt to display when the spinner's dialog is shown.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int prompt=0x7f01005e;
/** An optional query hint string to be displayed in the empty query field.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int queryHint=0x7f01005d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchDropdownBackground=0x7f010029;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int searchResultListItemHeight=0x7f01002a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewAutoCompleteTextView=0x7f01002b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewCloseIcon=0x7f01002c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewEditQuery=0x7f01002d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewEditQueryBackground=0x7f01002e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewGoIcon=0x7f01002f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewSearchIcon=0x7f010030;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewTextField=0x7f010031;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewTextFieldRight=0x7f010032;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewVoiceIcon=0x7f010033;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int selectableItemBackground=0x7f010034;
/** How this item should display in the Action Bar, if present.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td>
Never show this item in an action bar, show it in the overflow menu instead.
Mutually exclusive with "ifRoom" and "always".
</td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td>
Show this item in an action bar if there is room for it as determined
by the system. Favor this option over "always" where possible.
Mutually exclusive with "never" and "always".
</td></tr>
<tr><td><code>always</code></td><td>2</td><td>
Always show this item in an actionbar, even if it would override
the system's limits of how much stuff to put there. This may make
your action bar look bad on some screens. In most cases you should
use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never".
</td></tr>
<tr><td><code>withText</code></td><td>4</td><td>
When this item is shown as an action in the action bar, show a text
label with it even if it has an icon representation.
</td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td>
This item's action view collapses to a normal menu
item. When expanded, the action view takes over a
larger segment of its container.
</td></tr>
</table>
*/
public static final int showAsAction=0x7f010058;
/** Setting for which dividers to show.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
*/
public static final int showDividers=0x7f010056;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int spinnerDropDownItemStyle=0x7f010035;
/** Display mode for spinner options.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td>
Spinner options will be presented to the user as an inline dropdown
anchored to the spinner widget itself.
</td></tr>
</table>
*/
public static final int spinnerMode=0x7f01005f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int spinnerStyle=0x7f010036;
/** Specifies subtitle text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int subtitle=0x7f010041;
/** Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int subtitleTextStyle=0x7f010043;
/** Present the text in ALL CAPS. This may use a small-caps form when available.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
*/
public static final int textAllCaps=0x7f010055;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceLargePopupMenu=0x7f010037;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceListItem=0x7f010038;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceListItemSmall=0x7f010039;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSearchResultSubtitle=0x7f01003a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSearchResultTitle=0x7f01003b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSmallPopupMenu=0x7f01003c;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int textColorSearchUrl=0x7f01003d;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int title=0x7f01003e;
/** Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int titleTextStyle=0x7f010042;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowActionBar=0x7f010050;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowActionBarOverlay=0x7f010051;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowSplitActionBar=0x7f010052;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs_pre_jb=0x7f050000;
public static final int abc_action_bar_expanded_action_views_exclusive=0x7f050001;
public static final int abc_config_actionMenuItemAllCaps=0x7f050002;
public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f050003;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f050004;
public static final int abc_split_action_bar_is_narrow=0x7f050005;
}
public static final class color {
public static final int abc_search_url_text_holo=0x7f060003;
public static final int abc_search_url_text_normal=0x7f060000;
public static final int abc_search_url_text_pressed=0x7f060001;
public static final int abc_search_url_text_selected=0x7f060002;
}
public static final class dimen {
public static final int abc_action_bar_default_height=0x7f080000;
public static final int abc_action_bar_icon_vertical_padding=0x7f080001;
public static final int abc_action_bar_stacked_max_height=0x7f080002;
public static final int abc_action_bar_stacked_tab_max_width=0x7f080003;
public static final int abc_action_bar_subtitle_bottom_margin=0x7f080004;
public static final int abc_action_bar_subtitle_text_size=0x7f080005;
public static final int abc_action_bar_subtitle_top_margin=0x7f080006;
public static final int abc_action_bar_title_text_size=0x7f080007;
public static final int abc_action_button_min_width=0x7f080008;
public static final int abc_config_prefDialogWidth=0x7f080009;
public static final int abc_dropdownitem_icon_width=0x7f08000a;
public static final int abc_dropdownitem_text_padding_left=0x7f08000b;
public static final int abc_dropdownitem_text_padding_right=0x7f08000c;
public static final int abc_panel_menu_list_width=0x7f08000d;
public static final int abc_search_view_preferred_width=0x7f08000e;
public static final int abc_search_view_text_min_width=0x7f08000f;
public static final int activity_horizontal_margin=0x7f080010;
public static final int activity_vertical_margin=0x7f080011;
}
public static final class drawable {
public static final int abc_ab_bottom_solid_dark_holo=0x7f020000;
public static final int abc_ab_bottom_solid_light_holo=0x7f020001;
public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002;
public static final int abc_ab_bottom_transparent_light_holo=0x7f020003;
public static final int abc_ab_share_pack_holo_dark=0x7f020004;
public static final int abc_ab_share_pack_holo_light=0x7f020005;
public static final int abc_ab_solid_dark_holo=0x7f020006;
public static final int abc_ab_solid_light_holo=0x7f020007;
public static final int abc_ab_stacked_solid_dark_holo=0x7f020008;
public static final int abc_ab_stacked_solid_light_holo=0x7f020009;
public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a;
public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b;
public static final int abc_ab_transparent_dark_holo=0x7f02000c;
public static final int abc_ab_transparent_light_holo=0x7f02000d;
public static final int abc_cab_background_bottom_holo_dark=0x7f02000e;
public static final int abc_cab_background_bottom_holo_light=0x7f02000f;
public static final int abc_cab_background_top_holo_dark=0x7f020010;
public static final int abc_cab_background_top_holo_light=0x7f020011;
public static final int abc_ic_ab_back_holo_dark=0x7f020012;
public static final int abc_ic_ab_back_holo_light=0x7f020013;
public static final int abc_ic_cab_done_holo_dark=0x7f020014;
public static final int abc_ic_cab_done_holo_light=0x7f020015;
public static final int abc_ic_clear=0x7f020016;
public static final int abc_ic_clear_disabled=0x7f020017;
public static final int abc_ic_clear_holo_light=0x7f020018;
public static final int abc_ic_clear_normal=0x7f020019;
public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a;
public static final int abc_ic_clear_search_api_holo_light=0x7f02001b;
public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c;
public static final int abc_ic_commit_search_api_holo_light=0x7f02001d;
public static final int abc_ic_go=0x7f02001e;
public static final int abc_ic_go_search_api_holo_light=0x7f02001f;
public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020;
public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021;
public static final int abc_ic_menu_share_holo_dark=0x7f020022;
public static final int abc_ic_menu_share_holo_light=0x7f020023;
public static final int abc_ic_search=0x7f020024;
public static final int abc_ic_search_api_holo_light=0x7f020025;
public static final int abc_ic_voice_search=0x7f020026;
public static final int abc_ic_voice_search_api_holo_light=0x7f020027;
public static final int abc_item_background_holo_dark=0x7f020028;
public static final int abc_item_background_holo_light=0x7f020029;
public static final int abc_list_divider_holo_dark=0x7f02002a;
public static final int abc_list_divider_holo_light=0x7f02002b;
public static final int abc_list_focused_holo=0x7f02002c;
public static final int abc_list_longpressed_holo=0x7f02002d;
public static final int abc_list_pressed_holo_dark=0x7f02002e;
public static final int abc_list_pressed_holo_light=0x7f02002f;
public static final int abc_list_selector_background_transition_holo_dark=0x7f020030;
public static final int abc_list_selector_background_transition_holo_light=0x7f020031;
public static final int abc_list_selector_disabled_holo_dark=0x7f020032;
public static final int abc_list_selector_disabled_holo_light=0x7f020033;
public static final int abc_list_selector_holo_dark=0x7f020034;
public static final int abc_list_selector_holo_light=0x7f020035;
public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036;
public static final int abc_menu_dropdown_panel_holo_light=0x7f020037;
public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038;
public static final int abc_menu_hardkey_panel_holo_light=0x7f020039;
public static final int abc_search_dropdown_dark=0x7f02003a;
public static final int abc_search_dropdown_light=0x7f02003b;
public static final int abc_spinner_ab_default_holo_dark=0x7f02003c;
public static final int abc_spinner_ab_default_holo_light=0x7f02003d;
public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e;
public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f;
public static final int abc_spinner_ab_focused_holo_dark=0x7f020040;
public static final int abc_spinner_ab_focused_holo_light=0x7f020041;
public static final int abc_spinner_ab_holo_dark=0x7f020042;
public static final int abc_spinner_ab_holo_light=0x7f020043;
public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044;
public static final int abc_spinner_ab_pressed_holo_light=0x7f020045;
public static final int abc_tab_indicator_ab_holo=0x7f020046;
public static final int abc_tab_selected_focused_holo=0x7f020047;
public static final int abc_tab_selected_holo=0x7f020048;
public static final int abc_tab_selected_pressed_holo=0x7f020049;
public static final int abc_tab_unselected_pressed_holo=0x7f02004a;
public static final int abc_textfield_search_default_holo_dark=0x7f02004b;
public static final int abc_textfield_search_default_holo_light=0x7f02004c;
public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d;
public static final int abc_textfield_search_right_default_holo_light=0x7f02004e;
public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f;
public static final int abc_textfield_search_right_selected_holo_light=0x7f020050;
public static final int abc_textfield_search_selected_holo_dark=0x7f020051;
public static final int abc_textfield_search_selected_holo_light=0x7f020052;
public static final int abc_textfield_searchview_holo_dark=0x7f020053;
public static final int abc_textfield_searchview_holo_light=0x7f020054;
public static final int abc_textfield_searchview_right_holo_dark=0x7f020055;
public static final int abc_textfield_searchview_right_holo_light=0x7f020056;
public static final int ic_launcher=0x7f020057;
}
public static final class id {
public static final int action_bar=0x7f07001a;
public static final int action_bar_activity_content=0x7f070014;
public static final int action_bar_container=0x7f070019;
public static final int action_bar_overlay_layout=0x7f07001d;
public static final int action_bar_root=0x7f070018;
public static final int action_bar_subtitle=0x7f070021;
public static final int action_bar_title=0x7f070020;
public static final int action_context_bar=0x7f07001b;
public static final int action_menu_divider=0x7f070015;
public static final int action_menu_presenter=0x7f070016;
public static final int action_mode_bar=0x7f07002f;
public static final int action_mode_bar_stub=0x7f07002e;
public static final int action_mode_close_button=0x7f070022;
public static final int action_settings=0x7f070043;
public static final int activity_chooser_view_content=0x7f070023;
public static final int always=0x7f07000f;
public static final int beginning=0x7f07000a;
public static final int checkbox=0x7f07002b;
public static final int collapseActionView=0x7f070011;
public static final int container=0x7f070042;
public static final int default_activity_button=0x7f070026;
public static final int dialog=0x7f070012;
public static final int disableHome=0x7f070008;
public static final int dropdown=0x7f070013;
public static final int edit_query=0x7f070036;
public static final int end=0x7f07000c;
public static final int expand_activities_button=0x7f070024;
public static final int expanded_menu=0x7f07002a;
public static final int home=0x7f070017;
public static final int homeAsUp=0x7f070005;
public static final int icon=0x7f070028;
public static final int ifRoom=0x7f07000e;
public static final int image=0x7f070025;
public static final int left_icon=0x7f070031;
public static final int listMode=0x7f070001;
public static final int list_item=0x7f070027;
public static final int middle=0x7f07000b;
public static final int never=0x7f07000d;
public static final int none=0x7f070009;
public static final int normal=0x7f070000;
public static final int progress_circular=0x7f070034;
public static final int progress_horizontal=0x7f070035;
public static final int radio=0x7f07002d;
public static final int right_container=0x7f070032;
public static final int right_icon=0x7f070033;
public static final int search_badge=0x7f070038;
public static final int search_bar=0x7f070037;
public static final int search_button=0x7f070039;
public static final int search_close_btn=0x7f07003e;
public static final int search_edit_frame=0x7f07003a;
public static final int search_go_btn=0x7f070040;
public static final int search_mag_icon=0x7f07003b;
public static final int search_plate=0x7f07003c;
public static final int search_src_text=0x7f07003d;
public static final int search_voice_btn=0x7f070041;
public static final int shortcut=0x7f07002c;
public static final int showCustom=0x7f070007;
public static final int showHome=0x7f070004;
public static final int showTitle=0x7f070006;
public static final int split_action_bar=0x7f07001c;
public static final int submit_area=0x7f07003f;
public static final int tabMode=0x7f070002;
public static final int title=0x7f070029;
public static final int title_container=0x7f070030;
public static final int top_action_bar=0x7f07001e;
public static final int up=0x7f07001f;
public static final int useLogo=0x7f070003;
public static final int withText=0x7f070010;
}
public static final class integer {
public static final int abc_max_action_buttons=0x7f090000;
}
public static final class layout {
public static final int abc_action_bar_decor=0x7f030000;
public static final int abc_action_bar_decor_include=0x7f030001;
public static final int abc_action_bar_decor_overlay=0x7f030002;
public static final int abc_action_bar_home=0x7f030003;
public static final int abc_action_bar_tab=0x7f030004;
public static final int abc_action_bar_tabbar=0x7f030005;
public static final int abc_action_bar_title_item=0x7f030006;
public static final int abc_action_bar_view_list_nav_layout=0x7f030007;
public static final int abc_action_menu_item_layout=0x7f030008;
public static final int abc_action_menu_layout=0x7f030009;
public static final int abc_action_mode_bar=0x7f03000a;
public static final int abc_action_mode_close_item=0x7f03000b;
public static final int abc_activity_chooser_view=0x7f03000c;
public static final int abc_activity_chooser_view_include=0x7f03000d;
public static final int abc_activity_chooser_view_list_item=0x7f03000e;
public static final int abc_expanded_menu_layout=0x7f03000f;
public static final int abc_list_menu_item_checkbox=0x7f030010;
public static final int abc_list_menu_item_icon=0x7f030011;
public static final int abc_list_menu_item_layout=0x7f030012;
public static final int abc_list_menu_item_radio=0x7f030013;
public static final int abc_popup_menu_item_layout=0x7f030014;
public static final int abc_screen=0x7f030015;
public static final int abc_search_dropdown_item_icons_2line=0x7f030016;
public static final int abc_search_view=0x7f030017;
public static final int activity_main=0x7f030018;
public static final int fragment_main=0x7f030019;
public static final int support_simple_spinner_dropdown_item=0x7f03001a;
}
public static final class menu {
public static final int main=0x7f0c0000;
}
public static final class string {
public static final int abc_action_bar_home_description=0x7f0a0000;
public static final int abc_action_bar_up_description=0x7f0a0001;
public static final int abc_action_menu_overflow_description=0x7f0a0002;
public static final int abc_action_mode_done=0x7f0a0003;
public static final int abc_activity_chooser_view_see_all=0x7f0a0004;
public static final int abc_activitychooserview_choose_application=0x7f0a0005;
public static final int abc_searchview_description_clear=0x7f0a0006;
public static final int abc_searchview_description_query=0x7f0a0007;
public static final int abc_searchview_description_search=0x7f0a0008;
public static final int abc_searchview_description_submit=0x7f0a0009;
public static final int abc_searchview_description_voice=0x7f0a000a;
public static final int abc_shareactionprovider_share_with=0x7f0a000b;
public static final int abc_shareactionprovider_share_with_application=0x7f0a000c;
public static final int action_settings=0x7f0a000d;
public static final int app_name=0x7f0a000e;
public static final int hello_world=0x7f0a000f;
}
public static final class style {
/** Customize your theme here.
*/
public static final int AppTheme=0x7f0b0000;
public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0001;
public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f0b0002;
public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b0003;
public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b0004;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0005;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b0006;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b0007;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b0008;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b0009;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b000a;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b000b;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b000c;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b000d;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b000e;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b000f;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0010;
public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0011;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b0012;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0013;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0014;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0015;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0016;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b0017;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0018;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b0019;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001a;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b001b;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b001c;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b001d;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b001e;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b001f;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b0020;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0021;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b0022;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0023;
public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b0024;
public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0025;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b0026;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b0027;
public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0028;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0029;
public static final int Theme_AppCompat=0x7f0b002a;
public static final int Theme_AppCompat_Base_CompactMenu=0x7f0b002b;
public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b002c;
public static final int Theme_AppCompat_CompactMenu=0x7f0b002d;
public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f0b002e;
public static final int Theme_AppCompat_Light=0x7f0b002f;
public static final int Theme_AppCompat_Light_DarkActionBar=0x7f0b0030;
public static final int Theme_Base=0x7f0b0031;
public static final int Theme_Base_AppCompat=0x7f0b0032;
public static final int Theme_Base_AppCompat_Light=0x7f0b0033;
public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b0034;
public static final int Theme_Base_Light=0x7f0b0035;
public static final int Widget_AppCompat_ActionBar=0x7f0b0036;
public static final int Widget_AppCompat_ActionBar_Solid=0x7f0b0037;
public static final int Widget_AppCompat_ActionBar_TabBar=0x7f0b0038;
public static final int Widget_AppCompat_ActionBar_TabText=0x7f0b0039;
public static final int Widget_AppCompat_ActionBar_TabView=0x7f0b003a;
public static final int Widget_AppCompat_ActionButton=0x7f0b003b;
public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f0b003c;
public static final int Widget_AppCompat_ActionButton_Overflow=0x7f0b003d;
public static final int Widget_AppCompat_ActionMode=0x7f0b003e;
public static final int Widget_AppCompat_ActivityChooserView=0x7f0b003f;
public static final int Widget_AppCompat_AutoCompleteTextView=0x7f0b0040;
public static final int Widget_AppCompat_Base_ActionBar=0x7f0b0041;
public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b0042;
public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0043;
public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b0044;
public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0045;
public static final int Widget_AppCompat_Base_ActionButton=0x7f0b0046;
public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b0047;
public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0048;
public static final int Widget_AppCompat_Base_ActionMode=0x7f0b0049;
public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f0b004a;
public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b004b;
public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b004c;
public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f0b004d;
public static final int Widget_AppCompat_Base_ListView_Menu=0x7f0b004e;
public static final int Widget_AppCompat_Base_PopupMenu=0x7f0b004f;
public static final int Widget_AppCompat_Base_ProgressBar=0x7f0b0050;
public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0051;
public static final int Widget_AppCompat_Base_Spinner=0x7f0b0052;
public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0053;
public static final int Widget_AppCompat_Light_ActionBar=0x7f0b0054;
public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0055;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0056;
public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0057;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0058;
public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0059;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b005a;
public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b005b;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b005c;
public static final int Widget_AppCompat_Light_ActionButton=0x7f0b005d;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b005e;
public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b005f;
public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b0060;
public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0061;
public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0062;
public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f0b0063;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b0064;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b0065;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0066;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0067;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b0068;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b0069;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b006a;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b006b;
public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f0b006c;
public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b006d;
public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b006e;
public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b006f;
public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0070;
public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0071;
public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b0072;
public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b0073;
public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0074;
public static final int Widget_AppCompat_Light_Base_Spinner=0x7f0b0075;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0076;
public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0077;
public static final int Widget_AppCompat_Light_PopupMenu=0x7f0b0078;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0079;
public static final int Widget_AppCompat_ListView_DropDown=0x7f0b007a;
public static final int Widget_AppCompat_ListView_Menu=0x7f0b007b;
public static final int Widget_AppCompat_PopupMenu=0x7f0b007c;
public static final int Widget_AppCompat_ProgressBar=0x7f0b007d;
public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b007e;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b007f;
}
public static final class styleable {
/** Attributes that can be used with a ActionBar.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBar_background com.virtualtheologies.helloandroid:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit com.virtualtheologies.helloandroid:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundStacked com.virtualtheologies.helloandroid:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_customNavigationLayout com.virtualtheologies.helloandroid:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr>
<tr><td><code>{@link #ActionBar_displayOptions com.virtualtheologies.helloandroid:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr>
<tr><td><code>{@link #ActionBar_divider com.virtualtheologies.helloandroid:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr>
<tr><td><code>{@link #ActionBar_height com.virtualtheologies.helloandroid:height}</code></td><td> Specifies a fixed height.</td></tr>
<tr><td><code>{@link #ActionBar_homeLayout com.virtualtheologies.helloandroid:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_icon com.virtualtheologies.helloandroid:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.virtualtheologies.helloandroid:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr>
<tr><td><code>{@link #ActionBar_itemPadding com.virtualtheologies.helloandroid:itemPadding}</code></td><td>
Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.</td></tr>
<tr><td><code>{@link #ActionBar_logo com.virtualtheologies.helloandroid:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr>
<tr><td><code>{@link #ActionBar_navigationMode com.virtualtheologies.helloandroid:navigationMode}</code></td><td> The type of navigation to use.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding com.virtualtheologies.helloandroid:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle com.virtualtheologies.helloandroid:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_subtitle com.virtualtheologies.helloandroid:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle com.virtualtheologies.helloandroid:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionBar_title com.virtualtheologies.helloandroid:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle com.virtualtheologies.helloandroid:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table>
@see #ActionBar_background
@see #ActionBar_backgroundSplit
@see #ActionBar_backgroundStacked
@see #ActionBar_customNavigationLayout
@see #ActionBar_displayOptions
@see #ActionBar_divider
@see #ActionBar_height
@see #ActionBar_homeLayout
@see #ActionBar_icon
@see #ActionBar_indeterminateProgressStyle
@see #ActionBar_itemPadding
@see #ActionBar_logo
@see #ActionBar_navigationMode
@see #ActionBar_progressBarPadding
@see #ActionBar_progressBarStyle
@see #ActionBar_subtitle
@see #ActionBar_subtitleTextStyle
@see #ActionBar_title
@see #ActionBar_titleTextStyle
*/
public static final int[] ActionBar = {
0x7f010020, 0x7f01003e, 0x7f01003f, 0x7f010040,
0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044,
0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048,
0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c,
0x7f01004d, 0x7f01004e, 0x7f01004f
};
/**
<p>
@attr description
Specifies a background drawable for the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:background
*/
public static final int ActionBar_background = 10;
/**
<p>
@attr description
Specifies a background drawable for the bottom component of a split action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:backgroundSplit
*/
public static final int ActionBar_backgroundSplit = 12;
/**
<p>
@attr description
Specifies a background drawable for a second stacked row of the action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:backgroundStacked
*/
public static final int ActionBar_backgroundStacked = 11;
/**
<p>
@attr description
Specifies a layout for custom navigation. Overrides navigationMode.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:customNavigationLayout
*/
public static final int ActionBar_customNavigationLayout = 13;
/**
<p>
@attr description
Options affecting how the action bar is displayed.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:displayOptions
*/
public static final int ActionBar_displayOptions = 3;
/**
<p>
@attr description
Specifies the drawable used for item dividers.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:divider
*/
public static final int ActionBar_divider = 9;
/**
<p>
@attr description
Specifies a fixed height.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:height
*/
public static final int ActionBar_height = 0;
/**
<p>
@attr description
Specifies a layout to use for the "home" section of the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:homeLayout
*/
public static final int ActionBar_homeLayout = 14;
/**
<p>
@attr description
Specifies the drawable used for the application icon.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:icon
*/
public static final int ActionBar_icon = 7;
/**
<p>
@attr description
Specifies a style resource to use for an indeterminate progress spinner.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:indeterminateProgressStyle
*/
public static final int ActionBar_indeterminateProgressStyle = 16;
/**
<p>
@attr description
Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:itemPadding
*/
public static final int ActionBar_itemPadding = 18;
/**
<p>
@attr description
Specifies the drawable used for the application logo.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:logo
*/
public static final int ActionBar_logo = 8;
/**
<p>
@attr description
The type of navigation to use.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr>
<tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr>
</table>
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:navigationMode
*/
public static final int ActionBar_navigationMode = 2;
/**
<p>
@attr description
Specifies the horizontal padding on either end for an embedded progress bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:progressBarPadding
*/
public static final int ActionBar_progressBarPadding = 17;
/**
<p>
@attr description
Specifies a style resource to use for an embedded progress bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:progressBarStyle
*/
public static final int ActionBar_progressBarStyle = 15;
/**
<p>
@attr description
Specifies subtitle text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:subtitle
*/
public static final int ActionBar_subtitle = 4;
/**
<p>
@attr description
Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:subtitleTextStyle
*/
public static final int ActionBar_subtitleTextStyle = 6;
/**
<p>
@attr description
Specifies title text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:title
*/
public static final int ActionBar_title = 1;
/**
<p>
@attr description
Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:titleTextStyle
*/
public static final int ActionBar_titleTextStyle = 5;
/** Attributes that can be used with a ActionBarLayout.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr>
</table>
@see #ActionBarLayout_android_layout_gravity
*/
public static final int[] ActionBarLayout = {
0x010100b3
};
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_gravity}
attribute's value can be found in the {@link #ActionBarLayout} array.
@attr name android:layout_gravity
*/
public static final int ActionBarLayout_android_layout_gravity = 0;
/** Attributes that can be used with a ActionBarWindow.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBar com.virtualtheologies.helloandroid:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.virtualtheologies.helloandroid:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.virtualtheologies.helloandroid:windowSplitActionBar}</code></td><td></td></tr>
</table>
@see #ActionBarWindow_windowActionBar
@see #ActionBarWindow_windowActionBarOverlay
@see #ActionBarWindow_windowSplitActionBar
*/
public static final int[] ActionBarWindow = {
0x7f010050, 0x7f010051, 0x7f010052
};
/**
<p>This symbol is the offset where the {@link com.virtualtheologies.helloandroid.R.attr#windowActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.virtualtheologies.helloandroid:windowActionBar
*/
public static final int ActionBarWindow_windowActionBar = 0;
/**
<p>This symbol is the offset where the {@link com.virtualtheologies.helloandroid.R.attr#windowActionBarOverlay}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.virtualtheologies.helloandroid:windowActionBarOverlay
*/
public static final int ActionBarWindow_windowActionBarOverlay = 1;
/**
<p>This symbol is the offset where the {@link com.virtualtheologies.helloandroid.R.attr#windowSplitActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.virtualtheologies.helloandroid:windowSplitActionBar
*/
public static final int ActionBarWindow_windowSplitActionBar = 2;
/** Attributes that can be used with a ActionMenuItemView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr>
</table>
@see #ActionMenuItemView_android_minWidth
*/
public static final int[] ActionMenuItemView = {
0x0101013f
};
/**
<p>This symbol is the offset where the {@link android.R.attr#minWidth}
attribute's value can be found in the {@link #ActionMenuItemView} array.
@attr name android:minWidth
*/
public static final int ActionMenuItemView_android_minWidth = 0;
/** Size of padding on either end of a divider.
*/
public static final int[] ActionMenuView = {
};
/** Attributes that can be used with a ActionMode.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMode_background com.virtualtheologies.helloandroid:background}</code></td><td> Specifies a background for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit com.virtualtheologies.helloandroid:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_height com.virtualtheologies.helloandroid:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle com.virtualtheologies.helloandroid:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle com.virtualtheologies.helloandroid:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table>
@see #ActionMode_background
@see #ActionMode_backgroundSplit
@see #ActionMode_height
@see #ActionMode_subtitleTextStyle
@see #ActionMode_titleTextStyle
*/
public static final int[] ActionMode = {
0x7f010020, 0x7f010042, 0x7f010043, 0x7f010047,
0x7f010049
};
/**
<p>
@attr description
Specifies a background for the action mode bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:background
*/
public static final int ActionMode_background = 3;
/**
<p>
@attr description
Specifies a background for the split action mode bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:backgroundSplit
*/
public static final int ActionMode_backgroundSplit = 4;
/**
<p>
@attr description
Specifies a fixed height for the action mode bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:height
*/
public static final int ActionMode_height = 0;
/**
<p>
@attr description
Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:subtitleTextStyle
*/
public static final int ActionMode_subtitleTextStyle = 2;
/**
<p>
@attr description
Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:titleTextStyle
*/
public static final int ActionMode_titleTextStyle = 1;
/** Attributes that can be used with a ActivityChooserView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.virtualtheologies.helloandroid:expandActivityOverflowButtonDrawable}</code></td><td>
The drawable to show in the button for expanding the activities overflow popup.</td></tr>
<tr><td><code>{@link #ActivityChooserView_initialActivityCount com.virtualtheologies.helloandroid:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr>
</table>
@see #ActivityChooserView_expandActivityOverflowButtonDrawable
@see #ActivityChooserView_initialActivityCount
*/
public static final int[] ActivityChooserView = {
0x7f010053, 0x7f010054
};
/**
<p>
@attr description
The drawable to show in the button for expanding the activities overflow popup.
<strong>Note:</strong> Clients would like to set this drawable
as a clue about the action the chosen activity will perform. For
example, if share activity is to be chosen the drawable should
give a clue that sharing is to be performed.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:expandActivityOverflowButtonDrawable
*/
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
/**
<p>
@attr description
The maximal number of items initially shown in the activity list.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:initialActivityCount
*/
public static final int ActivityChooserView_initialActivityCount = 0;
/** Attributes that can be used with a CompatTextView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #CompatTextView_textAllCaps com.virtualtheologies.helloandroid:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr>
</table>
@see #CompatTextView_textAllCaps
*/
public static final int[] CompatTextView = {
0x7f010055
};
/**
<p>
@attr description
Present the text in ALL CAPS. This may use a small-caps form when available.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:textAllCaps
*/
public static final int CompatTextView_textAllCaps = 0;
/** Attributes that can be used with a LinearLayoutICS.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LinearLayoutICS_divider com.virtualtheologies.helloandroid:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_dividerPadding com.virtualtheologies.helloandroid:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_showDividers com.virtualtheologies.helloandroid:showDividers}</code></td><td> Setting for which dividers to show.</td></tr>
</table>
@see #LinearLayoutICS_divider
@see #LinearLayoutICS_dividerPadding
@see #LinearLayoutICS_showDividers
*/
public static final int[] LinearLayoutICS = {
0x7f010046, 0x7f010056, 0x7f010057
};
/**
<p>
@attr description
Drawable to use as a vertical divider between buttons.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:divider
*/
public static final int LinearLayoutICS_divider = 0;
/**
<p>
@attr description
Size of padding on either end of a divider.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:dividerPadding
*/
public static final int LinearLayoutICS_dividerPadding = 2;
/**
<p>
@attr description
Setting for which dividers to show.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:showDividers
*/
public static final int LinearLayoutICS_showDividers = 1;
/** Attributes that can be used with a MenuGroup.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr>
<tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr>
<tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td>
The category applied to all items within this group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td>
The order within the category applied to all items within this group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr>
</table>
@see #MenuGroup_android_checkableBehavior
@see #MenuGroup_android_enabled
@see #MenuGroup_android_id
@see #MenuGroup_android_menuCategory
@see #MenuGroup_android_orderInCategory
@see #MenuGroup_android_visible
*/
public static final int[] MenuGroup = {
0x0101000e, 0x010100d0, 0x01010194, 0x010101de,
0x010101df, 0x010101e0
};
/**
<p>
@attr description
Whether the items are capable of displaying a check mark.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checkableBehavior}.
@attr name android:checkableBehavior
*/
public static final int MenuGroup_android_checkableBehavior = 5;
/**
<p>
@attr description
Whether the items are enabled.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#enabled}.
@attr name android:enabled
*/
public static final int MenuGroup_android_enabled = 0;
/**
<p>
@attr description
The ID of the group.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#id}.
@attr name android:id
*/
public static final int MenuGroup_android_id = 1;
/**
<p>
@attr description
The category applied to all items within this group.
(This will be or'ed with the orderInCategory attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#menuCategory}.
@attr name android:menuCategory
*/
public static final int MenuGroup_android_menuCategory = 3;
/**
<p>
@attr description
The order within the category applied to all items within this group.
(This will be or'ed with the category attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#orderInCategory}.
@attr name android:orderInCategory
*/
public static final int MenuGroup_android_orderInCategory = 4;
/**
<p>
@attr description
Whether the items are shown/visible.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#visible}.
@attr name android:visible
*/
public static final int MenuGroup_android_visible = 2;
/** Attributes that can be used with a MenuItem.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuItem_actionLayout com.virtualtheologies.helloandroid:actionLayout}</code></td><td>
An optional layout to be used as an action view.</td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass com.virtualtheologies.helloandroid:actionProviderClass}</code></td><td>
The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.</td></tr>
<tr><td><code>{@link #MenuItem_actionViewClass com.virtualtheologies.helloandroid:actionViewClass}</code></td><td>
The name of an optional View class to instantiate and use as an
action view.</td></tr>
<tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td>
The alphabetic shortcut key.</td></tr>
<tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr>
<tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td>
Whether the item is checked.</td></tr>
<tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr>
<tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td>
The icon associated with this item.</td></tr>
<tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td>
The category applied to the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td>
The numeric shortcut key.</td></tr>
<tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td>
Name of a method on the Context used to inflate the menu that will be
called when the item is clicked.</td></tr>
<tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td>
The order within the category applied to the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td>
The condensed title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr>
<tr><td><code>{@link #MenuItem_showAsAction com.virtualtheologies.helloandroid:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr>
</table>
@see #MenuItem_actionLayout
@see #MenuItem_actionProviderClass
@see #MenuItem_actionViewClass
@see #MenuItem_android_alphabeticShortcut
@see #MenuItem_android_checkable
@see #MenuItem_android_checked
@see #MenuItem_android_enabled
@see #MenuItem_android_icon
@see #MenuItem_android_id
@see #MenuItem_android_menuCategory
@see #MenuItem_android_numericShortcut
@see #MenuItem_android_onClick
@see #MenuItem_android_orderInCategory
@see #MenuItem_android_title
@see #MenuItem_android_titleCondensed
@see #MenuItem_android_visible
@see #MenuItem_showAsAction
*/
public static final int[] MenuItem = {
0x01010002, 0x0101000e, 0x010100d0, 0x01010106,
0x01010194, 0x010101de, 0x010101df, 0x010101e1,
0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5,
0x0101026f, 0x7f010058, 0x7f010059, 0x7f01005a,
0x7f01005b
};
/**
<p>
@attr description
An optional layout to be used as an action view.
See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:actionLayout
*/
public static final int MenuItem_actionLayout = 14;
/**
<p>
@attr description
The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.
See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:actionProviderClass
*/
public static final int MenuItem_actionProviderClass = 16;
/**
<p>
@attr description
The name of an optional View class to instantiate and use as an
action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:actionViewClass
*/
public static final int MenuItem_actionViewClass = 15;
/**
<p>
@attr description
The alphabetic shortcut key. This is the shortcut when using a keyboard
with alphabetic keys.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#alphabeticShortcut}.
@attr name android:alphabeticShortcut
*/
public static final int MenuItem_android_alphabeticShortcut = 9;
/**
<p>
@attr description
Whether the item is capable of displaying a check mark.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checkable}.
@attr name android:checkable
*/
public static final int MenuItem_android_checkable = 11;
/**
<p>
@attr description
Whether the item is checked. Note that you must first have enabled checking with
the checkable attribute or else the check mark will not appear.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checked}.
@attr name android:checked
*/
public static final int MenuItem_android_checked = 3;
/**
<p>
@attr description
Whether the item is enabled.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#enabled}.
@attr name android:enabled
*/
public static final int MenuItem_android_enabled = 1;
/**
<p>
@attr description
The icon associated with this item. This icon will not always be shown, so
the title should be sufficient in describing this item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#icon}.
@attr name android:icon
*/
public static final int MenuItem_android_icon = 0;
/**
<p>
@attr description
The ID of the item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#id}.
@attr name android:id
*/
public static final int MenuItem_android_id = 2;
/**
<p>
@attr description
The category applied to the item.
(This will be or'ed with the orderInCategory attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#menuCategory}.
@attr name android:menuCategory
*/
public static final int MenuItem_android_menuCategory = 5;
/**
<p>
@attr description
The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key)
keyboard.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#numericShortcut}.
@attr name android:numericShortcut
*/
public static final int MenuItem_android_numericShortcut = 10;
/**
<p>
@attr description
Name of a method on the Context used to inflate the menu that will be
called when the item is clicked.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#onClick}.
@attr name android:onClick
*/
public static final int MenuItem_android_onClick = 12;
/**
<p>
@attr description
The order within the category applied to the item.
(This will be or'ed with the category attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#orderInCategory}.
@attr name android:orderInCategory
*/
public static final int MenuItem_android_orderInCategory = 6;
/**
<p>
@attr description
The title associated with the item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#title}.
@attr name android:title
*/
public static final int MenuItem_android_title = 7;
/**
<p>
@attr description
The condensed title associated with the item. This is used in situations where the
normal title may be too long to be displayed.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#titleCondensed}.
@attr name android:titleCondensed
*/
public static final int MenuItem_android_titleCondensed = 8;
/**
<p>
@attr description
Whether the item is shown/visible.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#visible}.
@attr name android:visible
*/
public static final int MenuItem_android_visible = 4;
/**
<p>
@attr description
How this item should display in the Action Bar, if present.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td>
Never show this item in an action bar, show it in the overflow menu instead.
Mutually exclusive with "ifRoom" and "always".
</td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td>
Show this item in an action bar if there is room for it as determined
by the system. Favor this option over "always" where possible.
Mutually exclusive with "never" and "always".
</td></tr>
<tr><td><code>always</code></td><td>2</td><td>
Always show this item in an actionbar, even if it would override
the system's limits of how much stuff to put there. This may make
your action bar look bad on some screens. In most cases you should
use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never".
</td></tr>
<tr><td><code>withText</code></td><td>4</td><td>
When this item is shown as an action in the action bar, show a text
label with it even if it has an icon representation.
</td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td>
This item's action view collapses to a normal menu
item. When expanded, the action view takes over a
larger segment of its container.
</td></tr>
</table>
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:showAsAction
*/
public static final int MenuItem_showAsAction = 13;
/** Attributes that can be used with a MenuView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr>
<tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr>
<tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr>
<tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr>
<tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr>
<tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr>
<tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr>
<tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr>
</table>
@see #MenuView_android_headerBackground
@see #MenuView_android_horizontalDivider
@see #MenuView_android_itemBackground
@see #MenuView_android_itemIconDisabledAlpha
@see #MenuView_android_itemTextAppearance
@see #MenuView_android_preserveIconSpacing
@see #MenuView_android_verticalDivider
@see #MenuView_android_windowAnimationStyle
*/
public static final int[] MenuView = {
0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e,
0x0101012f, 0x01010130, 0x01010131, 0x0101041a
};
/**
<p>
@attr description
Default background for the menu header.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#headerBackground}.
@attr name android:headerBackground
*/
public static final int MenuView_android_headerBackground = 4;
/**
<p>
@attr description
Default horizontal divider between rows of menu items.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#horizontalDivider}.
@attr name android:horizontalDivider
*/
public static final int MenuView_android_horizontalDivider = 2;
/**
<p>
@attr description
Default background for each menu item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemBackground}.
@attr name android:itemBackground
*/
public static final int MenuView_android_itemBackground = 5;
/**
<p>
@attr description
Default disabled icon alpha for each menu item that shows an icon.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemIconDisabledAlpha}.
@attr name android:itemIconDisabledAlpha
*/
public static final int MenuView_android_itemIconDisabledAlpha = 6;
/**
<p>
@attr description
Default appearance of menu item text.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemTextAppearance}.
@attr name android:itemTextAppearance
*/
public static final int MenuView_android_itemTextAppearance = 1;
/**
<p>
@attr description
Whether space should be reserved in layout when an icon is missing.
<p>This is a private symbol.
@attr name android:preserveIconSpacing
*/
public static final int MenuView_android_preserveIconSpacing = 7;
/**
<p>
@attr description
Default vertical divider between menu items.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#verticalDivider}.
@attr name android:verticalDivider
*/
public static final int MenuView_android_verticalDivider = 3;
/**
<p>
@attr description
Default animations for the menu.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#windowAnimationStyle}.
@attr name android:windowAnimationStyle
*/
public static final int MenuView_android_windowAnimationStyle = 0;
/** Attributes that can be used with a SearchView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_iconifiedByDefault com.virtualtheologies.helloandroid:iconifiedByDefault}</code></td><td>
The default state of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_queryHint com.virtualtheologies.helloandroid:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr>
</table>
@see #SearchView_android_imeOptions
@see #SearchView_android_inputType
@see #SearchView_android_maxWidth
@see #SearchView_iconifiedByDefault
@see #SearchView_queryHint
*/
public static final int[] SearchView = {
0x0101011f, 0x01010220, 0x01010264, 0x7f01005c,
0x7f01005d
};
/**
<p>
@attr description
The IME options to set on the query text field.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#imeOptions}.
@attr name android:imeOptions
*/
public static final int SearchView_android_imeOptions = 2;
/**
<p>
@attr description
The input type to set on the query text field.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#inputType}.
@attr name android:inputType
*/
public static final int SearchView_android_inputType = 1;
/**
<p>
@attr description
An optional maximum width of the SearchView.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#maxWidth}.
@attr name android:maxWidth
*/
public static final int SearchView_android_maxWidth = 0;
/**
<p>
@attr description
The default state of the SearchView. If true, it will be iconified when not in
use and expanded when clicked.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:iconifiedByDefault
*/
public static final int SearchView_iconifiedByDefault = 3;
/**
<p>
@attr description
An optional query hint string to be displayed in the empty query field.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:queryHint
*/
public static final int SearchView_queryHint = 4;
/** Attributes that can be used with a Spinner.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td>
Horizontal offset from the spinner widget for positioning the dropdown
in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td>
Vertical offset from the spinner widget for positioning the dropdown in
spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr>
<tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.virtualtheologies.helloandroid:disableChildrenWhenDisabled}</code></td><td>
Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.</td></tr>
<tr><td><code>{@link #Spinner_popupPromptView com.virtualtheologies.helloandroid:popupPromptView}</code></td><td>
Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_prompt com.virtualtheologies.helloandroid:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr>
<tr><td><code>{@link #Spinner_spinnerMode com.virtualtheologies.helloandroid:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr>
</table>
@see #Spinner_android_dropDownHorizontalOffset
@see #Spinner_android_dropDownSelector
@see #Spinner_android_dropDownVerticalOffset
@see #Spinner_android_dropDownWidth
@see #Spinner_android_gravity
@see #Spinner_android_popupBackground
@see #Spinner_disableChildrenWhenDisabled
@see #Spinner_popupPromptView
@see #Spinner_prompt
@see #Spinner_spinnerMode
*/
public static final int[] Spinner = {
0x010100af, 0x01010175, 0x01010176, 0x01010262,
0x010102ac, 0x010102ad, 0x7f01005e, 0x7f01005f,
0x7f010060, 0x7f010061
};
/**
<p>
@attr description
Horizontal offset from the spinner widget for positioning the dropdown
in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownHorizontalOffset}.
@attr name android:dropDownHorizontalOffset
*/
public static final int Spinner_android_dropDownHorizontalOffset = 4;
/**
<p>
@attr description
List selector to use for spinnerMode="dropdown" display.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownSelector}.
@attr name android:dropDownSelector
*/
public static final int Spinner_android_dropDownSelector = 1;
/**
<p>
@attr description
Vertical offset from the spinner widget for positioning the dropdown in
spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownVerticalOffset}.
@attr name android:dropDownVerticalOffset
*/
public static final int Spinner_android_dropDownVerticalOffset = 5;
/**
<p>
@attr description
Width of the dropdown in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownWidth}.
@attr name android:dropDownWidth
*/
public static final int Spinner_android_dropDownWidth = 3;
/**
<p>
@attr description
Gravity setting for positioning the currently selected item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#gravity}.
@attr name android:gravity
*/
public static final int Spinner_android_gravity = 0;
/**
<p>
@attr description
Background drawable to use for the dropdown in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#popupBackground}.
@attr name android:popupBackground
*/
public static final int Spinner_android_popupBackground = 2;
/**
<p>
@attr description
Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:disableChildrenWhenDisabled
*/
public static final int Spinner_disableChildrenWhenDisabled = 9;
/**
<p>
@attr description
Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown". This layout must contain a TextView with the id
{@code @android:id/text1} to be populated with the prompt text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:popupPromptView
*/
public static final int Spinner_popupPromptView = 8;
/**
<p>
@attr description
The prompt to display when the spinner's dialog is shown.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:prompt
*/
public static final int Spinner_prompt = 6;
/**
<p>
@attr description
Display mode for spinner options.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td>
Spinner options will be presented to the user as an inline dropdown
anchored to the spinner widget itself.
</td></tr>
</table>
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:spinnerMode
*/
public static final int Spinner_spinnerMode = 7;
/** Attributes that can be used with a Theme.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Theme_actionDropDownStyle com.virtualtheologies.helloandroid:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.virtualtheologies.helloandroid:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.virtualtheologies.helloandroid:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme com.virtualtheologies.helloandroid:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth com.virtualtheologies.helloandroid:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle com.virtualtheologies.helloandroid:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr>
</table>
@see #Theme_actionDropDownStyle
@see #Theme_dropdownListPreferredItemHeight
@see #Theme_listChoiceBackgroundIndicator
@see #Theme_panelMenuListTheme
@see #Theme_panelMenuListWidth
@see #Theme_popupMenuStyle
*/
public static final int[] Theme = {
0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065,
0x7f010066, 0x7f010067
};
/**
<p>
@attr description
Default ActionBar dropdown style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:actionDropDownStyle
*/
public static final int Theme_actionDropDownStyle = 0;
/**
<p>
@attr description
The preferred item height for dropdown lists.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:dropdownListPreferredItemHeight
*/
public static final int Theme_dropdownListPreferredItemHeight = 1;
/**
<p>
@attr description
Drawable used as a background for selected list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:listChoiceBackgroundIndicator
*/
public static final int Theme_listChoiceBackgroundIndicator = 5;
/**
<p>
@attr description
Default Panel Menu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:panelMenuListTheme
*/
public static final int Theme_panelMenuListTheme = 4;
/**
<p>
@attr description
Default Panel Menu width.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:panelMenuListWidth
*/
public static final int Theme_panelMenuListWidth = 3;
/**
<p>
@attr description
Default PopupMenu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:popupMenuStyle
*/
public static final int Theme_popupMenuStyle = 2;
/** Attributes that can be used with a View.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td>
Boolean that controls whether a view can take focus.</td></tr>
<tr><td><code>{@link #View_paddingEnd com.virtualtheologies.helloandroid:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr>
<tr><td><code>{@link #View_paddingStart com.virtualtheologies.helloandroid:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr>
</table>
@see #View_android_focusable
@see #View_paddingEnd
@see #View_paddingStart
*/
public static final int[] View = {
0x010100da, 0x7f010068, 0x7f010069
};
/**
<p>
@attr description
Boolean that controls whether a view can take focus. By default the user can not
move focus to a view; by setting this attribute to true the view is
allowed to take focus. This value does not impact the behavior of
directly calling {@link android.view.View#requestFocus}, which will
always request focus regardless of this view. It only impacts where
focus navigation will try to move focus.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#focusable}.
@attr name android:focusable
*/
public static final int View_android_focusable = 0;
/**
<p>
@attr description
Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:paddingEnd
*/
public static final int View_paddingEnd = 2;
/**
<p>
@attr description
Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.virtualtheologies.helloandroid:paddingStart
*/
public static final int View_paddingStart = 1;
};
}
| [
"nfg3@zips.uakron.edu"
] | nfg3@zips.uakron.edu |
8442465a3f49e299e91fd9b90a1e14d3a8d1a7c8 | 3cb192abee1ead79913d7c85769c23a5cfca4fcc | /semana02/src/com/jbgroup/poo/test/LibroTest.java | b9274408988ecb5fbc3f902b28817cc04843c480 | [] | no_license | caltamiranob/programacion-tester-04 | 49085c2292b2ea071597439e895f0ea57cf90481 | 207ef9ae3be5e2f63170c4f91b4f68fb7f80032f | refs/heads/master | 2022-07-23T15:53:04.512086 | 2019-09-06T03:24:08 | 2019-09-06T03:24:08 | 203,912,475 | 1 | 0 | null | 2022-06-21T01:48:10 | 2019-08-23T02:54:28 | Java | UTF-8 | Java | false | false | 356 | java | package com.jbgroup.poo.test;
import com.jbgroup.poo.Libro;
public class LibroTest {
public static void main(String[] args) {
Libro libro = new Libro();
libro.setIsbn("CODIGO001");
libro.setTitulo("Integración Continua");
libro.setAutor("Martin Fowler");
libro.setPaginas(390);
System.out.println(libro.toString());
}
}
| [
"micorreo"
] | micorreo |
f2dcf87d995ffc68b327eb41569b2ae7e38dca25 | cada108fe7eb04f03cb22ae6295d1f77f1bdde0b | /spring-dsl-jsonrpc/src/test/java/org/springframework/dsl/jsonrpc/codec/JsonRpcExtractorStrategiesTests.java | d2592c1e8b83559726e38ed86a897c93b26a7cdf | [
"Apache-2.0"
] | permissive | jvalkeal/spring-dsl-wip | 89ec1e93b73319db0a0ffe0498a0c368e971f46b | cc13c572921fecad8e29f7ffc8489e00b5e54d33 | refs/heads/master | 2021-04-15T08:27:48.916000 | 2018-11-04T13:31:05 | 2018-11-04T13:31:05 | 126,695,221 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,108 | java | /*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.dsl.jsonrpc.codec;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
public class JsonRpcExtractorStrategiesTests {
@Test
public void test1() {
JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.builder().build();
ObjectMapper objectMapper = strategies.objectMapper();
assertThat(objectMapper).isNotNull();
assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion())
.isEqualTo(JsonInclude.Include.USE_DEFAULTS);
}
@Test
public void test2() {
JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.withDefaults();
ObjectMapper objectMapper = strategies.objectMapper();
assertThat(objectMapper).isNotNull();
assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion())
.isEqualTo(JsonInclude.Include.USE_DEFAULTS);
}
@Test
public void test3() {
JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.builder()
.jackson(builder -> {
builder.serializationInclusion(JsonInclude.Include.NON_NULL);
})
.build();
ObjectMapper objectMapper = strategies.objectMapper();
assertThat(objectMapper).isNotNull();
assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion())
.isEqualTo(JsonInclude.Include.NON_NULL);
}
}
| [
"janne.valkealahti@gmail.com"
] | janne.valkealahti@gmail.com |
d4409fb4ed8a8c55778824abab46f02c2052be63 | 1c8d1430c704c304248a6040f29529dc9a90c481 | /com/javarush/test/level12/lesson02/task05/Solution.java | 8fb8e027267b02a57e192fa56a5fa96db005b57f | [] | no_license | Alexxxov/JavaRush | f44773e7282535e974a545129b87600cd1439c80 | b1c3a6901175a23a85accd9175182854100e7fee | refs/heads/master | 2021-05-01T23:51:46.188374 | 2017-01-24T20:02:54 | 2017-01-24T20:02:54 | 78,035,720 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,280 | java | package com.javarush.test.level12.lesson02.task05;
/* Или «Корова», или «Кит», или «Собака», или «Неизвестное животное»
Написать метод, который определяет, объект какого класса ему передали, и возвращает результат – одно значение из: «Корова», «Кит», «Собака», «Неизвестное животное».
*/
public class Solution
{
public static void main(String[] args)
{
System.out.println(getObjectType(new Cow()));
System.out.println(getObjectType(new Dog()));
System.out.println(getObjectType(new Whale()));
System.out.println(getObjectType(new Pig()));
}
public static String getObjectType(Object o)
{
if( o instanceof Cow)
return "Корова";
else if( o instanceof Dog)
return "Собака";
else if( o instanceof Whale)
return "Кит";
else
return "Неизвестное животное";
}
public static class Cow
{
}
public static class Dog
{
}
public static class Whale
{
}
public static class Pig
{
}
}
| [
"teufel100@rambler.ru"
] | teufel100@rambler.ru |
b11dc07ab0cd870686e34c5a1e520b43d982311d | a102150750ddf9f17f3e2f21ed55ebf7704815b8 | /src/calculator/Calculator.java | 1d289612380ab885069a53ff222e67049ad81593 | [] | no_license | Zornica/SwingTasks | c8f4ef49361d78c9721a73615114ca857e95ce62 | 99c1b759fba66b1da60b253d46139c1bdd030633 | refs/heads/master | 2016-08-12T08:42:13.444915 | 2015-06-25T15:05:03 | 2015-06-25T15:05:03 | 36,012,131 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,056 | java | package calculator;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* Created by Zornitsa Petkova on 5/19/15.
*/
public class Calculator extends JFrame implements ActionListener {
Panel thePanel;
NumberOfButton btn;
public Calculator() {
setSize(400, 400);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("Calculator");
thePanel = new Panel();
btn = new NumberOfButton(thePanel);
this.getContentPane().add(thePanel);
setVisible(true);
for (Buttons btn : thePanel.list) {
btn.button.addActionListener(this);
}
}
public void actionPerformed(ActionEvent e) {
if (btn.isNumber((JButton) e.getSource())) {
btn.onNumberPressed(((JButton) e.getSource()).getText());
} else if (btn.isOperation(((JButton) e.getSource()).getText())) {
btn.onOperationPressed();
} else if (btn.isClear((JButton) e.getSource())) {
btn.onClear();
} else {
btn.onEqualPressed();
}
}
}
| [
"zornicaewgeniewa@gmail.com"
] | zornicaewgeniewa@gmail.com |
e69146d6c2bc69a527224e0605acb5fbcaf358d1 | f127e391f98ab631f710d668b436664973b69708 | /1710.java | 29eb922c51edf7ec50bf3fb05f2b59a6285c89a6 | [] | no_license | dhanangw/algo-data-struct | 2adac2325f7cac3d03df31d45817652b1f653d5c | c27610df17b527cda4e4e28b9a277c5056dd686d | refs/heads/master | 2022-09-14T05:54:12.526301 | 2022-08-20T04:29:20 | 2022-08-20T04:29:20 | 239,143,683 | 0 | 0 | null | 2020-11-29T14:28:30 | 2020-02-08T14:16:23 | Java | UTF-8 | Java | false | false | 1,971 | java | /**
* Maximum Units on a Truck
*
* Example 1:
* Input: boxTypes = [[1,3],[2,2],[3,1]], truckSize = 4
* Output: 8
* Explanation: There are:
* - 1 box of the first type that contains 3 units.
* - 2 boxes of the second type that contain 2 units each.
* - 3 boxes of the third type that contain 1 unit each.
* You can take all the boxes of the first and second types, and one box of the third type.
* The total number of units will be = (1* 3) + (2 * 2) + (1 * 1) = 8.
*
* Example 2:
* Input: boxTypes = [[5,10],[2,5],[4,7],[3,9]], truckSize = 10
* Output: 9
*
*/
class Solution {
public int maximumUnits(int[][] boxTypes, int truckSize) {
int remainingCapacity = truckSize;
int maxUnits = 0;
// loop through boxTypes
for(int i = 0; i < boxTypes.length; ++i){
if (remainingCapacity > 0){
// get boxType with the maximum units. enter it to truck.
int largestBoxIndex = getLargestBox(boxTypes);
if (largestBoxIndex == -1){
break;
}
// get number of boxes that can be inserted to truck.
int numOfBox = Math.min(boxTypes[largestBoxIndex][0], remainingCapacity);
maxUnits += boxTypes[largestBoxIndex][1] * numOfBox;
// mark taken boxType from boxTypes to skip it in getLargestBox().
boxTypes[largestBoxIndex][1] = -1;
// get remaining truck capacity.
remainingCapacity -= numOfBox;
}
}
return maxUnits;
}
private int getLargestBox(int[][] boxTypes){
int maxUnit = -1;
int largestBoxIndex = -1;
for (int i = 0; i < boxTypes.length; ++i){
if (boxTypes[i][1] > maxUnit){
maxUnit = boxTypes[i][1];
largestBoxIndex = i;
}
}
return largestBoxIndex;
}
} | [
"wibisono.dhanang4@gmail.com"
] | wibisono.dhanang4@gmail.com |
eefdf1e34e4e879a7d65cf584971238c8f355944 | 99a15911a848676894f7cbae01d514d052f16043 | /ai-soccer/SimpleSoccer/src/SimpleSoccer/FieldPlayerStates/ReturnToHomeRegion.java | 8c4363dba71b0adbed7702ffae15eedbd4732cfd | [
"MIT"
] | permissive | algerd/ai | 13f2adb6a7c7eea27e64c23912186513a9dc8baf | 4fa0212d4fe30106b497fd4f9c44399866185b76 | refs/heads/master | 2021-01-11T10:16:28.198572 | 2016-11-01T15:49:14 | 2016-11-01T15:49:14 | 72,550,742 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,538 | java |
package SimpleSoccer.FieldPlayerStates;
import SimpleSoccer.Define;
import SimpleSoccer.FieldPlayer;
import common.Debug.DbgConsole;
import common.FSM.State;
import common.Game.Region;
import common.Messaging.Telegram;
public class ReturnToHomeRegion extends State<FieldPlayer> {
private static ReturnToHomeRegion instance = new ReturnToHomeRegion();
private ReturnToHomeRegion() {}
public static ReturnToHomeRegion getInstance() {
return instance;
}
@Override
public void enter(FieldPlayer player) {
player.getSteering().arriveOn();
if (!player.getHomeRegion().inside(player.getSteering().getTarget(), Region.halfsize)) {
player.getSteering().setTarget(player.getHomeRegion().center());
}
if (Define.def(Define.PLAYER_STATE_INFO_ON)) {
DbgConsole.debugConsole.print("Player ").print(player.getId()).print(" enters ReturnToHome state").print("");
}
}
@Override
public void execute(FieldPlayer player) {
if (player.getPitch().isGameOn()) {
//if the ball is nearer this player than any other team member &&
//there is not an assigned receiver && the goalkeeper does not gave
//the ball, go chase it
if (player.isClosestTeamMemberToBall()
&& (player.getTeam().getReceivingPlayer() == null)
&& !player.getPitch().getGoalKeeperHasBall()) {
player.getStateMachine().changeState(ChaseBall.getInstance());
return;
}
}
//if game is on and close enough to home, change state to wait and set the
//player target to his current position.(so that if he gets jostled out of
//position he can move back to it)
if (player.getPitch().isGameOn() && player.getHomeRegion().inside(player.getPosition(),
Region.halfsize)) {
player.getSteering().setTarget(player.getPosition());
player.getStateMachine().changeState(Wait.getInstance());
}
//if game is not on the player must return much closer to the center of his home region
else if (!player.getPitch().isGameOn() && player.isAtTarget()) {
player.getStateMachine().changeState(Wait.getInstance());
}
}
@Override
public void exit(FieldPlayer player) {
player.getSteering().arriveOff();
}
@Override
public boolean onMessage(FieldPlayer e, final Telegram t) {
return false;
}
}
| [
"algerd75@mail.ru"
] | algerd75@mail.ru |
79688d39382d18ffd333061e1ea2d6c973f363be | 55915e60ca6640a97fc4264f415e420cbadd669a | /Library_llj/src/com/common/library/llj/utils/PhoneUtilLj.java | 3ba13aa9fe955bd18ded6078d1b22e3182c3eb4c | [] | no_license | hubaokun/studentandroid | 6f25c77349ffc4932b096d81ea31520ebad91140 | 809fdf0b7f44698d56568e18f98dc9ebc9287737 | refs/heads/master | 2021-05-30T13:54:25.984374 | 2015-12-16T01:40:28 | 2015-12-16T01:40:28 | 40,222,250 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,000 | java | package com.common.library.llj.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PhoneUtilLj {
/**
* 1.手机号验证
*
* @param str
* @return 验证通过返回true
*/
public static boolean isMobile(String str) {
Pattern p = null;
Matcher m = null;
boolean b = false;
p = Pattern.compile("^[1][3,4,5,7,8][0-9]{9}$"); // 验证手机号
m = p.matcher(str);
b = m.matches();
return b;
}
/**
* 2.电话号码验证
*
* @param str
* @return 验证通过返回true
*/
public static boolean isPhone(String str) {
Pattern p1 = null, p2 = null;
Matcher m = null;
boolean b = false;
p1 = Pattern.compile("^[0][1-9]{2,3}-[0-9]{5,10}$"); // 验证带区号的
p2 = Pattern.compile("^[1-9]{1}[0-9]{5,8}$"); // 验证没有区号的
if (str.length() > 9) {
m = p1.matcher(str);
b = m.matches();
} else {
m = p2.matcher(str);
b = m.matches();
}
return b;
}
}
| [
"hubaokun@gmail.com"
] | hubaokun@gmail.com |
2e232f165f65c8797f7464f7ae313f6eb2362abf | 181e9094baed9d39a67c25ba990da6483b9e960f | /app/src/main/java/br/com/fbrandao/helper/ServicoHelper.java | 836f5abb203a67758c2b9ae894b2fe157a503990 | [] | no_license | devthiagoh/fBrandao_android_studio | f3462a0ec5b5b8661b6ea1369bcfebdbee3da6c5 | b8b7c2e4d28f8fe013e3b53b0467b8f1d4e9c019 | refs/heads/master | 2021-06-15T19:51:46.409013 | 2017-03-24T04:44:12 | 2017-03-24T04:44:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,460 | java | package br.com.fbrandao.helper;
import android.widget.EditText;
import com.fbrandao.R;
import br.com.fbrandao.activity.EditarServicoActivity;
import br.com.fbrandao.model.Servico;
/**
* Created by thiago_henrique on 20/03/2017.
*/
public class ServicoHelper {
private EditText campoNome;
private EditText campoEndereco;
private EditText campoTelefone;
private EditText campoSite;
private Servico servico;
public ServicoHelper(EditarServicoActivity activity) {
campoNome = (EditText) activity.findViewById(R.id.formulario_nome);
campoEndereco = (EditText) activity.findViewById(R.id.formulario_endereco);
campoTelefone = (EditText) activity.findViewById(R.id.formulario_telefone);
campoSite = (EditText) activity.findViewById(R.id.formulario_site);
servico = new Servico();
}
public Servico getServico() {
servico.setNome(campoNome.getText().toString());
servico.setEndereco(campoEndereco.getText().toString());
servico.setTelefone(campoTelefone.getText().toString());
servico.setSite(campoSite.getText().toString());
return servico;
}
public void preencheFormulario(Servico servico) {
campoNome.setText(servico.getNome());
campoEndereco.setText(servico.getEndereco());
campoTelefone.setText(servico.getTelefone());
campoSite.setText(servico.getSite());
this.servico = servico;
}
}
| [
"devthiagoh@gmail.com"
] | devthiagoh@gmail.com |
7923ab1f46c20b882fb09ae8adcf0fef87ed006a | 8e2b52e4fb955112ab784e62f7b036fbbe69cee4 | /pedidos/src/main/java/com/br/grifoo/pedidos/PedidosController.java | 617820cff45aae10ba6d67e4258b2480eb3478b3 | [] | no_license | raphaelInacio/bootstrap-microservices-netflix | 3e245afe64242f8af0a9b96dfa428a06766313d1 | 9bd4ca2b4496318aaa1fbe7f8894d8a20537b1cb | refs/heads/master | 2021-07-12T20:18:43.516147 | 2017-10-18T09:49:32 | 2017-10-18T09:49:32 | 107,388,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | package com.br.grifoo.pedidos;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/api/pedidos")
public class PedidosController {
@RequestMapping(method = RequestMethod.GET)
public String obterPedidos() {
return "pedidos";
}
}
| [
"contato.raphaelinacio@gmail.com"
] | contato.raphaelinacio@gmail.com |
20975269fddb961c069d83b010c90b5b98fc3059 | f06dabd345f78a4d408c1849a8cb3bcb03ecf6f2 | /src/Models/Television.java | 20ed011e3ee3f5bd928a3e8a6dc925840c518166 | [] | no_license | nesspire00/COMP1011-AS2 | 0025b942537fcd2a823e0f2940e99d64722f2bf9 | d7c3d130d192bad9ebdd5d0758276cfc17d889b8 | refs/heads/master | 2021-03-19T15:52:33.662774 | 2017-12-23T01:24:39 | 2017-12-23T01:24:39 | 113,915,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,248 | java | package Models;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.security.SecureRandom;
public abstract class Television {
private double storePrice;
private int screenSize, tvId;
private String modelNo, resolution, brand;
private panelType panelType;
private File tvImageFile;
public enum panelType {
CRT, OLED, PLASMA, LCD, LED, AMOLED;
}
public int getTvId() {
return tvId;
}
public void setTvId(int tvId) {
this.tvId = tvId;
}
/**
* Default constructor for Television object without an image.
*
* @param storePrice
* @param screenSize
* @param modelNo
* @param resolution
* @param brand
* @param panelType
*/
public Television(double storePrice, int screenSize, String modelNo, String resolution, String brand, panelType panelType, int tvId) {
setStorePrice(storePrice);
setScreenSize(screenSize);
setModelNo(modelNo);
setResolution(resolution);
setBrand(brand);
setPanelType(panelType);
setTvId(tvId);
}
public Television(double storePrice, int screenSize, String modelNo, String resolution, String brand, panelType panelType) {
setStorePrice(storePrice);
setScreenSize(screenSize);
setModelNo(modelNo);
setResolution(resolution);
setBrand(brand);
setPanelType(panelType);
}
/**
* Alternative constructor for Television object that can store an image.
*
* @param storePrice
* @param screenSize
* @param modelNo
* @param resolution
* @param brand
* @param panelType
* @param tvImageFile
*/
public Television(double storePrice, int screenSize, String modelNo, String resolution, String brand, panelType panelType, File tvImageFile) throws IOException {
setStorePrice(storePrice);
setScreenSize(screenSize);
setModelNo(modelNo);
setResolution(resolution);
setBrand(brand);
setPanelType(panelType);
this.tvImageFile = tvImageFile;
copyImageFile();
}
public double getStorePrice() {
return storePrice;
}
/**
* Checks that the price is not negative or 0
*
* @param storePrice
*/
public void setStorePrice(double storePrice) {
if (storePrice > 0) {
this.storePrice = storePrice;
} else {
throw new IllegalArgumentException("The store price cannot be negative or 0");
}
}
public int getScreenSize() {
return screenSize;
}
/**
* Checks if entered screen size is in range of 15-80"
*
* @param screenSize
*/
public void setScreenSize(int screenSize) {
if (screenSize >= 15 && screenSize <= 80) {
this.screenSize = screenSize;
} else {
throw new IllegalArgumentException("The screen size has to be in rage of 15 - 80");
}
}
public String getModelNo() {
return modelNo;
}
/**
* Checks that the modelNumber is not empty
*
* @param modelNo
*/
public void setModelNo(String modelNo) {
if (!modelNo.equals("")) {
this.modelNo = modelNo;
} else {
throw new IllegalArgumentException("The model number cannot be empty");
}
}
public String getResolution() {
return resolution;
}
/**
* Checks that the resolution is not empty.
*
* @param resolution
*/
public void setResolution(String resolution) {
if (!resolution.equals("")) {
this.resolution = resolution;
} else {
throw new IllegalArgumentException("The resolution cannot be empty");
}
}
public String getBrand() {
return brand;
}
/**
* Checks that the brand is not empty.
*
* @param brand
*/
public void setBrand(String brand) {
if (!brand.equals("")) {
this.brand = brand;
} else {
throw new IllegalArgumentException("The brand cannot be empty");
}
}
public Television.panelType getPanelType() {
return panelType;
}
public void setPanelType(Television.panelType panelType) {
this.panelType = panelType;
}
public File getTvImageFile() {
return tvImageFile;
}
public void setTvImageFile(File tvImageFile) {
this.tvImageFile = tvImageFile;
}
/**
* This method will copy the file specified to the images directory on this server and give it
* a unique name
*/
public void copyImageFile() throws IOException {
//create a new Path to copy the image into a local directory
Path sourcePath = tvImageFile.toPath();
String uniqueFileName = getUniqueFileName(tvImageFile.getName());
Path targetPath = Paths.get("./src/img/" + uniqueFileName);
//copy the file to the new directory
Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);
//update the imageFile to point to the new File
tvImageFile = new File(targetPath.toString());
}
/**
* This method will receive a String that represents a file name and return a
* String with a random, unique set of letters prefixed to it
*/
private String getUniqueFileName(String oldFileName) {
String newName;
//create a Random Number Generator
SecureRandom rng = new SecureRandom();
//loop until we have a unique file name
do {
newName = "";
//generate 32 random characters
for (int count = 1; count <= 32; count++) {
int nextChar;
do {
nextChar = rng.nextInt(123);
} while (!validCharacterValue(nextChar));
newName = String.format("%s%c", newName, nextChar);
}
newName += oldFileName;
} while (!uniqueFileInDirectory(newName));
return newName;
}
/**
* This method will search the images directory and ensure that the file name
* is unique
*/
public boolean uniqueFileInDirectory(String fileName) {
File directory = new File("./src/img/");
File[] dir_contents = directory.listFiles();
for (File file : dir_contents) {
if (file.getName().equals(fileName))
return false;
}
return true;
}
/**
* This method will validate if the integer given corresponds to a valid
* ASCII character that could be used in a file name
*/
public boolean validCharacterValue(int asciiValue) {
//0-9 = ASCII range 48 to 57
if (asciiValue >= 48 && asciiValue <= 57)
return true;
//A-Z = ASCII range 65 to 90
if (asciiValue >= 65 && asciiValue <= 90)
return true;
//a-z = ASCII range 97 to 122
if (asciiValue >= 97 && asciiValue <= 122)
return true;
return false;
}
}
| [
"nesspire00@gmail.com"
] | nesspire00@gmail.com |
c3c9967d063747ff43bf53627752ad67e7b41812 | cdbea8834f51ca5e87f6d5d174f96f60f147742d | /codenames-web-final/src/main/java/fr/codenames/controller/PartieController.java | 79ba850d5a235b1b5376dfe4c53e88aeb328ffaf | [] | no_license | DesrochesMichael/codenames | 4608049da2788ffcc0866ee9fd960b8310eefa21 | f1ca6d0375e4f679b61d851dadf229481594d243 | refs/heads/master | 2023-01-07T17:36:22.331110 | 2020-01-31T13:44:04 | 2020-01-31T13:44:04 | 229,028,948 | 0 | 0 | null | 2022-10-19T01:59:41 | 2019-12-19T10:16:30 | Java | UTF-8 | Java | false | false | 303 | java | package fr.codenames.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import fr.codenames.dao.IDAOPartie;
@RestController
public class PartieController {
@Autowired
IDAOPartie daopartie;
}
| [
"desroches.michael@orange.fr"
] | desroches.michael@orange.fr |
ac4145fd9740a94fb5c9899e4fd4674e7b0d75ad | 38bcb87ba0258dbdafd3dcd277b033874de6e3da | /product-store-v2/src/test/java/com/wipro/thiago/models/ProductTest.java | 440e2ae897964cea22a5e993ee4c086d44c78c7f | [] | no_license | ThiagoAnd/java-store-project-v2 | c97a228b9e4737f72add1e7aa37eaa5bad4b5689 | 78c312b710c06cf93f43ba6c62a8a45349e4c4a3 | refs/heads/main | 2023-03-29T04:50:59.635941 | 2021-03-31T19:37:31 | 2021-03-31T19:37:31 | 351,765,463 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 395 | java | package com.wipro.thiago.models;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class ProductTest {
@Test
void should_ReturnNotNull_When_InstantiateProduct(){
//given
Product product;
//when
product = new Product("Book of Java", 58.7, "Book of language Java", 1, null,null);
//then
assertNotNull(product);
}
}
| [
"thiago.1301801@fapi-pinhais.edu.br"
] | thiago.1301801@fapi-pinhais.edu.br |
a59c1e6c467c4aee99d8dd30452ef75fd9ced142 | 4e966d744116b7ede81574573f795ad1f3d089ae | /smart_ad_api/src/test/java/com/kobaco/smartab/dao/SAPMCScreenPermissionTest.java | 57097c3516a59c6be296e29c664a33ce182cf57b | [] | no_license | marchwind/eeze-project-eeze | 354bd8f876ecac3dc23e991c4bee0c57e0f420f7 | de7ec8a26d09cf17a88e172a57328857b2d0aa34 | refs/heads/master | 2021-01-10T19:33:45.831588 | 2015-04-13T09:04:25 | 2015-04-13T09:04:25 | 34,297,100 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,872 | java | package com.kobaco.smartab.dao;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.kobaco.smartad.dao.CommonDao;
import com.kobaco.smartad.model.data.SAPMCPermission;
import com.kobaco.smartad.model.data.SAPMCScreenManagement;
import com.kobaco.smartad.model.data.SAPMCScreenPermission;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/META-INF/root-context.xml" })
public class SAPMCScreenPermissionTest {
@Autowired
CommonDao<SAPMCScreenPermission> scanpermissionDao;
@Autowired
CommonDao<SAPMCPermission> permissionDao;
@Autowired
CommonDao<SAPMCScreenManagement> smanageDao;
@Before
public void setUp() throws Exception {
}
@Test
public void testList() {
SAPMCScreenPermission scanPermission = insertScanPermission();
scanPermission = insertScanPermission();
try{
List<SAPMCScreenPermission> scanPermissionList = scanpermissionDao.list(scanPermission);
assertTrue(scanPermissionList.size()>0);
} catch (Exception e) {
e.printStackTrace();
fail("error occur");
}
}
@Test
public void testInfo() {
SAPMCScreenPermission scanPermission = insertScanPermission();
try {
SAPMCScreenPermission scanPermissionSelect = scanpermissionDao.info(scanPermission);
assertTrue(scanPermissionSelect.getPMC_SCRN_NO()+"=="+scanPermission.getPMC_SCRN_NO(), scanPermissionSelect.getPMC_SCRN_NO().equals(scanPermission.getPMC_SCRN_NO()));
} catch (Exception e) {
e.printStackTrace();
fail("error occur");
}
}
@Test
public void testInsertScanPermission() {
insertScanPermission();
}
@Test
public void testUpdate() {
SAPMCScreenPermission scanPermission = insertScanPermission();
try {
int cnt = scanpermissionDao.update(scanPermission);
assertTrue(cnt==1);
} catch (Exception e) {
e.printStackTrace();
fail("error occur");
}
}
@Test
public void testDelete() {
SAPMCScreenPermission scanPermission = insertScanPermission();
try {
int cnt = scanpermissionDao.delete(scanPermission);
assertTrue(cnt==1);
} catch (Exception e) {
e.printStackTrace();
fail("error occur");
}
}
private SAPMCPermission insertPermission() {
SAPMCPermission common = TestUtils.initPMCPermission();
try {
permissionDao.insert(common);
assertTrue(common.getMNGR_PRMS_NO()!=null);
return common;
} catch(Exception e) {
e.printStackTrace();
fail("error occur");
return null;
}
}
private SAPMCScreenManagement insertSManagement() {
SAPMCScreenManagement common = TestUtils.initPMCScreenManagement();
try {
smanageDao.insert(common);
assertTrue(common.getPMC_SCRN_NO()!=null);
return common;
} catch(Exception e) {
e.printStackTrace();
fail("error occur");
return null;
}
}
private SAPMCScreenPermission insertScanPermission() {
SAPMCScreenManagement sMnagement = insertSManagement();
SAPMCPermission permission =insertPermission();
if( sMnagement == null || permission == null){
return null;
}
SAPMCScreenPermission scanPermission = TestUtils.initPMCScreenPermission(sMnagement.getPMC_SCRN_NO(), permission.getMNGR_PRMS_NO());
try {
scanpermissionDao.insert(scanPermission);
assertTrue(scanPermission.getPMC_SCRN_NO()!=null);
return scanPermission;
} catch(Exception e) {
e.printStackTrace();
fail("error occur");
return null;
}
}
}
| [
"marchwind75@gmail.com@a4a1ce3e-603b-a52d-a956-b3cd869ab90a"
] | marchwind75@gmail.com@a4a1ce3e-603b-a52d-a956-b3cd869ab90a |
c498e20bc1bc5bfbb0969147327bf6b5875c31b4 | 139b96e65688b2a8b09cab0b070a8f50a630f6ed | /Project/ebweb2019/src/main/java/vn/softdreams/ebweb/domain/IARegisterInvoice.java | 19fc4bb4b87ac8cfe994901b30559a4d989ace5a | [] | no_license | hoangpham1997/ChanDoi | 785945b93c11c0081888f45c93b57de7de5d45f7 | 2e62bf65b690ebbf36a7f14bdbdaedae4fe16b36 | refs/heads/master | 2022-09-14T08:08:58.914426 | 2020-07-06T15:10:18 | 2020-07-06T15:10:18 | 242,865,582 | 0 | 0 | null | 2022-09-01T23:29:37 | 2020-02-24T23:24:29 | Java | UTF-8 | Java | false | false | 5,582 | java | package vn.softdreams.ebweb.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.util.*;
/**
* A IARegisterInvoice.
*/
@Entity
@Table(name = "iaregisterinvoice")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class IARegisterInvoice implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@SequenceGenerator(name = "sequenceGenerator")
private UUID id;
@Column(name = "companyid")
private UUID companyID;
@Column(name = "typeid")
private Integer typeId;
@Column(name = "date")
private LocalDate date;
@Column(name = "no")
private String no;
@Column(name = "description")
private String description;
@Column(name = "signer")
private String signer;
@Column(name = "status")
private Integer status;
@Column(name = "attachfilename")
private String attachFileName;
@Column(name = "attachfilecontent")
private byte[] attachFileContent;
@OneToMany(cascade = {CascadeType.ALL}, orphanRemoval = true, fetch = FetchType.EAGER)
@JoinColumn(name = "iaregisterinvoiceid", nullable = false)
private Set<IARegisterInvoiceDetails> iaRegisterInvoiceDetails = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public UUID getCompanyID() {
return companyID;
}
public void setCompanyID(UUID companyID) {
this.companyID = companyID;
}
public Set<IARegisterInvoiceDetails> getIaRegisterInvoiceDetails() {
return iaRegisterInvoiceDetails;
}
public void setIaRegisterInvoiceDetails(Set<IARegisterInvoiceDetails> iaRegisterInvoiceDetail) {
this.iaRegisterInvoiceDetails = iaRegisterInvoiceDetail;
}
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public Integer getTypeId() {
return typeId;
}
public void setTypeId(Integer typeId) {
this.typeId = typeId;
}
public LocalDate getDate() {
return date;
}
public IARegisterInvoice date(LocalDate date) {
this.date = date;
return this;
}
public void setDate(LocalDate date) {
this.date = date;
}
public String getNo() {
return no;
}
public IARegisterInvoice no(String no) {
this.no = no;
return this;
}
public void setNo(String no) {
this.no = no;
}
public String getDescription() {
return description;
}
public IARegisterInvoice description(String description) {
this.description = description;
return this;
}
public void setDescription(String description) {
this.description = description;
}
public String getSigner() {
return signer;
}
public IARegisterInvoice signer(String signer) {
this.signer = signer;
return this;
}
public void setSigner(String signer) {
this.signer = signer;
}
public Integer getStatus() {
return status;
}
public IARegisterInvoice status(Integer status) {
this.status = status;
return this;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getAttachFileName() {
return attachFileName;
}
public IARegisterInvoice attachFileName(String attachFileName) {
this.attachFileName = attachFileName;
return this;
}
public void setAttachFileName(String attachFileName) {
this.attachFileName = attachFileName;
}
public byte[] getAttachFileContent() {
return attachFileContent;
}
public void setAttachFileContent(byte[] attachFileContent) {
this.attachFileContent = attachFileContent;
}
public void resetAttachFileContent() {
this.attachFileContent = new byte[]{};
}
public void setAttachFileContent(String attachFileContent) throws UnsupportedEncodingException {
this.attachFileContent = Base64.getDecoder().decode(attachFileContent.getBytes(StandardCharsets.UTF_8));
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IARegisterInvoice iARegisterInvoice = (IARegisterInvoice) o;
if (iARegisterInvoice.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), iARegisterInvoice.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "IARegisterInvoice{" +
"id=" + getId() +
", date='" + getDate() + "'" +
", no='" + getNo() + "'" +
", description='" + getDescription() + "'" +
", signer='" + getSigner() + "'" +
", status=" + getStatus() +
", attachFileName='" + getAttachFileName() + "'" +
", attachFileContent='" + getAttachFileContent() + "'" +
"}";
}
}
| [
"hoangpham28121997@gmail.com"
] | hoangpham28121997@gmail.com |
67b8f60b7541796c579d525e2e7a11e9e740e304 | 1c539f52d81dde9da63a0612e51e52837c1f6415 | /runscore-api/src/main/java/me/zohar/runscore/useraccount/param/UserAccountQueryCondParam.java | 1e616839416ce697d7230956c68259430b4acb54 | [] | no_license | cctvdupeng/tangtang | c535476f65ece771d91a78ab0a01cb5bee716eea | 3262d63b5d4e1b53391022297b57572c57e737d0 | refs/heads/master | 2022-04-07T19:45:24.689889 | 2020-03-04T10:10:23 | 2020-03-04T10:10:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package me.zohar.runscore.useraccount.param;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.zohar.runscore.common.param.PageParam;
@Data
@EqualsAndHashCode(callSuper=false)
public class UserAccountQueryCondParam extends PageParam {
/**
* 用户名
*/
private String userName;
/**
* 真实姓名
*/
private String realName;
/**
* 邀请人
*/
private String inviterUserName;
/**
* 账号类型
*/
private String accountType;
}
| [
"imwangbinvip@gmail.com"
] | imwangbinvip@gmail.com |
02456aac4fb7dbf0878c8b401c0d679f37a43eb9 | cfc31f467c7c3fd9cafdb18d1d5ee72f255441e5 | /core/src/com/mygdx/game/util/Config.java | d6a6160052eb7e49091f9642623c0371f2e75536 | [] | no_license | JordanBell/LiveLongerGame | 7d79c7587579ea117d698c9d0bb0bcec849efaa0 | 9178940670897181bcf7c37612121b98ccbce175 | refs/heads/master | 2021-01-12T06:40:01.112009 | 2017-05-13T08:49:10 | 2017-05-13T08:49:10 | 77,409,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 101 | java | package com.mygdx.game.util;
public class Config
{
public static final boolean m_bTurbo = false;
}
| [
"jbellmail@blueyonder.co.uk"
] | jbellmail@blueyonder.co.uk |
d4afa327d1280d3c0cc6e1a387c2145831a4d4bf | 250248c4dc4464295f2e478e0157408a0532b886 | /src/net/jcip/examples/ch08/PuzzleNode.java | 9d46b85de7a08468716120ef7c479839dc29c444 | [] | no_license | ncepuJelex/ConcurrentProgramming | 86a2be986f8b4f01e183af562ca515e769055e4e | a2eb12db34bfc32860a52188473b7f5fda6b2689 | refs/heads/master | 2020-06-10T03:31:26.360382 | 2017-11-27T12:19:30 | 2017-11-27T12:19:30 | 76,099,313 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package net.jcip.examples.ch08;
import java.util.LinkedList;
import java.util.List;
import net.jcip.annotations.Immutable;
/**
* 通过一些移动达到当前Position状态,
* 它代表移动中的某个状态,初始化时,move和prev都为null,
* 然后从这个状态开始去寻找方案。
* @author Jelex.xu
* @date 2017年8月22日
*/
@Immutable
public class PuzzleNode<P, M> {
final P pos;
final M move;
final PuzzleNode<P, M> prev;
public PuzzleNode(P pos, M move, PuzzleNode<P, M> prev) {
this.pos = pos;
this.move = move;
this.prev = prev;
}
/*
* 追本溯源
*/
List<M> asMoveList() {
List<M> solution = new LinkedList<M>();
for(PuzzleNode<P, M> n = this; n.move != null; n = n.prev) {
solution.add(0, n.move);
}
return solution;
}
}
| [
"1170366657@qq.com"
] | 1170366657@qq.com |
fc20ae122ba71bb40b0df7f60510c345fc98cc61 | 956e027703ef83b8dcf3020c6bf4b2d45c4c4e97 | /src/main/java/com/wisdom/common/datasource/DatabasePasswordCallback.java | f0d464fbb29e4c4d0ae2e4b87439c43203245dfe | [] | no_license | water-fu/ehelp | 79c04e654a81f3d7621bb18436bc02f85cb265eb | d328707412529273e6270a788f51ae841a4b0525 | refs/heads/master | 2021-01-19T11:31:27.299415 | 2016-04-16T01:47:46 | 2016-04-16T01:47:46 | 82,249,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,424 | java | package com.wisdom.common.datasource;
import javax.security.auth.callback.PasswordCallback;
import com.wisdom.common.encrypt.EncryptFactory;
import com.wisdom.web.common.constants.CommonConstant;
import com.wisdom.web.common.constants.SysParamDetailConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 加密数据库的密码,防止明文密码泄露.
*/
public class DatabasePasswordCallback extends PasswordCallback {
private static final Logger logger = LoggerFactory.getLogger(DatabasePasswordCallback.class);
private static final long serialVersionUID = 1L;
public DatabasePasswordCallback(String prompt, boolean echoOn) {
super(prompt, echoOn);
}
public DatabasePasswordCallback() {
super("DatabasePasswordCallback", true);
}
@Override
public void setPassword(char[] password) {
String pwd = EncryptFactory.getInstance(SysParamDetailConstant.AES).decodePassword(new String(password), CommonConstant.DB_SALT);
if(logger.isDebugEnabled()) {
logger.debug("decode the text is : " + pwd);
}
super.setPassword(pwd.toCharArray());
}
private static void passwordEncode() {
System.out.println(EncryptFactory.getInstance(SysParamDetailConstant.AES).encodePassword("root", CommonConstant.DB_SALT));
}
public static void main(String[] args) {
passwordEncode();
}
}
| [
"fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1"
] | fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1 |
894f7c50bac1090db5306775f5666e4500c51920 | 55c456cc31ab2bf49f51be3769e2a1cebde3f15a | /src/test/SysUserTest.java | b22cd28e7b695be33c8cff0ced0ee6d7bd4dd605 | [] | no_license | helloLiKun/mybatis | fc5575bf6d8671ca9628bef9e0abc55e9073f501 | 138577d02a819ac0ba7cbe63f876734fae8c8746 | refs/heads/master | 2021-05-12T17:29:51.316510 | 2018-01-11T06:55:43 | 2018-01-11T06:55:43 | 117,046,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,376 | java | package test;
import com.mybatis.cn.entity.SysUser;
import com.mybatis.cn.entity.User;
import com.mybatis.cn.mapper.MybaitsDao;
import com.mybatis.cn.mapper.SysUserMapper;
import com.mybatis.cn.mapper.SysUserMapperDao;
import org.junit.Test;
import java.util.List;
/**
* Created by liKun on 2018/1/11 0011.
*/
public class SysUserTest {
SysUserMapper sysUserMapper=new SysUserMapperDao();
@Test
public void getSqlSession(){
MybaitsDao mybaitsDao=new MybaitsDao();
System.out.println(mybaitsDao.getSqlSession()+"--------");
}
@Test
public void findAll(){
// List<SysUser> list=sysUserMapperDao.findAll();
//test resultMap
List<User> list=sysUserMapper.findAll1();
for(User user:list){
System.out.println("--user---:"+user);
}
}
@Test
public void findByid(){
SysUser sysUser=sysUserMapper.findById("3");
System.out.println(sysUser.getName());
}
@Test
public void save(){
SysUser sysUser=new SysUser();
sysUser.setId("4");
sysUser.setIdNum("444");
sysUser.setName("赵六");
sysUser.setPwd("666");
sysUser.setPhoneNum("666");
sysUserMapper.save(sysUser);
// sysUserMapper.update(sysUser);
}
@Test
public void delete(){
sysUserMapper.delete("4");
}
}
| [
"13923813589@163.com"
] | 13923813589@163.com |
6aba395ea4829949ace91c90da2706523605f7b9 | 067eafe5d622dad72fca28b6489c301b7ff4c052 | /app/src/main/java/com/desaco/localnetsocketserviceandclient/forth_cs/SocketOutputThread.java | 81024f199a7c112b7357643d00f1ae0e2ad678e6 | [] | no_license | desaco1989/LocalNetSocketServiceAndClient | 992ffd26a3c64ac92006a971e3136c9dc5695482 | d0b2dbf30fa17a975a7af3fe34d9a97cc815aa11 | refs/heads/master | 2020-03-16T02:35:12.984159 | 2018-07-13T07:04:34 | 2018-07-13T07:04:34 | 132,468,327 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,065 | java | package com.desaco.localnetsocketserviceandclient.forth_cs;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
/**
* 客户端写消息线程
*
* @author way
*/
public class SocketOutputThread extends Thread {
private boolean isStart = true;
private static String tag = "socketOutputThread";
private List<MsgEntity> sendMsgList;
public SocketOutputThread() {
sendMsgList = new CopyOnWriteArrayList<MsgEntity>();
}
public void setStart(boolean isStart) {
this.isStart = isStart;
synchronized (this) {
notify();
}
}
// 使用socket发送消息
public boolean sendMsg(byte[] msg) throws Exception {
if (msg == null) {
CLog.e(tag, "sendMsg is null");
return false;
}
try {
TCPClient.instance().sendMsg(msg);
} catch (Exception e) {
throw (e);
}
return true;
}
// 使用socket发送消息
public void addMsgToSendList(MsgEntity msg) {
synchronized (this) {
this.sendMsgList.add(msg);
notify();
}
}
@Override
public void run() {
while (isStart) {
// 锁发送list
synchronized (sendMsgList) {
// 发送消息
for (MsgEntity msg : sendMsgList) {
Handler handler = msg.getHandler();
try {
sendMsg(msg.getBytes());
sendMsgList.remove(msg);
// 成功消息,通过hander回传
if (handler != null) {
Message message = new Message();
message.obj = msg.getBytes();
message.what = 1;
handler.sendMessage(message);
// handler.sendEmptyMessage(1);
}
} catch (Exception e) {
e.printStackTrace();
CLog.e(tag, e.toString());
// 错误消息,通过hander回传
if (handler != null) {
Message message = new Message();
message.obj = msg.getBytes();
message.what = 0;
;
handler.sendMessage(message);
}
}
}
}
synchronized (this) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}// 发送完消息后,线程进入等待状态
}
}
}
}
| [
"dengwen@netwin.com"
] | dengwen@netwin.com |
ca225e92827bc33e102ec89b4226202083c1a42a | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/17/17_8e8b7f6ea51aa35ec226b51cfa7594b2fe231f1e/SqlServerSQLTranslator/17_8e8b7f6ea51aa35ec226b51cfa7594b2fe231f1e_SqlServerSQLTranslator_t.java | 42127c38a8e099c6ce0ac1ebb901e19226806c68 | [] | 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 | 3,037 | java | /*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
/*
*/
package org.teiid.connector.jdbc.sqlserver;
import java.util.Arrays;
import java.util.List;
import org.teiid.connector.api.ConnectorCapabilities;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.ExecutionContext;
import org.teiid.connector.api.TypeFacility;
import org.teiid.connector.jdbc.sybase.SybaseSQLTranslator;
import org.teiid.connector.language.IElement;
import org.teiid.connector.language.IFunction;
import org.teiid.connector.language.ILanguageObject;
import com.metamatrix.core.MetaMatrixRuntimeException;
/**
* Updated to assume the use of the DataDirect, 2005 driver, or later.
*/
public class SqlServerSQLTranslator extends SybaseSQLTranslator {
//TEIID-31 remove mod modifier for SQL Server 2008
@Override
protected List<Object> convertDateToString(IFunction function) {
return Arrays.asList("replace(convert(varchar, ", function.getParameters().get(0), ", 102), '.', '-')"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
protected List<?> convertTimestampToString(IFunction function) {
return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 21)"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
return SqlServerCapabilities.class;
}
@Override
public List<?> translate(ILanguageObject obj, ExecutionContext context) {
if (obj instanceof IElement) {
IElement elem = (IElement)obj;
try {
if (TypeFacility.RUNTIME_TYPES.STRING.equals(elem.getType()) && elem.getMetadataObject() != null && "uniqueidentifier".equalsIgnoreCase(elem.getMetadataObject().getNativeType())) { //$NON-NLS-1$
return Arrays.asList("cast(", elem, " as char(36))"); //$NON-NLS-1$ //$NON-NLS-2$
}
} catch (ConnectorException e) {
throw new MetaMatrixRuntimeException(e);
}
}
return super.translate(obj, context);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
f1178bc5ec11173a4c543046e87481b5406444e6 | e34a1a6085b319a6d8536e93d11fea6cbfb86303 | /src/address/gui/AddressBookApplicationGUI.java | 5012548c450121c4866ec324f6b5773c49dca14d | [] | no_license | CS401Group4/project2 | cd596fb744478796644490ceef701afd9eb1fa9b | 643a4a24c5776849c23109ea84deaa50f1b8403b | refs/heads/main | 2023-03-22T11:04:38.467874 | 2021-03-17T03:30:11 | 2021-03-17T03:30:11 | 339,252,719 | 1 | 1 | null | 2021-03-17T03:30:11 | 2021-02-16T01:17:49 | Java | UTF-8 | Java | false | false | 2,786 | java | package address.gui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* GUI class that creates the main Address Book application
*
* @author Tey Jon Sornet
* @since February 2021
* @version 1.0
*/
public class AddressBookApplicationGUI {
/**
* JFrame object which is the main parent container
*/
private JFrame frame;
/**
* ContactScrollPane object which holds the scrollpane and add, remove
* and update buttons
*/
protected static ContactScrollPane contactScrollPane = new ContactScrollPane();
/**
* FindEntryPanel object which holds the search field and results scrollpane
*/
protected static FindEntryPanel findEntryPanel = new FindEntryPanel();
/**
* JButton object for display button
*/
JButton btnDisplay;
/**
* JPanel object which holds the display button
*/
JPanel displayButtonField;
/**
* Launch the main application
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
// Create an AddressBookApplicationGUI instance and make it visible
AddressBookApplicationGUI window = new AddressBookApplicationGUI();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Constructor which creates the main application
*/
public AddressBookApplicationGUI() {
// Set up main frame component using BorderLayout
frame = new JFrame("Address Book");
frame.setLayout(new BorderLayout(20, 20));
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(780, 600);
// Create display button which will be in BorderLayout.NORTH
displayButtonField = new JPanel();
btnDisplay = new JButton("Display");
displayButtonField.add(btnDisplay);
frame.add(displayButtonField, BorderLayout.NORTH);
frame.add(contactScrollPane.contactScrollPanel, BorderLayout.CENTER);
frame.add(findEntryPanel.findPanel, BorderLayout.SOUTH);
// Event listener for Display button
btnDisplay.addActionListener(new ActionListener() {
// BASED ON event from hitting display button,
// Display contact list
public void actionPerformed(ActionEvent event) {
contactScrollPane.contactScrollPanel.setVisible(true);
findEntryPanel.findPanel.setVisible(true);
}
});
}
}
| [
"33141343+tj3407@users.noreply.github.com"
] | 33141343+tj3407@users.noreply.github.com |
69aab45a5aa5136afadcd85d3928ec6d0503401b | 351ee274adcd6f3a12c13a21d5f62c089fd4561c | /src/sorting/NumberOfDiscIntersections.java | 48b1f41716e5c9b93998cb70668d2eef83178fcc | [] | no_license | MateuszSedzimierz/codility-lessons | 612a6a3a55c06cf854ec9a69637a5555122740ad | 3f75c8c90da348cd5ff75dd3792c65bb02fdb1ac | refs/heads/master | 2023-03-07T11:22:03.620915 | 2021-02-25T15:42:32 | 2021-02-25T15:42:32 | 282,971,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,428 | java | package sorting;
import java.util.Arrays;
public class NumberOfDiscIntersections {
public static void main(String[] args) {
System.out.println(solution(new int[] {1, 5, 2, 1, 4, 0})); // 11
System.out.println(solution(new int[] {1, 2147483647, 0})); // 2
}
/**
* Score: 100%
*/
public static int solution(int[] A) {
int N = A.length;
long[] leftPoints = new long[N];
long[] rightPoints = new long[N];
for (int i = 0; i < N; i++) {
leftPoints[i] = (long) i - A[i];
rightPoints[i] = (long) i + A[i];
}
Arrays.sort(leftPoints);
Arrays.sort(rightPoints);
int intersectedPairs = 0;
int openCircles = 0;
int leftIndex = 0;
int rightIndex = 0;
while (leftIndex < N) {
if (leftPoints[leftIndex] <= rightPoints[rightIndex]) {
if ((intersectedPairs += openCircles) > 10_000_000)
return -1;
leftIndex++;
openCircles++;
} else {
rightIndex++;
openCircles--;
}
}
return intersectedPairs;
}
/**
* Score: 87%
*/
public static int solution2(int[] A) {
int N = A.length;
Segment[] segments = new Segment[N];
for (int i = 0; i < N; i++) {
segments[i] = new Segment((long) i - A[i], (long) i + A[i]);
}
Arrays.sort(segments);
int intersectedPairs = 0;
long rightMax;
for (int i = 0; i < N - 1; i++) {
rightMax = segments[i].y;
for (int j = i + 1; j < N && segments[j].x <= rightMax; j++)
intersectedPairs++;
if (intersectedPairs > 10_000_000)
return -1;
}
return intersectedPairs;
}
private static class Segment implements Comparable<Segment> {
long x;
long y;
public Segment(long x, long y) {
this.x = x;
this.y = y;
}
@Override
public int compareTo(Segment segment) {
if (x == segment.x) {
if (y < segment.y)
return 1;
else
return -1;
}
if (x > segment.x)
return 1;
else
return -1;
}
}
}
| [
"mateuszsiedlce@gmail.com"
] | mateuszsiedlce@gmail.com |
fa29ece14d7b23f6ec242daaefcf6221da1b592d | fb7f8ec7935d7c11ce8e77bc234fd2c6f51d9e2a | /src/main/java/com/codetreatise/Main.java | 7116128028c22caf855773dab25180d9b31af666 | [] | no_license | RamAlapure/JavaFXSpringBootIntegration | 90dec8bd3160c26994ed55233921cc366c2ce30b | c5036d7e31af2ccdbd0e3dda973cc921ecad9ad7 | refs/heads/master | 2021-01-21T08:15:10.165570 | 2017-03-01T14:42:01 | 2017-03-01T14:42:01 | 83,340,272 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,826 | java | package com.codetreatise;
import javafx.application.Application;
import javafx.stage.Stage;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import com.codetreatise.config.StageManager;
import com.codetreatise.view.FxmlView;
@SpringBootApplication
public class Main extends Application {
protected ConfigurableApplicationContext springContext;
protected StageManager stageManager;
public static void main(final String[] args) {
Application.launch(args);
}
@Override
public void init() throws Exception {
springContext = bootstrapSpringApplicationContext();
}
@Override
public void start(Stage stage) throws Exception {
stageManager = springContext.getBean(StageManager.class, stage);
displayInitialScene();
}
@Override
public void stop() throws Exception {
springContext.close();
}
/**
* Useful to override this method by sub-classes wishing to change the first
* Scene to be displayed on startup. Example: Functional tests on main
* window.
*/
protected void displayInitialScene() {
stageManager.switchScene(FxmlView.LOGIN);
}
/////////////////////////// PRIVATE ///////////////////////////////////////
private ConfigurableApplicationContext bootstrapSpringApplicationContext() {
SpringApplicationBuilder builder = new SpringApplicationBuilder(Main.class);
String[] args = getParameters().getRaw().stream().toArray(String[]::new);
builder.headless(false); //needed for TestFX integration testing or eles will get a java.awt.HeadlessException during tests
return builder.run(args);
}
}
| [
"alapureram@gmail.com"
] | alapureram@gmail.com |
18d4f051611b2135b2c69f3e880c0e18082e9fec | 18c8369f02e4c01013306413c9c748a8103e12a5 | /Android/app/src/main/java/com/millennialapps/musicum/lists/Carpetas.java | 7b6d9f104e6cf14c02255ffd079c0e9228a9c90c | [] | no_license | SweetMeSoft/Musicum | df316034fe2125b04b597bcab403bdb4760bc775 | 0487dad2cc27e06a42d498fd6253b222fbce5421 | refs/heads/master | 2023-07-06T12:02:53.111739 | 2020-07-28T15:41:54 | 2020-07-28T15:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,710 | java | package com.millennialapps.musicum.lists;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import com.millennialapps.musicum.R;
import com.millennialapps.musicum.common.ModificarVistas;
import com.millennialapps.musicum.common.Navegar;
import com.millennialapps.musicum.common.ObtenerArrays;
import com.millennialapps.musicum.common.ObtenerDatos;
import com.millennialapps.musicum.common.objects.Preferencias;
import com.millennialapps.musicum.lists.adaptadores.AdaptadorCarpetas;
/**
* Created by ErickSteven on 27/06/2015.
*/
public class Carpetas extends Fragment {
private RecyclerView rclrVwLista;
private RecyclerView.Adapter adaptador;
private RecyclerView.LayoutManager mLayoutManager;
private ProgressBar cargando;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_carpetas, container, false);
cargando = (ProgressBar) rootView.findViewById(R.id.loading_spinner);
rclrVwLista = (RecyclerView) rootView.findViewById(R.id.lista_carpetas);
rclrVwLista.setVisibility(View.GONE);
rclrVwLista.setHasFixedSize(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
ModificarVistas.sumarMargenes(rclrVwLista, 0, 0, 0, ObtenerDatos.alturaNavigationBar(getActivity()));
ModificarVistas.sumarMargenes(rclrVwLista, 0, ObtenerDatos.alturaStatusBar(getActivity()), 0, 0);
}
new CargarLista(getActivity()).execute("");
return rootView;
}
public class CargarLista extends AsyncTask<String, Void, Void> {
private final Activity activity;
public CargarLista(Activity activity) {
this.activity = activity;
}
@Override
protected Void doInBackground(String... params) {
mLayoutManager = new LinearLayoutManager(getActivity());
adaptador = new AdaptadorCarpetas(activity, ObtenerArrays.listaCarpetas(activity, Preferencias.obtenerValorRuta(getActivity())));
return null;
}
@Override
protected void onPostExecute(Void result) {
rclrVwLista.setLayoutManager(mLayoutManager);
rclrVwLista.setAdapter(adaptador);
Navegar.mostrarVista(activity, rclrVwLista, cargando);
}
}
}
| [
"erickvelasco11@gmail.com"
] | erickvelasco11@gmail.com |
ddbcf879ac3fe9efed69c0173aa8d00d7755cfdc | 8f072aa06f9d6d41e57a47967f134e1c859f8239 | /app/src/main/java/com/nick/bb/fitness/api/entity/decor/BaseData.java | 455fccbe734158bd2f098bd54480a72036a55b48 | [] | no_license | sharpayzara/Fitness | 3f401ce9fd135d18bcf9ecb8e3fb7d5d3651bc39 | e8cf69bf283a5bb8014f845afc762972fbffe7a7 | refs/heads/master | 2021-01-23T01:52:24.800235 | 2017-05-24T10:16:48 | 2017-05-24T10:16:48 | 85,943,872 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 331 | java | package com.nick.bb.fitness.api.entity.decor;
import java.io.Serializable;
/**
* Created by sharpay on 17-3-22.
*/
public class BaseData implements Serializable{
public boolean error;
@Override
public String toString() {
return "BaseData{" +
"error=" + error +
'}';
}
}
| [
"864064269@qq.com"
] | 864064269@qq.com |
18bda40f4d5847472cb56011b47ca18042564976 | cbea23d5e087a862edcf2383678d5df7b0caab67 | /aws-java-sdk-kafkaconnect/src/main/java/com/amazonaws/services/kafkaconnect/model/ScaleOutPolicyUpdate.java | 73c9fb725180c81bbfe3cc915fbe1854afc38577 | [
"Apache-2.0"
] | permissive | phambryan/aws-sdk-for-java | 66a614a8bfe4176bf57e2bd69f898eee5222bb59 | 0f75a8096efdb4831da8c6793390759d97a25019 | refs/heads/master | 2021-12-14T21:26:52.580137 | 2021-12-03T22:50:27 | 2021-12-03T22:50:27 | 4,263,342 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,930 | java | /*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.kafkaconnect.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
* <p>
* An update to the connector's scale-out policy.
* </p>
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/kafkaconnect-2021-09-14/ScaleOutPolicyUpdate" target="_top">AWS
* API Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ScaleOutPolicyUpdate implements Serializable, Cloneable, StructuredPojo {
/**
* <p>
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
* </p>
*/
private Integer cpuUtilizationPercentage;
/**
* <p>
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
* </p>
*
* @param cpuUtilizationPercentage
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
*/
public void setCpuUtilizationPercentage(Integer cpuUtilizationPercentage) {
this.cpuUtilizationPercentage = cpuUtilizationPercentage;
}
/**
* <p>
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
* </p>
*
* @return The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
*/
public Integer getCpuUtilizationPercentage() {
return this.cpuUtilizationPercentage;
}
/**
* <p>
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
* </p>
*
* @param cpuUtilizationPercentage
* The target CPU utilization percentage threshold at which you want connector scale out to be triggered.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScaleOutPolicyUpdate withCpuUtilizationPercentage(Integer cpuUtilizationPercentage) {
setCpuUtilizationPercentage(cpuUtilizationPercentage);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getCpuUtilizationPercentage() != null)
sb.append("CpuUtilizationPercentage: ").append(getCpuUtilizationPercentage());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ScaleOutPolicyUpdate == false)
return false;
ScaleOutPolicyUpdate other = (ScaleOutPolicyUpdate) obj;
if (other.getCpuUtilizationPercentage() == null ^ this.getCpuUtilizationPercentage() == null)
return false;
if (other.getCpuUtilizationPercentage() != null && other.getCpuUtilizationPercentage().equals(this.getCpuUtilizationPercentage()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCpuUtilizationPercentage() == null) ? 0 : getCpuUtilizationPercentage().hashCode());
return hashCode;
}
@Override
public ScaleOutPolicyUpdate clone() {
try {
return (ScaleOutPolicyUpdate) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.kafkaconnect.model.transform.ScaleOutPolicyUpdateMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
| [
""
] | |
24c1f0b31f7e4e212565b0320e09da21f8182966 | 01bd1029f218d65acb469ec684146e780d69e227 | /org.eclipse.epsilon.evl.engine.incremental.tinkerpop/src-gen/org/eclipse/epsilon/evl/incremental/trace/impl/InvariantTraceHasMessageGremlin.java | ef793e3fc8cb528346e3d6e71c181d6a0e182764 | [] | no_license | epsilonlabs/incremental-evl | e4a904166caf050d23848f7e36349aef89eb4f66 | a7df00c277644f6427534936fa99db18f3b5f09a | refs/heads/master | 2022-07-28T17:54:15.639191 | 2018-10-06T09:55:35 | 2018-10-06T09:55:35 | 36,311,545 | 2 | 0 | null | 2022-07-07T23:10:55 | 2015-05-26T17:17:00 | Java | UTF-8 | Java | false | false | 5,604 | java | /*******************************************************************************
* This file was automatically generated on: 2018-09-13.
* Only modify protected regions indicated by "/** **/"
*
* Copyright (c) 2017 The University of York.
* 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
*
******************************************************************************/
package org.eclipse.epsilon.evl.incremental.trace.impl;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.*;
import org.eclipse.epsilon.base.incremental.trace.util.TraceFactory;
import org.eclipse.epsilon.base.incremental.trace.util.GremlinWrapper;
import org.eclipse.epsilon.base.incremental.exceptions.TraceModelConflictRelation;
import org.eclipse.epsilon.evl.incremental.trace.IInvariantTrace;
import org.eclipse.epsilon.evl.incremental.trace.IMessageTrace;
import org.eclipse.epsilon.evl.incremental.trace.IInvariantTraceHasMessage;
import org.eclipse.epsilon.base.incremental.trace.impl.Feature;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
/**
* Implementation of IInvariantTraceHasMessage reference.
*/
public class InvariantTraceHasMessageGremlin extends Feature
implements IInvariantTraceHasMessage, GremlinWrapper<Edge> {
/** The graph traversal source for all navigations */
private GraphTraversalSource gts;
/** The source(s) of the reference */
protected IInvariantTrace source;
/** Factory used to wrap referenced elements */
protected final TraceFactory factory;
/** Fast access for single-valued references */
private Edge delegate;
/**
* Instantiates a new IInvariantTraceHasMessage.
*
* @param source the source of the reference
*/
public InvariantTraceHasMessageGremlin (
IInvariantTrace source,
GraphTraversalSource gts,
TraceFactory factory) {
super(true);
this.source = source;
this.gts = gts;
this.factory = factory;
}
// PUBLIC API
@Override
public IMessageTrace get() {
if (delegate == null) {
return null;
}
GraphTraversalSource g = startTraversal();
IMessageTrace result = null;
try {
Vertex to = g.E(delegate).outV().next();
result = (IMessageTrace) factory.createTraceElement(to, gts);
}
finally {
finishTraversal(g);
}
return result;
}
@Override
public boolean create(IMessageTrace target) throws TraceModelConflictRelation {
if (conflict(target)) {
if (related(target)) {
return true;
}
throw new TraceModelConflictRelation("Relation to previous IMessageTrace exists");
}
target.invariant().set(source);
set(target);
return true;
}
@Override
public boolean destroy(IMessageTrace target) {
if (!related(target)) {
return false;
}
target.invariant().remove(source);
remove(target);
return true;
}
@Override
public boolean conflict(IMessageTrace target) {
boolean result = false;
GraphTraversalSource g = startTraversal();
try {
result |= delegate == null ? g.V(source.getId()).out("message").hasNext() : g.E(delegate).outV().hasId(target.getId()).hasNext();
result |= target.invariant().get() != null;
}
finally {
finishTraversal(g);
}
return result;
}
@Override
public boolean related(IMessageTrace target) {
if (target == null) {
return false;
}
if (delegate == null) {
return false;
}
boolean result = false;
GraphTraversalSource g = startTraversal();
try {
result = g.E(delegate).outV().hasId(target.getId()).hasNext() && source.equals(target.invariant().get());
}
finally {
finishTraversal(g);
}
return result;
}
@Override
public Edge delegate() {
return delegate;
}
@Override
public void delegate(Edge delegate) {
this.delegate = delegate;
}
@Override
public void graphTraversalSource(GraphTraversalSource gts) {
this.gts = gts;
}
// PRIVATE API
@Override
public void set(IMessageTrace target) {
GraphTraversalSource g = startTraversal();
try {
delegate = g.V(source.getId()).addE("message").to(g.V(target.getId())).next();
} catch (Exception ex) {
throw ex;
} finally {
finishTraversal(g);
}
}
@Override
public void remove(IMessageTrace target) {
GraphTraversalSource g = startTraversal();
try {
g.E(delegate).drop();
delegate = null;
} catch (Exception ex) {
throw ex;
} finally {
finishTraversal(g);
}
}
private GraphTraversalSource startTraversal() {
return this.gts.clone();
}
private void finishTraversal(GraphTraversalSource g) {
try {
g.close();
} catch (Exception e) {
// Fail silently?
}
}
} | [
"arcanefoam@gmail.com"
] | arcanefoam@gmail.com |
bf253c6723b9fa6d865d544a6d980c080e045998 | d2bb2fdf9359c4bd846156d3ae3b74f295112ce1 | /app/src/main/java/com/ics/ar/matri/activity/editprofile/LifeStyleActivity.java | d9d1a69303c81966e389be8c17070478e0ab8236 | [] | no_license | NothingbutPro/Matrimony-master | 11ad18b24baeb4e532740dab2e93548f140a4da3 | 76c6cf93adf95e27a4ed57ab691e194adbc28a2b | refs/heads/master | 2020-09-04T07:13:43.465288 | 2019-08-12T10:22:43 | 2019-08-12T10:22:43 | 219,682,723 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,221 | java | package com.ics.ar.matri.activity.editprofile;
import android.app.Activity;
import android.content.Context;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.ics.ar.matri.Models.LoginDTO;
import com.ics.ar.matri.Models.UserDTO;
import com.ics.ar.matri.R;
import com.ics.ar.matri.SysApplication;
import com.ics.ar.matri.https.HttpsRequest;
import com.ics.ar.matri.interfaces.Consts;
import com.ics.ar.matri.interfaces.Helper;
import com.ics.ar.matri.interfaces.OnSpinerItemClick;
import com.ics.ar.matri.network.NetworkManager;
import com.ics.ar.matri.sharedprefrence.SharedPrefrence;
import com.ics.ar.matri.utils.ProjectUtils;
import com.ics.ar.matri.utils.SpinnerDialog;
import com.ics.ar.matri.view.CustomButton;
import com.ics.ar.matri.view.CustomEditText;
import org.json.JSONObject;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
public class LifeStyleActivity extends AppCompatActivity implements View.OnClickListener {
private String TAG = LifeStyleActivity.class.getSimpleName();
private Context mContext;
private CustomEditText etDietary, etDrink, etSmoking, etLanguage, etHobbies, etInterests;
private CustomButton btnSave;
private LinearLayout llBack;
private SysApplication sysApplication;
private SpinnerDialog spinnerDietary, spinnerDrink, spinnerSmoking, spinnerHobbies, spinnerInterests, spinnerLanguage;
private RelativeLayout RRsncbar;
private HashMap<String, String> parms = new HashMap<>();
private SharedPrefrence prefrence;
private UserDTO userDTO;
private LoginDTO loginDTO;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_life_style);
mContext = LifeStyleActivity.this;
prefrence = SharedPrefrence.getInstance(mContext);
userDTO = prefrence.getUserResponse(Consts.USER_DTO);
loginDTO = prefrence.getLoginResponse(Consts.LOGIN_DTO);
// parms.put(Consts.USER_ID, loginDTO.getData().getId());
parms.put(Consts.USER_ID, prefrence.getKEY_UID());
parms.put(Consts.TOKEN, loginDTO.getAccess_token());
sysApplication = SysApplication.getInstance(mContext);
setUiAction();
}
public void setUiAction() {
RRsncbar = findViewById(R.id.RRsncbar);
etDietary = findViewById(R.id.etDietary);
etDrink = findViewById(R.id.etDrink);
etSmoking = findViewById(R.id.etSmoking);
etLanguage = findViewById(R.id.etLanguage);
etHobbies = findViewById(R.id.etHobbies);
etInterests = findViewById(R.id.etInterests);
btnSave = findViewById(R.id.btnSave);
llBack = findViewById(R.id.llBack);
llBack.setOnClickListener(this);
btnSave.setOnClickListener(this);
etLanguage.setOnClickListener(this);
etInterests.setOnClickListener(this);
etHobbies.setOnClickListener(this);
etDietary.setOnClickListener(this);
etDrink.setOnClickListener(this);
etSmoking.setOnClickListener(this);
showData();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.llBack:
finish();
overridePendingTransition(R.anim.stay, R.anim.slide_down);
break;
case R.id.btnSave:
if (!validation(etDietary, getResources().getString(R.string.val_dietary))) {
return;
} else if (!validation(etDrink, getResources().getString(R.string.val_drink))) {
return;
} else if (!validation(etSmoking, getResources().getString(R.string.val_smoking))) {
return;
} else if (!validation(etLanguage, getResources().getString(R.string.val_language))) {
return;
} else if (!validation(etHobbies, getResources().getString(R.string.val_hobbies))) {
return;
} else if (!validation(etInterests, getResources().getString(R.string.val_interest))) {
return;
} else {
if (NetworkManager.isConnectToInternet(mContext)) {
request();
} else {
ProjectUtils.showToast(mContext, getResources().getString(R.string.internet_concation));
}
}
break;
case R.id.etLanguage:
spinnerLanguage.showSpinerDialogMultiple();
break;
case R.id.etHobbies:
spinnerHobbies.showSpinerDialogMultiple();
break;
case R.id.etInterests:
spinnerInterests.showSpinerDialogMultiple();
break;
case R.id.etDietary:
spinnerDietary.showSpinerDialog();
break;
case R.id.etSmoking:
spinnerSmoking.showSpinerDialog();
break;
case R.id.etDrink:
spinnerDrink.showSpinerDialog();
break;
}
}
private String splitName(String str) {
StringBuilder stringBuilder = new StringBuilder();
String replace = str.replace(" ", "").replace(",", ", ");
if (replace.contains(",")) {
if (replace.length() > 35) {
String[] split = str.split(",");
int length = split.length;
int length2 = split.length;
int i = 0;
int i2 = 0;
while (i < length2) {
String str2 = split[i];
if (str2.length() > 30 && stringBuilder.length() == 0) {
i = i2 + 1;
StringBuilder append = new StringBuilder().append(str2.substring(0, 30));
if (length - i > 0) {
replace = " + " + (length - i) + " more";
} else {
replace = "...";
}
return append.append(replace).toString();
} else if (stringBuilder.length() + str2.length() < 30) {
if (stringBuilder.length() == 0) {
stringBuilder.append(str2);
} else {
stringBuilder.append(", ").append(str2);
}
i2++;
i++;
} else {
return stringBuilder.toString() + (length - i2 > 0 ? " + " + (length - i2) + " more" : "");
}
}
}
return str.replace(",", ", ").toString();
} else if (str.length() > 38) {
return str.substring(0, 37) + "...";
} else {
return str;
}
}
public boolean validation(EditText editText, String msg) {
if (!ProjectUtils.isEditTextFilled(editText)) {
Snackbar snackbar = Snackbar.make(RRsncbar, msg, Snackbar.LENGTH_LONG);
View snackbarView = snackbar.getView();
snackbarView.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
snackbar.show();
return false;
} else {
return true;
}
}
@Override
public void onBackPressed() {
//super.onBackPressed();
finish();
overridePendingTransition(R.anim.stay, R.anim.slide_down);
}
public void request() {
ProjectUtils.showProgressDialog(mContext, true, getResources().getString(R.string.please_wait));
new HttpsRequest(Consts.UPDATE_PROFILE_API, parms, mContext).stringPost(TAG, new Helper() {
@Override
public void backResponse(boolean flag, String msg, JSONObject response) {
if (flag) {
finish();
overridePendingTransition(R.anim.stay, R.anim.slide_down);
} else {
ProjectUtils.showToast(mContext, msg);
}
}
});
}
public void showData() {
etDietary.setText(userDTO.getDietary());
etDrink.setText(userDTO.getDrinking());
etSmoking.setText(userDTO.getSmoking());
etLanguage.setText(userDTO.getLanguage());
etHobbies.setText(userDTO.getHobbies());
etInterests.setText(userDTO.getInterests());
for (int j = 0; j < sysApplication.getDietary().size(); j++) {
if (sysApplication.getDietary().get(j).getName().equalsIgnoreCase(userDTO.getDietary())) {
sysApplication.getDietary().get(j).setSelected(true);
}
}
spinnerDietary = new SpinnerDialog((Activity) mContext, sysApplication.getDietary(), getResources().getString(R.string.select_dietary), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerDietary.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etDietary.setText(item);
parms.put(Consts.DIETARY, item);
}
});
for (int j = 0; j < sysApplication.getHabitsDrink().size(); j++) {
if (sysApplication.getHabitsDrink().get(j).getName().equalsIgnoreCase(userDTO.getDrinking())) {
sysApplication.getHabitsDrink().get(j).setSelected(true);
}
}
spinnerDrink = new SpinnerDialog((Activity) mContext, sysApplication.getHabitsDrink(), getResources().getString(R.string.select_drink), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerDrink.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etDrink.setText(item);
parms.put(Consts.DRINKING, item);
}
});
for (int j = 0; j < sysApplication.getHabitsSmok().size(); j++) {
if (sysApplication.getHabitsSmok().get(j).getName().equalsIgnoreCase(userDTO.getSmoking())) {
sysApplication.getHabitsSmok().get(j).setSelected(true);
}
}
spinnerSmoking = new SpinnerDialog((Activity) mContext, sysApplication.getHabitsSmok(), getResources().getString(R.string.select_smoking), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerSmoking.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etSmoking.setText(item);
parms.put(Consts.SMOKING, item);
}
});
List<String> items = Arrays.asList(userDTO.getHobbies().split("\\s*,\\s*"));
for (int i = 0; i < items.size(); i++) {
items.get(i);
for (int j = 0; j < sysApplication.getHobbiesList().size(); j++) {
if (sysApplication.getHobbiesList().get(j).getName().equalsIgnoreCase(items.get(i))) {
sysApplication.getHobbiesList().get(j).setSelected(true);
}
}
}
spinnerHobbies = new SpinnerDialog((Activity) mContext, sysApplication.getHobbiesList(), getResources().getString(R.string.select_hobbies), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerHobbies.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etHobbies.setText(splitName(item));
parms.put(Consts.HOBBIES, item);
}
});
List<String> interests = Arrays.asList(userDTO.getInterests().split("\\s*,\\s*"));
for (int i = 0; i < interests.size(); i++) {
interests.get(i);
for (int j = 0; j < sysApplication.getInterestsList().size(); j++) {
if (sysApplication.getInterestsList().get(j).getName().equalsIgnoreCase(interests.get(i))) {
sysApplication.getInterestsList().get(j).setSelected(true);
}
}
}
spinnerInterests = new SpinnerDialog((Activity) mContext, sysApplication.getInterestsList(), getResources().getString(R.string.select_intersts), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerInterests.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etInterests.setText(splitName(item));
parms.put(Consts.INTERESTS, item);
}
});
List<String> language = Arrays.asList(userDTO.getLanguage().split("\\s*,\\s*"));
for (int i = 0; i < language.size(); i++) {
language.get(i);
for (int j = 0; j < sysApplication.getLanguage().size(); j++) {
if (sysApplication.getLanguage().get(j).getName().equalsIgnoreCase(language.get(i))) {
sysApplication.getLanguage().get(j).setSelected(true);
}
}
}
spinnerLanguage = new SpinnerDialog((Activity) mContext, sysApplication.getLanguage(), getResources().getString(R.string.select_language), R.style.DialogAnimations_SmileWindow, getResources().getString(R.string.close));// With Animation
spinnerLanguage.bindOnSpinerListener(new OnSpinerItemClick() {
@Override
public void onClick(String item, String id, int position) {
etLanguage.setText(splitName(item));
parms.put(Consts.LANGUAGE, item);
}
});
}
}
| [
"sshahsheetal94@gmail.com"
] | sshahsheetal94@gmail.com |
846cd406986103a34ac52deaf89b9ed0bef68749 | 7d186309dfb11980c69cb454153b39c8c63ef781 | /app/src/main/java/pe/beyond/zxing/datamatrix/decoder/BitMatrixParser.java | 774ebc97ea1c3251a4df0cb28c6173ecbfed6214 | [] | no_license | luiskanaes/lac | bb518a0beade603e54eebcd7f84e03b4804293ea | e2641b2051fecdaed2892956adfd5c646c460cde | refs/heads/master | 2021-01-22T05:57:36.167983 | 2015-02-17T02:33:20 | 2015-02-17T02:33:20 | 30,887,612 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,663 | java | /*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pe.beyond.zxing.datamatrix.decoder;
import pe.beyond.zxing.FormatException;
import pe.beyond.zxing.common.BitMatrix;
/**
* @author bbrown@google.com (Brian Brown)
*/
final class BitMatrixParser {
private final BitMatrix mappingBitMatrix;
private final BitMatrix readMappingMatrix;
private final Version version;
/**
* @param bitMatrix {@link BitMatrix} to parse
* @throws FormatException if dimension is < 8 or > 144 or not 0 mod 2
*/
BitMatrixParser(BitMatrix bitMatrix) throws FormatException {
int dimension = bitMatrix.getHeight();
if (dimension < 8 || dimension > 144 || (dimension & 0x01) != 0) {
throw FormatException.getFormatInstance();
}
version = readVersion(bitMatrix);
this.mappingBitMatrix = extractDataRegion(bitMatrix);
this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getWidth(), this.mappingBitMatrix.getHeight());
}
Version getVersion() {
return version;
}
/**
* <p>Creates the version object based on the dimension of the original bit matrix from
* the datamatrix code.</p>
*
* <p>See ISO 16022:2006 Table 7 - ECC 200 symbol attributes</p>
*
* @param bitMatrix Original {@link BitMatrix} including alignment patterns
* @return {@link Version} encapsulating the Data Matrix Code's "version"
* @throws FormatException if the dimensions of the mapping matrix are not valid
* Data Matrix dimensions.
*/
private static Version readVersion(BitMatrix bitMatrix) throws FormatException {
int numRows = bitMatrix.getHeight();
int numColumns = bitMatrix.getWidth();
return Version.getVersionForDimensions(numRows, numColumns);
}
/**
* <p>Reads the bits in the {@link BitMatrix} representing the mapping matrix (No alignment patterns)
* in the correct order in order to reconstitute the codewords bytes contained within the
* Data Matrix Code.</p>
*
* @return bytes encoded within the Data Matrix Code
* @throws FormatException if the exact number of bytes expected is not read
*/
byte[] readCodewords() throws FormatException {
byte[] result = new byte[version.getTotalCodewords()];
int resultOffset = 0;
int row = 4;
int column = 0;
int numRows = mappingBitMatrix.getHeight();
int numColumns = mappingBitMatrix.getWidth();
boolean corner1Read = false;
boolean corner2Read = false;
boolean corner3Read = false;
boolean corner4Read = false;
// Read all of the codewords
do {
// Check the four corner cases
if ((row == numRows) && (column == 0) && !corner1Read) {
result[resultOffset++] = (byte) readCorner1(numRows, numColumns);
row -= 2;
column +=2;
corner1Read = true;
} else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x03) != 0) && !corner2Read) {
result[resultOffset++] = (byte) readCorner2(numRows, numColumns);
row -= 2;
column +=2;
corner2Read = true;
} else if ((row == numRows+4) && (column == 2) && ((numColumns & 0x07) == 0) && !corner3Read) {
result[resultOffset++] = (byte) readCorner3(numRows, numColumns);
row -= 2;
column +=2;
corner3Read = true;
} else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x07) == 4) && !corner4Read) {
result[resultOffset++] = (byte) readCorner4(numRows, numColumns);
row -= 2;
column +=2;
corner4Read = true;
} else {
// Sweep upward diagonally to the right
do {
if ((row < numRows) && (column >= 0) && !readMappingMatrix.get(column, row)) {
result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns);
}
row -= 2;
column +=2;
} while ((row >= 0) && (column < numColumns));
row += 1;
column +=3;
// Sweep downward diagonally to the left
do {
if ((row >= 0) && (column < numColumns) && !readMappingMatrix.get(column, row)) {
result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns);
}
row += 2;
column -=2;
} while ((row < numRows) && (column >= 0));
row += 3;
column +=1;
}
} while ((row < numRows) || (column < numColumns));
if (resultOffset != version.getTotalCodewords()) {
throw FormatException.getFormatInstance();
}
return result;
}
/**
* <p>Reads a bit of the mapping matrix accounting for boundary wrapping.</p>
*
* @param row Row to read in the mapping matrix
* @param column Column to read in the mapping matrix
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return value of the given bit in the mapping matrix
*/
boolean readModule(int row, int column, int numRows, int numColumns) {
// Adjust the row and column indices based on boundary wrapping
if (row < 0) {
row += numRows;
column += 4 - ((numRows + 4) & 0x07);
}
if (column < 0) {
column += numColumns;
row += 4 - ((numColumns + 4) & 0x07);
}
readMappingMatrix.set(column, row);
return mappingBitMatrix.get(column, row);
}
/**
* <p>Reads the 8 bits of the standard Utah-shaped pattern.</p>
*
* <p>See ISO 16022:2006, 5.8.1 Figure 6</p>
*
* @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern
* @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return byte from the utah shape
*/
int readUtah(int row, int column, int numRows, int numColumns) {
int currentByte = 0;
if (readModule(row - 2, column - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row - 2, column - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row - 1, column - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row - 1, column - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row - 1, column, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row, column - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row, column - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(row, column, numRows, numColumns)) {
currentByte |= 1;
}
return currentByte;
}
/**
* <p>Reads the 8 bits of the special corner condition 1.</p>
*
* <p>See ISO 16022:2006, Figure F.3</p>
*
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return byte from the Corner condition 1
*/
int readCorner1(int numRows, int numColumns) {
int currentByte = 0;
if (readModule(numRows - 1, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 1, 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 1, 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(2, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(3, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
return currentByte;
}
/**
* <p>Reads the 8 bits of the special corner condition 2.</p>
*
* <p>See ISO 16022:2006, Figure F.4</p>
*
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return byte from the Corner condition 2
*/
int readCorner2(int numRows, int numColumns) {
int currentByte = 0;
if (readModule(numRows - 3, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 2, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 1, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 4, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 3, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
return currentByte;
}
/**
* <p>Reads the 8 bits of the special corner condition 3.</p>
*
* <p>See ISO 16022:2006, Figure F.5</p>
*
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return byte from the Corner condition 3
*/
int readCorner3(int numRows, int numColumns) {
int currentByte = 0;
if (readModule(numRows - 1, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 1, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 3, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 3, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
return currentByte;
}
/**
* <p>Reads the 8 bits of the special corner condition 4.</p>
*
* <p>See ISO 16022:2006, Figure F.6</p>
*
* @param numRows Number of rows in the mapping matrix
* @param numColumns Number of columns in the mapping matrix
* @return byte from the Corner condition 4
*/
int readCorner4(int numRows, int numColumns) {
int currentByte = 0;
if (readModule(numRows - 3, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 2, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(numRows - 1, 0, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 2, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(0, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(1, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(2, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
currentByte <<= 1;
if (readModule(3, numColumns - 1, numRows, numColumns)) {
currentByte |= 1;
}
return currentByte;
}
/**
* <p>Extracts the data region from a {@link BitMatrix} that contains
* alignment patterns.</p>
*
* @param bitMatrix Original {@link BitMatrix} with alignment patterns
* @return BitMatrix that has the alignment patterns removed
*/
BitMatrix extractDataRegion(BitMatrix bitMatrix) {
int symbolSizeRows = version.getSymbolSizeRows();
int symbolSizeColumns = version.getSymbolSizeColumns();
if (bitMatrix.getHeight() != symbolSizeRows) {
throw new IllegalArgumentException("Dimension of bitMarix must match the version size");
}
int dataRegionSizeRows = version.getDataRegionSizeRows();
int dataRegionSizeColumns = version.getDataRegionSizeColumns();
int numDataRegionsRow = symbolSizeRows / dataRegionSizeRows;
int numDataRegionsColumn = symbolSizeColumns / dataRegionSizeColumns;
int sizeDataRegionRow = numDataRegionsRow * dataRegionSizeRows;
int sizeDataRegionColumn = numDataRegionsColumn * dataRegionSizeColumns;
BitMatrix bitMatrixWithoutAlignment = new BitMatrix(sizeDataRegionColumn, sizeDataRegionRow);
for (int dataRegionRow = 0; dataRegionRow < numDataRegionsRow; ++dataRegionRow) {
int dataRegionRowOffset = dataRegionRow * dataRegionSizeRows;
for (int dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) {
int dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns;
for (int i = 0; i < dataRegionSizeRows; ++i) {
int readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i;
int writeRowOffset = dataRegionRowOffset + i;
for (int j = 0; j < dataRegionSizeColumns; ++j) {
int readColumnOffset = dataRegionColumn * (dataRegionSizeColumns + 2) + 1 + j;
if (bitMatrix.get(readColumnOffset, readRowOffset)) {
int writeColumnOffset = dataRegionColumnOffset + j;
bitMatrixWithoutAlignment.set(writeColumnOffset, writeRowOffset);
}
}
}
}
}
return bitMatrixWithoutAlignment;
}
} | [
"luiskanaes@gmail.com"
] | luiskanaes@gmail.com |
22ddd1e9fcb5f38cdfca3f0dc60f20b85e87c033 | 5b5ca33e2e4bfdeb079ca187b67ea5f56d286d74 | /kodilla-stream/src/test/java/com/kodilla/stream/world/WorldTestSuite.java | 165133c6e449b953f3593bcb66a0c5475c342a58 | [] | no_license | kman66/kodilla-course | 9114bc5c37f2d9bb14f2b1e4484370a97e78844e | bd61e9483b58bfcb20d974a1ffe313e93d0754eb | refs/heads/master | 2020-03-16T19:12:14.374632 | 2018-09-26T15:46:49 | 2018-09-26T15:46:49 | 132,905,237 | 0 | 0 | null | 2018-09-26T15:46:51 | 2018-05-10T13:36:44 | Java | UTF-8 | Java | false | false | 1,686 | java | package com.kodilla.stream.world;
import org.junit.Assert;
import org.junit.Test;
import java.math.BigDecimal;
public class WorldTestSuite {
@Test
public void testGetPeopleQuantity(){
//Given
World world = new World();
Continent europe = new Continent("Europe");
Continent northAmerica = new Continent("North America");
Continent asia = new Continent("Asia");
europe.addCountry(new Country("Polska", new BigDecimal(38112048)));
europe.addCountry(new Country("Deutschland", new BigDecimal(82274761)));
europe.addCountry(new Country("United Kingdom", new BigDecimal(66530003)));
northAmerica.addCountry(new Country("Canada", new BigDecimal(36916660)));
northAmerica.addCountry(new Country("USA", new BigDecimal(326508530)));
asia.addCountry(new Country("China", new BigDecimal(1414428017)));
asia.addCountry(new Country("India", new BigDecimal(1352387090)));
asia.addCountry(new Country("Iran", new BigDecimal(81916861)));
asia.addCountry(new Country("Thailand", new BigDecimal(69166240)));
//When
world.addContinent(europe);
world.addContinent(northAmerica);
world.addContinent(asia);
BigDecimal testedPeopleQuantity = world.getPeopleQuantity();
//Then
Assert.assertEquals(3, world.getContinents().size());
Assert.assertTrue(world.getContinents().contains(europe));
Assert.assertTrue(world.getContinents().contains(northAmerica));
Assert.assertTrue(world.getContinents().contains(asia));
Assert.assertEquals(new BigDecimal("3468240210"), testedPeopleQuantity);
}
}
| [
"karol.manterys@gmail.com"
] | karol.manterys@gmail.com |
304a9c9d6f3f6a35326b140536967bcc9301f115 | 9bfa8b3031d168e12a776b3721c8027cd77f78f3 | /src/by/training/online_pharmacy/command/impl/Parameter.java | 94658dabbf72ffad1cf831276216b71856d6145c | [] | no_license | vladislavzavadski/Online-Pharmacy | d4e98b2438e9a52c2787cdd93ed1fd9ef297875c | fa00215c570c343df24369dfa4e83a2be19c7ed7 | refs/heads/master | 2020-05-21T17:52:47.606237 | 2016-11-26T09:59:13 | 2016-11-26T09:59:13 | 63,727,170 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,286 | java | package by.training.online_pharmacy.command.impl;
/**
* Created by vladislav on 04.08.16.
*/
public class Parameter {
public static final String LOGIN = "login";
public static final String IS_EXIST = "isExist";
public static final String MESSAGE = "message";
public static final String USER = "user";
public static final String LANGUAGE = "language";
public static final String PREV_REQUEST = "prevRequest";
public static final String MAIL = "email";
public static final String PHONE = "phone";
public static final String RESULT = "result";
public static final String NEW_PASSWORD = "new_password";
public static final String OLD_PASSWORD = "old_password";
public static final String FIRST_NAME = "first_name";
public static final String SECOND_NAME = "second_name";
public static final String GENDER = "gender";
public static final String PROFILE_IMAGE = "webcam";
public static final String PASSWORD = "password";
public static final String CODE = "code";
public static final String REGISTRATION_SUCCESS = "registrationSuccess";
public static final String COMMAND = "command";
public static final String PAGE = "page";
public static final String DRUGS = "drugList";
public static final String CLASS = "dr_class";
public static final String DRUG_ID = "dr_id";
public static final String QUERY = "query";
public static final String NAME = "name";
public static final String ACTIVE_SUBSTANCE = "active_substance";
public static final String MAX_PRICE = "max_price";
public static final String EMPTY_STRING = "";
public static final String MANUFACTURER = "dr_manufacturer";
public static final String ONLY_IN_STOCK = "only_in_stock";
public static final String ONLY_FREE = "only_free";
public static final String DRUG_COUNT = "drug_count";
public static final String DRUG_DOSAGE = "drug_dosage";
public static final String CLIENT_COMMENT = "client_comment";
public static final String PROLONG_DATE = "prolong_date";
public static final String RECEIVER_LOGIN = "receiver_login";
public static final String RECEIVER_LOGIN_VIA = "receiver_login_via";
public static final String IS_CRITICAL = "isCritical";
public static final String SPECIALIZATION = "specialization";
public static final String OVERLOAD = "overload";
public static final String REGISTRATION_TYPE = "register_type";
public static final String ORDER_STATUS = "or_status";
public static final String DATE_FROM = "date_from";
public static final String DATE_TO = "date_to";
public static final String ORDER_ID = "order_id";
public static final String DRUG_NAME = "drug_name";
public static final String MESSAGE_STATUS = "message_status";
public static final String MESSAGE_ID = "me_id";
public static final String MESSAGES_COUNT = "count";
public static final String REQUEST_STATUS = "status";
public static final String PRESCRIPTION_STATUS = "pr_status";
public static final String DRUG_DESCRIPTION = "drug_description";
public static final String DRUG_TYPE = "drug_type";
public static final String DRUG_PRICE = "drug_price";
public static final String DRUGS_IN_STOCK = "drugs_in_stock";
public static final String DRUG_IMAGE = "drug_image";
public static final String CLASS_DESCRIPTION = "class_description";
public static final String COMMA = ",";
public static final String MANUFACTURER_NAME = "man_name";
public static final String MANUFACTURER_COUNTRY = "man_country";
public static final String MANUFACTURER_DESCRIPTION = "man_description";
public static final String DESCRIPTION = "description";
public static final String PAYMENT = "payment";
public static final String CARD_NUMBER = "card_number";
public static final String QUESTION_ID = "question_id";
public static final String SECRET_WORD = "secret_word";
public static final String QUESTION = "question";
public static final String DRUG_LIST = "drugList";
public static final String DOCTOR_LIST = "doctorList";
public static final String SPECIALIZATIONS = "specializations";
public static final String DRUG_MANUFACTURES = "drugManufacturers";
public static final String DRUG_CLASSES = "drugClasses";
public static final String MESSAGE_LIST = "messageList";
public static final String ORDER_LIST = "orderList";
public static final String PRESCRIPTIONS = "prescriptions";
public static final String PRESCRIPTION_EXIST = "prescriptionExist";
public static final String DRUG = "drug";
public static final String REQUESTS = "requests";
public static final String SECRET_QUESTIONS = "secretQuestions";
public static final String REQUEST_ID = "request_id";
public static final String EXPIRATION_DATE = "exp_date";
public static final String DATE_PATTERN = "yyyy-MM-dd";
public static final String RECEIVER_MESSAGE = "rec_message";
public static final String PRESCRIPTION = "prescription";
public static final String DOCTOR_COMMENT = "doc_comment";
public static final String REQUEST_COUNT = "request_count";
public static final String DOCTOR = "doctor";
public static final String REDIRECT_URL="redirect_url";
}
| [
"vladislav.zavadski@gmai.com"
] | vladislav.zavadski@gmai.com |
a7ad29be5ea5e28b12d2b4b2381283bb31e56953 | 4fab44e9f3205863c0c4e888c9de1801919dc605 | /AL-Game/src/com/aionemu/gameserver/skillengine/effect/BoostHealEffect.java | 54d1cbab6aabf7df4d3e3ce5dce8562952a16355 | [] | no_license | YggDrazil/AionLight9 | fce24670dcc222adb888f4a5d2177f8f069fd37a | 81f470775c8a0581034ed8c10d5462f85bef289a | refs/heads/master | 2021-01-11T00:33:15.835333 | 2016-07-29T19:20:11 | 2016-07-29T19:20:11 | 70,515,345 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,080 | java | /**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Aion-Lightning is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License
* along with Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.skillengine.effect;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* @author ATracer
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BoostHealEffect")
public class BoostHealEffect extends BufEffect {
}
| [
"michelgorter@outlook.com"
] | michelgorter@outlook.com |
2f98943b12ab3e4076551eb776089eb0695c6113 | 18065f596c412ffe863295953d9f76ea4ef9ed25 | /principal.java | 8e56a29c764ad1944d9ff241f8746f178c472a8d | [] | no_license | yazuc/Gandora | 10d457269f4e205579dd7e82370131a6f8d492a5 | c04361175d6c53c88aa675ea9c697c7d24562d5b | refs/heads/master | 2020-07-01T06:53:41.795451 | 2019-08-14T16:22:35 | 2019-08-14T16:22:35 | 201,081,340 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 2,009 | java | import java.util.Scanner;
public class principal {
public static void main(String args []) {
carro pehDePano = new carro(65);
Scanner input = new Scanner(System.in);
int opcao=0;
while(opcao>=0) {
System.out.println("Opcoes de operacao com o carro: ");
System.out.println(" 1 - Odometro: ");
System.out.println(" 2 - Capacidade do tanque (lts) ");
System.out.println(" 3 - Qtde de combustivel disponível (lts) ");
System.out.println(" 4 - Ocupação do tanque de combustivel (%) ");
System.out.println(" 5 - Abastecer o carro ");
System.out.println(" 6 - Deslocar");
System.out.println(" 0 - SAIR");
System.out.print("Informe a opcão: ");
opcao=input.nextInt();
if(opcao==0) break;
switch(opcao) {
case 1:
System.out.println("1: "+pehDePano.getQuilometragem()+" (km)");
break;
case 2:
System.out.println("2: "+pehDePano.getCapacidadeTanque()+" (lts)");
break;
case 3:
System.out.println("3: "+pehDePano.getCombustivelRestante()+" (lts)");
break;
case 4:
System.out.println("4: "+pehDePano.getOcupacaoTanque()+"%");
break;
case 5:
System.out.print("5: Informe a qtde de litros a abastecer:");
float val=input.nextFloat();
pehDePano.abastercer(val);
System.out.println("5: Carro abastecido");
break;
case 6:
if(pehDePano.getCombustivelRestante()==0) {
System.out.println("6: TCHE.... MAS NÃO TEM COMBUSTIVEL... ABASTECE PRIMEIRO:");
break;
}
System.out.print("6: Informe a qtde de kms a deslocar:");
float kms=input.nextFloat();
float deslocou=pehDePano.deslocar(kms);
if(deslocou<kms)
System.out.println(" CARRO PAROU NO CAMINHO... ABASTEÇA");
else
System.out.println(" CARRO CHEGOU AO DESTINO");
break;
default:
System.out.println("OPCAO INFORMADA NÃO É VÁLIDA");
break;
}
}
System.out.println("FIM DO PROGRAMA");
}
}
| [
"10083346@pucrs.br"
] | 10083346@pucrs.br |
55530289be7cdaf50fffb577cc61bc64958f65e3 | 7081905ae50ca07d06565b984566b90014350283 | /Prj_17_BabboServlet/src/model/Bimbo.java | 18b9338e0f5c2bacd574226ca681cd46db1fdc93 | [] | no_license | maboglia/TSS2021 | 32fe7ccc66d5c572af8b4df9a899ed8652c24687 | cf848aeae759e0be9d4e6c8a796e56adc6281bb3 | refs/heads/main | 2023-06-29T10:54:11.210034 | 2021-07-13T17:32:37 | 2021-07-13T17:32:37 | 317,783,420 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 566 | java | package model;
public class Bimbo {
private String nome;
private String cognome;
private int anno;
public Bimbo(String nome, String cognome, int anno) {
this.nome = nome;
this.cognome = cognome;
this.anno = anno;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getCognome() {
return cognome;
}
public void setCognome(String cognome) {
this.cognome = cognome;
}
public int getAnno() {
return anno;
}
public void setAnno(int anno) {
this.anno = anno;
}
}
| [
"mauro.bogliaccino@gmail.com"
] | mauro.bogliaccino@gmail.com |
306f25c11d04d541cabef9021c1fc188d6f72f4d | 6d6248eb1bcf5f2a845245967b5a1c293cc442a4 | /src/main/java/com/jiawa/wiki/po/EbookExample.java | 50d553560c4218660951e3b7b19c14c4c9cd8651 | [] | no_license | yuu2001/wiki | f7d3cf4a74405beaa1fc935d804322dbd0d63724 | c31d657d24cd817841ca55d11291417574f83c91 | refs/heads/main | 2023-06-08T09:09:11.741484 | 2021-06-30T15:18:03 | 2021-06-30T15:18:03 | 380,455,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 24,514 | java | package com.jiawa.wiki.po;
import java.util.ArrayList;
import java.util.List;
public class EbookExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public EbookExample() {
oredCriteria = new ArrayList<>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andCategory1IdIsNull() {
addCriterion("category1_id is null");
return (Criteria) this;
}
public Criteria andCategory1IdIsNotNull() {
addCriterion("category1_id is not null");
return (Criteria) this;
}
public Criteria andCategory1IdEqualTo(Long value) {
addCriterion("category1_id =", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdNotEqualTo(Long value) {
addCriterion("category1_id <>", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdGreaterThan(Long value) {
addCriterion("category1_id >", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdGreaterThanOrEqualTo(Long value) {
addCriterion("category1_id >=", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdLessThan(Long value) {
addCriterion("category1_id <", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdLessThanOrEqualTo(Long value) {
addCriterion("category1_id <=", value, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdIn(List<Long> values) {
addCriterion("category1_id in", values, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdNotIn(List<Long> values) {
addCriterion("category1_id not in", values, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdBetween(Long value1, Long value2) {
addCriterion("category1_id between", value1, value2, "category1Id");
return (Criteria) this;
}
public Criteria andCategory1IdNotBetween(Long value1, Long value2) {
addCriterion("category1_id not between", value1, value2, "category1Id");
return (Criteria) this;
}
public Criteria andCategory2IdIsNull() {
addCriterion("category2_id is null");
return (Criteria) this;
}
public Criteria andCategory2IdIsNotNull() {
addCriterion("category2_id is not null");
return (Criteria) this;
}
public Criteria andCategory2IdEqualTo(Long value) {
addCriterion("category2_id =", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdNotEqualTo(Long value) {
addCriterion("category2_id <>", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdGreaterThan(Long value) {
addCriterion("category2_id >", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdGreaterThanOrEqualTo(Long value) {
addCriterion("category2_id >=", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdLessThan(Long value) {
addCriterion("category2_id <", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdLessThanOrEqualTo(Long value) {
addCriterion("category2_id <=", value, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdIn(List<Long> values) {
addCriterion("category2_id in", values, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdNotIn(List<Long> values) {
addCriterion("category2_id not in", values, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdBetween(Long value1, Long value2) {
addCriterion("category2_id between", value1, value2, "category2Id");
return (Criteria) this;
}
public Criteria andCategory2IdNotBetween(Long value1, Long value2) {
addCriterion("category2_id not between", value1, value2, "category2Id");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("description is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("description =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("description <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("description >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("description >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("description <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("description <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("description like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("description not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("description not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("description between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("description not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andCoverIsNull() {
addCriterion("cover is null");
return (Criteria) this;
}
public Criteria andCoverIsNotNull() {
addCriterion("cover is not null");
return (Criteria) this;
}
public Criteria andCoverEqualTo(String value) {
addCriterion("cover =", value, "cover");
return (Criteria) this;
}
public Criteria andCoverNotEqualTo(String value) {
addCriterion("cover <>", value, "cover");
return (Criteria) this;
}
public Criteria andCoverGreaterThan(String value) {
addCriterion("cover >", value, "cover");
return (Criteria) this;
}
public Criteria andCoverGreaterThanOrEqualTo(String value) {
addCriterion("cover >=", value, "cover");
return (Criteria) this;
}
public Criteria andCoverLessThan(String value) {
addCriterion("cover <", value, "cover");
return (Criteria) this;
}
public Criteria andCoverLessThanOrEqualTo(String value) {
addCriterion("cover <=", value, "cover");
return (Criteria) this;
}
public Criteria andCoverLike(String value) {
addCriterion("cover like", value, "cover");
return (Criteria) this;
}
public Criteria andCoverNotLike(String value) {
addCriterion("cover not like", value, "cover");
return (Criteria) this;
}
public Criteria andCoverIn(List<String> values) {
addCriterion("cover in", values, "cover");
return (Criteria) this;
}
public Criteria andCoverNotIn(List<String> values) {
addCriterion("cover not in", values, "cover");
return (Criteria) this;
}
public Criteria andCoverBetween(String value1, String value2) {
addCriterion("cover between", value1, value2, "cover");
return (Criteria) this;
}
public Criteria andCoverNotBetween(String value1, String value2) {
addCriterion("cover not between", value1, value2, "cover");
return (Criteria) this;
}
public Criteria andDocCountIsNull() {
addCriterion("doc_count is null");
return (Criteria) this;
}
public Criteria andDocCountIsNotNull() {
addCriterion("doc_count is not null");
return (Criteria) this;
}
public Criteria andDocCountEqualTo(Integer value) {
addCriterion("doc_count =", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountNotEqualTo(Integer value) {
addCriterion("doc_count <>", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountGreaterThan(Integer value) {
addCriterion("doc_count >", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountGreaterThanOrEqualTo(Integer value) {
addCriterion("doc_count >=", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountLessThan(Integer value) {
addCriterion("doc_count <", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountLessThanOrEqualTo(Integer value) {
addCriterion("doc_count <=", value, "docCount");
return (Criteria) this;
}
public Criteria andDocCountIn(List<Integer> values) {
addCriterion("doc_count in", values, "docCount");
return (Criteria) this;
}
public Criteria andDocCountNotIn(List<Integer> values) {
addCriterion("doc_count not in", values, "docCount");
return (Criteria) this;
}
public Criteria andDocCountBetween(Integer value1, Integer value2) {
addCriterion("doc_count between", value1, value2, "docCount");
return (Criteria) this;
}
public Criteria andDocCountNotBetween(Integer value1, Integer value2) {
addCriterion("doc_count not between", value1, value2, "docCount");
return (Criteria) this;
}
public Criteria andViewCountIsNull() {
addCriterion("view_count is null");
return (Criteria) this;
}
public Criteria andViewCountIsNotNull() {
addCriterion("view_count is not null");
return (Criteria) this;
}
public Criteria andViewCountEqualTo(Integer value) {
addCriterion("view_count =", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountNotEqualTo(Integer value) {
addCriterion("view_count <>", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountGreaterThan(Integer value) {
addCriterion("view_count >", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountGreaterThanOrEqualTo(Integer value) {
addCriterion("view_count >=", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountLessThan(Integer value) {
addCriterion("view_count <", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountLessThanOrEqualTo(Integer value) {
addCriterion("view_count <=", value, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountIn(List<Integer> values) {
addCriterion("view_count in", values, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountNotIn(List<Integer> values) {
addCriterion("view_count not in", values, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountBetween(Integer value1, Integer value2) {
addCriterion("view_count between", value1, value2, "viewCount");
return (Criteria) this;
}
public Criteria andViewCountNotBetween(Integer value1, Integer value2) {
addCriterion("view_count not between", value1, value2, "viewCount");
return (Criteria) this;
}
public Criteria andVoteCountIsNull() {
addCriterion("vote_count is null");
return (Criteria) this;
}
public Criteria andVoteCountIsNotNull() {
addCriterion("vote_count is not null");
return (Criteria) this;
}
public Criteria andVoteCountEqualTo(Integer value) {
addCriterion("vote_count =", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountNotEqualTo(Integer value) {
addCriterion("vote_count <>", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountGreaterThan(Integer value) {
addCriterion("vote_count >", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountGreaterThanOrEqualTo(Integer value) {
addCriterion("vote_count >=", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountLessThan(Integer value) {
addCriterion("vote_count <", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountLessThanOrEqualTo(Integer value) {
addCriterion("vote_count <=", value, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountIn(List<Integer> values) {
addCriterion("vote_count in", values, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountNotIn(List<Integer> values) {
addCriterion("vote_count not in", values, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountBetween(Integer value1, Integer value2) {
addCriterion("vote_count between", value1, value2, "voteCount");
return (Criteria) this;
}
public Criteria andVoteCountNotBetween(Integer value1, Integer value2) {
addCriterion("vote_count not between", value1, value2, "voteCount");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | [
"mingyangyu707@gmail.com"
] | mingyangyu707@gmail.com |
6688c852099c06793e05fb6140b7452ee26b5b03 | 5f572e3258cadcde7ba3582c8974f7efb0a0efa0 | /backend/build/tmp/appengineEndpointsExpandClientLibs/myApi-v1-java.zip-unzipped/myApi/src/main/java/com/example/radhikaparmar/myapplication/backend/myApi/MyApiRequest.java | 793debdc00dc6c3db9c4313f1292dccc2483e1f8 | [
"Apache-2.0"
] | permissive | radhikavparmar/BuildItBigger | db34ad1cf2a40fae442f1f7f1818d7ff2ffcfc8a | 943306f5f519841cfcc440253ecd4e427a40d3f2 | refs/heads/master | 2021-01-23T05:57:16.159705 | 2017-03-27T11:29:28 | 2017-03-27T11:29:28 | 86,327,087 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,434 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/google/apis-client-generator/
* (build: 2017-02-15 17:18:02 UTC)
* on 2017-03-19 at 12:54:39 UTC
* Modify at your own risk.
*/
package com.example.radhikaparmar.myapplication.backend.myApi;
/**
* MyApi request.
*
* @since 1.3
*/
@SuppressWarnings("javadoc")
public abstract class MyApiRequest<T> extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest<T> {
/**
* @param client Google client
* @param method HTTP Method
* @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/"
* the base path from the base URL will be stripped out. The URI template can also be a
* full URL. URI template expansion is done using
* {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)}
* @param content A POJO that can be serialized into JSON or {@code null} for none
* @param responseClass response class to parse into
*/
public MyApiRequest(
MyApi client, String method, String uriTemplate, Object content, Class<T> responseClass) {
super(
client,
method,
uriTemplate,
content,
responseClass);
}
/** Data format for the response. */
@com.google.api.client.util.Key
private java.lang.String alt;
/**
* Data format for the response. [default: json]
*/
public java.lang.String getAlt() {
return alt;
}
/** Data format for the response. */
public MyApiRequest<T> setAlt(java.lang.String alt) {
this.alt = alt;
return this;
}
/** Selector specifying which fields to include in a partial response. */
@com.google.api.client.util.Key
private java.lang.String fields;
/**
* Selector specifying which fields to include in a partial response.
*/
public java.lang.String getFields() {
return fields;
}
/** Selector specifying which fields to include in a partial response. */
public MyApiRequest<T> setFields(java.lang.String fields) {
this.fields = fields;
return this;
}
/**
* API key. Your API key identifies your project and provides you with API access, quota, and
* reports. Required unless you provide an OAuth 2.0 token.
*/
@com.google.api.client.util.Key
private java.lang.String key;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and
* reports. Required unless you provide an OAuth 2.0 token.
*/
public java.lang.String getKey() {
return key;
}
/**
* API key. Your API key identifies your project and provides you with API access, quota, and
* reports. Required unless you provide an OAuth 2.0 token.
*/
public MyApiRequest<T> setKey(java.lang.String key) {
this.key = key;
return this;
}
/** OAuth 2.0 token for the current user. */
@com.google.api.client.util.Key("oauth_token")
private java.lang.String oauthToken;
/**
* OAuth 2.0 token for the current user.
*/
public java.lang.String getOauthToken() {
return oauthToken;
}
/** OAuth 2.0 token for the current user. */
public MyApiRequest<T> setOauthToken(java.lang.String oauthToken) {
this.oauthToken = oauthToken;
return this;
}
/** Returns response with indentations and line breaks. */
@com.google.api.client.util.Key
private java.lang.Boolean prettyPrint;
/**
* Returns response with indentations and line breaks. [default: true]
*/
public java.lang.Boolean getPrettyPrint() {
return prettyPrint;
}
/** Returns response with indentations and line breaks. */
public MyApiRequest<T> setPrettyPrint(java.lang.Boolean prettyPrint) {
this.prettyPrint = prettyPrint;
return this;
}
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string
* assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
*/
@com.google.api.client.util.Key
private java.lang.String quotaUser;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string
* assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
*/
public java.lang.String getQuotaUser() {
return quotaUser;
}
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string
* assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
*/
public MyApiRequest<T> setQuotaUser(java.lang.String quotaUser) {
this.quotaUser = quotaUser;
return this;
}
/**
* IP address of the site where the request originates. Use this if you want to enforce per-user
* limits.
*/
@com.google.api.client.util.Key
private java.lang.String userIp;
/**
* IP address of the site where the request originates. Use this if you want to enforce per-user
* limits.
*/
public java.lang.String getUserIp() {
return userIp;
}
/**
* IP address of the site where the request originates. Use this if you want to enforce per-user
* limits.
*/
public MyApiRequest<T> setUserIp(java.lang.String userIp) {
this.userIp = userIp;
return this;
}
@Override
public final MyApi getAbstractGoogleClient() {
return (MyApi) super.getAbstractGoogleClient();
}
@Override
public MyApiRequest<T> setDisableGZipContent(boolean disableGZipContent) {
return (MyApiRequest<T>) super.setDisableGZipContent(disableGZipContent);
}
@Override
public MyApiRequest<T> setRequestHeaders(com.google.api.client.http.HttpHeaders headers) {
return (MyApiRequest<T>) super.setRequestHeaders(headers);
}
@Override
public MyApiRequest<T> set(String parameterName, Object value) {
return (MyApiRequest<T>) super.set(parameterName, value);
}
}
| [
"radhika.vparmar@gmail.com"
] | radhika.vparmar@gmail.com |
8eb552a4282387475c60f0dee1a5ae19d9198620 | 70c935586bbbaf9981955174a0f347bc66d40263 | /src/_3_Arifmeticheskie_operatory_Privedenie_tipov/_03Program06.java | c21fe59238c39cdc060fb51789492fd29cea0489 | [] | no_license | QAScholar/QAScholar_JavaCourses | b03da392f2b812fb980b6f23d0a70c423aed9fff | 4a5ac4cc115b9e02ac77fe717ed090e92070da2f | refs/heads/master | 2021-08-28T03:32:14.633819 | 2017-12-11T05:57:07 | 2017-12-11T05:57:07 | 110,808,722 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,040 | java | package _3_Arifmeticheskie_operatory_Privedenie_tipov;
import java.util.Scanner;
//6. Пользователь вводит с клавиатуры расстояние до аэропорта
// (в километрах, может быть вещественное значение) и время, за которое нужно доехать (в минутах).
// Вычислить скорость (км/ч), с которой нужно ехать.
public class _03Program06 {
public static void main(String[] args) {
//Вводим расстояние
System.out.println("Введите расстояние, км: ");
Scanner a=new Scanner(System.in);
double S=a.nextInt();
//Вводим скорость
System.out.println("Введите время, мин: ");
Scanner b=new Scanner(System.in);
double T=b.nextDouble();
double V=S/(T/60);
System.out.println("Вы должны ехать со скоростью: "+V+" км/ч");
}
}
| [
"qa.scholar@yandex.ru"
] | qa.scholar@yandex.ru |
74c77be33f3499582da31caf7561b72fcd99e44c | d0036a8e3e109c259150d2f5910829a6b1f5c1ec | /src/com/liato/bankdroid/banking/banks/Meniga.java | efea9ada9d0cb558e3c35a83d51f96352a07b908 | [] | no_license | city0666/android-bankdroid | 9c46a6c94f74e31ffdded647d7ff37a9cddc994e | b3a58e8647863a19cd7cd3ebb9d30055b29b6255 | refs/heads/master | 2021-01-18T11:23:08.252504 | 2012-04-09T23:16:28 | 2012-04-09T23:16:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,159 | java | package com.liato.bankdroid.banking.banks;
import android.content.Context;
import android.text.Html;
import android.text.InputType;
import com.liato.bankdroid.Helpers;
import com.liato.bankdroid.R;
import com.liato.bankdroid.banking.Account;
import com.liato.bankdroid.banking.Bank;
import com.liato.bankdroid.banking.Transaction;
import com.liato.bankdroid.banking.exceptions.BankChoiceException;
import com.liato.bankdroid.banking.exceptions.BankException;
import com.liato.bankdroid.banking.exceptions.LoginException;
import com.liato.bankdroid.provider.IBankTypes;
import eu.nullbyte.android.urllib.Urllib;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Meniga extends Bank{
private static final String TAG = "Meniga";
private static final String NAME = "Meniga";
private static final String NAME_SHORT = "meniga";
private static final String URL = "https://www.meniga.is/";
private static final int BANKTYPE_ID = IBankTypes.MENIGA;
private static final int INPUT_TYPE_USERNAME = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
private static final String INPUT_HINT_USERNAME = "name@company.com";
private Pattern reAccounts = Pattern.compile("\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^k]+)kr");
private Pattern reTransactions = Pattern.compile("\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");
String response;
public Meniga(Context context) {
super(context);
super.TAG = TAG;
super.NAME = NAME;
super.NAME_SHORT = NAME_SHORT;
super.BANKTYPE_ID = BANKTYPE_ID;
super.URL = URL;
super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;
super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;
super.setCurrency("ISK");
}
public Meniga(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {
this(context);
this.update(username, password);
}
@Override
protected LoginPackage preLogin() throws BankException, IOException {
urlopen = new Urllib();
urlopen.setContentCharset(HTTP.ISO_8859_1);
response = urlopen.open("https://www.meniga.is/Mobile");
List<NameValuePair> postData = new ArrayList<NameValuePair>();
postData.add(new BasicNameValuePair("email", username));
postData.add(new BasicNameValuePair("password", password));
return new LoginPackage(urlopen, postData, response, "https://www.meniga.is/Mobile");
}
@Override
public Urllib login() throws LoginException, BankException {
try {
LoginPackage lp = preLogin();
response = urlopen.open(lp.getLoginTarget(), lp.getPostData());
if (response.contains("<div class=\"login\">")) {
throw new LoginException(res.getText(R.string.invalid_username_password).toString());
}
}
catch (ClientProtocolException e) {
throw new BankException(e.getMessage());
}
catch (IOException e) {
throw new BankException(e.getMessage());
}
try{
response = urlopen.open("https://www.meniga.is/mobile/language/?lang=sv-SE");
}
catch (ClientProtocolException e){
//Do nothing
}
catch (IOException e) {
throw new BankException(e.getMessage());
}
return urlopen;
}
@Override
public void update() throws BankException, LoginException, BankChoiceException {
super.update();
if (username == null || password == null || username.length() == 0 || password.length() == 0) {
throw new LoginException(res.getText(R.string.invalid_username_password).toString());
}
urlopen = login();
Matcher matcher;
try {
response = urlopen.open("https://www.meniga.is/Mobile/Accounts");
matcher = reAccounts.matcher(response);
while (matcher.find()) {
/*
* Capture groups:
* GROUP EXAMPLE DATA
* 1: Type id
* 2: Name accont
* 3: ---- plus or minus
* 4: Balance 5 678
*
*/
Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim());
account.setCurrency("ISK");
balance = balance.add(Helpers.parseBalance(matcher.group(4)));
accounts.add(account);
}
if (accounts.isEmpty()) {
throw new BankException(res.getText(R.string.no_accounts_found).toString());
}
}
catch (ClientProtocolException e) {
throw new BankException(e.getMessage());
}
catch (IOException e) {
throw new BankException(e.getMessage());
}
finally {
super.updateComplete();
}
}
@Override
public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {
super.updateTransactions(account, urlopen);
if (account.getType() == Account.OTHER) return;
String response;
Matcher matcher;
try {
ArrayList<Transaction> transactions = new ArrayList<Transaction>();
response = urlopen.open("https://www.meniga.is/Transactions?account="+account.getId());
matcher = reTransactions.matcher(response);
while (matcher.find()) {
/*
* Capture groups:
* GROUP EXAMPLE DATA
* 1: Id 1231213
* 2: Specification Pressbyran
* 3: Date in millisec 2142411351235
* 4: Amount -20
*
*
*/
Long date = Long.valueOf(matcher.group(3));
SimpleDateFormat ft = new SimpleDateFormat ("yy-MM-dd");
Transaction transaction = new Transaction(ft.format(date), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4)));
transaction.setCurrency("ISK");
transactions.add(transaction);
}
account.setTransactions(transactions);
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"jonas@vulkanlandet.se"
] | jonas@vulkanlandet.se |
6c1527155ed627ddc71b3f5944de0ebe11059820 | 759adb95aff4196f45352e817d21ebfa80903c5d | /src/main/java/com/example/board/dto/Pager.java | e68573e6deed8784cebc5877da40c9a4b2cce671 | [] | no_license | kimhoungkuk/SPRING_BOOT_SHOP | e5359aa7544e76e0d3bae8602d947755e5573684 | 2c2ce4569636165cc245699be3cb54110ef40c9e | refs/heads/master | 2020-03-19T06:25:42.109058 | 2018-06-04T12:04:57 | 2018-06-04T12:04:57 | 136,018,630 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 856 | java | package com.example.board.dto;
import lombok.Data;
@Data
public class Pager {
private int page; // current page
private int size; // rows per page
private int bsize; // pages per block
private int rows; // total elements
private int pages; // total pages
private int blocks; // total blocks
private int block; // current block
private int bspage; // current block start page
private int bepage; // current block end page
public Pager(int page, int size, int bsize, int rows) {
this.page = page;
this.size = size;
this.bsize = bsize;
this.rows = rows;
pages = (int) Math.ceil((double) this.rows / this.size);
blocks = (int) Math.ceil((double) pages / this.bsize);
block = (int) Math.ceil((double) this.page / this.bsize);
bepage = block * this.bsize;
bspage = bepage - this.bsize + 1;
}
}
| [
"kimhk1571@gmail.com"
] | kimhk1571@gmail.com |
6f5aacd317b445194bcd3ae917d88189da821dd5 | ca88edba7f2e563902e3a7d9417b5df5b6a203c1 | /src/main/java/pe/edu/sistemas/sismanweb/daoimpl/PeriodoDAOImpl.java | 5a028dfe38f42d1af2b7fcc12a8b7dbb52776d3c | [] | no_license | OrgDesarrolloFISI/SISMANWEB | dcf16557ee1512f7d980cc0c7b090042375a0bb3 | 7ce378f93b6f1d3edd7ab7ce3f7681618b93b068 | refs/heads/master | 2021-07-09T23:58:44.759582 | 2019-04-11T05:20:00 | 2019-04-11T05:20:00 | 147,015,609 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 362 | java | package pe.edu.sistemas.sismanweb.daoimpl;
import org.springframework.stereotype.Repository;
import pe.edu.sistemas.sismanweb.dao.PeriodoDAO;
import pe.edu.sistemas.sismanweb.domain.Periodo;
@Repository
public class PeriodoDAOImpl extends AbstractDAOImpl<Periodo, Integer> implements PeriodoDAO {
protected PeriodoDAOImpl() {
super(Periodo.class);
}
}
| [
"andcristhian95@gmail.com"
] | andcristhian95@gmail.com |
7cc585d87bf0b747b051d0f9e97be11d17ecee71 | 80e1caef55c49203c4954357b96a2912896a6de1 | /solver/src/main/java/solver/propagation/engines/comparators/IncrDomDeg.java | 989acee385035edd48de372ead7a9db606f6af14 | [] | no_license | d3alek/Galak | 448b4a197f7dae11ac7a8a6ea4d568149f3ecea9 | ee976e02b84fe2c3a4bd7eeebc225d7570d37143 | refs/heads/master | 2021-01-18T05:54:22.045097 | 2011-11-08T08:51:26 | 2011-11-08T08:51:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,650 | java | /**
* Copyright (c) 1999-2011, Ecole des Mines de Nantes
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Ecole des Mines de Nantes nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package solver.propagation.engines.comparators;
import solver.variables.IntVar;
import solver.requests.IRequest;
import java.io.Serializable;
import java.util.Comparator;
/**
* <br/>
*
* @author Charles Prud'homme
* @since 30/03/11
*/
public class IncrDomDeg<V extends IntVar> implements Comparator<IRequest<V>>, Serializable {
private static final IncrDomDeg singleton = new IncrDomDeg();
public static IncrDomDeg get() {
return singleton;
}
private IncrDomDeg() {
}
@Override
public int compare(IRequest<V> o1, IRequest<V> o2) {
if (o1.getVariable().nbRequests() == 0) {
return 1;
} else if (o2.getVariable().nbRequests() == 0) {
return -1;
} else {
return o1.getVariable().getDomainSize() / o1.getVariable().nbRequests()
- o2.getVariable().getDomainSize() / o2.getVariable().nbRequests();
}
}
@Override
public String toString() {
return "IncrDomDeg";
}
}
| [
"cprudhom@031d3fc5-a07f-0410-aa2d-fafe74bc0a1b"
] | cprudhom@031d3fc5-a07f-0410-aa2d-fafe74bc0a1b |
dcbeebd354ef4fc4e1dcedaf428cb281f13f86ef | a55817cb0abb161e1fa3f732e595c66082ee7844 | /app/src/main/java/com/gbq/myproject/base/BaseVm.java | 9373e11fe5b238b9b5d2ddddab8cc645e6219ee2 | [] | no_license | gaobingqiu/MyProject | a30ce7f5786d63ff35cc636e948e7f0a0dd1e6ac | d8a7b8f1091c2a160f7bd1bbb9a1a2bd374414ae | refs/heads/master | 2021-06-26T12:32:33.990290 | 2020-10-28T12:24:25 | 2020-10-28T12:24:25 | 147,099,540 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 382 | java | package com.gbq.myproject.base;
import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LifecycleObserver;
import android.support.annotation.NonNull;
public abstract class BaseVm extends AndroidViewModel implements LifecycleObserver {
public BaseVm(@NonNull Application application) {
super(application);
}
}
| [
"990924291@qq.com"
] | 990924291@qq.com |
25d36673b15756b84b3bdf193aad8ad93204ecf5 | facf180d2ec0a6047ae588eb2d1a8a7b3262f7c5 | /day0915/src/test/TcpServer.java | 42aab7bfb0532a434a0d9a273110b3a02146b7d2 | [] | no_license | kgcnjzym/203007 | 7a45f66ebc61e89f6c8f60d86e9c35cc0b0968e0 | 73954bbeea59ac2e6d977ecd6627cbd089ff1be3 | refs/heads/master | 2023-01-06T04:23:14.731053 | 2020-11-02T05:21:14 | 2020-11-02T05:21:14 | 289,329,667 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,053 | java | package test;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
/**
* TCP通讯协议:Server端
*
* @author 杨卫兵
* @version [V1.00, 2020年9月15日]
* @since V1.00
*/
public class TcpServer
{
public static void main(String[] args)
{
ServerSocket server = null;
Socket socket = null;
InputStream is = null;
OutputStream os = null;
try
{
server = new ServerSocket(50001);
System.out.println("创建ServerSocket");
// 执行以下代码,在未得到连接请求时处于阻塞状态
socket = server.accept();
System.out.println("得到连接");
is = socket.getInputStream();
os = socket.getOutputStream();
byte[] bts = new byte[4096];
while (true)
{
// 执行以下代码,在未得到数据时处于阻塞状态
int cnt = is.read(bts);
String str = new String(bts, 0, cnt);
System.out.println("服务器接收到:" + str);
if("over".equalsIgnoreCase(str)) {
break;
}
os.write(("i got " + str).getBytes());
}
System.out.println("结束");
}
catch (Exception ex)
{
System.out.println(ex);
}
finally
{
try
{
socket.close();
}
catch (Exception e)
{
}
try
{
server.close();
}
catch (Exception e)
{
}
try
{
is.close();
}
catch (Exception e)
{
}
try
{
os.close();
}
catch (Exception e)
{
}
}
}
}
| [
"kgcnjzym@sohu.com"
] | kgcnjzym@sohu.com |
8ba6ac1e3aeea9faf2710b7201897c2083ad4643 | a441fed646424f066ce5970a4a66595ce5ce1628 | /src/Game.java | d89630c665964aa41a1c2234d16657788349ee89 | [] | no_license | cdepeuter/Thesis | 418e4347b985f147e64f1600602b3a127bfe546e | 6b60b12e5df2f774818cab56a440074d2e9f6e46 | refs/heads/master | 2021-01-01T18:28:02.327980 | 2015-02-09T02:23:38 | 2015-02-09T02:23:38 | 8,613,462 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,746 | java | import java.util.ArrayList;
public class Game {
public String away;
public String home;
public String date;
public int awayScore;
public int homeScore;
public int awayTOP;
public int homeTOP;
public int awayTurnovers;
public int homeTurnovers;
public int awayOBoards;
public int homeOBoards;
public int awayDFouls;
public int homeDFouls;
public int awayAssists;
public int homeAssists;
public int awayMisses;
public int homeMisses;
public int awaySteals;
public int homeSteals;
public int awayPossessions;
public int homePossessions;
public void printGame(){
System.out.print(away+" vs "+home+" on"+date+", "+String.valueOf(awayScore)+"-"+String.valueOf(homeScore));
}
public ArrayList<String> getStringArray(){
ArrayList<String> returnList = new ArrayList<String>();
returnList.add(away);
returnList.add(home);
returnList.add(date);
returnList.add(String.valueOf(awayScore));
returnList.add(String.valueOf(homeScore));
returnList.add(String.valueOf(awayTOP));
returnList.add(String.valueOf(homeTOP));
returnList.add(String.valueOf(awayTurnovers));
returnList.add(String.valueOf(homeTurnovers));
returnList.add(String.valueOf(awayOBoards));
returnList.add(String.valueOf(homeOBoards));
returnList.add(String.valueOf(awayDFouls));
returnList.add(String.valueOf(homeDFouls));
returnList.add(String.valueOf(awayAssists));
returnList.add(String.valueOf(homeAssists));
returnList.add(String.valueOf(awayMisses));
returnList.add(String.valueOf(homeMisses));
returnList.add(String.valueOf(awaySteals));
returnList.add(String.valueOf(homeSteals));
returnList.add(String.valueOf(awayPossessions));
returnList.add(String.valueOf(homePossessions));
return returnList;
}
}
| [
"conrad.depeuter@gmail.com"
] | conrad.depeuter@gmail.com |
7b474f3b31386f510de6dc5549c4e39b6091eacc | ce9107b30cd202ed8f52fb29e63c0fba871c07cc | /src/main/java/com/santostiago/cursomc/resources/ProdutoResource.java | 3b8a89059f239eb9ce99510794d5b1556f1b21cb | [] | no_license | tiagosantos-dev/spring-boot-ionic-backend | 9cce3e92f65c46412b5dcedff998c1bb90f03773 | 2f6ade77e4c84651dbb767f12e2e5d6e5b9f8952 | refs/heads/master | 2022-11-06T23:49:54.515352 | 2020-06-25T23:29:04 | 2020-06-25T23:29:04 | 272,574,228 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,922 | java | package com.santostiago.cursomc.resources;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.santostiago.cursomc.domain.Produto;
import com.santostiago.cursomc.dto.ProdutoDTO;
import com.santostiago.cursomc.resources.utils.URL;
import com.santostiago.cursomc.services.ProdutoService;
@RestController
@RequestMapping(value= "/produtos")
public class ProdutoResource {
@Autowired
private ProdutoService service;
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public ResponseEntity<Produto> find(@PathVariable Integer id) {
Produto obj =service.buscar(id);
return ResponseEntity.ok().body(obj);
}
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<Page<ProdutoDTO>>
findPage(@RequestParam(value = "nome", defaultValue = "") String nome,
@RequestParam(value = "categorias", defaultValue = "") String categorias,
@RequestParam(value = "page", defaultValue = "0") Integer page,
@RequestParam(value = "linesPerPage", defaultValue = "24") Integer linesPerPage,
@RequestParam(value = "orderBy", defaultValue = "nome") String orderBy,
@RequestParam(value = "direction", defaultValue = "ASC") String direction) {
List<Integer> ids = URL.decodeInt(categorias);
String nomes = URL.decodeParam(nome);
Page<Produto> list = service.search(nomes,ids,page, linesPerPage, orderBy, direction);
Page<ProdutoDTO> listdto = list.map(obj -> new ProdutoDTO(obj));
return ResponseEntity.ok().body(listdto);
}
}
| [
"tiagoltj@hotmail.com"
] | tiagoltj@hotmail.com |
783d4f352031a0b915db970a3bcd3b1a2a1bb426 | 6adf83cf94e782205e9929884b4fee90431d71d5 | /processor/src/test/java/org/jboss/logging/processor/generated/ValidLogger.java | 119b49e4a37fb51d2f4cf60eb5415e9b188fb9e3 | [] | no_license | etsangsplk/jboss-logging-tools | 487552b6c88afac629b5bd3667936976d01961eb | 99056c698e863bfa32986ebc7a8e2843cdda1f67 | refs/heads/master | 2022-07-15T02:38:49.549993 | 2019-11-21T22:07:01 | 2019-11-21T22:07:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,656 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2016, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.logging.processor.generated;
import org.jboss.logging.Logger;
import org.jboss.logging.Logger.Level;
import org.jboss.logging.annotations.Cause;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.Message.Format;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.annotations.ValidIdRange;
import org.jboss.logging.annotations.ValidIdRanges;
/**
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
*/
@MessageLogger(projectCode = AbstractLoggerTest.PROJECT_CODE)
@ValidIdRanges({
@ValidIdRange(min = 200, max = 202),
@ValidIdRange(min = 203, max = 204)
})
public interface ValidLogger {
final ValidLogger LOGGER = Logger.getMessageLogger(ValidLogger.class, AbstractLoggerTest.CATEGORY);
@LogMessage(level = Level.INFO, loggingClass = ValidLogger.class)
@Message(id = 200, value = "This is a generated message.")
void testInfoMessage();
@LogMessage(level = Level.INFO)
@Message(id = 201, value = "Test message format message. Test value: {0}", format = Format.MESSAGE_FORMAT)
void testMessageFormat(Object value);
/**
* Logs a default informational greeting.
*
* @param name the name.
*/
@LogMessage
@Message(id = 202, value = "Greetings %s")
void greeting(String name);
/**
* Logs an error message indicating a processing error.
*/
@LogMessage(level = Level.ERROR)
@Message(id = 203, value = "Processing error")
void processingError();
/**
* Logs an error message indicating a processing error.
*
* @param cause the cause of the error.
*/
@LogMessage(level = Level.ERROR)
void processingError(@Cause Throwable cause);
/**
* Logs an error message indicating there was a processing error.
*
* @param cause the cause of the error.
* @param moduleName the module that caused the error.
*/
@LogMessage(level = Level.ERROR)
@Message(id = Message.INHERIT, value = "Processing error in module '%s'")
void processingError(@Cause Throwable cause, String moduleName);
/**
* Logs an error message indicating a processing error.
*
* @param on the object the error occurred on
* @param message the error message
*/
@LogMessage(level = Level.ERROR)
@Message(id = 203, value = "Processing error on '%s' with error '%s'")
void processingError(Object on, String message);
@Message(id = 204, value = "Bundle message inside a logger")
String bundleMessage();
}
| [
"jperkins@redhat.com"
] | jperkins@redhat.com |
3e7d2cbce9130b281408f8f72dab90fdca0e4fd7 | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor.java | cd261ec5bd49c7b4d4e88a91d61ab4054b80e9ec | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,450 | java | package com.avito.android.player.presenter.analytics;
import a2.b.a.a.a;
import android.os.Parcel;
import android.os.Parcelable;
import com.avito.android.remote.auth.AuthSource;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.parcelize.Parcelize;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import t6.r.a.j;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u000f\bf\u0018\u00002\u00020\u0001:\u0001\u0014J\u000f\u0010\u0003\u001a\u00020\u0002H&¢\u0006\u0004\b\u0003\u0010\u0004J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0002H&¢\u0006\u0004\b\u0007\u0010\bJ\u000f\u0010\t\u001a\u00020\u0006H&¢\u0006\u0004\b\t\u0010\nJ\u000f\u0010\u000b\u001a\u00020\u0006H&¢\u0006\u0004\b\u000b\u0010\nJ\u000f\u0010\f\u001a\u00020\u0006H&¢\u0006\u0004\b\f\u0010\nJ\u000f\u0010\r\u001a\u00020\u0006H&¢\u0006\u0004\b\r\u0010\nJ\u000f\u0010\u000e\u001a\u00020\u0006H&¢\u0006\u0004\b\u000e\u0010\nJ\u000f\u0010\u000f\u001a\u00020\u0006H&¢\u0006\u0004\b\u000f\u0010\nJ\u000f\u0010\u0010\u001a\u00020\u0006H&¢\u0006\u0004\b\u0010\u0010\nJ\u000f\u0010\u0011\u001a\u00020\u0006H&¢\u0006\u0004\b\u0011\u0010\nJ\u000f\u0010\u0012\u001a\u00020\u0006H&¢\u0006\u0004\b\u0012\u0010\nJ\u000f\u0010\u0013\u001a\u00020\u0006H&¢\u0006\u0004\b\u0013\u0010\n¨\u0006\u0015"}, d2 = {"Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor;", "", "Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor$State;", "saveState", "()Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor$State;", "state", "", "restoreState", "(Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor$State;)V", "trackClose", "()V", "trackRewind", "trackFastForward", "trackPause", "trackResume", "trackMediaStartIfNeeded", "trackMediaFirstQuartileIfNeeded", "trackMediaMidpointIfNeeded", "trackMediaThirdQuartileIfNeeded", "trackMediaCompleteIfNeeded", "State", "player_release"}, k = 1, mv = {1, 4, 2})
public interface PlayerAnalyticsInteractor {
@Parcelize
@Metadata(bv = {1, 0, 3}, d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\b\r\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0011\b\b\u0018\u00002\u00020\u0001B9\u0012\b\b\u0002\u0010\t\u001a\u00020\u0002\u0012\b\b\u0002\u0010\n\u001a\u00020\u0002\u0012\b\b\u0002\u0010\u000b\u001a\u00020\u0002\u0012\b\b\u0002\u0010\f\u001a\u00020\u0002\u0012\b\b\u0002\u0010\r\u001a\u00020\u0002¢\u0006\u0004\b-\u0010.J\u0010\u0010\u0003\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0003\u0010\u0004J\u0010\u0010\u0005\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0005\u0010\u0004J\u0010\u0010\u0006\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0006\u0010\u0004J\u0010\u0010\u0007\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\u0007\u0010\u0004J\u0010\u0010\b\u001a\u00020\u0002HÆ\u0003¢\u0006\u0004\b\b\u0010\u0004JB\u0010\u000e\u001a\u00020\u00002\b\b\u0002\u0010\t\u001a\u00020\u00022\b\b\u0002\u0010\n\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\u00022\b\b\u0002\u0010\f\u001a\u00020\u00022\b\b\u0002\u0010\r\u001a\u00020\u0002HÆ\u0001¢\u0006\u0004\b\u000e\u0010\u000fJ\u0010\u0010\u0011\u001a\u00020\u0010HÖ\u0001¢\u0006\u0004\b\u0011\u0010\u0012J\u0010\u0010\u0014\u001a\u00020\u0013HÖ\u0001¢\u0006\u0004\b\u0014\u0010\u0015J\u001a\u0010\u0018\u001a\u00020\u00022\b\u0010\u0017\u001a\u0004\u0018\u00010\u0016HÖ\u0003¢\u0006\u0004\b\u0018\u0010\u0019J\u0010\u0010\u001a\u001a\u00020\u0013HÖ\u0001¢\u0006\u0004\b\u001a\u0010\u0015J \u0010\u001f\u001a\u00020\u001e2\u0006\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u001d\u001a\u00020\u0013HÖ\u0001¢\u0006\u0004\b\u001f\u0010 R\"\u0010\n\u001a\u00020\u00028\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b!\u0010\"\u001a\u0004\b\n\u0010\u0004\"\u0004\b#\u0010$R\"\u0010\u000b\u001a\u00020\u00028\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b%\u0010\"\u001a\u0004\b\u000b\u0010\u0004\"\u0004\b&\u0010$R\"\u0010\t\u001a\u00020\u00028\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b'\u0010\"\u001a\u0004\b\t\u0010\u0004\"\u0004\b(\u0010$R\"\u0010\f\u001a\u00020\u00028\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b)\u0010\"\u001a\u0004\b\f\u0010\u0004\"\u0004\b*\u0010$R\"\u0010\r\u001a\u00020\u00028\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b+\u0010\"\u001a\u0004\b\r\u0010\u0004\"\u0004\b,\u0010$¨\u0006/"}, d2 = {"Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor$State;", "Landroid/os/Parcelable;", "", "component1", "()Z", "component2", "component3", "component4", "component5", "isMediaStartTracked", "isMediaFirstQuartileTracked", "isMediaMidpointTracked", "isMediaThirdQuartileTracked", "isMediaCompleteTracked", "copy", "(ZZZZZ)Lcom/avito/android/player/presenter/analytics/PlayerAnalyticsInteractor$State;", "", "toString", "()Ljava/lang/String;", "", "hashCode", "()I", "", "other", "equals", "(Ljava/lang/Object;)Z", "describeContents", "Landroid/os/Parcel;", "parcel", "flags", "", "writeToParcel", "(Landroid/os/Parcel;I)V", AuthSource.BOOKING_ORDER, "Z", "setMediaFirstQuartileTracked", "(Z)V", "c", "setMediaMidpointTracked", AuthSource.SEND_ABUSE, "setMediaStartTracked", "d", "setMediaThirdQuartileTracked", "e", "setMediaCompleteTracked", "<init>", "(ZZZZZ)V", "player_release"}, k = 1, mv = {1, 4, 2})
public static final class State implements Parcelable {
public static final Parcelable.Creator<State> CREATOR = new Creator();
public boolean a;
public boolean b;
public boolean c;
public boolean d;
public boolean e;
@Metadata(bv = {1, 0, 3}, d1 = {}, d2 = {}, k = 3, mv = {1, 4, 2})
public static class Creator implements Parcelable.Creator<State> {
@Override // android.os.Parcelable.Creator
@NotNull
public final State createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "in");
return new State(parcel.readInt() != 0, parcel.readInt() != 0, parcel.readInt() != 0, parcel.readInt() != 0, parcel.readInt() != 0);
}
@Override // android.os.Parcelable.Creator
@NotNull
public final State[] newArray(int i) {
return new State[i];
}
}
public State() {
this(false, false, false, false, false, 31, null);
}
public State(boolean z, boolean z2, boolean z3, boolean z4, boolean z5) {
this.a = z;
this.b = z2;
this.c = z3;
this.d = z4;
this.e = z5;
}
public static /* synthetic */ State copy$default(State state, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, int i, Object obj) {
if ((i & 1) != 0) {
z = state.a;
}
if ((i & 2) != 0) {
z2 = state.b;
}
if ((i & 4) != 0) {
z3 = state.c;
}
if ((i & 8) != 0) {
z4 = state.d;
}
if ((i & 16) != 0) {
z5 = state.e;
}
return state.copy(z, z2, z3, z4, z5);
}
public final boolean component1() {
return this.a;
}
public final boolean component2() {
return this.b;
}
public final boolean component3() {
return this.c;
}
public final boolean component4() {
return this.d;
}
public final boolean component5() {
return this.e;
}
@NotNull
public final State copy(boolean z, boolean z2, boolean z3, boolean z4, boolean z5) {
return new State(z, z2, z3, z4, z5);
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // java.lang.Object
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof State)) {
return false;
}
State state = (State) obj;
return this.a == state.a && this.b == state.b && this.c == state.c && this.d == state.d && this.e == state.e;
}
@Override // java.lang.Object
public int hashCode() {
boolean z = this.a;
int i = 1;
if (z) {
z = true;
}
int i2 = z ? 1 : 0;
int i3 = z ? 1 : 0;
int i4 = z ? 1 : 0;
int i5 = i2 * 31;
boolean z2 = this.b;
if (z2) {
z2 = true;
}
int i6 = z2 ? 1 : 0;
int i7 = z2 ? 1 : 0;
int i8 = z2 ? 1 : 0;
int i9 = (i5 + i6) * 31;
boolean z3 = this.c;
if (z3) {
z3 = true;
}
int i10 = z3 ? 1 : 0;
int i11 = z3 ? 1 : 0;
int i12 = z3 ? 1 : 0;
int i13 = (i9 + i10) * 31;
boolean z4 = this.d;
if (z4) {
z4 = true;
}
int i14 = z4 ? 1 : 0;
int i15 = z4 ? 1 : 0;
int i16 = z4 ? 1 : 0;
int i17 = (i13 + i14) * 31;
boolean z5 = this.e;
if (!z5) {
i = z5 ? 1 : 0;
}
return i17 + i;
}
public final boolean isMediaCompleteTracked() {
return this.e;
}
public final boolean isMediaFirstQuartileTracked() {
return this.b;
}
public final boolean isMediaMidpointTracked() {
return this.c;
}
public final boolean isMediaStartTracked() {
return this.a;
}
public final boolean isMediaThirdQuartileTracked() {
return this.d;
}
public final void setMediaCompleteTracked(boolean z) {
this.e = z;
}
public final void setMediaFirstQuartileTracked(boolean z) {
this.b = z;
}
public final void setMediaMidpointTracked(boolean z) {
this.c = z;
}
public final void setMediaStartTracked(boolean z) {
this.a = z;
}
public final void setMediaThirdQuartileTracked(boolean z) {
this.d = z;
}
@Override // java.lang.Object
@NotNull
public String toString() {
StringBuilder L = a.L("State(isMediaStartTracked=");
L.append(this.a);
L.append(", isMediaFirstQuartileTracked=");
L.append(this.b);
L.append(", isMediaMidpointTracked=");
L.append(this.c);
L.append(", isMediaThirdQuartileTracked=");
L.append(this.d);
L.append(", isMediaCompleteTracked=");
return a.B(L, this.e, ")");
}
@Override // android.os.Parcelable
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
parcel.writeInt(this.a ? 1 : 0);
parcel.writeInt(this.b ? 1 : 0);
parcel.writeInt(this.c ? 1 : 0);
parcel.writeInt(this.d ? 1 : 0);
parcel.writeInt(this.e ? 1 : 0);
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ State(boolean z, boolean z2, boolean z3, boolean z4, boolean z5, int i, j jVar) {
this((i & 1) != 0 ? false : z, (i & 2) != 0 ? false : z2, (i & 4) != 0 ? false : z3, (i & 8) != 0 ? false : z4, (i & 16) != 0 ? false : z5);
}
}
void restoreState(@NotNull State state);
@NotNull
State saveState();
void trackClose();
void trackFastForward();
void trackMediaCompleteIfNeeded();
void trackMediaFirstQuartileIfNeeded();
void trackMediaMidpointIfNeeded();
void trackMediaStartIfNeeded();
void trackMediaThirdQuartileIfNeeded();
void trackPause();
void trackResume();
void trackRewind();
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
9ad0e94ab54b8c0a64694b9cd5d75dc96ce767a2 | c33a825aa87d1e93469222712ae5fbadc73bdca1 | /app/src/main/java/kr/picture/poketme/cms/helper/LogHelper.java | 5b0679cdf6fb968751e317b97420654015080bab | [] | no_license | cion49235/PoketMe | 37edbf3e64b98fec226fab2e40a92feb0a40a163 | 2183a5f0add3b2a8493f1994305da2f064c7c1f2 | refs/heads/master | 2020-05-07T08:12:08.524250 | 2019-04-16T07:18:56 | 2019-04-16T07:19:01 | 180,315,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,720 | java | package kr.picture.poketme.cms.helper;
import android.util.Log;
import java.util.Locale;
import java.util.MissingFormatArgumentException;
public class LogHelper {
/**
* 로그 출력 모드 - 디버그
*/
private static byte DEBUG = 0x00;
/**
* 로그 출력 모드 - 에러
*/
private static byte ERROR = 0x01;
/**
* 로그 출력 모드 - 정보
*/
private static byte INFO = 0x02;
/**
* 로그 출력 모드 - 경고
*/
private static byte WARRING = 0x03;
/*************************************************************
* 로그 출력
*
* @param type 로그 유형 (LogHelper.DEBUG, LogHelper.ERROR, LogHelper.INFO)
* @param clsName 클래스 이름
* @param msg 로그 메시지
*************************************************************/
private static void print(byte type, String clsName, String msg) {
if (Config.isLogVisible()) {
String logMsg = String.format(Locale.getDefault(), "[%s] %s", clsName, msg);
if (type == DEBUG) {
Log.d(Config.getLogTag(), logMsg);
} else if (type == ERROR) {
Log.e(Config.getLogTag(), logMsg);
} else if (type == WARRING) {
Log.w(Config.getLogTag(), logMsg);
} else {
Log.i(Config.getLogTag(), logMsg);
}
}
}
/*************************************************************
* 디버그 로그 출력
*
* @param cls 메소드를 호출한 클래스
* @param format 로그 메시지 포멧
* @param args 파라미터
*************************************************************/
public static void debug(Object cls, String format,
Object... args) {
try{
print(DEBUG, cls.getClass().getSimpleName(),
String.format(Locale.getDefault(), format, args));
}catch (MissingFormatArgumentException e){
}catch (Exception e){
}
}
/*************************************************************
* 에러 로그 출력
*
* @param cls 메소드를 호출한 클래스
* @param format 로그 메시지 포멧
* @param args 파라미터
*************************************************************/
public static void error(Object cls, String format,
Object... args) {
print(ERROR, cls.getClass().getSimpleName(),
String.format(Locale.getDefault(), format, args));
}
/*************************************************************
* 태그가 있는 정보 로그 출력
*
* @param cls 메소드를 호출한 클래스
* @param format 로그 메시지 포멧
* @param args 파라미터
*************************************************************/
public static void info(Object cls, String format,
Object... args) {
print(INFO, cls.getClass().getSimpleName(),
String.format(Locale.getDefault(), format, args));
}
/*************************************************************
* 태그가 있는 경고 로그 출력
*
* @param cls 메소드를 호출한 클래스
* @param format 로그 메시지 포멧
* @param args 파라미터
*************************************************************/
public static void warring(Object cls, String format,
Object... args) {
print(WARRING, cls.getClass().getSimpleName(),
String.format(Locale.getDefault(), format, args));
}
}
| [
"cion49235@nate.com"
] | cion49235@nate.com |
b6b0463be4cd412d3b7013209101744da3e62aab | dc947069409d7f42bb6831a25e4751db23f97c25 | /src/main/java/com/puyuntech/flowerToHome/service/impl/AdminServiceImpl.java | 90de0d972deb6af2257282b21933df291c46c3ca | [] | no_license | WangKB/fth | f1989cfb81e8771690b9dabf4020ac504cae015b | 70a24ddad40be6616611372de9e1dee3b17d2231 | refs/heads/master | 2021-01-18T21:17:39.042261 | 2016-05-20T05:08:33 | 2016-05-20T05:08:33 | 54,521,056 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,657 | java | package com.puyuntech.flowerToHome.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import javax.annotation.Resource;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.puyuntech.flowerToHome.Principal;
import com.puyuntech.flowerToHome.dao.AdminDao;
import com.puyuntech.flowerToHome.entity.Admin;
import com.puyuntech.flowerToHome.service.AdminService;
/**
*
* Service - 管理员.
* Created on 2015-8-25 下午5:19:26
* @author 王凯斌
*/
@Service("adminServiceImpl")
public class AdminServiceImpl extends BaseServiceImpl<Admin, Integer> implements AdminService {
@Resource(name = "adminDaoImpl")
private AdminDao adminDao;
@Transactional(readOnly = true)
public boolean usernameExists(String username) {
return adminDao.usernameExists(username);
}
@Transactional(readOnly = true)
public boolean posUsernameExists(String username) {
return adminDao.posUsernameExists(username);
}
@Transactional(readOnly = true)
public Admin findByUsername(String username) {
return adminDao.findByUsername(username);
}
@Transactional(readOnly = true)
public List<String> findAuthorities(Long id) {
List<String> authorities = new ArrayList<String>();
return authorities;
}
@Transactional(readOnly = true)
public boolean isAuthenticated() {
Subject subject = SecurityUtils.getSubject();
if (subject != null) {
return subject.isAuthenticated();
}
return false;
}
@Transactional(readOnly = true)
public Admin getCurrent() {
Subject subject = SecurityUtils.getSubject();
if (subject != null) {
Principal principal = (Principal) subject.getPrincipal();
if (principal != null) {
return adminDao.find(principal.getId());
}
}
return null;
}
@Transactional(readOnly = true)
public String getCurrentUsername() {
Subject subject = SecurityUtils.getSubject();
if (subject != null) {
Principal principal = (Principal) subject.getPrincipal();
if (principal != null) {
return principal.getUsername();
}
}
return null;
}
@Transactional(readOnly = true)
@Cacheable(value = "loginToken")
public String getLoginToken() {
return DigestUtils.md5Hex(UUID.randomUUID() + RandomStringUtils.randomAlphabetic(30));
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public Admin save(Admin admin) {
return super.save(admin);
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public Admin update(Admin admin) {
return super.update(admin);
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public Admin update(Admin admin, String... ignoreProperties) {
return super.update(admin, ignoreProperties);
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public void delete(Integer id) {
super.delete(id);
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public void delete(Integer... ids) {
super.delete(ids);
}
@Override
@Transactional
@CacheEvict(value = "authorization", allEntries = true)
public void delete(Admin admin) {
super.delete(admin);
}
@Override
public List<String> findAuthorities(Integer id) {
// TODO Auto-generated method stub
return null;
}
} | [
"wang.kaibin@puyuntech.com"
] | wang.kaibin@puyuntech.com |
fee03772c8ac6f18fc951e4f3f7f3996bbce389c | 0ba4bc1f3d3ffa77e10345e9e1b09712317807bc | /app/src/main/java/com/example/android/mymo/model/Movie.java | bc7b9eaf476560b4b062f4b51aa1407493c87fdd | [
"MIT"
] | permissive | archanadeveloper18/MovieApp-Stage2 | cbf7567a5819e76e564a9ef9f60b0e79d65b8305 | 78038e52fcd0a219d36357000ab9ba1912277cbc | refs/heads/master | 2020-06-03T07:44:13.183798 | 2019-10-25T03:37:19 | 2019-10-25T03:37:19 | 191,499,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,768 | java | package com.example.android.mymo.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.os.Parcel;
import android.os.Parcelable;
@Entity(tableName = "movie", indices = {@Index(value = {"movie_id"}, unique = true)})
public class Movie implements Parcelable {
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "movie_id")
private int movieId;
private String title;
@ColumnInfo(name = "poster_path")
private String posterPath;
@ColumnInfo(name = "backdrop_path")
private String backdropPath;
private String synopsis;
private double rating;
@ColumnInfo(name = "release_date")
private String releaseDate;
public Movie( int movieId, String title, String posterPath, String backdropPath,
String synopsis, double rating, String releaseDate ) {
this.movieId = movieId;
this.title = title;
this.posterPath = posterPath;
this.backdropPath = backdropPath;
this.synopsis = synopsis;
this.rating = rating;
this.releaseDate = releaseDate;
}
public int getMovieId() { return movieId; }
public void setMovieId(int id) { this.movieId = id; }
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPosterPath() {
return posterPath;
}
public void setPosterPath(String posterPath) {
this.posterPath = posterPath;
}
public String getBackdropPath() { return backdropPath; }
public void setBackdropPath(String backDrop) { this.backdropPath = backDrop; }
public String getSynopsis() {
return synopsis;
}
public void setSynopsis(String synopsis) {
this.synopsis = synopsis;
}
public double getRating() {
return rating;
}
public void setRating(double rating) {
this.rating = rating;
}
public String getReleaseDate() {
return releaseDate;
}
public void setReleaseDate(String releaseDate) {
this.releaseDate = releaseDate;
}
@Override
public String toString() {
return "{" + "\n" +
"MovieId: " + getMovieId() + "\n" +
"title: " + getTitle() + "\n" +
"poster path: " + getPosterPath() + "\n" +
"backdrop path: " + getBackdropPath() + "\n" +
"synopsis: " + getSynopsis() + "\n" +
"average rating: " + getRating() + "\n" +
"release date: " + getReleaseDate() + "\n" +
"}";
}
public static final Parcelable.Creator<Movie> CREATOR = new Parcelable.Creator<Movie>() {
@Override
public Movie createFromParcel(Parcel in) {
return new Movie(in);
}
@Override
public Movie[] newArray(int size) {
return new Movie[size];
}
};
private Movie(Parcel in) {
movieId = in.readInt();
title = in.readString();
posterPath = in.readString();
backdropPath = in.readString();
synopsis = in.readString();
releaseDate = in.readString();
rating = in.readDouble();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(movieId);
parcel.writeString(title);
parcel.writeString(posterPath);
parcel.writeString(backdropPath);
parcel.writeString(synopsis);
parcel.writeString(releaseDate);
parcel.writeDouble(rating);
}
} | [
"archanadeveloper18@gmail.com"
] | archanadeveloper18@gmail.com |
378b12aec27e1def2fc81c04250fd145cac21c16 | 3764dd335bbbc3e5c659265c83e70f25aef870f0 | /stocksDemo/src/main/java/com/mphase/stocksDemo/StocksDemoApplication.java | ce6f6f44e5beb6bfa523ba462035d37bc988bf9d | [] | no_license | lohith741/StocksDemo | e896b8e022370a7016ff787eb000c5c868b82f24 | bb9ed0920364ede06ef207ead9c8981c130e3047 | refs/heads/master | 2021-01-13T23:50:13.424312 | 2020-02-23T20:23:28 | 2020-02-23T20:23:28 | 242,533,498 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 543 | java | package com.mphase.stocksDemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@SpringBootApplication
public class StocksDemoApplication {
public static void main(String[] args) {
SpringApplication.run(StocksDemoApplication.class, args);
}
}
| [
"lohith.b@tbitsglobal.com"
] | lohith.b@tbitsglobal.com |
f8ea1ed3778b344e0a887f72a51d1b5e930d7e11 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/22/22_fcfd9d0803fdb1af568857f5ba3c75415edd2247/BecauseServlet/22_fcfd9d0803fdb1af568857f5ba3c75415edd2247_BecauseServlet_t.java | 00808659b92854f39f63ca3da99cb57b9b41c21f | [] | 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 | 3,766 | java | /*
* Copyright Myrrix Ltd
*
* 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 net.myrrix.web.servlets;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.mahout.cf.taste.common.NoSuchItemException;
import org.apache.mahout.cf.taste.common.NoSuchUserException;
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.recommender.RecommendedItem;
import net.myrrix.common.LangUtils;
import net.myrrix.common.MyrrixRecommender;
import net.myrrix.common.NotReadyException;
/**
* <p>Responds to a GET request to {@code /because/[userID]/[itemID]?howMany=n}, and in turn calls
* {@link MyrrixRecommender#recommendedBecause(long, long, int)}. If howMany is not specified, defaults to
* {@link AbstractMyrrixServlet#DEFAULT_HOW_MANY}.</p>
*
* <p>Outputs item/score pairs in CSV or JSON format, like {@link RecommendServlet} does.</p>
*
* @author Sean Owen
*/
public final class BecauseServlet extends AbstractMyrrixServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
String pathInfo = request.getPathInfo();
Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
long userID;
long itemID;
try {
userID = Long.parseLong(pathComponents.next());
itemID = Long.parseLong(pathComponents.next());
} catch (NoSuchElementException nsee) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, nsee.toString());
return;
}
if (pathComponents.hasNext()) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Path too long");
return;
}
MyrrixRecommender recommender = getRecommender();
try {
List<RecommendedItem> similar = recommender.recommendedBecause(userID, itemID, getHowMany(request));
output(request, response, similar);
} catch (NoSuchUserException nsue) {
response.sendError(HttpServletResponse.SC_NOT_FOUND, nsue.toString());
} catch (NoSuchItemException nsie) {
response.sendError(HttpServletResponse.SC_NOT_FOUND, nsie.toString());
} catch (NotReadyException nre) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, nre.toString());
} catch (TasteException te) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, te.toString());
getServletContext().log("Unexpected error in " + getClass().getSimpleName(), te);
} catch (UnsupportedOperationException uoe) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, uoe.toString());
}
}
@Override
protected Integer getPartitionToServe(HttpServletRequest request, int numPartitions) {
String pathInfo = request.getPathInfo();
Iterator<String> pathComponents = SLASH.split(pathInfo).iterator();
long userID;
try {
userID = Long.parseLong(pathComponents.next());
} catch (NoSuchElementException nsee) {
return null;
}
return LangUtils.mod(userID, numPartitions);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
68188ff91c37469e0024e015931356fdb1925e3a | 98eacb767ad394847126f3081babd3a7378b0eb9 | /app/src/main/java/at/technikumwien/anda/wienerlinien/ui/fragment/LineDetailFragment.java | c905f8e8305180ce19eef79653dd21b4207e8079 | [] | no_license | davidschreiber/kaw-anda-workshop | d0e52fa39a0ce23d5e7866b1df185a604acc7fba | 01ca5828306899b3703e1736ca97b3c13c1f64fc | refs/heads/master | 2021-01-21T07:00:03.703324 | 2015-04-13T10:11:25 | 2015-04-13T10:11:25 | 33,850,904 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | package at.technikumwien.anda.wienerlinien.ui.fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import at.technikumwien.anda.wienerlinien.R;
import at.technikumwien.anda.wienerlinien.ui.activity.LineDetailActivity;
import at.technikumwien.anda.wienerlinien.ui.activity.LineListActivity;
/**
* A fragment representing a single Line detail screen.
* This fragment is either contained in a {@link LineListActivity}
* in two-pane mode (on tablets) or a {@link LineDetailActivity}
* on handsets.
*/
public class LineDetailFragment extends Fragment {
/**
* The fragment argument representing the item ID that this fragment
* represents.
*/
public static final String ARG_ITEM_ID = "item_id";
/**
* Mandatory empty constructor for the fragment manager to instantiate the
* fragment (e.g. upon screen orientation changes).
*/
public LineDetailFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_line_detail, container, false);
}
}
| [
"david@blockhaus-medien.at"
] | david@blockhaus-medien.at |
958f7272aa50d5ef2b299970489c4e3d2a5a3ada | e08682a48609402c31d059215cfb62adb32c993b | /common/src/main/java/com/gaoding/datay/common/plugin/PluginCollector.java | 096a7df51ced72d904c76aa8129b2c241b908f3f | [] | no_license | ywq20011/DataY | 96b1af92bf98899efc303dc2d21a94ef9fdb643a | 60310a86f69c13a21dcacc16e294486fd79b79b4 | refs/heads/main | 2023-03-15T17:58:53.379236 | 2021-03-08T09:57:09 | 2021-03-08T09:57:09 | 345,607,997 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 122 | java | package com.gaoding.datay.common.plugin;
/**
* 这里只是一个标示类
* */
public interface PluginCollector {
}
| [
"yuanfang@gaoding.com"
] | yuanfang@gaoding.com |
8d53c8f6061e67551b75b6fbe08f3bbd2f8da8d8 | 1c3f8f3f60c67e2b09dc02833f54e1941b263064 | /ecomdin/src/main/java/com/energiedin/restservice/repository/ProprietaireRepository.java | 19d11c7280829ea9e94cd7869a12c95fbc8ec3a5 | [] | no_license | sokffa/Ecomm | 3e87a556e881e82a94765bee3185322a8b65eab6 | 406064cb5b8f60479bd03f1f4a728d3b4ef2e226 | refs/heads/master | 2022-01-06T03:32:35.322928 | 2019-05-13T18:29:20 | 2019-05-13T18:29:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 366 | java | package com.energiedin.restservice.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RestResource;
import com.energiedin.restservice.entity.Proprietaire;
@RestResource(exported = false)
public interface ProprietaireRepository extends JpaRepository<Proprietaire ,String> {
}
| [
"Sabri @Sokffa"
] | Sabri @Sokffa |
17be6de931f3f35d5492235e182c70518f17bcc1 | a41662b2d7531321b8446ae4cc59567f45467f98 | /lesson/src/Lessoneight.java | 4dc81a7a88a72cd67426a666514e3d16c07dcffd | [] | no_license | sudipghimire/java_trainning | 28ceee3d85b41f3575aee0e0224ceab44d959c25 | df4d52c96fd91267c54857c308ed17b841a2c84b | refs/heads/master | 2016-09-06T05:18:50.257332 | 2014-02-18T01:12:06 | 2014-02-18T01:12:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,290 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Lessoneight {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws IOException {
Lessoneight eight = new Lessoneight();
String places[] = eight.constructFivePlaces();
eight.searchPlacesByUserInput(places);
}
public String[] constructFivePlaces() throws IOException {
System.out.println("enter the name of five place");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String place = br.readLine();
String[] places = place.split(" ");
return places;
}
public void searchPlacesByUserInput(String[] places) throws IOException {
System.out.println("which word would you like to search");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String entered_place = br.readLine();
System.out.println(entered_place);
boolean isFound = Boolean.FALSE;
for (String pl : places) {
if(pl.contains(entered_place)){
System.out.println("The " + entered_place + "is used in " + pl);
isFound = Boolean.TRUE;
}
}
if(!isFound)
{
System.out.println("the place is not in record: ");
}
}
}
| [
"sudip_gh@hotmail.com"
] | sudip_gh@hotmail.com |
6ba13fe7688a74d81723e631a65f3f3cd9026208 | 6a70eca406d1944d32e6cd2465d953b4d398de31 | /src/main/java/com/example/demo/repository/CartItemRepository.java | 6d55b323b7f864fc80edc18db112f4fea9d9972c | [] | no_license | RayOnFire/spring-demo | 85ca51d4cc0a71edeb2d621469c77f5c9f481d94 | 987ae451a009ef06fd0d74526ee3787d1eb53cac | refs/heads/master | 2021-09-01T12:37:00.116554 | 2017-12-27T01:59:50 | 2017-12-27T01:59:50 | 115,470,195 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 347 | java | package com.example.demo.repository;
import com.example.demo.model.CartItem;
import com.example.demo.model.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
/**
* Created by Ray on 2017/7/10.
*/
public interface CartItemRepository extends CrudRepository<CartItem, Long> {
}
| [
"q45231329@gmail.com"
] | q45231329@gmail.com |
ee3563ce20e3300d2046a181e9457439856a8013 | 671cff94f039ad75de967fec204d0238695dc2c0 | /app/src/main/java/com/vcsaba/beerware/marcadorapp/data/TeamDao.java | a899605431b903d3cb6e5a37b8800a216e4fc353 | [] | no_license | csabav/MarcadorApp | b1540173be6194b169aa03b01fd982f9a5393320 | 8c1c36d395111af4e6ec6229042da8f55492e618 | refs/heads/master | 2020-09-24T19:22:30.691527 | 2019-12-06T18:12:44 | 2019-12-06T18:12:44 | 225,824,982 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 584 | java | package com.vcsaba.beerware.marcadorapp.data;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;
import java.util.List;
@Dao
public interface TeamDao {
@Query("SELECT * FROM Team ORDER BY name ASC")
List<Team> getAll();
@Query("SELECT * FROM Team WHERE id = :id")
Team getOneById(long id);
@Query("DELETE FROM Team")
void clearTeams();
@Insert
long insert(Team team);
@Update
void update(Team team);
@Delete
void deleteItem(Team team);
}
| [
"viktorcsaba94@gmail.com"
] | viktorcsaba94@gmail.com |
cdc39a066dc17140b5462a18c2c9740bc39b4e69 | 4a3c40077072345f05285739ac914588b90dd913 | /demo/src/main/java/com/demo/base/BaseDaoImpl.java | c030be9dff297cfc02dc1658ff234946c6ff0032 | [] | no_license | yanbin93/HDFScloud | 68c996534a4a60cd35700f5e2ff4e4e8bc0c84ae | bd143e71eee18a29cedb3bdd77a5acff772b41e6 | refs/heads/master | 2020-12-30T17:10:20.571436 | 2017-06-26T14:13:26 | 2017-06-26T14:13:26 | 91,055,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,959 | java | package com.demo.base;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import com.demo.util.DBUtils;
/**
* jdbc连接 : 1创建连接对象 2拼sql 3 preparedstatemenet
* @author _oiYc
*
* @param <Entity>
*/
public class BaseDaoImpl<Entity> implements BaseDao<Entity>{
//public
protected Class clazz ;
public BaseDaoImpl(){
//System.out.println(this.getClass());
ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();
//带有真实类型参数的对象
clazz = (Class)pt.getActualTypeArguments()[0];
System.out.println(clazz);
}
/**
* 保存方法
*/
public void save(Entity obj) throws Exception {
//obj.getSimpleName();
Connection conn = DBUtils.createConn();
String sql = "insert into " + clazz.getSimpleName() + " values(null ";
// 可以获取本类所声明的变量
Field[] fs = clazz.getDeclaredFields();
//System.out.println(fs.length);
for (int i = 1; i < fs.length; i++) {
sql += ",? " ;
}
sql = sql + ")";
System.out.println(sql);
//进行预编译
PreparedStatement ps = DBUtils.getPs(conn, sql);
//ps.setString(1, user.getName());
for (int i = 1; i < fs.length; i++) {
//拼接方法的名称
String MethodName = "get" +Character.toUpperCase(fs[i].getName().charAt(0)) + fs[i].getName().substring(1) ;
Method m = clazz.getMethod(MethodName);
ps.setObject(i, m.invoke(obj));
}
ps.executeUpdate();
DBUtils.close(ps);
DBUtils.close(conn);
}
/**
* 更新方法
*/
public void update(Entity obj) throws Exception {
Connection conn = DBUtils.createConn();
// update user set name = ? , age = ? where id = ?
String sql = " update " + clazz.getSimpleName() + " set ";
Field[] fs = clazz.getDeclaredFields();
for (int i = 1; i < fs.length; i++) {
sql += fs[i].getName() + "=?,";
}
sql = sql.substring(0, sql.length()-1) + " where id = ? ";
PreparedStatement ps = DBUtils.getPs(conn, sql);
for (int i = 1; i < fs.length; i++) {
String methodName = "get" + Character.toUpperCase(fs[i].getName().charAt(0)) + fs[i].getName().substring(1);
Method m = clazz.getMethod(methodName);
ps.setObject(i, m.invoke(obj));// user.getName();
}
Method m2 = clazz.getMethod("getId");
ps.setInt(fs.length,(Integer)m2.invoke(obj));
ps.executeUpdate();
DBUtils.close(ps);
DBUtils.close(conn);
}
/**
* 根据一个id 查找对象
*/
public Entity findById(int id) throws Exception {
Connection conn = DBUtils.createConn();
String sql = " select * from " + clazz.getSimpleName() + " where id = " + id ;
PreparedStatement ps = DBUtils.getPs(conn, sql);
ResultSet rs = ps.executeQuery();
Entity entity = (Entity) clazz.newInstance();
if(rs.next()){
Field[] fs = clazz.getDeclaredFields();
for (int i = 0; i < fs.length; i++) {
String methodName = "set" + Character.toUpperCase(fs[i].getName().charAt(0)) + fs[i].getName().substring(1);
Method m = clazz.getDeclaredMethod(methodName, fs[i].getType());
m.invoke(entity, rs.getObject(fs[i].getName()));
}
}
DBUtils.close(rs);
DBUtils.close(ps);
DBUtils.close(conn);
return entity;
}
/**
* 查询所有
*/
public List<Entity> findAll() throws Exception {
Connection conn = DBUtils.createConn();
String sql =" select * from " + clazz.getSimpleName();
PreparedStatement ps = DBUtils.getPs(conn, sql);
List<Entity> list = new ArrayList<Entity>();
ResultSet rs = ps.executeQuery();
while(rs.next()){
Entity entity = (Entity)clazz.newInstance();
Field[] fs = clazz.getDeclaredFields();
for (int i = 0; i < fs.length; i++) {
String methodName = "set"+ Character.toUpperCase(fs[i].getName().charAt(0)) + fs[i].getName().substring(1);
Method m = clazz.getMethod(methodName, fs[i].getType());
m.invoke(entity, rs.getObject(fs[i].getName()));
}
list.add(entity);
}
DBUtils.close(rs);
DBUtils.close(ps);
DBUtils.close(conn);
return list;
}
/**
* 删除方法
*/
public void delete(int id) throws Exception {
Connection conn = DBUtils.createConn();
String sql = " delete from " + clazz.getSimpleName() + " where id =" +id;
PreparedStatement ps = DBUtils.getPs(conn, sql);
ps.executeUpdate(sql);
DBUtils.close(ps);
DBUtils.close(conn);
}
/**
* 条件查询的反射封装方法
* @param sql
* @param params
* @return
*/
public List<Entity> queryListForParams(String sql,Object[] params ) throws Exception{
Connection conn = DBUtils.createConn();
PreparedStatement ps = null;
ResultSet rs = null;
List list = new ArrayList();
try {
// 建立statement对象(封装了sql)
ps = conn.prepareStatement(sql); // select * from org where id = ? and name = ? [1 , z3]
if(params!=null){
for(int i=0;i<params.length;i++){
ps.setObject(i+1, params[i]);
}
}
Field[] fs = clazz.getDeclaredFields();
rs = ps.executeQuery();
while(rs.next()){
Object obj = clazz.getConstructor().newInstance();
for(int i = 0 ; i <fs.length;i++ ){
String methodName = "set" +fs[i].getName().substring(0, 1).toUpperCase()+fs[i].getName().substring(1);
Method m = clazz.getMethod(methodName, fs[i].getType());
Object value = rs.getObject(fs[i].getName());
m.invoke(obj, value);
}
list.add(obj);
}
} catch (Exception e) {
e.printStackTrace();
}finally{
DBUtils.close(rs);
DBUtils.close(ps);
DBUtils.close(conn);
}
return list;
}
}
| [
"1010652868@qq.com"
] | 1010652868@qq.com |
28c4e4173ffef7a9b37f70511f2566c080a736cf | 7b9910ba09feeafba6997d96829822662b9eabe5 | /app/src/main/java/android/support/supportsystem/model/PickedMembers.java | fb33b4c9a693772ca75353c2bb13a06153c5ad6e | [] | no_license | mahmoudshahen/Committee | 52fc4000bcfd5c9b8190baeffe6fcf9f353f99c7 | 54dc37844fb3a4d1fb8e7afdadb651103fb449dd | refs/heads/master | 2020-06-21T20:24:08.990336 | 2016-12-29T19:59:16 | 2016-12-29T19:59:16 | 74,772,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,192 | java | package android.support.supportsystem.model;
import java.io.Serializable;
import java.util.List;
/**
* Created by mahmoud shahen on 10/21/2016.
*/
public class PickedMembers implements Serializable{
private String memberId;
private Boolean Delivered;
private String deliveryTime;
private String Content;
private List<Comment> Comments;
public PickedMembers()
{}
public String getMemberId() {
return memberId;
}
public void setMemberId(String memberId) {
this.memberId = memberId;
}
public Boolean getDelivered() {
return Delivered;
}
public void setDelivered(Boolean delivered) {
Delivered = delivered;
}
public String getDeliveryTime() {
return deliveryTime;
}
public void setDeliveryTime(String deliveryTime) {
this.deliveryTime = deliveryTime;
}
public String getContent() {
return Content;
}
public void setContent(String content) {
Content = content;
}
public List<Comment> getComments() {
return Comments;
}
public void setComments(List<Comment> comments) {
Comments = comments;
}
}
| [
"mahmoud.salah@cis.asu.edu.eg"
] | mahmoud.salah@cis.asu.edu.eg |
09cd0c4f3271827d7b8ed098e36788652a3ec5ac | 360fab327e0485d6737d8879e9941c13f05c3812 | /src/test/java/code/ponfee/email/POP3ReceiveMailTest.java | 5e21fc1a637ec1aff8212edfad29c2b3ff79802f | [
"MIT"
] | permissive | ponfee/commons-email | 56721363b864b2deb488e79b86b276c8a6962e7c | b12e41d54f50c2cb3076d553bd01ae6aa946f6f2 | refs/heads/master | 2021-09-08T18:14:56.140054 | 2021-09-08T03:36:33 | 2021-09-08T03:36:33 | 168,265,639 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,543 | java | package code.ponfee.email;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Flags;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Part;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.MimeUtility;
/**
* 使用POP3协议接收邮件
*/
public class POP3ReceiveMailTest {
public static void main(String[] args) throws Exception {
receive();
}
/**
* 接收邮件
*/
public static void receive() throws Exception {
// 准备连接服务器的会话信息
Properties props = new Properties();
props.setProperty("mail.store.protocol", "pop3"); // 协议
props.setProperty("mail.pop3.port", "110"); // 端口
props.setProperty("mail.pop3.host", "pop3.163.com"); // pop3服务器
// 创建Session实例对象
Session session = Session.getInstance(props);
Store store = session.getStore("pop3");
store.connect("xyang0917@163.com", "123456abc");
// 获得收件箱
Folder folder = store.getFolder("INBOX");
/* Folder.READ_ONLY:只读权限
* Folder.READ_WRITE:可读可写(可以修改邮件的状态)
*/
folder.open(Folder.READ_WRITE); //打开收件箱
// 由于POP3协议无法获知邮件的状态,所以getUnreadMessageCount得到的是收件箱的邮件总数
System.out.println("未读邮件数: " + folder.getUnreadMessageCount());
// 由于POP3协议无法获知邮件的状态,所以下面得到的结果始终都是为0
System.out.println("删除邮件数: " + folder.getDeletedMessageCount());
System.out.println("新邮件: " + folder.getNewMessageCount());
// 获得收件箱中的邮件总数
System.out.println("邮件总数: " + folder.getMessageCount());
// 得到收件箱中的所有邮件,并解析
Message[] messages = folder.getMessages();
parseMessage(messages);
//释放资源
folder.close(true);
store.close();
}
/**
* 解析邮件
* @param messages 要解析的邮件列表
*/
public static void parseMessage(Message... messages) throws MessagingException, IOException {
if (messages == null || messages.length < 1) throw new MessagingException("未找到要解析的邮件!");
// 解析所有邮件
for (int i = 0, count = messages.length; i < count; i++) {
MimeMessage msg = (MimeMessage) messages[i];
System.out.println("------------------解析第" + msg.getMessageNumber() + "封邮件-------------------- ");
System.out.println("主题: " + getSubject(msg));
System.out.println("发件人: " + getFrom(msg));
System.out.println("收件人:" + getReceiveAddress(msg, null));
System.out.println("发送时间:" + getSentDate(msg, null));
System.out.println("是否已读:" + isSeen(msg));
System.out.println("邮件优先级:" + getPriority(msg));
System.out.println("是否需要回执:" + isReplySign(msg));
System.out.println("邮件大小:" + msg.getSize() * 1024 + "kb");
boolean isContainerAttachment = isContainAttachment(msg);
System.out.println("是否包含附件:" + isContainerAttachment);
if (isContainerAttachment) {
saveAttachment(msg, "c:\\mailtmp\\" + msg.getSubject() + "_"); //保存附件
}
StringBuffer content = new StringBuffer(30);
getMailTextContent(msg, content);
System.out.println("邮件正文:" + (content.length() > 100 ? content.substring(0, 100) + "..." : content));
System.out.println("------------------第" + msg.getMessageNumber() + "封邮件解析结束-------------------- ");
System.out.println();
}
}
/**
* 获得邮件主题
* @param msg 邮件内容
* @return 解码后的邮件主题
*/
public static String getSubject(MimeMessage msg) throws UnsupportedEncodingException, MessagingException {
return MimeUtility.decodeText(msg.getSubject());
}
/**
* 获得邮件发件人
* @param msg 邮件内容
* @return 姓名 <Email地址>
* @throws MessagingException
* @throws UnsupportedEncodingException
*/
public static String getFrom(MimeMessage msg) throws MessagingException, UnsupportedEncodingException {
String from = "";
Address[] froms = msg.getFrom();
if (froms.length < 1) throw new MessagingException("没有发件人!");
InternetAddress address = (InternetAddress) froms[0];
String person = address.getPersonal();
if (person != null) {
person = MimeUtility.decodeText(person) + " ";
} else {
person = "";
}
from = person + "<" + address.getAddress() + ">";
return from;
}
/**
* 根据收件人类型,获取邮件收件人、抄送和密送地址。如果收件人类型为空,则获得所有的收件人
* <p>Message.RecipientType.TO 收件人</p>
* <p>Message.RecipientType.CC 抄送</p>
* <p>Message.RecipientType.BCC 密送</p>
* @param msg 邮件内容
* @param type 收件人类型
* @return 收件人1 <邮件地址1>, 收件人2 <邮件地址2>, ...
* @throws MessagingException
*/
public static String getReceiveAddress(MimeMessage msg, Message.RecipientType type) throws MessagingException {
StringBuffer receiveAddress = new StringBuffer();
Address[] addresss = null;
if (type == null) {
addresss = msg.getAllRecipients();
} else {
addresss = msg.getRecipients(type);
}
if (addresss == null || addresss.length < 1) throw new MessagingException("没有收件人!");
for (Address address : addresss) {
InternetAddress internetAddress = (InternetAddress) address;
receiveAddress.append(internetAddress.toUnicodeString()).append(",");
}
receiveAddress.deleteCharAt(receiveAddress.length() - 1); //删除最后一个逗号
return receiveAddress.toString();
}
/**
* 获得邮件发送时间
* @param msg 邮件内容
* @return yyyy年mm月dd日 星期X HH:mm
* @throws MessagingException
*/
public static String getSentDate(MimeMessage msg, String pattern) throws MessagingException {
Date receivedDate = msg.getSentDate();
if (receivedDate == null) return "";
if (pattern == null || "".equals(pattern)) pattern = "yyyy年MM月dd日 E HH:mm ";
return new SimpleDateFormat(pattern).format(receivedDate);
}
/**
* 判断邮件中是否包含附件
* @param part 邮件内容
* @return 邮件中存在附件返回true,不存在返回false
* @throws MessagingException
* @throws IOException
*/
public static boolean isContainAttachment(Part part) throws MessagingException, IOException {
boolean flag = false;
if (part.isMimeType("multipart/*")) {
MimeMultipart multipart = (MimeMultipart) part.getContent();
int partCount = multipart.getCount();
for (int i = 0; i < partCount; i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
String disp = bodyPart.getDisposition();
if (disp != null && (disp.equalsIgnoreCase(Part.ATTACHMENT) || disp.equalsIgnoreCase(Part.INLINE))) {
flag = true;
} else if (bodyPart.isMimeType("multipart/*")) {
flag = isContainAttachment(bodyPart);
} else {
String contentType = bodyPart.getContentType();
if (contentType.indexOf("application") != -1) {
flag = true;
}
if (contentType.indexOf("name") != -1) {
flag = true;
}
}
if (flag) break;
}
} else if (part.isMimeType("message/rfc822")) {
flag = isContainAttachment((Part) part.getContent());
}
return flag;
}
/**
* 判断邮件是否已读 www.2cto.com
* @param msg 邮件内容
* @return 如果邮件已读返回true,否则返回false
* @throws MessagingException
*/
public static boolean isSeen(MimeMessage msg) throws MessagingException {
return msg.getFlags().contains(Flags.Flag.SEEN);
}
/**
* 判断邮件是否需要阅读回执
* @param msg 邮件内容
* @return 需要回执返回true,否则返回false
* @throws MessagingException
*/
public static boolean isReplySign(MimeMessage msg) throws MessagingException {
boolean replySign = false;
String[] headers = msg.getHeader("Disposition-Notification-To");
if (headers != null) replySign = true;
return replySign;
}
/**
* 获得邮件的优先级
* @param msg 邮件内容
* @return 1(High):紧急 3:普通(Normal) 5:低(Low)
* @throws MessagingException
*/
public static String getPriority(MimeMessage msg) throws MessagingException {
String priority = "普通";
String[] headers = msg.getHeader("X-Priority");
if (headers != null) {
String headerPriority = headers[0];
if (headerPriority.indexOf("1") != -1 || headerPriority.indexOf("High") != -1) priority = "紧急";
else if (headerPriority.indexOf("5") != -1 || headerPriority.indexOf("Low") != -1) priority = "低";
else priority = "普通";
}
return priority;
}
/**
* 获得邮件文本内容
* @param part 邮件体
* @param content 存储邮件文本内容的字符串
* @throws MessagingException
* @throws IOException
*/
public static void getMailTextContent(Part part, StringBuffer content) throws MessagingException, IOException {
//如果是文本类型的附件,通过getContent方法可以取到文本内容,但这不是我们需要的结果,所以在这里要做判断
boolean isContainTextAttach = part.getContentType().indexOf("name") > 0;
if (part.isMimeType("text/*") && !isContainTextAttach) {
content.append(part.getContent().toString());
} else if (part.isMimeType("message/rfc822")) {
getMailTextContent((Part) part.getContent(), content);
} else if (part.isMimeType("multipart/*")) {
Multipart multipart = (Multipart) part.getContent();
int partCount = multipart.getCount();
for (int i = 0; i < partCount; i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
getMailTextContent(bodyPart, content);
}
}
}
/**
* 保存附件
* @param part 邮件中多个组合体中的其中一个组合体
* @param destDir 附件保存目录
* @throws UnsupportedEncodingException
* @throws MessagingException
* @throws FileNotFoundException
* @throws IOException
*/
public static void saveAttachment(Part part, String destDir) throws MessagingException,
IOException {
if (part.isMimeType("multipart/*")) {
Multipart multipart = (Multipart) part.getContent(); //复杂体邮件
//复杂体邮件包含多个邮件体
int partCount = multipart.getCount();
for (int i = 0; i < partCount; i++) {
//获得复杂体邮件中其中一个邮件体
BodyPart bodyPart = multipart.getBodyPart(i);
//某一个邮件体也有可能是由多个邮件体组成的复杂体
String disp = bodyPart.getDisposition();
if (disp != null && (disp.equalsIgnoreCase(Part.ATTACHMENT) || disp.equalsIgnoreCase(Part.INLINE))) {
InputStream is = bodyPart.getInputStream();
saveFile(is, destDir, decodeText(bodyPart.getFileName()));
} else if (bodyPart.isMimeType("multipart/*")) {
saveAttachment(bodyPart, destDir);
} else {
String contentType = bodyPart.getContentType();
if (contentType.indexOf("name") != -1 || contentType.indexOf("application") != -1) {
saveFile(bodyPart.getInputStream(), destDir, decodeText(bodyPart.getFileName()));
}
}
}
} else if (part.isMimeType("message/rfc822")) {
saveAttachment((Part) part.getContent(), destDir);
}
}
/**
* 读取输入流中的数据保存至指定目录
* @param is 输入流
* @param fileName 文件名
* @param destDir 文件存储目录
* @throws FileNotFoundException
* @throws IOException
*/
private static void saveFile(InputStream is, String destDir, String fileName)
throws IOException {
BufferedInputStream bis = new BufferedInputStream(is);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File(destDir + fileName)));
int len = -1;
while ((len = bis.read()) != -1) {
bos.write(len);
bos.flush();
}
bos.close();
bis.close();
}
/**
* 文本解码
* @param encodeText 解码MimeUtility.encodeText(String text)方法编码后的文本
* @return 解码后的文本
* @throws UnsupportedEncodingException
*/
public static String decodeText(String encodeText) throws UnsupportedEncodingException {
if (encodeText == null || "".equals(encodeText)) {
return "";
} else {
return MimeUtility.decodeText(encodeText);
}
}
}
| [
"fupengfei1@sf-express.com"
] | fupengfei1@sf-express.com |
20e2b41fbe9faefe465396e6c39d911ab6718f7b | 7e6316aa54989bf1990c144dd00a3e53b06f3275 | /src/com/capgemini/controllers/CustomerController.java | 43d1f4e5ad58d33851c49f3d5b0fc9068cb2411a | [] | no_license | Shadabkazi/MiniProject | 95af16cd1526b6148a3ab72949a9669511664381 | 9d083e5df9f5478948aa4777dc1e4a09ae8e6dd4 | refs/heads/master | 2020-03-25T10:26:04.959508 | 2018-08-21T09:25:29 | 2018-08-21T09:25:29 | 143,693,063 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 950 | java | package com.capgemini.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.capgemini.models.Customer;
import com.capgemini.services.CustomerService;
@Controller
public class CustomerController {
@Autowired
private CustomerService customerService;
@RequestMapping(value="/register", method=RequestMethod.POST)
public String registerCustomer(@ModelAttribute Customer customer) {
// add in jsp file form modelAttribute="Customer"
customerService.insert(customer);
return "redirect:/";
}
@RequestMapping(value="signup", method=RequestMethod.GET)
public String showSignUpPage(ModelMap map) {
return "Signup";
}
}
| [
"kazishadab99@gmail.com"
] | kazishadab99@gmail.com |
c146dea7417a00be7e661fa9889ee302667b55b7 | a5d4c036a580ae393a501064e55bf60b2b4cbe3c | /Chapter 3/TestArrays.java | e24717833cb5bcd7263f36aba64465bccecb397a | [] | no_license | M4yankChoudhary/Head-First-java | 94df8cad798a78925e9f800b358fc46a20acfbc4 | 2aa885cac795acf6e2b7f666177a4b786d5065ca | refs/heads/master | 2020-04-17T11:31:16.189807 | 2019-05-30T03:59:20 | 2019-05-30T03:59:20 | 166,543,884 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 450 | java | class TestArrays{
public static void main (String[] args){
int [] index = new int[4];
index[0] = 1;
index[1] = 3;
index[2] = 0;
index[3] = 2;
String [] islands = new String[4];
islands[0] = "Bermuda";
islands[1] = "Fiji";
islands[2] = "Azores";
islands[3] = "Cozumel";
int y = 0;
int ref;
while (y<4) {
ref = index[y];
System.out.print("island = ");
System.out.println(islands[ref]);
y = y + 1;
}
}
}
| [
"[mayankchd10@gmail.com]"
] | [mayankchd10@gmail.com] |
9903d33fccd4c1d52641fdee10da36f67d212fdb | f5c545dbbe2aa1d24a25139833a6938bc894b83e | /BugProject/bug-service/src/main/java/com/sapient/bug/project/models/Bug.java | 3d3d715d4b550a77cc2678a884b8417ee16c6546 | [] | no_license | ASarchna/Bug-Resolver- | 7e49ff1aec18abe94327a97acd4752904295cbd7 | b917e5610c98a02611aa529302699136c067aa40 | refs/heads/main | 2023-07-04T05:02:42.648830 | 2021-08-08T16:07:21 | 2021-08-08T16:07:21 | 391,444,923 | 0 | 0 | null | 2021-08-03T16:10:08 | 2021-07-31T19:18:18 | Java | UTF-8 | Java | false | false | 830 | java | package com.sapient.bug.project.models;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
/**
*
* @author Archna
*
*/
@Getter
@Setter
public class Bug {
private String id;
//@Size(min = 24, max = 24)
private String projectId;
/**
* Name is mendatory
*/
//@NotBlank(message = "Name is Mandatory")
private String name;
/**
* Owner Name is mandatory
*/
//@NotBlank(message = "Owner Name is Mandatory")
private String ownerName;
//@Size(min = 20, max = 255)
private String description;
@NotBlank(message= "email can't be blank")
private String email;
private LocalDateTime createddate;
private LocalDateTime completeddate;
private BUG_STATUS status;
private BUG_PRIORITY priority;
}
| [
"bhartiarchna4@gmail.com"
] | bhartiarchna4@gmail.com |
0ef84f6478a002bfb46f0c1ddab5709665b9a1c2 | d08d05b3a0e86bc169ce6c67913cfe2e68c8da8e | /src/main/java/org/mvel2/compiler/AbstractParser.java | 644fcfe9906d087b8a40d6914ca7701c45e1243e | [
"MIT"
] | permissive | XhinLiang/jugg | 29570163a7379fdfadacb5f68ae9046ef585934f | 33cc20d5caf98a600445241afc176c00000d4f8a | refs/heads/master | 2022-12-11T19:18:08.937500 | 2019-05-02T11:22:40 | 2019-05-02T11:22:40 | 174,797,826 | 18 | 3 | MIT | 2022-12-03T01:30:47 | 2019-03-10T08:38:23 | Java | UTF-8 | Java | false | false | 111,734 | java | /**
* MVEL 2.0
* Copyright (C) 2007 The Codehaus
* Mike Brock, Dhanji Prasanna, John Graham, Mark Proctor
*
* 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.mvel2.compiler;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static org.mvel2.Operator.ADD;
import static org.mvel2.Operator.AND;
import static org.mvel2.Operator.ASSERT;
import static org.mvel2.Operator.ASSIGN;
import static org.mvel2.Operator.ASSIGN_ADD;
import static org.mvel2.Operator.ASSIGN_DIV;
import static org.mvel2.Operator.ASSIGN_MOD;
import static org.mvel2.Operator.ASSIGN_SUB;
import static org.mvel2.Operator.BW_AND;
import static org.mvel2.Operator.BW_OR;
import static org.mvel2.Operator.BW_SHIFT_LEFT;
import static org.mvel2.Operator.BW_SHIFT_RIGHT;
import static org.mvel2.Operator.BW_USHIFT_LEFT;
import static org.mvel2.Operator.BW_USHIFT_RIGHT;
import static org.mvel2.Operator.BW_XOR;
import static org.mvel2.Operator.CHOR;
import static org.mvel2.Operator.CONTAINS;
import static org.mvel2.Operator.CONVERTABLE_TO;
import static org.mvel2.Operator.DEC;
import static org.mvel2.Operator.DIV;
import static org.mvel2.Operator.DO;
import static org.mvel2.Operator.ELSE;
import static org.mvel2.Operator.END_OF_STMT;
import static org.mvel2.Operator.EQUAL;
import static org.mvel2.Operator.FOR;
import static org.mvel2.Operator.FOREACH;
import static org.mvel2.Operator.FUNCTION;
import static org.mvel2.Operator.GETHAN;
import static org.mvel2.Operator.GTHAN;
import static org.mvel2.Operator.IF;
import static org.mvel2.Operator.IMPORT;
import static org.mvel2.Operator.IMPORT_STATIC;
import static org.mvel2.Operator.INC;
import static org.mvel2.Operator.INSTANCEOF;
import static org.mvel2.Operator.ISDEF;
import static org.mvel2.Operator.LETHAN;
import static org.mvel2.Operator.LTHAN;
import static org.mvel2.Operator.MOD;
import static org.mvel2.Operator.MULT;
import static org.mvel2.Operator.NEQUAL;
import static org.mvel2.Operator.NEW;
import static org.mvel2.Operator.OR;
import static org.mvel2.Operator.POWER;
import static org.mvel2.Operator.PROJECTION;
import static org.mvel2.Operator.PROTO;
import static org.mvel2.Operator.PTABLE;
import static org.mvel2.Operator.REGEX;
import static org.mvel2.Operator.RETURN;
import static org.mvel2.Operator.SIMILARITY;
import static org.mvel2.Operator.SOUNDEX;
import static org.mvel2.Operator.STACKLANG;
import static org.mvel2.Operator.STR_APPEND;
import static org.mvel2.Operator.SUB;
import static org.mvel2.Operator.SWITCH;
import static org.mvel2.Operator.TERNARY;
import static org.mvel2.Operator.TERNARY_ELSE;
import static org.mvel2.Operator.UNTIL;
import static org.mvel2.Operator.UNTYPED_VAR;
import static org.mvel2.Operator.WHILE;
import static org.mvel2.Operator.WITH;
import static org.mvel2.ast.TypeDescriptor.getClassReference;
import static org.mvel2.util.ArrayTools.findFirst;
import static org.mvel2.util.ParseTools.balancedCaptureWithLineAccounting;
import static org.mvel2.util.ParseTools.captureStringLiteral;
import static org.mvel2.util.ParseTools.containsCheck;
import static org.mvel2.util.ParseTools.createStringTrimmed;
import static org.mvel2.util.ParseTools.handleStringEscapes;
import static org.mvel2.util.ParseTools.isArrayType;
import static org.mvel2.util.ParseTools.isDigit;
import static org.mvel2.util.ParseTools.isIdentifierPart;
import static org.mvel2.util.ParseTools.isNotValidNameorLabel;
import static org.mvel2.util.ParseTools.isPropertyOnly;
import static org.mvel2.util.ParseTools.isReservedWord;
import static org.mvel2.util.ParseTools.isWhitespace;
import static org.mvel2.util.ParseTools.opLookup;
import static org.mvel2.util.ParseTools.similarity;
import static org.mvel2.util.ParseTools.subset;
import static org.mvel2.util.PropertyTools.isEmpty;
import static org.mvel2.util.Soundex.soundex;
import java.io.Serializable;
import java.util.HashMap;
import java.util.WeakHashMap;
import org.mvel2.CompileException;
import org.mvel2.ErrorDetail;
import org.mvel2.Operator;
import org.mvel2.ParserContext;
import org.mvel2.ast.ASTNode;
import org.mvel2.ast.AssertNode;
import org.mvel2.ast.AssignmentNode;
import org.mvel2.ast.BooleanNode;
import org.mvel2.ast.DeclProtoVarNode;
import org.mvel2.ast.DeclTypedVarNode;
import org.mvel2.ast.DeepAssignmentNode;
import org.mvel2.ast.DoNode;
import org.mvel2.ast.DoUntilNode;
import org.mvel2.ast.EndOfStatement;
import org.mvel2.ast.Fold;
import org.mvel2.ast.ForEachNode;
import org.mvel2.ast.ForNode;
import org.mvel2.ast.Function;
import org.mvel2.ast.IfNode;
import org.mvel2.ast.ImportNode;
import org.mvel2.ast.IndexedAssignmentNode;
import org.mvel2.ast.IndexedDeclTypedVarNode;
import org.mvel2.ast.IndexedOperativeAssign;
import org.mvel2.ast.IndexedPostFixDecNode;
import org.mvel2.ast.IndexedPostFixIncNode;
import org.mvel2.ast.IndexedPreFixDecNode;
import org.mvel2.ast.IndexedPreFixIncNode;
import org.mvel2.ast.InlineCollectionNode;
import org.mvel2.ast.InterceptorWrapper;
import org.mvel2.ast.Invert;
import org.mvel2.ast.IsDef;
import org.mvel2.ast.LineLabel;
import org.mvel2.ast.LiteralDeepPropertyNode;
import org.mvel2.ast.LiteralNode;
import org.mvel2.ast.Negation;
import org.mvel2.ast.NewObjectNode;
import org.mvel2.ast.NewObjectPrototype;
import org.mvel2.ast.NewPrototypeNode;
import org.mvel2.ast.OperativeAssign;
import org.mvel2.ast.OperatorNode;
import org.mvel2.ast.PostFixDecNode;
import org.mvel2.ast.PostFixIncNode;
import org.mvel2.ast.PreFixDecNode;
import org.mvel2.ast.PreFixIncNode;
import org.mvel2.ast.Proto;
import org.mvel2.ast.ProtoVarNode;
import org.mvel2.ast.RedundantCodeException;
import org.mvel2.ast.RegExMatch;
import org.mvel2.ast.ReturnNode;
import org.mvel2.ast.Sign;
import org.mvel2.ast.Stacklang;
import org.mvel2.ast.StaticImportNode;
import org.mvel2.ast.Substatement;
import org.mvel2.ast.ThisWithNode;
import org.mvel2.ast.TypeCast;
import org.mvel2.ast.TypeDescriptor;
import org.mvel2.ast.TypedVarNode;
import org.mvel2.ast.Union;
import org.mvel2.ast.UntilNode;
import org.mvel2.ast.WhileNode;
import org.mvel2.ast.WithNode;
import org.mvel2.integration.VariableResolverFactory;
import org.mvel2.util.ErrorUtil;
import org.mvel2.util.ExecutionStack;
import org.mvel2.util.FunctionParser;
import org.mvel2.util.ProtoParser;
/**
* This is the core parser that the subparsers extend.
*
* @author Christopher Brock
*/
public class AbstractParser implements Parser, Serializable {
public static final int LEVEL_5_CONTROL_FLOW = 5;
public static final int LEVEL_4_ASSIGNMENT = 4;
public static final int LEVEL_3_ITERATION = 3;
public static final int LEVEL_2_MULTI_STATEMENT = 2;
public static final int LEVEL_1_BASIC_LANG = 1;
public static final int LEVEL_0_PROPERTY_ONLY = 0;
protected static final int OP_NOT_LITERAL = -3;
protected static final int OP_OVERFLOW = -2;
protected static final int OP_TERMINATE = -1;
protected static final int OP_RESET_FRAME = 0;
protected static final int OP_CONTINUE = 1;
protected static final int SET = 0;
protected static final int REMOVE = 1;
protected static final int GET = 2;
protected static final int GET_OR_CREATE = 3;
private static final WeakHashMap<String, char[]> EX_PRECACHE = new WeakHashMap<String, char[]>(15);
public static HashMap<String, Object> LITERALS;
public static HashMap<String, Object> CLASS_LITERALS;
public static HashMap<String, Integer> OPERATORS;
static {
setupParser();
}
protected char[] expr;
protected int cursor;
protected int start;
protected int length;
protected int end;
protected int st;
protected int fields;
protected boolean greedy = true;
protected boolean lastWasIdentifier = false;
protected boolean lastWasLineLabel = false;
protected boolean lastWasComment = false;
protected boolean compileMode = false;
protected int literalOnly = -1;
protected int lastLineStart = 0;
protected int line = 0;
protected ASTNode lastNode;
protected ExecutionStack stk;
protected ExecutionStack splitAccumulator = new ExecutionStack();
protected ParserContext pCtx;
protected ExecutionStack dStack;
protected Object ctx;
protected VariableResolverFactory variableFactory;
protected boolean debugSymbols = false;
protected AbstractParser() {
pCtx = new ParserContext();
}
protected AbstractParser(ParserContext pCtx) {
this.pCtx = pCtx != null ? pCtx : new ParserContext();
}
/**
* This method is internally called by the static initializer for AbstractParser in order to setup the parser.
* The static initialization populates the operator and literal tables for the parser. In some situations, like
* OSGi, it may be necessary to utilize this manually.
*/
public static void setupParser() {
if (LITERALS == null || LITERALS.isEmpty()) {
LITERALS = new HashMap<String, Object>();
CLASS_LITERALS = new HashMap<String, Object>();
OPERATORS = new HashMap<String, Integer>();
/**
* Add System and all the class wrappers from the JCL.
*/
CLASS_LITERALS.put("System", System.class);
CLASS_LITERALS.put("String", String.class);
CLASS_LITERALS.put("CharSequence", CharSequence.class);
CLASS_LITERALS.put("Integer", Integer.class);
CLASS_LITERALS.put("int", int.class);
CLASS_LITERALS.put("Long", Long.class);
CLASS_LITERALS.put("long", long.class);
CLASS_LITERALS.put("Boolean", Boolean.class);
CLASS_LITERALS.put("boolean", boolean.class);
CLASS_LITERALS.put("Short", Short.class);
CLASS_LITERALS.put("short", short.class);
CLASS_LITERALS.put("Character", Character.class);
CLASS_LITERALS.put("char", char.class);
CLASS_LITERALS.put("Double", Double.class);
CLASS_LITERALS.put("double", double.class);
CLASS_LITERALS.put("Float", Float.class);
CLASS_LITERALS.put("float", float.class);
CLASS_LITERALS.put("Byte", Byte.class);
CLASS_LITERALS.put("byte", byte.class);
CLASS_LITERALS.put("Math", Math.class);
CLASS_LITERALS.put("Void", Void.class);
CLASS_LITERALS.put("Object", Object.class);
CLASS_LITERALS.put("Number", Number.class);
CLASS_LITERALS.put("Class", Class.class);
CLASS_LITERALS.put("ClassLoader", ClassLoader.class);
CLASS_LITERALS.put("Runtime", Runtime.class);
CLASS_LITERALS.put("Thread", Thread.class);
CLASS_LITERALS.put("Compiler", Compiler.class);
CLASS_LITERALS.put("StringBuffer", StringBuffer.class);
CLASS_LITERALS.put("ThreadLocal", ThreadLocal.class);
CLASS_LITERALS.put("SecurityManager", SecurityManager.class);
CLASS_LITERALS.put("StrictMath", StrictMath.class);
CLASS_LITERALS.put("Exception", Exception.class);
CLASS_LITERALS.put("Array", java.lang.reflect.Array.class);
CLASS_LITERALS.put("StringBuilder", StringBuilder.class);
// Setup LITERALS
LITERALS.putAll(CLASS_LITERALS);
LITERALS.put("true", TRUE);
LITERALS.put("false", FALSE);
LITERALS.put("null", null);
LITERALS.put("nil", null);
LITERALS.put("empty", BlankLiteral.INSTANCE);
setLanguageLevel(Boolean.getBoolean("mvel.future.lang.support") ? 6 : 5);
}
}
public static void setLanguageLevel(int level) {
OPERATORS.clear();
OPERATORS.putAll(loadLanguageFeaturesByLevel(level));
}
public static HashMap<String, Integer> loadLanguageFeaturesByLevel(int languageLevel) {
HashMap<String, Integer> operatorsTable = new HashMap<String, Integer>();
switch (languageLevel) {
case 6: // prototype definition
operatorsTable.put("proto", PROTO);
case 5: // control flow operations
operatorsTable.put("if", IF);
operatorsTable.put("else", ELSE);
operatorsTable.put("?", TERNARY);
operatorsTable.put("switch", SWITCH);
operatorsTable.put("function", FUNCTION);
operatorsTable.put("def", FUNCTION);
operatorsTable.put("stacklang", STACKLANG);
case 4: // assignment
operatorsTable.put("=", ASSIGN);
operatorsTable.put("var", UNTYPED_VAR);
operatorsTable.put("+=", ASSIGN_ADD);
operatorsTable.put("-=", ASSIGN_SUB);
operatorsTable.put("/=", ASSIGN_DIV);
operatorsTable.put("%=", ASSIGN_MOD);
case 3: // iteration
operatorsTable.put("foreach", FOREACH);
operatorsTable.put("while", WHILE);
operatorsTable.put("until", UNTIL);
operatorsTable.put("for", FOR);
operatorsTable.put("do", DO);
case 2: // multi-statement
operatorsTable.put("return", RETURN);
operatorsTable.put(";", END_OF_STMT);
case 1: // boolean, math ops, projection, assertion, objection creation, block setters, imports
operatorsTable.put("+", ADD);
operatorsTable.put("-", SUB);
operatorsTable.put("*", MULT);
operatorsTable.put("**", POWER);
operatorsTable.put("/", DIV);
operatorsTable.put("%", MOD);
operatorsTable.put("==", EQUAL);
operatorsTable.put("!=", NEQUAL);
operatorsTable.put(">", GTHAN);
operatorsTable.put(">=", GETHAN);
operatorsTable.put("<", LTHAN);
operatorsTable.put("<=", LETHAN);
operatorsTable.put("&&", AND);
operatorsTable.put("and", AND);
operatorsTable.put("||", OR);
operatorsTable.put("or", CHOR);
operatorsTable.put("~=", REGEX);
operatorsTable.put("instanceof", INSTANCEOF);
operatorsTable.put("is", INSTANCEOF);
operatorsTable.put("contains", CONTAINS);
operatorsTable.put("soundslike", SOUNDEX);
operatorsTable.put("strsim", SIMILARITY);
operatorsTable.put("convertable_to", CONVERTABLE_TO);
operatorsTable.put("isdef", ISDEF);
operatorsTable.put("#", STR_APPEND);
operatorsTable.put("&", BW_AND);
operatorsTable.put("|", BW_OR);
operatorsTable.put("^", BW_XOR);
operatorsTable.put("<<", BW_SHIFT_LEFT);
operatorsTable.put("<<<", BW_USHIFT_LEFT);
operatorsTable.put(">>", BW_SHIFT_RIGHT);
operatorsTable.put(">>>", BW_USHIFT_RIGHT);
operatorsTable.put("new", Operator.NEW);
operatorsTable.put("in", PROJECTION);
operatorsTable.put("with", WITH);
operatorsTable.put("assert", ASSERT);
operatorsTable.put("import", IMPORT);
operatorsTable.put("import_static", IMPORT_STATIC);
operatorsTable.put("++", INC);
operatorsTable.put("--", DEC);
case 0: // Property access and inline collections
operatorsTable.put(":", TERNARY_ELSE);
}
return operatorsTable;
}
protected static boolean isArithmeticOperator(int operator) {
return operator != -1 && operator < 6;
}
private static int asInt(final Object o) {
return (Integer) o;
}
protected ASTNode nextTokenSkipSymbols() {
ASTNode n = nextToken();
if (n != null && n.getFields() == -1) n = nextToken();
return n;
}
/**
* Retrieve the next token in the expression.
*
* @return -
*/
protected ASTNode nextToken() {
try {
/**
* If the cursor is at the end of the expression, we have nothing more to do:
* return null.
*/
if (!splitAccumulator.isEmpty()) {
lastNode = (ASTNode) splitAccumulator.pop();
if (cursor >= end && lastNode instanceof EndOfStatement) {
return nextToken();
} else {
return lastNode;
}
} else if (cursor >= end) {
return null;
}
int brace, idx;
int tmpStart;
String name;
/**
* Because of parser recursion for sub-expression parsing, we sometimes need to remain
* certain field states. We do not reset for assignments, boolean mode, list creation or
* a capture only mode.
*/
boolean capture = false, union = false;
if ((fields & ASTNode.COMPILE_IMMEDIATE) != 0) {
debugSymbols = pCtx.isDebugSymbols();
}
if (debugSymbols) {
if (!lastWasLineLabel) {
if (pCtx.getSourceFile() == null) {
throw new CompileException("unable to produce debugging symbols: source name must be provided.", expr, st);
}
if (!pCtx.isLineMapped(pCtx.getSourceFile())) {
pCtx.initLineMapping(pCtx.getSourceFile(), expr);
}
skipWhitespace();
if (cursor >= end) {
return null;
}
int line = pCtx.getLineFor(pCtx.getSourceFile(), cursor);
if (!pCtx.isVisitedLine(pCtx.getSourceFile(), pCtx.setLineCount(line)) && !pCtx.isBlockSymbols()) {
lastWasLineLabel = true;
pCtx.visitLine(pCtx.getSourceFile(), line);
return lastNode = pCtx.setLastLineLabel(new LineLabel(pCtx.getSourceFile(), line, pCtx));
}
} else {
lastWasComment = lastWasLineLabel = false;
}
}
/**
* Skip any whitespace currently under the starting point.
*/
skipWhitespace();
/**
* From here to the end of the method is the core MVEL parsing code. Fiddling around here is asking for
* trouble unless you really know what you're doing.
*/
st = cursor;
Mainloop: while (cursor != end) {
if (isIdentifierPart(expr[cursor])) {
capture = true;
cursor++;
while (cursor != end && isIdentifierPart(expr[cursor]))
cursor++;
}
/**
* If the current character under the cursor is a valid
* part of an identifier, we keep capturing.
*/
if (capture) {
String t;
if (OPERATORS.containsKey(t = new String(expr, st, cursor - st)) && !Character.isDigit(expr[st])) {
switch (OPERATORS.get(t)) {
case NEW:
if (!isIdentifierPart(expr[st = cursor = trimRight(cursor)])) {
throw new CompileException("unexpected character (expected identifier): " + expr[cursor], expr, st);
}
/**
* Capture the beginning part of the token.
*/
do {
captureToNextTokenJunction();
skipWhitespace();
} while (cursor < end && expr[cursor] == '[');
/**
* If it's not a dimentioned array, continue capturing if necessary.
*/
if (cursor < end && !lastNonWhite(']')) captureToEOT();
TypeDescriptor descr = new TypeDescriptor(expr, st, trimLeft(cursor) - st, fields);
if (pCtx.getFunctions().containsKey(descr.getClassName())) {
return lastNode = new NewObjectPrototype(pCtx, pCtx.getFunction(descr.getClassName()));
}
if (pCtx.hasProtoImport(descr.getClassName())) {
return lastNode = new NewPrototypeNode(descr, pCtx);
}
lastNode = new NewObjectNode(descr, fields, pCtx);
skipWhitespace();
if (cursor != end && expr[cursor] == '{') {
if (!((NewObjectNode) lastNode).getTypeDescr().isUndimensionedArray()) {
throw new CompileException("conflicting syntax: dimensioned array with initializer block", expr,
st);
}
st = cursor;
Class egressType = lastNode.getEgressType();
if (egressType == null) {
try {
egressType = getClassReference(pCtx, descr);
} catch (ClassNotFoundException e) {
throw new CompileException("could not instantiate class", expr, st, e);
}
}
cursor = balancedCaptureWithLineAccounting(expr, st, end, expr[cursor], pCtx) + 1;
if (tokenContinues()) {
lastNode = new InlineCollectionNode(expr, st, cursor - st, fields, egressType, pCtx);
st = cursor;
captureToEOT();
return lastNode = new Union(expr, st + 1, cursor, fields, lastNode, pCtx);
} else {
return lastNode = new InlineCollectionNode(expr, st, cursor - st, fields, egressType, pCtx);
}
} else if (((NewObjectNode) lastNode).getTypeDescr().isUndimensionedArray()) {
throw new CompileException("array initializer expected", expr, st);
}
st = cursor;
return lastNode;
case ASSERT:
st = cursor = trimRight(cursor);
captureToEOS();
return lastNode = new AssertNode(expr, st, cursor-- - st, fields, pCtx);
case RETURN:
st = cursor = trimRight(cursor);
captureToEOS();
return lastNode = new ReturnNode(expr, st, cursor - st, fields, pCtx);
case IF:
return captureCodeBlock(ASTNode.BLOCK_IF);
case ELSE:
throw new CompileException("else without if", expr, st);
case FOREACH:
return captureCodeBlock(ASTNode.BLOCK_FOREACH);
case WHILE:
return captureCodeBlock(ASTNode.BLOCK_WHILE);
case UNTIL:
return captureCodeBlock(ASTNode.BLOCK_UNTIL);
case FOR:
return captureCodeBlock(ASTNode.BLOCK_FOR);
case WITH:
return captureCodeBlock(ASTNode.BLOCK_WITH);
case DO:
return captureCodeBlock(ASTNode.BLOCK_DO);
case STACKLANG:
return captureCodeBlock(STACKLANG);
case PROTO:
return captureCodeBlock(PROTO);
case ISDEF:
st = cursor = trimRight(cursor);
captureToNextTokenJunction();
return lastNode = new IsDef(expr, st, cursor - st, pCtx);
case IMPORT:
st = cursor = trimRight(cursor);
captureToEOS();
ImportNode importNode = new ImportNode(expr, st, cursor - st, pCtx);
if (importNode.isPackageImport()) {
pCtx.addPackageImport(importNode.getPackageImport());
} else {
pCtx.addImport(importNode.getImportClass().getSimpleName(), importNode.getImportClass());
}
return lastNode = importNode;
case IMPORT_STATIC:
st = cursor = trimRight(cursor);
captureToEOS();
StaticImportNode staticImportNode = new StaticImportNode(expr, st, trimLeft(cursor) - st, pCtx);
pCtx.addImport(staticImportNode.getMethod().getName(), staticImportNode.getMethod());
return lastNode = staticImportNode;
case FUNCTION:
lastNode = captureCodeBlock(FUNCTION);
st = cursor + 1;
return lastNode;
case UNTYPED_VAR:
int end;
st = cursor + 1;
while (true) {
captureToEOT();
end = cursor;
skipWhitespace();
if (cursor != end && expr[cursor] == '=') {
if (end == (cursor = st)) throw new CompileException("illegal use of reserved word: var", expr, st);
continue Mainloop;
} else {
name = new String(expr, st, end - st);
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
splitAccumulator
.add(lastNode = new IndexedDeclTypedVarNode(idx, st, end - st, Object.class, pCtx));
} else {
splitAccumulator.add(
lastNode = new DeclTypedVarNode(name, expr, st, end - st, Object.class, fields, pCtx));
}
}
if (cursor == this.end || expr[cursor] != ',') break;
else {
cursor++;
skipWhitespace();
st = cursor;
}
}
return (ASTNode) splitAccumulator.pop();
case CONTAINS:
lastWasIdentifier = false;
return lastNode = new OperatorNode(Operator.CONTAINS, expr, st, pCtx);
}
}
skipWhitespace();
/**
* If we *were* capturing a token, and we just hit a non-identifier
* character, we stop and figure out what to do.
*/
if (cursor != end && expr[cursor] == '(') {
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '(', pCtx) + 1;
}
/**
* If we encounter any of the following cases, we are still dealing with
* a contiguous token.
*/
CaptureLoop: while (cursor != end) {
switch (expr[cursor]) {
case '.':
union = true;
cursor++;
skipWhitespace();
continue;
case '?':
if (lookToLast() == '.' || cursor == start) {
union = true;
cursor++;
continue;
} else {
break CaptureLoop;
}
case '+':
switch (lookAhead()) {
case '+':
name = new String(subArray(st, trimLeft(cursor)));
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
lastNode = new IndexedPostFixIncNode(idx, pCtx);
} else {
lastNode = new PostFixIncNode(name, pCtx);
}
cursor += 2;
expectEOS();
return lastNode;
case '=':
name = createStringTrimmed(expr, st, cursor - st);
st = cursor += 2;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st = trimRight(st), trimLeft(cursor) - st,
fields, ADD, name, pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedAssignmentNode(expr, st, cursor - st, fields, ADD, name, idx,
pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st = trimRight(st), trimLeft(cursor) - st,
ADD, fields, pCtx);
}
}
if (isDigit(lookAhead()) && cursor > 1 && (expr[cursor - 1] == 'E' || expr[cursor - 1] == 'e')
&& isDigit(expr[cursor - 2])) {
cursor++;
// capture = true;
continue Mainloop;
}
break CaptureLoop;
case '-':
switch (lookAhead()) {
case '-':
name = new String(subArray(st, trimLeft(cursor)));
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
lastNode = new IndexedPostFixDecNode(idx, pCtx);
} else {
lastNode = new PostFixDecNode(name, pCtx);
}
cursor += 2;
expectEOS();
return lastNode;
case '=':
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 2;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields, SUB, t, pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, SUB, idx, fields, pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, SUB, fields, pCtx);
}
}
if (isDigit(lookAhead()) && cursor > 1 && (expr[cursor - 1] == 'E' || expr[cursor - 1] == 'e')
&& isDigit(expr[cursor - 2])) {
cursor++;
capture = true;
continue Mainloop;
}
break CaptureLoop;
/**
* Exit immediately for any of these cases.
*/
case '!':
case ',':
case '"':
case '\'':
case ';':
case ':':
break CaptureLoop;
case '\u00AB': // special compact code for recursive parses
case '\u00BB':
case '\u00AC':
case '&':
case '^':
case '|':
case '*':
case '/':
case '%':
char op = expr[cursor];
if (lookAhead() == '=') {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 2;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields, opLookup(op), t, pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, opLookup(op), idx, fields,
pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, opLookup(op), fields, pCtx);
}
}
break CaptureLoop;
case '<':
if ((lookAhead() == '<' && lookAhead(2) == '=')) {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 3;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields, BW_SHIFT_LEFT, t, pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, BW_SHIFT_LEFT, idx, fields,
pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, BW_SHIFT_LEFT, fields, pCtx);
}
}
break CaptureLoop;
case '>':
if (lookAhead() == '>') {
if (lookAhead(2) == '=') {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 3;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields, BW_SHIFT_RIGHT, t,
pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, BW_SHIFT_RIGHT, idx, fields,
pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, BW_SHIFT_RIGHT, fields,
pCtx);
}
} else if ((lookAhead(2) == '>' && lookAhead(3) == '=')) {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 4;
captureToEOS();
if (union) {
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields, BW_USHIFT_RIGHT, t,
pCtx);
} else if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, BW_USHIFT_RIGHT, idx,
fields, pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, BW_USHIFT_RIGHT, fields,
pCtx);
}
}
}
break CaptureLoop;
case '(':
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '(', pCtx) + 1;
continue;
case '[':
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '[', pCtx) + 1;
continue;
case '{':
if (!union) break CaptureLoop;
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '{', pCtx) + 1;
continue;
case '~':
if (lookAhead() == '=') {
// tmp = subArray(start, trimLeft(cursor));
tmpStart = st;
int tmpOffset = cursor - st;
st = cursor += 2;
captureToEOT();
return lastNode = new RegExMatch(expr, tmpStart, tmpOffset, fields, st, cursor - st, pCtx);
}
break CaptureLoop;
case '=':
if (lookAhead() == '+') {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 2;
if (!isNextIdentifierOrLiteral()) {
throw new CompileException("unexpected symbol '" + expr[cursor] + "'", expr, st);
}
captureToEOS();
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, ADD, idx, fields, pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, ADD, fields, pCtx);
}
} else if (lookAhead() == '-') {
name = new String(expr, st, trimLeft(cursor) - st);
st = cursor += 2;
if (!isNextIdentifierOrLiteral()) {
throw new CompileException("unexpected symbol '" + expr[cursor] + "'", expr, st);
}
captureToEOS();
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedOperativeAssign(expr, st, cursor - st, SUB, idx, fields, pCtx);
} else {
return lastNode = new OperativeAssign(name, expr, st, cursor - st, SUB, fields, pCtx);
}
}
if (greedy && lookAhead() != '=') {
cursor++;
if (union) {
captureToEOS();
return lastNode = new DeepAssignmentNode(expr, st, cursor - st, fields | ASTNode.ASSIGN, pCtx);
} else if (lastWasIdentifier) {
return procTypedNode(false);
} else if (pCtx != null && ((idx = pCtx.variableIndexOf(t)) != -1 && (pCtx.isIndexAllocation()))) {
captureToEOS();
IndexedAssignmentNode ian = new IndexedAssignmentNode(expr, st = trimRight(st),
trimLeft(cursor) - st, ASTNode.ASSIGN, idx, pCtx);
if (idx == -1) {
pCtx.addIndexedInput(t = ian.getVarName());
ian.setRegister(pCtx.variableIndexOf(t));
}
return lastNode = ian;
} else {
captureToEOS();
return lastNode = new AssignmentNode(expr, st, cursor - st, fields | ASTNode.ASSIGN, pCtx);
}
}
break CaptureLoop;
default:
if (cursor != end) {
if (isIdentifierPart(expr[cursor])) {
if (!union) {
break CaptureLoop;
}
cursor++;
while (cursor != end && isIdentifierPart(expr[cursor]))
cursor++;
} else if ((cursor + 1) != end && isIdentifierPart(expr[cursor + 1])) {
break CaptureLoop;
} else {
cursor++;
}
} else {
break CaptureLoop;
}
}
}
/**
* Produce the token.
*/
trimWhitespace();
return createPropertyToken(st, cursor);
} else {
switch (expr[cursor]) {
case '.': {
cursor++;
if (isDigit(expr[cursor])) {
capture = true;
continue;
}
expectNextChar_IW('{');
return lastNode = new ThisWithNode(expr, st, cursor - st - 1, cursor + 1,
(cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '{', pCtx) + 1) - 3, fields, pCtx);
}
case '@': {
st++;
captureToEOT();
if (pCtx == null || (pCtx.getInterceptors() == null
|| !pCtx.getInterceptors().containsKey(name = new String(expr, st, cursor - st)))) {
throw new CompileException("reference to undefined interceptor: " + new String(expr, st, cursor - st), expr,
st);
}
return lastNode = new InterceptorWrapper(pCtx.getInterceptors().get(name), nextToken(), pCtx);
}
case '=':
return createOperator(expr, st, (cursor += 2));
case '-':
if (lookAhead() == '-') {
cursor += 2;
skipWhitespace();
st = cursor;
captureIdentifier();
name = new String(subArray(st, cursor));
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedPreFixDecNode(idx, pCtx);
} else {
return lastNode = new PreFixDecNode(name, pCtx);
}
} else if ((cursor == start || (lastNode != null && (lastNode instanceof BooleanNode || lastNode.isOperator())))
&& !isDigit(lookAhead())) {
cursor += 1;
captureToEOT();
return new Sign(expr, st, cursor - st, fields, pCtx);
} else if ((cursor != start
&& (lastNode != null && !(lastNode instanceof BooleanNode || lastNode.isOperator())))
|| !isDigit(lookAhead())) {
return createOperator(expr, st, cursor++ + 1);
} else if ((cursor - 1) != start || (!isDigit(expr[cursor - 1])) && isDigit(lookAhead())) {
cursor++;
break;
} else {
throw new CompileException("not a statement", expr, st);
}
case '+':
if (lookAhead() == '+') {
cursor += 2;
skipWhitespace();
st = cursor;
captureIdentifier();
name = new String(subArray(st, cursor));
if (pCtx != null && (idx = pCtx.variableIndexOf(name)) != -1) {
return lastNode = new IndexedPreFixIncNode(idx, pCtx);
} else {
return lastNode = new PreFixIncNode(name, pCtx);
}
}
return createOperator(expr, st, cursor++ + 1);
case '*':
if (lookAhead() == '*') {
cursor++;
}
return createOperator(expr, st, cursor++ + 1);
case ';':
cursor++;
lastWasIdentifier = false;
return lastNode = new EndOfStatement(pCtx);
case '?':
if (cursor == start) {
cursor++;
continue;
}
case '#':
case '/':
case ':':
case '^':
case '%': {
return createOperator(expr, st, cursor++ + 1);
}
case '(': {
cursor++;
boolean singleToken = true;
skipWhitespace();
for (brace = 1; cursor != end && brace != 0; cursor++) {
switch (expr[cursor]) {
case '(':
brace++;
break;
case ')':
brace--;
break;
case '\'':
cursor = captureStringLiteral('\'', expr, cursor, end);
break;
case '"':
cursor = captureStringLiteral('"', expr, cursor, end);
break;
case 'i':
if (brace == 1 && isWhitespace(lookBehind()) && lookAhead() == 'n' && isWhitespace(lookAhead(2))) {
for (int level = brace; cursor != end; cursor++) {
switch (expr[cursor]) {
case '(':
brace++;
break;
case ')':
if (--brace < level) {
cursor++;
if (tokenContinues()) {
lastNode = new Fold(expr, trimRight(st + 1), cursor - st - 2, fields, pCtx);
if (expr[st = cursor] == '.') st++;
captureToEOT();
return lastNode = new Union(expr, st = trimRight(st), cursor - st, fields,
lastNode, pCtx);
} else {
return lastNode = new Fold(expr, trimRight(st + 1), cursor - st - 2, fields,
pCtx);
}
}
break;
case '\'':
cursor = captureStringLiteral('\'', expr, cursor, end);
break;
case '"':
cursor = captureStringLiteral('\"', expr, cursor, end);
break;
}
}
throw new CompileException("unterminated projection; closing parathesis required", expr, st);
}
break;
default:
/**
* Check to see if we should disqualify this current token as a potential
* type-cast candidate.
*/
if (expr[cursor] != '.') {
switch (expr[cursor]) {
case '[':
case ']':
break;
default:
if (!(isIdentifierPart(expr[cursor]) || expr[cursor] == '.')) {
singleToken = false;
}
}
}
}
}
if (brace != 0) {
throw new CompileException("unbalanced braces in expression: (" + brace + "):", expr, st);
}
tmpStart = -1;
if (singleToken) {
int _st;
TypeDescriptor tDescr = new TypeDescriptor(expr, _st = trimRight(st + 1), trimLeft(cursor - 1) - _st,
fields);
Class cls;
try {
if (tDescr.isClass() && (cls = getClassReference(pCtx, tDescr)) != null) {
// lookahead to check if it could be a real cast
boolean isCast = false;
for (int i = cursor; i < expr.length; i++) {
if (expr[i] == ' ' || expr[i] == '\t') continue;
isCast = isIdentifierPart(expr[i]) || expr[i] == '\'' || expr[i] == '"' || expr[i] == '(';
break;
}
if (isCast) {
st = cursor;
captureToEOT();
// captureToEOS();
return lastNode = new TypeCast(expr, st, cursor - st, cls, fields, pCtx);
}
}
} catch (ClassNotFoundException e) {
// fallthrough
}
}
if (tmpStart != -1) {
return handleUnion(handleSubstatement(new Substatement(expr, tmpStart, cursor - tmpStart, fields, pCtx)));
} else {
return handleUnion(handleSubstatement(
new Substatement(expr, st = trimRight(st + 1), trimLeft(cursor - 1) - st, fields, pCtx)));
}
}
case '}':
case ']':
case ')': {
throw new CompileException("unbalanced braces", expr, st);
}
case '>': {
switch (expr[cursor + 1]) {
case '>':
if (expr[cursor += 2] == '>') cursor++;
return createOperator(expr, st, cursor);
case '=':
return createOperator(expr, st, cursor += 2);
default:
return createOperator(expr, st, ++cursor);
}
}
case '<': {
if (expr[++cursor] == '<') {
if (expr[++cursor] == '<') cursor++;
return createOperator(expr, st, cursor);
} else if (expr[cursor] == '=') {
return createOperator(expr, st, ++cursor);
} else {
return createOperator(expr, st, cursor);
}
}
case '\'':
case '"':
lastNode = new LiteralNode(
handleStringEscapes(subset(expr, st + 1,
(cursor = captureStringLiteral(expr[cursor], expr, cursor, end)) - st - 1)),
String.class, pCtx);
cursor++;
if (tokenContinues()) {
return lastNode = handleUnion(lastNode);
}
return lastNode;
case '&': {
if (expr[cursor++ + 1] == '&') {
return createOperator(expr, st, ++cursor);
} else {
return createOperator(expr, st, cursor);
}
}
case '|': {
if (expr[cursor++ + 1] == '|') {
return createOperator(expr, st, ++cursor);
} else {
return createOperator(expr, st, cursor);
}
}
case '~':
if ((cursor++ - 1 != 0 || !isIdentifierPart(lookBehind())) && isDigit(expr[cursor])) {
st = cursor;
captureToEOT();
return lastNode = new Invert(expr, st, cursor - st, fields, pCtx);
} else if (expr[cursor] == '(') {
st = cursor--;
captureToEOT();
return lastNode = new Invert(expr, st, cursor - st, fields, pCtx);
} else {
if (expr[cursor] == '=') cursor++;
return createOperator(expr, st, cursor);
}
case '!': {
++cursor;
if (isNextIdentifier()) {
if (lastNode != null && !lastNode.isOperator()) {
throw new CompileException("unexpected operator '!'", expr, st);
}
st = cursor;
captureToEOT();
if ("new".equals(name = new String(expr, st, cursor - st)) || "isdef".equals(name)) {
captureToEOT();
return lastNode = new Negation(expr, st, cursor - st, fields, pCtx);
} else {
return lastNode = new Negation(expr, st, cursor - st, fields, pCtx);
}
} else if (expr[cursor] == '(') {
st = cursor--;
captureToEOT();
return lastNode = new Negation(expr, st, cursor - st, fields, pCtx);
} else if (expr[cursor] == '!') {
// just ignore a double negation
++cursor;
return nextToken();
} else if (expr[cursor] != '=') throw new CompileException("unexpected operator '!'", expr, st, null);
else {
return createOperator(expr, st, ++cursor);
}
}
case '[':
case '{':
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, expr[cursor], pCtx) + 1;
if (tokenContinues()) {
lastNode = new InlineCollectionNode(expr, st, cursor - st, fields, pCtx);
st = cursor;
captureToEOT();
if (expr[st] == '.') st++;
return lastNode = new Union(expr, st, cursor - st, fields, lastNode, pCtx);
} else {
return lastNode = new InlineCollectionNode(expr, st, cursor - st, fields, pCtx);
}
default:
cursor++;
}
}
}
if (st == cursor) return null;
else return createPropertyToken(st, cursor);
} catch (RedundantCodeException e) {
return nextToken();
} catch (NumberFormatException e) {
throw new CompileException("badly formatted number: " + e.getMessage(), expr, st, e);
} catch (StringIndexOutOfBoundsException e) {
throw new CompileException("unexpected end of statement", expr, cursor, e);
} catch (ArrayIndexOutOfBoundsException e) {
throw new CompileException("unexpected end of statement", expr, cursor, e);
} catch (CompileException e) {
throw ErrorUtil.rewriteIfNeeded(e, expr, cursor);
}
}
public ASTNode handleSubstatement(Substatement stmt) {
if (stmt.getStatement() != null && stmt.getStatement().isLiteralOnly()) {
return new LiteralNode(stmt.getStatement().getValue(null, null, null), pCtx);
} else {
return stmt;
}
}
/**
* Handle a union between a closed statement and a residual property chain.
*
* @param node an ast node
* @return ASTNode
*/
protected ASTNode handleUnion(ASTNode node) {
if (cursor != end) {
skipWhitespace();
int union = -1;
if (cursor < end) {
switch (expr[cursor]) {
case '.':
union = cursor + 1;
break;
case '[':
union = cursor;
}
}
if (union != -1) {
captureToEOT();
return lastNode = new Union(expr, union, cursor - union, fields, node, pCtx);
}
}
return lastNode = node;
}
/**
* Create an operator node.
*
* @param expr an char[] containing the expression
* @param start the start offet for the token
* @param end the end offset for the token
* @return ASTNode
*/
private ASTNode createOperator(final char[] expr, final int start, final int end) {
lastWasIdentifier = false;
return lastNode = new OperatorNode(OPERATORS.get(new String(expr, start, end - start)), expr, start, pCtx);
}
/**
* Create a copy of an array based on a sub-range. Works faster than System.arrayCopy() for arrays shorter than
* 1000 elements in most cases, so the parser uses this internally.
*
* @param start the start offset
* @param end the end offset
* @return an array
*/
private char[] subArray(final int start, final int end) {
if (start >= end) return new char[0];
char[] newA = new char[end - start];
for (int i = 0; i != newA.length; i++) {
newA[i] = expr[i + start];
}
return newA;
}
/**
* Generate a property token
*
* @param st the start offset
* @param end the end offset
* @return an ast node
*/
private ASTNode createPropertyToken(int st, int end) {
String tmp;
if (isPropertyOnly(expr, st, end)) {
if (pCtx != null && pCtx.hasImports()) {
int find;
if ((find = findFirst('.', st, end - st, expr)) != -1) {
String iStr = new String(expr, st, find - st);
if (pCtx.hasImport(iStr)) {
lastWasIdentifier = true;
return lastNode = new LiteralDeepPropertyNode(expr, find + 1, end - find - 1, fields, pCtx.getImport(iStr), pCtx);
}
} else {
if (pCtx.hasImport(tmp = new String(expr, st, cursor - st))) {
lastWasIdentifier = true;
return lastNode = new LiteralNode(pCtx.getStaticOrClassImport(tmp), pCtx);
}
}
}
if (LITERALS.containsKey(tmp = new String(expr, st, end - st))) {
lastWasIdentifier = true;
return lastNode = new LiteralNode(LITERALS.get(tmp), pCtx);
} else if (OPERATORS.containsKey(tmp)) {
lastWasIdentifier = false;
return lastNode = new OperatorNode(OPERATORS.get(tmp), expr, st, pCtx);
} else if (lastWasIdentifier) {
return procTypedNode(true);
}
}
if (pCtx != null && isArrayType(expr, st, end)) {
if (pCtx.hasImport(new String(expr, st, cursor - st - 2))) {
lastWasIdentifier = true;
TypeDescriptor typeDescriptor = new TypeDescriptor(expr, st, cursor - st, fields);
try {
return lastNode = new LiteralNode(typeDescriptor.getClassReference(pCtx), pCtx);
} catch (ClassNotFoundException e) {
throw new CompileException("could not resolve class: " + typeDescriptor.getClassName(), expr, st);
}
}
}
lastWasIdentifier = true;
return lastNode = new ASTNode(expr, trimRight(st), trimLeft(end) - st, fields, pCtx);
}
/**
* Process the current typed node
*
* @param decl node is a declaration or not
* @return and ast node
*/
private ASTNode procTypedNode(boolean decl) {
while (true) {
if (lastNode.getLiteralValue() instanceof String) {
char[] tmp = ((String) lastNode.getLiteralValue()).toCharArray();
TypeDescriptor tDescr = new TypeDescriptor(tmp, 0, tmp.length, 0);
try {
lastNode.setLiteralValue(getClassReference(pCtx, tDescr));
lastNode.discard();
} catch (Exception e) {
// fall through;
}
}
if (lastNode.isLiteral() && lastNode.getLiteralValue() instanceof Class) {
lastNode.discard();
captureToEOS();
if (decl) {
splitAccumulator.add(new DeclTypedVarNode(new String(expr, st, cursor - st), expr, st, cursor - st,
(Class) lastNode.getLiteralValue(), fields | ASTNode.ASSIGN, pCtx));
} else {
captureToEOS();
splitAccumulator.add(
new TypedVarNode(expr, st, cursor - st - 1, fields | ASTNode.ASSIGN, (Class) lastNode.getLiteralValue(), pCtx));
}
} else if (lastNode instanceof Proto) {
captureToEOS();
if (decl) {
splitAccumulator
.add(new DeclProtoVarNode(new String(expr, st, cursor - st), (Proto) lastNode, fields | ASTNode.ASSIGN, pCtx));
} else {
splitAccumulator.add(new ProtoVarNode(expr, st, cursor - st, fields | ASTNode.ASSIGN, (Proto) lastNode, pCtx));
}
}
// this redundant looking code is needed to work with the interpreter and MVELSH properly.
else if ((fields & ASTNode.COMPILE_IMMEDIATE) == 0) {
if (stk.peek() instanceof Class) {
captureToEOS();
if (decl) {
splitAccumulator.add(new DeclTypedVarNode(new String(expr, st, cursor - st), expr, st, cursor - st,
(Class) stk.pop(), fields | ASTNode.ASSIGN, pCtx));
} else {
splitAccumulator.add(new TypedVarNode(expr, st, cursor - st, fields | ASTNode.ASSIGN, (Class) stk.pop(), pCtx));
}
} else if (stk.peek() instanceof Proto) {
captureToEOS();
if (decl) {
splitAccumulator.add(
new DeclProtoVarNode(new String(expr, st, cursor - st), (Proto) stk.pop(), fields | ASTNode.ASSIGN, pCtx));
} else {
splitAccumulator.add(new ProtoVarNode(expr, st, cursor - st, fields | ASTNode.ASSIGN, (Proto) stk.pop(), pCtx));
}
} else {
throw new CompileException("unknown class or illegal statement: " + lastNode.getLiteralValue(), expr, cursor);
}
} else {
throw new CompileException("unknown class or illegal statement: " + lastNode.getLiteralValue(), expr, cursor);
}
skipWhitespace();
if (cursor < end && expr[cursor] == ',') {
st = ++cursor;
splitAccumulator.add(new EndOfStatement(pCtx));
} else {
return (ASTNode) splitAccumulator.pop();
}
}
}
/**
* Generate a code block token.
*
* @param condStart the start offset for the condition
* @param condEnd the end offset for the condition
* @param blockStart the start offset for the block
* @param blockEnd the end offset for the block
* @param type the type of block
* @return and ast node
*/
private ASTNode createBlockToken(final int condStart, final int condEnd, final int blockStart, final int blockEnd, int type) {
lastWasIdentifier = false;
cursor++;
if (isStatementNotManuallyTerminated()) {
splitAccumulator.add(new EndOfStatement(pCtx));
}
int condOffset = condEnd - condStart;
int blockOffset = blockEnd - blockStart;
if (blockOffset < 0) blockOffset = 0;
switch (type) {
case ASTNode.BLOCK_IF:
return new IfNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
case ASTNode.BLOCK_FOR:
for (int i = condStart; i < condEnd; i++) {
if (expr[i] == ';') return new ForNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
else if (expr[i] == ':') break;
}
case ASTNode.BLOCK_FOREACH:
return new ForEachNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
case ASTNode.BLOCK_WHILE:
return new WhileNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
case ASTNode.BLOCK_UNTIL:
return new UntilNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
case ASTNode.BLOCK_DO:
return new DoNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
case ASTNode.BLOCK_DO_UNTIL:
return new DoUntilNode(expr, condStart, condOffset, blockStart, blockOffset, pCtx);
default:
return new WithNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
}
}
/**
* Capture a code block by type.
*
* @param type the block type
* @return an ast node
*/
private ASTNode captureCodeBlock(int type) {
boolean cond = true;
ASTNode first = null;
ASTNode tk = null;
switch (type) {
case ASTNode.BLOCK_IF: {
do {
if (tk != null) {
captureToNextTokenJunction();
skipWhitespace();
cond = expr[cursor] != '{' && expr[cursor] == 'i' && expr[++cursor] == 'f'
&& expr[cursor = incNextNonBlank()] == '(';
}
if (((IfNode) (tk = _captureBlock(tk, expr, cond, type))).getElseBlock() != null) {
cursor++;
return first;
}
if (first == null) first = tk;
if (cursor != end && expr[cursor] != ';') {
cursor++;
}
} while (ifThenElseBlockContinues());
return first;
}
case ASTNode.BLOCK_DO:
skipWhitespace();
return _captureBlock(null, expr, false, type);
default: // either BLOCK_WITH or BLOCK_FOREACH
captureToNextTokenJunction();
skipWhitespace();
return _captureBlock(null, expr, true, type);
}
}
private ASTNode _captureBlock(ASTNode node, final char[] expr, boolean cond, int type) {
skipWhitespace();
int startCond = 0;
int endCond = 0;
int blockStart;
int blockEnd;
String name;
/**
* Functions are a special case we handle differently from the rest of block parsing
*/
switch (type) {
case FUNCTION: {
int st = cursor;
captureToNextTokenJunction();
if (cursor == end) {
throw new CompileException("unexpected end of statement", expr, st);
}
/**
* Check to see if the name is legal.
*/
if (isReservedWord(name = createStringTrimmed(expr, st, cursor - st)) || isNotValidNameorLabel(name))
throw new CompileException("illegal function name or use of reserved word", expr, cursor);
FunctionParser parser = new FunctionParser(name, cursor, end - cursor, expr, fields, pCtx, splitAccumulator);
Function function = parser.parse();
cursor = parser.getCursor();
return lastNode = function;
}
case PROTO: {
if (ProtoParser.isUnresolvedWaiting()) {
ProtoParser.checkForPossibleUnresolvedViolations(expr, cursor, pCtx);
}
int st = cursor;
captureToNextTokenJunction();
if (isReservedWord(name = createStringTrimmed(expr, st, cursor - st)) || isNotValidNameorLabel(name))
throw new CompileException("illegal prototype name or use of reserved word", expr, cursor);
if (expr[cursor = nextNonBlank()] != '{') {
throw new CompileException("expected '{' but found: " + expr[cursor], expr, cursor);
}
cursor = balancedCaptureWithLineAccounting(expr, st = cursor + 1, end, '{', pCtx);
ProtoParser parser = new ProtoParser(expr, st, cursor, name, pCtx, fields, splitAccumulator);
Proto proto = parser.parse();
pCtx.addImport(proto);
proto.setCursorPosition(st, cursor);
cursor = parser.getCursor();
ProtoParser.notifyForLateResolution(proto);
return lastNode = proto;
}
case STACKLANG: {
if (expr[cursor = nextNonBlank()] != '{') {
throw new CompileException("expected '{' but found: " + expr[cursor], expr, cursor);
}
int st;
cursor = balancedCaptureWithLineAccounting(expr, st = cursor + 1, end, '{', pCtx);
Stacklang stacklang = new Stacklang(expr, st, cursor - st, fields, pCtx);
cursor++;
return lastNode = stacklang;
}
default:
if (cond) {
if (expr[cursor] != '(') {
throw new CompileException("expected '(' but encountered: " + expr[cursor], expr, cursor);
}
/**
* This block is an: IF, FOREACH or WHILE node.
*/
endCond = cursor = balancedCaptureWithLineAccounting(expr, startCond = cursor, end, '(', pCtx);
startCond++;
cursor++;
}
}
skipWhitespace();
if (cursor >= end) {
throw new CompileException("unexpected end of statement", expr, end);
} else if (expr[cursor] == '{') {
blockEnd = cursor = balancedCaptureWithLineAccounting(expr, blockStart = cursor, end, '{', pCtx);
} else {
blockStart = cursor - 1;
captureToEOSorEOL();
blockEnd = cursor + 1;
}
if (type == ASTNode.BLOCK_IF) {
IfNode ifNode = (IfNode) node;
if (node != null) {
if (!cond) {
return ifNode.setElseBlock(expr, st = trimRight(blockStart + 1), trimLeft(blockEnd) - st, pCtx);
} else {
return ifNode
.setElseIf((IfNode) createBlockToken(startCond, endCond, trimRight(blockStart + 1), trimLeft(blockEnd), type));
}
} else {
return createBlockToken(startCond, endCond, blockStart + 1, blockEnd, type);
}
} else if (type == ASTNode.BLOCK_DO) {
cursor++;
skipWhitespace();
st = cursor;
captureToNextTokenJunction();
if ("while".equals(name = new String(expr, st, cursor - st))) {
skipWhitespace();
startCond = cursor + 1;
endCond = cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '(', pCtx);
return createBlockToken(startCond, endCond, trimRight(blockStart + 1), trimLeft(blockEnd), type);
} else if ("until".equals(name)) {
skipWhitespace();
startCond = cursor + 1;
endCond = cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '(', pCtx);
return createBlockToken(startCond, endCond, trimRight(blockStart + 1), trimLeft(blockEnd), ASTNode.BLOCK_DO_UNTIL);
} else {
throw new CompileException("expected 'while' or 'until' but encountered: " + name, expr, cursor);
}
}
// DON"T REMOVE THIS COMMENT!
// else if (isFlag(ASTNode.BLOCK_FOREACH) || isFlag(ASTNode.BLOCK_WITH)) {
else {
return createBlockToken(startCond, endCond, trimRight(blockStart + 1), trimLeft(blockEnd), type);
}
}
/**
* Checking from the current cursor position, check to see if the if-then-else block continues.
*
* @return boolean value
*/
protected boolean ifThenElseBlockContinues() {
if ((cursor + 4) < end) {
if (expr[cursor] != ';') cursor--;
skipWhitespace();
return expr[cursor] == 'e' && expr[cursor + 1] == 'l' && expr[cursor + 2] == 's' && expr[cursor + 3] == 'e'
&& (isWhitespace(expr[cursor + 4]) || expr[cursor + 4] == '{');
}
return false;
}
/**
* Checking from the current cursor position, check to see if we're inside a contiguous identifier.
*
* @return -
*/
protected boolean tokenContinues() {
if (cursor == end) return false;
else if (expr[cursor] == '.' || expr[cursor] == '[') return true;
else if (isWhitespace(expr[cursor])) {
int markCurrent = cursor;
skipWhitespace();
if (cursor != end && (expr[cursor] == '.' || expr[cursor] == '[')) return true;
cursor = markCurrent;
}
return false;
}
/**
* The parser should find a statement ending condition when this is called, otherwise everything should blow up.
*/
protected void expectEOS() {
skipWhitespace();
if (cursor != end && expr[cursor] != ';') {
switch (expr[cursor]) {
case '&':
if (lookAhead() == '&') return;
else break;
case '|':
if (lookAhead() == '|') return;
else break;
case '!':
if (lookAhead() == '=') return;
else break;
case '<':
case '>':
return;
case '=': {
switch (lookAhead()) {
case '=':
case '+':
case '-':
case '*':
return;
}
break;
}
case '+':
case '-':
case '/':
case '*':
if (lookAhead() == '=') return;
else break;
}
throw new CompileException("expected end of statement but encountered: " + (cursor == end ? "<end of stream>" : expr[cursor]),
expr, cursor);
}
}
/**
* Checks to see if the next part of the statement is an identifier part.
*
* @return boolean true if next part is identifier part.
*/
protected boolean isNextIdentifier() {
while (cursor != end && isWhitespace(expr[cursor]))
cursor++;
return cursor != end && isIdentifierPart(expr[cursor]);
}
/**
* Capture from the current cursor position, to the end of the statement.
*/
protected void captureToEOS() {
while (cursor != end) {
switch (expr[cursor]) {
case '(':
case '[':
case '{':
if ((cursor = balancedCaptureWithLineAccounting(expr, cursor, end, expr[cursor], pCtx)) >= end) return;
break;
case '"':
case '\'':
cursor = captureStringLiteral(expr[cursor], expr, cursor, end);
break;
case ',':
case ';':
case '}':
return;
}
cursor++;
}
}
/**
* From the current cursor position, capture to the end of statement, or the end of line, whichever comes first.
*/
protected void captureToEOSorEOL() {
while (cursor != end && (expr[cursor] != '\n' && expr[cursor] != '\r' && expr[cursor] != ';')) {
cursor++;
}
}
/**
* Capture to the end of the current identifier under the cursor.
*/
protected void captureIdentifier() {
boolean captured = false;
if (cursor == end) throw new CompileException("unexpected end of statement: EOF", expr, cursor);
while (cursor != end) {
switch (expr[cursor]) {
case ';':
return;
default: {
if (!isIdentifierPart(expr[cursor])) {
if (captured) return;
throw new CompileException("unexpected symbol (was expecting an identifier): " + expr[cursor], expr, cursor);
} else {
captured = true;
}
}
}
cursor++;
}
}
/**
* From the current cursor position, capture to the end of the current token.
*/
protected void captureToEOT() {
skipWhitespace();
do {
switch (expr[cursor]) {
case '(':
case '[':
case '{':
if ((cursor = balancedCaptureWithLineAccounting(expr, cursor, end, expr[cursor], pCtx)) == -1) {
throw new CompileException("unbalanced braces", expr, cursor);
}
break;
case '*':
case '/':
case '+':
case '%':
case ',':
case '=':
case '&':
case '|':
case ';':
return;
case '.':
skipWhitespace();
break;
case '\'':
cursor = captureStringLiteral('\'', expr, cursor, end);
break;
case '"':
cursor = captureStringLiteral('"', expr, cursor, end);
break;
default:
if (isWhitespace(expr[cursor])) {
skipWhitespace();
if (cursor < end && expr[cursor] == '.') {
if (cursor != end) cursor++;
skipWhitespace();
break;
} else {
trimWhitespace();
return;
}
}
}
} while (++cursor < end);
}
protected boolean lastNonWhite(char c) {
int i = cursor - 1;
while (isWhitespace(expr[i]))
i--;
return c == expr[i];
}
/**
* From the specified cursor position, trim out any whitespace between the current position and the end of the
* last non-whitespace character.
*
* @param pos - current position
* @return new position.
*/
protected int trimLeft(int pos) {
if (pos > end) pos = end;
while (pos > 0 && pos >= st && (isWhitespace(expr[pos - 1]) || expr[pos - 1] == ';'))
pos--;
return pos;
}
/**
* From the specified cursor position, trim out any whitespace between the current position and beginning of the
* first non-whitespace character.
*
* @param pos -
* @return -
*/
protected int trimRight(int pos) {
while (pos != end && isWhitespace(expr[pos]))
pos++;
return pos;
}
/**
* If the cursor is currently pointing to whitespace, move the cursor forward to the first non-whitespace
* character, but account for carriage returns in the script (updates parser field: line).
*/
protected void skipWhitespace() {
Skip: while (cursor != end) {
switch (expr[cursor]) {
case '\n':
line++;
lastLineStart = cursor;
case '\r':
cursor++;
continue;
case '/':
if (cursor + 1 != end) {
switch (expr[cursor + 1]) {
case '/':
expr[cursor++] = ' ';
while (cursor != end && expr[cursor] != '\n') {
expr[cursor++] = ' ';
}
if (cursor != end) {
cursor++;
}
line++;
lastLineStart = cursor;
continue;
case '*':
int len = end - 1;
int st = cursor;
cursor++;
while (cursor != len && !(expr[cursor] == '*' && expr[cursor + 1] == '/')) {
cursor++;
}
if (cursor != len) {
cursor += 2;
}
for (int i = st; i < cursor; i++) {
expr[i] = ' ';
}
continue;
default:
break Skip;
}
}
default:
if (!isWhitespace(expr[cursor])) break Skip;
}
cursor++;
}
}
/**
* From the current cursor position, capture to the end of the next token junction.
*/
protected void captureToNextTokenJunction() {
while (cursor != end) {
switch (expr[cursor]) {
case '{':
case '(':
return;
case '/':
if (expr[cursor + 1] == '*') return;
case '[':
cursor = balancedCaptureWithLineAccounting(expr, cursor, end, '[', pCtx) + 1;
continue;
default:
if (isWhitespace(expr[cursor])) {
return;
}
cursor++;
}
}
}
/**
* From the current cursor position, trim backward over any whitespace to the first non-whitespace character.
*/
protected void trimWhitespace() {
while (cursor != 0 && isWhitespace(expr[cursor - 1]))
cursor--;
}
/**
* Set and finesse the expression, trimming an leading or proceeding whitespace.
*
* @param expression the expression
*/
protected void setExpression(String expression) {
if (expression != null && expression.length() != 0) {
synchronized (EX_PRECACHE) {
if ((this.expr = EX_PRECACHE.get(expression)) == null) {
end = length = (this.expr = expression.toCharArray()).length;
// trim any whitespace.
while (start < length && isWhitespace(expr[start]))
start++;
while (length != 0 && isWhitespace(this.expr[length - 1]))
length--;
char[] e = new char[length];
for (int i = 0; i != e.length; i++)
e[i] = expr[i];
EX_PRECACHE.put(expression, e);
} else {
end = length = this.expr.length;
}
}
}
}
/**
* Return the previous non-whitespace character.
*
* @return -
*/
protected char lookToLast() {
if (cursor == start) return 0;
int temp = cursor;
for (;;) {
if (temp == start || !isWhitespace(expr[--temp])) break;
}
return expr[temp];
}
/**
* Return the last character (delta -1 of cursor position).
*
* @return -
*/
protected char lookBehind() {
if (cursor == start) return 0;
else return expr[cursor - 1];
}
/**
* Return the next character (delta 1 of cursor position).
*
* @return -
*/
protected char lookAhead() {
if (cursor + 1 != end) {
return expr[cursor + 1];
} else {
return 0;
}
}
/**
* Return the character, forward of the currrent cursor position based on the specified range delta.
*
* @param range -
* @return -
*/
protected char lookAhead(int range) {
if ((cursor + range) >= end) return 0;
else {
return expr[cursor + range];
}
}
/**
* Returns true if the next is an identifier or literal.
*
* @return true of false
*/
protected boolean isNextIdentifierOrLiteral() {
int tmp = cursor;
if (tmp == end) return false;
else {
while (tmp != end && isWhitespace(expr[tmp]))
tmp++;
if (tmp == end) return false;
char n = expr[tmp];
return isIdentifierPart(n) || isDigit(n) || n == '\'' || n == '"';
}
}
/**
* Increment one cursor position, and move cursor to next non-blank part.
*
* @return cursor position
*/
public int incNextNonBlank() {
cursor++;
return nextNonBlank();
}
/**
* Move to next cursor position from current cursor position.
*
* @return cursor position
*/
public int nextNonBlank() {
if ((cursor + 1) >= end) {
throw new CompileException("unexpected end of statement", expr, st);
}
int i = cursor;
while (i != end && isWhitespace(expr[i]))
i++;
return i;
}
/**
* Expect the next specified character or fail
*
* @param c character
*/
public void expectNextChar_IW(char c) {
nextNonBlank();
if (cursor == end) throw new CompileException("unexpected end of statement", expr, st);
if (expr[cursor] != c) throw new CompileException("unexpected character ('" + expr[cursor] + "'); was expecting: " + c, expr, st);
}
/**
* NOTE: This method assumes that the current position of the cursor is at the end of a logical statement, to
* begin with.
* <p/>
* Determines whether or not the logical statement is manually terminated with a statement separator (';').
*
* @return -
*/
protected boolean isStatementNotManuallyTerminated() {
if (cursor >= end) return false;
int c = cursor;
while (c != end && isWhitespace(expr[c]))
c++;
return !(c != end && expr[c] == ';');
}
protected void addFatalError(String message) {
pCtx.addError(new ErrorDetail(expr, st, true, message));
}
protected void addFatalError(String message, int start) {
pCtx.addError(new ErrorDetail(expr, start, true, message));
}
/**
* Reduce the current operations on the stack.
*
* @param operator the operator
* @return a stack control code
*/
protected int arithmeticFunctionReduction(int operator) {
ASTNode tk;
int operator2;
/**
* If the next token is an operator, we check to see if it has a higher
* precdence.
*/
if ((tk = nextToken()) != null) {
if (isArithmeticOperator(operator2 = tk.getOperator()) && PTABLE[operator2] > PTABLE[operator]) {
stk.xswap();
/**
* The current arith. operator is of higher precedence the last.
*/
tk = nextToken();
/**
* Check to see if we're compiling or executing interpretively. If we're compiling, we really
* need to stop if this is not a literal.
*/
if (compileMode && !tk.isLiteral()) {
splitAccumulator.push(tk, new OperatorNode(operator2, expr, st, pCtx));
return OP_OVERFLOW;
}
dStack.push(operator = operator2, tk.getReducedValue(ctx, ctx, variableFactory));
while (true) {
ASTNode previousToken = tk;
// look ahead again
if ((tk = nextToken()) != null && (operator2 = tk.getOperator()) != -1 && operator2 != END_OF_STMT
&& PTABLE[operator2] > PTABLE[operator]) {
// if we have back to back operations on the stack, we don't xswap
if (dStack.isReduceable()) {
stk.copyx2(dStack);
}
/**
* This operator is of higher precedence, or the same level precedence. push to the RHS.
*/
ASTNode nextToken = nextToken();
if (compileMode && !nextToken.isLiteral()) {
splitAccumulator.push(nextToken, new OperatorNode(operator2, expr, st, pCtx));
return OP_OVERFLOW;
}
dStack.push(operator = operator2, nextToken.getReducedValue(ctx, ctx, variableFactory));
continue;
} else if (tk != null && operator2 != -1 && operator2 != END_OF_STMT) {
if (PTABLE[operator2] == PTABLE[operator]) {
if (!dStack.isEmpty()) dreduce();
else {
while (stk.isReduceable()) {
stk.xswap_op();
}
}
/**
* This operator is of the same level precedence. push to the RHS.
*/
dStack.push(operator = operator2, nextToken().getReducedValue(ctx, ctx, variableFactory));
continue;
} else {
/**
* The operator doesn't have higher precedence. Therfore reduce the LHS.
*/
while (dStack.size() > 1) {
dreduce();
}
operator = tk.getOperator();
// Reduce the lesser or equal precedence operations.
while (stk.size() != 1 && stk.peek2() instanceof Integer
&& ((operator2 = (Integer) stk.peek2()) < PTABLE.length) && PTABLE[operator2] >= PTABLE[operator]) {
stk.xswap_op();
}
}
} else {
/**
* There are no more tokens.
*/
if (dStack.size() > 1) {
dreduce();
}
if (stk.isReduceable()) stk.xswap();
break;
}
if ((tk = nextToken()) != null) {
switch (operator) {
case AND: {
if (!(stk.peekBoolean())) return OP_TERMINATE;
else {
splitAccumulator.add(tk);
return AND;
}
}
case OR: {
if ((stk.peekBoolean())) return OP_TERMINATE;
else {
splitAccumulator.add(tk);
return OR;
}
}
default:
if (compileMode && !tk.isLiteral()) {
stk.push(operator, tk);
return OP_NOT_LITERAL;
}
stk.push(operator, tk.getReducedValue(ctx, ctx, variableFactory));
}
}
}
} else if (!tk.isOperator()) {
throw new CompileException("unexpected token: " + tk.getName(), expr, st);
} else {
reduce();
splitAccumulator.push(tk);
}
}
// while any values remain on the stack
// keep XSWAPing and reducing, until there is nothing left.
if (stk.isReduceable()) {
while (true) {
reduce();
if (stk.isReduceable()) {
stk.xswap();
} else {
break;
}
}
}
return OP_RESET_FRAME;
}
private void dreduce() {
stk.copy2(dStack);
stk.op();
}
/**
* This method is called when we reach the point where we must subEval a trinary operation in the expression.
* (ie. val1 op val2). This is not the same as a binary operation, although binary operations would appear
* to have 3 structures as well. A binary structure (or also a junction in the expression) compares the
* current state against 2 downrange structures (usually an op and a val).
*/
protected void reduce() {
Object v1, v2;
int operator;
try {
switch (operator = (Integer) stk.pop()) {
case ADD:
case SUB:
case DIV:
case MULT:
case MOD:
case EQUAL:
case NEQUAL:
case GTHAN:
case LTHAN:
case GETHAN:
case LETHAN:
case POWER:
stk.op(operator);
break;
case AND:
v1 = stk.pop();
stk.push(((Boolean) stk.pop()) && ((Boolean) v1));
break;
case OR:
v1 = stk.pop();
stk.push(((Boolean) stk.pop()) || ((Boolean) v1));
break;
case CHOR:
v1 = stk.pop();
if (!isEmpty(v2 = stk.pop()) || !isEmpty(v1)) {
stk.clear();
stk.push(!isEmpty(v2) ? v2 : v1);
return;
} else stk.push(null);
break;
case REGEX:
stk.push(java.util.regex.Pattern.compile(java.lang.String.valueOf(stk.pop()))
.matcher(java.lang.String.valueOf(stk.pop())).matches());
break;
case INSTANCEOF:
stk.push(((Class) stk.pop()).isInstance(stk.pop()));
break;
case CONVERTABLE_TO:
stk.push(org.mvel2.DataConversion.canConvert(stk.peek2().getClass(), (Class) stk.pop2()));
break;
case CONTAINS:
stk.push(containsCheck(stk.peek2(), stk.pop2()));
break;
case SOUNDEX:
stk.push(soundex(java.lang.String.valueOf(stk.pop())).equals(soundex(java.lang.String.valueOf(stk.pop()))));
break;
case SIMILARITY:
stk.push(similarity(java.lang.String.valueOf(stk.pop()), java.lang.String.valueOf(stk.pop())));
break;
default:
reduceNumeric(operator);
}
} catch (ClassCastException e) {
throw new CompileException("syntax error or incompatable types", expr, st, e);
} catch (ArithmeticException e) {
throw new CompileException("arithmetic error: " + e.getMessage(), expr, st, e);
} catch (Exception e) {
throw new CompileException("failed to subEval expression", expr, st, e);
}
}
private void reduceNumeric(int operator) {
Object op1 = stk.peek2();
Object op2 = stk.pop2();
if (op1 instanceof Integer) {
if (op2 instanceof Integer) {
reduce((Integer) op1, operator, (Integer) op2);
} else {
reduce((Integer) op1, operator, (Long) op2);
}
} else {
if (op2 instanceof Integer) {
reduce((Long) op1, operator, (Integer) op2);
} else {
reduce((Long) op1, operator, (Long) op2);
}
}
}
private void reduce(int op1, int operator, int op2) {
switch (operator) {
case BW_AND:
stk.push(op1 & op2);
break;
case BW_OR:
stk.push(op1 | op2);
break;
case BW_XOR:
stk.push(op1 ^ op2);
break;
case BW_SHIFT_LEFT:
stk.push(op1 << op2);
break;
case BW_USHIFT_LEFT:
int iv2 = op1;
if (iv2 < 0) iv2 *= -1;
stk.push(iv2 << op2);
break;
case BW_SHIFT_RIGHT:
stk.push(op1 >> op2);
break;
case BW_USHIFT_RIGHT:
stk.push(op1 >>> op2);
break;
}
}
private void reduce(int op1, int operator, long op2) {
switch (operator) {
case BW_AND:
stk.push(op1 & op2);
break;
case BW_OR:
stk.push(op1 | op2);
break;
case BW_XOR:
stk.push(op1 ^ op2);
break;
case BW_SHIFT_LEFT:
stk.push(op1 << op2);
break;
case BW_USHIFT_LEFT:
int iv2 = op1;
if (iv2 < 0) iv2 *= -1;
stk.push(iv2 << op2);
break;
case BW_SHIFT_RIGHT:
stk.push(op1 >> op2);
break;
case BW_USHIFT_RIGHT:
stk.push(op1 >>> op2);
break;
}
}
private void reduce(long op1, int operator, int op2) {
switch (operator) {
case BW_AND:
stk.push(op1 & op2);
break;
case BW_OR:
stk.push(op1 | op2);
break;
case BW_XOR:
stk.push(op1 ^ op2);
break;
case BW_SHIFT_LEFT:
stk.push(op1 << op2);
break;
case BW_USHIFT_LEFT:
long iv2 = op1;
if (iv2 < 0) iv2 *= -1;
stk.push(iv2 << op2);
break;
case BW_SHIFT_RIGHT:
stk.push(op1 >> op2);
break;
case BW_USHIFT_RIGHT:
stk.push(op1 >>> op2);
break;
}
}
private void reduce(long op1, int operator, long op2) {
switch (operator) {
case BW_AND:
stk.push(op1 & op2);
break;
case BW_OR:
stk.push(op1 | op2);
break;
case BW_XOR:
stk.push(op1 ^ op2);
break;
case BW_SHIFT_LEFT:
stk.push(op1 << op2);
break;
case BW_USHIFT_LEFT:
long iv2 = op1;
if (iv2 < 0) iv2 *= -1;
stk.push(iv2 << op2);
break;
case BW_SHIFT_RIGHT:
stk.push(op1 >> op2);
break;
case BW_USHIFT_RIGHT:
stk.push(op1 >>> op2);
break;
}
}
public int getCursor() {
return cursor;
}
public char[] getExpression() {
return expr;
}
/**
* Set and finesse the expression, trimming an leading or proceeding whitespace.
*
* @param expression the expression
*/
protected void setExpression(char[] expression) {
end = length = (this.expr = expression).length;
while (start < length && isWhitespace(expr[start]))
start++;
while (length != 0 && isWhitespace(this.expr[length - 1]))
length--;
}
}
| [
"xhinliang@gmail.com"
] | xhinliang@gmail.com |
d5c5063fc2bbf5c2dec878d6c27aabf2dbc3a56e | f6f48f967061cb38682872f614eef93b8f0eba9a | /LayoutQuiz/app/src/test/java/com/example/layoutquiz/ExampleUnitTest.java | 20c1fa0df74cd763b9f3d4025ca614169c5dee64 | [] | no_license | neelshah400/Mobile-App-Development | c0e38643d5c932a3d24e3cc3346d847a81fd95f8 | fa6b258871537bd5533621616665cb48e5b832dc | refs/heads/master | 2022-11-05T10:21:01.685163 | 2020-06-16T20:22:03 | 2020-06-16T20:22:03 | 207,014,162 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.example.layoutquiz;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"34845513+neelshah400@users.noreply.github.com"
] | 34845513+neelshah400@users.noreply.github.com |
2ea77ddb6c20633c481dafd29ea23ceb08c3849c | 536853764cb8d3230d5acfaa98748dbf09af3187 | /dhq-admin/src/main/java/com/xnt/dhq/model/DhqUserParam.java | 6c10896483212b6811a1e37bb483e17533403aaa | [] | no_license | goodgoodcoding/wuyuetian | ed7deef776cb72d8e8e63dcf0ca31bf12e780e5b | 1cb251f582730474a280f29b719019423a60a871 | refs/heads/master | 2020-05-13T16:11:55.980844 | 2019-04-16T08:18:22 | 2019-04-16T08:18:22 | 181,637,652 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 540 | java | package com.xnt.dhq.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import java.util.List;
/**
* 用户前台展示参数
* Created by Jialin on 2019/4/11.
*/
public class DhqUserParam extends DhqUser{
private List<Role> roles;
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
}
| [
"719695192@qq.com"
] | 719695192@qq.com |
ec242f06461568a088807cb1fe8dde54e2f26224 | 43235e2bbd9bae3ddd2ac1c845935bbdba5dde18 | /springcloud-config-server-3344/src/main/java/com/ybs/springcloud/ConfigServer_3344.java | d73c5b45cd682ef6f231d18414ca279c13cae9bc | [] | no_license | ybsdegit/SpringCloud | 4e1bc6a8befad705606539c20fa91a5f68700403 | 79f6a696aac08b648f16c4b79ef0f5d6fa4fa99a | refs/heads/master | 2022-06-22T03:46:10.825710 | 2020-03-07T17:51:06 | 2020-03-07T17:51:06 | 245,211,098 | 0 | 0 | null | 2020-10-13T20:06:14 | 2020-03-05T16:18:17 | Java | UTF-8 | Java | false | false | 484 | java | package com.ybs.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
/**
* ConfigServer_3344
*
* @author Paulson
* @date 2020/3/8 1:26
*/
@SpringBootApplication
@EnableConfigServer
public class ConfigServer_3344 {
public static void main(String[] args) {
SpringApplication.run(ConfigServer_3344.class, args);
}
}
| [
"ybsdeyx@163.com"
] | ybsdeyx@163.com |
733f5fc9df8180b7afe4951f4de40b761ddd5f9f | aeae9ea7d1f410ac1b525c0d0b906b0bfb5f98c4 | /rest-demo-2/src/main/java/tk/restexample2/restdemo2/customeException/ExceptionResponse.java | 6d8a1f1449d04ef683c6801a96064bc3c48df4a9 | [] | no_license | tknikhil/Spring_Rest_Test | 5de41aecbd40d64a89bd7c43e5809038bbb5c2f2 | cfdb8046b2e7c260347c001967937a52508d57f8 | refs/heads/master | 2022-07-27T17:18:03.173762 | 2022-07-09T07:37:57 | 2022-07-09T07:37:57 | 47,314,253 | 0 | 0 | null | 2022-07-06T18:04:08 | 2015-12-03T06:59:10 | JavaScript | UTF-8 | Java | false | false | 517 | java | package tk.restexample2.restdemo2.customeException;
import java.util.Date;
public class ExceptionResponse {
private Date timestamp;
private String message;
private String detail;
public ExceptionResponse(Date timestamp, String message, String detail) {
super();
this.timestamp = timestamp;
this.message = message;
this.detail = detail;
}
public Date getTimestamp() {
return timestamp;
}
public String getMessage() {
return message;
}
public String getDetail() {
return detail;
}
}
| [
"nikhiltk02@gmail.com"
] | nikhiltk02@gmail.com |
eae7df01ab6f1a73225ffb03552869e21d5a3477 | 2427fb877f8f5e6959c1e46638e670c324f4f181 | /src/mapper/OrderMapper.java | ebbca526247cd624da161ddf5bf0a3c155a6a408 | [] | no_license | sakuraNouta/myCart | 6fa5faceb92e1b46dc1417fc6ff05c9f567ec268 | c69ef27e42a931709dc6b93837c973b9c68605be | refs/heads/master | 2020-03-18T05:59:06.135816 | 2018-05-22T06:30:34 | 2018-05-22T06:30:34 | 134,371,051 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 301 | java | package mapper;
import java.util.List;
import pojo.Order;
public interface OrderMapper {
public void add(int uid);
public void delete(int id);
public void update(Order order);
public List<Order> list();
public Order get(int id);
public int count();
public int getId(int uid);
}
| [
"208917712@qq.com"
] | 208917712@qq.com |
9965448f051d8f99f82dc76e3711ef6e4eedabe5 | eb30fa613bec8a3a3a27b2c0c4f55db4dac54604 | /bom/src/main/java/org/dbp/bom/personas/PersonaJuridica.java | 6fd6ccab9c30c9b590fcfd64d1cc974e0e34be8e | [] | no_license | blancoparis-tfc/tfc | 7416898563257a917f291323410f7227b5647757 | 6141d2b5aad5a71ab19bc84ac8a9bcb2246ff9c2 | refs/heads/master | 2016-08-11T20:54:24.827593 | 2015-11-29T22:32:49 | 2015-11-29T22:32:49 | 44,634,400 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package org.dbp.bom.personas;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
@SuppressWarnings("serial")
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class PersonaJuridica extends Persona {
private String nombreSocial;
private String nombreComercial;
@ManyToOne
private PersonaJuridica empresaMaestra;
@OneToMany(mappedBy="empresaMaestra",cascade={CascadeType.PERSIST,CascadeType.MERGE})
private List<PersonaJuridica> subGrupo;
@OneToMany(orphanRemoval=true,cascade={CascadeType.ALL})
private List<DelegacionComercial> delegacionesComerciales;
public List<DelegacionComercial> getDelegacionesComerciales() {
return delegacionesComerciales;
}
public void setDelegacionesComerciales(
List<DelegacionComercial> delegacionesComerciales) {
this.delegacionesComerciales = delegacionesComerciales;
}
public PersonaJuridica getEmpresaMaestra() {
return empresaMaestra;
}
public void setEmpresaMaestra(PersonaJuridica empresaMaestra) {
this.empresaMaestra = empresaMaestra;
}
public String getNombreSocial() {
return nombreSocial;
}
public void setNombreSocial(String nombreSocial) {
this.nombreSocial = nombreSocial;
}
public String getNombreComercial() {
return nombreComercial;
}
public void setNombreComercial(String nombreComercial) {
this.nombreComercial = nombreComercial;
}
public List<PersonaJuridica> getSubGrupo() {
return subGrupo;
}
public void setSubGrupo(List<PersonaJuridica> subGrupo) {
this.subGrupo = subGrupo;
}
}
| [
"blancoparis.tfc@gmail.com"
] | blancoparis.tfc@gmail.com |
dba104841b9c16de54b2de1de0a0f3186923e32f | 3df2b63b1f5e597e25a47b4a237de4f3245b50c5 | /app/src/main/java/com/kai/lktMode/tool/util/local/AppUtils.java | dbad317d4ff50e95a5f1f2c04dabdbdc8bae1a92 | [] | no_license | kaihuang666/lktRun | de92c65e48c8afb469d723d96925c31d941330a9 | 86fe3d5cd90df176bb607b152279c8c0280f93c1 | refs/heads/master | 2020-09-16T10:41:51.269851 | 2019-12-17T13:54:20 | 2019-12-17T13:54:20 | 223,744,820 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,040 | java | package com.kai.lktMode.tool.util.local;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import java.util.Set;
public class AppUtils {
/**
* 获取应用程序名称
*/
public static synchronized String getAppName(Context context,String packageName) {
try {
ApplicationInfo appInfo =context.getPackageManager().getApplicationInfo(packageName, PackageManager.GET_META_DATA);
String appName = appInfo.loadLabel(context.getPackageManager()) + "";
return appName;
}catch (PackageManager.NameNotFoundException e){
return "";
}
catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static boolean checkAppInstalled(Context context,String pkgName) {
if (pkgName== null || pkgName.isEmpty()) {
return false;
}
PackageInfo packageInfo;
try {
packageInfo = context.getPackageManager().getPackageInfo(pkgName, 0);
} catch (PackageManager.NameNotFoundException e) {
packageInfo = null;
e.printStackTrace();
}
if(packageInfo == null) {
return false;
} else {
return true;//true为安装了,false为未安装
}
}
/**
* [获取应用程序版本名称信息]
* @param context
* @return 当前应用的版本名称
*/
public static synchronized String getPackageName(Context context) {
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(
context.getPackageName(), 0);
return packageInfo.packageName;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 获取图标 bitmap
* @param context
*/
public static synchronized Drawable getDrawable(Context context,String packageName) {
PackageManager packageManager = null;
ApplicationInfo applicationInfo = null;
try {
packageManager = context
.getPackageManager();
applicationInfo = packageManager.getApplicationInfo(
packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
applicationInfo = null;
}
if (applicationInfo==null){
return null;
}
Drawable d = packageManager.getApplicationIcon(applicationInfo); //xxx根据自己的情况获取drawable
return d;
}
public static boolean isApkInDebug(Context context) {
try {
ApplicationInfo info = context.getApplicationInfo();
return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} catch (Exception e) {
return false;
}
}
public static int Dp2Px(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density; //当前屏幕密度因子
return (int) (dp * scale + 0.5f);
}
public static int Dp2Dip(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density; //当前屏幕密度因子
return (int) (dp / scale + 0.5f);
}
public static int Dp(Context context,float dp){
final float scale = context.getResources().getDisplayMetrics().density; //当前屏幕密度因子
return (int)(dp/scale);
}
public static boolean isPad(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
}
| [
"1354268264@qq.com"
] | 1354268264@qq.com |
18c7ffad8b6c2ae3b35e60d58851a5967f338f7a | 4800f2796a60d9cddd3555733378206c0592431e | /src/main/java/com/example/myitemstockbatch/springbatch/service/DatetimeRecordService.java | c29a001a2ee08335fbdb61b57e27a62f38089e9e | [] | no_license | CodyBuilder-dev/my-item-stock-batch | f28e493d5b2445e4761b0fc80a92005bb136debe | f2ca3daea5e3ab35b935008004374a047b9e89c9 | refs/heads/main | 2023-05-07T19:06:32.847431 | 2021-05-17T08:36:57 | 2021-05-17T08:36:57 | 366,415,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 508 | java | package com.example.myitemstockbatch.springbatch.service;
import com.example.myitemstockbatch.springbatch.mapper.DatetimeRecordMapper;
import org.springframework.stereotype.Service;
@Service
public class DatetimeRecordService {
DatetimeRecordMapper datetimeRecordMapper;
DatetimeRecordService(DatetimeRecordMapper datetimeRecordMapper){
this.datetimeRecordMapper = datetimeRecordMapper;
}
public void recordDatetimeNow(){
datetimeRecordMapper.recordDatetimeNow();
}
}
| [
"imspecial1@u.sogang.ac.kr"
] | imspecial1@u.sogang.ac.kr |
cd3497aed6dcad7d6c23752a2c7efb75e206d162 | ee5497de0f9058a4326dd24eb01fc0d3abac4b8f | /app/src/main/java/com/example/flias/appcarnaval/FlipAnimator.java | 90e685749be281b461ad811d18b2588126789f94 | [] | no_license | andres4588/AppCarnaval | 6ecd63d870c1d0a4c8b36ba40f0708599eff8e2e | 2a9d29a61ddc92840c79fa77a2a1356f95120613 | refs/heads/master | 2021-08-19T22:37:03.047671 | 2017-11-27T16:27:38 | 2017-11-27T16:27:38 | 111,625,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,461 | java | package com.example.flias.appcarnaval;
import android.animation.AnimatorInflater;
import android.animation.AnimatorSet;
import android.content.Context;
import android.view.View;
/**
* Created by daniel on 10/03/2017.
*/
public class FlipAnimator {
private static String TAG = FlipAnimator.class.getSimpleName();
private static AnimatorSet buttonIn, topOut, buttonOut, topIn;
/**
* Performs flip animation on two views
*/
public static void flipView(Context context, final View back, final View front, boolean showFront) {
buttonIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, R.animator.card_flip_button_in);
topOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, R.animator.card_flip_top_out);
buttonOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, R.animator.card_flip_button_out);
topIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, R.animator.card_flip_top_in);
final AnimatorSet showFrontAnim = new AnimatorSet();
final AnimatorSet showBackAnim = new AnimatorSet();
buttonIn.setTarget(back);
topOut.setTarget(front);
showFrontAnim.playTogether(buttonIn, topOut);
buttonOut.setTarget(back);
topIn.setTarget(front);
showBackAnim.playTogether(topIn, buttonOut);
if (showFront) {
showFrontAnim.start();
} else {
showBackAnim.start();
}
}
}
| [
"andres_erazo30@hotmail.com"
] | andres_erazo30@hotmail.com |
40e8b61d84ec2044ecdd0bd8f76a7b31c23ee553 | 346bd8c38715cde2c316775cb4bad0de0ee676cb | /src/com/wj/leetcode/PriorityQueue/TopKFrequent.java | cceb0ae6f505220b327a20805fb67d02eb128d8a | [] | no_license | wjialish/leetcode-algorithm-wj | cce7670ff99c14a07c249c8cbc926a1efbea41d4 | 8ae33cf0c629baf84336a4bf4c37d8dae06f61d9 | refs/heads/master | 2022-11-12T14:03:13.352704 | 2020-07-13T12:20:39 | 2020-07-13T12:20:39 | 256,108,680 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,101 | java | package com.wj.leetcode.PriorityQueue;
import java.awt.RenderingHints.Key;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
public class TopKFrequent {
/*
* 692. Top K Frequent Words
Given a non-empty list of words, return the k most frequent elements.
Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower alphabetical order comes first.
Example 1:
Input: ["i", "love", "leetcode", "i", "love", "coding"], k = 2
Output: ["i", "love"]
Explanation: "i" and "love" are the two most frequent words.
Note that "i" comes before "love" due to a lower alphabetical order.
Example 2:
Input: ["the", "day", "is", "sunny", "the", "the", "the", "sunny", "is", "is"], k = 4
Output: ["the", "is", "sunny", "day"]
Explanation: "the", "is", "sunny" and "day" are the four most frequent words,
with the number of occurrence being 4, 3, 2 and 1 respectively.
*/
//m1:排序
// 计算每个单词的频率,并使用这些频率的自定义排序关系对单词进行排序,并取前k
public List<String> topKFrequent(String[] words, int k) {
Map<String, Integer> map = new HashMap<String, Integer>();
for(int i=0;i<words.length;i++) {
map.put(words[i], map.getOrDefault(words[i], 0)+1);
}
List<String> resList = new ArrayList<String>(map.keySet());
// v1.compareTo(v2) 按字母大小写 从小到大 排序
// map.get(v2)-map.get(v1) 单词频次高低按照从大到小排序
Collections.sort(resList,(v1,v2)-> map.get(v1).equals(map.get(v2)) ? v1.compareTo(v2) : map.get(v2)-map.get(v1));
return resList.subList(0, k);
}
//m2: 小根堆
public List<String> topKFrequent2(String[] words, int k) {
Map<String, Integer> map = new HashMap<String, Integer>();
for(int i=0;i<words.length;i++) {
map.put(words[i], map.getOrDefault(words[i], 0)+1);
}
List<String> resList = new ArrayList<String>();
//注意小根堆中: v2.compareTo(v1) 按字母大小写 从大到小 排序--》放到小根堆中就是字母顺序在后的(大的)会被压到下面
// map.get(v1)-map.get(v2) 单词频次高低按照从大到小排序
PriorityQueue<String> minHeap = new PriorityQueue<String>((v1,v2) -> map.get(v1).equals(map.get(v2)) ? v2.compareTo(v1) : map.get(v1)-map.get(v2));
//注意使用这种方式,不要使用如下方式
for(String key: map.keySet()) {
minHeap.offer(key);
if(minHeap.size()>k) {
minHeap.poll();
}
}
// for(String key: map.keySet()) {
// if(minHeap.size()!=k) {
// minHeap.offer(key);
// }else {
//如果字母排序在前,单词频次一样,就不会替换小根堆堆顶的元素,这样是有问题的
// if(map.get(minHeap.peek()) < map.get(key)) {
// minHeap.poll();
// minHeap.offer(key);
// }
// }
// }
while(!minHeap.isEmpty()) {
resList.add(minHeap.poll());
}
Collections.reverse(resList);
return resList;
}
}
| [
"wenjiali@cn.ibm.com"
] | wenjiali@cn.ibm.com |
d10048e6b816a0f2625ea6c667e346ee4ae1e7ab | cbb06164e56a8db48888941ae559a73d64a736df | /FoodBookingApplication/src/main/java/com/practice/service/ItemServiceImpl.java | 1c598391feaac84fb1a3f0119d09352fd407541c | [] | no_license | harikrishnam1218/foodBookingApp | 7d92b5ebd4672a0020ea8fa8f9073fe87e55c498 | 72e605402038387468e462fc0115b4a82c6c5fc3 | refs/heads/master | 2022-05-28T09:50:50.548941 | 2020-04-23T08:46:20 | 2020-04-23T08:46:20 | 257,774,425 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 990 | java | package com.practice.service;
import java.util.List;
import java.util.Objects;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.practice.exception.DBException;
import com.practice.model.Item;
import com.practice.repositoty.ItemRepository;
@Service
public class ItemServiceImpl implements ItemService {
@Autowired
private ItemRepository itemRepo;
@Override
public List<Item> getItemsByVendorname(String name) throws DBException {
List<Item> items=itemRepo.fetchItemsByVendorName(name);
if(Objects.isNull(items) && items.isEmpty()) {
throw new DBException("Vendor Details Not Found");
}
return items;
}
@Override
public List<Item> getItemsByItemname(String name) throws DBException {
List<Item> items=itemRepo.getByItemname(name);
if(Objects.isNull(items) && items.isEmpty()) {
throw new DBException("Item Not Found");
}
return items;
}
}
| [
"harikrishnam1218@gmail.com"
] | harikrishnam1218@gmail.com |
6ca96666999b1aaf04c9a818f22287941c715953 | aac5bd343754ac28ff7e66d5af4104165e2acebb | /common/mdiyo/inficraft/flora/berries/BerryBush.java | 1358c21af2194b5c0d9827bbb8b8d1dc3cf3cb7b | [] | no_license | AlexTheLarge/InfiCraft | 8c36406887da285b1e30c7787334780869953e20 | 0d6fc1a2e622988a77d71f9eabaecef39005edf8 | refs/heads/master | 2021-01-16T20:35:08.747272 | 2012-08-28T06:43:33 | 2012-08-28T06:43:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,619 | java | package mdiyo.inficraft.flora.berries;
import net.minecraft.src.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.src.*;
import net.minecraftforge.common.ForgeDirection;
public class BerryBush extends BlockLeavesBase
{
private int icon;
Random random;
public BerryBush(int id, int texture)
{
super(id, texture, Material.leaves, false);
icon = texture;
this.setTickRandomly(true);
random = new Random();
this.setHardness(0.3F);
this.setStepSound(Block.soundGrassFootstep);
this.setBlockName("berrybush");
this.setCreativeTab(CreativeTabs.tabBlock);
}
/* Berries show up at meta 12-15 */
@Override
public int getBlockTextureFromSideAndMetadata(int side, int metadata)
{
if (metadata < 12)
{
return blockIndexInTexture + metadata % 4;
}
else
{
return blockIndexInTexture + 16 + metadata % 4;
}
}
/* Bushes are stored by size then type */
@Override
protected int damageDropped(int metadata)
{
return metadata % 4;
}
/* The following methods define a berry bush's size depending on metadata */
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
{
int l = world.getBlockMetadata(x, y, z);
if (l < 4)
{
return AxisAlignedBB.getBoundingBox((double)x + 0.25D, y, (double)z + 0.25D, (double)x + 0.75D, (double)y + 0.5D, (double)z + 0.75D);
} else
if (l < 8)
{
return AxisAlignedBB.getBoundingBox((double)x + 0.125D, y, (double)z + 0.125D, (double)x + 0.875D, (double)y + 0.75D, (double)z + 0.875D);
}
else
{
return AxisAlignedBB.getBoundingBox(x, y, z, (double)x + 1.0D, (double)y + 1.0D, (double)z + 1.0D);
}
}
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z)
{
int l = world.getBlockMetadata(x, y, z);
if (l < 4)
{
return AxisAlignedBB.getBoundingBox((double)x + 0.25D, y, (double)z + 0.25D, (double)x + 0.75D, (double)y + 0.5D, (double)z + 0.75D);
} else
if (l < 8)
{
return AxisAlignedBB.getBoundingBox((double)x + 0.125D, y, (double)z + 0.125D, (double)x + 0.875D, (double)y + 0.75D, (double)z + 0.875D);
}
else
{
return AxisAlignedBB.getBoundingBox(x, y, z, (double)x + 1.0D, (double)y + 1.0D, (double)z + 1.0D);
}
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int x, int y, int z)
{
int md = iblockaccess.getBlockMetadata(x, y, z);
float minX;
float minY = 0F;
float minZ;
float maxX;
float maxY;
float maxZ;
if(md < 4)
{
minX = minZ = 0.25F;
maxX = maxZ = 0.75F;
maxY = 0.5F;
} else
if(md < 8)
{
minX = minZ = 0.125F;
maxX = maxZ = 0.875F;
maxY = 0.75F;
}
else
{
minX = minZ = 0.0F;
maxX = maxZ = 1.0F;
maxY = 1.0F;
}
setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
/* Left-click harvests berries */
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player)
{
if (!world.isRemote)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta >= 12)
{
world.setBlockAndMetadataWithNotify(x, y, z, blockID, meta - 4);
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(FloraBerries.berryItem.shiftedIndex, 1, meta - 12));
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
}
}
}
/* Right-click harvests berries */
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
{
if (world.isRemote)
return false;
int meta = world.getBlockMetadata(x, y, z);
if (meta >= 12)
{
world.setBlockAndMetadataWithNotify(x, y, z, blockID, meta - 4);
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(FloraBerries.berryItem.shiftedIndex, 1, meta - 12));
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
}
return true;
}
/* Render logic */
@Override
public boolean isOpaqueCube()
{
return false;
}
public void setGraphicsLevel(boolean flag)
{
graphicsLevel = flag;
this.blockIndexInTexture = this.icon + (flag ? 0 : 32);
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return FloraBerries.getInstance().berryModelID;
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if (l > 7)
{
return super.shouldSideBeRendered(iblockaccess, i, j, k, l);
} else
if (graphicsLevel) {
return super.shouldSideBeRendered(iblockaccess, i, j, k, l);
} else
{
return true;
}
}
@Override
public String getTextureFile()
{
return "/mdiyo/inficraft/flora/textures/bushes.png";
}
/* Bush growth */
@Override
public void updateTick(World world, int x, int y, int z, Random random1)
{
if (world.isRemote)
{
return;
}
int height;
for (height = 1; world.getBlockId(x, y - height, z) == this.blockID; ++height)
{
;
}
if (random1.nextInt(20) == 0 && world.getBlockLightValue(x, y, z) >= 8)
{
int md = world.getBlockMetadata(x, y, z);
if (md < 12)
{
world.setBlockAndMetadataWithNotify(x, y, z, blockID, md + 4);
}
if (random1.nextInt(3) == 0 && height < 3 && world.getBlockId(x, y + 1, z) == 0 && md >= 8)
{
world.setBlockAndMetadataWithNotify(x, y + 1, z, blockID, md % 4);
}
}
}
/* Resistance to fire */
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face)
{
return 25;
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face)
{
return true;
}
@Override
public int getFireSpreadSpeed(World world, int x, int y, int z, int metadata, ForgeDirection face)
{
return 4;
}
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
for (int var4 = 8; var4 < 16; ++var4)
{
par3List.add(new ItemStack(par1, 1, var4));
}
}
}
| [
"merdiwendiyo@gmail.com"
] | merdiwendiyo@gmail.com |
d2d55787c90deda99c61d54931ddf59a82b92188 | 9ce37caac2678ced14e1e7e2aaa1ed8d32d8e358 | /src/main/java/com/azkz/infrastructure/entity/ViewFriendRelationList.java | feaff5ef1a54e421ca47233300432035768dd265 | [] | no_license | AZKZ/Kashite | f41fc9ce5ee717943227d88f68e5aa2b5d27b525 | 12e672b7cfce701316d228f22e553967a44b199f | refs/heads/master | 2023-08-08T03:19:08.929878 | 2020-07-14T22:26:38 | 2020-07-14T22:26:38 | 252,292,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,012 | java | package com.azkz.infrastructure.entity;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
/**
* The persistent class for the view_user_book_list database table.
*
*/
@Entity
@Data
@Table(name = "view_friend_reletion_list")
public class ViewFriendRelationList implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "tfr_id")
private long tfrId;
@Column(name = "request_user_id")
private long requestUserId;
@Column(name = "request_user_name")
private String requestUserName;
@Column(name = "acceptance_user_id")
private long acceptanceUserId;
@Column(name = "acceptance_user_name")
private String acceptanceUserName;
@Column(name = "status_code")
private char statusCode;
@Column(name = "status_name")
private String statusName;
public ViewFriendRelationList() {
}
}
| [
"k,azegami@time-creators.com"
] | k,azegami@time-creators.com |
d3906e9552116da77fc547b270607d5a239c8481 | afeb514c5a7a6a2b6cfa321d0768ea985e780ed1 | /AndroidAutoGenPackage/XSDKImpl_huandong/gen/com/awo/awosdk_new/R.java | 6c3c2c46240456a49b3cc57a29b6d25ddbdedd3d | [] | no_license | MseeY/AndroidAutoGenPackage | 3fb75bc759468d0ae18f82b27d56cac452f91696 | 94bb2893a45bb18a8705ee42119e3f8303bca577 | refs/heads/master | 2020-05-14T21:15:21.064162 | 2019-04-17T20:07:20 | 2019-04-17T20:07:20 | 181,960,318 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 18,055 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.awo.awosdk_new;
public final class R {
public static final class color {
public static final int TextColorBlack = 0x7f050006;
public static final int TextColorGray = 0x7f050008;
public static final int TextColorWhite = 0x7f050007;
public static final int ToastBgColor = 0x7f050009;
public static final int bgColor = 0x7f05000e;
public static final int blue = 0x7f050003;
public static final int btnColor = 0x7f05000a;
public static final int dark_gray = 0x7f050000;
public static final int dialog_tiltle_blue = 0x7f050014;
public static final int downLoadBackFocus = 0x7f050012;
public static final int downLoadBackNomal = 0x7f050011;
public static final int downLoadBackPressed = 0x7f050013;
public static final int downLoadTextNomal = 0x7f05000f;
public static final int downLoadTextPressed = 0x7f050010;
public static final int light_gray = 0x7f050004;
public static final int pay_gray = 0x7f050005;
public static final int reget_gray = 0x7f050001;
public static final int secondbtntextColor = 0x7f05000c;
public static final int textColorforCheckBox = 0x7f05000d;
public static final int textColorforItemTitle = 0x7f05000b;
public static final int white = 0x7f050002;
}
public static final class dimen {
public static final int activity_horizontal_margin = 0x7f060000;
public static final int activity_vertical_margin = 0x7f060001;
public static final int base_margin_left = 0x7f060002;
public static final int base_margin_right = 0x7f060003;
public static final int base_title_left = 0x7f060004;
public static final int base_title_right = 0x7f060005;
public static final int blue_font_size = 0x7f06000e;
public static final int common_text_size = 0x7f06000f;
public static final int et_margin = 0x7f06000a;
public static final int et_userinfo_bottom = 0x7f060007;
public static final int et_userinfo_top = 0x7f060006;
public static final int head_margin = 0x7f06000d;
public static final int iv_username_margin = 0x7f060009;
public static final int line_small = 0x7f060011;
public static final int line_solid = 0x7f060010;
public static final int ll_psw_margin_top = 0x7f06000b;
public static final int onekey_sure_top = 0x7f060008;
public static final int pp_height = 0x7f060012;
public static final int protocol_margin = 0x7f06000c;
}
public static final class drawable {
public static final int a1 = 0x7f020000;
public static final int a2 = 0x7f020001;
public static final int a3 = 0x7f020002;
public static final int a4 = 0x7f020003;
public static final int alipay_icon_normal = 0x7f020004;
public static final int alipay_icon_selected = 0x7f020005;
public static final int arrow1 = 0x7f020006;
public static final int arrow2 = 0x7f020007;
public static final int base_title_line = 0x7f020008;
public static final int bg_dddc = 0x7f020009;
public static final int black = 0x7f020050;
public static final int blue = 0x7f020051;
public static final int bt_login = 0x7f02000a;
public static final int bt_login_pressed = 0x7f02000b;
public static final int bt_regist_pressed = 0x7f02000c;
public static final int bt_register = 0x7f02000d;
public static final int close_t = 0x7f02000e;
public static final int data = 0x7f02000f;
public static final int dialog_bg_click = 0x7f020010;
public static final int dialog_bg_normal = 0x7f020011;
public static final int dialog_button_colorlist = 0x7f020012;
public static final int dialog_button_submit = 0x7f020013;
public static final int dialog_cut_line = 0x7f020014;
public static final int dialog_split_h = 0x7f020015;
public static final int dialog_split_v = 0x7f020016;
public static final int edittext_lock = 0x7f020017;
public static final int edittext_portrait = 0x7f020018;
public static final int et_password_icon = 0x7f020019;
public static final int et_username_icon = 0x7f02001a;
public static final int haier = 0x7f02001b;
public static final int hdtu = 0x7f02001c;
public static final int hdtu2 = 0x7f02001d;
public static final int head_back = 0x7f02001e;
public static final int head_logo = 0x7f02001f;
public static final int hrtu = 0x7f020020;
public static final int hrtu2 = 0x7f020021;
public static final int ic_launcher = 0x7f020022;
public static final int login_in = 0x7f020023;
public static final int login_input_arrow = 0x7f020024;
public static final int my1 = 0x7f020025;
public static final int my2 = 0x7f020026;
public static final int ncoin_icon_normal = 0x7f020027;
public static final int ncoin_icon_selecte = 0x7f020028;
public static final int notification_icon = 0x7f020029;
public static final int now_icon_normal = 0x7f02002a;
public static final int now_icon_selected = 0x7f02002b;
public static final int p1 = 0x7f02002c;
public static final int p2 = 0x7f02002d;
public static final int pay_divider = 0x7f02002e;
public static final int popup_bg = 0x7f02002f;
public static final int ppp = 0x7f020030;
public static final int ppp2 = 0x7f020031;
public static final int ppp_fan = 0x7f020032;
public static final int r1 = 0x7f020033;
public static final int r2 = 0x7f020034;
public static final int ref1 = 0x7f020035;
public static final int ref2 = 0x7f020036;
public static final int refresh = 0x7f020037;
public static final int refresh_button = 0x7f020038;
public static final int refresh_push = 0x7f020039;
public static final int regist_icon_phone = 0x7f02003a;
public static final int regist_uname_phone_icon = 0x7f02003b;
public static final int select_text_color = 0x7f02003c;
public static final int selector_alipay_icon = 0x7f02003d;
public static final int selector_bg_color = 0x7f02003e;
public static final int selector_blue_bt = 0x7f02003f;
public static final int selector_green_btn = 0x7f020040;
public static final int selector_item_arrow = 0x7f020041;
public static final int selector_item_my = 0x7f020042;
public static final int selector_item_p = 0x7f020043;
public static final int selector_item_r = 0x7f020044;
public static final int selector_item_ref = 0x7f020045;
public static final int selector_ncoin_icon = 0x7f020046;
public static final int selector_unionpay_icon = 0x7f020047;
public static final int title = 0x7f020048;
public static final int title_background = 0x7f020049;
public static final int unionpay_icon_normal = 0x7f02004a;
public static final int unionpay_icon_selected = 0x7f02004b;
public static final int white = 0x7f02004c;
public static final int xicon = 0x7f02004e;
public static final int xing = 0x7f02004f;
}
public static final class id {
public static final int AlipayTitle = 0x7f0a0003;
public static final int bind_phone = 0x7f0a0052;
public static final int bt_binding = 0x7f0a005d;
public static final int bt_change_phone = 0x7f0a0008;
public static final int bt_continue = 0x7f0a001d;
public static final int bt_enter_game = 0x7f0a003f;
public static final int bt_exit_game = 0x7f0a001c;
public static final int bt_get_code = 0x7f0a0021;
public static final int bt_login = 0x7f0a0024;
public static final int bt_main_regist = 0x7f0a0025;
public static final int bt_ok = 0x7f0a000e;
public static final int bt_quick_regist = 0x7f0a0048;
public static final int bt_reget_code = 0x7f0a0029;
public static final int bt_reget_ncoin = 0x7f0a003d;
public static final int bt_regist = 0x7f0a0047;
public static final int bt_reque = 0x7f0a000d;
public static final int bt_sure = 0x7f0a002d;
public static final int bt_to_pay = 0x7f0a003b;
public static final int bt_try_play = 0x7f0a0026;
public static final int bt_verify = 0x7f0a0045;
public static final int bt_verify_and_enter = 0x7f0a002a;
public static final int btn_refresh = 0x7f0a0004;
public static final int cb_dispaly_psw = 0x7f0a0046;
public static final int cb_read_agree_protocol = 0x7f0a006d;
public static final int change_name = 0x7f0a0054;
public static final int config_name = 0x7f0a0053;
public static final int dddc = 0x7f0a0067;
public static final int delete = 0x7f0a001f;
public static final int dialog_button_group = 0x7f0a0018;
public static final int dialog_content_view = 0x7f0a0017;
public static final int dialog_divider = 0x7f0a0015;
public static final int dialog_message = 0x7f0a0016;
public static final int dialog_split_v = 0x7f0a001a;
public static final int dialog_title = 0x7f0a0014;
public static final int dropdown_button = 0x7f0a0072;
public static final int et_base_password = 0x7f0a000c;
public static final int et_base_phone_code = 0x7f0a0044;
public static final int et_base_phoneno = 0x7f0a0042;
public static final int et_base_username = 0x7f0a000a;
public static final int et_code = 0x7f0a0028;
public static final int et_input_pass = 0x7f0a0010;
public static final int et_putMoney = 0x7f0a004c;
public static final int frag_pay_type = 0x7f0a0036;
public static final int huanyou_platform_login = 0x7f0a0049;
public static final int i_title = 0x7f0a005b;
public static final int include = 0x7f0a006f;
public static final int iv_alipay = 0x7f0a002f;
public static final int iv_arrow = 0x7f0a006b;
public static final int iv_lock = 0x7f0a0071;
public static final int iv_ncion = 0x7f0a0033;
public static final int iv_now = 0x7f0a0035;
public static final int iv_nowpay = 0x7f0a004f;
public static final int iv_unionpay = 0x7f0a0031;
public static final int left_button = 0x7f0a0019;
public static final int ll_act_code = 0x7f0a0073;
public static final int ll_alipay = 0x7f0a002e;
public static final int ll_container = 0x7f0a0000;
public static final int ll_contanier = 0x7f0a005f;
public static final int ll_input_pass = 0x7f0a000f;
public static final int ll_ncoin = 0x7f0a0032;
public static final int ll_now = 0x7f0a0034;
public static final int ll_nowpay = 0x7f0a004e;
public static final int ll_password_container = 0x7f0a000b;
public static final int ll_phone_getCode = 0x7f0a0043;
public static final int ll_quick_regist = 0x7f0a0041;
public static final int ll_unionpay = 0x7f0a0030;
public static final int ll_username_container = 0x7f0a0009;
public static final int mainView = 0x7f0a0001;
public static final int modity_pass = 0x7f0a0051;
public static final int notificationImage = 0x7f0a0061;
public static final int notificationPercent = 0x7f0a0063;
public static final int notificationProgress = 0x7f0a0064;
public static final int notificationTitle = 0x7f0a0062;
public static final int otherway_tv_email = 0x7f0a002c;
public static final int otherway_tv_web = 0x7f0a002b;
public static final int reget_check_code = 0x7f0a0055;
public static final int regist_by_username = 0x7f0a0068;
public static final int regist_success_tv_initpsw = 0x7f0a004b;
public static final int regist_success_tv_uname = 0x7f0a004a;
public static final int right_button = 0x7f0a001b;
public static final int rl = 0x7f0a0069;
public static final int rl_contanier = 0x7f0a0065;
public static final int textview = 0x7f0a0020;
public static final int tv_Nb = 0x7f0a004d;
public static final int tv_advice = 0x7f0a0060;
public static final int tv_base_title = 0x7f0a0005;
public static final int tv_c_count = 0x7f0a0011;
public static final int tv_center = 0x7f0a0066;
public static final int tv_center_title = 0x7f0a0057;
public static final int tv_current = 0x7f0a0070;
public static final int tv_current_count = 0x7f0a0006;
public static final int tv_find_psw = 0x7f0a0027;
public static final int tv_head_back = 0x7f0a0056;
public static final int tv_info = 0x7f0a005c;
public static final int tv_last_username = 0x7f0a003e;
public static final int tv_name = 0x7f0a0012;
public static final int tv_ncoin_balance = 0x7f0a003c;
public static final int tv_other_way_findpsw = 0x7f0a0022;
public static final int tv_phone = 0x7f0a0007;
public static final int tv_product_name = 0x7f0a0039;
public static final int tv_prompt = 0x7f0a003a;
public static final int tv_quik_login_prompt = 0x7f0a0023;
public static final int tv_role_name = 0x7f0a0038;
public static final int tv_shengfenzheng = 0x7f0a0013;
public static final int tv_switch_account = 0x7f0a0040;
public static final int tv_time = 0x7f0a0059;
public static final int tv_title = 0x7f0a0058;
public static final int tv_total_price = 0x7f0a0037;
public static final int tv_user_protocol = 0x7f0a006e;
public static final int tv_username = 0x7f0a006a;
public static final int ui_username = 0x7f0a0050;
public static final int v_line = 0x7f0a006c;
public static final int wb_details = 0x7f0a005e;
public static final int webView = 0x7f0a0002;
public static final int wv_protocol = 0x7f0a001e;
}
public static final class layout {
public static final int activity_container = 0x7f030000;
public static final int activity_main = 0x7f030001;
public static final int alipay = 0x7f030002;
public static final int alipay_title = 0x7f030003;
public static final int base_title_line = 0x7f030004;
public static final int bind_phone_activity = 0x7f030005;
public static final int bind_phone_reque = 0x7f030006;
public static final int bind_phone_reque_first = 0x7f030007;
public static final int config_info = 0x7f030008;
public static final int config_name_activity = 0x7f030009;
public static final int dialog_alert = 0x7f03000a;
public static final int dialog_logout = 0x7f03000b;
public static final int dialog_user_protocol_layout = 0x7f03000c;
public static final int dropdown_item = 0x7f03000d;
public static final int frag_find_psw = 0x7f03000e;
public static final int frag_login = 0x7f03000f;
public static final int frag_modify_psw = 0x7f030010;
public static final int frag_otherway_findpsw = 0x7f030011;
public static final int frag_pay = 0x7f030012;
public static final int frag_pay_ali_unionpay = 0x7f030013;
public static final int frag_pay_ncoin = 0x7f030014;
public static final int frag_pay_now = 0x7f030015;
public static final int frag_quick_login = 0x7f030016;
public static final int frag_quick_regist = 0x7f030017;
public static final int frag_quickregist_nophone = 0x7f030018;
public static final int frag_regist = 0x7f030019;
public static final int frag_regist_success = 0x7f03001a;
public static final int frag_upay = 0x7f03001b;
public static final int frag_usercenter = 0x7f03001c;
public static final int frag_verify_phoneno = 0x7f03001d;
public static final int head_layout = 0x7f03001e;
public static final int item_notice = 0x7f03001f;
public static final int mdfy_pass_activity = 0x7f030021;
public static final int mdfy_pass_temp_activity = 0x7f030022;
public static final int notice = 0x7f030023;
public static final int notice_list = 0x7f030024;
public static final int notification_item = 0x7f030025;
public static final int pop = 0x7f030026;
public static final int pop_fan = 0x7f030027;
public static final int regist_other_acount = 0x7f030028;
public static final int user_center_view = 0x7f030029;
public static final int user_center_view2 = 0x7f03002a;
public static final int user_protocol_layout = 0x7f03002b;
public static final int user_textedit = 0x7f03002c;
}
public static final class menu {
public static final int main = 0x7f090000;
}
public static final class raw {
public static final int protocol = 0x7f040000;
}
public static final class string {
public static final int action_settings = 0x7f070001;
public static final int app_name = 0x7f070000;
public static final int bt_sure = 0x7f07000d;
public static final int cancel = 0x7f07001d;
public static final int cancel_install_alipay = 0x7f070025;
public static final int cancel_install_msp = 0x7f070024;
public static final int confirm_title = 0x7f07001b;
public static final int content_description_icon = 0x7f07001e;
public static final int download = 0x7f070021;
public static final int download_fail = 0x7f070023;
public static final int ensure = 0x7f07001c;
public static final int enter_game = 0x7f070005;
public static final int find_psw = 0x7f070004;
public static final int head_back = 0x7f070006;
public static final int head_logo_desc = 0x7f070009;
public static final int hello_world = 0x7f070002;
public static final int huanyou_platform_login = 0x7f07000f;
public static final int install_alipay = 0x7f070028;
public static final int install_msp = 0x7f070027;
public static final int login = 0x7f070013;
public static final int not_agree_protocol = 0x7f070016;
public static final int other_way_find = 0x7f070007;
public static final int password_invalid = 0x7f07001a;
public static final int password_null = 0x7f070015;
public static final int processing = 0x7f070020;
public static final int psw_hint = 0x7f070017;
public static final int quick_regist = 0x7f070010;
public static final int quick_regist_uname_hint = 0x7f070011;
public static final int read_agree_protocol = 0x7f07000c;
public static final int redo = 0x7f070026;
public static final int refresh = 0x7f07001f;
public static final int regist = 0x7f070012;
public static final int regist_display_psw = 0x7f07000e;
public static final int regist_success = 0x7f070022;
public static final int switch_account = 0x7f070003;
public static final int use_uname_regist = 0x7f070008;
public static final int user_protocol = 0x7f07000a;
public static final int username_hint = 0x7f070018;
public static final int username_invalid = 0x7f070019;
public static final int username_null = 0x7f070014;
public static final int verify_phone_num = 0x7f07000b;
}
public static final class style {
public static final int AlertDialog = 0x7f080002;
public static final int AppBaseTheme = 0x7f080000;
public static final int AppTheme = 0x7f080001;
}
}
| [
"499909166@qq.com"
] | 499909166@qq.com |
d334ffc808dd7f8fff782e2333f480029a9d173a | 7cb4403bc8b903bb44dabab95dd4bc641b20d502 | /part2/src/G.java | abad35c03efc317205fdc0f77f982011c01c15a5 | [] | no_license | HaripriyaUmmadisetti/MyJavaPractice | 6fa5793bc069cb5a6cd18105649bb62127f5e47c | a7320616ba5fd675625180d330882ca1d01394ef | refs/heads/master | 2020-04-02T13:44:20.631449 | 2018-10-25T12:05:47 | 2018-10-25T12:05:47 | 154,494,693 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | class G
{
public static void main(String[] args)
{
if(false)
{
System.out.println("Hello World!");
}
System.out.println("end of main");
}
}
| [
"haripriya9991@gmail.com"
] | haripriya9991@gmail.com |
57ef6c0ee18123a85f166564bea85ecc241c9bab | ac15ffb69a86a13bfde99cd0d6d5bce5067ef54c | /alj-java-challenge-master/src/main/java/jp/co/axa/apidemo/services/EmployeeService.java | 9d84c0ed9a250c2e57cb2eb1cff1bf824e2545d9 | [] | no_license | venkateshnellores/java-challenge | 54529535dcab05f4c5f77b8ac242de5d40de0a99 | 5570e0b660d544156e8e1d6c81aec71232f2fe58 | refs/heads/master | 2023-08-22T08:22:49.929258 | 2021-10-04T07:34:10 | 2021-10-04T07:34:10 | 410,712,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | package jp.co.axa.apidemo.services;
import java.util.List;
import jp.co.axa.apidemo.entities.Employee;
public interface EmployeeService {
/*
* Get All Employee Details
* @return List<Employee>
*/
public List<Employee> retrieveEmployees();
/*
* Get only one Employee by employeeId
* @return Employee
*/
public Employee getEmployee(Long employeeId);
/*
* Save Employee Data
*/
public void saveEmployee(Employee employee);
/*
* Delete Employee Data by employeeId
*/
public void deleteEmployee(Long employeeId);
/*
* Update Employee details
*/
public void updateEmployee(Employee employee);
} | [
"venkateshnellores@gmail.com"
] | venkateshnellores@gmail.com |
4f930eb0bbb869abf70ba411dfe3063fa602194e | 22c325adb4d42353f2c72c1ce09e9aabea0b40ae | /src/main/java/com/ezhomesixgod/WxInit.java | e6b5cd03e1b7171bcbd1d985e916353d9c3b55df | [] | no_license | EzHomeSixGod/WxPayDemo | 5f22946f0129b3bb4ed4b08fabdc81a0613abf40 | ef0eab4f66670dfa8fa0f61503887c6ddfc4d027 | refs/heads/master | 2020-04-01T00:41:00.079374 | 2018-12-05T06:03:28 | 2018-12-05T06:03:28 | 152,708,037 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 905 | java | package com.ezhomesixgod;
import com.ezhomesixgod.config.BasicInfo;
import com.ezhomesixgod.model.UnifiedorderModel;
/**
* 微信支付相关初始化实例配置
*
*/
public class WxInit {
/**APP请求实体**/
private static UnifiedorderModel AppModel = null;
/**
* 获取app支付实体
* @return
*/
public static UnifiedorderModel getInstanceAppModel() {
if(AppModel==null) {
AppModel = new UnifiedorderModel();
AppModel = new UnifiedorderModel();
//异步通知地址
AppModel.setNotify_url(BasicInfo.NotifyUrl);
//app应用appId
AppModel.setAppid(BasicInfo.APP_AppID);
//商户号
AppModel.setMch_id(BasicInfo.APP_MchId);
//请求方式
AppModel.setTrade_type("APP");
//加密方式
AppModel.setSign_type("MD5");
AppModel.setSpbill_create_ip("8.8.8.8");
return AppModel;
}else {
return AppModel;
}
}
}
| [
"953625227@qq.com"
] | 953625227@qq.com |
632a76b7e2ee6221cf69fbb1ae9d636095b98b05 | d2c0d0e5ade1dcfacfeaeadf95d1c5e22c6caeba | /src/main/java/com/github/vonrosen/quantlib/ReannealingTrivial.java | b6ad06cf979121959edb0ef015dc84d841b54e16 | [] | no_license | xl5555123/Quantlib-SWIG-Java | f5e906662ab72211744921a4a42e2d8d5b270432 | dda229841f511d1f6cb6992e5361e40937517c22 | refs/heads/master | 2020-07-01T12:47:39.383347 | 2018-09-24T01:53:44 | 2018-09-24T01:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,108 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.github.vonrosen.quantlib;
public class ReannealingTrivial {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ReannealingTrivial(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ReannealingTrivial obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
QuantLibJNI.delete_ReannealingTrivial(swigCPtr);
}
swigCPtr = 0;
}
}
public ReannealingTrivial() {
this(QuantLibJNI.new_ReannealingTrivial(), true);
}
}
| [
"hunter.stern@fundingcircle.com"
] | hunter.stern@fundingcircle.com |
a280b4e87fe9a28f05105ae0db19c82b9e00ae9f | b03b35ff6e35c0cc9ac0368e01d600941e10f55a | /com.rk.karaf.command/src/test/java/com/rk/karaf/RkcmdTest.java | bb14cd9f0a0977502cf5abdd9c5f3a83b0c1d867 | [] | no_license | RavikrianGoru/osgi | f21bfe079e8c18c814ef80d4fabef583171fd376 | 9a6af5506a93165df06c789b3d2db386630eefd7 | refs/heads/master | 2023-03-31T19:23:28.227146 | 2018-03-22T15:03:38 | 2018-03-22T15:03:38 | 125,919,062 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 434 | java |
package com.rk.karaf;
import junit.framework.TestCase;
/**
* Test cases for {@link Rkcmd}
*/
@SuppressWarnings("unchecked")
public class RkcmdTest extends TestCase {
private Rkcmd command;
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
public void testCommand() {
}
}
| [
"ravikirangoru@gmail.com"
] | ravikirangoru@gmail.com |
4bf230ce8e5e091fe00c0063b3f1dc3ca9516f86 | 5c8762df69b8b0824eb2e3cf65c294c659ba2e70 | /src/main/java/com/notronix/etsy/impl/method/EtsyMethod.java | 150808da4c5d76d149572402a6c9eb450c81ebf8 | [
"Apache-2.0"
] | permissive | cmunden/JEtsy | 436eb36a871d43c83df150d1b4870a7a20047325 | 2257fa185c42a966050aa6c751d8a116146b2833 | refs/heads/master | 2020-06-22T23:54:47.109645 | 2019-07-23T13:28:39 | 2019-07-23T13:28:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package com.notronix.etsy.impl.method;
import com.google.api.client.http.HttpContent;
import com.google.gson.Gson;
import com.notronix.etsy.api.authentication.Credentials;
public interface EtsyMethod<Result>
{
String getURL();
Result getResponse(Gson gson, String jsonPayload);
Credentials getClientCredentials();
Credentials getAccessCredentials();
String getRequestMethod();
boolean requiresOAuth();
HttpContent getContent(Gson gson);
}
| [
"clint.munden@notronix.com"
] | clint.munden@notronix.com |
1755cd1a07bd2be63b7ca6360dcd94bdda9d02ab | 3902f4ac7f81f40acd9a5fc12ea38f93e970b499 | /app/src/main/java/com/txsh/shop/TxShopProductListAty.java | f44b66f2593e266f3fe48b6d8c4dfab7a915f430 | [] | no_license | yundequanshi/TxCarShop | a1492244fb452023298035616b47603838537ab8 | 49e9c415f203e0462a68bb8189ab90165e309466 | refs/heads/master | 2021-02-22T13:09:56.611968 | 2020-04-03T09:44:21 | 2020-04-03T09:44:21 | 245,377,783 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,765 | java | package com.txsh.shop;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import com.ab.view.pullview.AbPullToRefreshView;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import com.txsh.R;
import com.txsh.adapter.TxShopMainAdapter;
import com.txsh.model.TXShopListRes;
import com.txsh.services.MLShopServices;
import com.txsh.base.BaseActivity;
import com.txsh.base.BaseApplication;
import com.txsh.http.ZMHttpError;
import com.txsh.http.ZMHttpRequestMessage;
import com.txsh.http.ZMHttpType;
import com.txsh.http.ZMRequestParams;
import com.txsh.model.MLLogin;
import java.util.List;
/**
* Created by Administrator on 2015/7/23.
*/
public class TxShopProductListAty extends BaseActivity {
@ViewInject(R.id.shopproductlist_pull)
public AbPullToRefreshView _pullToRefreshLv;
@ViewInject(R.id.shopproductlist_grid)
public GridView mGridView;
private boolean mIsRefresh = true;
private int nowPage = 1;
TxShopMainAdapter mAdapter;
public List<TXShopListRes.TXShopListData> mlShopCarData;
private String companyId="";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tx_shopproduct_list);
ViewUtils.inject(this);
if (getIntentData()!=null) companyId= (String) getIntentData();
initView();
initShopList();
initPullRefresh();
}
private void initView() {
mAdapter = new TxShopMainAdapter(this,R.layout.tx_item_shop_main);
mGridView.setAdapter(mAdapter);
mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
startAct(TxShopProductListAty.this, TXShopDetailAty.class,mlShopCarData.get(position));
}
});
}
private void initPullRefresh() {
_pullToRefreshLv.setOnHeaderRefreshListener(new AbPullToRefreshView.OnHeaderRefreshListener() {
@Override
public void onHeaderRefresh(AbPullToRefreshView view) {
mIsRefresh = true;
nowPage = 1;
initShopList();
}
});
_pullToRefreshLv.setOnFooterLoadListener(new AbPullToRefreshView.OnFooterLoadListener() {
@Override
public void onFooterLoad(AbPullToRefreshView view) {
// TODO Auto-generated method stub
mIsRefresh = false;
int size = mlShopCarData.size() - 1;
if (size <= 0) {
return;
}
//lastrow = mlShopCarData.get(mlShopCarData.size() - 1).rowno;
nowPage++;
initShopList();
}
});
}
@OnClick(R.id.home_top_back)
public void backOnClick(View view){
finish();
}
private void initShopList() {
MLLogin user = ((BaseApplication) this.getApplication()).get_user();
ZMRequestParams param = new ZMRequestParams();
param.addParameter("companyId", companyId);
param.addParameter("nowPage", String.valueOf(nowPage));
param.addParameter("pageSize", "20");
ZMHttpRequestMessage message1 = new ZMHttpRequestMessage(ZMHttpType.RequestType.SHOPPRODUCTLIST, null, param,
_handler, SHOPPRODUCTLISTRETURN, MLShopServices.getInstance());
loadDataWithMessage( this, null, message1);
}
private static final int SHOPPRODUCTLISTRETURN = 1;
private Handler _handler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
dismissProgressDialog();
if (msg == null || msg.obj == null) {
showMessage(R.string.loading_data_failed);
return;
}
if (msg.obj instanceof ZMHttpError) {
ZMHttpError error = (ZMHttpError) msg.obj;
showMessage(error.errorMessage);
return;
}
switch (msg.what) {
case SHOPPRODUCTLISTRETURN: {
TXShopListRes ret = (TXShopListRes) msg.obj;
if (ret.state.equalsIgnoreCase("1")) {
if (mIsRefresh) {
//刷新
mlShopCarData=ret.datas;
_pullToRefreshLv.onHeaderRefreshFinish();
} else {
//加载更多
_pullToRefreshLv.onFooterLoadFinish();
if (mlShopCarData == null) {
return;
}
mlShopCarData.addAll(ret.datas);
}
//加载数据
if (mlShopCarData != null) {
mAdapter.setData(mlShopCarData);
}
if (mlShopCarData != null && mlShopCarData.size() < 20) {
_pullToRefreshLv.setLoadMoreEnable(false);
} else {
_pullToRefreshLv.setLoadMoreEnable(true);
}
} else {
showMessage("加载数据失败");
break;
}
break;
}
}
}
};
}
| [
"yundequanshi@126.com"
] | yundequanshi@126.com |
b5270bae64e8faa8806592989cf729ef78ca433b | e3fd61cc091439abfb0853e95258290bc53ffd6d | /Quotation/src/main/java/org/arpicoinsurance/groupit/main/service/OccupationServce.java | 88a9c7783ebe0de7b2bca43453e75290a76b7baf | [] | no_license | arpicoinsuranceit/Quotation-v1 | 2051cba8a42cf4ff69c9cf9e0139d8b659a7e592 | b935f2607588754782bcac48da414f02ae67b520 | refs/heads/master | 2021-07-05T10:05:54.142855 | 2019-02-14T04:34:14 | 2019-02-14T04:34:14 | 113,809,644 | 0 | 0 | null | 2017-12-11T06:21:21 | 2017-12-11T03:52:53 | Java | UTF-8 | Java | false | false | 237 | java | package org.arpicoinsurance.groupit.main.service;
import java.util.List;
import org.arpicoinsurance.groupit.main.model.Occupation;
public interface OccupationServce {
List<Occupation> getAllOccupations() throws Exception;
}
| [
"anjanathrishakya@gmail.com"
] | anjanathrishakya@gmail.com |
4d827ff4ea600d515f5293b64c12acd9f32e961d | 2f05c988bbdf0d81cdea48fc2cd806dfc03010e1 | /Pattern III/Main.java | a334fbb0259d4f9c7fb707b6c8bca1fc3ec330f0 | [] | no_license | yashg1699/Playground | fd130df3b97761f9c380173d74904d41f1b0137e | 1792e7b4ab4a4e4494bc0df4600fc61b1feea4fa | refs/heads/master | 2022-07-17T21:14:07.590230 | 2020-05-11T19:31:40 | 2020-05-11T19:31:40 | 259,738,048 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 426 | java | #include<iostream>
using namespace std;
int main()
{
int lines,line=1,i;
cin>>lines;
while(line<=lines)
{
for(i=1;i<=2*line-1;i++)
{
if(i%2==1)
cout<<line;
else
cout<<"*";
}
cout<<"\n";
line++;
}
line--;
while(line>=1)
{
for(i=1;i<=2*line-1;i++)
{
if(i%2==1)
cout<<line;
else
cout<<"*";
}
cout<<"\n";
line--;
}
} | [
"55911937+yashg1699@users.noreply.github.com"
] | 55911937+yashg1699@users.noreply.github.com |
1ba093025654a84b3485bff995a908f3ebfacea0 | a3f2aa56cafc2cff58947478caebe2ba4c3e591b | /Exercicis_Jumi/src/exercicis_jumi/matriz3DConvolucion.java | 4871272d4a6a0f55b02f9bcd2f5ccc1c10eadf60 | [] | no_license | jrivasdam19/JUMI | 34c9fb4ebfe47bf00834413755445f9baf3d6a06 | fddbd01f26928ff73ded6cc4aebf83a9eacd70f5 | refs/heads/master | 2023-02-27T21:49:00.276093 | 2021-02-08T16:30:10 | 2021-02-08T16:30:10 | 304,273,802 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,163 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package exercicis_jumi;
/**
*
* @author Jose
*/
public class matriz3DConvolucion {
private static int[][][] matrizOrigen = new int[4][5][3];
private static int[] vectorOrigen;
private static int[][][] matrizFinal = new int[4][5][3];
private static int[] vectorFinal;
private static int[][] matrizConvolucion = {{-1, -1, -1}, {0, 0, 0}, {1, 1, 1}};
private static int numeroK;
public static void construirMatriz(int[][][] matriz) {
for (int i = 0; i < matriz.length; i++) {
for (int j = 0; j < matriz[i].length; j++) {
for (int k = 0; k < matriz[i][j].length; k++) {
matriz[i][j][k] = (int) Math.floor(Math.random() * 100 + 1);
}
}
}
}
public static void construirVector(int[][][] matriz) {
vectorOrigen = new int[matriz.length * matriz[0].length * matriz[0][0].length];
vectorFinal = new int[vectorOrigen.length];
for (int i = 0; i < vectorOrigen.length; i++) {
for (int j = 0; j < matriz.length; j++) {
for (int k = 0; k < matriz[j].length; k++) {
for (int l = 0; l < matriz[j][k].length; l++) {
vectorOrigen[i] = matriz[j][k][l];
i++;
}
}
}
}
}
public static void numeroK(int[][] matriz) {
for (int i = 0; i < matriz.length; i++) {
for (int j = 0; j < matriz[i].length; j++) {
numeroK += matriz[i][j];
}
}
if (numeroK == 0) {
numeroK = 1;
}
}
public static void seleccionarPixel() {
for (int i = 1; i < matrizOrigen.length - 1; i++) {
for (int j = 1; j < matrizOrigen[i].length - 1; j++) {
for (int k = 0; k < matrizOrigen[0][0].length; k++) {
convolucionPixelMatriz(i, j, k);
convolucionPixelVector(i, j, k);
}
}
}
}
public static void convolucionPixelMatriz(int i, int j, int k) {
for (int l = 0; l < matrizConvolucion.length; l++) {
for (int m = 0; m < matrizConvolucion[l].length; m++) {
matrizFinal[i][j][k] += matrizOrigen[i - 1 + l][j - 1 + m][k] * matrizConvolucion[l][m];
matrizFinal[i][j][k] /= numeroK;
}
}
}
public static void convolucionPixelVector(int i, int j, int k) {
int posicionVectorFinal = (matrizOrigen[0][0].length
* matrizOrigen[0].length * i) + (matrizOrigen[0][0].length * j) + k;
for (int l = 0; l < matrizConvolucion.length; l++) {
for (int m = 0; m < matrizConvolucion[l].length; m++) {
int posicionVectorOrigen = (matrizOrigen[0][0].length
* matrizOrigen[0].length * (i - 1 + l)) + (matrizOrigen[0][0].length * (j - 1 + m)) + k;
vectorFinal[posicionVectorFinal] += vectorOrigen[posicionVectorOrigen] * matrizConvolucion[l][m];
vectorFinal[posicionVectorFinal] /= numeroK;
}
}
}
public static void imprimirMatriz3D(int[][][] matriz, String nombre) {
System.out.println(nombre);
for (int i = 0; i < matriz.length; i++) {
System.out.print("( ");
for (int j = 0; j < matriz[i].length; j++) {;
System.out.print(" ");
System.out.print("( ");
for (int k = 0; k < matriz[i][j].length; k++) {
System.out.print(matriz[i][j][k] + " ");
}
System.out.println(" )");
}
System.out.println(" )");
}
}
public static void imprimirMatriz2D(int[][] matriz, String nombre) {
System.out.println("Matriz.");
for (int i = 0; i < matriz.length; i++) {
System.out.print("( ");
for (int j = 0; j < matriz[i].length; j++) {
System.out.print(matriz[i][j]);
System.out.print(" ");
}
System.out.println(" )");
}
}
public static void imprimirVector(int[] vector, String nombre) {
System.out.println(nombre);
System.out.print("( " + vector[0]);
for (int i = 1; i < vector.length; i++) {
System.out.print(", " + vector[i]);
}
System.out.println(" )");
System.out.println("");
}
public static void main(String[] args) {
construirMatriz(matrizOrigen);
construirVector(matrizOrigen);
numeroK(matrizConvolucion);
imprimirMatriz3D(matrizOrigen, "Matriz Origen");
imprimirMatriz2D(matrizConvolucion, "Matriz Convolución");
imprimirVector(vectorOrigen, "Vector Origen");
seleccionarPixel();
imprimirVector(vectorFinal, "Vector Final");
imprimirMatriz3D(matrizFinal, "Matriz Final");
}
}
| [
"jrivas@cifpfbmoll.eu"
] | jrivas@cifpfbmoll.eu |
1d042ef1f8b34ef1f88e5a3c133453b556cda977 | aa7e386dc94c74f6241844f96ecacd6968636889 | /materialDesign/app/src/main/java/mx/itesm/csf/materialdesign/MateriaDesign.java | 14d136c294384c3294fc9dfdd8c39b8ea3b59149 | [] | no_license | Lira97/Moviles | b5c77be6b4a09c00a0720fc4e0bf12df56d6b8f5 | 2e8d60b9c0daa87a2ced9e96f501d6335c9ae814 | refs/heads/master | 2021-10-03T00:35:56.290823 | 2018-12-02T04:34:41 | 2018-12-02T04:34:41 | 160,013,693 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,117 | java | package mx.itesm.csf.materialdesign;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.gc.materialdesign.views.ButtonRectangle;
public class MateriaDesign extends AppCompatActivity {
int contador;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_materia_design);
final ButtonRectangle btnActividad_1 = (ButtonRectangle) findViewById(R.id.button);
btnActividad_1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent actividad = new Intent(MateriaDesign.this,Actividad2.class);
Toast.makeText(
btnActividad_1.getContext()
,"me has pulsado"+ ++contador + " veces"
,Toast.LENGTH_LONG).show();
startActivity(actividad);
}
});
}
}
| [
"enrique.lira97@hotmail.com"
] | enrique.lira97@hotmail.com |
d21f26309add9367c2c23b082837326a882a05c8 | 9ae7745f92fdd7a02e7a62cbed43346384580f76 | /app/src/main/java/com/example/excel16/sampleforhuggens/appcontroller.java | 203f6dfccefd868045484f281ab00b0ec6fdcd8d | [] | no_license | jerinviju/Sampleforhuggens | 1449d79a5d86477fee27dd5abb6717a5baab0e27 | b652a9716fff8aec856da77f722f8061d1ad177a | refs/heads/master | 2021-01-18T17:33:32.340384 | 2016-10-25T18:51:18 | 2016-10-25T18:51:18 | 71,928,687 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,384 | java | package com.example.excel16.sampleforhuggens;
import android.app.Application;
import android.text.TextUtils;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
/**
* Created by jerin on 13/6/16.
*/
public class appcontroller extends Application {
public static final String TAG = appcontroller.class
.getSimpleName();
private RequestQueue mRequestQueue;
private static appcontroller mInstance;
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
}
public static synchronized appcontroller getInstance() {
return mInstance;
}
public RequestQueue getRequestQueue() {
if (mRequestQueue == null) {
mRequestQueue = Volley.newRequestQueue(getApplicationContext());
}
return mRequestQueue;
}
public <T> void addToRequestQueue(Request<T> req, String tag) {
// set the default tag if tag is empty
req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);
getRequestQueue().add(req);
}
public <T> void addToRequestQueue(Request<T> req) {
req.setTag(TAG);
getRequestQueue().add(req);
}
public void cancelPendingRequests(Object tag) {
if (mRequestQueue != null) {
mRequestQueue.cancelAll(tag);
}
}
}
| [
"jerinviju.mec@gmail.com"
] | jerinviju.mec@gmail.com |
b70383391ec60fae81380a4a488283b993446027 | dc88ce3c4e247a5076a3b25c880e20ba71ee1563 | /src/org/mdd/examples/dependency/Dependency.java | 7c8658fdc288674ea598e2a727777fd4d419b406 | [] | no_license | coderunner/blog-examples | 5c49f347790b5a097375f5aa7b72457fef0dc029 | 337a16819f1d348599e828c2904ae6a18dc7283b | refs/heads/master | 2021-01-20T10:41:43.351378 | 2012-02-28T03:26:01 | 2012-02-28T03:26:01 | 2,194,663 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 223 | java | package org.mdd.examples.dependency;
import org.inject.Inject;
public class Dependency implements DependencyInterface
{
public Dependency()
{}
@Inject
public Dependency(AnotherDependencyInterface dependency)
{}
}
| [
"felixtrepanier@gmail.com"
] | felixtrepanier@gmail.com |
6a465bcbcf644a346c159c5df5886e6fd20a04f2 | 21119ae3941eed7fb9d8c4f0992104c43deb0e18 | /src/com/ua/LabWork2/Generics/MyTuple.java | ff809b5150ad32a8bc84b0649d6cf9d03378d568 | [] | no_license | AlexChornoshchok/MyITCloudProjects | 001c27968d46e43bb5f9defe8b94ecf7fb178afe | 2d6d47e669a6ee8d2cb3fa3c8574b3eefcea6d0d | refs/heads/master | 2021-09-01T07:12:49.943601 | 2017-12-25T15:51:03 | 2017-12-25T15:51:03 | 109,323,482 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package com.ua.LabWork2.Generics;
public class MyTuple<A,B,C> {
private A varA;
private B varB;
private C varC;
public MyTuple(A varA, B varB, C varC) {
this.varA = varA;
this.varB = varB;
this.varC = varC;
}
public A getVarA() {
return varA;
}
public B getVarB() {
return varB;
}
public C getVarC() {
return varC;
}
@Override
public String toString() {
return "MyTuple{" +
"varA= " + varA +
", varB= " + varB +
", varC= " + varC +
'}';
}
}
| [
"aleksblacke@gmail.com"
] | aleksblacke@gmail.com |
1466d69062dd44f4295c7152b3637d27f11d9228 | 063b3aa2e3a573a4430546f3c07843d13f85eaef | /academy_ignis/src/ignis/action/EventWriteAction.java | 3cd5388faf88de2121443dca632ef2d2ea474680 | [] | no_license | hwshim0810/academy_ignis | e04d5480222373d1ba578ca86370a948df8e5a91 | e5f307ba95366ec1f0a2698babc8e0535a410a77 | refs/heads/master | 2021-04-28T23:38:13.514590 | 2017-03-29T09:53:05 | 2017-03-29T09:53:05 | 77,728,917 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package ignis.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import ignis.biz.EventBiz;
public class EventWriteAction implements ActionInterface {
@Override
public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception{
EventBiz eventBiz = new EventBiz();
ActionForward forward = new ActionForward();
boolean result = eventBiz.insertEvent(request, response);
System.out.println("EventWriteAction");
if(result){
forward.setRedirect(true);
forward.setPath("/academy_ignis/admin/ad_CommunityEventList.jsp");
return forward;
}
return null;
}
}
| [
"qqqq1230qqqq@DESKTOP-C6GDP7T"
] | qqqq1230qqqq@DESKTOP-C6GDP7T |
3fc3777a4eb0583780e0bd29d51358e3f4fbc5a0 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-2.0.0-RC2/core/src/main/java/org/mule/endpoint/ImmutableMuleEndpoint.java | f25c7a760d94334281cda8e69f4d41e823446b5f | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 15,166 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.endpoint;
import org.mule.api.MuleContext;
import org.mule.api.MuleEvent;
import org.mule.api.MuleMessage;
import org.mule.api.endpoint.EndpointURI;
import org.mule.api.endpoint.ImmutableEndpoint;
import org.mule.api.lifecycle.InitialisationException;
import org.mule.api.routing.filter.Filter;
import org.mule.api.security.EndpointSecurityFilter;
import org.mule.api.transaction.TransactionConfig;
import org.mule.api.transformer.Transformer;
import org.mule.api.transport.ConnectionStrategy;
import org.mule.api.transport.Connector;
import org.mule.api.transport.DispatchException;
import org.mule.config.MuleManifest;
import org.mule.transformer.TransformerUtils;
import org.mule.util.ClassUtils;
import java.net.URI;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean;
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* <code>ImmutableMuleEndpoint</code> describes a Provider in the Mule Server. A endpoint is a grouping of
* an endpoint, an endpointUri and a transformer.
*/
public abstract class ImmutableMuleEndpoint implements ImmutableEndpoint
{
private static final long serialVersionUID = -1650380871293160973L;
/**
* logger used by this class
*/
protected static final Log logger = LogFactory.getLog(ImmutableMuleEndpoint.class);
/**
* The endpoint used to communicate with the external system
*/
protected Connector connector = null;
/**
* The endpointUri on which to send or receive information
*/
protected EndpointURI endpointUri = null;
/**
* The transformers used to transform the incoming or outgoing data
*/
protected AtomicReference transformers = new AtomicReference(TransformerUtils.UNDEFINED);
/**
* The transformers used to transform the incoming or outgoing data
*/
protected AtomicReference responseTransformers = new AtomicReference(TransformerUtils.UNDEFINED);
/**
* The name for the endpoint
*/
protected String name = null;
/**
* Any additional properties for the endpoint
*/
protected Map properties = new HashMap();
/**
* The transaction configuration for this endpoint
*/
protected TransactionConfig transactionConfig = null;
/**
* event filter for this endpoint
*/
protected Filter filter = null;
/**
* determines whether unaccepted filtered events should be removed from the source. If they are not
* removed its up to the Message receiver to handle recieving the same message again
*/
protected boolean deleteUnacceptedMessages = false;
/**
* has this endpoint been initialised
*/
protected AtomicBoolean initialised = new AtomicBoolean(false);
/**
* The security filter to apply to this endpoint
*/
protected EndpointSecurityFilter securityFilter = null;
/**
* whether events received by this endpoint should execute in a single thread
*/
protected boolean synchronous;
/**
* Determines whether a synchronous call should block to obtain a response from a remote server (if the
* transport supports it). For example for Jms endpoints, setting remote sync will cause a temporary
* destination to be set up as a replyTo destination and will send the message a wait for a response on
* the replyTo destination. If the JMSReplyTo is already set on the message that destination will be used
* instead.
*/
protected boolean remoteSync;
/**
* How long to block when performing a remote synchronisation to a remote host. This property is optional
* and will be set to the default Synchonous MuleEvent time out value if not set
*/
protected Integer remoteSyncTimeout = null;
/**
* The state that the endpoint is initialised in such as started or stopped
*/
protected String initialState = INITIAL_STATE_STARTED;
protected String endpointEncoding;
protected String registryId = null;
protected MuleContext muleContext;
protected ConnectionStrategy connectionStrategy;
/**
* Default constructor.
*/
protected ImmutableMuleEndpoint()
{
super();
}
public EndpointURI getEndpointURI()
{
return endpointUri;
}
public String getEncoding()
{
return endpointEncoding;
}
public Connector getConnector()
{
return connector;
}
public String getName()
{
return name;
}
public List getTransformers()
{
return (List) transformers.get();
}
public Map getProperties()
{
return properties;
}
public boolean isReadOnly()
{
return true;
}
public String toString()
{
// Use the interface to retrieve the string and set
// the endpoint uri to a default value
String sanitizedEndPointUri = null;
URI uri = null;
if (endpointUri != null)
{
sanitizedEndPointUri = endpointUri.toString();
uri = endpointUri.getUri();
}
// The following will further sanitize the endpointuri by removing
// the embedded password. This will only remove the password if the
// uri contains all the necessary information to successfully rebuild the url
if (uri != null && (uri.getRawUserInfo() != null) && (uri.getScheme() != null) && (uri.getHost() != null)
&& (uri.getRawPath() != null))
{
// build a pattern up that matches what we need tp strip out the password
Pattern sanitizerPattern = Pattern.compile("(.*):.*");
Matcher sanitizerMatcher = sanitizerPattern.matcher(uri.getRawUserInfo());
if (sanitizerMatcher.matches())
{
sanitizedEndPointUri = new StringBuffer(uri.getScheme()).append("://")
.append(sanitizerMatcher.group(1))
.append(":<password>")
.append("@")
.append(uri.getHost())
.append(uri.getRawPath())
.toString();
}
if (uri.getRawQuery() != null)
{
sanitizedEndPointUri = sanitizedEndPointUri + "?" + uri.getRawQuery();
}
}
return ClassUtils.getClassName(getClass()) + "{endpointUri=" + sanitizedEndPointUri + ", connector="
+ connector + ", transformer=" + transformers.get() + ", name='" + name + "'"
+ ", isInbound=" + isInbound() + ", isOutbound=" + isOutbound()
+ ", properties=" + properties + ", transactionConfig=" + transactionConfig + ", filter=" + filter
+ ", deleteUnacceptedMessages=" + deleteUnacceptedMessages + ", initialised=" + initialised
+ ", securityFilter=" + securityFilter + ", synchronous=" + synchronous + ", initialState="
+ initialState + ", remoteSync=" + remoteSync
+ ", remoteSyncTimeout=" + remoteSyncTimeout + ", endpointEncoding=" + endpointEncoding + "}";
}
public String getProtocol()
{
return connector.getProtocol();
}
public TransactionConfig getTransactionConfig()
{
return transactionConfig;
}
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (!(o instanceof ImmutableMuleEndpoint))
{
return false;
}
final ImmutableMuleEndpoint immutableMuleProviderDescriptor = (ImmutableMuleEndpoint) o;
if (!connector.getName().equals(immutableMuleProviderDescriptor.connector.getName()))
{
return false;
}
if (endpointUri != null && immutableMuleProviderDescriptor.endpointUri != null
? !endpointUri.getAddress()
.equals(
immutableMuleProviderDescriptor.endpointUri.getAddress())
: immutableMuleProviderDescriptor.endpointUri != null)
{
return false;
}
if (!name.equals(immutableMuleProviderDescriptor.name))
{
return false;
}
// MULE-1551 - transformer excluded from comparison here
return isInbound() == immutableMuleProviderDescriptor.isInbound() &&
isOutbound() == immutableMuleProviderDescriptor.isOutbound();
}
public int hashCode()
{
int result = appendHash(0, connector);
result = appendHash(result, endpointUri);
// MULE-1551 - transformer excluded from hash here
result = appendHash(result, name);
result = appendHash(result, Boolean.valueOf(isInbound()));
result = appendHash(result, Boolean.valueOf(isOutbound()));
return result;
}
private int appendHash(int hash, Object component)
{
int delta = component != null ? component.hashCode() : 0;
return 29 * hash + delta;
}
public Filter getFilter()
{
return filter;
}
public boolean isDeleteUnacceptedMessages()
{
return deleteUnacceptedMessages;
}
protected void setTransformersIfUndefined(AtomicReference reference, List transformers)
{
TransformerUtils.discourageNullTransformers(transformers);
if(transformers.size()==0) transformers = TransformerUtils.UNDEFINED;
reference.compareAndSet(TransformerUtils.UNDEFINED, transformers);
updateTransformerEndpoints(reference);
}
// TODO - remove (or fix)
protected void updateTransformerEndpoints(AtomicReference reference)
{
List transformers = (List) reference.get();
if (TransformerUtils.isDefined(transformers))
{
Iterator transformer = transformers.iterator();
while (transformer.hasNext())
{
((Transformer) transformer.next()).setEndpoint(this);
}
}
}
/**
* Returns an EndpointSecurityFilter for this endpoint. If one is not set, there will be no
* authentication on events sent via this endpoint
*
* @return EndpointSecurityFilter responsible for authenticating message flow via this endpoint.
* @see org.mule.api.security.EndpointSecurityFilter
*/
public EndpointSecurityFilter getSecurityFilter()
{
return securityFilter;
}
/**
* Determines if requests originating from this endpoint should be synchronous i.e. execute in a single
* thread and possibly return an result. This property is only used when the endpoint is of type
* 'receiver'
*
* @return whether requests on this endpoint should execute in a single thread. This property is only used
* when the endpoint is of type 'receiver'
*/
public boolean isSynchronous()
{
return synchronous;
}
/**
* For certain providers that support the notion of a backchannel such as sockets (outputStream) or Jms
* (ReplyTo) Mule can automatically wait for a response from a backchannel when dispatching over these
* protocols. This is different for synchronous as synchronous behavior only applies to in
*
* @return
*/
public boolean isRemoteSync()
{
return remoteSync;
}
/**
* The timeout value for remoteSync invocations
*
* @return the timeout in milliseconds
*/
public int getRemoteSyncTimeout()
{
if (remoteSyncTimeout == null)
{
remoteSyncTimeout = new Integer(0);
}
return remoteSyncTimeout.intValue();
}
/**
* Sets the state the endpoint will be loaded in. The States are 'stopped' and 'started' (default)
*
* @return the endpoint starting state
*/
public String getInitialState()
{
return initialState;
}
public List getResponseTransformers()
{
return (List) responseTransformers.get();
}
public Object getProperty(Object key)
{
Object value = properties.get(key);
if (value == null)
{
value = endpointUri.getParams().get(key);
}
return value;
}
// TODO the following methods should most likely be lifecycle-enabled
public void dispatch(MuleEvent event) throws DispatchException
{
if (connector != null)
{
connector.dispatch(this, event);
}
else
{
// TODO Either remove because this should never happen or i18n the message
throw new IllegalStateException("The connector on the endpoint: " + toString()
+ " is null. Please contact " + MuleManifest.getDevListEmail());
}
}
public MuleMessage request(long timeout) throws Exception
{
if (connector != null)
{
return connector.request(this, timeout);
}
else
{
// TODO Either remove because this should never happen or i18n the message
throw new IllegalStateException("The connector on the endpoint: " + toString()
+ " is null. Please contact " + MuleManifest.getDevListEmail());
}
}
public MuleMessage send(MuleEvent event) throws DispatchException
{
if (connector != null)
{
return connector.send(this, event);
}
else
{
// TODO Either remove because this should never happen or i18n the message
throw new IllegalStateException("The connector on the endpoint: " + toString()
+ " is null. Please contact " + MuleManifest.getDevListEmail());
}
}
public MuleContext getMuleContext()
{
return muleContext;
}
/**
* Getter for property 'connectionStrategy'.
*
* @return Value for property 'connectionStrategy'.
*/
public ConnectionStrategy getConnectionStrategy()
{
return connectionStrategy;
}
public void initialise() throws InitialisationException
{
// Nothing to initialise currently
}
}
| [
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] | tcarlson@bf997673-6b11-0410-b953-e057580c5b09 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.