blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a562ca27d7ce46c991a3bdcf7abb835c93d62561 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_1893.java | bd2e1eb1ec776bf8a89f5d57f136f1b0c1cea562 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,152 | java | /**
* This is a fast, native implementation of an iterative box blur. The algorithm runs in-place on the provided bitmap and therefore has a very small memory footprint. <p> The iterative box blur has the nice property that it approximates the Gaussian blur very quickly. Usually iterations=3 is sufficient such that the casual observer cannot tell the difference. <p> The edge pixels are repeated such that the bitmap still has a well-defined border. <p> Asymptotic runtime: O(width * height * iterations) <p> Asymptotic memory: O(radius + max(width, height))
* @param bitmap The targeted bitmap that will be blurred in-place. Each dimension must not begreater than 65536.
* @param iterations The number of iterations to run. Must be greater than 0 and not greater than65536.
* @param blurRadius The given blur radius. Must be greater than 0 and not greater than 65536.
*/
public static void iterativeBoxBlur(Bitmap bitmap,int iterations,int blurRadius){
Preconditions.checkNotNull(bitmap);
Preconditions.checkArgument(iterations > 0);
Preconditions.checkArgument(blurRadius > 0);
nativeIterativeBoxBlur(bitmap,iterations,blurRadius);
}
| [
"[email protected]"
] | |
f22c1a94462b70a2555932d3f5506e45a5ae4cbe | cd4a79a2841c6d3d7ee687e502f121a7156d0920 | /app/src/main/java/hainu/com/trainorganization/adapter/ArticlelistAdapter.java | 479ed3c243a6758334c785f7f1f31047bb5e2421 | [] | no_license | 1812507678/TrainOrganization | 8064d2fdf61ee9dd0a53ac463ea63be1bbe225b3 | 4943b1ca2fbc05ff07b4f2500c06b547ea35d02b | refs/heads/master | 2020-06-13T03:59:50.339432 | 2016-12-28T18:25:59 | 2016-12-28T18:25:59 | 75,451,512 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,019 | java | package hainu.com.trainorganization.adapter;
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.lidroid.xutils.BitmapUtils;
import java.util.List;
import hainu.com.trainorganization.R;
import hainu.com.trainorganization.bean.StrategyArticle;
/**
* Created by Administrator on 2016/7/26.
*/
public class ArticlelistAdapter extends BaseAdapter {
private BitmapUtils bitmapUtils;
private Activity activity;
private List<StrategyArticle> data;
public ArticlelistAdapter(Activity activity, List<StrategyArticle> data) {
bitmapUtils = new BitmapUtils(activity);
this.data = data;
this.activity = activity;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
final StrategyArticle article = data.get(position);
View inflate = View.inflate(activity, R.layout.list_article_item,null);
ImageView iv_readlist_artcileimage = (ImageView) inflate.findViewById(R.id.iv_readlist_artcileimage);
TextView tv_readlist_title = (TextView) inflate.findViewById(R.id.tv_readlist_title);
TextView tv_readlist_time = (TextView) inflate.findViewById(R.id.tv_readlist_time);
TextView tv_readlist_count = (TextView) inflate.findViewById(R.id.tv_readlist_count);
String imageurl = article.getimageUrl();
bitmapUtils.display(iv_readlist_artcileimage,imageurl);
tv_readlist_title.setText(article.getTitle());
tv_readlist_time.setText(article.getTime());
tv_readlist_count.setText("阅读量:"+ article.getReadCount()+"");
return inflate;
}
}
| [
"[email protected]"
] | |
df382ef1f71b2a7f002dd68b9815d6ddba1dbfb2 | 46859af06fdb68004f3a57e2acdd879e92a89489 | /sum.java | 9042d051d7094aea8b8af70754d64f50db3af3e5 | [] | no_license | vinodk619/war_project | bccb3a5d5e1f9f28c5225c343df84d5446f59ca4 | e6d796e62a65d541fe8c8a098096244c86924dd4 | refs/heads/master | 2021-03-15T04:45:50.814605 | 2020-03-12T12:16:28 | 2020-03-12T12:16:28 | 246,825,390 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 95 | java | class sum
{
public static void main{string[]}
{
init a,b,c
a=20,b=30,c=4
d=a+b+c}
}
| [
"[email protected]"
] | |
e2388e257179ca40b41c60840a27da1c68e1b7b3 | 8fd2c2998888c28ccd54ee4d745bedda509b6e9c | /src/main/java/app/common/validation/Constraint.java | d2fdae36741c615b20a6921df5a8e542573c6bc6 | [
"MIT"
] | permissive | project-templates/payara-application | 301df8750513061ab97b02cb05243a982cf80a38 | b2becb437c57b322b62ca9e820152208c3f6a1d6 | refs/heads/master | 2021-06-09T08:12:07.628270 | 2016-12-08T14:34:12 | 2016-12-08T14:34:12 | 73,614,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 135 | java | package app.common.validation;
public interface Constraint {
boolean validate(String text);
String getErrorMessage();
}
| [
"[email protected]"
] | |
dcc08fe6c5df674848f05297488edd182ab84dc6 | e0fd595a98ca7a23ecf90f4c08801bf7e0361bf2 | /results_without_immortals/pristine2/jena2/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java | b3ad386256fa7930b2f74b7ea0254c6e39f63603 | [
"Apache-2.0"
] | permissive | amchristi/AdFL | 690699a1c3d0d0e84e412b79826aa1b51b572979 | 40c879e7fe5f87afbf4abc29e442a6e37b1e6541 | refs/heads/master | 2021-12-15T11:43:07.539575 | 2019-07-18T05:56:21 | 2019-07-18T05:56:21 | 176,834,877 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 18,797 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.riot;
import static org.apache.jena.riot.WebContent.* ;
import java.util.Collection ;
import java.util.Collections ;
import java.util.HashMap;
import java.util.Locale ;
import java.util.Map ;
import org.apache.jena.atlas.logging.Log ;
import org.apache.jena.atlas.web.ContentType ;
import org.apache.jena.atlas.web.MediaType ;
import org.apache.jena.util.FileUtils ;
/** Central registry of RDF languages and syntaxes.
* @see RDFParserRegistry
* @see RDFFormat
*/
public class RDFLanguages
{
// Display names
public static final String strLangRDFXML = "RDF/XML" ;
public static final String strLangTurtle = "Turtle" ;
public static final String strLangNTriples = "N-Triples" ;
public static final String strLangN3 = "N3" ;
public static final String strLangRDFJSON = "RDF/JSON" ;
public static final String strLangJSONLD = "JSON-LD" ;
public static final String strLangNQuads = "N-Quads" ;
public static final String strLangTriG = "TriG" ;
public static final String strLangCSV = "CSV";
public static final String strLangTriX = "TriX";
public static final String strLangRDFTHRIFT = "RDF-THRIFT";
/*
* ".owl" is not a formally registered file extension for OWL
* using RDF/XML. It was mentioned in OWL1 (when there was
* formally only one syntax for publishing RDF).
*
* OWL2 does not mention it.
*
* ".owx" is the OWL direct XML syntax.
*/
/** <a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML</a> */
public static final Lang RDFXML = LangBuilder.create(strLangRDFXML, contentTypeRDFXML)
.addAltNames("RDFXML", "RDF/XML-ABBREV", "RDFXML-ABBREV")
.addFileExtensions("rdf", "owl", "xml")
.build() ;
/** <a href="http://www.w3.org/TR/turtle/">Turtle</a>*/
public static final Lang TURTLE = LangBuilder.create(strLangTurtle, contentTypeTurtle)
.addAltNames("TTL")
.addAltContentTypes(contentTypeTurtleAlt1, contentTypeTurtleAlt2)
.addFileExtensions("ttl")
.build() ;
/** Alternative constant for {@link #TURTLE} */
public static final Lang TTL = TURTLE ;
/** N3 (treat as Turtle) */
public static final Lang N3 = LangBuilder.create(strLangN3, contentTypeN3)
.addAltContentTypes(contentTypeN3, contentTypeN3Alt1, contentTypeN3Alt2)
.addFileExtensions("n3")
.build() ;
/** <a href="http://www.w3.org/TR/n-triples/">N-Triples</a>*/
public static final Lang NTRIPLES = LangBuilder.create(strLangNTriples, contentTypeNTriples)
.addAltNames("NT", "NTriples", "NTriple", "N-Triple", "N-Triples")
// Remove? Causes more trouble than it's worth.
.addAltContentTypes(contentTypeNTriplesAlt)
.addFileExtensions("nt")
.build() ;
/** Alternative constant for {@link #NTRIPLES} */
public static final Lang NT = NTRIPLES ;
/** <a href="http://www.w3.org/TR/json-ld/">JSON-LD</a>. */
public static final Lang JSONLD = LangBuilder.create(strLangJSONLD, "application/ld+json")
.addAltNames("JSONLD")
.addFileExtensions("jsonld")
.build() ;
/** <a href="http://www.w3.org/TR/rdf-json/">RDF/JSON</a>. This is not <a href="http://www.w3.org/TR/json-ld/">JSON-LD</a>. */
public static final Lang RDFJSON = LangBuilder.create(strLangRDFJSON, contentTypeRDFJSON)
.addAltNames("RDFJSON")
.addFileExtensions("rj")
.build() ;
/** <a href="http://www.w3.org/TR/trig/">TriG</a> */
public static final Lang TRIG = LangBuilder.create(strLangTriG, contentTypeTriG)
.addAltContentTypes(contentTypeTriGAlt1, contentTypeTriGAlt2)
.addFileExtensions("trig")
.build() ;
/** <a href="http://www.w3.org/TR/n-quads">N-Quads</a> */
public static final Lang NQUADS = LangBuilder.create(strLangNQuads, contentTypeNQuads)
.addAltNames("NQ", "NQuads", "NQuad", "N-Quad", "N-Quads")
.addAltContentTypes(contentTypeNQuadsAlt1, contentTypeNQuadsAlt2)
.addFileExtensions("nq")
.build() ;
/** Alternative constant {@link #NQUADS} */
public static final Lang NQ = NQUADS ;
/** CSV data. This can be read into an RDF model with simple conversion */
public static final Lang CSV = LangBuilder.create(strLangCSV, contentTypeTextCSV)
.addAltNames("csv")
.addFileExtensions("csv")
.build() ;
/** The RDF syntax "RDF Thrift" : see http://jena.apache.org/documentation/io */
public static final Lang THRIFT = LangBuilder.create(strLangRDFTHRIFT, contentTypeRDFThrift)
.addAltNames("RDF_THRIFT", "RDFTHRIFT", "RDF/THRIFT", "TRDF")
.addFileExtensions("rt", "trdf")
.build() ;
/** Text */
public static final Lang TEXT = LangBuilder.create("text", contentTypeTextPlain)
.addAltNames("TEXT")
.addFileExtensions("txt")
.build() ;
/** TriX */
public static final Lang TRIX = LangBuilder.create(strLangTriX, contentTypeTriX)
.addAltContentTypes(contentTypeTriXxml)
.addAltNames("TRIX", "trix")
// Extension "xml" is used for RDF/XML.
.addFileExtensions("trix")
.build() ;
/** The "null" language */
public static final Lang RDFNULL = LangBuilder.create("rdf/null", "null/rdf")
.addAltNames("NULL", "null")
.build() ;
// ---- Central registry
/** Mapping of colloquial name to language */
private static Map<String, Lang> mapLabelToLang = new HashMap<>() ;
// For testing mainly.
public static Collection<Lang> getRegisteredLanguages() { return Collections.unmodifiableCollection(mapLabelToLang.values()); }
/** Mapping of content type (main and alternatives) to language */
private static Map<String, Lang> mapContentTypeToLang = new HashMap<>() ;
/** Mapping of file extension to language */
private static Map<String, Lang> mapFileExtToLang = new HashMap<>() ;
// ----------------------
public static void init() {}
static { init$() ; }
private static synchronized void init$()
{
initStandard() ;
// Needed to avoid a class initialization loop.
Lang.RDFXML = RDFLanguages.RDFXML ;
Lang.NTRIPLES = RDFLanguages.NTRIPLES ;
Lang.NT = RDFLanguages.NT ;
Lang.N3 = RDFLanguages.N3 ;
Lang.TURTLE = RDFLanguages.TURTLE ;
Lang.TTL = RDFLanguages.TTL ;
Lang.JSONLD = RDFLanguages.JSONLD ;
Lang.RDFJSON = RDFLanguages.RDFJSON ;
Lang.NQUADS = RDFLanguages.NQUADS ;
Lang.NQ = RDFLanguages.NQ ;
Lang.TRIG = RDFLanguages.TRIG ;
Lang.RDFTHRIFT = RDFLanguages.THRIFT ;
Lang.CSV = RDFLanguages.CSV ;
Lang.TRIX = RDFLanguages.TRIX ;
Lang.RDFNULL = RDFLanguages.RDFNULL ;
}
// ----------------------
/** Standard built-in languages */
private static void initStandard()
{
register(RDFXML) ;
register(TURTLE) ;
register(N3) ;
register(NTRIPLES) ;
register(JSONLD) ;
register(RDFJSON) ;
register(TRIG) ;
register(NQUADS) ;
register(THRIFT) ;
register(CSV) ;
register(TRIX) ;
register(RDFNULL) ;
// Check for JSON-LD engine.
String clsName = "com.github.jsonldjava.core.JsonLdProcessor" ;
try {
Class.forName(clsName) ;
} catch (ClassNotFoundException ex) {
Log.warn(RDFLanguages.class, "java-jsonld classes not on the classpath - JSON-LD input-output not available.") ;
Log.warn(RDFLanguages.class, "Minimum jarfiles are jsonld-java, jackson-core, jackson-annotations") ;
Log.warn(RDFLanguages.class, "If using a Jena distribution, put all jars in the lib/ directory on the classpath") ;
return ;
}
}
/** Register a language.
* To create a {@link Lang} object use {@link LangBuilder}.
* See also
* {@link RDFParserRegistry#registerLang}
* for registering a language and it's RDF parser fatory.
*
* @see RDFParserRegistry
*/
public static void register(Lang lang)
{
if ( lang == null )
throw new IllegalArgumentException("null for language") ;
checkRegistration(lang) ;
mapLabelToLang.put(canonicalKey(lang.getLabel()), lang) ;
for (String altName : lang.getAltNames() )
mapLabelToLang.put(canonicalKey(altName), lang) ;
mapContentTypeToLang.put(canonicalKey(lang.getContentType().getContentType()), lang) ;
for ( String ct : lang.getAltContentTypes() )
mapContentTypeToLang.put(canonicalKey(ct), lang) ;
for ( String ext : lang.getFileExtensions() )
{
if ( ext.startsWith(".") )
ext = ext.substring(1) ;
mapFileExtToLang.put(canonicalKey(ext), lang) ;
}
}
private static void checkRegistration(Lang lang)
{
if ( lang == null )
return ;
String label = canonicalKey(lang.getLabel()) ;
Lang lang2 = mapLabelToLang.get(label) ;
if ( lang2 == null )
return ;
if ( lang.equals(lang2) )
return ;
// Content type.
if ( mapContentTypeToLang.containsKey(lang.getContentType().getContentType()))
{
String k = lang.getContentType().getContentType() ;
error("Language overlap: " +lang+" and "+mapContentTypeToLang.get(k)+" on content type "+k) ;
}
for (String altName : lang.getAltNames() )
if ( mapLabelToLang.containsKey(altName) )
error("Language overlap: " +lang+" and "+mapLabelToLang.get(altName)+" on name "+altName) ;
for (String ct : lang.getAltContentTypes() )
if ( mapContentTypeToLang.containsKey(ct) )
error("Language overlap: " +lang+" and "+mapContentTypeToLang.get(ct)+" on content type "+ct) ;
for (String ext : lang.getFileExtensions() )
if ( mapFileExtToLang.containsKey(ext) )
error("Language overlap: " +lang+" and "+mapFileExtToLang.get(ext)+" on file extension type "+ext) ;
}
/** Remove a regsitration of a language - this also removes all recorded mapping
* of content types and file extensions.
*/
public static void unregister(Lang lang)
{
if ( lang == null )
throw new IllegalArgumentException("null for language") ;
checkRegistration(lang) ;
mapLabelToLang.remove(canonicalKey(lang.getLabel())) ;
mapContentTypeToLang.remove(canonicalKey(lang.getContentType().getContentType())) ;
for ( String ct : lang.getAltContentTypes() )
mapContentTypeToLang.remove(canonicalKey(ct)) ;
for ( String ext : lang.getFileExtensions() )
mapFileExtToLang.remove(canonicalKey(ext)) ;
}
public static boolean isRegistered(Lang lang)
{
if ( lang == null )
throw new IllegalArgumentException("null for language") ;
String label = canonicalKey(lang.getLabel()) ;
Lang lang2 = mapLabelToLang.get(label) ;
if ( lang2 == null )
return false ;
checkRegistration(lang) ;
return true ;
}
/** return true if the language is registered as a triples language */
public static boolean isTriples(Lang lang) { return RDFParserRegistry.isTriples(lang) ; }
/** return true if the language is registered as a quads language */
public static boolean isQuads(Lang lang) { return RDFParserRegistry.isQuads(lang) ; }
/** Map a content type (without charset) to a {@link Lang} */
public static Lang contentTypeToLang(String contentType)
{
if ( contentType == null )
return null ;
String key = canonicalKey(contentType) ;
return mapContentTypeToLang.get(key) ;
}
/** Map a content type (without charset) to a {@link Lang} */
public static Lang contentTypeToLang(ContentType ct)
{
if ( ct == null )
return null ;
String key = canonicalKey(ct.getContentType()) ;
return mapContentTypeToLang.get(key) ;
}
public static String getCharsetForContentType(String contentType)
{
MediaType ct = MediaType.create(contentType) ;
if ( ct.getCharset() != null )
return ct.getCharset() ;
String mt = ct.getContentType() ;
if ( contentTypeNTriples.equals(mt) ) return charsetUTF8 ;
if ( contentTypeNTriplesAlt.equals(mt) ) return charsetASCII ;
if ( contentTypeNQuads.equals(mt) ) return charsetUTF8 ;
if ( contentTypeNQuadsAlt1.equals(mt) ) return charsetASCII ;
if ( contentTypeNQuadsAlt2.equals(mt) ) return charsetASCII ;
return charsetUTF8 ;
}
/** Map a colloquial name (e.g. "Turtle") to a {@link Lang} */
public static Lang shortnameToLang(String label)
{
if ( label == null )
return null ;
String key = canonicalKey(label) ;
return mapLabelToLang.get(key) ;
}
/** Try to map a file extension to a {@link Lang}; return null on no registered mapping */
public static Lang fileExtToLang(String ext)
{
if ( ext == null ) return null ;
if ( ext.startsWith(".") )
ext = ext.substring(1) ;
ext = canonicalKey(ext) ;
return mapFileExtToLang.get(ext) ;
}
/** Try to map a resource name to a {@link Lang}; return null on no registered mapping */
public static Lang resourceNameToLang(String resourceName) { return filenameToLang(resourceName) ; }
/** Try to map a resource name to a {@link Lang}; return the given default where there is no registered mapping */
public static Lang resourceNameToLang(String resourceName, Lang dftLang) { return filenameToLang(resourceName, dftLang) ; }
/** Try to map a file name to a {@link Lang}; return null on no registered mapping */
public static Lang filenameToLang(String filename)
{
if ( filename == null ) return null ;
if ( filename.endsWith(".gz") )
filename = filename.substring(0, filename.length()-3) ;
return fileExtToLang(FileUtils.getFilenameExt(filename)) ;
}
/** Try to map a file name to a {@link Lang}; return the given default where there is no registered mapping */
public static Lang filenameToLang(String filename, Lang dftLang)
{
Lang lang = filenameToLang(filename) ;
return (lang == null) ? dftLang : lang ;
}
/** Turn a name for a language into a {@link Lang} object.
* The name can be a label, or a content type.
*/
public static Lang nameToLang(String langName)
{
if ( langName == null )
return null ;
Lang lang = shortnameToLang(langName) ;
if ( lang != null )
return lang ;
lang = contentTypeToLang(langName) ;
return lang ;
}
static String canonicalKey(String x) { return x.toLowerCase(Locale.ROOT) ; }
public static ContentType guessContentType(String resourceName)
{
if ( resourceName == null )
return null ;
Lang lang = filenameToLang(resourceName) ;
if ( lang == null )
return null ;
return lang.getContentType() ;
}
private static void error(String message)
{
throw new RiotException(message) ;
}
public static boolean sameLang(Lang lang1, Lang lang2)
{
if ( lang1 == null || lang2 == null ) return false ;
if ( lang1 == lang2 ) return true ;
return lang1.getLabel() == lang2.getLabel() ;
}
}
| [
"[email protected]"
] | |
6573cc2e30421a378c928383bfc61acdcb763ac3 | 7c832046815214f00436a5047cdcf2df1d705263 | /common_base/src/main/java/com/xy/commonbase/base/BasePopupWindow.java | d37d65a5260f004188fddec0b64c8ee7f6672fef | [] | no_license | surpreme/aite1.1.1 | 1c0d258d3ae0e9fb6e7fa618a1bdf31799bc8f5a | 37346a1ec059c7bb4210be46fdd913642375831c | refs/heads/master | 2020-08-29T12:21:50.871759 | 2019-10-28T08:18:18 | 2019-10-28T08:18:18 | 218,029,631 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,677 | java | package com.xy.commonbase.base;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;
import androidx.annotation.StyleRes;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
public abstract class BasePopupWindow extends PopupWindow {
protected Context mContext;
private Unbinder binder;
protected CompositeDisposable disposable;
public BasePopupWindow(Context context, CompositeDisposable disposable) {
this(context,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0,disposable);
}
public BasePopupWindow(Context context, int width, int height, @StyleRes int anim , CompositeDisposable disposable) {
this.mContext = context;
View enrollView = LayoutInflater.from(mContext).inflate(getLayout(), null);
binder = ButterKnife.bind(this, enrollView);
this.disposable = disposable;
this.setContentView(enrollView);
// 设置宽高
this.setWidth(width);
this.setHeight(height);
// 设置弹出窗口可点击
this.setOutsideTouchable(true);
// 窗体背景色
this.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
this.setAnimationStyle(anim);
initData();
initView();
}
public abstract int getLayout();
protected abstract void initData();
protected abstract void initView();
} | [
"[email protected]"
] | |
0ae4c0132f69eaa4998ac4d438ea527798b09531 | 3c5b348c4240982f2826bece631f645ecc203581 | /operate system/Victor/12-03-14/os.java | a6c80537c9c02b5514e6e892a518df2d97bbcbfc | [] | no_license | bloodjay/College | 547addf59acb6902566b5f60b751c8bf8da58d68 | 3b8db4e31448b0257d0f8fbd549565fa99ae3e4d | refs/heads/master | 2021-01-17T14:36:14.540888 | 2017-03-06T16:20:19 | 2017-03-06T16:20:19 | 84,093,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,298 | java | import java.util.*;
//OS class
//holds all the functions called by SOS: startup, crint, drmint, dskint, tro, svc
public class os
{
//"global" variables for OS class
static jobTable arrivingJob; //job that most recently came into system
static jobTable runningJob; //job that is being run
static memManager memory; //objects for memory management
static CPUScheduler scheduler; //and CPU Scheduling
//*NOTE: the ready queue and wait queue are part of scheduler
static int timeSlice; //default time slice or time quantum for jobs
static int curTime; //current time
static int prevTime; //previous time - used to measure run time of a job
//Startup - initializes all variables and objects
public static void startup()
{
System.out.print("\n\n///////------*****STARTUP*****------///////\n\n");
sos.ontrace();
arrivingJob = new jobTable();
runningJob = new jobTable();
memory = new memManager();
scheduler = new CPUScheduler();
curTime = 0;
prevTime = 0;
return;
}
//Crint - called when job arrives on drum
//p: 1 = jobNum, 2 = priority, 3 = size, 4 = maxCPUTime, 5 = currentTime
public static void Crint(int []a, int []p)
{
//update time variables
prevTime = curTime;
curTime = p[5];
System.out.print("\n\n///////------*****CRINT*****------///////\n\n");
//create temp jobTable object of job that just came onto the drum
arrivingJob = new jobTable(p[1], p[3], p[4], memory.worstFitLocation);
//update worstfit location;
memory.worstFit();
//if the job can fit into memory and the drum is not busy, call siodrum, which moves job from
//drum to memory or the other way
if (memory.canFit(arrivingJob.size) && !scheduler.drumBusy)
{
sos.siodrum(arrivingJob.num, arrivingJob.size, arrivingJob.location, 0);
//************************************************************************************************************************************************
//debugging purposes line here. want to know when is the drum marked busy and when is not
System.out.println("Drum bussy? "scheduler.drumBusy + " **************************************************************************************************************************");
//***********************************************************************************************************************************************
scheduler.drumBusy = true;
}
//if it can't fit or the drum is busy, put it into the wait queue
else
scheduler.waitQ.add(arrivingJob);
//if there is no job on the ready queue and the drum is busy, put CPU in idle mode.
if (scheduler.readyQ.isEmpty() && scheduler.drumBusy)
{
a[0] = 1;
return;
}
//but if the ready queue is empty but drum is not busy, check the waitQ
else if (scheduler.readyQ.isEmpty() && !scheduler.drumBusy)
//if waitQ is not empty, call siodrum to move the job into memory
if (!scheduler.waitQ.isEmpty())
{
/******************************************************************************************************************************************
need to fix this, move a job from waiting queue to memory when drum is not busy and memory has enough space.
*/
System.out.println("8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888");
}
//if waitQ is also empty, put CPU in idle
else
{
a[0] = 1;
return;
}
//else, run job on queue
runningJob.timeSlice -= curTime - prevTime;
runningJob.runTime += curTime - prevTime;
/*if job finished time quantum and used it's max CPU time, then
*it is completed, remove it from queue and memory*/
if (runningJob.timeSlice == 0 && runningJob.runTime == runningJob.maxTime)
{
//remove job from memory
memory.remove(runningJob.location, runningJob.size);
//remove job from queue
scheduler.readyQ.remove();
//if the ready queue is empty, return control to sos with no jobs to run
if (scheduler.readyQ.isEmpty())
a[0] = 1;
return;
}
//else, there should be a running job, run it
else
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
return;
}
//Diskint - called when a job finishes I/O
public static void Dskint(int []a, int []p)
{
//update time variables
prevTime = curTime;
curTime = p[5];
System.out.print("\n\n///////------*****DSKINT*****------///////\n\n");
//Since it finished I/O, it is no longer latched and is unblocked
scheduler.readyQ.peek().latchBit = false;
scheduler.readyQ.peek().blockBit = false;
runningJob = scheduler.readyQ.peek();
//Resume job to run
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
return;
}
//Drmint - called when job finishes moving from drum to mem, or vice versa
public static void Drmint(int []a, int []p)
{
//************************************************************************************************************************************************
//debugging purposes line here. want to know when is the drum marked busy and when is not
System.out.println(" Drum bussy? "scheduler.drumBusy + " **************************************************************************************************************************");
//***********************************************************************************************************************************************
scheduler.drumBusy = false;
prevTime = curTime;
curTime = p[5];
/*if there is a job running, check if it is completed then remove it,
*else just keep running it */
if (runningJob !=null)
{
runningJob.timeSlice -= curTime - prevTime;
runningJob.runTime += curTime - prevTime;
/*if job finished time quantum and used it's max CPU time, then
*it is completed, remove it from queue and memory*/
if (runningJob.timeSlice == 0 && runningJob.runTime !=0)
{
//remove job from memory
memory.remove(runningJob.location, runningJob.size);
scheduler.readyQ.remove();
}
}
System.out.print("\n\n///////------*****DRMINT*****------///////\n\n");
//add job into memory
memory.add(arrivingJob.size);
//add job into ready queue
scheduler.readyQ.add(arrivingJob);
runningJob = scheduler.readyQ.peek();
//Resume job to run
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
/************************************************************************************************************************************************************
this loop is set for debugging purposes
it prints our version of memory to be compared to sos memory*/
for (int i=0; i<25; i++)
{
if ((i+1)%4 == 0)
System.out.println("\n");
System.out.println(i +"" + memory.mem[i] + "\t\t" + (i + 25) +"" + memory.mem[i + 25] + "\t\t" + + (i + 50) +"" + memory.mem[i + 50 ] + "\t\t" + + (i + 75) +"" + memory.mem[i + 75]);
}
System.out.println("WORST FIT LOCTION " + memory.worstFitLocation + "\n\n");
//************************************************************************************************************************************************************
return;
}
//TRO - called when a job completes its time quantum
public static void Tro(int []a, int []p)
{
//update time variables
prevTime = curTime;
curTime = p[5];
runningJob.timeSlice -= curTime - prevTime;
runningJob.runTime += curTime - prevTime;
/*If job remaining time is less than time quantum and the job still needs time to
*complete, then make the time quantum the remaining time for the job */
if (runningJob.maxTime - runningJob.runTime <= 5 && runningJob.maxTime - runningJob.runTime !=0)
runningJob.timeSlice = runningJob.maxTime - runningJob.runTime;
/*else if job finished time quantum and used it's max CPU time, then
*it is completed, remove it from queue and memory*/
else if (runningJob.timeSlice == 0 && runningJob.maxTime == runningJob.runTime)
{
//remove job from memory
memory.remove(runningJob.location, runningJob.size);
scheduler.readyQ.remove();
//if there is no job in the ready queue, the CPU is idle
if (scheduler.readyQ.isEmpty()) {
a[0] = 1;
runningJob = null;
return;
}
//otherwise, the next job in the queue is now the running job
runningJob = scheduler.readyQ.peek();
//Resume the job to run
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
return;
}
//else, the job still needs time for completion, therefore is given a new time quantum
else
runningJob.timeSlice = runningJob.TIMEQUANTUM;
System.out.print("\n\n///////------*****TRO*****------///////\n\n");
//push running job to back and start next job in queue
scheduler.roundRobin();
runningJob = scheduler.readyQ.peek();
//Resume job to run
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
return;
}
//SVC - called in one of three instances
//terminate, which means a job wants to finish
//request I/O, which means a job wants to do I/O
//block, which means a job does not want to run on the CPU until it finishes I/O
public static void Svc(int []a, int []p)
{
//update time variables
prevTime = curTime;
curTime = p[5];
//the three mentioned instances are denoted by the value of a
switch (a[0])
{
//a=5 - terminate
case 5:
System.out.print("\n\n///////------*****SVC-TERM*****------///////\n\n");
//remove job from memory
memory.remove(runningJob.location, runningJob.size);
scheduler.readyQ.remove();
//if there is no job in the ready queue, the CPU is idle
if (scheduler.readyQ.isEmpty()) {
a[0] = 1;
runningJob = null;
/************************************************************************************************************************************************************
this loop is set for debugging purposes
it prints our version of memory to be compared to sos memory*/
for (int i=0; i<25; i++)
{
if ((i+1)%4 == 0)
System.out.println("\n");
System.out.println(i +"" + memory.mem[i] + "\t\t" + (i + 25) +"" + memory.mem[i + 25] + "\t\t" + + (i + 50) +"" + memory.mem[i + 50 ] + "\t\t" + + (i + 75) +"" + memory.mem[i + 75]);
}
System.out.println("WORST FIT LOCATION " + memory.worstFitLocation + "\n\n");
//************************************************************************************************************************************************************
break;
}
//otherwise, the next job in the queue is now the running job
runningJob = scheduler.readyQ.peek();
//Resume the job to run
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
break;
//a=6 - request I/O
case 6:
System.out.print("\n\n///////------*****SVC-I/O*****------///////\n\n");
//call siodisk - which starts I/O for the given job
sos.siodisk(runningJob.num);
//Update its CPU running time
runningJob.timeSlice -= curTime - prevTime;
runningJob.runTime += curTime - prevTime;
//set the latchBit to true, since the job is doing I/O
scheduler.readyQ.peek().latchBit = true;
//run next job
runningJob = scheduler.readyQ.peek();
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
break;
//a=7 - block
case 7:
System.out.print("\n\n///////------*****SVC-BLOCK*****------///////\n\n");
//Update its CPU running time
runningJob.timeSlice -= curTime - prevTime;
runningJob.runTime += curTime - prevTime;
//set blockBit to true
scheduler.readyQ.peek().blockBit = true;
//blocked jobs can't run on CPU, so reschedule
scheduler.reschedule();
runningJob = scheduler.readyQ.peek();
//if the running job is blocked and latched, the CPU is idle
if (runningJob.blockBit && runningJob.latchBit)
a[0] = 1;
//else resume job to run
else{
a[0] = 2;
p[2] = runningJob.location;
p[3] = runningJob.size;
p[4] = runningJob.timeSlice;
}
break;
}
return;
}
} | [
"[email protected]"
] | |
dd11d2e0b91497ea2db273cafe1e37551970a221 | ce5f34dd41dc2034d832bdc6e2438da9eaba9d4b | /src/main/java/cn/test07/controller/SeckillController.java | e00b79487ae3992ec00d5398527dee24e229086f | [] | no_license | wdlsjdl/cn.test07 | e45c233bedaab843851c4efcb390c3046426f61a | 886e8f6443422c394a270dc8cc5dd89e10f264e4 | refs/heads/master | 2021-01-19T22:41:02.996088 | 2017-04-20T08:45:10 | 2017-04-20T08:45:10 | 88,842,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,828 | java | package cn.test07.controller;
import cn.test07.dto.Exposer;
import cn.test07.dto.SeckillExecution;
import cn.test07.dto.SeckillResult;
import cn.test07.exception.RepeatkillException;
import cn.test07.exception.SeckillCloseException;
import cn.test07.exception.SeckillException;
import cn.test07.po.Seckill;
import cn.test07.po.SeckillStateEnum;
import cn.test07.service.SeckillService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
* Created by VNT on 2017/4/19.
*/
@Controller
@RequestMapping("/seckill")
public class SeckillController {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SeckillService seckillService;
@RequestMapping(value = "/list" , method = RequestMethod.GET)
public String list(Model model){
List<Seckill> list = seckillService.getSeckillList();
model.addAttribute("list", list);
return "list";
}
@RequestMapping(value = "/{seckillId}/detail" , method = RequestMethod.GET)
public String detail(@PathVariable("seckillId") Long seckillId,Model model){
if(seckillId==null)
return "redirect:/seckill/list";
Seckill seckill = seckillService.getById(seckillId);
if(seckill==null)
return "forward:/seckill/list";
model.addAttribute("seckill", seckill);
return "detail";
}
@RequestMapping(value = "/{seckillId}/exposer",method = RequestMethod.POST,produces = {"application/json; charset=utf-8"})
@ResponseBody
public SeckillResult<Exposer> exposer(@PathVariable("seckillId") Long seckillId){
SeckillResult<Exposer> result;
try {
Exposer exposer = seckillService.exportSeckillUrl(seckillId);
result = new SeckillResult<Exposer>(true, exposer);
} catch (Exception e) {
logger.error(e.getMessage(), e);
result = new SeckillResult<Exposer>(false, e.getMessage());
}
return result;
}
@RequestMapping(value = "/{seckillId}/{md5}/execution",method = RequestMethod.POST,produces = {"application/json; charset=utf-8"})
@ResponseBody
public SeckillResult<SeckillExecution> execute(@PathVariable("seckillId") Long seckillId, @PathVariable("md5") String md5, @CookieValue(value = "killPhone",required = false) Long phone){
if(phone==null)
return new SeckillResult<SeckillExecution>(false, "未注册");
SeckillExecution seckillExecution = null;
try {
seckillExecution = seckillService.executeSeckill(seckillId, phone, md5);
return new SeckillResult<SeckillExecution>(true, seckillExecution);
} catch (RepeatkillException e) {
seckillExecution = new SeckillExecution(seckillId, SeckillStateEnum.REPEAT_KILL);
return new SeckillResult<SeckillExecution>(true,seckillExecution);
}catch (SeckillCloseException e){
seckillExecution = new SeckillExecution(seckillId, SeckillStateEnum.END);
return new SeckillResult<SeckillExecution>(true,seckillExecution);
}catch (SeckillException e){
logger.error(e.getMessage(),e);
seckillExecution = new SeckillExecution(seckillId, SeckillStateEnum.INNER_ERROR);
return new SeckillResult<SeckillExecution>(true, seckillExecution);
}
}
@RequestMapping(value = "/time/now",method = RequestMethod.GET)
@ResponseBody
public SeckillResult<Long> time(){
Date now = new Date();
return new SeckillResult<Long>(true,now.getTime());
}
}
| [
"[email protected]"
] | |
7d48d6ebb5cf9c93f6d20bb7ca5212deb7828529 | 27b0806c51afddc583984d7ecac3abb86f712397 | /src/main/java/com/apap/tutorial7/service/PilotService.java | 7f3a97908a5b3ae32c36edea5b20dad371af84a6 | [] | no_license | Apap-2018/tutorial7_1606893481 | 404c5511e65983b94a7b6b248fdba08fcfbec56a | 258d87ddf1434ec452784c32852f346d5828cf62 | refs/heads/master | 2020-04-04T05:11:29.855311 | 2018-11-01T15:43:19 | 2018-11-01T15:43:19 | 155,737,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.apap.tutorial7.service;
import com.apap.tutorial7.model.PilotModel;
import java.util.Optional;
/**
* PilotService
*/
public interface PilotService {
PilotModel getPilotDetailByLicenseNumber(String licenseNumber);
PilotModel addPilot(PilotModel pilot);
void deletePilotByLicenseNumber(String licenseNumber);
Optional<PilotModel> getPilotDetailById(long id);
void updatePilot(PilotModel pilot);
void deletePilot(PilotModel pilot);
} | [
"[email protected]"
] | |
7b879fd7d315b91120ef270d3db9b071ca1c9177 | 1e8a5381b67b594777147541253352e974b641c5 | /com/veryfit/multi/camera/PhotoFragment.java | ce435f53ef69a2d78660bafd5151e2f74216986f | [] | no_license | jramos92/Verify-Prueba | d45f48829e663122922f57720341990956390b7f | 94765f020d52dbfe258dab9e36b9bb8f9578f907 | refs/heads/master | 2020-05-21T14:35:36.319179 | 2017-03-11T04:24:40 | 2017-03-11T04:24:40 | 84,623,529 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,172 | java | package com.veryfit.multi.camera;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.graphics.Point;
import android.media.ThumbnailUtils;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.provider.MediaStore.Images.Media;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.ScaleAnimation;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import android.widget.Toast;
import com.project.library.core.APPCoreServiceListener;
import com.project.library.core.CoreServiceProxy;
import com.project.library.device.cmd.DeviceBaseCommand;
import com.project.library.device.cmd.appcontrol.AppControlCmd;
import com.project.library.util.DebugLog;
import com.veryfit.multi.photowall.ImageDetailsActivity;
import com.veryfit.multi.photowall.Images;
import java.util.List;
public class PhotoFragment
extends Fragment
implements View.OnTouchListener
{
public static final String ACTION = "com.guodoo.multi.takepicture_receiver";
private static final byte MODE_CAMERA = 3;
private static final byte MODE_EXIT = 1;
private static final byte MODE_IDLE = 2;
private static final byte MODE_OPEN = 0;
private APPCoreServiceListener mAppListener = new APPCoreServiceListener()
{
public void onAppControlSuccess(byte paramAnonymousByte, boolean paramAnonymousBoolean)
{
if (paramAnonymousByte == 2)
{
if (paramAnonymousBoolean) {
break label17;
}
PhotoFragment.this.failedOpenCameraMode();
}
label17:
do
{
return;
if (PhotoFragment.this.mode == 1)
{
PhotoFragment.this.mode = 2;
PhotoFragment.this.getActivity().finish();
return;
}
} while (PhotoFragment.this.mode != 0);
PhotoFragment.this.mode = 3;
}
public void onBLEConnected()
{
if (PhotoFragment.this.mode == 3) {
PhotoFragment.this.mCore.writeForce(AppControlCmd.getInstance().getCameraCmd((byte)0));
}
}
public void onBLEDisConnected(String paramAnonymousString) {}
public void onBleControlReceive(byte paramAnonymousByte1, byte paramAnonymousByte2)
{
DebugLog.d("onBleControlReceive====接收拍照命令");
PhotoFragment.this.mReceiveCmdTime = System.currentTimeMillis();
if ((paramAnonymousByte1 == 1) && (com.project.library.device.cmd.blecontrol.BleControlCmd.EVENT_TYPE[5] == paramAnonymousByte2) && (PhotoFragment.this.getActivity() != null)) {
PhotoFragment.this.getActivity().runOnUiThread(new Runnable()
{
public void run()
{
PhotoFragment.this.clickedTakePhoto();
}
});
}
}
public void onDataSendTimeOut(byte[] paramAnonymousArrayOfByte)
{
if ((DeviceBaseCommand.getCmdId(paramAnonymousArrayOfByte) == 6) && (DeviceBaseCommand.getCmdKey(paramAnonymousArrayOfByte) == 2)) {
PhotoFragment.this.failedOpenCameraMode();
}
}
};
private Button mCloseFlashBtn;
protected CoreServiceProxy mCore = CoreServiceProxy.getInstance();
private SeekBar mCountSeekBar;
private Button mDefaultFlashBtn;
private FlashState mFlashState = FlashState.FLASH_AUTO;
private View mFlashView;
private ImageView mGalleryBtn;
private Handler mHandler = new Handler();
private ImageView mIvFocus;
private Button mOpenFlashBtn;
private Button mPhotoCloseBtn;
private TextView mPhotoCount;
private TextView mPhotoTime;
private CameraPreView mPreView = null;
private long mReceiveCmdTime = 0L;
private View mRootView;
private View mSettingView;
private SharedPreferences mSharedPreferences = null;
private Button mTakePhotoBtn;
private SeekBar mTimeSeekBar;
private byte mode = 2;
private BroadcastReceiver takePictureReceiver = new BroadcastReceiver()
{
public void onReceive(Context paramAnonymousContext, Intent paramAnonymousIntent)
{
if (paramAnonymousIntent.getAction().equals("com.guodoo.multi.takepicture_receiver"))
{
paramAnonymousContext = paramAnonymousIntent.getStringExtra("fileName");
PhotoFragment.this.setDefaultIcon(paramAnonymousContext);
}
}
};
private void failedOpenCameraMode()
{
this.mode = 1;
this.mCore.writeForce(AppControlCmd.getInstance().getCameraCmd((byte)1));
getActivity().runOnUiThread(new Runnable()
{
public void run()
{
Toast.makeText(PhotoFragment.this.getActivity(), 2131296617, 0).show();
PhotoFragment.this.getActivity().finish();
}
});
}
private void initBle()
{
this.mode = 2;
if (this.mCore.isAvailable())
{
this.mCore.addListener(this.mAppListener);
if (!this.mCore.isDeviceConnected()) {
break label73;
}
if (!this.mCore.writeForce(AppControlCmd.getInstance().getCameraCmd((byte)0))) {
Toast.makeText(getActivity(), 2131296616, 0).show();
}
}
else
{
return;
}
this.mode = 0;
return;
label73:
Toast.makeText(getActivity(), 2131296616, 0).show();
}
private void initFlashControl()
{
this.mFlashView = this.mRootView.findViewById(2131231039);
this.mDefaultFlashBtn = ((Button)this.mRootView.findViewById(2131231038));
this.mCloseFlashBtn = ((Button)this.mRootView.findViewById(2131231040));
this.mOpenFlashBtn = ((Button)this.mRootView.findViewById(2131231041));
this.mFlashView.setVisibility(8);
this.mDefaultFlashBtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
switch (PhotoFragment.this.mFlashState)
{
default:
PhotoFragment.this.mFlashState = PhotoFragment.FlashState.FLASH_ON;
PhotoFragment.this.mPreView.updateFlash("flash_on");
PhotoFragment.this.mDefaultFlashBtn.setBackgroundResource(2130837563);
return;
case FLASH_ON:
PhotoFragment.this.mFlashState = PhotoFragment.FlashState.FLASH_OFF;
PhotoFragment.this.mPreView.updateFlash("flash_off");
PhotoFragment.this.mDefaultFlashBtn.setBackgroundResource(2130837562);
return;
}
PhotoFragment.this.mFlashState = PhotoFragment.FlashState.FLASH_AUTO;
PhotoFragment.this.mPreView.updateFlash("flash_auto");
PhotoFragment.this.mDefaultFlashBtn.setBackgroundResource(2130837561);
}
});
}
private void initSetting()
{
this.mSettingView = this.mRootView.findViewById(2131231043);
this.mSettingView.setVisibility(8);
this.mPhotoCount = ((TextView)this.mRootView.findViewById(2131231045));
this.mPhotoTime = ((TextView)this.mRootView.findViewById(2131231047));
this.mCountSeekBar = ((SeekBar)this.mRootView.findViewById(2131231044));
this.mCountSeekBar.setMax(15);
this.mTimeSeekBar = ((SeekBar)this.mRootView.findViewById(2131231046));
this.mTimeSeekBar.setMax(100);
int i = Integer.parseInt(this.mSharedPreferences.getString("preference_burst_mode", "1"));
float f = Float.parseFloat(this.mSharedPreferences.getString("preference_burst_interval", "0"));
this.mCountSeekBar.setProgress(i);
this.mTimeSeekBar.setProgress((int)(10.0F * f));
if (i == 1)
{
str = getResources().getString(2131296612);
this.mPhotoCount.setText(i + " " + str);
if (f / 1.0F != 1.0F) {
break label331;
}
}
label331:
for (String str = getResources().getString(2131296410);; str = getResources().getString(2131296610))
{
this.mPhotoTime.setText(f / 1.0F + " " + str);
this.mCountSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener()
{
public void onProgressChanged(SeekBar paramAnonymousSeekBar, int paramAnonymousInt, boolean paramAnonymousBoolean)
{
if (paramAnonymousInt == 1) {}
for (paramAnonymousSeekBar = PhotoFragment.this.getResources().getString(2131296612);; paramAnonymousSeekBar = PhotoFragment.this.getResources().getString(2131296613))
{
PhotoFragment.this.mPhotoCount.setText(paramAnonymousInt + " " + paramAnonymousSeekBar);
PhotoFragment.this.mSharedPreferences.edit().putString("preference_burst_mode", paramAnonymousInt).commit();
return;
}
}
public void onStartTrackingTouch(SeekBar paramAnonymousSeekBar) {}
public void onStopTrackingTouch(SeekBar paramAnonymousSeekBar) {}
});
this.mTimeSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener()
{
public void onProgressChanged(SeekBar paramAnonymousSeekBar, int paramAnonymousInt, boolean paramAnonymousBoolean)
{
if (paramAnonymousInt / 10.0F == 1.0F) {}
for (paramAnonymousSeekBar = PhotoFragment.this.getResources().getString(2131296410);; paramAnonymousSeekBar = PhotoFragment.this.getResources().getString(2131296610))
{
PhotoFragment.this.mPhotoTime.setText(paramAnonymousInt / 10.0F + " " + paramAnonymousSeekBar);
PhotoFragment.this.mSharedPreferences.edit().putString("preference_burst_interval", paramAnonymousInt / 10.0F).commit();
return;
}
}
public void onStartTrackingTouch(SeekBar paramAnonymousSeekBar) {}
public void onStopTrackingTouch(SeekBar paramAnonymousSeekBar) {}
});
this.mRootView.findViewById(2131231048).setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
PhotoFragment.this.clickedOkTextView();
}
});
return;
str = getResources().getString(2131296613);
break;
}
}
private void setAnimation()
{
AnimationSet localAnimationSet = new AnimationSet(true);
ScaleAnimation localScaleAnimation = new ScaleAnimation(3.0F, 1.5F, 3.0F, 1.5F, 1, 0.5F, 1, 0.5F);
localScaleAnimation.setDuration(500L);
AlphaAnimation localAlphaAnimation = new AlphaAnimation(1.0F, 1.0F);
localAlphaAnimation.setDuration(2000L);
localAnimationSet.addAnimation(localScaleAnimation);
localAnimationSet.addAnimation(localAlphaAnimation);
this.mIvFocus.startAnimation(localAnimationSet);
this.mIvFocus.setVisibility(4);
}
private void setDefaultIcon(String paramString)
{
if (paramString == null)
{
this.mGalleryBtn.setImageDrawable(getResources().getDrawable(2130837507));
return;
}
paramString = ThumbnailUtils.extractThumbnail(SDCardImageLoader.getInstance().compressBitmap(paramString), 55, 55);
this.mGalleryBtn.setImageBitmap(paramString);
}
public void clickedGallery()
{
Intent localIntent = new Intent("android.intent.action.PICK", null);
localIntent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
startActivityForResult(localIntent, 100);
}
public void clickedOkTextView()
{
Animation localAnimation = AnimationUtils.loadAnimation(getActivity(), 2130968596);
localAnimation.setAnimationListener(new Animation.AnimationListener()
{
public void onAnimationEnd(Animation paramAnonymousAnimation)
{
PhotoFragment.this.mSettingView.setVisibility(8);
}
public void onAnimationRepeat(Animation paramAnonymousAnimation) {}
public void onAnimationStart(Animation paramAnonymousAnimation) {}
});
this.mSettingView.startAnimation(localAnimation);
}
public void clickedSetting()
{
if (this.mSettingView.getVisibility() == 8)
{
Animation localAnimation = AnimationUtils.loadAnimation(getActivity(), 2130968595);
localAnimation.setAnimationListener(new Animation.AnimationListener()
{
public void onAnimationEnd(Animation paramAnonymousAnimation)
{
PhotoFragment.this.mSettingView.setVisibility(0);
}
public void onAnimationRepeat(Animation paramAnonymousAnimation) {}
public void onAnimationStart(Animation paramAnonymousAnimation) {}
});
this.mSettingView.startAnimation(localAnimation);
this.mSettingView.setVisibility(0);
}
}
public void clickedSwitchCamera()
{
this.mPreView.switchCamera();
}
public void clickedTakePhoto()
{
if (this.mPreView != null) {
this.mPreView.takePicturePressed();
}
}
public void initView()
{
ScreenUtils.initScreen(getActivity());
this.mPreView = ((CameraPreView)this.mRootView.findViewById(2131231032));
ViewGroup.LayoutParams localLayoutParams = this.mPreView.getLayoutParams();
Point localPoint = DisplayUtil.getScreenMetrics(getActivity());
this.mIvFocus = ((ImageView)this.mRootView.findViewById(2131231033));
localLayoutParams.width = localPoint.x;
localLayoutParams.height = localPoint.y;
this.mPreView.setLayoutParams(localLayoutParams);
this.mTakePhotoBtn = ((Button)this.mRootView.findViewById(2131231036));
this.mTakePhotoBtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
if (PhotoFragment.this != null) {
PhotoFragment.this.clickedTakePhoto();
}
}
});
this.mGalleryBtn = ((ImageView)this.mRootView.findViewById(2131231037));
this.mGalleryBtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
PhotoFragment.this.getActivity().startActivity(new Intent(PhotoFragment.this.getActivity(), ImageDetailsActivity.class));
}
});
this.mRootView.findViewById(2131231042).setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
PhotoFragment.this.clickedSwitchCamera();
}
});
new Handler().postDelayed(new Runnable()
{
public void run()
{
PhotoFragment.this.mPhotoCloseBtn.setVisibility(0);
PhotoFragment.this.mRootView.findViewById(2131231037).setVisibility(0);
}
}, 1000L);
this.mPhotoCloseBtn = ((Button)this.mRootView.findViewById(2131231035));
this.mPhotoCloseBtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramAnonymousView)
{
if ((CameraInterface.getInstance().isTakingPhoto()) || (System.currentTimeMillis() - PhotoFragment.this.mReceiveCmdTime < 1200L)) {
return;
}
PhotoFragment.this.onBackKeyDown();
}
});
initFlashControl();
setAnimation();
this.mPreView.setOnTouchListener(this);
}
public void onActivityCreated(Bundle paramBundle)
{
super.onActivityCreated(paramBundle);
getActivity().getWindow().addFlags(128);
}
public void onBackKeyDown()
{
if ((this.mode == 3) && (this.mCore.isDeviceConnected()))
{
if (!this.mCore.write(AppControlCmd.getInstance().getCameraCmd((byte)1)))
{
this.mode = 1;
this.mCore.writeForce(AppControlCmd.getInstance().getCameraCmd((byte)1));
return;
}
this.mode = 1;
return;
}
getActivity().finish();
}
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
if (this.mRootView != null)
{
paramLayoutInflater = (ViewGroup)this.mRootView.getParent();
if (paramLayoutInflater != null) {
paramLayoutInflater.removeView(this.mRootView);
}
}
for (;;)
{
paramLayoutInflater = new IntentFilter("com.guodoo.multi.takepicture_receiver");
getActivity().registerReceiver(this.takePictureReceiver, paramLayoutInflater);
return this.mRootView;
this.mRootView = paramLayoutInflater.inflate(2130903104, paramViewGroup, false);
this.mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
initView();
initBle();
}
}
public void onDestroy()
{
super.onDestroy();
getActivity().unregisterReceiver(this.takePictureReceiver);
this.mCore.removeListener(this.mAppListener);
}
public void onPause()
{
this.mPreView.onPause();
CameraInterface.getInstance().doStopCamera();
super.onPause();
}
public void onResume()
{
List localList = Images.getImages();
if ((localList == null) || (localList.size() <= 0)) {
this.mGalleryBtn.setImageDrawable(getResources().getDrawable(2130837507));
}
for (;;)
{
this.mPreView.cameraHasOpened();
this.mHandler.postDelayed(new Runnable()
{
public void run()
{
PhotoFragment.this.mPreView.onResume();
}
}, 1000L);
super.onResume();
return;
setDefaultIcon((String)localList.get(0));
}
}
public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
{
switch (paramMotionEvent.getAction())
{
default:
return false;
}
float f2 = paramMotionEvent.getX();
float f3 = paramMotionEvent.getY();
int i = View.MeasureSpec.makeMeasureSpec(0, 0);
int j = View.MeasureSpec.makeMeasureSpec(0, 0);
this.mIvFocus.measure(i, j);
int k = this.mIvFocus.getHeight();
int m = this.mIvFocus.getWidth();
float f1 = f2;
if (f2 < m / 2) {
f1 = m / 2;
}
f2 = f1;
if (f1 > DisplayUtil.getScreenMetrics(getActivity()).x - m / 2) {
f2 = DisplayUtil.getScreenMetrics(getActivity()).x - m / 2;
}
f1 = f3;
if (f3 < k / 2) {
f1 = k / 2;
}
f3 = f1;
if (f1 > DisplayUtil.getScreenMetrics(getActivity()).y - k / 2) {
f3 = DisplayUtil.getScreenMetrics(getActivity()).y - k / 2;
}
i = (int)(f2 - m / 2);
j = (int)(f3 - k / 2);
m = (int)(m / 2 + f2);
k = (int)(k / 2 + f3);
this.mIvFocus.layout(i, j, m, k);
setAnimation();
return false;
}
static enum FlashState
{
FLASH_AUTO, FLASH_OFF, FLASH_ON;
}
}
/* Location: C:\Users\julian\Downloads\Veryfit 2 0_vV2.0.28_apkpure.com-dex2jar.jar!\com\veryfit\multi\camera\PhotoFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
] | |
058dd8d928bddf322827dab0f475427b94ceea87 | bf8810f9aa14c4986589d428129e042098e3d069 | /InterviewBit/Programming/Arrays/MinStepsInInfiniteGrid.java | efccde4adf70638aebcb5ffc6897563879b6027b | [] | no_license | shubhiroy/UCA | ecbed1675dc04d17f649e71ad4520cb453b6bc45 | cd61dd9afcdf60815ae4e69fdfd8e9f547f6ad45 | refs/heads/master | 2020-04-12T03:52:20.769081 | 2019-01-24T13:08:49 | 2019-01-24T13:08:49 | 162,280,448 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | public class Solution {
public int coverPoints(ArrayList<Integer> A, ArrayList<Integer> B) {
int steps=0;
for(int i=1;i<A.size();i++){
int a=java.lang.Math.abs(A.get(i)-A.get(i-1));
int b=java.lang.Math.abs(B.get(i)-B.get(i-1));
steps+=java.lang.Math.max(a,b);
}
return steps;
}
}
| [
"[email protected]"
] | |
37e40f1f543f510e4a8376a056d78860bd453df1 | a4f8491a95fd9fa708ef1280e523af83fb84d2a0 | /Java Fundamentals/JavaFundMapsLambdaAndStreamApi/Orders.java | f45aaf712f58f56f2a122d7b516203da3101d939 | [] | no_license | Zlatimir/SOFTUNI | 2dd3b685a79bd537b85fab3d2325586c366673d8 | 4b8e4b6089cc76324c0165682517e8c719b86db7 | refs/heads/main | 2023-06-26T15:20:01.202562 | 2021-07-25T11:54:08 | 2021-07-25T11:54:08 | 318,970,713 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,334 | java | package JavaFundMapsLambdaAndStreamApi;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;
/**
* Created by Zlatimir Ivanov on 12.11.2020 г..
*/
public class Orders {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Map<String, Double> productPrice = new LinkedHashMap<>();
Map<String, Integer> productCount = new LinkedHashMap<>();
Map<String, Double> totalPrice = new LinkedHashMap<>();
String input = sc.nextLine();
while (!input.equals("buy")) {
String[] data = input.split(" ");
String product = data[0];
double price = Double.parseDouble(data[1]);
int count = Integer.parseInt(data[2]);
productPrice.put(product, price);
if (productCount.get(product) == null) {
productCount.put(product, count);
} else {
productCount.put(product, count + productCount.get(product));
}
totalPrice.put(product, productPrice.get(product) * productCount.get(product));
input = sc.nextLine();
}
for (Map.Entry<String, Double> entry : totalPrice.entrySet()) {
System.out.printf("%s -> %.2f%n", entry.getKey(), entry.getValue());
}
}
}
| [
"[email protected]"
] | |
1ac65a73f1e673a0813397bfb3bd29451bdba239 | cf0f8f9b8c7f0eeef62b81ff1f4c883a7905e8a1 | /src/com/kaylerrenslow/armaDialogCreator/control/DefaultValueProvider.java | 4f8ed3b45d97bc8bd354f68e7ac67eee2327f368 | [
"MIT"
] | permissive | pikaxo/arma-dialog-creator | 5fc21f06110501e24b8ac55f51c74202c8b97e05 | 5ff118a0661c7878a44ebe20ad35fb9594b083ad | refs/heads/master | 2020-03-28T19:54:42.052608 | 2017-06-17T05:03:30 | 2017-06-17T05:03:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 958 | java | package com.kaylerrenslow.armaDialogCreator.control;
import com.kaylerrenslow.armaDialogCreator.control.sv.SerializableValue;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
/**
Get {@link SerializableValue} instances from storage or create them dynamically.
@author Kayler
@since 11/22/2016 */
public interface DefaultValueProvider {
/**
Get a default value for the given property lookup
@param lookup lookup
*/
@Nullable SerializableValue getDefaultValue(@NotNull ControlPropertyLookupConstant lookup);
/**
Tells the provider that the given properties will be needed for a series of {@link #getDefaultValue(ControlPropertyLookupConstant)} calls. This will not be called before
{@link #getDefaultValue(ControlPropertyLookupConstant)}
@param tofetch list to fetch that are being requested.
*/
void prefetchValues(@NotNull List<ControlPropertyLookupConstant> tofetch);
}
| [
"[email protected]"
] | |
2bed3dfc7c8687cdbf7f36c2cc730de9811af06d | 915cdea11a14572a89bf424d76eeb287d6c5c665 | /tools/src/main/java/com/zccl/ruiqianqi/tools/StringUtils.java | c068991e72835d2ee26b72967540caf80163dafa | [] | no_license | panyzyw/lock_screen | 5397d06ba1828a94e6b49322115010f969613464 | b5a41a807a70b7f9f3b8cba113603e7ee98b18f2 | refs/heads/master | 2021-07-01T10:12:16.591172 | 2017-09-15T08:22:11 | 2017-09-15T08:22:11 | 103,632,592 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,852 | java | package com.zccl.ruiqianqi.tools;
import android.text.TextUtils;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
public class StringUtils {
/**
* 检查字符串是否为空
* @param str
* @return
*/
public static boolean isEmpty(String str){
if(TextUtils.isEmpty(str)){
return true;
}else{
str = str.trim();
if(str.length()==0){
return true;
}
}
return false;
}
/**
* 截取字符串
* @param str
* @param length
* @return
*/
public static String substring(String str, int length){
if (isEmpty(str)) {
return null;
}
if (length<=0 || str.length()<=length) {
return str;
}
return str.substring(0, length);
}
/**
* 按照指定的格式,输出对象字符串化的对象
*
* 占位符可以使用0和#两种,当使用0的时候会严格按照样式来进行匹配,不够的时候会补0,
* 而使用#时会将前后的0进行忽略
* @param format 0000 ###
* @param obj
* @return
*/
public static String obj2FormatStr(String format, Object obj){
try {
DecimalFormat df = new DecimalFormat(format);
return df.format(obj);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 保留小数点后一位
* @param value
* @return
*/
public static String pointOne(float value) {
DecimalFormat df = new DecimalFormat("#.0");
return df.format(value);
}
/**
* 保留小数点后两位
* @param value
* @return
*/
public static String pointTwo(float value) {
return String.format("%.2f", value);
}
/**
* 1、转换符
* %s: 字符串类型,如:"ljq"
* %b: 布尔类型,如:true
* %d: 整数类型(十进制),如:99
* %f: 浮点类型,如:99.99
* %%: 百分比类型,如:%
* %n: 换行符
*
* 2、常见日期时间格式化
* tc: 包括全部日期和时间信息 星期六 十月 27 14:21:20 CST 2007
* tF: "年-月-日"格式,如:2007-10-27
* tD: "月/日/年"格式,如:10/27/07
* tr: "HH:MM:SS PM"格式(12时制),如:02:25:51 下午
* tT: "HH:MM:SS"格式(24时制),如:14:28:16
* tR: "HH:MM"格式(24时制),如:14:28
*
* 3、格式化日期字符串
* b或者h: 月份简称,如
* 中:十月
* 英:Oct
*
* B: 月份全称,如
* 中:十月
* 英:October
*
* a: 星期的简称,如
* 中:星期六
* 英:Sat
*
* A: 星期的全称,如:
* 中:星期六
* 英:Saturday
*
* C: 年的前两位数字(不足两位前面补0),如:20
* y: 年的后两位数字(不足两位前面补0),如:07
* Y: 4位数字的年份(不足4位前面补0),如:2007
* j: 一年中的天数(即年的第几天),如:300
* m: 两位数字的月份(不足两位前面补0),如:10
* d: 两位数字的日(不足两位前面补0),如:27
* e: 月份的日(前面不补0),如:5
*
* 4、格式化时间字符串
* H: 2位数字24时制的小时(不足2位前面补0),如:15
* I: 2位数字12时制的小时(不足2位前面补0),如:03
* k: 2位数字24时制的小时(前面不补0),如:15
* l: 2位数字12时制的小时(前面不补0),如:3
* M: 2位数字的分钟(不足2位前面补0),如:03
* S: 2位数字的秒(不足2位前面补0),如:09
* L: 3位数字的毫秒(不足3位前面补0),如:015
* N: 9位数字的毫秒数(不足9位前面补0),如:562000000
*
* p: 小写字母的上午或下午标记,如:
* 中:下午
* 英:pm
*
* z: 相对于GMT的RFC822时区的偏移量,如:+0800
* Z: 时区缩写字符串,如:CST
* s: 1970-1-1 00:00:00 到现在所经过的秒数,如:1193468128
* Q: 1970-1-1 00:00:00 到现在所经过的毫秒数,如:1193468128984
* @return
*/
public static String formatTime(){
// tF: "年-月-日"格式,如:2007-10-27
return String.format("%tF", new Date());
}
/**
* 时长格式化显示
*/
public static String generateTime(long time) {
int totalSeconds = (int) (time / 1000);
int seconds = totalSeconds % 60;
int minutes = totalSeconds / 60;
return minutes > 99 ? String.format("%d:%02d", minutes, seconds) : String.format("%02d:%02d", minutes, seconds);
}
/**
* 获取系统当前时间
*
SimpleDateFormat函数语法:
G 年代标志符
y 年
M 月
d 日
h 时 在上午或下午 (1~12)
H 时 在一天中 (0~23)
m 分
s 秒
S 毫秒
E 星期
D 一年中的第几天
F 一月中第几个星期几
w 一年中第几个星期
W 一月中第几个星期
a 上午 / 下午 标记符
k 时 在一天中 (1~24)
K 时 在上午或下午 (0~11)
z 时区
*/
public static String getDate() {
Calendar ca = Calendar.getInstance();
DateFormat matter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS", Locale.getDefault());
//ca.getTime().toLocaleString();
return matter.format(ca.getTime());
}
/**
* 取开年时间戳【设置成一月】
* @return
*/
public static long getYearBeginTime(){
Calendar ca = Calendar.getInstance();
ca.set(Calendar.MONTH, Calendar.JANUARY);
return ca.getTimeInMillis();
}
/**
* 取开月时间戳【设置成当月】
* @return
*/
public static long getMonthBeginTime(){
Calendar ca = Calendar.getInstance();
ca.set(Calendar.MONTH, ca.get(Calendar.MONTH));
return ca.getTimeInMillis();
}
/**
* 得到可订票日期
* @return
*/
public static String getOrderTime(){
DateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
long myTime = (date.getTime() / 1000) + 19 * 24 * 60 * 60;
date.setTime(myTime * 1000);
String datestring = format2.format(date);
return datestring;
}
}
| [
"[email protected]"
] | |
89c9ae5002ad5c695b523fd44c20bcb499914c59 | 93a8286c08349169ed6491fa01f838a5fe11de3e | /src/main/java/ucbl/ptm/projet/servlets/AdministrationRubrique.java | 19cf25215ac5efe64d64d2af74a95f012a073d49 | [] | no_license | nRudzy/Pandor | 79072693e753cd17a184a896151795e1e85dcc58 | 864c6e2b08e01d30c68d2cbeb557ab0f989e097e | refs/heads/master | 2022-04-02T23:54:24.287389 | 2020-02-02T21:44:49 | 2020-02-02T21:44:49 | 237,841,447 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,173 | java | package ucbl.ptm.projet.servlets;
import ucbl.ptm.projet.metier.Pandor;
import ucbl.ptm.projet.modele.Rubrique;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
@WebServlet(name = "AdministrationRubrique", urlPatterns = "/AdministrationRubrique")
public class AdministrationRubrique extends HttpServlet {
private static final Logger LOGGER = Logger.getLogger(AdministrationRubrique.class.getName());
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e){
LOGGER.log(Level.INFO, e.getMessage(), e);
}
Pandor pandor = (Pandor) request.getServletContext().getAttribute("pandor");
int idRubrique = 0;
try {
idRubrique = Integer.parseInt(request.getParameter("rubriqueId"));
} catch (NumberFormatException e) {
try {
response.sendRedirect(request.getContextPath() + "/Accueil");
} catch(IOException ex) {
LOGGER.log(Level.INFO, ex.getMessage(), ex);
}
}
request.setCharacterEncoding("UTF-8");
if(request.getParameter("action") != null && request.getParameter("rubriqueId") != null) {
Rubrique rubrique = pandor.getRubrique(idRubrique);
String nomRubriqueEnCours = rubrique.getNom();
String action = request.getParameter("action");
switch (action) {
case "modifierNomRubrique" :
String nouveauNom = request.getParameter("modifierNomRubrique");
pandor.modifierNomRubrique(
pandor.getRubriqueByName(nomRubriqueEnCours), nouveauNom);
break;
case "modifierPresentationRubrique" :
String nouvellePresentation = request.getParameter("modifierPresentationRubrique");
pandor.modifierPresentationRubrique(
pandor.getRubriqueByName(nomRubriqueEnCours), nouvellePresentation);
break;
default:
break;
}
}
try {
request.getRequestDispatcher("WEB-INF/jsp/adminRubric.jsp").forward(request, response);
} catch(IOException | ServletException e) {
LOGGER.log(Level.INFO, e.getMessage(), e);
}
}
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
request.getRequestDispatcher("WEB-INF/jsp/adminRubric.jsp").forward(request, response);
} catch(IOException | ServletException e) {
LOGGER.log(Level.INFO, e.getMessage(), e);
}
}
}
| [
"[email protected]"
] | |
9b772122fd1d9c3ce3947fd7d5f71f0faf5140be | 50587d0e85e68f9bbc9ce82e407bab21775d165e | /myshoes/src/myshoes/domain/Notice.java | e67295fad63e5bc63c30c7abe82fcf099c2ad1d4 | [] | no_license | Lizhiming001/-javaweb | 388afd8959a0661ff7a0e19af42c794c2a970fc2 | 0c5df7e19fa36251be59697986af01f90715b2e5 | refs/heads/master | 2020-11-24T06:42:30.693213 | 2019-12-14T12:39:39 | 2019-12-14T12:39:39 | 228,013,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package myshoes.domain;
public class Notice {
private int n_id;
private String title;
private String details;
private String n_time;
public String getN_time() {
return n_time;
}
public void setN_time(String n_time) {
this.n_time = n_time;
}
public int getN_id() {
return n_id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public void setN_id(int n_id) {
this.n_id = n_id;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
}
| [
"[email protected]"
] | |
898944884e972b5a87844fd858def503fbe5aff0 | c4215f53c1ab80b7076539d54495282557d5ab65 | /test/app/src/main/java/com/example/test/MainActivity.java | db2d6f4fd9bf8fca5ff44875a22c799bb364a94f | [] | no_license | macaroni-chan/galileo_pracical_exam | ed446c4247d6b6ed7eab759178b3c80352e9e627 | 8b1bc6d143ff481bfdad52432713f3b3d269f5d2 | refs/heads/master | 2023-07-12T04:20:53.932018 | 2021-08-12T13:45:32 | 2021-08-12T13:45:32 | 393,842,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,302 | java | package com.example.test;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class MainActivity extends AppCompatActivity {
Button btn_search;
Button btn_country_list;
EditText et_key_word;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn_search = findViewById(R.id.btn_search);
btn_country_list = findViewById(R.id.btn_clist);
et_key_word = findViewById(R.id.edit_text_search);
btn_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String item_search = et_key_word.getText().toString();
if(item_search.isEmpty()){
alert();
}else{
Intent nav = new Intent(getApplicationContext(), country_search_deets.class);
nav.putExtra("key", item_search);
startActivity(nav);
finish();
}
}
});
btn_country_list.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent nav = new Intent(getApplicationContext(), country_holder.class);
startActivity(nav);
finish();
}
});
}
private void alert() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Search bar is empty.")
.setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//no events
}
});
AlertDialog alert = builder.create();
alert.show();
}
@Override
public void onBackPressed() {
System.exit(0);
}
} | [
"[email protected]"
] | |
608c0301af67e433b1d1236ffe83074f49990a44 | 124ef1ae7df716e6b0fb8d32e0b148e164dc19df | /src/binarysearchtree/BinaryTree.java | 4781f9db377475873aea0cb2eb498f2cf7763a5d | [] | no_license | nethma20/Binary-Search-Tree | 6b4b8a14cdad0156dad7401bb246c6cf0eee52d0 | ff32f46c984ade7d4552508b738e45dc63c839d5 | refs/heads/main | 2023-06-15T20:26:32.588746 | 2021-07-19T13:10:19 | 2021-07-19T13:10:19 | 387,467,998 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 288 | 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 binarysearchtree;
/**
*
* @author Senuda
*/
public class BinaryTree {
}
| [
"[email protected]"
] | |
c070a0387833630eb902658dbec14af3dafa3abc | e04af49094db9f5b18f7900a6e6841996f22b0bd | /app/src/main/java/com/xavier/financasdroid/ui/tools/ToolsFragment.java | 7fa271ce6d888801afee5a9f4a84984a2e870878 | [
"MIT"
] | permissive | fxavier/financasdroid | 0548bca5a5a48921023203dff1f6315cc5c43c57 | d8934253f37c044c0ff77bad71b4d895e77e1011 | refs/heads/master | 2020-09-16T13:26:28.095809 | 2019-11-24T17:35:47 | 2019-11-24T17:35:47 | 223,732,858 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,148 | java | package com.xavier.financasdroid.ui.tools;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import com.xavier.financasdroid.R;
public class ToolsFragment extends Fragment {
private ToolsViewModel toolsViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
toolsViewModel =
ViewModelProviders.of(this).get(ToolsViewModel.class);
View root = inflater.inflate(R.layout.fragment_tools, container, false);
final TextView textView = root.findViewById(R.id.text_tools);
toolsViewModel.getText().observe(this, new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
} | [
"[email protected]"
] | |
3d3f8a5f98c01158b66939fbb79aaabab0bdbb42 | a137224d471c5586e3200a8badd736715cb826a6 | /Universal-Space-Operations-Center/src/main/java/com/ksatstuttgart/usoc/data/SerialEvent.java | 6c83494b641f79726e31d184684fce4c42c07fb0 | [
"MIT"
] | permissive | Gyanesha/Universal-Space-Operations-Center | 49bd2cf87da424eeb59fb18d04a42a8fc032d405 | 36a3a51395aadcbfc02ed9175ec7ed9074381cef | refs/heads/master | 2021-01-25T14:10:45.299711 | 2018-02-28T22:24:56 | 2018-02-28T22:24:56 | 123,663,441 | 0 | 1 | MIT | 2018-10-26T19:33:02 | 2018-03-03T05:43:05 | Java | UTF-8 | Java | false | false | 2,142 | java | /*
* The MIT License
*
* Copyright 2017 KSat e.V.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.ksatstuttgart.usoc.data;
/**
*
* @author valentinstarlinger
*/
public class SerialEvent extends USOCEvent{
private String msg;
private String port;
private long timeStamp;
public SerialEvent(String msg, String port, long timeStamp, DataSource dataSource){
super(dataSource);
this.msg = msg;
this.port = port;
}
public long getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(long timeStamp) {
this.timeStamp = timeStamp;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
@Override
public DataSource getDataSource() {
return this.dataSource;
}
@Override
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
}
| [
"[email protected]"
] | |
2a80948732db9c9e7f69a1106f26f28852f1f19a | ceb27b4a8c0787f5717187567807fbe0c4781614 | /src/main/java/com/example/northwind/dataAccess/concretes/OrderDetailRepository.java | 28072f1676f53590e7464213519f88f399e41793 | [] | no_license | fatmanursaritemur/FinalProject-T | c60053a8397ac343b44cfce886d81b2ec60e2fee | 21a4b5824a07ba81dd2cbd61735ea244f9517511 | refs/heads/master | 2023-03-04T17:16:20.645673 | 2021-02-17T17:45:45 | 2021-02-17T17:45:45 | 339,807,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 422 | java | package com.example.northwind.dataAccess.concretes;
import com.example.northwind.entities.concretes.OrderDetail;
import com.example.northwind.entities.concretes.OrderDetailIdentity;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
public interface OrderDetailRepository extends JpaRepository<OrderDetail, OrderDetailIdentity> {
List<OrderDetail> findAllByIdOrderId(int orderId);
}
| [
"[email protected]"
] | |
b1373318b7fbefb70a4cccc20f52a9ce1354e6ed | bc68d36ad98e62217d2dcf45ff25e0157a3058e8 | /src/main/java/com/example/demo/service/impl/UserServiceMybatisImpl.java | 2bfe4791ef562d431fb175f6a18b1e38ea8cf298 | [] | no_license | 15803058931/Demo1 | cd06cc7679214b4afc918164c0259f723dc03922 | a993d2454851ea36dccbd504dfc496d5c00e2e97 | refs/heads/master | 2020-04-12T04:13:20.111893 | 2018-12-19T04:30:07 | 2018-12-19T04:30:07 | 162,288,792 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,849 | java | package com.example.demo.service.impl;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.example.demo.mapper.UserMapper;
import com.example.demo.pojo.User;
import com.example.demo.service.UserService;
//@Service("userService")
public class UserServiceMybatisImpl implements UserService{
private static final Logger log = LoggerFactory.getLogger(UserServiceMybatisImpl.class);
@Autowired
UserMapper userMapper;
@Override
public User getUser(Long id) {
// TODO Auto-generated method stub
log.info("Mybatis.getUser");
return userMapper.getUserById(id);
}
@Override
public List<User> getUserByAddress(String address) {
// TODO Auto-generated method stub
return null;
}
@Override
public int countByAge(int age) {
// TODO Auto-generated method stub
return 0;
}
@Override
public User saveUser(User user) {
// TODO Auto-generated method stub
return null;
}
@Override
public User updateUser(User user) {
// TODO Auto-generated method stub
return null;
}
@Override
public void transactionDemo(User user) {
// TODO Auto-generated method stub
}
@Override
public void deleteById(Long id) {
// TODO Auto-generated method stub
}
@Override
public Page<User> pageByNameDemo(String name, Pageable page) {
// TODO Auto-generated method stub
return null;
}
@Override
public Page<User> getAll(Pageable page) {
// TODO Auto-generated method stub
return null;
}
@Override
public int test(int i) {
// TODO Auto-generated method stub
return 0;
}
}
| [
"[email protected]"
] | |
6219dda65fc10ef34aeb3021e5e19ba440f32a99 | 3fe65965fb5b5f4320aa0a1bb8bc57bfddef5bef | /src/cn/it/web/UI/RoomALLUIServlet.java | 57a27aa642240cde57079d441cb83f77643e21e0 | [] | no_license | hewq/IntelligentClassroom | 44e3b8f3b88d95ed3834761d1524a77a089fa455 | c9f3310b9a15cd1a735907cccf54a94f30cab03c | refs/heads/master | 2021-01-21T14:00:58.194584 | 2016-05-28T13:54:28 | 2016-05-28T13:54:28 | 46,710,866 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package cn.it.web.UI;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class RoomALLUIServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.getRequestDispatcher("/WEB-INF/jsp/room.jsp").forward(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
}
| [
"[email protected]"
] | |
e87d73013cbc177186aadf533d38d13efa736e53 | 3fb146c5241afa403e0d75b83f1c6129eee60ac6 | /src/com/tencent/xinge/unittest/XingeAppUnitTest.java | 4149c17845bb060b7158392d4cd33ec170094e47 | [] | no_license | lyon-y/XgPushJavaSDK | 5f3fdc1f27b3876f0478c196bcfc296cb574ce19 | 7c25d49822504be079f26c0264756565f957fb00 | refs/heads/master | 2021-05-02T16:51:14.788197 | 2016-11-01T02:20:51 | 2016-11-01T02:20:51 | 72,496,043 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 980 | java | package com.tencent.xinge.unittest;
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
import org.junit.Test;
import com.tencent.xinge.XingeApp;
public class XingeAppUnitTest extends XingeApp {
public XingeAppUnitTest()
{
super(353, "353_secret_key");
}
@Test
public void testCallRestful() {
XingeAppUnitTest xgt = new XingeAppUnitTest();
Map<String, Object> params = new HashMap<String, Object>();
params.put("key1", 2);
JSONObject json = xgt.callRestful("http://10.1.152.139/v1/push/single_device", params);
assertEquals("{\"err_msg\":\"common param error!\",\"ret_code\":-1}", json.toString());
json = xgt.callRestful("http://10.1.152.139/v1/push/single_", params);
assertEquals("{\"err_msg\":\"call restful error\",\"ret_code\":-1}", json.toString());
json = xgt.callRestful("abc", params);
assertEquals("{\"err_msg\":\"generateSign error\",\"ret_code\":-1}", json.toString());
}
}
| [
"[email protected]"
] | |
5630e3d1411fe8fcd9ade3f12976eccd42ba1afb | ae0768a5a0c0d23f71ea8e84dd2b70131131889e | /Tic Tac Toe/src/Game.java | d5ccbf4a1464a8ec35f6f34ac11d7e6a0022b628 | [] | no_license | michelc1/TicTacToe | 928d312916879e0bd79c45d48d693df542610bb6 | 76c929c249d865426b4c8a302bf77f2e0cf29a09 | refs/heads/master | 2020-05-29T11:19:10.507994 | 2014-12-09T23:44:38 | 2014-12-09T23:44:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,723 | java | import java.awt.Color;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
public class Game {
private char[] templateOfBoard; // our board, TicTacToe field, static
private char userTurn; // users turn , only one letter, tracks whether it is a X or O
private int count; // keeps track of user moves
final JFrame frame; // our JFrame
// constructor
// want to initialize the variable
// here we are stating the board size
// userTurn starts off at X
public Game(final JFrame frame) throws BoardErrorException{ // Game takes in the JFrame
this.frame = frame;
count = 0; // number of turns starts at 0;
userTurn = 'X'; // first turn will always be X
templateOfBoard = new char[GUI.sizeOfBoard]; // size of the board we are going to make it
try{
for(int spaces=0; spaces<GUI.sizeOfBoard; spaces++){ // size of Board is in the GUI class
templateOfBoard[spaces] = ' '; // the board is being created, looping through all rows and col
//every index of the board not has a char value equal to a space
//determine if everything came out correctly
//should equal of a total of 9
// 3x3
}
System.out.println("Board template created"); // means the board now has all spaces
}
catch(Exception e){
System.out.println("Could not initalize the board to empty char");
e.printStackTrace();
}
}
public Game userMove(int moveMade) throws UserMoveErrorExcepion {
templateOfBoard[moveMade] = userTurn;
// index of the board, or in simpler terms, where the user
// inserts there turn i.e X or O, 0-8
//System.out.println(userMove);
//boolean statement to determine the turns
// So user X starts first
//if the turn is X, the nextTurn is now O,
if(userTurn == 'X'){
userTurn = 'O';
//System.out.println("User Turn " +userTurn);
}
else {
userTurn = 'X';
//System.out.println("User Turn " +userTurn);
}
count++;
//System.out.println(count);
// System.out.print("Switch made" + count);
// System.out.println(userTurn);
return this; // going to return the userTurn
// issue actually entering the userTurn is not giving right value, but using 'this' does
}
// for some odd reason the toString is causing some issues, keep getting @hash code
//saw online to override it like this
// will make the board out of emepty strings
// going to return a string representation of an object
public String toString(){
return new String(templateOfBoard);
}
public void mouseListener(ActionEvent e, int moveMade) throws ButtonsNotMadeException,ButtonCanNotBeClickedException, WinnerErrorException{
// mouse click events
// what happens after a button is clicked
//clickButton[i].setText("X")
if(templateOfBoard[moveMade] == ' '){ // the user can only space a click, so an letter on the field if it is empty
((JButton)e.getSource()).setText(Character.toString(userTurn)); // when the button is clicked, we want an X placed there
if (userTurn == 'X'){
UIManager.getDefaults().put("Button.disabledText",Color.RED); // when the but gets disabled the test will turn red
}
else{
UIManager.getDefaults().put("Button.disabledText",Color.BLUE);
}
//calling the method userTurn to determine who goes next
//problem is that is expects a String
//going to override the toString method
try {
userMove(moveMade); // calling userMove in moveMade, moveMade is the index at which the user put either an X or a O
winner(); // we want to check each time to ensure there was/was not a winner
} catch (UserMoveErrorExcepion | WinnerErrorException | BoardErrorException | ButtonsNotMadeException | ButtonCanNotBeClickedException e1) {
e1.printStackTrace();
}
}
}
public Game winner() throws WinnerErrorException, BoardErrorException, ButtonsNotMadeException, ButtonCanNotBeClickedException { // determines who is the winner
//testing purposes to get the values , X or O
//templateOfBoard[0] = 'O';
//templateOfBoard[4] = 'O';
//templateOfBoard[8] = 'O';
//list below defines all the possible win combinations
// the index of where a X or O can be place
// placed the locations to a int value
int win1 = templateOfBoard[0] + templateOfBoard[1] + templateOfBoard[2];
int win2 = templateOfBoard[3] + templateOfBoard[4] + templateOfBoard[5];
int win3 = templateOfBoard[6] + templateOfBoard[7] + templateOfBoard[8];
int win4 = templateOfBoard[0] + templateOfBoard[3] + templateOfBoard[6];
int win5 = templateOfBoard[1] + templateOfBoard[4] + templateOfBoard[7];
int win6 = templateOfBoard[2] + templateOfBoard[5] + templateOfBoard[8];
int win7 = templateOfBoard[0] + templateOfBoard[4] + templateOfBoard[8];
int win8 = templateOfBoard[2] + templateOfBoard[4] + templateOfBoard[6];
//System.out.println("count = " + count); // testing
//System.out.println("vaules at win7 = " + win7 + " is a win when 264 or 237"); testing
int[] win = new int[]{win1,win2,win3,win4,win5,win6,win7,win8};
// making a array to go through all the possibile wins
//possible total of wins is 8
for(int i = 0;i<win.length;i++){
// looping through the win possibilities
//System.out.println(win.length); testing
//System.out.println(win[i] + " " + (i+1)); testing
if(win[i] == 264){ // if one of the the combinations equal 'X','X','X' which equals 264, then there is a winner
System.out.println("X is the winner!!!");
System.out.println("Game Over!");
//System.exit(0);
try {
gameOver("X is the Winner");
} catch (CouldNotPlayAgainException | NoCancelOption e) {
e.printStackTrace();
}
//System.out.print("X Hello " + "win " + (i+1) + " value = " + win[i]); testing
return this; // if statement is true, it will return this(gameOver)
}
else if(win[i] == 237 ){ // if one of the the combinations equal 'O','O','O' which equals 234, then there is a winner
System.out.println("O is the winner!!!");
System.out.println("Game Over!");
//System.out.println(templateOfBoard[0]+templateOfBoard[1]+templateOfBoard[2]);
try {
gameOver("O is the Winner");
} catch (CouldNotPlayAgainException | NoCancelOption e) {
e.printStackTrace();
} // if statement is true, it will return this(gameOver)
//System.out.print("O Hello1");
return this;
}
}
//
if (count == 9) {
// if none of the statements above are true, it automatically comes done to here
//so if there is nine moves and no win, it is a draw
try {
gameOver("Draw");
} catch (CouldNotPlayAgainException | NoCancelOption e) {
e.printStackTrace();
}
}
return this;
// going to return this method ;
}
private void gameOver(String message) throws BoardErrorException, ButtonsNotMadeException, ButtonCanNotBeClickedException,
WinnerErrorException, CouldNotPlayAgainException,NoCancelOption{
JOptionPane.showMessageDialog(null, message, "Game Over", JOptionPane.YES_NO_OPTION); // gives a popup window at the end of the game
int playAgain = JOptionPane.showConfirmDialog(null, "Do you want to play another game?",
"Play Again", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
//going to ask user if he wants to play agin, while still seeing the board
if (playAgain == JOptionPane.OK_OPTION) {
frame.dispose(); // going to dispose of our frame// if user hit ok
GUI.playAgain(); // play the game again
}
if(playAgain == JOptionPane.CANCEL_OPTION){
secondPlayAgin(); // give user second chance
}
}
private void secondPlayAgin() throws CouldNotPlayAgainException,NoCancelOption {
int secondChoice = JOptionPane.showConfirmDialog(null, "PLEASE PLAY ME AGAIN",
"Play Again", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (secondChoice == JOptionPane.OK_OPTION) {
frame.dispose(); // going to dispose of our frame// if user hit ok
GUI.playAgain();
}
else if(secondChoice == JOptionPane.CANCEL_OPTION){
JOptionPane.showMessageDialog(null, "You are entering View Mode Only", "View Only Mode", JOptionPane.YES_NO_OPTION);
//disabling all JButton until new game is started
try{
for(int i=0;i<9;i++){
GUI.clickButton[i].setEnabled(false);
//System.out.println("Buttons Disabled");
}
System.out.println("VIEW MODE ONLY");
}
catch(Exception e){
System.out.println("Could not disable the button");
e.printStackTrace();
}
}
}
public char[] getBoard() {
return this.templateOfBoard;
}
public char getUserTurn(){
return this.userTurn;
}
}
| [
"[email protected]"
] | |
ddb323604b9c956eb37800afd33774f29e837c50 | 5d6407df82a953d7438f6042c916891c1d0ae968 | /finalpro/src/main/java/com/agile/service/impl/ProductImageServiceImpl.java | 70ec8f8ea33ba7847a5dbd7db64baacb1acc0e1f | [] | no_license | ahalzj/demo | 4aa217d90f7dc0b212b01d44dc523ab8a8739ec4 | f6fe3bdf0e4f0a7dd48225cab6785d3b6e51d841 | refs/heads/master | 2022-12-24T08:46:09.271777 | 2020-02-19T13:50:49 | 2020-02-19T13:50:49 | 241,634,273 | 0 | 0 | null | 2022-12-16T10:52:37 | 2020-02-19T13:54:19 | Java | UTF-8 | Java | false | false | 1,478 | java | package com.agile.service.impl;
import com.agile.dao.ProductImageDao;
import com.agile.pojo.ProductImage;
import com.agile.pojo.example.ProductImageExample;
import com.agile.service.ProductImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ProductImageServiceImpl implements ProductImageService {
@Autowired
private ProductImageDao productImageDao = null;
@Override
public void add(ProductImage image) {
productImageDao.insert(image);
}
@Override
public void deleteByProductId(Integer product_id) {
ProductImageExample example = new ProductImageExample();
example.or().andProduct_idEqualTo(product_id);
List<ProductImage> idList = productImageDao.selectByExample(example);
for (ProductImage productImage : idList) {
productImageDao.deleteByPrimaryKey(productImage.getId());
}
}
@Override
public void update(ProductImage image) {
productImageDao.updateByPrimaryKey(image);
}
@Override
public ProductImage get(Integer id) {
return productImageDao.selectByPrimaryKey(id);
}
@Override
public List<ProductImage> list(Integer product_id) {
ProductImageExample example = new ProductImageExample();
example.or().andIdEqualTo(product_id);
return productImageDao.selectByExample(example);
}
}
| [
"[email protected]"
] | |
17c4608edd53f52e66e391fd54d90edd1b68ac3b | bb13c58a58ae28aa42f2f2cc4be31d6633c0a776 | /src/main/java/com/als/mall/mapper/CartMapper.java | 15ad2866d700246c56c572e8baddd571c8f73659 | [] | no_license | aionrepository/mall | 3d62319800ec884b4b2a4f8a644d26ff6e52955b | 97db945d88241c708d703fe84d129c319fd58e00 | refs/heads/main | 2023-02-10T14:06:46.474368 | 2021-01-10T13:22:59 | 2021-01-10T13:22:59 | 328,376,906 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | package com.als.mall.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.als.mall.entity.Cart;
import com.als.mall.vo.CartVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper
public interface CartMapper extends BaseMapper<Cart>{
@Select("SELECT cart.id, product_id, quantity, cost, \r\n" +
" NAME, price, stock, file_name FROM cart \r\n" +
" LEFT JOIN product ON product_id = product.`id`\r\n" +
" WHERE user_id = #{userId}")
List<CartVO> queryAllByUserId(@Param("userId")int userId);
}
| [
"[email protected]"
] | |
42345986bdeb16acb697b9ed71e3dec39f8f4db9 | 0498b2a550adc40b48da03a5c7adcd7c3d3a037d | /errai-ui/src/main/java/org/jboss/errai/ui/shared/VisitContextImpl.java | 1a13067a8489789fe2d672ddcc6192f98f200d57 | [] | no_license | sinaisix/errai | ba5cd3db7a01f1a0829086635128d918f25c0122 | 7e7e0a387d02b7366cbed9947d6c969f21ac655f | refs/heads/master | 2021-01-18T08:03:04.809057 | 2015-02-24T00:10:16 | 2015-02-24T00:14:28 | 31,277,838 | 1 | 0 | null | 2015-02-24T19:32:46 | 2015-02-24T19:32:46 | null | UTF-8 | Java | false | false | 435 | java | package org.jboss.errai.ui.shared;
public class VisitContextImpl<T> implements VisitContextMutable<T> {
private boolean complete;
private T result;
public boolean isVisitComplete() {
return complete;
}
@Override
public void setVisitComplete() {
complete = true;
}
@Override
public T getResult() {
return result;
}
@Override
public void setResult(T result) {
this.result = result;
}
}
| [
"[email protected]"
] | |
9e5a1e5f8e4dec4c8fb5d9c290ad302854bdef3b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/3/3_f96795b64045c9e9f932b0f0bc9a36d6163aaa0f/Chunk/3_f96795b64045c9e9f932b0f0bc9a36d6163aaa0f_Chunk_s.java | 49cb85170f167e8fed3206ae61ea9379b70ccccf | [] | 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 | 32,257 | java | package net.minecraft.server;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import net.canarymod.Canary;
import net.canarymod.PortalReconstructJob;
import net.canarymod.api.world.CanaryChunk;
import net.canarymod.api.world.blocks.BlockType;
import net.canarymod.api.world.blocks.CanaryBlock;
import net.canarymod.hook.world.PortalDestroyHook;
import net.canarymod.tasks.ServerTaskManager;
public class Chunk {
public static boolean a;
private ExtendedBlockStorage[] r;
private byte[] s;
public int[] b;
public boolean[] c;
public boolean d;
public World e;
public int[] f;
public final int g;
public final int h;
private boolean t;
public Map i;
public List[] j;
public boolean k;
public boolean l;
public boolean m;
public long n;
public boolean o;
public int p;
private int u;
boolean q;
// CanaryMod Chunk handler
private CanaryChunk canaryChunk;
public Chunk(World world, int i0, int i1) {
this.r = new ExtendedBlockStorage[16];
this.s = new byte[256];
this.b = new int[256];
this.c = new boolean[256];
this.t = false;
this.i = new HashMap();
this.k = false;
this.l = false;
this.m = false;
this.n = 0L;
this.o = false;
this.p = 0;
this.u = 4096;
this.q = false;
this.j = new List[16];
this.e = world;
this.g = i0;
this.h = i1;
this.f = new int[256];
for (int i2 = 0; i2 < this.j.length; ++i2) {
this.j[i2] = new ArrayList();
}
Arrays.fill(this.b, -999);
Arrays.fill(this.s, (byte) -1);
canaryChunk = new CanaryChunk(this); // CanaryMod: wrap chunk
}
public Chunk(World world, byte[] abyte, int i0, int i1) {
this(world, i0, i1);
int i2 = abyte.length / 256;
for (int i3 = 0; i3 < 16; ++i3) {
for (int i4 = 0; i4 < 16; ++i4) {
for (int i5 = 0; i5 < i2; ++i5) {
byte b0 = abyte[i3 << 11 | i4 << 7 | i5];
if (b0 != 0) {
int i6 = i5 >> 4;
if (this.r[i6] == null) {
this.r[i6] = new ExtendedBlockStorage(i6 << 4, !world.t.f);
}
this.r[i6].a(i3, i5 & 15, i4, b0);
}
}
}
}
canaryChunk = new CanaryChunk(this); // CanaryMod: wrap chunk
}
public boolean a(int i0, int i1) {
return i0 == this.g && i1 == this.h;
}
public int b(int i0, int i1) {
return this.f[i1 << 4 | i0];
}
public int h() {
for (int i0 = this.r.length - 1; i0 >= 0; --i0) {
if (this.r[i0] != null) {
return this.r[i0].d();
}
}
return 0;
}
public ExtendedBlockStorage[] i() {
return this.r;
}
public void b() {
int i0 = this.h();
this.p = Integer.MAX_VALUE;
int i1;
int i2;
for (i1 = 0; i1 < 16; ++i1) {
i2 = 0;
while (i2 < 16) {
this.b[i1 + (i2 << 4)] = -999;
int i3 = i0 + 16 - 1;
while (true) {
if (i3 > 0) {
if (this.b(i1, i3 - 1, i2) == 0) {
--i3;
continue;
}
this.f[i2 << 4 | i1] = i3;
if (i3 < this.p) {
this.p = i3;
}
}
if (!this.e.t.f) {
i3 = 15;
int i4 = i0 + 16 - 1;
do {
i3 -= this.b(i1, i4, i2);
if (i3 > 0) {
ExtendedBlockStorage extendedblockstorage = this.r[i4 >> 4];
if (extendedblockstorage != null) {
extendedblockstorage.c(i1, i4 & 15, i2, i3);
this.e.p((this.g << 4) + i1, i4, (this.h << 4) + i2);
}
}
--i4;
} while (i4 > 0 && i3 > 0);
}
++i2;
break;
}
}
}
this.l = true;
for (i1 = 0; i1 < 16; ++i1) {
for (i2 = 0; i2 < 16; ++i2) {
this.e(i1, i2);
}
}
}
private void e(int i0, int i1) {
this.c[i0 + i1 * 16] = true;
this.t = true;
}
private void q() {
this.e.C.a("recheckGaps");
if (this.e.b(this.g * 16 + 8, 0, this.h * 16 + 8, 16)) {
for (int i0 = 0; i0 < 16; ++i0) {
for (int i1 = 0; i1 < 16; ++i1) {
if (this.c[i0 + i1 * 16]) {
this.c[i0 + i1 * 16] = false;
int i2 = this.b(i0, i1);
int i3 = this.g * 16 + i0;
int i4 = this.h * 16 + i1;
int i5 = this.e.g(i3 - 1, i4);
int i6 = this.e.g(i3 + 1, i4);
int i7 = this.e.g(i3, i4 - 1);
int i8 = this.e.g(i3, i4 + 1);
if (i6 < i5) {
i5 = i6;
}
if (i7 < i5) {
i5 = i7;
}
if (i8 < i5) {
i5 = i8;
}
this.g(i3, i4, i5);
this.g(i3 - 1, i4, i2);
this.g(i3 + 1, i4, i2);
this.g(i3, i4 - 1, i2);
this.g(i3, i4 + 1, i2);
}
}
}
this.t = false;
}
this.e.C.b();
}
private void g(int i0, int i1, int i2) {
int i3 = this.e.f(i0, i1);
if (i3 > i2) {
this.d(i0, i1, i2, i3 + 1);
} else if (i3 < i2) {
this.d(i0, i1, i3, i2 + 1);
}
}
private void d(int i0, int i1, int i2, int i3) {
if (i3 > i2 && this.e.b(i0, 0, i1, 16)) {
for (int i4 = i2; i4 < i3; ++i4) {
this.e.c(EnumSkyBlock.a, i0, i4, i1);
}
this.l = true;
}
}
private void h(int i0, int i1, int i2) {
int i3 = this.f[i2 << 4 | i0] & 255;
int i4 = i3;
if (i1 > i3) {
i4 = i1;
}
while (i4 > 0 && this.b(i0, i4 - 1, i2) == 0) {
--i4;
}
if (i4 != i3) {
this.e.e(i0 + this.g * 16, i2 + this.h * 16, i4, i3);
this.f[i2 << 4 | i0] = i4;
int i5 = this.g * 16 + i0;
int i6 = this.h * 16 + i2;
int i7;
int i8;
if (!this.e.t.f) {
ExtendedBlockStorage extendedblockstorage;
if (i4 < i3) {
for (i7 = i4; i7 < i3; ++i7) {
extendedblockstorage = this.r[i7 >> 4];
if (extendedblockstorage != null) {
extendedblockstorage.c(i0, i7 & 15, i2, 15);
this.e.p((this.g << 4) + i0, i7, (this.h << 4) + i2);
}
}
} else {
for (i7 = i3; i7 < i4; ++i7) {
// CanaryMod start: Catch corrupt index info
if (i7 >> 4 < 0 || i7 >> 4 >= 16) {
Canary.logWarning("Invalid chunk info array index: " + (i7 >> 4));
Canary.logWarning("x: " + i3 + ", z: " + i4);
Canary.logWarning("Chunk location: " + i5 + ", " + i6);
i7 = 0;
}
// CanaryMod end
extendedblockstorage = this.r[i7 >> 4];
if (extendedblockstorage != null) {
extendedblockstorage.c(i0, i7 & 15, i2, 0);
this.e.p((this.g << 4) + i0, i7, (this.h << 4) + i2);
}
}
}
i7 = 15;
while (i4 > 0 && i7 > 0) {
--i4;
i8 = this.b(i0, i4, i2);
if (i8 == 0) {
i8 = 1;
}
i7 -= i8;
if (i7 < 0) {
i7 = 0;
}
ExtendedBlockStorage extendedblockstorage1 = this.r[i4 >> 4];
if (extendedblockstorage1 != null) {
extendedblockstorage1.c(i0, i4 & 15, i2, i7);
}
}
}
i7 = this.f[i2 << 4 | i0];
i8 = i3;
int i9 = i7;
if (i7 < i3) {
i8 = i7;
i9 = i3;
}
if (i7 < this.p) {
this.p = i7;
}
if (!this.e.t.f) {
this.d(i5 - 1, i6, i8, i9);
this.d(i5 + 1, i6, i8, i9);
this.d(i5, i6 - 1, i8, i9);
this.d(i5, i6 + 1, i8, i9);
this.d(i5, i6, i8, i9);
}
this.l = true;
}
}
public int b(int i0, int i1, int i2) {
return Block.t[this.a(i0, i1, i2)];
}
public int a(int i0, int i1, int i2) {
if (i1 >> 4 >= this.r.length) {
return 0;
} else {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
return extendedblockstorage != null ? extendedblockstorage.a(i0, i1 & 15, i2) : 0;
}
}
public int c(int i0, int i1, int i2) {
if (i1 >> 4 >= this.r.length) {
return 0;
} else {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
return extendedblockstorage != null ? extendedblockstorage.b(i0, i1 & 15, i2) : 0;
}
}
public boolean a(int i0, int i1, int i2, int i3, int i4) {
return this.a(i0, i1, i2, i3, i4, true); // CanaryMod: Redirect
}
public boolean a(int i0, int i1, int i2, int i3, int i4, boolean checkPortal) { // CanaryMod: add Portal Check
int i5 = i2 << 4 | i0;
if (i1 >= this.b[i5] - 1) {
this.b[i5] = -999;
}
int i6 = this.f[i5];
int i7 = this.a(i0, i1, i2);
int i8 = this.c(i0, i1, i2);
if (i7 == i3 && i8 == i4) {
return false;
} else {
// CanaryMod: Start - check if removed block is portal block
int portalPointX = this.g * 16 + i0;
int portalPointZ = this.h * 16 + i2;
if (checkPortal == true) {
int portalPointY = i1;
int portalId = BlockType.Portal.getId();
if (canaryChunk.getDimension().getBlockAt(portalPointX, portalPointY, portalPointZ).getTypeId() == portalId) {
// These will be equal 1 if the portal is defined on their axis and 0 if not.
int portalXOffset = (canaryChunk.getDimension().getBlockAt(portalPointX - 1, portalPointY, portalPointZ).getTypeId() == portalId || canaryChunk.getDimension().getBlockAt(portalPointX + 1, portalPointY, portalPointZ).getTypeId() == portalId) ? 1 : 0;
int portalZOffset = (canaryChunk.getDimension().getBlockAt(portalPointX, portalPointY, portalPointZ - 1).getTypeId() == portalId || canaryChunk.getDimension().getBlockAt(portalPointX, portalPointY, portalPointZ + 1).getTypeId() == portalId) ? 1 : 0;
// If the portal is either x aligned or z aligned but not both (has neighbor portal in x or z plane but not both)
if (portalXOffset != portalZOffset) {
// Get the edge of the portal.
int portalX = portalPointX - ((canaryChunk.getDimension().getBlockAt(portalPointX - 1, portalPointY, portalPointZ).getTypeId() == portalId) ? 1 : 0);
int portalZ = portalPointZ - ((canaryChunk.getDimension().getBlockAt(portalPointX, portalPointY, portalPointZ - 1).getTypeId() == portalId) ? 1 : 0);
int portalY = i1;
while (canaryChunk.getDimension().getBlockAt(portalX, ++portalY, portalZ).getTypeId() == portalId) {
;
}
portalY -= 1;
// Scan the portal and see if its still all there (2x3 formation)
boolean completePortal = true;
CanaryBlock[][] portalBlocks = new CanaryBlock[3][2];
for (int i9001 = 0; i9001 < 3 && completePortal; i9001 += 1) {
for (int i9002 = 0; i9002 < 2 && completePortal; i9002 += 1) {
portalBlocks[i9001][i9002] = (CanaryBlock) canaryChunk.getDimension().getBlockAt(portalX + i9002 * portalXOffset, portalY - i9001, portalZ + i9002 * portalZOffset);
if (portalBlocks[i9001][i9002].getTypeId() != portalId) {
completePortal = false;
}
}
}
if (completePortal == true) {
// CanaryMod: PortalDestroy
PortalDestroyHook hook = new PortalDestroyHook(portalBlocks);
Canary.hooks().callHook(hook);
if (hook.isCanceled()) {// Hook canceled = don't destroy the portal.
// in that case we need to reconstruct the portal's frame to make the portal valid.
// Problem is we don't want to reconstruct it right away because more blocks might be deleted (for example on explosion).
// In order to avoid spamming the hook for each destroyed block, I'm queuing the reconstruction of the portal instead.
ServerTaskManager.addTask(new PortalReconstructJob(this.e.getCanaryWorld(), portalX, portalY, portalZ, (portalXOffset == 1)));
}
}
}
}
}
// CanaryMod: End - check if removed block is portal block0.
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
boolean flag0 = false;
if (extendedblockstorage == null) {
if (i3 == 0) {
return false;
}
extendedblockstorage = this.r[i1 >> 4] = new ExtendedBlockStorage(i1 >> 4 << 4, !this.e.t.f);
flag0 = i1 >= i6;
}
int i9 = this.g * 16 + i0;
int i10 = this.h * 16 + i2;
if (i7 != 0 && !this.e.I) {
Block.r[i7].l(this.e, i9, i1, i10, i8);
}
extendedblockstorage.a(i0, i1 & 15, i2, i3);
if (i7 != 0) {
if (!this.e.I) {
Block.r[i7].a(this.e, i9, i1, i10, i7, i8);
} else if (Block.r[i7] instanceof ITileEntityProvider && i7 != i3) {
this.e.s(i9, i1, i10);
}
}
if (extendedblockstorage.a(i0, i1 & 15, i2) != i3) {
return false;
} else {
extendedblockstorage.b(i0, i1 & 15, i2, i4);
if (flag0) {
this.b();
} else {
if (Block.t[i3 & 4095] > 0) {
if (i1 >= i6) {
this.h(i0, i1 + 1, i2);
}
} else if (i1 == i6 - 1) {
this.h(i0, i1, i2);
}
this.e(i0, i2);
}
TileEntity tileentity;
if (i3 != 0) {
if (!this.e.I) {
Block.r[i3].a(this.e, i9, i1, i10);
}
if (Block.r[i3] instanceof ITileEntityProvider) {
tileentity = this.e(i0, i1, i2);
if (tileentity == null) {
tileentity = ((ITileEntityProvider) Block.r[i3]).b(this.e);
this.e.a(i9, i1, i10, tileentity);
}
if (tileentity != null) {
tileentity.i();
}
}
} else if (i7 > 0 && Block.r[i7] instanceof ITileEntityProvider) {
tileentity = this.e(i0, i1, i2);
if (tileentity != null) {
tileentity.i();
}
}
this.l = true;
return true;
}
}
}
public boolean b(int i0, int i1, int i2, int i3) {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
if (extendedblockstorage == null) {
return false;
} else {
int i4 = extendedblockstorage.b(i0, i1 & 15, i2);
if (i4 == i3) {
return false;
} else {
this.l = true;
extendedblockstorage.b(i0, i1 & 15, i2, i3);
int i5 = extendedblockstorage.a(i0, i1 & 15, i2);
if (i5 > 0 && Block.r[i5] instanceof ITileEntityProvider) {
TileEntity tileentity = this.e(i0, i1, i2);
if (tileentity != null) {
tileentity.i();
tileentity.p = i3;
}
}
return true;
}
}
}
public int a(EnumSkyBlock enumskyblock, int i0, int i1, int i2) {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
return extendedblockstorage == null ? (this.d(i0, i1, i2) ? enumskyblock.c : 0) : (enumskyblock == EnumSkyBlock.a ? (this.e.t.f ? 0 : extendedblockstorage.c(i0, i1 & 15, i2)) : (enumskyblock == EnumSkyBlock.b ? extendedblockstorage.d(i0, i1 & 15, i2) : enumskyblock.c));
}
public void a(EnumSkyBlock enumskyblock, int i0, int i1, int i2, int i3) {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
if (extendedblockstorage == null) {
extendedblockstorage = this.r[i1 >> 4] = new ExtendedBlockStorage(i1 >> 4 << 4, !this.e.t.f);
this.b();
}
this.l = true;
if (enumskyblock == EnumSkyBlock.a) {
if (!this.e.t.f) {
extendedblockstorage.c(i0, i1 & 15, i2, i3);
}
} else if (enumskyblock == EnumSkyBlock.b) {
extendedblockstorage.d(i0, i1 & 15, i2, i3);
}
}
public int c(int i0, int i1, int i2, int i3) {
ExtendedBlockStorage extendedblockstorage = this.r[i1 >> 4];
if (extendedblockstorage == null) {
return !this.e.t.f && i3 < EnumSkyBlock.a.c ? EnumSkyBlock.a.c - i3 : 0;
} else {
int i4 = this.e.t.f ? 0 : extendedblockstorage.c(i0, i1 & 15, i2);
if (i4 > 0) {
a = true;
}
i4 -= i3;
int i5 = extendedblockstorage.d(i0, i1 & 15, i2);
if (i5 > i4) {
i4 = i5;
}
return i4;
}
}
public void a(Entity entity) {
this.m = true;
int i0 = MathHelper.c(entity.u / 16.0D);
int i1 = MathHelper.c(entity.w / 16.0D);
if (i0 != this.g || i1 != this.h) {
this.e.W().c("Wrong location! " + entity);
// Thread.dumpStack();
entity.w();
return;
}
int i2 = MathHelper.c(entity.v / 16.0D);
if (i2 < 0) {
i2 = 0;
}
if (i2 >= this.j.length) {
i2 = this.j.length - 1;
}
entity.ai = true;
entity.aj = this.g;
entity.ak = i2;
entity.al = this.h;
this.j[i2].add(entity);
}
public void b(Entity entity) {
this.a(entity, entity.ak);
}
public void a(Entity entity, int i0) {
if (i0 < 0) {
i0 = 0;
}
if (i0 >= this.j.length) {
i0 = this.j.length - 1;
}
this.j[i0].remove(entity);
}
public boolean d(int i0, int i1, int i2) {
return i1 >= this.f[i2 << 4 | i0];
}
public TileEntity e(int i0, int i1, int i2) {
ChunkPosition chunkposition = new ChunkPosition(i0, i1, i2);
TileEntity tileentity = (TileEntity) this.i.get(chunkposition);
if (tileentity == null) {
int i3 = this.a(i0, i1, i2);
if (i3 <= 0 || !Block.r[i3].t()) {
return null;
}
if (tileentity == null) {
tileentity = ((ITileEntityProvider) Block.r[i3]).b(this.e);
this.e.a(this.g * 16 + i0, i1, this.h * 16 + i2, tileentity);
}
tileentity = (TileEntity) this.i.get(chunkposition);
}
if (tileentity != null && tileentity.r()) {
this.i.remove(chunkposition);
return null;
} else {
return tileentity;
}
}
public void a(TileEntity tileentity) {
int i0 = tileentity.l - this.g * 16;
int i1 = tileentity.m;
int i2 = tileentity.n - this.h * 16;
this.a(i0, i1, i2, tileentity);
if (this.d) {
this.e.g.add(tileentity);
}
}
public void a(int i0, int i1, int i2, TileEntity tileentity) {
ChunkPosition chunkposition = new ChunkPosition(i0, i1, i2);
tileentity.b(this.e);
tileentity.l = this.g * 16 + i0;
tileentity.m = i1;
tileentity.n = this.h * 16 + i2;
if (this.a(i0, i1, i2) != 0 && Block.r[this.a(i0, i1, i2)] instanceof ITileEntityProvider) {
if (this.i.containsKey(chunkposition)) {
((TileEntity) this.i.get(chunkposition)).w_();
}
tileentity.s();
this.i.put(chunkposition, tileentity);
}
}
public void f(int i0, int i1, int i2) {
ChunkPosition chunkposition = new ChunkPosition(i0, i1, i2);
if (this.d) {
TileEntity tileentity = (TileEntity) this.i.remove(chunkposition);
if (tileentity != null) {
tileentity.w_();
}
}
}
public void c() {
this.d = true;
this.e.a(this.i.values());
for (int i0 = 0; i0 < this.j.length; ++i0) {
this.e.a(this.j[i0]);
}
}
public void d() {
this.d = false;
Iterator iterator = this.i.values().iterator();
while (iterator.hasNext()) {
TileEntity tileentity = (TileEntity) iterator.next();
this.e.a(tileentity);
}
for (int i0 = 0; i0 < this.j.length; ++i0) {
this.e.b(this.j[i0]);
}
}
public void e() {
this.l = true;
}
public void a(Entity entity, AxisAlignedBB axisalignedbb, List list, IEntitySelector ientityselector) {
int i0 = MathHelper.c((axisalignedbb.b - 2.0D) / 16.0D);
int i1 = MathHelper.c((axisalignedbb.e + 2.0D) / 16.0D);
if (i0 < 0) {
i0 = 0;
i1 = Math.max(i0, i1);
}
if (i1 >= this.j.length) {
i1 = this.j.length - 1;
i0 = Math.min(i0, i1);
}
for (int i2 = i0; i2 <= i1; ++i2) {
List list1 = this.j[i2];
for (int i3 = 0; i3 < list1.size(); ++i3) {
Entity entity1 = (Entity) list1.get(i3);
if (entity1 != entity && entity1.E.a(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
list.add(entity1);
Entity[] aentity = entity1.an();
if (aentity != null) {
for (int i4 = 0; i4 < aentity.length; ++i4) {
entity1 = aentity[i4];
if (entity1 != entity && entity1.E.a(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
list.add(entity1);
}
}
}
}
}
}
}
public void a(Class oclass0, AxisAlignedBB axisalignedbb, List list, IEntitySelector ientityselector) {
int i0 = MathHelper.c((axisalignedbb.b - 2.0D) / 16.0D);
int i1 = MathHelper.c((axisalignedbb.e + 2.0D) / 16.0D);
if (i0 < 0) {
i0 = 0;
} else if (i0 >= this.j.length) {
i0 = this.j.length - 1;
}
if (i1 >= this.j.length) {
i1 = this.j.length - 1;
} else if (i1 < 0) {
i1 = 0;
}
for (int i2 = i0; i2 <= i1; ++i2) {
List list1 = this.j[i2];
for (int i3 = 0; i3 < list1.size(); ++i3) {
Entity entity = (Entity) list1.get(i3);
if (oclass0.isAssignableFrom(entity.getClass()) && entity.E.a(axisalignedbb) && (ientityselector == null || ientityselector.a(entity))) {
list.add(entity);
}
}
}
}
public boolean a(boolean flag0) {
if (flag0) {
if (this.m && this.e.G() != this.n || this.l) {
return true;
}
} else if (this.m && this.e.G() >= this.n + 600L) {
return true;
}
return this.l;
}
public Random a(long i0) {
return new Random(this.e.F() + (long) (this.g * this.g * 4987142) + (long) (this.g * 5947611) + (long) (this.h * this.h) * 4392871L + (long) (this.h * 389711) ^ i0);
}
public boolean g() {
return false;
}
public void a(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i0, int i1) {
if (!this.k && ichunkprovider.a(i0 + 1, i1 + 1) && ichunkprovider.a(i0, i1 + 1) && ichunkprovider.a(i0 + 1, i1)) {
ichunkprovider.a(ichunkprovider1, i0, i1);
}
if (ichunkprovider.a(i0 - 1, i1) && !ichunkprovider.d(i0 - 1, i1).k && ichunkprovider.a(i0 - 1, i1 + 1) && ichunkprovider.a(i0, i1 + 1) && ichunkprovider.a(i0 - 1, i1 + 1)) {
ichunkprovider.a(ichunkprovider1, i0 - 1, i1);
}
if (ichunkprovider.a(i0, i1 - 1) && !ichunkprovider.d(i0, i1 - 1).k && ichunkprovider.a(i0 + 1, i1 - 1) && ichunkprovider.a(i0 + 1, i1 - 1) && ichunkprovider.a(i0 + 1, i1)) {
ichunkprovider.a(ichunkprovider1, i0, i1 - 1);
}
if (ichunkprovider.a(i0 - 1, i1 - 1) && !ichunkprovider.d(i0 - 1, i1 - 1).k && ichunkprovider.a(i0, i1 - 1) && ichunkprovider.a(i0 - 1, i1)) {
ichunkprovider.a(ichunkprovider1, i0 - 1, i1 - 1);
}
}
public int d(int i0, int i1) {
int i2 = i0 | i1 << 4;
int i3 = this.b[i2];
if (i3 == -999) {
int i4 = this.h() + 15;
i3 = -1;
while (i4 > 0 && i3 == -1) {
int i5 = this.a(i0, i4, i1);
Material material = i5 == 0 ? Material.a : Block.r[i5].cO;
if (!material.c() && !material.d()) {
--i4;
} else {
i3 = i4 + 1;
}
}
this.b[i2] = i3;
}
return i3;
}
public void k() {
if (this.t && !this.e.t.f) {
this.q();
}
}
public ChunkCoordIntPair l() {
return new ChunkCoordIntPair(this.g, this.h);
}
public boolean c(int i0, int i1) {
if (i0 < 0) {
i0 = 0;
}
if (i1 >= 256) {
i1 = 255;
}
for (int i2 = i0; i2 <= i1; i2 += 16) {
ExtendedBlockStorage extendedblockstorage = this.r[i2 >> 4];
if (extendedblockstorage != null && !extendedblockstorage.a()) {
return false;
}
}
return true;
}
public void a(ExtendedBlockStorage[] aextendedblockstorage) {
this.r = aextendedblockstorage;
}
public BiomeGenBase a(int i0, int i1, WorldChunkManager worldchunkmanager) {
int i2 = this.s[i1 << 4 | i0] & 255;
if (i2 == 255) {
BiomeGenBase biomegenbase = worldchunkmanager.a((this.g << 4) + i0, (this.h << 4) + i1);
i2 = biomegenbase.N;
this.s[i1 << 4 | i0] = (byte) (i2 & 255);
}
return BiomeGenBase.a[i2] == null ? BiomeGenBase.c : BiomeGenBase.a[i2];
}
public byte[] m() {
return this.s;
}
public void a(byte[] abyte) {
this.s = abyte;
}
public void n() {
this.u = 0;
}
public void o() {
for (int i0 = 0; i0 < 8; ++i0) {
if (this.u >= 4096) {
return;
}
int i1 = this.u % 16;
int i2 = this.u / 16 % 16;
int i3 = this.u / 256;
++this.u;
int i4 = (this.g << 4) + i2;
int i5 = (this.h << 4) + i3;
for (int i6 = 0; i6 < 16; ++i6) {
int i7 = (i1 << 4) + i6;
if (this.r[i1] == null && (i6 == 0 || i6 == 15 || i2 == 0 || i2 == 15 || i3 == 0 || i3 == 15) || this.r[i1] != null && this.r[i1].a(i2, i6, i3) == 0) {
if (Block.v[this.e.a(i4, i7 - 1, i5)] > 0) {
this.e.A(i4, i7 - 1, i5);
}
if (Block.v[this.e.a(i4, i7 + 1, i5)] > 0) {
this.e.A(i4, i7 + 1, i5);
}
if (Block.v[this.e.a(i4 - 1, i7, i5)] > 0) {
this.e.A(i4 - 1, i7, i5);
}
if (Block.v[this.e.a(i4 + 1, i7, i5)] > 0) {
this.e.A(i4 + 1, i7, i5);
}
if (Block.v[this.e.a(i4, i7, i5 - 1)] > 0) {
this.e.A(i4, i7, i5 - 1);
}
if (Block.v[this.e.a(i4, i7, i5 + 1)] > 0) {
this.e.A(i4, i7, i5 + 1);
}
this.e.A(i4, i7, i5);
}
}
}
}
// CanaryMod start
public CanaryChunk getCanaryChunk() {
return canaryChunk;
}
// CanaryMod end
}
| [
"[email protected]"
] | |
fc00d89a912b5c5d0cf3dfb36e71bb27a0de5810 | 16b5d51ab0409cbb5a1da9eacb9948a54acd6258 | /app/src/main/java/com/haoche51/checker/entity/VehicleBrandEntity.java | 791a7e0af8d7d3ae02e0af91a49c843c5259e724 | [] | no_license | liyq1406/haochebang | c3405a537d4f695ca51cb26d7889e952c6965eea | 12727fcca80c85aa9586bd58fe9b16c98fa1bf5b | refs/heads/master | 2021-01-17T21:20:31.261785 | 2017-02-28T04:52:06 | 2017-02-28T04:52:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 974 | java | package com.haoche51.checker.entity;
public class VehicleBrandEntity extends BaseEntity {
private int id = 0;
private String name = "";
private String pinyin = "";
private String first_char = "";
private String img_url = "";
public static VehicleBrandEntity parseFromJson(String jsonString) {
return gson.fromJson(jsonString, VehicleBrandEntity.class);
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPinyin() {
return pinyin;
}
public void setPinyin(String pinyin) {
this.pinyin = pinyin;
}
public String getFirst_char() {
return first_char;
}
public void setFirst_char(String first_char) {
this.first_char = first_char;
}
public String getImg_url() {
return img_url;
}
public void setImg_url(String img_url) {
this.img_url = img_url;
}
}
| [
"[email protected]"
] | |
c82d31f92c5e0adc0243c2ccc68acb266f45598e | e4a0e4c60edf5f12fc418ebea5947f78561b4f0d | /CloudClient/src/Controller/NioClient.java | df70edab0b917954e7ca94a6cf06335ada9c6b41 | [] | no_license | sharap0v/Cloud | 6575c782605cac947e7344de64241097713afec6 | f050d6cb9d0ec79c62bf18031dec23e7c3481e44 | refs/heads/master | 2022-11-07T02:53:23.074646 | 2020-06-29T10:56:51 | 2020-06-29T10:56:51 | 273,431,461 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,727 | java | package Controller;
import lib.Library;
import java.io.*;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.nio.file.Paths;
import java.util.Iterator;
public class NioClient implements Runnable{
private int port;
private String ip;
private String password;
private String userName;
private SocketChannel clientChannel;
private Selector selector;
private ByteBuffer byteBuffer = ByteBuffer.allocate(128);
public static String clientMessage;
public boolean fileReception =false;
public String transferFileName = null;
public NioClient(String port, String ip, String password, String userName) {
this.port = Integer.parseInt(port);
this.ip = ip;
this.password = password;
this.userName = userName;
}
@Override
public void run() {
try {
clientChannel = SocketChannel.open();
clientChannel.configureBlocking(false);
clientChannel.connect(new InetSocketAddress(ip,port));
selector = Selector.open();
clientChannel.register(selector, SelectionKey.OP_CONNECT);
SelectionKey key;
Iterator<SelectionKey> iterator;
while (!Thread.interrupted()){
int eventsCount = selector.select();
iterator = selector.selectedKeys().iterator();
while(iterator.hasNext()){
key = iterator.next();
//System.out.println("1");
if (!key.isValid()) {
System.out.println("break");
break;
}
if(key.isValid() & key.isConnectable()){
System.out.println("Соединение");
handleConnection(key);
}
if(key.isReadable()){
System.out.println("read");
handleRead(key);
}
if(key.isWritable()){
//System.out.println("write");
handleWrite(key);
}
iterator.remove();
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
private void handleWrite(SelectionKey key) throws IOException {
if(clientMessage!=null){
SocketChannel channel = ((SocketChannel) key.channel());
String[] msg = clientMessage.split(Library.DELIMITER);
String msgType = msg[0];
switch (msgType){
case Library.COPY_FILE_TO_SERVER:
channel.write(ByteBuffer.wrap(clientMessage.getBytes()));
channel.register(selector, SelectionKey.OP_READ);
transferFileName = msg[1];
clientMessage=null;
break;
}}
}
private void handleRead(SelectionKey key) throws IOException {
SocketChannel channel = ((SocketChannel) key.channel());
StringBuilder message = new StringBuilder();
//channel.read(byteBuffer);
System.out.println(byteBuffer);
int read = 0;
byteBuffer.rewind();
while ((read = channel.read(byteBuffer)) > 0) {
byteBuffer.flip();
byte[] bytes = new byte[byteBuffer.limit()];
byteBuffer.get(bytes);
message.append(new String(bytes));
byteBuffer.rewind();
}
System.out.println(message);
String[] msg = message.toString().split(Library.DELIMITER);
String msgType = msg[0];
System.out.println("1"+msg[0]);
if (Library.FILE_READY.equals(msgType)) {
channel.register(selector, SelectionKey.OP_WRITE);
sendFile(channel,transferFileName);
}
}
private void handleConnection(SelectionKey key) throws IOException {
SocketChannel channel = ((SocketChannel) key.channel());
if(channel.isConnectionPending()) {
channel.finishConnect();
}
channel.configureBlocking(false);
channel.write(ByteBuffer.wrap(Library.getAuthRequest(userName, password).getBytes()));
channel.register(selector, SelectionKey.OP_WRITE);
}
private void sendFile(SocketChannel channel,String fileName) throws IOException {
FileChannel fileChannel = FileChannel.open(Paths.get(fileName));
fileChannel.transferTo(0,fileChannel.size(),channel);
System.out.println("Файл передан");
}
}
| [
"[email protected]"
] | |
348902383c80d729dbcd3fcc902218c7f99d3b6b | f85c64e04cf0b42fcbddbacd84e6465d18c46d64 | /trunk/java/src/main/java/com/joyadata/tjlog/controller/TagController.java | c576f5be12b5a436ace1d1f0fcf98b3558d87e49 | [] | no_license | xc1124646582/tianJin | bfbeffe0ce78585757a09056607f8a433ffab071 | db6d1fb44fbb4e625694609cef9d2c59b5ddd214 | refs/heads/master | 2021-08-23T09:20:53.647203 | 2017-12-04T13:25:41 | 2017-12-04T13:25:41 | 113,043,633 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,332 | java | package com.joyadata.tjlog.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;
import com.joyadata.tjlog.model.DataTagReg;
import com.joyadata.tjlog.model.Tag;
import com.joyadata.tjlog.model.TagReg;
import com.joyadata.tjlog.service.TagService;
import com.joyadata.tjlog.util.Generator;
import com.joyadata.tjlog.util.Response;
import com.joyadata.tjlog.util.ResponseFactory;
/**
* 标签操作
*
* @ClassName: TagController
* @Description: TagController
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:47:36
*
*/
@Controller
public class TagController {
@Autowired
private TagService tagService;
/**
*
* @Description: 获取标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags", method = RequestMethod.GET)
public Response<List<Tag>> getTags() {
List<Tag> list = tagService.getAllTags();
return ResponseFactory.makeResponse(list);
}
/**
*
* @Description: 删除标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags/{tagId}", method = RequestMethod.DELETE)
public Response<Tag> delTag(@PathVariable String tagId) {
tagService.deleteTag(tagId);
Tag tag = new Tag();
tag.setId(tagId);
return ResponseFactory.makeResponse(tag);
}
/**
*
* @Description: 创建标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tag", method = RequestMethod.POST)
public Response<Tag> tag(String name) {
Tag tag = new Tag();
tag.setName(name);
tag.setId(Generator.uuid());
tagService.addTag(tag);
return ResponseFactory.makeResponse(tag);
}
/**
*
* @Description: 获取标签匹配规则
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags/{id}/regs", method = RequestMethod.GET)
public Response<List<TagReg>> tagReg(@PathVariable String id) {
List<TagReg> list = tagService.getTagReg(id);
return ResponseFactory.makeResponse(list);
}
/**
*
* @Description: 添加标签匹配规则
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags/{id}/reg", method = RequestMethod.POST)
public Response<TagReg> addReg(@PathVariable String id) {
TagReg reg = new TagReg();
reg.setId(Generator.uuid());
reg.setTagId(id);
tagService.addTagReg(reg);
return ResponseFactory.makeResponse(reg);
}
/**
*
* @Description: 删除标签匹配规则
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags/{tagId}/regs/{regId}", method = RequestMethod.DELETE)
public Response<TagReg> delReg(@PathVariable String tagId, @PathVariable String regId) {
tagService.delTagReg(regId);
TagReg reg = new TagReg();
reg.setTagId(tagId);
reg.setId(regId);
return ResponseFactory.makeResponse(reg);
}
/**
*
* @Description: 更新标签匹配规则
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/tags/{tagId}/regs/{regId}", method = RequestMethod.POST)
public Response<TagReg> regUpdate(@PathVariable String tagId, @PathVariable String regId, String field,
String group, String regStr) {
TagReg reg = new TagReg();
reg.setId(regId);
reg.setTagId(tagId);
reg.setField(field);
reg.setGroup(group);
reg.setRegStr(regStr);
tagService.updateTagReg(reg);
return ResponseFactory.makeResponse(reg);
}
/**
*
* @Description: 添加数据标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/log/reg", method = RequestMethod.POST)
public Response<DataTagReg> addDataTagReg() {
DataTagReg reg = new DataTagReg();
reg.setId(Generator.uuid());
tagService.addDataTagReg(reg);
return ResponseFactory.makeResponse(reg);
}
/**
*
* @Description: 获取数据标签列表
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/log/regs", method = RequestMethod.GET)
public Response<List<DataTagReg>> getDataTagReg() {
List<DataTagReg> list = tagService.getAllDataTagReg();
return ResponseFactory.makeResponse(list);
}
/**
*
* @Description: 更新数据标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/log/reg/{id}", method = RequestMethod.POST)
public Response<DataTagReg> updateDataTagReg(@PathVariable String id, String tagId, String regStr, String status) {
DataTagReg reg = new DataTagReg();
reg.setId(id);
reg.setTagId(tagId);
reg.setRegStr(regStr);
reg.setStatus(status);
tagService.updateDataTagReg(reg);
return ResponseFactory.makeResponse(reg);
}
/**
*
* @Description: 删除数据标签
* @param name
* @return
* @author 黄宏强 [email protected]
* @date 2017年11月21日 上午10:03:32
* @version V1.0
*/
@ResponseBody
@RequestMapping(value = "/data/log/reg/{id}", method = RequestMethod.DELETE)
public Response<DataTagReg> delDataTagReg(@PathVariable String id) {
DataTagReg reg = new DataTagReg();
reg.setId(id);
tagService.delDataTagReg(id);
return ResponseFactory.makeResponse(reg);
}
}
| [
"[email protected]"
] | |
ea83eb536c3f35f09e6f4c9bf66382def7d38a4f | 618f5940052ae2323cdd015df392a10a85d644be | /common/src/main/java/com/example/hdd/common/util/CloseUtils.java | a02f57b088ece5173feb29c6bfb7abf3665af8d7 | [] | no_license | 710330668/MoreCharge | af0194cb1ca14698a674d9db0b6ce6b3a53a61e1 | fad135f1d7c7e468413584630ee64ab593093a6d | refs/heads/master | 2020-04-06T16:51:03.562746 | 2018-12-10T14:36:40 | 2018-12-10T14:36:40 | 157,636,982 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,250 | java | package com.example.hdd.common.util;
import java.io.Closeable;
import java.io.IOException;
/**
* <pre>
* closeIO : 关闭 IO
* closeIOQuietly: 安静关闭 IO
* </pre>
*/
public final class CloseUtils {
private CloseUtils() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
/**
* Close the io stream.
*
* @param closeables closeables
*/
public static void closeIO(final Closeable... closeables) {
if (closeables == null) return;
for (Closeable closeable : closeables) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* Close the io stream quietly.
*
* @param closeables closeables
*/
public static void closeIOQuietly(final Closeable... closeables) {
if (closeables == null) return;
for (Closeable closeable : closeables) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException ignored) {
}
}
}
}
}
| [
"[email protected]"
] | |
eb1b285ec4f94c70b850d81d593a416f35e6884e | 15928c1d2f7db42a97c8db83fbb541a1e55cada6 | /group-travel-assistant-android/app/src/main/java/com/fpt/gta/App.java | 0eb6c9f18b8fc5b0a1905b7bdbb3f5895faea39d | [] | no_license | Duongnvse62382/grouptravel | a11ee5548071d3d05b291be5012402a8dbcbc625 | 97f8115bcc657f1189a0486a31aa7ac79f06a4ef | refs/heads/main | 2022-12-30T13:27:48.921378 | 2020-10-13T11:26:35 | 2020-10-13T11:26:35 | 303,672,652 | 2 | 0 | null | 2020-10-13T11:18:12 | 2020-10-13T10:54:04 | null | UTF-8 | Java | false | false | 1,451 | java | package com.fpt.gta;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
public class App extends Application {
private static Resources resources;
private static Context context;
public static final String CHANNEL_ID = "com.fpt.gta";
@Override
public void onCreate() {
super.onCreate();
resources = getResources();
context=getApplicationContext();
createNotificationChannel();
}
private void createNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
CharSequence name = getString(R.string.channel_name);
String description = getString(R.string.channel_description);
int importance = NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);
channel.setDescription(description);
channel.setImportance(NotificationManager.IMPORTANCE_HIGH);
NotificationManager manager = getSystemService(NotificationManager.class);
manager.createNotificationChannel(channel);
}
}
public static Resources getAppResources() {
return resources;
}
public static Context getAppContext() {
return App.context;
}
}
| [
"[email protected]"
] | |
bd064a4e8522ee065e5a628c3e72e6b5b855dd99 | 388c2a44fe5de5c6524d407c1dddfe43db754c5b | /src/gui/org/deidentifier/arx/gui/view/impl/common/datatable/DataTableConfigLabelAccumulator.java | 648542aa9047d1a0489671255b6fc4f17e18a5e9 | [
"Apache-2.0"
] | permissive | arx-deidentifier/arx | d51f751acac017d39e18213cce18d42887dcdb22 | c8c26c95e42465908cdc1e07f6211121374600af | refs/heads/master | 2023-08-16T08:07:47.794373 | 2023-04-06T18:34:16 | 2023-04-06T18:34:16 | 9,751,165 | 567 | 243 | Apache-2.0 | 2023-05-23T20:17:59 | 2013-04-29T15:23:18 | Java | UTF-8 | Java | false | false | 2,391 | java | /*
* ARX Data Anonymization Tool
* Copyright 2012 - 2023 Fabian Prasser and contributors
*
* 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.deidentifier.arx.gui.view.impl.common.datatable;
import org.deidentifier.arx.RowSet;
import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
import org.eclipse.nebula.widgets.nattable.layer.cell.IConfigLabelAccumulator;
/**
* A label accumulator for the data view.
*
* @author Fabian Prasser
*/
public class DataTableConfigLabelAccumulator implements IConfigLabelAccumulator {
/** TODO */
private final DataTableContext context;
/** TODO */
private final NatTable table;
/**
* Creates a new instance.
*
* @param table
* @param context
*/
public DataTableConfigLabelAccumulator(NatTable table, DataTableContext context) {
this.context = context;
this.table = table;
}
@Override
public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
int[] groups = context.getGroups();
RowSet rows = context.getRows();
if (table != null && groups != null) {
int row = table.getRowIndexByPosition(rowPosition + 1);
configLabels.addLabel("background" + (groups[row] % 2)); //$NON-NLS-1$
if (row < groups.length - 1 && groups[row] != groups[row + 1]) {
configLabels.addLabel(DataTableDecorator.BOTTOM_LINE_BORDER_LABEL);
}
}
if (table != null && rows != null) {
int column = table.getColumnIndexByPosition(columnPosition + 1);
if (column == 0) {
configLabels.addLabel("checkbox"); //$NON-NLS-1$
}
}
}
}
| [
"[email protected]"
] | |
1f8357baab9877f906b43a015456773461f171ba | d7be0cf96dae35a98dc1643011e025a28e3c92bd | /QZComm/src/main/java/com/ks/object/ValidObject.java | e81687cf0a0f4fd87773d4112bce3b0826be6de1 | [] | no_license | liaohanjie/QZStore | 8ab5827138266dc88179ee2cfb94c98d391c39be | 698d1e7d8386bca3b15fd4b3ea3020e5b9cc3c43 | refs/heads/master | 2021-01-10T18:35:14.604327 | 2016-05-31T05:17:50 | 2016-05-31T05:17:50 | 59,005,984 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 176 | java | package com.ks.object;
import lombok.Data;
@Data
public class ValidObject {
private int heroSize;
private int propSize;
private int eternalSize;
private int equipSize;
}
| [
"[email protected]"
] | |
3cdad1627f20591280b3492925042c6fd3215fa8 | 0af0217e16bf319e81d47c6f1bd2895f6687a66a | /src/main/java/com/krishnan/balaji/jfx/ch4/list/PAColleges.java | 67e9519f404ac962976259a9e5ba9bff172fc687 | [] | no_license | balaji142857/java_learning | 7edec6ac8e3a462a404a48d05ae073a351f1c816 | 3d2957fdbeb0a33b0414063164689bfed041fa0b | refs/heads/master | 2022-12-12T05:56:49.534231 | 2021-03-13T04:56:33 | 2021-03-13T04:56:33 | 90,326,430 | 0 | 0 | null | 2022-11-16T09:26:50 | 2017-05-05T01:52:09 | Java | UTF-8 | Java | false | false | 2,410 | java | package com.krishnan.balaji.jfx.ch4.list;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.MultipleSelectionModel;
import javafx.scene.layout.FlowPane;
import javafx.scene.paint.Paint;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class PAColleges extends Application {
@Override
public void start(Stage primaryStage) {
Label response = new Label("Select a college or university:");
ListView<String> lvColleges;
Text title = new Text("PA Colleges and Universities");
title.setFill(Paint.valueOf("#2A5058"));
title.setFont(Font.font("Verdana", FontWeight.BOLD, 20));
FlowPane root = new FlowPane(10,10);
root.setAlignment(Pos.CENTER);
ObservableList<String> colleges =
FXCollections.observableArrayList("Penn State", "Drexel",
"Widener", "Shippensburg", "Bloomsburg", "Penn Tech",
"Lockhaven", "Kutztown");
lvColleges = new ListView<String>(colleges);
lvColleges.setPrefSize(300,150);
MultipleSelectionModel<String> lvSelModel =
lvColleges.getSelectionModel();
lvSelModel.selectedItemProperty().
addListener(new ChangeListener<String>() {
public void changed(ObservableValue<? extends String> changed,
String oldVal, String newVal)
{
response.setText("You selected " + newVal);
}
});
root.getChildren().add(title);
root.getChildren().add(lvColleges);
root.getChildren().add(response);
Scene scene = new Scene(root, 350, 300);
primaryStage.setTitle("ListView");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
} | [
"[email protected]"
] | |
37db1bb762a9ce178f07ffbc2788412ae6aa2654 | 2c01557872502bcbe08478f0660980c2641856d9 | /src/main/java/com/patrick/replogle/javazoos/models/ZooAnimals.java | 40750b367cf2b3831bbb89fa1106d7ac116e1da5 | [
"MIT"
] | permissive | patrick-replogle/java-zoos | 2950bfc15aa697aa523309629b944b6b4ba0ed79 | 778479c2948838681e4297c37961a8083fc3a596 | refs/heads/master | 2022-12-18T04:10:32.466884 | 2020-09-16T01:41:54 | 2020-09-16T01:41:54 | 295,536,072 | 0 | 0 | MIT | 2020-09-16T01:41:55 | 2020-09-14T20:52:10 | Java | UTF-8 | Java | false | false | 1,824 | java | package com.patrick.replogle.javazoos.models;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Table(name = "zooanimals")
@IdClass(ZooAnimalsId.class)
public class ZooAnimals extends Auditable implements Serializable
{
@Id
@ManyToOne
@JoinColumn(name = "zooid")
@JsonIgnoreProperties(value = "animals", allowSetters = true)
private Zoo zoo;
@Id
@ManyToOne
@JoinColumn(name = "animalid")
@JsonIgnoreProperties(value = "zoos", allowSetters = true)
private Animal animal;
private String incomingzoo;
public ZooAnimals()
{
}
public ZooAnimals(Zoo zoo, Animal animal, String incomingzoo)
{
this.zoo = zoo;
this.animal = animal;
this.incomingzoo = incomingzoo;
}
public Zoo getZoo()
{
return zoo;
}
public void setZoo(Zoo zoo)
{
this.zoo = zoo;
}
public Animal getAnimal()
{
return animal;
}
public void setAnimal(Animal animal)
{
this.animal = animal;
}
public String getIncomingzoo()
{
return incomingzoo;
}
public void setIncomingzoo(String incomingzoo)
{
this.incomingzoo = incomingzoo;
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ZooAnimals that = (ZooAnimals) o;
return ((this.zoo == null) ? 0: this.zoo.getZooid()) == ((that.zoo == null) ? 0 : that.zoo.getZooid()) &&
(((this.animal == null) ? 0 : this.animal.getAnimalid()) == ((that.animal == null) ? 0 : that.animal.getAnimalid()));
}
@Override
public int hashCode()
{
return 37;
}
}
| [
"[email protected]"
] | |
0c3f7c212088d951068d25b9fe032304adcac83e | 8d23219406b12786d0166ce7cbbe95060602386f | /src/main/java/com/intuit/assignment/util/DisplayUtil.java | 2694a9460c43e667b79d48437a26e6866a28b65c | [] | no_license | ashking94/reservationsystem | 1187ab038ac476b4611d89529d2f66aa84231e33 | 20dd142843eb42a09ab50390aa3a12dd5b2c86c2 | refs/heads/master | 2021-07-16T23:50:55.885855 | 2017-10-24T02:19:27 | 2017-10-24T02:19:27 | 108,016,514 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package com.intuit.assignment.util;
public class DisplayUtil {
public static void printDelimitedStart(String title) {
System.out.println("\n===========================" + title + "==========================");
}
public static void printDelimitedShort(String title) {
System.out.println("\n==========" + title + "==========");
}
}
| [
"[email protected]"
] | |
fbf95802fa1778cf0952ab0c563b426c95caa5b6 | 264732c75c9dbfdbde13c505b8238c3dc19bb8f8 | /test/com/tw/biblioteca/TestSession.java | 859b6a0abb82071f3eda26802de4184ddb116fbf | [] | no_license | ShambhaviP/Biblioteca | 993b9c57a85b01f7943d968e3c605684c25169b3 | 551d689ba38e6d602abc187f15cc3e25f81415e6 | refs/heads/master | 2021-01-25T07:29:05.641978 | 2015-09-18T13:55:06 | 2015-09-18T13:55:06 | 41,843,093 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package com.tw.biblioteca;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class TestSession {
@Test
public void shouldReturnCurrentUser() {
User user = new User("111-1111", "abcd", "CUSTOMER", "Elena Gilbert", "[email protected]", "+1 2345678901");
Session session = new Session(user);
assertEquals(user, session.getCurrentUser());
}
@Test
public void shouldSetTheLoggedInUserToCurrentUser() {
User user = new User("111-1111", "abcd", "CUSTOMER", "Elena Gilbert", "[email protected]", "+1 2345678901");
Session session = new Session(user);
session.setCurrentUser(user);
assertEquals(user, session.getCurrentUser());
}
} | [
"[email protected]"
] | |
fc1d2d957a397ab25fd2e6a5e6aa1938385eacf9 | 13a8013ed218cf2800697bdd1c2cf4d1a97fc478 | /api-common/src/main/java/com/beidou/common/web/CustomSimpleMappingExceptionResolver.java | f8f53c77eec2688b5f641049078037b87612952b | [] | no_license | silencelwy/spiderFr | cf4e4e891c3f03cb5ac525d087042f3252b3fba5 | 2a75486be6ae44dc1c416ddc33d6b36c9c9ebe46 | refs/heads/master | 2023-04-15T00:12:02.134434 | 2016-11-11T09:59:49 | 2016-11-11T09:59:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,029 | java | package com.beidou.common.web;
import com.beidou.common.exception.ErrorCodeException;
import com.beidou.common.exception.NotLoginException;
import com.beidou.common.exception.ServiceException;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Administrator on 2015/6/26.
*/
public class CustomSimpleMappingExceptionResolver extends SimpleMappingExceptionResolver {
@Override
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
String viewName = determineViewName(ex, request);
if (request.getRequestURL().indexOf(".htm")>-1) { // 如果不是异步请求
Integer statusCode = determineStatusCode(request, viewName);
if (statusCode != null) {
applyStatusCodeIfPossible(request, response, statusCode);
}
return getModelAndView(viewName, ex, request);
} else {// JSON,xml格式返回
Map<String, Object> map = new HashMap<String, Object>();
logger.info(ExceptionUtils.getFullStackTrace(ex));
if (ex instanceof ErrorCodeException) {
map.put("content",BaseController.getAjaxException(((ErrorCodeException) ex).getFormatErrorDesc()));
}else if (ex instanceof ServiceException) {
map.put("content",BaseController.getAjaxException(ex.getMessage()));
}else if (ex instanceof NotLoginException) {
map.put("content",BaseController.getAjaxNotLogin(ex.getMessage()));
}else{
map.put("content",BaseController.getAjaxException("系统异常"));
}
return new ModelAndView(viewName, map);
}
}
}
| [
"[email protected]"
] | |
602c2f450447804e0cbfb53e919d25ee5a274e3c | d5567858c56e494d6356198c102f04955d8cf93b | /src/main/java/de/felixhoevel/application/repository/UserRepository.java | ec17820d1d21100ba3f16e6b64a034eb160d0946 | [] | no_license | exylian/garagecontrolServiceImpl | c78de843dd43f4363a05b9925cf51df6139242b6 | f14fe3dca3d8fa580c252785f0d700db6d43fd23 | refs/heads/master | 2022-12-23T08:46:35.184036 | 2019-06-27T15:05:54 | 2019-06-27T15:05:54 | 194,056,140 | 0 | 0 | null | 2022-12-16T05:01:23 | 2019-06-27T08:35:44 | Java | UTF-8 | Java | false | false | 1,589 | java | package de.felixhoevel.application.repository;
import de.felixhoevel.application.domain.User;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
import java.time.Instant;
/**
* Spring Data JPA repository for the {@link User} entity.
*/
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
String USERS_BY_LOGIN_CACHE = "usersByLogin";
String USERS_BY_EMAIL_CACHE = "usersByEmail";
Optional<User> findOneByActivationKey(String activationKey);
List<User> findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant dateTime);
Optional<User> findOneByResetKey(String resetKey);
Optional<User> findOneByEmailIgnoreCase(String email);
Optional<User> findOneByLogin(String login);
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesById(Long id);
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
Page<User> findAllByLoginNot(Pageable pageable, String login);
}
| [
"[email protected]"
] | |
baeaf97d4e9961c629aa6720fd27309aacd5cac8 | 4ad0a43811f7f8bb7f0eccfb634bc6ef1740dce4 | /app/src/main/java/com/example/crc_rajnandangaon/Notice.java | bbbc0aada100f0114f478fab0c5e52f0f381ce12 | [] | no_license | bezaisingh/crc_app | 67df9b11095700536f93760096f61c65338e9f5c | 18afe193c988e8f042085f48d5fda7674f7460e8 | refs/heads/master | 2022-12-19T12:24:55.666655 | 2020-09-24T06:53:29 | 2020-09-24T06:53:29 | 265,632,875 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,424 | java | package com.example.crc_rajnandangaon;
import android.graphics.Color;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class Notice extends AppCompatActivity {
WebView myWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notice);
Toolbar toolbar=findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
setTitle("Notice");
toolbar.setTitleTextColor(Color.WHITE);
toolbar.setSubtitleTextColor(Color.WHITE);
toolbar.setBackgroundColor(Color.parseColor("#008577"));
/////////////
myWebView = findViewById(R.id.webviewTender);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.loadUrl("http://crcrajnandgaon.nic.in/tender/");
myWebView.setWebViewClient(new WebViewClient());
////////////
}
///////////
@Override
public void onBackPressed() {
if (myWebView.canGoBack()) {
myWebView.goBack();
} else {
super.onBackPressed();
}
}
/////////////////
}
| [
"[email protected]"
] | |
2b2b8ea8f64e3823d7411d103c71b0936e23e515 | 45c31d23be3d46b03af0828c1b5bc5739147cc44 | /pcapngdecoder/src/main/java/fr/bmartel/pcapdecoder/structure/PcapNgStructureParser.java | 0609f65034be9f17c9ca25f33b7f8548946db7c4 | [
"MIT"
] | permissive | bertrandmartel/pcapng-decoder | 15e6e8711ebce01a5d943eb248150987a432e46c | e9adb3bdf0d530a650f15aa2a557819da2dd60f8 | refs/heads/master | 2022-02-15T08:05:17.277067 | 2017-01-12T14:53:02 | 2017-01-12T14:53:02 | 34,972,594 | 20 | 9 | MIT | 2020-03-31T09:32:12 | 2015-05-03T03:37:56 | Java | UTF-8 | Java | false | false | 4,595 | java | /*
* The MIT License (MIT)
* <p/>
* Copyright (c) 2015-2016 Bertrand Martel
* <p/>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p/>
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p/>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package fr.bmartel.pcapdecoder.structure;
import fr.bmartel.pcapdecoder.structure.types.IPcapngType;
import fr.bmartel.pcapdecoder.structure.types.impl.EnhancedPacketHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.InterfaceDescriptionHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.InterfaceStatisticsHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.NameResolutionHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.SectionHeader;
/**
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Type |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Total Length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* / Block Body /
* / variable length, aligned to 32 bits /
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Total Length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* @author Bertrand Martel
*/
public class PcapNgStructureParser {
/**
* unique value that identifies the block. Values whose Most Significant Bit (MSB) is equal to 1 are reserved for
* local use. They allow to save private data to the file and to extend the file format
*/
private BlockTypes blockType = BlockTypes.UNKNOWN;
private IPcapngType pcapStruct = null;
/**
* total size of this block
*/
private byte[] blockTotalLength = new byte[32];
/**
* content of the block
*/
private byte[] blockData = new byte[]{};
private boolean isBigEndian = true;
/**
* Build Pcap Ng structure
*
* @param type block type
* @param data block data
*/
public PcapNgStructureParser(BlockTypes type, byte[] data, boolean isBigEndian) {
this.blockType = type;
this.blockData = data;
this.isBigEndian = isBigEndian;
}
public void decode() {
if (blockType == BlockTypes.SECTION_HEADER_BLOCK) {
pcapStruct = new SectionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.INTERFACE_DESCRIPTION_BLOCK) {
pcapStruct = new InterfaceDescriptionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.ENHANCES_PACKET_BLOCK) {
pcapStruct = new EnhancedPacketHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.SIMPLE_PACKET_BLOCK) {
} else if (blockType == BlockTypes.NAME_RESOLUTION_BLOCK) {
pcapStruct = new NameResolutionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.INTERFACE_STATISTICS_BLOCK) {
pcapStruct = new InterfaceStatisticsHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.PACKET_BLOCK) {
}
}
public BlockTypes getBlockType() {
return blockType;
}
public IPcapngType getPcapStruct() {
return pcapStruct;
}
public byte[] getBlockTotalLength() {
return blockTotalLength;
}
public byte[] getBlockData() {
return blockData;
}
public boolean isBigEndian() {
return isBigEndian;
}
}
| [
"[email protected]"
] | |
2577a03ca696aeb29aa4cfe17572aca58f5b8acb | 2e02ef2c5aea5e60c45dd0f7bda90411ac10df63 | /src/main/java/org/opendevup/metier/parsingrequest/IParsingNoteBookRequestMetier.java | 565585ab1ef12281e7c0f6f178a718c0b8b3777f | [] | no_license | adouhane/note-book-intrepreter | db37b409ffbe0706c27172949b1491db784d9350 | 515f9df6e5f31e70accb16ca74208c205aae74b2 | refs/heads/master | 2020-12-29T05:20:44.580790 | 2020-02-05T18:14:23 | 2020-02-05T18:14:23 | 238,468,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 364 | java | package org.opendevup.metier.parsingrequest;
import org.opendevup.dto.NoteBookRequestDto;
import org.opendevup.dto.ProgrammeInformationDto;
import org.opendevup.exception.IllegalCodeFormatException;
public interface IParsingNoteBookRequestMetier {
ProgrammeInformationDto parseNoteBookRequest(NoteBookRequestDto request) throws IllegalCodeFormatException;
}
| [
"[email protected]"
] | |
a8b22fe1bc6c1e79087dd9d3755b613bbf0ed95b | cb756520c3035e7c241cb888e2637f92333f8ff5 | /src/test/java/org/jboss/netty/handler/codec/bayeux/BayeuxUtilTest.java | a4d67b9996c7dc41f66cbacce58e4035b3b4188f | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Viyond/bayeux4netty | a7568751715d6eb00226bb7eaeaaf33ffad8e7c6 | 46e15cf75aecaefb4df19e2a4a92045fa91b6776 | refs/heads/master | 2021-01-24T15:06:59.266186 | 2014-01-25T16:09:38 | 2014-01-25T16:09:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,968 | java | /*
* Copyright 2009 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.jboss.netty.handler.codec.bayeux;
import java.util.List;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author daijun
*/
public class BayeuxUtilTest {
@Test
public void testGetCurrentTime() {
System.out.println("getCurrentTime:");
System.out.println(BayeuxUtil.getCurrentTime());
}
@Test
public void testGenerateUUID() {
System.out.println("getCurrentTime:");
System.out.println(BayeuxUtil.generateUUID());
}
@Test
public void testPrefixMatch(){
System.out.println("Prefix matchingy...");
String[] strings = {"/channel/*","/channel/**","/channel/a","/channel/a/aa","/channel/*/aa"};
String[] expResult = {"/channel/*","/channel/**"};
List<String> result = BayeuxUtil.prefixMatch("/channel/abc", strings);
assertArrayEquals(expResult, result.toArray());
String[] expResult2 = {"/channel/*","/channel/**","/channel/a"};
List<String> result2 = BayeuxUtil.prefixMatch("/channel/*", strings);
assertArrayEquals(expResult2, result2.toArray());
String[] expResult3 = {"/channel/*","/channel/**","/channel/a","/channel/a/aa"};
List<String> result3 = BayeuxUtil.prefixMatch("/channel/**", strings);
assertArrayEquals(expResult3, result3.toArray());
}
}
| [
"[email protected]"
] | |
74979290823ec71364049f578b890a2c81da5c48 | 85bff012a334a6d8091a81523f840899f9939a11 | /src/main/java/com/predicate_proof/generated/predicate_proof_grammarLexer.java | 4cbdca275143a27cb4a22719e7efeb8bc0de0c5e | [] | no_license | dnickel8/Predicate_Proof | b9e09fd6ae9ffa71e471b5474a3bab4a93ed5424 | 724555bb53fb3ba800a87a9890652e6bbfbe2419 | refs/heads/master | 2023-08-12T03:22:07.577680 | 2021-09-30T17:22:03 | 2021-09-30T17:22:03 | 349,170,713 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,325 | java | // Generated from C:/Users/admin/Documents/Studium/Master/Forschungsprojekt/predicate_proof/src/main/java/com/predicate_proof/grammar\predicate_proof_grammar.g4 by ANTLR 4.9.1
package com.predicate_proof.generated;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class predicate_proof_grammarLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, FORMULAEND=13, VARIABLEEND=14, BLOCKBEGIN=15,
BLOCKEND=16, ASSUMPTION=17, PREMISE=18, BOTTOM=19, NOT=20, EXISTQUANTOR=21,
ALLQUANTOR=22, AND=23, OR=24, TRANSFORMATION_ARROW=25, EUQIVALENZ_ARROW=26,
EQ=27, LPAREN=28, RPAREN=29, COMMA=30, EOL=31, DIGIT=32, CHAR=33, WS=34;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
public static String[] modeNames = {
"DEFAULT_MODE"
};
private static String[] makeRuleNames() {
return new String[] {
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
"T__9", "T__10", "T__11", "FORMULAEND", "VARIABLEEND", "BLOCKBEGIN",
"BLOCKEND", "ASSUMPTION", "PREMISE", "BOTTOM", "NOT", "EXISTQUANTOR",
"ALLQUANTOR", "AND", "OR", "TRANSFORMATION_ARROW", "EUQIVALENZ_ARROW",
"EQ", "LPAREN", "RPAREN", "COMMA", "EOL", "DIGIT", "CHAR", "WS"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "'i'", "'e1'", "'e2'", "'i1'", "'i2'", "'e'", "'MT'", "'PBC'",
"'LEM'", "'copy'", "'already proofed'", "'-'", "'\\mid'", "'\\parallel'",
"'\\ll'", "'\\gg'", null, null, "'\\bot'", "'\\neg'", "'\\exists'", "'\\forall'",
"'\\wedge'", "'\\vee'", null, "'\\leftrightarrow'", "'='", null, null,
"','"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, null, null,
null, "FORMULAEND", "VARIABLEEND", "BLOCKBEGIN", "BLOCKEND", "ASSUMPTION",
"PREMISE", "BOTTOM", "NOT", "EXISTQUANTOR", "ALLQUANTOR", "AND", "OR",
"TRANSFORMATION_ARROW", "EUQIVALENZ_ARROW", "EQ", "LPAREN", "RPAREN",
"COMMA", "EOL", "DIGIT", "CHAR", "WS"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
public predicate_proof_grammarLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "predicate_proof_grammar.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public String[] getChannelNames() { return channelNames; }
@Override
public String[] getModeNames() { return modeNames; }
@Override
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2$\u011f\b\1\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
"\t!\4\"\t\"\4#\t#\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3\4\3\5\3\5\3\5\3\6\3\6"+
"\3\6\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13"+
"\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f"+
"\3\f\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3"+
"\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3"+
"\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u009e\n\22"+
"\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u00ab\n\23"+
"\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26"+
"\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30"+
"\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32"+
"\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\5\32\u00e3"+
"\n\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+
"\3\33\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u00fe"+
"\n\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\5\36\u0108\n\36\3\37\3\37"+
"\3 \6 \u010d\n \r \16 \u010e\3 \3 \5 \u0113\n \3!\3!\3\"\3\"\3#\6#\u011a"+
"\n#\r#\16#\u011b\3#\3#\2\2$\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25"+
"\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32"+
"\63\33\65\34\67\359\36;\37= ?!A\"C#E$\3\2\6\4\2\f\f\17\17\3\2\62;\4\2"+
"C\\c|\5\2\13\f\17\17\"\"\2\u0127\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2"+
"\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2"+
"\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2"+
"\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2"+
"\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2"+
"\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2"+
"\2C\3\2\2\2\2E\3\2\2\2\3G\3\2\2\2\5I\3\2\2\2\7L\3\2\2\2\tO\3\2\2\2\13"+
"R\3\2\2\2\rU\3\2\2\2\17W\3\2\2\2\21Z\3\2\2\2\23^\3\2\2\2\25b\3\2\2\2\27"+
"g\3\2\2\2\31w\3\2\2\2\33y\3\2\2\2\35~\3\2\2\2\37\u0088\3\2\2\2!\u008c"+
"\3\2\2\2#\u009d\3\2\2\2%\u00aa\3\2\2\2\'\u00ac\3\2\2\2)\u00b1\3\2\2\2"+
"+\u00b6\3\2\2\2-\u00be\3\2\2\2/\u00c6\3\2\2\2\61\u00cd\3\2\2\2\63\u00e2"+
"\3\2\2\2\65\u00e4\3\2\2\2\67\u00f4\3\2\2\29\u00fd\3\2\2\2;\u0107\3\2\2"+
"\2=\u0109\3\2\2\2?\u0112\3\2\2\2A\u0114\3\2\2\2C\u0116\3\2\2\2E\u0119"+
"\3\2\2\2GH\7k\2\2H\4\3\2\2\2IJ\7g\2\2JK\7\63\2\2K\6\3\2\2\2LM\7g\2\2M"+
"N\7\64\2\2N\b\3\2\2\2OP\7k\2\2PQ\7\63\2\2Q\n\3\2\2\2RS\7k\2\2ST\7\64\2"+
"\2T\f\3\2\2\2UV\7g\2\2V\16\3\2\2\2WX\7O\2\2XY\7V\2\2Y\20\3\2\2\2Z[\7R"+
"\2\2[\\\7D\2\2\\]\7E\2\2]\22\3\2\2\2^_\7N\2\2_`\7G\2\2`a\7O\2\2a\24\3"+
"\2\2\2bc\7e\2\2cd\7q\2\2de\7r\2\2ef\7{\2\2f\26\3\2\2\2gh\7c\2\2hi\7n\2"+
"\2ij\7t\2\2jk\7g\2\2kl\7c\2\2lm\7f\2\2mn\7{\2\2no\7\"\2\2op\7r\2\2pq\7"+
"t\2\2qr\7q\2\2rs\7q\2\2st\7h\2\2tu\7g\2\2uv\7f\2\2v\30\3\2\2\2wx\7/\2"+
"\2x\32\3\2\2\2yz\7^\2\2z{\7o\2\2{|\7k\2\2|}\7f\2\2}\34\3\2\2\2~\177\7"+
"^\2\2\177\u0080\7r\2\2\u0080\u0081\7c\2\2\u0081\u0082\7t\2\2\u0082\u0083"+
"\7c\2\2\u0083\u0084\7n\2\2\u0084\u0085\7n\2\2\u0085\u0086\7g\2\2\u0086"+
"\u0087\7n\2\2\u0087\36\3\2\2\2\u0088\u0089\7^\2\2\u0089\u008a\7n\2\2\u008a"+
"\u008b\7n\2\2\u008b \3\2\2\2\u008c\u008d\7^\2\2\u008d\u008e\7i\2\2\u008e"+
"\u008f\7i\2\2\u008f\"\3\2\2\2\u0090\u0091\7c\2\2\u0091\u0092\7u\2\2\u0092"+
"\u009e\7u\2\2\u0093\u0094\7c\2\2\u0094\u0095\7u\2\2\u0095\u0096\7u\2\2"+
"\u0096\u0097\7w\2\2\u0097\u0098\7o\2\2\u0098\u0099\7r\2\2\u0099\u009a"+
"\7v\2\2\u009a\u009b\7k\2\2\u009b\u009c\7q\2\2\u009c\u009e\7p\2\2\u009d"+
"\u0090\3\2\2\2\u009d\u0093\3\2\2\2\u009e$\3\2\2\2\u009f\u00a0\7r\2\2\u00a0"+
"\u00a1\7t\2\2\u00a1\u00a2\7g\2\2\u00a2\u00ab\7o\2\2\u00a3\u00a4\7r\2\2"+
"\u00a4\u00a5\7t\2\2\u00a5\u00a6\7g\2\2\u00a6\u00a7\7o\2\2\u00a7\u00a8"+
"\7k\2\2\u00a8\u00a9\7u\2\2\u00a9\u00ab\7g\2\2\u00aa\u009f\3\2\2\2\u00aa"+
"\u00a3\3\2\2\2\u00ab&\3\2\2\2\u00ac\u00ad\7^\2\2\u00ad\u00ae\7d\2\2\u00ae"+
"\u00af\7q\2\2\u00af\u00b0\7v\2\2\u00b0(\3\2\2\2\u00b1\u00b2\7^\2\2\u00b2"+
"\u00b3\7p\2\2\u00b3\u00b4\7g\2\2\u00b4\u00b5\7i\2\2\u00b5*\3\2\2\2\u00b6"+
"\u00b7\7^\2\2\u00b7\u00b8\7g\2\2\u00b8\u00b9\7z\2\2\u00b9\u00ba\7k\2\2"+
"\u00ba\u00bb\7u\2\2\u00bb\u00bc\7v\2\2\u00bc\u00bd\7u\2\2\u00bd,\3\2\2"+
"\2\u00be\u00bf\7^\2\2\u00bf\u00c0\7h\2\2\u00c0\u00c1\7q\2\2\u00c1\u00c2"+
"\7t\2\2\u00c2\u00c3\7c\2\2\u00c3\u00c4\7n\2\2\u00c4\u00c5\7n\2\2\u00c5"+
".\3\2\2\2\u00c6\u00c7\7^\2\2\u00c7\u00c8\7y\2\2\u00c8\u00c9\7g\2\2\u00c9"+
"\u00ca\7f\2\2\u00ca\u00cb\7i\2\2\u00cb\u00cc\7g\2\2\u00cc\60\3\2\2\2\u00cd"+
"\u00ce\7^\2\2\u00ce\u00cf\7x\2\2\u00cf\u00d0\7g\2\2\u00d0\u00d1\7g\2\2"+
"\u00d1\62\3\2\2\2\u00d2\u00d3\7/\2\2\u00d3\u00e3\7@\2\2\u00d4\u00d5\7"+
"^\2\2\u00d5\u00d6\7v\2\2\u00d6\u00e3\7q\2\2\u00d7\u00d8\7^\2\2\u00d8\u00d9"+
"\7t\2\2\u00d9\u00da\7k\2\2\u00da\u00db\7i\2\2\u00db\u00dc\7j\2\2\u00dc"+
"\u00dd\7v\2\2\u00dd\u00de\7c\2\2\u00de\u00df\7t\2\2\u00df\u00e0\7t\2\2"+
"\u00e0\u00e1\7q\2\2\u00e1\u00e3\7y\2\2\u00e2\u00d2\3\2\2\2\u00e2\u00d4"+
"\3\2\2\2\u00e2\u00d7\3\2\2\2\u00e3\64\3\2\2\2\u00e4\u00e5\7^\2\2\u00e5"+
"\u00e6\7n\2\2\u00e6\u00e7\7g\2\2\u00e7\u00e8\7h\2\2\u00e8\u00e9\7v\2\2"+
"\u00e9\u00ea\7t\2\2\u00ea\u00eb\7k\2\2\u00eb\u00ec\7i\2\2\u00ec\u00ed"+
"\7j\2\2\u00ed\u00ee\7v\2\2\u00ee\u00ef\7c\2\2\u00ef\u00f0\7t\2\2\u00f0"+
"\u00f1\7t\2\2\u00f1\u00f2\7q\2\2\u00f2\u00f3\7y\2\2\u00f3\66\3\2\2\2\u00f4"+
"\u00f5\7?\2\2\u00f58\3\2\2\2\u00f6\u00fe\7*\2\2\u00f7\u00f8\7^\2\2\u00f8"+
"\u00f9\7n\2\2\u00f9\u00fa\7g\2\2\u00fa\u00fb\7h\2\2\u00fb\u00fc\7v\2\2"+
"\u00fc\u00fe\7*\2\2\u00fd\u00f6\3\2\2\2\u00fd\u00f7\3\2\2\2\u00fe:\3\2"+
"\2\2\u00ff\u0108\7+\2\2\u0100\u0101\7^\2\2\u0101\u0102\7t\2\2\u0102\u0103"+
"\7k\2\2\u0103\u0104\7i\2\2\u0104\u0105\7j\2\2\u0105\u0106\7v\2\2\u0106"+
"\u0108\7+\2\2\u0107\u00ff\3\2\2\2\u0107\u0100\3\2\2\2\u0108<\3\2\2\2\u0109"+
"\u010a\7.\2\2\u010a>\3\2\2\2\u010b\u010d\t\2\2\2\u010c\u010b\3\2\2\2\u010d"+
"\u010e\3\2\2\2\u010e\u010c\3\2\2\2\u010e\u010f\3\2\2\2\u010f\u0113\3\2"+
"\2\2\u0110\u0111\7^\2\2\u0111\u0113\7^\2\2\u0112\u010c\3\2\2\2\u0112\u0110"+
"\3\2\2\2\u0113@\3\2\2\2\u0114\u0115\t\3\2\2\u0115B\3\2\2\2\u0116\u0117"+
"\t\4\2\2\u0117D\3\2\2\2\u0118\u011a\t\5\2\2\u0119\u0118\3\2\2\2\u011a"+
"\u011b\3\2\2\2\u011b\u0119\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011d\3\2"+
"\2\2\u011d\u011e\b#\2\2\u011eF\3\2\2\2\13\2\u009d\u00aa\u00e2\u00fd\u0107"+
"\u010e\u0112\u011b\3\b\2\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
} | [
"[email protected]"
] | |
71ee1beb5035ca09959a75455f4b3f45eee01bb9 | 725e221250ab351bb82a940cc5ff05b18d6926a8 | /src/main/java/com/aot/standard/context/init/InitWebConstantContext.java | 872f0dba0d35847256df1ca50b535f17e443e59e | [] | no_license | jwpark87/pcfems | b5766035a13cffb98f1e15df3ac6b1cfbebf1b0e | 122ef05d77ca85825daff65573f92bed6a5feeb1 | refs/heads/master | 2023-01-19T09:21:39.959412 | 2019-11-10T12:06:30 | 2019-11-10T12:06:30 | 315,533,019 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,923 | java | package com.aot.standard.context.init;
import com.aot.standard.common.constant.CommonCode;
import com.aot.standard.common.exception.CommonExceptionCode;
import com.aot.standard.common.util.AotDateUtils;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTimeZone;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import javax.servlet.ServletContext;
import java.lang.reflect.Field;
import java.util.TimeZone;
@Configuration
public class InitWebConstantContext {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private static String contextPath = null;
@Autowired(required = false)
public void setConstant(final ServletContext servletContext) throws IllegalArgumentException, IllegalAccessException {
this.setContextPath(servletContext);
final Field[] fields = CommonCode.class.getDeclaredFields();
for (final Field field : fields) {
// this.logger.info("servletContext.setAttribute(\"{}\", \"{}\");", field.getName(), field.get(field.getName()));
servletContext.setAttribute(field.getName(), field.get(field.getName()));
}
this.logger.info("CommonCode - Complete");
final CommonExceptionCode[] values = CommonExceptionCode.values();
for (final CommonExceptionCode value : values) {
// this.logger.info("servletContext.setAttribute(\"{}\", \"{}\");", value.name(), value.getCode());
servletContext.setAttribute(value.name(), value.getCode());
}
this.logger.info("CommonResultCode - Complete");
DateTimeZone.setDefault(AotDateUtils.TIME_ZONE);
TimeZone.setDefault(AotDateUtils.TIME_ZONE.toTimeZone());
servletContext.setAttribute("TIME_ZONE_ASIA_SEOUL", AotDateUtils.TIME_ZONE.getID());
servletContext.setAttribute("LOCALE_KOREAN", AotDateUtils.LOCALE.toString());
this.logger.info("DateTimeZone/TimeZone.setDefault(\"{}\"); - Complete", AotDateUtils.TIME_ZONE.getID());
}
private void setContextPath(final ServletContext servletContext) {
if (contextPath == null) {
String tempContextPath = servletContext.getContextPath();
if (StringUtils.equals(tempContextPath, "/")) {
tempContextPath = "";
}
if (StringUtils.isNotEmpty(tempContextPath) && StringUtils.endsWith(tempContextPath, "/")) {
tempContextPath = StringUtils.removeEnd(tempContextPath, "/");
}
contextPath = tempContextPath;
}
servletContext.setAttribute("CONTEXT_PATH", contextPath);
this.logger.info("servletContext.setAttribute(\"CONTEXT_PATH\", \"{}\");", contextPath);
}
public static String getContextPath() {
return contextPath;
}
}
| [
"[email protected]"
] | |
3fae28327a33c281a866df1281d8990952ff0809 | fad51bc1071ddf09fe1fcfd677682612a25c24ee | /lbgInterface.java | bd347e19d276440b803af366d1c9e2c2619bfdd3 | [] | no_license | dean2400t/LBGcompression | f58c5bef91865f30385081460fe590a17457d46e | 3f886babdebca65c1f63dd543a62c169dbc36df5 | refs/heads/master | 2020-03-27T15:47:39.286764 | 2018-08-30T11:30:02 | 2018-08-30T11:30:02 | 146,739,509 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,502 | java |
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.GridLayout;
import java.awt.Image;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.EventListener;
import java.awt.event.ActionEvent;
import java.awt.Dimension;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JRadioButton;
import javax.imageio.ImageIO;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
public class lbgInterface extends JFrame {
private JLabel lblImage;
private JLabel label;
private JPanel contentPane;
private JTextField textField;
private JTextField textField_1;
private String path;
private String saveDirectory;
private JLabel[] labels;
private StatusUpdate statuesUp;
JRadioButton rdbtnGif;
JRadioButton rdbtnJpg;
JRadioButton rdbtnPng;
JRadioButton rdbtnRgba;
JRadioButton rdbtnNewRadioButton;
private static JTextArea tx;
public static EventListener ev;
private final Action action = new SwingAction();
private final Action action_1 = new SwingAction_1();
private final Action action_2 = new SwingAction_2();
private final ButtonGroup buttonGroup = new ButtonGroup();
private final ButtonGroup buttonGroup2 = new ButtonGroup();
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
lbgInterface frame = new lbgInterface();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
private String getMethodName(int method)
{
if (method==1)
return "Voronoi";
else
return "GreedySphere";
}
private static String getFileName(String path)
{
char[] chArray=path.toCharArray();
int startIndex;
if (chArray[chArray.length-4]=='.')
startIndex=chArray.length-5;
else
startIndex=chArray.length-6;
int endIndex=startIndex;
String name="";
while (startIndex>=0)
if (chArray[startIndex]!='\\')
startIndex--;
else
break;
startIndex++;
for (;startIndex<=endIndex;startIndex++)
name+=chArray[startIndex];
return name;
}
private String getConvertedFormat()
{
if (rdbtnJpg.isSelected())
return "jpg";
if (rdbtnPng.isSelected())
return "png";
if (rdbtnGif.isSelected())
return "gif";
return null;
}
private String getColorSpace()
{
if (rdbtnRgba.isSelected())
return "RGBA";
if (rdbtnNewRadioButton.isSelected())
return "RGB";
return null;
}
private int getNumOfClusters()
{
String num=textField.getText();
return Integer.parseInt(num);
}
private double getDistortion()
{
String num=textField_1.getText();
return Double.parseDouble(num);
}
public lbgInterface() {
setResizable(true);
setSize(new Dimension(800, 600));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(new GridLayout(1, 0, 0, 0));
path="";
JPanel panel = new JPanel();
contentPane.add(panel);
statuesUp=new StatusUpdate();
labels=new JLabel[10];
JButton sourceBTN = new JButton("1. Source");
sourceBTN.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
JFileChooser file = new JFileChooser();
file.setCurrentDirectory(
new File(System.getProperty("user.home") + System.getProperty("file.separator") + "Pictures"));
String convertTo=getConvertedFormat();
FileNameExtensionFilter imageFilter = new FileNameExtensionFilter(
"Image files", ImageIO.getReaderFileSuffixes());
file.setAcceptAllFileFilterUsed(false);
file.addChoosableFileFilter(imageFilter);
int result = file.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
file.getSelectedFile().getAbsolutePath();
ImageIcon sourceImage;
path=file.getSelectedFile().getPath();
sourceImage = new ImageIcon(path);
Image image=sourceImage.getImage();
Image resizedImage=image.getScaledInstance(lblImage.getWidth(), lblImage.getHeight(), Image.SCALE_SMOOTH);
sourceImage=new ImageIcon(resizedImage);
lblImage.setIcon(sourceImage);
tx.append(path+"\n");
}
}
});
sourceBTN.setBounds(10, 9, 90, 23);
lblImage = new JLabel("Source Image");
lblImage.setBounds(10, 52, 141, 141);
JButton btnChooseDestenation = new JButton("6. Destenation");
btnChooseDestenation.setBounds(297, 9, 120, 23);
btnChooseDestenation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
JFileChooser chooser;
chooser = new JFileChooser();
chooser.setCurrentDirectory(new java.io.File("."));
chooser.setDialogTitle("Choose folder");
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
//
// disable the "All files" option.
//
chooser.setAcceptAllFileFilterUsed(false);
//
if (chooser.showOpenDialog(lblImage) == JFileChooser.APPROVE_OPTION) {
saveDirectory=chooser.getSelectedFile().toString();
tx.append("Destination folder:" + saveDirectory+"\n");
}
}
}
);
label = new JLabel("Compressed Image");
label.setBounds(288, 52, 141, 141);
textField = new JTextField();
textField.setText("64");
textField.setBounds(157, 210, 76, 20);
textField.setColumns(10);
textField_1 = new JTextField();
textField_1.setText("0.1");
textField_1.setBounds(157, 266, 76, 20);
textField_1.setColumns(10);
JLabel lblCluster = new JLabel("4. Num of Clusters");
lblCluster.setBounds(157, 185, 115, 14);
JLabel lblDistortion = new JLabel("5. Distortion (0.000001-100%)");
lblDistortion.setBounds(157, 241, 180, 14);
rdbtnRgba = new JRadioButton("RGBA");
rdbtnRgba.setBounds(157, 54, 57, 21);
rdbtnRgba.setFont(new Font("Tahoma", Font.PLAIN, 9));
buttonGroup.add(rdbtnRgba);
rdbtnNewRadioButton = new JRadioButton("RGB");
rdbtnNewRadioButton.setBounds(157, 30, 45, 21);
rdbtnNewRadioButton.setFont(new Font("Tahoma", Font.PLAIN, 9));
rdbtnNewRadioButton.setSelected(true);
buttonGroup.add(rdbtnNewRadioButton);
panel.setLayout(null);
panel.add(sourceBTN);
panel.add(lblImage);
panel.add(textField_1);
panel.add(lblDistortion);
panel.add(textField);
panel.add(rdbtnNewRadioButton);
panel.add(lblCluster);
panel.add(label);
panel.add(rdbtnRgba);
panel.add(btnChooseDestenation);
JButton btnConvert = new JButton("7a. Convert");
btnConvert.setBounds(317, 265, 105, 23);
panel.add(btnConvert);
//regular convert button pressed
btnConvert.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
int index=0;
String methodName=getMethodName(1);
String convertTo=getConvertedFormat();
String colorSpace=getColorSpace();
String name=getFileName(path);
BufferedImage bf;
int numOfClusters=getNumOfClusters();
double distortion=getDistortion();
String update="";
try {
if (colorSpace.compareTo("RGB")==0)
{
statuesUp=new StatusUpdate();
Operation oporation=new Operation(path, 1, 1, numOfClusters, distortion, statuesUp);
new Thread(oporation).start();
String fin="Finish";
while (update.compareTo(fin)!=0)
{
update=statuesUp.getUpdate();
tx.append(update);
statuesUp.finishedUpdate();
}
tx.append("\n\n");
update="";
statuesUp.waitSetBF(null, 1);
bf=statuesUp.getBF();
}
else
{
statuesUp=new StatusUpdate();
Operation oporation=new Operation(path, 1, 2, numOfClusters, distortion, statuesUp);
new Thread(oporation).start();
String fin="Finish";
while (update.compareTo(fin)!=0)
{
update=statuesUp.getUpdate();
tx.append(update);
statuesUp.finishedUpdate();
}
tx.append("\n\n");
update="";
statuesUp.waitSetBF(null, 1);
bf=statuesUp.getBF();
}
File outputfile;
if (saveDirectory==null)
outputfile = new File(name+numOfClusters+methodName+"Dis"+distortion+"."+convertTo);
else
outputfile = new File(saveDirectory+"\\"+name+numOfClusters+methodName+"Dis"+distortion+"."+convertTo);
String p=outputfile.getPath();
ImageIO.write(bf, convertTo, outputfile);
ImageIcon sourceImage;
p=outputfile.getPath();
sourceImage = new ImageIcon(p);
Image image=sourceImage.getImage();
Image resizedImage=image.getScaledInstance(label.getWidth(), label.getHeight(), Image.SCALE_SMOOTH);
sourceImage=new ImageIcon(resizedImage);
label.setIcon(sourceImage);
if (saveDirectory==null)
p=name+"OriginalAfterJava."+convertTo;
else
p=saveDirectory+"\\"+name+"OriginalAfterJava."+convertTo;
BufferedImage originalImage = ImageIO.read(new File(path));
outputfile=new File(p);
ImageIO.write(originalImage, convertTo, outputfile);
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
JButton btnConvert_1 = new JButton("7b. Convert+");
btnConvert_1.setBounds(317, 492, 115, 23);
btnConvert_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
//oporation.encodeWAVfile(imagePath, outputName, 256, 100);
//for (int clusters=2; clusters<=1024; clusters*=2)
int index=0;
String methodName=getMethodName(1);
String name=getFileName(path);
BufferedImage bf = null;
String convertTo=getConvertedFormat();
String colorSpace=getColorSpace();
double distortion=getDistortion();
String update="";
try {
for (int i=2; i<=1024; i*=2)
{
//tx.append(i+": \n");
if (colorSpace.compareTo("RGB")==0)
{
statuesUp=new StatusUpdate();
Operation oporation=new Operation(path, 1, 1, i, distortion, statuesUp);
new Thread(oporation).start();
String fin="Finish";
while (update.compareTo(fin)!=0)
{
update=statuesUp.getUpdate();
tx.append(update);
statuesUp.finishedUpdate();
}
tx.append("\n\n");
update="";
statuesUp.waitSetBF(null, 1);
bf=statuesUp.getBF();
}
else
{
statuesUp=new StatusUpdate();
Operation oporation=new Operation(path, 1, 2, i, distortion, statuesUp);
new Thread(oporation).start();
String fin="Finish";
while (update.compareTo(fin)!=0)
{
update=statuesUp.getUpdate();
tx.append(update);
statuesUp.finishedUpdate();
}
tx.append("\n\n");
update="";
statuesUp.waitSetBF(null, 1);
bf=statuesUp.getBF();
}
File outputfile;
if (saveDirectory==null)
outputfile = new File(name+i+methodName+"Dis"+distortion+"."+convertTo);
else
outputfile = new File(saveDirectory+"\\"+name+i+methodName+"Dis"+distortion+"."+convertTo);
String p=outputfile.getPath();
ImageIO.write(bf, convertTo, outputfile);
ImageIcon sourceImage;
p=outputfile.getPath();
sourceImage = new ImageIcon(p);
Image image=sourceImage.getImage();
Image resizedImage=image.getScaledInstance(labels[index].getWidth(), labels[index].getHeight(), Image.SCALE_SMOOTH);
sourceImage=new ImageIcon(resizedImage);
labels[index].setIcon(sourceImage);
index++;
if (i==1024)
{
sourceImage = new ImageIcon(p);
image=sourceImage.getImage();
resizedImage=image.getScaledInstance(label.getWidth(), label.getHeight(), Image.SCALE_SMOOTH);
sourceImage=new ImageIcon(resizedImage);
label.setIcon(sourceImage);
if (saveDirectory==null)
p=name+"OriginalAfterJava."+convertTo;
else
p=saveDirectory+"\\"+name+"OriginalAfterJava."+convertTo;
BufferedImage originalImage = ImageIO.read(new File(path));
outputfile=new File(p);
ImageIO.write(originalImage, convertTo, outputfile);
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
panel.add(btnConvert_1);
labels[0] = new JLabel("2");
labels[0].setBounds(10, 318, 70, 70);
panel.add(labels[0]);
labels[1] = new JLabel("4");
labels[1].setBounds(92, 318, 70, 70);
panel.add(labels[1]);
labels[2] = new JLabel("8");
labels[2].setBounds(173, 318, 70, 70);
panel.add(labels[2]);
labels[3] = new JLabel("16");
labels[3].setBounds(253, 318, 70, 70);
panel.add(labels[3]);
labels[4] = new JLabel("32");
labels[4].setBounds(336, 318, 70, 70);
panel.add(labels[4]);
labels[5] = new JLabel("64");
labels[5].setBounds(10, 411, 70, 70);
panel.add(labels[5]);
labels[6] = new JLabel("128");
labels[6].setBounds(92, 411, 70, 70);
panel.add(labels[6]);
labels[7] = new JLabel("256");
labels[7].setBounds(173, 411, 70, 70);
panel.add(labels[7]);
labels[8] = new JLabel("512");
labels[8].setBounds(253, 411, 70, 70);
panel.add(labels[8]);
labels[9] = new JLabel("1024");
labels[9].setBounds(336, 411, 70, 70);
panel.add(labels[9]);
JLabel lblConvertTo = new JLabel("3. Convert to:");
lblConvertTo.setBounds(157, 82, 80, 14);
panel.add(lblConvertTo);
rdbtnGif = new JRadioButton("GIF");
rdbtnGif.setFont(new Font("Tahoma", Font.PLAIN, 9));
rdbtnGif.setBounds(157, 103, 45, 21);
buttonGroup2.add(rdbtnGif);
panel.add(rdbtnGif);
rdbtnJpg = new JRadioButton("JPG");
rdbtnJpg.setFont(new Font("Tahoma", Font.PLAIN, 9));
rdbtnJpg.setBounds(157, 127, 45, 21);
buttonGroup2.add(rdbtnJpg);
panel.add(rdbtnJpg);
rdbtnPng = new JRadioButton("PNG");
rdbtnPng.setFont(new Font("Tahoma", Font.PLAIN, 9));
rdbtnPng.setBounds(157, 151, 45, 21);
rdbtnPng.setSelected(true);
buttonGroup2.add(rdbtnPng);
panel.add(rdbtnPng);
tx=new JTextArea();
JScrollPane scroll=new JScrollPane(tx);
scroll.setMaximumSize(new Dimension(200, 400));
scroll.setLocation(456, 9);
scroll.setSize(304, 531);
scroll.setVerticalScrollBarPolicy(scroll.VERTICAL_SCROLLBAR_ALWAYS);
panel.add(scroll);
JLabel lblPowerOfTwo = new JLabel("Power of two samples: 2,4,8,16,...,1024.");
lblPowerOfTwo.setFont(new Font("Arial", Font.BOLD, 12));
lblPowerOfTwo.setBounds(10, 297, 243, 23);
panel.add(lblPowerOfTwo);
JLabel label_12 = new JLabel("2. Color Space");
label_12.setBounds(157, 9, 100, 23);
panel.add(label_12);
}
private class SwingAction extends AbstractAction {
public SwingAction() {
putValue(NAME, "SwingAction");
putValue(SHORT_DESCRIPTION, "Some short description");
}
public void actionPerformed(ActionEvent e) {
}
}
private class SwingAction_1 extends AbstractAction {
public SwingAction_1() {
putValue(NAME, "SwingAction_1");
putValue(SHORT_DESCRIPTION, "Some short description");
}
public void actionPerformed(ActionEvent e) {
}
}
private class SwingAction_2 extends AbstractAction {
public SwingAction_2() {
putValue(NAME, "SwingAction_2");
putValue(SHORT_DESCRIPTION, "Some short description");
}
public void actionPerformed(ActionEvent e) {
}
}
}
| [
"[email protected]"
] | |
77fbe15575541c73a2fdb8529a1fe859f8d69603 | 4edf4bd86e9e1bc1147992c05e83bcb39b0437df | /app/src/main/java/com/example/balakrishnaballi/cricboardapp/module/AppModule.java | 85b194035c72be4833c840ae0bbf203aa7488d8e | [] | no_license | balub513/CricBoardApp | 1b145dc9a0328265e304595c749b44c7ff1c785f | be6a7345abae90b0d555ba8dc6d6ee6856c47c06 | refs/heads/master | 2022-12-20T07:22:44.089714 | 2020-09-17T08:40:57 | 2020-09-17T08:40:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package com.example.balakrishnaballi.cricboardapp.module;
import android.app.Application;
import android.content.Context;
import com.example.balakrishnaballi.cricboardapp.application.CricboardApplication;
import dagger.Module;
import dagger.Provides;
@Module
public class AppModule {
Context context;
public AppModule(Context context) {
this.context = context;
}
@Provides
public Context provideContext() {
return context;
}
}
| [
"[email protected]"
] | |
cf2e8e0cd98149aa47d145825ab29e4f34b4b5d5 | c6992ce8db7e5aab6fd959c0c448659ab91b16ce | /sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/samples/java/com/azure/resourcemanager/azurearcdata/SqlManagedInstancesListByResourceGroupSamples.java | 1a4645d715c1425465d158c1ba1977f137d4cffd | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"CC0-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later"
] | permissive | g2vinay/azure-sdk-for-java | ae6d94d583cc2983a5088ec8f6146744ee82cb55 | b88918a2ba0c3b3e88a36c985e6f83fc2bae2af2 | refs/heads/master | 2023-09-01T17:46:08.256214 | 2021-09-23T22:20:20 | 2021-09-23T22:20:20 | 161,234,198 | 3 | 1 | MIT | 2020-01-16T20:22:43 | 2018-12-10T20:44:41 | Java | UTF-8 | Java | false | false | 910 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.azurearcdata;
import com.azure.core.util.Context;
/** Samples for SqlManagedInstances ListByResourceGroup. */
public final class SqlManagedInstancesListByResourceGroupSamples {
/**
* Sample code: Gets all SQL Instance in a resource group.
*
* @param azureArcDataManager Entry point to AzureArcDataManager. The AzureArcData management API provides a RESTful
* set of web APIs to manage Azure Data Services on Azure Arc Resources.
*/
public static void getsAllSQLInstanceInAResourceGroup(
com.azure.resourcemanager.azurearcdata.AzureArcDataManager azureArcDataManager) {
azureArcDataManager.sqlManagedInstances().listByResourceGroup("testrg", Context.NONE);
}
}
| [
"[email protected]"
] | |
6a2a79ffdac30bef881f464c79f2713934fe643b | 89a05c4cdcd8b2d8afdff39623377c84c1157041 | /src/test/java/com/example/dawon_lpg/DaWonLpgApplicationTests.java | 49ff12951f6b3d6cc7dd9d7628cc6f0afd777175 | [] | no_license | Wolf31742/DaWon_LPG | 4f584088b5c99c7aa557165aee0c07425eab2dd2 | f58fa328e5fe1458f708de1bf78289888c1daf70 | refs/heads/master | 2023-08-22T06:19:29.523546 | 2021-10-22T10:15:18 | 2021-10-22T10:15:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package com.example.dawon_lpg;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class DaWonLpgApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
ad07f1a13a7dd16070df208ccd39262a7b845f15 | ece51612da919483357ffef392284c51dc6950b3 | /Excel2Code/src/main/java/ls/tools/excel/model/VarExpr.java | 1851d7ce4ebbcc7b22bcdb30a9433c0c0531d049 | [] | no_license | slior/MaybeUseful | a0ba49f0b0170e903e9625ec2486cf56ed794828 | 40a18313838ca2ef3f0f95cc21fd1f5e7d7f10ff | refs/heads/master | 2016-09-02T06:11:58.176511 | 2014-06-27T15:46:40 | 2014-06-27T15:46:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 89 | java | package ls.tools.excel.model;
public interface VarExpr extends Expr
{
String name();
}
| [
"[email protected]"
] | |
0206bd252a222115c3209a391cf32d0ed6009b97 | 6eb4d95e49ab7cb6efc72ca75f65f3750660325d | /src/main/java/com/company/googleplay/GooglePlayDetailInfoScraper.java | 8ab9456675fce92b9d8ed4c0e2328c1ddf3c0b79 | [] | no_license | Sw24sX/GooglePlayScraper | 6880ffde71160dac8b6a2142f0b6ea94984340bd | a538e8cbef826e60cc93426e5b50ec3bec54393f | refs/heads/master | 2023-04-06T13:26:20.954333 | 2021-04-26T13:08:40 | 2021-04-26T13:08:40 | 349,483,315 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,022 | java | package com.company.googleplay;
import com.company.scraper.App;
import com.company.scraper.detailed.FullAppInfo;
import com.company.scraper.detailed.StoreDetailedScraper;
import org.apache.http.client.utils.URIBuilder;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
public class GooglePlayDetailInfoScraper extends StoreDetailedScraper {
public GooglePlayDetailInfoScraper(String appDetailBaseUrl) {
super(appDetailBaseUrl);
}
public GooglePlayDetailInfoScraper() {
super("https://play.google.com/store/apps/details");
}
@Override
public void setQueryDetailedInfoParameters(URIBuilder builder, App app) {
builder.setParameter("id", app.id);
builder.setParameter("hl", "ru");
builder.setParameter("gl", "ru");
}
@Override
public FullAppInfo parseDetailInfoRequest(String responseHTML, App app) throws ParseException {
var document = Jsoup.parse(responseHTML);
var developer = document.getElementsByClass("R8zArc").first().text();
var scoreStr = document.getElementsByClass("BHMmbe").first().text();
var score = (Double)NumberFormat.getNumberInstance().parse(scoreStr);
var images = findImages(document);
var description = findDescription(document);
return new FullAppInfo(app, developer, score, description, images);
}
private List<String> findImages(Document document) {
var images = new ArrayList<String>();
for (Element element :document.getElementsByClass("T75of DYfLw")) {
var src = element.attr("src");
if (src.equals(""))
src = element.attr("data-src");
images.add(src);
}
return images;
}
private String findDescription(Document document) {
return document.getElementsByClass("DWPxHb").first().text();
}
}
| [
"[email protected]"
] | |
70791699f44da0afb8f20cf96703fe40c312f0cf | 5d1601f8088337d892ae307a2049402b411b65a1 | /src/SurroundedRegions.java | 7bec1ea577a3d10e55071b5753afa1ac2fedb327 | [] | no_license | pennywong/leetcode | 999bde274bec65a7d008185f28d82132632f4fc6 | db1b4db69e2a1c09ae5b81254ff574a730568b83 | refs/heads/master | 2021-01-19T13:30:39.109808 | 2015-01-30T01:36:42 | 2015-01-30T01:36:42 | 26,159,140 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,885 | java | import java.util.LinkedList;
import java.util.Queue;
/**
* https://oj.leetcode.com/problems/surrounded-regions/
* <p/>
* Created by Penny on 2015/01/14
*/
public class SurroundedRegions {
public void solve(char[][] board) {
if (board == null)
return;
int row = board.length;
if (row <= 1)
return;
int column = board[0].length;
if (column <= 1)
return;
Queue<String> queue = new LinkedList<String>();
for (int i = 0; i < column; i++) {
if (board[0][i] == 'O')
queue.add("0," + i);
if (board[row - 1][i] == 'O')
queue.add((row - 1) + "," + i);
}
for (int i = 0; i < row; i++) {
if (board[i][0] == 'O')
queue.add(i + ",0");
if (board[i][column - 1] == 'O')
queue.add(i + "," + (column - 1));
}
while (!queue.isEmpty()) {
String string = queue.poll();
String[] strings = string.split(",");
int i = Integer.parseInt(strings[0]);
int j = Integer.parseInt(strings[1]);
board[i][j] = 'Z';
if (i - 1 > 0 && board[i - 1][j] == 'O')
queue.add((i - 1) + "," + j);
if (i + 1 < row && board[i + 1][j] == 'O')
queue.add((i + 1) + "," + j);
if (j - 1 > 0 && board[i][j - 1] == 'O')
queue.add(i + "," + (j - 1));
if (j + 1 < column && board[i][j + 1] == 'O')
queue.add(i + "," + (j + 1));
}
for (int i = 0; i < row; i++) {
for (int j = 0; j < column; j++) {
if (board[i][j] == 'O')
board[i][j] = 'X';
if (board[i][j] == 'Z')
board[i][j] = 'O';
}
}
}
}
| [
"[email protected]"
] | |
da21f359397ccf99a39d2618a8b660f45dee7b1d | 6aa22b1ee230bb446d1244926302cd52ee60d7c3 | /Tinder/app/src/main/java/com/example/tinder/Card/CardListener.java | 9694092080f92415fcd5905384265af98ea5c79a | [] | no_license | Sudhanshu-Jain/Paysense_Project | a0b9ee01372cc7a4a995fcba6b49ac338017c919 | c228f0472ffba76614da0d18318272dc2f31ab23 | refs/heads/master | 2021-01-23T01:40:12.258018 | 2017-03-31T10:52:00 | 2017-03-31T10:52:00 | 85,922,836 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,386 | java | package com.example.tinder.Card;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;
import javax.xml.datatype.Duration;
/**
* Created by sudhanshu on 7/5/16.
*/
public class CardListener implements View.OnTouchListener {
public float x1;
public float x2;
static final int MIN_DISTANCE = 150;
public static final String TAG = CardListener.class.getSimpleName();
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
x1 = event.getX();
break;
case MotionEvent.ACTION_UP:
x2 = event.getX();
float deltaX = x2 - x1;
if (Math.abs(deltaX) > MIN_DISTANCE) {
// Left to Right swipe action
if (x2 > x1) {
Log.i(TAG, "Left to Right");
}
// Right to left swipe action
else {
Log.i(TAG, "Right to Left");
}
} else {
Log.i(TAG, "Please swipe for more distance");
}
// consider as something else - a screen tap for example
break;
}
return true;
}
}
| [
"[email protected]"
] | |
2b7f9269e63720d0bb6cc2b762e31c3e9e4b43bd | bb9c6e7ce32081bf90e8b3c22406bd5e39eac6ff | /src/main/java/edu/zzuli/brand/pojo/po/Items.java | 6b813fa8bea29d9277c3d7e17e1920641e3b5fe6 | [] | no_license | duneF/brand | fad658f66574cd1968a9e5088a550113c4d3a8a0 | a2f1805be0150a5718ae9d3ff7bcaf1a2168e7b5 | refs/heads/master | 2021-01-24T01:29:33.603104 | 2018-02-25T06:36:13 | 2018-02-25T06:36:13 | 122,811,734 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,900 | java | package edu.zzuli.brand.pojo.po;
public class Items {
private String iid;
private String name;
private String function;
private Double budget;
private String icategory;
private String iprotfolio;
private String zishu;
private String ec;
private String year;
private String content;
private String linkman;
private String tel;
private Byte status;
private String bid;
private String cid;
public String getIid() {
return iid;
}
public void setIid(String iid) {
this.iid = iid == null ? null : iid.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getFunction() {
return function;
}
public void setFunction(String function) {
this.function = function == null ? null : function.trim();
}
public Double getBudget() {
return budget;
}
public void setBudget(Double budget) {
this.budget = budget;
}
public String getIcategory() {
return icategory;
}
public void setIcategory(String icategory) {
this.icategory = icategory == null ? null : icategory.trim();
}
public String getIprotfolio() {
return iprotfolio;
}
public void setIprotfolio(String iprotfolio) {
this.iprotfolio = iprotfolio == null ? null : iprotfolio.trim();
}
public String getZishu() {
return zishu;
}
public void setZishu(String zishu) {
this.zishu = zishu == null ? null : zishu.trim();
}
public String getEc() {
return ec;
}
public void setEc(String ec) {
this.ec = ec == null ? null : ec.trim();
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year == null ? null : year.trim();
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public String getLinkman() {
return linkman;
}
public void setLinkman(String linkman) {
this.linkman = linkman == null ? null : linkman.trim();
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel == null ? null : tel.trim();
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public String getBid() {
return bid;
}
public void setBid(String bid) {
this.bid = bid == null ? null : bid.trim();
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid == null ? null : cid.trim();
}
} | [
"[email protected]"
] | |
34162f1773e71ee78465fedba9a908b0dd18896a | a2054e8dbec716aec5af2e0269128c19be9551c1 | /Character_Main/src/net/sf/anathema/character/generic/framework/xml/trait/GenericTraitTemplateFactory.java | ea150526c06ac5ab63e46304546b5d2f19577078 | [] | no_license | oxford-fumble/anathema | a2cf9e1429fa875718460e6017119c4588f12ffe | 2ba9b506297e1e7a413dee7bfdbcd6af80a6d9ec | refs/heads/master | 2021-01-18T05:08:33.046966 | 2013-06-28T14:50:45 | 2013-06-28T14:50:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,868 | java | package net.sf.anathema.character.generic.framework.xml.trait;
import net.sf.anathema.character.generic.framework.xml.trait.pool.GenericTraitTemplatePool;
import net.sf.anathema.character.generic.template.ITraitTemplateFactory;
import net.sf.anathema.character.generic.traits.ITraitTemplate;
import net.sf.anathema.character.generic.traits.types.AbilityType;
import net.sf.anathema.character.generic.traits.types.AttributeType;
import net.sf.anathema.character.generic.traits.types.VirtueType;
import net.sf.anathema.lib.exception.UnreachableCodeReachedException;
import net.sf.anathema.lib.lang.clone.ICloneable;
public class GenericTraitTemplateFactory implements ITraitTemplateFactory, ICloneable<GenericTraitTemplateFactory> {
private GenericTraitTemplatePool abilitiesPool;
private GenericTraitTemplatePool attributesPool;
private GenericTraitTemplatePool virtuesPool;
private GenericTraitTemplate essenceTemplate;
private GenericTraitTemplate willpowerTemplate;
@Override
public ITraitTemplate createWillpowerTemplate() {
return willpowerTemplate;
}
@Override
public ITraitTemplate createEssenceTemplate() {
return essenceTemplate;
}
@Override
public ITraitTemplate createVirtueTemplate(VirtueType type) {
return virtuesPool.getTemplate(type);
}
@Override
public ITraitTemplate createAttributeTemplate(AttributeType type) {
return attributesPool.getTemplate(type);
}
@Override
public ITraitTemplate createAbilityTemplate(AbilityType type) {
return abilitiesPool.getTemplate(type);
}
public void setAbilitiesPool(GenericTraitTemplatePool abilitiesPool) {
this.abilitiesPool = abilitiesPool;
}
public void setAttributesPool(GenericTraitTemplatePool attributesPool) {
this.attributesPool = attributesPool;
}
public void setVirtuesPool(GenericTraitTemplatePool virtuesPool) {
this.virtuesPool = virtuesPool;
}
public void setEssenceTemplate(GenericTraitTemplate essenceTemplate) {
this.essenceTemplate = essenceTemplate;
}
public void setWillpowerTemplate(GenericTraitTemplate willpowerTemplate) {
this.willpowerTemplate = willpowerTemplate;
}
@Override
public GenericTraitTemplateFactory clone() {
GenericTraitTemplateFactory clone;
try {
clone = (GenericTraitTemplateFactory) super.clone();
} catch (CloneNotSupportedException e) {
throw new UnreachableCodeReachedException(e);
}
clone.abilitiesPool = abilitiesPool == null ? null : abilitiesPool.clone();
clone.attributesPool = attributesPool == null ? null : attributesPool.clone();
clone.virtuesPool = virtuesPool == null ? null : virtuesPool.clone();
clone.essenceTemplate = essenceTemplate == null ? null : essenceTemplate.clone();
clone.willpowerTemplate = willpowerTemplate == null ? null : willpowerTemplate.clone();
return clone;
}
} | [
"[email protected]"
] | |
f6a93121b3a20e261b35923d2b2cb83bfedd94fc | bceba483c2d1831f0262931b7fc72d5c75954e18 | /src/qubed/corelogicextensions/CREDITFREEZEPIN.java | 2e80a97ba5089f38ec7672c8adfbe5054ff563fd | [] | no_license | Nigel-Qubed/credit-services | 6e2acfdb936ab831a986fabeb6cefa74f03c672c | 21402c6d4328c93387fd8baf0efd8972442d2174 | refs/heads/master | 2022-12-01T02:36:57.495363 | 2020-08-10T17:26:07 | 2020-08-10T17:26:07 | 285,552,565 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,986 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:53:09 AM CAT
//
package qubed.corelogicextensions;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* <p>Java class for CREDIT_FREEZE_PIN complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CREDIT_FREEZE_PIN">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CreditFreezePINValue" type="{http://www.mismo.org/residential/2009/schemas}MISMOValue" minOccurs="0"/>
* <element name="CreditRepositorySourceType" type="{http://www.mismo.org/residential/2009/schemas}CreditRepositorySourceEnum" minOccurs="0"/>
* <element name="CreditRepositorySourceTypeOtherDescription" type="{http://www.mismo.org/residential/2009/schemas}MISMOString" minOccurs="0"/>
* <element name="EXTENSION" type="{http://www.mismo.org/residential/2009/schemas}CREDIT_FREEZE_PIN_EXTENSION" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/>
* <attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/>
* <attribute name="SequenceNumber" type="{http://www.mismo.org/residential/2009/schemas}MISMOSequenceNumber_Base" />
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CREDIT_FREEZE_PIN", propOrder = {
"creditFreezePINValue",
"creditRepositorySourceType",
"creditRepositorySourceTypeOtherDescription",
"extension"
})
public class CREDITFREEZEPIN {
@XmlElementRef(name = "CreditFreezePINValue", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<MISMOValue> creditFreezePINValue;
@XmlElementRef(name = "CreditRepositorySourceType", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<CreditRepositorySourceEnum> creditRepositorySourceType;
@XmlElementRef(name = "CreditRepositorySourceTypeOtherDescription", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<MISMOString> creditRepositorySourceTypeOtherDescription;
@XmlElement(name = "EXTENSION")
protected CREDITFREEZEPINEXTENSION extension;
@XmlAttribute(name = "SequenceNumber")
protected Integer sequenceNumber;
@XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String label;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the creditFreezePINValue property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link MISMOValue }{@code >}
*
*/
public JAXBElement<MISMOValue> getCreditFreezePINValue() {
return creditFreezePINValue;
}
/**
* Sets the value of the creditFreezePINValue property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link MISMOValue }{@code >}
*
*/
public void setCreditFreezePINValue(JAXBElement<MISMOValue> value) {
this.creditFreezePINValue = value;
}
/**
* Gets the value of the creditRepositorySourceType property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CreditRepositorySourceEnum }{@code >}
*
*/
public JAXBElement<CreditRepositorySourceEnum> getCreditRepositorySourceType() {
return creditRepositorySourceType;
}
/**
* Sets the value of the creditRepositorySourceType property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link CreditRepositorySourceEnum }{@code >}
*
*/
public void setCreditRepositorySourceType(JAXBElement<CreditRepositorySourceEnum> value) {
this.creditRepositorySourceType = value;
}
/**
* Gets the value of the creditRepositorySourceTypeOtherDescription property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link MISMOString }{@code >}
*
*/
public JAXBElement<MISMOString> getCreditRepositorySourceTypeOtherDescription() {
return creditRepositorySourceTypeOtherDescription;
}
/**
* Sets the value of the creditRepositorySourceTypeOtherDescription property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link MISMOString }{@code >}
*
*/
public void setCreditRepositorySourceTypeOtherDescription(JAXBElement<MISMOString> value) {
this.creditRepositorySourceTypeOtherDescription = value;
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link CREDITFREEZEPINEXTENSION }
*
*/
public CREDITFREEZEPINEXTENSION getEXTENSION() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link CREDITFREEZEPINEXTENSION }
*
*/
public void setEXTENSION(CREDITFREEZEPINEXTENSION value) {
this.extension = value;
}
/**
* Gets the value of the sequenceNumber property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getSequenceNumber() {
return sequenceNumber;
}
/**
* Sets the value of the sequenceNumber property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setSequenceNumber(Integer value) {
this.sequenceNumber = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
| [
"[email protected]"
] | |
f401e3c5f0fac288b86716742604ca40f25c8f54 | b310cac258af598b192797624eaa300a41b701e5 | /src/test/java/MoodTest.java | c489d2a7e7f435529f6ea12c59d0c61de4d6a272 | [] | no_license | santonv/SelenideMoodPanda | 0ce7c23561eda7b35a1b40e52f2b2af577108abc | 7389cb8b525d848f3a465161d1de6554e0ac7f35 | refs/heads/master | 2023-06-25T12:11:33.038507 | 2021-07-31T06:49:09 | 2021-07-31T06:49:09 | 390,802,689 | 0 | 0 | null | 2021-07-31T06:42:20 | 2021-07-29T17:29:18 | Java | UTF-8 | Java | false | false | 2,026 | java |
import io.qameta.allure.*;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
import static com.codeborne.selenide.Selenide.*;
import static com.codeborne.selenide.Condition.*;
import static com.codeborne.selenide.Selenide.open;
public class MoodTest extends BaseTest{
@Epic("Tests for My updates page")
@Feature(value = "Test for opening My updates page")
@Severity(SeverityLevel.MINOR)
@Story("Open My Updates page")
@Test
public void openMyUpdates(){
open("Login");
loginPage.Login(EMAIL,PASSWORD);
moodPage.clickOnMyUpdatesPage("My updates");
$$(By.xpath("//span[contains(@class,'navbar')]")).findBy(text("Feed")).shouldBe(exist);
}
@Epic("Tests for My updates page")
@Feature(value = "Test for Add new Mood")
@Severity(SeverityLevel.MINOR)
@Story("Create new Mood")
@Test
public void updateMood(){
open("login");
loginPage.Login(EMAIL,PASSWORD);
moodPage.clickOnMyUpdatesPage("My updates");
moodPage.clickUpdateMoodButton();
int value = moodPage.getMoodValue();
moodPage.updateNewMood(value,3);
$(By.xpath("//div[contains(@class,'p7675665 media m1')]")).shouldBe(exist).shouldBe(text("8"));
}
@Epic("Tests for My updates page")
@Feature(value = "Test for send Hug")
@Severity(SeverityLevel.MINOR)
@Story("Send hug to Mood")
@Test
public void clickSendHug(){
open("login");
loginPage.Login(EMAIL,PASSWORD);
moodPage.clickOnMyUpdatesPage("My updates");
moodPage.sendHug("1");
$(By.xpath("//*[@class='badge mchugs1']")).shouldBe(text("1"));
}
@Epic("Tests for My updates page")
@Feature(value = "Test for delete Mood")
@Severity(SeverityLevel.MINOR)
@Story("Delete Mood")
@Test
public void deleteMood(){
open("login");
loginPage.Login(EMAIL,PASSWORD);
moodPage.clickOnMyUpdatesPage("My updates");
moodPage.deleteMood("0");
}
}
| [
"[email protected]"
] | |
5bb57eef13a2fc20c9f148a2de922dc1d4a3dbf0 | c89ef3832c11b98150999ef2b54c893e5cd3f728 | /src/com/paulodorow/decypher/operations/Subtraction.java | 9f77a4b69696e18cc0218fc438a5c3f2bd97b6c1 | [] | no_license | Mars-Wei/decypher | 39f30803b79e729637344e5ba0f1575ae7c84c03 | 19bf83936279a810b67382112ae99b9c5706f813 | refs/heads/master | 2020-03-18T22:58:46.525641 | 2017-08-10T18:13:01 | 2017-08-10T18:13:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,086 | java | package com.paulodorow.decypher.operations;
import java.util.ArrayList;
import java.util.List;
import com.paulodorow.decypher.HasContext;
import com.paulodorow.decypher.IsOperand;
public class Subtraction extends Operation<Subtraction> {
List<IsOperand<?>> subtraends;
public Subtraction() {
subtraends = new ArrayList<>();
}
public Subtraction(IsOperand<?> minuend) {
this();
subtract(minuend);
}
public Subtraction(IsOperand<?> minuend, IsOperand<?> subtraend) {
this();
subtract(minuend, subtraend);
}
public Subtraction subtract(IsOperand<?>... subtraends) {
for (IsOperand<?> subtraend : subtraends) if (subtraend != null) this.subtraends.add(subtraend);
return this;
}
@Override
public String toReturnableString(HasContext context) {
StringBuilder subtraction = new StringBuilder();
for (IsOperand<?> subtraend : subtraends) {
if (subtraction.length() > 0) subtraction.append(" - ");
subtraction.append(context.getInContext(subtraend).toReturnableString(context));
}
return subtraction.toString();
}
}
| [
"[email protected]"
] | |
2ec2bded9af6d055bc959bbe4de55ce76da3bb4e | 1302f07a62aae0d31a5ddef0190db0ce4ae1aaf2 | /src/lesson4/Main.java | 958e47588654651ac2abf1d2b287dbd8315ce3e8 | [] | no_license | happysharkable/algorythms | 5586ed2c08b1312384e49aecf79f2de8bc930dab | c706836beef0c9c3324edc18221a3b01245663d6 | refs/heads/master | 2023-04-03T03:20:34.149819 | 2021-04-09T17:43:42 | 2021-04-09T17:43:42 | 282,243,856 | 0 | 0 | null | 2021-04-09T17:45:01 | 2020-07-24T14:42:37 | Java | UTF-8 | Java | false | false | 1,084 | java | package lesson4;
import java.util.ListIterator;
public class Main {
public static void main(String[] args) {
MyLinkedList<String> mll = new MyLinkedList<>();
mll.insertFirst("Katia");
mll.insertFirst("Petia");
mll.insertFirst("Maria");
System.out.println(mll);
ListIterator<String> iter = mll.listIterator();
System.out.println(iter.next());
System.out.println(iter.next());
System.out.println(iter.next());
System.out.println(iter.previous());
System.out.println(iter.previous());
// mll.insertLast("Bob");
// System.out.println(mll);
// System.out.println(mll.deleteFirst());
// System.out.println(mll);
//
// System.out.println(mll.getFirst());
// mll.insert(1, "Sasha");
// System.out.println(mll);
//
// System.out.println(mll.delete("Bob"));
// System.out.println(mll);
//
//
// for (String s : mll) {
// System.out.println(s);
// }
}
}
| [
"[email protected]"
] | |
6b07c5059611b77a7bc54801a5ad04f25b20e41e | 7d3da8cd995c03e0a76e61f9441b000f779fb0b3 | /app/src/main/java/com/example/twirlbug/Split_The_Bill/EditPlaceActivity.java | a4bd470c70989efb8d68ba4fb005c003d3dad7e1 | [] | no_license | Twirlbug/SQLMultiTableDatabse | ff78e84c75d4755afec3d2902a74c3b9fc6466ab | 0645896586983f1450235c4b8feb249ddd383249 | refs/heads/master | 2021-01-10T15:21:19.916811 | 2016-04-07T04:23:14 | 2016-04-07T04:23:14 | 53,985,478 | 1 | 0 | null | 2016-04-07T04:23:15 | 2016-03-15T23:18:42 | Java | UTF-8 | Java | false | false | 6,453 | java | package com.example.twirlbug.Split_The_Bill;
import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.example.twirlbug.Split_The_Bill.database.DatabaseHelper;
import com.example.twirlbug.Split_The_Bill.database.DbSchema;
/**
* Created by Twirlbug on 3/17/2016.
*/
public class EditPlaceActivity extends AppCompatActivity {
private static final int PLACE_AUTOCOMPLETE_REQUEST_CODE = 0;
private EditText Place_Name;
private String getPlace_Name;
private EditText Place_Address;
private String getPlace_Address;
private Button mCancel;
int getPlace_Id;
private Button place_googlefind;
private Button place_submit;
private Button place_delete;
private Context db = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.place_edit_layout);
Place_Name = (EditText) findViewById(R.id.Place_Name);
Place_Address = (EditText) findViewById(R.id.Place_Address);
place_googlefind = (Button) findViewById(R.id.Place_googlefind);
place_submit = (Button) findViewById(R.id.Place_Button);
place_delete = (Button) findViewById(R.id.Place_delete);
mCancel = (Button) findViewById(R.id.cancel_Button);
mCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
Bundle b = getIntent().getExtras();
getPlace_Id = b.getInt("id");
if (getPlace_Id == 0) {
Toast.makeText(getBaseContext(), "Cannot Edit/Delete Place None", Toast.LENGTH_LONG).show();
finish();
}
DatabaseHelper dbh = new DatabaseHelper(getApplicationContext());
Place_Name.setText(dbh.PlaceToString(getPlace_Id));
Place_Address.setText(dbh.PlaceToAddress(getPlace_Id));
place_googlefind.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getBaseContext(), ReplacePlace.class);
startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);
}
});
place_submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//convert input info to strings
String oldname = getPlace_Name;
getPlace_Name = Place_Name.getText().toString();
getPlace_Address = Place_Address.getText().toString();
if (getPlace_Name.length() > 0) {
//Adds location and address to the database
DatabaseHelper dbh = new DatabaseHelper(db);
SQLiteDatabase db = dbh.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(DbSchema.TableInfo.Place.PID, getPlace_Id);
values.put(DbSchema.TableInfo.Place.PN, getPlace_Name);
values.put(DbSchema.TableInfo.Place.PA, getPlace_Address);
db.update(DbSchema.TableInfo.Place_Table, values,
DbSchema.TableInfo.Place.PID + " = ?",
new String[] {Integer.toString(getPlace_Id)});
Toast.makeText(getBaseContext(), "Edited " + oldname + " to " + getPlace_Name + ".", Toast.LENGTH_LONG).show();
//clear out fields
Place_Name.setText("");
Place_Address.setText("");
//return to previous screen
finish();
}
}
});
place_delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showDialogMessage();
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (requestCode == PLACE_AUTOCOMPLETE_REQUEST_CODE) {
if (resultCode == RESULT_OK) {
String address = data.getStringExtra("Address");
String name = data.getStringExtra("Name");
getPlace_Address = address;
getPlace_Name = name;
Place_Name.setText(getPlace_Name);
Place_Address.setText(getPlace_Address);
}
}
}
private void showDialogMessage(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Delete Place");
builder.setMessage("Are you sure you want to delete this place? WARNING: ALL ENTRIES WITH THIS PLACE WILL BE CHANGED TO PLACE NONE");
// Add the buttons
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User clicked OK button
//todo delete cascade Current type and change all occurrences of this to None/ id 0
DatabaseHelper dbh = new DatabaseHelper(db);
SQLiteDatabase db = dbh.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(DbSchema.TableInfo.Deal.PID, "0");
db.update(DbSchema.TableInfo.Deal_Table, values, DbSchema.TableInfo.Deal.PID + " = ?", new String[]{Integer.toString(getPlace_Id)});
db.delete(DbSchema.TableInfo.Place_Table, DbSchema.TableInfo.Place.PID + " = " + getPlace_Id, null);
dialog.cancel();
finish();
}
});
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User cancelled the dialog
}
});
AlertDialog dialog = builder.create();
dialog.show();
}
}
| [
"[email protected]"
] | |
f6ae3dc738c140de2b16869ca7b19f38fe499412 | e7986e1473ac5b2b7cd8884b674b0d52cb280dce | /src/main/java/com/yuqiong/college/service/edu/entity/Subject.java | 7704cba96acbbee0e383fb733b1f6ef304e94b95 | [
"MIT"
] | permissive | qinyuqiong/chollege | ff4a720a1e3fd8da029d927a112e4334a6622ead | 8c269dc2b1ef665c542cd7e0d68a20d0db02e002 | refs/heads/main | 2023-05-08T21:44:44.612844 | 2021-05-25T00:11:47 | 2021-05-25T00:11:47 | 345,519,950 | 0 | 0 | null | 2021-05-25T00:11:48 | 2021-03-08T03:32:22 | Java | UTF-8 | Java | false | false | 1,259 | java | package com.yuqiong.college.service.edu.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 课程科目
* </p>
*
* @author yuqiong
* @since 2021-02-12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_subject")
@ApiModel(value = "Subject对象", description = "课程科目")
public class Subject implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "课程类别ID")
@TableId(value = "id", type = IdType.ID_WORKER_STR)
private String id;
@ApiModelProperty(value = "类别名称")
private String title;
@ApiModelProperty(value = "父ID")
private String parentId;
@ApiModelProperty(value = "排序字段")
private Integer sort;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date gmtCreate;
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date gmtModified;
}
| [
"[email protected]"
] | |
383c9b772d6d11ec646f7e3b9fb304032c9dc02b | 74d5ffa178c3cd3580e16faeb4b75813cffa1e88 | /src/main/java/com/example/recipeapp/services/IngredientServiceImpl.java | 8ec3009dcb83a127fd740c0ef7450e2349ae6e86 | [] | no_license | rbaliwal00/recipe-app | ae0921e3fe0b91c8c5c4fa37b07faa9f6a9ab9c0 | b29b28d188b100a22d7f1581d3df257c8b95c4e7 | refs/heads/main | 2023-07-04T22:58:46.977919 | 2021-08-27T13:45:33 | 2021-08-27T13:45:33 | 394,674,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,094 | java | package com.example.recipeapp.services;
import com.example.recipeapp.commands.IngredientCommand;
import com.example.recipeapp.converters.IngredientCommandToIngredient;
import com.example.recipeapp.converters.IngredientToIngredientCommand;
import com.example.recipeapp.domain.Ingredient;
import com.example.recipeapp.domain.Recipe;
import com.example.recipeapp.repostitories.RecipeRepository;
import com.example.recipeapp.repostitories.UnitOfMeasureRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.Optional;
@Slf4j
@Service
public class IngredientServiceImpl implements IngredientService {
private final IngredientToIngredientCommand ingredientToIngredientCommand;
private final IngredientCommandToIngredient ingredientCommandToIngredient;
private final RecipeRepository recipeRepository;
private final UnitOfMeasureRepository unitOfMeasureRepository;
public IngredientServiceImpl(IngredientToIngredientCommand ingredientToIngredientCommand,
IngredientCommandToIngredient ingredientCommandToIngredient,
RecipeRepository recipeRepository,
UnitOfMeasureRepository unitOfMeasureRepository) {
this.ingredientToIngredientCommand = ingredientToIngredientCommand;
this.ingredientCommandToIngredient = ingredientCommandToIngredient;
this.recipeRepository = recipeRepository;
this.unitOfMeasureRepository = unitOfMeasureRepository;
}
@Override
public IngredientCommand findByRecipeIdAndIngredientId(Long recipeId, Long ingredientId) {
Optional<Recipe> recipeOptional = recipeRepository.findById(recipeId);
if (!((Optional<?>) recipeOptional).isPresent()){
//todo impl error handling
log.error("recipe id not found. Id: " + recipeId);
}
Recipe recipe = recipeOptional.get();
Optional<IngredientCommand> ingredientCommandOptional = recipe.getIngredients().stream()
.filter(ingredient -> ingredient.getId().equals(ingredientId))
.map( ingredient -> ingredientToIngredientCommand.convert(ingredient)).findFirst();
if(!ingredientCommandOptional.isPresent()){
//todo impl error handling
log.error("Ingredient id not found: " + ingredientId);
}
return ingredientCommandOptional.get();
}
@Override
@Transactional
public IngredientCommand saveIngredientCommand(IngredientCommand command) {
Optional<Recipe> recipeOptional = recipeRepository.findById(command.getRecipeId());
if(!recipeOptional.isPresent()){
//todo toss error if not found!
log.error("Recipe not found for id: " + command.getRecipeId());
return new IngredientCommand();
} else {
Recipe recipe = recipeOptional.get();
Optional<Ingredient> ingredientOptional = recipe
.getIngredients()
.stream()
.filter(ingredient -> ingredient.getId().equals(command.getId()))
.findFirst();
if(ingredientOptional.isPresent()){
Ingredient ingredientFound = ingredientOptional.get();
ingredientFound.setDescription(command.getDescription());
ingredientFound.setAmount(command.getAmount());
ingredientFound.setUom(unitOfMeasureRepository
.findById(command.getUom().getId())
.orElseThrow(() -> new RuntimeException("UOM NOT FOUND"))); //todo address this
} else {
//add new Ingredient
Ingredient ingredient = ingredientCommandToIngredient.convert(command);
ingredient.setRecipe(recipe);
recipe.addIngredient(ingredient);
}
Recipe savedRecipe = recipeRepository.save(recipe);
Optional<Ingredient> savedIngredientOptional = savedRecipe.getIngredients().stream()
.filter(recipeIngredients -> recipeIngredients.getId().equals(command.getId()))
.findFirst();
//check by description
if(!savedIngredientOptional.isPresent()){
//not totally safe... But best guess
savedIngredientOptional = savedRecipe.getIngredients().stream()
.filter(recipeIngredients -> recipeIngredients.getDescription().equals(command.getDescription()))
.filter(recipeIngredients -> recipeIngredients.getAmount().equals(command.getAmount()))
.filter(recipeIngredients -> recipeIngredients.getUom().getId().equals(command.getUom().getId()))
.findFirst();
}
//to do check for fail
return ingredientToIngredientCommand.convert(savedIngredientOptional.get());
}
}
@Override
public void deleteById(Long recipeId, Long idToDelete) {
log.debug("Deleting ingredient: " + recipeId + ":" + idToDelete);
Optional<Recipe> recipeOptional = recipeRepository.findById(recipeId);
if(recipeOptional.isPresent()){
Recipe recipe = recipeOptional.get();
log.debug("found recipe");
Optional<Ingredient> ingredientOptional = recipe
.getIngredients()
.stream()
.filter(ingredient -> ingredient.getId().equals(idToDelete))
.findFirst();
if(ingredientOptional.isPresent()){
log.debug("found Ingredient");
Ingredient ingredientToDelete = ingredientOptional.get();
ingredientToDelete.setRecipe(null);
recipe.getIngredients().remove(ingredientOptional.get());
recipeRepository.save(recipe);
}
} else {
log.debug("Recipe Id Not found. Id:" + recipeId);
}
}
}
| [
"[email protected]"
] | |
99e62baa6e154dd66a5f1c949506e12438059f53 | ac55c6f74fc083c83b20485a64ab1dfab59b5706 | /app/src/main/java/com/example/dell/childcare/LearningActivity.java | acbf4d71c43af222f911e89f4f15a6e8ea90ce8b | [] | no_license | BinayMdr/ChildCare | fb8b9b02476eea21c1dd288d94830a8c24357528 | ad8468c67e9c5fe7688135f28b17dc2cba7dda63 | refs/heads/master | 2020-06-16T14:11:23.449766 | 2019-07-03T17:41:23 | 2019-07-03T17:41:23 | 195,603,992 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,793 | java | package com.example.dell.childcare;
import android.support.design.widget.TabLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class LearningActivity extends AppCompatActivity{
private static final String TAG = "MainActivity";
private SectionPageAdapter mSectionsPageAdapter;
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_learning);
Log.d(TAG, "onCreate: Starting.");
mSectionsPageAdapter = new SectionPageAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
setupViewPager(mViewPager);
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
}
private void setupViewPager(ViewPager viewPager) {
SectionPageAdapter adapter = new SectionPageAdapter(getSupportFragmentManager());
adapter.addFragment(new FragementTab1(), "Number");
adapter.addFragment(new FragmentTab2(), "Alphabet");
viewPager.setAdapter(adapter);
}
}
| [
"[email protected]"
] | |
1d035dea94b7fd86e4441a5a388ec14eb7dffc47 | 4b707c9d1dadc4927bc15cbf5cdebf7a70be2d79 | /app/src/main/java/nl/mheijden/prog3app/model/data/SQLiteLocalDatabase.java | 219b0397c6e7452df290402d0d9e66a2fc3c351e | [] | no_license | survivorbat/Studentmeals-android-exam | 55f3b37b3516a6ebc2a8865980597628201eb823 | 6eaf0925a5c4535246c6c638531d1b508501ce84 | refs/heads/master | 2021-09-05T01:40:37.427886 | 2018-01-23T14:09:19 | 2018-01-23T14:09:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,790 | java | package nl.mheijden.prog3app.model.data;
import android.content.Context;
import android.database.sqlite.SQLiteOpenHelper;
/**
* Gemaakt door Maarten van der Heijden on 1-1-2018.
*/
public class SQLiteLocalDatabase extends SQLiteOpenHelper {
/**
* Name of the database and the current version
*/
private static final String DATABASE_NAME = "StudentMaaltijden";
private static final int DATABASE_VERSION = 9;
/**
* @param context of the application
*/
public SQLiteLocalDatabase(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
/**
* @param sqLiteDatabase from the SQLiteOpenHelper class
*/
@Override
public void onCreate(android.database.sqlite.SQLiteDatabase sqLiteDatabase) {
sqLiteDatabase.execSQL("DROP TABLE IF EXISTS Students; DROP TABLE IF EXISTS Meals; DROP TABLE IF EXISTS FellowEaters");
sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `FellowEaters` (\n" +
" `ID` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" +
" `AmountOfGuests` int(11) NOT NULL DEFAULT '0',\n" +
" `StudentNumber` int(11) NOT NULL,\n" +
" `MealID` int(11) NOT NULL\n" +
")");
sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `Meals` (\n" +
" `ID` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" +
" `Dish` varchar(100) NOT NULL,\n" +
" `DateTime` datetime NOT NULL,\n" +
" `Info` text NOT NULL,\n" +
" `ChefID` int(11) NOT NULL,\n" +
" `Picture` longblob NOT NULL,\n" +
" `Price` decimal(10,0) NOT NULL,\n" +
" `MaxFellowEaters` int(11) NOT NULL,\n" +
" `DoesCookEat` tinyint(1) NOT NULL DEFAULT '1'\n" +
")");
sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `Students` (\n" +
" `StudentNumber` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" +
" `FirstName` varchar(50) NOT NULL,\n" +
" `Insertion` varchar(50) DEFAULT NULL,\n" +
" `LastName` varchar(50) NOT NULL,\n" +
" `Email` varchar(50) NOT NULL,\n" +
" `PhoneNumber` varchar(30) DEFAULT NULL\n" +
")");
}
/**
* @param sqLiteDatabase from the SQLiteOpenHelper class
* @param i old version
* @param i1 new version
*/
@Override
public void onUpgrade(android.database.sqlite.SQLiteDatabase sqLiteDatabase, int i, int i1) {
sqLiteDatabase.execSQL("DROP TABLE IF EXISTS Students; DROP TABLE IF EXISTS Meals; DROP TABLE IF EXISTS FellowEaters");
this.onCreate(sqLiteDatabase);
}
}
| [
"[email protected]"
] | |
76f931187d5b2ac8337aed4d68aff55d64d2726b | 30c9dda3b97566da565aa641f96c13a624efcea3 | /src/main/java/cxsjcj/hdsx/com/view/badgeview/utils/StringUtils.java | 6c808de890da52f26c625526396343330a6cef36 | [] | no_license | dawitephrem565/ShoppingMall | 664039a72e8c298e5998e3321f767600c6c39f5d | 9b0c7eeb01f4cf57fe82fad55f34d70b14d7cc19 | refs/heads/master | 2020-04-03T12:00:09.435686 | 2015-11-08T13:54:17 | 2015-11-08T13:54:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 664 | java | package cxsjcj.hdsx.com.view.badgeview.utils;
import cxsjcj.hdsx.com.view.badgeview.values.IValue;
import cxsjcj.hdsx.com.view.badgeview.values.TextValue;
public class StringUtils {
public static boolean isNumber(IValue value) {
if (value instanceof TextValue) {
CharSequence str = ((TextValue) value).getValue();
return isNumber(str);
} else {
return false;
}
}
public static boolean isNumber(CharSequence str) {
try {
Double.parseDouble(str.toString());
} catch (NumberFormatException nfe) {
return false;
}
return true;
}
}
| [
"[email protected]"
] | |
f8be355b6ddefa2f2f3798f73c3f5e8ec67d5fc1 | 0ebe3e02b356b492feb38e5278b084f46c8e286a | /src/guardedSuspension/RequestQueue.java | 9e41598cebe6bad9d6a98c7642809a694580caee | [] | no_license | hwjworld/DesginPatternTest | 48f66b5980361214d42b20f8f4f4da39c7bd36ac | 2331e1cfd189936f295c0cd0dc6755c99644e390 | refs/heads/master | 2020-05-20T09:10:26.110219 | 2013-07-24T16:07:30 | 2013-07-24T16:07:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 494 | java | package guardedSuspension;
public class RequestQueue {
private java.util.LinkedList queue;
public RequestQueue() {
queue = new java.util.LinkedList();
}
public synchronized Request getRequest() {
while (queue.size() <= 0) {
try {
wait();
} catch (InterruptedException e) {
}
}
return (Request) queue.removeFirst();
}
public synchronized void putRequest(Request request) {
queue.addLast(request);
notifyAll();
}
}
class Request{
}
| [
"[email protected]"
] | |
b08fccb9d9ee54e2788ae67d955fbcfd346f2f8a | a37f1dd22f565900c457e7a0cff65d45dc14c2fb | /src/cs3500/music/Swingui/Constants.java | e040436a827e8351966beadf341407ea04023bda | [] | no_license | nancyyli/MusicEditorProject | 485e9203e6707d4e6fa61bdc8772f31955fcf2db | a5e8cb1357934c85e1f7b697e933f9e4f6e0c3e7 | refs/heads/master | 2021-06-06T12:45:41.219040 | 2015-12-10T03:36:43 | 2015-12-10T03:36:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package cs3500.music.Swingui;
/**
* Created by sabrinakantor on 11/11/15.
*/
/**
* Represents constants
*/
public class Constants {
public static final int CELL_SIZE = 10;
public static final int CELL_PADDING = (Constants.CELL_SIZE * 4);
}
| [
"[email protected]"
] | |
40669138fc461bb485f48c200a7a47786d9731ba | 9477552462e63e598b4dcdfe73c6bdc697ce99b0 | /Multiple Auto/Java/src/main/java/frc/robot/commands/driveCommands/SimpleDrive.java | 238953e3b086c52ffabd23b70006530047b7200a | [] | no_license | nzalewsk/WorldSkills-Example-Projects | 9ec0d7689452bb7b0a8e95c5b15d0e1483c402f7 | f4e594bbfe86ba98cc2933474d47e3a8565932e7 | refs/heads/main | 2023-07-15T11:30:14.354798 | 2021-08-24T18:28:13 | 2021-08-24T18:28:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,229 | java | package frc.robot.commands.driveCommands;
//WPI imports
import edu.wpi.first.wpilibj2.command.CommandBase;
//RobotContainer import
import frc.robot.RobotContainer;
//Subsystem imports
import frc.robot.subsystems.DriveTrain;
/**
* SimpleDrive class
* <p>
* This class drives a motor
*/
public class SimpleDrive extends CommandBase
{
//Grab the subsystem instance from RobotContainer
private static final DriveTrain drive = RobotContainer.drive;
double speed;
/**
* Constructor
*/
public SimpleDrive(double speed)
{
addRequirements(drive); // Adds the subsystem to the command
this.speed = speed;
}
/**
* Runs before execute
*/
@Override
public void initialize()
{
}
/**
* Called continously until command is ended
*/
@Override
public void execute()
{
drive.setMotorSpeed(speed);
}
/**
* Called when the command is told to end or is interrupted
*/
@Override
public void end(boolean interrupted)
{
}
/**
* Creates an isFinished condition if needed
*/
@Override
public boolean isFinished()
{
return false;
}
} | [
"[email protected]"
] | |
caadfc4f300c7d51adf3b38cdf2ffdf20cf63f62 | 4f20d2329fe4053aaa6c026dbfa93a39dd2b5611 | /src/com/tractis/identity/IdentityTag.java | b8b3cf9fbc55789f63acf6ca90177142ea3dcc85 | [
"MIT"
] | permissive | tractis/tractis_identity_verifications_for_java | e204301ad1b67ee46c5adebd474b457078bb95a2 | 806a239032eefe6ff964b52eeb5e2e2c4c61f8bb | refs/heads/master | 2021-01-01T05:32:18.331128 | 2009-08-13T10:40:10 | 2009-08-13T10:40:10 | 276,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,385 | java | package com.tractis.identity;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
/**
* Abstract class for tags used to connect woth tractis identity verifications
* @author dave
*
*/
public abstract class IdentityTag implements Tag{
protected Tag parent;
protected PageContext context;
protected JspWriter out;
protected static Properties properties = null;
protected void initProperties() throws JspException {
try {
InputStream resourceAsStream = this.getClass().getResourceAsStream("/tractis-settings.properties");
properties = new Properties();
properties.load(resourceAsStream);
} catch (IOException e) {
throw new JspException("Cannot recover Tractis service properties, please check that tractis-settings.properties is available on classpath");
}
}
public Tag getParent() {
return this.parent;
}
public void release() {
}
public void setPageContext(PageContext context) {
this.context = context;
this.out = this.context.getOut();
}
public void setParent(Tag parent) {
this.parent = parent;
}
public void print(String message){
try {
this.out.print(message);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
| [
"dave@dave-laptop.(none)"
] | dave@dave-laptop.(none) |
6bf68f534ac2afc774f04c34e1c1fe371816e0a2 | 9932b78c13b8df15ecf6ad5e4eb09177c7cb7d92 | /domain/src/main/java/com/klif/banking/domain/Balance.java | 1cc868ab07e787235fee90ea8d811fabdde704f0 | [] | no_license | Klif4/Banking_JAVA | 1ef0e6f164b329302225676ded5947c88a3fc874 | 2247b6d087a815891530cca7fad8c2e5df996b1f | refs/heads/master | 2023-03-27T23:27:23.396240 | 2021-04-05T00:45:38 | 2021-04-05T00:45:38 | 339,334,599 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | package com.klif.banking.domain;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
@AllArgsConstructor
@EqualsAndHashCode
@ToString
public class Balance {
@NonNull
private int value;
public void add(int valueToAdd) {
value += valueToAdd;
}
public int value() {
return value;
}
public void substract(int valueToSubstract) {
value -= valueToSubstract;
}
}
| [
"[email protected]"
] | |
e56fc7b4aa42967d8c2c83a0fb6618f0709ed871 | aee038dd6164a9187de149fc9e990f164f0ec1b6 | /src/main/java/rsp/dsl/AttributeDefinition.java | 7670c3005af5a8aa4fe9d7742679b11b04ce7d8b | [
"Apache-2.0"
] | permissive | jarekratajski/rsp | ea4aab8e8e9af9a63b51bb8d8089579647173e5e | 88b7103e2db67dc488c3c176f3346632bb093f56 | refs/heads/master | 2023-02-23T13:29:31.318531 | 2021-01-30T09:52:10 | 2021-01-30T09:52:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,140 | java | package rsp.dsl;
import rsp.page.RenderContext;
import rsp.dom.XmlNs;
/**
* A definition of a HTML element's attribute.
*/
public final class AttributeDefinition extends DocumentPartDefinition {
/**
* The attribute's name.
*/
public final String name;
/**
* The attribute's value.
*/
public final String value;
/**
* Determines if this attribute is an HTML tag's property.
* @see Html#DEFAULT_PROPERTIES_NAMES
*/
public final boolean isProperty;
/**
* Creates a new instance of an attribute definition.
* @param name the attribute's name
* @param value the attribute's value
* @param isProperty true if this attribute is an HTML property and false otherwise
*/
public AttributeDefinition(String name, String value, boolean isProperty) {
super(DocumentPartDefinition.DocumentPartKind.ATTR);
this.name = name;
this.value = value;
this.isProperty = isProperty;
}
@Override
public void accept(RenderContext renderContext) {
renderContext.setAttr(XmlNs.html, name, value, isProperty);
}
}
| [
"[email protected]"
] | |
9459eebc20565dee9a072a78d08aab9b469158f4 | 63a9c24defb4bffc7ce97f42222f5bfbb671a87a | /shop/src/net/shopxx/controller/business/FullReductionPromotionController.java | c9edd9ed0c657b04df86506de4bf538202b47afd | [] | no_license | zhanglize-paomo/shop | 438437b26c79b8137a9b22edf242a5df49fa5c2e | d5728b263fa3cabf917e7a37bc1ca6986c68b019 | refs/heads/master | 2022-12-20T22:40:57.549683 | 2019-12-18T09:04:11 | 2019-12-18T09:04:11 | 228,772,639 | 0 | 1 | null | 2022-12-16T11:10:26 | 2019-12-18T06:24:10 | FreeMarker | UTF-8 | Java | false | false | 14,391 | java | /*
* Copyright 2005-2017 shopxx.net. All rights reserved.
* Support: http://www.shopxx.net
* License: http://www.shopxx.net/license
*/
package net.shopxx.controller.business;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.inject.Inject;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import net.shopxx.Pageable;
import net.shopxx.Results;
import net.shopxx.entity.Business;
import net.shopxx.entity.Product;
import net.shopxx.entity.Promotion;
import net.shopxx.entity.PromotionPluginSvc;
import net.shopxx.entity.Sku;
import net.shopxx.entity.Store;
import net.shopxx.exception.UnauthorizedException;
import net.shopxx.plugin.PaymentPlugin;
import net.shopxx.plugin.PromotionPlugin;
import net.shopxx.plugin.fullReductionPromotion.FullReductionPromotionPlugin;
import net.shopxx.security.CurrentStore;
import net.shopxx.security.CurrentUser;
import net.shopxx.service.CouponService;
import net.shopxx.service.MemberRankService;
import net.shopxx.service.PluginService;
import net.shopxx.service.PromotionService;
import net.shopxx.service.SkuService;
import net.shopxx.service.StoreService;
import net.shopxx.service.SvcService;
import net.shopxx.util.WebUtils;
/**
* Controller - 满减促销
*
* @author SHOP++ Team
* @version 5.0
*/
@Controller("businessFullReductionPromotionController")
@RequestMapping("/business/full_reduction_promotion")
public class FullReductionPromotionController extends BaseController {
@Inject
private PromotionService promotionService;
@Inject
private MemberRankService memberRankService;
@Inject
private SkuService skuService;
@Inject
private CouponService couponService;
@Inject
private StoreService storeService;
@Inject
private PluginService pluginService;
@Inject
private SvcService svcService;
/**
* 添加属性
*/
@ModelAttribute
public void populateModel(Long promotionId, @CurrentStore Store currentStore, ModelMap model) {
Promotion promotion = promotionService.find(promotionId);
if (promotion != null && !currentStore.equals(promotion.getStore())) {
throw new UnauthorizedException();
}
model.addAttribute("promotion", promotion);
}
/**
* 计算
*/
@GetMapping("/calculate")
public ResponseEntity<?> calculate(String paymentPluginId, Integer months, Boolean useBalance) {
Map<String, Object> data = new HashMap<>();
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
if (promotionPlugin == null || !promotionPlugin.getIsEnabled()) {
return Results.UNPROCESSABLE_ENTITY;
}
if (months == null || months <= 0) {
return Results.UNPROCESSABLE_ENTITY;
}
BigDecimal amount = promotionPlugin.getPrice().multiply(new BigDecimal(months));
if (BooleanUtils.isTrue(useBalance)) {
data.put("fee", BigDecimal.ZERO);
data.put("amount", amount);
data.put("useBalance", true);
} else {
PaymentPlugin paymentPlugin = pluginService.getPaymentPlugin(paymentPluginId);
if (paymentPlugin == null || !paymentPlugin.getIsEnabled()) {
return Results.UNPROCESSABLE_ENTITY;
}
data.put("fee", paymentPlugin.calculateFee(amount));
data.put("amount", paymentPlugin.calculateAmount(amount));
data.put("useBalance", false);
}
return ResponseEntity.ok(data);
}
/**
* 到期日期
*/
@GetMapping("/end_date")
public @ResponseBody Map<String, Object> endDate(@CurrentStore Store currentStore) {
Map<String, Object> data = new HashMap<>();
data.put("endDate", currentStore.getFullReductionPromotionEndDate());
return data;
}
/**
* 购买
*/
@GetMapping("/buy")
public String buy(@CurrentStore Store currentStore, ModelMap model) {
if (currentStore.getType().equals(Store.Type.self) && currentStore.getFullReductionPromotionEndDate() == null) {
return "redirect:list";
}
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
if (promotionPlugin == null || !promotionPlugin.getIsEnabled()) {
return UNPROCESSABLE_ENTITY_VIEW;
}
List<PaymentPlugin> paymentPlugins = pluginService.getActivePaymentPlugins(WebUtils.getRequest());
if (CollectionUtils.isNotEmpty(paymentPlugins)) {
model.addAttribute("defaultPaymentPlugin", paymentPlugins.get(0));
model.addAttribute("paymentPlugins", paymentPlugins);
}
model.addAttribute("promotionPlugin", promotionPlugin);
return "business/full_reduction_promotion/buy";
}
/**
* 购买
*/
@PostMapping("/buy")
public ResponseEntity<?> buy(Integer months, Boolean useBalance, @CurrentStore Store currentStore, @CurrentUser Business currentUser) {
Map<String, Object> data = new HashMap<>();
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
if (currentStore.getType().equals(Store.Type.self) && currentStore.getFullReductionPromotionEndDate() == null) {
return Results.UNPROCESSABLE_ENTITY;
}
if (promotionPlugin == null || !promotionPlugin.getIsEnabled()) {
return Results.UNPROCESSABLE_ENTITY;
}
if (months == null || months <= 0) {
return Results.UNPROCESSABLE_ENTITY;
}
int days = months * 30;
BigDecimal amount = promotionPlugin.getPrice().multiply(new BigDecimal(months));
if (amount.compareTo(BigDecimal.ZERO) > 0) {
if (BooleanUtils.isTrue(useBalance)) {
if (currentUser.getBalance().compareTo(amount) < 0) {
return Results.unprocessableEntity("business.fullReductionPromotion.insufficientBalance");
}
storeService.buy(currentStore, promotionPlugin, months);
} else {
PromotionPluginSvc promotionPluginSvc = new PromotionPluginSvc();
promotionPluginSvc.setAmount(amount);
promotionPluginSvc.setDurationDays(days);
promotionPluginSvc.setStore(currentStore);
promotionPluginSvc.setPromotionPluginId(FullReductionPromotionPlugin.ID);
svcService.save(promotionPluginSvc);
data.put("promotionPluginSvcSn", promotionPluginSvc.getSn());
}
} else {
storeService.addFullReductionPromotionEndDays(currentStore, days);
}
return ResponseEntity.ok(data);
}
/**
* 赠品选择
*/
@GetMapping("/gift_select")
public @ResponseBody List<Map<String, Object>> giftSelect(String keyword, Long[] excludeIds, @CurrentUser Business currentUser) {
List<Map<String, Object>> data = new ArrayList<>();
if (StringUtils.isEmpty(keyword)) {
return data;
}
Set<Sku> excludes = new HashSet<>(skuService.findList(excludeIds));
List<Sku> skus = skuService.search(currentUser.getStore(), Product.Type.gift, keyword, excludes, null);
for (Sku sku : skus) {
Map<String, Object> item = new HashMap<>();
item.put("id", sku.getId());
item.put("sn", sku.getSn());
item.put("name", sku.getName());
item.put("specifications", sku.getSpecifications());
item.put("path", sku.getPath());
data.add(item);
}
return data;
}
/**
* 添加
*/
@GetMapping("/add")
public String add(@CurrentStore Store currentStore, ModelMap model) {
model.addAttribute("memberRanks", memberRankService.findAll());
model.addAttribute("coupons", couponService.findList(currentStore));
return "business/full_reduction_promotion/add";
}
/**
* 保存
*/
@PostMapping("/save")
public String save(@ModelAttribute("promotionForm") Promotion promotionForm, Boolean useAmountPromotion, Boolean useNumberPromotion, Long[] memberRankIds, Long[] couponIds, Long[] giftIds, @CurrentStore Store currentStore, RedirectAttributes redirectAttributes) {
promotionForm.setType(Promotion.Type.fullReduction);
promotionForm.setStore(currentStore);
promotionForm.setMemberRanks(new HashSet<>(memberRankService.findList(memberRankIds)));
promotionForm.setCoupons(new HashSet<>(couponService.findList(couponIds)));
if (ArrayUtils.isNotEmpty(giftIds)) {
List<Sku> gifts = skuService.findList(giftIds);
CollectionUtils.filter(gifts, new Predicate() {
public boolean evaluate(Object object) {
Sku gift = (Sku) object;
return gift != null && Product.Type.gift.equals(gift.getType());
}
});
promotionForm.setGifts(new HashSet<>(gifts));
} else {
promotionForm.setGifts(null);
}
if (!isValid(promotionForm)) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (promotionForm.getBeginDate() != null && promotionForm.getEndDate() != null && promotionForm.getBeginDate().after(promotionForm.getEndDate())) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (promotionForm.getMinimumQuantity() != null && promotionForm.getMaximumQuantity() != null && promotionForm.getMinimumQuantity() > promotionForm.getMaximumQuantity()) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (promotionForm.getMinimumPrice() != null && promotionForm.getMaximumPrice() != null && promotionForm.getMinimumPrice().compareTo(promotionForm.getMaximumPrice()) > 0) {
return UNPROCESSABLE_ENTITY_VIEW;
}
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
String priceExpression = promotionPlugin.getPriceExpression(promotionForm, useAmountPromotion, useNumberPromotion);
if (StringUtils.isNotEmpty(priceExpression) && !promotionService.isValidPriceExpression(priceExpression)) {
return UNPROCESSABLE_ENTITY_VIEW;
}
promotionForm.setPriceExpression(priceExpression);
promotionForm.setProducts(null);
promotionForm.setProductCategories(null);
promotionService.save(promotionForm);
addFlashMessage(redirectAttributes, SUCCESS_MESSAGE);
return "redirect:list";
}
/**
* 编辑
*/
@GetMapping("/edit")
public String edit(@ModelAttribute(binding = false) Promotion promotion, @CurrentStore Store currentStore, ModelMap model) {
if (promotion == null) {
return UNPROCESSABLE_ENTITY_VIEW;
}
model.addAttribute("promotion", promotion);
model.addAttribute("memberRanks", memberRankService.findAll());
model.addAttribute("coupons", couponService.findList(currentStore));
return "business/full_reduction_promotion/edit";
}
/**
* 更新
*/
@PostMapping("/update")
public String update(@ModelAttribute("promotionForm") Promotion promotionForm, @ModelAttribute(binding = false) Promotion promotion, Boolean useAmountPromotion, Boolean useNumberPromotion, Long[] memberRankIds, Long[] couponIds, Long[] giftIds, RedirectAttributes redirectAttributes) {
if (promotion == null) {
return UNPROCESSABLE_ENTITY_VIEW;
}
promotionForm.setMemberRanks(new HashSet<>(memberRankService.findList(memberRankIds)));
promotionForm.setCoupons(new HashSet<>(couponService.findList(couponIds)));
if (ArrayUtils.isNotEmpty(giftIds)) {
List<Sku> gifts = skuService.findList(giftIds);
CollectionUtils.filter(gifts, new Predicate() {
public boolean evaluate(Object object) {
Sku gift = (Sku) object;
return gift != null && Product.Type.gift.equals(gift.getType());
}
});
promotionForm.setGifts(new HashSet<>(gifts));
} else {
promotionForm.setGifts(null);
}
if (promotionForm.getBeginDate() != null && promotionForm.getEndDate() != null && promotionForm.getBeginDate().after(promotionForm.getEndDate())) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (promotionForm.getMinimumQuantity() != null && promotionForm.getMaximumQuantity() != null && promotionForm.getMinimumQuantity() > promotionForm.getMaximumQuantity()) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (promotionForm.getMinimumPrice() != null && promotionForm.getMaximumPrice() != null && promotionForm.getMinimumPrice().compareTo(promotionForm.getMaximumPrice()) > 0) {
return UNPROCESSABLE_ENTITY_VIEW;
}
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
String priceExpression = promotionPlugin.getPriceExpression(promotionForm, useAmountPromotion, useNumberPromotion);
if (StringUtils.isNotEmpty(priceExpression) && !promotionService.isValidPriceExpression(priceExpression)) {
return UNPROCESSABLE_ENTITY_VIEW;
}
if (useAmountPromotion != null && useAmountPromotion) {
promotionForm.setConditionsNumber(null);
promotionForm.setCreditNumber(null);
} else if (useNumberPromotion != null && useNumberPromotion) {
promotionForm.setConditionsAmount(null);
promotionForm.setCreditAmount(null);
} else {
promotionForm.setConditionsNumber(null);
promotionForm.setCreditNumber(null);
promotionForm.setConditionsAmount(null);
promotionForm.setCreditAmount(null);
}
promotionForm.setPriceExpression(priceExpression);
BeanUtils.copyProperties(promotionForm, promotion, "id", "type", "store", "product", "productCategories");
promotionService.update(promotion);
addFlashMessage(redirectAttributes, SUCCESS_MESSAGE);
return "redirect:list";
}
/**
* 列表
*/
@GetMapping("/list")
public String list(Pageable pageable, @CurrentStore Store currentStore, ModelMap model) {
PromotionPlugin promotionPlugin = pluginService.getPromotionPlugin(FullReductionPromotionPlugin.ID);
model.addAttribute("isEnabled", promotionPlugin.getIsEnabled());
model.addAttribute("page", promotionService.findPage(currentStore, Promotion.Type.fullReduction, pageable));
return "business/full_reduction_promotion/list";
}
/**
* 删除
*/
@PostMapping("/delete")
public ResponseEntity<?> delete(Long[] ids, @CurrentStore Store currentStore) {
for (Long id : ids) {
Promotion promotion = promotionService.find(id);
if (promotion == null) {
return Results.UNPROCESSABLE_ENTITY;
}
if (!currentStore.equals(promotion.getStore())) {
return Results.UNPROCESSABLE_ENTITY;
}
}
promotionService.delete(ids);
return Results.OK;
}
} | [
"[email protected]"
] | |
b5a40f43cadfef8cd12b0c0fd6c67c7bf9a5d75d | 4fc3c2b25e823caf2230540ed45e2ce5e26e052c | /app/src/main/java/com/example/firsthomework/OnBackPressedListener.java | 66544e1ab6f6662feac34ef80145b30604cf2dcb | [] | no_license | Galaximum/MailHome | 65266160ca7add687130b421996615d309dcd92c | b1f00099447f4b5692d821df879e5a036d9f182f | refs/heads/master | 2023-01-08T03:46:50.715681 | 2020-10-30T09:31:51 | 2020-10-30T09:31:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 112 | java | package com.example.firsthomework;
public interface OnBackPressedListener {
public void onBackPressed();
}
| [
"[email protected]"
] | |
3fbb2d32c7d4292485e9f7a203babadaa5bf0909 | 83e81838541a1239b589d7352db49e50d6e948b5 | /src/java/pyp/modelo/interfaz/ProductoDAO.java | 983cbd8d9bbfded1d4f753c8d6a44679c18b647f | [] | no_license | Farius-red/PizzasGaes1 | 329919388f806febffa0e9a24d4b204a22337812 | 9b59b148c03f466ff3aab42b092823369a563c9c | refs/heads/master | 2023-01-14T02:17:02.719459 | 2020-11-19T17:54:32 | 2020-11-19T17:54:32 | 314,326,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 527 | 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 pyp.modelo.interfaz;
import javax.ejb.Stateless;
import pyp.modelo.entidades.Producto;
import pyp.modelo.DAO.IProductoDAO;
/**
*
* @Gaes 5
*/
@Stateless
public class ProductoDAO extends AbstractDAO<Producto> implements IProductoDAO {
public ProductoDAO() {
super(Producto.class);
}
}
| [
"[email protected]"
] | |
44cef44382c18fe5ad621d8790cb61e359897c5e | 1ca86d5d065372093c5f2eae3b1a146dc0ba4725 | /spring-security-modules/spring-security-web-mvc-custom/src/main/java/com/surya/web/controller/BankController.java | d592345d8bc1ea8e984c04449fec27e0d99d40f0 | [] | no_license | Suryakanta97/DemoExample | 1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e | 5c6b831948e612bdc2d9d578a581df964ef89bfb | refs/heads/main | 2023-08-10T17:30:32.397265 | 2021-09-22T16:18:42 | 2021-09-22T16:18:42 | 391,087,435 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,218 | java | package com.surya.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
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.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
// to test csrf
@Controller
public class BankController {
private final Logger logger = LoggerFactory.getLogger(getClass());
@RequestMapping(value = "/transfer", method = RequestMethod.GET)
@ResponseBody
public int transfer(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) {
logger.info("Transfer to {}", accountNo);
return amount;
}
// write - just for test
@RequestMapping(value = "/transfer", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK)
public void create(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) {
logger.info("Transfer to {}", accountNo);
}
}
| [
"[email protected]"
] | |
a6a7efd5ed196984d9df10ac9432be96d1b3ed12 | 9dd75362ffd9b552b6d42a3968efbe92c6d0d2e1 | /app/src/main/java/com/example/tee_2014/N40_Activity.java | fcaaa188836474243ab8fa21d27d189bdafb8e39 | [] | no_license | mrinal241/ECE_14 | 1e12e3a5019b4b7879f3c78acccf00e02e60cc32 | b2345ee8970669a0dee4b1a14e1bd1cc84f2d41f | refs/heads/master | 2020-04-04T20:24:16.466724 | 2018-11-05T16:08:44 | 2018-11-05T16:08:44 | 156,245,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,167 | java | package com.example.tee_2014;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
public class N40_Activity extends Activity {
ImageButton call,fb;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_n40_);
call=(ImageButton) findViewById(R.id.call);
fb=(ImageButton) findViewById(R.id.dial);
call.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent=new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:+8801744955241"));
startActivity(intent);
}
});
fb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://mobile.facebook.com/mrinalkanti.ray?fref=pb")));
}
});
}
}
| [
"[email protected]"
] | |
9e6a9dc2538c8168f29e81ca29c6806690676ab3 | 811d14028b6284452d9b1d62a137d4dc8ad8b954 | /app/src/main/java/ir/galaxycell/kahkeshan/UI/FragmentAddFile.java | 8f4ec41f779f63d6bf796104d6352719d52f03ed | [
"MIT"
] | permissive | mahmoodkarimizade/Kahkeshan | ae270e7e36467aba37e56da4716dc374cbb1d2ed | bca6d252d49a6cdb008b0637657b900cf7a45da6 | refs/heads/master | 2020-04-30T20:40:50.709724 | 2019-03-23T06:13:13 | 2019-03-23T06:13:13 | 177,074,139 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,987 | java | package ir.galaxycell.kahkeshan.UI;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import java.io.File;
import java.util.ArrayList;
import droidninja.filepicker.FilePickerBuilder;
import droidninja.filepicker.FilePickerConst;
import ir.galaxycell.kahkeshan.R;
/**
* Created by Admin on 25/08/2017.
*/
public class FragmentAddFile extends Fragment {
private View view;
private ImageView productfile;
private TextView titleFile,addressFile;
private ArrayList<String> docPaths = new ArrayList<>();
private File file;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
{
view=inflater.inflate(R.layout.fragment_add_file,container,false);
//linke widget in fragment add file to layout
link(view);
return view;
}
private void link(View view)
{
//Image View
productfile=(ImageView)view.findViewById(R.id.fragment_add_file_imageview_productfile);
//Text View
titleFile=(TextView)view.findViewById(R.id.fragment_add_file_textview_titlefile);
addressFile=(TextView)view.findViewById(R.id.fragment_add_file_textview_addressfile);
if (FragmentAdd.filepath.equals(""))
{
productfile.setImageResource(R.drawable.documentadd);
titleFile.setVisibility(View.GONE);
addressFile.setVisibility(View.GONE);
}
else
{
productfile.setImageResource(R.drawable.ic_ppt);
titleFile.setVisibility(View.VISIBLE);
addressFile.setVisibility(View.VISIBLE);
addressFile.setText(FragmentAdd.filepath);
// get type file from path file
String [] m=FragmentAdd.filepath.split("\\.");
String typeFile = m[m.length-1].toLowerCase();
switch (typeFile)
{
case "pdf":
productfile.setImageResource(R.drawable.ic_pdf);
break;
case "doc":
productfile.setImageResource(R.drawable.ic_word);
break;
case "docx":
productfile.setImageResource(R.drawable.ic_word);
break;
case "ppt":
productfile.setImageResource(R.drawable.ic_ppt);
break;
case "pptx":
productfile.setImageResource(R.drawable.ic_ppt);
break;
case "xls":
productfile.setImageResource(R.drawable.ic_excel);
break;
case "xlsx":
productfile.setImageResource(R.drawable.ic_excel);
break;
case "txt":
productfile.setImageResource(R.drawable.ic_txt);
break;
}
}
// set co click listenr
ocClick();
}
private void ocClick()
{
productfile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view)
{
showFileChooser();
}
});
}
private void showFileChooser()
{
FilePickerBuilder.getInstance().setMaxCount(1)
.setActivityTheme(R.style.AppTheme)
.pickFile(this);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
if(resultCode== getActivity().RESULT_OK && data!=null)
{
docPaths = new ArrayList<>();
docPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_DOCS));
// get type file from path file
String [] m=docPaths.get(0).split("\\.");
String typeFile = m[m.length-1].toLowerCase();
file=new File(docPaths.get(0));
int file_size = Integer.parseInt(String.valueOf(file.length()/1024));
if(file_size>=3000)
{
Toast.makeText(getContext(),"اندازه فایل نباید بزرگتر از 2 مگابایت باشد",Toast.LENGTH_LONG).show();
}
else
{
FragmentAdd.filepath=docPaths.get(0);
titleFile.setVisibility(View.VISIBLE);
addressFile.setVisibility(View.VISIBLE);
addressFile.setText(docPaths.get(0));
switch (typeFile)
{
case "pdf":
productfile.setImageResource(R.drawable.ic_pdf);
break;
case "doc":
productfile.setImageResource(R.drawable.ic_word);
break;
case "docx":
productfile.setImageResource(R.drawable.ic_word);
break;
case "ppt":
productfile.setImageResource(R.drawable.ic_ppt);
break;
case "pptx":
productfile.setImageResource(R.drawable.ic_ppt);
break;
case "xls":
productfile.setImageResource(R.drawable.ic_excel);
break;
case "xlsx":
productfile.setImageResource(R.drawable.ic_excel);
break;
case "txt":
productfile.setImageResource(R.drawable.ic_txt);
break;
}
}
}
}
}
| [
"[email protected]"
] | |
8401d4d37a6f940713749ddf820616c9a1e3b5e7 | 83072409106805609263c4d629bd78bdba44d085 | /src/main/java/com/developper/restapp/controller/NewsController.java | 45081ead3b954c17e5fd4f5ed497398082cc1412 | [] | no_license | jessndaa/restappspring | 8aea6b46205fc958fba604007d9def9ed79b20cf | 58a16f214a211ddf636f746dde1f8e488b6c91d3 | refs/heads/master | 2021-04-04T18:53:10.429028 | 2020-03-19T10:47:53 | 2020-03-19T10:47:53 | 248,479,853 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,668 | java | package com.developper.restapp.controller;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import com.developper.restapp.object.HttpResponse;
import com.developper.restapp.object.NewsModel;
import com.developper.restapp.object.UserModel;
import com.developper.restapp.service.FirebaseService;
import com.google.cloud.firestore.CollectionReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.google.cloud.Timestamp;
/**
* NewsController
*/
@RestController
public class NewsController {
@Autowired
FirebaseService fb;
@GetMapping(value = "/api/news/all")
public List<NewsModel> getAllNews() throws InterruptedException, ExecutionException {
return fb.getAllTopic();
}
@GetMapping(value = "/api/news")
public List<NewsModel> getAllNews(@RequestParam String id) throws InterruptedException, ExecutionException {
List<NewsModel> news = new ArrayList();
for (NewsModel newss : fb.getAllTopic()) {
if (newss.getSender().equals(id)) {}
else
news.add(newss);
}
return news;
}
@PostMapping(value = "/api/news")
public HttpResponse onNews(@RequestBody NewsModel model) {
fb.addTopic(model);
return new HttpResponse(200, "Ok enregistré") ;
}
} | [
"[email protected]"
] | |
505713c13f1ac70f1940f845995df971095feba6 | b106c6628af72302911e83055ec1bc04988f304f | /app/src/main/java/com/example/instaappanalitycs/model/api/userinfo/Graphql.java | fea854dc26d1b1cc04b2ce137f10fb4ad46c7429 | [] | no_license | dmitry-koverko/InstaAppAnalitycs | d82e3fb850d24ed714e67096ce14851e17d2bd66 | 71ea55a7d3ab26f774ca17c0b1ada070f9522714 | refs/heads/master | 2022-05-17T00:34:42.525330 | 2020-04-28T23:34:54 | 2020-04-28T23:34:54 | 255,057,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | package com.example.instaappanalitycs.model.api.userinfo;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Graphql {
@SerializedName("user")
@Expose
private UserInfo user;
public UserInfo getUser() {
return user;
}
public void setUser(UserInfo user) {
this.user = user;
}
}
| [
"[email protected]"
] | |
dadaaea8a0b1b517e9e7f60f947bb08706951a1a | 64cc3aa316ca573a4c3701683249e4709ec29047 | /app/src/main/java/com/lixinjia/myapplication/invocationhandler/RPCInvocationHandler.java | 241846d3d6a401a1eedada1210111e6c20a10eaf | [] | no_license | XinJiaGe/MyApplication | 4b292ca3c918f8f44f01f3042ada8592ffe0b5f7 | 5c7a3b568c95f19628c4ef3dcb9d5c92633d75ce | refs/heads/master | 2021-04-26T22:17:00.440500 | 2019-11-14T05:10:20 | 2019-11-14T05:10:20 | 90,335,057 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 904 | java | package com.lixinjia.myapplication.invocationhandler;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
public class RPCInvocationHandler implements InvocationHandler {
private InvocationHandleMe serviceManager = null;
public RPCInvocationHandler(InvocationHandleMe serviceManager) {
this.serviceManager = serviceManager;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
String methodName = method.getDeclaringClass().getSimpleName() + "." + method.getName();
if ("Object.toString".equals(methodName)) {
return method.getDeclaringClass().getName();
}
try {
return this.serviceManager.request(methodName, method.getReturnType(), args);
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
}
| [
"[[email protected]]"
] | |
4f05f005618be7751e24a3b12dfe072c2d467f15 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/34/34_fca15ddb85043f832a7d0fdb18acbac83b2d70bb/ThingListFragment/34_fca15ddb85043f832a7d0fdb18acbac83b2d70bb_ThingListFragment_t.java | bed2d6ea4683536cd0df28a2240c7ad3a9e465bf | [] | 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 | 17,920 | java | /*
* Copyright (C) 2012 Brian Muramatsu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.btmura.android.reddit.app;
import android.app.Activity;
import android.app.ListFragment;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.ActionMode;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.MultiChoiceModeListener;
import android.widget.AbsListView.OnScrollListener;
import android.widget.ListView;
import com.btmura.android.reddit.BuildConfig;
import com.btmura.android.reddit.R;
import com.btmura.android.reddit.accounts.AccountUtils;
import com.btmura.android.reddit.database.SaveActions;
import com.btmura.android.reddit.database.Subreddits;
import com.btmura.android.reddit.provider.Provider;
import com.btmura.android.reddit.provider.ThingProvider;
import com.btmura.android.reddit.util.Flag;
import com.btmura.android.reddit.util.Objects;
import com.btmura.android.reddit.widget.OnVoteListener;
import com.btmura.android.reddit.widget.ThingAdapter;
public class ThingListFragment extends ListFragment implements
LoaderCallbacks<Cursor>,
OnScrollListener,
OnVoteListener,
MultiChoiceModeListener {
public static final String TAG = "ThingListFragment";
/** Optional bit mask for controlling fragment appearance. */
private static final String ARG_FLAGS = "flags";
public static final int FLAG_SINGLE_CHOICE = 0x1;
private static final String STATE_ADAPTER_ARGS = "adapterArgs";
private static final String STATE_SELECTED_THING_ID = "selectedThingId";
private static final String STATE_SELECTED_LINK_ID = "selectedLinkId";
private static final String STATE_EMPTY_TEXT = "emptyText";
public interface OnThingSelectedListener {
void onThingSelected(Bundle thingBundle);
int onMeasureThingBody();
}
private ThingAdapter adapter;
private Bundle adapterArgs;
private String selectedThingId;
private String selectedLinkId;
private int emptyText;
private boolean scrollLoading;
private OnThingSelectedListener listener;
public static ThingListFragment newSubredditInstance(String accountName, String subreddit,
int filter, int flags) {
Bundle args = new Bundle(4);
args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName);
args.putString(ThingAdapter.ARG_SUBREDDIT, subreddit);
args.putInt(ThingAdapter.ARG_FILTER, filter);
args.putInt(ARG_FLAGS, flags);
return newFragment(args);
}
public static ThingListFragment newQueryInstance(String accountName, String query, int flags) {
Bundle args = new Bundle(3);
args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName);
args.putString(ThingAdapter.ARG_QUERY, query);
args.putInt(ARG_FLAGS, flags);
return newFragment(args);
}
public static ThingListFragment newMessageMessagesInstance(String accountName, String thingId,
int flags) {
Bundle args = new Bundle(2);
args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName);
args.putString(ThingAdapter.ARG_MESSAGE_THREAD_ID, thingId);
args.putInt(ARG_FLAGS, flags);
return newFragment(args);
}
public static ThingListFragment newInstance(String accountName, String query,
String profileUser, String messageUser, int filter, int flags) {
Bundle args = new Bundle(6);
args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName);
args.putString(ThingAdapter.ARG_QUERY, query);
args.putString(ThingAdapter.ARG_PROFILE_USER, profileUser);
args.putString(ThingAdapter.ARG_MESSAGE_USER, messageUser);
args.putInt(ThingAdapter.ARG_FILTER, filter);
args.putInt(ARG_FLAGS, flags);
return newFragment(args);
}
private static ThingListFragment newFragment(Bundle args) {
ThingListFragment frag = new ThingListFragment();
frag.setArguments(args);
return frag;
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
if (activity instanceof OnThingSelectedListener) {
listener = (OnThingSelectedListener) activity;
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!TextUtils.isEmpty(ThingAdapter.getMessageUser(getArguments()))) {
adapter = ThingAdapter.newMessageInstance(getActivity());
} else if (!TextUtils.isEmpty(ThingAdapter.getMessageThreadId(getArguments()))) {
adapter = ThingAdapter.newMessageThreadInstance(getActivity());
} else {
adapter = ThingAdapter.newThingInstance(getActivity());
}
int flags = getArguments().getInt(ARG_FLAGS);
boolean singleChoice = Flag.isEnabled(flags, FLAG_SINGLE_CHOICE);
adapter.setSingleChoice(singleChoice);
if (savedInstanceState == null) {
adapterArgs = new Bundle(7);
adapterArgs.putAll(getArguments());
} else {
adapterArgs = savedInstanceState.getBundle(STATE_ADAPTER_ARGS);
selectedThingId = savedInstanceState.getString(STATE_SELECTED_THING_ID);
selectedLinkId = savedInstanceState.getString(STATE_SELECTED_LINK_ID);
emptyText = savedInstanceState.getInt(STATE_EMPTY_TEXT);
}
adapter.setAccountName(ThingAdapter.getAccountName(adapterArgs));
adapter.setParentSubreddit(ThingAdapter.getSubreddit(adapterArgs));
adapter.setOnVoteListener(this);
adapter.setSelectedThing(selectedThingId, selectedLinkId);
setHasOptionsMenu(true);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = super.onCreateView(inflater, container, savedInstanceState);
ListView l = (ListView) v.findViewById(android.R.id.list);
l.setVerticalScrollBarEnabled(false);
l.setOnScrollListener(this);
l.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
l.setMultiChoiceModeListener(this);
return v;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
adapter.setThingBodyWidth(getThingBodyWidth());
setListAdapter(adapter);
setListShown(false);
if (emptyText == 0) {
loadIfPossible();
} else {
showEmpty();
}
}
public void loadIfPossible() {
if (adapter.isLoadable(adapterArgs)) {
getLoaderManager().initLoader(0, null, this);
}
}
public void setEmpty(boolean error) {
this.emptyText = error ? R.string.error : R.string.empty_list;
showEmpty();
}
private void showEmpty() {
setEmptyText(getString(emptyText));
setListShown(true);
}
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "onCreateLoader args: " + args);
}
if (args != null) {
adapterArgs.putAll(args);
}
return adapter.createLoader(getActivity(), adapterArgs);
}
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "onLoadFinished cursor: " + (cursor != null ? cursor.getCount() : "-1"));
}
scrollLoading = false;
if (cursor != null) {
Bundle extras = cursor.getExtras();
if (extras != null && extras.containsKey(ThingProvider.EXTRA_SESSION_ID)) {
adapterArgs.putLong(ThingAdapter.ARG_SESSION_ID, extras.getLong(ThingProvider.EXTRA_SESSION_ID));
}
}
adapterArgs.remove(ThingAdapter.ARG_MORE);
adapter.updateLoader(getActivity(), loader, adapterArgs);
adapter.swapCursor(cursor);
setEmptyText(getString(cursor != null ? R.string.empty_list : R.string.error));
setListShown(true);
getActivity().invalidateOptionsMenu();
}
public void onLoaderReset(Loader<Cursor> loader) {
adapter.swapCursor(null);
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
adapter.setSelectedPosition(position);
selectedThingId = adapter.getSelectedThingId();
selectedLinkId = adapter.getSelectedLinkId();
if (listener != null) {
listener.onThingSelected(adapter.getThingBundle(getActivity(), position));
}
}
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
int totalItemCount) {
if (visibleItemCount <= 0 || scrollLoading) {
return;
}
if (firstVisibleItem + visibleItemCount * 2 >= totalItemCount) {
if (getLoaderManager().getLoader(0) != null) {
if (!adapter.isEmpty()) {
String more = adapter.getMoreThingId();
if (!TextUtils.isEmpty(more)) {
scrollLoading = true;
Bundle b = new Bundle(1);
b.putString(ThingAdapter.ARG_MORE, more);
getLoaderManager().restartLoader(0, b, this);
}
}
}
}
}
public void onVote(String thingId, int likes) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "onLike id: " + thingId + " likes: " + likes);
}
String accountName = ThingAdapter.getAccountName(adapterArgs);
if (!TextUtils.isEmpty(accountName)) {
Provider.voteAsync(getActivity(), accountName, thingId, likes);
}
}
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.thing_action_menu, menu);
return true;
}
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
int count = getListView().getCheckedItemCount();
boolean hasAccount = AccountUtils.isAccount(ThingAdapter.getAccountName(adapterArgs));
mode.setTitle(getResources().getQuantityString(R.plurals.things, count, count));
menu.findItem(R.id.menu_reply).setVisible(hasAccount && count == 1);
menu.findItem(R.id.menu_compose_message).setVisible(hasAccount && count == 1);
menu.findItem(R.id.menu_view_profile).setVisible(count == 1);
menu.findItem(R.id.menu_copy_url).setVisible(count == 1);
boolean showSave = false;
boolean showUnsave = false;
if (hasAccount && count == 1) {
showSave = !adapter.isSaved(getFirstCheckedPosition());
showUnsave = !showSave;
}
menu.findItem(R.id.menu_save).setVisible(showSave);
menu.findItem(R.id.menu_unsave).setVisible(showUnsave);
return true;
}
public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {
mode.invalidate();
}
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_reply:
return handleReply(mode);
case R.id.menu_compose_message:
return handleComposeMessage(mode);
case R.id.menu_save:
return handleSave(mode, SaveActions.ACTION_SAVE);
case R.id.menu_unsave:
return handleSave(mode, SaveActions.ACTION_UNSAVE);
case R.id.menu_view_profile:
return handleViewProfile(mode);
case R.id.menu_copy_url:
return handleCopyUrl(mode);
default:
return false;
}
}
private boolean handleReply(ActionMode mode) {
int position = getFirstCheckedPosition();
String user = adapter.getAuthor(position);
Bundle extras = adapter.getReplyExtras(adapterArgs, position);
MenuHelper.startComposeActivity(getActivity(),
ComposeActivity.COMPOSITION_MESSAGE_REPLY, user, extras);
mode.finish();
return true;
}
private boolean handleComposeMessage(ActionMode mode) {
String user = adapter.getAuthor(getFirstCheckedPosition());
MenuHelper.startComposeActivity(getActivity(),
ComposeActivity.COMPOSITION_MESSAGE, user, null);
mode.finish();
return true;
}
private boolean handleSave(ActionMode mode, int action) {
String accountName = ThingAdapter.getAccountName(adapterArgs);
String thingId = adapter.getThingId(getFirstCheckedPosition());
Provider.saveAsync(getActivity(), accountName, thingId, action);
mode.finish();
return true;
}
private boolean handleViewProfile(ActionMode mode) {
String user = adapter.getAuthor(getFirstCheckedPosition());
MenuHelper.startProfileActivity(getActivity(), user);
mode.finish();
return true;
}
private boolean handleCopyUrl(ActionMode mode) {
int position = getFirstCheckedPosition();
String title = adapter.getTitle(position);
CharSequence url = adapter.getUrl(position);
MenuHelper.setClipAndToast(getActivity(), title, url);
mode.finish();
return true;
}
public void onDestroyActionMode(ActionMode mode) {
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.thing_list_menu, menu);
}
@Override
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
String subreddit = ThingAdapter.getSubreddit(adapterArgs);
menu.findItem(R.id.menu_view_subreddit_sidebar)
.setVisible(subreddit != null && !Subreddits.isFrontPage(subreddit));
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_add:
handleAdd();
return true;
case R.id.menu_view_subreddit_sidebar:
handleViewSidebar();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void handleAdd() {
}
private void handleViewSidebar() {
Intent intent = new Intent(getActivity(), SidebarActivity.class);
intent.putExtra(SidebarActivity.EXTRA_SUBREDDIT, ThingAdapter.getSubreddit(adapterArgs));
startActivity(intent);
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBundle(STATE_ADAPTER_ARGS, adapterArgs);
outState.putString(STATE_SELECTED_THING_ID, selectedThingId);
outState.putString(STATE_SELECTED_LINK_ID, selectedLinkId);
outState.putInt(STATE_EMPTY_TEXT, emptyText);
}
private int getThingBodyWidth() {
return listener != null ? listener.onMeasureThingBody() : 0;
}
public void setAccountName(String accountName) {
adapterArgs.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName);
adapter.setAccountName(accountName);
}
public void setSelectedThing(String thingId, String linkId) {
selectedThingId = thingId;
selectedLinkId = linkId;
adapter.setSelectedThing(thingId, linkId);
}
public String getAccountName() {
return adapterArgs.getString(ThingAdapter.ARG_ACCOUNT_NAME);
}
public void setSubreddit(String subreddit) {
if (!Objects.equalsIgnoreCase(subreddit, ThingAdapter.getSubreddit(adapterArgs))) {
adapterArgs.putString(ThingAdapter.ARG_SUBREDDIT, subreddit);
}
}
public String getQuery() {
return ThingAdapter.getQuery(adapterArgs);
}
public int getFilter() {
return ThingAdapter.getFilter(adapterArgs);
}
private int getFirstCheckedPosition() {
SparseBooleanArray checked = getListView().getCheckedItemPositions();
int size = adapter.getCount();
for (int i = 0; i < size; i++) {
if (checked.get(i)) {
return i;
}
}
return -1;
}
}
| [
"[email protected]"
] | |
e9b3a769f308523a6215acffa64688a13abb96fc | 33e47549a7f3f7621be100b68efac0df9f671553 | /src/com/huaixuan/network/biz/enums/EnumAdminLog.java | 0d1b72635e94850804a72b371f56f08d115028e3 | [] | no_license | Maddox-Zhao/admin | 150b60074e5b89692da52bcdb0b789bdd581a915 | 67ff15e6a5731aa39c0b747dfca35efc4c87a121 | refs/heads/master | 2022-08-20T00:06:19.244070 | 2019-10-31T05:58:30 | 2019-10-31T05:58:30 | 218,693,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,277 | java | /**
* created since 2009-7-20
*/
package com.huaixuan.network.biz.enums;
import java.util.HashMap;
import java.util.Map;
/**
* @author zhangwy
*/
public enum EnumAdminLog {
//struts-admin-admin
ADDUSER("addUser", "跳转到增加用户页面"),INSERTUSER("insertUser", "增加用户"),EDITUSER("editUser","跳转到修改用户页面"),MODIFYUSER("modifyUser","修改用户"),
FREEZEUSER("freezeUser","冻结用户"),THAWUSER("thawUser","解冻用户"),USERROLELIST("userRoleList","用户角色列表"),MODIFYUSERROLE("modifyUserRole","修改用户角色"),
ROLELIST("roleList","角色列表"),ADDROLE("addRole","跳转到增加角色页面"),INSERTROLE("insertRole","增加角色"),EDITROLE("editRole","跳转到修改角色页面"),
MODIFYROLE("modifyRole","修改角色"),ROLEAUTHORITYLIST("roleAuthorityList","角色权限列表"),MODIFYROLEAUTHORITY("modifyRoleAuthority","修改角色权限"),
EDITPASSWORD("editPassword","跳转到修改密码页面"),MODIFYUSERPASSWORD("modifyUserPassword","修改密码"),EDITCURUSER("editCurUser","跳转到用户信息修改页面"),
MODIFYCURUSER("modifyCurUser","用户信息修改"),
//struts-admin-attribute
ADDATTR("addattr","跳转到添加属性页面"),ADDA("adda","添加属性"),EDITA("edita","跳转到编辑属性页面"),EA("ea","编辑属性"),RA("ra","删除属性"),BATCHDEL("batchdel","批量删除属性"),
//struts-admin-category
MODIFY("modify","修改类目"),REMOVEC("removec","删除类目"),ADDCAT("addcat","跳转到新增类目页面"),ADDC("addc","新增类目"),ADDCA("addca","添加属性关联"),
//struts-admin-goods
PUBLISH("init_publish","跳转到发布商品页面"),CREATEGOODSINSTANCEDATA("createGoodsInstanceData","根据商品生成产品数据"),DP("dp","发布商品"),DOAGENT("doagent","设置商品为代销商品"),
DODISAGENT("dodisagent","取消商品为代销商品"),BATCHGOODS("batchGoods","批量导入商品"),DOBATCHPUBLIS("doBatchPublis","批量上传商品"),EDITG("editg","跳转到修改商品页面"),
DOEG("doeg","修改商品"),DELISTINGGB("delistinggb","批量下架商品"),DELISTING("delisting","单个下架商品"),DELETEG("deleteg","删除商品"),CUTPRICE("cutPrice","设置商品为特价商品"),
DOAGENTGOODS("doAgentGoods","批量设置代销商品"),DOCANELAGENTGOODS("doCanelAgentGoods","批量取消代销商品"),DECUTPRICE("deCutPrice","取消商品为特价商品"),CUTPRICEGOODS("cutPriceGoods","批量设置特价商品"),
CANELCUTPRICEGOODS("canelCutPriceGoods","批量取消特价商品"),DOACTIVITYGOODS("doActivityGoods","设置商品为活动商品"),UPDATEPROMATION("updatePromation","修改套餐"),ADDPRO("addPro","增加套餐"),
PROMATION("promation","添加满就减规则"),ADDFULLGIVE("addFullGive","添加满就送规则"),UPDATEFULLREDUCE("updateFullReduce","修改满就减规则"),UPDATEFULLGIVE("updateFullGive","修改满就送规则"),
PORTSALE("portsale","跳转到添加套餐页面"),ADDSALE("addsale","添加套餐"),ADDSALEGOODS("addsalegoods","添加套餐商品"),UPDATEPSP("updatepsp","跳转到套餐修改页面"),UPDATESALE("updatesale","修改套餐"),
ADDGIFT("addGift","添加买就赠"),UPDATEGB("updategb","跳转到修改买就赠页面"),UPDATEGIFT("updategift","修改买就赠"),CREATEINSTANCE("create_instance","添加产品"),
UPDATEINSTANCE("update_instance","修改产品"),UPDATEINSTANCELOCATION("update_instance_location","修改产品库位"),UPDATEINSTANCESUPPLIER("update_instance_supplier","修改产品供应商"),
REMOVEINSTANCESUPPLIER("remove_instance_supplier","删除产品供应商"),ADDINSTANCESUPPLIER("add_instance_supplier","跳转到新增产品供应商页面"),CREATEINSTANCESUPPLIER("create_instance_supplier","新增产品供应商"),
LISTING("listing","商品上架"),LISTINGGB("listinggb","商品批量上架"),
//struts-admin-ios
ADDSUP("addSup","添加供应商"),DISABLE("disable","供应商失效"),ENABLE("enable","供应商激活"),DELSUPPLIERGOODS("delSupplierGoods","删除供应商"),EDITSUP("editSup","更新供应商"),
ADDSUPGOODS("addSupGoods","添加供应商"),ADDDAMAGED("addDamaged","新增报残单"),ADDDAMAGEDGOODS("addDamagedGoods","新增报残单商品信息"),EDITDAMAGED("editDamaged","编辑报残单"),
EDITDAMAGEDATTRIBUTE("editDamagedAttribute","编辑报残单属性"),DELETEDAMAGEDGOODS("deleteDamagedGoods","删除报残商品"),ADDDEPOSITORY("addDepository","新增仓库"),
EDITDEPOSITORY("editDepository","编辑仓库信息"),ADDDEPLOCATION("addDepLocation","新增库位"),EDITDEPLOCATION("editDepLocation","编辑库位信息"),STOCKADD("stockAdd","新增采购订单"),
ADDSTOCKGOODS("addStockGoods","增加采购订单商品信息"),REFUND("refund","退货操作"),STOCKEDIT("stockEdit","编辑采购订单"),EDITSTOCKATTRIBUTE("editStockAttribute","编辑采购订单状态"),
STOCKDELETE("stockDelete","删除采购商品"),CHECKSTOK("checkStock","验收修改采购订单"),COPYADD("copyAdd","复制新增采购订单"),ADDSREFUND("addSRefund","新增退货单"),
ADDOUTDEP("addOutDep","生成出库单"),INDEPOSITORYOPT("inDepositoryOpt","产品库位分配"),GATHEROUTDEPOSITORY("getherOutDepository","出库单成本汇总统计查询"),
REFUNDSTORAGES("refundStorages","库存退货"),RETURNSTOCK("returnStock","库存归还记录查询"),MOVELOGRETURN("moveLogReturn","外借回调操作页面"),RETURNONESTOCK("returnOneStock","单个记录做归还操作"),
ADDSTORCHECK("addStorCheck","新增盘存信息"),UPDATESTORAGE("updateStorage","更新盘存信息"),FINISHSTORECHECK("finishStoreCheck","完成盘点"),IMPORTSUPPLIERGOODS("importSupplierGoods","excel导入供应商商品信息"),
BATCHMODIFYEXPRESSDIST("batchModifyExpressDist","批量修改物流范围"),
FINANCEOUTDEPOSITORYCONFIRM("financeOutDepositoryConfirm","出库单财务确认"),
FINANCEINDEPOSITORYCONFIRM("financeInDepositoryConfirm","入库单财务确认"),
EDITFINANCESTATUS("editFinanceStatus","采购单付款确认"),
//struts-admin-shop
ADDN("addn","新增公告"),DELETEN("deleten","批量删除公告"),UPDATEN("updaten","修改公告"),DELETEADMINWEBSITE("deleteAdminWebSite","删除站内信"),UPDATEADMINWEBSITE("updateAdminWebSite","修改站内信"),
SAVEWEBSITE("saveWebSite","添加站内信"),DELETEAD("deletead","删除广告"),ADDAD("addad","新增广告"),UPDATEAD("updatead","更新广告"),DELETEADP("deleteadp","删除广告位"),
ADDFL("addfl","新增友情链接"),UPDATEFL("updatefl","更新友情链接"),DELETEKW("deletekw","删除热门关键字"),ADDKW("addkw","新增热门关键字"),UPDATEKW("updatekw","更新热门关键字"),
DELETESC("deletesc","删除橱窗推荐位"),DELETEBR("deletebr","删除品牌"),ADDBR("addbr","新增品牌"),ADDAR("addar","添加资讯"),DELETEAR("deletear","删除资讯"),TOP("top","置顶资讯"),
USHOW("ushow","显示资讯"),UPDATEAR("updatear","更新资讯"),ADDNAV("addnav","新增导航"),UPDATENAV("updatenav","修改导航"),SBARD("sbard","修改榜单"),INSERTACTIVITY("insertActivity","新增专场"),
UPDATEACTITY("updateActity","修改专场信息"),
//struts-admin-trade
ADDTRADE("addTrade","后台添加订单"),CHANGE("change","换货操作"),REFUNDGOODS("refundGoods","退货操作"),REFUSEREFUNDGOODS("refuseRefundGoods","拒绝退货"),AGREEREFUNDGOODS("agreeRefundGoods","同意退货"),
SENDFB("sendfb","发送留言"),CONREFUND("conRefund","查看处理退货申请"),REFCHA("refcha","退款退货申请"),CONGOO("congoo","卖家确认收到退货"),
//struts-admin-users
REPLYCOMM("replycomm","编辑用户评论"),REPLYFB("replyfb","编辑留言"),REGUSERS("regusers","注册用户管理"),ANA("ana","新增普通管理员"),EDITAP("editap","管理员密码修改");
private String code;
private String name;
EnumAdminLog(String code,String name){
this.code=code;
this.name=name;
}
public String getKey() {
return this.code;
}
public String getValue(){
return this.name;
}
public static Map<String, String> toMap() {
Map<String, String> enumDataMap = new HashMap<String, String>();
enumDataMap.put(ADDUSER.getKey(), ADDUSER.getValue());
enumDataMap.put(INSERTUSER.getKey(), INSERTUSER.getValue());
enumDataMap.put(EDITUSER.getKey(), EDITUSER.getValue());
enumDataMap.put(MODIFYUSER.getKey(), MODIFYUSER.getValue());
enumDataMap.put(FREEZEUSER.getKey(), FREEZEUSER.getValue());
enumDataMap.put(THAWUSER.getKey(), THAWUSER.getValue());
enumDataMap.put(USERROLELIST.getKey(), USERROLELIST.getValue());
enumDataMap.put(MODIFYUSERROLE.getKey(), MODIFYUSERROLE.getValue());
enumDataMap.put(ROLELIST.getKey(), ROLELIST.getValue());
enumDataMap.put(ADDROLE.getKey(), ADDROLE.getValue());
enumDataMap.put(INSERTROLE.getKey(), INSERTROLE.getValue());
enumDataMap.put(EDITROLE.getKey(), EDITROLE.getValue());
enumDataMap.put(MODIFYROLE.getKey(), MODIFYROLE.getValue());
enumDataMap.put(ROLEAUTHORITYLIST.getKey(), ROLEAUTHORITYLIST.getValue());
enumDataMap.put(MODIFYROLEAUTHORITY.getKey(), MODIFYROLEAUTHORITY.getValue());
enumDataMap.put(EDITPASSWORD.getKey(), EDITPASSWORD.getValue());
enumDataMap.put(MODIFYUSERPASSWORD.getKey(), MODIFYUSERPASSWORD.getValue());
enumDataMap.put(EDITCURUSER.getKey(), EDITCURUSER.getValue());
enumDataMap.put(MODIFYCURUSER.getKey(), MODIFYCURUSER.getValue());
enumDataMap.put(ADDATTR.getKey(), ADDATTR.getValue());
enumDataMap.put(ADDA.getKey(), ADDA.getValue());
enumDataMap.put(EDITA.getKey(), EDITA.getValue());
enumDataMap.put(EA.getKey(), EA.getValue());
enumDataMap.put(RA.getKey(), RA.getValue());
enumDataMap.put(BATCHDEL.getKey(), BATCHDEL.getValue());
enumDataMap.put(MODIFY.getKey(), MODIFY.getValue());
enumDataMap.put(REMOVEC.getKey(), REMOVEC.getValue());
enumDataMap.put(ADDCAT.getKey(), ADDCAT.getValue());
enumDataMap.put(ADDC.getKey(), ADDC.getValue());
enumDataMap.put(ADDCA.getKey(), ADDCA.getValue());
enumDataMap.put(PUBLISH.getKey(), PUBLISH.getValue());
enumDataMap.put(CREATEGOODSINSTANCEDATA.getKey(), CREATEGOODSINSTANCEDATA.getValue());
enumDataMap.put(DP.getKey(), DP.getValue());
enumDataMap.put(DOAGENT.getKey(), DOAGENT.getValue());
enumDataMap.put(DODISAGENT.getKey(), DODISAGENT.getValue());
enumDataMap.put(BATCHGOODS.getKey(), BATCHGOODS.getValue());
enumDataMap.put(DOBATCHPUBLIS.getKey(), DOBATCHPUBLIS.getValue());
enumDataMap.put(EDITG.getKey(), EDITG.getValue());
enumDataMap.put(DOEG.getKey(), DOEG.getValue());
enumDataMap.put(DELISTINGGB.getKey(), DELISTINGGB.getValue());
enumDataMap.put(DELISTING.getKey(), DELISTING.getValue());
enumDataMap.put(DELETEG.getKey(), DELETEG.getValue());
enumDataMap.put(CUTPRICE.getKey(), CUTPRICE.getValue());
enumDataMap.put(DOAGENTGOODS.getKey(), DOAGENTGOODS.getValue());
enumDataMap.put(DOCANELAGENTGOODS.getKey(), DOCANELAGENTGOODS.getValue());
enumDataMap.put(DECUTPRICE.getKey(), DECUTPRICE.getValue());
enumDataMap.put(CUTPRICEGOODS.getKey(), CUTPRICEGOODS.getValue());
enumDataMap.put(CANELCUTPRICEGOODS.getKey(), CANELCUTPRICEGOODS.getValue());
enumDataMap.put(DOACTIVITYGOODS.getKey(), DOACTIVITYGOODS.getValue());
enumDataMap.put(UPDATEPROMATION.getKey(), UPDATEPROMATION.getValue());
enumDataMap.put(ADDPRO.getKey(), ADDPRO.getValue());
enumDataMap.put(PROMATION.getKey(), PROMATION.getValue());
enumDataMap.put(ADDFULLGIVE.getKey(), ADDFULLGIVE.getValue());
enumDataMap.put(UPDATEFULLREDUCE.getKey(), UPDATEFULLREDUCE.getValue());
enumDataMap.put(UPDATEFULLGIVE.getKey(), UPDATEFULLGIVE.getValue());
enumDataMap.put(PORTSALE.getKey(), PORTSALE.getValue());
enumDataMap.put(ADDSALE.getKey(), ADDSALE.getValue());
enumDataMap.put(ADDSALEGOODS.getKey(), ADDSALEGOODS.getValue());
enumDataMap.put(UPDATEPSP.getKey(), UPDATEPSP.getValue());
enumDataMap.put(UPDATESALE.getKey(), UPDATESALE.getValue());
enumDataMap.put(ADDGIFT.getKey(), ADDGIFT.getValue());
enumDataMap.put(UPDATEGB.getKey(), UPDATEGB.getValue());
enumDataMap.put(UPDATEGIFT.getKey(), UPDATEGIFT.getValue());
enumDataMap.put(CREATEINSTANCE.getKey(), CREATEINSTANCE.getValue());
enumDataMap.put(UPDATEINSTANCE.getKey(), UPDATEINSTANCE.getValue());
enumDataMap.put(UPDATEINSTANCELOCATION.getKey(), UPDATEINSTANCELOCATION.getValue());
enumDataMap.put(UPDATEINSTANCESUPPLIER.getKey(), UPDATEINSTANCESUPPLIER.getValue());
enumDataMap.put(REMOVEINSTANCESUPPLIER.getKey(), REMOVEINSTANCESUPPLIER.getValue());
enumDataMap.put(ADDINSTANCESUPPLIER.getKey(), ADDINSTANCESUPPLIER.getValue());
enumDataMap.put(CREATEINSTANCESUPPLIER.getKey(), CREATEINSTANCESUPPLIER.getValue());
enumDataMap.put(ADDSUP.getKey(), ADDSUP.getValue());
enumDataMap.put(DISABLE.getKey(), DISABLE.getValue());
enumDataMap.put(ENABLE.getKey(), ENABLE.getValue());
enumDataMap.put(DELSUPPLIERGOODS.getKey(), DELSUPPLIERGOODS.getValue());
enumDataMap.put(EDITSUP.getKey(), EDITSUP.getValue());
enumDataMap.put(ADDSUPGOODS.getKey(), ADDSUPGOODS.getValue());
enumDataMap.put(ADDDAMAGED.getKey(), ADDDAMAGED.getValue());
enumDataMap.put(ADDDAMAGEDGOODS.getKey(), ADDDAMAGEDGOODS.getValue());
enumDataMap.put(EDITDAMAGED.getKey(), EDITDAMAGED.getValue());
enumDataMap.put(EDITDAMAGEDATTRIBUTE.getKey(), EDITDAMAGEDATTRIBUTE.getValue());
enumDataMap.put(DELETEDAMAGEDGOODS.getKey(), DELETEDAMAGEDGOODS.getValue());
enumDataMap.put(ADDDEPOSITORY.getKey(), ADDDEPOSITORY.getValue());
enumDataMap.put(EDITDEPOSITORY.getKey(), EDITDEPOSITORY.getValue());
enumDataMap.put(ADDDEPLOCATION.getKey(), ADDDEPLOCATION.getValue());
enumDataMap.put(EDITDEPLOCATION.getKey(), EDITDEPLOCATION.getValue());
enumDataMap.put(STOCKADD.getKey(), STOCKADD.getValue());
enumDataMap.put(ADDSTOCKGOODS.getKey(), ADDSTOCKGOODS.getValue());
enumDataMap.put(REFUND.getKey(), REFUND.getValue());
enumDataMap.put(STOCKEDIT.getKey(), STOCKEDIT.getValue());
enumDataMap.put(EDITSTOCKATTRIBUTE.getKey(), EDITSTOCKATTRIBUTE.getValue());
enumDataMap.put(STOCKDELETE.getKey(), STOCKDELETE.getValue());
enumDataMap.put(CHECKSTOK.getKey(), CHECKSTOK.getValue());
enumDataMap.put(COPYADD.getKey(), COPYADD.getValue());
enumDataMap.put(ADDSREFUND.getKey(), ADDSREFUND.getValue());
enumDataMap.put(ADDOUTDEP.getKey(), ADDOUTDEP.getValue());
enumDataMap.put(INDEPOSITORYOPT.getKey(), INDEPOSITORYOPT.getValue());
enumDataMap.put(GATHEROUTDEPOSITORY.getKey(), GATHEROUTDEPOSITORY.getValue());
enumDataMap.put(REFUNDSTORAGES.getKey(), REFUNDSTORAGES.getValue());
enumDataMap.put(RETURNSTOCK.getKey(), RETURNSTOCK.getValue());
enumDataMap.put(MOVELOGRETURN.getKey(), MOVELOGRETURN.getValue());
enumDataMap.put(RETURNONESTOCK.getKey(), RETURNONESTOCK.getValue());
enumDataMap.put(ADDSTORCHECK.getKey(), ADDSTORCHECK.getValue());
enumDataMap.put(UPDATESTORAGE.getKey(), UPDATESTORAGE.getValue());
enumDataMap.put(FINISHSTORECHECK.getKey(), FINISHSTORECHECK.getValue());
enumDataMap.put(IMPORTSUPPLIERGOODS.getKey(), IMPORTSUPPLIERGOODS.getValue());
enumDataMap.put(BATCHMODIFYEXPRESSDIST.getKey(), BATCHMODIFYEXPRESSDIST.getValue());
enumDataMap.put(ADDN.getKey(), ADDN.getValue());
enumDataMap.put(DELETEN.getKey(), DELETEN.getValue());
enumDataMap.put(UPDATEN.getKey(), UPDATEN.getValue());
enumDataMap.put(DELETEADMINWEBSITE.getKey(), DELETEADMINWEBSITE.getValue());
enumDataMap.put(UPDATEADMINWEBSITE.getKey(), UPDATEADMINWEBSITE.getValue());
enumDataMap.put(SAVEWEBSITE.getKey(), SAVEWEBSITE.getValue());
enumDataMap.put(DELETEAD.getKey(), DELETEAD.getValue());
enumDataMap.put(ADDAD.getKey(), ADDAD.getValue());
enumDataMap.put(UPDATEAD.getKey(), UPDATEAD.getValue());
enumDataMap.put(DELETEADP.getKey(), DELETEADP.getValue());
enumDataMap.put(ADDFL.getKey(), ADDFL.getValue());
enumDataMap.put(UPDATEFL.getKey(), UPDATEFL.getValue());
enumDataMap.put(DELETEKW.getKey(), DELETEKW.getValue());
enumDataMap.put(ADDKW.getKey(), ADDKW.getValue());
enumDataMap.put(UPDATEKW.getKey(), UPDATEKW.getValue());
enumDataMap.put(DELETESC.getKey(), DELETESC.getValue());
enumDataMap.put(DELETEBR.getKey(), DELETEBR.getValue());
enumDataMap.put(ADDBR.getKey(), ADDBR.getValue());
enumDataMap.put(ADDAR.getKey(), ADDAR.getValue());
enumDataMap.put(DELETEAR.getKey(), DELETEAR.getValue());
enumDataMap.put(TOP.getKey(), TOP.getValue());
enumDataMap.put(USHOW.getKey(), USHOW.getValue());
enumDataMap.put(UPDATEAR.getKey(), UPDATEAR.getValue());
enumDataMap.put(ADDNAV.getKey(), ADDNAV.getValue());
enumDataMap.put(UPDATENAV.getKey(), UPDATENAV.getValue());
enumDataMap.put(SBARD.getKey(), SBARD.getValue());
enumDataMap.put(INSERTACTIVITY.getKey(), INSERTACTIVITY.getValue());
enumDataMap.put(UPDATEACTITY.getKey(), UPDATEACTITY.getValue());
enumDataMap.put(ADDTRADE.getKey(), ADDTRADE.getValue());
enumDataMap.put(CHANGE.getKey(), CHANGE.getValue());
enumDataMap.put(REFUNDGOODS.getKey(), REFUNDGOODS.getValue());
enumDataMap.put(REFUSEREFUNDGOODS.getKey(), REFUSEREFUNDGOODS.getValue());
enumDataMap.put(AGREEREFUNDGOODS.getKey(), AGREEREFUNDGOODS.getValue());
enumDataMap.put(SENDFB.getKey(), SENDFB.getValue());
enumDataMap.put(CONREFUND.getKey(), CONREFUND.getValue());
enumDataMap.put(REFCHA.getKey(), REFCHA.getValue());
enumDataMap.put(CONGOO.getKey(), CONGOO.getValue());
enumDataMap.put(REPLYCOMM.getKey(), REPLYCOMM.getValue());
enumDataMap.put(REPLYFB.getKey(), REPLYFB.getValue());
enumDataMap.put(REGUSERS.getKey(), REGUSERS.getValue());
enumDataMap.put(ANA.getKey(), ANA.getValue());
enumDataMap.put(EDITAP.getKey(), EDITAP.getValue());
enumDataMap.put(LISTING.getKey(), LISTING.getValue());
enumDataMap.put(LISTINGGB.getKey(), LISTINGGB.getValue());
enumDataMap.put(FINANCEOUTDEPOSITORYCONFIRM.getKey(), FINANCEOUTDEPOSITORYCONFIRM.getValue());
enumDataMap.put(FINANCEINDEPOSITORYCONFIRM.getKey(), FINANCEINDEPOSITORYCONFIRM.getValue());
enumDataMap.put(EDITFINANCESTATUS.getKey(), EDITFINANCESTATUS.getValue());
return enumDataMap;
}
private static Map<String,EnumAdminLog> logmap = new HashMap<String, EnumAdminLog>();
static {
for (EnumAdminLog enumAdminLog : EnumAdminLog.values()) {
logmap.put(enumAdminLog.getKey(), enumAdminLog);
}
}
public static EnumAdminLog findLog(String key) {
return logmap.get(key);
};
}
| [
"[email protected]"
] | |
54f3205df22e4a857ca2c4e7785284c9c0e0d0b7 | ec904803f1c36f5558d1933284b0c6a62094a76d | /src/com/stackdemos/JavaStack.java | 143043577b6f9465ea1443efe474d90e0d7d7ede | [] | no_license | praveen-java/DSDemos | ee342912d0fdc5de6de1a7ceeec35ac31672b4c9 | 22776bf072f1f0d77184dbfbd28f1a6aea774215 | refs/heads/master | 2020-03-28T08:48:28.459575 | 2018-10-06T19:29:53 | 2018-10-06T19:29:53 | 147,990,542 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 986 | java | package com.stackdemos;
public class JavaStack {
private int capacity;
private int top = -1;
private int size;
private static final int CAPACITY = 10;
private int stack[];
public JavaStack() {
stack = new int[CAPACITY];
}
public JavaStack(int capacity) {
this.capacity = capacity;
stack = new int[capacity];
}
public int push(int element) {
stack[++top] = element;
return element;
}
public int pop() {
int element = stack[top--];
return element;
}
public int getSize() {
return size;
}
public void displayStack() {
System.out.print("["+stack[0]);
for(int i = 1;i<top ; i++ ) {
System.out.print(", "+stack[i]);
}
System.out.println(stack[top]+" ]");
System.out.println("size of the stack is :: "+(top+1));
}
public static void main(String[] args) {
while(true) {
System.out.println("::This is Java Stack Demo::");
System.out.println("1.push");
System.out.println("2.pop");
System.out.println("3.show ");
}
}
}
| [
"ubuntu@ubuntu"
] | ubuntu@ubuntu |
64982375ee9ced8004ac1f1e018e3c8faca18944 | 0534c419e373351a4c4323d36d322e57908fbbcb | /testJavaCV/build/generated/source/r/debug/com/example/testjavacv/R.java | f2d2b5a5e6ca802027e02c3584c077035e600f11 | [] | no_license | zgljl2012/AzCamera | de192542b6e8d6cf3c138ba2b482b3845c893b19 | 1fc7a80b0b52a0c30c98a2c3163d2f9f2d4c6cae | refs/heads/master | 2021-06-02T08:46:01.005516 | 2018-10-31T12:53:43 | 2018-10-31T12:53:43 | 41,474,689 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 135,260 | 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.example.testjavacv;
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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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></td></tr>
<tr><td><code>listMode</code></td><td>1</td><td></td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td></td></tr>
</table>
*/
public static final int navigationMode=0x7f01003f;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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;
/** <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></td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td></td></tr>
<tr><td><code>always</code></td><td>2</td><td></td></tr>
<tr><td><code>withText</code></td><td>4</td><td></td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr>
</table>
*/
public static final int showAsAction=0x7f010058;
/** <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;
/** <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></td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td></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;
/** <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;
/** <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;
/** <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;
/** <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=0x7f050003;
public static final int abc_config_actionMenuItemAllCaps=0x7f050004;
public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f050001;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f050005;
public static final int abc_split_action_bar_is_narrow=0x7f050002;
}
public static final class color {
public static final int abc_search_url_text_holo=0x7f090003;
public static final int abc_search_url_text_normal=0x7f090000;
public static final int abc_search_url_text_pressed=0x7f090001;
public static final int abc_search_url_text_selected=0x7f090002;
}
public static final class dimen {
public static final int abc_action_bar_default_height=0x7f060000;
public static final int abc_action_bar_icon_vertical_padding=0x7f060001;
public static final int abc_action_bar_stacked_max_height=0x7f06000a;
public static final int abc_action_bar_stacked_tab_max_width=0x7f06000b;
public static final int abc_action_bar_subtitle_bottom_margin=0x7f060002;
public static final int abc_action_bar_subtitle_text_size=0x7f060003;
public static final int abc_action_bar_subtitle_top_margin=0x7f060004;
public static final int abc_action_bar_title_text_size=0x7f060005;
public static final int abc_action_button_min_width=0x7f060008;
public static final int abc_config_prefDialogWidth=0x7f060006;
public static final int abc_dropdownitem_icon_width=0x7f06000c;
public static final int abc_dropdownitem_text_padding_left=0x7f06000d;
public static final int abc_dropdownitem_text_padding_right=0x7f06000e;
public static final int abc_panel_menu_list_width=0x7f06000f;
public static final int abc_search_view_preferred_width=0x7f060010;
public static final int abc_search_view_text_min_width=0x7f060007;
public static final int activity_horizontal_margin=0x7f060009;
public static final int activity_vertical_margin=0x7f060011;
}
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 int p4=0x7f020058;
}
public static final class id {
public static final int action_bar=0x7f0a001a;
public static final int action_bar_activity_content=0x7f0a0000;
public static final int action_bar_container=0x7f0a0019;
public static final int action_bar_overlay_layout=0x7f0a001d;
public static final int action_bar_root=0x7f0a0018;
public static final int action_bar_subtitle=0x7f0a0021;
public static final int action_bar_title=0x7f0a0020;
public static final int action_context_bar=0x7f0a001b;
public static final int action_menu_divider=0x7f0a0001;
public static final int action_menu_presenter=0x7f0a0002;
public static final int action_mode_bar=0x7f0a002f;
public static final int action_mode_bar_stub=0x7f0a002e;
public static final int action_mode_close_button=0x7f0a0022;
public static final int action_settings=0x7f0a0043;
public static final int activity_chooser_view_content=0x7f0a0023;
public static final int always=0x7f0a0011;
public static final int beginning=0x7f0a000d;
public static final int checkbox=0x7f0a002b;
public static final int collapseActionView=0x7f0a0012;
public static final int default_activity_button=0x7f0a0026;
public static final int dialog=0x7f0a0016;
public static final int disableHome=0x7f0a0007;
public static final int dropdown=0x7f0a0017;
public static final int edit_query=0x7f0a0036;
public static final int end=0x7f0a000e;
public static final int expand_activities_button=0x7f0a0024;
public static final int expanded_menu=0x7f0a002a;
public static final int home=0x7f0a0003;
public static final int homeAsUp=0x7f0a0008;
public static final int icon=0x7f0a0028;
public static final int ifRoom=0x7f0a0013;
public static final int image=0x7f0a0025;
public static final int img=0x7f0a0042;
public static final int left_icon=0x7f0a0031;
public static final int listMode=0x7f0a0004;
public static final int list_item=0x7f0a0027;
public static final int middle=0x7f0a000f;
public static final int never=0x7f0a0014;
public static final int none=0x7f0a0010;
public static final int normal=0x7f0a0005;
public static final int progress_circular=0x7f0a0034;
public static final int progress_horizontal=0x7f0a0035;
public static final int radio=0x7f0a002d;
public static final int right_container=0x7f0a0032;
public static final int right_icon=0x7f0a0033;
public static final int search_badge=0x7f0a0038;
public static final int search_bar=0x7f0a0037;
public static final int search_button=0x7f0a0039;
public static final int search_close_btn=0x7f0a003e;
public static final int search_edit_frame=0x7f0a003a;
public static final int search_go_btn=0x7f0a0040;
public static final int search_mag_icon=0x7f0a003b;
public static final int search_plate=0x7f0a003c;
public static final int search_src_text=0x7f0a003d;
public static final int search_voice_btn=0x7f0a0041;
public static final int shortcut=0x7f0a002c;
public static final int showCustom=0x7f0a0009;
public static final int showHome=0x7f0a000a;
public static final int showTitle=0x7f0a000b;
public static final int split_action_bar=0x7f0a001c;
public static final int submit_area=0x7f0a003f;
public static final int tabMode=0x7f0a0006;
public static final int title=0x7f0a0029;
public static final int title_container=0x7f0a0030;
public static final int top_action_bar=0x7f0a001e;
public static final int up=0x7f0a001f;
public static final int useLogo=0x7f0a000c;
public static final int withText=0x7f0a0015;
}
public static final class integer {
public static final int abc_max_action_buttons=0x7f070000;
}
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 support_simple_spinner_dropdown_item=0x7f030019;
}
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=0x7f0b0000;
public static final int abc_action_bar_up_description=0x7f0b0001;
public static final int abc_action_menu_overflow_description=0x7f0b0002;
public static final int abc_action_mode_done=0x7f0b0003;
public static final int abc_activity_chooser_view_see_all=0x7f0b0004;
public static final int abc_activitychooserview_choose_application=0x7f0b0005;
public static final int abc_searchview_description_clear=0x7f0b0006;
public static final int abc_searchview_description_query=0x7f0b0007;
public static final int abc_searchview_description_search=0x7f0b0008;
public static final int abc_searchview_description_submit=0x7f0b0009;
public static final int abc_searchview_description_voice=0x7f0b000a;
public static final int abc_shareactionprovider_share_with=0x7f0b000b;
public static final int abc_shareactionprovider_share_with_application=0x7f0b000c;
public static final int action_settings=0x7f0b000d;
public static final int app_name=0x7f0b000e;
public static final int hello_world=0x7f0b000f;
}
public static final class style {
/** API 11 theme customizations can go here.
API 14 theme customizations can go here.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
*/
public static final int AppBaseTheme=0x7f080000;
/** All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f08003a;
public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f08003b;
public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f08003c;
public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f080007;
public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f080008;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f080009;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f08000a;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f08003d;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f08000b;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f08000c;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f08000d;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f08000e;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f08003e;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f08003f;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f080040;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f080041;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f080042;
public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f080043;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f080044;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f080045;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f080046;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f080047;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f080048;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f080049;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f08004a;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f08004b;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f08004c;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f08000f;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f080010;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f080011;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f080012;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f080013;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f080014;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f080015;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f080016;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f080017;
public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f08004d;
public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f08004e;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f08004f;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f080050;
public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f080051;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f080052;
public static final int Theme_AppCompat=0x7f080053;
public static final int Theme_AppCompat_Base_CompactMenu=0x7f080054;
public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f080055;
public static final int Theme_AppCompat_CompactMenu=0x7f080056;
public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f080057;
public static final int Theme_AppCompat_Light=0x7f080058;
public static final int Theme_AppCompat_Light_DarkActionBar=0x7f080059;
public static final int Theme_Base=0x7f080001;
public static final int Theme_Base_AppCompat=0x7f080018;
public static final int Theme_Base_AppCompat_Light=0x7f080019;
public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f08001a;
public static final int Theme_Base_Light=0x7f080002;
public static final int Widget_AppCompat_ActionBar=0x7f08005a;
public static final int Widget_AppCompat_ActionBar_Solid=0x7f08005b;
public static final int Widget_AppCompat_ActionBar_TabBar=0x7f08005c;
public static final int Widget_AppCompat_ActionBar_TabText=0x7f08005d;
public static final int Widget_AppCompat_ActionBar_TabView=0x7f08005e;
public static final int Widget_AppCompat_ActionButton=0x7f08005f;
public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f080060;
public static final int Widget_AppCompat_ActionButton_Overflow=0x7f080061;
public static final int Widget_AppCompat_ActionMode=0x7f080062;
public static final int Widget_AppCompat_ActivityChooserView=0x7f080063;
public static final int Widget_AppCompat_AutoCompleteTextView=0x7f080064;
public static final int Widget_AppCompat_Base_ActionBar=0x7f08001b;
public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f08001c;
public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f08001d;
public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f08001e;
public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f08001f;
public static final int Widget_AppCompat_Base_ActionButton=0x7f080020;
public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f080021;
public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f080022;
public static final int Widget_AppCompat_Base_ActionMode=0x7f080065;
public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f080023;
public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f080003;
public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f080024;
public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f080025;
public static final int Widget_AppCompat_Base_ListView_Menu=0x7f080026;
public static final int Widget_AppCompat_Base_PopupMenu=0x7f080027;
public static final int Widget_AppCompat_Base_ProgressBar=0x7f080004;
public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f080005;
public static final int Widget_AppCompat_Base_Spinner=0x7f080028;
public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f080066;
public static final int Widget_AppCompat_Light_ActionBar=0x7f080067;
public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f080068;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f080069;
public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f08006a;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f08006b;
public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f08006c;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f08006d;
public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f08006e;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f08006f;
public static final int Widget_AppCompat_Light_ActionButton=0x7f080070;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f080071;
public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f080072;
public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f080073;
public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f080074;
public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f080075;
public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f080029;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f08002a;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f08002b;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f08002c;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f08002d;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f08002e;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f08002f;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f080030;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f080031;
public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f080032;
public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f080033;
public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f080034;
public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f080035;
public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f080076;
public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f080006;
public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f080036;
public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f080037;
public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f080038;
public static final int Widget_AppCompat_Light_Base_Spinner=0x7f080039;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f080077;
public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f080078;
public static final int Widget_AppCompat_Light_PopupMenu=0x7f080079;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f08007a;
public static final int Widget_AppCompat_ListView_DropDown=0x7f08007b;
public static final int Widget_AppCompat_ListView_Menu=0x7f08007c;
public static final int Widget_AppCompat_PopupMenu=0x7f08007d;
public static final int Widget_AppCompat_ProgressBar=0x7f08007e;
public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f08007f;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f080080;
}
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.example.testjavacv:background}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit com.example.testjavacv:backgroundSplit}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_backgroundStacked com.example.testjavacv:backgroundStacked}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_customNavigationLayout com.example.testjavacv:customNavigationLayout}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_displayOptions com.example.testjavacv:displayOptions}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_divider com.example.testjavacv:divider}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_height com.example.testjavacv:height}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_homeLayout com.example.testjavacv:homeLayout}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_icon com.example.testjavacv:icon}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.example.testjavacv:indeterminateProgressStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_itemPadding com.example.testjavacv:itemPadding}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_logo com.example.testjavacv:logo}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_navigationMode com.example.testjavacv:navigationMode}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding com.example.testjavacv:progressBarPadding}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle com.example.testjavacv:progressBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_subtitle com.example.testjavacv:subtitle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle com.example.testjavacv:subtitleTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_title com.example.testjavacv:title}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle com.example.testjavacv:titleTextStyle}</code></td><td></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>This symbol is the offset where the {@link com.example.testjavacv.R.attr#background}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:background
*/
public static final int ActionBar_background = 10;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundSplit}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:backgroundSplit
*/
public static final int ActionBar_backgroundSplit = 12;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundStacked}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:backgroundStacked
*/
public static final int ActionBar_backgroundStacked = 11;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#customNavigationLayout}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:customNavigationLayout
*/
public static final int ActionBar_customNavigationLayout = 13;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#displayOptions}
attribute's value can be found in the {@link #ActionBar} array.
<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>
@attr name com.example.testjavacv:displayOptions
*/
public static final int ActionBar_displayOptions = 3;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#divider}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:divider
*/
public static final int ActionBar_divider = 9;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#height}
attribute's value can be found in the {@link #ActionBar} array.
<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.
@attr name com.example.testjavacv:height
*/
public static final int ActionBar_height = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#homeLayout}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:homeLayout
*/
public static final int ActionBar_homeLayout = 14;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#icon}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:icon
*/
public static final int ActionBar_icon = 7;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#indeterminateProgressStyle}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:indeterminateProgressStyle
*/
public static final int ActionBar_indeterminateProgressStyle = 16;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#itemPadding}
attribute's value can be found in the {@link #ActionBar} array.
<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.
@attr name com.example.testjavacv:itemPadding
*/
public static final int ActionBar_itemPadding = 18;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#logo}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:logo
*/
public static final int ActionBar_logo = 8;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#navigationMode}
attribute's value can be found in the {@link #ActionBar} array.
<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></td></tr>
<tr><td><code>listMode</code></td><td>1</td><td></td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td></td></tr>
</table>
@attr name com.example.testjavacv:navigationMode
*/
public static final int ActionBar_navigationMode = 2;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#progressBarPadding}
attribute's value can be found in the {@link #ActionBar} array.
<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.
@attr name com.example.testjavacv:progressBarPadding
*/
public static final int ActionBar_progressBarPadding = 17;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#progressBarStyle}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:progressBarStyle
*/
public static final int ActionBar_progressBarStyle = 15;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitle}
attribute's value can be found in the {@link #ActionBar} array.
<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.
@attr name com.example.testjavacv:subtitle
*/
public static final int ActionBar_subtitle = 4;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitleTextStyle}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv:subtitleTextStyle
*/
public static final int ActionBar_subtitleTextStyle = 6;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#title}
attribute's value can be found in the {@link #ActionBar} array.
<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.
@attr name com.example.testjavacv:title
*/
public static final int ActionBar_title = 1;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#titleTextStyle}
attribute's value can be found in the {@link #ActionBar} array.
<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>".
@attr name com.example.testjavacv: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.example.testjavacv:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.example.testjavacv:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.example.testjavacv: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.example.testjavacv.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.example.testjavacv:windowActionBar
*/
public static final int ActionBarWindow_windowActionBar = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.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.example.testjavacv:windowActionBarOverlay
*/
public static final int ActionBarWindow_windowActionBarOverlay = 1;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.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.example.testjavacv: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;
/** Attributes that can be used with a ActionMenuView.
*/
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.example.testjavacv:background}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit com.example.testjavacv:backgroundSplit}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_height com.example.testjavacv:height}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle com.example.testjavacv:subtitleTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle com.example.testjavacv:titleTextStyle}</code></td><td></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>This symbol is the offset where the {@link com.example.testjavacv.R.attr#background}
attribute's value can be found in the {@link #ActionMode} array.
<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>".
@attr name com.example.testjavacv:background
*/
public static final int ActionMode_background = 3;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundSplit}
attribute's value can be found in the {@link #ActionMode} array.
<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>".
@attr name com.example.testjavacv:backgroundSplit
*/
public static final int ActionMode_backgroundSplit = 4;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#height}
attribute's value can be found in the {@link #ActionMode} array.
<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.
@attr name com.example.testjavacv:height
*/
public static final int ActionMode_height = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitleTextStyle}
attribute's value can be found in the {@link #ActionMode} array.
<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>".
@attr name com.example.testjavacv:subtitleTextStyle
*/
public static final int ActionMode_subtitleTextStyle = 2;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#titleTextStyle}
attribute's value can be found in the {@link #ActionMode} array.
<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>".
@attr name com.example.testjavacv: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.example.testjavacv:expandActivityOverflowButtonDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #ActivityChooserView_initialActivityCount com.example.testjavacv:initialActivityCount}</code></td><td></td></tr>
</table>
@see #ActivityChooserView_expandActivityOverflowButtonDrawable
@see #ActivityChooserView_initialActivityCount
*/
public static final int[] ActivityChooserView = {
0x7f010053, 0x7f010054
};
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#expandActivityOverflowButtonDrawable}
attribute's value can be found in the {@link #ActivityChooserView} array.
<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>".
@attr name com.example.testjavacv:expandActivityOverflowButtonDrawable
*/
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#initialActivityCount}
attribute's value can be found in the {@link #ActivityChooserView} array.
<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.
@attr name com.example.testjavacv: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.example.testjavacv:textAllCaps}</code></td><td></td></tr>
</table>
@see #CompatTextView_textAllCaps
*/
public static final int[] CompatTextView = {
0x7f010055
};
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#textAllCaps}
attribute's value can be found in the {@link #CompatTextView} array.
<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>".
@attr name com.example.testjavacv: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.example.testjavacv:divider}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutICS_dividerPadding com.example.testjavacv:dividerPadding}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutICS_showDividers com.example.testjavacv:showDividers}</code></td><td></td></tr>
</table>
@see #LinearLayoutICS_divider
@see #LinearLayoutICS_dividerPadding
@see #LinearLayoutICS_showDividers
*/
public static final int[] LinearLayoutICS = {
0x7f010046, 0x7f010056, 0x7f010057
};
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#divider}
attribute's value can be found in the {@link #LinearLayoutICS} array.
<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>".
@attr name com.example.testjavacv:divider
*/
public static final int LinearLayoutICS_divider = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#dividerPadding}
attribute's value can be found in the {@link #LinearLayoutICS} array.
<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.
@attr name com.example.testjavacv:dividerPadding
*/
public static final int LinearLayoutICS_dividerPadding = 2;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#showDividers}
attribute's value can be found in the {@link #LinearLayoutICS} array.
<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>
@attr name com.example.testjavacv: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></td></tr>
<tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td></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>This symbol is the offset where the {@link android.R.attr#checkableBehavior}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:checkableBehavior
*/
public static final int MenuGroup_android_checkableBehavior = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#enabled}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:enabled
*/
public static final int MenuGroup_android_enabled = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#id}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:id
*/
public static final int MenuGroup_android_id = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#menuCategory}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:menuCategory
*/
public static final int MenuGroup_android_menuCategory = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#orderInCategory}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:orderInCategory
*/
public static final int MenuGroup_android_orderInCategory = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#visible}
attribute's value can be found in the {@link #MenuGroup} array.
@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.example.testjavacv:actionLayout}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass com.example.testjavacv:actionProviderClass}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_actionViewClass com.example.testjavacv:actionViewClass}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_showAsAction com.example.testjavacv:showAsAction}</code></td><td></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>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionLayout}
attribute's value can be found in the {@link #MenuItem} array.
<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>".
@attr name com.example.testjavacv:actionLayout
*/
public static final int MenuItem_actionLayout = 14;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionProviderClass}
attribute's value can be found in the {@link #MenuItem} array.
<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.
@attr name com.example.testjavacv:actionProviderClass
*/
public static final int MenuItem_actionProviderClass = 16;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionViewClass}
attribute's value can be found in the {@link #MenuItem} array.
<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.
@attr name com.example.testjavacv:actionViewClass
*/
public static final int MenuItem_actionViewClass = 15;
/**
<p>This symbol is the offset where the {@link android.R.attr#alphabeticShortcut}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:alphabeticShortcut
*/
public static final int MenuItem_android_alphabeticShortcut = 9;
/**
<p>This symbol is the offset where the {@link android.R.attr#checkable}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:checkable
*/
public static final int MenuItem_android_checkable = 11;
/**
<p>This symbol is the offset where the {@link android.R.attr#checked}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:checked
*/
public static final int MenuItem_android_checked = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#enabled}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:enabled
*/
public static final int MenuItem_android_enabled = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#icon}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:icon
*/
public static final int MenuItem_android_icon = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#id}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:id
*/
public static final int MenuItem_android_id = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#menuCategory}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:menuCategory
*/
public static final int MenuItem_android_menuCategory = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#numericShortcut}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:numericShortcut
*/
public static final int MenuItem_android_numericShortcut = 10;
/**
<p>This symbol is the offset where the {@link android.R.attr#onClick}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:onClick
*/
public static final int MenuItem_android_onClick = 12;
/**
<p>This symbol is the offset where the {@link android.R.attr#orderInCategory}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:orderInCategory
*/
public static final int MenuItem_android_orderInCategory = 6;
/**
<p>This symbol is the offset where the {@link android.R.attr#title}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:title
*/
public static final int MenuItem_android_title = 7;
/**
<p>This symbol is the offset where the {@link android.R.attr#titleCondensed}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:titleCondensed
*/
public static final int MenuItem_android_titleCondensed = 8;
/**
<p>This symbol is the offset where the {@link android.R.attr#visible}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:visible
*/
public static final int MenuItem_android_visible = 4;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#showAsAction}
attribute's value can be found in the {@link #MenuItem} array.
<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></td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td></td></tr>
<tr><td><code>always</code></td><td>2</td><td></td></tr>
<tr><td><code>withText</code></td><td>4</td><td></td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr>
</table>
@attr name com.example.testjavacv: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></td></tr>
<tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td></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, 0x010103ea
};
/**
<p>This symbol is the offset where the {@link android.R.attr#headerBackground}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:headerBackground
*/
public static final int MenuView_android_headerBackground = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#horizontalDivider}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:horizontalDivider
*/
public static final int MenuView_android_horizontalDivider = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemBackground}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemBackground
*/
public static final int MenuView_android_itemBackground = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemIconDisabledAlpha}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemIconDisabledAlpha
*/
public static final int MenuView_android_itemIconDisabledAlpha = 6;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemTextAppearance}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemTextAppearance
*/
public static final int MenuView_android_itemTextAppearance = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#preserveIconSpacing}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:preserveIconSpacing
*/
public static final int MenuView_android_preserveIconSpacing = 7;
/**
<p>This symbol is the offset where the {@link android.R.attr#verticalDivider}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:verticalDivider
*/
public static final int MenuView_android_verticalDivider = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#windowAnimationStyle}
attribute's value can be found in the {@link #MenuView} array.
@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></td></tr>
<tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_iconifiedByDefault com.example.testjavacv:iconifiedByDefault}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_queryHint com.example.testjavacv:queryHint}</code></td><td></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>This symbol is the offset where the {@link android.R.attr#imeOptions}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:imeOptions
*/
public static final int SearchView_android_imeOptions = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#inputType}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:inputType
*/
public static final int SearchView_android_inputType = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#maxWidth}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:maxWidth
*/
public static final int SearchView_android_maxWidth = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#iconifiedByDefault}
attribute's value can be found in the {@link #SearchView} 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.example.testjavacv:iconifiedByDefault
*/
public static final int SearchView_iconifiedByDefault = 3;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#queryHint}
attribute's value can be found in the {@link #SearchView} array.
<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.
@attr name com.example.testjavacv: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></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.example.testjavacv:disableChildrenWhenDisabled}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_popupPromptView com.example.testjavacv:popupPromptView}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_prompt com.example.testjavacv:prompt}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_spinnerMode com.example.testjavacv:spinnerMode}</code></td><td></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>This symbol is the offset where the {@link android.R.attr#dropDownHorizontalOffset}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownHorizontalOffset
*/
public static final int Spinner_android_dropDownHorizontalOffset = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownSelector}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownSelector
*/
public static final int Spinner_android_dropDownSelector = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownVerticalOffset}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownVerticalOffset
*/
public static final int Spinner_android_dropDownVerticalOffset = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownWidth}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownWidth
*/
public static final int Spinner_android_dropDownWidth = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#gravity}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:gravity
*/
public static final int Spinner_android_gravity = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#popupBackground}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:popupBackground
*/
public static final int Spinner_android_popupBackground = 2;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#disableChildrenWhenDisabled}
attribute's value can be found in the {@link #Spinner} 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.example.testjavacv:disableChildrenWhenDisabled
*/
public static final int Spinner_disableChildrenWhenDisabled = 9;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#popupPromptView}
attribute's value can be found in the {@link #Spinner} array.
<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>".
@attr name com.example.testjavacv:popupPromptView
*/
public static final int Spinner_popupPromptView = 8;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#prompt}
attribute's value can be found in the {@link #Spinner} array.
<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>".
@attr name com.example.testjavacv:prompt
*/
public static final int Spinner_prompt = 6;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#spinnerMode}
attribute's value can be found in the {@link #Spinner} array.
<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></td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td></td></tr>
</table>
@attr name com.example.testjavacv: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.example.testjavacv:actionDropDownStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.example.testjavacv:dropdownListPreferredItemHeight}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.example.testjavacv:listChoiceBackgroundIndicator}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme com.example.testjavacv:panelMenuListTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth com.example.testjavacv:panelMenuListWidth}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle com.example.testjavacv:popupMenuStyle}</code></td><td></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>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionDropDownStyle}
attribute's value can be found in the {@link #Theme} array.
<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>".
@attr name com.example.testjavacv:actionDropDownStyle
*/
public static final int Theme_actionDropDownStyle = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#dropdownListPreferredItemHeight}
attribute's value can be found in the {@link #Theme} array.
<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.
@attr name com.example.testjavacv:dropdownListPreferredItemHeight
*/
public static final int Theme_dropdownListPreferredItemHeight = 1;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#listChoiceBackgroundIndicator}
attribute's value can be found in the {@link #Theme} array.
<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>".
@attr name com.example.testjavacv:listChoiceBackgroundIndicator
*/
public static final int Theme_listChoiceBackgroundIndicator = 5;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#panelMenuListTheme}
attribute's value can be found in the {@link #Theme} array.
<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>".
@attr name com.example.testjavacv:panelMenuListTheme
*/
public static final int Theme_panelMenuListTheme = 4;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#panelMenuListWidth}
attribute's value can be found in the {@link #Theme} array.
<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.
@attr name com.example.testjavacv:panelMenuListWidth
*/
public static final int Theme_panelMenuListWidth = 3;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#popupMenuStyle}
attribute's value can be found in the {@link #Theme} array.
<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>".
@attr name com.example.testjavacv: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></td></tr>
<tr><td><code>{@link #View_paddingEnd com.example.testjavacv:paddingEnd}</code></td><td></td></tr>
<tr><td><code>{@link #View_paddingStart com.example.testjavacv:paddingStart}</code></td><td></td></tr>
</table>
@see #View_android_focusable
@see #View_paddingEnd
@see #View_paddingStart
*/
public static final int[] View = {
0x010100da, 0x7f010068, 0x7f010069
};
/**
<p>This symbol is the offset where the {@link android.R.attr#focusable}
attribute's value can be found in the {@link #View} array.
@attr name android:focusable
*/
public static final int View_android_focusable = 0;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#paddingEnd}
attribute's value can be found in the {@link #View} array.
<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.
@attr name com.example.testjavacv:paddingEnd
*/
public static final int View_paddingEnd = 2;
/**
<p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#paddingStart}
attribute's value can be found in the {@link #View} array.
<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.
@attr name com.example.testjavacv:paddingStart
*/
public static final int View_paddingStart = 1;
};
}
| [
"[email protected]"
] | |
fbea8285bcecde86edd7fca1c111d354d44696db | 476315065db65549b985cf2d042c167ccdddb518 | /app/src/main/java/com/myapp/popularmovies/details/FetchReviewsTask.java | 8fb6480da9e531a90cdbd04a76b43a22acf99ba2 | [
"Apache-2.0"
] | permissive | markdagraca/Movie_App | 9988737d3fdc08506401594e14ebb677f51491f5 | 0ca517a9d1761edf440ab43205e22f276444c782 | refs/heads/master | 2020-04-07T00:53:35.451940 | 2018-12-05T21:13:44 | 2018-12-05T21:13:44 | 157,923,059 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,905 | java | /*
* Copyright 2016. Dmitry Malkovich
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.myapp.popularmovies.details;
import android.os.AsyncTask;
import android.util.Log;
import com.myapp.popularmovies.BuildConfig;
import com.myapp.popularmovies.network.MovieDatabaseService;
import com.myapp.popularmovies.network.Review;
import com.myapp.popularmovies.network.Reviews;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Encapsulates fetching the movie's reviews from the movie db api.
*/
public class FetchReviewsTask extends AsyncTask<Long, Void, List<Review>> {
@SuppressWarnings("unused")
public static String LOG_TAG = FetchReviewsTask.class.getSimpleName();
private final Listener mListener;
/**
* Interface definition for a callback to be invoked when reviews are loaded.
*/
interface Listener {
void onReviewsFetchFinished(List<Review> reviews);
}
public FetchReviewsTask(Listener listener) {
mListener = listener;
}
@Override
protected List<Review> doInBackground(Long... params) {
// If there's no movie id, there's nothing to look up.
if (params.length == 0) {
return null;
}
long movieId = params[0];
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://api.themoviedb.org/")
.addConverterFactory(GsonConverterFactory.create())
.build();
MovieDatabaseService service = retrofit.create(MovieDatabaseService.class);
Call<Reviews> call = service.findReviewsById(movieId,
BuildConfig.THE_MOVIE_DATABASE_API_KEY);
try {
Response<Reviews> response = call.execute();
Reviews reviews = response.body();
return reviews.getReviews();
} catch (IOException e) {
Log.e(LOG_TAG, "A problem occurred talking to the movie db ", e);
}
return null;
}
@Override
protected void onPostExecute(List<Review> reviews) {
if (reviews != null) {
mListener.onReviewsFetchFinished(reviews);
} else {
mListener.onReviewsFetchFinished(new ArrayList<Review>());
}
}
}
| [
"[email protected]"
] | |
e630f78c39df054d00a6f8f5289fe4a8ad365205 | 342647a9a9a12300e16439044bbab34e400f9df3 | /src/test/java/sevenkyu/splitinparts/SplitInPartsTest.java | 19382b323b7590b43d99ad08a182da52603b92d5 | [] | no_license | hajdumozes/kata-collection | 783c93b53b8354b507b36ec51957abf434f56675 | f0a6ffd15f83f79b3d838f6cc3de5d5bb779332b | refs/heads/main | 2023-08-08T08:44:33.416373 | 2021-08-31T06:35:52 | 2021-08-31T06:35:52 | 373,403,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,352 | java | package sevenkyu.splitinparts;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class SplitInPartsTest {
SplitInParts splitInParts;
@BeforeEach
public void init() {
splitInParts = new SplitInParts();
}
@Test
public void givenPartIsLongerThanString_splitInParts_shouldNotSplit() {
// Given
String string = "HelloKata";
int partLength = 9;
// When
String result = splitInParts.splitInParts(string, partLength);
// Then
assertThat(result).isEqualTo(string);
}
@Test
public void givenStringLengthIsAMultipleOFPartLength_splitInParts_shouldSplitEqually() {
// Given
String string = "HelloKata";
int partLength = 3;
// When
String result = splitInParts.splitInParts(string, partLength);
// Then
assertThat(result).isEqualTo("Hel loK ata");
}
@Test
public void givenStringLengthIsNotAMultipleOFPartLength_splitInParts_shouldHaveTheLastPartShorter() {
// Given
String string = "HelloKata";
int partLength = 2;
// When
String result = splitInParts.splitInParts(string, partLength);
// Then
assertThat(result).isEqualTo("He ll oK at a");
}
} | [
"[email protected]"
] | |
11d899f9472ada401058f03c2fd4348feae853ac | c6992ce8db7e5aab6fd959c0c448659ab91b16ce | /sdk/mysql/azure-resourcemanager-mysql/src/samples/java/com/azure/resourcemanager/mysql/RecommendedActionsListByServerSamples.java | a0406ac047f4bdf80d59429a9df78a8bcc6bee46 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"CC0-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later"
] | permissive | g2vinay/azure-sdk-for-java | ae6d94d583cc2983a5088ec8f6146744ee82cb55 | b88918a2ba0c3b3e88a36c985e6f83fc2bae2af2 | refs/heads/master | 2023-09-01T17:46:08.256214 | 2021-09-23T22:20:20 | 2021-09-23T22:20:20 | 161,234,198 | 3 | 1 | MIT | 2020-01-16T20:22:43 | 2018-12-10T20:44:41 | Java | UTF-8 | Java | false | false | 1,006 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mysql;
import com.azure.core.util.Context;
/** Samples for RecommendedActions ListByServer. */
public final class RecommendedActionsListByServerSamples {
/**
* Sample code: RecommendedActionsListByServer.
*
* @param mySqlManager Entry point to MySqlManager. The Microsoft Azure management API provides create, read,
* update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET
* rules, log files and configurations with new business model.
*/
public static void recommendedActionsListByServer(com.azure.resourcemanager.mysql.MySqlManager mySqlManager) {
mySqlManager
.recommendedActions()
.listByServer("testResourceGroupName", "testServerName", "Index", null, Context.NONE);
}
}
| [
"[email protected]"
] | |
934dc5ed324a505f9bde14ca5f9a2e5f5dafbfc1 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4/KThreadTest/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4_KThreadTest_s.java | 67f2aabb121cee526faeecf0e652bea270ff3426 | [] | 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,698 | java | package nachos.threads;
import nachos.machine.*;
/**
* A Tester for the KThread class.
* Really, this tests the join() implementation.
*/
public class KThreadTest {
/**
* LoopThread class, which implements a KThread
* that simply prints out numbers in sequence.
*/
private static class LoopThread implements Runnable {
LoopThread(String name, int upTo) {
this.name = name;
this.upTo = upTo;
}
public void run() {
for (int i=0; i<upTo; i++) {
//System.out.println("*** " + name + " looped " + i + " times");
KThread.yield();
}
System.out.println("*** " + name + " done");
}
/* An ID for output purposes */
private String name;
/* The maximum number of iterations */
private int upTo;
}
/**
* JoinThread class, which implements a KThread
* that attempts to join with one or two threads, in sequence.
*/
private static class JoinThread implements Runnable {
JoinThread(String name, KThread thread1, KThread thread2) {
this.name = name;
this.thread1 = thread1;
this.thread2 = thread2;
}
public void run() {
/* Joining with the first thread, if non-null */
if (thread1 != null) {
System.out.println("*** "+name+" joining with "+thread1.toString());
thread1.join();
System.out.println("*** "+name+" joined with "+thread1.toString());
}
/* Joining with the second thread, if non-null */
if (thread1 != null) {
System.out.println("*** "+name+" joining with "+thread2.toString());
thread2.join();
System.out.println("*** "+name+" joined with "+thread2.toString());
}
System.out.println("*** "+name+" done.");
}
/* An ID for output purposes */
private String name;
/* The maximum number of iterations */
private KThread thread1;
private KThread thread2;
}
/**
* Tests whether this module is working.
*/
public static void runTest() {
System.out.println("**** KThread testing begins ****");
/* Create 4 LoopThread, each one looping 3*(i+1) times, so
* that the last create thread loops longer */
KThread loopThreads[] = new KThread[5];
for (int i=0; i < 5; i++) {
loopThreads[i] = new KThread(new LoopThread("loopThread"+3*(i+1),3*(i+1)));
loopThreads[i].setName("loopThread"+3*(i+1));
loopThreads[i].fork();
}
/* Create a JoinThread that waits for loopThread #1
* and then for loopThread #3 */
KThread joinThread1 = new KThread(new JoinThread(
"joinThread #1",loopThreads[1],loopThreads[3]));
joinThread1.setName("joinThread #1");
joinThread1.fork();
/* Create a JoinThread that waits for loopThread #4
* and then for loopThread #2 */
KThread joinThread2 = new KThread(new JoinThread(
"joinThread #2",loopThreads[4],loopThreads[2]));
joinThread2.setName("joinThread #2");
joinThread2.fork();
/* Create a JoinThread that waits for joinThread #1
* and then for loopThread #4 */
KThread joinThread3 = new KThread(new JoinThread(
"joinThread #3",joinThread1,loopThreads[4]));
joinThread3.setName("joinThread #3");
joinThread3.fork();
/* Join with all the above to wait for the end of the testing */
for (int i=0; i < 5; i++) {
loopThreads[i].join();
}
joinThread1.join();
joinThread2.join();
joinThread3.join();
System.out.println("**** KThread testing ends ****");
}
}
| [
"[email protected]"
] | |
44f91242e1af068b114f263d190710393fbaec33 | 73f5635b6c3c8cc32cd083abfdaeb5ae1b4f9180 | /SE201-DZ10-Marko-Popovic-2442/SE201-Picerija/src/Model/Racun.java | f7ccb633ef89c55b4a6f132d72fa5e8a797fb7a3 | [] | no_license | markoooooo/Introduction-to-software-engineering | af07da6c98ce606183b86242a21d50b5e648c1cd | 6612ed2372216097c04c8a58f433fdeb28adf533 | refs/heads/master | 2021-02-10T10:37:57.884980 | 2020-03-02T13:12:53 | 2020-03-02T13:12:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 666 | java |
package Model;
public class Racun {
private int id;
private String username;
private double bill;
public Racun(int ID, String username, double bill) {
this.id = ID;
this.username = username;
this.bill = bill;
}
public int getID() {
return id;
}
public void setID(int ID) {
this.id = ID;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public double getBill() {
return bill;
}
public void setBill(double bill) {
this.bill = bill;
}
}
| [
"[email protected]"
] | |
1d3f3d33360c47f058627474f7f7b03604dd21ff | c8a1e68115a28c45d3848cbec8c40dc8fc21f7f4 | /app/src/main/java/com/alfinapp/ui/views/NonSwipeableViewPager.java | 3783ccb0b1a05d7ac05afd0a97e3bf90f3301f79 | [] | no_license | brajeshsanodiya-db/AlfinAndroidApp | 32cea76056bac6c22c28a05a939bb6c3caf9ed53 | ad230fb6db82af537c703e6fcc199720435067cc | refs/heads/master | 2020-12-31T09:39:09.687372 | 2020-02-06T16:24:58 | 2020-02-06T16:24:58 | 238,980,627 | 0 | 0 | null | 2020-02-07T17:01:34 | 2020-02-07T17:01:33 | null | UTF-8 | Java | false | false | 1,662 | java | package com.alfinapp.ui.views;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.Scroller;
import androidx.viewpager.widget.ViewPager;
import java.lang.reflect.Field;
public class NonSwipeableViewPager extends ViewPager {
public NonSwipeableViewPager(Context context) {
super(context);
setMyScroller();
}
public NonSwipeableViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
setMyScroller();
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
// Never allow swiping to switch between pages
return false;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
// Never allow swiping to switch between pages
return false;
}
//down one is added for smooth scrolling
private void setMyScroller() {
try {
Class<?> viewpager = ViewPager.class;
Field scroller = viewpager.getDeclaredField("mScroller");
scroller.setAccessible(true);
scroller.set(this, new MyScroller(getContext()));
} catch (Exception e) {
e.printStackTrace();
}
}
public class MyScroller extends Scroller {
public MyScroller(Context context) {
super(context, new DecelerateInterpolator());
}
@Override
public void startScroll(int startX, int startY, int dx, int dy, int duration) {
super.startScroll(startX, startY, dx, dy, 350 /*1 secs*/);
}
}
} | [
"[email protected]"
] | |
ba2ef892f4cdd261b1b438d12c92cdb76d69a284 | 7b1994bb155c98ed9423cd657d106e1eb4841a66 | /1493.java | 9fafc8b0427e4b18c93cd4608302daaca6209d2b | [] | no_license | makrandp/LeetCode-2 | e2bc1346a87bcaae8b5e3deb3fa2fb0fe040148b | 88c63c468eb674e595efaf8c4fe9c9be71a2451d | refs/heads/master | 2022-11-05T16:07:17.890987 | 2020-06-28T08:31:22 | 2020-06-28T08:31:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | class Solution {
public int longestSubarray(int[] nums) {
int n = nums.length;
int start = 0, end = 0, ans = 0, count = 0;
while(end < n) {
while(end < n) {
if(nums[end] == 0) count++;
if(count == 2) break;
ans = Math.max(ans, end - start);
end++;
}
if(end == n) break;
while(start <= end) {
if(nums[start] == 0) {
count--;
start++;
break;
}
start++;
}
ans = Math.max(ans, end - start);
end++;
}
return ans;
}
}
| [
"[email protected]"
] | |
ffccc9544f03837aa5fb653850aa28167c60d1fb | e37b1b48e224d9da000bf4c68cd103c2afe3fca1 | /src/factoryPattern/multiFactory/FactoryTestMulti.java | 5ed8e8ba7c42cbb52d99040a097e9ed0a5e7c6ec | [] | no_license | yuanqin-deng/DesignPatternTest | 5137ea680414a0b12ffaf710085288d02e459ceb | 32755f94051a0d417108950c93d907739f875cae | refs/heads/master | 2021-06-01T08:34:24.672075 | 2016-06-23T09:58:39 | 2016-06-23T09:58:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package factoryPattern.multiFactory;
/**
* Created by DengYuanqin on 6/20/2016.
*/
public class FactoryTestMulti {
public static void main(String[] args){
SendMultiFactory sendMultiFactory = new SendMultiFactory();
sendMultiFactory.sendSms();
sendMultiFactory.sendMail();
}
}
| [
"[email protected]"
] | |
345a8de1866e5bded906ba8d987154c04921e133 | dec11f09905937042ddc9260eb8325f18f996b10 | /src/test/subjects/JHD176target/src/CH/ifa/draw/test/standard/SingleFigureEnumeratorTest.java | 33624a849345287e9b61231516a98428b644fca7 | [] | no_license | easy-software-ufal/Nimrod | b09d45df580fce5811732e1d88314623cd150f17 | dd7135791636d754d4501124bf9edde7027baa03 | refs/heads/master | 2021-09-13T20:08:59.182101 | 2018-05-03T18:26:26 | 2018-05-03T18:26:26 | 105,577,422 | 0 | 1 | null | 2018-02-22T02:20:22 | 2017-10-02T19:44:18 | Java | UTF-8 | Java | false | false | 4,459 | java | package CH.ifa.draw.test.standard;
import junit.framework.TestCase;
// JUnitDoclet begin import
import CH.ifa.draw.standard.SingleFigureEnumerator;
import CH.ifa.draw.figures.RectangleFigure;
import java.awt.*;
// JUnitDoclet end import
/*
* Generated by JUnitDoclet, a tool provided by
* ObjectFab GmbH under LGPL.
* Please see www.junitdoclet.org, www.gnu.org
* and www.objectfab.de for informations about
* the tool, the licence and the authors.
*/
// JUnitDoclet begin javadoc_class
/**
* TestCase SingleFigureEnumeratorTest is generated by
* JUnitDoclet to hold the tests for SingleFigureEnumerator.
* @see CH.ifa.draw.standard.SingleFigureEnumerator
*/
// JUnitDoclet end javadoc_class
public class SingleFigureEnumeratorTest
// JUnitDoclet begin extends_implements
extends TestCase
// JUnitDoclet end extends_implements
{
// JUnitDoclet begin class
// instance variables, helper methods, ... put them in this marker
CH.ifa.draw.standard.SingleFigureEnumerator singlefigureenumerator = null;
// JUnitDoclet end class
/**
* Constructor SingleFigureEnumeratorTest is
* basically calling the inherited constructor to
* initiate the TestCase for use by the Framework.
*/
public SingleFigureEnumeratorTest(String name) {
// JUnitDoclet begin method SingleFigureEnumeratorTest
super(name);
// JUnitDoclet end method SingleFigureEnumeratorTest
}
/**
* Factory method for instances of the class to be tested.
*/
public CH.ifa.draw.standard.SingleFigureEnumerator createInstance() throws Exception {
// JUnitDoclet begin method testcase.createInstance
return new CH.ifa.draw.standard.SingleFigureEnumerator(new RectangleFigure(new Point(10, 10), new Point(100, 100)));
// JUnitDoclet end method testcase.createInstance
}
/**
* Method setUp is overwriting the framework method to
* prepare an instance of this TestCase for a single test.
* It's called from the JUnit framework only.
*/
protected void setUp() throws Exception {
// JUnitDoclet begin method testcase.setUp
super.setUp();
singlefigureenumerator = createInstance();
// JUnitDoclet end method testcase.setUp
}
/**
* Method tearDown is overwriting the framework method to
* clean up after each single test of this TestCase.
* It's called from the JUnit framework only.
*/
protected void tearDown() throws Exception {
// JUnitDoclet begin method testcase.tearDown
singlefigureenumerator = null;
super.tearDown();
// JUnitDoclet end method testcase.tearDown
}
// JUnitDoclet begin javadoc_method hasNextFigure()
/**
* Method testHasNextFigure is testing hasNextFigure
* @see CH.ifa.draw.standard.SingleFigureEnumerator#hasNextFigure()
*/
// JUnitDoclet end javadoc_method hasNextFigure()
public void testHasNextFigure() throws Exception {
// JUnitDoclet begin method hasNextFigure
// JUnitDoclet end method hasNextFigure
}
// JUnitDoclet begin javadoc_method nextFigure()
/**
* Method testNextFigure is testing nextFigure
* @see CH.ifa.draw.standard.SingleFigureEnumerator#nextFigure()
*/
// JUnitDoclet end javadoc_method nextFigure()
public void testNextFigure() throws Exception {
// JUnitDoclet begin method nextFigure
// JUnitDoclet end method nextFigure
}
// JUnitDoclet begin javadoc_method reset()
/**
* Method testReset is testing reset
* @see CH.ifa.draw.standard.SingleFigureEnumerator#reset()
*/
// JUnitDoclet end javadoc_method reset()
public void testReset() throws Exception {
// JUnitDoclet begin method reset
// JUnitDoclet end method reset
}
// JUnitDoclet begin javadoc_method testVault
/**
* JUnitDoclet moves marker to this method, if there is not match
* for them in the regenerated code and if the marker is not empty.
* This way, no test gets lost when regenerating after renaming.
* <b>Method testVault is supposed to be empty.</b>
*/
// JUnitDoclet end javadoc_method testVault
public void testVault() throws Exception {
// JUnitDoclet begin method testcase.testVault
// JUnitDoclet end method testcase.testVault
}
/**
* Method to execute the TestCase from command line
* using JUnit's textui.TestRunner .
*/
public static void main(String[] args) {
// JUnitDoclet begin method testcase.main
junit.textui.TestRunner.run(SingleFigureEnumeratorTest.class);
// JUnitDoclet end method testcase.main
}
}
| [
"[email protected]"
] | |
c7a26727234d13e4fc71a3027e457a8a663049ab | 2985684ede60ef733ebd85e3389bef0f4fb94684 | /app/src/main/java/com/example/pwd61/analysis/MyActivity.java | aae63a08cf1086f2f5bad10573911ec9dcfac329 | [] | no_license | CrackerCat/Analysis | 7c952d7babfad9d31f5466d41575582bb576d189 | 6eb65d1307990b2eef17aa11c45d6ce9c0b66569 | refs/heads/master | 2023-03-16T14:43:22.916312 | 2020-04-12T08:19:35 | 2020-04-12T08:19:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,161 | java | package com.example.pwd61.analysis;
import android.content.Intent;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.example.pwd61.analysis.Detour.verfiy.ByteUtil;
import com.example.pwd61.analysis.Utils.FileUtils;
import com.example.pwd61.analysis.Utils.injectJNI;
import com.example.pwd61.analysis.Utils.utils;
import com.example.pwd61.analysis.app.Yeecall;
import com.example.pwd61.analysis.app.cmb.AesUtils;
import com.example.pwd61.analysis.app.cmb.PBRsa;
import com.example.pwd61.analysis.app.eleme.xdeviceinfo;
import com.example.pwd61.analysis.app.yeecall.CipherProtocol;
import com.example.pwd61.analysis.app.yeecall.HashUtils;
import com.android.tencent.qq.qq.Utils;
import com.example.pwd61.analysis.app.yeecall.IKeyValueStorage;
import com.example.pwd61.analysis.app.yeecall.PreferencesImpl;
import com.example.pwd61.analysis.app.yeecall.ZayhuPref;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.security.KeyStore;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.net.ssl.KeyManagerFactory;
import cmb.pb.shield.whitebox.EncryptUtil;
import static com.example.pwd61.analysis.Utils.utils.Logd;
import static javax.crypto.Cipher.DECRYPT_MODE;
import static javax.crypto.Cipher.ENCRYPT_MODE;
public class MyActivity extends AppCompatActivity implements View.OnClickListener {
private String TAG = "HACK";
Button ctf;
Button cmb;
ScrollView scrollView;
LinearLayout ll_content;
Uri uri = Uri.parse("content://hb.android.contentProvider/teacher");
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
scrollView = (ScrollView) findViewById(R.id.logtxt);
ll_content = (LinearLayout) findViewById(R.id.ll_content);
Button yeecal = findViewById(R.id.yeecall);
Button tst1 = findViewById(R.id.Test1);
Button tst2 = findViewById(R.id.Test2);
ctf = (Button) findViewById(R.id.ctf);
cmb = (Button) findViewById(R.id.cmb);
yeecal.setOnClickListener(this);
tst2.setOnClickListener(this);
tst1.setOnClickListener(this);
ctf.setOnClickListener(this);
cmb.setOnClickListener(this);
copyAssets();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.yeecall:
/**** 解密yc_c.sp ****/
String data = "a834d1d61d7b2c9d7072adb704dab86010712b5b9a731ec5d2ed7ea2bd61832c4f085c51b6fcd948adde96f0067fc06d672acedc3d72f2db155455bd4cdef73e";
String SS = HashUtils.SHA1(data);
addit("yee", SS);
addit("tyee", CipherProtocol.a("c_db_kvs_xxxxxslat"));
IKeyValueStorage IKS = ZayhuPref.a(getApplicationContext(), "c_db_kvs_xxxxx", 5);
String dbName = "yeecall.sp";
String STR = dbName + "tcfb3352c2df335696c6bc631932c6a61a4cdf318";
String dbNameEnc = CipherProtocol.a(STR);
Logd("数据库名字:" + dbName + ",enc: " + dbNameEnc);
String stringBuilder2 = dbNameEnc + "t72f283666ae9a3482660515b0f9acebeaff91e04";
String columnsID = CipherProtocol.a(stringBuilder2);
Logd("加密列:" + columnsID);
Logd("test :" + PreferencesImpl.b("1".toCharArray()));
Logd("test1 :" + PreferencesImpl.b("1234".toCharArray()));
Yeecall.getKey(getApplicationContext());
HttpURLConnection con;
// con.setRequestProperty("","");
break;
case R.id.Test1:
Log.d(TAG, "测试1");
Log.d(TAG, "CALL ELE");
addit("[+]", injectJNI.inject_Jni_Onload());
java.lang.String[] sneer = xdeviceinfo.sneer(getApplicationContext(), "4f93e640-5c6f-4980-bd3d-c1256672a64d", "/eus/login/mobile_send_code{\"mobile\":\"13228093363\",\"latitude\":23.125265,\"longitude\":113.38116,\"via_audio\":false}", "a");
for (int i = 0; i < sneer.length; i++) {
Log.d(TAG, "sneer[" + i + "]->:" + sneer[i]);
}
String b = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAYAEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD03Xdams7vyYZxHjG4t0XNWNMm1WO5L6jJH9kKgK2R94nj86z3tbO318wzF5YliOVkJkZh6Enk8dzyfc1qxa3ocloIvPiSJRs8qQbdoHGCD0oL66lvVbwWlg7qTvYbUx1yaj0MubDMspkm3HeScnNQS3lpeahbRR3URjRfM+8DkdqNFuIALvM0Y/ft/EKOo+pFrkzyXtpaQgLKG8xJD1Q4IyD9CR9CR3qfRL6a4E0ExLvC2DJn71UNdnt5b2GOKRBc9VcMMAe9VdK8T6TZb4JpkDqSDInzB6L6ivZnXs6oMsQB71z9nPc3WtyiO7fylIbaeQR6Yplwx1bWYomci32B1XBBOfUVJp0Edp4iuYkOFKDAJoHe4/WdKnmuoryywJ161NplndMHfUY4mLdF2jIoop2Cwk/hfR5x/wAeUaH1QYrM0rwtYRajcsYEkiQ7Nrdj1/rRRSsg5UTaj4YtBPHc2djAzLndGw4aq2h2LprTeZZrANmdhTHHt7UUUWQuVXH61HPba5DcxLJg4C7P4j0x71bsNNuJtS+3XiEHAZQTgqaKKLajtqf/2Q==";
byte[] decode = android.util.Base64.decode(b, 0);
Logd("sss:" + decode.length);
saveImageToGallery(android.graphics.BitmapFactory.decodeByteArray(decode, 0, decode.length));
break;
case R.id.Test2:
Log.d(TAG, "测试2");
Log.d(TAG, "免密提取8.0");
addit("Doge", jiemi(ReadUserInfo()));
addit("doge2", jiemi("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7"));
addit("pin", new String(ByteUtil.parseHexStr2Byte("616c696b6169353230")));
addit("pin", new String(ByteUtil.parseHexStr2Byte("313136393436363237326c696b756e")));
addit("unencr", new String(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7")));
addit("unencr", Integer.toString(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7").length));
addit("unencr", Integer.toString("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7".length()));
addit("cq", bytesToHexString(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7")));
break;
case R.id.ctf:
Log.d(TAG, "ctf");
addit("ctf", !Utils.cec("10864017", "1234") ? "succ" : "failed!");
addit("[+]", EncryptUtil.decryptcbc("z/GU3NDcvTToe21svo0+KQ=="));
break;
case R.id.cmb:
Log.d(TAG, "cmb");
//utils.Logd(Utils.cec("10864017","1234")==false?"succ":"failed!");
addit(" [+]", EncryptUtil.decryptcbc("z/GU3NDcvTToe21svo0+KQ=="));
addit(" [+]", EncryptUtil.decryptcbc("K3WIX19CZEQ2IDhSjmUClQ=="));
addit("shijiea ", PBRsa.a("WcXqq0aNxzVLVxKi"));
addit("shijiea ", PBRsa.a("QhVi0qpMKXJ3P3M5"));
addit("aes", AesUtils.encrypt("<PostData><DeviceType>E</DeviceType><Version>7.2.0</Version><SystemVersion>9</SystemVersion><ExtraFormat>PNG</ExtraFormat><AppID>0029000000020190903013227020000000000q5Tr3xiEc3AUByxNbqrru3t9d0=</AppID><ClientCRC>2CEDD161</ClientCRC><InnerID>00290000000190903013227358326090314912020000000000217381Y0E=</InnerID><IsRunningInEmulator>false</IsRunningInEmulator><ObtainChannel>CMB_ANDROID</ObtainChannel></PostData>"));
addit("Algorithm", KeyManagerFactory.getDefaultAlgorithm());
addit(" [+]", EncryptUtil.decryptcbc("eiUgfxeIByTNOMe+JoLO5A=="));
addit(" [+]", EncryptUtil.decryptcbc("ZRFptM5TDbqdRZsSB9N2Kw=="));
try {
KeyStore c = java.security.KeyStore.getInstance(java.security.KeyStore.getDefaultType());
} catch (Exception e) {
e.printStackTrace();
}
break;
default:
Log.d(TAG, "onClick: ");
}
}
private void addit(String tag, String str) {
Logd("addit:" + str);
//创建TextView
TextView textView = new TextView(MyActivity.this);
textView.setTextColor(Color.RED);
//设置显示内容
textView.setText(tag + ":" + str);
textView.setEnabled(true);
//添加到LinearLayout中
ll_content.addView(textView);
scrollView.post(new Runnable() {
@Override
public void run() {
//scrollView.fullScroll(ScrollView.FOCUS_DOWN);
scrollView.pageScroll(ScrollView.FOCUS_DOWN);
}
});
}
private void copyAssets() {
AssetManager assetManager = getAssets();
String[] files = null;
try {
files = assetManager.list("");
} catch (IOException e) {
Log.e("tag", "Failed to get asset file list.", e);
}
if (files != null) for (String filename : files) {
InputStream in = null;
OutputStream out = null;
if (filename.contains("yeecall")) {
try {
in = assetManager.open(filename);
File outFile = new File(getExternalFilesDir(null), filename);
out = new FileOutputStream(outFile);
copyFile(in, out);
} catch (IOException e) {
Log.e("tag", "Failed to copy asset file: " + filename + e.getMessage());
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
// NOOP
}
}
if (out != null) {
try {
out.close();
} catch (IOException e) {
// NOOP
}
}
}
}
}
}
private void copyFile(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[1024];
int read;
while ((read = in.read(buffer)) != -1) {
out.write(buffer, 0, read);
}
}
private String ReadUserInfo() {
// FileUtils.readFileFromSDCard("/sdcard/")
// return "5866D577AC37B6B69033D9F915127CA15909CE8C449628484D87E00A57763824B0D86827AB6FAD64E154C50A4EF3F4A6400AFBE3594018FC492EC23FA822370BF8D48663913BA5408D89D101B06885E8F61A70A9806A8BB1514E49DACA20DF4687AE3BA5A0761646FBEB4E34F6D567F483309A90FC288DE3BC9F91206947187419BB7C4A13CFF802DDC2C2BFB6DFF40B3B18DD401D87F444D6B1212836C21709E2D1E9DAC79DD6BB0A351DD0B51CFE20075CF9603972722E3674C11C42E15926D477D4864F54F6E2A2AE24CF0CFB441FF367B343E675C53DACC4105A33E3C8C34DC7DCE5A6A060810727C00625A6D26F15262921FBA4A6AC9BBFF8944BE955E8324E03D20709E1D869A1B9D416F498EB4C2F2E8BD77BAAD42F21887FD73D8F5591440BF8355C07C0F0BFE74D4042D904";
// return "D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7";
return "D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC530078B74EF0E2AE183832D4B05D15455CE3AEE61ED0204E4EC4DF613910C69ED0F1701DCD095DD14A4210D4440A390D1EB8CFBCE779D3F6EB1EF0C0056030C9DF0C6D587E67ADD847C1E42A91AADAE8B02D81DC0C4A3AB789C97ACCA2EBA0F5923EB38987DFC6A4984AB8499CCF1BC550FB9B88962B7E97A8FAC391DA79578B024F0FD0D3C2FCDFF71CF3BC91E2509153F20843E19F72D63AE0A2193ED3CE7E2414B4FDB382B9CE41D1781755F422B9CB7020ED2737992F30F4A5D480F2EA5121FFFAC075AC01A42352A117FF62973140A446";
}
private String jiemi(String str) {
try {
return aesUnEnc("@w#a$q&ejuak", unencry(str));
} catch (Throwable tb) {
tb.printStackTrace();
}
return "";
}
public final byte[] unencry(java.lang.String str) {
int length = str.length() / 2;
byte[] bArr = new byte[length];
for (int i = 0; i < length; i++) {
bArr[i] = java.lang.Integer.valueOf(str.substring(i * 2, (i * 2) + 2), 16).byteValue();
}
return bArr;
}
private static byte[] initkey(java.lang.String str) throws java.lang.Exception {
return new javax.crypto.spec.SecretKeySpec(javax.crypto.SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1").generateSecret(
new javax.crypto.spec.PBEKeySpec(str.toCharArray(),
"!q@w#e$r%t^y#n@v".getBytes(),
10,
128)).getEncoded(),
"AES").getEncoded();
}
static java.lang.String aesUnEnc(String str, byte[] bArr) throws java.lang.Throwable {
javax.crypto.spec.SecretKeySpec secretKeySpec = new javax.crypto.spec.SecretKeySpec(initkey(str), "AES");
javax.crypto.Cipher instance = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
instance.init(DECRYPT_MODE, secretKeySpec, new javax.crypto.spec.IvParameterSpec("1653678145712191".getBytes()));
return new java.lang.String(instance.doFinal(bArr));
}
public int saveImageToGallery(Bitmap bmp) {
//生成路径
String root = Environment.getExternalStorageDirectory().getAbsolutePath();
String dirName = "fuck";
File appDir = new File(root, dirName);
if (!appDir.exists()) {
appDir.mkdirs();
}
//文件名为时间
long timeStamp = System.currentTimeMillis();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String sd = sdf.format(new Date(timeStamp));
String fileName = sd + ".jpg";
//获取文件
File file = new File(appDir, fileName);
FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
bmp.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.flush();
//通知系统相册刷新
// ImageActivity.this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
// Uri.fromFile(new File(file.getPath()))));
return 2;
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (fos != null) {
fos.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return -1;
}
/*
*Convert
byte[] to
hex string.这里我们可以将byte转换成int,然后利用Integer.toHexString(int)来转换成16进制字符串。
*
@param
src
byte[] data
*@return
hex string
*/
public static String bytesToHexString(byte[] src) {
StringBuilder stringBuilder = new StringBuilder("");
if (src == null || src.length <= 0) {
return null;
}
for (int i = 0; i < src.length; i++) {
int v = src[i] & 0xFF;
String hv = Integer.toHexString(v);
if (hv.length() < 2) {
stringBuilder.append(0);
}
stringBuilder.append(hv);
}
return stringBuilder.toString();
}
}
| [
"[email protected]"
] | |
447de911d9390918f06be266ead3017fb2de6c25 | b86756a27140e68ffb6b56da97dcc82e957fdf91 | /prog/src/com/company/LinearModel.java | 9cc698b1fe412a8dcb32a233d64e722736a4f6cd | [] | no_license | Armandos95/GMDHJavaApp | d8c4000094f4422f1eb3c2db2bed94f4b4c84cc3 | d66422957fd002a13722e083e972bcf48fb765a3 | refs/heads/master | 2016-09-14T07:45:00.704635 | 2016-05-24T15:45:06 | 2016-05-24T15:45:06 | 59,586,677 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 984 | java | package com.company;
public class LinearModel implements Comparable<LinearModel>{
public double a0;
public double a1;
public double a2;
public double a3;
public double criterion;
public int x1Index;
public int x2Index;
public int level;
public double[] studyingResults;
public double[] checkingResults;
public double tempResult;
public LinearModel(double[] coeffs, double[] studyingResults) {
this.a0 = coeffs[0];
this.a1 = coeffs[1];
this.a2 = coeffs[2];
this.a3 = coeffs[3];
this.studyingResults = studyingResults;
}
public double countResult(double x1, double x2) {
return (a0 + a1 * x1 + a2 * x2 + a3 * x1 * x2);
}
public int compareTo(LinearModel m) {
return criterion > m.criterion ? 1 : criterion == m.criterion ? 0 : -1;
}
public String makeStartModel() {
return ("" + a0 + " + " + a1 + "x1 + " + a2 + "x2 + " + a3 + "x1x2");
}
} | [
"[email protected]"
] | |
0029666ace7a568cac4cb9afe9fab3ecbe8b5f22 | 3244a124d582624b8873a2a808428eef856ea2cc | /src/org/prasanna/test/Registertestfact.java | 9f794ecef6797b4a992d9cdfca797eb887824b3b | [] | no_license | Prasannapujar/samplepageobject | bc95f167659fb360a483e9b428d6707e8df9826d | b71cab997f437ece57a8c96fa0167121b7574704 | refs/heads/master | 2021-01-01T05:51:40.265923 | 2015-04-08T18:27:20 | 2015-04-08T18:27:20 | 33,500,723 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 895 | java | package org.prasanna.test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.prasanna.data.Regdata;
import org.prasanna.pages.Registerpagefact;
import org.testng.Assert;
import org.testng.annotations.Test;
public class Registertestfact extends Selbasetest {
@Test
public void testregister()
{
Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class);
p.regsiter1();
Assert.fail();
}
@Test(dataProvider="regdata",dataProviderClass=Regdata.class)
public void testwithdataprovider(Regdata d1)
{
Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class);
p.regsiter1withdata(d1);
}
@Test(dataProvider="readcsv",dataProviderClass=Regdata.class)
public void testwithcsvcreated(Regdata d1)
{
Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class);
p.regsiter1withdata(d1);
}
}
| [
"[email protected]"
] | |
521efe0f661af59da7d4592dc0791b67525f26ed | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/smallest/769cd811312cbbb82c87033a78ac9584ad282550bcb9cc3ae8c4e3da44c288c1a5b3954e01998c3c0654ee6774ceab66e9fe5b135750905c917d2b0bb5fab98b/004/mutations/33/smallest_769cd811_004.java | a69bc3fdddda33b08cc16789a59afd0e4a361a51 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,988 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_769cd811_004 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_769cd811_004 mainClass = new smallest_769cd811_004 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d =
new IntObj (), x = new IntObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
a.value = scanner.nextInt ();
b.value = scanner.nextInt ();
c.value = scanner.nextInt ();
d.value = scanner.nextInt ();
if (a.value >= b.value) {
x.value = b.value;
} else {
x.value = a.value;
}
if (b.value >= c.value) {
x.value = c.value;
}
if (c.value >= d.value) {
x.value = d.value;
}
output += (String.format ("%d is the smallest\n", d.value));
if (true)
return;;
}
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.