blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
cbc002b33b6558b3c794129cba2b2ee8434a4b3e
67c4ab7e4548fd7439e090f86cfac3e20645dfe0
/presentation/src/main/java/com/mrezanasirloo/slickmusic/presentation/glide/palette/BitmapPaletteResource.java
5240825bb58305965f9beead855900e79d1190e2
[]
no_license
MRezaNasirloo/SlickMusic
884fca0f90c80796e172ce25e05084303ab952c4
1b4c68a8057aad8b65b96e38584f1cdb989cb5c5
refs/heads/master
2020-03-19T19:14:49.225876
2018-07-08T01:23:21
2018-07-08T01:23:21
136,846,705
0
1
null
null
null
null
UTF-8
Java
false
false
1,051
java
package com.mrezanasirloo.slickmusic.presentation.glide.palette; import com.bumptech.glide.load.engine.Resource; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.util.Util; /** * @author Karim Abou Zeid (kabouzeid) */ public class BitmapPaletteResource implements Resource<BitmapPaletteWrapper> { private final BitmapPaletteWrapper bitmapPaletteWrapper; private final BitmapPool bitmapPool; public BitmapPaletteResource(BitmapPaletteWrapper bitmapPaletteWrapper, BitmapPool bitmapPool) { this.bitmapPaletteWrapper = bitmapPaletteWrapper; this.bitmapPool = bitmapPool; } @Override public BitmapPaletteWrapper get() { return bitmapPaletteWrapper; } @Override public int getSize() { return Util.getBitmapByteSize(bitmapPaletteWrapper.getBitmap()); } @Override public void recycle() { if (!bitmapPool.put(bitmapPaletteWrapper.getBitmap())) { bitmapPaletteWrapper.getBitmap().recycle(); } } }
[ "M.Reza.Nasirloo@gmail.com" ]
M.Reza.Nasirloo@gmail.com
ece3b025621d9941572ec098509b8e17c099a2f5
04d5289eba76e5ec6307dd8eed2ad32a5912f11d
/java/Aulas/src/POO/TestandoFuncionario.java
a9b937e06182fffecb731459e90c46a619fecc03
[]
no_license
laroreis/turma-18-G
d8994e2c5b7725e440eccc84cea0acf12863792e
0909b9a070a40386f84452a7382f8febf2ad6476
refs/heads/main
2023-04-08T04:59:51.259417
2021-04-15T20:30:47
2021-04-15T20:30:47
341,630,155
1
0
null
null
null
null
UTF-8
Java
false
false
323
java
package POO; public class TestandoFuncionario { public static void main(String[] args) { // getters e setters Funcionario func = new Funcionario(); func.setNome("Antonia"); //coloca valor func.setSalario(2500); //imprime System.out.println(func.getNome()); System.out.println(func.getSalario()); } }
[ "larissa_reiss@hotmail.com" ]
larissa_reiss@hotmail.com
d20f45e5ca047901b58fae27754a751582bd9e93
d003a7e5a3a6641375fa05fbc319956849b1f37a
/app/src/main/java/com/wisdomrouter/app/view/RatioImageView.java
e495dcbf5d04a1c9b57d9c667374f2488654cbc8
[]
no_license
yanbinJion/as
df15a58220667f55ca843185113d01e0cc7ccdb4
1faaef6a69491588a0ec658915e912de8c409e59
refs/heads/master
2021-01-22T22:24:37.073191
2017-03-21T08:16:03
2017-03-21T08:16:03
85,542,156
0
0
null
null
null
null
UTF-8
Java
false
false
1,574
java
package com.wisdomrouter.app.view; import android.content.Context; import android.util.AttributeSet; import android.widget.ImageView; import com.wisdomrouter.app.utils.AspectRatioMeasure; public class RatioImageView extends ImageView { private float mAspectRatio = 0; private final AspectRatioMeasure.Spec mMeasureSpec = new AspectRatioMeasure.Spec(); public RatioImageView(Context context) { super(context); } public RatioImageView(Context context, AttributeSet attrs) { super(context, attrs); } public RatioImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } /** * Sets the desired aspect ratio (w/h). */ public void setAspectRatio(float aspectRatio) { if (aspectRatio == mAspectRatio) { return; } mAspectRatio = aspectRatio; requestLayout(); } /** * Gets the desired aspect ratio (w/h). */ public float getAspectRatio() { return mAspectRatio; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { mMeasureSpec.width = widthMeasureSpec; mMeasureSpec.height = heightMeasureSpec; AspectRatioMeasure.updateMeasureSpec( mMeasureSpec, mAspectRatio, getLayoutParams(), getPaddingLeft() + getPaddingRight(), getPaddingTop() + getPaddingBottom()); super.onMeasure(mMeasureSpec.width, mMeasureSpec.height); } }
[ "ityanbin@gmail.com" ]
ityanbin@gmail.com
eddd6fcd5b3f5b5feb847f450fabbbbbea76e03c
3d28016f56c06fb38447a65ba4611d6ac9999842
/src/com/bill/crawler/global/Encoding.java
85cece80e7305c414b5a8a80371b716c52f2c9bf
[ "Apache-2.0" ]
permissive
billli5211/infodigger
1508af972e5fb60af1cc979709b6a3f96c5d627f
dec43115a83bae725545151c7ba2431d03e10dbc
refs/heads/master
2021-01-10T14:13:05.981129
2015-12-11T03:06:06
2015-12-11T03:06:06
47,799,675
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package com.bill.crawler.global; public class Encoding { public static String Encode_gb2312 = "gb2312"; public static String Encode_gbk = "gbk"; public static String Encode_unicode = "unicode"; public static String Encode_utf8 = "utf-8"; }
[ "shilongdred2163.com" ]
shilongdred2163.com
03fa91353b4c48c8df9860fe43a322b70cc86dae
32e4b967dfcd592af114d78ae4ab3ec17ae24cdc
/core/src/com/stabilise/util/box/F32Box.java
49a3aed613015227b2a642bffa55ae2fa56da776
[]
permissive
AHobbyistDev/Stabilise-2
256ddd4fccbb166888981ff398699c7180c04643
ab4432c5530cbaaca48e6e543347d57a676a560c
refs/heads/master
2022-01-22T05:15:24.486091
2022-01-10T12:37:22
2022-01-10T12:37:22
27,990,651
0
0
MIT
2018-05-20T03:26:50
2014-12-14T10:18:58
Java
UTF-8
Java
false
false
4,071
java
package com.stabilise.util.box; import java.io.IOException; import com.stabilise.util.io.DataInStream; import com.stabilise.util.io.DataOutStream; import com.stabilise.util.io.data.DataCompound; import com.stabilise.util.io.data.DataList; import com.stabilise.util.io.data.IData; /** * Boxes a single float value. */ public class F32Box implements IData { /** Returns 0.0f */ public static float defaultValue() { return 0f; } private float value; /** * Creates a new F32Box holding the value 0f. */ public F32Box() { this(defaultValue()); } public F32Box(float value) { this.value = value; } public float get() { return value; } public void set(float value) { this.value = value; } @Override public void readData(DataInStream in) throws IOException { value = in.readFloat(); } @Override public void writeData(DataOutStream out) throws IOException { out.writeFloat(value); } @Override public void read(String name, DataCompound o) { value = o.getF32(name); } @Override public void write(String name, DataCompound o) { o.put(name, value); } @Override public void read(DataList l) { value = l.getF32(); } @Override public void write(DataList l) { l.add(value); } @Override public String toString() { return "" + value; } @Override public DataType type() { return DataType.F32; } @Override public boolean canConvertToType(DataType type) { switch(type) { case BOOL: case I8: case I16: case I32: case I64: case F32: case F64: case I8ARR: case I32ARR: case I64ARR: case F32ARR: case F64ARR: case STRING: return true; default: return false; } } @Override public IData convertToType(DataType type) { switch(type) { case BOOL: return new BoolBox(value != 0); case I8: return new I8Box((byte) value); case I16: return new I16Box((short) value); case I32: return new I32Box((int) value); case I64: return new I64Box((long) value); case F32: return new F32Box(value); case F64: return new F64Box(value); case I8ARR: return new I8ArrBox(new byte[] {(byte) value}); case I32ARR: return new I32ArrBox(new int[] {(int) value}); case I64ARR: return new I64ArrBox(new long[] {(long) value}); case F32ARR: return new F32ArrBox(new float[] {value}); case F64ARR: return new F64ArrBox(new double[] {value}); case STRING: return new StringBox(Float.toString(value)); default: throw new RuntimeException("Illegal conversion: F32 --> " + type); } } //@Override public boolean isBoolean() { return true; } //@Override public boolean isLong() { return true; } //@Override public boolean isDouble() { return true; } //@Override public boolean isString() { return true; } //@Override public boolean getAsBoolean() { return value != 0; } //@Override public long getAsLong() { return (long) value; } //@Override public float getAsFloat() { return value; } //@Override public double getAsDouble() { return value; } //@Override public String getAsString() { return Float.toString(value); } @Override public F32Box duplicate() { return new F32Box(value); } }
[ "weenafk@gmail.com" ]
weenafk@gmail.com
5d8d0959284fdac0206843536c3c83c3ce2f0813
a59a31a3c1b4e73109b3ac49e76a4ea1ae8215bd
/platforms/android/src/com/andrechristoga/cordovamaterial/MainActivity.java
c29b424398cd643cfe7c580c93e7a14d6255b76a
[]
no_license
christoga/CordovaMaterial
18721c5d4d8d2e6fbdd8c918d1aa15a696dc54eb
b83ca9d268b2c8901e3acc6211f27c8bc78e53bb
refs/heads/master
2021-01-17T06:28:22.510145
2016-06-23T06:18:10
2016-06-23T06:18:10
47,375,921
0
0
null
null
null
null
UTF-8
Java
false
false
1,227
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 com.andrechristoga.cordovamaterial; import android.os.Bundle; import org.apache.cordova.*; public class MainActivity extends CordovaActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml loadUrl(launchUrl); } }
[ "andrechristoga@gmail.com" ]
andrechristoga@gmail.com
9ec01fca4724cf3477fab6ffd85f1317dae78670
c3d6b0aa26c0d9aadba03647cb4f94cb0ed6b752
/src/main/java/com/api/benneighbour/workoutManager/email/ResetPasswordEmailSender.java
2eae6e6f2f272ed80c58d6d9a2d4a533fe8d403b
[]
no_license
BenNeighbour/Workout-Manager-API
253d5b1b0dbc2048600601cb0bc47a9de9c80913
427178854d034afbc11a626c5e402f1b953a46f8
refs/heads/master
2020-12-12T16:18:35.910104
2020-04-13T09:52:16
2020-04-13T09:52:16
234,172,932
3
0
null
null
null
null
UTF-8
Java
false
false
3,166
java
package com.api.benneighbour.workoutManager.email; import com.api.benneighbour.workoutManager.email.token.ChangePasswordToken; import com.api.benneighbour.workoutManager.exceptions.EmailUnreachableException; import com.api.benneighbour.workoutManager.exceptions.ServiceDownException; import com.api.benneighbour.workoutManager.user.entity.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.stereotype.Service; import org.thymeleaf.context.Context; import org.thymeleaf.spring5.SpringTemplateEngine; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import java.util.UUID; @Service public class ResetPasswordEmailSender { @Autowired private SpringTemplateEngine emailTemplateEngine; @Autowired private JavaMailSenderImpl javaMailSender; @Autowired private User u; public ResetPasswordEmailSender(User u) { this.u = u; } public Runnable newRunnable(User u, String e, UUID t) { return new Runnable() { private void sendVerificationEmail(User u, String e, UUID t) throws EmailUnreachableException, ServiceDownException { try { if (u != null) { // Make message into a html message MimeMessage mimeMessage = javaMailSender.createMimeMessage(); MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true); // Creating a new instance of a context to actually process the email template in the configured directory Context context = new Context(); context.setVariable("message", "Hi " + u.getUsername() + ", you are receiving this email to verify that you want to reset your password"); context.setVariable("redirectUrl", "http://localhost:8080/api/v1/user/password/change/" + e + "/" + t); String html = emailTemplateEngine.process("resetPasswordEmail", context); // Create a new instance for the email messageHelper.setFrom("noreply@workoutmanager.com"); messageHelper.setTo(e); messageHelper.setSubject("Workout Manager Reset Password"); messageHelper.setText(html, true); // Send the email javaMailSender.send(mimeMessage); } else { throw new ServiceDownException("Sorry, you are unable to sign up to this service at the moment, please try again later."); } } catch (MessagingException exception) { throw new EmailUnreachableException("Sorry, the email you entered is not linked to any registered accounts."); } } @Override public void run() { this.sendVerificationEmail(u, e, t); } }; } }
[ "benneighbour007@gmail.com" ]
benneighbour007@gmail.com
0f07f0998394be592f00d9ad8a6a89053e4f65d7
91b82ef7537e154889a032466ca5ef832b45bfca
/Lender-micro/src/main/java/com/github/kobloshalex/fintech/domain/entity/Currency.java
df3c67693fec03f11b5d2550811e1f1f3d6088ac
[]
no_license
KobloshAlex/SpringBoot-FinTech
68221d6df8bb7b00df60b782d997bc102bf1b80d
f8cf2d141566a3dd9e70535134908a8af46dd977
refs/heads/master
2023-01-06T07:53:55.694160
2020-11-06T14:49:53
2020-11-06T14:49:53
306,462,327
0
0
null
null
null
null
UTF-8
Java
false
false
88
java
package com.github.kobloshalex.fintech.domain.entity; public enum Currency { USD }
[ "Koblosh.Alex@gmail.com" ]
Koblosh.Alex@gmail.com
9d4bda2a61e03f99950812cee26ead2a014796c5
d60fabce1b846dda0e433808d3540333f1565c23
/src/datetime/DateTimeSpike.java
625fb8382c7c4b599983e49610be9f822b9d473b
[]
no_license
yc-zhang/java8-learning
af283f8edb081fe27bfb5e9180e8d30e13713248
20421cb7e0679a5e07dfa29de79f70ec70b9b4e0
refs/heads/master
2020-09-25T10:08:15.902321
2016-09-22T02:30:37
2016-09-22T02:30:37
67,580,949
0
1
null
null
null
null
UTF-8
Java
false
false
478
java
package datetime; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.Period; public class DateTimeSpike { public static void main(String... args) { LocalDate today = LocalDate.now(); DayOfWeek dayOfWeek = today.getDayOfWeek(); System.out.println(dayOfWeek); System.out.println(today); Period p1 = Period.between(LocalDate.of(2014, 3, 8), LocalDate.of(2014, 3, 18)); System.out.println(p1); } }
[ "turalyon.zhangyc@gmail.com" ]
turalyon.zhangyc@gmail.com
cdeeb7aa7f7c6373a92d87e7294c103349555548
059b79c91865db2b81ff68b65aabfb399fe3b02a
/naver_webtoon_b_mock_android_kookoo-main/android/app/src/main/java/com/softsquared/template/src/Fragment_webtoon/s/Tab_Fragment/Tab_Fri/Tab_Fri.java
8dcdc4a9a129bc8061057103ef83aea66083e7b2
[]
no_license
heeyeonkoo99/naver_webtoon_clonecoding
92cad9247f72bcabbfcf13642b5603eba56cb328
7f389f98cc42dce90c0cac8433b7f6f987a0e4fe
refs/heads/master
2023-02-03T19:27:06.046955
2020-12-22T07:59:21
2020-12-22T07:59:21
280,435,964
0
0
null
null
null
null
UTF-8
Java
false
false
2,481
java
package com.softsquared.template.src.Fragment_webtoon.s.Tab_Fragment.Tab_Fri; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.softsquared.template.R; import com.softsquared.template.src.Fragment_webtoon.s.Webtoon_DisplayService; import com.softsquared.template.src.Fragment_webtoon.s.interfaces.Webtoon_DisplayActivityView; import com.softsquared.template.src.Fragment_webtoon.s.models.Result; import com.softsquared.template.src.Fragment_webtoon.s.models.WebtoonRecyclerViewAdapter; import java.util.ArrayList; import java.util.List; public class Tab_Fri extends Fragment implements Webtoon_DisplayActivityView { public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); } private ArrayList<Result> items=new ArrayList<>(); RecyclerView recyclerView=null; Context context=null; public Tab_Fri(){} @Override public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState){ View view=inflater.inflate(R.layout.webtoon_display_recyclerview_fri,container,false); context = view.getContext(); recyclerView = (RecyclerView) view.findViewById(R.id.webtoon_display_recyclerview_fri); recyclerView.setHasFixedSize(true); //LinearLayoutManager layoutManager = new LinearLayoutManager(context); GridLayoutManager layoutManager = new GridLayoutManager(context,3); recyclerView.setLayoutManager(layoutManager); WebtoonRecyclerViewAdapter adapter = new WebtoonRecyclerViewAdapter(items,context); recyclerView.setAdapter(adapter); tryGetWebtoonList(); return view; } private void tryGetWebtoonList(){ final Webtoon_DisplayService webtoon_displayService=new Webtoon_DisplayService(this); webtoon_displayService.get_webtoondisplay_fri(); } @Override public void validateSuccess(List<Result> results) { items=(ArrayList<Result>)results; WebtoonRecyclerViewAdapter adapter = new WebtoonRecyclerViewAdapter(items,context); recyclerView.setAdapter(adapter); adapter.notifyDataSetChanged(); } @Override public void validateFailure(String message) { } }
[ "rndus0819@naver.com" ]
rndus0819@naver.com
fad2f55ff593d6226364dad4093532cb806c50b4
c7abbf8d3b9981cf371bc0189402639303cfc43c
/src/test/java/ordering/old/FindProductsByPrice.java
d60fae6406815125623fef82255e40ef1abdab2f
[]
no_license
alpakhatri/product-hierarchy
feb647e67c4202f1ab8fc29ec3cca3162871f1da
ceeff275872dc56c1b238042b054e88a989285b4
refs/heads/master
2021-08-24T02:45:36.528748
2017-12-07T18:24:12
2017-12-07T18:24:12
112,466,100
0
0
null
null
null
null
UTF-8
Java
false
false
2,371
java
package ordering.old; //package ordering; // //import java.io.FileReader; //import java.io.IOException; //import java.io.Reader; //import java.util.ArrayList; //import java.util.List; //import java.util.stream.Collectors; //import java.util.stream.Stream; // //import org.junit.Assert; //import org.tesco.boss.ordering.dto.Category; //import org.tesco.boss.ordering.dto.MenuItem; //import org.tesco.boss.ordering.dto.Product; //import org.tesco.boss.ordering.utils.ProductPriceComparator; //import org.tesco.boss.ordering.utils.ProductTree; // //import com.google.gson.Gson; // //import cucumber.api.java.en.Given; //import cucumber.api.java.en.Then; //import cucumber.api.java.en.When; // //public class FindProductsByPrice { // // MenuItem menuItem =null; // Product productToBeSearched = null; // // Category availableCategoryForSearch = null; // ProductTree tree = new ProductTree() ; // List<Product> productsFound = new ArrayList<>(); // // Product productNotToBeFound = null; // // // @Given("A price and a category") // public void givenProductAndCategory(){ // Gson gson = new Gson(); // try (Reader reader = new FileReader("/workspace/tesco/product-hierarchy/src/test/resources/data.json")) { // menuItem = gson.fromJson(reader, MenuItem.class); // } catch (IOException e) { // System.out.println(e.getMessage()); // } // availableCategoryForSearch = new Category("Fresh Food"); // productToBeSearched = new Product(null,30.0); // tree.setComparator(new ProductPriceComparator()); // // } // // @When("I search for price in that category") // public void searchProduct(){ // Stream<Category> categories = menuItem.getCategories().stream().filter(category -> category.getName().equals(availableCategoryForSearch.getName())); // categories.forEach(category -> // { // List<Product> products = category.getSubcategories().stream().map(subCat -> subCat.getProducts()).flatMap(product -> product.stream()).collect(Collectors.toList()); // products.forEach(product -> tree.insert(product)); // }); // tree.inOrderTraversal(); // productsFound = tree.searchByPrice(tree.getRoot(),productToBeSearched,productsFound); // // } // // @Then("I get all the products with same price") // public void getProductPrice(){ // // Assert.assertTrue(!productsFound.isEmpty()); // Assert.assertEquals(1,productsFound.size()); // } //}
[ "you@example.com" ]
you@example.com
088cbe36086fd609b42454214b3ac7290ac89b80
2983506e4415e8e0bdf7274b751189f1ba9ef2dd
/Easy Cake last/src/com/android/easycake/dal/DALCart.java
700f8d172035736ff93b65dd572a55d83aa2e344
[]
no_license
ve8951/EasyCake
4b130c7ed0a157de44ca17062e541d4215180fb1
7e9b5133cbccc45d922d03303c65298440fb065e
refs/heads/master
2021-01-10T02:01:10.580201
2015-12-04T23:17:46
2015-12-04T23:17:46
47,433,554
0
0
null
null
null
null
UTF-8
Java
false
false
5,526
java
package com.android.easycake.dal; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; import com.android.easycake.models.MODELProduct; import com.android.easycake.models.MODELShoppingCart; import com.android.easycake.models.MODELShoppingCartProduct; import com.android.easycake.models.MODELUserCart; import com.android.easycake.utilities.UTILSSessionVariables; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class DALCart { public static Boolean cartProductsList(SQLiteDatabase db,MODELShoppingCart modelShoppingCart) { try{ ContentValues cvInsert=new ContentValues(); cvInsert.put("user_id_fk",UTILSSessionVariables.modelUserSessionVar.get_userId()); cvInsert.put("creation_date", getCurrentDate()); cvInsert.put("creation_time", getCurrenttime()); cvInsert.put("status_id_fk", "2"); //------calculating the total price of products------------- Float totalCartprice=0.0f; for (int i = 0; i < modelShoppingCart.getModelCartProductsList().size(); i++) { totalCartprice+=Float.parseFloat(modelShoppingCart.getModelCartProductsList().get(i).getModelProduct().get_price()); } //--------------------------------------- cvInsert.put("cart_price",""+totalCartprice) ; db.insert("Shopping_Cart", null, cvInsert); Cursor cs=db.query("Shopping_Cart", null,null,null,null,null,null); if(cs.moveToLast()){ addProdtoCart(db, cs.getString(0), modelShoppingCart); return true; }else{ return false; } }catch (Exception e) { return false; } } public static Boolean addProdtoCart( SQLiteDatabase db,String cartId, MODELShoppingCart modelCartProducts){ try{ for (int i = 0; i < modelCartProducts.getModelCartProductsList().size(); i++) { ContentValues cvInsert=new ContentValues(); cvInsert.put("cart_id_fk", cartId); cvInsert.put("product_id_fk", modelCartProducts.getModelCartProductsList().get(i).getModelProduct().get_productId()); cvInsert.put("quantity", modelCartProducts.getModelCartProductsList().get(i).getQuantity()); cvInsert.put("quantity",""+ Float.parseFloat(modelCartProducts.getModelCartProductsList().get(i).getQuantity())*Float.parseFloat(modelCartProducts.getModelCartProductsList().get(i).getModelProduct().get_price())); db.insert("Shopping_Cart_Product", null, cvInsert); } return true; } catch (Exception e) { return false; } } public static List<MODELUserCart> retriveuserCarts(SQLiteDatabase db,String userId){ List<MODELUserCart> shoppingCartsList=new ArrayList<MODELUserCart>(); Cursor cs=db.query("Shopping_Cart",null,"user_id_fk='"+userId+"'",null,null,null,null); if (cs.moveToFirst()) { do { MODELUserCart modelUserCart=new MODELUserCart(); modelUserCart.set_shoppingCartId(cs.getString(0)); modelUserCart.set_userId(cs.getString(1)); modelUserCart.set_cartprice(cs.getString(5)); modelUserCart.set_dateOfCreation(cs.getString(2)); modelUserCart.set_timeOfCreation(cs.getString(3)); modelUserCart.set_status(cs.getString(4)); shoppingCartsList.add(modelUserCart); } while (cs.moveToNext()); } return shoppingCartsList; } public static Boolean deleteProductDetails(SQLiteDatabase db,String userId, MODELProduct modelProducts) { try{ db.delete("Shopping_Cart", "user_id_fk='"+userId+"'and product_id_fk='"+modelProducts.get_productId()+"'", null); return true; }catch (Exception e) { return false; } } public static List<MODELShoppingCartProduct> retriveOrderHistory(SQLiteDatabase db, String cartId) { try{ List<MODELShoppingCartProduct> list=new ArrayList<MODELShoppingCartProduct>(); Cursor cs=db.query("Shopping_Cart_Product", null, "cart_id_fk='"+cartId+"'", null, null, null, null); if (cs.moveToFirst()) { do { MODELShoppingCartProduct modelShoppingCartProduct=new MODELShoppingCartProduct(getProductByProdId(db, cs.getString(2)), cs.getString(3)); list.add(modelShoppingCartProduct); } while (cs.moveToNext()); return list; } else { return null; } }catch (Exception e) { return null; } } public static MODELProduct getProductByProdId(SQLiteDatabase db, String productId) { MODELProduct modelProduct=new MODELProduct(); Cursor cs1= db.query("Product_Table",null, "product_id='"+productId+"'", null, null, null, null); if(cs1.moveToFirst()) { modelProduct.set_categoryId(cs1.getString(2)); modelProduct.set_ingredient(cs1.getString(5)); modelProduct.set_price(cs1.getString(6)); modelProduct.set_productId(cs1.getString(0)); modelProduct.set_productName(cs1.getString(3)); modelProduct.set_productWeight(cs1.getString(4)); modelProduct.set_storeId(cs1.getString(1)); return modelProduct; } else { return null; } } public static String getCurrentDate() { try{ Calendar c = Calendar.getInstance(); String currentDate = c.get(Calendar.YEAR) + "-" + c.get(Calendar.MONTH)+ "-" + c.get(Calendar.DAY_OF_MONTH); return currentDate; } catch (Exception e) { return null; } } public static String getCurrenttime() { try{ Date dt = new Date(); int hours = dt.getHours(); int minutes = dt.getMinutes(); int seconds = dt.getSeconds(); String curTime = hours + ":"+minutes + ":"+ seconds; return curTime; }catch (Exception e) { return null; } } }
[ "ve8951@rit.edu" ]
ve8951@rit.edu
265e9b7fcf1b045bcb27cb62c1795586efc7937f
4e85f0be0947fca9ad1307b018f4ed55115ff665
/src/main/java/com/lwyykj/core/bean/text/Comments.java
b8ca412caffbfb357980274b62ab045f50a334ec
[]
no_license
18662815187/YWYF-portal
9f4280a2facbd8073d57905da21714769f20e5ac
9829c1cc989aa4ed7f5a4641fe3893f67bcbbc5b
refs/heads/master
2022-12-23T08:34:54.511733
2019-08-16T11:37:59
2019-08-16T11:37:59
137,152,949
0
0
null
null
null
null
UTF-8
Java
false
false
3,351
java
package com.lwyykj.core.bean.text; import java.io.Serializable; import com.lwyykj.core.bean.product.Product; import com.lwyykj.core.bean.user.User; public class Comments implements Serializable { private Integer id; /** * 评论大表ID(未使用) */ private Integer cid; /** * 产品id */ private Integer pid; /** * 评论用户ID */ private Integer uid; /** * 评论图片,图片地址用逗号隔开 */ private String pics; private String content; /** * 本为星级改为:0好评、1中评、2差评 */ private Integer greade; private Boolean isDel; /** * 提交时间 */ private Integer addtime; /** * 临时字段 用户信息 */ private User user; /** * 临时字段产品 */ private Product product; private static final long serialVersionUID = 1L; public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getCid() { return cid; } public void setCid(Integer cid) { this.cid = cid; } public Integer getPid() { return pid; } public void setPid(Integer pid) { this.pid = pid; } public Integer getUid() { return uid; } public void setUid(Integer uid) { this.uid = uid; } public String getPics() { return pics; } public void setPics(String pics) { this.pics = pics == null ? null : pics.trim(); } public String getContent() { return content; } public void setContent(String content) { this.content = content == null ? null : content.trim(); } public Integer getGreade() { return greade; } public void setGreade(Integer greade) { this.greade = greade; } public Boolean getIsDel() { return isDel; } public void setIsDel(Boolean isDel) { this.isDel = isDel; } public Integer getAddtime() { return addtime; } public void setAddtime(Integer addtime) { this.addtime = addtime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", cid=").append(cid); sb.append(", pid=").append(pid); sb.append(", uid=").append(uid); sb.append(", pics=").append(pics); sb.append(", content=").append(content); sb.append(", greade=").append(greade); sb.append(", isDel=").append(isDel); sb.append(", addtime=").append(addtime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }
[ "525455531@qq.com" ]
525455531@qq.com
f7ff734376851693a70e258cfc431de4db61b93b
ac7c1a8c3d1e812da141970804ed86b5c5abacea
/Toy Language Interpreter JavaFx/Assignment8/src/Model/Statement/WhileStatement.java
e051928f5e3f2f46a556b7c1c514d3c36bae9902
[]
no_license
Boress23/Advanced-Methods-of-Programming
fe111e5f09090b166ccfb40a1a68cfeeec9d1fb9
faf67373dcbc926a180122a7e06a88544ef03a29
refs/heads/master
2022-01-07T06:47:23.764189
2022-01-02T17:08:13
2022-01-02T17:08:13
415,936,974
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package Model.Statement; import Collection.Dictionary.MyIDictionary; import Collection.Stack.MyIStack; import Collection.Stack.MyStack; import Model.Exceptions.ToyLanguageInterpreterException; import Model.Expression.Expression; import Model.ProgramState; import java.io.FileNotFoundException; public class WhileStatement implements IStatement { private Expression expression; private IStatement statement; public WhileStatement(Expression expression, IStatement statement){ this.expression = expression; this.statement = statement; } public Expression getExpression() { return expression; } public void setExpression(Expression expression) { this.expression = expression; } public IStatement getStatement() { return statement; } public void setStatement(IStatement statement) { this.statement = statement; } @Override public String toString() { return "while( " + expression.toString() + ") { " + statement.toString() + " }"; } @Override public ProgramState execute(ProgramState state) throws Exception { MyIDictionary<String, Integer> symbolTable = state.getSymbolTable(); MyIDictionary<Integer, Integer> heapTable = state.getHeap(); Integer expressionResult; expressionResult = expression.evaluate(symbolTable, heapTable); if(!expressionResult. equals(0)){ MyIStack<IStatement> stack = state.getExecutionStack(); stack.push(this); state.setExecutionStack((MyStack<IStatement>) stack); statement.execute(state); } return null; } }
[ "todorananacorina13@gmail.com" ]
todorananacorina13@gmail.com
386aeef9171f17fc94fd527ff7c2e4601936fe5f
c7fb715ea3c4cae2e05ee15eebe88fe8402a0f08
/app/src/main/java/com/zrquan/mobile/widget/view/HorizontalListView.java
bdf95152848c895ebbdb990481457c817be8a996
[]
no_license
liangkai/zrquan_android
6f8bbc7efdd40b03e3253937531f0adc7676c253
ec1af91a1d1dc41511b8b9b00153f896e94f8dde
refs/heads/master
2021-01-21T06:21:06.741226
2015-03-12T04:58:18
2015-03-12T04:58:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
51,579
java
/* * The MIT License Copyright (c) 2011 Paul Soucy (paul@dev-smart.com) * The MIT License Copyright (c) 2013 MeetMe, Inc. * * 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. */ // @formatter:off /* * This is based on HorizontalListView.java from: https://github.com/dinocore1/DevsmartLib-Android * It has been substantially rewritten and added to from the original version. */ // @formatter:on package com.zrquan.mobile.widget.view; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.support.v4.view.ViewCompat; import android.support.v4.widget.EdgeEffectCompat; import android.util.AttributeSet; import android.view.GestureDetector; import android.view.HapticFeedbackConstants; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.ScrollView; import android.widget.Scroller; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import com.zrquan.mobile.R; // @formatter:off /** * A view that shows items in a horizontally scrolling list. The items * come from the {@link ListAdapter} associated with this view. <br> * <br> * <b>Limitations:</b> * <ul> * <li>Does not support keyboard navigation</li> * <li>Does not support scroll bars<li> * <li>Does not support header or footer views<li> * <li>Does not support disabled items<li> * </ul> * <br> * <b>Custom XML Parameters Supported:</b><br> * <br> * <ul> * <li><b>divider</b> - The divider to use between items. This can be a color or a drawable. If a drawable is used * dividerWidth will automatically be set to the intrinsic width of the provided drawable, this can be overriden by providing a dividerWidth.</li> * <li><b>dividerWidth</b> - The width of the divider to be drawn.</li> * <li><b>android:requiresFadingEdge</b> - If horizontal fading edges are enabled this view will render them</li> * <li><b>android:fadingEdgeLength</b> - The length of the horizontal fading edges</li> * </ul> */ // @formatter:on public class HorizontalListView extends AdapterView<ListAdapter> { /** Defines where to insert items into the ViewGroup, as defined in {@code ViewGroup #addViewInLayout(View, int, LayoutParams, boolean)} */ private static final int INSERT_AT_END_OF_LIST = -1; private static final int INSERT_AT_START_OF_LIST = 0; /** The velocity to use for overscroll absorption */ private static final float FLING_DEFAULT_ABSORB_VELOCITY = 30f; /** The friction amount to use for the fling tracker */ private static final float FLING_FRICTION = 0.009f; /** Used for tracking the state data necessary to restore the HorizontalListView to its previous state after a rotation occurs */ private static final String BUNDLE_ID_CURRENT_X = "BUNDLE_ID_CURRENT_X"; /** The bundle id of the parents state. Used to restore the parent's state after a rotation occurs */ private static final String BUNDLE_ID_PARENT_STATE = "BUNDLE_ID_PARENT_STATE"; /** Tracks ongoing flings */ protected Scroller mFlingTracker = new Scroller(getContext()); /** Gesture listener to receive callbacks when gestures are detected */ private final GestureListener mGestureListener = new GestureListener(); /** Used for detecting gestures within this view so they can be handled */ private GestureDetector mGestureDetector; /** This tracks the starting layout position of the leftmost view */ private int mDisplayOffset; /** Holds a reference to the adapter bound to this view */ protected ListAdapter mAdapter; /** Holds a cache of recycled views to be reused as needed */ private List<Queue<View>> mRemovedViewsCache = new ArrayList<Queue<View>>(); /** Flag used to mark when the adapters data has changed, so the view can be relaid out */ private boolean mDataChanged = false; /** Temporary rectangle to be used for measurements */ private Rect mRect = new Rect(); /** Tracks the currently touched view, used to delegate touches to the view being touched */ private View mViewBeingTouched = null; /** The width of the divider that will be used between list items */ private int mDividerWidth = 0; /** The drawable that will be used as the list divider */ private Drawable mDivider = null; /** The x position of the currently rendered view */ protected int mCurrentX; /** The x position of the next to be rendered view */ protected int mNextX; /** Used to hold the scroll position to restore to post rotate */ private Integer mRestoreX = null; /** Tracks the maximum possible X position, stays at max value until last item is laid out and it can be determined */ private int mMaxX = Integer.MAX_VALUE; /** The adapter index of the leftmost view currently visible */ private int mLeftViewAdapterIndex; /** The adapter index of the rightmost view currently visible */ private int mRightViewAdapterIndex; /** This tracks the currently selected accessibility item */ private int mCurrentlySelectedAdapterIndex; /** * Callback interface to notify listener that the user has scrolled this view to the point that it is low on data. */ private RunningOutOfDataListener mRunningOutOfDataListener = null; /** * This tracks the user value set of how many items from the end will be considered running out of data. */ private int mRunningOutOfDataThreshold = 0; /** * Tracks if we have told the listener that we are running low on data. We only want to tell them once. */ private boolean mHasNotifiedRunningLowOnData = false; /** * Callback interface to be invoked when the scroll state has changed. */ private OnScrollStateChangedListener mOnScrollStateChangedListener = null; /** * Represents the current scroll state of this view. Needed so we can detect when the state changes so scroll listener can be notified. */ private OnScrollStateChangedListener.ScrollState mCurrentScrollState = OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE; /** * Tracks the state of the left edge glow. */ private EdgeEffectCompat mEdgeGlowLeft; /** * Tracks the state of the right edge glow. */ private EdgeEffectCompat mEdgeGlowRight; /** The height measure spec for this view, used to help size children views */ private int mHeightMeasureSpec; /** Used to track if a view touch should be blocked because it stopped a fling */ private boolean mBlockTouchAction = false; /** Used to track if the parent vertically scrollable view has been told to DisallowInterceptTouchEvent */ private boolean mIsParentVerticiallyScrollableViewDisallowingInterceptTouchEvent = false; /** * The listener that receives notifications when this view is clicked. */ private OnClickListener mOnClickListener; public HorizontalListView(Context context, AttributeSet attrs) { super(context, attrs); mEdgeGlowLeft = new EdgeEffectCompat(context); mEdgeGlowRight = new EdgeEffectCompat(context); mGestureDetector = new GestureDetector(context, mGestureListener); bindGestureDetector(); initView(); retrieveXmlConfiguration(context, attrs); setWillNotDraw(false); // If the OS version is high enough then set the friction on the fling tracker */ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { HoneycombPlus.setFriction(mFlingTracker, FLING_FRICTION); } } /** Registers the gesture detector to receive gesture notifications for this view */ private void bindGestureDetector() { // Generic touch listener that can be applied to any view that needs to process gestures final View.OnTouchListener gestureListenerHandler = new View.OnTouchListener() { @Override public boolean onTouch(final View v, final MotionEvent event) { // Delegate the touch event to our gesture detector return mGestureDetector.onTouchEvent(event); } }; setOnTouchListener(gestureListenerHandler); } /** * When this HorizontalListView is embedded within a vertical scrolling view it is important to disable the parent view from interacting with * any touch events while the user is scrolling within this HorizontalListView. This will start at this view and go up the view tree looking * for a vertical scrolling view. If one is found it will enable or disable parent touch interception. * * @param disallowIntercept If true the parent will be prevented from intercepting child touch events */ private void requestParentListViewToNotInterceptTouchEvents(Boolean disallowIntercept) { // Prevent calling this more than once needlessly if (mIsParentVerticiallyScrollableViewDisallowingInterceptTouchEvent != disallowIntercept) { View view = this; while (view.getParent() instanceof View) { // If the parent is a ListView or ScrollView then disallow intercepting of touch events if (view.getParent() instanceof ListView || view.getParent() instanceof ScrollView) { view.getParent().requestDisallowInterceptTouchEvent(disallowIntercept); mIsParentVerticiallyScrollableViewDisallowingInterceptTouchEvent = disallowIntercept; return; } view = (View) view.getParent(); } } } /** * Parse the XML configuration for this widget * * @param context Context used for extracting attributes * @param attrs The Attribute Set containing the ColumnView attributes */ private void retrieveXmlConfiguration(Context context, AttributeSet attrs) { if (attrs != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.HorizontalListView); // Get the provided drawable from the XML final Drawable d = a.getDrawable(R.styleable.HorizontalListView_android_divider); if (d != null) { // If a drawable is provided to use as the divider then use its intrinsic width for the divider width setDivider(d); } // If a width is explicitly specified then use that width final int dividerWidth = a.getDimensionPixelSize(R.styleable.HorizontalListView_dividerWidth, 0); if (dividerWidth != 0) { setDividerWidth(dividerWidth); } a.recycle(); } } @Override public Parcelable onSaveInstanceState() { Bundle bundle = new Bundle(); // Add the parent state to the bundle bundle.putParcelable(BUNDLE_ID_PARENT_STATE, super.onSaveInstanceState()); // Add our state to the bundle bundle.putInt(BUNDLE_ID_CURRENT_X, mCurrentX); return bundle; } @Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; // Restore our state from the bundle mRestoreX = Integer.valueOf((bundle.getInt(BUNDLE_ID_CURRENT_X))); // Restore out parent's state from the bundle super.onRestoreInstanceState(bundle.getParcelable(BUNDLE_ID_PARENT_STATE)); } } /** * Sets the drawable that will be drawn between each item in the list. If the drawable does * not have an intrinsic width, you should also call {@link #setDividerWidth(int)} * * @param divider The drawable to use. */ public void setDivider(Drawable divider) { mDivider = divider; if (divider != null) { setDividerWidth(divider.getIntrinsicWidth()); } else { setDividerWidth(0); } } /** * Sets the width of the divider that will be drawn between each item in the list. Calling * this will override the intrinsic width as set by {@link #setDivider(Drawable)} * * @param width The width of the divider in pixels. */ public void setDividerWidth(int width) { mDividerWidth = width; // Force the view to rerender itself requestLayout(); invalidate(); } private void initView() { mLeftViewAdapterIndex = -1; mRightViewAdapterIndex = -1; mDisplayOffset = 0; mCurrentX = 0; mNextX = 0; mMaxX = Integer.MAX_VALUE; setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); } /** Will re-initialize the HorizontalListView to remove all child views rendered and reset to initial configuration. */ private void reset() { initView(); removeAllViewsInLayout(); requestLayout(); } /** DataSetObserver used to capture adapter data change events */ private DataSetObserver mAdapterDataObserver = new DataSetObserver() { @Override public void onChanged() { mDataChanged = true; // Clear so we can notify again as we run out of data mHasNotifiedRunningLowOnData = false; unpressTouchedChild(); // Invalidate and request layout to force this view to completely redraw itself invalidate(); requestLayout(); } @Override public void onInvalidated() { // Clear so we can notify again as we run out of data mHasNotifiedRunningLowOnData = false; unpressTouchedChild(); reset(); // Invalidate and request layout to force this view to completely redraw itself invalidate(); requestLayout(); } }; @Override public void setSelection(int position) { mCurrentlySelectedAdapterIndex = position; } @Override public View getSelectedView() { return getChild(mCurrentlySelectedAdapterIndex); } @Override public void setAdapter(ListAdapter adapter) { if (mAdapter != null) { mAdapter.unregisterDataSetObserver(mAdapterDataObserver); } if (adapter != null) { // Clear so we can notify again as we run out of data mHasNotifiedRunningLowOnData = false; mAdapter = adapter; mAdapter.registerDataSetObserver(mAdapterDataObserver); } initializeRecycledViewCache(mAdapter.getViewTypeCount()); reset(); } @Override public ListAdapter getAdapter() { return mAdapter; } /** * Will create and initialize a cache for the given number of different types of views. * * @param viewTypeCount - The total number of different views supported */ private void initializeRecycledViewCache(int viewTypeCount) { // The cache is created such that the response from mAdapter.getItemViewType is the array index to the correct cache for that item. mRemovedViewsCache.clear(); for (int i = 0; i < viewTypeCount; i++) { mRemovedViewsCache.add(new LinkedList<View>()); } } /** * Returns a recycled view from the cache that can be reused, or null if one is not available. * * @param adapterIndex * @return */ private View getRecycledView(int adapterIndex) { int itemViewType = mAdapter.getItemViewType(adapterIndex); if (isItemViewTypeValid(itemViewType)) { return mRemovedViewsCache.get(itemViewType).poll(); } return null; } /** * Adds the provided view to a recycled views cache. * * @param adapterIndex * @param view */ private void recycleView(int adapterIndex, View view) { // There is one Queue of views for each different type of view. // Just add the view to the pile of other views of the same type. // The order they are added and removed does not matter. int itemViewType = mAdapter.getItemViewType(adapterIndex); if (isItemViewTypeValid(itemViewType)) { mRemovedViewsCache.get(itemViewType).offer(view); } } private boolean isItemViewTypeValid(int itemViewType) { return itemViewType < mRemovedViewsCache.size(); } /** Adds a child to this viewgroup and measures it so it renders the correct size */ private void addAndMeasureChild(final View child, int viewPos) { LayoutParams params = getLayoutParams(child); addViewInLayout(child, viewPos, params, true); measureChild(child); } /** * Measure the provided child. * * @param child The child. */ private void measureChild(View child) { ViewGroup.LayoutParams childLayoutParams = getLayoutParams(child); int childHeightSpec = ViewGroup.getChildMeasureSpec(mHeightMeasureSpec, getPaddingTop() + getPaddingBottom(), childLayoutParams.height); int childWidthSpec; if (childLayoutParams.width > 0) { childWidthSpec = MeasureSpec.makeMeasureSpec(childLayoutParams.width, MeasureSpec.EXACTLY); } else { childWidthSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); } child.measure(childWidthSpec, childHeightSpec); } /** Gets a child's layout parameters, defaults if not available. */ private ViewGroup.LayoutParams getLayoutParams(View child) { ViewGroup.LayoutParams layoutParams = child.getLayoutParams(); if (layoutParams == null) { // Since this is a horizontal list view default to matching the parents height, and wrapping the width layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT); } return layoutParams; } @SuppressLint("WrongCall") @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (mAdapter == null) { return; } // Force the OS to redraw this view invalidate(); // If the data changed then reset everything and render from scratch at the same offset as last time if (mDataChanged) { int oldCurrentX = mCurrentX; initView(); removeAllViewsInLayout(); mNextX = oldCurrentX; mDataChanged = false; } // If restoring from a rotation if (mRestoreX != null) { mNextX = mRestoreX; mRestoreX = null; } // If in a fling if (mFlingTracker.computeScrollOffset()) { // Compute the next position mNextX = mFlingTracker.getCurrX(); } // Prevent scrolling past 0 so you can't scroll past the end of the list to the left if (mNextX < 0) { mNextX = 0; // Show an edge effect absorbing the current velocity if (mEdgeGlowLeft.isFinished()) { mEdgeGlowLeft.onAbsorb((int) determineFlingAbsorbVelocity()); } mFlingTracker.forceFinished(true); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); } else if (mNextX > mMaxX) { // Clip the maximum scroll position at mMaxX so you can't scroll past the end of the list to the right mNextX = mMaxX; // Show an edge effect absorbing the current velocity if (mEdgeGlowRight.isFinished()) { mEdgeGlowRight.onAbsorb((int) determineFlingAbsorbVelocity()); } mFlingTracker.forceFinished(true); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); } // Calculate our delta from the last time the view was drawn int dx = mCurrentX - mNextX; removeNonVisibleChildren(dx); fillList(dx); positionChildren(dx); // Since the view has now been drawn, update our current position mCurrentX = mNextX; // If we have scrolled enough to lay out all views, then determine the maximum scroll position now if (determineMaxX()) { // Redo the layout pass since we now know the maximum scroll position onLayout(changed, left, top, right, bottom); return; } // If the fling has finished if (mFlingTracker.isFinished()) { // If the fling just ended if (mCurrentScrollState == OnScrollStateChangedListener.ScrollState.SCROLL_STATE_FLING) { setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); } } else { // Still in a fling so schedule the next frame ViewCompat.postOnAnimation(this, mDelayedLayout); } } @Override protected float getLeftFadingEdgeStrength() { int horizontalFadingEdgeLength = getHorizontalFadingEdgeLength(); // If completely at the edge then disable the fading edge if (mCurrentX == 0) { return 0; } else if (mCurrentX < horizontalFadingEdgeLength) { // We are very close to the edge, so enable the fading edge proportional to the distance from the edge, and the width of the edge effect return (float) mCurrentX / horizontalFadingEdgeLength; } else { // The current x position is more then the width of the fading edge so enable it fully. return 1; } } @Override protected float getRightFadingEdgeStrength() { int horizontalFadingEdgeLength = getHorizontalFadingEdgeLength(); // If completely at the edge then disable the fading edge if (mCurrentX == mMaxX) { return 0; } else if ((mMaxX - mCurrentX) < horizontalFadingEdgeLength) { // We are very close to the edge, so enable the fading edge proportional to the distance from the ednge, and the width of the edge effect return (float) (mMaxX - mCurrentX) / horizontalFadingEdgeLength; } else { // The distance from the maximum x position is more then the width of the fading edge so enable it fully. return 1; } } /** Determines the current fling absorb velocity */ private float determineFlingAbsorbVelocity() { // If the OS version is high enough get the real velocity */ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return IceCreamSandwichPlus.getCurrVelocity(mFlingTracker); } else { // Unable to get the velocity so just return a default. // In actuality this is never used since EdgeEffectCompat does not draw anything unless the device is ICS+. // Less then ICS EdgeEffectCompat essentially performs a NOP. return FLING_DEFAULT_ABSORB_VELOCITY; } } /** Use to schedule a request layout via a runnable */ private Runnable mDelayedLayout = new Runnable() { @Override public void run() { requestLayout(); } }; @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Cache off the measure spec mHeightMeasureSpec = heightMeasureSpec; }; /** * Determine the Max X position. This is the farthest that the user can scroll the screen. Until the last adapter item has been * laid out it is impossible to calculate; once that has occurred this will perform the calculation, and if necessary force a * redraw and relayout of this view. * * @return true if the maxx position was just determined */ private boolean determineMaxX() { // If the last view has been laid out, then we can determine the maximum x position if (isLastItemInAdapter(mRightViewAdapterIndex)) { View rightView = getRightmostChild(); if (rightView != null) { int oldMaxX = mMaxX; // Determine the maximum x position mMaxX = mCurrentX + (rightView.getRight() - getPaddingLeft()) - getRenderWidth(); // Handle the case where the views do not fill at least 1 screen if (mMaxX < 0) { mMaxX = 0; } if (mMaxX != oldMaxX) { return true; } } } return false; } /** Adds children views to the left and right of the current views until the screen is full */ private void fillList(final int dx) { // Get the rightmost child and determine its right edge int edge = 0; View child = getRightmostChild(); if (child != null) { edge = child.getRight(); } // Add new children views to the right, until past the edge of the screen fillListRight(edge, dx); // Get the leftmost child and determine its left edge edge = 0; child = getLeftmostChild(); if (child != null) { edge = child.getLeft(); } // Add new children views to the left, until past the edge of the screen fillListLeft(edge, dx); } private void removeNonVisibleChildren(final int dx) { View child = getLeftmostChild(); // Loop removing the leftmost child, until that child is on the screen while (child != null && child.getRight() + dx <= 0) { // The child is being completely removed so remove its width from the display offset and its divider if it has one. // To remove add the size of the child and its divider (if it has one) to the offset. // You need to add since its being removed from the left side, i.e. shifting the offset to the right. mDisplayOffset += isLastItemInAdapter(mLeftViewAdapterIndex) ? child.getMeasuredWidth() : mDividerWidth + child.getMeasuredWidth(); // Add the removed view to the cache recycleView(mLeftViewAdapterIndex, child); // Actually remove the view removeViewInLayout(child); // Keep track of the adapter index of the left most child mLeftViewAdapterIndex++; // Get the new leftmost child child = getLeftmostChild(); } child = getRightmostChild(); // Loop removing the rightmost child, until that child is on the screen while (child != null && child.getLeft() + dx >= getWidth()) { recycleView(mRightViewAdapterIndex, child); removeViewInLayout(child); mRightViewAdapterIndex--; child = getRightmostChild(); } } private void fillListRight(int rightEdge, final int dx) { // Loop adding views to the right until the screen is filled while (rightEdge + dx + mDividerWidth < getWidth() && mRightViewAdapterIndex + 1 < mAdapter.getCount()) { mRightViewAdapterIndex++; // If mLeftViewAdapterIndex < 0 then this is the first time a view is being added, and left == right if (mLeftViewAdapterIndex < 0) { mLeftViewAdapterIndex = mRightViewAdapterIndex; } // Get the view from the adapter, utilizing a cached view if one is available View child = mAdapter.getView(mRightViewAdapterIndex, getRecycledView(mRightViewAdapterIndex), this); addAndMeasureChild(child, INSERT_AT_END_OF_LIST); // If first view, then no divider to the left of it, otherwise add the space for the divider width rightEdge += (mRightViewAdapterIndex == 0 ? 0 : mDividerWidth) + child.getMeasuredWidth(); // Check if we are running low on data so we can tell listeners to go get more determineIfLowOnData(); } } private void fillListLeft(int leftEdge, final int dx) { // Loop adding views to the left until the screen is filled while (leftEdge + dx - mDividerWidth > 0 && mLeftViewAdapterIndex >= 1) { mLeftViewAdapterIndex--; View child = mAdapter.getView(mLeftViewAdapterIndex, getRecycledView(mLeftViewAdapterIndex), this); addAndMeasureChild(child, INSERT_AT_START_OF_LIST); // If first view, then no divider to the left of it leftEdge -= mLeftViewAdapterIndex == 0 ? child.getMeasuredWidth() : mDividerWidth + child.getMeasuredWidth(); // If on a clean edge then just remove the child, otherwise remove the divider as well mDisplayOffset -= leftEdge + dx == 0 ? child.getMeasuredWidth() : mDividerWidth + child.getMeasuredWidth(); } } /** Loops through each child and positions them onto the screen */ private void positionChildren(final int dx) { int childCount = getChildCount(); if (childCount > 0) { mDisplayOffset += dx; int leftOffset = mDisplayOffset; // Loop each child view for (int i = 0; i < childCount; i++) { View child = getChildAt(i); int left = leftOffset + getPaddingLeft(); int top = getPaddingTop(); int right = left + child.getMeasuredWidth(); int bottom = top + child.getMeasuredHeight(); // Layout the child child.layout(left, top, right, bottom); // Increment our offset by added child's size and divider width leftOffset += child.getMeasuredWidth() + mDividerWidth; } } } /** Gets the current child that is leftmost on the screen. */ private View getLeftmostChild() { return getChildAt(0); } /** Gets the current child that is rightmost on the screen. */ private View getRightmostChild() { return getChildAt(getChildCount() - 1); } /** * Finds a child view that is contained within this view, given the adapter index. * @return View The child view, or or null if not found. */ private View getChild(int adapterIndex) { if (adapterIndex >= mLeftViewAdapterIndex && adapterIndex <= mRightViewAdapterIndex) { return getChildAt(adapterIndex - mLeftViewAdapterIndex); } return null; } /** * Returns the index of the child that contains the coordinates given. * This is useful to determine which child has been touched. * This can be used for a call to {@link #getChildAt(int)} * * @param x X-coordinate * @param y Y-coordinate * @return The index of the child that contains the coordinates. If no child is found then returns -1 */ private int getChildIndex(final int x, final int y) { int childCount = getChildCount(); for (int index = 0; index < childCount; index++) { getChildAt(index).getHitRect(mRect); if (mRect.contains(x, y)) { return index; } } return -1; } /** Simple convenience method for determining if this index is the last index in the adapter */ private boolean isLastItemInAdapter(int index) { return index == mAdapter.getCount() - 1; } /** Gets the height in px this view will be rendered. (padding removed) */ private int getRenderHeight() { return getHeight() - getPaddingTop() - getPaddingBottom(); } /** Gets the width in px this view will be rendered. (padding removed) */ private int getRenderWidth() { return getWidth() - getPaddingLeft() - getPaddingRight(); } /** Scroll to the provided offset */ public void scrollTo(int x) { mFlingTracker.startScroll(mNextX, 0, x - mNextX, 0); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_FLING); requestLayout(); } @Override public int getFirstVisiblePosition() { return mLeftViewAdapterIndex; } @Override public int getLastVisiblePosition() { return mRightViewAdapterIndex; } /** Draws the overscroll edge glow effect on the left and right sides of the horizontal list */ private void drawEdgeGlow(Canvas canvas) { if (mEdgeGlowLeft != null && !mEdgeGlowLeft.isFinished() && isEdgeGlowEnabled()) { // The Edge glow is meant to come from the top of the screen, so rotate it to draw on the left side. final int restoreCount = canvas.save(); final int height = getHeight(); canvas.rotate(-90, 0, 0); canvas.translate(-height + getPaddingBottom(), 0); mEdgeGlowLeft.setSize(getRenderHeight(), getRenderWidth()); if (mEdgeGlowLeft.draw(canvas)) { invalidate(); } canvas.restoreToCount(restoreCount); } else if (mEdgeGlowRight != null && !mEdgeGlowRight.isFinished() && isEdgeGlowEnabled()) { // The Edge glow is meant to come from the top of the screen, so rotate it to draw on the right side. final int restoreCount = canvas.save(); final int width = getWidth(); canvas.rotate(90, 0, 0); canvas.translate(getPaddingTop(), -width); mEdgeGlowRight.setSize(getRenderHeight(), getRenderWidth()); if (mEdgeGlowRight.draw(canvas)) { invalidate(); } canvas.restoreToCount(restoreCount); } } /** Draws the dividers that go in between the horizontal list view items */ private void drawDividers(Canvas canvas) { final int count = getChildCount(); // Only modify the left and right in the loop, we set the top and bottom here since they are always the same final Rect bounds = mRect; mRect.top = getPaddingTop(); mRect.bottom = mRect.top + getRenderHeight(); // Draw the list dividers for (int i = 0; i < count; i++) { // Don't draw a divider to the right of the last item in the adapter if (!(i == count - 1 && isLastItemInAdapter(mRightViewAdapterIndex))) { View child = getChildAt(i); bounds.left = child.getRight(); bounds.right = child.getRight() + mDividerWidth; // Clip at the left edge of the screen if (bounds.left < getPaddingLeft()) { bounds.left = getPaddingLeft(); } // Clip at the right edge of the screen if (bounds.right > getWidth() - getPaddingRight()) { bounds.right = getWidth() - getPaddingRight(); } // Draw a divider to the right of the child drawDivider(canvas, bounds); // If the first view, determine if a divider should be shown to the left of it. // A divider should be shown if the left side of this view does not fill to the left edge of the screen. if (i == 0 && child.getLeft() > getPaddingLeft()) { bounds.left = getPaddingLeft(); bounds.right = child.getLeft(); drawDivider(canvas, bounds); } } } } /** * Draws a divider in the given bounds. * * @param canvas The canvas to draw to. * @param bounds The bounds of the divider. */ private void drawDivider(Canvas canvas, Rect bounds) { if (mDivider != null) { mDivider.setBounds(bounds); mDivider.draw(canvas); } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); drawDividers(canvas); } @Override protected void dispatchDraw(Canvas canvas) { super.dispatchDraw(canvas); drawEdgeGlow(canvas); } @Override protected void dispatchSetPressed(boolean pressed) { // Don't dispatch setPressed to our children. We call setPressed on ourselves to // get the selector in the right state, but we don't want to press each child. } protected boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { mFlingTracker.fling(mNextX, 0, (int) -velocityX, 0, 0, mMaxX, 0, 0); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_FLING); requestLayout(); return true; } protected boolean onDown(MotionEvent e) { // If the user just caught a fling, then disable all touch actions until they release their finger mBlockTouchAction = !mFlingTracker.isFinished(); // Allow a finger down event to catch a fling mFlingTracker.forceFinished(true); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); unpressTouchedChild(); if (!mBlockTouchAction) { // Find the child that was pressed final int index = getChildIndex((int) e.getX(), (int) e.getY()); if (index >= 0) { // Save off view being touched so it can later be released mViewBeingTouched = getChildAt(index); if (mViewBeingTouched != null) { // Set the view as pressed mViewBeingTouched.setPressed(true); refreshDrawableState(); } } } return true; } /** If a view is currently pressed then unpress it */ private void unpressTouchedChild() { if (mViewBeingTouched != null) { // Set the view as not pressed mViewBeingTouched.setPressed(false); refreshDrawableState(); // Null out the view so we don't leak it mViewBeingTouched = null; } } private class GestureListener extends GestureDetector.SimpleOnGestureListener { @Override public boolean onDown(MotionEvent e) { return HorizontalListView.this.onDown(e); } @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return HorizontalListView.this.onFling(e1, e2, velocityX, velocityY); } @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { // Lock the user into interacting just with this view requestParentListViewToNotInterceptTouchEvents(true); setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_TOUCH_SCROLL); unpressTouchedChild(); mNextX += (int) distanceX; updateOverscrollAnimation(Math.round(distanceX)); requestLayout(); return true; } @Override public boolean onSingleTapConfirmed(MotionEvent e) { unpressTouchedChild(); OnItemClickListener onItemClickListener = getOnItemClickListener(); final int index = getChildIndex((int) e.getX(), (int) e.getY()); // If the tap is inside one of the child views, and we are not blocking touches if (index >= 0 && !mBlockTouchAction) { View child = getChildAt(index); int adapterIndex = mLeftViewAdapterIndex + index; if (onItemClickListener != null) { onItemClickListener.onItemClick(HorizontalListView.this, child, adapterIndex, mAdapter.getItemId(adapterIndex)); return true; } } if (mOnClickListener != null && !mBlockTouchAction) { mOnClickListener.onClick(HorizontalListView.this); } return false; } @Override public void onLongPress(MotionEvent e) { unpressTouchedChild(); final int index = getChildIndex((int) e.getX(), (int) e.getY()); if (index >= 0 && !mBlockTouchAction) { View child = getChildAt(index); OnItemLongClickListener onItemLongClickListener = getOnItemLongClickListener(); if (onItemLongClickListener != null) { int adapterIndex = mLeftViewAdapterIndex + index; boolean handled = onItemLongClickListener.onItemLongClick(HorizontalListView.this, child, adapterIndex, mAdapter .getItemId(adapterIndex)); if (handled) { // BZZZTT!!1! performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); } } } } }; @Override public boolean onTouchEvent(MotionEvent event) { // Detect when the user lifts their finger off the screen after a touch if (event.getAction() == MotionEvent.ACTION_UP) { // If not flinging then we are idle now. The user just finished a finger scroll. if (mFlingTracker == null || mFlingTracker.isFinished()) { setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE); } // Allow the user to interact with parent views requestParentListViewToNotInterceptTouchEvents(false); releaseEdgeGlow(); } else if (event.getAction() == MotionEvent.ACTION_CANCEL) { unpressTouchedChild(); releaseEdgeGlow(); // Allow the user to interact with parent views requestParentListViewToNotInterceptTouchEvents(false); } return super.onTouchEvent(event); } /** Release the EdgeGlow so it animates */ private void releaseEdgeGlow() { if (mEdgeGlowLeft != null) { mEdgeGlowLeft.onRelease(); } if (mEdgeGlowRight != null) { mEdgeGlowRight.onRelease(); } } /** * Sets a listener to be called when the HorizontalListView has been scrolled to a point where it is * running low on data. An example use case is wanting to auto download more data when the user * has scrolled to the point where only 10 items are left to be rendered off the right of the * screen. To get called back at that point just register with this function with a * numberOfItemsLeftConsideredLow value of 10. <br> * <br> * This will only be called once to notify that the HorizontalListView is running low on data. * Calling notifyDataSetChanged on the adapter will allow this to be called again once low on data. * * @param listener The listener to be notified when the number of array adapters items left to * be shown is running low. * * @param numberOfItemsLeftConsideredLow The number of array adapter items that have not yet * been displayed that is considered too low. */ public void setRunningOutOfDataListener(RunningOutOfDataListener listener, int numberOfItemsLeftConsideredLow) { mRunningOutOfDataListener = listener; mRunningOutOfDataThreshold = numberOfItemsLeftConsideredLow; } /** * This listener is used to allow notification when the HorizontalListView is running low on data to display. */ public static interface RunningOutOfDataListener { /** Called when the HorizontalListView is running out of data and has reached at least the provided threshold. */ void onRunningOutOfData(); } /** * Determines if we are low on data and if so will call to notify the listener, if there is one, * that we are running low on data. */ private void determineIfLowOnData() { // Check if the threshold has been reached and a listener is registered if (mRunningOutOfDataListener != null && mAdapter != null && mAdapter.getCount() - (mRightViewAdapterIndex + 1) < mRunningOutOfDataThreshold) { // Prevent notification more than once if (!mHasNotifiedRunningLowOnData) { mHasNotifiedRunningLowOnData = true; mRunningOutOfDataListener.onRunningOutOfData(); } } } /** * Register a callback to be invoked when the HorizontalListView has been clicked. * * @param listener The callback that will be invoked. */ @Override public void setOnClickListener(OnClickListener listener) { mOnClickListener = listener; } /** * Interface definition for a callback to be invoked when the view scroll state has changed. */ public interface OnScrollStateChangedListener { public enum ScrollState { /** * The view is not scrolling. Note navigating the list using the trackball counts as being * in the idle state since these transitions are not animated. */ SCROLL_STATE_IDLE, /** * The user is scrolling using touch, and their finger is still on the screen */ SCROLL_STATE_TOUCH_SCROLL, /** * The user had previously been scrolling using touch and had performed a fling. The * animation is now coasting to a stop */ SCROLL_STATE_FLING } /** * Callback method to be invoked when the scroll state changes. * * @param scrollState The current scroll state. */ public void onScrollStateChanged(ScrollState scrollState); } /** * Sets a listener to be invoked when the scroll state has changed. * * @param listener The listener to be invoked. */ public void setOnScrollStateChangedListener(OnScrollStateChangedListener listener) { mOnScrollStateChangedListener = listener; } /** * Call to set the new scroll state. * If it has changed and a listener is registered then it will be notified. */ private void setCurrentScrollState(OnScrollStateChangedListener.ScrollState newScrollState) { // If the state actually changed then notify listener if there is one if (mCurrentScrollState != newScrollState && mOnScrollStateChangedListener != null) { mOnScrollStateChangedListener.onScrollStateChanged(newScrollState); } mCurrentScrollState = newScrollState; } /** * Updates the over scroll animation based on the scrolled offset. * * @param scrolledOffset The scroll offset */ private void updateOverscrollAnimation(final int scrolledOffset) { if (mEdgeGlowLeft == null || mEdgeGlowRight == null) return; // Calculate where the next scroll position would be int nextScrollPosition = mCurrentX + scrolledOffset; // If not currently in a fling (Don't want to allow fling offset updates to cause over scroll animation) if (mFlingTracker == null || mFlingTracker.isFinished()) { // If currently scrolled off the left side of the list and the adapter is not empty if (nextScrollPosition < 0) { // Calculate the amount we have scrolled since last frame int overscroll = Math.abs(scrolledOffset); // Tell the edge glow to redraw itself at the new offset mEdgeGlowLeft.onPull((float) overscroll / getRenderWidth()); // Cancel animating right glow if (!mEdgeGlowRight.isFinished()) { mEdgeGlowRight.onRelease(); } } else if (nextScrollPosition > mMaxX) { // Scrolled off the right of the list // Calculate the amount we have scrolled since last frame int overscroll = Math.abs(scrolledOffset); // Tell the edge glow to redraw itself at the new offset mEdgeGlowRight.onPull((float) overscroll / getRenderWidth()); // Cancel animating left glow if (!mEdgeGlowLeft.isFinished()) { mEdgeGlowLeft.onRelease(); } } } } /** * Checks if the edge glow should be used enabled. * The glow is not enabled unless there are more views than can fit on the screen at one time. */ private boolean isEdgeGlowEnabled() { if (mAdapter == null || mAdapter.isEmpty()) return false; // If the maxx is more then zero then the user can scroll, so the edge effects should be shown return mMaxX > 0; } @TargetApi(11) /** Wrapper class to protect access to API version 11 and above features */ private static final class HoneycombPlus { static { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { throw new RuntimeException("Should not get to HoneycombPlus class unless sdk is >= 11!"); } } /** Sets the friction for the provided scroller */ public static void setFriction(Scroller scroller, float friction) { if (scroller != null) { scroller.setFriction(friction); } } } @TargetApi(14) /** Wrapper class to protect access to API version 14 and above features */ private static final class IceCreamSandwichPlus { static { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { throw new RuntimeException("Should not get to IceCreamSandwichPlus class unless sdk is >= 14!"); } } /** Gets the velocity for the provided scroller */ public static float getCurrVelocity(Scroller scroller) { return scroller.getCurrVelocity(); } } }
[ "yuqi.fan@foxmail.com" ]
yuqi.fan@foxmail.com
88d8e97021d50568010e8e1350ff8d046404cf1c
3b0ccf38115b9ec91db51720cdd758e495345789
/Intro/Exploring the Waters/AreSimilar.java
eb66d754da7e1207d2290002587602d6cf00eacf
[]
no_license
Kevnien/CodeSignal-Solutions
b6a18b84fb618840d8d11d2b70fa5adf02805ccc
7a41b720500d2d4b3880d9db17eb1701e48ff17e
refs/heads/master
2020-04-21T16:07:44.692223
2019-04-18T06:38:34
2019-04-18T06:38:34
169,690,272
0
0
null
null
null
null
UTF-8
Java
false
false
1,055
java
// Two arrays are called similar if one can be obtained from another by swapping at most one pair of elements in one of the arrays. // Given two arrays a and b, check whether they are similar. class AreSimilar{ boolean areSimilar(int[] a, int[] b) { if(Arrays.equals(a, b)){ return true; } boolean foundOne = false; boolean switchable = false; int[] differences = new int[2]; for(int i=0; i<a.length; i++){ if(a[i] != b[i]){ if(!foundOne){ foundOne = true; differences[0] = a[i]; differences[1] = b[i]; }else{ if(switchable){ return false; } if(a[i]==differences[1] && b[i]==differences[0]){ switchable = true; }else{ return false; } } } } return true; } }
[ "kevinn858@gmail.com" ]
kevinn858@gmail.com
5dc86f9cb87f5a1e5c7d7eb256c42bf591138111
710a93b1bbc3492f3f0364b444e153f1fd727fdb
/src/main/java/edu/mum/bloodbankrest/rest/service/Impl/DonationRestServiceImpl.java
99aeaf92fdb3f2d49f0cba000d5eaa16c4f91224
[]
no_license
DaniAZ/Blood-Bank-Management
644f98497347835bb246252222a84bd64a4d4de5
c786dceaed7d70199f2f40a05f46e018835cdc44
refs/heads/master
2020-05-25T19:05:42.966463
2019-05-23T07:33:40
2019-05-23T07:33:40
187,943,083
0
0
null
null
null
null
UTF-8
Java
false
false
1,875
java
package edu.mum.bloodbankrest.rest.service.Impl; import edu.mum.bloodbankrest.domain.Donation; import edu.mum.bloodbankrest.domain.Donor; import edu.mum.bloodbankrest.domain.UserCredentials; import edu.mum.bloodbankrest.rest.RestHttpHeader; import edu.mum.bloodbankrest.rest.service.DonationRestService; import edu.mum.bloodbankrest.rest.service.DonorRestService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import java.util.Arrays; import java.util.List; @Component public class DonationRestServiceImpl implements DonationRestService { @Autowired RestHttpHeader restHelper; String baseUrl = "http://localhost:8080/donations"; String baseUrlExtended = baseUrl + "/"; @Override public void save(Donation donation) { RestTemplate restTemplate = restHelper.getRestTemplate(); HttpEntity<Donation> httpEntity = new HttpEntity<Donation>(donation, restHelper.getHttpHeaders()); donation = restTemplate.postForObject(baseUrlExtended+"add", httpEntity, Donation.class); return ; } @Override public void update(Donation donation) { } @Override public List<Donation> findAll() { RestTemplate restTemplate = restHelper.getRestTemplate(); HttpEntity httpEntity = new HttpEntity(restHelper.getHttpHeaders()); ResponseEntity<Donation[]> responseEntity = restTemplate.exchange(baseUrl, HttpMethod.GET, httpEntity, Donation[].class); List<Donation> userList = Arrays.asList(responseEntity.getBody()); return userList; } @Override public Donation findOne(Long id) { return null; } }
[ "da16ni19@gmail.com" ]
da16ni19@gmail.com
35276b76eb34554f47f67f6055f03a5ce1ec30a7
625411c604cf5bb776b056945cb1ce9ae37426b5
/cloudalibaba-seata-order-service-2001/src/main/java/com/guo/cloud/dao/OrderDao.java
03dde508ec8aff047e7fe96a96ec1e41c270b021
[]
no_license
zichunguo/testSpringCloud
6a8381c89132a6f55c9ec7b1e0967cbcaf75c069
c1ebd49238d33af28ffce371fa53acfaf3e4bbd4
refs/heads/master
2022-12-07T04:59:44.407668
2020-08-27T09:24:35
2020-08-27T09:24:35
287,224,964
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.guo.cloud.dao; import com.guo.cloud.domain.Order; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** * @author guo * @date 2020/8/23 */ @Mapper public interface OrderDao { /** * 新建订单 * @param order */ void create(Order order); /** * 修改订单状态,从 0 改为 1 * @param userId * @param status */ void update(@Param("userId") Long userId, @Param("status") Integer status); }
[ "guozichunvip@163.com" ]
guozichunvip@163.com
6bd1379587247ece5afdad680eec0e239d2a5ae8
37d24d0734e6b7a2157c29b9103701ad3f217604
/src/main/java/com/example/springhumo/constant/ReconciliationStatus.java
c115f3f6bcf1ac491b58491255eca36e1f85df82
[]
no_license
ABDUVOHID771/humo
d5b494fdd4ee27064c796bd8380e4cd153f04cd1
2959b4622175f500903019eb2a5b390daaef2da4
refs/heads/master
2022-12-19T07:28:45.678184
2020-09-29T08:31:48
2020-09-29T08:31:48
299,552,740
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package com.example.springhumo.constant; public enum ReconciliationStatus { CREATED, CONFIRMED, ERROR; private ReconciliationStatus() { } }
[ "aristakrat31@gmail.com" ]
aristakrat31@gmail.com
f8ccae86bc9efce5d46a8494a67290ed14f63593
464b7f2c7c483269e9f985342dc96e7784ac7aed
/Xml/src/test/java/com/heaven7/java/xml/XmlTest.java
38409abb77420c82b5cf538d25312143734cf8f8
[ "Apache-2.0" ]
permissive
LightSun/Xml
68cc076f55988a848e4de5808e746521a140d384
3f347510ee4810c07e52e28fe96afc8f032b96c5
refs/heads/master
2020-05-27T14:31:09.844733
2019-05-26T09:33:57
2019-05-26T09:33:57
188,661,186
0
0
null
null
null
null
UTF-8
Java
false
false
6,274
java
package com.heaven7.java.xml; import com.heaven7.java.reflecty.TypeToken; import com.heaven7.java.reflectyio.ReflectyIo; import com.heaven7.java.xml.entity.Info; import com.heaven7.java.xml.entity.Person; import org.junit.Assert; import org.junit.Test; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.*; public class XmlTest { private final StringWriter sw = new StringWriter(); private final XmlWriter yamlWriter = new XmlWriter(sw); private void clean(){ StringBuffer buffer = sw.getBuffer(); buffer.delete(0, buffer.length()); } @Test public void testRead() throws Exception{ String xml = "<Google age=\"28\" name=\"heaven7\" list=\"h123,h456,h789\">\n" + "\t<map h1=\"1\" h2=\"2\" h3=\"3\"/>\n" + "\t<listMap>\n" + "\t\t<list_map h1=\"1\" h2=\"2\" h3=\"3\"/>\n" + "\t\t<list_map h1=\"1\" h2=\"2\" h3=\"3\"/>\n" + "\t</listMap>\n" + "\t<mapList h1=\"1,2,3\" h2=\"4,5,6\"/>\n" + "\t<mapListInfo>\n" + "\t\t<key1>\n" + "\t\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t</key1>\n" + "\t\t<key2>\n" + "\t\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t</key2>\n" + "\t</mapListInfo>\n" + "\t<infoList>\n" + "\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\t</infoList>\n" + "\t<infoMap>\n" + "\t\t<info1 addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t<info3 addr=\"addr1\" phone=\"12345\"/>\n" + "\t\t<info2 addr=\"addr1\" phone=\"12345\"/>\n" + "\t</infoMap>\n" + "\t<info addr=\"addr1\" phone=\"12345\"/>\n" + "\n" + "\tfgkfdgfdlg8df89g8fd9g89fd99999999999gklal;l;d;lasd7as7d5asd5as56ddddddas56ddddd5s6ad\n" + "</Google>\n"; XmlReader reader = new XmlReader(new StringReader(xml)); Object obj = new ReflectyIo().tam(new XmlTypeAdapterManager()) .type(Person.class) .build().read(reader); System.out.println(obj); } @Test public void testObject() throws Exception{ Person p = new Person(); p.setAge(28); p.setName("heaven7"); p.setList(createList()); p.setMap(createMap()); p.setMapList(createMapList()); p.setListMap(createListMap()); p.setInfo(createInfo()); p.setInfoList(createInfoList()); p.setInfoMap(createInfoMap()); p.setText("fgkfdgfdlg8df89g8fd9g89fd99999999999gklal;l;d;lasd7as7d5asd5as56ddddddas56ddddd5s6ad"); p.setMapListInfo(createMapListInfo()); // p.setInfoMap2(createInfoMap2()); // not support this type testImpl(new TypeToken<Person>(){}, p); clean(); } //for xml. only support self-object. /* @Test public void testMap()throws Exception{ Map<String, Info> map = createInfoMap(); TypeToken<Map<String, Info>> tt = new TypeToken<Map<String, Info>>() { }; testImpl(tt, map); } @Test public void testListMap() throws Exception{ List<Map<String, Integer>> list = createListMap(); TypeToken<List<Map<String, Integer>>> tt = new TypeToken<List<Map<String, Integer>>>() { }; testImpl(tt, list); }*/ private Map<Info, String> createInfoMap2() { Map<Info, String> map = new HashMap<>(); map.put(createInfo(1), "value1"); map.put(createInfo(2), "value2"); map.put(createInfo(3), "value3"); return map; } private Map<String, List<Info>> createMapListInfo() { Map<String, List<Info>> map = new HashMap<>(); map.put("key1", Arrays.asList(createInfo())); map.put("key2", Arrays.asList(createInfo(), createInfo(), createInfo())); return map; } private void testImpl(TypeToken<?> tt, Object raw) throws IOException { new ReflectyIo().delegate(new XmlReflectyDelegate()) .typeToken(tt) .build().write(yamlWriter, raw); System.out.println(sw.toString()); XmlReader reader = new XmlReader(new StringReader(sw.toString())); Object obj = new ReflectyIo().delegate(new XmlReflectyDelegate()) .typeToken(tt) .build().read(reader); clean(); Assert.assertEquals(obj, raw); } private Map<String, Info> createInfoMap() { Map<String, Info> map = new HashMap<>(); map.put("info1", createInfo()); map.put("info2", createInfo()); map.put("info3", createInfo()); return map; } private List<Info> createInfoList() { return new ArrayList<>(Arrays.asList(createInfo(), createInfo())); } private Info createInfo() { Info info = new Info(); info.setAddr("addr1"); info.setPhone("12345"); return info; } private Info createInfo(int index) { Info info = new Info(); info.setAddr("addr__" + index); info.setPhone("phone__" + index); return info; } private List<Map<String, Integer>> createListMap() { List<Map<String, Integer>> list = new ArrayList<>(); list.add(createMap()); list.add(createMap()); return list; } private Map<String, List<Integer>> createMapList() { Map<String, List<Integer>> map = new HashMap<>(); map.put("h1", Arrays.asList(1,2,3)); map.put("h2", Arrays.asList(4,5,6)); return map; } private Map<String, Integer> createMap() { Map<String, Integer> map = new HashMap<>(); map.put("h1", 1); map.put("h2", 2); map.put("h3", 3); return map; } private List<String> createList() { return new ArrayList<>(Arrays.asList("h123", "h456", "h789")); } }
[ "donshine723@gmail.com" ]
donshine723@gmail.com
2e21180d2299b68df2aa3333e45ff69d9f802260
114678de636405f310839d046b198cefe4718810
/src/wiki/listener/CountListener.java
414d0350dd85c9d13125dfa583290c5bb0d61f2f
[]
no_license
i1990jain/WikiStream
d39bb149adb22484b04616a710544f083561198f
d8bb058d565e6088b7eb41a9bf27312adfa28030
refs/heads/master
2021-01-10T10:13:59.288709
2016-03-14T13:52:24
2016-03-14T13:52:24
53,661,683
0
0
null
null
null
null
UTF-8
Java
false
false
707
java
package wiki.listener; import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.stereotype.Component; import com.espertech.esper.client.EventBean; import com.espertech.esper.client.UpdateListener; @Component public class CountListener implements UpdateListener { public void update(EventBean[] newEvents, EventBean[] oldEvents) { StringBuilder sb = new StringBuilder(); Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); System.out.println(dateFormat.format(date.getTime())); for (EventBean event : newEvents) { sb.append("Count of Feeds : " + event.get("count")); } System.out.println(sb.toString()); } }
[ "i1990jain@gmail.com" ]
i1990jain@gmail.com
e4ba2d6659ff99902cf166e2dba07dcea94f4e02
b7322a938f3084a712502100e214246299ca10d0
/src/com/lxb/jyb/wheelview/NumericWheelAdapter.java
24d960cd8fc6e06626e4eedfb8ac626797d06609
[]
no_license
Fightdaofeng/54643131321231111111156465444444444444441651
a3eca2005636c681161be5d2f37d265d1154cc93
e66da6892d08f6452d2bb0a6a6a07fdfcaf3d9ae
refs/heads/master
2021-01-22T13:53:06.974301
2016-06-06T03:36:34
2016-06-06T03:37:15
58,299,942
0
0
null
null
null
null
UTF-8
Java
false
false
2,380
java
/* * Copyright 2011 Yuri Kanivets * * 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.lxb.jyb.wheelview; import android.content.Context; /** * Numeric Wheel adapter. */ public class NumericWheelAdapter extends AbstractWheelTextAdapter { /** The default min value */ public static final int DEFAULT_MAX_VALUE = 9; /** The default max value */ private static final int DEFAULT_MIN_VALUE = 0; // Values private int minValue; private int maxValue; // format private String format; /** * Constructor * @param context the current context */ public NumericWheelAdapter(Context context) { this(context, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE); } /** * Constructor * @param context the current context * @param minValue the wheel min value * @param maxValue the wheel max value */ public NumericWheelAdapter(Context context, int minValue, int maxValue) { this(context, minValue, maxValue, null); } /** * Constructor * @param context the current context * @param minValue the wheel min value * @param maxValue the wheel max value * @param format the format string */ public NumericWheelAdapter(Context context, int minValue, int maxValue, String format) { super(context); this.minValue = minValue; this.maxValue = maxValue; this.format = format; } @Override public CharSequence getItemText(int index) { if (index >= 0 && index < getItemsCount()) { int value = minValue + index; return format != null ? String.format(format, value) : Integer.toString(value); } return null; } @Override public int getItemsCount() { return maxValue - minValue + 1; } }
[ "Liuxiaobin" ]
Liuxiaobin
f4c35b343dde172261158bfda934d7314c58700e
bae0e1f47e8c5ab7cc7df47ef036fc9b6b4504ed
/Ejercicio_2.java
b715cc8f132e661502d33fd807d344aff799d9d9
[]
no_license
johnR0912/proyecto_java
7387e6d4305daee9b1bde33eda9c20d8d9545567
722cd792aa96ff33a771aca11bfb6800e1674146
refs/heads/master
2022-11-15T08:46:07.294501
2020-07-10T07:28:22
2020-07-10T07:28:22
278,567,161
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
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 guia1; import java.util.Scanner; /** * * @author zc201 */ public class Ejercicio_2 { public static void main(String[] args) { Scanner leer = new Scanner (System.in); double europa, reinoUnido, australia, canada, dinero, USD, res1, res2, res3, res4, res5; USD = 1; europa = 0.70; reinoUnido = 0.61; australia = 0.95; canada =0.97; dinero = 100.00; res1 = (dinero * USD); res2 = (dinero * europa); res3 = (dinero * reinoUnido); res4 = (dinero * australia); res5 = (dinero * canada); System.out.println("Total de USD " + res1); System.out.println("Total de Europa " + res2); System.out.println("Total de ReinoUnido " + res3); System.out.println("Total de Australia " + res4); System.out.println("Total de Canadá " + res5); } }
[ "65005551+johnR0912@users.noreply.github.com" ]
65005551+johnR0912@users.noreply.github.com
b26edc84cc72560cbc0dffe78cd050e575151aa1
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Time-6/org.joda.time.chrono.GJChronology/BBC-F0-opt-20/tests/28/org/joda/time/chrono/GJChronology_ESTest.java
f0695fdceea33b3312ed6d5f86e990492be7891f
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
40,694
java
/* * This file was automatically generated by EvoSuite * Sun Oct 24 04:17:09 GMT 2021 */ package org.joda.time.chrono; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.TimeZone; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.testdata.EvoSuiteFile; import org.joda.time.Chronology; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Days; import org.joda.time.Duration; import org.joda.time.Instant; import org.joda.time.LocalDate; import org.joda.time.LocalDateTime; import org.joda.time.MonthDay; import org.joda.time.Months; import org.joda.time.MutablePeriod; import org.joda.time.Period; import org.joda.time.ReadableDuration; import org.joda.time.ReadableInstant; import org.joda.time.ReadablePartial; import org.joda.time.ReadablePeriod; import org.joda.time.YearMonth; import org.joda.time.chrono.AssembledChronology; import org.joda.time.chrono.BuddhistChronology; import org.joda.time.chrono.GJChronology; import org.joda.time.chrono.LenientChronology; import org.joda.time.tz.FixedDateTimeZone; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class GJChronology_ESTest extends GJChronology_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (long) 1, 1); Period period0 = new Period(1, 0L, gJChronology0); } @Test(timeout = 4000) public void test01() throws Throwable { Months months0 = Months.ZERO; GJChronology gJChronology0 = GJChronology.getInstance(); int[] intArray0 = gJChronology0.get((ReadablePeriod) months0, (-77656041518655L), (-12219292800000L)); assertArrayEquals(new int[] {24883}, intArray0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test02() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); Period period0 = new Period((-920L), 1, gJChronology0); int[] intArray0 = gJChronology0.get((ReadablePeriod) period0, 0L, 86400000L); assertEquals(0L, dateTime0.getMillis()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertArrayEquals(new int[] {0, 0, 0, 1, 0, 0, 0, 0}, intArray0); } @Test(timeout = 4000) public void test03() throws Throwable { LocalDate localDate0 = new LocalDate(3L); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); MonthDay monthDay0 = new MonthDay(localDate0, gJChronology0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test04() throws Throwable { LocalDate localDate0 = LocalDate.now(); DateTime dateTime0 = localDate0.toDateTimeAtCurrentTime(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); // Undeclared exception! try { gJChronology0.set(localDate0, 3801600000L); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 14 for dayOfMonth is not supported // verifyException("org.joda.time.chrono.GJChronology$CutoverField", e); } } @Test(timeout = 4000) public void test05() throws Throwable { LocalDate localDate0 = LocalDate.now(); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); long long0 = gJChronology0.set(localDate0, 3801600000L); assertEquals(1392336000000L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test06() throws Throwable { LocalDate localDate0 = LocalDate.now(); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); // Undeclared exception! try { gJChronology0.set(localDate0, 134420395017600000L); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 2 for monthOfYear is not supported // verifyException("org.joda.time.chrono.GJChronology$CutoverField", e); } } @Test(timeout = 4000) public void test07() throws Throwable { DateTime dateTime0 = new DateTime(); DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); MonthDay monthDay0 = new MonthDay((Object) null, gJChronology0); MonthDay monthDay1 = monthDay0.minusMonths(7); assertEquals(14, monthDay1.getDayOfMonth()); assertEquals(7, monthDay1.getMonthOfYear()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test08() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); DateTime dateTime0 = new DateTime(1, 1, 1, 1, 1, 1, dateTimeZone0); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); String string0 = gJChronology0.toString(); assertEquals("GJChronology[Etc/UTC,cutover=0001-01-01T01:01:01.000Z]", string0); } @Test(timeout = 4000) public void test09() throws Throwable { LocalDate localDate0 = new LocalDate(1270L); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(); DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); GJChronology gJChronology1 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); boolean boolean0 = gJChronology0.equals(gJChronology1); assertFalse(gJChronology1.equals((Object)gJChronology0)); assertFalse(boolean0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(4, gJChronology1.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test10() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); LocalDateTime localDateTime0 = new LocalDateTime((-12219292800000L), (Chronology) gJChronology0); DateTime dateTime0 = localDateTime0.toDateTime(dateTimeZone0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals((-12219292800000L), dateTime0.getMillis()); } @Test(timeout = 4000) public void test11() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); try { gJChronology0.getDateTimeMillis((-398), 2, (-926), (int) (byte) (-118), 192, 417, 1073741824); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value -118 for hourOfDay must be in the range [0,23] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test12() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); try { gJChronology0.getDateTimeMillis(1816, 1816, 1816, 1816, 1816, 1816, 1816); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 1816 for hourOfDay must be in the range [0,23] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test13() throws Throwable { FixedDateTimeZone fixedDateTimeZone0 = (FixedDateTimeZone)DateTimeZone.UTC; // Undeclared exception! try { GJChronology.getInstance((DateTimeZone) fixedDateTimeZone0, (-181368374397158L), (-2533)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid min days in first week: -2533 // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test14() throws Throwable { DateTime dateTime0 = new DateTime(1, 1, 1, 1, 1, 1, 1); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); GJChronology gJChronology1 = (GJChronology)gJChronology0.withUTC(); assertEquals(4, gJChronology1.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test15() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); long long0 = gJChronology0.julianToGregorianByYear(1123200000L); assertEquals(0L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test16() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.julianToGregorianByYear(30585600000L); assertEquals(29462400000L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test17() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); long long0 = gJChronology0.julianToGregorianByYear(1); assertEquals((-1123199999L), long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test18() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.julianToGregorianByWeekyear(1209600000L); assertEquals(0L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test19() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); long long0 = gJChronology0.julianToGregorianByWeekyear(1209600001L); assertEquals(1L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test20() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.julianToGregorianByWeekyear(2804L); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals((-1209597196L), long0); } @Test(timeout = 4000) public void test21() throws Throwable { FixedDateTimeZone fixedDateTimeZone0 = (FixedDateTimeZone)DateTimeZone.UTC; GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) fixedDateTimeZone0); long long0 = gJChronology0.gregorianToJulianByYear((-1240L)); assertEquals(1123198760L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test22() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); long long0 = gJChronology0.gregorianToJulianByYear((-36222605138680L)); assertEquals((-36222259538680L), long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test23() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.gregorianToJulianByWeekyear((-4783L)); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(1209595217L, long0); } @Test(timeout = 4000) public void test24() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forTimeZone((TimeZone) null); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0); long long0 = gJChronology0.gregorianToJulianByWeekyear((-62033036340000L)); assertEquals((-62033036340000L), long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test25() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetHoursMinutes(0, 53); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (long) 0, 1); Instant instant0 = gJChronology0.getGregorianCutover(); assertEquals(1, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(0L, instant0.getMillis()); } @Test(timeout = 4000) public void test26() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); gJChronology0.getGregorianCutover(); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test27() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, 167L, 1); long long0 = gJChronology0.getDateTimeMillis(1, 1, 1, 1, 1, 1, 1); assertEquals(1, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals((-62135765938999L), long0); } @Test(timeout = 4000) public void test28() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); // Undeclared exception! try { gJChronology0.julianToGregorianByWeekyear((-62135769599999L)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 53 for weekOfWeekyear must be in the range [1,52] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test29() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate(dateTimeZone0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); // Undeclared exception! try { gJChronology0.gregorianToJulianByYear((-62135769599999L)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 0 for year is not supported // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test30() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); try { gJChronology0.getDateTimeMillis(2910, (-1284), 2910, 2910); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value -1284 for monthOfYear must be in the range [1,12] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test31() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); // Undeclared exception! try { gJChronology0.assemble((AssembledChronology.Fields) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.joda.time.chrono.GJChronology", e); } } @Test(timeout = 4000) public void test32() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); AssembledChronology.Fields assembledChronology_Fields0 = new AssembledChronology.Fields(); gJChronology0.assemble(assembledChronology_Fields0); assertEquals(0L, dateTime0.getMillis()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test33() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); DateTime dateTime0 = new DateTime(3, 1, 3, 1, 11, gJChronology0); assertEquals((-62072520540000L), dateTime0.getMillis()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test34() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.getDateTimeMillis(3384, 3, 4, 3, 0, 0, 4); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(44626993200004L, long0); } @Test(timeout = 4000) public void test35() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate(dateTimeZone0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); long long0 = gJChronology0.getDateTimeMillis(1, 1, 1, 1); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals((-62135769599999L), long0); } @Test(timeout = 4000) public void test36() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); long long0 = gJChronology0.getDateTimeMillis(2842, 4, 5, 1407); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(27525830401407L, long0); } @Test(timeout = 4000) public void test37() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); GJChronology gJChronology1 = (GJChronology)gJChronology0.withZone(dateTimeZone0); assertEquals(4, gJChronology1.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test38() throws Throwable { Instant instant0 = new Instant(); DateTimeZone dateTimeZone0 = instant0.getZone(); // Undeclared exception! try { GJChronology.getInstance(dateTimeZone0, (ReadableInstant) instant0, 1807); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid min days in first week: 1807 // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test39() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); DateTime dateTime0 = new DateTime(1, 1, 1, 1, 1, dateTimeZone0); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0, 1); assertEquals(1, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test40() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); LocalDate localDate0 = new LocalDate(31083663600000L, dateTimeZone0); DateTime dateTime0 = localDate0.toDateTimeAtCurrentTime(); // Undeclared exception! try { GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0, (-1039)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid min days in first week: -1039 // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test41() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetHoursMinutes(0, 53); // Undeclared exception! try { GJChronology.getInstance(dateTimeZone0, (ReadableInstant) null, 448); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid min days in first week: 448 // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test42() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (long) 1, 1); Instant instant0 = gJChronology0.getGregorianCutover(); assertEquals(1L, instant0.getMillis()); assertEquals(1, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test43() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); AssembledChronology.Fields assembledChronology_Fields0 = new AssembledChronology.Fields(); gJChronology0.assemble(assembledChronology_Fields0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test44() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); int int0 = gJChronology0.getMinimumDaysInFirstWeek(); assertEquals(4, int0); } @Test(timeout = 4000) public void test45() throws Throwable { LocalDate localDate0 = LocalDate.now(); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); Period period0 = new Period(53, (-12219292800000L), gJChronology0); long long0 = gJChronology0.add((ReadablePeriod) period0, 365L, (-401)); assertEquals(4899821673621618L, long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test46() throws Throwable { LocalDate localDate0 = new LocalDate(1270L); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); DateTimeZone dateTimeZone0 = DateTimeZone.getDefault(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); YearMonth yearMonth0 = new YearMonth(1, 1, gJChronology0); YearMonth yearMonth1 = yearMonth0.minusMonths((-86399999)); // Undeclared exception! try { yearMonth1.withYear(0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 0 for year is not supported // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test47() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); Period period0 = new Period(); int[] intArray0 = gJChronology0.get((ReadablePeriod) period0, (-26179200000L), (long) 1); assertArrayEquals(new int[] {0, 10, 0, 0, 0, 0, 0, 1}, intArray0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test48() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); Period period0 = new Period(); int[] intArray0 = gJChronology0.get((ReadablePeriod) period0, 10000000000L, (-1L)); assertArrayEquals(new int[] {0, (-4), 0, 5, 6, 13, 19, 999}, intArray0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test49() throws Throwable { Instant instant0 = Instant.now(); BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTime dateTime0 = instant0.toDateTime((Chronology) buddhistChronology0); // Undeclared exception! try { dateTime0.withWeekyear((-5320)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The resulting instant is below the supported minimum of 0001-01-01T00:00:00.000Z (BuddhistChronology[Etc/UTC]) // verifyException("org.joda.time.chrono.LimitChronology", e); } } @Test(timeout = 4000) public void test50() throws Throwable { DateTime dateTime0 = DateTime.now(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); LocalDate localDate0 = new LocalDate((Chronology) gJChronology0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test51() throws Throwable { LocalDate localDate0 = LocalDate.now(); DateTime dateTime0 = localDate0.toDateTimeAtCurrentTime(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); MonthDay monthDay0 = new MonthDay(dateTime0, gJChronology0); monthDay0.withDayOfMonth(1); assertEquals(14, monthDay0.getDayOfMonth()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test52() throws Throwable { LocalDate localDate0 = new LocalDate(3L); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); Duration duration0 = Duration.standardSeconds(3L); DateTime dateTime1 = dateTime0.withDurationAdded((ReadableDuration) duration0, 29); DateTime dateTime2 = dateTime1.withEarlierOffsetAtOverlap(); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime2); MonthDay monthDay0 = new MonthDay(localDate0, gJChronology0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test53() throws Throwable { LocalDateTime localDateTime0 = new LocalDateTime((-438L), (DateTimeZone) null); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, 743L, 6); // Undeclared exception! try { gJChronology0.set(localDateTime0, (-2666L)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 31 for dayOfMonth is not supported // verifyException("org.joda.time.chrono.GJChronology$CutoverField", e); } } @Test(timeout = 4000) public void test54() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); LocalDateTime localDateTime0 = new LocalDateTime((-12220156799985L)); // Undeclared exception! try { gJChronology0.set(localDateTime0, (-12220156799985L)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 5 for dayOfMonth is not supported // verifyException("org.joda.time.chrono.GJChronology$CutoverField", e); } } @Test(timeout = 4000) public void test55() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); YearMonth yearMonth0 = YearMonth.now((Chronology) gJChronology0); Period period0 = Period.hours(924); YearMonth yearMonth1 = yearMonth0.withPeriodAdded(period0, (-1021)); assertEquals(2, yearMonth1.getMonthOfYear()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test56() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetHoursMinutes(0, 53); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (long) 0, 1); String string0 = gJChronology0.toString(); assertEquals("GJChronology[+00:53,cutover=1970-01-01,mdfw=1]", string0); } @Test(timeout = 4000) public void test57() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetHoursMinutes(6, 6); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, 999999992L, 6); String string0 = gJChronology0.toString(); assertEquals("GJChronology[+06:06,cutover=1970-01-12T13:46:39.992Z,mdfw=6]", string0); } @Test(timeout = 4000) public void test58() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); String string0 = gJChronology0.toString(); assertEquals("GJChronology[UTC]", string0); } @Test(timeout = 4000) public void test59() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); GJChronology gJChronology1 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0, 3); boolean boolean0 = gJChronology0.equals(gJChronology1); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertFalse(boolean0); } @Test(timeout = 4000) public void test60() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, 167L, 1); GJChronology gJChronology1 = GJChronology.getInstance(); boolean boolean0 = gJChronology0.equals(gJChronology1); assertEquals(4, gJChronology1.getMinimumDaysInFirstWeek()); assertEquals(1, gJChronology0.getMinimumDaysInFirstWeek()); assertFalse(boolean0); } @Test(timeout = 4000) public void test61() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); Object object0 = new Object(); boolean boolean0 = gJChronology0.equals(object0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertFalse(boolean0); } @Test(timeout = 4000) public void test62() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forTimeZone((TimeZone) null); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0); boolean boolean0 = gJChronology0.equals(gJChronology0); assertTrue(boolean0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test63() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); GJChronology gJChronology1 = GJChronology.getInstance(); boolean boolean0 = gJChronology1.equals(gJChronology0); assertFalse(boolean0); assertEquals(4, gJChronology1.getMinimumDaysInFirstWeek()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test64() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); DateTime dateTime0 = null; try { dateTime0 = new DateTime((-447), 2, 1646, 637, 3, gJChronology0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 637 for hourOfDay must be in the range [0,23] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test65() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); try { gJChronology0.getDateTimeMillis((int) (byte)29, (int) (byte)2, (int) (byte)29, (int) (byte)2, 1, 3, 3); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 29 for dayOfMonth must be in the range [1,28] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test66() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); DateTime dateTime0 = null; try { dateTime0 = new DateTime(1, 1, 260, 1, (-2450), gJChronology0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value -2450 for minuteOfHour must be in the range [0,59] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test67() throws Throwable { DateTime dateTime0 = new DateTime(1, 1, 1, 1, 1, 1, 1); GJChronology gJChronology0 = GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); long long0 = gJChronology0.getDateTimeMillis(1, 1, 1, 3661001); assertEquals((-62135593138999L), long0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test68() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); YearMonth yearMonth0 = new YearMonth((-12219292799987L), (Chronology) gJChronology0); // Undeclared exception! try { yearMonth0.toLocalDate(6); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Specified date does not exist // verifyException("org.joda.time.chrono.GJChronology", e); } } @Test(timeout = 4000) public void test69() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); gJChronology0.withZone((DateTimeZone) null); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test70() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetMillis(2837); // Undeclared exception! try { GJChronology.getInstance(dateTimeZone0, (-12219292800000L), (-2230)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid min days in first week: -2230 // verifyException("org.joda.time.chrono.JulianChronology", e); } } @Test(timeout = 4000) public void test71() throws Throwable { LocalDate localDate0 = new LocalDate(); LocalDate localDate1 = localDate0.withYearOfEra(292278993); GJChronology gJChronology0 = GJChronology.getInstance(); DateTimeZone dateTimeZone0 = gJChronology0.getZone(); DateTime dateTime0 = localDate1.toDateTimeAtStartOfDay(dateTimeZone0); // Undeclared exception! try { GJChronology.getInstance((DateTimeZone) null, (ReadableInstant) dateTime0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 292278994 for weekyear must be in the range [-292275054,292278993] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test72() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); Period period0 = new Period(31083597720000L, (-61220447999999L), gJChronology0); long long0 = gJChronology0.add((ReadablePeriod) period0, (-12219292800000L), 85); assertEquals((-7858183534199915L), long0); } @Test(timeout = 4000) public void test73() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstance(); LocalDateTime localDateTime0 = new LocalDateTime((-12219292800000L), (Chronology) gJChronology0); Days days0 = Days.daysBetween((ReadablePartial) localDateTime0, (ReadablePartial) localDateTime0); MutablePeriod mutablePeriod0 = days0.toMutablePeriod(); int[] intArray0 = gJChronology0.get((ReadablePeriod) mutablePeriod0, 0L, (-1012L)); assertArrayEquals(new int[] {0, 0, 0, 0, 0, 0, (-1), (-12)}, intArray0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test74() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); LenientChronology lenientChronology0 = LenientChronology.getInstance(gJChronology0); DateTime dateTime0 = new DateTime((-4015), 2842, 11, 2842, (-491), lenientChronology0); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals((-181357308660000L), dateTime0.getMillis()); } @Test(timeout = 4000) public void test75() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetMillis((-2831)); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) null); MonthDay monthDay0 = new MonthDay((Object) null, gJChronology0); MonthDay monthDay1 = monthDay0.minusDays((-2831)); assertEquals(11, monthDay1.getMonthOfYear()); assertEquals(15, monthDay1.getDayOfMonth()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test76() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC(); DateTimeZone dateTimeZone0 = buddhistChronology0.getZone(); LocalDate localDate0 = new LocalDate((long) 1, (Chronology) buddhistChronology0); DateTime dateTime0 = localDate0.toDateTimeAtStartOfDay(); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, (ReadableInstant) dateTime0); // Undeclared exception! try { gJChronology0.gregorianToJulianByWeekyear(31536000000L); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Value 53 for weekOfWeekyear must be in the range [1,52] // verifyException("org.joda.time.field.FieldUtils", e); } } @Test(timeout = 4000) public void test77() throws Throwable { DateTimeZone dateTimeZone0 = DateTimeZone.forTimeZone((TimeZone) null); GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0); gJChronology0.hashCode(); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } @Test(timeout = 4000) public void test78() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); YearMonth yearMonth0 = new YearMonth(9223372036854775807L, (Chronology) gJChronology0); yearMonth0.withYear(8); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); assertEquals(292278994, yearMonth0.getYear()); } @Test(timeout = 4000) public void test79() throws Throwable { GJChronology gJChronology0 = GJChronology.getInstanceUTC(); LocalDateTime localDateTime0 = new LocalDateTime((-12219292800002L), (Chronology) gJChronology0); LocalDateTime localDateTime1 = localDateTime0.withWeekyear(73281320); DateTime dateTime0 = localDateTime1.toDateTime(); assertEquals(2312472954441599998L, dateTime0.getMillis()); assertEquals(4, gJChronology0.getMinimumDaysInFirstWeek()); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
0efbadddb8a44beab2bb676c1fa469cdbd3aa8f0
4d0b380489fcf39a783bb6de9513c5737d86f803
/src/java/tindd/servlet/HomeServlet.java
e1fa6f9bdb814ddbbafba03fd2cfe70595f508e0
[]
no_license
dtin/MiniSocialNetwork
cfe897d9c7efd3c49d6be7d0d2b6833baf9389e5
67cae06b22a2db07d28d48ebbda868881e3af135
refs/heads/master
2023-01-20T11:23:22.967637
2020-12-01T11:52:47
2020-12-01T11:52:47
317,270,481
0
0
null
null
null
null
UTF-8
Java
false
false
6,795
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 tindd.servlet; import java.io.IOException; import java.io.PrintWriter; import java.sql.SQLException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.naming.NamingException; import javax.servlet.RequestDispatcher; 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 javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import tindd.notification.StandardNotification; import tindd.post.StandardHomePost; import tindd.tblNotifications.TblNotificationsDAO; import tindd.tblUsers.TblUsersDAO; import tindd.tblUsers.TblUsersDTO; import tindd.tblPosts.TblPostsDAO; import tindd.tblPosts.TblPostsDTO; /** * * @author Tin */ @WebServlet(name = "HomeServlet", urlPatterns = {"/HomeServlet"}) public class HomeServlet extends HttpServlet { private final Logger LOGGER = Logger.getLogger(HomeServlet.class); private final String HOME_PAGE = "homePage.jsp"; private final String LOGIN_PAGE = "login.html"; private final int MAX_POSTS = 20; private final int MAX_NOTIFICATION = 30; private List<StandardHomePost> postsList = null; private final String DATE_FORMAT_PARTERN = "EEE, dd MM, yyyy HH:mm:ss"; /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); HttpSession session = request.getSession(false); String url = LOGIN_PAGE; try { if (session != null) { TblUsersDTO userDTO = (TblUsersDTO) session.getAttribute("ACCOUNT_INFO"); if (userDTO != null) { url = HOME_PAGE; TblPostsDAO postsDAO = new TblPostsDAO(); TblNotificationsDAO notificationsDAO = new TblNotificationsDAO(); request.setAttribute("FULL_NAME", userDTO.getName()); //Get userId of this current user sign in String currentUserId = userDTO.getEmail(); request.setAttribute("USER_EMAIL", currentUserId); //Get notification for current user notificationsDAO.getAllNotifications(MAX_NOTIFICATION, currentUserId); List<StandardNotification> notiList = notificationsDAO.getListNotification(); request.setAttribute("NOTI_LIST", notiList); //Try to get 20 newest post boolean result = postsDAO.getNewestPosts(MAX_POSTS); if(result) { //Get raw posts (Without other informations) List<TblPostsDTO> rawPosts = postsDAO.getPosts(); postsList = new ArrayList<>(); TblUsersDAO usersDAO = new TblUsersDAO(); DateFormat simple = new SimpleDateFormat(DATE_FORMAT_PARTERN); Date millis = null; for (TblPostsDTO post : rawPosts) { String userPostId = post.getUserPostId(); StandardHomePost sdHomePost = new StandardHomePost(); //Set postDTO for StandardHomePost sdHomePost.setPostsDTO(post); //Get full name of the one who post String userFullName = usersDAO.getUserFullName(userPostId); sdHomePost.setUserFullName(userFullName); //Get full time in format millis = new Date(post.getCreatedAt()); sdHomePost.setCreatedAtFull(simple.format(millis)); postsList.add(sdHomePost); } } } } } catch (SQLException ex) { LOGGER.error("SQLException: " + ex.getMessage()); } catch (NamingException ex) { LOGGER.error("NamingException: " + ex.getMessage()); } finally { if(postsList != null) { request.setAttribute("POSTS_LIST", postsList); } RequestDispatcher rd = request.getRequestDispatcher(url); rd.forward(request, response); out.close(); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "damdongtin@gmail.com" ]
damdongtin@gmail.com
7aa154b945f9c5e7f7b40fc0fd627655460f8169
9b8beb762d4ba3f9a902c649ee5e9ea7b097097b
/src/java/main/com/conferma/cpapi/AdvancedJourney.java
e58c953174999eac95182720c887c60d676d1c98
[]
no_license
assertis/conferma-connector
14f5b2dfcef83931b16ebf6e35e01e084658e49c
90de591171be1841c021e1764131c0ad1fff675c
refs/heads/master
2020-04-10T16:55:19.753578
2017-07-11T09:32:00
2017-07-11T09:32:00
3,386,971
0
0
null
2017-06-29T10:15:03
2012-02-08T12:25:07
Java
UTF-8
Java
false
false
8,656
java
/* * XML Type: AdvancedJourney * Namespace: http://cpapi.conferma.com/ * Java type: com.conferma.cpapi.AdvancedJourney * * Automatically generated - do not modify. */ package com.conferma.cpapi; /** * An XML AdvancedJourney(@http://cpapi.conferma.com/). * * This is a complex type. */ public interface AdvancedJourney extends com.conferma.cpapi.Journey { public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType) org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AdvancedJourney.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s4840EABFCCE2902204A6F8C9414298CB").resolveHandle("advancedjourney518ftype"); /** * Gets the "Operator" element */ com.conferma.cpapi.Operator getOperator(); /** * True if has "Operator" element */ boolean isSetOperator(); /** * Sets the "Operator" element */ void setOperator(com.conferma.cpapi.Operator operator); /** * Appends and returns a new empty "Operator" element */ com.conferma.cpapi.Operator addNewOperator(); /** * Unsets the "Operator" element */ void unsetOperator(); /** * Gets the "Ticket" element */ com.conferma.cpapi.Ticket getTicket(); /** * True if has "Ticket" element */ boolean isSetTicket(); /** * Sets the "Ticket" element */ void setTicket(com.conferma.cpapi.Ticket ticket); /** * Appends and returns a new empty "Ticket" element */ com.conferma.cpapi.Ticket addNewTicket(); /** * Unsets the "Ticket" element */ void unsetTicket(); /** * A factory class with static methods for creating instances * of this type. */ public static final class Factory { public static com.conferma.cpapi.AdvancedJourney newInstance() { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); } public static com.conferma.cpapi.AdvancedJourney newInstance(org.apache.xmlbeans.XmlOptions options) { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); } /** @param xmlAsString the string value to parse */ public static com.conferma.cpapi.AdvancedJourney parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); } /** @param file the file from which to load an xml document */ public static com.conferma.cpapi.AdvancedJourney parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); } public static com.conferma.cpapi.AdvancedJourney parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); } public static com.conferma.cpapi.AdvancedJourney parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); } public static com.conferma.cpapi.AdvancedJourney parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); } public static com.conferma.cpapi.AdvancedJourney parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); } public static com.conferma.cpapi.AdvancedJourney parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); } public static com.conferma.cpapi.AdvancedJourney parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static com.conferma.cpapi.AdvancedJourney parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static com.conferma.cpapi.AdvancedJourney parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (com.conferma.cpapi.AdvancedJourney) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); } private Factory() { } // No instance of this class allowed } }
[ "dan@rectangularsoftware.com" ]
dan@rectangularsoftware.com
a563f8da1906298f2ae42f5073fd375c39f98fe7
fdbeff09a3c8b6f0a45906438b377044b3657d9e
/TP5/src/tp5_v2/PotionMagique.java
107103d0c415f000e553a059a9fd1bbcd8ae58b9
[]
no_license
remi-depellegrin/TP_Pokemons
b0c41ca97f58b91f41f40279a25bb3848340cff9
0efa246c5ebf761f86980c23e8c11da50a1fc45d
refs/heads/main
2023-03-28T16:36:07.027645
2021-04-08T16:45:54
2021-04-08T16:45:54
355,982,830
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package tp5_v2; public class PotionMagique extends Nourriture { public PotionMagique(String nom, int frequence) { super(0, nom, tousLesTypesDePokemon, frequence); } @Override public PotionMagique genererMemeNourriture(boolean generer) { if(generer) return new PotionMagique(this.nom, this.frequence); else return null; } @Override public void estMangee(Pokemons pokemon) { if(pokemon != null) { pokemon.setNiveau(pokemon.getNiveau() +1); } } public String toString() { String compatibilites = "{"; for(int i = 0; i<this.compatibilites.length-1; i++) { compatibilites += this.compatibilites[i] + ", "; } compatibilites += this.compatibilites[this.compatibilites.length-1]; return ("Potion Magique : " + this.nom + ", 0, " + this.frequence + "/100, " + compatibilites + "}" ) ; } }
[ "remi.de-pellegrin@etu.unilim.fr" ]
remi.de-pellegrin@etu.unilim.fr
7f6787a54d5dc373725e0f982bcca4a2f73f3a30
61602d4b976db2084059453edeafe63865f96ec5
/com/alipay/android/phone/mrpc/core/l.java
a8f23db22a6ef2a1f83f44550e38ad9b2e75592d
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
4,974
java
package com.alipay.android.phone.mrpc.core; import android.content.Context; import anet.channel.strategy.dispatch.DispatchConstants; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy; import java.util.concurrent.TimeUnit; public final class l implements ab { private static l b; private static final ThreadFactory i = new n(); Context a; private ThreadPoolExecutor c = new ThreadPoolExecutor(10, 11, 3, TimeUnit.SECONDS, new ArrayBlockingQueue(20), i, new CallerRunsPolicy()); private b d = b.a(DispatchConstants.ANDROID); private long e; private long f; private long g; private int h; private l(android.content.Context r10) { /* JADX: method processing error */ /* Error: java.lang.NullPointerException at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75) at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45) at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63) at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.ProcessClass.process(ProcessClass.java:37) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306) at jadx.api.JavaClass.decompile(JavaClass.java:62) */ /* r9 = this; r9.<init>(); r9.a = r10; r10 = "android"; r10 = com.alipay.android.phone.mrpc.core.b.a(r10); r9.d = r10; r10 = new java.util.concurrent.ThreadPoolExecutor; r5 = java.util.concurrent.TimeUnit.SECONDS; r6 = new java.util.concurrent.ArrayBlockingQueue; r0 = 20; r6.<init>(r0); r7 = i; r8 = new java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy; r8.<init>(); r1 = 10; r2 = 11; r3 = 3; r0 = r10; r0.<init>(r1, r2, r3, r5, r6, r7, r8); r9.c = r10; r10 = 1; r0 = r9.c; Catch:{ Exception -> 0x0031 } r0.allowCoreThreadTimeOut(r10); Catch:{ Exception -> 0x0031 } L_0x0031: r0 = r9.a; android.webkit.CookieSyncManager.createInstance(r0); r0 = android.webkit.CookieManager.getInstance(); r0.setAcceptCookie(r10); return; */ throw new UnsupportedOperationException("Method not decompiled: com.alipay.android.phone.mrpc.core.l.<init>(android.content.Context):void"); } public static final l a(Context context) { return b != null ? b : b(context); } private static final synchronized l b(Context context) { synchronized (l.class) { if (b != null) { l lVar = b; return lVar; } l lVar2 = new l(context); b = lVar2; return lVar2; } } public final b a() { return this.d; } public final Future<u> a(t tVar) { if (s.a(this.a)) { StringBuilder stringBuilder = new StringBuilder("HttpManager"); stringBuilder.append(hashCode()); stringBuilder.append(": Active Task = %d, Completed Task = %d, All Task = %d,Avarage Speed = %d KB/S, Connetct Time = %d ms, All data size = %d bytes, All enqueueConnect time = %d ms, All socket time = %d ms, All request times = %d times"); String stringBuilder2 = stringBuilder.toString(); Object[] objArr = new Object[9]; objArr[0] = Integer.valueOf(this.c.getActiveCount()); objArr[1] = Long.valueOf(this.c.getCompletedTaskCount()); objArr[2] = Long.valueOf(this.c.getTaskCount()); long j = 0; objArr[3] = Long.valueOf(this.g == 0 ? 0 : ((this.e * 1000) / this.g) >> 10); if (this.h != 0) { j = this.f / ((long) this.h); } objArr[4] = Long.valueOf(j); objArr[5] = Long.valueOf(this.e); objArr[6] = Long.valueOf(this.f); objArr[7] = Long.valueOf(this.g); objArr[8] = Integer.valueOf(this.h); String.format(stringBuilder2, objArr); } Object qVar = new q(this, (o) tVar); Object mVar = new m(this, qVar, qVar); this.c.execute(mVar); return mVar; } public final void a(long j) { this.e += j; } public final void b(long j) { this.f += j; this.h++; } public final void c(long j) { this.g += j; } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
8214a493ea668d1ad94e9d210d8b3b07bc643cd8
c6c009f7cc639ab421f27e41c0ac5ab695e33120
/tests/edu/cnm/deepdive/WarmupIn3050Test.java
83b26dd12c41140ab44b70157e84cb9fb7aa9756
[]
no_license
anhristian/coding-bat-warmup-1
d854ad1d62c7de9c1da1cfd67e1eaa942220552b
188eb0802d78dce89584a7405c7956937eecbfb4
refs/heads/master
2022-12-17T11:34:23.718866
2020-09-15T03:04:45
2020-09-15T03:04:45
288,290,159
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
package edu.cnm.deepdive; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvFileSource; class WarmupIn3050Test { @ParameterizedTest(name = "[{index}] a = 0, b = 1, expected = 2") @CsvFileSource(resources = "in3050.csv", numLinesToSkip = 1) void in3050(int a, int b, boolean expected) { WarmupIn3050 warmupIn3050 = new WarmupIn3050(); boolean actual = warmupIn3050.in3050(a, b); assertEquals(actual, expected); } }
[ "an.hristian@gmail.com" ]
an.hristian@gmail.com
c7d7444be138e9bedd0fb6c8293d238d11a9b643
b081112f65209cd1cd008af1019ac2789a1ef8d2
/src/test/java/com/github/alxbel/sia2/ch1/knight/KnightOfTheRoundTableTest.java
662263d80a11c5e1d783ff25aa2fcaaf1c4da99f
[]
no_license
alxbel/sia2-ch1-knight
7ad796965a317f228133ed785010b3667c7f55f4
09d64ba9c2e59135d5f788d8f41c4ac3ccbf4887
refs/heads/master
2022-12-29T14:21:09.021887
2020-05-07T20:18:04
2020-05-07T20:18:04
262,113,045
0
0
null
2020-10-13T21:49:22
2020-05-07T17:16:50
Java
UTF-8
Java
false
false
702
java
package com.github.alxbel.sia2.ch1.knight; import com.github.alxbel.sia2.ch1.knight.exception.QuestFailedException; import com.github.alxbel.sia2.ch1.knight.model.impl.HolyGrail; import com.github.alxbel.sia2.ch1.knight.model.impl.KnightOfTheRoundTable; import junit.framework.TestCase; import org.junit.Ignore; import org.junit.Test; public class KnightOfTheRoundTableTest extends TestCase { public void testEmbarkOnQuest() throws QuestFailedException { // KnightOfTheRoundTable knight = // new KnightOfTheRoundTable("Bedivere"); // HolyGrail grail = (HolyGrail) knight.embarkOnQuest(); // assertNotNull(grail); // assertTrue(grail.isHoly()); } }
[ "pm.alexbel@gmail.com" ]
pm.alexbel@gmail.com
e94ce551cbdcf055d10a4faf6e539caca7cbec72
73e95c2e7ebddc5255a3f5c692e8e1e25c166ff9
/CalendarApp/src/test/java/com/db/validator/ValidatorTest.java
ff66f9b84e24fe9a0bdc186de12fcd5e43a631ca
[]
no_license
sanjeetck/jprojects
89afd7e979d483429fb3673462450bacf1a69aa2
a194a306ca0161b7832a40082965e5226f5959e2
refs/heads/master
2022-12-26T19:42:20.389278
2020-07-31T14:34:02
2020-07-31T14:34:02
281,483,019
0
0
null
2020-10-14T00:05:07
2020-07-21T19:12:27
Java
UTF-8
Java
false
false
578
java
package com.db.validator; import com.db.model.DBDate; import org.junit.Test; import static org.junit.Assert.assertTrue; /** * Unit test for Validator. */ public class ValidatorTest { Validator validate = new Validator(); @Test public void testInvalidDate() { String strDate = "23-01-190 06:05:49 am"; assertTrue("Invalid", validate.validateDate(strDate) == false); } @Test public void testValidDate() { String strDate = "23-01-1900 06:05:49 am"; assertTrue("Valid", validate.validateDate(strDate) == true); } }
[ "sanjeetck@gmail.com" ]
sanjeetck@gmail.com
3c031363370b274b0f9bba0dc2344aed1035c0a7
b752757fe2fe91eef82b536b00d3f6542771d0a9
/twocultures/easemob/src/main/java/com/twoculture/easemob/ui/MainActivity.java
b3bd09357c28ebaeab2c94a34ad41e081c64dedb
[]
no_license
rainbowr55/2cultures
aec294f9994e0f2e19a0f2732812805acf465cc0
c237912a936602ee2cdd71772c37994c937e396a
refs/heads/master
2021-01-22T19:09:43.692137
2017-01-03T15:31:12
2017-01-03T15:31:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
18,515
java
/** * Copyright (C) 2016 Hyphenate Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.twoculture.easemob.ui; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.PowerManager; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v4.content.LocalBroadcastManager; import android.view.KeyEvent; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.hyphenate.EMCallBack; import com.hyphenate.EMContactListener; import com.hyphenate.EMMessageListener; import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMCmdMessageBody; import com.hyphenate.chat.EMConversation; import com.hyphenate.chat.EMConversation.EMConversationType; import com.hyphenate.chat.EMMessage; import com.hyphenate.easeui.utils.EaseCommonUtils; import com.hyphenate.util.EMLog; import com.twoculture.easemob.Constant; import com.twoculture.easemob.DemoHelper; import com.twoculture.easemob.R; import com.twoculture.easemob.db.InviteMessgeDao; import com.twoculture.easemob.db.UserDao; import com.twoculture.easemob.runtimepermissions.PermissionsManager; import com.twoculture.easemob.runtimepermissions.PermissionsResultAction; import java.util.List; @SuppressLint("NewApi") public class MainActivity extends BaseActivity { protected static final String TAG = "MainActivity"; // textview for unread message count private TextView unreadLabel; // textview for unread event message private TextView unreadAddressLable; private Button[] mTabs; private ContactListFragment contactListFragment; private Fragment[] fragments; private int index; private int currentTabIndex; // user logged into another device public boolean isConflict = false; // user account was removed private boolean isCurrentAccountRemoved = false; /** * check if current user account was remove */ public boolean getCurrentAccountRemoved() { return isCurrentAccountRemoved; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { String packageName = getPackageName(); PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); if (!pm.isIgnoringBatteryOptimizations(packageName)) { Intent intent = new Intent(); intent.setAction(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS); intent.setData(Uri.parse("package:" + packageName)); startActivity(intent); } } //make sure activity will not in background if user is logged into another device or removed if (savedInstanceState != null && savedInstanceState.getBoolean(Constant.ACCOUNT_REMOVED, false)) { DemoHelper.getInstance().logout(false,null); finish(); startActivity(new Intent(this, LoginActivity.class)); return; } else if (savedInstanceState != null && savedInstanceState.getBoolean("isConflict", false)) { finish(); startActivity(new Intent(this, LoginActivity.class)); return; } setContentView(R.layout.em_activity_main); // runtime permission for android 6.0, just require all permissions here for simple requestPermissions(); initView(); //umeng api // MobclickAgent.updateOnlineConfig(this); // UmengUpdateAgent.setUpdateOnlyWifi(false); // UmengUpdateAgent.update(this); showExceptionDialogFromIntent(getIntent()); inviteMessgeDao = new InviteMessgeDao(this); UserDao userDao = new UserDao(this); conversationListFragment = new ConversationListFragment(); contactListFragment = new ContactListFragment(); SettingsFragment settingFragment = new SettingsFragment(); fragments = new Fragment[] { conversationListFragment, contactListFragment, settingFragment}; getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, conversationListFragment) .add(R.id.fragment_container, contactListFragment).hide(contactListFragment).show(conversationListFragment) .commit(); //register broadcast receiver to receive the change of group from DemoHelper registerBroadcastReceiver(); EMClient.getInstance().contactManager().setContactListener(new MyContactListener()); //debug purpose only registerInternalDebugReceiver(); } @TargetApi(23) private void requestPermissions() { PermissionsManager.getInstance().requestAllManifestPermissionsIfNecessary(this, new PermissionsResultAction() { @Override public void onGranted() { // Toast.makeText(MainActivity.this, "All permissions have been granted", Toast.LENGTH_SHORT).show(); } @Override public void onDenied(String permission) { //Toast.makeText(MainActivity.this, "Permission " + permission + " has been denied", Toast.LENGTH_SHORT).show(); } }); } /** * init views */ private void initView() { unreadLabel = (TextView) findViewById(R.id.unread_msg_number); unreadAddressLable = (TextView) findViewById(R.id.unread_address_number); mTabs = new Button[3]; mTabs[0] = (Button) findViewById(R.id.btn_conversation); mTabs[1] = (Button) findViewById(R.id.btn_address_list); mTabs[2] = (Button) findViewById(R.id.btn_setting); // select first tab mTabs[0].setSelected(true); } /** * on tab clicked * * @param view */ public void onTabClicked(View view) { int i = view.getId(); if (i == R.id.btn_conversation) { index = 0; } else if (i == R.id.btn_address_list) { index = 1; } else if (i == R.id.btn_setting) { index = 2; } if (currentTabIndex != index) { FragmentTransaction trx = getSupportFragmentManager().beginTransaction(); trx.hide(fragments[currentTabIndex]); if (!fragments[index].isAdded()) { trx.add(R.id.fragment_container, fragments[index]); } trx.show(fragments[index]).commit(); } mTabs[currentTabIndex].setSelected(false); // set current tab selected mTabs[index].setSelected(true); currentTabIndex = index; } EMMessageListener messageListener = new EMMessageListener() { @Override public void onMessageReceived(List<EMMessage> messages) { // notify new message for (EMMessage message : messages) { DemoHelper.getInstance().getNotifier().onNewMsg(message); } refreshUIWithMessage(); } @Override public void onCmdMessageReceived(List<EMMessage> messages) { //red packet code : 处理红包回执透传消息 for (EMMessage message : messages) { EMCmdMessageBody cmdMsgBody = (EMCmdMessageBody) message.getBody(); final String action = cmdMsgBody.action();//获取自定义action // if (action.equals(RPConstant.REFRESH_GROUP_RED_PACKET_ACTION)) { // RedPacketUtil.receiveRedPacketAckMessage(message); // } } //end of red packet code refreshUIWithMessage(); } @Override public void onMessageReadAckReceived(List<EMMessage> messages) { } @Override public void onMessageDeliveryAckReceived(List<EMMessage> message) { } @Override public void onMessageChanged(EMMessage message, Object change) {} }; private void refreshUIWithMessage() { runOnUiThread(new Runnable() { public void run() { // refresh unread count updateUnreadLabel(); if (currentTabIndex == 0) { // refresh conversation list if (conversationListFragment != null) { conversationListFragment.refresh(); } } } }); } @Override public void back(View view) { super.back(view); } private void registerBroadcastReceiver() { broadcastManager = LocalBroadcastManager.getInstance(this); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Constant.ACTION_CONTACT_CHANAGED); intentFilter.addAction(Constant.ACTION_GROUP_CHANAGED); // intentFilter.addAction(RPConstant.REFRESH_GROUP_RED_PACKET_ACTION); broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { updateUnreadLabel(); updateUnreadAddressLable(); if (currentTabIndex == 0) { // refresh conversation list if (conversationListFragment != null) { conversationListFragment.refresh(); } } else if (currentTabIndex == 1) { if(contactListFragment != null) { contactListFragment.refresh(); } } String action = intent.getAction(); if(action.equals(Constant.ACTION_GROUP_CHANAGED)){ if (EaseCommonUtils.getTopActivity(MainActivity.this).equals(GroupsActivity.class.getName())) { GroupsActivity.instance.onResume(); } } //red packet code : 处理红包回执透传消息 // if (action.equals(RPConstant.REFRESH_GROUP_RED_PACKET_ACTION)){ // if (conversationListFragment != null){ // conversationListFragment.refresh(); // } // } //end of red packet code } }; broadcastManager.registerReceiver(broadcastReceiver, intentFilter); } public class MyContactListener implements EMContactListener { @Override public void onContactAdded(String username) {} @Override public void onContactDeleted(final String username) { runOnUiThread(new Runnable() { public void run() { if (ChatActivity.activityInstance != null && ChatActivity.activityInstance.toChatUsername != null && username.equals(ChatActivity.activityInstance.toChatUsername)) { String st10 = getResources().getString(R.string.have_you_removed); Toast.makeText(MainActivity.this, ChatActivity.activityInstance.getToChatUsername() + st10, Toast.LENGTH_LONG) .show(); ChatActivity.activityInstance.finish(); } } }); } @Override public void onContactInvited(String username, String reason) {} @Override public void onContactAgreed(String username) {} @Override public void onContactRefused(String username) {} } private void unregisterBroadcastReceiver(){ broadcastManager.unregisterReceiver(broadcastReceiver); } @Override protected void onDestroy() { super.onDestroy(); if (exceptionBuilder != null) { exceptionBuilder.create().dismiss(); exceptionBuilder = null; isExceptionDialogShow = false; } unregisterBroadcastReceiver(); try { unregisterReceiver(internalDebugReceiver); } catch (Exception e) { } } /** * update unread message count */ public void updateUnreadLabel() { int count = getUnreadMsgCountTotal(); if (count > 0) { unreadLabel.setText(String.valueOf(count)); unreadLabel.setVisibility(View.VISIBLE); } else { unreadLabel.setVisibility(View.INVISIBLE); } } /** * update the total unread count */ public void updateUnreadAddressLable() { runOnUiThread(new Runnable() { public void run() { int count = getUnreadAddressCountTotal(); if (count > 0) { unreadAddressLable.setVisibility(View.VISIBLE); } else { unreadAddressLable.setVisibility(View.INVISIBLE); } } }); } /** * get unread event notification count, including application, accepted, etc * * @return */ public int getUnreadAddressCountTotal() { int unreadAddressCountTotal = 0; unreadAddressCountTotal = inviteMessgeDao.getUnreadMessagesCount(); return unreadAddressCountTotal; } /** * get unread message count * * @return */ public int getUnreadMsgCountTotal() { int unreadMsgCountTotal = 0; int chatroomUnreadMsgCount = 0; unreadMsgCountTotal = EMClient.getInstance().chatManager().getUnreadMsgsCount(); for(EMConversation conversation:EMClient.getInstance().chatManager().getAllConversations().values()){ if(conversation.getType() == EMConversationType.ChatRoom) chatroomUnreadMsgCount=chatroomUnreadMsgCount+conversation.getUnreadMsgCount(); } return unreadMsgCountTotal-chatroomUnreadMsgCount; } private InviteMessgeDao inviteMessgeDao; @Override protected void onResume() { super.onResume(); if (!isConflict && !isCurrentAccountRemoved) { updateUnreadLabel(); updateUnreadAddressLable(); } // unregister this event listener when this activity enters the // background DemoHelper sdkHelper = DemoHelper.getInstance(); sdkHelper.pushActivity(this); EMClient.getInstance().chatManager().addMessageListener(messageListener); } @Override protected void onStop() { EMClient.getInstance().chatManager().removeMessageListener(messageListener); DemoHelper sdkHelper = DemoHelper.getInstance(); sdkHelper.popActivity(this); super.onStop(); } @Override protected void onSaveInstanceState(Bundle outState) { outState.putBoolean("isConflict", isConflict); outState.putBoolean(Constant.ACCOUNT_REMOVED, isCurrentAccountRemoved); super.onSaveInstanceState(outState); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { moveTaskToBack(false); return true; } return super.onKeyDown(keyCode, event); } private android.app.AlertDialog.Builder exceptionBuilder; private boolean isExceptionDialogShow = false; private BroadcastReceiver internalDebugReceiver; private ConversationListFragment conversationListFragment; private BroadcastReceiver broadcastReceiver; private LocalBroadcastManager broadcastManager; private int getExceptionMessageId(String exceptionType) { if(exceptionType.equals(Constant.ACCOUNT_CONFLICT)) { return R.string.connect_conflict; } else if (exceptionType.equals(Constant.ACCOUNT_REMOVED)) { return R.string.em_user_remove; } else if (exceptionType.equals(Constant.ACCOUNT_FORBIDDEN)) { return R.string.user_forbidden; } return R.string.Network_error; } /** * show the dialog when user met some exception: such as login on another device, user removed or user forbidden */ private void showExceptionDialog(String exceptionType) { isExceptionDialogShow = true; DemoHelper.getInstance().logout(false,null); String st = getResources().getString(R.string.Logoff_notification); if (!MainActivity.this.isFinishing()) { // clear up global variables try { if (exceptionBuilder == null) exceptionBuilder = new android.app.AlertDialog.Builder(MainActivity.this); exceptionBuilder.setTitle(st); exceptionBuilder.setMessage(getExceptionMessageId(exceptionType)); exceptionBuilder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); exceptionBuilder = null; isExceptionDialogShow = false; finish(); Intent intent = new Intent(MainActivity.this, LoginActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }); exceptionBuilder.setCancelable(false); exceptionBuilder.create().show(); isConflict = true; } catch (Exception e) { EMLog.e(TAG, "---------color conflictBuilder error" + e.getMessage()); } } } private void showExceptionDialogFromIntent(Intent intent) { EMLog.e(TAG, "showExceptionDialogFromIntent"); if (!isExceptionDialogShow && intent.getBooleanExtra(Constant.ACCOUNT_CONFLICT, false)) { showExceptionDialog(Constant.ACCOUNT_CONFLICT); } else if (!isExceptionDialogShow && intent.getBooleanExtra(Constant.ACCOUNT_REMOVED, false)) { showExceptionDialog(Constant.ACCOUNT_REMOVED); } else if (!isExceptionDialogShow && intent.getBooleanExtra(Constant.ACCOUNT_FORBIDDEN, false)) { showExceptionDialog(Constant.ACCOUNT_FORBIDDEN); } } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); showExceptionDialogFromIntent(intent); } /** * debug purpose only, you can ignore this */ private void registerInternalDebugReceiver() { internalDebugReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { DemoHelper.getInstance().logout(false,new EMCallBack() { @Override public void onSuccess() { runOnUiThread(new Runnable() { public void run() { finish(); startActivity(new Intent(MainActivity.this, LoginActivity.class)); } }); } @Override public void onProgress(int progress, String status) {} @Override public void onError(int code, String message) {} }); } }; IntentFilter filter = new IntentFilter(getPackageName() + ".em_internal_debug"); registerReceiver(internalDebugReceiver, filter); } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { PermissionsManager.getInstance().notifyPermissionsChange(permissions, grantResults); } }
[ "rainbowr55@126.com" ]
rainbowr55@126.com
7f55f56a87385f35e95edf81518fe77240383ad7
f463b3f412563c869b43aef9507daaf85cc08e92
/src/entidades/Post.java
dd187e6d316c4b53f4f64823e7e0737e954c0baf
[]
no_license
filipefscampos/StringBuilder
f6e375750cbad054d6db89a1ed262d76c9b34e61
e5507606f8001929b11c50e49b2dc36aa401eccb
refs/heads/main
2023-09-05T02:10:55.899896
2021-10-09T11:09:37
2021-10-09T11:09:37
415,276,636
0
0
null
2021-10-09T11:09:37
2021-10-09T10:29:50
null
ISO-8859-1
Java
false
false
1,903
java
package entidades; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class Post { private static SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyy HH:mm:ss"); private Date momentoDoPost; private String titulo; private String conteudo; private Integer likes; private List<Comentario> comentarios = new ArrayList<>(); public Post() { } public Post(Date momentoDoPost, String titulo, String conteudo, Integer likes) { this.momentoDoPost = momentoDoPost; this.titulo = titulo; this.conteudo = conteudo; this.likes = likes; } public Date getMomentoDoPost() { return momentoDoPost; } public void setMomentoDoPost(Date momentoDoPost) { this.momentoDoPost = momentoDoPost; } public String getTitulo() { return titulo; } public void setTitulo(String titulo) { this.titulo = titulo; } public String getConteudo() { return conteudo; } public void setConteudo(String conteudo) { this.conteudo = conteudo; } public Integer getLikes() { return likes; } public void setLikes(Integer likes) { this.likes = likes; } public List<Comentario> getComentario() { return comentarios; } public void addComentario(Comentario comentario) { comentarios.add(comentario); } public void removeComentario(Comentario comentario) { comentarios.remove(comentario); } //StringBuilder é uma classe que te permite adicionar strings para //uma melhor apresentação, e melhora o uso da memoria @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(titulo + "\n"); sb.append(likes); sb.append(" Likes - "); sb.append(sdf1.format(momentoDoPost) + "\n"); sb.append(conteudo + "\n"); sb.append("Comentario: \n"); for (Comentario c : comentarios) { sb.append(c.getComentario() + "\n"); } return sb.toString(); } }
[ "felipetwo@gmail.com" ]
felipetwo@gmail.com
2e2fe1fbc2569c31a7f215572c2e8b87747da4e1
3150ddf1314a9ec30fb2144ca263670fb1ec33c3
/src/main/java/rest/ActiveAuctionsResource.java
901f8e82cbc958be472a7d298f62cd9bf82dae1d
[]
no_license
andrmos/mod250-auction
afb6c2d5e2556fa9ea8b76c96cac256396768e88
f19ebf84251b16981d36f9725af905028dd44bd6
refs/heads/master
2021-01-13T09:28:42.651172
2016-10-26T10:47:44
2016-10-26T10:47:44
68,708,681
0
0
null
null
null
null
UTF-8
Java
false
false
1,709
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 rest; import boundary.AuctionFacade; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import entities.Auction; import java.util.List; import javax.ejb.EJB; import javax.ws.rs.core.Context; import javax.ws.rs.core.UriInfo; import javax.ws.rs.Produces; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PUT; import javax.ws.rs.core.MediaType; /** * REST Web Service * * @author andre */ @Path("auctions") public class ActiveAuctionsResource { @Context private UriInfo context; public ActiveAuctionsResource() {} @EJB private AuctionFacade auctionFacade; /** * Returns current active auctions in JSON format * * Accessed from: .../mod250_auction/webresources/auctions/active */ @GET @Path("/active") @Produces(MediaType.APPLICATION_JSON) public String getActiveAuctionsJson() { List<Auction> auctionList = auctionFacade.getActiveAuctions(); String json; ObjectMapper mapper = new ObjectMapper(); try { json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(auctionList); } catch (JsonProcessingException e) { json = "Error parsing JSON..."; } return json; } @GET @Path("/active") @Produces(MediaType.APPLICATION_XML) public List<Auction> getActiveAuctionsXml() { return auctionFacade.getActiveAuctions(); } }
[ "mossige.a@gmail.com" ]
mossige.a@gmail.com
0715afbc8ddac798edc7ca7f6b14affed7899860
8da9f6d450179b0bbbab8f7c2ab372064246c315
/src/main/java/programs/learn/hacker/rank/CountingValley.java
bdd7413a2b580a499274410d2b4b77a5ee5c3c18
[]
no_license
saileshgrewal/java
117545c7db916bba125971edd5e5f817e8d8fc0f
f23542f05c67296fe01ccec467babf24291854fc
refs/heads/master
2020-04-24T23:23:23.617025
2019-03-24T17:44:46
2019-03-24T17:44:46
172,342,861
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
package programs.learn.hacker.rank; import java.util.Scanner; public class CountingValley { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n =sc.nextInt(); String str=sc.nextLine(); str=sc.nextLine(); int valleyCounter = 0; int altitude = 0; for (int i = 0; i < n; i++) { char ch = str.charAt(i); if (ch == 'U') { altitude++; if (altitude == 0) { valleyCounter++; } } else { altitude--; } } System.out.println(valleyCounter); sc.close(); } }
[ "Sailesh@DESKTOP-N95E8AK" ]
Sailesh@DESKTOP-N95E8AK
63e0d5ad11ae36112990f1cc548cba74c9ac862b
0142542aad8437825bd69daeb32c9ff6f6a7c2ef
/src/main/java/ru/artemka/demo/hub/dto/HubDto.java
a3a920ed6b27abefbfffe10260b4c552e44a47e0
[]
no_license
artemka13722/Spring-Raspbery-main-server
f58817330c8278fe6ee0d64ae700f5791c7a7a02
2d78d23d721e8e42eee86464e66237ca94bc8fbd
refs/heads/master
2023-04-19T16:42:27.249132
2021-05-07T14:23:56
2021-05-07T14:23:56
365,258,806
0
0
null
null
null
null
UTF-8
Java
false
false
130
java
package ru.artemka.demo.hub.dto; import lombok.Data; @Data public class HubDto { private int id; private String name; }
[ "artemka.skorkin@gmail.com" ]
artemka.skorkin@gmail.com
6e76927d13ae56749bc9cf6e62a135cc6d13512d
cd8843d24154202f92eaf7d6986d05a7266dea05
/saaf-base-5.0/2001_saaf-plm-model/src/main/java/com/sie/watsons/base/product/model/entities/PlmProductHeadtempleEntity_HI.java
b13b05a40ba37cea7b0efe0f113e6340233f6571
[]
no_license
lingxiaoti/tta_system
fbc46c7efc4d408b08b0ebb58b55d2ad1450438f
b475293644bfabba9aeecfc5bd6353a87e8663eb
refs/heads/master
2023-03-02T04:24:42.081665
2021-02-07T06:48:02
2021-02-07T06:48:02
336,717,227
0
0
null
null
null
null
UTF-8
Java
false
false
16,981
java
package com.sie.watsons.base.product.model.entities; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Transient; import javax.persistence.Version; import com.alibaba.fastjson.annotation.JSONField; /** * PlmProductHeadtempleEntity_HI Entity Object Tue Sep 10 09:45:54 CST 2019 Auto * Generate */ @Entity @Table(name = "PLM_PRODUCT_HEADTEMPLE") public class PlmProductHeadtempleEntity_HI { private String templName; // 模板名称 private Integer templeId; private String productShape; private String dayDamage; private String rateClassCode; private String productResource; private String specialLicence; private String uniqueCommodities; private String productCategeery; private String productProperties; private String specialtyProduct; private String dangerousProduct; private String buyingLevel; private String internationProduct; private String posInfo; private String topProduct; private String sesionProduct; private String bluecapProduct; private String motherCompany; private String vcProduct; private String crossborderProduct; private String companyDeletion; private String warehouseResource; private String originCountry; private String unit; private Integer warehousePostDay; private Integer warehouseGetDay; private String powerOb; private String rangOb; private String specialRequier; private String tier; private String productLicense; private String transportStorage; @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date startDate; private Integer versionNum; @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date creationDate; private Integer createdBy; private Integer lastUpdatedBy; @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date lastUpdateDate; private Integer lastUpdateLogin; private Integer operatorUserId; private String salesQty; private String consultProductno; private String consultProductname; private String pricewarProduct; @JSONField(format = "yyyy-MM-dd") private Date consultDate; @JSONField(format = "yyyy-MM-dd") private Date consultEnddate; private String isDiaryproduct; private String productReturn; private String condition; private String allTier; private String tier1; private String tier2; private String tier345; private String storeType; private String tradeZone; private String countUnit; private String pogWays; private String pogDeparment; private String rateClass; private String specialRequierName; private String transportStorageName; private String productLicenseName; private String standardOfUnit; @Column(name = "standard_of_unit", nullable = true, length = 500) public String getStandardOfUnit() { return standardOfUnit; } public void setStandardOfUnit(String standardOfUnit) { this.standardOfUnit = standardOfUnit; } @Column(name = "transport_storage_name", nullable = true, length = 500) public String getTransportStorageName() { return transportStorageName; } public void setTransportStorageName(String transportStorageName) { this.transportStorageName = transportStorageName; } @Column(name = "product_license_name", nullable = true, length = 500) public String getProductLicenseName() { return productLicenseName; } public void setProductLicenseName(String productLicenseName) { this.productLicenseName = productLicenseName; } @Column(name = "special_requier_name", nullable = true, length = 500) public String getSpecialRequierName() { return specialRequierName; } public void setSpecialRequierName(String specialRequierName) { this.specialRequierName = specialRequierName; } @Column(name = "rate_class", nullable = true, length = 255) public String getRateClass() { return rateClass; } public void setRateClass(String rateClass) { this.rateClass = rateClass; } public void setTempleId(Integer templeId) { this.templeId = templeId; } @Column(name = "pog_ways", nullable = true, length = 255) public String getPogWays() { return pogWays; } public void setPogWays(String pogWays) { this.pogWays = pogWays; } @Column(name = "pog_deparment", nullable = true, length = 255) public String getPogDeparment() { return pogDeparment; } public void setPogDeparment(String pogDeparment) { this.pogDeparment = pogDeparment; } @Id @SequenceGenerator(name = "SEQ_PLM_PRODUCT_TEMPLE", sequenceName = "SEQ_PLM_PRODUCT_TEMPLE", allocationSize = 1) @GeneratedValue(generator = "SEQ_PLM_PRODUCT_TEMPLE", strategy = GenerationType.SEQUENCE) @Column(name = "temple_id", nullable = false, length = 22) public Integer getTempleId() { return templeId; } public void setProductShape(String productShape) { this.productShape = productShape; } @Column(name = "product_shape", nullable = true, length = 255) public String getProductShape() { return productShape; } public void setDayDamage(String dayDamage) { this.dayDamage = dayDamage; } @Column(name = "day_damage", nullable = true, length = 255) public String getDayDamage() { return dayDamage; } public void setRateClassCode(String rateClassCode) { this.rateClassCode = rateClassCode; } @Column(name = "rate_class_code", nullable = true, length = 255) public String getRateClassCode() { return rateClassCode; } public void setProductResource(String productResource) { this.productResource = productResource; } @Column(name = "product_resource", nullable = true, length = 255) public String getProductResource() { return productResource; } public void setSpecialLicence(String specialLicence) { this.specialLicence = specialLicence; } @Column(name = "special_licence", nullable = true, length = 255) public String getSpecialLicence() { return specialLicence; } public void setUniqueCommodities(String uniqueCommodities) { this.uniqueCommodities = uniqueCommodities; } @Column(name = "unique_commodities", nullable = true, length = 255) public String getUniqueCommodities() { return uniqueCommodities; } public void setProductCategeery(String productCategeery) { this.productCategeery = productCategeery; } @Column(name = "product_categeery", nullable = true, length = 255) public String getProductCategeery() { return productCategeery; } public void setProductProperties(String productProperties) { this.productProperties = productProperties; } @Column(name = "product_properties", nullable = true, length = 255) public String getProductProperties() { return productProperties; } public void setSpecialtyProduct(String specialtyProduct) { this.specialtyProduct = specialtyProduct; } @Column(name = "vc_product", nullable = true, length = 255) public String getVcProduct() { return vcProduct; } public void setVcProduct(String vcProduct) { this.vcProduct = vcProduct; } @Column(name = "specialty_product", nullable = true, length = 255) public String getSpecialtyProduct() { return specialtyProduct; } public void setDangerousProduct(String dangerousProduct) { this.dangerousProduct = dangerousProduct; } @Column(name = "dangerous_product", nullable = true, length = 255) public String getDangerousProduct() { return dangerousProduct; } public void setBuyingLevel(String buyingLevel) { this.buyingLevel = buyingLevel; } @Column(name = "buying_level", nullable = true, length = 255) public String getBuyingLevel() { return buyingLevel; } public void setInternationProduct(String internationProduct) { this.internationProduct = internationProduct; } @Column(name = "internation_product", nullable = true, length = 255) public String getInternationProduct() { return internationProduct; } public void setPosInfo(String posInfo) { this.posInfo = posInfo; } @Column(name = "pos_info", nullable = true, length = 255) public String getPosInfo() { return posInfo; } public void setTopProduct(String topProduct) { this.topProduct = topProduct; } @Column(name = "top_product", nullable = true, length = 255) public String getTopProduct() { return topProduct; } public void setSesionProduct(String sesionProduct) { this.sesionProduct = sesionProduct; } @Column(name = "sesion_product", nullable = true, length = 255) public String getSesionProduct() { return sesionProduct; } public void setBluecapProduct(String bluecapProduct) { this.bluecapProduct = bluecapProduct; } @Column(name = "bluecap_product", nullable = true, length = 255) public String getBluecapProduct() { return bluecapProduct; } public void setMotherCompany(String motherCompany) { this.motherCompany = motherCompany; } @Column(name = "mother_company", nullable = true, length = 255) public String getMotherCompany() { return motherCompany; } public void setCrossborderProduct(String crossborderProduct) { this.crossborderProduct = crossborderProduct; } @Column(name = "crossborder_product", nullable = true, length = 255) public String getCrossborderProduct() { return crossborderProduct; } public void setCompanyDeletion(String companyDeletion) { this.companyDeletion = companyDeletion; } @Column(name = "company_deletion", nullable = true, length = 255) public String getCompanyDeletion() { return companyDeletion; } public void setWarehousePostDay(Integer warehousePostDay) { this.warehousePostDay = warehousePostDay; } @Column(name = "warehouse_post_day", nullable = true, length = 22) public Integer getWarehousePostDay() { return warehousePostDay; } public void setWarehouseGetDay(Integer warehouseGetDay) { this.warehouseGetDay = warehouseGetDay; } @Column(name = "warehouse_get_day", nullable = true, length = 22) public Integer getWarehouseGetDay() { return warehouseGetDay; } public void setPowerOb(String powerOb) { this.powerOb = powerOb; } @Column(name = "power_ob", nullable = true, length = 255) public String getPowerOb() { return powerOb; } public void setRangOb(String rangOb) { this.rangOb = rangOb; } @Column(name = "rang_ob", nullable = true, length = 255) public String getRangOb() { return rangOb; } public void setSpecialRequier(String specialRequier) { this.specialRequier = specialRequier; } @Column(name = "special_requier", nullable = true, length = 255) public String getSpecialRequier() { return specialRequier; } public void setTier(String tier) { this.tier = tier; } @Column(name = "tier", nullable = true, length = 255) public String getTier() { return tier; } public void setProductLicense(String productLicense) { this.productLicense = productLicense; } @Column(name = "product_license", nullable = true, length = 255) public String getProductLicense() { return productLicense; } public void setTransportStorage(String transportStorage) { this.transportStorage = transportStorage; } @Column(name = "transport_storage", nullable = true, length = 255) public String getTransportStorage() { return transportStorage; } public void setStartDate(Date startDate) { this.startDate = startDate; } @Column(name = "start_date", nullable = true, length = 7) public Date getStartDate() { return startDate; } public void setVersionNum(Integer versionNum) { this.versionNum = versionNum; } @Version @Column(name = "version_num", nullable = true, length = 22) public Integer getVersionNum() { return versionNum; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } @Column(name = "creation_date", nullable = true, length = 7) public Date getCreationDate() { return creationDate; } public void setCreatedBy(Integer createdBy) { this.createdBy = createdBy; } @Column(name = "created_by", nullable = true, length = 22) public Integer getCreatedBy() { return createdBy; } public void setLastUpdatedBy(Integer lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy; } @Column(name = "last_updated_by", nullable = true, length = 22) public Integer getLastUpdatedBy() { return lastUpdatedBy; } public void setLastUpdateDate(Date lastUpdateDate) { this.lastUpdateDate = lastUpdateDate; } @Column(name = "last_update_date", nullable = true, length = 7) public Date getLastUpdateDate() { return lastUpdateDate; } public void setLastUpdateLogin(Integer lastUpdateLogin) { this.lastUpdateLogin = lastUpdateLogin; } @Column(name = "last_update_login", nullable = true, length = 22) public Integer getLastUpdateLogin() { return lastUpdateLogin; } public void setOperatorUserId(Integer operatorUserId) { this.operatorUserId = operatorUserId; } @Transient public Integer getOperatorUserId() { return operatorUserId; } @Column(name = "warehouse_resource", nullable = true, length = 255) public String getWarehouseResource() { return warehouseResource; } public void setWarehouseResource(String warehouseResource) { this.warehouseResource = warehouseResource; } @Column(name = "origin_country", nullable = true, length = 255) public String getOriginCountry() { return originCountry; } public void setOriginCountry(String originCountry) { this.originCountry = originCountry; } @Column(name = "unit", nullable = true, length = 255) public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } @Column(name = "sales_qty", nullable = true, length = 255) public String getSalesQty() { return salesQty; } public void setSalesQty(String salesQty) { this.salesQty = salesQty; } @Column(name = "consult_productno", nullable = true, length = 255) public String getConsultProductno() { return consultProductno; } public void setConsultProductno(String consultProductno) { this.consultProductno = consultProductno; } @Column(name = "consult_productname", nullable = true, length = 255) public String getConsultProductname() { return consultProductname; } public void setConsultProductname(String consultProductname) { this.consultProductname = consultProductname; } @Column(name = "pricewar_product", nullable = true, length = 255) public String getPricewarProduct() { return pricewarProduct; } public void setPricewarProduct(String pricewarProduct) { this.pricewarProduct = pricewarProduct; } @Column(name = "consult_date", nullable = true, length = 7) public Date getConsultDate() { return consultDate; } public void setConsultDate(Date consultDate) { this.consultDate = consultDate; } @Column(name = "consult_enddate", nullable = true, length = 7) public Date getConsultEnddate() { return consultEnddate; } public void setConsultEnddate(Date consultEnddate) { this.consultEnddate = consultEnddate; } @Column(name = "is_diaryproduct", nullable = true, length = 255) public String getIsDiaryproduct() { return isDiaryproduct; } public void setIsDiaryproduct(String isDiaryproduct) { this.isDiaryproduct = isDiaryproduct; } @Column(name = "product_return", nullable = true, length = 255) public String getProductReturn() { return productReturn; } public void setProductReturn(String productReturn) { this.productReturn = productReturn; } @Column(name = "condition", nullable = true, length = 255) public String getCondition() { return condition; } public void setCondition(String condition) { this.condition = condition; } @Column(name = "all_tier", nullable = true, length = 255) public String getAllTier() { return allTier; } public void setAllTier(String allTier) { this.allTier = allTier; } @Column(name = "tier1", nullable = true, length = 255) public String getTier1() { return tier1; } public void setTier1(String tier1) { this.tier1 = tier1; } @Column(name = "tier2", nullable = true, length = 255) public String getTier2() { return tier2; } public void setTier2(String tier2) { this.tier2 = tier2; } @Column(name = "tier345", nullable = true, length = 255) public String getTier345() { return tier345; } public void setTier345(String tier345) { this.tier345 = tier345; } @Column(name = "store_type", nullable = true, length = 255) public String getStoreType() { return storeType; } public void setStoreType(String storeType) { this.storeType = storeType; } @Column(name = "trade_zone", nullable = true, length = 255) public String getTradeZone() { return tradeZone; } public void setTradeZone(String tradeZone) { this.tradeZone = tradeZone; } @Column(name = "count_unit", nullable = true, length = 255) public String getCountUnit() { return countUnit; } public void setCountUnit(String countUnit) { this.countUnit = countUnit; } @Column(name = "templ_name", nullable = true, length = 255) public String getTemplName() { return templName; } public void setTemplName(String templName) { this.templName = templName; } }
[ "huang491591@qq.com" ]
huang491591@qq.com
dce0cd8c962260734e8686142b7bf7acc14f85a8
86bfbc5055ea93d7321fdc2a256c1261961c818b
/src/main/java/br/edu/utfpr/pb/trabalho/marca/MarcaRepository.java
df970ccf67323ff5aa386a5e6e1c9c25cadf4802
[]
no_license
antunius/trabalho
80e0f87dc97a02d56fae9a4c6e77086187d1a24c
8beda5ce3b2ef7495861f8fcd6778bb9665b63c5
refs/heads/master
2023-07-20T01:57:55.452803
2021-09-02T00:22:10
2021-09-02T00:22:10
392,872,442
0
0
null
null
null
null
UTF-8
Java
false
false
176
java
package br.edu.utfpr.pb.trabalho.marca; import org.springframework.data.jpa.repository.JpaRepository; public interface MarcaRepository extends JpaRepository<Marca, Long>{ }
[ "Marcus@1706!S" ]
Marcus@1706!S
4cc810e8d261f7d2693e861d6c03b4e0b6766970
97b46ff38b675d934948ff3731cf1607a1cc0fc9
/Server/java/pk/elfo/gameserver/model/zone/type/L2NoSummonFriendZone.java
de9d366c3187e75a9876f6cfb2dd62b9253b5d54
[]
no_license
l2brutal/pk-elfo_H5
a6703d734111e687ad2f1b2ebae769e071a911a4
766fa2a92cb3dcde5da6e68a7f3d41603b9c037e
refs/heads/master
2020-12-28T13:33:46.142303
2016-01-20T09:53:10
2016-01-20T09:53:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,530
java
/* * Copyright (C) 2004-2013 L2J Server * * This file is part of L2J Server. * * L2J Server is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package pk.elfo.gameserver.model.zone.type; import pk.elfo.gameserver.model.actor.L2Character; import pk.elfo.gameserver.model.zone.L2ZoneType; import pk.elfo.gameserver.model.zone.ZoneId; /** * A simple no summon zone * @author JIV */ public class L2NoSummonFriendZone extends L2ZoneType { public L2NoSummonFriendZone(int id) { super(id); } @Override protected void onEnter(L2Character character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); } @Override protected void onExit(L2Character character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); } @Override public void onDieInside(L2Character character) { } @Override public void onReviveInside(L2Character character) { } }
[ "PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba" ]
PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba
cb88b2b8b4bcf127b17d9c09dca60d7d5372df8a
14f44a65bfd2fae500907340ad3a7707681cfd08
/Activity/Mvp/dbuilink/OneLastMongoTest/src/com/SanTech/dao/UserDetailsDaoImplementer.java
cd2abd183017aad3bd805b075480cc0141d5aba6
[]
no_license
santoshofs/TesT
4d59ed48f4227f2352bfbeab67c25f99fcb114d4
50af67525c04518cb5029e9d5b98bea47743dbca
refs/heads/master
2021-05-16T07:23:13.875664
2018-07-18T11:40:35
2018-07-18T11:40:35
103,764,093
0
0
null
null
null
null
UTF-8
Java
false
false
2,486
java
package com.SanTech.dao; import java.io.UnsupportedEncodingException; import java.net.UnknownHostException; import java.security.NoSuchAlgorithmException; //import com.carshop.model.ResponseWithCarData; import com.SanTech.model.UserModel; import com.SanTech.service.UserService; import com.SanTech.service.UserServiceImplementer; import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.MongoClient; public class UserDetailsDaoImplementer implements UserDetailsDao { @Override public DBCollection getUserDetailsCollection() throws UnknownHostException { MongoClient mongo = new MongoClient("localhost", 27017); DB mongoDB = mongo.getDB("SanTechLastMongoDB"); return mongoDB.getCollection("user_details"); } @Override public Boolean insertDataForSignUp(UserModel user) throws UnknownHostException, NoSuchAlgorithmException, UnsupportedEncodingException { UserService service = new UserServiceImplementer(); Boolean status; DBCollection collection = getUserDetailsCollection(); BasicDBObject existing = new BasicDBObject(); String encryptPassword = new String(); existing.put("email", user.getEmail()); DBCursor cursor = collection.find(existing); if (!cursor.hasNext()) { BasicDBObject newDocument = new BasicDBObject(); newDocument.append("name", user.getName()); newDocument.append("email", user.getEmail()); newDocument.append("phone", user.getPhone()); encryptPassword = service.Md5Encrypt(user.getPassword()); newDocument.append("password", encryptPassword); newDocument.append("role", "user"); collection.insert(newDocument); status = true; System.out.println("Data IN"); } else { status = false; } return status; } @Override public UserModel fetchRowByEmail(UserModel user) throws UnknownHostException { DBCollection collection = getUserDetailsCollection(); UserModel gotUser = new UserModel(); BasicDBObject query = new BasicDBObject(); query.put("email", user.getEmail()); DBCursor cursor = collection.find(query); if (cursor.hasNext()) { BasicDBObject holder = (BasicDBObject) cursor.next(); gotUser.setEmail(holder.getString("email")); gotUser.setId(holder.getString("_id")); gotUser.setName(holder.getString("name")); gotUser.setPassword(holder.getString("password")); gotUser.setPhone(holder.getString("phone")); gotUser.setRole(holder.getString("role")); } return gotUser; } }
[ "spartaaa@gmail.com" ]
spartaaa@gmail.com
f8dc4c67f9b7d138357292b3894c032249bc1bcb
3c54440e89f6105a33060f2bb5932b888297e80d
/src/com/shildt/chapter_07/AccessTest.java
184e6245ad9afbd0ad0c7ef8fc9479e04173e433
[]
no_license
Deminform/Lessons
11f9e27aadf138f4f04f5de2c02c7d2bc90e7712
9990abc106d48dea3231931a89a7d521519ade1f
refs/heads/master
2020-05-21T16:40:53.964263
2016-11-02T00:04:04
2016-11-02T00:04:04
63,608,646
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.shildt.chapter_07; class AccessTest { public static void main(String[] args) { Test4 ob = new Test4(); ob.a = 10; ob.b = 20; ob.setC(100); // доступ только через сеттер потому что переменная в привате System.out.println("a, b, и c:" + ob.a + " " + ob.b + " " + ob.getC()); } }
[ "deminform@gmail.com" ]
deminform@gmail.com
e000b41f4f33f90fe32d9716536852524118c79f
a1b7b419778ea045c22e230dbbb4d93843f7ccd9
/src/lesson21/Company.java
928d5500ae78365a38c5abce0ef31c66d25da17a
[]
no_license
Evgen0124/java-core-grom
a7848755333812c37209c26ee4e59a669e83eb19
01003d08c6991e738cd1d4f832447b7774f402f5
refs/heads/master
2021-01-01T18:01:43.371895
2018-04-02T22:18:42
2018-04-02T22:18:42
98,230,341
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package lesson21; /** * Created by user on 27.01.2018. */ public class Company { private int numberOfEmployees; private String name; private static String licence; private static int maxNumberOfEmployees; static { System.out.println("Code block is called"); init(); } public Company(int numberOfEmployees, String name)throws Exception { if (numberOfEmployees > maxNumberOfEmployees) throw new Exception("Company can have max " + maxNumberOfEmployees + " employees"); this.numberOfEmployees = numberOfEmployees; this.name = name; } private static void init(){ maxNumberOfEmployees = 100; } public static void validate()throws Exception{ if (!licence.equals("TTT111")) throw new Exception("Wrong licence " + licence); } public int getNumberOfEmployees() { return numberOfEmployees; } public String getName() { return name; } public String getLicence() { return licence; } public static void setLicence(String licence) { Company.licence = licence; } }
[ "Dyndar1@mail.ru" ]
Dyndar1@mail.ru
b08f190b3ab62639c298d46a38082f7d59b76c9e
de0912adcba0b89082d9cb76db7e15000453f0ad
/book/src/com/book/dao/impl/BaseDao.java
273d3acf2036bd3b571a3829c2182c7e2a1179c5
[]
no_license
RickUniverse/JavaEE
d4bc4693d636abb5c731ef9e99aaad35707cf926
87e4f2ee83312fba8d9ee26d859b4136b51a19fe
refs/heads/master
2023-02-07T14:16:21.616949
2020-12-29T14:30:11
2020-12-29T14:30:11
325,305,951
0
0
null
null
null
null
UTF-8
Java
false
false
3,040
java
package com.book.dao.impl; import com.book.utils.JDBCUtil; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanHandler; import org.apache.commons.dbutils.handlers.BeanListHandler; import org.apache.commons.dbutils.handlers.ScalarHandler; import java.sql.Connection; import java.sql.SQLException; import java.util.List; /** * 数据操作 * @author lijichen * @date 2020/10/10 - 18:55 */ public abstract class BaseDao { //使用DBUtils操作数据 private QueryRunner queryRunner = new QueryRunner(); /** * 增删改操作 * @param sql 执行的sql语句 * @param args 参数列表 * @return 受影响行数 */ public int update(String sql, Object ...args) { Connection connection = JDBCUtil.getConnection(); try { return queryRunner.update(connection,sql, args); } catch (Exception e) { e.printStackTrace(); //将错误抛出去,使得第一层调用可以获取错误并回滚 throw new RuntimeException(e); } } /** * 查询返回一个javabean的sql语句 * @param type 返回的对象类型 * @param sql 执行的sql语句 * @param args sql对应的参数值 * @param <T> 返回的类型的泛型 * @return */ public <T> T queryForOne(Class<T> type,String sql, Object ...args) { Connection connection = JDBCUtil.getConnection(); try { return queryRunner.query(connection,sql,new BeanHandler<T>(type),args); } catch (Exception e) { e.printStackTrace(); //将错误抛出去,使得第一层调用可以获取错误并回滚 throw new RuntimeException(e); } } /** * 查询返回一个javabean的sql语句 * @param type 返回的对象类型 * @param sql 执行的sql语句 * @param args sql对应的参数值 * @param <T> 返回的类型的泛型 * @return */ public <T> List<T> queryForList(Class<T> type, String sql, Object ...args) { Connection connection = JDBCUtil.getConnection(); try { return queryRunner.query(connection,sql,new BeanListHandler<T>(type),args); } catch (Exception e) { e.printStackTrace(); //将错误抛出去,使得第一层调用可以获取错误并回滚 throw new RuntimeException(e); } } /** * 执行返回一行一列的sql语句 * @param sql 执行的sql语句 * @param args sql对应的参数值 * @return */ public Object queryForSingleValue(String sql, Object ...args) { Connection connection = JDBCUtil.getConnection(); try { return queryRunner.query(connection,sql,new ScalarHandler(),args); } catch (Exception e) { e.printStackTrace(); //将错误抛出去,使得第一层调用可以获取错误并回滚 throw new RuntimeException(e); } } }
[ "tom_global@review.com" ]
tom_global@review.com
1b431a65892cf7681f29343c44e6bef27368757a
45be72215330f8ec6f7203a4f34b5330984d73ff
/AtmMachineMain.java
118bd8b4d22511991a0117bc593b4a6290f3b0dc
[]
no_license
favouredjay/IDE-CODES
ff0e8707014617ff3115f5204d5e56132236f3ed
9560382e8e3485a66b0d1d86fbbfa2a117468943
refs/heads/main
2023-06-14T03:10:02.444849
2021-07-07T12:49:07
2021-07-07T12:49:07
343,154,859
0
0
null
null
null
null
UTF-8
Java
false
false
5,755
java
package chapterFour; import java.util.Scanner; public class AtmMachineMain { public static void main(String[] args) { AtmMachine atmMachine = new AtmMachine(); Scanner userInput = new Scanner(System.in); System.out.println(""" Welcome to Maven Afric Bank Please insert your card Please create pin"""); int system = userInput.nextInt(); atmMachine.setPin(system); System.out.println("Your Pin is " + atmMachine.getPin()+ "\n-----------------"); for (int checkerRound = 1; checkerRound <= 20; checkerRound++) { String chijioke = """ --> Enter 1 to Deposit --> Enter 2 to Withdraw --> Enter 3 to Transfer --> Enter 4 to Recharge --> Enter 5 to Change pin --> Enter 6 to Check Balance --> Enter 7 to End Transaction """; System.out.println(chijioke); int money = userInput.nextInt(); switch (money) { case 1: System.out.println("Enter amount to deposit: "); double john = userInput.nextDouble(); atmMachine.deposit(john); System.out.println("Your account has been credited with: " + atmMachine.getBalance()+ "\n---------------------"); break; case 2: System.out.println("Enter pin"); int joy = userInput.nextInt(); System.out.println("Enter amount to withdraw"); double withdrawal = userInput.nextInt(); atmMachine.withdraw(withdrawal, joy); System.out.println("Balance is: " + atmMachine.getBalance()+ "\n--------------------"); break; case 3: System.out.println("Enter pin to continue"); int wire = userInput.nextInt(); System.out.println("Enter Account number to transfer to"); long sc = userInput.nextLong(); System.out.println(""" Select Bank to transfer to 1. GtBank 2. EcoBank 3. First Bank 4. Union Bank 5. FCMB 6. Stanbic IBTC 7. Wema Bank 8. UBA"""); String bank = userInput.next(); System.out.println("Enter amount to transfer"); double transfer = userInput.nextDouble(); atmMachine.transfer(transfer, wire); System.out.println("Balance is:" + atmMachine.getBalance() + "\n------------------"); break; case 4: System.out.println("Enter pin to continue"); int bills = userInput.nextInt(); System.out.println(""" 1: Press to pay for your NEPA bill 2: Press 2 to buy airtime """); int refuel = userInput.nextInt(); switch (refuel) { case 1: System.out.println("Enter your Electronic number to recharge"); int electric = userInput.nextInt(); System.out.println("Enter amount to recharge"); double amount = userInput.nextDouble(); atmMachine.recharge(amount, bills); System.out.println("Balance is:" + atmMachine.getBalance() + "\n---------------------"); break; case 2: System.out.println("Enter number to recharge"); int number = userInput.nextInt(); System.out.println("Select Network:\n1. 9mobile\n2. MTN\n3. Glo\n4. Airtel"); int line = userInput.nextInt(); System.out.println("Enter amount to recharge"); double rechargeAmount = userInput.nextDouble(); atmMachine.recharge(rechargeAmount, bills); System.out.println("Balance is:" + atmMachine.getBalance() + "\n-------------------"); break; default: System.out.println("Please Select the right Option"); } break; case 5: System.out.println("Enter New Pin:"); int newPin = userInput.nextInt(); atmMachine.changePin(newPin); System.out.println("Your New Pin Is " + atmMachine.getPin() + "\n-------------------"); break; case 6: System.out.println("Your Available Balance is " + atmMachine.getBalance() + "\n------------------"); break; case 7: checkerRound +=50; System.out.println("Thank you for choosing Maven Afric Bank"); break; default: System.out.println("Wasiu Behave Normal Na"); } } } }
[ "judom.2011@gmail.com" ]
judom.2011@gmail.com
345efd7ce66bad3db72f85c712d30d4b2932a2a2
7c76d835caf196274ce8eb9ce4c1d7efb41799db
/app/src/androidTest/java/com/enlife/app/ExampleInstrumentedTest.java
2d001d5d0f6baff6e655cd40e7d8ea527ab551fd
[]
no_license
professional-lalit/EnLife
502b62a21d5ac7351f6f8ad57406abecae204890
3fb6bd27822a9574f739cf50e4f724b3af9dffc4
refs/heads/master
2023-05-27T13:18:41.869534
2021-06-12T16:49:32
2021-06-12T16:49:32
366,148,829
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package com.enlife.app; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.enlife.app", appContext.getPackageName()); } }
[ "i0PyMDN2fLAzHZkUWuyruefG2clLhyinw6Gna7H9WWM=" ]
i0PyMDN2fLAzHZkUWuyruefG2clLhyinw6Gna7H9WWM=
41d5339bc3cf4167cd80a4c44de9f5a543a8a2db
bd3d78bf906dd3ede3b1e4ae06b281fb02993b83
/Challenge2/gen/com/example/challenge2/R.java
a50b406ffcc0506e4b922d060038dd79faf7b96b
[]
no_license
SaiKishoreBandaru/Challenge2_RA
d98f50d243ac5a81e7ea7497dd97ee95e3b5441c
47417c4ae35fa87b64b081d2ba797959e92edba4
refs/heads/master
2016-09-10T03:51:40.104713
2014-10-27T19:30:28
2014-10-27T19:30:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
178,465
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.challenge2; 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 { /** Custom divider drawable to use for elements in the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarDivider=0x7f01000f; /** Custom item state list drawable background for action bar items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarItemBackground=0x7f010010; /** Size of the Action Bar, including the contextual bar used to present Action Modes. <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=0x7f01000e; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <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=0x7f01000c; /** Reference to a style for the Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarStyle=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 actionBarTabBarStyle=0x7f010008; /** Default style for tabs within an action bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabStyle=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 actionBarTabTextStyle=0x7f010009; /** Reference to a theme that should be used to inflate widgets and layouts destined for the action bar. Most of the time this will be a reference to the current theme, but when the action bar has a significantly different contrast profile than the rest of the activity the difference can become important. If this is set to @null the current theme will be used. <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=0x7f01000d; /** Default action button style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionButtonStyle=0x7f010016; /** Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionDropDownStyle=0x7f010047; /** An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionLayout=0x7f01004e; /** TextAppearance style that will be applied to text that appears within action menu items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionMenuTextAppearance=0x7f010011; /** Color for text that appears within action menu items. <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=0x7f010012; /** Background drawable to use for action mode UI <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=0x7f01003c; /** <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=0x7f01003b; /** Drawable to use for the close action mode button <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=0x7f01003e; /** Drawable to use for the Copy action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCopyDrawable=0x7f010040; /** Drawable to use for the Cut action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCutDrawable=0x7f01003f; /** Drawable to use for the Find action button in WebView selection action modes <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=0x7f010044; /** Drawable to use for the Paste action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePasteDrawable=0x7f010041; /** PopupWindow style to use for action modes when showing as a window overlay. <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=0x7f010046; /** Drawable to use for the Select all action button in Contextual Action Bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSelectAllDrawable=0x7f010042; /** Drawable to use for the Share action button in WebView selection action modes <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=0x7f010043; /** Background drawable to use for action mode UI in the lower split bar <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSplitBackground=0x7f01003d; /** <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=0x7f01003a; /** Drawable to use for the Web Search action button in WebView selection action modes <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=0x7f010045; /** <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=0x7f01000a; /** The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionProviderClass=0x7f010050; /** The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionViewClass=0x7f01004f; /** Default ActivityChooserView style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int activityChooserViewStyle=0x7f01006c; /** Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int background=0x7f01002f; /** Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundSplit=0x7f010031; /** Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundStacked=0x7f010030; /** A style that may be applied to Buttons placed within a LinearLayout with the style buttonBarStyle to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarButtonStyle=0x7f010018; /** A style that may be applied to horizontal LinearLayouts to form a button bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarStyle=0x7f010017; /** Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int customNavigationLayout=0x7f010032; /** Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int disableChildrenWhenDisabled=0x7f010054; /** Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static final int displayOptions=0x7f010028; /** Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int divider=0x7f01002e; /** A drawable that may be used as a horizontal divider between visual elements. <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=0x7f01001b; /** Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dividerPadding=0x7f010056; /** A drawable that may be used as a vertical divider between visual elements. <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=0x7f01001a; /** ListPopupWindow comaptibility <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=0x7f010021; /** The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dropdownListPreferredItemHeight=0x7f010048; /** The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandActivityOverflowButtonDrawable=0x7f01006b; /** <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=0x7f010026; /** Specifies a drawable to use for the 'home as up' indicator. <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=0x7f010013; /** Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeLayout=0x7f010033; /** Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int icon=0x7f01002c; /** The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int iconifiedByDefault=0x7f01005a; /** Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int indeterminateProgressStyle=0x7f010035; /** The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int initialActivityCount=0x7f01006a; /** Specifies whether the theme is light, otherwise it is dark. <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=0x7f010059; /** Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemPadding=0x7f010037; /** Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listChoiceBackgroundIndicator=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 listPopupWindowStyle=0x7f010022; /** The preferred list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeight=0x7f01001c; /** A larger, more robust list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightLarge=0x7f01001e; /** A smaller, sleeker list item height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightSmall=0x7f01001d; /** The preferred padding along the left edge of list items. <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=0x7f01001f; /** The preferred padding along the right edge of list items. <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=0x7f010020; /** Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int logo=0x7f01002d; /** The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> */ public static final int navigationMode=0x7f010027; /** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingEnd=0x7f010039; /** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingStart=0x7f010038; /** Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelMenuListTheme=0x7f01004b; /** Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int panelMenuListWidth=0x7f01004a; /** Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupMenuStyle=0x7f010049; /** Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupPromptView=0x7f010053; /** Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int progressBarPadding=0x7f010036; /** Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int progressBarStyle=0x7f010034; /** The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int prompt=0x7f010051; /** An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int queryHint=0x7f01005b; /** SearchView dropdown background <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=0x7f01005c; /** The list item height for search results. @hide <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=0x7f010065; /** SearchView AutoCompleteTextView style <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewAutoCompleteTextView=0x7f010069; /** SearchView close button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewCloseIcon=0x7f01005d; /** SearchView query refinement icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQuery=0x7f010061; /** SearchView query refinement icon background <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=0x7f010062; /** SearchView Go button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewGoIcon=0x7f01005e; /** SearchView Search icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewSearchIcon=0x7f01005f; /** SearchView text field background for the left section <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=0x7f010063; /** SearchView text field background for the right section <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=0x7f010064; /** SearchView Voice button icon <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewVoiceIcon=0x7f010060; /** A style that may be applied to buttons or other selectable items that should react to pressed and focus states, but that do not have a clear visual border along the edges. <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=0x7f010019; /** How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> */ public static final int showAsAction=0x7f01004d; /** Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static final int showDividers=0x7f010055; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerDropDownItemStyle=0x7f010058; /** Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> */ public static final int spinnerMode=0x7f010052; /** Default Spinner style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerStyle=0x7f010057; /** Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitle=0x7f010029; /** Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextStyle=0x7f01002b; /** Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static final int textAllCaps=0x7f01006d; /** Text color, typeface, size, and style for the text inside of a popup menu. <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=0x7f010014; /** The preferred TextAppearance for the primary text of list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItem=0x7f010023; /** The preferred TextAppearance for the primary text of small list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItemSmall=0x7f010024; /** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. <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=0x7f010067; /** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. <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=0x7f010066; /** Text color, typeface, size, and style for small text inside of a popup menu. <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=0x7f010015; /** Text color for urls in search suggestions, used by things like global search <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=0x7f010068; /** <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=0x7f010025; /** Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextStyle=0x7f01002a; /** <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=0x7f010000; /** <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=0x7f010001; /** A fixed height for the window along the major axis of the screen, that is, when in portrait. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <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 windowFixedHeightMajor=0x7f010006; /** A fixed height for the window along the minor axis of the screen, that is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <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 windowFixedHeightMinor=0x7f010004; /** A fixed width for the window along the major axis of the screen, that is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <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 windowFixedWidthMajor=0x7f010003; /** A fixed width for the window along the minor axis of the screen, that is, when in portrait. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <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 windowFixedWidthMinor=0x7f010005; /** <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=0x7f010002; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb=0x7f060000; public static final int abc_action_bar_expanded_action_views_exclusive=0x7f060001; /** Whether action menu items should be displayed in ALLCAPS or not. Defaults to true. If this is not appropriate for specific locales it should be disabled in that locale's resources. */ public static final int abc_config_actionMenuItemAllCaps=0x7f060005; /** Whether action menu items should obey the "withText" showAsAction flag. This may be set to false for situations where space is extremely limited. Whether action menu items should obey the "withText" showAsAction. This may be set to false for situations where space is extremely limited. */ public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f060004; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003; public static final int abc_split_action_bar_is_narrow=0x7f060002; } public static final class color { public static final int abc_search_url_text_holo=0x7f070003; public static final int abc_search_url_text_normal=0x7f070000; public static final int abc_search_url_text_pressed=0x7f070002; public static final int abc_search_url_text_selected=0x7f070001; } public static final class dimen { /** Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. Default height of an action bar. */ public static final int abc_action_bar_default_height=0x7f080002; /** Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. Vertical padding around action bar icons. */ public static final int abc_action_bar_icon_vertical_padding=0x7f080003; /** Size of the indeterminate Progress Bar Size of the indeterminate Progress Bar */ public static final int abc_action_bar_progress_bar_size=0x7f08000a; /** Maximum height for a stacked tab bar as part of an action bar */ public static final int abc_action_bar_stacked_max_height=0x7f080009; /** Maximum width for a stacked action bar tab. This prevents action bar tabs from becoming too wide on a wide screen when only a few are present. */ public static final int abc_action_bar_stacked_tab_max_width=0x7f080001; /** Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles Bottom margin for action bar subtitles */ public static final int abc_action_bar_subtitle_bottom_margin=0x7f080007; /** Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles Text size for action bar subtitles */ public static final int abc_action_bar_subtitle_text_size=0x7f080005; /** Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles Top margin for action bar subtitles */ public static final int abc_action_bar_subtitle_top_margin=0x7f080006; /** Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles Text size for action bar titles */ public static final int abc_action_bar_title_text_size=0x7f080004; /** Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar Minimum width for an action button in the menu area of an action bar */ public static final int abc_action_button_min_width=0x7f080008; /** The maximum width we would prefer dialogs to be. 0 if there is no maximum (let them grow as large as the screen). Actual values are specified for -large and -xlarge configurations. see comment in values/config.xml see comment in values/config.xml */ public static final int abc_config_prefDialogWidth=0x7f080000; /** Width of the icon in a dropdown list */ public static final int abc_dropdownitem_icon_width=0x7f080010; /** Text padding for dropdown items */ public static final int abc_dropdownitem_text_padding_left=0x7f08000e; public static final int abc_dropdownitem_text_padding_right=0x7f08000f; public static final int abc_panel_menu_list_width=0x7f08000b; /** Preferred width of the search view. */ public static final int abc_search_view_preferred_width=0x7f08000d; /** Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. Minimum width of the search view text entry area. */ public static final int abc_search_view_text_min_width=0x7f08000c; /** Default screen margins, per the Android Design guidelines. Example customization of dimensions originally defined in res/values/dimens.xml (such as screen margins) for screens with more than 820dp of available width. This would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). */ public static final int activity_horizontal_margin=0x7f080015; public static final int activity_vertical_margin=0x7f080016; /** The platform's desired fixed height for a dialog along the major axis (the screen is in portrait). This may be either a fraction or a dimension. The platform's desired fixed height for a dialog along the major axis (the screen is in portrait). This may be either a fraction or a dimension. The platform's desired fixed height for a dialog along the major axis (the screen is in portrait). This may be either a fraction or a dimension. */ public static final int dialog_fixed_height_major=0x7f080013; /** The platform's desired fixed height for a dialog along the minor axis (the screen is in landscape). This may be either a fraction or a dimension. The platform's desired fixed height for a dialog along the minor axis (the screen is in landscape). This may be either a fraction or a dimension. The platform's desired fixed height for a dialog along the minor axis (the screen is in landscape). This may be either a fraction or a dimension. */ public static final int dialog_fixed_height_minor=0x7f080014; /** The platform's desired fixed width for a dialog along the major axis (the screen is in landscape). This may be either a fraction or a dimension. The platform's desired fixed width for a dialog along the major axis (the screen is in landscape). This may be either a fraction or a dimension. The platform's desired fixed width for a dialog along the major axis (the screen is in landscape). This may be either a fraction or a dimension. */ public static final int dialog_fixed_width_major=0x7f080011; /** The platform's desired fixed width for a dialog along the minor axis (the screen is in portrait). This may be either a fraction or a dimension. The platform's desired fixed width for a dialog along the minor axis (the screen is in portrait). This may be either a fraction or a dimension. The platform's desired fixed width for a dialog along the minor axis (the screen is in portrait). This may be either a fraction or a dimension. */ public static final int dialog_fixed_width_minor=0x7f080012; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo=0x7f020000; public static final int abc_ab_bottom_solid_light_holo=0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static final int abc_ab_bottom_transparent_light_holo=0x7f020003; public static final int abc_ab_share_pack_holo_dark=0x7f020004; public static final int abc_ab_share_pack_holo_light=0x7f020005; public static final int abc_ab_solid_dark_holo=0x7f020006; public static final int abc_ab_solid_light_holo=0x7f020007; public static final int abc_ab_stacked_solid_dark_holo=0x7f020008; public static final int abc_ab_stacked_solid_light_holo=0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static final int abc_ab_transparent_dark_holo=0x7f02000c; public static final int abc_ab_transparent_light_holo=0x7f02000d; public static final int abc_cab_background_bottom_holo_dark=0x7f02000e; public static final int abc_cab_background_bottom_holo_light=0x7f02000f; public static final int abc_cab_background_top_holo_dark=0x7f020010; public static final int abc_cab_background_top_holo_light=0x7f020011; public static final int abc_ic_ab_back_holo_dark=0x7f020012; public static final int abc_ic_ab_back_holo_light=0x7f020013; public static final int abc_ic_cab_done_holo_dark=0x7f020014; public static final int abc_ic_cab_done_holo_light=0x7f020015; public static final int abc_ic_clear=0x7f020016; public static final int abc_ic_clear_disabled=0x7f020017; public static final int abc_ic_clear_holo_light=0x7f020018; public static final int abc_ic_clear_normal=0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static final int abc_ic_clear_search_api_holo_light=0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static final int abc_ic_commit_search_api_holo_light=0x7f02001d; public static final int abc_ic_go=0x7f02001e; public static final int abc_ic_go_search_api_holo_light=0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static final int abc_ic_menu_share_holo_dark=0x7f020022; public static final int abc_ic_menu_share_holo_light=0x7f020023; public static final int abc_ic_search=0x7f020024; public static final int abc_ic_search_api_holo_light=0x7f020025; public static final int abc_ic_voice_search=0x7f020026; public static final int abc_ic_voice_search_api_holo_light=0x7f020027; public static final int abc_item_background_holo_dark=0x7f020028; public static final int abc_item_background_holo_light=0x7f020029; public static final int abc_list_divider_holo_dark=0x7f02002a; public static final int abc_list_divider_holo_light=0x7f02002b; public static final int abc_list_focused_holo=0x7f02002c; public static final int abc_list_longpressed_holo=0x7f02002d; public static final int abc_list_pressed_holo_dark=0x7f02002e; public static final int abc_list_pressed_holo_light=0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark=0x7f020030; public static final int abc_list_selector_background_transition_holo_light=0x7f020031; public static final int abc_list_selector_disabled_holo_dark=0x7f020032; public static final int abc_list_selector_disabled_holo_light=0x7f020033; public static final int abc_list_selector_holo_dark=0x7f020034; public static final int abc_list_selector_holo_light=0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static final int abc_menu_dropdown_panel_holo_light=0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static final int abc_menu_hardkey_panel_holo_light=0x7f020039; public static final int abc_search_dropdown_dark=0x7f02003a; public static final int abc_search_dropdown_light=0x7f02003b; public static final int abc_spinner_ab_default_holo_dark=0x7f02003c; public static final int abc_spinner_ab_default_holo_light=0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark=0x7f020040; public static final int abc_spinner_ab_focused_holo_light=0x7f020041; public static final int abc_spinner_ab_holo_dark=0x7f020042; public static final int abc_spinner_ab_holo_light=0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static final int abc_spinner_ab_pressed_holo_light=0x7f020045; public static final int abc_tab_indicator_ab_holo=0x7f020046; public static final int abc_tab_selected_focused_holo=0x7f020047; public static final int abc_tab_selected_holo=0x7f020048; public static final int abc_tab_selected_pressed_holo=0x7f020049; public static final int abc_tab_unselected_pressed_holo=0x7f02004a; public static final int abc_textfield_search_default_holo_dark=0x7f02004b; public static final int abc_textfield_search_default_holo_light=0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static final int abc_textfield_search_right_default_holo_light=0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light=0x7f020050; public static final int abc_textfield_search_selected_holo_dark=0x7f020051; public static final int abc_textfield_search_selected_holo_light=0x7f020052; public static final int abc_textfield_searchview_holo_dark=0x7f020053; public static final int abc_textfield_searchview_holo_light=0x7f020054; public static final int abc_textfield_searchview_right_holo_dark=0x7f020055; public static final int abc_textfield_searchview_right_holo_light=0x7f020056; public static final int ic_launcher=0x7f020057; } public static final class id { public static final int ScrollView01=0x7f05003c; public static final int action_bar=0x7f05001c; public static final int action_bar_activity_content=0x7f050015; public static final int action_bar_container=0x7f05001b; public static final int action_bar_overlay_layout=0x7f05001f; public static final int action_bar_root=0x7f05001a; public static final int action_bar_subtitle=0x7f050023; public static final int action_bar_title=0x7f050022; public static final int action_context_bar=0x7f05001d; public static final int action_menu_divider=0x7f050016; public static final int action_menu_presenter=0x7f050017; public static final int action_mode_close_button=0x7f050024; public static final int action_settings=0x7f050040; public static final int activity_chooser_view_content=0x7f050025; public static final int always=0x7f05000b; public static final int beginning=0x7f050011; public static final int button1=0x7f05003e; public static final int checkbox=0x7f05002d; public static final int collapseActionView=0x7f05000d; public static final int default_activity_button=0x7f050028; public static final int dialog=0x7f05000e; public static final int disableHome=0x7f050008; public static final int dropdown=0x7f05000f; public static final int edit_query=0x7f050030; public static final int end=0x7f050013; public static final int expand_activities_button=0x7f050026; public static final int expanded_menu=0x7f05002c; public static final int home=0x7f050014; public static final int homeAsUp=0x7f050005; public static final int icon=0x7f05002a; public static final int ifRoom=0x7f05000a; public static final int image=0x7f050027; public static final int it=0x7f05003d; public static final int listMode=0x7f050001; public static final int list_item=0x7f050029; public static final int middle=0x7f050012; public static final int never=0x7f050009; public static final int none=0x7f050010; public static final int normal=0x7f050000; public static final int progress_circular=0x7f050018; public static final int progress_horizontal=0x7f050019; public static final int radio=0x7f05002f; public static final int search_badge=0x7f050032; public static final int search_bar=0x7f050031; public static final int search_button=0x7f050033; public static final int search_close_btn=0x7f050038; public static final int search_edit_frame=0x7f050034; public static final int search_go_btn=0x7f05003a; public static final int search_mag_icon=0x7f050035; public static final int search_plate=0x7f050036; public static final int search_src_text=0x7f050037; public static final int search_voice_btn=0x7f05003b; public static final int shortcut=0x7f05002e; public static final int showCustom=0x7f050007; public static final int showHome=0x7f050004; public static final int showTitle=0x7f050006; public static final int split_action_bar=0x7f05001e; public static final int submit_area=0x7f050039; public static final int tabMode=0x7f050002; public static final int title=0x7f05002b; public static final int top_action_bar=0x7f050020; public static final int tv1=0x7f05003f; public static final int up=0x7f050021; public static final int useLogo=0x7f050003; public static final int withText=0x7f05000c; } public static final class integer { /** The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. The maximum number of action buttons that should be permitted within an action bar/action mode. This will be used to determine how many showAsAction="ifRoom" items can fit. "always" items can override this. */ public static final int abc_max_action_buttons=0x7f090000; } public static final class layout { public static final int abc_action_bar_decor=0x7f030000; public static final int abc_action_bar_decor_include=0x7f030001; public static final int abc_action_bar_decor_overlay=0x7f030002; public static final int abc_action_bar_home=0x7f030003; public static final int abc_action_bar_tab=0x7f030004; public static final int abc_action_bar_tabbar=0x7f030005; public static final int abc_action_bar_title_item=0x7f030006; public static final int abc_action_bar_view_list_nav_layout=0x7f030007; public static final int abc_action_menu_item_layout=0x7f030008; public static final int abc_action_menu_layout=0x7f030009; public static final int abc_action_mode_bar=0x7f03000a; public static final int abc_action_mode_close_item=0x7f03000b; public static final int abc_activity_chooser_view=0x7f03000c; public static final int abc_activity_chooser_view_include=0x7f03000d; public static final int abc_activity_chooser_view_list_item=0x7f03000e; public static final int abc_expanded_menu_layout=0x7f03000f; public static final int abc_list_menu_item_checkbox=0x7f030010; public static final int abc_list_menu_item_icon=0x7f030011; public static final int abc_list_menu_item_layout=0x7f030012; public static final int abc_list_menu_item_radio=0x7f030013; public static final int abc_popup_menu_item_layout=0x7f030014; public static final int abc_search_dropdown_item_icons_2line=0x7f030015; public static final int abc_search_view=0x7f030016; public static final int abc_simple_decor=0x7f030017; public static final int activity_main=0x7f030018; public static final int fragment_main=0x7f030019; public static final int support_simple_spinner_dropdown_item=0x7f03001a; } public static final class menu { public static final int main=0x7f0c0000; } public static final class string { /** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_home_description=0x7f0a0001; /** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] */ public static final int abc_action_bar_up_description=0x7f0a0002; /** Content description for the action menu overflow button. [CHAR LIMIT=NONE] */ public static final int abc_action_menu_overflow_description=0x7f0a0003; /** Label for the "Done" button on the far left of action mode toolbars. */ public static final int abc_action_mode_done=0x7f0a0000; /** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] */ public static final int abc_activity_chooser_view_see_all=0x7f0a000a; /** ActivityChooserView - accessibility support Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] */ public static final int abc_activitychooserview_choose_application=0x7f0a0009; /** SearchView accessibility description for clear button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_clear=0x7f0a0006; /** SearchView accessibility description for search text field [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_query=0x7f0a0005; /** SearchView accessibility description for search button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_search=0x7f0a0004; /** SearchView accessibility description for submit button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_submit=0x7f0a0007; /** SearchView accessibility description for voice button [CHAR LIMIT=NONE] */ public static final int abc_searchview_description_voice=0x7f0a0008; /** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with=0x7f0a000c; /** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] */ public static final int abc_shareactionprovider_share_with_application=0x7f0a000b; public static final int action_settings=0x7f0a000f; public static final int app_name=0x7f0a000d; public static final int hello_world=0x7f0a000e; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f0b008b; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f0b008c; /** Mimic text appearance in select_dialog_item.xml */ public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0063; public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f0b006d; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006f; /** Search View result styles */ public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006e; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0069; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b006a; public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b0070; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b0072; /** TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default versions instead (which are exactly the same). */ public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b0071; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b006b; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b006c; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0035; public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0034; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b0030; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b0031; public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0033; public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0032; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0054; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0056; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0058; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0055; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0057; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b0051; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0053; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b0050; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0052; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b0061; public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002e; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002f; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0062; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028; /** Themes in the "Theme.AppCompat" family will contain an action bar by default. If Holo themes are available on the current platform version they will be used. A limited Holo-styled action bar will be provided on platform versions older than 3.0. (API 11) These theme declarations contain any version-independent specification. Items that need to vary based on platform version should be defined in the corresponding "Theme.Base" theme. Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat=0x7f0b0077; /** Menu/item attributes */ public static final int Theme_AppCompat_Base_CompactMenu=0x7f0b0083; public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b0084; /** Menu/item attributes */ public static final int Theme_AppCompat_CompactMenu=0x7f0b007c; public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f0b007d; public static final int Theme_AppCompat_DialogWhenLarge=0x7f0b007a; /** Platform-independent theme providing an action bar in a light-themed activity. */ public static final int Theme_AppCompat_Light=0x7f0b0078; /** Platform-independent theme providing an action bar in a dark-themed activity. */ public static final int Theme_AppCompat_Light_DarkActionBar=0x7f0b0079; public static final int Theme_AppCompat_Light_DialogWhenLarge=0x7f0b007b; /** Base platform-dependent theme */ public static final int Theme_Base=0x7f0b007e; /** Base platform-dependent theme providing an action bar in a dark-themed activity. Base platform-dependent theme providing an action bar in a dark-themed activity. */ public static final int Theme_Base_AppCompat=0x7f0b0080; public static final int Theme_Base_AppCompat_Dialog_FixedSize=0x7f0b0087; public static final int Theme_Base_AppCompat_Dialog_Light_FixedSize=0x7f0b0088; public static final int Theme_Base_AppCompat_DialogWhenLarge=0x7f0b0085; /** As we have defined the theme in values-large (for compat) and values-large takes precedence over values-v14, we need to reset back to the Holo parent in values-large-v14. As the themes in values-v14 & values-large-v14 are exactly the same, these "double base" themes can be inherited from in both values-v14 and values-large-v14. */ public static final int Theme_Base_AppCompat_DialogWhenLarge_Base=0x7f0b0089; /** Base platform-dependent theme providing an action bar in a light-themed activity. Base platform-dependent theme providing an action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light=0x7f0b0081; /** Base platform-dependent theme providing a dark action bar in a light-themed activity. Base platform-dependent theme providing a dark action bar in a light-themed activity. */ public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b0082; public static final int Theme_Base_AppCompat_Light_DialogWhenLarge=0x7f0b0086; public static final int Theme_Base_AppCompat_Light_DialogWhenLarge_Base=0x7f0b008a; /** Base platform-dependent theme providing a light-themed activity. */ public static final int Theme_Base_Light=0x7f0b007f; /** Styles in here can be extended for customisation in your application. Each utilises one of the Base styles. If Holo themes are available on the current platform version they will be used instead of the compat styles. */ public static final int Widget_AppCompat_ActionBar=0x7f0b0000; public static final int Widget_AppCompat_ActionBar_Solid=0x7f0b0002; public static final int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011; public static final int Widget_AppCompat_ActionBar_TabText=0x7f0b0017; public static final int Widget_AppCompat_ActionBar_TabView=0x7f0b0014; public static final int Widget_AppCompat_ActionButton=0x7f0b000b; public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d; public static final int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f; public static final int Widget_AppCompat_ActionMode=0x7f0b001b; public static final int Widget_AppCompat_ActivityChooserView=0x7f0b0038; public static final int Widget_AppCompat_AutoCompleteTextView=0x7f0b0036; public static final int Widget_AppCompat_Base_ActionBar=0x7f0b003a; public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003c; public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0045; public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b004b; public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0048; /** Action Button Styles */ public static final int Widget_AppCompat_Base_ActionButton=0x7f0b003f; public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b0041; public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0043; public static final int Widget_AppCompat_Base_ActionMode=0x7f0b004e; public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0075; /** AutoCompleteTextView styles (for SearchView) */ public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b0073; public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005d; /** Popup Menu */ public static final int Widget_AppCompat_Base_ListPopupWindow=0x7f0b0065; /** Spinner Widgets */ public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005f; public static final int Widget_AppCompat_Base_ListView_Menu=0x7f0b0064; public static final int Widget_AppCompat_Base_PopupMenu=0x7f0b0067; public static final int Widget_AppCompat_Base_ProgressBar=0x7f0b005a; /** Progress Bar */ public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0059; /** Action Bar Spinner Widgets */ public static final int Widget_AppCompat_Base_Spinner=0x7f0b005b; public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024; public static final int Widget_AppCompat_Light_ActionBar=0x7f0b0001; public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004; public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013; public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019; public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016; public static final int Widget_AppCompat_Light_ActionButton=0x7f0b000c; public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e; public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010; public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c; public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0039; public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0037; public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f0b003b; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003d; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003e; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0046; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0047; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004d; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0049; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b004a; public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f0b0040; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0042; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0044; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004f; public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0076; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0074; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005e; public static final int Widget_AppCompat_Light_Base_ListPopupWindow=0x7f0b0066; public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b0060; public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0068; public static final int Widget_AppCompat_Light_Base_Spinner=0x7f0b005c; public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025; public static final int Widget_AppCompat_Light_ListPopupWindow=0x7f0b002a; public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027; public static final int Widget_AppCompat_Light_PopupMenu=0x7f0b002c; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023; public static final int Widget_AppCompat_ListPopupWindow=0x7f0b0029; public static final int Widget_AppCompat_ListView_DropDown=0x7f0b0026; public static final int Widget_AppCompat_ListView_Menu=0x7f0b002d; public static final int Widget_AppCompat_PopupMenu=0x7f0b002b; public static final int Widget_AppCompat_ProgressBar=0x7f0b000a; public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022; } public static final class styleable { /** ============================================ Attributes used to style the Action Bar. These should be set on your theme; the default actionBarStyle will propagate them to the correct elements as needed. Please Note: when overriding attributes for an ActionBar style you must specify each attribute twice: once with the "android:" namespace prefix and once without. <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.challenge2:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit com.example.challenge2:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked com.example.challenge2:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout com.example.challenge2:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr> <tr><td><code>{@link #ActionBar_displayOptions com.example.challenge2:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr> <tr><td><code>{@link #ActionBar_divider com.example.challenge2:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr> <tr><td><code>{@link #ActionBar_height com.example.challenge2:height}</code></td><td> Specifies a fixed height.</td></tr> <tr><td><code>{@link #ActionBar_homeLayout com.example.challenge2:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr> <tr><td><code>{@link #ActionBar_icon com.example.challenge2:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.example.challenge2:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr> <tr><td><code>{@link #ActionBar_itemPadding com.example.challenge2:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of system-provided items in the bar.</td></tr> <tr><td><code>{@link #ActionBar_logo com.example.challenge2:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr> <tr><td><code>{@link #ActionBar_navigationMode com.example.challenge2:navigationMode}</code></td><td> The type of navigation to use.</td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding com.example.challenge2:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle com.example.challenge2:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr> <tr><td><code>{@link #ActionBar_subtitle com.example.challenge2:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle com.example.challenge2:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionBar_title com.example.challenge2:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle com.example.challenge2:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035, 0x7f010036, 0x7f010037 }; /** <p> @attr description Specifies a background drawable for the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:background */ public static final int ActionBar_background = 10; /** <p> @attr description Specifies a background drawable for the bottom component of a split action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p> @attr description Specifies a background drawable for a second stacked row of the action bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p> @attr description Specifies a layout for custom navigation. Overrides navigationMode. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p> @attr description Options affecting how the action bar is displayed. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> <p>This is a private symbol. @attr name com.example.challenge2:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p> @attr description Specifies the drawable used for item dividers. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:divider */ public static final int ActionBar_divider = 9; /** <p> @attr description Specifies a fixed height. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:height */ public static final int ActionBar_height = 1; /** <p> @attr description Specifies a layout to use for the "home" section of the action bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p> @attr description Specifies the drawable used for the application icon. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:icon */ public static final int ActionBar_icon = 7; /** <p> @attr description Specifies a style resource to use for an indeterminate progress spinner. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p> @attr description Specifies padding that should be applied to the left and right sides of system-provided items in the bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p> @attr description Specifies the drawable used for the application logo. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:logo */ public static final int ActionBar_logo = 8; /** <p> @attr description The type of navigation to use. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr> <tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr> <tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr> </table> <p>This is a private symbol. @attr name com.example.challenge2:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p> @attr description Specifies the horizontal padding on either end for an embedded progress bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p> @attr description Specifies a style resource to use for an embedded progress bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p> @attr description Specifies subtitle text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:subtitle */ public static final int ActionBar_subtitle = 4; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p> @attr description Specifies title text used for navigationMode="normal" <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:title */ public static final int ActionBar_title = 0; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Valid LayoutParams for views placed in the action bar as custom views. <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; /** These attributes are meant to be specified and customized by the app. The system will read and apply them as needed. These attributes control properties of the activity window, such as whether an action bar should be present and whether it should overlay content. <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.challenge2:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.example.challenge2:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowFixedHeightMajor com.example.challenge2:windowFixedHeightMajor}</code></td><td> A fixed height for the window along the major axis of the screen, that is, when in portrait.</td></tr> <tr><td><code>{@link #ActionBarWindow_windowFixedHeightMinor com.example.challenge2:windowFixedHeightMinor}</code></td><td> A fixed height for the window along the minor axis of the screen, that is, when in landscape.</td></tr> <tr><td><code>{@link #ActionBarWindow_windowFixedWidthMajor com.example.challenge2:windowFixedWidthMajor}</code></td><td> A fixed width for the window along the major axis of the screen, that is, when in landscape.</td></tr> <tr><td><code>{@link #ActionBarWindow_windowFixedWidthMinor com.example.challenge2:windowFixedWidthMinor}</code></td><td> A fixed width for the window along the minor axis of the screen, that is, when in portrait.</td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.example.challenge2:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowFixedHeightMajor @see #ActionBarWindow_windowFixedHeightMinor @see #ActionBarWindow_windowFixedWidthMajor @see #ActionBarWindow_windowFixedWidthMinor @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006 }; /** <p>This symbol is the offset where the {@link com.example.challenge2.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.challenge2:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link com.example.challenge2.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.challenge2:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p> @attr description A fixed height for the window along the major axis of the screen, that is, when in portrait. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:windowFixedHeightMajor */ public static final int ActionBarWindow_windowFixedHeightMajor = 6; /** <p> @attr description A fixed height for the window along the minor axis of the screen, that is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:windowFixedHeightMinor */ public static final int ActionBarWindow_windowFixedHeightMinor = 4; /** <p> @attr description A fixed width for the window along the major axis of the screen, that is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:windowFixedWidthMajor */ public static final int ActionBarWindow_windowFixedWidthMajor = 3; /** <p> @attr description A fixed width for the window along the minor axis of the screen, that is, when in portrait. Can be either an absolute dimension or a fraction of the screen size in that dimension. <p>May 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>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:windowFixedWidthMinor */ public static final int ActionBarWindow_windowFixedWidthMinor = 5; /** <p>This symbol is the offset where the {@link com.example.challenge2.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.challenge2:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Size of padding on either end of a divider. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background com.example.challenge2:background}</code></td><td> Specifies a background for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit com.example.challenge2:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_height com.example.challenge2:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle com.example.challenge2:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle com.example.challenge2:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010026, 0x7f01002a, 0x7f01002b, 0x7f01002f, 0x7f010031 }; /** <p> @attr description Specifies a background for the action mode bar. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:background */ public static final int ActionMode_background = 3; /** <p> @attr description Specifies a background for the split action mode bar. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p> @attr description Specifies a fixed height for the action mode bar. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:height */ public static final int ActionMode_height = 0; /** <p> @attr description Specifies a style to use for subtitle text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p> @attr description Specifies a style to use for title text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attrbitutes for 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.challenge2:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount com.example.challenge2:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f01006a, 0x7f01006b }; /** <p> @attr description The drawable to show in the button for expanding the activities overflow popup. <strong>Note:</strong> Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if share activity is to be chosen the drawable should give a clue that sharing is to be performed. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p> @attr description The maximal number of items initially shown in the activity list. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2: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.challenge2:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f01006d }; /** <p> @attr description Present the text in ALL CAPS. This may use a small-caps form when available. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This is a private symbol. @attr name com.example.challenge2: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.challenge2:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding com.example.challenge2:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers com.example.challenge2:showDividers}</code></td><td> Setting for which dividers to show.</td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f01002e, 0x7f010055, 0x7f010056 }; /** <p> @attr description Drawable to use as a vertical divider between buttons. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:divider */ public static final int LinearLayoutICS_divider = 0; /** <p> @attr description Size of padding on either end of a divider. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p> @attr description Setting for which dividers to show. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> <p>This is a private symbol. @attr name com.example.challenge2:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Base attributes that are available to all groups. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p> @attr description Whether the items are capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkableBehavior}. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p> @attr description Whether the items are enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p> @attr description The ID of the group. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p> @attr description The category applied to all items within this group. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p> @attr description The order within the category applied to all items within this group. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p> @attr description Whether the items are shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Base attributes that are available to all Item objects. <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.challenge2:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass com.example.challenge2:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item.</td></tr> <tr><td><code>{@link #MenuItem_actionViewClass com.example.challenge2:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an action view.</td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be called when the item is clicked.</td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr> <tr><td><code>{@link #MenuItem_showAsAction com.example.challenge2:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050 }; /** <p> @attr description An optional layout to be used as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p> @attr description The name of an optional ActionProvider class to instantiate an action view and perform operations such as default action for that menu item. See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p> @attr description The name of an optional View class to instantiate and use as an action view. See {@link android.view.MenuItem#setActionView(android.view.View)} for more info. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p> @attr description The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#alphabeticShortcut}. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p> @attr description Whether the item is capable of displaying a check mark. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checkable}. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p> @attr description Whether the item is checked. Note that you must first have enabled checking with the checkable attribute or else the check mark will not appear. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#checked}. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p> @attr description Whether the item is enabled. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#enabled}. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p> @attr description The icon associated with this item. This icon will not always be shown, so the title should be sufficient in describing this item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#icon}. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p> @attr description The ID of the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#id}. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p> @attr description The category applied to the item. (This will be or'ed with the orderInCategory attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#menuCategory}. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p> @attr description The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#numericShortcut}. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p> @attr description Name of a method on the Context used to inflate the menu that will be called when the item is clicked. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#onClick}. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p> @attr description The order within the category applied to the item. (This will be or'ed with the category attribute.) <p>This corresponds to the global attribute resource symbol {@link android.R.attr#orderInCategory}. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p> @attr description The title associated with the item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#title}. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p> @attr description The condensed title associated with the item. This is used in situations where the normal title may be too long to be displayed. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#titleCondensed}. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p> @attr description Whether the item is shown/visible. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#visible}. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p> @attr description How this item should display in the Action Bar, if present. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead. Mutually exclusive with "ifRoom" and "always". </td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined by the system. Favor this option over "always" where possible. Mutually exclusive with "never" and "always". </td></tr> <tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override the system's limits of how much stuff to put there. This may make your action bar look bad on some screens. In most cases you should use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr> <tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text label with it even if it has an icon representation. </td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu item. When expanded, the action view takes over a larger segment of its container. </td></tr> </table> <p>This is a private symbol. @attr name com.example.challenge2:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x01010435 }; /** <p> @attr description Default background for the menu header. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#headerBackground}. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p> @attr description Default horizontal divider between rows of menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#horizontalDivider}. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p> @attr description Default background for each menu item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemBackground}. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p> @attr description Default disabled icon alpha for each menu item that shows an icon. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemIconDisabledAlpha}. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p> @attr description Default appearance of menu item text. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#itemTextAppearance}. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p> @attr description Whether space should be reserved in layout when an icon is missing. <p>This is a private symbol. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p> @attr description Default vertical divider between menu items. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#verticalDivider}. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p> @attr description Default animations for the menu. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#windowAnimationStyle}. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault com.example.challenge2:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr> <tr><td><code>{@link #SearchView_queryHint com.example.challenge2:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f01005a, 0x7f01005b }; /** <p> @attr description The IME options to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#imeOptions}. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p> @attr description The input type to set on the query text field. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#inputType}. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p> @attr description An optional maximum width of the SearchView. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#maxWidth}. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p> @attr description The default state of the SearchView. If true, it will be iconified when not in use and expanded when clicked. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p> @attr description An optional query hint string to be displayed in the empty query field. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.example.challenge2:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled.</td></tr> <tr><td><code>{@link #Spinner_popupPromptView com.example.challenge2:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown".</td></tr> <tr><td><code>{@link #Spinner_prompt com.example.challenge2:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr> <tr><td><code>{@link #Spinner_spinnerMode com.example.challenge2:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f010051, 0x7f010052, 0x7f010053, 0x7f010054 }; /** <p> @attr description Horizontal offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownHorizontalOffset}. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p> @attr description List selector to use for spinnerMode="dropdown" display. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownSelector}. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p> @attr description Vertical offset from the spinner widget for positioning the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownVerticalOffset}. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p> @attr description Width of the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#dropDownWidth}. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p> @attr description Gravity setting for positioning the currently selected item. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#gravity}. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p> @attr description Background drawable to use for the dropdown in spinnerMode="dropdown". <p>This corresponds to the global attribute resource symbol {@link android.R.attr#popupBackground}. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p> @attr description Whether this spinner should mark child views as enabled/disabled when the spinner itself is enabled/disabled. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p> @attr description Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id {@code @android:id/text1} to be populated with the prompt text. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p> @attr description The prompt to display when the spinner's dialog is shown. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:prompt */ public static final int Spinner_prompt = 6; /** <p> @attr description Display mode for spinner options. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr> <tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown anchored to the spinner widget itself. </td></tr> </table> <p>This is a private symbol. @attr name com.example.challenge2:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** These are the standard attributes that make up a complete 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.challenge2:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.example.challenge2:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.example.challenge2:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme com.example.challenge2:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth com.example.challenge2:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr> <tr><td><code>{@link #Theme_popupMenuStyle com.example.challenge2:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c }; /** <p> @attr description Default ActionBar dropdown style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p> @attr description The preferred item height for dropdown lists. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p> @attr description Drawable used as a background for selected list items. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p> @attr description Default Panel Menu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p> @attr description Default Panel Menu width. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p> @attr description Default PopupMenu style. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>This is a private symbol. @attr name com.example.challenge2:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr> <tr><td><code>{@link #View_paddingEnd com.example.challenge2:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr> <tr><td><code>{@link #View_paddingStart com.example.challenge2:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010038, 0x7f010039 }; /** <p> @attr description Boolean that controls whether a view can take focus. By default the user can not move focus to a view; by setting this attribute to true the view is allowed to take focus. This value does not impact the behavior of directly calling {@link android.view.View#requestFocus}, which will always request focus regardless of this view. It only impacts where focus navigation will try to move focus. <p>This corresponds to the global attribute resource symbol {@link android.R.attr#focusable}. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p> @attr description Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:paddingEnd */ public static final int View_paddingEnd = 2; /** <p> @attr description Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>This is a private symbol. @attr name com.example.challenge2:paddingStart */ public static final int View_paddingStart = 1; }; }
[ "sbqm9@mail.umkc.edu" ]
sbqm9@mail.umkc.edu
8adddf8d7e6de88d8267a4859b2a98c574e4a6fc
ec5d74a95dc02a3adaf0ed03250964c8365b611d
/Android/HealthMatters/app/src/main/java/edu/dartmouth/cs/healthmatters/BeaconMonitor.java
24697a7f40ab7f71bd547f7d04600a3db3f36ca4
[]
no_license
ericlongxuan/HealthMatters
4fda60964f268caf6f18cd0213bf8f851f4a5de1
04d09c2f79d3505f7bbfd67facae5af870763cd7
refs/heads/master
2021-01-11T14:51:25.201499
2017-01-16T15:07:56
2017-01-16T15:07:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,956
java
package edu.dartmouth.cs.healthmatters; import android.app.Notification; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.IBinder; import android.support.v7.app.NotificationCompat; import android.util.Log; import android.widget.Toast; public class BeaconMonitor extends Service { public int running=0; public BeaconMonitor() { } @Override public IBinder onBind(Intent intent) { // TODO: Return the communication channel to the service. throw new UnsupportedOperationException("Not yet implemented"); } @Override public void onCreate() { super.onCreate(); ((AndroidProximityKitReferenceApplication) getApplication()).setBeaconService(this); // if (isRunning) { // SharedPreferences sharedpreferences = getSharedPreferences(Globals.SERVICE_PREFERENCE, Context.MODE_PRIVATE); // int servpref= sharedpreferences.getInt(Globals.SERIVCE_PREF_START, 0); // Log.d("TAGG", "Service--"+servpref); // if(servpref==0) { // sharedpreferences = getSharedPreferences(Globals.SERVICE_PREFERENCE, Context.MODE_PRIVATE); // SharedPreferences.Editor editor = sharedpreferences.edit(); // // editor.putInt(Globals.SERIVCE_PREF_START, 1); // editor.commit(); // // // // } startManager(); } @Override public void onDestroy() { super.onDestroy(); // SharedPreferences sharedpreferences = getSharedPreferences(Globals.SERVICE_PREFERENCE, Context.MODE_PRIVATE); // SharedPreferences.Editor editor = sharedpreferences.edit(); // // editor.putLong(Globals.SERIVCE_PREF_START, 0); // editor.commit(); Log.d("Service", "OnDestroy"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { Intent notificationIntent = new Intent(this, LandingActivity.class); notificationIntent.setAction("edu.dartmouth.cs.healthmatters.LandingActivity"); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); Notification notification = new NotificationCompat.Builder(this) .setContentTitle("HealthMatters") .setContentText("Scanning Beacons") .setSmallIcon(R.drawable.ic_launcher) .setContentIntent(pendingIntent) .setOngoing(true).build(); startForeground(101, notification); return START_STICKY; } private void startManager() { AndroidProximityKitReferenceApplication app = (AndroidProximityKitReferenceApplication) getApplication(); app.startManager(); } }
[ "varun@varunmishra.com" ]
varun@varunmishra.com
6e16b35daa4c9d6519922938dc434bda8f5a8842
b174f5e40f13ba891236dcb26a073b951795f49f
/src/com/company/eckel/generics/coffee/Americano.java
6ed3a4ad68267ff1e145cc417dd4f7a3887d0448
[]
no_license
Shvetsovd/ShildtAndUseful
a18aa2dd300b5c609611cb2a3879dbd46b5672cd
20e63c454d39f8a80b396b906a63d7fc0c9f53e1
refs/heads/master
2020-04-05T11:00:40.397610
2018-07-05T13:24:21
2018-07-05T13:24:21
81,438,612
0
0
null
null
null
null
UTF-8
Java
false
false
121
java
package company.eckel.generics.coffee;//: generics/coffee/Americano.java public class Americano extends Coffee {} ///:~
[ "shvetsovd@gmail.com" ]
shvetsovd@gmail.com
31fec09bf1a5a357ad97125e52b8ea5518b34ed8
8a5d8b1334e2844f2d0174eb812450527a23255e
/src/main/java/com/flycms/module/topic/model/TopicCategory.java
47b26c8e68b94baad77e7b80d1eeb4e73910e793
[ "MIT" ]
permissive
sumsung007/FlyCms
7c39b58b5a16b93b6071d79f532b7b3c7b00e8e1
671ddf52a6f25fc79493ba91ac184b9c66c4f690
refs/heads/master
2020-04-12T14:08:05.741822
2018-12-14T08:29:19
2018-12-14T08:29:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.flycms.module.topic.model; import lombok.Getter; import lombok.Setter; import java.io.Serializable; /** * Open source house, All rights reserved * 版权:28844.com<br/> * 开发公司:28844.com<br/> * * <b>话题分类实体类</b> * * @author sun-kaifei * @version 1.0 <br/> * @email 79678111@qq.com * @Date: 10:26 2018/9/7 */ @Setter @Getter public class TopicCategory implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private Integer fatherId; private String name; private String customUrl; private String keywords; private String description; private Integer isRecommend; private Integer sort; private Integer status; }
[ "79678111@qq.com" ]
79678111@qq.com
d42d143ad3c321316c15e1a25fb1132ea28765e7
1f376e0958540b60255a592c0e752f243a3a79b1
/problems/src/day7/MyTv.java
c806e0af309b82cfebb9307c54ffd4eb4af2c7f8
[]
no_license
wjp241/Java
e360541e8fd321b45b03e8cb1603ac2ed69fcca5
13b0ca1093987a85f630e794a6db3a8ce25fa67a
refs/heads/master
2020-09-26T11:00:31.678330
2019-12-20T08:49:40
2019-12-20T08:49:40
226,240,941
0
0
null
null
null
null
UHC
Java
false
false
1,308
java
package day7; public class MyTv { boolean isPowerOn; int channel; int volume; final int MAX_VOLUME = 100; final int MIN_VOLUME = 0; final int MAX_CHANNEL = 100; final int MIN_CHANNEL = 1; void turnOnOff() { // (1) isPowerOn의 값이 true면 false로, false면 true로 바꾼다. this.isPowerOn = !this.isPowerOn; } void volumeUp() { // (2) volume의 값이 MAX_VOLUME보다 작을 때만 값을 1증가시킨다. if(volume < this.MAX_VOLUME) { volume += 1; } } void volumeDown() { // (3) volume의 값이 MIN_VOLUME보다 클 때만 값을 1감소시킨다. if(this.volume > this.MIN_VOLUME) { this.volume -= 1; } } void channelUp() { // (4) channel의 값을 1증가시킨다. System.out.print(this.channel); this.channel += 1; System.out.print(this.channel); // 만일 channel이 MAX_CHANNEL이면, channel의 값을 MIN_CHANNEL로 바꾼다. if(this.channel == this.MAX_CHANNEL) { this.channel = this.MIN_CHANNEL; } } void channelDown() { // (5) channel의 값을 1감소시킨다. this.channel --; // 만일 channel이 MIN_CHANNEL이면, channel의 값을 MAX_CHANNEL로 바꾼다. if(this.channel == this.MIN_CHANNEL) { this.channel =this. MAX_CHANNEL; } } }
[ "woojae.jay.park@gmail.com" ]
woojae.jay.park@gmail.com
28e0f1cbabb086de6e4165fd8166a0a8a6002a9b
b2538660b4f6d855ab4d4d4429c26025e40d9e2f
/src/main/java/model/util/Dump.java
02b6ac38024cd9bea7dba6b15ff3b2c4e8e9c428
[]
no_license
Syafiqq/skripsi.hdpso.scheduling
0b06e18aa2db657646e6196ea21aef7df0ed60f8
aed84cea961c5842f38b19fed54ddf2fbaf5d353
refs/heads/master
2021-01-19T08:12:45.722605
2017-03-27T03:23:37
2017-03-27T03:23:37
72,266,178
0
0
null
2019-05-21T23:33:26
2016-10-29T05:09:42
Java
UTF-8
Java
false
false
1,003
java
package model.util; /* * This <skripsi.hdpso.scheduling> project created by : * Name : Muhammad Syafiq * Date / Time : 23 January 2017, 6:43 AM. * Email : syafiq.rezpector@gmail.com * Github : syafiqq */ import model.database.component.metadata.DBMSchool; public class Dump { private static DBMSchool school; public static DBMSchool schoolMetadata() { System.err.println("Caution !"); System.err.println("This is for Testing Only"); System.err.println("I Warned You"); //this.schoolMetadata = new DBSchool(1, "Program Teknologi Informasi dan Ilmu Komputer Universitas Brawijaya", "PTIIK UB", "Jl. Veteran No.8, Ketawanggede, Kec. Lowokwaru, Kota Malang, Jawa Timur", "2013 - 2014", 0, 17, 5); Dump.school = new DBMSchool(1, "Program Teknologi Informasi dan Ilmu Komputer Universitas Brawijaya", "2013 - 2014", 0, 17, 5); //Dump.school = new DBMSchool(2, "A", "B", 1, 17, 5); return Dump.school; } }
[ "Syafiq.rezpector@gmail.com" ]
Syafiq.rezpector@gmail.com
51c933202ba6323bf82c4fb3b2900cb9f00a4172
e820097c99fb212c1c819945e82bd0370b4f1cf7
/gwt-sh/src/main/java/com/skynet/spms/manager/stockServiceBusiness/outStockRoomBusiness/PickingListManager.java
d834c159d462002af3f83e04d09ab7850f2bd063
[]
no_license
jayanttupe/springas-train-example
7b173ca4298ceef543dc9cf8ae5f5ea365431453
adc2e0f60ddd85d287995f606b372c3d686c3be7
refs/heads/master
2021-01-10T10:37:28.615899
2011-12-20T07:47:31
2011-12-20T07:47:31
36,887,613
0
0
null
null
null
null
UTF-8
Java
false
false
1,115
java
package com.skynet.spms.manager.stockServiceBusiness.outStockRoomBusiness; import java.util.List; import java.util.Map; import com.skynet.spms.manager.CommonManager;import com.skynet.spms.persistence.entity.stockServiceBusiness.outStockRoomBusiness.pickingList.PickingList; /** * 配料单信息Manager实现类 * @author HDJ * @version 1.0 * @date 2011-07-12 */ public interface PickingListManager extends CommonManager<PickingList>{ /** * 删除配料单相关信息 * @param number */ public void deletePickingList(String number); /** * 获取配料单相关信息 * @param values * @param startRow * @param endRow * @return 配料单相关信息 */ public List<PickingList> getPickingList(Map values, int startRow, int endRow); /** * 保存配料单相关信息 * @param pickingList * @return 配料单相关信息 */ public PickingList SavePickingList(PickingList pickingList); /** * 更新状态 * @param pickingListIDs * @param status */ public void updateStatus(String[] pickingListIDs, String status); }
[ "usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d" ]
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
e218d90ff55176dc1995b73b88be0e964f7e5c00
7f0cd86680d8c9e9a2f9ad04d593ca9e0ab87afc
/d-Pag-Fatura/src/test/java/br/com/impacta/DPagFaturaApplicationTests.java
6a0ccb2ad8a79d1c6af0c0d3feb137b6f073a66d
[]
no_license
danilo562/trabalho_microService_
91bdbbc54680aee6a953e1d94b66e5162ce33600
2e5e67cddca1676aff4255e062bf47e4acaae77c
refs/heads/main
2023-08-25T12:00:27.832224
2021-09-28T12:17:01
2021-09-28T12:17:01
403,793,130
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package br.com.impacta; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DPagFaturaApplicationTests { @Test void contextLoads() { } }
[ "danilo.novaes@hotmail.com.br" ]
danilo.novaes@hotmail.com.br
74374f542c075e9448d892325e41110af9e55baf
f752864c51bee3db874dd441c897b5b9e2631892
/RemoteP2PServer/src/main/java/remotep2p/DiscoveryEndpoint.java
6a07953643a0ad161c28355a73160e96df88c3ad
[ "MIT" ]
permissive
sreeraaman/jReto
22924b7ed51c14d5c18130e711d2579870eb23dd
0ba21eea6d9b0ab18ce6fae725162e5766f40d98
refs/heads/master
2021-01-18T06:39:10.862918
2016-03-07T12:52:33
2016-03-07T12:52:33
52,070,579
0
0
null
2016-02-19T07:44:59
2016-02-19T07:44:58
null
UTF-8
Java
false
false
3,019
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 remotep2p; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.websocket.CloseReason; import javax.websocket.EndpointConfig; import javax.websocket.OnClose; import javax.websocket.OnError; import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; /** * * @author jasamer */ @ServerEndpoint("/discovery") public class DiscoveryEndpoint { /// Logger to write to server logs. private static final Logger LOGGER = Logger.getLogger(DiscoveryEndpoint.class.getName()); @OnOpen public void onOpen(Session session, EndpointConfig conf) throws IOException { LOGGER.log(Level.INFO, "Discovery connection opened {0}", conf); } @OnMessage public void binaryMessage(byte[] data, Session session) throws IOException { RemoteP2PPacket packet = RemoteP2PPacket.packetFromData(data); if (packet == null) { LOGGER.log(Level.WARNING, "Discovery connection received invalid data."); return; } switch (packet.type) { case RemoteP2PPacket.START_ADVERTISEMENT: ConnectionManager.getInstance().startAdvertisingPeer(packet.uuid, session); break; case RemoteP2PPacket.STOP_ADVERTISEMENT: ConnectionManager.getInstance().stopAdvertisingPeer(packet.uuid, session); break; case RemoteP2PPacket.START_BROWSING: ConnectionManager.getInstance().startSendingDiscoveryUpdates(session); break; case RemoteP2PPacket.STOP_BROWSING: ConnectionManager.getInstance().stopSendingDiscoveryUpdates(session); break; default: LOGGER.log(Level.WARNING, "Discovery connection received invalid packet. You may only send START_ADVERTISEMENT and STOP_ADVERTISEMENT packets to the server."); } } /** * Called when a RemotePeer closes the connection to the server. * Informs other RemotePeers about the peer loss. * @param session WebSocket session of the RemotePeer * @param closeReason Reason why a web socket has been closed. * @throws java.io.IOException */ @OnClose public void onClose(Session session, CloseReason closeReason) throws IOException { LOGGER.log(Level.INFO, "Discovery connection closed {0}", closeReason); ConnectionManager.getInstance().removeDiscoveryConnection(session); } @OnError public void onError(Session session, Throwable t) throws IOException { LOGGER.log(Level.INFO, "Error occured {0}", t); ConnectionManager.getInstance().removeDiscoveryConnection(session); } }
[ "krusche@in.tum.de" ]
krusche@in.tum.de
d00d072d0ef99ac9b0d9b46818a8ab6204803762
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/frameworks/support/v8/renderscript/java/src/android/support/v8/renderscript/RenderScriptThunker.java
bb6bf7366f27200100e1f3714401dec51089ef4c
[]
no_license
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
4,826
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.support.v8.renderscript; import java.lang.reflect.Field; import java.lang.reflect.Method; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.os.Process; import android.util.Log; import android.view.Surface; class RenderScriptThunker extends RenderScript { android.renderscript.RenderScript mN; void validate() { if (mN == null) { throw new RSInvalidStateException("Calling RS with no Context active."); } } public void setPriority(Priority p) { try { if (p == Priority.LOW) mN.setPriority(android.renderscript.RenderScript.Priority.LOW); if (p == Priority.NORMAL) mN.setPriority(android.renderscript.RenderScript.Priority.NORMAL); } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } RenderScriptThunker(Context ctx) { super(ctx); isNative = true; } public static RenderScript create(Context ctx, int sdkVersion) { try { RenderScriptThunker rs = new RenderScriptThunker(ctx); Class<?> javaRS = Class.forName("android.renderscript.RenderScript"); Class[] signature = {Context.class, Integer.TYPE}; Object[] args = {ctx, new Integer(sdkVersion)}; Method create = javaRS.getDeclaredMethod("create", signature); rs.mN = (android.renderscript.RenderScript)create.invoke(null, args); return rs; } catch(android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } catch (Exception e) { throw new RSRuntimeException("Failure to create platform RenderScript context"); } } public void contextDump() { try { mN.contextDump(); } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } public void finish() { try { mN.finish(); } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } public void destroy() { try { mN.destroy(); mN = null; } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } public void setMessageHandler(RSMessageHandler msg) { mMessageCallback = msg; try { android.renderscript.RenderScript.RSMessageHandler handler = new android.renderscript.RenderScript.RSMessageHandler() { public void run() { mMessageCallback.mData = mData; mMessageCallback.mID = mID; mMessageCallback.mLength = mLength; mMessageCallback.run(); } }; mN.setMessageHandler(handler); } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } public void setErrorHandler(RSErrorHandler msg) { mErrorCallback = msg; try { android.renderscript.RenderScript.RSErrorHandler handler = new android.renderscript.RenderScript.RSErrorHandler() { public void run() { mErrorCallback.mErrorMessage = mErrorMessage; mErrorCallback.mErrorNum = mErrorNum; mErrorCallback.run(); } }; mN.setErrorHandler(handler); } catch (android.renderscript.RSRuntimeException e) { throw ExceptionThunker.convertException(e); } } boolean equals(Object obj1, Object obj2) { if (obj2 instanceof android.support.v8.renderscript.BaseObj) { return ((android.renderscript.BaseObj)obj1).equals(((android.support.v8.renderscript.BaseObj)obj2).getNObj()); } return false; } }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
8d3f6f571fc307b016e89e6444b8c696e2be13d8
89a8678c469f4b2176e595f7645a520fafc7e6db
/news_app/clientcloud/src/main/java/com/github/clientcloud/commons/TokenVerifier.java
3def1190430f00ef148eb4edcb65fc545e388516
[]
no_license
qxf1991415/news_app
c1a20e46a6b7aef0be6068067ddfa24cda6809a3
aa28b7e870ff145acd077cdffde4dca17d0a5472
refs/heads/master
2021-01-24T06:42:06.166315
2017-12-26T09:09:56
2017-12-26T09:09:56
93,313,791
1
0
null
null
null
null
UTF-8
Java
false
false
3,369
java
package com.github.clientcloud.commons; import android.content.Context; import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; import com.github.clientcloud.ApiServer; import com.github.clientcloud.Utils; import com.google.gson.Gson; import java.io.IOException; import java.util.Arrays; import java.util.List; import okhttp3.Interceptor; import okhttp3.Response; /** * @author quanxf * @description * @date 2017/9/21 */ class TokenVerifier implements Interceptor { public static final String INTENT_ACTION_NEW_TOKEN = "com.github.clientcloud.commons.TokenVerifier.NEW_TOKEN"; public static final String INTENT_ACTION_INVALID_TOKEN = "com.github.clientcloud.commons.TokenVerifier.INVALID_TOKEN"; public static final String INTENT_KEY_ACCESS_TOKEN = "accessToken"; public static final String INTENT_KEY_API_SERVER = "apiServer"; private static final String ACCESS_TOKEN = "accessToken"; private final ApiServer apiServer; private final Context context; private final boolean isUpdateDefaultConfig; private static List<String> invalidCodeList = Arrays.asList( "21016", "B00007-21016", "21018", "B00007-21018", "21019", "B00007-21019"); public TokenVerifier(ApiServer apiServer, boolean isUpdateDefaultTokenConfig, Context context) { this.apiServer = apiServer; this.context = context; this.isUpdateDefaultConfig = isUpdateDefaultTokenConfig; } @Override public Response intercept(Chain chain){ Response response = null; try { response = chain.proceed(chain.request()); } catch (IOException e) { e.printStackTrace(); } String bodyString = null; try { bodyString = Utils.getResponseBodyAsString(response); } catch (IOException e) { e.printStackTrace(); } try { CommonResponse commonResponse = new Gson().fromJson(bodyString, CommonResponse.class); String retCode = commonResponse.getRetCode(); if (invalidCodeList.contains(retCode)) { Intent intent = new Intent(INTENT_ACTION_INVALID_TOKEN) .putExtra(INTENT_KEY_API_SERVER, apiServer.getClass().getName()); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } } catch (Exception ignored) { // nothing } String accessToken = response.header(ACCESS_TOKEN); String lastAccessToken = apiServer.getConfig(ApiServer.Config.ACCESS_TOKEN); if (accessToken != null && !accessToken.equals(lastAccessToken)) { apiServer.setConfig(ApiServer.Config.ACCESS_TOKEN, accessToken); if (isUpdateDefaultConfig) { ApiServer.setDefaultConfig(ApiServer.Config.ACCESS_TOKEN, accessToken); } if (context == null) { return response; } Intent intent = new Intent(INTENT_ACTION_NEW_TOKEN) .putExtra(INTENT_KEY_ACCESS_TOKEN, accessToken) .putExtra(INTENT_KEY_API_SERVER, apiServer.getClass().getName()); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } return response; } }
[ "532210356@qq.com" ]
532210356@qq.com
a1845cb3804feec02b859c82136005fd3004433d
b8df78e99d32dc5ac43b3755d2985d115a8c6cb1
/WhipperSnapper/app/src/main/java/com/al/whippersnapper/utils/GifDecoder.java
179a72d21d3ddffb3aaf7a1ffb5457f409097e4e
[]
no_license
edzstrock/WhipperSnapper
9e380c1ebd2691224742210d085042d191e9b7c3
2182085818ef2f5899fdb8fdfe7d8a757652a483
refs/heads/master
2021-12-23T18:27:14.569694
2017-11-19T04:46:34
2017-11-19T04:46:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,076
java
/* * Taken from http://code.google.com/p/animated-gifs-in-android/ * Original source: http://code.google.com/p/animated-gifs-in-android/source/browse/trunk/AnimatedGifs/src/eu/andlabs/tutorial/animatedgifs/decoder/GifDecoder.java * */ package com.al.whippersnapper.utils; import java.io.InputStream; import java.util.Vector; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; public class GifDecoder { /** * File read status: No errors. */ public static final int STATUS_OK = 0; /** * File read status: Error decoding file (may be partially decoded) */ public static final int STATUS_FORMAT_ERROR = 1; /** * File read status: Unable to open source. */ public static final int STATUS_OPEN_ERROR = 2; /** max decoder pixel stack size */ protected static final int MAX_STACK_SIZE = 4096; public static final int MIN_DELAY = 100; public static final int MIN_DELAY_ENFORCE_THRESHOLD = 20; protected InputStream in; protected int status; protected int width; // full image width protected int height; // full image height protected boolean gctFlag; // global color table used protected int gctSize; // size of global color table protected int loopCount = 1; // iterations; 0 = repeat forever protected int[] gct; // global color table protected int[] lct; // local color table protected int[] act; // active color table protected int bgIndex; // background color index protected int bgColor; // background color protected int lastBgColor; // previous bg color protected int pixelAspect; // pixel aspect ratio protected boolean lctFlag; // local color table flag protected boolean interlace; // interlace flag protected int lctSize; // local color table size protected int ix, iy, iw, ih; // current image rectangle protected int lrx, lry, lrw, lrh; protected Bitmap image; // current frame protected Bitmap lastBitmap; // previous frame protected byte[] block = new byte[256]; // current data block protected int blockSize = 0; // block size last graphic control extension info protected int dispose = 0; // 0=no action; 1=leave in place; 2=restore to bg; 3=restore to prev protected int lastDispose = 0; protected boolean transparency = false; // use transparent color protected int delay = 0; // delay in milliseconds protected int transIndex; // transparent color index // LZW decoder working arrays protected short[] prefix; protected byte[] suffix; protected byte[] pixelStack; protected byte[] pixels; protected Vector<GifFrame> frames; // frames read from current file protected int frameCount; private boolean readComplete; public GifDecoder() { readComplete = false; } private static class GifFrame { public GifFrame(Bitmap im, int del) { image = im; delay = del; } public Bitmap image; public int delay; } /** * Gets display duration for specified frame. * * @param n * int index of frame * @return delay in milliseconds */ public int getDelay(int n) { delay = -1; if ((n >= 0) && (n < frameCount)) { delay = frames.elementAt(n).delay; //meets browser compatibility standards if (delay < MIN_DELAY_ENFORCE_THRESHOLD) delay = MIN_DELAY; } return delay; } /** * Gets the number of frames read from file. * * @return frame count */ public int getFrameCount() { return frameCount; } /** * Gets the first (or only) image read. * * @return BufferedBitmap containing first frame, or null if none. */ public Bitmap getBitmap() { return getFrame(0); } /** * Gets the "Netscape" iteration count, if any. A count of 0 means repeat indefinitiely. * * @return iteration count if one was specified, else 1. */ public int getLoopCount() { return loopCount; } /** * Creates new frame image from current data (and previous frames as specified by their disposition codes). */ protected void setPixels() { // expose destination image's pixels as int array int[] dest = new int[width * height]; // fill in starting image contents based on last image's dispose code if (lastDispose > 0) { if (lastDispose == 3) { // use image before last int n = frameCount - 2; if (n > 0) { lastBitmap = getFrame(n - 1); } else { lastBitmap = null; } } if (lastBitmap != null) { lastBitmap.getPixels(dest, 0, width, 0, 0, width, height); // copy pixels if (lastDispose == 2) { // fill last image rect area with background color int c = 0; if (!transparency) { c = lastBgColor; } for (int i = 0; i < lrh; i++) { int n1 = (lry + i) * width + lrx; int n2 = n1 + lrw; for (int k = n1; k < n2; k++) { dest[k] = c; } } } } } // copy each source line to the appropriate place in the destination int pass = 1; int inc = 8; int iline = 0; for (int i = 0; i < ih; i++) { int line = i; if (interlace) { if (iline >= ih) { pass++; switch (pass) { case 2: iline = 4; break; case 3: iline = 2; inc = 4; break; case 4: iline = 1; inc = 2; break; default: break; } } line = iline; iline += inc; } line += iy; if (line < height) { int k = line * width; int dx = k + ix; // start of line in dest int dlim = dx + iw; // end of dest line if ((k + width) < dlim) { dlim = k + width; // past dest edge } int sx = i * iw; // start of line in source while (dx < dlim) { // map color and insert in destination int index = ((int) pixels[sx++]) & 0xff; int c = act[index]; if (c != 0) { dest[dx] = c; } dx++; } } } image = Bitmap.createBitmap(dest, width, height, Config.ARGB_4444); } /** * Gets the image contents of frame n. * * @return BufferedBitmap representation of frame, or null if n is invalid. */ public Bitmap getFrame(int n) { if (frameCount <= 0) return null; n = n % frameCount; return ((GifFrame) frames.elementAt(n)).image; } /** * Reads GIF image from stream * * @param is * containing GIF file. * @return read status code (0 = no errors) */ public int read(InputStream is) { init(); if (is != null) { in = is; readHeader(); if (!err()) { readContents(); if (frameCount < 0) { status = STATUS_FORMAT_ERROR; } } } else { status = STATUS_OPEN_ERROR; } readComplete = true; return status; } public void complete() { readContents(); try { in.close(); } catch (Exception e) { } } /** * Decodes LZW image data into pixel array. Adapted from John Cristy's BitmapMagick. */ protected void decodeBitmapData() { int nullCode = -1; int npix = iw * ih; int available, clear, code_mask, code_size, end_of_information, in_code, old_code, bits, code, count, i, datum, data_size, first, top, bi, pi; if ((pixels == null) || (pixels.length < npix)) { pixels = new byte[npix]; // allocate new pixel array } if (prefix == null) { prefix = new short[MAX_STACK_SIZE]; } if (suffix == null) { suffix = new byte[MAX_STACK_SIZE]; } if (pixelStack == null) { pixelStack = new byte[MAX_STACK_SIZE + 1]; } // Initialize GIF data stream decoder. data_size = read(); clear = 1 << data_size; end_of_information = clear + 1; available = clear + 2; old_code = nullCode; code_size = data_size + 1; code_mask = (1 << code_size) - 1; for (code = 0; code < clear; code++) { prefix[code] = 0; // XXX ArrayIndexOutOfBoundsException suffix[code] = (byte) code; } // Decode GIF pixel stream. datum = bits = count = first = top = pi = bi = 0; for (i = 0; i < npix;) { if (top == 0) { if (bits < code_size) { // Load bytes until there are enough bits for a code. if (count == 0) { // Read a new data block. count = readBlock(); if (count <= 0) { break; } bi = 0; } datum += (((int) block[bi]) & 0xff) << bits; bits += 8; bi++; count--; continue; } // Get the next code. code = datum & code_mask; datum >>= code_size; bits -= code_size; // Interpret the code if ((code > available) || (code == end_of_information)) { break; } if (code == clear) { // Reset decoder. code_size = data_size + 1; code_mask = (1 << code_size) - 1; available = clear + 2; old_code = nullCode; continue; } if (old_code == nullCode) { pixelStack[top++] = suffix[code]; old_code = code; first = code; continue; } in_code = code; if (code == available) { pixelStack[top++] = (byte) first; code = old_code; } while (code > clear) { pixelStack[top++] = suffix[code]; code = prefix[code]; } first = ((int) suffix[code]) & 0xff; // Add a new string to the string table, if (available >= MAX_STACK_SIZE) { break; } pixelStack[top++] = (byte) first; prefix[available] = (short) old_code; suffix[available] = (byte) first; available++; if (((available & code_mask) == 0) && (available < MAX_STACK_SIZE)) { code_size++; code_mask += available; } old_code = in_code; } // Pop a pixel off the pixel stack. top--; pixels[pi++] = pixelStack[top]; i++; } for (i = pi; i < npix; i++) { pixels[i] = 0; // clear missing pixels } } /** * Returns true if an error was encountered during reading/decoding */ protected boolean err() { return status != STATUS_OK; } /** * Initializes or re-initializes reader */ protected void init() { status = STATUS_OK; frameCount = 0; frames = new Vector<GifFrame>(); gct = null; lct = null; } /** * Reads a single byte from the input stream. */ protected int read() { int curByte = 0; try { curByte = in.read(); } catch (Exception e) { status = STATUS_FORMAT_ERROR; } return curByte; } /** * Reads next variable length block from input. * * @return number of bytes stored in "buffer" */ protected int readBlock() { blockSize = read(); int n = 0; if (blockSize > 0) { try { int count = 0; while (n < blockSize) { count = in.read(block, n, blockSize - n); if (count == -1) { break; } n += count; } } catch (Exception e) { e.printStackTrace(); } if (n < blockSize) { status = STATUS_FORMAT_ERROR; } } return n; } /** * Reads color table as 256 RGB integer values * * @param ncolors * int number of colors to read * @return int array containing 256 colors (packed ARGB with full alpha) */ protected int[] readColorTable(int ncolors) { int nbytes = 3 * ncolors; int[] tab = null; byte[] c = new byte[nbytes]; int n = 0; try { n = in.read(c); } catch (Exception e) { e.printStackTrace(); } if (n < nbytes) { status = STATUS_FORMAT_ERROR; } else { tab = new int[256]; // max size to avoid bounds checks int i = 0; int j = 0; while (i < ncolors) { int r = ((int) c[j++]) & 0xff; int g = ((int) c[j++]) & 0xff; int b = ((int) c[j++]) & 0xff; tab[i++] = 0xff000000 | (r << 16) | (g << 8) | b; } } return tab; } /** * Main file parser. Reads GIF content blocks. */ protected void readContents() { // read GIF file content blocks boolean done = false; while (!(done || err())) { int code = read(); switch (code) { case 0x2C: // image separator readBitmap(); if(!readComplete) return; break; case 0x21: // extension code = read(); switch (code) { case 0xf9: // graphics control extension readGraphicControlExt(); break; case 0xff: // application extension readBlock(); String app = ""; for (int i = 0; i < 11; i++) { app += (char) block[i]; } if (app.equals("NETSCAPE2.0")) { readNetscapeExt(); } else { skip(); // don't care } break; case 0xfe:// comment extension skip(); break; case 0x01:// plain text extension skip(); break; default: // uninteresting extension skip(); } break; case 0x3b: // terminator done = true; break; case 0x00: // bad byte, but keep going and see what happens break; default: status = STATUS_FORMAT_ERROR; } } } /** * Reads Graphics Control Extension values */ protected void readGraphicControlExt() { read(); // block size int packed = read(); // packed fields dispose = (packed & 0x1c) >> 2; // disposal method if (dispose == 0) { dispose = 1; // elect to keep old image if discretionary } transparency = (packed & 1) != 0; delay = readShort() * 10; // delay in milliseconds transIndex = read(); // transparent color index read(); // block terminator } /** * Reads GIF file header information. */ protected void readHeader() { String id = ""; for (int i = 0; i < 6; i++) { id += (char) read(); } if (!id.startsWith("GIF")) { status = STATUS_FORMAT_ERROR; return; } readLSD(); if (gctFlag && !err()) { gct = readColorTable(gctSize); bgColor = gct[bgIndex]; } } /** * Reads next frame image */ protected void readBitmap() { ix = readShort(); // (sub)image position & size iy = readShort(); iw = readShort(); ih = readShort(); int packed = read(); lctFlag = (packed & 0x80) != 0; // 1 - local color table flag interlace lctSize = (int) Math.pow(2, (packed & 0x07) + 1); // 3 - sort flag // 4-5 - reserved lctSize = 2 << (packed & 7); // 6-8 - local color // table size interlace = (packed & 0x40) != 0; if (lctFlag) { lct = readColorTable(lctSize); // read table act = lct; // make local table active } else { act = gct; // make global table active if (bgIndex == transIndex) { bgColor = 0; } } int save = 0; if (transparency) { save = act[transIndex]; act[transIndex] = 0; // set transparent color if specified } if (act == null) { status = STATUS_FORMAT_ERROR; // no color table defined } if (err()) { return; } decodeBitmapData(); // decode pixel data skip(); if (err()) { return; } frameCount++; // create new image to receive frame data image = Bitmap.createBitmap(width, height, Config.ARGB_4444); setPixels(); // transfer pixel data to image frames.addElement(new GifFrame(image, delay)); // add image to frame // list if (transparency) { act[transIndex] = save; } resetFrame(); } /** * Reads Logical Screen Descriptor */ protected void readLSD() { // logical screen size width = readShort(); height = readShort(); // packed fields int packed = read(); gctFlag = (packed & 0x80) != 0; // 1 : global color table flag // 2-4 : color resolution // 5 : gct sort flag gctSize = 2 << (packed & 7); // 6-8 : gct size bgIndex = read(); // background color index pixelAspect = read(); // pixel aspect ratio } /** * Reads Netscape extenstion to obtain iteration count */ protected void readNetscapeExt() { do { readBlock(); if (block[0] == 1) { // loop count sub-block int b1 = ((int) block[1]) & 0xff; int b2 = ((int) block[2]) & 0xff; loopCount = (b2 << 8) | b1; } } while ((blockSize > 0) && !err()); } /** * Reads next 16-bit value, LSB first */ protected int readShort() { // read 16-bit value, LSB first return read() | (read() << 8); } /** * Resets frame state for reading next image. */ protected void resetFrame() { lastDispose = dispose; lrx = ix; lry = iy; lrw = iw; lrh = ih; lastBitmap = image; lastBgColor = bgColor; dispose = 0; transparency = false; delay = 0; lct = null; } /** * Skips variable length blocks up to and including next zero length block. */ protected void skip() { do { readBlock(); } while ((blockSize > 0) && !err()); } }
[ "asweigart@gmail.com" ]
asweigart@gmail.com
2237b4a861fec5fd6012e0a260fbf2f81b53ae57
75868715f63dc99cb3887752ae1d887957ca8289
/src/main/java/com/bupt/app/multivrPC/action/StatisticsPCAction.java
7f5b5d10145765b09b2e41b206d0579e3ccffebe
[ "MIT" ]
permissive
litongbupt/DataAnalyzePlatform
5f34ddca7650ba6f268f6b5c9e4556169fa24086
c90fef921978c5025559bfb3c8b24d76896e568e
refs/heads/master
2016-09-11T15:14:12.335176
2013-10-14T03:36:15
2013-10-14T03:36:15
12,428,086
1
4
null
2016-03-09T21:06:06
2013-08-28T08:03:59
JavaScript
UTF-8
Java
false
false
4,588
java
package com.bupt.app.multivrPC.action; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.bupt.app.multivrPC.dto.StatisticsPCDTO; import com.bupt.app.multivrPC.model.StatisticsPC; import com.bupt.app.multivrPC.service.StatisticsPCService; import com.bupt.core.base.action.DataRequest; import com.bupt.core.base.action.JqGridBaseAction; import com.bupt.core.base.dto.ParameterDTO; import com.bupt.core.base.dto.SelectOptionDTO; import com.bupt.core.base.util.ExcelExporter; import com.bupt.core.base.util.ExportParameter; /** * PC多VR中统计查询的controller * @author litong * */ @Controller @RequestMapping("/pc_statistics") public class StatisticsPCAction extends JqGridBaseAction<StatisticsPCDTO>{ private final Log log = LogFactory.getLog(getClass()); private boolean debug = log.isDebugEnabled(); @Resource(name="statisticsPCService") private StatisticsPCService statisticsPCService; @Override public List<StatisticsPCDTO> listResults(int start, int limit, String sortName, String sortOrder, HttpServletRequest request, Boolean search) { return this.statisticsPCService.listResults(start, limit, sortName, sortOrder, request,search); } @Override public Integer getTotalRecords(HttpServletRequest request, Boolean search) { return statisticsPCService.getTotalRecords(request, search); } /** * * 获取导出的字段的默认属性 * @Title: getDefaultCols * @param mapping * @param form * @param request * @param response * @return * @throws IOException * @throws ServletException */ @RequestMapping("/getDefaultExportCols.do") @ResponseBody public Map<String,List<SelectOptionDTO>> getDefaultCols( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //读取导出字段默认属性 List<SelectOptionDTO> columns = new ArrayList<SelectOptionDTO>(); Map<String, ParameterDTO> paramMap = ExportParameter.getExportInfos().get("MULTIVR_PC_STATISTICS").getParams(); for(String p : paramMap.keySet()){ ParameterDTO pd = paramMap.get(p); if(pd.isShow()){ SelectOptionDTO option = new SelectOptionDTO(); option.setValue(pd.getName()); option.setName(pd.getShowName()); option.setSelected(pd.isSelected()); columns.add(option); } } //放入Map返回结果 Map<String,List<SelectOptionDTO>> dto = new HashMap<String,List<SelectOptionDTO>>(); dto.put("columns", columns); return dto; } /** * 导出数据 * @param maxRecords 导出条数 * @param sortName 以哪个字段排序 * @param sortOrder asc,desc * @param selectCols 导出的字段列表 * @param request HttpServletRequest * @param response HttpServletResponse * @throws IOException * @throws ServletException * @author 李彤 2013-8-27 下午11:22:22 */ @RequestMapping("/export.do") public void export(@RequestParam(value = "maxRecords") Integer maxRecords, @RequestParam(value = "sortName") String sortName, @RequestParam(value = "sortOrder") String sortOrder, @RequestParam(value = "search") Boolean search, @RequestParam(value = "selectCols") String selectCols, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // 获取导出参数,及查询参数 DataRequest param = new DataRequest(); // 设置查询条件 param.setRequest(request); param.setSearch(search); param.setMaxRecords(maxRecords); param.setSortName(sortName); param.setSortOrder(sortOrder); param.setFileName("PC多VR统计查询"); param.setSelectCols(selectCols); //获取导出的默认设置 Map<String, ParameterDTO> paramMap = ExportParameter.getExportInfos().get( "MULTIVR_PC_STATISTICSPC").getParams(); // 导出服务 ExcelExporter<StatisticsPC, StatisticsPCDTO> exporter = new ExcelExporter<StatisticsPC, StatisticsPCDTO>(); exporter.setService(this.statisticsPCService); exporter.setParam(param); exporter.setParamMap(paramMap); exporter.export(response); } }
[ "litong@sogou-inc.com" ]
litong@sogou-inc.com
88f370a81a3603da2294bad5f35003f11a8cc37f
9b744f4107ba146cc0e7a4718e2109a50cba38d3
/src/DesignPattern04_AbstractFactory/LowCarFactory.java
d589d2f405193754b7c7275d1dceb7e97800957f
[]
no_license
zy1995625s/DesignPattern
e74c19a4fdce35464312f2eebcb5a380607b683c
61d1a9d1aa4c636cf40ecc82f825fe0107d0d9c5
refs/heads/master
2020-04-10T05:05:15.212214
2019-02-02T06:54:20
2019-02-02T06:54:20
160,817,242
1
0
null
null
null
null
UTF-8
Java
false
false
323
java
package DesignPattern04_AbstractFactory; public class LowCarFactory implements CarFactory { @Override public Engine createEngine() { return new LowEngine(); } @Override public Seat createSeat() { return new LowSeat(); } @Override public Tyre createTyre() { return new LowTyre(); } }
[ "zy1995625s@gamil.com" ]
zy1995625s@gamil.com
8b175dabf191d021b8a809666073d4d493948f0d
e3d687856b25d2b9616a581c26eff509375a668b
/src/progettosovarrialeluca/Negozio.java
9432af72b0ca00da8631ab4bc90da0d1a8893810
[]
no_license
domoluca/ProgettoSOVarrialeLuca
ce2562b6f524ec44c50b7a44c9c128b5cbb6457b
90e113a56fc252df1ba491c4f4405e34c0ce3e4d
refs/heads/master
2020-05-17T22:22:31.714299
2013-01-08T15:37:59
2013-01-08T15:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,034
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package progettosovarrialeluca; import java.util.*; import java.util.concurrent.locks.*; /** * * @author Luca */ public class Negozio{ int richieste; int richiestaAttuale; int contatore = 0; int chiave = 2; boolean permesso = true; boolean dormi = true; Lock lockHash = null; BabboNatale babboNatale; Stack stack; Hashtable<Integer, Integer> hash = null; public Negozio(int rc){ this.richieste = rc; // this.babboNatale = babboNatale; } public int richiestaRegalo(){ if(richieste > 0){ richieste--; richiestaAttuale++; } return richiestaAttuale; } public void help(int pid){ //this.hash = new Hashtable<Integer, Integer>(); Stack stack = new Stack(); Lock lockHash = new ReentrantLock(); if (contatore < 2){ lockHash.lock(); //hash.put(contatore, pid); stack.push(pid); System.out.println("ho posizionato nella hashtable il regalo "+pid+ " contatore = "+(contatore)); //System.out.println("ho pushato: "+stack.pop()); lockHash.unlock(); contatore++; } else{ permesso = false; dormi = false; } } public void risolvi(){ // this.hash = new Hashtable<Integer, Integer>(); //Lock lockHash = new ReentrantLock(); //permesso = false; //dormi = false; //lockHash.lock(); while (chiave >= 0){ //hash.get(chiave); //stack.pop(); //int pidAttuale = stack.pop(); System.out.println("Babbo Natale aggiusta il regalo "+stack.pop()); //this.hash.remove(chiave); try{BabboNatale.sleep(200); }catch(Exception e){ System.out.println(e);} chiave--; } this.lockHash.unlock(); this.dormi = true; this.permesso = true; } }
[ "lcvarriale@gmail.com" ]
lcvarriale@gmail.com
cb0f5c5795511adaa19d29eb2809c06213711a3a
3380022e392149c2d6d19a9fef02f18285fde007
/citybike-war/src/main/java/edu/citybike/controller/RegistrationController.java
f055eaf68e0278093ca5a18cd014af76c1ddbef2
[]
no_license
weakpoint/CityBike
8af905f885bc7c4319403b3c2bfb31b7059a437c
937c59a4fbce898a6dcd342323fd088c4a59a77e
refs/heads/master
2020-12-25T18:18:40.821420
2014-06-18T21:11:08
2014-06-18T21:11:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,769
java
package edu.citybike.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.google.appengine.api.datastore.Transaction; import edu.citybike.database.DatabaseFacade; import edu.citybike.database.exception.PersistenceException; import edu.citybike.model.view.UserInfo; @Controller public class RegistrationController { private static final Logger logger = LoggerFactory.getLogger(RegistrationController.class); private DatabaseFacade facade; public DatabaseFacade getFacade() { return facade; } public void setFacade(DatabaseFacade facade) { this.facade = facade; } @RequestMapping("/registration") public String showAddBikeForm(ModelMap map) { map.addAttribute("formAction", "/register.do"); return "userdata"; } @ModelAttribute("userInfo") public UserInfo addUserModel(){ return new UserInfo(); } @RequestMapping(value = "/register.do", method = RequestMethod.POST) public String registerUser(@ModelAttribute("user") UserInfo userInfo, ModelMap map){ //sprawdzanie czy mail sie nie powtarza // Transaction tr = facade.getTransaction(); try { facade.add(userInfo.getCredentials()); facade.add(userInfo.getUser()); tr.commit(); return "redirect:/"; } catch (PersistenceException e) { logger.error("Error during registration: "+e.getMessage()); tr.rollback(); } map.addAttribute("userInfo", userInfo); return "userData"; } }
[ "emil.1990@interia.pl" ]
emil.1990@interia.pl
d9b992ff84b7c54bd3f010a846ba6c737a293603
0c23cc6dabfb8c4c0e7b2d1a42cc12c906e7ef73
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/exception/DashboardServerException.java
b42242e08ab5b2416b334af034082f2aa6d870ec
[ "Apache-2.0" ]
permissive
wso2/product-mi-tooling
c1f3dcab7b7bcec1358476e4e8324ce6e0efb799
5522741c62e13360356f03f5789d76ff92b91d2f
refs/heads/master
2023-09-01T00:02:46.128922
2023-07-17T10:31:15
2023-07-17T10:31:15
216,485,666
40
53
Apache-2.0
2023-09-04T04:45:57
2019-10-21T05:37:19
Java
UTF-8
Java
false
false
1,226
java
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * * */ package org.wso2.ei.dashboard.core.exception; /** * RuntimeException to throw when exception/error is caught inside dashboard server. */ public class DashboardServerException extends RuntimeException { public DashboardServerException() { super(); } public DashboardServerException(String message) { super(message); } public DashboardServerException(String message, Throwable cause) { super(message, cause); } public DashboardServerException(Throwable cause) { super(cause); } }
[ "dulanjalidilmi@gmail.com" ]
dulanjalidilmi@gmail.com
8daf8e4c55c77bf6adc769d807b349eb4437c86d
bffbaa2469689e5f0227b4ccfbbe79395f5753c0
/app/src/main/java/com/wintersoldier/diabetesportal/metadata/query/QueryFilterBean.java
fc8ba434338dff42dda45f85a55da4029b6c3ad1
[]
no_license
marcdubybroad/DiabetesPortalAndroid
9fabccdd7059fa004cec94e7b3c0f8de4664fb1a
5a41da38f3b160249662069285973601f2606e1e
refs/heads/master
2016-09-05T20:26:07.121615
2015-11-07T00:56:28
2015-11-07T00:56:28
39,903,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
package com.wintersoldier.diabetesportal.metadata.query; import com.wintersoldier.diabetesportal.bean.Property; /** * Created by mduby on 9/3/15. */ public class QueryFilterBean implements QueryFilter { // instance variables Property property; String operator; String value; /** * default constructor * * @param property * @param operator * @param value */ public QueryFilterBean(Property property, String operator, String value) { this.property = property; this.operator = operator; this.value = value; } /** * returns the filter string for the property and values given * * @return */ public String getFilterString() { return (this.property == null ? "" : property.getWebServiceFilterString(operator, value)); } public Property getProperty() { return property; } public String getOperator() { return operator; } public String getValue() { return value; } }
[ "mduby@broadinstitute.org" ]
mduby@broadinstitute.org
1b4ffdcd90a2054683ecc73c59bffcbebcd022e4
6ae307399ef9cf162620acc59ca0c76ab6c06d2a
/forge/mcp/temp/src/minecraft/net/minecraft/command/CommandWeather.java
b121db0ceeb6ce3b8513fd229b09667c593be068
[ "BSD-3-Clause" ]
permissive
SuperStarGamesNetwork/IronManMod
b153ee5024066bf1ea74d7e2fc88848044801b30
6ae7ae4bb570e95a28048b991dec9e126da3d5e3
refs/heads/master
2021-01-16T18:29:24.771631
2014-08-08T14:08:52
2014-08-08T14:08:52
15,351,078
1
0
null
2013-12-21T04:20:44
2013-12-21T00:00:10
Java
UTF-8
Java
false
false
2,280
java
package net.minecraft.command; import java.util.List; import java.util.Random; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; import net.minecraft.server.MinecraftServer; import net.minecraft.world.WorldServer; import net.minecraft.world.storage.WorldInfo; public class CommandWeather extends CommandBase { public String func_71517_b() { return "weather"; } public int func_82362_a() { return 2; } public String func_71518_a(ICommandSender p_71518_1_) { return "commands.weather.usage"; } public void func_71515_b(ICommandSender p_71515_1_, String[] p_71515_2_) { if(p_71515_2_.length >= 1 && p_71515_2_.length <= 2) { int var3 = (300 + (new Random()).nextInt(600)) * 20; if(p_71515_2_.length >= 2) { var3 = func_71532_a(p_71515_1_, p_71515_2_[1], 1, 1000000) * 20; } WorldServer var4 = MinecraftServer.func_71276_C().field_71305_c[0]; WorldInfo var5 = var4.func_72912_H(); var5.func_76080_g(var3); var5.func_76090_f(var3); if("clear".equalsIgnoreCase(p_71515_2_[0])) { var5.func_76084_b(false); var5.func_76069_a(false); func_71522_a(p_71515_1_, "commands.weather.clear", new Object[0]); } else if("rain".equalsIgnoreCase(p_71515_2_[0])) { var5.func_76084_b(true); var5.func_76069_a(false); func_71522_a(p_71515_1_, "commands.weather.rain", new Object[0]); } else { if(!"thunder".equalsIgnoreCase(p_71515_2_[0])) { throw new WrongUsageException("commands.weather.usage", new Object[0]); } var5.func_76084_b(true); var5.func_76069_a(true); func_71522_a(p_71515_1_, "commands.weather.thunder", new Object[0]); } } else { throw new WrongUsageException("commands.weather.usage", new Object[0]); } } public List func_71516_a(ICommandSender p_71516_1_, String[] p_71516_2_) { return p_71516_2_.length == 1?func_71530_a(p_71516_2_, new String[]{"clear", "rain", "thunder"}):null; } }
[ "Perry@Perrys-Mac-Pro.local" ]
Perry@Perrys-Mac-Pro.local
23231bc64b734ede78c1bb99e970a5386756bde3
54db9b91c141fe6f88fe3b4a540114bf565e4e52
/src/tasks_05/task0514.java
9e1b06496e41c1d5300d60e95685a6cf31e6ba82
[]
no_license
Dizigin/JRTasks
2a2c40fbc1a4e685168d25f71a263866f393ee97
fb314ffd0388683bd611671a69e841e88e8c8aa7
refs/heads/master
2022-03-25T23:21:56.607431
2022-02-08T11:48:56
2022-02-08T11:48:56
137,733,123
1
0
null
null
null
null
UTF-8
Java
false
false
1,697
java
package tasks_05; public class task0514 { /* Создать class Person. У человека должно быть имя String name, возраст int age. Добавь метод initialize(String name, int age), в котором проинициализируй переменные name и age. В методе main создай объект Person, занеси его ссылку в переменную person. Вызови метод initialize с любыми значениями. Требования: 1. Класс Solution должен содержать класс Person. 2. У класса Person должна быть переменная name с типом String. 3. У класса Person должна быть переменная age с типом int. 4. У класса Person должен быть метод initialize, принимающий в качестве параметра имя, возраст и инициализирующий соответствующие переменные класса. 5. Необходимо создать объект типа Person и занести его ссылку в переменную person. 6. Необходимо вызвать метод initialize у созданного объекта и передать в него какие-либо параметр public class Solution { public static void main(String[] args) { Person person = new Person(); person.initialize("Sega",18); } static class Person { String name; int age; public void initialize(String name, int age){ this.name = name; this.age = age; } } } */ }
[ "dizigin@yandex.ru" ]
dizigin@yandex.ru
cd923ca43a5375d88c3ed49ca4ce342cbf4bed14
a305344e9aba9789b239c259265786f5e107a144
/src/main/java/commands/util/MusicController.java
76be2c734c34417470e34d133fb6b36bc1379a7a
[]
no_license
pumabryant/doinkerbot
ce8d57b3e074bda73925c1576f15923101d4b405
8f619cb6f459bbfb02cd86f6de8e88e4851f5f0c
refs/heads/master
2021-01-09T03:53:35.079292
2020-02-21T21:46:42
2020-02-24T22:19:04
242,236,199
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package commands.util; import com.sedmelluq.discord.lavaplayer.track.AudioTrack; import commands.music.GuildMusicManager; import commands.music.PlayCommand; import net.dv8tion.jda.api.entities.Guild; public class MusicController { }
[ "bcollaguazo@conversantmedia.com" ]
bcollaguazo@conversantmedia.com
aac590dca1b6ad09b73410aa674b666c0992d61b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-85b-3-3-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/distribution/AbstractContinuousDistribution_ESTest.java
2bb61779b2cc50c9d5dfcdb4bffc4851512563c9
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
/* * This file was automatically generated by EvoSuite * Thu Apr 02 05:04:55 UTC 2020 */ package org.apache.commons.math.distribution; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractContinuousDistribution_ESTest extends AbstractContinuousDistribution_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2eb9afed7835c6c3738be9c37d780fc6a0af025b
449f1c5afd55c5dbba7841fd9b06b358bf6a015d
/src/Database_functions/StudentDb.java
24ba86bdafaf02ffba22932c494d501abe48f099
[]
no_license
divyang001/DBMS_project
acf0fe547be58f6a7e0da4dfcbaf5210feec847b
fd847f8bfea97a42203789528ea6e112994635b6
refs/heads/master
2021-01-17T19:56:45.845274
2016-10-17T21:28:15
2016-10-17T21:28:15
64,774,824
0
0
null
null
null
null
UTF-8
Java
false
false
9,543
java
package Database_functions; import DatabaseConnection.DbConnect; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import models.MarksModel; import models.ParentModel; import models.StudentModel; import sample.Student; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /** * Created by divyang on 7/9/16. */ public class StudentDb { StudentModel obj=new StudentModel(); public StudentModel details(String id) { Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.MakeConnection(); preparedStatement = connection.prepareStatement("SELECT* FROM student WHERE id=? "); preparedStatement.setString(1, id); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { obj.setName(resultSet.getString("name")); obj.setId(resultSet.getString("id")); obj.setAddress(resultSet.getString("address")); obj.setDob(resultSet.getString("dob")); } } catch (SQLException e1) { e1.printStackTrace(); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } return obj; } public StudentModel acaddetails(String id) { Connection connection = null; Connection connection1 = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.MakeConnection(); preparedStatement = connection.prepareStatement("SELECT* FROM academic_details WHERE id=? "); preparedStatement.setString(1, id); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { int branchs; int school; int programs; int teacher; obj.setId(resultSet.getString("id")); branchs=resultSet.getInt("branch_id"); school=resultSet.getInt("school_id"); programs=resultSet.getInt("program_id"); teacher=resultSet.getInt("Faculty_id"); PreparedStatement preparedStatement1 = null; ResultSet resultSet1 = null; connection1 = DbConnect.MakeConnection(); preparedStatement1 = connection1.prepareStatement("SELECT branch_name FROM branch WHERE branch_id=? "); preparedStatement1.setInt(1, branchs); resultSet1 = preparedStatement1.executeQuery(); if(resultSet1.next()) { obj.setBranch(resultSet1.getString("branch_name")); } else { obj.setBranch("hey"); } preparedStatement1 = connection1.prepareStatement("SELECT * FROM school WHERE school_id=? "); preparedStatement1.setInt(1, school); resultSet1 = preparedStatement1.executeQuery(); if(resultSet1.next()) { obj.setSchool(resultSet1.getString("school_name")); } else { } preparedStatement1 = connection1.prepareStatement("SELECT program_name FROM program WHERE program_id=? "); preparedStatement1.setInt(1, programs); resultSet1 = preparedStatement1.executeQuery(); if(resultSet1.next()) { obj.setDepartment(resultSet1.getString("program_name")); } else { } preparedStatement1 = connection1.prepareStatement("SELECT Faculty_name FROM facultyprofile WHERE faculty_id=? "); preparedStatement1.setInt(1, teacher); resultSet1 = preparedStatement1.executeQuery(); if(resultSet1.next()) { obj.setProctor(resultSet1.getString("Faculty_name")); } else { } } } catch (SQLException e1) { e1.printStackTrace(); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } return obj; } public ParentModel parentdetails(String id) { ParentModel obj1=new ParentModel(); Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.MakeConnection(); preparedStatement = connection.prepareStatement("SELECT* FROM parent_info WHERE id=? "); preparedStatement.setString(1, id); resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { obj1.setName(resultSet.getString("parent_name")); obj1.setOccupation(resultSet.getString("occupation")); obj1.setContact(resultSet.getNString("contact_no")); } } catch (SQLException e1) { e1.printStackTrace(); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } return obj1; } public ObservableList<MarksModel> marks(String id){ ObservableList<MarksModel> list= FXCollections.observableArrayList(); Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.MakeConnection(); preparedStatement = connection.prepareStatement("SELECT* FROM divyang.grade WHERE id=? "); preparedStatement.setString(1, id); resultSet = preparedStatement.executeQuery(); while (resultSet.next()) { MarksModel obj= new MarksModel(); obj.setCourseCode(resultSet.getString("course_id")); obj.setCat(resultSet.getInt("cat")); obj.setPbl(resultSet.getInt("pbl")); obj.setFat(resultSet.getInt("fat")); obj.setGrade(resultSet.getString("grade")); list.add(obj); } } catch (SQLException e1) { e1.printStackTrace(); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } return list; } public ObservableList<MarksModel> ats(String id){ ObservableList<MarksModel> list= FXCollections.observableArrayList(); Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; try { connection = DbConnect.MakeConnection(); preparedStatement = connection.prepareStatement("SELECT* FROM divyang.attendance WHERE id=? "); preparedStatement.setString(1, id); resultSet = preparedStatement.executeQuery(); while (resultSet.next()) { MarksModel obj= new MarksModel(); obj.setCourseCode(resultSet.getString("course_id")); obj.setAttendance(resultSet.getInt("attendance")); list.add(obj); } } catch (SQLException e1) { e1.printStackTrace(); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection != null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } return list; } }
[ "divyang.duhan07@gmail.com" ]
divyang.duhan07@gmail.com
8e382ee600b926f348bdb9feb847c765143c1fc9
433fa890b08d483b4928f59a703863bd1680f8fd
/AngryCars/cocos2d_android/src/main/java/org/cocos2d/actions/CCScheduler.java
4c5ae86bf8f0ca5846fc4c13cc21c4d212134740
[]
no_license
GregChaves/GregChaves
e0ec2fb4a6ee0255fdebd1e45528a3c81e7918e5
ab944472979dfa0bb0b5bdc3314ebb95435ab8ca
refs/heads/master
2021-01-22T16:10:28.534814
2017-09-15T15:03:57
2017-09-15T15:03:57
102,390,397
2
0
null
null
null
null
UTF-8
Java
false
false
25,956
java
package org.cocos2d.actions; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; import org.cocos2d.config.ccConfig; import org.cocos2d.utils.collections.ConcurrentArrayHashMap; // // CCScheduler // /** Scheduler is responsible of triggering the scheduled callbacks. You should not use NSTimer. Instead use this class. There are 2 different types of callbacks (selectors): - update selector: the 'update' selector will be called every frame. You can customize the priority. - custom selector: A custom selector will be called every frame, or with a custom interval of time The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'. */ public class CCScheduler { // A list double-linked list used for "updates with priority" private static class tListEntry { // struct _listEntry *prev, *next; public Method impMethod; public UpdateCallback callback; // instead of method invocation public Object target; // not retained (retained by hashUpdateEntry) public int priority; public boolean paused; }; // Hash Element used for "selectors with interval" private static class tHashSelectorEntry { ArrayList<CCTimer> timers; Object target; // hash key (retained) ArrayList<tListEntry> list; tListEntry entry; int timerIndex; CCTimer currentTimer; boolean currentTimerSalvaged; boolean paused; void setPaused(boolean b){ paused = b; if (entry != null){ entry.paused = b; } } // UT_hash_handle hh; } // // "updates with priority" stuff // ArrayList<tListEntry> updatesNeg; // list of priority < 0 ArrayList<tListEntry> updates0; // list priority == 0 ArrayList<tListEntry> updatesPos; // list priority > 0 // Used for "selectors with interval" ConcurrentArrayHashMap<Object, tHashSelectorEntry> hashForSelectors; ConcurrentHashMap<Object, tHashSelectorEntry> hashForUpdates; tListEntry currentEntry; tHashSelectorEntry currentTarget; boolean currentTargetSalvaged; // Optimization // Method impMethod; String updateSelector; /** Modifies the time of all scheduled callbacks. You can use this property to create a 'slow motion' or 'fast fordward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast fordward' effect, use values higher than 1.0. @since v0.8 @warning It will affect EVERY scheduled selector / action. */ private float timeScale_; public float getTimeScale() { return timeScale_; } public void setTimeScale(float ts) { timeScale_ = ts; } private static CCScheduler _sharedScheduler = null; /** returns a shared instance of the Scheduler */ public static CCScheduler sharedScheduler() { if (_sharedScheduler != null) { return _sharedScheduler; } synchronized (CCScheduler.class) { if (_sharedScheduler == null) { _sharedScheduler = new CCScheduler(); } return _sharedScheduler; } } /** purges the shared scheduler. It releases the retained instance. @since v0.99.0 */ public static void purgeSharedScheduler() { _sharedScheduler = null; } private CCScheduler() { timeScale_ = 1.0f; // used to trigger CCTimer#update updateSelector = "update"; // try { // impMethod = CCTimer.class.getMethod(updateSelector, Float.TYPE); // } catch (NoSuchMethodException e) { // impMethod = null; // e.printStackTrace(); // } // updates with priority updates0 = new ArrayList<tListEntry>(); updatesNeg = new ArrayList<tListEntry>(); updatesPos = new ArrayList<tListEntry>(); hashForUpdates = new ConcurrentHashMap<Object, tHashSelectorEntry>(); hashForSelectors = new ConcurrentArrayHashMap<Object, tHashSelectorEntry>(); // selectors with interval currentTarget = null; currentTargetSalvaged = false; } // private void removeHashElement(Object key, tHashSelectorEntry element){ // removeHashElement(element); // hashForSelectors.remove(key); // } // // private void removeHashElement(tHashSelectorEntry element) // { // element.timers.clear(); // element.timers = null; // element.target = null; // } /** 'tick' the scheduler. You should NEVER call this method, unless you know what you are doing. */ public void tick(float dt) { if( timeScale_ != 1.0f ) dt *= timeScale_; currentTargetSalvaged = false; // updates with priority < 0 synchronized (updatesNeg) { int len = updatesNeg.size(); try { // BRIGOSX 24JUL2012 protect execution flaw for (int i = 0; i < len; i++) { tListEntry e = updatesNeg.get(i); currentEntry = e; if( ! e.paused ) { if(e.callback !=null) { e.callback.update(dt); } else { try { e.impMethod.invoke(e.target, dt); } catch (InvocationTargetException e1) { if(e1.getTargetException() instanceof RuntimeException) throw (RuntimeException)e1.getTargetException(); else e1.printStackTrace(); } catch (Exception e1) { e1.printStackTrace(); } } if(currentTargetSalvaged) { updatesNeg.remove(i); i--; len--; currentTargetSalvaged = false; } } } } catch(IndexOutOfBoundsException e) { e.printStackTrace(); } currentEntry = null; } // updates with priority == 0 synchronized (updates0) { int len = updates0.size(); try { // BRIGOSX 24JUL2012 protect execution flaw for(int i=0; i < len; i++) { tListEntry e = updates0.get(i); currentEntry = e; if( ! e.paused ) { if(e.callback !=null) { e.callback.update(dt); } else { try { e.impMethod.invoke(e.target, dt); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } if(currentTargetSalvaged) { updates0.remove(i); i--; len--; currentTargetSalvaged = false; } } } } catch(IndexOutOfBoundsException e) { e.printStackTrace(); } currentEntry = null; } // updates with priority > 0 synchronized (updatesPos) { int len = updatesPos.size(); try { // BRIGOSX 24JUL2012 protect execution flaw for (int i=0; i < len; i++) { tListEntry e = updatesPos.get(i); currentEntry = e; if( ! e.paused ) { if(e.callback !=null) { e.callback.update(dt); } else { try { e.impMethod.invoke(e.target, dt); } catch (Exception e1) { e1.printStackTrace(); } } if(currentTargetSalvaged) { updatesPos.remove(i); i--; len--; currentTargetSalvaged = false; } } } } catch(IndexOutOfBoundsException e) { e.printStackTrace(); } currentEntry = null; } for(ConcurrentArrayHashMap<Object, tHashSelectorEntry>.Entry e = hashForSelectors.firstValue(); e != null; e = hashForSelectors.nextValue(e)) { tHashSelectorEntry elt = e.getValue(); currentTarget = elt; currentTargetSalvaged = false; if( ! currentTarget.paused && elt.timers != null) { // The 'timers' ccArray may change while inside this loop. for( elt.timerIndex = 0; elt.timerIndex < elt.timers.size(); elt.timerIndex++) { elt.currentTimer = elt.timers.get(elt.timerIndex); elt.currentTimerSalvaged = false; elt.currentTimer.update(dt); if( elt.currentTimerSalvaged ) { // The currentTimer told the remove itself. To prevent the timer from // accidentally deallocating itself before finishing its step, we retained // it. Now that step is done, it's safe to release it. elt.currentTimer = null; } elt.currentTimer = null; } } // elt, at this moment, is still valid // so it is safe to ask this here (issue #490) // elt=elt->hh.next; // only delete currentTarget if no actions were scheduled during the cycle (issue #481) if( currentTargetSalvaged && currentTarget.timers.isEmpty()) { // removeHashElement(elt); hashForSelectors.remove(elt.target); // [self removeHashElement:currentTarget]; } } currentTarget = null; // } } static class SchedulerTimerAlreadyScheduled extends RuntimeException { /** * */ private static final long serialVersionUID = 5996803998420105321L; public SchedulerTimerAlreadyScheduled(String reason) { super(reason); } } static class SchedulerTimerNotFound extends RuntimeException { /** * */ private static final long serialVersionUID = -1912889437889458701L; public SchedulerTimerNotFound(String reason) { super(reason); } } /** The scheduled method will be called every 'interval' seconds. If paused is YES, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it recommened to use 'scheduleUpdateForTarget:' instead. @since v0.99.3 */ public void schedule(String selector, Object target, float interval, boolean paused) { assert selector != null: "Argument selector must be non-nil"; assert target != null: "Argument target must be non-nil"; tHashSelectorEntry element = hashForSelectors.get(target); if( element == null ) { element = new tHashSelectorEntry(); element.target = target; hashForSelectors.put(target, element); // Is this the 1st element ? Then set the pause level to all the selectors of this target element.paused = paused; } else { assert element.paused == paused : "CCScheduler. Trying to schedule a selector with a pause value different than the target"; } if( element.timers == null) { element.timers = new ArrayList<CCTimer>(); }/* else if( element.timers.size() == element.timers ) ccArrayDoubleCapacity(element->timers); */ CCTimer timer = new CCTimer(target, selector, interval); element.timers.add(timer); } /* * This is java way version, uses interface based callbacks. UpdateCallback in this case. * It would be preffered solution. It is more polite to Java, GC, and obfuscation. */ public void schedule(UpdateCallback callback, Object target, float interval, boolean paused) { assert callback != null: "Argument callback must be non-nil"; assert target != null: "Argument target must be non-nil"; tHashSelectorEntry element = hashForSelectors.get(target); if( element == null ) { element = new tHashSelectorEntry(); element.target = target; hashForSelectors.put(target, element); // Is this the 1st element ? Then set the pause level to all the selectors of this target element.paused = paused; } else { assert element.paused == paused : "CCScheduler. Trying to schedule a selector with a pause value different than the target"; } if( element.timers == null) { element.timers = new ArrayList<CCTimer>(); }/* else if( element.timers.size() == element.timers ) ccArrayDoubleCapacity(element->timers); */ CCTimer timer = new CCTimer(target, callback, interval); element.timers.add(timer); } /** Unshedules a selector for a given target. If you want to unschedule the "update", use unscheudleUpdateForTarget. @since v0.99.3 */ public void unschedule(String selector, Object target) { // explicity handle nil arguments when removing an object if( target==null || selector==null) return; assert target != null: "Target MUST not be null"; assert selector != null: "Selector MUST not be null"; tHashSelectorEntry element = hashForSelectors.get(target); if( element != null ) { for( int i=0; i< element.timers.size(); i++ ) { CCTimer timer = element.timers.get(i); if(selector.equals(timer.getSelector())) { if( timer == element.currentTimer && !element.currentTimerSalvaged ) { element.currentTimerSalvaged = true; } element.timers.remove(i); // update timerIndex in case we are in tick:, looping over the actions if( element.timerIndex >= i ) element.timerIndex--; if( element.timers.isEmpty()) { if( currentTarget == element ) { currentTargetSalvaged = true; } else { hashForSelectors.remove(element.target); // this.removeHashElement(element.target, element); } } return; } } } // Not Found // NSLog(@"CCScheduler#unscheduleSelector:forTarget: selector not found: %@", selString); } /* * This is java way version, uses interface based callbacks. UpdateCallback in this case. * It would be preffered solution. It is more polite to Java, GC, and obfuscation. */ public void unschedule(UpdateCallback callback, Object target) { // explicity handle nil arguments when removing an object if( target==null || callback==null) return; assert target != null: "Target MUST not be null"; assert callback != null: "Selector MUST not be null"; tHashSelectorEntry element = hashForSelectors.get(target); if( element != null ) { for( int i=0; i< element.timers.size(); i++ ) { CCTimer timer = element.timers.get(i); if(callback == timer.getCallback()) { if( timer == element.currentTimer && !element.currentTimerSalvaged ) { element.currentTimerSalvaged = true; } element.timers.remove(i); // update timerIndex in case we are in tick:, looping over the actions if( element.timerIndex >= i ) element.timerIndex--; if( element.timers.isEmpty()) { if( currentTarget == element ) { currentTargetSalvaged = true; } else { hashForSelectors.remove(element.target); // this.removeHashElement(element.target, element); } } return; } } } // Not Found // NSLog(@"CCScheduler#unscheduleSelector:forTarget: selector not found: %@", selString); } /** Unschedules the update selector for a given target @since v0.99.3 */ public void unscheduleUpdate(Object target) { if( target == null ) return; tHashSelectorEntry entry = hashForUpdates.get(target); if ( entry == null ) return; synchronized (entry.list) { if(currentEntry==entry.entry) { currentTargetSalvaged = true; } else { entry.list.remove(entry.entry); } } hashForUpdates.remove(target); } /** Unschedules all selectors for a given target. This also includes the "update" selector. @since v0.99.3 */ public void unscheduleAllSelectors(Object target) { // TODO Auto-generated method stub // explicit nil handling if( target == null ) return; // Custom Selectors tHashSelectorEntry element = hashForSelectors.get(target); if( element != null) { if(!element.currentTimerSalvaged ) { // element.currentTimer retain; element.currentTimerSalvaged = true; } element.timers.clear(); // ccArrayRemoveAllObjects(element->timers); if( currentTarget == element ) currentTargetSalvaged = true; else { hashForSelectors.remove(element.target); // this.removeHashElement(element.target, element); // [self removeHashElement:element]; } } // Update Selector this.unscheduleUpdate(target); } /** Unschedules all selectors from all targets. You should NEVER call this method, unless you know what you are doing. @since v0.99.3 */ public void unscheduleAllSelectors() { // Custom Selectors for(ConcurrentArrayHashMap<Object, tHashSelectorEntry>.Entry e = hashForSelectors.firstValue(); e != null; e = hashForSelectors.nextValue(e)) { tHashSelectorEntry element = e.getValue(); Object target = element.target; unscheduleAllSelectors(target); } // Updates selectors for (tListEntry entry:updates0) { unscheduleUpdate(entry.target); } for (tListEntry entry:updatesNeg) { unscheduleUpdate(entry.target); } for (tListEntry entry:updatesPos) { unscheduleUpdate(entry.target); } } /** Resumes the target. The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. If the target is not present, nothing happens. @since v0.99.3 */ public void resume(Object target) { assert target != null: "target must be non nil"; // Custom Selectors tHashSelectorEntry element = hashForSelectors.get(target); if( element != null ) element.paused = false; // Update selector tHashSelectorEntry elementUpdate = hashForUpdates.get(target); if( elementUpdate != null) { assert elementUpdate.target != null: "resumeTarget: unknown error"; elementUpdate.setPaused(false); } } /** Pauses the target. All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens. @since v0.99.3 */ public void pause(Object target) { assert target != null: "target must be non nil"; // Custom selectors tHashSelectorEntry element = hashForSelectors.get(target); if( element != null ) element.paused = true; // Update selector tHashSelectorEntry elementUpdate = hashForUpdates.get(target); if( elementUpdate != null) { assert elementUpdate.target != null:"pauseTarget: unknown error"; elementUpdate.setPaused(true); } } /** Schedules the 'update' selector for a given target with a given priority. The 'update' selector will be called every frame. The lower the priority, the earlier it is called. @since v0.99.3 */ public void scheduleUpdate(Object target, int priority, boolean paused) { // TODO Auto-generated method stub if (ccConfig.COCOS2D_DEBUG >= 1) { tHashSelectorEntry hashElement = hashForUpdates.get(target); assert hashElement == null:"CCScheduler: You can't re-schedule an 'update' selector'. Unschedule it first"; } // most of the updates are going to be 0, that's why there // is an special list for updates with priority 0 if( priority == 0 ) { this.append(updates0, target, paused); } else if( priority < 0 ) { this.priority(updatesNeg, target, priority, paused); } else { // priority > 0 this.priority(updatesPos, target, priority, paused); } } /* * This is java way version, uses interface based callbacks. UpdateCallback in this case. * It would be preffered solution. It is more polite to Java, GC, and obfuscation. * Target class must implement UpdateCallback or scheduleUpdate will be used. */ public void scheduleUpdate(UpdateCallback target, int priority, boolean paused) { // TODO Auto-generated method stub if (ccConfig.COCOS2D_DEBUG >= 1) { tHashSelectorEntry hashElement = hashForUpdates.get(target); assert hashElement == null:"CCScheduler: You can't re-schedule an 'update' selector'. Unschedule it first"; } // most of the updates are going to be 0, that's way there // is an special list for updates with priority 0 if( priority == 0 ) { this.append(updates0, target, paused); } else if( priority < 0 ) { this.priority(updatesNeg, target, priority, paused); } else { // priority > 0 this.priority(updatesPos, target, priority, paused); } } /** schedules a Timer. It will be fired in every frame. @deprecated Use scheduleSelector:forTarget:interval:paused instead. Will be removed in 1.0 */ public void scheduleTimer(CCTimer timer) { assert false: "Not implemented. Use scheduleSelector:forTarget:"; } /** unschedules an already scheduled Timer @deprecated Use unscheduleSelector:forTarget. Will be removed in v1.0 */ public void unscheduleTimer(CCTimer timer) { assert false: "Not implemented. Use unscheduleSelector:forTarget:"; } /** unschedule all timers. You should NEVER call this method, unless you know what you are doing. @deprecated Use scheduleAllSelectors instead. Will be removed in 1.0 @since v0.8 */ public void unscheduleAllTimers() { assert false:"Not implemented. Use unscheduleAllSelectors"; } @Override public void finalize () throws Throwable { unscheduleAllSelectors(); _sharedScheduler = null; super.finalize(); } public void append(ArrayList<tListEntry> list, Object target, boolean paused) { tListEntry listElement = new tListEntry(); listElement.target = target; listElement.paused = paused; if(target instanceof UpdateCallback) { listElement.callback = (UpdateCallback)target; } else { try { listElement.impMethod = target.getClass().getMethod(updateSelector, Float.TYPE); } catch (NoSuchMethodException e) { e.printStackTrace(); } } synchronized (list) { list.add(listElement); } // update hash entry for quicker access tHashSelectorEntry hashElement = new tHashSelectorEntry(); hashElement.target = target; hashElement.list = list; hashElement.entry = listElement; hashForUpdates.put(target, hashElement); } public void priority(ArrayList<tListEntry> list, Object target, int priority, boolean paused) { tListEntry listElement = new tListEntry(); listElement.target = target; listElement.priority = priority; listElement.paused = paused; if(target instanceof UpdateCallback) { listElement.callback = (UpdateCallback)target; } else { try { listElement.impMethod = target.getClass().getMethod(updateSelector, Float.TYPE); } catch (NoSuchMethodException e) { e.printStackTrace(); } } synchronized (list) { if(list.isEmpty()) { list.add(listElement); } else { boolean added = false; int len = list.size(); for( int i = 0; i < len; i++ ) { tListEntry elem = list.get(i); if( priority < elem.priority ) { list.add(i, listElement); added = true; break; } } // Not added? priority has the higher value. Append it. if( !added ) list.add(listElement); } } tHashSelectorEntry hashElement = new tHashSelectorEntry(); hashElement.target = target; hashElement.list = list; hashElement.entry = listElement; hashForUpdates.put(target, hashElement); } }
[ "GregChaves@users.noreply.github.com" ]
GregChaves@users.noreply.github.com
5d6b3d87e4f25ff81b104c00322c2df5401b272c
827bf064e482700d7ded2cd0a3147cb9657db883
/source_NewVersion/src/com/google/gson/internal/bind/TypeAdapters$16.java
cf38d3e6015617681d5456c3958b330bd43f533c
[]
no_license
cody0117/LearnAndroid
d30b743029f26568ccc6dda4313a9d3b70224bb6
02fd4d2829a0af8a1706507af4b626783524813e
refs/heads/master
2021-01-21T21:10:18.553646
2017-02-12T08:43:24
2017-02-12T08:43:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,519
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.gson.internal.bind; import com.google.gson.JsonIOException; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import java.net.URI; import java.net.URISyntaxException; // Referenced classes of package com.google.gson.internal.bind: // TypeAdapter class extends TypeAdapter { public volatile Object read(JsonReader jsonreader) { return read(jsonreader); } public URI read(JsonReader jsonreader) { if (jsonreader.peek() != JsonToken.NULL) goto _L2; else goto _L1 _L1: jsonreader.nextNull(); _L4: return null; _L2: String s = jsonreader.nextString(); if ("null".equals(s)) goto _L4; else goto _L3 _L3: URI uri = new URI(s); return uri; URISyntaxException urisyntaxexception; urisyntaxexception; throw new JsonIOException(urisyntaxexception); } public volatile void write(JsonWriter jsonwriter, Object obj) { write(jsonwriter, (URI)obj); } public void write(JsonWriter jsonwriter, URI uri) { String s; if (uri == null) { s = null; } else { s = uri.toASCIIString(); } jsonwriter.value(s); } () { } }
[ "em3888@gmail.com" ]
em3888@gmail.com
8aad07d1e9840af14e9ff2c2847381602f41b3f2
1e4a5709117af05efc9f0f504a21be0e5c3f2799
/src/main/java/pl/coderslab/service/MemoryBookService.java
327abdc3a16e2e50edc4de43a2e11e99ad3ff26d
[]
no_license
chwostian/warsztaty_SPRING_REST
cd9be38081032c8ab372e5751a49237aa0243702
acadb64f2f5346eeb6ec0cccc4d0f526dae00287
refs/heads/master
2020-04-07T02:29:34.406578
2018-11-17T16:10:33
2018-11-17T16:10:33
157,978,743
0
0
null
null
null
null
UTF-8
Java
false
false
1,336
java
package pl.coderslab.service; import org.springframework.stereotype.Service; import pl.coderslab.model.Book; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Predicate; @Service public class MemoryBookService { private List<Book> list; public MemoryBookService() { list = new ArrayList<>(); list.add(new Book("9788324631766","Bruce Eckel","Helion","programming")); list.add(new Book("9788324627738","Sierra Kathy, Bates Bert","Helion","programming")); list.add(new Book("9780130819338","Cay Horstmann, Gary Cornell","Helion","programming")); } public List<Book> getList() {return list;} public void setList(List<Book> list) {this.list = list;} public Book addList(Book book) {this.list.add(book); return book;} public Book getBookById(Long id) { return this.list.stream().filter(p->p.getId() == id).findFirst().orElse(null); } public Book changeBook(Long id, Book book) { Book book1 = getBookById(id); book1.setAuthor(book.getAuthor()); book1.setIsbn(book.getIsbn()); book1.setPublisher(book.getPublisher()); book1.setType(book.getType()); return book1; } public void deleteBook(Long id) { this.list.remove(getBookById(id)); } }
[ "chwostian@post.pl" ]
chwostian@post.pl
37bd4e69a74ce758c646e39050b331bc01a8d42d
6e72d0817b0b6d0b91081f00e0e64b64377da907
/src/main/java/com/example/loginApplication/Exception/Domain/EmailExistException.java
0144b7d5d34d2cccc9db097514e14680cfc05587
[]
no_license
LRygl/loginApplication
e9872e43a8b58219480d94aa9ee16924fc3a00de
c65901b823e3104335138affafd55596ff9425d6
refs/heads/master
2023-05-09T00:22:09.929811
2021-05-27T07:58:35
2021-05-27T07:58:35
371,118,707
1
0
null
null
null
null
UTF-8
Java
false
false
189
java
package com.example.loginApplication.Exception.Domain; public class EmailExistException extends Exception{ public EmailExistException(String message) { super(message); } }
[ "lubomir.rygl@aevi.com" ]
lubomir.rygl@aevi.com
83b665110b9f2bf31b9f2574640faaf9d464f1f4
ec21bf852ba1f21f66089c6615c1fadcf74fc127
/src/main/java/com/program/entity/Product.java
9b320419447d1b1eecb34ab2676a004b326e1e42
[]
no_license
uyennhi/springmvc-project
467d051d189ae2d73bccd8b5138e550746e0004c
0a98ad5b7c62138f2e67362d0dd12328f6f58e8e
refs/heads/master
2022-12-21T23:22:42.377694
2020-04-27T13:22:07
2020-04-27T13:22:07
252,989,608
0
0
null
2022-12-16T04:47:27
2020-04-04T12:22:22
Java
UTF-8
Java
false
false
2,480
java
package com.program.entity; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.program.entity.Brand; import com.program.utility.JsonDateSerializer; @Entity @Table(name = "product") public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "product_id") private int productId; @Column(name = "product_name") private String productName; @Column(name = "quantity") private int quantity; @Column(name = "price") private Double price; @Column(name = "sale_date") @Temporal(TemporalType.DATE) private Date saleDate; @Column(name = "image") private String image; @Column(name = "description") private String description; @JoinColumn(name = "brand_id", referencedColumnName = "brand_id") @ManyToOne(fetch = FetchType.EAGER) private Brand brandEntity; public Product() { } public int getProductId() { return productId; } public void setProductId(int productId) { this.productId = productId; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } @JsonSerialize(using = JsonDateSerializer.class) public Date getSaleDate() { return saleDate; } @JsonSerialize(using = JsonDateSerializer.class) public void setSaleDate(Date saleDate) { this.saleDate = saleDate; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Brand getBrandEntity() { return brandEntity; } public void setBrandEntity(Brand brandEntity) { this.brandEntity = brandEntity; } }
[ "uyennhinguyentruong@gmail.com" ]
uyennhinguyentruong@gmail.com
8e68b99321001ea2449e87f555a3be7884e661a9
81f6433670bead1cc73496e0853cd3793bee3a3e
/src/main/java/com/example/accessingneo4jdatarest/AccessingNeo4jDataRestApplication.java
440cfdc9ff6155cf99b6439e9d574aea720cae63
[]
no_license
hmiyakoshi0803/accessing-neo4j-data-rest
86476f02dccb5264f0e1e4157e115af18cb50819
329f8a058295a14fe1d80e3000de0d9876bd369f
refs/heads/master
2021-04-08T12:24:12.352513
2020-03-21T01:28:47
2020-03-21T01:28:47
248,765,952
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package com.example.accessingneo4jdatarest; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement @EnableNeo4jRepositories @SpringBootApplication public class AccessingNeo4jDataRestApplication { public static void main(String[] args) { SpringApplication.run(AccessingNeo4jDataRestApplication.class, args); } }
[ "hmiyakoshi0803@gmail.com" ]
hmiyakoshi0803@gmail.com
76e9400268b68d7cc8dcc6617492376016870526
7e6a3a83475e1d8d3ff58ca95f751f6353e78b2b
/TaskWPPhotos/app/src/main/java/com/saida_aliyeva/taskwpphotos/Urls.java
acf128a68e6c784fa184a07875d4203b29ef8269
[]
no_license
Saida100/TaskWallpaperPhotos
d36f295b92868879b8a09743a580d128226a3a70
aa97b3bffd6d4a20c8e3a754e3ade052a7563555
refs/heads/master
2020-06-24T02:19:24.565346
2019-07-31T08:48:52
2019-07-31T08:48:52
198,821,065
0
0
null
null
null
null
UTF-8
Java
false
false
1,545
java
package com.saida_aliyeva.taskwpphotos; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; public class Urls { @SerializedName("raw") @Expose private String raw; @SerializedName("full") @Expose private String full; @SerializedName("regular") @Expose private String regular; @SerializedName("small") @Expose private String small; @SerializedName("thumb") @Expose private String thumb; public String getRaw() { return raw; } public void setRaw(String raw) { this.raw = raw; } public String getFull() { return full; } public void setFull(String full) { this.full = full; } public String getRegular() { return regular; } public void setRegular(String regular) { this.regular = regular; } public String getSmall() { return small; } public void setSmall(String small) { this.small = small; } public String getThumb() { return thumb; } public void setThumb(String thumb) { this.thumb = thumb; } @Override public String toString() { return "Urls{" + "raw='" + raw + '\'' + ", full='" + full + '\'' + ", regular='" + regular + '\'' + ", small='" + small + '\'' + ", thumb='" + thumb + '\'' + '}'; } }
[ "saida.aliyeva.2017@list.ru" ]
saida.aliyeva.2017@list.ru
9eff33811327343b6e3bf574708dbab11b8a61b9
d28e026e3b0b427787a06203930d3878d7e13174
/admin-common/src/main/java/com/syz/security/common/redisLock/test.java
3ff5cb13117017cd65736be5bff98c5a6acd4c5b
[]
no_license
syzpig/syz-oauth-study
f7ddeeaaf177fea01a31da18f618a0b3a9760053
88a7370f7b3b51d0c0eba584e8925de2a1813b3b
refs/heads/master
2022-12-21T15:06:07.843354
2020-01-17T03:18:45
2020-01-17T03:18:45
135,224,564
0
0
null
2022-12-16T04:51:05
2018-05-29T01:13:54
Java
UTF-8
Java
false
false
243
java
package com.syz.security.common.redisLock; public class test { public static void main(String[] args) { JedisUtils jedisUtils = new JedisUtils(); ThreadA threadA = new ThreadA(jedisUtils); threadA.start(); } }
[ "yingzhu.shao@newtouch.cn" ]
yingzhu.shao@newtouch.cn
9eca5f06726d4e1964840a37c11fcd1bf6d80739
4436d870dc9f34956e1a8769871fce2956701555
/com/indeedWebTest/unsafePassword/Main.java
63730bc31570bb7797d5ecc55259234c10f83dda
[]
no_license
MC-Zealot/leetcode
ef6e4801c840a5ac0d5f93a8919395531dea6e2e
a06ec99f96e58cd117f0a416658224e0f5c3ba4c
refs/heads/master
2022-04-30T18:00:16.509590
2022-04-25T12:05:17
2022-04-25T12:05:17
50,908,791
0
1
null
2016-02-03T03:37:10
2016-02-02T09:19:49
Java
UTF-8
Java
false
false
468
java
package com.indeedWebTest.unsafePassword; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // get a integer String a = sc.next(); // output Set<Character> set = new HashSet<Character> (); set.add('a'); set.add('d'); set.add('c'); set.add('b'); if(a.length()==1){ } System.out.println(a); } }
[ "yizhou.tao@yinyuetai.com" ]
yizhou.tao@yinyuetai.com
9e93e15ad9dd5aace1d0cfa7049a7750ac448438
0d7c5d165c40efb892c835ffb758ccbc3b571c4a
/src/main/java/com/at/dockermongo/services/SequenceGeneratorService.java
812119a0d296b67aa0eac0d81d7286b0c38a456d
[]
no_license
luisgr1982/MongoDBExample
40d7392f7be3cb19e51b68010fe731e4af02cb3b
04d804f866e226daff5735786d0c0b693cc73965
refs/heads/master
2020-06-09T18:45:31.370584
2019-06-24T10:52:39
2019-06-24T10:52:39
193,487,056
0
0
null
null
null
null
UTF-8
Java
false
false
1,172
java
package com.at.dockermongo.services; import java.util.Objects; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.data.mongodb.core.query.Update; import org.springframework.stereotype.Service; import static org.springframework.data.mongodb.core.FindAndModifyOptions.options; import static org.springframework.data.mongodb.core.query.Criteria.where; import static org.springframework.data.mongodb.core.query.Query.query; import com.at.dockermongo.model.DatabaseSequence; @Service public class SequenceGeneratorService { private MongoOperations mongoOperations; @Autowired public SequenceGeneratorService(MongoOperations mongoOperations) { this.mongoOperations = mongoOperations; } public Long generateSequence(String seqName) { DatabaseSequence counter = mongoOperations.findAndModify(query(where("_id").is(seqName)), new Update().inc("seq",1), options().returnNew(true).upsert(true), DatabaseSequence.class); return !Objects.isNull(counter) ? counter.getSeq() : 1; } }
[ "luisgr1982@gmail.com" ]
luisgr1982@gmail.com
04a8a9d9e0bd471eccb7b7983f388ed66417b20b
14f0a5b0024fe82be4949a2e09c21b0ca90400ee
/src/com/intelligentDatabank/business/QuestionLevelDialoge.java
da594fd8e6d5a90fc1ea7f8ca27d20206c41dff9
[]
no_license
AkashKumarKhatri/Intelligent-Testing-System
619f3c8fb618cfc31305ac21e12ded5cb3e7402c
c0f7772c33e152c4f8396d84770bcc6c46dc0f5f
refs/heads/master
2020-04-14T09:15:54.662022
2019-01-01T17:57:03
2019-01-01T17:57:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
22,353
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 com.intelligentDatabank.business; import com.intelligentDatabank.dao.DisciplineDAO; import com.intelligentDatabank.dao.GroupDAO; import com.intelligentDatabank.dao.QuestionLevelDAO; import com.intelligentDatabank.dao.impl.DisciplineDAOImpl; import com.intelligentDatabank.dao.impl.GroupDAOImpl; import com.intelligentDatabank.dao.impl.QuestionLevelDAOImpl; import com.intelligentDatabank.models.DisciplineModel; import com.intelligentDatabank.models.GroupModel; import com.intelligentDatabank.models.QuestionLevelModel; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.List; import java.util.Vector; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; /** * * @author Akash */ public class QuestionLevelDialoge extends javax.swing.JDialog { private Integer questionLevelId; /** * Creates new form QuestionLevelDialoge */ public QuestionLevelDialoge(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); populateDisciplineCombo(); populateGroupCombo(); populateQuestionLevelTable(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { backgroundPanel = new javax.swing.JPanel(); btnUpdate = new javax.swing.JButton(); btnAdd = new javax.swing.JButton(); btnDelete = new javax.swing.JButton(); btnClear = new javax.swing.JButton(); btnLabel = new javax.swing.JLabel(); headingLabel = new javax.swing.JLabel(); lbName = new javax.swing.JLabel(); txtQuestionLevel = new javax.swing.JTextField(); lbRemarks = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); txtRemarks = new javax.swing.JTextArea(); tablePanel = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); questionLevelTable = new javax.swing.JTable(); comboGroup = new javax.swing.JComboBox<>(); comboDescipline = new javax.swing.JComboBox<>(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); backgroundPanel.setBackground(new java.awt.Color(255, 255, 255)); backgroundPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); btnUpdate.setBackground(new java.awt.Color(255, 255, 255)); btnUpdate.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btnUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/intelligentDatabank/icons/update.png"))); // NOI18N btnUpdate.setText("UDATE LEVEL"); btnUpdate.setEnabled(false); btnUpdate.setOpaque(false); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); backgroundPanel.add(btnUpdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(950, 250, 230, 40)); btnAdd.setBackground(new java.awt.Color(255, 255, 255)); btnAdd.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/intelligentDatabank/icons/save.png"))); // NOI18N btnAdd.setText("ADD LEVEL"); btnAdd.setOpaque(false); btnAdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAddActionPerformed(evt); } }); backgroundPanel.add(btnAdd, new org.netbeans.lib.awtextra.AbsoluteConstraints(950, 190, 230, 40)); btnDelete.setBackground(new java.awt.Color(255, 255, 255)); btnDelete.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/intelligentDatabank/icons/delete.png"))); // NOI18N btnDelete.setText("DELETE LEVEL"); btnDelete.setEnabled(false); btnDelete.setOpaque(false); btnDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteActionPerformed(evt); } }); backgroundPanel.add(btnDelete, new org.netbeans.lib.awtextra.AbsoluteConstraints(950, 310, 230, 40)); btnClear.setBackground(new java.awt.Color(255, 255, 255)); btnClear.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btnClear.setIcon(new javax.swing.ImageIcon(getClass().getResource("/intelligentDatabank/icons/reset.png"))); // NOI18N btnClear.setText("CLEAR"); btnClear.setOpaque(false); btnClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnClearActionPerformed(evt); } }); backgroundPanel.add(btnClear, new org.netbeans.lib.awtextra.AbsoluteConstraints(950, 370, 230, 40)); btnLabel.setBackground(new java.awt.Color(47, 79, 79)); btnLabel.setOpaque(true); backgroundPanel.add(btnLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 0, 310, 580)); headingLabel.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N headingLabel.setForeground(new java.awt.Color(47, 79, 79)); headingLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); headingLabel.setText("Question Level"); backgroundPanel.add(headingLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 10, 320, 50)); lbName.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N lbName.setForeground(new java.awt.Color(47, 79, 79)); lbName.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lbName.setText("Question Level :"); backgroundPanel.add(lbName, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 90, 150, 30)); txtQuestionLevel.setFont(new java.awt.Font("Yu Gothic", 0, 18)); // NOI18N txtQuestionLevel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtQuestionLevelActionPerformed(evt); } }); backgroundPanel.add(txtQuestionLevel, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 88, 310, 40)); lbRemarks.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N lbRemarks.setForeground(new java.awt.Color(47, 79, 79)); lbRemarks.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lbRemarks.setText("Remarks :"); backgroundPanel.add(lbRemarks, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 150, 90, 30)); jScrollPane1.setBackground(backgroundPanel.getBackground()); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); txtRemarks.setColumns(20); txtRemarks.setFont(new java.awt.Font("Yu Gothic", 0, 18)); // NOI18N txtRemarks.setRows(2); txtRemarks.setTabSize(2); jScrollPane1.setViewportView(txtRemarks); backgroundPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 150, 310, 100)); tablePanel.setBackground(new java.awt.Color(255, 255, 255)); tablePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(47, 79, 79)), "QUESTION LEVELS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Yu Gothic", 1, 14), new java.awt.Color(47, 79, 79))); // NOI18N tablePanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); questionLevelTable.setFont(new java.awt.Font("Yu Gothic", 0, 14)); // NOI18N questionLevelTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); questionLevelTable.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); questionLevelTable.setFocusable(false); questionLevelTable.setRowHeight(20); questionLevelTable.setSelectionBackground(new java.awt.Color(47, 79, 79)); questionLevelTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); questionLevelTable.setShowVerticalLines(false); questionLevelTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { questionLevelTableMouseClicked(evt); } }); jScrollPane2.setViewportView(questionLevelTable); tablePanel.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 810, 260)); backgroundPanel.add(tablePanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 270, 830, 300)); comboGroup.setBackground(backgroundPanel.getBackground()); comboGroup.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N comboGroup.setForeground(new java.awt.Color(47, 79, 79)); comboGroup.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select Group" })); comboGroup.setToolTipText(""); backgroundPanel.add(comboGroup, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 150, 330, 40)); comboDescipline.setBackground(backgroundPanel.getBackground()); comboDescipline.setFont(new java.awt.Font("Yu Gothic", 1, 18)); // NOI18N comboDescipline.setForeground(new java.awt.Color(47, 79, 79)); comboDescipline.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select Descipline" })); comboDescipline.setToolTipText(""); comboDescipline.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { comboDesciplineActionPerformed(evt); } }); backgroundPanel.add(comboDescipline, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 88, 330, 40)); getContentPane().add(backgroundPanel, java.awt.BorderLayout.CENTER); pack(); setLocationRelativeTo(null); }// </editor-fold>//GEN-END:initComponents private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed if(txtQuestionLevel.getText().trim()!=null && comboDescipline.getSelectedIndex()>0 && comboGroup.getSelectedIndex()>0) { QuestionLevelModel levelModel = new QuestionLevelModel(); levelModel.setQuestionLevel(txtQuestionLevel.getText().trim()); levelModel.setRemarks(txtRemarks.getText().trim()); GroupModel groupModel = new GroupModel(); groupModel.setGroupName(comboGroup.getSelectedItem().toString()); levelModel.setGroupModel(groupModel); QuestionLevelDAO questionLevelDAO = new QuestionLevelDAOImpl(); int row = questionLevelDAO.updateQuestionLevel(levelModel); if(row>0) { populateQuestionLevelTable(); //populateGroupCombo(); clearFields(); btnAdd.setEnabled(true); btnDelete.setEnabled(false); btnUpdate.setEnabled(false); } else { JOptionPane.showMessageDialog(rootPane, "Record Not UPTATED!"); } } }//GEN-LAST:event_btnUpdateActionPerformed private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed if(txtQuestionLevel.getText().trim().isEmpty() == false && comboDescipline.getSelectedIndex()>0 && comboGroup.getSelectedIndex()>0) { QuestionLevelModel levelModel = new QuestionLevelModel(); levelModel.setQuestionLevel(txtQuestionLevel.getText().trim()); levelModel.setRemarks(txtRemarks.getText().trim()); GroupDAO groupDAO = new GroupDAOImpl(); GroupModel groupModel = groupDAO.getGroupIdWithName(comboGroup.getSelectedItem().toString()); levelModel.setGroupModel(groupModel); QuestionLevelDAO questionLevelDAO = new QuestionLevelDAOImpl(); int row = questionLevelDAO.addQuestionLevel(levelModel); if(row>0) { populateQuestionLevelTable(); clearFields(); comboGroup.removeAllItems(); comboGroup.addItem("Select Group"); /////populateGroupCombo(); } else { JOptionPane.showMessageDialog(rootPane, "Record Not ADDED!"); } } }//GEN-LAST:event_btnAddActionPerformed private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed Integer confirm = JOptionPane.showConfirmDialog(rootPane, "Do you realy want to delete", "Delete", JOptionPane.YES_NO_OPTION); if(confirm == 0) { QuestionLevelModel levelModel = new QuestionLevelModel(); levelModel.setQuestionLevelId(questionLevelId); QuestionLevelDAO questionLevelDAO = new QuestionLevelDAOImpl(); int row = questionLevelDAO.deleteQuestionLevel(levelModel); if(row>0) { populateQuestionLevelTable(); populateGroupCombo(); clearFields(); btnAdd.setEnabled(true); btnDelete.setEnabled(false); btnUpdate.setEnabled(false); } else { JOptionPane.showMessageDialog(rootPane, "Record Not DELETED!"); } } }//GEN-LAST:event_btnDeleteActionPerformed private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnClearActionPerformed clearFields(); btnAdd.setEnabled(true); btnUpdate.setEnabled(false); btnDelete.setEnabled(false); }//GEN-LAST:event_btnClearActionPerformed private void txtQuestionLevelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtQuestionLevelActionPerformed }//GEN-LAST:event_txtQuestionLevelActionPerformed private void questionLevelTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_questionLevelTableMouseClicked btnAdd.setEnabled(false); btnDelete.setEnabled(true); btnUpdate.setEnabled(true); comboDescipline.removeAllItems(); comboDescipline.addItem("Select Discipline"); populateDisciplineCombo(); comboGroup.removeAllItems(); comboGroup.addItem("Select Group"); populateGroupCombo(); questionLevelId = (Integer) questionLevelTable.getValueAt(questionLevelTable.getSelectedRow(), 0); QuestionLevelDAO questionLevelDAO = new QuestionLevelDAOImpl(); QuestionLevelModel levelModel = questionLevelDAO.getQuestioLevelWithId(questionLevelId); txtQuestionLevel.setText(levelModel.getQuestionLevel()); txtRemarks.setText(levelModel.getRemarks()); comboGroup.setSelectedItem(levelModel.getGroupModel().getGroupName()); comboDescipline.setSelectedItem(levelModel.getGroupModel().getDiscilineModel().getDisciplineName()); }//GEN-LAST:event_questionLevelTableMouseClicked private void comboDesciplineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboDesciplineActionPerformed if(comboDescipline.getSelectedIndex() > 0) { comboGroup.removeAllItems(); comboGroup.addItem("Select Group"); DisciplineDAO disciplineDAO = new DisciplineDAOImpl(); DisciplineModel disciplineModel = disciplineDAO.getDisciplineByName(comboDescipline.getSelectedItem().toString()); GroupDAO groupDAO = new GroupDAOImpl(); List<GroupModel> groupModels = groupDAO.getAllGroupsByDisciplineId(disciplineModel); for (GroupModel groupModel : groupModels) { comboGroup.addItem(groupModel.getGroupName()); } } else if(comboDescipline.getSelectedIndex() == 0) { comboGroup.removeAllItems(); comboGroup.addItem("Select"); } }//GEN-LAST:event_comboDesciplineActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(QuestionLevelDialoge.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(QuestionLevelDialoge.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(QuestionLevelDialoge.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(QuestionLevelDialoge.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { QuestionLevelDialoge dialog = new QuestionLevelDialoge(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel backgroundPanel; private javax.swing.JButton btnAdd; private javax.swing.JButton btnClear; private javax.swing.JButton btnDelete; private javax.swing.JLabel btnLabel; private javax.swing.JButton btnUpdate; private javax.swing.JComboBox<String> comboDescipline; private javax.swing.JComboBox<String> comboGroup; private javax.swing.JLabel headingLabel; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JLabel lbName; private javax.swing.JLabel lbRemarks; private javax.swing.JTable questionLevelTable; private javax.swing.JPanel tablePanel; private javax.swing.JTextField txtQuestionLevel; private javax.swing.JTextArea txtRemarks; // End of variables declaration//GEN-END:variables public static DefaultTableModel buildTableModel(ResultSet rs) throws SQLException { ResultSetMetaData metaData = rs.getMetaData(); // names of columns Vector<String> columnNames = new Vector<String>(); int columnCount = metaData.getColumnCount(); for (int column = 1; column <= columnCount; column++) { columnNames.add(metaData.getColumnName(column)); } // data of the table Vector<Vector<Object>> data = new Vector<Vector<Object>>(); while (rs.next()) { Vector<Object> vector = new Vector<Object>(); for (int columnIndex = 1; columnIndex <= columnCount; columnIndex++) { vector.add(rs.getObject(columnIndex)); } data.add(vector); } return new DefaultTableModel(data, columnNames); } private void clearFields() { txtQuestionLevel.setText(null); txtRemarks.setText(null); comboDescipline.setSelectedIndex(0); comboGroup.setSelectedIndex(0); } private void populateQuestionLevelTable() { QuestionLevelDAO questionLevelDAO = new QuestionLevelDAOImpl(); ResultSet rs = questionLevelDAO.getAllQuestionLevelResultSet(); DefaultTableModel dtm = null; try { dtm = buildTableModel(rs); } catch (SQLException ex) { ex.printStackTrace(); } questionLevelTable.setModel(dtm); } private void populateDisciplineCombo() { DisciplineDAO disciplineDAO = new DisciplineDAOImpl(); List<DisciplineModel> discilineModels = disciplineDAO.getAllDisciplines(); for (DisciplineModel discilineModel : discilineModels) { comboDescipline.addItem(discilineModel.getDisciplineName()); } } private void populateGroupCombo() { GroupDAO groupDAO = new GroupDAOImpl(); List<GroupModel> groupModels = groupDAO.getAllGroups(); for (GroupModel groupModel : groupModels) { comboGroup.addItem(groupModel.getGroupName()); } } }
[ "kkatriakash@gmail.com" ]
kkatriakash@gmail.com
1dbae69a75af44a9f1fc2f2d936b444bf783122f
df134b422960de6fb179f36ca97ab574b0f1d69f
/io/netty/handler/codec/http/multipart/MixedAttribute.java
17f4f0b00baa961b4dd9d98955e62a795b60c939
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
10,750
java
/* */ package io.netty.handler.codec.http.multipart; /* */ /* */ import io.netty.buffer.ByteBuf; /* */ import io.netty.buffer.ByteBufHolder; /* */ import io.netty.handler.codec.http.HttpConstants; /* */ import io.netty.util.ReferenceCounted; /* */ import java.io.File; /* */ import java.io.IOException; /* */ import java.io.InputStream; /* */ import java.nio.charset.Charset; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class MixedAttribute /* */ implements Attribute /* */ { /* */ private Attribute attribute; /* */ private final long limitSize; /* 33 */ private long maxSize = -1L; /* */ /* */ public MixedAttribute(String name, long limitSize) { /* 36 */ this(name, limitSize, HttpConstants.DEFAULT_CHARSET); /* */ } /* */ /* */ public MixedAttribute(String name, long definedSize, long limitSize) { /* 40 */ this(name, definedSize, limitSize, HttpConstants.DEFAULT_CHARSET); /* */ } /* */ /* */ public MixedAttribute(String name, long limitSize, Charset charset) { /* 44 */ this.limitSize = limitSize; /* 45 */ this.attribute = new MemoryAttribute(name, charset); /* */ } /* */ /* */ public MixedAttribute(String name, long definedSize, long limitSize, Charset charset) { /* 49 */ this.limitSize = limitSize; /* 50 */ this.attribute = new MemoryAttribute(name, definedSize, charset); /* */ } /* */ /* */ public MixedAttribute(String name, String value, long limitSize) { /* 54 */ this(name, value, limitSize, HttpConstants.DEFAULT_CHARSET); /* */ } /* */ /* */ public MixedAttribute(String name, String value, long limitSize, Charset charset) { /* 58 */ this.limitSize = limitSize; /* 59 */ if (value.length() > this.limitSize) { /* */ try { /* 61 */ this.attribute = new DiskAttribute(name, value, charset); /* 62 */ } catch (IOException e) { /* */ /* */ try { /* 65 */ this.attribute = new MemoryAttribute(name, value, charset); /* 66 */ } catch (IOException ignore) { /* 67 */ throw new IllegalArgumentException(e); /* */ } /* */ } /* */ } else { /* */ try { /* 72 */ this.attribute = new MemoryAttribute(name, value, charset); /* 73 */ } catch (IOException e) { /* 74 */ throw new IllegalArgumentException(e); /* */ } /* */ } /* */ } /* */ /* */ /* */ public long getMaxSize() { /* 81 */ return this.maxSize; /* */ } /* */ /* */ /* */ public void setMaxSize(long maxSize) { /* 86 */ this.maxSize = maxSize; /* 87 */ this.attribute.setMaxSize(maxSize); /* */ } /* */ /* */ /* */ public void checkSize(long newSize) throws IOException { /* 92 */ if (this.maxSize >= 0L && newSize > this.maxSize) { /* 93 */ throw new IOException("Size exceed allowed maximum capacity"); /* */ } /* */ } /* */ /* */ /* */ public void addContent(ByteBuf buffer, boolean last) throws IOException { /* 99 */ if (this.attribute instanceof MemoryAttribute) { /* 100 */ checkSize(this.attribute.length() + buffer.readableBytes()); /* 101 */ if (this.attribute.length() + buffer.readableBytes() > this.limitSize) { /* */ /* 103 */ DiskAttribute diskAttribute = new DiskAttribute(this.attribute.getName(), this.attribute.definedLength()); /* 104 */ diskAttribute.setMaxSize(this.maxSize); /* 105 */ if (((MemoryAttribute)this.attribute).getByteBuf() != null) { /* 106 */ diskAttribute.addContent(((MemoryAttribute)this.attribute) /* 107 */ .getByteBuf(), false); /* */ } /* 109 */ this.attribute = diskAttribute; /* */ } /* */ } /* 112 */ this.attribute.addContent(buffer, last); /* */ } /* */ /* */ /* */ public void delete() { /* 117 */ this.attribute.delete(); /* */ } /* */ /* */ /* */ public byte[] get() throws IOException { /* 122 */ return this.attribute.get(); /* */ } /* */ /* */ /* */ public ByteBuf getByteBuf() throws IOException { /* 127 */ return this.attribute.getByteBuf(); /* */ } /* */ /* */ /* */ public Charset getCharset() { /* 132 */ return this.attribute.getCharset(); /* */ } /* */ /* */ /* */ public String getString() throws IOException { /* 137 */ return this.attribute.getString(); /* */ } /* */ /* */ /* */ public String getString(Charset encoding) throws IOException { /* 142 */ return this.attribute.getString(encoding); /* */ } /* */ /* */ /* */ public boolean isCompleted() { /* 147 */ return this.attribute.isCompleted(); /* */ } /* */ /* */ /* */ public boolean isInMemory() { /* 152 */ return this.attribute.isInMemory(); /* */ } /* */ /* */ /* */ public long length() { /* 157 */ return this.attribute.length(); /* */ } /* */ /* */ /* */ public long definedLength() { /* 162 */ return this.attribute.definedLength(); /* */ } /* */ /* */ /* */ public boolean renameTo(File dest) throws IOException { /* 167 */ return this.attribute.renameTo(dest); /* */ } /* */ /* */ /* */ public void setCharset(Charset charset) { /* 172 */ this.attribute.setCharset(charset); /* */ } /* */ /* */ /* */ public void setContent(ByteBuf buffer) throws IOException { /* 177 */ checkSize(buffer.readableBytes()); /* 178 */ if (buffer.readableBytes() > this.limitSize && /* 179 */ this.attribute instanceof MemoryAttribute) { /* */ /* 181 */ this.attribute = new DiskAttribute(this.attribute.getName(), this.attribute.definedLength()); /* 182 */ this.attribute.setMaxSize(this.maxSize); /* */ } /* */ /* 185 */ this.attribute.setContent(buffer); /* */ } /* */ /* */ /* */ public void setContent(File file) throws IOException { /* 190 */ checkSize(file.length()); /* 191 */ if (file.length() > this.limitSize && /* 192 */ this.attribute instanceof MemoryAttribute) { /* */ /* 194 */ this.attribute = new DiskAttribute(this.attribute.getName(), this.attribute.definedLength()); /* 195 */ this.attribute.setMaxSize(this.maxSize); /* */ } /* */ /* 198 */ this.attribute.setContent(file); /* */ } /* */ /* */ /* */ public void setContent(InputStream inputStream) throws IOException { /* 203 */ if (this.attribute instanceof MemoryAttribute) { /* */ /* 205 */ this.attribute = new DiskAttribute(this.attribute.getName(), this.attribute.definedLength()); /* 206 */ this.attribute.setMaxSize(this.maxSize); /* */ } /* 208 */ this.attribute.setContent(inputStream); /* */ } /* */ /* */ /* */ public InterfaceHttpData.HttpDataType getHttpDataType() { /* 213 */ return this.attribute.getHttpDataType(); /* */ } /* */ /* */ /* */ public String getName() { /* 218 */ return this.attribute.getName(); /* */ } /* */ /* */ /* */ public int hashCode() { /* 223 */ return this.attribute.hashCode(); /* */ } /* */ /* */ /* */ public boolean equals(Object obj) { /* 228 */ return this.attribute.equals(obj); /* */ } /* */ /* */ /* */ public int compareTo(InterfaceHttpData o) { /* 233 */ return this.attribute.compareTo(o); /* */ } /* */ /* */ /* */ public String toString() { /* 238 */ return "Mixed: " + this.attribute; /* */ } /* */ /* */ /* */ public String getValue() throws IOException { /* 243 */ return this.attribute.getValue(); /* */ } /* */ /* */ /* */ public void setValue(String value) throws IOException { /* 248 */ if (value != null) { /* 249 */ checkSize((value.getBytes()).length); /* */ } /* 251 */ this.attribute.setValue(value); /* */ } /* */ /* */ /* */ public ByteBuf getChunk(int length) throws IOException { /* 256 */ return this.attribute.getChunk(length); /* */ } /* */ /* */ /* */ public File getFile() throws IOException { /* 261 */ return this.attribute.getFile(); /* */ } /* */ /* */ /* */ public Attribute copy() { /* 266 */ return this.attribute.copy(); /* */ } /* */ /* */ /* */ public Attribute duplicate() { /* 271 */ return this.attribute.duplicate(); /* */ } /* */ /* */ /* */ public Attribute retainedDuplicate() { /* 276 */ return this.attribute.retainedDuplicate(); /* */ } /* */ /* */ /* */ public Attribute replace(ByteBuf content) { /* 281 */ return this.attribute.replace(content); /* */ } /* */ /* */ /* */ public ByteBuf content() { /* 286 */ return this.attribute.content(); /* */ } /* */ /* */ /* */ public int refCnt() { /* 291 */ return this.attribute.refCnt(); /* */ } /* */ /* */ /* */ public Attribute retain() { /* 296 */ this.attribute.retain(); /* 297 */ return this; /* */ } /* */ /* */ /* */ public Attribute retain(int increment) { /* 302 */ this.attribute.retain(increment); /* 303 */ return this; /* */ } /* */ /* */ /* */ public Attribute touch() { /* 308 */ this.attribute.touch(); /* 309 */ return this; /* */ } /* */ /* */ /* */ public Attribute touch(Object hint) { /* 314 */ this.attribute.touch(hint); /* 315 */ return this; /* */ } /* */ /* */ /* */ public boolean release() { /* 320 */ return this.attribute.release(); /* */ } /* */ /* */ /* */ public boolean release(int decrement) { /* 325 */ return this.attribute.release(decrement); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\io\netty\handler\codec\http\multipart\MixedAttribute.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
0413e29d59ed09072e5173c36b17201ab02147a3
ca4490c5d544e9c5e35a8b1d2334899893f9423e
/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/api/MergeService.java
eb8197f0c74c985bfea2ec2509972606a621989a
[ "LicenseRef-scancode-unknown-license-reference", "GPL-1.0-or-later", "GPL-2.0-only", "Apache-2.0" ]
permissive
411241940/dubbo-2.5.4
66ca9e7bdb0ebc91f1d7e7a22ff4fd57d14265ff
d9c0690db268d9417f3d9c77b29477a19d0ac48d
refs/heads/master
2022-08-15T04:44:03.131658
2020-09-26T04:47:41
2020-09-26T04:47:41
132,905,615
1
1
Apache-2.0
2022-07-13T15:30:24
2018-05-10T13:39:45
Java
UTF-8
Java
false
false
836
java
/* * Copyright 1999-2012 Alibaba Group. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.dubbo.examples.merge.api; import java.util.List; /** * MergeService * * @author william.liangf */ public interface MergeService { List<String> mergeResult(); }
[ "william.liangf@1a56cb94-b969-4eaa-88fa-be21384802f2" ]
william.liangf@1a56cb94-b969-4eaa-88fa-be21384802f2
706992e71d1a0320ed035f95b18c194372ef36b6
d6e99228f6100db870fb6f989301b51edde41fb3
/sign/src/main/java/com/nlelpct/sign/controller/RedirectController.java
fe82e4a0b55756cec6ad62c2e0cfb9b05dff3b1e
[]
no_license
longtx/simpleWeb
0ca91b996caf12692988fa4000df2705e3735355
a0a1056f164bcec007db26bc1fdaffa180116da1
refs/heads/master
2023-04-20T09:24:36.210646
2021-05-06T14:20:15
2021-05-06T14:20:15
364,933,808
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package com.nlelpct.sign.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; /** * <p> * 前端控制器 * </p> * * @author nlelpct * @since 2020-09-23 */ @Controller public class RedirectController { @RequestMapping("/") public String redirectToQuery() { return "redirect:/sign/index.html"; } @RequestMapping("/admin") public String redirectToAdmin() { return "redirect:/admin/index.html"; } }
[ "ltx1278@scse.com.cn" ]
ltx1278@scse.com.cn
0f4a8b0636f3cfbdc5cc8e7c248ce778c896b7eb
42ed0c4bb04850deddb102be3ad536f8123ddd26
/src/main/java/ru/mars/gameserver/MessageFactory.java
14cb97f59518c2857c8093c8a2491c45531252a8
[]
no_license
TERRANZ/seawar
2673c7e6a1a86e0c6b789a4114c35cacb029005c
4570615c14391610d7ef8f75d8c3ca57086759f0
refs/heads/master
2016-09-09T19:24:03.518325
2015-01-18T12:57:43
2015-01-18T12:57:43
28,878,568
0
0
null
null
null
null
UTF-8
Java
false
false
1,143
java
package ru.mars.gameserver; import ru.mars.seawar.server.game.MessageType; /** * Date: 01.11.14 * Time: 22:41 */ public class MessageFactory { protected static String header(int msgId) { StringBuilder sb = new StringBuilder(); sb.append("<?xml version='1.0' encoding='utf-8'?>"); sb.append("<msg>"); sb.append("<id>"); sb.append(msgId); sb.append("</id>"); return sb.toString(); } protected static String footer(String msg) { StringBuilder sb = new StringBuilder(); sb.append(msg); sb.append("</msg>"); return sb.toString(); } public static String wrap(int msgId, String msg) { return footer(header(msgId) + msg); } public static String createPingMessage(Statistic statistic) { return wrap(MessageType.S_PING, "<text> hello </text> <online>" + statistic.getOnline() + "</online><games>" + statistic.getGames() + "</games>"); } public static String createGameOverMessage(Integer deadPlayer) { return wrap(MessageType.S_GAME_OVER, "<deadplayer>" + deadPlayer + "</deadplayer>"); } }
[ "vterranz@gmail.com" ]
vterranz@gmail.com
9872817628a603496ff37a016798a179337d21c7
1f923f9b5bfbb611cdb59473ea2b3f5b025c4bec
/src/main/java/proxy/type1/PermissionProxy.java
b286f9ecff109f08189757d788f3c53609dd8704
[]
no_license
BXALearn/DesignPattern
25f25ef624481e61d4ac03829298bd1f00fee020
09ad5332de5e0bec43dab9cb0dc6eea1edd5ea53
refs/heads/master
2020-06-27T21:37:38.995574
2019-08-09T01:02:11
2019-08-09T01:02:11
200,056,238
1
1
null
null
null
null
UTF-8
Java
false
false
1,079
java
package java.proxy.type1; /** * Create by 摆欣安 * 2019/8/4 17:37 */ public class PermissionProxy implements AbstractPermission { private RealPermission permission=new RealPermission(); private int level=0; public void modifyUserInfo() { if(0==level) { System.out.println("对不起,你没有该权限!"); } else if(1==level) { permission.modifyUserInfo(); } } public void viewNote() { permission.viewNote(); } public void publishNote() { if(0==level) { System.out.println("对不起,你没有该权限!"); } else if(1==level) { permission.publishNote(); } } public void modifyNote() { if(0==level) { System.out.println("对不起,你没有该权限!"); } else if(1==level) { permission.modifyNote(); } } public void setLevel(int level) { this.level=level; } }
[ "“15732677968@163.comgit config --global user.email “15732677968@163.com" ]
“15732677968@163.comgit config --global user.email “15732677968@163.com
ee673c58365b7a14d81a38f69a9b4b1aabe7501e
c3d20b802960cd433d4efae5f8ebcb1ebbe5bdc1
/testModule1/src/main/java/com/entity/Custom.java
93d0bf45230afeefe8985472f6f6bdaf9b09289f
[]
no_license
zlshen22/demo
e0c400899a3ef8c43008cdb025c7afebfbeb6b8c
eee66cb91718131d2f7066313eca32b506bd3ea0
refs/heads/master
2023-03-27T10:52:49.708443
2021-03-21T17:07:43
2021-03-21T17:07:43
290,450,827
1
0
null
null
null
null
UTF-8
Java
false
false
136
java
package com.entity; /** * @author zlshen * @date 2020/8/26 */ public class Custom { private int id ; private String name; }
[ "1129120844@qq.com" ]
1129120844@qq.com
b8477e75914168c0d20c88839d8db8735987746d
aa6a27062506ae57419f897c6f05c30d759d6bcc
/cms-web/src/main/java/org/konghao/cms/controller/SystemController.java
d1ae5548995fdab732743877a3c60d6dec94bded
[]
no_license
kangxiongwei/cms
16de7dfedcf78e47f3d3b0dd7de0a706567b43f8
0aa35065c1f194a0a3ca5280bfb0877c0c792b17
refs/heads/master
2021-01-24T11:23:05.992374
2018-02-28T10:52:24
2018-02-28T10:52:24
123,080,037
2
1
null
null
null
null
UTF-8
Java
false
false
4,541
java
package org.konghao.cms.controller; import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; import javax.servlet.http.HttpSession; import org.konghao.basic.model.SystemContext; import org.konghao.cms.auth.AuthClass; import org.konghao.cms.model.BaseInfo; import org.konghao.cms.service.IAttachmentService; import org.konghao.cms.service.IIndexPicService; import org.konghao.cms.service.IIndexService; import org.konghao.cms.web.BaseInfoUtil; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @RequestMapping("/admin/system") @Controller @AuthClass public class SystemController { private IAttachmentService attachmentService; private IIndexPicService indexPicService; private IIndexService indexService; public IIndexService getIndexService() { return indexService; } @Inject public void setIndexService(IIndexService indexService) { this.indexService = indexService; } public IAttachmentService getAttachmentService() { return attachmentService; } @Inject public void setAttachmentService(IAttachmentService attachmentService) { this.attachmentService = attachmentService; } public IIndexPicService getIndexPicService() { return indexPicService; } @Inject public void setIndexPicService(IIndexPicService indexPicService) { this.indexPicService = indexPicService; } @RequestMapping("/baseinfo") public String showBaseInfo() { return "system/showBaseInfo"; } @RequestMapping(value="/baseinfo/update",method=RequestMethod.GET) public String updateBaseInfo(HttpSession session,Model model) { model.addAttribute("baseInfo", session.getServletContext().getAttribute("baseInfo")); return "system/updateBaseInfo"; } @RequestMapping(value="/baseinfo/update",method=RequestMethod.POST) public String updateBaseInfo(@Validated BaseInfo baseInfo,BindingResult br,HttpSession session) { if(br.hasErrors()) { return "system/updateBaseInfo"; } BaseInfo bi = BaseInfoUtil.getInstacne().write(baseInfo); session.getServletContext().setAttribute("baseInfo", bi); indexService.generateBottom(); indexService.generateTop(); return "redirect:/admin/system/baseinfo"; } @RequestMapping("/cleans") public String listCleans(Model model) { model.addAttribute("attNums", attachmentService.findNoUseAttachmentNum()); model.addAttribute("indexPics", listNoUseIndexPicNum(indexPicService.listAllIndexPicName())); return "system/cleans"; } private File[] listPicFile() { String path = SystemContext.getRealPath(); File f = new File(path+"/resources/indexPic"); File[] fs = f.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { if(pathname.isDirectory()) return false; return true; } }); return fs; } @RequestMapping("/cleanList/{name}") public String cleanList(@PathVariable String name,Model model) { if(name.equals("atts")) { model.addAttribute("datas", attachmentService.findNoUseAttachment()); return "system/cleanAtts"; } else if(name.equals("pics")) { model.addAttribute("datas", listNoUseIndexPic(indexPicService.listAllIndexPicName())); return "system/cleanPics"; } return ""; } @RequestMapping("/clean/{name}") public String clean(@PathVariable String name,Model model) throws IOException { if(name.equals("atts")) { attachmentService.clearNoUseAttachment(); } else if(name.equals("pics")) { indexPicService.cleanNoUseIndexPic(listNoUseIndexPic(indexPicService.listAllIndexPicName())); } return "redirect:/admin/system/cleans"; } /** * 获取没有使用的首页图片数量 * @param pics * @return */ private int listNoUseIndexPicNum(List<String> pics) { File[] fs = listPicFile(); int count = 0; for(File file:fs) { if(!pics.contains(file.getName())) count++; } return count; } /** * 获取没有使用的首页图片列表 * @param pics * @return */ private List<String> listNoUseIndexPic(List<String> pics) { File[] fs = listPicFile(); List<String> npics = new ArrayList<String>(); for(File f:fs) { if(!pics.contains(f.getName())) npics.add(f.getName()); } return npics; } }
[ "kangxiongwei@meituan.com" ]
kangxiongwei@meituan.com
6e3e61e27e2a546bf81ae5c133af939aad651001
005553bcc8991ccf055f15dcbee3c80926613b7f
/generated/entity/ReserveRule.java
0698b4dc0d4e6d4d55b99d4b3b4d20945cad8f56
[]
no_license
azanaera/toggle-isbtf
5f14209cd87b98c123fad9af060efbbee1640043
faf991ec3db2fd1d126bc9b6be1422b819f6cdc8
refs/heads/master
2023-01-06T22:20:03.493096
2020-11-16T07:04:56
2020-11-16T07:04:56
313,212,938
0
0
null
2020-11-16T08:48:41
2020-11-16T06:42:23
null
UTF-8
Java
false
false
45,773
java
package entity; /** * ReserveRule */ @javax.annotation.processing.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "ReserveRule.eti;ReserveRule.eix;ReserveRule.etx") @java.lang.SuppressWarnings(value = {"deprecation", "unchecked"}) @gw.internal.gosu.parser.ExtendedType @gw.lang.SimplePropertyProcessing @gw.entity.EntityName(value = "ReserveRule") public class ReserveRule extends entity.CCRule { public static final gw.pl.persistence.type.EntityTypeReference<entity.ReserveRule> TYPE = new com.guidewire.commons.metadata.types.EntityIntrinsicTypeReference<entity.ReserveRule>("entity.ReserveRule"); public static final gw.pl.persistence.type.EntityPropertyInfoReference<gw.entity.IArrayPropertyInfo> CLAIMSEGMENTS_PROP = new com.guidewire.commons.metadata.types.ArrayPropertyInfoCache(TYPE, "ClaimSegments"); public static final gw.pl.persistence.type.EntityPropertyInfoReference<gw.entity.IArrayPropertyInfo> EXPOSURETYPES_PROP = new com.guidewire.commons.metadata.types.ArrayPropertyInfoCache(TYPE, "ExposureTypes"); private static final com.guidewire.pl.persistence.code.DelegateMap DELEGATE_MAP; /** * Constructs a new instance of this entity in the {@link gw.transaction.Transaction#getCurrent() current} bundle. * @throws java.lang.NullPointerException if there is no current bundle defined */ public ReserveRule() { this(gw.transaction.Transaction.getCurrent()); } /** * Constructs a new instance of this entity in the bundle supplied by the given bundle provider. */ public ReserveRule(gw.pl.persistence.core.BundleProvider bundleProvider) { this((java.lang.Void)null); com.guidewire.pl.system.entity.proxy.BeanProxy.initNewBeanInstance(this, bundleProvider.getBundle(), java.util.Arrays.asList()); } protected ReserveRule(java.lang.Void ignored) { super(ignored); } protected com.guidewire._generated.entity.ReserveRuleInternal __createInternalInterface() { return new _Internal(); } protected com.guidewire.pl.persistence.code.DelegateMap __getDelegateMap() { return DELEGATE_MAP; } protected com.guidewire._generated.entity.ReserveRuleInternal __getInternalInterface() { return (com.guidewire._generated.entity.ReserveRuleInternal)super.__getInternalInterface(); } /** * Adds the given element to the ClaimSegments array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToClaimSegments(entity.AppCritClaimSegment element) { __getInternalInterface().addArrayElement(CLAIMSEGMENTS_PROP.get(), element); } /** * Adds the given element to the ExposureTypes array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToExposureTypes(entity.AppCritExposureType element) { __getInternalInterface().addArrayElement(EXPOSURETYPES_PROP.get(), element); } /** * Gets the value of the ClaimSegments field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritClaimSegment[] getClaimSegments() { return (entity.AppCritClaimSegment[])__getInternalInterface().getFieldValue(CLAIMSEGMENTS_PROP.get()); } /** * Gets the value of the ExposureTypes field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritExposureType[] getExposureTypes() { return (entity.AppCritExposureType[])__getInternalInterface().getFieldValue(EXPOSURETYPES_PROP.get()); } /** * Removes the given element from the ClaimSegments array. This is achieved by marking the element for removal. */ public void removeFromClaimSegments(entity.AppCritClaimSegment element) { __getInternalInterface().removeArrayElement(CLAIMSEGMENTS_PROP.get(), element); } /** * Removes the given element from the ClaimSegments array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromClaimSegments(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(CLAIMSEGMENTS_PROP.get(), elementID); } /** * Removes the given element from the ExposureTypes array. This is achieved by marking the element for removal. */ public void removeFromExposureTypes(entity.AppCritExposureType element) { __getInternalInterface().removeArrayElement(EXPOSURETYPES_PROP.get(), element); } /** * Removes the given element from the ExposureTypes array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromExposureTypes(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(EXPOSURETYPES_PROP.get(), elementID); } /** * Sets the value of the ClaimSegments field. */ public void setClaimSegments(entity.AppCritClaimSegment[] value) { __getInternalInterface().setFieldValue(CLAIMSEGMENTS_PROP.get(), value); } /** * Sets the value of the ExposureTypes field. */ public void setExposureTypes(entity.AppCritExposureType[] value) { __getInternalInterface().setFieldValue(EXPOSURETYPES_PROP.get(), value); } private class _Internal extends com.guidewire.pl.persistence.code.BeanInternalBase implements com.guidewire._generated.entity.ReserveRuleInternal { protected com.guidewire.pl.persistence.code.DelegateLoader __getDelegateManager() { return entity.ReserveRule.this.__getDelegateManager(); } /** * Adds the given element to the ClaimSegments array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToClaimSegments(entity.AppCritClaimSegment element) { __getInternalInterface().addArrayElement(CLAIMSEGMENTS_PROP.get(), element); } /** * Adds the given element to the ExposureTypes array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToExposureTypes(entity.AppCritExposureType element) { __getInternalInterface().addArrayElement(EXPOSURETYPES_PROP.get(), element); } /** * Adds the given element to the Jurisdictions array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToJurisdictions(entity.AppCritJurisdiction element) { __getInternalInterface().addArrayElement(JURISDICTIONS_PROP.get(), element); } /** * Adds the given element to the LossTypes array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToLossTypes(entity.AppCritLossType element) { __getInternalInterface().addArrayElement(LOSSTYPES_PROP.get(), element); } /** * Adds the given element to the PolicyTypes array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToPolicyTypes(entity.AppCritPolicyType element) { __getInternalInterface().addArrayElement(POLICYTYPES_PROP.get(), element); } /** * Adds the given element to the RuleCommandDefinitions array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToRuleCommandDefinitions(entity.RuleCommandDefinition element) { __getInternalInterface().addArrayElement(RULECOMMANDDEFINITIONS_PROP.get(), element); } /** * Adds the given element to the RuleVariables array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToRuleVariables(entity.RuleVariable element) { __getInternalInterface().addArrayElement(RULEVARIABLES_PROP.get(), element); } /** * Adds the given element to the ValidationInfoArray array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToValidationInfoArray(entity.RuleValidationInfo element) { __getInternalInterface().addArrayElement(VALIDATIONINFOARRAY_PROP.get(), element); } /** * Adds the given element to the Versions array. This is achieved by setting the parent foreign key to this entity instance. */ public void addToVersions(entity.RuleVersion element) { __getInternalInterface().addArrayElement(VERSIONS_PROP.get(), element); } public boolean alwaysReserveID() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).alwaysReserveID(); } public entity.RuleCommandDefinition appendRuleCommandDefinition() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).appendRuleCommandDefinition(); } public entity.RuleVariable appendRuleVariable() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).appendRuleVariable(); } public void assignPermanentId(gw.pl.persistence.core.Key id) { ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).assignPermanentId(id); } public void assignUniquePublicId() { ((com.guidewire.bizrules.management.RuleVersionAwareInternal)__getDelegateManager().getImplementation("com.guidewire.bizrules.management.RuleVersionAwareInternal")).assignUniquePublicId(); } public void beforeInsert() { ((com.guidewire.pl.system.bundle.InsertCallback)__getDelegateManager().getImplementation("com.guidewire.pl.system.bundle.InsertCallback")).beforeInsert(); } public void beforeRemove() { ((com.guidewire.pl.system.bundle.RemoveCallback)__getDelegateManager().getImplementation("com.guidewire.pl.system.bundle.RemoveCallback")).beforeRemove(); } public void beforeUpdate() { ((com.guidewire.pl.system.bundle.UpdateCallback)__getDelegateManager().getImplementation("com.guidewire.pl.system.bundle.UpdateCallback")).beforeUpdate(); } public java.lang.Integer calculateNextVersion() { return ((com.guidewire.pl.domain.persistence.core.impl.VersionableInternal)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.VersionableInternal")).calculateNextVersion(); } public java.util.List<entity.KeyableBean> cascadeDelete() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).cascadeDelete(); } public boolean checkIfValid() { return ((com.guidewire.bizrules.domain.RuleInternalMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleInternalMethods")).checkIfValid(); } public entity.KeyableBean cloneBeanForBundleTransfer() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).cloneBeanForBundleTransfer(); } public java.util.List<java.lang.String> computeIsValid() { return ((com.guidewire.bizrules.domain.RuleInternalMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleInternalMethods")).computeIsValid(); } /** * * @return A copy of the current bean and a deep copy of all owned array elements */ public entity.KeyableBean copy() { return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).copy(); } public void doNotValidateOnCommit() { ((com.guidewire.bizrules.domain.RuleInternalMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleInternalMethods")).doNotValidateOnCommit(); } public entity.KeyableBean downcast(gw.entity.IEntityType newSubtype) { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).downcast(newSubtype); } public java.util.List<com.guidewire.pl.system.integration.messaging.events.EventDescriptor> generateInsertEventsInternal() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).generateInsertEventsInternal(); } public java.util.List<com.guidewire.pl.system.integration.messaging.events.EventDescriptor> generateRemoveEventsInternal() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).generateRemoveEventsInternal(); } public java.util.List<com.guidewire.pl.system.integration.messaging.events.EventDescriptor> generateUpdateEventsInternal() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).generateUpdateEventsInternal(); } @com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor @gw.internal.gosu.parser.ExtendedProperty public java.lang.Integer getBeanVersion() { return ((com.guidewire.pl.domain.persistence.core.VersionablePublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.VersionablePublicMethods")).getBeanVersion(); } /** * Gets the value of the ClaimSegments field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritClaimSegment[] getClaimSegments() { return (entity.AppCritClaimSegment[])__getInternalInterface().getFieldValue(CLAIMSEGMENTS_PROP.get()); } /** * Gets the value of the Description field. */ @gw.internal.gosu.parser.ExtendedProperty public java.lang.String getDescription() { return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(DESCRIPTION_PROP.get()); } /** * Gets the value of the ExposureTypes field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritExposureType[] getExposureTypes() { return (entity.AppCritExposureType[])__getInternalInterface().getFieldValue(EXPOSURETYPES_PROP.get()); } @com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor @gw.internal.gosu.parser.ExtendedProperty public gw.pl.persistence.core.Key getID() { return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).getID(); } public gw.pl.persistence.core.Key getIdToSetForForeignKey(gw.entity.ILinkPropertyInfo link) { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).getIdToSetForForeignKey(link); } /** * Gets the value of the Jurisdictions field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritJurisdiction[] getJurisdictions() { return (entity.AppCritJurisdiction[])__getInternalInterface().getFieldValue(JURISDICTIONS_PROP.get()); } /** * Gets the value of the LossTypes field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritLossType[] getLossTypes() { return (entity.AppCritLossType[])__getInternalInterface().getFieldValue(LOSSTYPES_PROP.get()); } /** * Gets the value of the Name field. */ @gw.internal.gosu.parser.ExtendedProperty public java.lang.String getName() { return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(NAME_PROP.get()); } public java.util.List<entity.RuleCommandDefinition> getOrderedRuleCommandDefinitions() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).getOrderedRuleCommandDefinitions(); } public java.util.List<entity.RuleVariable> getOrderedRuleVariables() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).getOrderedRuleVariables(); } public java.lang.Iterable<? extends entity.RuleVersionAware> getOwners() { return ((gw.bizrules.domain.RuleVersionDependent)__getDelegateManager().getImplementation("gw.bizrules.domain.RuleVersionDependent")).getOwners(); } /** * Gets the value of the PolicyTypes field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.AppCritPolicyType[] getPolicyTypes() { return (entity.AppCritPolicyType[])__getInternalInterface().getFieldValue(POLICYTYPES_PROP.get()); } @com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor @gw.internal.gosu.parser.ExtendedProperty public java.lang.String getPublicID() { return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).getPublicID(); } /** * Gets the value of the RuleCommandDefinitions field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleCommandDefinition[] getRuleCommandDefinitions() { return (entity.RuleCommandDefinition[])__getInternalInterface().getFieldValue(RULECOMMANDDEFINITIONS_PROP.get()); } /** * Gets the value of the RuleCondition field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleCondition getRuleCondition() { return (entity.RuleCondition)__getInternalInterface().getFieldValue(RULECONDITION_PROP.get()); } public gw.pl.persistence.core.Key getRuleConditionID() { return (gw.pl.persistence.core.Key)getRawFieldValue(RULECONDITION_PROP.get()); } /** * Gets the value of the RuleContextDefinitionKey field. */ @gw.internal.gosu.parser.ExtendedProperty public typekey.RuleContextDefinitionKey getRuleContextDefinitionKey() { return (typekey.RuleContextDefinitionKey)__getInternalInterface().getFieldValue(RULECONTEXTDEFINITIONKEY_PROP.get()); } /** * Gets the value of the RuleVariables field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleVariable[] getRuleVariables() { return (entity.RuleVariable[])__getInternalInterface().getFieldValue(RULEVARIABLES_PROP.get()); } /** * Gets the value of the Subtype field. * Identifies a particular subtype within a supertype table; each subtype of a supertype has its own unique subtype value */ @gw.internal.gosu.parser.ExtendedProperty public typekey.Rule getSubtype() { return (typekey.Rule)__getInternalInterface().getFieldValue(SUBTYPE_PROP.get()); } /** * Gets the value of the TriggeringPointKey field. */ @gw.internal.gosu.parser.ExtendedProperty public typekey.TriggeringPointKey getTriggeringPointKey() { return (typekey.TriggeringPointKey)__getInternalInterface().getFieldValue(TRIGGERINGPOINTKEY_PROP.get()); } /** * Gets the value of the UpdateSystemId field. * Identifier of the system on which the rule was updated. */ @gw.internal.gosu.parser.ExtendedProperty public java.lang.String getUpdateSystemId() { return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(UPDATESYSTEMID_PROP.get()); } /** * Gets the value of the UpdateTime field. */ @gw.internal.gosu.parser.ExtendedProperty public java.util.Date getUpdateTime() { return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get()); } /** * Gets the value of the UpdateUserName field. * The name of the user who updated this rule. */ @gw.internal.gosu.parser.ExtendedProperty public java.lang.String getUpdateUserName() { return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(UPDATEUSERNAME_PROP.get()); } /** * Gets the value of the ValidationInfo field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleValidationInfo getValidationInfo() { return (entity.RuleValidationInfo)__getInternalInterface().getFieldValue(VALIDATIONINFO_PROP.get()); } /** * Gets the value of the ValidationInfoArray field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleValidationInfo[] getValidationInfoArray() { return (entity.RuleValidationInfo[])__getInternalInterface().getFieldValue(VALIDATIONINFOARRAY_PROP.get()); } public gw.pl.persistence.core.Key getValidationInfoID() { return (gw.pl.persistence.core.Key)getRawFieldValue(VALIDATIONINFO_PROP.get()); } /** * Gets the value of the Versions field. */ @gw.internal.gosu.parser.ExtendedProperty public entity.RuleVersion[] getVersions() { return (entity.RuleVersion[])__getInternalInterface().getFieldValue(VERSIONS_PROP.get()); } public void initInBundle(gw.pl.persistence.core.Key id, gw.pl.persistence.core.Bundle bundle) { ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).initInBundle(id, bundle); } /** * Gets the value of the AvailableToRun field. */ @gw.internal.gosu.parser.ExtendedProperty public java.lang.Boolean isAvailableToRun() { return (java.lang.Boolean)__getInternalInterface().getFieldValue(AVAILABLETORUN_PROP.get()); } public boolean isEditable() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).isEditable(); } /** * * @return true if this bean is to be inserted into the database when the bundle is committed. */ public boolean isNew() { return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).isNew(); } /** * * @return True if the object was created by importation from an external system, * False if it was created internally. Note that this refers to the currently * instantiated object, not the data it represents */ public boolean isNewlyImported() { return ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation("com.guidewire.commons.entity.Sourceable")).isNewlyImported(); } public boolean isTemporary() { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).isTemporary(); } public java.lang.Boolean isValid() { return ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).isValid(); } public void move(entity.RuleCommandDefinition arg0, entity.RuleCommandDefinition arg1) { ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).move(arg0, arg1); } public void onPreInit() { ((com.guidewire.pl.system.entity.PreInitCallback)__getDelegateManager().getImplementation("com.guidewire.pl.system.entity.PreInitCallback")).onPreInit(); } public entity.KeyableBean overrideBundleAdd(gw.pl.persistence.core.Bundle bundle) { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).overrideBundleAdd(bundle); } public entity.KeyableBean overrideBundleRemove(gw.pl.persistence.core.Bundle bundle) { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).overrideBundleRemove(bundle); } public void putInBundle() { ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).putInBundle(); } /** * Refreshes this bean with the latest database version. * <p/> * This method does nothing if the bean is edited or inserted in its current bundle. If the bean * no longer exists in the database, then <tt>null</tt> is returned. If the bean has been * evicted from its bundle, then <tt>null</tt> is returned. Otherwise, this bean is returned, with its contents * updated. */ public entity.KeyableBean refresh() { return ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).refresh(); } public entity.KeyableBean reload(gw.pl.persistence.core.Bundle bundle) { return ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).reload(bundle); } /** * Marks this bean for remove. A bean marked for remove will be deleted or retired when the transaction * is committed. Once a bean is marked for remove, it cannot be switched to update, edit, or read. * <p> * WARNING: This method is designed for simple custom entities which are normally not * associated with other entities. Undesirable results may occur when used on out-of-box entities. */ public void remove() { ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).remove(); } public void removeAllConditionLines() { ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).removeAllConditionLines(); } public void removeEmptyRuleVariables() { ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).removeEmptyRuleVariables(); } /** * Removes the given element from the ClaimSegments array. This is achieved by marking the element for removal. */ public void removeFromClaimSegments(entity.AppCritClaimSegment element) { __getInternalInterface().removeArrayElement(CLAIMSEGMENTS_PROP.get(), element); } /** * Removes the given element from the ClaimSegments array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromClaimSegments(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(CLAIMSEGMENTS_PROP.get(), elementID); } /** * Removes the given element from the ExposureTypes array. This is achieved by marking the element for removal. */ public void removeFromExposureTypes(entity.AppCritExposureType element) { __getInternalInterface().removeArrayElement(EXPOSURETYPES_PROP.get(), element); } /** * Removes the given element from the ExposureTypes array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromExposureTypes(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(EXPOSURETYPES_PROP.get(), elementID); } /** * Removes the given element from the Jurisdictions array. This is achieved by marking the element for removal. */ public void removeFromJurisdictions(entity.AppCritJurisdiction element) { __getInternalInterface().removeArrayElement(JURISDICTIONS_PROP.get(), element); } /** * Removes the given element from the Jurisdictions array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromJurisdictions(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(JURISDICTIONS_PROP.get(), elementID); } /** * Removes the given element from the LossTypes array. This is achieved by marking the element for removal. */ public void removeFromLossTypes(entity.AppCritLossType element) { __getInternalInterface().removeArrayElement(LOSSTYPES_PROP.get(), element); } /** * Removes the given element from the LossTypes array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromLossTypes(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(LOSSTYPES_PROP.get(), elementID); } /** * Removes the given element from the PolicyTypes array. This is achieved by marking the element for removal. */ public void removeFromPolicyTypes(entity.AppCritPolicyType element) { __getInternalInterface().removeArrayElement(POLICYTYPES_PROP.get(), element); } /** * Removes the given element from the PolicyTypes array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromPolicyTypes(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(POLICYTYPES_PROP.get(), elementID); } /** * Removes the given element from the RuleCommandDefinitions array. This is achieved by marking the element for removal. */ public void removeFromRuleCommandDefinitions(entity.RuleCommandDefinition element) { __getInternalInterface().removeArrayElement(RULECOMMANDDEFINITIONS_PROP.get(), element); } /** * Removes the given element from the RuleCommandDefinitions array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromRuleCommandDefinitions(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(RULECOMMANDDEFINITIONS_PROP.get(), elementID); } /** * Removes the given element from the RuleVariables array. This is achieved by marking the element for removal. */ public void removeFromRuleVariables(entity.RuleVariable element) { __getInternalInterface().removeArrayElement(RULEVARIABLES_PROP.get(), element); } /** * Removes the given element from the RuleVariables array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromRuleVariables(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(RULEVARIABLES_PROP.get(), elementID); } /** * Removes the given element from the ValidationInfoArray array. This is achieved by marking the element for removal. */ public void removeFromValidationInfoArray(entity.RuleValidationInfo element) { __getInternalInterface().removeArrayElement(VALIDATIONINFOARRAY_PROP.get(), element); } /** * Removes the given element from the ValidationInfoArray array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromValidationInfoArray(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(VALIDATIONINFOARRAY_PROP.get(), elementID); } /** * Removes the given element from the Versions array. This is achieved by marking the element for removal. */ public void removeFromVersions(entity.RuleVersion element) { __getInternalInterface().removeArrayElement(VERSIONS_PROP.get(), element); } /** * Removes the given element from the Versions array. This is achieved by marking the element for removal. * @deprecated Please use the version that takes an entity instead. */ @java.lang.Deprecated public void removeFromVersions(gw.pl.persistence.core.Key elementID) { __getInternalInterface().removeArrayElement(VERSIONS_PROP.get(), elementID); } public void removeRuleCommandDefinition(entity.RuleCommandDefinition arg0) { ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).removeRuleCommandDefinition(arg0); } public void removeRuleVariable(entity.RuleVariable arg0) { ((com.guidewire.bizrules.domain.RuleDomainMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleDomainMethods")).removeRuleVariable(arg0); } public void removed() { ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).removed(); } public void saveValidationInfoLater() { ((com.guidewire.bizrules.domain.RuleInternalMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleInternalMethods")).saveValidationInfoLater(); } public void saveValidationInfoNow() { ((com.guidewire.bizrules.domain.RuleInternalMethods)__getDelegateManager().getImplementation("com.guidewire.bizrules.domain.RuleInternalMethods")).saveValidationInfoNow(); } /** * Sets the value of the AvailableToRun field. */ public void setAvailableToRun(java.lang.Boolean value) { __getInternalInterface().setFieldValue(AVAILABLETORUN_PROP.get(), value); } /** * Sets the value of the BeanVersion field. */ public void setBeanVersion(java.lang.Integer value) { __getInternalInterface().setFieldValue(BEANVERSION_PROP.get(), value); } /** * Sets the value of the ClaimSegments field. */ public void setClaimSegments(entity.AppCritClaimSegment[] value) { __getInternalInterface().setFieldValue(CLAIMSEGMENTS_PROP.get(), value); } /** * Sets the value of the Description field. */ public void setDescription(java.lang.String value) { __getInternalInterface().setFieldValueForCodegen(DESCRIPTION_PROP.get(), value); } /** * Sets the value of the ExposureTypes field. */ public void setExposureTypes(entity.AppCritExposureType[] value) { __getInternalInterface().setFieldValue(EXPOSURETYPES_PROP.get(), value); } /** * Sets the value of the ID field. */ public void setID(gw.pl.persistence.core.Key value) { __getInternalInterface().setFieldValue(ID_PROP.get(), value); } /** * Sets the value of the Jurisdictions field. */ public void setJurisdictions(entity.AppCritJurisdiction[] value) { __getInternalInterface().setFieldValue(JURISDICTIONS_PROP.get(), value); } public void setLazyLoadedRow() { ((com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods")).setLazyLoadedRow(); } /** * Sets the value of the LossTypes field. */ public void setLossTypes(entity.AppCritLossType[] value) { __getInternalInterface().setFieldValue(LOSSTYPES_PROP.get(), value); } /** * Sets the value of the Name field. */ public void setName(java.lang.String value) { __getInternalInterface().setFieldValueForCodegen(NAME_PROP.get(), value); } /** * Set a flag denoting that the currently instantiated object has been newly imported from * an external source * @param newlyImported */ public void setNewlyImported(boolean newlyImported) { ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation("com.guidewire.commons.entity.Sourceable")).setNewlyImported(newlyImported); } /** * Sets the value of the PolicyTypes field. */ public void setPolicyTypes(entity.AppCritPolicyType[] value) { __getInternalInterface().setFieldValue(POLICYTYPES_PROP.get(), value); } @com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor public void setPublicID(java.lang.String id) { ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods")).setPublicID(id); } /** * Sets the value of the RuleCommandDefinitions field. */ public void setRuleCommandDefinitions(entity.RuleCommandDefinition[] value) { __getInternalInterface().setFieldValue(RULECOMMANDDEFINITIONS_PROP.get(), value); } /** * Sets the value of the RuleCondition field. */ public void setRuleCondition(entity.RuleCondition value) { __getInternalInterface().setFieldValue(RULECONDITION_PROP.get(), value); } public void setRuleConditionID(gw.pl.persistence.core.Key value) { setFieldValue(RULECONDITION_PROP.get(), value); } /** * Sets the value of the RuleContextDefinitionKey field. */ public void setRuleContextDefinitionKey(typekey.RuleContextDefinitionKey value) { __getInternalInterface().setFieldValue(RULECONTEXTDEFINITIONKEY_PROP.get(), value); } /** * Sets the value of the RuleVariables field. */ public void setRuleVariables(entity.RuleVariable[] value) { __getInternalInterface().setFieldValue(RULEVARIABLES_PROP.get(), value); } /** * Sets the value of the Subtype field. */ public void setSubtype(typekey.Rule value) { __getInternalInterface().setFieldValue(SUBTYPE_PROP.get(), value); } /** * Sets the value of the TriggeringPointKey field. */ public void setTriggeringPointKey(typekey.TriggeringPointKey value) { __getInternalInterface().setFieldValue(TRIGGERINGPOINTKEY_PROP.get(), value); } /** * Sets the value of the UpdateSystemId field. */ public void setUpdateSystemId(java.lang.String value) { __getInternalInterface().setFieldValueForCodegen(UPDATESYSTEMID_PROP.get(), value); } /** * Sets the value of the UpdateTime field. */ public void setUpdateTime(java.util.Date value) { __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value); } /** * Sets the value of the UpdateUserName field. */ public void setUpdateUserName(java.lang.String value) { __getInternalInterface().setFieldValueForCodegen(UPDATEUSERNAME_PROP.get(), value); } /** * Sets the value of the ValidationInfo field. */ public void setValidationInfo(entity.RuleValidationInfo value) { __getInternalInterface().setFieldValue(VALIDATIONINFO_PROP.get(), value); } /** * Sets the value of the ValidationInfoArray field. */ public void setValidationInfoArray(entity.RuleValidationInfo[] value) { __getInternalInterface().setFieldValue(VALIDATIONINFOARRAY_PROP.get(), value); } public void setValidationInfoID(gw.pl.persistence.core.Key value) { setFieldValue(VALIDATIONINFO_PROP.get(), value); } /** * Sets the value of the Versions field. */ public void setVersions(entity.RuleVersion[] value) { __getInternalInterface().setFieldValue(VERSIONS_PROP.get(), value); } /** * Set's the version of the bean to the next value (i.e. the bean version original value+1) * Multiple calls to this method on the same bean will result in the same value being used * for the version (i.e. it is idempotent). * * Calling this method will force the bean to be written to the database and participate fully * in the commit cycle e.g. pre-update rules will be run, etc. */ public void touch() { ((com.guidewire.pl.domain.persistence.core.VersionablePublicMethods)__getDelegateManager().getImplementation("com.guidewire.pl.domain.persistence.core.VersionablePublicMethods")).touch(); } } static { java.util.HashMap<java.lang.String, java.lang.String> config = new java.util.HashMap<java.lang.String, java.lang.String>(); config.put("com.guidewire.bizrules.domain.RuleDomainMethods", "com.guidewire.cc.domain.bizrules.ReserveRuleImpl"); config.put("com.guidewire.bizrules.domain.RuleInternalMethods", "com.guidewire.bizrules.domain.RuleImpl"); config.put("com.guidewire.bizrules.management.RuleVersionAwareInternal", "com.guidewire.bizrules.management.RuleVersionDependentImpl"); config.put("com.guidewire.commons.entity.Keyable", "com.guidewire.pl.system.entity.proxy.AbstractVersionableBeanProxy"); config.put("com.guidewire.commons.entity.Sourceable", "com.guidewire.pl.system.entity.proxy.AbstractVersionableBeanProxy"); config.put("com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods", "com.guidewire.pl.system.entity.proxy.AbstractVersionableBeanProxy"); config.put("com.guidewire.pl.domain.persistence.core.VersionablePublicMethods", "com.guidewire.pl.system.entity.proxy.AbstractVersionableBeanProxy"); config.put("com.guidewire.pl.domain.persistence.core.impl.BeanInternal", "com.guidewire.pl.system.entity.proxy.BeanProxy"); config.put("com.guidewire.pl.domain.persistence.core.impl.KeyableBeanInternalMethods", "com.guidewire.pl.system.entity.proxy.AbstractKeyableBeanProxy"); config.put("com.guidewire.pl.domain.persistence.core.impl.VersionableInternal", "com.guidewire.pl.system.entity.proxy.AbstractVersionableBeanProxy"); config.put("com.guidewire.pl.persistence.core.BeanMethods", "com.guidewire.pl.system.entity.proxy.BeanProxy"); config.put("com.guidewire.pl.system.bundle.InsertCallback", "com.guidewire.bizrules.management.RuleVersionDependentImpl"); config.put("com.guidewire.pl.system.bundle.RemoveCallback", "com.guidewire.bizrules.management.RuleVersionDependentImpl"); config.put("com.guidewire.pl.system.bundle.UpdateCallback", "com.guidewire.bizrules.management.RuleVersionDependentImpl"); config.put("com.guidewire.pl.system.entity.PreInitCallback", "com.guidewire.bizrules.management.RuleVersionDependentImpl"); config.put("gw.bizrules.domain.RuleVersionDependent", "com.guidewire.cc.domain.bizrules.ReserveRuleImpl"); config.put("gw.pl.persistence.core.Bean", "com.guidewire.pl.system.entity.proxy.BeanProxy"); config.put("gw.pl.persistence.core.BundleProvider", "com.guidewire.pl.system.entity.proxy.BeanProxy"); config.put("java.lang.Comparable", "com.guidewire.pl.system.entity.proxy.BeanProxy"); DELEGATE_MAP = com.guidewire.pl.persistence.code.DelegateMap.newInstance(entity.ReserveRule.class, config); com.guidewire._generated.entity.ReserveRuleInternalAccess.FRIEND_ACCESSOR.init(new com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.ReserveRule, com.guidewire._generated.entity.ReserveRuleInternal>() { public java.lang.Object getImplementation(entity.ReserveRule bean, java.lang.String interfaceName) { return bean.__getDelegateManager().getImplementation(interfaceName); } public com.guidewire._generated.entity.ReserveRuleInternal getInternalInterface(entity.ReserveRule bean) { if(bean == null) { return null; }; return bean.__getInternalInterface(); } public entity.ReserveRule newEmptyInstance() { return new entity.ReserveRule((java.lang.Void)null); } public void validateImplementations() { DELEGATE_MAP.validateImplementations(); } }); } }
[ "azanaera691@gmail.com" ]
azanaera691@gmail.com
4f05c5034c45acbcd0d0a6a4e41e86d5561e2c63
a5eed4a40056d496ec1ca721e88f11415329db34
/src/LogicPrograming/ReverseNo.java
ae4c788e99cadec49c1a13e0f3ef330f5194651f
[]
no_license
rakeshgit19/Automation_Project
855e1ba829d8dd7c6964dadb7f96cefa29bf7548
c99fb95daa702a71694fcb1085c17d23704fc951
refs/heads/master
2020-07-05T20:53:08.413922
2019-08-16T19:32:40
2019-08-16T19:32:40
202,771,773
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package LogicPrograming; public class ReverseNo { public static void main(String[] args) { Integer I = new Integer(1234); String s = I.toString(); char [] ch = s.toCharArray(); for (int i = ch.length-1; i>=0; i--) { System.out.print(ch[i]); } } }
[ "rakeshiiet2010@gmail.com" ]
rakeshiiet2010@gmail.com
8486bc2a398b277caad4d6caaa9822cff611869a
9db5233130384baff68cb5268566ef11459534de
/app/src/main/java/com/example/noskill64/frankies_login/PlusBaseActivity.java
8a4d3724760ee1ad982ee271e5d8e100b8fe5f13
[]
no_license
noskill64/Frankies_login
1e2908ecf41ab42ffd4f58a2a55f4b723566457a
2f742aeb703b7a2a7bb0d1e30f2e7eac836d0977
refs/heads/master
2020-04-19T07:01:45.747657
2015-07-24T17:18:14
2015-07-24T17:18:14
39,647,169
0
0
null
null
null
null
UTF-8
Java
false
false
9,983
java
package com.example.noskill64.frankies_login; import android.content.Intent; import android.content.IntentSender; import android.os.Bundle; import android.app.Activity; import android.util.Log; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesClient; import com.google.android.gms.common.Scopes; import com.google.android.gms.plus.PlusClient; /** * A base class to wrap communication with the Google Play Services PlusClient. */ public abstract class PlusBaseActivity extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener { private static final String TAG = PlusBaseActivity.class.getSimpleName(); // A magic number we will use to know that our sign-in error resolution activity has completed private static final int OUR_REQUEST_CODE = 49404; // A flag to stop multiple dialogues appearing for the user private boolean mAutoResolveOnFail; // A flag to track when a connection is already in progress public boolean mPlusClientIsConnecting = false; // This is the helper object that connects to Google Play Services. private PlusClient mPlusClient; // The saved result from {@link #onConnectionFailed(ConnectionResult)}. If a connection // attempt has been made, this is non-null. // If this IS null, then the connect method is still running. private ConnectionResult mConnectionResult; /** * Called when the {@link PlusClient} revokes access to this app. */ protected abstract void onPlusClientRevokeAccess(); /** * Called when the PlusClient is successfully connected. */ protected abstract void onPlusClientSignIn(); /** * Called when the {@link PlusClient} is disconnected. */ protected abstract void onPlusClientSignOut(); /** * Called when the {@link PlusClient} is blocking the UI. If you have a progress bar widget, * this tells you when to show or hide it. */ protected abstract void onPlusClientBlockingUI(boolean show); /** * Called when there is a change in connection state. If you have "Sign in"/ "Connect", * "Sign out"/ "Disconnect", or "Revoke access" buttons, this lets you know when their states * need to be updated. */ protected abstract void updateConnectButtonState(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Initialize the PlusClient connection. // Scopes indicate the information about the user your application will be able to access. mPlusClient = new PlusClient.Builder(this, this, this).setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_ME).build(); } /** * Try to sign in the user. */ public void signIn() { if (!mPlusClient.isConnected()) { // Show the dialog as we are now signing in. setProgressBarVisible(true); // Make sure that we will start the resolution (e.g. fire the intent and pop up a // dialog for the user) for any errors that come in. mAutoResolveOnFail = true; // We should always have a connection result ready to resolve, // so we can start that process. if (mConnectionResult != null) { startResolution(); } else { // If we don't have one though, we can start connect in // order to retrieve one. initiatePlusClientConnect(); } } updateConnectButtonState(); } /** * Connect the {@link PlusClient} only if a connection isn't already in progress. This will * call back to {@link #onConnected(android.os.Bundle)} or * {@link #onConnectionFailed(com.google.android.gms.common.ConnectionResult)}. */ private void initiatePlusClientConnect() { if (!mPlusClient.isConnected() && !mPlusClient.isConnecting()) { mPlusClient.connect(); } } /** * Disconnect the {@link PlusClient} only if it is connected (otherwise, it can throw an error.) * This will call back to {@link #onDisconnected()}. */ private void initiatePlusClientDisconnect() { if (mPlusClient.isConnected()) { mPlusClient.disconnect(); } } /** * Sign out the user (so they can switch to another account). */ public void signOut() { // We only want to sign out if we're connected. if (mPlusClient.isConnected()) { // Clear the default account in order to allow the user to potentially choose a // different account from the account chooser. mPlusClient.clearDefaultAccount(); // Disconnect from Google Play Services, then reconnect in order to restart the // process from scratch. initiatePlusClientDisconnect(); Log.v(TAG, "Sign out successful!"); } updateConnectButtonState(); } /** * Revoke Google+ authorization completely. */ public void revokeAccess() { if (mPlusClient.isConnected()) { // Clear the default account as in the Sign Out. mPlusClient.clearDefaultAccount(); // Revoke access to this entire application. This will call back to // onAccessRevoked when it is complete, as it needs to reach the Google // authentication servers to revoke all tokens. mPlusClient.revokeAccessAndDisconnect(new PlusClient.OnAccessRevokedListener() { public void onAccessRevoked(ConnectionResult result) { updateConnectButtonState(); onPlusClientRevokeAccess(); } }); } } @Override protected void onStart() { super.onStart(); initiatePlusClientConnect(); } @Override protected void onStop() { super.onStop(); initiatePlusClientDisconnect(); } public boolean isPlusClientConnecting() { return mPlusClientIsConnecting; } private void setProgressBarVisible(boolean flag) { mPlusClientIsConnecting = flag; onPlusClientBlockingUI(flag); } /** * A helper method to flip the mResolveOnFail flag and start the resolution * of the ConnectionResult from the failed connect() call. */ private void startResolution() { try { // Don't start another resolution now until we have a result from the activity we're // about to start. mAutoResolveOnFail = false; // If we can resolve the error, then call start resolution and pass it an integer tag // we can use to track. // This means that when we get the onActivityResult callback we'll know it's from // being started here. mConnectionResult.startResolutionForResult(this, OUR_REQUEST_CODE); } catch (IntentSender.SendIntentException e) { // Any problems, just try to connect() again so we get a new ConnectionResult. mConnectionResult = null; initiatePlusClientConnect(); } } /** * An earlier connection failed, and we're now receiving the result of the resolution attempt * by PlusClient. * * @see #onConnectionFailed(ConnectionResult) */ @Override protected void onActivityResult(int requestCode, int responseCode, Intent intent) { updateConnectButtonState(); if (requestCode == OUR_REQUEST_CODE && responseCode == RESULT_OK) { // If we have a successful result, we will want to be able to resolve any further // errors, so turn on resolution with our flag. mAutoResolveOnFail = true; // If we have a successful result, let's call connect() again. If there are any more // errors to resolve we'll get our onConnectionFailed, but if not, // we'll get onConnected. initiatePlusClientConnect(); } else if (requestCode == OUR_REQUEST_CODE && responseCode != RESULT_OK) { // If we've got an error we can't resolve, we're no longer in the midst of signing // in, so we can stop the progress spinner. setProgressBarVisible(false); } } /** * Successfully connected (called by PlusClient) */ @Override public void onConnected(Bundle connectionHint) { updateConnectButtonState(); setProgressBarVisible(false); onPlusClientSignIn(); } /** * Successfully disconnected (called by PlusClient) */ @Override public void onDisconnected() { updateConnectButtonState(); onPlusClientSignOut(); } /** * Connection failed for some reason (called by PlusClient) * Try and resolve the result. Failure here is usually not an indication of a serious error, * just that the user's input is needed. * * @see #onActivityResult(int, int, Intent) */ @Override public void onConnectionFailed(ConnectionResult result) { updateConnectButtonState(); // Most of the time, the connection will fail with a user resolvable result. We can store // that in our mConnectionResult property ready to be used when the user clicks the // sign-in button. if (result.hasResolution()) { mConnectionResult = result; if (mAutoResolveOnFail) { // This is a local helper function that starts the resolution of the problem, // which may be showing the user an account chooser or similar. startResolution(); } } } public PlusClient getPlusClient() { return mPlusClient; } }
[ "franky.nelis64@gmail.com" ]
franky.nelis64@gmail.com
98d33a671a0fcd62c194d3d6288db92ce255f7a7
d50d9178ac373d6287de4b0293deea785467b290
/SistemaDePaquetes/src/org/leonelhernandez/SistemaDePaquetes/bean/Notificacion.java
224374bc1aeec11a49c9028d009b6a88d5b833a4
[]
no_license
LeonelHernandez2014008/SistemaDePaquetesIN6AM
0987910a2e7242e6cce2a4974efb6f423accdbb5
b5abbafec7ff91b507a97d777489e49ca2f0033c
refs/heads/master
2021-01-10T16:55:30.169546
2016-02-13T20:05:41
2016-02-13T20:05:41
51,663,072
0
0
null
null
null
null
UTF-8
Java
false
false
1,489
java
package org.leonelhernandez.SistemaDePaquetes.bean; public class Notificacion { private Integer idNotificacion; private String tipoDeNotificacion; private String fechaNotificacion; private String mensaje; private Envio idEnvio; public Envio getIdEnvio() { return idEnvio; } public void setIdEnvio(Envio idEnvio) { this.idEnvio = idEnvio; } public Integer getIdNotificacion() { return idNotificacion; } public void setIdNotificacion(Integer idNotificacion) { this.idNotificacion = idNotificacion; } public String getTipoDeNotificacion() { return tipoDeNotificacion; } public void setTipoDeNotificacion(String tipoDeNotificacion) { this.tipoDeNotificacion = tipoDeNotificacion; } public String getFechaNotificacion() { return fechaNotificacion; } public void setFechaNotificacion(String fechaNotificacion) { this.fechaNotificacion = fechaNotificacion; } public String getMensaje() { return mensaje; } public void setMensaje(String mensaje) { this.mensaje = mensaje; } public Notificacion(Integer idNotificacion, String tipoDeNotificacion, String fechaNotificacion, String mensaje, Envio idEnvio) { super(); this.idNotificacion = idNotificacion; this.tipoDeNotificacion = tipoDeNotificacion; this.fechaNotificacion = fechaNotificacion; this.mensaje = mensaje; this.idEnvio = idEnvio; } public Notificacion() { super(); // TODO Auto-generated constructor stub } }
[ "leonelhernandez899@gmail.com" ]
leonelhernandez899@gmail.com
ae01ca4b39fc5e3ec2b7bf4ea8f25f61300eee69
030f2e12403afb17c2327fe869f6e5073bce511d
/Decorator/Java/CoffeeShowDecorator/src/CoffeeShopDecorator/SoyCondiment.java
ff28a18fc9e299143bf037d250ffb66b778e391b
[]
no_license
airien/Systemutviklerskolen_patterns
8a4671031b106f891c0d258b1dcd2fc8bf1a8388
d88d8c4bdf05e78c6ab686c61465b3fdae661ad0
refs/heads/master
2023-03-10T00:50:57.772880
2021-02-25T14:13:37
2021-02-25T14:13:37
342,014,748
0
1
null
null
null
null
UTF-8
Java
false
false
468
java
package CoffeeShopDecorator; //ConcreteDecorator public class SoyCondiment extends CondimentDecorator { public SoyCondiment(Beverage beverage) { super(beverage); description = "soy"; } @Override public double getPrice() { return wrappedBeverage.getPrice() + 0.2d; } @Override public String getDescription() { return String.format("%s, %s", wrappedBeverage.getDescription(), description); } }
[ "hanne.johnsen@banenor.no" ]
hanne.johnsen@banenor.no
2befc01c3ad5d6edbaba0211e0c1c1683f62abad
042235d190e6b6771492d13147a0394a2a89e9c8
/src/com/ryanafzal/io/calculator/resources/units/QuantityUnit.java
7e02ab2da03c774e36e28081bf9d5534797ebef1
[]
no_license
Ryan-Afzal/LaTeXCalculator
3b3b247a1985798d4748aab6628e40d3523a0c78
b2fe6e15a1cdb29f6a9a1b5f00e15a1f9cc4dc32
refs/heads/master
2020-03-27T18:00:06.625415
2018-12-06T21:37:54
2018-12-06T21:37:54
146,891,248
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
package com.ryanafzal.io.calculator.resources.units; import com.ryanafzal.io.calculator.resources.units.prefix.Prefix; /** * Grams * @author s-afzalr * */ public class QuantityUnit extends Unit { public QuantityUnit(Prefix prefix) { super(prefix); } public QuantityUnit() { super(Prefix.NONE); } @Override public String getName() { return "grams"; } @Override public String getSymbol() { return "g"; } }
[ "s-afzalr@bsd405.org" ]
s-afzalr@bsd405.org
e9741dfa3c307ebea38db988c37db1770b51b3f6
ba3a5887f3c7eba635377b57d68c7c3747762826
/book/src/com/chengzi/utils/JdbcUtils.java
b57742165974bdc53b354a94d3618894899f948a
[]
no_license
Galun-yase/JavaWeb
9b1210bd3a47b84c4490fe398a9bd4666e98841a
6b560450dd35e22db89604d745c4feb15e756b58
refs/heads/master
2021-03-29T19:56:36.412330
2021-01-15T09:09:37
2021-01-15T09:09:37
247,981,233
2
1
null
null
null
null
UTF-8
Java
false
false
3,397
java
package com.chengzi.utils; import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSourceFactory; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.SQLException; import java.util.Properties; public class JdbcUtils { private static DruidDataSource dataSource; private static ThreadLocal<Connection> conns=new ThreadLocal<>(); static { try { Properties properties=new Properties(); //读取配置文件jdbc.properties InputStream inputStream=JdbcUtils.class.getClassLoader().getResourceAsStream("jdbc.properties"); //从流中加载数据 properties.load(inputStream); //创建数据库连接池 dataSource= (DruidDataSource)DruidDataSourceFactory.createDataSource(properties); } catch (Exception e) { e.printStackTrace(); } } /** * 获取数据库连接池中的连接 * @return 如果返回null,则获取连接失败 */ public static Connection getConnection(){ Connection conn=conns.get(); if (conn==null){ try { conn=dataSource.getConnection();//从数据库连接池获取连接 conn.setAutoCommit(false);//设置为手动提交事务 conns.set(conn);//将连接保存到ThreadLocal对象中,供后面的jdbc操作使用 } catch (SQLException e) { e.printStackTrace(); } } return conn; } /** * 提交事务,并释放连接 */ public static void commitAndClose(){ Connection connection=conns.get(); if (connection!=null){ try { connection.commit();//提交事务 } catch (SQLException e) { e.printStackTrace(); }finally { try { connection.close();//关闭连接,放回数据库连接池 } catch (SQLException e) { e.printStackTrace(); } } } //使用完后一定要移除该值,tomcat中使用线程池技术,线程不销毁只是放回线程池,故该value一直存在 conns.remove(); } /** * 回滚事务,并释放连接到数据连接池 */ public static void rollbackAndClose(){ Connection connection=conns.get(); if (connection!=null){ try { connection.rollback();//提交事务 } catch (SQLException e) { e.printStackTrace(); }finally { try { connection.close();//关闭连接,放回数据库连接池 } catch (SQLException e) { e.printStackTrace(); } } } //使用完后一定要移除该值,tomcat中使用线程池技术,线程不销毁只是放回线程池,故该value一直存在 conns.remove(); } // /** // * 关闭连接,放回到数据库连接池 // */ // public static void close(Connection conn){ // if (conn!=null){ // try{ // conn.close(); // }catch(SQLException e){ // e.printStackTrace(); // } // } // } }
[ "534897552@qq.com" ]
534897552@qq.com
8af8798db48273feba9c3d7d72eeb6cefbd9bec6
8184bb22f8e63e450bf0e464b0fed4b9e5fe269c
/RmsProject/src/main/java/com/sathya/rms/service/ShiftService.java
95bd7596c9a173e6d1054cc19bd30eb8ccb821a7
[]
no_license
anilkumarjava/myproject
221082abe8bcbc0aa252be22b96dce3887c549bb
dcac004cdf8c4b50b642d6334ea007eb6161449a
refs/heads/master
2020-09-12T11:49:55.268425
2019-12-18T07:27:14
2019-12-18T07:27:14
222,415,210
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.sathya.rms.service; import org.springframework.stereotype.Service; import com.sathya.rms.entity.Shift; @Service public interface ShiftService { public Shift insertShift(Shift shift); public Shift updateShift(Shift shift); public void deleteShift(Integer id); public Iterable<Shift> getAllShift(); }
[ "doolamanil432@gmail.com" ]
doolamanil432@gmail.com
86e1bf30ce18657a5b66448a6d75bda776bd3295
9fb32a04492c835121d02cfe62c3b43c8124d484
/Torsdag/backend/src/main/java/DTOs/ChuckDTO.java
54bbe78b4b662c67ca36b9329cb826ff652537ba
[]
no_license
Pelle-pr/Flow3Week2
c06f0d3311d17d701f3442b51b733b4df34d84cd
5cf4d8b456cb4e12b76da438ad92338b72d50409
refs/heads/master
2023-01-08T03:18:47.809311
2020-11-06T14:25:08
2020-11-06T14:25:08
310,618,225
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package DTOs; public class ChuckDTO { private String value; private String reference; public ChuckDTO(String value) { this.value = value; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getReference() { return reference; } public void setReference(String reference) { this.reference = reference; } }
[ "cph-pr128@cphbusiness.com" ]
cph-pr128@cphbusiness.com
ab563f5290269bcdeff856480e14086e7ab299c5
603dbcbc7e49167cd4cfe9bbcb80a338dcbad3d3
/src/main/java/run/TimerTaskCall.java
af85c9be351f644b4cc9bffe02c473e1ef04e8a1
[]
no_license
tomotakashimizu/WeatherTimeMeasurement
292ad68567be77d8ca403af8d83e8e7e0a41f86a
eabbe756215b311aff2e6cfc3b4079dc93110465
refs/heads/main
2023-07-18T22:17:02.170566
2021-09-17T18:20:02
2021-09-17T18:20:02
394,062,021
0
0
null
2021-09-17T18:20:03
2021-08-08T20:16:13
Java
UTF-8
Java
false
false
7,481
java
package run; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.TimerTask; import java.util.function.Function; import java.util.stream.Collectors; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import org.apache.http.HttpHost; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.common.xcontent.XContentType; import model.api.APIKey; import model.api.WebAPI; import model.gson.OpenWeatherModel; import model.postgres.Postgres; import model.weather.WeatherValue; public class TimerTaskCall extends TimerTask { // 日付/時間をオフセット付きで書式設定または解析するISO日付/時間フォーマッタ(「2011-12-03T10:15:30+01:00」など) DateTimeFormatter dateTimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; WebAPI openWeatherAPI = new WebAPI("https://api.openweathermap.org/data/2.5/weather", "?q=tokyo&units=metric", APIKey.getMyAPIKey(), "&lang=ja"); Gson gson = new Gson(); String weatherJson = openWeatherAPI.createJSON(); OpenWeatherModel openWeatherModel = gson.fromJson(weatherJson, OpenWeatherModel.class); String weatherCity = openWeatherModel.name; String targetWeather = "晴れ"; String initialWeather = openWeatherModel.weather.get(0).description; List<String> initialWeatherList = new ArrayList<String>(Arrays.asList(initialWeather)); WeatherValue weatherValue = new WeatherValue(weatherCity, targetWeather, initialWeather, initialWeatherList); int id = 0; int timeInterval = 5; // Postgres クラスをインスタンス化 Postgres postgresTest = new Postgres("testdb", "testuser", "testpass"); // Elasticsearch に接続 RestHighLevelClient client = new RestHighLevelClient( RestClient.builder(new HttpHost("localhost", 9200, "http"))); IndexRequest indexRequest = new IndexRequest("weatherjstindex"); @Override public void run() { try { String weatherJson = openWeatherAPI.createJSON(); System.out.println("\n=== weatherJson ===\n" + weatherJson); OpenWeatherModel openWeatherModel = gson.fromJson(weatherJson, OpenWeatherModel.class); String currentWeather = openWeatherModel.weather.get(0).description; System.out.println("\n=== weatherDescription ===\n" + currentWeather); // 現在日時情報を指定フォーマットの文字列で取得 String currentTime = ZonedDateTime.now().format(dateTimeFormat); System.out.println("\n=== 現在時刻 ===\n" + currentTime + "\n"); id += 1; weatherValue.timestamp = currentTime; weatherValue.currentWeather = currentWeather; weatherValue.measuringTime += timeInterval; // 現在の天気になる前の天気(weatherDescriptionListの最後の要素を取得) String weatherBefore = weatherValue.pastWeatherList.get(weatherValue.pastWeatherList.size() - 1); // 前の天気も現在の天気も計測対象の天気と異なる場合 if (!(weatherBefore.equals(targetWeather)) && !(currentWeather.equals(targetWeather))) { if (currentWeather.equals(weatherBefore)) { // 現在の天気が前の天気と同じ場合 weatherValue.currentWeatherTime += timeInterval; } else { // 現在の天気が前の天気と異なる場合 weatherValue.currentWeatherTime = timeInterval; weatherValue.pastWeatherList.add(currentWeather); } } // 前の天気は計測対象の天気以外で、現在の天気は計測対象の天気の場合 else if (!(weatherBefore.equals(targetWeather)) && currentWeather.equals(targetWeather)) { weatherValue.currentWeatherTime = timeInterval; weatherValue.pastWeatherList.add(currentWeather); weatherValue.totalTargetWeatherTime += timeInterval; if (weatherValue.targetWeatherTimeList == null) { weatherValue.targetWeatherTimeList = new ArrayList<Integer>( Arrays.asList(weatherValue.currentWeatherTime)); } else { weatherValue.targetWeatherTimeList.add(weatherValue.currentWeatherTime); } } // 前の天気も現在の天気も計測対象の天気の場合 else if (weatherBefore.equals(targetWeather) && currentWeather.equals(targetWeather)) { weatherValue.currentWeatherTime += timeInterval; weatherValue.totalTargetWeatherTime += timeInterval; if (weatherValue.targetWeatherTimeList == null) { weatherValue.targetWeatherTimeList = new ArrayList<Integer>( Arrays.asList(weatherValue.currentWeatherTime)); } else { weatherValue.targetWeatherTimeList.set(weatherValue.totalTargetWeatherCount - 1, weatherValue.currentWeatherTime); } } // 前の天気は計測対象の天気で、現在の天気は計測対象の天気以外の場合 else if (weatherBefore.equals(targetWeather) && !(currentWeather.equals(targetWeather))) { weatherValue.currentWeatherTime = timeInterval; weatherValue.pastWeatherList.add(currentWeather); } Map<String, Long> counts = weatherValue.pastWeatherList.stream() .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); weatherValue.totalTargetWeatherCount = (int) (counts.get(targetWeather) != null ? counts.get(targetWeather) : 0); weatherValue.printData(); // Postgres にデータを保存 String newValues = id + ", '" + weatherCity + "', '" + currentTime + "', " + weatherValue.measuringTime + ", '" + targetWeather + "', '" + currentWeather + "', " + weatherValue.currentWeatherTime + ", " + weatherValue.totalTargetWeatherTime + ", " + weatherValue.totalTargetWeatherCount; postgresTest.createValues("testtable7", newValues); // POJO を JSON 形式にして データを Elasticsearch に送る indexRequest.id("" + id); indexRequest.source(new ObjectMapper().writeValueAsString(weatherValue), XContentType.JSON); System.out.println("JSONデータ" + new ObjectMapper().writeValueAsString(weatherValue)); IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT); // 正常に処理されたか確認 System.out.println("response id: " + indexResponse.getId()); System.out.println("response name: " + indexResponse.getResult().name()); } catch (Exception ex) { ex.printStackTrace(); } } }
[ "tomotaka.developer@gmail.com" ]
tomotaka.developer@gmail.com
82243603434dbd5dc6102bbd52e85ac8e465170f
c6aab9eef2a860efc45d4f5abe1d17cd32bc51a4
/src/main/java/idv/hank/explorer/service/dto/package-info.java
87661318ea098406c56cbad49a67f70eaeafcac0
[]
no_license
pohanhao/media-explorer
c6db94315bdc133a842c71d982be274ea4848991
136644e8f899430d39303b072660e6a54f7338f1
refs/heads/master
2022-07-21T20:27:27.416816
2019-09-04T08:09:50
2019-09-04T08:09:50
206,253,653
0
0
null
2022-04-09T03:38:39
2019-09-04T07:01:25
Java
UTF-8
Java
false
false
73
java
/** * Data Transfer Objects. */ package idv.hank.explorer.service.dto;
[ "hank_hao@trend.com.tw" ]
hank_hao@trend.com.tw
29e185daae4325705c32c77c2f8ee672fd17552f
e365a712c9616e4aae257ca9ddbc85fa46d28617
/src/main/java/com/devminj/blog/domain/user/UserRepository.java
f7283bdd221969ae2003303d015d4aa7009fb981
[]
no_license
ccc96360/spring-blog
5432eb1ad470d9603490ad6247cdfd6f597f197f
8af801ce2d8ec24195e87326fa57f547a016896d
refs/heads/master
2023-05-30T05:12:04.680232
2021-06-14T09:05:52
2021-06-14T09:05:52
370,335,898
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package com.devminj.blog.domain.user; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; public interface UserRepository extends JpaRepository<User,Long> { Optional<User> findBySiteId(String siteId); }
[ "ccc96360@naver.com" ]
ccc96360@naver.com
0029b5d7e0637adfbf40b26ff99afcba0e43056a
c8b7ada113ab450e38b1424693190aa32596a67b
/src/com/personal/sample/CircleActivity.java
9972278c5204f00da8c5a5795ccd1ee14b34aade
[]
no_license
vip001/CustomedController
bcf35b7fc033edb7c956f7ab4a9700d96167b899
3d5db241c5caf31038a1e735568c0e2cead9fc9b
refs/heads/master
2021-01-10T01:26:13.090633
2016-03-17T10:21:42
2016-03-17T10:21:42
54,109,110
0
0
null
null
null
null
UTF-8
Java
false
false
1,168
java
package com.personal.sample; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import com.personal.customedcontroller.R; import com.personal.view.CircleView; public class CircleActivity extends Activity { private CircleView circleView; private Button btn_click; private int i = 0; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.layout_circle); btn_click = (Button) this.findViewById(R.id.btn); circleView = (CircleView) this.findViewById(R.id.circleview); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); Bitmap topBm = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher_yellow); circleView.setBitmap(bm, topBm); btn_click.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { i++; i = i % 11; circleView.syncProgress(i * 10, 100); } }); } }
[ "526632964@qq.com" ]
526632964@qq.com
c1a647dd34a52717d08758922d5eb02ed33e4793
97e69176f58270af369e44c9f9bcc2f35ed04809
/app/src/main/java/com/iot/quickhpu/activity/CreateClassActivity.java
3c3171612ed8fa8130635f93610acbb51dad119f
[]
no_license
nimo10050/QuickHPU
d4c5b167172ee2163935558a62c6252af20ae37c
442c4023e3ab171259000a3ec9a25814ecd1e421
refs/heads/master
2021-05-01T09:02:24.841690
2018-05-18T13:49:06
2018-05-18T13:49:06
121,091,336
0
0
null
null
null
null
UTF-8
Java
false
false
2,589
java
package com.iot.quickhpu.activity; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import com.iot.quickhpu.R; import com.iot.quickhpu.callback.NewClassCallback; import com.iot.quickhpu.constants.SpConstants; import com.iot.quickhpu.constants.URLConstants; import com.iot.quickhpu.utils.ActivityUtils; import com.iot.quickhpu.utils.JsonUtils; import com.iot.quickhpu.utils.LogUtils; import com.iot.quickhpu.utils.OkHttpUtils; import com.iot.quickhpu.utils.SpUtils; import com.iot.quickhpu.utils.ToastUtils; import java.net.URL; import java.util.Map; public class CreateClassActivity extends AppCompatActivity implements View.OnClickListener { private EditText etClassName; private Button btnCreate; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_create_class); initView(); } private void initView() { etClassName = findViewById(R.id.et_new_class_name); btnCreate = findViewById(R.id.btn_new_class); btnCreate.setOnClickListener(this); } @Override public void onClick(View view) { if (view.getId() == R.id.btn_new_class) { String s = etClassName.getText().toString(); String code = (String) SpUtils.get(this, SpConstants.USER_CODE,"1234"); String url = URLConstants.CLASS_MANAGER_URL + "new/" + code + ".do?title=" + s; LogUtils.d(">>>>>>>>请求地址 " + url); OkHttpUtils.requestLocal(url, new NewClassCallback(mHandler)); } } private Handler mHandler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(Message message) { switch (message.what) { case 1: LogUtils.d(">>>>>>>> " + (String) message.obj); Map<String, String> result = JsonUtils.responseResult((String) message.obj); if ("500".equals(result.get("status"))){ ToastUtils.showLong(CreateClassActivity.this,result.get("msg")); return false; } ActivityUtils.toAnotherActivity(CreateClassActivity.this ,ClassManagerActivity.class); finish(); break; } return false; } }); }
[ "nimo10050@gmail.com" ]
nimo10050@gmail.com