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
2ec2bded9af6d055bc959bbe4de55ce76da3bb4e
1302f07a62aae0d31a5ddef0190db0ce4ae1aaf2
/src/lesson4/Main.java
958e47588654651ac2abf1d2b287dbd8315ce3e8
[]
no_license
happysharkable/algorythms
5586ed2c08b1312384e49aecf79f2de8bc930dab
c706836beef0c9c3324edc18221a3b01245663d6
refs/heads/master
2023-04-03T03:20:34.149819
2021-04-09T17:43:42
2021-04-09T17:43:42
282,243,856
0
0
null
2021-04-09T17:45:01
2020-07-24T14:42:37
Java
UTF-8
Java
false
false
1,084
java
package lesson4; import java.util.ListIterator; public class Main { public static void main(String[] args) { MyLinkedList<String> mll = new MyLinkedList<>(); mll.insertFirst("Katia"); mll.insertFirst("Petia"); mll.insertFirst("Maria"); System.out.println(mll); ListIterator<String> iter = mll.listIterator(); System.out.println(iter.next()); System.out.println(iter.next()); System.out.println(iter.next()); System.out.println(iter.previous()); System.out.println(iter.previous()); // mll.insertLast("Bob"); // System.out.println(mll); // System.out.println(mll.deleteFirst()); // System.out.println(mll); // // System.out.println(mll.getFirst()); // mll.insert(1, "Sasha"); // System.out.println(mll); // // System.out.println(mll.delete("Bob")); // System.out.println(mll); // // // for (String s : mll) { // System.out.println(s); // } } }
[ "happy-shark@ya.ru" ]
happy-shark@ya.ru
f401e3c5f0fac288b86716742604ca40f25c8f54
b310cac258af598b192797624eaa300a41b701e5
/src/test/java/MoodTest.java
c489d2a7e7f435529f6ea12c59d0c61de4d6a272
[]
no_license
santonv/SelenideMoodPanda
0ce7c23561eda7b35a1b40e52f2b2af577108abc
7389cb8b525d848f3a465161d1de6554e0ac7f35
refs/heads/master
2023-06-25T12:11:33.038507
2021-07-31T06:49:09
2021-07-31T06:49:09
390,802,689
0
0
null
2021-07-31T06:42:20
2021-07-29T17:29:18
Java
UTF-8
Java
false
false
2,026
java
import io.qameta.allure.*; import org.openqa.selenium.By; import org.testng.annotations.Test; import static com.codeborne.selenide.Selenide.*; import static com.codeborne.selenide.Condition.*; import static com.codeborne.selenide.Selenide.open; public class MoodTest extends BaseTest{ @Epic("Tests for My updates page") @Feature(value = "Test for opening My updates page") @Severity(SeverityLevel.MINOR) @Story("Open My Updates page") @Test public void openMyUpdates(){ open("Login"); loginPage.Login(EMAIL,PASSWORD); moodPage.clickOnMyUpdatesPage("My updates"); $$(By.xpath("//span[contains(@class,'navbar')]")).findBy(text("Feed")).shouldBe(exist); } @Epic("Tests for My updates page") @Feature(value = "Test for Add new Mood") @Severity(SeverityLevel.MINOR) @Story("Create new Mood") @Test public void updateMood(){ open("login"); loginPage.Login(EMAIL,PASSWORD); moodPage.clickOnMyUpdatesPage("My updates"); moodPage.clickUpdateMoodButton(); int value = moodPage.getMoodValue(); moodPage.updateNewMood(value,3); $(By.xpath("//div[contains(@class,'p7675665 media m1')]")).shouldBe(exist).shouldBe(text("8")); } @Epic("Tests for My updates page") @Feature(value = "Test for send Hug") @Severity(SeverityLevel.MINOR) @Story("Send hug to Mood") @Test public void clickSendHug(){ open("login"); loginPage.Login(EMAIL,PASSWORD); moodPage.clickOnMyUpdatesPage("My updates"); moodPage.sendHug("1"); $(By.xpath("//*[@class='badge mchugs1']")).shouldBe(text("1")); } @Epic("Tests for My updates page") @Feature(value = "Test for delete Mood") @Severity(SeverityLevel.MINOR) @Story("Delete Mood") @Test public void deleteMood(){ open("login"); loginPage.Login(EMAIL,PASSWORD); moodPage.clickOnMyUpdatesPage("My updates"); moodPage.deleteMood("0"); } }
[ "darkmank79@gmail.com" ]
darkmank79@gmail.com
a6a7efd5ed196984d9df10ac9432be96d1b3ed12
9dd75362ffd9b552b6d42a3968efbe92c6d0d2e1
/app/src/main/java/com/example/tee_2014/N40_Activity.java
fcaaa188836474243ab8fa21d27d189bdafb8e39
[]
no_license
mrinal241/ECE_14
1e12e3a5019b4b7879f3c78acccf00e02e60cc32
b2345ee8970669a0dee4b1a14e1bd1cc84f2d41f
refs/heads/master
2020-04-04T20:24:16.466724
2018-11-05T16:08:44
2018-11-05T16:08:44
156,245,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
java
package com.example.tee_2014; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; public class N40_Activity extends Activity { ImageButton call,fb; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_n40_); call=(ImageButton) findViewById(R.id.call); fb=(ImageButton) findViewById(R.id.dial); call.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent intent=new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:+8801744955241")); startActivity(intent); } }); fb.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://mobile.facebook.com/mrinalkanti.ray?fref=pb"))); } }); } }
[ "mrinalkanti1995@gmail.com" ]
mrinalkanti1995@gmail.com
b08fccb9d9ee54e2788ae67d955fbcfd346f2f8a
a37f1dd22f565900c457e7a0cff65d45dc14c2fb
/src/cs3500/music/Swingui/Constants.java
e040436a827e8351966beadf341407ea04023bda
[]
no_license
nancyyli/MusicEditorProject
485e9203e6707d4e6fa61bdc8772f31955fcf2db
a5e8cb1357934c85e1f7b697e933f9e4f6e0c3e7
refs/heads/master
2021-06-06T12:45:41.219040
2015-12-10T03:36:43
2015-12-10T03:36:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package cs3500.music.Swingui; /** * Created by sabrinakantor on 11/11/15. */ /** * Represents constants */ public class Constants { public static final int CELL_SIZE = 10; public static final int CELL_PADDING = (Constants.CELL_SIZE * 4); }
[ "mchiu@ccs.neu.edu" ]
mchiu@ccs.neu.edu
f6ae3dc738c140de2b16869ca7b19f38fe499412
e7986e1473ac5b2b7cd8884b674b0d52cb280dce
/src/main/java/com/yuqiong/college/service/edu/entity/Subject.java
7704cba96acbbee0e383fb733b1f6ef304e94b95
[ "MIT" ]
permissive
qinyuqiong/chollege
ff4a720a1e3fd8da029d927a112e4334a6622ead
8c269dc2b1ef665c542cd7e0d68a20d0db02e002
refs/heads/main
2023-05-08T21:44:44.612844
2021-05-25T00:11:47
2021-05-25T00:11:47
345,519,950
0
0
null
2021-05-25T00:11:48
2021-03-08T03:32:22
Java
UTF-8
Java
false
false
1,259
java
package com.yuqiong.college.service.edu.entity; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; /** * <p> * 课程科目 * </p> * * @author yuqiong * @since 2021-02-12 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("edu_subject") @ApiModel(value = "Subject对象", description = "课程科目") public class Subject implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "课程类别ID") @TableId(value = "id", type = IdType.ID_WORKER_STR) private String id; @ApiModelProperty(value = "类别名称") private String title; @ApiModelProperty(value = "父ID") private String parentId; @ApiModelProperty(value = "排序字段") private Integer sort; @ApiModelProperty(value = "创建时间") @TableField(fill = FieldFill.INSERT) private Date gmtCreate; @ApiModelProperty(value = "更新时间") @TableField(fill = FieldFill.INSERT_UPDATE) private Date gmtModified; }
[ "2824019551@qq.com" ]
2824019551@qq.com
6bf68f534ac2afc774f04c34e1c1fe371816e0a2
9932b78c13b8df15ecf6ad5e4eb09177c7cb7d92
/domain/src/main/java/com/klif/banking/domain/Balance.java
1cc868ab07e787235fee90ea8d811fabdde704f0
[]
no_license
Klif4/Banking_JAVA
1ef0e6f164b329302225676ded5947c88a3fc874
2247b6d087a815891530cca7fad8c2e5df996b1f
refs/heads/master
2023-03-27T23:27:23.396240
2021-04-05T00:45:38
2021-04-05T00:45:38
339,334,599
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package com.klif.banking.domain; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.NonNull; import lombok.ToString; @AllArgsConstructor @EqualsAndHashCode @ToString public class Balance { @NonNull private int value; public void add(int valueToAdd) { value += valueToAdd; } public int value() { return value; } public void substract(int valueToSubstract) { value -= valueToSubstract; } }
[ "klif.cheloul@gmail.com" ]
klif.cheloul@gmail.com
b5a40f43cadfef8cd12b0c0fd6c67c7bf9a5d75d
4fc3c2b25e823caf2230540ed45e2ce5e26e052c
/app/src/main/java/com/example/firsthomework/OnBackPressedListener.java
66544e1ab6f6662feac34ef80145b30604cf2dcb
[]
no_license
Galaximum/MailHome
65266160ca7add687130b421996615d309dcd92c
b1f00099447f4b5692d821df879e5a036d9f182f
refs/heads/master
2023-01-08T03:46:50.715681
2020-10-30T09:31:51
2020-10-30T09:31:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
112
java
package com.example.firsthomework; public interface OnBackPressedListener { public void onBackPressed(); }
[ "60795996+AlexStanchenko@users.noreply.github.com" ]
60795996+AlexStanchenko@users.noreply.github.com
8401d4d37a6f940713749ddf820616c9a1e3b5e7
83072409106805609263c4d629bd78bdba44d085
/src/main/java/com/developper/restapp/controller/NewsController.java
45081ead3b954c17e5fd4f5ed497398082cc1412
[]
no_license
jessndaa/restappspring
8aea6b46205fc958fba604007d9def9ed79b20cf
58a16f214a211ddf636f746dde1f8e488b6c91d3
refs/heads/master
2021-04-04T18:53:10.429028
2020-03-19T10:47:53
2020-03-19T10:47:53
248,479,853
0
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package com.developper.restapp.controller; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import com.developper.restapp.object.HttpResponse; import com.developper.restapp.object.NewsModel; import com.developper.restapp.object.UserModel; import com.developper.restapp.service.FirebaseService; import com.google.cloud.firestore.CollectionReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.google.cloud.Timestamp; /** * NewsController */ @RestController public class NewsController { @Autowired FirebaseService fb; @GetMapping(value = "/api/news/all") public List<NewsModel> getAllNews() throws InterruptedException, ExecutionException { return fb.getAllTopic(); } @GetMapping(value = "/api/news") public List<NewsModel> getAllNews(@RequestParam String id) throws InterruptedException, ExecutionException { List<NewsModel> news = new ArrayList(); for (NewsModel newss : fb.getAllTopic()) { if (newss.getSender().equals(id)) {} else news.add(newss); } return news; } @PostMapping(value = "/api/news") public HttpResponse onNews(@RequestBody NewsModel model) { fb.addTopic(model); return new HttpResponse(200, "Ok enregistré") ; } }
[ "32377496+jessndaa@users.noreply.github.com" ]
32377496+jessndaa@users.noreply.github.com
40669138fc461bb485f48c200a7a47786d9731ba
9477552462e63e598b4dcdfe73c6bdc697ce99b0
/Multiple Auto/Java/src/main/java/frc/robot/commands/driveCommands/SimpleDrive.java
238953e3b086c52ffabd23b70006530047b7200a
[]
no_license
nzalewsk/WorldSkills-Example-Projects
9ec0d7689452bb7b0a8e95c5b15d0e1483c402f7
f4e594bbfe86ba98cc2933474d47e3a8565932e7
refs/heads/main
2023-07-15T11:30:14.354798
2021-08-24T18:28:13
2021-08-24T18:28:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package frc.robot.commands.driveCommands; //WPI imports import edu.wpi.first.wpilibj2.command.CommandBase; //RobotContainer import import frc.robot.RobotContainer; //Subsystem imports import frc.robot.subsystems.DriveTrain; /** * SimpleDrive class * <p> * This class drives a motor */ public class SimpleDrive extends CommandBase { //Grab the subsystem instance from RobotContainer private static final DriveTrain drive = RobotContainer.drive; double speed; /** * Constructor */ public SimpleDrive(double speed) { addRequirements(drive); // Adds the subsystem to the command this.speed = speed; } /** * Runs before execute */ @Override public void initialize() { } /** * Called continously until command is ended */ @Override public void execute() { drive.setMotorSpeed(speed); } /** * Called when the command is told to end or is interrupted */ @Override public void end(boolean interrupted) { } /** * Creates an isFinished condition if needed */ @Override public boolean isFinished() { return false; } }
[ "James.Taylor@studica.com" ]
James.Taylor@studica.com
3fbb2d32c7d4292485e9f7a203babadaa5bf0909
83e81838541a1239b589d7352db49e50d6e948b5
/src/java/pyp/modelo/interfaz/ProductoDAO.java
983cbd8d9bbfded1d4f753c8d6a44679c18b647f
[]
no_license
Farius-red/PizzasGaes1
329919388f806febffa0e9a24d4b204a22337812
9b59b148c03f466ff3aab42b092823369a563c9c
refs/heads/master
2023-01-14T02:17:02.719459
2020-11-19T17:54:32
2020-11-19T17:54:32
314,326,873
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pyp.modelo.interfaz; import javax.ejb.Stateless; import pyp.modelo.entidades.Producto; import pyp.modelo.DAO.IProductoDAO; /** * * @Gaes 5 */ @Stateless public class ProductoDAO extends AbstractDAO<Producto> implements IProductoDAO { public ProductoDAO() { super(Producto.class); } }
[ "zigmainflables@gmail.com" ]
zigmainflables@gmail.com
1d035dea94b7fd86e4441a5a388ec14eb7dffc47
4b707c9d1dadc4927bc15cbf5cdebf7a70be2d79
/app/src/main/java/nl/mheijden/prog3app/model/data/SQLiteLocalDatabase.java
219b0397c6e7452df290402d0d9e66a2fc3c351e
[]
no_license
survivorbat/Studentmeals-android-exam
55f3b37b3516a6ebc2a8865980597628201eb823
6eaf0925a5c4535246c6c638531d1b508501ce84
refs/heads/master
2021-09-05T01:40:37.427886
2018-01-23T14:09:19
2018-01-23T14:09:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,790
java
package nl.mheijden.prog3app.model.data; import android.content.Context; import android.database.sqlite.SQLiteOpenHelper; /** * Gemaakt door Maarten van der Heijden on 1-1-2018. */ public class SQLiteLocalDatabase extends SQLiteOpenHelper { /** * Name of the database and the current version */ private static final String DATABASE_NAME = "StudentMaaltijden"; private static final int DATABASE_VERSION = 9; /** * @param context of the application */ public SQLiteLocalDatabase(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } /** * @param sqLiteDatabase from the SQLiteOpenHelper class */ @Override public void onCreate(android.database.sqlite.SQLiteDatabase sqLiteDatabase) { sqLiteDatabase.execSQL("DROP TABLE IF EXISTS Students; DROP TABLE IF EXISTS Meals; DROP TABLE IF EXISTS FellowEaters"); sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `FellowEaters` (\n" + " `ID` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" + " `AmountOfGuests` int(11) NOT NULL DEFAULT '0',\n" + " `StudentNumber` int(11) NOT NULL,\n" + " `MealID` int(11) NOT NULL\n" + ")"); sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `Meals` (\n" + " `ID` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" + " `Dish` varchar(100) NOT NULL,\n" + " `DateTime` datetime NOT NULL,\n" + " `Info` text NOT NULL,\n" + " `ChefID` int(11) NOT NULL,\n" + " `Picture` longblob NOT NULL,\n" + " `Price` decimal(10,0) NOT NULL,\n" + " `MaxFellowEaters` int(11) NOT NULL,\n" + " `DoesCookEat` tinyint(1) NOT NULL DEFAULT '1'\n" + ")"); sqLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS `Students` (\n" + " `StudentNumber` int(11) PRIMARY KEY UNIQUE NOT NULL,\n" + " `FirstName` varchar(50) NOT NULL,\n" + " `Insertion` varchar(50) DEFAULT NULL,\n" + " `LastName` varchar(50) NOT NULL,\n" + " `Email` varchar(50) NOT NULL,\n" + " `PhoneNumber` varchar(30) DEFAULT NULL\n" + ")"); } /** * @param sqLiteDatabase from the SQLiteOpenHelper class * @param i old version * @param i1 new version */ @Override public void onUpgrade(android.database.sqlite.SQLiteDatabase sqLiteDatabase, int i, int i1) { sqLiteDatabase.execSQL("DROP TABLE IF EXISTS Students; DROP TABLE IF EXISTS Meals; DROP TABLE IF EXISTS FellowEaters"); this.onCreate(sqLiteDatabase); } }
[ "djbatcat@gmail.com" ]
djbatcat@gmail.com
caadfc4f300c7d51adf3b38cdf2ffdf20cf63f62
4f20d2329fe4053aaa6c026dbfa93a39dd2b5611
/src/com/tractis/identity/IdentityTag.java
b8b3cf9fbc55789f63acf6ca90177142ea3dcc85
[ "MIT" ]
permissive
tractis/tractis_identity_verifications_for_java
e204301ad1b67ee46c5adebd474b457078bb95a2
806a239032eefe6ff964b52eeb5e2e2c4c61f8bb
refs/heads/master
2021-01-01T05:32:18.331128
2009-08-13T10:40:10
2009-08-13T10:40:10
276,849
0
0
null
null
null
null
UTF-8
Java
false
false
1,385
java
package com.tractis.identity; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.Tag; /** * Abstract class for tags used to connect woth tractis identity verifications * @author dave * */ public abstract class IdentityTag implements Tag{ protected Tag parent; protected PageContext context; protected JspWriter out; protected static Properties properties = null; protected void initProperties() throws JspException { try { InputStream resourceAsStream = this.getClass().getResourceAsStream("/tractis-settings.properties"); properties = new Properties(); properties.load(resourceAsStream); } catch (IOException e) { throw new JspException("Cannot recover Tractis service properties, please check that tractis-settings.properties is available on classpath"); } } public Tag getParent() { return this.parent; } public void release() { } public void setPageContext(PageContext context) { this.context = context; this.out = this.context.getOut(); } public void setParent(Tag parent) { this.parent = parent; } public void print(String message){ try { this.out.print(message); } catch (IOException e) { throw new RuntimeException(e); } } }
[ "dave@dave-laptop.(none)" ]
dave@dave-laptop.(none)
44cef44382c18fe5ad621d8790cb61e359897c5e
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/spring-security-modules/spring-security-web-mvc-custom/src/main/java/com/surya/web/controller/BankController.java
d592345d8bc1ea8e984c04449fec27e0d99d40f0
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
1,218
java
package com.surya.web.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; // to test csrf @Controller public class BankController { private final Logger logger = LoggerFactory.getLogger(getClass()); @RequestMapping(value = "/transfer", method = RequestMethod.GET) @ResponseBody public int transfer(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) { logger.info("Transfer to {}", accountNo); return amount; } // write - just for test @RequestMapping(value = "/transfer", method = RequestMethod.POST) @ResponseStatus(HttpStatus.OK) public void create(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) { logger.info("Transfer to {}", accountNo); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
505713c13f1ac70f1940f845995df971095feba6
b106c6628af72302911e83055ec1bc04988f304f
/app/src/main/java/com/example/instaappanalitycs/model/api/userinfo/Graphql.java
fea854dc26d1b1cc04b2ce137f10fb4ad46c7429
[]
no_license
dmitry-koverko/InstaAppAnalitycs
d82e3fb850d24ed714e67096ce14851e17d2bd66
71ea55a7d3ab26f774ca17c0b1ada070f9522714
refs/heads/master
2022-05-17T00:34:42.525330
2020-04-28T23:34:54
2020-04-28T23:34:54
255,057,071
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
package com.example.instaappanalitycs.model.api.userinfo; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Graphql { @SerializedName("user") @Expose private UserInfo user; public UserInfo getUser() { return user; } public void setUser(UserInfo user) { this.user = user; } }
[ "dmitry-koverko@gmail.com" ]
dmitry-koverko@gmail.com
fbea8285bcecde86edd7fca1c111d354d44696db
476315065db65549b985cf2d042c167ccdddb518
/app/src/main/java/com/myapp/popularmovies/details/FetchReviewsTask.java
8fb6480da9e531a90cdbd04a76b43a22acf99ba2
[ "Apache-2.0" ]
permissive
markdagraca/Movie_App
9988737d3fdc08506401594e14ebb677f51491f5
0ca517a9d1761edf440ab43205e22f276444c782
refs/heads/master
2020-04-07T00:53:35.451940
2018-12-05T21:13:44
2018-12-05T21:13:44
157,923,059
0
0
null
null
null
null
UTF-8
Java
false
false
2,905
java
/* * Copyright 2016. Dmitry Malkovich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.myapp.popularmovies.details; import android.os.AsyncTask; import android.util.Log; import com.myapp.popularmovies.BuildConfig; import com.myapp.popularmovies.network.MovieDatabaseService; import com.myapp.popularmovies.network.Review; import com.myapp.popularmovies.network.Reviews; import java.io.IOException; import java.util.ArrayList; import java.util.List; import retrofit2.Call; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; /** * Encapsulates fetching the movie's reviews from the movie db api. */ public class FetchReviewsTask extends AsyncTask<Long, Void, List<Review>> { @SuppressWarnings("unused") public static String LOG_TAG = FetchReviewsTask.class.getSimpleName(); private final Listener mListener; /** * Interface definition for a callback to be invoked when reviews are loaded. */ interface Listener { void onReviewsFetchFinished(List<Review> reviews); } public FetchReviewsTask(Listener listener) { mListener = listener; } @Override protected List<Review> doInBackground(Long... params) { // If there's no movie id, there's nothing to look up. if (params.length == 0) { return null; } long movieId = params[0]; Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://api.themoviedb.org/") .addConverterFactory(GsonConverterFactory.create()) .build(); MovieDatabaseService service = retrofit.create(MovieDatabaseService.class); Call<Reviews> call = service.findReviewsById(movieId, BuildConfig.THE_MOVIE_DATABASE_API_KEY); try { Response<Reviews> response = call.execute(); Reviews reviews = response.body(); return reviews.getReviews(); } catch (IOException e) { Log.e(LOG_TAG, "A problem occurred talking to the movie db ", e); } return null; } @Override protected void onPostExecute(List<Review> reviews) { if (reviews != null) { mListener.onReviewsFetchFinished(reviews); } else { mListener.onReviewsFetchFinished(new ArrayList<Review>()); } } }
[ "jonathantahod@Jonathans-MacBook-Pro-2.local" ]
jonathantahod@Jonathans-MacBook-Pro-2.local
934dc5ed324a505f9bde14ca5f9a2e5f5dafbfc1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4/KThreadTest/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4_KThreadTest_s.java
67f2aabb121cee526faeecf0e652bea270ff3426
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,698
java
package nachos.threads; import nachos.machine.*; /** * A Tester for the KThread class. * Really, this tests the join() implementation. */ public class KThreadTest { /** * LoopThread class, which implements a KThread * that simply prints out numbers in sequence. */ private static class LoopThread implements Runnable { LoopThread(String name, int upTo) { this.name = name; this.upTo = upTo; } public void run() { for (int i=0; i<upTo; i++) { //System.out.println("*** " + name + " looped " + i + " times"); KThread.yield(); } System.out.println("*** " + name + " done"); } /* An ID for output purposes */ private String name; /* The maximum number of iterations */ private int upTo; } /** * JoinThread class, which implements a KThread * that attempts to join with one or two threads, in sequence. */ private static class JoinThread implements Runnable { JoinThread(String name, KThread thread1, KThread thread2) { this.name = name; this.thread1 = thread1; this.thread2 = thread2; } public void run() { /* Joining with the first thread, if non-null */ if (thread1 != null) { System.out.println("*** "+name+" joining with "+thread1.toString()); thread1.join(); System.out.println("*** "+name+" joined with "+thread1.toString()); } /* Joining with the second thread, if non-null */ if (thread1 != null) { System.out.println("*** "+name+" joining with "+thread2.toString()); thread2.join(); System.out.println("*** "+name+" joined with "+thread2.toString()); } System.out.println("*** "+name+" done."); } /* An ID for output purposes */ private String name; /* The maximum number of iterations */ private KThread thread1; private KThread thread2; } /** * Tests whether this module is working. */ public static void runTest() { System.out.println("**** KThread testing begins ****"); /* Create 4 LoopThread, each one looping 3*(i+1) times, so * that the last create thread loops longer */ KThread loopThreads[] = new KThread[5]; for (int i=0; i < 5; i++) { loopThreads[i] = new KThread(new LoopThread("loopThread"+3*(i+1),3*(i+1))); loopThreads[i].setName("loopThread"+3*(i+1)); loopThreads[i].fork(); } /* Create a JoinThread that waits for loopThread #1 * and then for loopThread #3 */ KThread joinThread1 = new KThread(new JoinThread( "joinThread #1",loopThreads[1],loopThreads[3])); joinThread1.setName("joinThread #1"); joinThread1.fork(); /* Create a JoinThread that waits for loopThread #4 * and then for loopThread #2 */ KThread joinThread2 = new KThread(new JoinThread( "joinThread #2",loopThreads[4],loopThreads[2])); joinThread2.setName("joinThread #2"); joinThread2.fork(); /* Create a JoinThread that waits for joinThread #1 * and then for loopThread #4 */ KThread joinThread3 = new KThread(new JoinThread( "joinThread #3",joinThread1,loopThreads[4])); joinThread3.setName("joinThread #3"); joinThread3.fork(); /* Join with all the above to wait for the end of the testing */ for (int i=0; i < 5; i++) { loopThreads[i].join(); } joinThread1.join(); joinThread2.join(); joinThread3.join(); System.out.println("**** KThread testing ends ****"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e56fc7b4aa42967d8c2c83a0fb6618f0709ed871
aee038dd6164a9187de149fc9e990f164f0ec1b6
/src/main/java/rsp/dsl/AttributeDefinition.java
7670c3005af5a8aa4fe9d7742679b11b04ce7d8b
[ "Apache-2.0" ]
permissive
jarekratajski/rsp
ea4aab8e8e9af9a63b51bb8d8089579647173e5e
88b7103e2db67dc488c3c176f3346632bb093f56
refs/heads/master
2023-02-23T13:29:31.318531
2021-01-30T09:52:10
2021-01-30T09:52:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,140
java
package rsp.dsl; import rsp.page.RenderContext; import rsp.dom.XmlNs; /** * A definition of a HTML element's attribute. */ public final class AttributeDefinition extends DocumentPartDefinition { /** * The attribute's name. */ public final String name; /** * The attribute's value. */ public final String value; /** * Determines if this attribute is an HTML tag's property. * @see Html#DEFAULT_PROPERTIES_NAMES */ public final boolean isProperty; /** * Creates a new instance of an attribute definition. * @param name the attribute's name * @param value the attribute's value * @param isProperty true if this attribute is an HTML property and false otherwise */ public AttributeDefinition(String name, String value, boolean isProperty) { super(DocumentPartDefinition.DocumentPartKind.ATTR); this.name = name; this.value = value; this.isProperty = isProperty; } @Override public void accept(RenderContext renderContext) { renderContext.setAttr(XmlNs.html, name, value, isProperty); } }
[ "vadim.vashkevich@gmail.com" ]
vadim.vashkevich@gmail.com
dadaaea8a0b1b517e9e7f60f947bb08706951a1a
64cc3aa316ca573a4c3701683249e4709ec29047
/app/src/main/java/com/lixinjia/myapplication/invocationhandler/RPCInvocationHandler.java
241846d3d6a401a1eedada1210111e6c20a10eaf
[]
no_license
XinJiaGe/MyApplication
4b292ca3c918f8f44f01f3042ada8592ffe0b5f7
5c7a3b568c95f19628c4ef3dcb9d5c92633d75ce
refs/heads/master
2021-04-26T22:17:00.440500
2019-11-14T05:10:20
2019-11-14T05:10:20
90,335,057
2
0
null
null
null
null
UTF-8
Java
false
false
904
java
package com.lixinjia.myapplication.invocationhandler; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; public class RPCInvocationHandler implements InvocationHandler { private InvocationHandleMe serviceManager = null; public RPCInvocationHandler(InvocationHandleMe serviceManager) { this.serviceManager = serviceManager; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getDeclaringClass().getSimpleName() + "." + method.getName(); if ("Object.toString".equals(methodName)) { return method.getDeclaringClass().getName(); } try { return this.serviceManager.request(methodName, method.getReturnType(), args); } catch (Exception e) { e.printStackTrace(); } return ""; } }
[ "[347292753@qq.com]" ]
[347292753@qq.com]
44f91242e1af068b114f263d190710393fbaec33
73f5635b6c3c8cc32cd083abfdaeb5ae1b4f9180
/SE201-DZ10-Marko-Popovic-2442/SE201-Picerija/src/Model/Racun.java
f7ccb633ef89c55b4a6f132d72fa5e8a797fb7a3
[]
no_license
markoooooo/Introduction-to-software-engineering
af07da6c98ce606183b86242a21d50b5e648c1cd
6612ed2372216097c04c8a58f433fdeb28adf533
refs/heads/master
2021-02-10T10:37:57.884980
2020-03-02T13:12:53
2020-03-02T13:12:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
666
java
package Model; public class Racun { private int id; private String username; private double bill; public Racun(int ID, String username, double bill) { this.id = ID; this.username = username; this.bill = bill; } public int getID() { return id; } public void setID(int ID) { this.id = ID; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public double getBill() { return bill; } public void setBill(double bill) { this.bill = bill; } }
[ "popovicmarko29@gmail.com" ]
popovicmarko29@gmail.com
e630f78c39df054d00a6f8f5289fe4a8ad365205
342647a9a9a12300e16439044bbab34e400f9df3
/src/test/java/sevenkyu/splitinparts/SplitInPartsTest.java
19382b323b7590b43d99ad08a182da52603b92d5
[]
no_license
hajdumozes/kata-collection
783c93b53b8354b507b36ec51957abf434f56675
f0a6ffd15f83f79b3d838f6cc3de5d5bb779332b
refs/heads/main
2023-08-08T08:44:33.416373
2021-08-31T06:35:52
2021-08-31T06:35:52
373,403,878
0
0
null
null
null
null
UTF-8
Java
false
false
1,352
java
package sevenkyu.splitinparts; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; class SplitInPartsTest { SplitInParts splitInParts; @BeforeEach public void init() { splitInParts = new SplitInParts(); } @Test public void givenPartIsLongerThanString_splitInParts_shouldNotSplit() { // Given String string = "HelloKata"; int partLength = 9; // When String result = splitInParts.splitInParts(string, partLength); // Then assertThat(result).isEqualTo(string); } @Test public void givenStringLengthIsAMultipleOFPartLength_splitInParts_shouldSplitEqually() { // Given String string = "HelloKata"; int partLength = 3; // When String result = splitInParts.splitInParts(string, partLength); // Then assertThat(result).isEqualTo("Hel loK ata"); } @Test public void givenStringLengthIsNotAMultipleOFPartLength_splitInParts_shouldHaveTheLastPartShorter() { // Given String string = "HelloKata"; int partLength = 2; // When String result = splitInParts.splitInParts(string, partLength); // Then assertThat(result).isEqualTo("He ll oK at a"); } }
[ "Mozes.Hajdu@ibm.com" ]
Mozes.Hajdu@ibm.com
54f3205df22e4a857ca2c4e7785284c9c0e0d0b7
ec904803f1c36f5558d1933284b0c6a62094a76d
/src/com/stackdemos/JavaStack.java
143043577b6f9465ea1443efe474d90e0d7d7ede
[]
no_license
praveen-java/DSDemos
ee342912d0fdc5de6de1a7ceeec35ac31672b4c9
22776bf072f1f0d77184dbfbd28f1a6aea774215
refs/heads/master
2020-03-28T08:48:28.459575
2018-10-06T19:29:53
2018-10-06T19:29:53
147,990,542
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package com.stackdemos; public class JavaStack { private int capacity; private int top = -1; private int size; private static final int CAPACITY = 10; private int stack[]; public JavaStack() { stack = new int[CAPACITY]; } public JavaStack(int capacity) { this.capacity = capacity; stack = new int[capacity]; } public int push(int element) { stack[++top] = element; return element; } public int pop() { int element = stack[top--]; return element; } public int getSize() { return size; } public void displayStack() { System.out.print("["+stack[0]); for(int i = 1;i<top ; i++ ) { System.out.print(", "+stack[i]); } System.out.println(stack[top]+" ]"); System.out.println("size of the stack is :: "+(top+1)); } public static void main(String[] args) { while(true) { System.out.println("::This is Java Stack Demo::"); System.out.println("1.push"); System.out.println("2.pop"); System.out.println("3.show "); } } }
[ "ubuntu@ubuntu" ]
ubuntu@ubuntu
9e6a9dc2538c8168f29e81ca29c6806690676ab3
811d14028b6284452d9b1d62a137d4dc8ad8b954
/app/src/main/java/ir/galaxycell/kahkeshan/UI/FragmentAddFile.java
8f4ec41f779f63d6bf796104d6352719d52f03ed
[ "MIT" ]
permissive
mahmoodkarimizade/Kahkeshan
ae270e7e36467aba37e56da4716dc374cbb1d2ed
bca6d252d49a6cdb008b0637657b900cf7a45da6
refs/heads/master
2020-04-30T20:40:50.709724
2019-03-23T06:13:13
2019-03-23T06:13:13
177,074,139
1
0
null
null
null
null
UTF-8
Java
false
false
5,987
java
package ir.galaxycell.kahkeshan.UI; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import java.io.File; import java.util.ArrayList; import droidninja.filepicker.FilePickerBuilder; import droidninja.filepicker.FilePickerConst; import ir.galaxycell.kahkeshan.R; /** * Created by Admin on 25/08/2017. */ public class FragmentAddFile extends Fragment { private View view; private ImageView productfile; private TextView titleFile,addressFile; private ArrayList<String> docPaths = new ArrayList<>(); private File file; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view=inflater.inflate(R.layout.fragment_add_file,container,false); //linke widget in fragment add file to layout link(view); return view; } private void link(View view) { //Image View productfile=(ImageView)view.findViewById(R.id.fragment_add_file_imageview_productfile); //Text View titleFile=(TextView)view.findViewById(R.id.fragment_add_file_textview_titlefile); addressFile=(TextView)view.findViewById(R.id.fragment_add_file_textview_addressfile); if (FragmentAdd.filepath.equals("")) { productfile.setImageResource(R.drawable.documentadd); titleFile.setVisibility(View.GONE); addressFile.setVisibility(View.GONE); } else { productfile.setImageResource(R.drawable.ic_ppt); titleFile.setVisibility(View.VISIBLE); addressFile.setVisibility(View.VISIBLE); addressFile.setText(FragmentAdd.filepath); // get type file from path file String [] m=FragmentAdd.filepath.split("\\."); String typeFile = m[m.length-1].toLowerCase(); switch (typeFile) { case "pdf": productfile.setImageResource(R.drawable.ic_pdf); break; case "doc": productfile.setImageResource(R.drawable.ic_word); break; case "docx": productfile.setImageResource(R.drawable.ic_word); break; case "ppt": productfile.setImageResource(R.drawable.ic_ppt); break; case "pptx": productfile.setImageResource(R.drawable.ic_ppt); break; case "xls": productfile.setImageResource(R.drawable.ic_excel); break; case "xlsx": productfile.setImageResource(R.drawable.ic_excel); break; case "txt": productfile.setImageResource(R.drawable.ic_txt); break; } } // set co click listenr ocClick(); } private void ocClick() { productfile.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showFileChooser(); } }); } private void showFileChooser() { FilePickerBuilder.getInstance().setMaxCount(1) .setActivityTheme(R.style.AppTheme) .pickFile(this); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if(resultCode== getActivity().RESULT_OK && data!=null) { docPaths = new ArrayList<>(); docPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_DOCS)); // get type file from path file String [] m=docPaths.get(0).split("\\."); String typeFile = m[m.length-1].toLowerCase(); file=new File(docPaths.get(0)); int file_size = Integer.parseInt(String.valueOf(file.length()/1024)); if(file_size>=3000) { Toast.makeText(getContext(),"اندازه فایل نباید بزرگتر از 2 مگابایت باشد",Toast.LENGTH_LONG).show(); } else { FragmentAdd.filepath=docPaths.get(0); titleFile.setVisibility(View.VISIBLE); addressFile.setVisibility(View.VISIBLE); addressFile.setText(docPaths.get(0)); switch (typeFile) { case "pdf": productfile.setImageResource(R.drawable.ic_pdf); break; case "doc": productfile.setImageResource(R.drawable.ic_word); break; case "docx": productfile.setImageResource(R.drawable.ic_word); break; case "ppt": productfile.setImageResource(R.drawable.ic_ppt); break; case "pptx": productfile.setImageResource(R.drawable.ic_ppt); break; case "xls": productfile.setImageResource(R.drawable.ic_excel); break; case "xlsx": productfile.setImageResource(R.drawable.ic_excel); break; case "txt": productfile.setImageResource(R.drawable.ic_txt); break; } } } } }
[ "mahmood_karimizade@yahoo.com" ]
mahmood_karimizade@yahoo.com
1d3f3d33360c47f058627474f7f7b03604dd21ff
c8a1e68115a28c45d3848cbec8c40dc8fc21f7f4
/app/src/main/java/com/alfinapp/ui/views/NonSwipeableViewPager.java
3783ccb0b1a05d7ac05afd0a97e3bf90f3301f79
[]
no_license
brajeshsanodiya-db/AlfinAndroidApp
32cea76056bac6c22c28a05a939bb6c3caf9ed53
ad230fb6db82af537c703e6fcc199720435067cc
refs/heads/master
2020-12-31T09:39:09.687372
2020-02-06T16:24:58
2020-02-06T16:24:58
238,980,627
0
0
null
2020-02-07T17:01:34
2020-02-07T17:01:33
null
UTF-8
Java
false
false
1,662
java
package com.alfinapp.ui.views; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.DecelerateInterpolator; import android.widget.Scroller; import androidx.viewpager.widget.ViewPager; import java.lang.reflect.Field; public class NonSwipeableViewPager extends ViewPager { public NonSwipeableViewPager(Context context) { super(context); setMyScroller(); } public NonSwipeableViewPager(Context context, AttributeSet attrs) { super(context, attrs); setMyScroller(); } @Override public boolean onInterceptTouchEvent(MotionEvent event) { // Never allow swiping to switch between pages return false; } @Override public boolean onTouchEvent(MotionEvent event) { // Never allow swiping to switch between pages return false; } //down one is added for smooth scrolling private void setMyScroller() { try { Class<?> viewpager = ViewPager.class; Field scroller = viewpager.getDeclaredField("mScroller"); scroller.setAccessible(true); scroller.set(this, new MyScroller(getContext())); } catch (Exception e) { e.printStackTrace(); } } public class MyScroller extends Scroller { public MyScroller(Context context) { super(context, new DecelerateInterpolator()); } @Override public void startScroll(int startX, int startY, int dx, int dy, int duration) { super.startScroll(startX, startY, dx, dy, 350 /*1 secs*/); } } }
[ "lalit.goswami@dainikbhaskar.com" ]
lalit.goswami@dainikbhaskar.com
4f05f005618be7751e24a3b12dfe072c2d467f15
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_fca15ddb85043f832a7d0fdb18acbac83b2d70bb/ThingListFragment/34_fca15ddb85043f832a7d0fdb18acbac83b2d70bb_ThingListFragment_t.java
bed2d6ea4683536cd0df28a2240c7ad3a9e465bf
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
17,920
java
/* * Copyright (C) 2012 Brian Muramatsu * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.btmura.android.reddit.app; import android.app.Activity; import android.app.ListFragment; import android.app.LoaderManager.LoaderCallbacks; import android.content.Intent; import android.content.Loader; import android.database.Cursor; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.util.SparseBooleanArray; import android.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.AbsListView.MultiChoiceModeListener; import android.widget.AbsListView.OnScrollListener; import android.widget.ListView; import com.btmura.android.reddit.BuildConfig; import com.btmura.android.reddit.R; import com.btmura.android.reddit.accounts.AccountUtils; import com.btmura.android.reddit.database.SaveActions; import com.btmura.android.reddit.database.Subreddits; import com.btmura.android.reddit.provider.Provider; import com.btmura.android.reddit.provider.ThingProvider; import com.btmura.android.reddit.util.Flag; import com.btmura.android.reddit.util.Objects; import com.btmura.android.reddit.widget.OnVoteListener; import com.btmura.android.reddit.widget.ThingAdapter; public class ThingListFragment extends ListFragment implements LoaderCallbacks<Cursor>, OnScrollListener, OnVoteListener, MultiChoiceModeListener { public static final String TAG = "ThingListFragment"; /** Optional bit mask for controlling fragment appearance. */ private static final String ARG_FLAGS = "flags"; public static final int FLAG_SINGLE_CHOICE = 0x1; private static final String STATE_ADAPTER_ARGS = "adapterArgs"; private static final String STATE_SELECTED_THING_ID = "selectedThingId"; private static final String STATE_SELECTED_LINK_ID = "selectedLinkId"; private static final String STATE_EMPTY_TEXT = "emptyText"; public interface OnThingSelectedListener { void onThingSelected(Bundle thingBundle); int onMeasureThingBody(); } private ThingAdapter adapter; private Bundle adapterArgs; private String selectedThingId; private String selectedLinkId; private int emptyText; private boolean scrollLoading; private OnThingSelectedListener listener; public static ThingListFragment newSubredditInstance(String accountName, String subreddit, int filter, int flags) { Bundle args = new Bundle(4); args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName); args.putString(ThingAdapter.ARG_SUBREDDIT, subreddit); args.putInt(ThingAdapter.ARG_FILTER, filter); args.putInt(ARG_FLAGS, flags); return newFragment(args); } public static ThingListFragment newQueryInstance(String accountName, String query, int flags) { Bundle args = new Bundle(3); args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName); args.putString(ThingAdapter.ARG_QUERY, query); args.putInt(ARG_FLAGS, flags); return newFragment(args); } public static ThingListFragment newMessageMessagesInstance(String accountName, String thingId, int flags) { Bundle args = new Bundle(2); args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName); args.putString(ThingAdapter.ARG_MESSAGE_THREAD_ID, thingId); args.putInt(ARG_FLAGS, flags); return newFragment(args); } public static ThingListFragment newInstance(String accountName, String query, String profileUser, String messageUser, int filter, int flags) { Bundle args = new Bundle(6); args.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName); args.putString(ThingAdapter.ARG_QUERY, query); args.putString(ThingAdapter.ARG_PROFILE_USER, profileUser); args.putString(ThingAdapter.ARG_MESSAGE_USER, messageUser); args.putInt(ThingAdapter.ARG_FILTER, filter); args.putInt(ARG_FLAGS, flags); return newFragment(args); } private static ThingListFragment newFragment(Bundle args) { ThingListFragment frag = new ThingListFragment(); frag.setArguments(args); return frag; } @Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof OnThingSelectedListener) { listener = (OnThingSelectedListener) activity; } } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!TextUtils.isEmpty(ThingAdapter.getMessageUser(getArguments()))) { adapter = ThingAdapter.newMessageInstance(getActivity()); } else if (!TextUtils.isEmpty(ThingAdapter.getMessageThreadId(getArguments()))) { adapter = ThingAdapter.newMessageThreadInstance(getActivity()); } else { adapter = ThingAdapter.newThingInstance(getActivity()); } int flags = getArguments().getInt(ARG_FLAGS); boolean singleChoice = Flag.isEnabled(flags, FLAG_SINGLE_CHOICE); adapter.setSingleChoice(singleChoice); if (savedInstanceState == null) { adapterArgs = new Bundle(7); adapterArgs.putAll(getArguments()); } else { adapterArgs = savedInstanceState.getBundle(STATE_ADAPTER_ARGS); selectedThingId = savedInstanceState.getString(STATE_SELECTED_THING_ID); selectedLinkId = savedInstanceState.getString(STATE_SELECTED_LINK_ID); emptyText = savedInstanceState.getInt(STATE_EMPTY_TEXT); } adapter.setAccountName(ThingAdapter.getAccountName(adapterArgs)); adapter.setParentSubreddit(ThingAdapter.getSubreddit(adapterArgs)); adapter.setOnVoteListener(this); adapter.setSelectedThing(selectedThingId, selectedLinkId); setHasOptionsMenu(true); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = super.onCreateView(inflater, container, savedInstanceState); ListView l = (ListView) v.findViewById(android.R.id.list); l.setVerticalScrollBarEnabled(false); l.setOnScrollListener(this); l.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL); l.setMultiChoiceModeListener(this); return v; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); adapter.setThingBodyWidth(getThingBodyWidth()); setListAdapter(adapter); setListShown(false); if (emptyText == 0) { loadIfPossible(); } else { showEmpty(); } } public void loadIfPossible() { if (adapter.isLoadable(adapterArgs)) { getLoaderManager().initLoader(0, null, this); } } public void setEmpty(boolean error) { this.emptyText = error ? R.string.error : R.string.empty_list; showEmpty(); } private void showEmpty() { setEmptyText(getString(emptyText)); setListShown(true); } public Loader<Cursor> onCreateLoader(int id, Bundle args) { if (BuildConfig.DEBUG) { Log.d(TAG, "onCreateLoader args: " + args); } if (args != null) { adapterArgs.putAll(args); } return adapter.createLoader(getActivity(), adapterArgs); } public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { if (BuildConfig.DEBUG) { Log.d(TAG, "onLoadFinished cursor: " + (cursor != null ? cursor.getCount() : "-1")); } scrollLoading = false; if (cursor != null) { Bundle extras = cursor.getExtras(); if (extras != null && extras.containsKey(ThingProvider.EXTRA_SESSION_ID)) { adapterArgs.putLong(ThingAdapter.ARG_SESSION_ID, extras.getLong(ThingProvider.EXTRA_SESSION_ID)); } } adapterArgs.remove(ThingAdapter.ARG_MORE); adapter.updateLoader(getActivity(), loader, adapterArgs); adapter.swapCursor(cursor); setEmptyText(getString(cursor != null ? R.string.empty_list : R.string.error)); setListShown(true); getActivity().invalidateOptionsMenu(); } public void onLoaderReset(Loader<Cursor> loader) { adapter.swapCursor(null); } @Override public void onListItemClick(ListView l, View v, int position, long id) { adapter.setSelectedPosition(position); selectedThingId = adapter.getSelectedThingId(); selectedLinkId = adapter.getSelectedLinkId(); if (listener != null) { listener.onThingSelected(adapter.getThingBundle(getActivity(), position)); } } public void onScrollStateChanged(AbsListView view, int scrollState) { } public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (visibleItemCount <= 0 || scrollLoading) { return; } if (firstVisibleItem + visibleItemCount * 2 >= totalItemCount) { if (getLoaderManager().getLoader(0) != null) { if (!adapter.isEmpty()) { String more = adapter.getMoreThingId(); if (!TextUtils.isEmpty(more)) { scrollLoading = true; Bundle b = new Bundle(1); b.putString(ThingAdapter.ARG_MORE, more); getLoaderManager().restartLoader(0, b, this); } } } } } public void onVote(String thingId, int likes) { if (BuildConfig.DEBUG) { Log.d(TAG, "onLike id: " + thingId + " likes: " + likes); } String accountName = ThingAdapter.getAccountName(adapterArgs); if (!TextUtils.isEmpty(accountName)) { Provider.voteAsync(getActivity(), accountName, thingId, likes); } } public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.thing_action_menu, menu); return true; } public boolean onPrepareActionMode(ActionMode mode, Menu menu) { int count = getListView().getCheckedItemCount(); boolean hasAccount = AccountUtils.isAccount(ThingAdapter.getAccountName(adapterArgs)); mode.setTitle(getResources().getQuantityString(R.plurals.things, count, count)); menu.findItem(R.id.menu_reply).setVisible(hasAccount && count == 1); menu.findItem(R.id.menu_compose_message).setVisible(hasAccount && count == 1); menu.findItem(R.id.menu_view_profile).setVisible(count == 1); menu.findItem(R.id.menu_copy_url).setVisible(count == 1); boolean showSave = false; boolean showUnsave = false; if (hasAccount && count == 1) { showSave = !adapter.isSaved(getFirstCheckedPosition()); showUnsave = !showSave; } menu.findItem(R.id.menu_save).setVisible(showSave); menu.findItem(R.id.menu_unsave).setVisible(showUnsave); return true; } public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) { mode.invalidate(); } public boolean onActionItemClicked(ActionMode mode, MenuItem item) { switch (item.getItemId()) { case R.id.menu_reply: return handleReply(mode); case R.id.menu_compose_message: return handleComposeMessage(mode); case R.id.menu_save: return handleSave(mode, SaveActions.ACTION_SAVE); case R.id.menu_unsave: return handleSave(mode, SaveActions.ACTION_UNSAVE); case R.id.menu_view_profile: return handleViewProfile(mode); case R.id.menu_copy_url: return handleCopyUrl(mode); default: return false; } } private boolean handleReply(ActionMode mode) { int position = getFirstCheckedPosition(); String user = adapter.getAuthor(position); Bundle extras = adapter.getReplyExtras(adapterArgs, position); MenuHelper.startComposeActivity(getActivity(), ComposeActivity.COMPOSITION_MESSAGE_REPLY, user, extras); mode.finish(); return true; } private boolean handleComposeMessage(ActionMode mode) { String user = adapter.getAuthor(getFirstCheckedPosition()); MenuHelper.startComposeActivity(getActivity(), ComposeActivity.COMPOSITION_MESSAGE, user, null); mode.finish(); return true; } private boolean handleSave(ActionMode mode, int action) { String accountName = ThingAdapter.getAccountName(adapterArgs); String thingId = adapter.getThingId(getFirstCheckedPosition()); Provider.saveAsync(getActivity(), accountName, thingId, action); mode.finish(); return true; } private boolean handleViewProfile(ActionMode mode) { String user = adapter.getAuthor(getFirstCheckedPosition()); MenuHelper.startProfileActivity(getActivity(), user); mode.finish(); return true; } private boolean handleCopyUrl(ActionMode mode) { int position = getFirstCheckedPosition(); String title = adapter.getTitle(position); CharSequence url = adapter.getUrl(position); MenuHelper.setClipAndToast(getActivity(), title, url); mode.finish(); return true; } public void onDestroyActionMode(ActionMode mode) { } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater); inflater.inflate(R.menu.thing_list_menu, menu); } @Override public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); String subreddit = ThingAdapter.getSubreddit(adapterArgs); menu.findItem(R.id.menu_view_subreddit_sidebar) .setVisible(subreddit != null && !Subreddits.isFrontPage(subreddit)); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_add: handleAdd(); return true; case R.id.menu_view_subreddit_sidebar: handleViewSidebar(); return true; default: return super.onOptionsItemSelected(item); } } private void handleAdd() { } private void handleViewSidebar() { Intent intent = new Intent(getActivity(), SidebarActivity.class); intent.putExtra(SidebarActivity.EXTRA_SUBREDDIT, ThingAdapter.getSubreddit(adapterArgs)); startActivity(intent); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBundle(STATE_ADAPTER_ARGS, adapterArgs); outState.putString(STATE_SELECTED_THING_ID, selectedThingId); outState.putString(STATE_SELECTED_LINK_ID, selectedLinkId); outState.putInt(STATE_EMPTY_TEXT, emptyText); } private int getThingBodyWidth() { return listener != null ? listener.onMeasureThingBody() : 0; } public void setAccountName(String accountName) { adapterArgs.putString(ThingAdapter.ARG_ACCOUNT_NAME, accountName); adapter.setAccountName(accountName); } public void setSelectedThing(String thingId, String linkId) { selectedThingId = thingId; selectedLinkId = linkId; adapter.setSelectedThing(thingId, linkId); } public String getAccountName() { return adapterArgs.getString(ThingAdapter.ARG_ACCOUNT_NAME); } public void setSubreddit(String subreddit) { if (!Objects.equalsIgnoreCase(subreddit, ThingAdapter.getSubreddit(adapterArgs))) { adapterArgs.putString(ThingAdapter.ARG_SUBREDDIT, subreddit); } } public String getQuery() { return ThingAdapter.getQuery(adapterArgs); } public int getFilter() { return ThingAdapter.getFilter(adapterArgs); } private int getFirstCheckedPosition() { SparseBooleanArray checked = getListView().getCheckedItemPositions(); int size = adapter.getCount(); for (int i = 0; i < size; i++) { if (checked.get(i)) { return i; } } return -1; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
447de911d9390918f06be266ead3017fb2de6c25
b86756a27140e68ffb6b56da97dcc82e957fdf91
/prog/src/com/company/LinearModel.java
9cc698b1fe412a8dcb32a233d64e722736a4f6cd
[]
no_license
Armandos95/GMDHJavaApp
d8c4000094f4422f1eb3c2db2bed94f4b4c84cc3
d66422957fd002a13722e083e972bcf48fb765a3
refs/heads/master
2016-09-14T07:45:00.704635
2016-05-24T15:45:06
2016-05-24T15:45:06
59,586,677
1
0
null
null
null
null
UTF-8
Java
false
false
984
java
package com.company; public class LinearModel implements Comparable<LinearModel>{ public double a0; public double a1; public double a2; public double a3; public double criterion; public int x1Index; public int x2Index; public int level; public double[] studyingResults; public double[] checkingResults; public double tempResult; public LinearModel(double[] coeffs, double[] studyingResults) { this.a0 = coeffs[0]; this.a1 = coeffs[1]; this.a2 = coeffs[2]; this.a3 = coeffs[3]; this.studyingResults = studyingResults; } public double countResult(double x1, double x2) { return (a0 + a1 * x1 + a2 * x2 + a3 * x1 * x2); } public int compareTo(LinearModel m) { return criterion > m.criterion ? 1 : criterion == m.criterion ? 0 : -1; } public String makeStartModel() { return ("" + a0 + " + " + a1 + "x1 + " + a2 + "x2 + " + a3 + "x1x2"); } }
[ "bezl1995@ukr.net" ]
bezl1995@ukr.net
345a8de1866e5bded906ba8d987154c04921e133
dec11f09905937042ddc9260eb8325f18f996b10
/src/test/subjects/JHD176target/src/CH/ifa/draw/test/standard/SingleFigureEnumeratorTest.java
33624a849345287e9b61231516a98428b644fca7
[]
no_license
easy-software-ufal/Nimrod
b09d45df580fce5811732e1d88314623cd150f17
dd7135791636d754d4501124bf9edde7027baa03
refs/heads/master
2021-09-13T20:08:59.182101
2018-05-03T18:26:26
2018-05-03T18:26:26
105,577,422
0
1
null
2018-02-22T02:20:22
2017-10-02T19:44:18
Java
UTF-8
Java
false
false
4,459
java
package CH.ifa.draw.test.standard; import junit.framework.TestCase; // JUnitDoclet begin import import CH.ifa.draw.standard.SingleFigureEnumerator; import CH.ifa.draw.figures.RectangleFigure; import java.awt.*; // JUnitDoclet end import /* * Generated by JUnitDoclet, a tool provided by * ObjectFab GmbH under LGPL. * Please see www.junitdoclet.org, www.gnu.org * and www.objectfab.de for informations about * the tool, the licence and the authors. */ // JUnitDoclet begin javadoc_class /** * TestCase SingleFigureEnumeratorTest is generated by * JUnitDoclet to hold the tests for SingleFigureEnumerator. * @see CH.ifa.draw.standard.SingleFigureEnumerator */ // JUnitDoclet end javadoc_class public class SingleFigureEnumeratorTest // JUnitDoclet begin extends_implements extends TestCase // JUnitDoclet end extends_implements { // JUnitDoclet begin class // instance variables, helper methods, ... put them in this marker CH.ifa.draw.standard.SingleFigureEnumerator singlefigureenumerator = null; // JUnitDoclet end class /** * Constructor SingleFigureEnumeratorTest is * basically calling the inherited constructor to * initiate the TestCase for use by the Framework. */ public SingleFigureEnumeratorTest(String name) { // JUnitDoclet begin method SingleFigureEnumeratorTest super(name); // JUnitDoclet end method SingleFigureEnumeratorTest } /** * Factory method for instances of the class to be tested. */ public CH.ifa.draw.standard.SingleFigureEnumerator createInstance() throws Exception { // JUnitDoclet begin method testcase.createInstance return new CH.ifa.draw.standard.SingleFigureEnumerator(new RectangleFigure(new Point(10, 10), new Point(100, 100))); // JUnitDoclet end method testcase.createInstance } /** * Method setUp is overwriting the framework method to * prepare an instance of this TestCase for a single test. * It's called from the JUnit framework only. */ protected void setUp() throws Exception { // JUnitDoclet begin method testcase.setUp super.setUp(); singlefigureenumerator = createInstance(); // JUnitDoclet end method testcase.setUp } /** * Method tearDown is overwriting the framework method to * clean up after each single test of this TestCase. * It's called from the JUnit framework only. */ protected void tearDown() throws Exception { // JUnitDoclet begin method testcase.tearDown singlefigureenumerator = null; super.tearDown(); // JUnitDoclet end method testcase.tearDown } // JUnitDoclet begin javadoc_method hasNextFigure() /** * Method testHasNextFigure is testing hasNextFigure * @see CH.ifa.draw.standard.SingleFigureEnumerator#hasNextFigure() */ // JUnitDoclet end javadoc_method hasNextFigure() public void testHasNextFigure() throws Exception { // JUnitDoclet begin method hasNextFigure // JUnitDoclet end method hasNextFigure } // JUnitDoclet begin javadoc_method nextFigure() /** * Method testNextFigure is testing nextFigure * @see CH.ifa.draw.standard.SingleFigureEnumerator#nextFigure() */ // JUnitDoclet end javadoc_method nextFigure() public void testNextFigure() throws Exception { // JUnitDoclet begin method nextFigure // JUnitDoclet end method nextFigure } // JUnitDoclet begin javadoc_method reset() /** * Method testReset is testing reset * @see CH.ifa.draw.standard.SingleFigureEnumerator#reset() */ // JUnitDoclet end javadoc_method reset() public void testReset() throws Exception { // JUnitDoclet begin method reset // JUnitDoclet end method reset } // JUnitDoclet begin javadoc_method testVault /** * JUnitDoclet moves marker to this method, if there is not match * for them in the regenerated code and if the marker is not empty. * This way, no test gets lost when regenerating after renaming. * <b>Method testVault is supposed to be empty.</b> */ // JUnitDoclet end javadoc_method testVault public void testVault() throws Exception { // JUnitDoclet begin method testcase.testVault // JUnitDoclet end method testcase.testVault } /** * Method to execute the TestCase from command line * using JUnit's textui.TestRunner . */ public static void main(String[] args) { // JUnitDoclet begin method testcase.main junit.textui.TestRunner.run(SingleFigureEnumeratorTest.class); // JUnitDoclet end method testcase.main } }
[ "pmop@ic.ufal.br" ]
pmop@ic.ufal.br
64982375ee9ced8004ac1f1e018e3c8faca18944
0534c419e373351a4c4323d36d322e57908fbbcb
/testJavaCV/build/generated/source/r/debug/com/example/testjavacv/R.java
f2d2b5a5e6ca802027e02c3584c077035e600f11
[]
no_license
zgljl2012/AzCamera
de192542b6e8d6cf3c138ba2b482b3845c893b19
1fc7a80b0b52a0c30c98a2c3163d2f9f2d4c6cae
refs/heads/master
2021-06-02T08:46:01.005516
2018-10-31T12:53:43
2018-10-31T12:53:43
41,474,689
4
2
null
null
null
null
UTF-8
Java
false
false
135,260
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.testjavacv; public final class R { public static final class anim { public static final int abc_fade_in=0x7f040000; public static final int abc_fade_out=0x7f040001; public static final int abc_slide_in_bottom=0x7f040002; public static final int abc_slide_in_top=0x7f040003; public static final int abc_slide_out_bottom=0x7f040004; public static final int abc_slide_out_top=0x7f040005; } public static final class attr { /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarDivider=0x7f010000; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarItemBackground=0x7f010001; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionBarSize=0x7f010002; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarSplitStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarStyle=0x7f010004; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabBarStyle=0x7f010005; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabStyle=0x7f010006; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabTextStyle=0x7f010007; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarWidgetTheme=0x7f010008; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionButtonStyle=0x7f010009; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionDropDownStyle=0x7f010062; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionLayout=0x7f010059; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionMenuTextAppearance=0x7f01000a; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int actionMenuTextColor=0x7f01000b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeBackground=0x7f01000c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseButtonStyle=0x7f01000d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseDrawable=0x7f01000e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCopyDrawable=0x7f01000f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCutDrawable=0x7f010010; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeFindDrawable=0x7f010011; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePasteDrawable=0x7f010012; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePopupWindowStyle=0x7f010013; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSelectAllDrawable=0x7f010014; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeShareDrawable=0x7f010015; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSplitBackground=0x7f010016; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeStyle=0x7f010017; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeWebSearchDrawable=0x7f010018; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionOverflowButtonStyle=0x7f010019; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionProviderClass=0x7f01005b; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionViewClass=0x7f01005a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int activityChooserViewStyle=0x7f01001a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int background=0x7f010047; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundSplit=0x7f010049; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundStacked=0x7f010048; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarButtonStyle=0x7f01001b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarStyle=0x7f01001c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int customNavigationLayout=0x7f01004a; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int disableChildrenWhenDisabled=0x7f010061; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static final int displayOptions=0x7f010040; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int divider=0x7f010046; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerHorizontal=0x7f01001d; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dividerPadding=0x7f010057; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerVertical=0x7f01001e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dropDownListViewStyle=0x7f01001f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dropdownListPreferredItemHeight=0x7f010063; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandActivityOverflowButtonDrawable=0x7f010054; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int height=0x7f010020; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeAsUpIndicator=0x7f010021; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeLayout=0x7f01004b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int icon=0x7f010044; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int iconifiedByDefault=0x7f01005c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int indeterminateProgressStyle=0x7f01004d; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int initialActivityCount=0x7f010053; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int isLightTheme=0x7f010022; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemPadding=0x7f01004f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listChoiceBackgroundIndicator=0x7f010067; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listPopupWindowStyle=0x7f010023; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeight=0x7f010024; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightLarge=0x7f010025; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightSmall=0x7f010026; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingLeft=0x7f010027; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingRight=0x7f010028; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int logo=0x7f010045; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td></td></tr> <tr><td><code>listMode</code></td><td>1</td><td></td></tr> <tr><td><code>tabMode</code></td><td>2</td><td></td></tr> </table> */ public static final int navigationMode=0x7f01003f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingEnd=0x7f010069; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingStart=0x7f010068; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelMenuListTheme=0x7f010066; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int panelMenuListWidth=0x7f010065; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupMenuStyle=0x7f010064; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupPromptView=0x7f010060; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int progressBarPadding=0x7f01004e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int progressBarStyle=0x7f01004c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int prompt=0x7f01005e; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int queryHint=0x7f01005d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchDropdownBackground=0x7f010029; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int searchResultListItemHeight=0x7f01002a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewAutoCompleteTextView=0x7f01002b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewCloseIcon=0x7f01002c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQuery=0x7f01002d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewEditQueryBackground=0x7f01002e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewGoIcon=0x7f01002f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewSearchIcon=0x7f010030; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextField=0x7f010031; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewTextFieldRight=0x7f010032; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewVoiceIcon=0x7f010033; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int selectableItemBackground=0x7f010034; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td></td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td></td></tr> <tr><td><code>always</code></td><td>2</td><td></td></tr> <tr><td><code>withText</code></td><td>4</td><td></td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr> </table> */ public static final int showAsAction=0x7f010058; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static final int showDividers=0x7f010056; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerDropDownItemStyle=0x7f010035; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td></td></tr> <tr><td><code>dropdown</code></td><td>1</td><td></td></tr> </table> */ public static final int spinnerMode=0x7f01005f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerStyle=0x7f010036; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitle=0x7f010041; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextStyle=0x7f010043; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static final int textAllCaps=0x7f010055; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceLargePopupMenu=0x7f010037; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItem=0x7f010038; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItemSmall=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultSubtitle=0x7f01003a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultTitle=0x7f01003b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSmallPopupMenu=0x7f01003c; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int textColorSearchUrl=0x7f01003d; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int title=0x7f01003e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextStyle=0x7f010042; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBar=0x7f010050; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBarOverlay=0x7f010051; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowSplitActionBar=0x7f010052; } public static final class bool { public static final int abc_action_bar_embed_tabs_pre_jb=0x7f050000; public static final int abc_action_bar_expanded_action_views_exclusive=0x7f050003; public static final int abc_config_actionMenuItemAllCaps=0x7f050004; public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f050001; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f050005; public static final int abc_split_action_bar_is_narrow=0x7f050002; } public static final class color { public static final int abc_search_url_text_holo=0x7f090003; public static final int abc_search_url_text_normal=0x7f090000; public static final int abc_search_url_text_pressed=0x7f090001; public static final int abc_search_url_text_selected=0x7f090002; } public static final class dimen { public static final int abc_action_bar_default_height=0x7f060000; public static final int abc_action_bar_icon_vertical_padding=0x7f060001; public static final int abc_action_bar_stacked_max_height=0x7f06000a; public static final int abc_action_bar_stacked_tab_max_width=0x7f06000b; public static final int abc_action_bar_subtitle_bottom_margin=0x7f060002; public static final int abc_action_bar_subtitle_text_size=0x7f060003; public static final int abc_action_bar_subtitle_top_margin=0x7f060004; public static final int abc_action_bar_title_text_size=0x7f060005; public static final int abc_action_button_min_width=0x7f060008; public static final int abc_config_prefDialogWidth=0x7f060006; public static final int abc_dropdownitem_icon_width=0x7f06000c; public static final int abc_dropdownitem_text_padding_left=0x7f06000d; public static final int abc_dropdownitem_text_padding_right=0x7f06000e; public static final int abc_panel_menu_list_width=0x7f06000f; public static final int abc_search_view_preferred_width=0x7f060010; public static final int abc_search_view_text_min_width=0x7f060007; public static final int activity_horizontal_margin=0x7f060009; public static final int activity_vertical_margin=0x7f060011; } public static final class drawable { public static final int abc_ab_bottom_solid_dark_holo=0x7f020000; public static final int abc_ab_bottom_solid_light_holo=0x7f020001; public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002; public static final int abc_ab_bottom_transparent_light_holo=0x7f020003; public static final int abc_ab_share_pack_holo_dark=0x7f020004; public static final int abc_ab_share_pack_holo_light=0x7f020005; public static final int abc_ab_solid_dark_holo=0x7f020006; public static final int abc_ab_solid_light_holo=0x7f020007; public static final int abc_ab_stacked_solid_dark_holo=0x7f020008; public static final int abc_ab_stacked_solid_light_holo=0x7f020009; public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a; public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b; public static final int abc_ab_transparent_dark_holo=0x7f02000c; public static final int abc_ab_transparent_light_holo=0x7f02000d; public static final int abc_cab_background_bottom_holo_dark=0x7f02000e; public static final int abc_cab_background_bottom_holo_light=0x7f02000f; public static final int abc_cab_background_top_holo_dark=0x7f020010; public static final int abc_cab_background_top_holo_light=0x7f020011; public static final int abc_ic_ab_back_holo_dark=0x7f020012; public static final int abc_ic_ab_back_holo_light=0x7f020013; public static final int abc_ic_cab_done_holo_dark=0x7f020014; public static final int abc_ic_cab_done_holo_light=0x7f020015; public static final int abc_ic_clear=0x7f020016; public static final int abc_ic_clear_disabled=0x7f020017; public static final int abc_ic_clear_holo_light=0x7f020018; public static final int abc_ic_clear_normal=0x7f020019; public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a; public static final int abc_ic_clear_search_api_holo_light=0x7f02001b; public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c; public static final int abc_ic_commit_search_api_holo_light=0x7f02001d; public static final int abc_ic_go=0x7f02001e; public static final int abc_ic_go_search_api_holo_light=0x7f02001f; public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020; public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021; public static final int abc_ic_menu_share_holo_dark=0x7f020022; public static final int abc_ic_menu_share_holo_light=0x7f020023; public static final int abc_ic_search=0x7f020024; public static final int abc_ic_search_api_holo_light=0x7f020025; public static final int abc_ic_voice_search=0x7f020026; public static final int abc_ic_voice_search_api_holo_light=0x7f020027; public static final int abc_item_background_holo_dark=0x7f020028; public static final int abc_item_background_holo_light=0x7f020029; public static final int abc_list_divider_holo_dark=0x7f02002a; public static final int abc_list_divider_holo_light=0x7f02002b; public static final int abc_list_focused_holo=0x7f02002c; public static final int abc_list_longpressed_holo=0x7f02002d; public static final int abc_list_pressed_holo_dark=0x7f02002e; public static final int abc_list_pressed_holo_light=0x7f02002f; public static final int abc_list_selector_background_transition_holo_dark=0x7f020030; public static final int abc_list_selector_background_transition_holo_light=0x7f020031; public static final int abc_list_selector_disabled_holo_dark=0x7f020032; public static final int abc_list_selector_disabled_holo_light=0x7f020033; public static final int abc_list_selector_holo_dark=0x7f020034; public static final int abc_list_selector_holo_light=0x7f020035; public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036; public static final int abc_menu_dropdown_panel_holo_light=0x7f020037; public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038; public static final int abc_menu_hardkey_panel_holo_light=0x7f020039; public static final int abc_search_dropdown_dark=0x7f02003a; public static final int abc_search_dropdown_light=0x7f02003b; public static final int abc_spinner_ab_default_holo_dark=0x7f02003c; public static final int abc_spinner_ab_default_holo_light=0x7f02003d; public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e; public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f; public static final int abc_spinner_ab_focused_holo_dark=0x7f020040; public static final int abc_spinner_ab_focused_holo_light=0x7f020041; public static final int abc_spinner_ab_holo_dark=0x7f020042; public static final int abc_spinner_ab_holo_light=0x7f020043; public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044; public static final int abc_spinner_ab_pressed_holo_light=0x7f020045; public static final int abc_tab_indicator_ab_holo=0x7f020046; public static final int abc_tab_selected_focused_holo=0x7f020047; public static final int abc_tab_selected_holo=0x7f020048; public static final int abc_tab_selected_pressed_holo=0x7f020049; public static final int abc_tab_unselected_pressed_holo=0x7f02004a; public static final int abc_textfield_search_default_holo_dark=0x7f02004b; public static final int abc_textfield_search_default_holo_light=0x7f02004c; public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d; public static final int abc_textfield_search_right_default_holo_light=0x7f02004e; public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f; public static final int abc_textfield_search_right_selected_holo_light=0x7f020050; public static final int abc_textfield_search_selected_holo_dark=0x7f020051; public static final int abc_textfield_search_selected_holo_light=0x7f020052; public static final int abc_textfield_searchview_holo_dark=0x7f020053; public static final int abc_textfield_searchview_holo_light=0x7f020054; public static final int abc_textfield_searchview_right_holo_dark=0x7f020055; public static final int abc_textfield_searchview_right_holo_light=0x7f020056; public static final int ic_launcher=0x7f020057; public static final int p4=0x7f020058; } public static final class id { public static final int action_bar=0x7f0a001a; public static final int action_bar_activity_content=0x7f0a0000; public static final int action_bar_container=0x7f0a0019; public static final int action_bar_overlay_layout=0x7f0a001d; public static final int action_bar_root=0x7f0a0018; public static final int action_bar_subtitle=0x7f0a0021; public static final int action_bar_title=0x7f0a0020; public static final int action_context_bar=0x7f0a001b; public static final int action_menu_divider=0x7f0a0001; public static final int action_menu_presenter=0x7f0a0002; public static final int action_mode_bar=0x7f0a002f; public static final int action_mode_bar_stub=0x7f0a002e; public static final int action_mode_close_button=0x7f0a0022; public static final int action_settings=0x7f0a0043; public static final int activity_chooser_view_content=0x7f0a0023; public static final int always=0x7f0a0011; public static final int beginning=0x7f0a000d; public static final int checkbox=0x7f0a002b; public static final int collapseActionView=0x7f0a0012; public static final int default_activity_button=0x7f0a0026; public static final int dialog=0x7f0a0016; public static final int disableHome=0x7f0a0007; public static final int dropdown=0x7f0a0017; public static final int edit_query=0x7f0a0036; public static final int end=0x7f0a000e; public static final int expand_activities_button=0x7f0a0024; public static final int expanded_menu=0x7f0a002a; public static final int home=0x7f0a0003; public static final int homeAsUp=0x7f0a0008; public static final int icon=0x7f0a0028; public static final int ifRoom=0x7f0a0013; public static final int image=0x7f0a0025; public static final int img=0x7f0a0042; public static final int left_icon=0x7f0a0031; public static final int listMode=0x7f0a0004; public static final int list_item=0x7f0a0027; public static final int middle=0x7f0a000f; public static final int never=0x7f0a0014; public static final int none=0x7f0a0010; public static final int normal=0x7f0a0005; public static final int progress_circular=0x7f0a0034; public static final int progress_horizontal=0x7f0a0035; public static final int radio=0x7f0a002d; public static final int right_container=0x7f0a0032; public static final int right_icon=0x7f0a0033; public static final int search_badge=0x7f0a0038; public static final int search_bar=0x7f0a0037; public static final int search_button=0x7f0a0039; public static final int search_close_btn=0x7f0a003e; public static final int search_edit_frame=0x7f0a003a; public static final int search_go_btn=0x7f0a0040; public static final int search_mag_icon=0x7f0a003b; public static final int search_plate=0x7f0a003c; public static final int search_src_text=0x7f0a003d; public static final int search_voice_btn=0x7f0a0041; public static final int shortcut=0x7f0a002c; public static final int showCustom=0x7f0a0009; public static final int showHome=0x7f0a000a; public static final int showTitle=0x7f0a000b; public static final int split_action_bar=0x7f0a001c; public static final int submit_area=0x7f0a003f; public static final int tabMode=0x7f0a0006; public static final int title=0x7f0a0029; public static final int title_container=0x7f0a0030; public static final int top_action_bar=0x7f0a001e; public static final int up=0x7f0a001f; public static final int useLogo=0x7f0a000c; public static final int withText=0x7f0a0015; } public static final class integer { public static final int abc_max_action_buttons=0x7f070000; } public static final class layout { public static final int abc_action_bar_decor=0x7f030000; public static final int abc_action_bar_decor_include=0x7f030001; public static final int abc_action_bar_decor_overlay=0x7f030002; public static final int abc_action_bar_home=0x7f030003; public static final int abc_action_bar_tab=0x7f030004; public static final int abc_action_bar_tabbar=0x7f030005; public static final int abc_action_bar_title_item=0x7f030006; public static final int abc_action_bar_view_list_nav_layout=0x7f030007; public static final int abc_action_menu_item_layout=0x7f030008; public static final int abc_action_menu_layout=0x7f030009; public static final int abc_action_mode_bar=0x7f03000a; public static final int abc_action_mode_close_item=0x7f03000b; public static final int abc_activity_chooser_view=0x7f03000c; public static final int abc_activity_chooser_view_include=0x7f03000d; public static final int abc_activity_chooser_view_list_item=0x7f03000e; public static final int abc_expanded_menu_layout=0x7f03000f; public static final int abc_list_menu_item_checkbox=0x7f030010; public static final int abc_list_menu_item_icon=0x7f030011; public static final int abc_list_menu_item_layout=0x7f030012; public static final int abc_list_menu_item_radio=0x7f030013; public static final int abc_popup_menu_item_layout=0x7f030014; public static final int abc_screen=0x7f030015; public static final int abc_search_dropdown_item_icons_2line=0x7f030016; public static final int abc_search_view=0x7f030017; public static final int activity_main=0x7f030018; public static final int support_simple_spinner_dropdown_item=0x7f030019; } public static final class menu { public static final int main=0x7f0c0000; } public static final class string { public static final int abc_action_bar_home_description=0x7f0b0000; public static final int abc_action_bar_up_description=0x7f0b0001; public static final int abc_action_menu_overflow_description=0x7f0b0002; public static final int abc_action_mode_done=0x7f0b0003; public static final int abc_activity_chooser_view_see_all=0x7f0b0004; public static final int abc_activitychooserview_choose_application=0x7f0b0005; public static final int abc_searchview_description_clear=0x7f0b0006; public static final int abc_searchview_description_query=0x7f0b0007; public static final int abc_searchview_description_search=0x7f0b0008; public static final int abc_searchview_description_submit=0x7f0b0009; public static final int abc_searchview_description_voice=0x7f0b000a; public static final int abc_shareactionprovider_share_with=0x7f0b000b; public static final int abc_shareactionprovider_share_with_application=0x7f0b000c; public static final int action_settings=0x7f0b000d; public static final int app_name=0x7f0b000e; public static final int hello_world=0x7f0b000f; } public static final class style { /** API 11 theme customizations can go here. API 14 theme customizations can go here. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. */ public static final int AppBaseTheme=0x7f080000; /** All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f08003a; public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f08003b; public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f08003c; public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f080007; public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f080008; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f080009; public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f08000a; public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f08003d; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f08000b; public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f08000c; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f08000d; public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f08000e; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f08003e; public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f08003f; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f080040; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f080041; public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f080042; public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f080043; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f080044; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f080045; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f080046; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f080047; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f080048; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f080049; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f08004a; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f08004b; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f08004c; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f08000f; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f080010; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f080011; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f080012; public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f080013; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f080014; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f080015; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f080016; public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f080017; public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f08004d; public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f08004e; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f08004f; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f080050; public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f080051; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f080052; public static final int Theme_AppCompat=0x7f080053; public static final int Theme_AppCompat_Base_CompactMenu=0x7f080054; public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f080055; public static final int Theme_AppCompat_CompactMenu=0x7f080056; public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f080057; public static final int Theme_AppCompat_Light=0x7f080058; public static final int Theme_AppCompat_Light_DarkActionBar=0x7f080059; public static final int Theme_Base=0x7f080001; public static final int Theme_Base_AppCompat=0x7f080018; public static final int Theme_Base_AppCompat_Light=0x7f080019; public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f08001a; public static final int Theme_Base_Light=0x7f080002; public static final int Widget_AppCompat_ActionBar=0x7f08005a; public static final int Widget_AppCompat_ActionBar_Solid=0x7f08005b; public static final int Widget_AppCompat_ActionBar_TabBar=0x7f08005c; public static final int Widget_AppCompat_ActionBar_TabText=0x7f08005d; public static final int Widget_AppCompat_ActionBar_TabView=0x7f08005e; public static final int Widget_AppCompat_ActionButton=0x7f08005f; public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f080060; public static final int Widget_AppCompat_ActionButton_Overflow=0x7f080061; public static final int Widget_AppCompat_ActionMode=0x7f080062; public static final int Widget_AppCompat_ActivityChooserView=0x7f080063; public static final int Widget_AppCompat_AutoCompleteTextView=0x7f080064; public static final int Widget_AppCompat_Base_ActionBar=0x7f08001b; public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f08001c; public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f08001d; public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f08001e; public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f08001f; public static final int Widget_AppCompat_Base_ActionButton=0x7f080020; public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f080021; public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f080022; public static final int Widget_AppCompat_Base_ActionMode=0x7f080065; public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f080023; public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f080003; public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f080024; public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f080025; public static final int Widget_AppCompat_Base_ListView_Menu=0x7f080026; public static final int Widget_AppCompat_Base_PopupMenu=0x7f080027; public static final int Widget_AppCompat_Base_ProgressBar=0x7f080004; public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f080005; public static final int Widget_AppCompat_Base_Spinner=0x7f080028; public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f080066; public static final int Widget_AppCompat_Light_ActionBar=0x7f080067; public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f080068; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f080069; public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f08006a; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f08006b; public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f08006c; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f08006d; public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f08006e; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f08006f; public static final int Widget_AppCompat_Light_ActionButton=0x7f080070; public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f080071; public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f080072; public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f080073; public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f080074; public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f080075; public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f080029; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f08002a; public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f08002b; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f08002c; public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f08002d; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f08002e; public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f08002f; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f080030; public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f080031; public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f080032; public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f080033; public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f080034; public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f080035; public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f080076; public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f080006; public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f080036; public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f080037; public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f080038; public static final int Widget_AppCompat_Light_Base_Spinner=0x7f080039; public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f080077; public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f080078; public static final int Widget_AppCompat_Light_PopupMenu=0x7f080079; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f08007a; public static final int Widget_AppCompat_ListView_DropDown=0x7f08007b; public static final int Widget_AppCompat_ListView_Menu=0x7f08007c; public static final int Widget_AppCompat_PopupMenu=0x7f08007d; public static final int Widget_AppCompat_ProgressBar=0x7f08007e; public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f08007f; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f080080; } public static final class styleable { /** Attributes that can be used with a ActionBar. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBar_background com.example.testjavacv:background}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_backgroundSplit com.example.testjavacv:backgroundSplit}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_backgroundStacked com.example.testjavacv:backgroundStacked}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_customNavigationLayout com.example.testjavacv:customNavigationLayout}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_displayOptions com.example.testjavacv:displayOptions}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_divider com.example.testjavacv:divider}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_height com.example.testjavacv:height}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_homeLayout com.example.testjavacv:homeLayout}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_icon com.example.testjavacv:icon}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.example.testjavacv:indeterminateProgressStyle}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_itemPadding com.example.testjavacv:itemPadding}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_logo com.example.testjavacv:logo}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_navigationMode com.example.testjavacv:navigationMode}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_progressBarPadding com.example.testjavacv:progressBarPadding}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_progressBarStyle com.example.testjavacv:progressBarStyle}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_subtitle com.example.testjavacv:subtitle}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_subtitleTextStyle com.example.testjavacv:subtitleTextStyle}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_title com.example.testjavacv:title}</code></td><td></td></tr> <tr><td><code>{@link #ActionBar_titleTextStyle com.example.testjavacv:titleTextStyle}</code></td><td></td></tr> </table> @see #ActionBar_background @see #ActionBar_backgroundSplit @see #ActionBar_backgroundStacked @see #ActionBar_customNavigationLayout @see #ActionBar_displayOptions @see #ActionBar_divider @see #ActionBar_height @see #ActionBar_homeLayout @see #ActionBar_icon @see #ActionBar_indeterminateProgressStyle @see #ActionBar_itemPadding @see #ActionBar_logo @see #ActionBar_navigationMode @see #ActionBar_progressBarPadding @see #ActionBar_progressBarStyle @see #ActionBar_subtitle @see #ActionBar_subtitleTextStyle @see #ActionBar_title @see #ActionBar_titleTextStyle */ public static final int[] ActionBar = { 0x7f010020, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#background} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:background */ public static final int ActionBar_background = 10; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundSplit} attribute's value can be found in the {@link #ActionBar} array. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". @attr name com.example.testjavacv:backgroundSplit */ public static final int ActionBar_backgroundSplit = 12; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundStacked} attribute's value can be found in the {@link #ActionBar} array. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". @attr name com.example.testjavacv:backgroundStacked */ public static final int ActionBar_backgroundStacked = 11; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#customNavigationLayout} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:customNavigationLayout */ public static final int ActionBar_customNavigationLayout = 13; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#displayOptions} attribute's value can be found in the {@link #ActionBar} array. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> @attr name com.example.testjavacv:displayOptions */ public static final int ActionBar_displayOptions = 3; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#divider} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:divider */ public static final int ActionBar_divider = 9; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#height} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:height */ public static final int ActionBar_height = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#homeLayout} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:homeLayout */ public static final int ActionBar_homeLayout = 14; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#icon} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:icon */ public static final int ActionBar_icon = 7; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#indeterminateProgressStyle} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:indeterminateProgressStyle */ public static final int ActionBar_indeterminateProgressStyle = 16; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#itemPadding} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:itemPadding */ public static final int ActionBar_itemPadding = 18; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#logo} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:logo */ public static final int ActionBar_logo = 8; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#navigationMode} attribute's value can be found in the {@link #ActionBar} array. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td></td></tr> <tr><td><code>listMode</code></td><td>1</td><td></td></tr> <tr><td><code>tabMode</code></td><td>2</td><td></td></tr> </table> @attr name com.example.testjavacv:navigationMode */ public static final int ActionBar_navigationMode = 2; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#progressBarPadding} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:progressBarPadding */ public static final int ActionBar_progressBarPadding = 17; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#progressBarStyle} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:progressBarStyle */ public static final int ActionBar_progressBarStyle = 15; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitle} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:subtitle */ public static final int ActionBar_subtitle = 4; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitleTextStyle} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:subtitleTextStyle */ public static final int ActionBar_subtitleTextStyle = 6; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#title} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:title */ public static final int ActionBar_title = 1; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#titleTextStyle} attribute's value can be found in the {@link #ActionBar} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:titleTextStyle */ public static final int ActionBar_titleTextStyle = 5; /** Attributes that can be used with a ActionBarLayout. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr> </table> @see #ActionBarLayout_android_layout_gravity */ public static final int[] ActionBarLayout = { 0x010100b3 }; /** <p>This symbol is the offset where the {@link android.R.attr#layout_gravity} attribute's value can be found in the {@link #ActionBarLayout} array. @attr name android:layout_gravity */ public static final int ActionBarLayout_android_layout_gravity = 0; /** Attributes that can be used with a ActionBarWindow. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBar com.example.testjavacv:windowActionBar}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.example.testjavacv:windowActionBarOverlay}</code></td><td></td></tr> <tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.example.testjavacv:windowSplitActionBar}</code></td><td></td></tr> </table> @see #ActionBarWindow_windowActionBar @see #ActionBarWindow_windowActionBarOverlay @see #ActionBarWindow_windowSplitActionBar */ public static final int[] ActionBarWindow = { 0x7f010050, 0x7f010051, 0x7f010052 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#windowActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:windowActionBar */ public static final int ActionBarWindow_windowActionBar = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#windowActionBarOverlay} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:windowActionBarOverlay */ public static final int ActionBarWindow_windowActionBarOverlay = 1; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#windowSplitActionBar} attribute's value can be found in the {@link #ActionBarWindow} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:windowSplitActionBar */ public static final int ActionBarWindow_windowSplitActionBar = 2; /** Attributes that can be used with a ActionMenuItemView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr> </table> @see #ActionMenuItemView_android_minWidth */ public static final int[] ActionMenuItemView = { 0x0101013f }; /** <p>This symbol is the offset where the {@link android.R.attr#minWidth} attribute's value can be found in the {@link #ActionMenuItemView} array. @attr name android:minWidth */ public static final int ActionMenuItemView_android_minWidth = 0; /** Attributes that can be used with a ActionMenuView. */ public static final int[] ActionMenuView = { }; /** Attributes that can be used with a ActionMode. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActionMode_background com.example.testjavacv:background}</code></td><td></td></tr> <tr><td><code>{@link #ActionMode_backgroundSplit com.example.testjavacv:backgroundSplit}</code></td><td></td></tr> <tr><td><code>{@link #ActionMode_height com.example.testjavacv:height}</code></td><td></td></tr> <tr><td><code>{@link #ActionMode_subtitleTextStyle com.example.testjavacv:subtitleTextStyle}</code></td><td></td></tr> <tr><td><code>{@link #ActionMode_titleTextStyle com.example.testjavacv:titleTextStyle}</code></td><td></td></tr> </table> @see #ActionMode_background @see #ActionMode_backgroundSplit @see #ActionMode_height @see #ActionMode_subtitleTextStyle @see #ActionMode_titleTextStyle */ public static final int[] ActionMode = { 0x7f010020, 0x7f010042, 0x7f010043, 0x7f010047, 0x7f010049 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#background} attribute's value can be found in the {@link #ActionMode} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:background */ public static final int ActionMode_background = 3; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#backgroundSplit} attribute's value can be found in the {@link #ActionMode} array. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". @attr name com.example.testjavacv:backgroundSplit */ public static final int ActionMode_backgroundSplit = 4; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#height} attribute's value can be found in the {@link #ActionMode} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:height */ public static final int ActionMode_height = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#subtitleTextStyle} attribute's value can be found in the {@link #ActionMode} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:subtitleTextStyle */ public static final int ActionMode_subtitleTextStyle = 2; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#titleTextStyle} attribute's value can be found in the {@link #ActionMode} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:titleTextStyle */ public static final int ActionMode_titleTextStyle = 1; /** Attributes that can be used with a ActivityChooserView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.example.testjavacv:expandActivityOverflowButtonDrawable}</code></td><td></td></tr> <tr><td><code>{@link #ActivityChooserView_initialActivityCount com.example.testjavacv:initialActivityCount}</code></td><td></td></tr> </table> @see #ActivityChooserView_expandActivityOverflowButtonDrawable @see #ActivityChooserView_initialActivityCount */ public static final int[] ActivityChooserView = { 0x7f010053, 0x7f010054 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#expandActivityOverflowButtonDrawable} attribute's value can be found in the {@link #ActivityChooserView} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:expandActivityOverflowButtonDrawable */ public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#initialActivityCount} attribute's value can be found in the {@link #ActivityChooserView} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:initialActivityCount */ public static final int ActivityChooserView_initialActivityCount = 0; /** Attributes that can be used with a CompatTextView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #CompatTextView_textAllCaps com.example.testjavacv:textAllCaps}</code></td><td></td></tr> </table> @see #CompatTextView_textAllCaps */ public static final int[] CompatTextView = { 0x7f010055 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#textAllCaps} attribute's value can be found in the {@link #CompatTextView} array. <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". @attr name com.example.testjavacv:textAllCaps */ public static final int CompatTextView_textAllCaps = 0; /** Attributes that can be used with a LinearLayoutICS. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #LinearLayoutICS_divider com.example.testjavacv:divider}</code></td><td></td></tr> <tr><td><code>{@link #LinearLayoutICS_dividerPadding com.example.testjavacv:dividerPadding}</code></td><td></td></tr> <tr><td><code>{@link #LinearLayoutICS_showDividers com.example.testjavacv:showDividers}</code></td><td></td></tr> </table> @see #LinearLayoutICS_divider @see #LinearLayoutICS_dividerPadding @see #LinearLayoutICS_showDividers */ public static final int[] LinearLayoutICS = { 0x7f010046, 0x7f010056, 0x7f010057 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#divider} attribute's value can be found in the {@link #LinearLayoutICS} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:divider */ public static final int LinearLayoutICS_divider = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#dividerPadding} attribute's value can be found in the {@link #LinearLayoutICS} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:dividerPadding */ public static final int LinearLayoutICS_dividerPadding = 2; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#showDividers} attribute's value can be found in the {@link #LinearLayoutICS} array. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> @attr name com.example.testjavacv:showDividers */ public static final int LinearLayoutICS_showDividers = 1; /** Attributes that can be used with a MenuGroup. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td></td></tr> <tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td></td></tr> <tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td></td></tr> <tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td></td></tr> <tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td></td></tr> <tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td></td></tr> </table> @see #MenuGroup_android_checkableBehavior @see #MenuGroup_android_enabled @see #MenuGroup_android_id @see #MenuGroup_android_menuCategory @see #MenuGroup_android_orderInCategory @see #MenuGroup_android_visible */ public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; /** <p>This symbol is the offset where the {@link android.R.attr#checkableBehavior} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:checkableBehavior */ public static final int MenuGroup_android_checkableBehavior = 5; /** <p>This symbol is the offset where the {@link android.R.attr#enabled} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:enabled */ public static final int MenuGroup_android_enabled = 0; /** <p>This symbol is the offset where the {@link android.R.attr#id} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:id */ public static final int MenuGroup_android_id = 1; /** <p>This symbol is the offset where the {@link android.R.attr#menuCategory} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:menuCategory */ public static final int MenuGroup_android_menuCategory = 3; /** <p>This symbol is the offset where the {@link android.R.attr#orderInCategory} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:orderInCategory */ public static final int MenuGroup_android_orderInCategory = 4; /** <p>This symbol is the offset where the {@link android.R.attr#visible} attribute's value can be found in the {@link #MenuGroup} array. @attr name android:visible */ public static final int MenuGroup_android_visible = 2; /** Attributes that can be used with a MenuItem. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuItem_actionLayout com.example.testjavacv:actionLayout}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_actionProviderClass com.example.testjavacv:actionProviderClass}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_actionViewClass com.example.testjavacv:actionViewClass}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td></td></tr> <tr><td><code>{@link #MenuItem_showAsAction com.example.testjavacv:showAsAction}</code></td><td></td></tr> </table> @see #MenuItem_actionLayout @see #MenuItem_actionProviderClass @see #MenuItem_actionViewClass @see #MenuItem_android_alphabeticShortcut @see #MenuItem_android_checkable @see #MenuItem_android_checked @see #MenuItem_android_enabled @see #MenuItem_android_icon @see #MenuItem_android_id @see #MenuItem_android_menuCategory @see #MenuItem_android_numericShortcut @see #MenuItem_android_onClick @see #MenuItem_android_orderInCategory @see #MenuItem_android_title @see #MenuItem_android_titleCondensed @see #MenuItem_android_visible @see #MenuItem_showAsAction */ public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionLayout} attribute's value can be found in the {@link #MenuItem} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:actionLayout */ public static final int MenuItem_actionLayout = 14; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionProviderClass} attribute's value can be found in the {@link #MenuItem} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:actionProviderClass */ public static final int MenuItem_actionProviderClass = 16; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionViewClass} attribute's value can be found in the {@link #MenuItem} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:actionViewClass */ public static final int MenuItem_actionViewClass = 15; /** <p>This symbol is the offset where the {@link android.R.attr#alphabeticShortcut} attribute's value can be found in the {@link #MenuItem} array. @attr name android:alphabeticShortcut */ public static final int MenuItem_android_alphabeticShortcut = 9; /** <p>This symbol is the offset where the {@link android.R.attr#checkable} attribute's value can be found in the {@link #MenuItem} array. @attr name android:checkable */ public static final int MenuItem_android_checkable = 11; /** <p>This symbol is the offset where the {@link android.R.attr#checked} attribute's value can be found in the {@link #MenuItem} array. @attr name android:checked */ public static final int MenuItem_android_checked = 3; /** <p>This symbol is the offset where the {@link android.R.attr#enabled} attribute's value can be found in the {@link #MenuItem} array. @attr name android:enabled */ public static final int MenuItem_android_enabled = 1; /** <p>This symbol is the offset where the {@link android.R.attr#icon} attribute's value can be found in the {@link #MenuItem} array. @attr name android:icon */ public static final int MenuItem_android_icon = 0; /** <p>This symbol is the offset where the {@link android.R.attr#id} attribute's value can be found in the {@link #MenuItem} array. @attr name android:id */ public static final int MenuItem_android_id = 2; /** <p>This symbol is the offset where the {@link android.R.attr#menuCategory} attribute's value can be found in the {@link #MenuItem} array. @attr name android:menuCategory */ public static final int MenuItem_android_menuCategory = 5; /** <p>This symbol is the offset where the {@link android.R.attr#numericShortcut} attribute's value can be found in the {@link #MenuItem} array. @attr name android:numericShortcut */ public static final int MenuItem_android_numericShortcut = 10; /** <p>This symbol is the offset where the {@link android.R.attr#onClick} attribute's value can be found in the {@link #MenuItem} array. @attr name android:onClick */ public static final int MenuItem_android_onClick = 12; /** <p>This symbol is the offset where the {@link android.R.attr#orderInCategory} attribute's value can be found in the {@link #MenuItem} array. @attr name android:orderInCategory */ public static final int MenuItem_android_orderInCategory = 6; /** <p>This symbol is the offset where the {@link android.R.attr#title} attribute's value can be found in the {@link #MenuItem} array. @attr name android:title */ public static final int MenuItem_android_title = 7; /** <p>This symbol is the offset where the {@link android.R.attr#titleCondensed} attribute's value can be found in the {@link #MenuItem} array. @attr name android:titleCondensed */ public static final int MenuItem_android_titleCondensed = 8; /** <p>This symbol is the offset where the {@link android.R.attr#visible} attribute's value can be found in the {@link #MenuItem} array. @attr name android:visible */ public static final int MenuItem_android_visible = 4; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#showAsAction} attribute's value can be found in the {@link #MenuItem} array. <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td></td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td></td></tr> <tr><td><code>always</code></td><td>2</td><td></td></tr> <tr><td><code>withText</code></td><td>4</td><td></td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr> </table> @attr name com.example.testjavacv:showAsAction */ public static final int MenuItem_showAsAction = 13; /** Attributes that can be used with a MenuView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td></td></tr> <tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td></td></tr> </table> @see #MenuView_android_headerBackground @see #MenuView_android_horizontalDivider @see #MenuView_android_itemBackground @see #MenuView_android_itemIconDisabledAlpha @see #MenuView_android_itemTextAppearance @see #MenuView_android_preserveIconSpacing @see #MenuView_android_verticalDivider @see #MenuView_android_windowAnimationStyle */ public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x010103ea }; /** <p>This symbol is the offset where the {@link android.R.attr#headerBackground} attribute's value can be found in the {@link #MenuView} array. @attr name android:headerBackground */ public static final int MenuView_android_headerBackground = 4; /** <p>This symbol is the offset where the {@link android.R.attr#horizontalDivider} attribute's value can be found in the {@link #MenuView} array. @attr name android:horizontalDivider */ public static final int MenuView_android_horizontalDivider = 2; /** <p>This symbol is the offset where the {@link android.R.attr#itemBackground} attribute's value can be found in the {@link #MenuView} array. @attr name android:itemBackground */ public static final int MenuView_android_itemBackground = 5; /** <p>This symbol is the offset where the {@link android.R.attr#itemIconDisabledAlpha} attribute's value can be found in the {@link #MenuView} array. @attr name android:itemIconDisabledAlpha */ public static final int MenuView_android_itemIconDisabledAlpha = 6; /** <p>This symbol is the offset where the {@link android.R.attr#itemTextAppearance} attribute's value can be found in the {@link #MenuView} array. @attr name android:itemTextAppearance */ public static final int MenuView_android_itemTextAppearance = 1; /** <p>This symbol is the offset where the {@link android.R.attr#preserveIconSpacing} attribute's value can be found in the {@link #MenuView} array. @attr name android:preserveIconSpacing */ public static final int MenuView_android_preserveIconSpacing = 7; /** <p>This symbol is the offset where the {@link android.R.attr#verticalDivider} attribute's value can be found in the {@link #MenuView} array. @attr name android:verticalDivider */ public static final int MenuView_android_verticalDivider = 3; /** <p>This symbol is the offset where the {@link android.R.attr#windowAnimationStyle} attribute's value can be found in the {@link #MenuView} array. @attr name android:windowAnimationStyle */ public static final int MenuView_android_windowAnimationStyle = 0; /** Attributes that can be used with a SearchView. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td></td></tr> <tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td></td></tr> <tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td></td></tr> <tr><td><code>{@link #SearchView_iconifiedByDefault com.example.testjavacv:iconifiedByDefault}</code></td><td></td></tr> <tr><td><code>{@link #SearchView_queryHint com.example.testjavacv:queryHint}</code></td><td></td></tr> </table> @see #SearchView_android_imeOptions @see #SearchView_android_inputType @see #SearchView_android_maxWidth @see #SearchView_iconifiedByDefault @see #SearchView_queryHint */ public static final int[] SearchView = { 0x0101011f, 0x01010220, 0x01010264, 0x7f01005c, 0x7f01005d }; /** <p>This symbol is the offset where the {@link android.R.attr#imeOptions} attribute's value can be found in the {@link #SearchView} array. @attr name android:imeOptions */ public static final int SearchView_android_imeOptions = 2; /** <p>This symbol is the offset where the {@link android.R.attr#inputType} attribute's value can be found in the {@link #SearchView} array. @attr name android:inputType */ public static final int SearchView_android_inputType = 1; /** <p>This symbol is the offset where the {@link android.R.attr#maxWidth} attribute's value can be found in the {@link #SearchView} array. @attr name android:maxWidth */ public static final int SearchView_android_maxWidth = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#iconifiedByDefault} attribute's value can be found in the {@link #SearchView} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:iconifiedByDefault */ public static final int SearchView_iconifiedByDefault = 3; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#queryHint} attribute's value can be found in the {@link #SearchView} array. <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:queryHint */ public static final int SearchView_queryHint = 4; /** Attributes that can be used with a Spinner. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.example.testjavacv:disableChildrenWhenDisabled}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_popupPromptView com.example.testjavacv:popupPromptView}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_prompt com.example.testjavacv:prompt}</code></td><td></td></tr> <tr><td><code>{@link #Spinner_spinnerMode com.example.testjavacv:spinnerMode}</code></td><td></td></tr> </table> @see #Spinner_android_dropDownHorizontalOffset @see #Spinner_android_dropDownSelector @see #Spinner_android_dropDownVerticalOffset @see #Spinner_android_dropDownWidth @see #Spinner_android_gravity @see #Spinner_android_popupBackground @see #Spinner_disableChildrenWhenDisabled @see #Spinner_popupPromptView @see #Spinner_prompt @see #Spinner_spinnerMode */ public static final int[] Spinner = { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061 }; /** <p>This symbol is the offset where the {@link android.R.attr#dropDownHorizontalOffset} attribute's value can be found in the {@link #Spinner} array. @attr name android:dropDownHorizontalOffset */ public static final int Spinner_android_dropDownHorizontalOffset = 4; /** <p>This symbol is the offset where the {@link android.R.attr#dropDownSelector} attribute's value can be found in the {@link #Spinner} array. @attr name android:dropDownSelector */ public static final int Spinner_android_dropDownSelector = 1; /** <p>This symbol is the offset where the {@link android.R.attr#dropDownVerticalOffset} attribute's value can be found in the {@link #Spinner} array. @attr name android:dropDownVerticalOffset */ public static final int Spinner_android_dropDownVerticalOffset = 5; /** <p>This symbol is the offset where the {@link android.R.attr#dropDownWidth} attribute's value can be found in the {@link #Spinner} array. @attr name android:dropDownWidth */ public static final int Spinner_android_dropDownWidth = 3; /** <p>This symbol is the offset where the {@link android.R.attr#gravity} attribute's value can be found in the {@link #Spinner} array. @attr name android:gravity */ public static final int Spinner_android_gravity = 0; /** <p>This symbol is the offset where the {@link android.R.attr#popupBackground} attribute's value can be found in the {@link #Spinner} array. @attr name android:popupBackground */ public static final int Spinner_android_popupBackground = 2; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#disableChildrenWhenDisabled} attribute's value can be found in the {@link #Spinner} array. <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:disableChildrenWhenDisabled */ public static final int Spinner_disableChildrenWhenDisabled = 9; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#popupPromptView} attribute's value can be found in the {@link #Spinner} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:popupPromptView */ public static final int Spinner_popupPromptView = 8; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#prompt} attribute's value can be found in the {@link #Spinner} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:prompt */ public static final int Spinner_prompt = 6; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#spinnerMode} attribute's value can be found in the {@link #Spinner} array. <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>dialog</code></td><td>0</td><td></td></tr> <tr><td><code>dropdown</code></td><td>1</td><td></td></tr> </table> @attr name com.example.testjavacv:spinnerMode */ public static final int Spinner_spinnerMode = 7; /** Attributes that can be used with a Theme. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #Theme_actionDropDownStyle com.example.testjavacv:actionDropDownStyle}</code></td><td></td></tr> <tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.example.testjavacv:dropdownListPreferredItemHeight}</code></td><td></td></tr> <tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.example.testjavacv:listChoiceBackgroundIndicator}</code></td><td></td></tr> <tr><td><code>{@link #Theme_panelMenuListTheme com.example.testjavacv:panelMenuListTheme}</code></td><td></td></tr> <tr><td><code>{@link #Theme_panelMenuListWidth com.example.testjavacv:panelMenuListWidth}</code></td><td></td></tr> <tr><td><code>{@link #Theme_popupMenuStyle com.example.testjavacv:popupMenuStyle}</code></td><td></td></tr> </table> @see #Theme_actionDropDownStyle @see #Theme_dropdownListPreferredItemHeight @see #Theme_listChoiceBackgroundIndicator @see #Theme_panelMenuListTheme @see #Theme_panelMenuListWidth @see #Theme_popupMenuStyle */ public static final int[] Theme = { 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067 }; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#actionDropDownStyle} attribute's value can be found in the {@link #Theme} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:actionDropDownStyle */ public static final int Theme_actionDropDownStyle = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#dropdownListPreferredItemHeight} attribute's value can be found in the {@link #Theme} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:dropdownListPreferredItemHeight */ public static final int Theme_dropdownListPreferredItemHeight = 1; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#listChoiceBackgroundIndicator} attribute's value can be found in the {@link #Theme} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:listChoiceBackgroundIndicator */ public static final int Theme_listChoiceBackgroundIndicator = 5; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#panelMenuListTheme} attribute's value can be found in the {@link #Theme} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:panelMenuListTheme */ public static final int Theme_panelMenuListTheme = 4; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#panelMenuListWidth} attribute's value can be found in the {@link #Theme} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:panelMenuListWidth */ public static final int Theme_panelMenuListWidth = 3; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#popupMenuStyle} attribute's value can be found in the {@link #Theme} array. <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". @attr name com.example.testjavacv:popupMenuStyle */ public static final int Theme_popupMenuStyle = 2; /** Attributes that can be used with a View. <p>Includes the following attributes:</p> <table> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Attribute</th><th>Description</th></tr> <tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td></td></tr> <tr><td><code>{@link #View_paddingEnd com.example.testjavacv:paddingEnd}</code></td><td></td></tr> <tr><td><code>{@link #View_paddingStart com.example.testjavacv:paddingStart}</code></td><td></td></tr> </table> @see #View_android_focusable @see #View_paddingEnd @see #View_paddingStart */ public static final int[] View = { 0x010100da, 0x7f010068, 0x7f010069 }; /** <p>This symbol is the offset where the {@link android.R.attr#focusable} attribute's value can be found in the {@link #View} array. @attr name android:focusable */ public static final int View_android_focusable = 0; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#paddingEnd} attribute's value can be found in the {@link #View} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:paddingEnd */ public static final int View_paddingEnd = 2; /** <p>This symbol is the offset where the {@link com.example.testjavacv.R.attr#paddingStart} attribute's value can be found in the {@link #View} array. <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. @attr name com.example.testjavacv:paddingStart */ public static final int View_paddingStart = 1; }; }
[ "2693491512@qq.com" ]
2693491512@qq.com
e9b3a769f308523a6215acffa64688a13abb96fc
33e47549a7f3f7621be100b68efac0df9f671553
/src/com/huaixuan/network/biz/enums/EnumAdminLog.java
0d1b72635e94850804a72b371f56f08d115028e3
[]
no_license
Maddox-Zhao/admin
150b60074e5b89692da52bcdb0b789bdd581a915
67ff15e6a5731aa39c0b747dfca35efc4c87a121
refs/heads/master
2022-08-20T00:06:19.244070
2019-10-31T05:58:30
2019-10-31T05:58:30
218,693,988
0
0
null
null
null
null
UTF-8
Java
false
false
19,277
java
/** * created since 2009-7-20 */ package com.huaixuan.network.biz.enums; import java.util.HashMap; import java.util.Map; /** * @author zhangwy */ public enum EnumAdminLog { //struts-admin-admin ADDUSER("addUser", "跳转到增加用户页面"),INSERTUSER("insertUser", "增加用户"),EDITUSER("editUser","跳转到修改用户页面"),MODIFYUSER("modifyUser","修改用户"), FREEZEUSER("freezeUser","冻结用户"),THAWUSER("thawUser","解冻用户"),USERROLELIST("userRoleList","用户角色列表"),MODIFYUSERROLE("modifyUserRole","修改用户角色"), ROLELIST("roleList","角色列表"),ADDROLE("addRole","跳转到增加角色页面"),INSERTROLE("insertRole","增加角色"),EDITROLE("editRole","跳转到修改角色页面"), MODIFYROLE("modifyRole","修改角色"),ROLEAUTHORITYLIST("roleAuthorityList","角色权限列表"),MODIFYROLEAUTHORITY("modifyRoleAuthority","修改角色权限"), EDITPASSWORD("editPassword","跳转到修改密码页面"),MODIFYUSERPASSWORD("modifyUserPassword","修改密码"),EDITCURUSER("editCurUser","跳转到用户信息修改页面"), MODIFYCURUSER("modifyCurUser","用户信息修改"), //struts-admin-attribute ADDATTR("addattr","跳转到添加属性页面"),ADDA("adda","添加属性"),EDITA("edita","跳转到编辑属性页面"),EA("ea","编辑属性"),RA("ra","删除属性"),BATCHDEL("batchdel","批量删除属性"), //struts-admin-category MODIFY("modify","修改类目"),REMOVEC("removec","删除类目"),ADDCAT("addcat","跳转到新增类目页面"),ADDC("addc","新增类目"),ADDCA("addca","添加属性关联"), //struts-admin-goods PUBLISH("init_publish","跳转到发布商品页面"),CREATEGOODSINSTANCEDATA("createGoodsInstanceData","根据商品生成产品数据"),DP("dp","发布商品"),DOAGENT("doagent","设置商品为代销商品"), DODISAGENT("dodisagent","取消商品为代销商品"),BATCHGOODS("batchGoods","批量导入商品"),DOBATCHPUBLIS("doBatchPublis","批量上传商品"),EDITG("editg","跳转到修改商品页面"), DOEG("doeg","修改商品"),DELISTINGGB("delistinggb","批量下架商品"),DELISTING("delisting","单个下架商品"),DELETEG("deleteg","删除商品"),CUTPRICE("cutPrice","设置商品为特价商品"), DOAGENTGOODS("doAgentGoods","批量设置代销商品"),DOCANELAGENTGOODS("doCanelAgentGoods","批量取消代销商品"),DECUTPRICE("deCutPrice","取消商品为特价商品"),CUTPRICEGOODS("cutPriceGoods","批量设置特价商品"), CANELCUTPRICEGOODS("canelCutPriceGoods","批量取消特价商品"),DOACTIVITYGOODS("doActivityGoods","设置商品为活动商品"),UPDATEPROMATION("updatePromation","修改套餐"),ADDPRO("addPro","增加套餐"), PROMATION("promation","添加满就减规则"),ADDFULLGIVE("addFullGive","添加满就送规则"),UPDATEFULLREDUCE("updateFullReduce","修改满就减规则"),UPDATEFULLGIVE("updateFullGive","修改满就送规则"), PORTSALE("portsale","跳转到添加套餐页面"),ADDSALE("addsale","添加套餐"),ADDSALEGOODS("addsalegoods","添加套餐商品"),UPDATEPSP("updatepsp","跳转到套餐修改页面"),UPDATESALE("updatesale","修改套餐"), ADDGIFT("addGift","添加买就赠"),UPDATEGB("updategb","跳转到修改买就赠页面"),UPDATEGIFT("updategift","修改买就赠"),CREATEINSTANCE("create_instance","添加产品"), UPDATEINSTANCE("update_instance","修改产品"),UPDATEINSTANCELOCATION("update_instance_location","修改产品库位"),UPDATEINSTANCESUPPLIER("update_instance_supplier","修改产品供应商"), REMOVEINSTANCESUPPLIER("remove_instance_supplier","删除产品供应商"),ADDINSTANCESUPPLIER("add_instance_supplier","跳转到新增产品供应商页面"),CREATEINSTANCESUPPLIER("create_instance_supplier","新增产品供应商"), LISTING("listing","商品上架"),LISTINGGB("listinggb","商品批量上架"), //struts-admin-ios ADDSUP("addSup","添加供应商"),DISABLE("disable","供应商失效"),ENABLE("enable","供应商激活"),DELSUPPLIERGOODS("delSupplierGoods","删除供应商"),EDITSUP("editSup","更新供应商"), ADDSUPGOODS("addSupGoods","添加供应商"),ADDDAMAGED("addDamaged","新增报残单"),ADDDAMAGEDGOODS("addDamagedGoods","新增报残单商品信息"),EDITDAMAGED("editDamaged","编辑报残单"), EDITDAMAGEDATTRIBUTE("editDamagedAttribute","编辑报残单属性"),DELETEDAMAGEDGOODS("deleteDamagedGoods","删除报残商品"),ADDDEPOSITORY("addDepository","新增仓库"), EDITDEPOSITORY("editDepository","编辑仓库信息"),ADDDEPLOCATION("addDepLocation","新增库位"),EDITDEPLOCATION("editDepLocation","编辑库位信息"),STOCKADD("stockAdd","新增采购订单"), ADDSTOCKGOODS("addStockGoods","增加采购订单商品信息"),REFUND("refund","退货操作"),STOCKEDIT("stockEdit","编辑采购订单"),EDITSTOCKATTRIBUTE("editStockAttribute","编辑采购订单状态"), STOCKDELETE("stockDelete","删除采购商品"),CHECKSTOK("checkStock","验收修改采购订单"),COPYADD("copyAdd","复制新增采购订单"),ADDSREFUND("addSRefund","新增退货单"), ADDOUTDEP("addOutDep","生成出库单"),INDEPOSITORYOPT("inDepositoryOpt","产品库位分配"),GATHEROUTDEPOSITORY("getherOutDepository","出库单成本汇总统计查询"), REFUNDSTORAGES("refundStorages","库存退货"),RETURNSTOCK("returnStock","库存归还记录查询"),MOVELOGRETURN("moveLogReturn","外借回调操作页面"),RETURNONESTOCK("returnOneStock","单个记录做归还操作"), ADDSTORCHECK("addStorCheck","新增盘存信息"),UPDATESTORAGE("updateStorage","更新盘存信息"),FINISHSTORECHECK("finishStoreCheck","完成盘点"),IMPORTSUPPLIERGOODS("importSupplierGoods","excel导入供应商商品信息"), BATCHMODIFYEXPRESSDIST("batchModifyExpressDist","批量修改物流范围"), FINANCEOUTDEPOSITORYCONFIRM("financeOutDepositoryConfirm","出库单财务确认"), FINANCEINDEPOSITORYCONFIRM("financeInDepositoryConfirm","入库单财务确认"), EDITFINANCESTATUS("editFinanceStatus","采购单付款确认"), //struts-admin-shop ADDN("addn","新增公告"),DELETEN("deleten","批量删除公告"),UPDATEN("updaten","修改公告"),DELETEADMINWEBSITE("deleteAdminWebSite","删除站内信"),UPDATEADMINWEBSITE("updateAdminWebSite","修改站内信"), SAVEWEBSITE("saveWebSite","添加站内信"),DELETEAD("deletead","删除广告"),ADDAD("addad","新增广告"),UPDATEAD("updatead","更新广告"),DELETEADP("deleteadp","删除广告位"), ADDFL("addfl","新增友情链接"),UPDATEFL("updatefl","更新友情链接"),DELETEKW("deletekw","删除热门关键字"),ADDKW("addkw","新增热门关键字"),UPDATEKW("updatekw","更新热门关键字"), DELETESC("deletesc","删除橱窗推荐位"),DELETEBR("deletebr","删除品牌"),ADDBR("addbr","新增品牌"),ADDAR("addar","添加资讯"),DELETEAR("deletear","删除资讯"),TOP("top","置顶资讯"), USHOW("ushow","显示资讯"),UPDATEAR("updatear","更新资讯"),ADDNAV("addnav","新增导航"),UPDATENAV("updatenav","修改导航"),SBARD("sbard","修改榜单"),INSERTACTIVITY("insertActivity","新增专场"), UPDATEACTITY("updateActity","修改专场信息"), //struts-admin-trade ADDTRADE("addTrade","后台添加订单"),CHANGE("change","换货操作"),REFUNDGOODS("refundGoods","退货操作"),REFUSEREFUNDGOODS("refuseRefundGoods","拒绝退货"),AGREEREFUNDGOODS("agreeRefundGoods","同意退货"), SENDFB("sendfb","发送留言"),CONREFUND("conRefund","查看处理退货申请"),REFCHA("refcha","退款退货申请"),CONGOO("congoo","卖家确认收到退货"), //struts-admin-users REPLYCOMM("replycomm","编辑用户评论"),REPLYFB("replyfb","编辑留言"),REGUSERS("regusers","注册用户管理"),ANA("ana","新增普通管理员"),EDITAP("editap","管理员密码修改"); private String code; private String name; EnumAdminLog(String code,String name){ this.code=code; this.name=name; } public String getKey() { return this.code; } public String getValue(){ return this.name; } public static Map<String, String> toMap() { Map<String, String> enumDataMap = new HashMap<String, String>(); enumDataMap.put(ADDUSER.getKey(), ADDUSER.getValue()); enumDataMap.put(INSERTUSER.getKey(), INSERTUSER.getValue()); enumDataMap.put(EDITUSER.getKey(), EDITUSER.getValue()); enumDataMap.put(MODIFYUSER.getKey(), MODIFYUSER.getValue()); enumDataMap.put(FREEZEUSER.getKey(), FREEZEUSER.getValue()); enumDataMap.put(THAWUSER.getKey(), THAWUSER.getValue()); enumDataMap.put(USERROLELIST.getKey(), USERROLELIST.getValue()); enumDataMap.put(MODIFYUSERROLE.getKey(), MODIFYUSERROLE.getValue()); enumDataMap.put(ROLELIST.getKey(), ROLELIST.getValue()); enumDataMap.put(ADDROLE.getKey(), ADDROLE.getValue()); enumDataMap.put(INSERTROLE.getKey(), INSERTROLE.getValue()); enumDataMap.put(EDITROLE.getKey(), EDITROLE.getValue()); enumDataMap.put(MODIFYROLE.getKey(), MODIFYROLE.getValue()); enumDataMap.put(ROLEAUTHORITYLIST.getKey(), ROLEAUTHORITYLIST.getValue()); enumDataMap.put(MODIFYROLEAUTHORITY.getKey(), MODIFYROLEAUTHORITY.getValue()); enumDataMap.put(EDITPASSWORD.getKey(), EDITPASSWORD.getValue()); enumDataMap.put(MODIFYUSERPASSWORD.getKey(), MODIFYUSERPASSWORD.getValue()); enumDataMap.put(EDITCURUSER.getKey(), EDITCURUSER.getValue()); enumDataMap.put(MODIFYCURUSER.getKey(), MODIFYCURUSER.getValue()); enumDataMap.put(ADDATTR.getKey(), ADDATTR.getValue()); enumDataMap.put(ADDA.getKey(), ADDA.getValue()); enumDataMap.put(EDITA.getKey(), EDITA.getValue()); enumDataMap.put(EA.getKey(), EA.getValue()); enumDataMap.put(RA.getKey(), RA.getValue()); enumDataMap.put(BATCHDEL.getKey(), BATCHDEL.getValue()); enumDataMap.put(MODIFY.getKey(), MODIFY.getValue()); enumDataMap.put(REMOVEC.getKey(), REMOVEC.getValue()); enumDataMap.put(ADDCAT.getKey(), ADDCAT.getValue()); enumDataMap.put(ADDC.getKey(), ADDC.getValue()); enumDataMap.put(ADDCA.getKey(), ADDCA.getValue()); enumDataMap.put(PUBLISH.getKey(), PUBLISH.getValue()); enumDataMap.put(CREATEGOODSINSTANCEDATA.getKey(), CREATEGOODSINSTANCEDATA.getValue()); enumDataMap.put(DP.getKey(), DP.getValue()); enumDataMap.put(DOAGENT.getKey(), DOAGENT.getValue()); enumDataMap.put(DODISAGENT.getKey(), DODISAGENT.getValue()); enumDataMap.put(BATCHGOODS.getKey(), BATCHGOODS.getValue()); enumDataMap.put(DOBATCHPUBLIS.getKey(), DOBATCHPUBLIS.getValue()); enumDataMap.put(EDITG.getKey(), EDITG.getValue()); enumDataMap.put(DOEG.getKey(), DOEG.getValue()); enumDataMap.put(DELISTINGGB.getKey(), DELISTINGGB.getValue()); enumDataMap.put(DELISTING.getKey(), DELISTING.getValue()); enumDataMap.put(DELETEG.getKey(), DELETEG.getValue()); enumDataMap.put(CUTPRICE.getKey(), CUTPRICE.getValue()); enumDataMap.put(DOAGENTGOODS.getKey(), DOAGENTGOODS.getValue()); enumDataMap.put(DOCANELAGENTGOODS.getKey(), DOCANELAGENTGOODS.getValue()); enumDataMap.put(DECUTPRICE.getKey(), DECUTPRICE.getValue()); enumDataMap.put(CUTPRICEGOODS.getKey(), CUTPRICEGOODS.getValue()); enumDataMap.put(CANELCUTPRICEGOODS.getKey(), CANELCUTPRICEGOODS.getValue()); enumDataMap.put(DOACTIVITYGOODS.getKey(), DOACTIVITYGOODS.getValue()); enumDataMap.put(UPDATEPROMATION.getKey(), UPDATEPROMATION.getValue()); enumDataMap.put(ADDPRO.getKey(), ADDPRO.getValue()); enumDataMap.put(PROMATION.getKey(), PROMATION.getValue()); enumDataMap.put(ADDFULLGIVE.getKey(), ADDFULLGIVE.getValue()); enumDataMap.put(UPDATEFULLREDUCE.getKey(), UPDATEFULLREDUCE.getValue()); enumDataMap.put(UPDATEFULLGIVE.getKey(), UPDATEFULLGIVE.getValue()); enumDataMap.put(PORTSALE.getKey(), PORTSALE.getValue()); enumDataMap.put(ADDSALE.getKey(), ADDSALE.getValue()); enumDataMap.put(ADDSALEGOODS.getKey(), ADDSALEGOODS.getValue()); enumDataMap.put(UPDATEPSP.getKey(), UPDATEPSP.getValue()); enumDataMap.put(UPDATESALE.getKey(), UPDATESALE.getValue()); enumDataMap.put(ADDGIFT.getKey(), ADDGIFT.getValue()); enumDataMap.put(UPDATEGB.getKey(), UPDATEGB.getValue()); enumDataMap.put(UPDATEGIFT.getKey(), UPDATEGIFT.getValue()); enumDataMap.put(CREATEINSTANCE.getKey(), CREATEINSTANCE.getValue()); enumDataMap.put(UPDATEINSTANCE.getKey(), UPDATEINSTANCE.getValue()); enumDataMap.put(UPDATEINSTANCELOCATION.getKey(), UPDATEINSTANCELOCATION.getValue()); enumDataMap.put(UPDATEINSTANCESUPPLIER.getKey(), UPDATEINSTANCESUPPLIER.getValue()); enumDataMap.put(REMOVEINSTANCESUPPLIER.getKey(), REMOVEINSTANCESUPPLIER.getValue()); enumDataMap.put(ADDINSTANCESUPPLIER.getKey(), ADDINSTANCESUPPLIER.getValue()); enumDataMap.put(CREATEINSTANCESUPPLIER.getKey(), CREATEINSTANCESUPPLIER.getValue()); enumDataMap.put(ADDSUP.getKey(), ADDSUP.getValue()); enumDataMap.put(DISABLE.getKey(), DISABLE.getValue()); enumDataMap.put(ENABLE.getKey(), ENABLE.getValue()); enumDataMap.put(DELSUPPLIERGOODS.getKey(), DELSUPPLIERGOODS.getValue()); enumDataMap.put(EDITSUP.getKey(), EDITSUP.getValue()); enumDataMap.put(ADDSUPGOODS.getKey(), ADDSUPGOODS.getValue()); enumDataMap.put(ADDDAMAGED.getKey(), ADDDAMAGED.getValue()); enumDataMap.put(ADDDAMAGEDGOODS.getKey(), ADDDAMAGEDGOODS.getValue()); enumDataMap.put(EDITDAMAGED.getKey(), EDITDAMAGED.getValue()); enumDataMap.put(EDITDAMAGEDATTRIBUTE.getKey(), EDITDAMAGEDATTRIBUTE.getValue()); enumDataMap.put(DELETEDAMAGEDGOODS.getKey(), DELETEDAMAGEDGOODS.getValue()); enumDataMap.put(ADDDEPOSITORY.getKey(), ADDDEPOSITORY.getValue()); enumDataMap.put(EDITDEPOSITORY.getKey(), EDITDEPOSITORY.getValue()); enumDataMap.put(ADDDEPLOCATION.getKey(), ADDDEPLOCATION.getValue()); enumDataMap.put(EDITDEPLOCATION.getKey(), EDITDEPLOCATION.getValue()); enumDataMap.put(STOCKADD.getKey(), STOCKADD.getValue()); enumDataMap.put(ADDSTOCKGOODS.getKey(), ADDSTOCKGOODS.getValue()); enumDataMap.put(REFUND.getKey(), REFUND.getValue()); enumDataMap.put(STOCKEDIT.getKey(), STOCKEDIT.getValue()); enumDataMap.put(EDITSTOCKATTRIBUTE.getKey(), EDITSTOCKATTRIBUTE.getValue()); enumDataMap.put(STOCKDELETE.getKey(), STOCKDELETE.getValue()); enumDataMap.put(CHECKSTOK.getKey(), CHECKSTOK.getValue()); enumDataMap.put(COPYADD.getKey(), COPYADD.getValue()); enumDataMap.put(ADDSREFUND.getKey(), ADDSREFUND.getValue()); enumDataMap.put(ADDOUTDEP.getKey(), ADDOUTDEP.getValue()); enumDataMap.put(INDEPOSITORYOPT.getKey(), INDEPOSITORYOPT.getValue()); enumDataMap.put(GATHEROUTDEPOSITORY.getKey(), GATHEROUTDEPOSITORY.getValue()); enumDataMap.put(REFUNDSTORAGES.getKey(), REFUNDSTORAGES.getValue()); enumDataMap.put(RETURNSTOCK.getKey(), RETURNSTOCK.getValue()); enumDataMap.put(MOVELOGRETURN.getKey(), MOVELOGRETURN.getValue()); enumDataMap.put(RETURNONESTOCK.getKey(), RETURNONESTOCK.getValue()); enumDataMap.put(ADDSTORCHECK.getKey(), ADDSTORCHECK.getValue()); enumDataMap.put(UPDATESTORAGE.getKey(), UPDATESTORAGE.getValue()); enumDataMap.put(FINISHSTORECHECK.getKey(), FINISHSTORECHECK.getValue()); enumDataMap.put(IMPORTSUPPLIERGOODS.getKey(), IMPORTSUPPLIERGOODS.getValue()); enumDataMap.put(BATCHMODIFYEXPRESSDIST.getKey(), BATCHMODIFYEXPRESSDIST.getValue()); enumDataMap.put(ADDN.getKey(), ADDN.getValue()); enumDataMap.put(DELETEN.getKey(), DELETEN.getValue()); enumDataMap.put(UPDATEN.getKey(), UPDATEN.getValue()); enumDataMap.put(DELETEADMINWEBSITE.getKey(), DELETEADMINWEBSITE.getValue()); enumDataMap.put(UPDATEADMINWEBSITE.getKey(), UPDATEADMINWEBSITE.getValue()); enumDataMap.put(SAVEWEBSITE.getKey(), SAVEWEBSITE.getValue()); enumDataMap.put(DELETEAD.getKey(), DELETEAD.getValue()); enumDataMap.put(ADDAD.getKey(), ADDAD.getValue()); enumDataMap.put(UPDATEAD.getKey(), UPDATEAD.getValue()); enumDataMap.put(DELETEADP.getKey(), DELETEADP.getValue()); enumDataMap.put(ADDFL.getKey(), ADDFL.getValue()); enumDataMap.put(UPDATEFL.getKey(), UPDATEFL.getValue()); enumDataMap.put(DELETEKW.getKey(), DELETEKW.getValue()); enumDataMap.put(ADDKW.getKey(), ADDKW.getValue()); enumDataMap.put(UPDATEKW.getKey(), UPDATEKW.getValue()); enumDataMap.put(DELETESC.getKey(), DELETESC.getValue()); enumDataMap.put(DELETEBR.getKey(), DELETEBR.getValue()); enumDataMap.put(ADDBR.getKey(), ADDBR.getValue()); enumDataMap.put(ADDAR.getKey(), ADDAR.getValue()); enumDataMap.put(DELETEAR.getKey(), DELETEAR.getValue()); enumDataMap.put(TOP.getKey(), TOP.getValue()); enumDataMap.put(USHOW.getKey(), USHOW.getValue()); enumDataMap.put(UPDATEAR.getKey(), UPDATEAR.getValue()); enumDataMap.put(ADDNAV.getKey(), ADDNAV.getValue()); enumDataMap.put(UPDATENAV.getKey(), UPDATENAV.getValue()); enumDataMap.put(SBARD.getKey(), SBARD.getValue()); enumDataMap.put(INSERTACTIVITY.getKey(), INSERTACTIVITY.getValue()); enumDataMap.put(UPDATEACTITY.getKey(), UPDATEACTITY.getValue()); enumDataMap.put(ADDTRADE.getKey(), ADDTRADE.getValue()); enumDataMap.put(CHANGE.getKey(), CHANGE.getValue()); enumDataMap.put(REFUNDGOODS.getKey(), REFUNDGOODS.getValue()); enumDataMap.put(REFUSEREFUNDGOODS.getKey(), REFUSEREFUNDGOODS.getValue()); enumDataMap.put(AGREEREFUNDGOODS.getKey(), AGREEREFUNDGOODS.getValue()); enumDataMap.put(SENDFB.getKey(), SENDFB.getValue()); enumDataMap.put(CONREFUND.getKey(), CONREFUND.getValue()); enumDataMap.put(REFCHA.getKey(), REFCHA.getValue()); enumDataMap.put(CONGOO.getKey(), CONGOO.getValue()); enumDataMap.put(REPLYCOMM.getKey(), REPLYCOMM.getValue()); enumDataMap.put(REPLYFB.getKey(), REPLYFB.getValue()); enumDataMap.put(REGUSERS.getKey(), REGUSERS.getValue()); enumDataMap.put(ANA.getKey(), ANA.getValue()); enumDataMap.put(EDITAP.getKey(), EDITAP.getValue()); enumDataMap.put(LISTING.getKey(), LISTING.getValue()); enumDataMap.put(LISTINGGB.getKey(), LISTINGGB.getValue()); enumDataMap.put(FINANCEOUTDEPOSITORYCONFIRM.getKey(), FINANCEOUTDEPOSITORYCONFIRM.getValue()); enumDataMap.put(FINANCEINDEPOSITORYCONFIRM.getKey(), FINANCEINDEPOSITORYCONFIRM.getValue()); enumDataMap.put(EDITFINANCESTATUS.getKey(), EDITFINANCESTATUS.getValue()); return enumDataMap; } private static Map<String,EnumAdminLog> logmap = new HashMap<String, EnumAdminLog>(); static { for (EnumAdminLog enumAdminLog : EnumAdminLog.values()) { logmap.put(enumAdminLog.getKey(), enumAdminLog); } } public static EnumAdminLog findLog(String key) { return logmap.get(key); }; }
[ "919965842@qq.com" ]
919965842@qq.com
c7a26727234d13e4fc71a3027e457a8a663049ab
2985684ede60ef733ebd85e3389bef0f4fb94684
/app/src/main/java/com/example/pwd61/analysis/MyActivity.java
aae63a08cf1086f2f5bad10573911ec9dcfac329
[]
no_license
CrackerCat/Analysis
7c952d7babfad9d31f5466d41575582bb576d189
6eb65d1307990b2eef17aa11c45d6ce9c0b66569
refs/heads/master
2023-03-16T14:43:22.916312
2020-04-12T08:19:35
2020-04-12T08:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
19,161
java
package com.example.pwd61.analysis; import android.content.Intent; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import com.example.pwd61.analysis.Detour.verfiy.ByteUtil; import com.example.pwd61.analysis.Utils.FileUtils; import com.example.pwd61.analysis.Utils.injectJNI; import com.example.pwd61.analysis.Utils.utils; import com.example.pwd61.analysis.app.Yeecall; import com.example.pwd61.analysis.app.cmb.AesUtils; import com.example.pwd61.analysis.app.cmb.PBRsa; import com.example.pwd61.analysis.app.eleme.xdeviceinfo; import com.example.pwd61.analysis.app.yeecall.CipherProtocol; import com.example.pwd61.analysis.app.yeecall.HashUtils; import com.android.tencent.qq.qq.Utils; import com.example.pwd61.analysis.app.yeecall.IKeyValueStorage; import com.example.pwd61.analysis.app.yeecall.PreferencesImpl; import com.example.pwd61.analysis.app.yeecall.ZayhuPref; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.security.KeyStore; import java.text.SimpleDateFormat; import java.util.Date; import javax.net.ssl.KeyManagerFactory; import cmb.pb.shield.whitebox.EncryptUtil; import static com.example.pwd61.analysis.Utils.utils.Logd; import static javax.crypto.Cipher.DECRYPT_MODE; import static javax.crypto.Cipher.ENCRYPT_MODE; public class MyActivity extends AppCompatActivity implements View.OnClickListener { private String TAG = "HACK"; Button ctf; Button cmb; ScrollView scrollView; LinearLayout ll_content; Uri uri = Uri.parse("content://hb.android.contentProvider/teacher"); @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); scrollView = (ScrollView) findViewById(R.id.logtxt); ll_content = (LinearLayout) findViewById(R.id.ll_content); Button yeecal = findViewById(R.id.yeecall); Button tst1 = findViewById(R.id.Test1); Button tst2 = findViewById(R.id.Test2); ctf = (Button) findViewById(R.id.ctf); cmb = (Button) findViewById(R.id.cmb); yeecal.setOnClickListener(this); tst2.setOnClickListener(this); tst1.setOnClickListener(this); ctf.setOnClickListener(this); cmb.setOnClickListener(this); copyAssets(); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.yeecall: /**** 解密yc_c.sp ****/ String data = "a834d1d61d7b2c9d7072adb704dab86010712b5b9a731ec5d2ed7ea2bd61832c4f085c51b6fcd948adde96f0067fc06d672acedc3d72f2db155455bd4cdef73e"; String SS = HashUtils.SHA1(data); addit("yee", SS); addit("tyee", CipherProtocol.a("c_db_kvs_xxxxxslat")); IKeyValueStorage IKS = ZayhuPref.a(getApplicationContext(), "c_db_kvs_xxxxx", 5); String dbName = "yeecall.sp"; String STR = dbName + "tcfb3352c2df335696c6bc631932c6a61a4cdf318"; String dbNameEnc = CipherProtocol.a(STR); Logd("数据库名字:" + dbName + ",enc: " + dbNameEnc); String stringBuilder2 = dbNameEnc + "t72f283666ae9a3482660515b0f9acebeaff91e04"; String columnsID = CipherProtocol.a(stringBuilder2); Logd("加密列:" + columnsID); Logd("test :" + PreferencesImpl.b("1".toCharArray())); Logd("test1 :" + PreferencesImpl.b("1234".toCharArray())); Yeecall.getKey(getApplicationContext()); HttpURLConnection con; // con.setRequestProperty("",""); break; case R.id.Test1: Log.d(TAG, "测试1"); Log.d(TAG, "CALL ELE"); addit("[+]", injectJNI.inject_Jni_Onload()); java.lang.String[] sneer = xdeviceinfo.sneer(getApplicationContext(), "4f93e640-5c6f-4980-bd3d-c1256672a64d", "/eus/login/mobile_send_code{\"mobile\":\"13228093363\",\"latitude\":23.125265,\"longitude\":113.38116,\"via_audio\":false}", "a"); for (int i = 0; i < sneer.length; i++) { Log.d(TAG, "sneer[" + i + "]->:" + sneer[i]); } String b = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAYAEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD03Xdams7vyYZxHjG4t0XNWNMm1WO5L6jJH9kKgK2R94nj86z3tbO318wzF5YliOVkJkZh6Enk8dzyfc1qxa3ocloIvPiSJRs8qQbdoHGCD0oL66lvVbwWlg7qTvYbUx1yaj0MubDMspkm3HeScnNQS3lpeahbRR3URjRfM+8DkdqNFuIALvM0Y/ft/EKOo+pFrkzyXtpaQgLKG8xJD1Q4IyD9CR9CR3qfRL6a4E0ExLvC2DJn71UNdnt5b2GOKRBc9VcMMAe9VdK8T6TZb4JpkDqSDInzB6L6ivZnXs6oMsQB71z9nPc3WtyiO7fylIbaeQR6Yplwx1bWYomci32B1XBBOfUVJp0Edp4iuYkOFKDAJoHe4/WdKnmuoryywJ161NplndMHfUY4mLdF2jIoop2Cwk/hfR5x/wAeUaH1QYrM0rwtYRajcsYEkiQ7Nrdj1/rRRSsg5UTaj4YtBPHc2djAzLndGw4aq2h2LprTeZZrANmdhTHHt7UUUWQuVXH61HPba5DcxLJg4C7P4j0x71bsNNuJtS+3XiEHAZQTgqaKKLajtqf/2Q=="; byte[] decode = android.util.Base64.decode(b, 0); Logd("sss:" + decode.length); saveImageToGallery(android.graphics.BitmapFactory.decodeByteArray(decode, 0, decode.length)); break; case R.id.Test2: Log.d(TAG, "测试2"); Log.d(TAG, "免密提取8.0"); addit("Doge", jiemi(ReadUserInfo())); addit("doge2", jiemi("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7")); addit("pin", new String(ByteUtil.parseHexStr2Byte("616c696b6169353230"))); addit("pin", new String(ByteUtil.parseHexStr2Byte("313136393436363237326c696b756e"))); addit("unencr", new String(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7"))); addit("unencr", Integer.toString(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7").length)); addit("unencr", Integer.toString("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7".length())); addit("cq", bytesToHexString(unencry("D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7"))); break; case R.id.ctf: Log.d(TAG, "ctf"); addit("ctf", !Utils.cec("10864017", "1234") ? "succ" : "failed!"); addit("[+]", EncryptUtil.decryptcbc("z/GU3NDcvTToe21svo0+KQ==")); break; case R.id.cmb: Log.d(TAG, "cmb"); //utils.Logd(Utils.cec("10864017","1234")==false?"succ":"failed!"); addit(" [+]", EncryptUtil.decryptcbc("z/GU3NDcvTToe21svo0+KQ==")); addit(" [+]", EncryptUtil.decryptcbc("K3WIX19CZEQ2IDhSjmUClQ==")); addit("shijiea ", PBRsa.a("WcXqq0aNxzVLVxKi")); addit("shijiea ", PBRsa.a("QhVi0qpMKXJ3P3M5")); addit("aes", AesUtils.encrypt("<PostData><DeviceType>E</DeviceType><Version>7.2.0</Version><SystemVersion>9</SystemVersion><ExtraFormat>PNG</ExtraFormat><AppID>0029000000020190903013227020000000000q5Tr3xiEc3AUByxNbqrru3t9d0=</AppID><ClientCRC>2CEDD161</ClientCRC><InnerID>00290000000190903013227358326090314912020000000000217381Y0E=</InnerID><IsRunningInEmulator>false</IsRunningInEmulator><ObtainChannel>CMB_ANDROID</ObtainChannel></PostData>")); addit("Algorithm", KeyManagerFactory.getDefaultAlgorithm()); addit(" [+]", EncryptUtil.decryptcbc("eiUgfxeIByTNOMe+JoLO5A==")); addit(" [+]", EncryptUtil.decryptcbc("ZRFptM5TDbqdRZsSB9N2Kw==")); try { KeyStore c = java.security.KeyStore.getInstance(java.security.KeyStore.getDefaultType()); } catch (Exception e) { e.printStackTrace(); } break; default: Log.d(TAG, "onClick: "); } } private void addit(String tag, String str) { Logd("addit:" + str); //创建TextView TextView textView = new TextView(MyActivity.this); textView.setTextColor(Color.RED); //设置显示内容 textView.setText(tag + ":" + str); textView.setEnabled(true); //添加到LinearLayout中 ll_content.addView(textView); scrollView.post(new Runnable() { @Override public void run() { //scrollView.fullScroll(ScrollView.FOCUS_DOWN); scrollView.pageScroll(ScrollView.FOCUS_DOWN); } }); } private void copyAssets() { AssetManager assetManager = getAssets(); String[] files = null; try { files = assetManager.list(""); } catch (IOException e) { Log.e("tag", "Failed to get asset file list.", e); } if (files != null) for (String filename : files) { InputStream in = null; OutputStream out = null; if (filename.contains("yeecall")) { try { in = assetManager.open(filename); File outFile = new File(getExternalFilesDir(null), filename); out = new FileOutputStream(outFile); copyFile(in, out); } catch (IOException e) { Log.e("tag", "Failed to copy asset file: " + filename + e.getMessage()); } finally { if (in != null) { try { in.close(); } catch (IOException e) { // NOOP } } if (out != null) { try { out.close(); } catch (IOException e) { // NOOP } } } } } } private void copyFile(InputStream in, OutputStream out) throws IOException { byte[] buffer = new byte[1024]; int read; while ((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } } private String ReadUserInfo() { // FileUtils.readFileFromSDCard("/sdcard/") // return "5866D577AC37B6B69033D9F915127CA15909CE8C449628484D87E00A57763824B0D86827AB6FAD64E154C50A4EF3F4A6400AFBE3594018FC492EC23FA822370BF8D48663913BA5408D89D101B06885E8F61A70A9806A8BB1514E49DACA20DF4687AE3BA5A0761646FBEB4E34F6D567F483309A90FC288DE3BC9F91206947187419BB7C4A13CFF802DDC2C2BFB6DFF40B3B18DD401D87F444D6B1212836C21709E2D1E9DAC79DD6BB0A351DD0B51CFE20075CF9603972722E3674C11C42E15926D477D4864F54F6E2A2AE24CF0CFB441FF367B343E675C53DACC4105A33E3C8C34DC7DCE5A6A060810727C00625A6D26F15262921FBA4A6AC9BBFF8944BE955E8324E03D20709E1D869A1B9D416F498EB4C2F2E8BD77BAAD42F21887FD73D8F5591440BF8355C07C0F0BFE74D4042D904"; // return "D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC53007889249D691E7011503BD1688DB6D0D38FB74F25F1579E0A6584E1E878E8A0CFEF99F0C6BF55B528EAEA49A99C4D5A46DBFF483988CFBDA0D3592E238D0B84CEBAF0B83A05F07127048338E7220ECF96C6ADC7E5F468FEBB9A2C53F573F507DF1FD42C3E902718F2E3FC1208159DD75BE2DA94A2BBCBBE9C1FA603B35FF774E6A79B4C8A4DDCA54020EC65A1AAB99144D51F842BDDBF772FE0673C704BDE5710E35D41541A1CD132DB4D742DDB40F5516DACFCBF978C00F3BC39CAF3A4353DA2C1DBE7CB43DA4E0000B9277E428D40C692A5CB7739DCBED473858556146FFF92C7"; return "D68DBFF8A8E300A855F10E79F79777B8BA5F46DC38646BD2FE0762B9AC530078B74EF0E2AE183832D4B05D15455CE3AEE61ED0204E4EC4DF613910C69ED0F1701DCD095DD14A4210D4440A390D1EB8CFBCE779D3F6EB1EF0C0056030C9DF0C6D587E67ADD847C1E42A91AADAE8B02D81DC0C4A3AB789C97ACCA2EBA0F5923EB38987DFC6A4984AB8499CCF1BC550FB9B88962B7E97A8FAC391DA79578B024F0FD0D3C2FCDFF71CF3BC91E2509153F20843E19F72D63AE0A2193ED3CE7E2414B4FDB382B9CE41D1781755F422B9CB7020ED2737992F30F4A5D480F2EA5121FFFAC075AC01A42352A117FF62973140A446"; } private String jiemi(String str) { try { return aesUnEnc("@w#a$q&ejuak", unencry(str)); } catch (Throwable tb) { tb.printStackTrace(); } return ""; } public final byte[] unencry(java.lang.String str) { int length = str.length() / 2; byte[] bArr = new byte[length]; for (int i = 0; i < length; i++) { bArr[i] = java.lang.Integer.valueOf(str.substring(i * 2, (i * 2) + 2), 16).byteValue(); } return bArr; } private static byte[] initkey(java.lang.String str) throws java.lang.Exception { return new javax.crypto.spec.SecretKeySpec(javax.crypto.SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1").generateSecret( new javax.crypto.spec.PBEKeySpec(str.toCharArray(), "!q@w#e$r%t^y#n@v".getBytes(), 10, 128)).getEncoded(), "AES").getEncoded(); } static java.lang.String aesUnEnc(String str, byte[] bArr) throws java.lang.Throwable { javax.crypto.spec.SecretKeySpec secretKeySpec = new javax.crypto.spec.SecretKeySpec(initkey(str), "AES"); javax.crypto.Cipher instance = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding"); instance.init(DECRYPT_MODE, secretKeySpec, new javax.crypto.spec.IvParameterSpec("1653678145712191".getBytes())); return new java.lang.String(instance.doFinal(bArr)); } public int saveImageToGallery(Bitmap bmp) { //生成路径 String root = Environment.getExternalStorageDirectory().getAbsolutePath(); String dirName = "fuck"; File appDir = new File(root, dirName); if (!appDir.exists()) { appDir.mkdirs(); } //文件名为时间 long timeStamp = System.currentTimeMillis(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String sd = sdf.format(new Date(timeStamp)); String fileName = sd + ".jpg"; //获取文件 File file = new File(appDir, fileName); FileOutputStream fos = null; try { fos = new FileOutputStream(file); bmp.compress(Bitmap.CompressFormat.JPEG, 100, fos); fos.flush(); //通知系统相册刷新 // ImageActivity.this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, // Uri.fromFile(new File(file.getPath())))); return 2; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { try { if (fos != null) { fos.close(); } } catch (IOException e) { e.printStackTrace(); } } return -1; } /* *Convert byte[] to hex string.这里我们可以将byte转换成int,然后利用Integer.toHexString(int)来转换成16进制字符串。 * @param src byte[] data *@return hex string */ public static String bytesToHexString(byte[] src) { StringBuilder stringBuilder = new StringBuilder(""); if (src == null || src.length <= 0) { return null; } for (int i = 0; i < src.length; i++) { int v = src[i] & 0xFF; String hv = Integer.toHexString(v); if (hv.length() < 2) { stringBuilder.append(0); } stringBuilder.append(hv); } return stringBuilder.toString(); } }
[ "alikai812@qq.com" ]
alikai812@qq.com
0029666ace7a568cac4cb9afe9fab3ecbe8b5f22
3244a124d582624b8873a2a808428eef856ea2cc
/src/org/prasanna/test/Registertestfact.java
9f794ecef6797b4a992d9cdfca797eb887824b3b
[]
no_license
Prasannapujar/samplepageobject
bc95f167659fb360a483e9b428d6707e8df9826d
b71cab997f437ece57a8c96fa0167121b7574704
refs/heads/master
2021-01-01T05:51:40.265923
2015-04-08T18:27:20
2015-04-08T18:27:20
33,500,723
0
0
null
null
null
null
UTF-8
Java
false
false
895
java
package org.prasanna.test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; import org.prasanna.data.Regdata; import org.prasanna.pages.Registerpagefact; import org.testng.Assert; import org.testng.annotations.Test; public class Registertestfact extends Selbasetest { @Test public void testregister() { Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class); p.regsiter1(); Assert.fail(); } @Test(dataProvider="regdata",dataProviderClass=Regdata.class) public void testwithdataprovider(Regdata d1) { Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class); p.regsiter1withdata(d1); } @Test(dataProvider="readcsv",dataProviderClass=Regdata.class) public void testwithcsvcreated(Regdata d1) { Registerpagefact p=PageFactory.initElements(d, Registerpagefact.class); p.regsiter1withdata(d1); } }
[ "prasanna4jk@gmail.com" ]
prasanna4jk@gmail.com
8b582ab9fcc4f458e57446403345b88b8bb000bd
dea92fc41db6a97d8cb32b266c399edd3a61989f
/source/org.strategoxt.imp.spoofax.generator/src-gen/org/strategoxt/imp/spoofax/generator/lifted9438.java
59f668ba5db73b3c8c6ee2b842182ada2c801422
[]
no_license
adilakhter/spoofaxlang
19170765e690477a79069e05fd473f521d1d1ddc
27515280879cc108a3cf2108df00760b6d39e15e
refs/heads/master
2020-03-17T01:15:18.833754
2015-01-22T07:12:05
2015-01-22T07:12:05
133,145,594
1
0
null
null
null
null
UTF-8
Java
false
false
1,105
java
package org.strategoxt.imp.spoofax.generator; import org.strategoxt.stratego_lib.*; import org.strategoxt.stratego_lib.*; import org.strategoxt.stratego_sglr.*; import org.strategoxt.stratego_gpp.*; import org.strategoxt.stratego_xtc.*; import org.strategoxt.stratego_aterm.*; import org.strategoxt.stratego_rtg.*; import org.strategoxt.stratego_sdf.*; import org.strategoxt.stratego_tool_doc.*; import org.strategoxt.java_front.*; import org.strategoxt.lang.*; import org.spoofax.interpreter.terms.*; import static org.strategoxt.lang.Term.*; import org.spoofax.interpreter.library.AbstractPrimitive; import java.util.ArrayList; import java.lang.ref.WeakReference; @SuppressWarnings("all") final class lifted9438 extends Strategy { TermReference w_4320; @Override public IStrategoTerm invoke(Context context, IStrategoTerm term) { Fail28641: { if(w_4320.value == null) break Fail28641; term = set_verbosity_0_0.instance.invoke(context, w_4320.value); if(term == null) break Fail28641; if(true) return term; } return null; } }
[ "md.adilakhter@gmail.com" ]
md.adilakhter@gmail.com
ffccc9544f03837aa5fb653850aa28167c60d1fb
e37b1b48e224d9da000bf4c68cd103c2afe3fca1
/src/factoryPattern/multiFactory/FactoryTestMulti.java
5ed8e8ba7c42cbb52d99040a097e9ed0a5e7c6ec
[]
no_license
yuanqin-deng/DesignPatternTest
5137ea680414a0b12ffaf710085288d02e459ceb
32755f94051a0d417108950c93d907739f875cae
refs/heads/master
2021-06-01T08:34:24.672075
2016-06-23T09:58:39
2016-06-23T09:58:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package factoryPattern.multiFactory; /** * Created by DengYuanqin on 6/20/2016. */ public class FactoryTestMulti { public static void main(String[] args){ SendMultiFactory sendMultiFactory = new SendMultiFactory(); sendMultiFactory.sendSms(); sendMultiFactory.sendMail(); } }
[ "dengyuanqin@gmail.com" ]
dengyuanqin@gmail.com
521efe0f661af59da7d4592dc0791b67525f26ed
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/769cd811312cbbb82c87033a78ac9584ad282550bcb9cc3ae8c4e3da44c288c1a5b3954e01998c3c0654ee6774ceab66e9fe5b135750905c917d2b0bb5fab98b/004/mutations/33/smallest_769cd811_004.java
a69bc3fdddda33b08cc16789a59afd0e4a361a51
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,988
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_769cd811_004 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_769cd811_004 mainClass = new smallest_769cd811_004 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d = new IntObj (), x = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); a.value = scanner.nextInt (); b.value = scanner.nextInt (); c.value = scanner.nextInt (); d.value = scanner.nextInt (); if (a.value >= b.value) { x.value = b.value; } else { x.value = a.value; } if (b.value >= c.value) { x.value = c.value; } if (c.value >= d.value) { x.value = d.value; } output += (String.format ("%d is the smallest\n", d.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
1d37044b9f10cd19dc0b131f5fae99b813f6e3be
ad2bea6dbc9519552af2d5ef3f73c16e5ebf32d4
/src/com/cloverstudio/spika/couchdb/SpikaAsyncTask.java
c0990452f7b1ae82a49a0ffed98b923ed7cfeb0e
[ "MIT" ]
permissive
TTMTT/Spika-Android
abb15893e9d61815c0c7aea12cf37e73dff2ed8c
7b7b8e307c3c29b418b3faa82db4565a831252ed
refs/heads/master
2021-01-17T18:15:11.310209
2014-03-04T10:32:09
2014-03-04T10:32:09
17,983,947
2
0
null
null
null
null
UTF-8
Java
false
false
4,065
java
package com.cloverstudio.spika.couchdb; import java.io.IOException; import org.json.JSONException; import com.cloverstudio.spika.R; import com.cloverstudio.spika.SpikaApp; import com.cloverstudio.spika.dialog.HookUpDialog; import com.cloverstudio.spika.dialog.HookUpProgressDialog; import com.cloverstudio.spika.utils.Const; import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import android.util.Log; public class SpikaAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result>{ protected Command<Result> command; protected Context context; protected ResultListener<Result> resultListener; protected Exception exception; protected HookUpProgressDialog progressDialog; protected boolean showProgressBar = false; public SpikaAsyncTask(Command<Result> command, ResultListener<Result> resultListener, Context context, boolean showProgressBar) { super(); this.command = command; this.resultListener = resultListener; this.context = context; this.showProgressBar = showProgressBar; } // public SpikaAsyncTask(Command<Result> command, Context context, boolean showProgressBar) { // super(); // this.command = command; // this.context = context; // this.showProgressBar = showProgressBar; // } // // protected SpikaAsyncTask(Context context){ // super(); // this.context = context; // } @Override protected void onPreExecute() { if (SpikaApp.hasNetworkConnection()) { super.onPreExecute(); if (showProgressBar) { progressDialog = new HookUpProgressDialog(context); if (!((Activity)context).isFinishing()) progressDialog.show(); } } else { this.cancel(false); Log.e(Const.ERROR, Const.OFFLINE); final HookUpDialog dialog = new HookUpDialog(context); dialog.showOnlyOK(context.getString(R.string.no_internet_connection)); } } @Override protected Result doInBackground(Params... params) { Result result = null; try { result = (Result) command.execute(); } catch (JSONException e) { exception = e; e.printStackTrace(); } catch (IOException e) { exception = e; e.printStackTrace(); } catch (SpikaException e) { exception = e; e.printStackTrace(); } catch (NullPointerException e) { exception = e; e.printStackTrace(); } return result; } @Override protected void onPostExecute(Result result) { super.onPostExecute(result); // final HookUpDialog _dialog = new HookUpDialog(context); // Log.e("is this the way", "active:" + _dialog.getWindow().isActive()); if (showProgressBar) { if (!((Activity)context).isFinishing()) { if (progressDialog.isShowing()) progressDialog.dismiss(); } } if (exception != null) { String error = (exception.getMessage() != null) ? exception.getMessage() : context.getString(R.string.an_internal_error_has_occurred); Log.e(Const.ERROR, error); final HookUpDialog dialog = new HookUpDialog(context); String errorMessage = null; if (exception instanceof IOException){ errorMessage = context.getString(R.string.can_not_connect_to_server) + "\n" + exception.getClass().getName() + " " + error; }else if(exception instanceof JSONException){ errorMessage = context.getString(R.string.an_internal_error_has_occurred) + "\n" + exception.getClass().getName() + " " + error; }else if(exception instanceof NullPointerException){ errorMessage = context.getString(R.string.an_internal_error_has_occurred) + "\n" + exception.getClass().getName() + " " + error; }else if(exception instanceof SpikaException){ errorMessage = error; }else{ errorMessage = context.getString(R.string.an_internal_error_has_occurred) + "\n" + exception.getClass().getName() + " " + error; } if (context instanceof Activity) { if (!((Activity)context).isFinishing()) { dialog.showOnlyOK(errorMessage); } } if (resultListener != null) resultListener.onResultsFail(); } else { if (resultListener != null) resultListener.onResultsSucceded(result); } } }
[ "mislav.bagovic@clover-studio.com" ]
mislav.bagovic@clover-studio.com
d631513eaef568bc9f2c2997222f982d5c8304f5
08fbb0f523b2e868278c5e3a75f0e7134b74f710
/app/src/main/java/com/readboy/wearlauncher/utils/Utils.java
67e7582382af847c6e587449d372633d638ea8ad
[]
no_license
sengeiou/WearLauncherA2
515af1f9c34e56112f9c7a26427a067254226d95
05c711e0fe297c8f7433ec67c3f08ffb07d4ef09
refs/heads/master
2021-10-11T13:20:53.427361
2019-01-26T12:26:41
2019-01-26T12:27:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,828
java
package com.readboy.wearlauncher.utils; import android.annotation.TargetApi; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.ContextWrapper; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.Bitmap; import android.graphics.BlurMaskFilter; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.TransitionDrawable; import android.os.Build; import android.provider.Settings; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; import android.text.TextUtils; import android.util.Log; import android.view.WindowManager; import android.widget.ImageView; import android.widget.Toast; import com.readboy.wearlauncher.Launcher; import com.readboy.wearlauncher.LauncherApplication; import com.readboy.wearlauncher.R; import com.readboy.wearlauncher.dialog.ClassDisableDialog; import com.readboy.wearlauncher.view.DialBaseLayout; import java.util.Arrays; import java.util.Calendar; import java.util.List; import android.app.readboy.PersonalInfo; import android.app.readboy.ReadboyWearManager; import android.app.readboy.IReadboyWearListener; public class Utils { //Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; public static boolean isAirplaneModeOn(Context context) { return Settings.Global.getInt(context.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, 0) != 0; } public static void checkAndDealWithAirPlanMode(Context context){ if (!isAirplaneModeOn(context)) return; Intent intent = new Intent("com.readboy.settings.AirplaneModeReset"); context.startActivity(intent); } public static boolean isRadioAllowed(Context context, String type) { if (!Utils.isAirplaneModeOn(context)) { return true; } // Here we use the same logic in onCreate(). String toggleable = Settings.Global.getString(context.getContentResolver(), AIRPLANE_MODE_TOGGLEABLE_RADIOS); return toggleable != null && toggleable.contains(type); } public static Intent createExplicitFromImplicitIntent(Context context, Intent implicitIntent) { // Retrieve all services that can match the given intent PackageManager pm = context.getPackageManager(); List<ResolveInfo> resolveInfo = pm.queryIntentServices(implicitIntent, 0); // Make sure only one match was found if (resolveInfo == null || resolveInfo.size() != 1) { return null; } // Get component info and create ComponentName ResolveInfo serviceInfo = resolveInfo.get(0); String packageName = serviceInfo.serviceInfo.packageName; String className = serviceInfo.serviceInfo.name; ComponentName component = new ComponentName(packageName, className); // Create a new intent. Use the old one for extras and such reuse Intent explicitIntent = new Intent(implicitIntent); // Set the component to be explicit explicitIntent.setComponent(component); return explicitIntent; } public static int getScreenWidth(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Point p = new Point(); wm.getDefaultDisplay().getSize(p); return p.x; } @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) public static int getScreenHeight(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Point p = new Point(); wm.getDefaultDisplay().getSize(p); return p.y; } public static int dip2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue * scale + 0.5f); } public static int px2dip(Context context, float pxValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (pxValue / scale + 0.5f); } public static void startActivity(Context context, String pkg, String cls){ List<String> ableEnterList = Arrays.asList(context.getResources().getStringArray( R.array.ableEnterList)); /*boolean isEnable = ((LauncherApplication)LauncherApplication.getApplication()).getWatchController().isNowEnable();*/ ReadboyWearManager rwm = (ReadboyWearManager)context.getSystemService(Context.RBW_SERVICE); boolean isEnable = rwm.isClassForbidOpen(); if(isEnable && !ableEnterList.contains(pkg)){ ClassDisableDialog.showClassDisableDialog(context); checkAndDealWithAirPlanMode(context); return; } try { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); if(TextUtils.equals(DialBaseLayout.DIALER_PACKAGE_NAME,pkg) && ((LauncherApplication) LauncherApplication.getApplication()).getWatchController().getMissCallCountImmediately() > 0){ intent.setType(android.provider.CallLog.Calls.CONTENT_TYPE); intent.putExtra("index",2); } intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); intent.setClassName(pkg, cls); context.startActivity(intent); LauncherApplication.setTouchEnable(false); Log.d("TEST","start activity pkg:"+pkg+", cls:"+cls); }catch (Exception e){ e.printStackTrace(); Log.e("TEST","Can not find pkg:"+pkg+", cls:"+cls); Toast.makeText(context,"Can not find pkg:"+pkg+",\ncls:"+cls,Toast.LENGTH_SHORT).show(); } } private static Activity getActivity(Context context) { while (!(context instanceof Activity) && context instanceof ContextWrapper) { context = ((ContextWrapper) context).getBaseContext(); } if (context instanceof Activity) { return (Activity) context; }else { return null; } } public static boolean isFirstBoot(Context context){ if(Settings.System.getInt(context.getContentResolver(),"readboy_first_open",0) != 1){ return true; } return false; } public static void setFirstBoot(Context context, boolean firstBoot){ if(firstBoot){ Settings.System.putInt(context.getContentResolver(),"readboy_first_open",0); }else { Settings.System.putInt(context.getContentResolver(),"readboy_first_open",1); } } /** * 建议模糊度(在0.0到25.0之间) */ private static final int BLUR_RADIUS = 20; private static final int SCALED_WIDTH = 100; private static final int SCALED_HEIGHT = 100; /** * 得到模糊后的bitmap * thanks http://wl9739.github.io/2016/07/14/教你一分钟实现模糊效果/ * * @param context * @param bitmap * @param radius * @return */ public static Bitmap getBlurBitmap(Context context, Bitmap bitmap, int radius) { // 将缩小后的图片做为预渲染的图片。 Bitmap inputBitmap = Bitmap.createScaledBitmap(bitmap, SCALED_WIDTH, SCALED_HEIGHT, false); // 创建一张渲染后的输出图片。 Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap); // 创建RenderScript内核对象 RenderScript rs = RenderScript.create(context); // 创建一个模糊效果的RenderScript的工具对象 ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); // 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。 // 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。 Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap); Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap); // 设置渲染的模糊程度, 25f是最大模糊度 blurScript.setRadius(radius); // 设置blurScript对象的输入内存 blurScript.setInput(tmpIn); // 将输出数据保存到输出内存中 blurScript.forEach(tmpOut); // 将数据填充到Allocation中 tmpOut.copyTo(outputBitmap); return outputBitmap; } public static void startSwitchBackgroundAnim(ImageView view, Bitmap bitmap) { Drawable oldDrawable = view.getDrawable(); Drawable oldBitmapDrawable ; TransitionDrawable oldTransitionDrawable = null; if (oldDrawable instanceof TransitionDrawable) { oldTransitionDrawable = (TransitionDrawable) oldDrawable; oldBitmapDrawable = oldTransitionDrawable.findDrawableByLayerId(oldTransitionDrawable.getId(1)); } else if (oldDrawable instanceof BitmapDrawable) { oldBitmapDrawable = oldDrawable; } else { oldBitmapDrawable = new ColorDrawable(0xffc2c2c2); } if (oldTransitionDrawable == null) { oldTransitionDrawable = new TransitionDrawable(new Drawable[]{oldBitmapDrawable, new BitmapDrawable(bitmap)}); oldTransitionDrawable.setId(0, 0); oldTransitionDrawable.setId(1, 1); oldTransitionDrawable.setCrossFadeEnabled(true); view.setImageDrawable(oldTransitionDrawable); } else { oldTransitionDrawable.setDrawableByLayerId(oldTransitionDrawable.getId(0), oldBitmapDrawable); oldTransitionDrawable.setDrawableByLayerId(oldTransitionDrawable.getId(1), new BitmapDrawable(bitmap)); } oldTransitionDrawable.startTransition(1000); } /** 获取今天零时时间戳*/ public static long getTodayStartTime(){ Calendar calendar = Calendar.getInstance(); calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0); long dayStartTime = calendar.getTimeInMillis(); dayStartTime = dayStartTime - dayStartTime % 1000; return dayStartTime; } public static Drawable addShadow(Context context,Drawable src) { if (src == null ) { return src; } Bitmap b = drawableToBitmap(src); return new BitmapDrawable(context.getResources(), addShadow(b)); } public static Bitmap addShadow(Bitmap bitmap) { int shadowWidth = 10; int shadowHeight = 10; int width = bitmap.getWidth() + shadowWidth; int height = bitmap.getHeight() + shadowHeight; Rect dst = new Rect(0, 0, width, height); Rect src = new Rect(0, 0, width - shadowWidth, height - shadowHeight); Canvas canvas = new Canvas(); Paint paint = new Paint(); Paint blurPaint = new Paint(); BlurMaskFilter bf = new BlurMaskFilter(20, BlurMaskFilter.Blur.INNER); blurPaint.setColor(0xff000000); blurPaint.setMaskFilter(bf); Bitmap result = Bitmap.createBitmap(width, height,Bitmap.Config.ARGB_8888); canvas.setBitmap(result); canvas.drawBitmap(bitmap.extractAlpha(blurPaint, null), src, dst, blurPaint); canvas.drawBitmap(bitmap, shadowWidth / 2, shadowHeight / 2, paint); canvas.setBitmap(null); return result; } private static Bitmap drawableToBitmap(Drawable d) { if (d == null) return null; int width = d.getIntrinsicWidth(); int height = d.getIntrinsicHeight(); Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); Rect rect = new Rect(0, 0, width, height); Rect oldBound = d.copyBounds(); d.setBounds(rect); d.draw(canvas); d.setBounds(oldBound); canvas.setBitmap(null); return bitmap; } public static boolean isEmpty(CharSequence str){ if (str == null || str.length() == 0 || str.equals("null") || str.equals("NULL")) return true; else return false; } }
[ "lxx@readboy.com" ]
lxx@readboy.com
6c0bf02639a4015d41c6d80c9051e84073ec98bb
dcf0489d6ee91750d1d7696fc2cf2a049b524161
/nutella/src/main/java/endereco/Endereco.java
35826ceef8a517425a71853133cc9fdaeeaa35df
[]
no_license
biafernandesmaia/bia
5ff5c567e9a05cbff07502dfd7da14ebf7beb5a1
1076165680d642d9789e8c8eb620f81559a147c5
refs/heads/master
2021-06-20T11:43:59.194895
2017-08-04T12:18:41
2017-08-04T12:18:41
98,647,671
0
0
null
null
null
null
UTF-8
Java
false
false
398
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 endereco; /** * * @author aluno */ public class Endereco { private String Pais; private String Estado; private String Cidade; private String Rua; private String Complemento; }
[ "anabeatrizmaia46@gmail.com" ]
anabeatrizmaia46@gmail.com
ab2349df474f2ef01815faaae6755dc0ca96b927
7b13d893c1d27cbf2130219e894c009f54f5a761
/app/src/main/java/org/mixare/MixMap.java
6df30a80d70c4e30e346ae7570d1f7eda1571191
[]
no_license
radinaldn/arlacak-frontend
b0c79cfbea035642ab7fc784485a6531cbff4ecc
5806fa1e157d9e9e506daa5961e28ceeaa19853e
refs/heads/master
2021-09-17T22:15:02.692070
2018-07-05T23:04:34
2018-07-05T23:04:34
107,045,186
0
0
null
null
null
null
UTF-8
Java
false
false
9,279
java
package org.mixare; import java.util.ArrayList; import java.util.List; import org.inkubator.radinaldn.R; import org.mixare.data.DataHandler; import android.app.SearchManager; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.location.Location; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.view.ViewGroup.LayoutParams; import android.widget.TextView; import android.widget.Toast; import com.google.android.maps.GeoPoint; import com.google.android.maps.ItemizedOverlay; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import com.google.android.maps.OverlayItem; public class MixMap extends MapActivity implements OnTouchListener{ private static List<Overlay> mapOverlays; private Drawable drawable; private static ArrayList<Marker> markerList; private static DataView dataView; private static GeoPoint startPoint; private MixContext ctx; private MapView mapView; static MixMap map; private static Context thisContext; private static TextView searchNotificationTxt; public static ArrayList<Marker> originalMarkerList; @Override protected boolean isRouteDisplayed() { return false; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); dataView = MixView.dataView; ctx = dataView.getContext(); setMarkerList(dataView.getDataHandler().getMarkerList()); map = this; setMapContext(this); mapView= new MapView(this, "05j7Agbwq2a0NWfYkP_L15iXlOkhinUeIGEVwrA"); mapView.setBuiltInZoomControls(true); mapView.setClickable(true); mapView.setSatellite(true); mapView.setEnabled(true); this.setContentView(mapView); setStartPoint(); createOverlay(); if (dataView.isFrozen()){ searchNotificationTxt = new TextView(this); searchNotificationTxt.setWidth(MixView.dWindow.getWidth()); searchNotificationTxt.setPadding(10, 2, 0, 0); searchNotificationTxt.setText(getString(DataView.SEARCH_ACTIVE_1)+" "+ MixListView.getDataSource()+ getString(DataView.SEARCH_ACTIVE_2)); searchNotificationTxt.setBackgroundColor(Color.DKGRAY); searchNotificationTxt.setTextColor(Color.WHITE); searchNotificationTxt.setOnTouchListener(this); addContentView(searchNotificationTxt, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); } } public void setStartPoint() { Location location = ctx.getCurrentLocation(); MapController controller; double latitude = location.getLatitude()*1E6; double longitude = location.getLongitude()*1E6; controller = mapView.getController(); startPoint = new GeoPoint((int)latitude, (int)longitude); controller.setCenter(startPoint); controller.setZoom(14); } public void createOverlay(){ mapOverlays=mapView.getOverlays(); OverlayItem item; drawable = this.getResources().getDrawable(R.drawable.icon_map); MixOverlay mixOverlay = new MixOverlay(this, drawable); for (int i = 0; i < markerList.size(); i++) { GeoPoint point = new GeoPoint((int)(markerList.get(i).getLatitude()*1E6), (int)(markerList.get(i).getLongitude()*1E6)); item = new OverlayItem(point, "", ""); mixOverlay.addOverlay(item); mapOverlays.add(mixOverlay); } MixOverlay myOverlay; drawable = this.getResources().getDrawable(R.drawable.loc_icon); myOverlay = new MixOverlay(this, drawable); item = new OverlayItem(startPoint, "Your Position", ""); myOverlay.addOverlay(item); mapOverlays.add(myOverlay); } @Override public boolean onCreateOptionsMenu(Menu menu) { int base = Menu.FIRST; /*define the first*/ MenuItem item1 =menu.add(base, base, base, getString(DataView.MAP_MENU_NORMAL_MODE)); MenuItem item2 =menu.add(base, base+1, base+1, getString(DataView.MAP_MENU_SATELLITE_MODE)); MenuItem item3 =menu.add(base, base+2, base+2, getString(DataView.MAP_MY_LOCATION)); MenuItem item4 =menu.add(base, base+3, base+3, getString(DataView.MENU_ITEM_2)); MenuItem item5 =menu.add(base, base+4, base+4, getString(DataView.MENU_CAM_MODE)); /*assign icons to the menu items*/ item1.setIcon(android.R.drawable.ic_menu_gallery); item2.setIcon(android.R.drawable.ic_menu_mapmode); item3.setIcon(android.R.drawable.ic_menu_mylocation); item4.setIcon(android.R.drawable.ic_menu_view); item5.setIcon(android.R.drawable.ic_menu_camera); //adhastar added item1.setVisible(true); item2.setVisible(true); item3.setVisible(true); item4.setVisible(false); item5.setVisible(true); return true; } @Override public boolean onOptionsItemSelected(MenuItem item){ switch(item.getItemId()){ /*Satellite View*/ case 1: mapView.setSatellite(false); break; /*street View*/ case 2: mapView.setSatellite(true); break; /*go to users location*/ case 3: setStartPoint(); break; /*List View*/ case 4: createListView(); finish(); break; /*back to Camera View*/ case 5: finish(); break; } return true; } public void createListView(){ MixListView.setList(2); if (dataView.getDataHandler().getMarkerCount() > 0) { Intent intent1 = new Intent(MixMap.this, MixListView.class); startActivityForResult(intent1, 42); } /*if the list is empty*/ else{ Toast.makeText( this, DataView.EMPTY_LIST_STRING_ID, Toast.LENGTH_LONG ).show(); } } // public static ArrayList<Marker> getMarkerList(){ // return markerList; // } public void setMarkerList(ArrayList<Marker> maList){ markerList = maList; } public DataView getDataView(){ return dataView; } // public static void setDataView(DataView view){ // dataView= view; // } // public static void setMixContext(MixContext context){ // ctx= context; // } // // public static MixContext getMixContext(){ // return ctx; // } public List<Overlay> getMapOverlayList(){ return mapOverlays; } public void setMapContext(Context context){ thisContext= context; } public Context getMapContext(){ return thisContext; } public void startPointMsg(){ Toast.makeText(getMapContext(), DataView.MAP_CURRENT_LOCATION_CLICK, Toast.LENGTH_LONG).show(); } private void handleIntent(Intent intent) { if (Intent.ACTION_SEARCH.equals(intent.getAction())) { String query = intent.getStringExtra(SearchManager.QUERY); doMixSearch(query); } } @Override public void onNewIntent(Intent intent) { setIntent(intent); handleIntent(intent); } private void doMixSearch(String query) { DataHandler jLayer = dataView.getDataHandler(); if (!dataView.isFrozen()) { originalMarkerList = jLayer.getMarkerList(); MixListView.originalMarkerList = jLayer.getMarkerList(); } markerList = new ArrayList<Marker>(); for(int i = 0; i < jLayer.getMarkerCount(); i++) { Marker ma = jLayer.getMarker(i); if (ma.getTitle().toLowerCase().indexOf(query.toLowerCase())!=-1){ markerList.add(ma); } } if(markerList.size()==0){ Toast.makeText( this, getString(DataView.SEARCH_FAILED_NOTIFICATION), Toast.LENGTH_LONG ).show(); } else{ jLayer.setMarkerList(markerList); dataView.setFrozen(true); finish(); Intent intent1 = new Intent(this, MixMap.class); startActivityForResult(intent1, 42); } } @Override public boolean onTouch(View v, MotionEvent event) { dataView.setFrozen(false); dataView.getDataHandler().setMarkerList(originalMarkerList); searchNotificationTxt.setVisibility(View.INVISIBLE); searchNotificationTxt = null; finish(); Intent intent1 = new Intent(this, MixMap.class); startActivityForResult(intent1, 42); return false; } } class MixOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> overlayItems = new ArrayList<OverlayItem>(); private MixMap mixMap; public MixOverlay(MixMap mixMap, Drawable marker){ super (boundCenterBottom(marker)); this.mixMap = mixMap; } @Override protected OverlayItem createItem(int i) { return overlayItems.get(i); } @Override public int size() { return overlayItems.size(); } @Override protected boolean onTap(int index){ if (size() == 1) mixMap.startPointMsg(); else if (mixMap.getDataView().getDataHandler().getMarker(index).getURL() != null) { String url = mixMap.getDataView().getDataHandler().getMarker(index).getURL(); //Log.d("MapView", "opern url: "+url); try { if (url != null && url.startsWith("webpage")) { String newUrl = MixUtils.parseAction(url); mixMap.getDataView().getContext().loadWebPage(newUrl, mixMap.getMapContext()); } } catch (Exception e) { e.printStackTrace(); } } return true; } public void addOverlay(OverlayItem overlay) { overlayItems.add(overlay); populate(); } }
[ "radinal.dwiki.novendra@students.uin-suska.ac.id" ]
radinal.dwiki.novendra@students.uin-suska.ac.id
bd169c9284f8a6b745f76d8f3820ec81f4437c28
0a91e3ba61c210f929da28ecd2e12503a5d1a00e
/src/main/java/net/atos/start/student/entity/Student.java
2500e62aa6931d5a0ab7a8c7b7888528896f3c13
[]
no_license
Vertig00/Spring-project
f9a7877b7faaf2664c60c54ad7a0f1b9d634473c
b9852230e9ef9dd6770821f3272973027bc1d4b8
refs/heads/master
2020-09-24T20:45:56.875013
2016-10-03T14:00:36
2016-10-03T14:00:36
67,441,138
0
0
null
null
null
null
UTF-8
Java
false
false
4,239
java
package net.atos.start.student.entity; import org.hibernate.annotations.Type; import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.*; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * Created by lukasz on 25.07.16. */ @Entity(name = "Student") @Table(name = "student") @SequenceGenerator(name = "student_sequence", sequenceName = "student_sequence", allocationSize = 1) public class Student { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "student_sequence") @Column(name = "id", nullable = false, updatable = false, unique = true) private int id; @NotNull @Column(name = "name") private String name; @NotNull @Column(name = "surname") private String surname; @NotNull @Type(type = "date") @DateTimeFormat(pattern = "dd-MM-yyyy") @Column(name = "date") private Date date; @NotNull @Size(max = 11, min = 11) @Column(name = "pesel", unique = true) private String pesel; @NotNull @Column(name = "email") private String email; @NotNull @Size(max = 1) @Column(name = "sex") private String sex; @ManyToMany(fetch = FetchType.EAGER, cascade=CascadeType.ALL) @JoinTable(name = "student_subject", joinColumns = @JoinColumn( name = "student_id", referencedColumnName = "id" ), inverseJoinColumns = @JoinColumn( name = "subject_id", referencedColumnName = "subject_id" ) ) private List<SubjectEntity> subjects = new ArrayList<SubjectEntity>(); // TODO: zrobic buildera public Student(){} public Student(int id, String name, String surname, Date date, String sex, String pesel, String email) { this.id = id; this.name = name; this.surname = surname; this.date = date; this.sex = sex; this.pesel = pesel; this.email = email; } public Student(int id, String name, String surname, String sex, String pesel, String email) { this.id = id; this.name = name; this.surname = surname; this.sex = sex; this.pesel = pesel; this.email = email; } public Student(String name, String surname, Date date, String sex, String pesel, String email) { this.name = name; this.surname = surname; this.sex = sex; this.pesel = pesel; this.date = date; this.email = email; } public Student(int id, String name, String surname) { this.id = id; this.name = name; this.surname = surname; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getPesel() { return pesel; } public void setPesel(String pesel) { this.pesel = pesel; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public StudentForm getForm(){ StudentForm form = new StudentForm(); form.setId(this.getId()); form.setName(this.getName()); form.setSurname(this.getSurname()); form.setSex(this.getSex()); form.setPesel(this.getPesel()); form.setEmail(this.getEmail()); return form; } public List<SubjectEntity> getSubjects() { return subjects; } public void setSubjects(List<SubjectEntity> subjects) { this.subjects = subjects; } }
[ "kluchus@gmail.com" ]
kluchus@gmail.com
37018c40d5a0150913ea93ed95721dd0697f65d7
34a32b8c47d23d213c0ade8c389c4651b4f0747e
/src/ru/rks/multiplication/Multiplication.java
acbc5705dadcd3ba2f2d2687dfa0632c5ebed7de
[]
no_license
RiazanovKS/MultiplicationWithoutMultiply
01582d42a65980a15a11de67d0942d6deb24a211
30ca0bd03cd45935ea4feb4cdd0bd0fe38414aa1
refs/heads/master
2020-03-27T23:17:48.898297
2018-09-04T09:54:22
2018-09-04T09:54:22
147,307,392
0
0
null
null
null
null
UTF-8
Java
false
false
2,803
java
package ru.rks.multiplication; import java.util.Scanner; public class Multiplication { public static void main(String[] args) { int firstFactor = input(); int secondFactor = input(); System.out.println("Произведение чисел " + firstFactor + " и " + secondFactor + "= " + calculate(firstFactor, secondFactor)); } /** * Метод, возвращающий целочисленное значение, введенное с клавиатуры. * @return - целочисленное значение, введенное с клавиатуры. */ private static int input() { Scanner scanner = new Scanner(System.in); System.out.println("Введите число"); return scanner.nextInt(); } /** * Метод, возвращающий результат произведения двух целочисленных значений. * @param firstFactor - первый множитель * @param secondFactor - второй множитель * @return - целочисленное произведение первого и второго множителя. */ private static int calculate(int firstFactor, int secondFactor) { int result = 0; if(firstFactor>secondFactor&&secondFactor>0) { int tmp; tmp = secondFactor; secondFactor = firstFactor; firstFactor = tmp; } if(firstFactor>secondFactor&&firstFactor<0){ int tmp; tmp = secondFactor; secondFactor = firstFactor; firstFactor = tmp; } if (firstFactor < 0 && secondFactor > 0) { firstFactor = -firstFactor; secondFactor = - secondFactor; } if (firstFactor < 0 && secondFactor < 0) { firstFactor = -firstFactor; secondFactor = -secondFactor; } result = sum(firstFactor,secondFactor); if (firstFactor == 0 || secondFactor == 0) { result = 0; } return result; } /** * Цикл с параметром реализующий вычисление произведения двух множителей. * @param firstFactor - первый множитель. * @param secondFactor - второй множитель. * @return - результат вычисления произведения первого и второго множителя. */ private static int sum(int firstFactor, int secondFactor) { int resultOfSum = 0; for (int i = 0; i < firstFactor; i++) { resultOfSum += secondFactor; } return resultOfSum; } }
[ "riazanovkiril99@gmail.com" ]
riazanovkiril99@gmail.com
e1a962b8512c2d726897805a6e0c19746e925bde
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.4/hej/net/sf/saxon/trans/RuleTarget.java
880655221ad3df20ef6b8cb4fcff3f1520195c47
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
Java
false
false
1,073
java
package net.sf.saxon.trans; import net.sf.saxon.trace.ExpressionPresenter; import java.io.Serializable; /** * The target of a rule, typically a Template. */ public interface RuleTarget extends Serializable { /** * Output diagnostic explanation to an ExpressionPresenter */ public void explain(ExpressionPresenter presenter); } // // The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. // See the License for the specific language governing rights and limitations under the License. // // The Original Code is: all this file // // The Initial Developer of the Original Code is Saxonica Limited. // Portions created by ___ are Copyright (C) ___. All rights reserved. // // Contributor(s): //
[ "oneil@saxonica.com" ]
oneil@saxonica.com
af3fed7e039dba67efda90dc1cb8970d7bfc288a
ce975af2263d2dd8312e68c5456445a669be2e28
/src/main/java/valandur/webapi/security/SecurityFilter.java
bc1b099025ca0e7bf5399b34187c0a9c88587b76
[ "MIT" ]
permissive
ancgate/Web-API
0939efd61840a0b5ceb3e14ab6e02e5311b85f90
c45445ea61079d5f1d9519e597409e9a82d15a28
refs/heads/master
2020-04-18T08:37:10.142593
2018-08-23T10:33:19
2018-08-23T10:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,198
java
package valandur.webapi.security; import com.google.common.net.HttpHeaders; import org.eclipse.jetty.http.HttpMethod; import valandur.webapi.WebAPI; import valandur.webapi.servlet.base.ExplicitDetails; import valandur.webapi.servlet.base.Permission; import valandur.webapi.util.TreeNode; import javax.annotation.Priority; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.*; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.ResourceInfo; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.ext.Provider; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import static valandur.webapi.security.SecurityService.*; @Provider @Priority(Priorities.AUTHENTICATION) public class SecurityFilter implements ContainerRequestFilter { private SecurityService srv; private Map<String, Double> lastCall = new ConcurrentHashMap<>(); private AtomicLong calls = new AtomicLong(0); @Context private ResourceInfo resourceInfo; @Context private HttpServletRequest request; @Context private HttpServletResponse response; public SecurityFilter() { this.srv = WebAPI.getSecurityService(); } @Override public void filter(ContainerRequestContext context) { String addr = getRealAddr(request); String target = context.getUriInfo().getPath(); request.setAttribute("ip", addr); response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ORIGIN); response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_METHODS); response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_HEADERS); // Exit early on options requests if (HttpMethod.OPTIONS.asString().equalsIgnoreCase(context.getMethod())) { context.abortWith(Response.ok().build()); return; } if (!srv.whitelistContains(addr)) { WebAPI.getLogger().warn(addr + " is not on whitelist: " + target); throw new ForbiddenException(); } else if (srv.blacklistContains(addr)) { WebAPI.getLogger().warn(addr + " is on blacklist: " + target); throw new ForbiddenException(); } String key = context.getHeaderString(API_KEY_HEADER); if (key == null || key.isEmpty()) { key = context.getUriInfo().getQueryParameters().getFirst("key"); } if (key == null || key.isEmpty()) { key = context.getHeaderString(HttpHeaders.AUTHORIZATION); if (key != null) key = key.substring(key.indexOf(" ") + 1); } PermissionStruct permStruct; if (key != null) { permStruct = srv.getPermissions(key); } else { key = DEFAULT_KEY; permStruct = srv.getDefaultPermissions(); } // Add new security context SecurityContext securityContext = new SecurityContext(permStruct); context.setSecurityContext(securityContext); request.setAttribute("security", securityContext); // Do rate limiting calls.incrementAndGet(); if (permStruct.getRateLimit() > 0) { double time = System.nanoTime() / 1000000000d; if (lastCall.containsKey(key) && time - lastCall.get(key) < 1d / permStruct.getRateLimit()) { WebAPI.getLogger().warn(addr + " has exceeded the rate limit when requesting " + request.getRequestURI()); throw new ClientErrorException("Rate limit exceeded", Response.Status.TOO_MANY_REQUESTS); } lastCall.put(key, time); } boolean details = true; Method method = resourceInfo.getResourceMethod(); if (method.isAnnotationPresent(ExplicitDetails.class)) { ExplicitDetails dets = method.getAnnotation(ExplicitDetails.class); if (dets.value()) { details = false; } } request.setAttribute("details", details); String basePath = resourceInfo.getResourceClass().getAnnotation(Path.class).value(); TreeNode perms = permStruct.getPermissions(); Permission[] reqPerms = method.getAnnotationsByType(Permission.class); if (reqPerms.length == 0) { return; } // Calculate the sub-perms that apply for our endpoint for (Permission reqPerm : reqPerms) { if (!reqPerm.autoCheck()) { continue; } List<String> reqPermList = new ArrayList<>(Arrays.asList(reqPerm.value())); reqPermList.add(0, basePath); TreeNode methodPerms = SecurityService.subPermissions(perms, reqPermList); if (!methodPerms.getValue()) { WebAPI.getLogger().warn(addr + " does not have permisson to access " + target); if (key.equalsIgnoreCase(DEFAULT_KEY)) { throw new NotAuthorizedException("Bearer realm=\"Web-API Access\""); } else { throw new ForbiddenException(); } } // Set the endpoint permissions to the first permissions listed if (securityContext.getEndpointPerms() == null) securityContext.setEndpointPerms(methodPerms); } } private String getRealAddr(HttpServletRequest request) { final String addr = request.getRemoteAddr(); String forwardedFor = request.getHeader(HttpHeaders.X_FORWARDED_FOR); if (forwardedFor == null) return addr; // First check the actual IP that we got. If that is not a trusted proxy we're done. if (!srv.containsProxyIP(addr)) { WebAPI.getLogger().warn(addr + " sent " + HttpHeaders.X_FORWARDED_FOR + " header, but is not a proxy. Header will be ignored!"); return addr; } String[] ips = forwardedFor.split(","); // Traverse the X-Forwarded-For header backwards and take the first IP that we don't trust. for (int i = ips.length - 1; i >= 0; i--) { String ip = ips[i].trim(); if (srv.containsProxyIP(ip)) { continue; } if (i > 0) { WebAPI.getLogger().warn(ips[i].trim() + " sent " + HttpHeaders.X_FORWARDED_FOR + " header, but is not a proxy. Header will be ignored!"); } return ips[i]; } // We usually shouldn't get here, but if we don't it means we trusted all proxy ips, so just // return the last one of those. return ips[ips.length - 1]; } }
[ "inithilian@gmail.com" ]
inithilian@gmail.com
8146c2e087484e8f115fb7a3fc9899ef28f42cf2
e4065132860a9d1c9f35aa2e2b778af99ae33e39
/src/main/java/com/info/dao/InfoDao.java
a81b905300bd0226f49ea6fcf9e34c0e1f865695
[]
no_license
yount/project
1ea1cac96a77416fe9ac3401a8a415a5bfcf4c7b
ea4d460239f769a51a70a6b5eef0b0dfa6226c2e
refs/heads/master
2021-01-12T15:24:04.287331
2016-10-24T09:13:35
2016-10-24T09:13:35
71,771,619
0
0
null
null
null
null
UTF-8
Java
false
false
124
java
package com.info.dao; import com.info.model.Info; public interface InfoDao { public Info getInfoByUUID(String uuid); }
[ "yount.jiang@perficient.com" ]
yount.jiang@perficient.com
c7d849128392863f78b35abdf77f73cb6eb87be5
7a459958a02a3fc005af3cc493d3e7a4aac756e0
/src/test/java/tests/bankmanager/BankManagerLoginTest.java
f360e133a108bc4e85e30ed002e8e747b33461f4
[]
no_license
hothicam/Project_Thao_Cam
72d4511fcd7f3d54e6784c900d456d2e1d1d73bb
0fbdeaf57a54ed22267454e0726dc15db6b7284c
refs/heads/master
2023-05-10T02:12:12.407252
2020-01-15T01:57:18
2020-01-15T01:57:18
233,975,367
0
0
null
2023-05-09T18:18:12
2020-01-15T01:55:19
JavaScript
UTF-8
Java
false
false
709
java
package tests.bankmanager; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import static tests.PageProvider.getBankManagerLoginPage; public class BankManagerLoginTest { @When("^I click bank manager login$") public void clickBankManagerLoginButtton() throws InterruptedException { Thread.sleep(1000); getBankManagerLoginPage().clickBankManagerLoginButton(); Thread.sleep(1000); } @Then("^I verify login into bank management successfully$") public void verifyLoginSuccessfully() throws InterruptedException { Thread.sleep(1000); getBankManagerLoginPage().verifyLoginManagerSuccessfully(); Thread.sleep(1000); } }
[ "cam.ho@pn.com.vn" ]
cam.ho@pn.com.vn
2d0c841664f9a1c2eb7d86e5b22bef8c6193aa75
9695fd84717c5df8c77599c119db8554ebbeaccd
/src/main/java/com/emusicstore/controller/LoginController.java
88330ad5077a685ed7c83a972811655eb5179ad5
[]
no_license
kssraju/eMusicStore
6c0397072e47ab393211f0cf985a372c3b5db934
352f4dd121b78e462574009a8fa3b444b40df50e
refs/heads/master
2021-01-18T15:42:28.317990
2017-02-28T23:37:19
2017-02-28T23:37:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package com.emusicstore.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class LoginController { @RequestMapping("/login") public String login(@RequestParam (value="error", required=false) String error, @RequestParam (value="logout", required=false) String logout, Model model) { if (error != null) { model.addAttribute("error", "Invalid username or password"); } if (logout != null) { model.addAttribute("msg", "You have been logged out successfully"); } return "login"; } }
[ "marcelo.valente@yahoo.com" ]
marcelo.valente@yahoo.com
e8c318a01622ae8600d6f03420ab2d0d69c0848a
e4a947cd69068150f736e18b2fc1c608ab55080f
/Students/Sabau M. Andrei/Zoowsome/src/javasmmr/zoowsome/services/factories/AquaticFactory.java
17fa3eac906180fe7d62363f74795479c4e2f56c
[]
no_license
bareeka/30425
6ce764b0c23848d3a25074beef473efd5c6a64c5
4e204cd2a89d79faacb0dee5694fcbf2f63b874d
refs/heads/master
2021-01-11T01:23:20.892520
2016-12-07T18:52:09
2016-12-07T18:52:09
70,613,243
0
0
null
2016-10-11T16:28:55
2016-10-11T16:28:54
null
UTF-8
Java
false
false
510
java
package javasmmr.zoowsome.services.factories; import javasmmr.zoowsome.models.animals.*; public class AquaticFactory extends SpeciesFactory{ public Animal getAnimal(String type) { if(Constants.Animals.Aquatics.SHARK.equals(type)) { return new Shark(); } else if(Constants.Animals.Aquatics.OCTOPUS.equals(type)) { return new Octopus(); } else if(Constants.Animals.Aquatics.FISH.equals(type)) { return new Fish(); } else throw new Exception("Invalid animal exception"); } }
[ "sabau.andrei14@yahoo.com" ]
sabau.andrei14@yahoo.com
c818907a15284e9628d88b1477e6343580165e18
9ccf99159f3bbd0789a0de9e518955f33ff05efd
/easycode-auth-core/src/main/java/com/easycodebox/auth/core/util/CodeMsgExt.java
6d882817c797ce8e879e0ad0b7717e69a35b02ec
[ "Apache-2.0" ]
permissive
swyl/easycode
71aa824cd82e0a08eabe0da6e3f1961778b0e12d
1d514796668d96ed1ec71203f7c4e4098e284641
refs/heads/master
2021-01-23T22:31:10.777845
2017-03-09T09:24:43
2017-03-09T09:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,338
java
package com.easycodebox.auth.core.util; import com.easycodebox.common.error.CodeMsg; import com.easycodebox.common.file.PropertiesPool; import com.easycodebox.common.lang.Symbol; import java.io.File; /** * @author WangXiaoJin * */ public class CodeMsgExt extends CodeMsg { public static CodeMsg PARAM_ERR = new CodeMsgExt("1002", "{0}参数错误"); public static CodeMsg PARAM_BLANK = new CodeMsgExt("1003", "{0}参数不能为空"); public static CodeMsg EXISTS = new CodeMsgExt("2001", "{0}已存在"); private static final String FILE_PATH = "/code-msg.properties"; static { PropertiesPool.loadPropertiesFile(FILE_PATH); } protected CodeMsgExt(String code, String msg) { super(code, msg); } public static void main(String[] args) throws Exception { /* ------------ 生成properties文件 BEGIN -------------- */ File file = new File("src/main/resources" + (FILE_PATH.startsWith(Symbol.SLASH) ? "" : Symbol.SLASH) + FILE_PATH); CodeMsgs.storePropertiesFile(CodeMsgExt.class, file); /* ------------ 生成properties文件 END ---------------- */ CodeMsg code = CodeMsgExt.NONE; System.out.println(code.getMsg()); CodeMsg xx = code.msg("XXXXXXXXXXx"); System.out.println(code.getMsg()); System.out.println(xx.getMsg()); System.out.println(CodeMsgExt.NONE.getMsg()); } }
[ "381954728@qq.com" ]
381954728@qq.com
fd626d8106c6b1fd7d575424106e5736dda4e2f0
68c73e7f6ee097ef8d6d34d4683eae6ffc5f8f46
/plat-app/plat-service/src/main/java/com/jyh/app/plat/service/dao/ServiceMapper.java
eba81bba093c1b44f29f1948a00153781c88486d
[]
no_license
bounce5733/jyh-app
0d4eadb89479afced0222dbf3cfc239c428817ff
577211d9620fd5cf5893236067a43c71d16e0e3c
refs/heads/master
2020-03-24T12:02:40.220829
2018-08-22T15:31:12
2018-08-22T15:31:12
142,698,208
0
0
null
null
null
null
UTF-8
Java
false
false
196
java
package com.jyh.app.plat.service.dao; import com.jyh.app.plat.service.Mapper; import com.jyh.entity.plat.service.ServiceEntity; public interface ServiceMapper extends Mapper<ServiceEntity> { }
[ "yh_jiang@126.com" ]
yh_jiang@126.com
1e06c35214a4525c25c0a1b5408d15b114a95424
2320eb33351c4b26064beda8ab1ace25b338e433
/app/src/main/java/com/example/carwash/carwash/activities/NewClientActivity.java
010654f7e5c4c0e9a79ab11df01567c9f90035ba
[]
no_license
Monageng/carwash-app-ui
c5d3cb44f1ae41273385113a064bb6dbae8e391b
35b044312bcd8e9d85d2b83433db2e3541826a05
refs/heads/master
2021-01-01T20:43:50.081877
2017-07-31T19:03:02
2017-07-31T19:03:02
98,919,943
0
0
null
null
null
null
UTF-8
Java
false
false
3,699
java
package com.example.carwash.carwash.activities; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; import com.example.carwash.carwash.R; import com.example.carwash.carwash.dao.CarwashDAO; import com.example.carwash.carwash.dto.CustomerDto; import com.example.carwash.carwash.impl.CarwashImpl; import com.example.carwash.carwash.utils.DateUtils; import java.text.SimpleDateFormat; import java.util.Date; public class NewClientActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } private String errorMessage = ""; /** Called when the user taps the Send button */ public void home(View view) { Intent intent = new Intent(this, Home.class); startActivity(intent); } public void sendMessage(View view) { Intent intent = new Intent(this, SearchClientsActivity.class); errorMessage = ""; validateView(view); EditText editName = (EditText) findViewById(R.id.editName); String name = editName.getText().toString(); EditText editSurname = (EditText) findViewById(R.id.editSurname); String surname = editSurname.getText().toString(); EditText editCellNo = (EditText) findViewById(R.id.editCellNo); String cellNo = editCellNo.getText().toString(); EditText editRegNo = (EditText) findViewById(R.id.editRegNo); String regNo = editRegNo.getText().toString(); EditText editDateOfBirth = (EditText) findViewById(R.id.editDateOfBirth); String dateOfBirth = editDateOfBirth.getText().toString(); if (errorMessage != null && errorMessage.length() > 0) { TextView errTxt = (TextView) findViewById(R.id.errorMessageTxt); errTxt.setText(errorMessage); } else { Date currentDate = new Date(); SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyyy-MM-dd"); //CarwashDAO dao = new CarwashDAO(this); CustomerDto dto = new CustomerDto(name,surname,regNo,cellNo,dateOfBirth, dateFormatter.format(currentDate)); //dao.insertCustomer(dto); CarwashImpl carwashImpl = new CarwashImpl(); carwashImpl.createClient(dto); startActivity(intent); } } private void validateView(View view) { EditText editName = (EditText) findViewById(R.id.editName); if (editName.getText().length() < 1) { errorMessage = errorMessage + " Name is mandatory, \r\n"; } EditText editSurname = (EditText) findViewById(R.id.editSurname); if (editSurname.getText().length() < 1) { errorMessage = errorMessage + " Surname is mandatory, \r\n"; } EditText editRegNo = (EditText) findViewById(R.id.editRegNo); if (editRegNo.getText().length() < 1) { errorMessage = errorMessage + " Registration no is mandatory, \r\n"; } EditText editDateOfBirth = (EditText) findViewById(R.id.editDateOfBirth); if (editDateOfBirth.getText().length() < 1) { errorMessage = errorMessage + " DateOfBirth is mandatory, \r\n"; } String dateInput = editDateOfBirth.getText().toString(); try { Date date = DateUtils.parseToDate(dateInput, DateUtils.PATTERN_YYYY_MM_DD ); } catch (Exception e) { errorMessage = errorMessage + " , " + e.getMessage() + ", \r\n"; } } }
[ "motsabi.monageng@momentum.co.za" ]
motsabi.monageng@momentum.co.za
1a8b9f2e5cdc5c7efa04eea5159ae8cd53118492
f97cecacb401daed67f32e11757d172afb7c3635
/mall-member/src/main/java/com/wff/mall/member/service/impl/MemberReceiveAddressServiceImpl.java
8c6b4f10ca329cdcdba81c7bd646c4003ff6eea4
[ "Apache-2.0" ]
permissive
wff0/mall
d21cae6aeed93e2eaab3d0ea4b77052593fa3e9a
297137e344c98e543b330f0e4eb0b7e60be5b054
refs/heads/master
2023-05-09T22:45:16.727916
2021-06-03T13:33:36
2021-06-03T13:33:36
363,636,858
0
0
null
null
null
null
UTF-8
Java
false
false
1,303
java
package com.wff.mall.member.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.wff.common.utils.PageUtils; import com.wff.common.utils.Query; import com.wff.mall.member.dao.MemberReceiveAddressDao; import com.wff.mall.member.entity.MemberReceiveAddressEntity; import com.wff.mall.member.service.MemberReceiveAddressService; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; @Service("memberReceiveAddressService") public class MemberReceiveAddressServiceImpl extends ServiceImpl<MemberReceiveAddressDao, MemberReceiveAddressEntity> implements MemberReceiveAddressService { @Override public PageUtils queryPage(Map<String, Object> params) { IPage<MemberReceiveAddressEntity> page = this.page( new Query<MemberReceiveAddressEntity>().getPage(params), new QueryWrapper<MemberReceiveAddressEntity>() ); return new PageUtils(page); } @Override public List<MemberReceiveAddressEntity> getAddress(Long memberId) { return this.list(new QueryWrapper<MemberReceiveAddressEntity>().eq("member_id", memberId)); } }
[ "1098137961@qq.com" ]
1098137961@qq.com
e92fd49b6cbcc8690b8af6a1da38da5cbd3145bc
184981dd7f122b0df83c00049bfc302b41673c05
/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java
42a0da94a90876963fda7d14dc16dab550b898e4
[ "Apache-2.0" ]
permissive
winggyn/incubator-systemml
907deed5970a85b5ba7d353f690daed8ac1ff5a9
996ba79fae3cf8c0da63f09d90f44771f0e55e75
refs/heads/master
2020-05-29T08:53:30.148093
2016-10-04T21:12:39
2016-10-05T00:31:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,737
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sysml.runtime.transform.decode; import java.util.HashMap; import java.util.List; import org.apache.sysml.lops.Lop; import org.apache.sysml.parser.Expression.ValueType; import org.apache.sysml.runtime.matrix.data.FrameBlock; import org.apache.sysml.runtime.matrix.data.MatrixBlock; import org.apache.sysml.runtime.matrix.data.Pair; import org.apache.sysml.runtime.transform.TfUtils; import org.apache.sysml.runtime.util.UtilFunctions; /** * Simple atomic decoder for recoded columns. This decoder builds internally * inverted recode maps from the given frame meta data. * */ public class DecoderRecode extends Decoder { private static final long serialVersionUID = -3784249774608228805L; private HashMap<Long, Object>[] _rcMaps = null; private boolean _onOut = false; protected DecoderRecode(List<ValueType> schema, boolean onOut, int[] rcCols) { super(schema, rcCols); _onOut = onOut; } @Override public FrameBlock decode(MatrixBlock in, FrameBlock out) { if( _onOut ) { //recode on output (after dummy) for( int i=0; i<in.getNumRows(); i++ ) { for( int j=0; j<_colList.length; j++ ) { int colID = _colList[j]; double val = UtilFunctions.objectToDouble( out.getSchema()[colID-1], out.get(i, colID-1)); long key = UtilFunctions.toLong(val); out.set(i, colID-1, _rcMaps[j].get(key)); } } } else { //recode on input (no dummy) out.ensureAllocatedColumns(in.getNumRows()); for( int i=0; i<in.getNumRows(); i++ ) { for( int j=0; j<_colList.length; j++ ) { double val = in.quickGetValue(i, _colList[j]-1); long key = UtilFunctions.toLong(val); out.set(i, _colList[j]-1, _rcMaps[j].get(key)); } } } return out; } @Override @SuppressWarnings("unchecked") public void initMetaData(FrameBlock meta) { //initialize recode maps according to schema _rcMaps = new HashMap[_colList.length]; for( int j=0; j<_colList.length; j++ ) { HashMap<Long, Object> map = new HashMap<Long, Object>(); for( int i=0; i<meta.getNumRows(); i++ ) { if( meta.get(i, _colList[j]-1)==null ) break; //reached end of recode map String[] tmp = meta.get(i, _colList[j]-1).toString().split(Lop.DATATYPE_PREFIX); Object obj = UtilFunctions.stringToObject(_schema.get(_colList[j]-1), tmp[0]); map.put(Long.parseLong(tmp[1]), obj); } _rcMaps[j] = map; } } /** * Parses a line of <token, ID, count> into <token, ID> pairs, where * quoted tokens (potentially including separators) are supported. * * @param entry * @param pair */ public static void parseRecodeMapEntry(String entry, Pair<String,String> pair) { int ixq = entry.lastIndexOf('"'); String token = UtilFunctions.unquote(entry.substring(0,ixq+1)); int idx = ixq+2; while(entry.charAt(idx) != TfUtils.TXMTD_SEP.charAt(0)) idx++; String id = entry.substring(ixq+2,idx); pair.set(token, id); } }
[ "mboehm@us.ibm.com" ]
mboehm@us.ibm.com
fee43d0011c5a96114cd7f7576a91e497423a055
650c04cb1e0ae7ea21e0c0e0eab04ce551572949
/app/src/main/java/com/sg/moviesindex/model/tmdb/MovieDBResponse.java
5d5320e2498701c0b424519a456039b4f2b6599d
[]
no_license
shubh-dubey/Movies-Index
f097c9bcf4be1ff348845a27fdd168401cb7a4a4
0d6666b5582ffdd6a954997880f29310cfe6624b
refs/heads/master
2022-11-14T08:11:34.254447
2020-07-07T17:14:18
2020-07-07T17:14:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,294
java
package com.sg.moviesindex.model.tmdb; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class MovieDBResponse implements Parcelable { @SerializedName("page") @Expose private Integer page; @SerializedName("total_results") @Expose private Integer totalResults; @SerializedName("total_pages") @Expose private Integer totalPages; @SerializedName("results") @Expose private List<Movie> movies = null; public final static Parcelable.Creator<MovieDBResponse> CREATOR = new Creator<MovieDBResponse>() { @SuppressWarnings({ "unchecked" }) public MovieDBResponse createFromParcel(Parcel in) { return new MovieDBResponse(in); } public MovieDBResponse[] newArray(int size) { return (new MovieDBResponse[size]); } }; protected MovieDBResponse(Parcel in) { this.page = ((Integer) in.readValue((Integer.class.getClassLoader()))); this.totalResults = ((Integer) in.readValue((Integer.class.getClassLoader()))); this.totalPages = ((Integer) in.readValue((Integer.class.getClassLoader()))); in.readList(this.movies, (Movie.class.getClassLoader())); } public MovieDBResponse() { } public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public Integer getTotalResults() { return totalResults; } public void setTotalResults(Integer totalResults) { this.totalResults = totalResults; } public Integer getTotalPages() { return totalPages; } public void setTotalPages(Integer totalPages) { this.totalPages = totalPages; } public List<Movie> getMovies() { return movies; } public void setMovies(List<Movie> movies) { this.movies = movies; } public void writeToParcel(Parcel dest, int flags) { dest.writeValue(page); dest.writeValue(totalResults); dest.writeValue(totalPages); dest.writeList(movies); } public int describeContents() { return 0; } }
[ "saarthakgupta08@gmail.com" ]
saarthakgupta08@gmail.com
a38479afadc188444782dc08df27799da2fde246
e2506a7748c75a55780bf1e2c168795322eb0810
/app/src/main/java/com/example/planner/LoginActivity.java
6efe11fe75958827e73cf5e5b898b13f6b12e58f
[]
no_license
Moldoveanu-Florin-George/PPA
c2b60b9139ca05d88d2fc347939a6ed8737e3838
0ef30702f7e1b29f2513c4c8e0909bb2dfae838d
refs/heads/main
2023-04-18T18:14:49.932711
2021-04-19T17:20:42
2021-04-19T17:20:42
359,536,354
0
0
null
null
null
null
UTF-8
Java
false
false
2,043
java
package com.example.planner; import androidx.appcompat.app.AppCompatActivity; import android.content.SharedPreferences; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; public class LoginActivity extends AppCompatActivity { String password,username; public boolean checkPasswordConstraints(String proposedPass){ return true; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); password = ""; username = ""; Button signin; EditText user,pass,copass; signin = findViewById(R.id.signup); user = findViewById(R.id.username); pass= findViewById(R.id.password); copass = findViewById(R.id.password_confirm); signin.setOnClickListener(v -> { String inuser = user.getText().toString(); String inpass = pass.getText().toString(); String incopass = copass.getText().toString(); if(incopass.equals(inpass)) { if(checkPasswordConstraints(password) && (inpass.equals("")==false) && (inuser.equals("")==false)){ SharedPreferences pref = getSharedPreferences("preference", MODE_PRIVATE); SharedPreferences.Editor editor = pref.edit(); editor.putBoolean("firststart", false); editor.commit(); SharedPreferences data = getSharedPreferences("user_data",MODE_PRIVATE); SharedPreferences.Editor datasaver = data.edit(); datasaver.putString("pass/user",inpass + "/" +inuser); datasaver.commit(); finish(); } } }); } @Override public void onBackPressed(){}//don't go back if the back button is pressed public void SaveData(){} } //SharedPreferences.Editor editor = pref.edit(); // editor.putBoolean("firststart", false); //editor.commit();
[ "81249862+Moldoveanu-Florin-George@users.noreply.github.com" ]
81249862+Moldoveanu-Florin-George@users.noreply.github.com
5866ca0622cc1f595cdab31f81de94b8d799070a
2c08db50b793af9ba1a308f8cd6f39160af62f2c
/src/java/JsfClasses/ImagesclientController.java
59ec6adf2c5a3d14e3cdf9364d2ee694f399c25f
[]
no_license
gassen77/cabinet
6a638d167af945cd626870b4fc6267de2e77e8f7
342728ecff61b0f6b70bf7bded675b2e36366fd9
refs/heads/master
2021-04-26T01:04:29.685259
2017-10-18T08:46:01
2017-10-18T08:46:01
107,382,914
0
0
null
null
null
null
UTF-8
Java
false
false
18,511
java
package JsfClasses; import entities.Imagesclient; import JsfClasses.util.JsfUtil; import JsfClasses.util.PaginationHelper; import SessionBeans.ClientFacade; import SessionBeans.ImagesclientFacade; import entities.Client; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.ResourceBundle; import java.util.StringTokenizer; import java.util.concurrent.Semaphore; import javax.annotation.PostConstruct; import javax.ejb.EJB; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.component.UIComponent; import javax.faces.component.UIPanel; import javax.faces.component.UIViewRoot; import javax.faces.component.html.HtmlInputText; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; import javax.faces.convert.FacesConverter; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; import javax.faces.model.SelectItem; import org.primefaces.event.FileUploadEvent; @ManagedBean(name = "imagesclientController") @ViewScoped public class ImagesclientController implements Serializable { private Imagesclient current; private DataModel items = null; @EJB private SessionBeans.ImagesclientFacade ejbFacade; private PaginationHelper pagination; private int selectedItemIndex; private String page; private Integer pageDestination; private Map<String,Object>mapRechercheList; @EJB private ClientFacade ejbclient; public ImagesclientController() { FacesContext fc = FacesContext.getCurrentInstance(); ejbclient = (ClientFacade) fc.getApplication().getELResolver().getValue(fc.getELContext(), null, "ClientJpa"); } public Map<String, Object> getMapRechercheList() { return mapRechercheList; } public void setMapRechercheList(Map<String, Object> mapRechercheList) { this.mapRechercheList = mapRechercheList; } public Integer getPageDestination() { return pageDestination; } public void setPageDestination(Integer pageDestination) { this.pageDestination = pageDestination; } @PostConstruct public void init() { FacesContext fc=FacesContext.getCurrentInstance(); Map<String,Object>map=fc.getExternalContext().getRequestMap(); try { page = (String) map.get("page"); } catch (Exception e) { } try { current = (Imagesclient) map.get("current"); } catch (Exception e) { current = null; } try{ items=(DataModel) map.get("items"); }catch(Exception e){} try{ mapRechercheList= (Map<String, Object>) map.get("mapRechercheList"); }catch(Exception e){ mapRechercheList=null; } if ((page != null)) { if ((page.equalsIgnoreCase("Create"))) { initPrepareCreate(); } if (page.equalsIgnoreCase("List")) { initRechercheList(); } if ((page.equalsIgnoreCase("Edit")) && (current != null)) { initPrepareEdit(); } } } public void initPrepareCreate() { current = new Imagesclient(); selectedItemIndex = -1; } public void initRechercheList() { recreateModel(); } public void initPrepareEdit() { } public String getPage() { return page; } public void setPage(String page) { this.page = page; } public Imagesclient getSelected() { if (current == null) { current = new Imagesclient(); selectedItemIndex = -1; } return current; } private ImagesclientFacade getFacade() { return ejbFacade; } public PaginationHelper getPagination() { if (pagination == null) { List<String>s=new ArrayList<String>(); List<Object>o=new ArrayList<Object>(); pagination = new PaginationHelper(10,"Select o from Imagesclient o",s,o) { @Override public int getItemsCount() { return getFacade().countMultipleCritiria(getRequetteJpql(),getArrayNames(),getArrayValues()); } @Override public DataModel createPageDataModel() { return new ListDataModel(getFacade().findByParameterMultipleCreteria(getRequetteJpql(),getArrayNames(),getArrayValues(),getPageFirstItem(),getPageSize())); } }; } return pagination; } public String premierePage() { getPagination().setPage(0); recreateModel(); return null; } public String dernierePage() { getPagination().setPage(getPagination().totalPages()-1); recreateModel(); return null; } public String previous() { this.pageDestination=getPagination().getPage(); return goPageDestination(); } public String next() { this.pageDestination=getPagination().getPage(); this.pageDestination=this.pageDestination+2; return goPageDestination(); } public String goPageDestination() { items=null; if(pageDestination!=null){ if(pageDestination>0){ if(pageDestination<=getPagination().totalPages()){ getPagination().setPage(pageDestination.intValue()-1); recreateModel(); } } } pageDestination=null; return null; } public void setMettreJourAttributeRecherche(String mettreJourAttributeRecherche){ FacesContext fc=FacesContext.getCurrentInstance(); UIComponent component = UIViewRoot.getCurrentComponent(fc); UIPanel panel=(UIPanel)component; Iterator it=panel.getChildren().iterator(); while(it.hasNext()){ UIComponent u=(UIComponent)it.next(); if(u.getClass().equals(HtmlInputText.class)){ this.mapRechercheList.put(u.getId(),mettreJourAttributeRecherche); } } } public String getMettreJourAttributeRecherche(){ FacesContext fc=FacesContext.getCurrentInstance(); HtmlInputText component = (HtmlInputText) UIViewRoot.getCurrentComponent(fc); return (String) this.mapRechercheList.get(component.getId()); } public String rechercherListItems(){ String requette="Select o from Imagesclient o where "; String order="order by "; Iterator it=this.mapRechercheList.entrySet().iterator(); List<String>ss=new ArrayList<String>(); List<Object>oo=new ArrayList<Object>(); while(it.hasNext()){ Object o=it.next(); Entry<String,Object> e=(Entry<String,Object>)o; String nomComponent=e.getKey(); String valueComponent=e.getValue().toString(); if(valueComponent!=null){ if(valueComponent.isEmpty()==false){ StringTokenizer st=new StringTokenizer(nomComponent,"_"); if(st.countTokens()==1){ requette=requette+"o."+nomComponent+" like :"+nomComponent+" and "; ss.add(nomComponent); oo.add("%"+valueComponent+"%"); order=order+"o."+nomComponent+","; }else{ String nomCompletColonne="o."; String lastSuffixColumn=""; while(st.hasMoreTokens()){ String stt=st.nextToken(); nomCompletColonne=nomCompletColonne+stt+"."; lastSuffixColumn=stt; } if(nomCompletColonne.endsWith(".")){ nomCompletColonne=nomCompletColonne.substring(0,nomCompletColonne.lastIndexOf(".")); } requette=requette+nomCompletColonne+" like :"+lastSuffixColumn+" and "; ss.add(lastSuffixColumn); oo.add("%"+valueComponent+"%"); order=order+nomCompletColonne+","; } } } } if(order.endsWith(",")){ order=order.substring(0,order.lastIndexOf(",")); } if(order.endsWith("order by ")){ order=order.substring(0,order.lastIndexOf("order by ")); } if(requette.endsWith(" and ")){ requette=requette.substring(0,requette.lastIndexOf(" and ")); } if(requette.endsWith(" where ")){ requette=requette.substring(0,requette.lastIndexOf(" where ")); } requette=requette.trim(); requette=requette+" "+order; try{ getPagination().setRequetteJpql(requette); getPagination().setArrayNames(ss); getPagination().setArrayValues(oo); getPagination().setPage(0); items=null; }catch(Exception ex){ } return null; } public String prepareList() { recreateModel(); FacesContext fc=FacesContext.getCurrentInstance(); Map<String,Object>map=fc.getExternalContext().getRequestMap(); this.mapRechercheList=new HashMap<String, Object>(); page = "List"; map.put("page", page); map.put("current", current); map.put("items", items); map.put("mapRechercheList",mapRechercheList); return "List_Imagesclient"; } public String prepareView() { current = (Imagesclient) getItems().getRowData(); selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex(); return "View"; } public String prepareCreate() { current = new Imagesclient(); current.setDatecreation(new Date()); selectedItemIndex = -1; FacesContext fc=FacesContext.getCurrentInstance(); Map<String,Object>map=fc.getExternalContext().getRequestMap(); map.put("page", page); map.put("current", current); return "Create_Imagesclient"; } public String create() { try { Long l = new Long(1); try { l = getFacade().findByParameterSingleResultCountsansparam("Select max(c.id) from Imagesclient c"); if (l==null) { l = new Long(1); } } catch(Exception e) { e.printStackTrace(); } current.setId(l+1); current.setDatecreation(new Date()); getFacade().create(current); JsfUtil.addSuccessMessage("Transaction reussi"); return prepareCreate(); } catch (Exception e) { JsfUtil.addErrorMessage("Transaction echouee"); return null; } } public String prepareEdit() { current = (Imagesclient) getItems().getRowData(); selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex(); page = "Edit"; FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("page", page); FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("current", current); return "Edit_Imagesclient"; } public String update() { try { getFacade().edit(current); JsfUtil.addSuccessMessage("Transaction reussi"); return prepareList(); } catch (Exception e) { JsfUtil.addErrorMessage("Transaction echouee"); return null; } } public String destroy() { current = (Imagesclient) getItems().getRowData(); selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex(); performDestroy(); recreateModel(); return "List"; } public String destroyAndView() { performDestroy(); recreateModel(); updateCurrentItem(); if (selectedItemIndex >= 0) { return "View"; } else { // all items were removed - go back to list recreateModel(); return "List"; } } private void performDestroy() { try { getFacade().remove(current); JsfUtil.addSuccessMessage("Transaction reussi"); } catch (Exception e) { JsfUtil.addErrorMessage("Transaction echouee"); } } private void updateCurrentItem() { int count = getFacade().count(); if (selectedItemIndex >= count) { // selected index cannot be bigger than number of items: selectedItemIndex = count - 1; // go to previous page if last page disappeared: if (pagination.getPageFirstItem() >= count) { pagination.previousPage(); } } if (selectedItemIndex >= 0) { current = getFacade().findRange(new int[]{selectedItemIndex, selectedItemIndex + 1}).get(0); } } public DataModel getItems() { if (items == null) { items = getPagination().createPageDataModel(); } return items; } private void recreateModel() { items = null; } public SelectItem[] getItemsAvailableSelectMany() { return JsfUtil.getSelectItems(ejbFacade.findAll(), false); } public SelectItem[] getItemsAvailableSelectOne() { return JsfUtil.getSelectItems(ejbFacade.findAll(), true); } @FacesConverter(forClass = Imagesclient.class) public static class ImagesclientControllerConverter implements Converter { public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { if (value == null || value.length() == 0) { return null; } try{ ImagesclientController controller = (ImagesclientController) facesContext.getApplication().getELResolver(). getValue(facesContext.getELContext(), null, "imagesclientController"); return controller.ejbFacade.find(getKey(value));}catch(Exception e){return null;} } java.lang.Long getKey(String value) { java.lang.Long key; key = Long.valueOf(value); return key; } String getStringKey(java.lang.Long value) { StringBuffer sb = new StringBuffer(); sb.append(value); return sb.toString(); } public String getAsString(FacesContext facesContext, UIComponent component, Object object) { if (object == null) { return null; } if (object instanceof Imagesclient) { Imagesclient o = (Imagesclient) object; return getStringKey(o.getId()); } else { throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + ImagesclientController.class.getName()); } } } public List<Client> autocompleteClient(String code) { List<Client> result = new ArrayList<Client>(); try { result = (List<Client>) requeteClient(code); return result; } catch (Exception d) { result = new ArrayList<Client>(); return result; } } public List<Client> requeteClient(String code) { String q = "Select b from Client b where b.code like :code or b.nom like :code"; List<Client> l = this.ejbclient.findByParameterAutocomplete(q, "code", code + "%", 50); return l; } public void handleFileUpload(FileUploadEvent event) { System.out.println("handleFileUpload"); try { InputStream input = event.getFile().getInputstream(); // String nomImage = this.nomImage(event.getFile().getFileName()); String nomImage="photo"+current.getClient().getNom()+current.getDatecreation().getDay()+current.getDatecreation().getMonth()+current.getDatecreation().getYear(); File directory = new File(FacesContext.getCurrentInstance().getExternalContext().getRealPath("/pages/images/imagespatients")); directory.mkdirs(); // System.out.println("nomImage "+nomImage); OutputStream output = new FileOutputStream(new File(FacesContext.getCurrentInstance().getExternalContext().getRealPath("/pages/images/imagespatients") + "/" + nomImage + ".jpg")); int data = input.read(); while (data != -1) { output.write(data); data = input.read(); } input.close(); output.close(); JsfUtil.addSuccessMessage("Le Fichier :" + event.getFile().getFileName() + " est telecharge."); this.getSelected().setPhoto("/pages/images/imagespatients/" + nomImage + ".jpg"); } catch (Exception e) { e.printStackTrace(); JsfUtil.addErrorMessage("echec " + event.getFile().getFileName() + " n'est pas telecharger."); } } protected static Semaphore semaphoreImage = new Semaphore(1, true); public String nomImage(String s) { try { String s3 = ""; DateFormat f = new SimpleDateFormat("ddMMyyyyHHmmssSSS"); semaphoreImage.acquire(); Date date = new Date(); s3 = current.getPhoto(); System.out.println("s3 "+s3); semaphoreImage.release(); return s3; } catch (Exception r) { r.printStackTrace(); try { semaphoreImage.release(); } catch (Exception releaseExcp) { System.out.println("releaseExcp"); releaseExcp.printStackTrace(); } } return ""; } }
[ "gassenhammouda7@hotmail.fr" ]
gassenhammouda7@hotmail.fr
de84c07c03af3a166ee47c165478f77f5e359dcf
a6f634f2b55ee46f98d39a0620b9ae70cc3da382
/chapter5/src/main/java/com/zzuduoduo/chapter5/connector/ResponseBase.java
7e40d2d4f07d225f781ac78f1dad7855202fb1e0
[]
no_license
zzuduoduo/how-tomcat-works
cb3016af338f1ccfbb1ff3b091e9bc4834b3b6c5
456ed28831f0a424705f6c91ba78abef1e81f113
refs/heads/master
2021-02-14T16:56:37.259729
2020-04-11T15:37:09
2020-04-11T15:37:09
244,820,788
1
0
null
2020-10-13T20:44:59
2020-03-04T06:04:04
Java
UTF-8
Java
false
false
5,197
java
package com.zzuduoduo.chapter5.connector; import com.zzuduoduo.chapter5.Connector; import com.zzuduoduo.chapter5.Request; import com.zzuduoduo.chapter5.Response; import javax.servlet.ServletOutputStream; import javax.servlet.ServletResponse; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; public abstract class ResponseBase implements ServletResponse, Response { protected Connector connector = null; protected OutputStream output; protected Request request; protected PrintWriter writer = null; protected ServletOutputStream stream = null; protected int bufferCount = 0; protected byte[] buffer = new byte[1024]; protected boolean committed = false; protected int contentCount = 0; protected String encoding = null; protected int contentLength = -1; protected boolean included = false; protected String contentType; public boolean isCommitted() { return committed; } public String getContentType() { return contentType; } @Override public Connector getConnector() { return connector; } @Override public void setConnector(Connector connector) { this.connector = connector; } public OutputStream getOutput() { return output; } public void setOutput(OutputStream output) { this.output = output; } public Request getRequest() { return request; } public void setRequest(Request request) { this.request = request; } @Override public void finishResponse() throws IOException { if(this.stream == null){ return; } if (((ResponseStream) stream).isClosed()){ return; } if (writer!=null){ System.out.println("writer flush"); writer.flush(); writer.close(); }else{ stream.flush(); stream.close(); } } @Override public void recycle(){ // todo recycle bufferCount = 0; committed = false; contentCount = 0; encoding = null; output = null; request = null; stream = null; writer = null; } @Override public PrintWriter getWriter() throws IOException { if (writer != null){ return writer; } if (stream != null){ throw new IOException("stream error"); } ResponseStream newStream = (ResponseStream)createOutputStream(); newStream.setCommit(false); OutputStreamWriter osw = new OutputStreamWriter(newStream, getCharacterEncoding()); writer = new ResponseWriter(osw, newStream); this.stream = newStream; return writer; } @Override public String getCharacterEncoding(){ if(encoding == null){ return "UTF-8"; } return encoding; } public ServletOutputStream createOutputStream() throws IOException { return new ResponseStream(this); } public void write(int b) throws IOException { if (bufferCount >= buffer.length){ flushBuffer(); } buffer[bufferCount++] = (byte)b; contentCount++; } public void write(byte[] b, int off, int len) throws IOException{ if (len == 0){ return; } if (len <= (buffer.length - bufferCount)){ System.arraycopy(b, off, buffer, bufferCount, len); bufferCount += len; contentCount += len; return; } flushBuffer(); int iterations = len / buffer.length; int leftoverStart = iterations * buffer.length; int leftoverLen = len - leftoverStart; for (int i = 0; i<iterations;i++){ write(b,off + i*buffer.length,buffer.length); } if (leftoverLen > 0) write(b,off+leftoverStart, leftoverLen); } public void write(byte[] b) throws IOException { write(b, 0, b.length); } @Override public void flushBuffer() throws IOException{ committed = true; if (bufferCount > 0){ try{ output.write(buffer, 0, bufferCount); }finally { bufferCount = 0; } } } @Override public ServletOutputStream getOutputStream() throws IOException{ if (writer != null){ throw new IOException("response write"); } if (stream == null){ stream = createOutputStream(); } ((ResponseStream)stream).setCommit(true); return stream; } public int getContentLength() { return contentLength; } @Override public void setContentLength(int contentLength) { if(isCommitted()) return; if (included) return; this.contentLength = contentLength; } @Override public void setContentType(String type) { if (isCommitted()) return; if (included) return; this.contentType = type; //todo } }
[ "zzuduoduo@gmail.com" ]
zzuduoduo@gmail.com
dd262b8aece4a70946206eb43c19ba05f13d7b85
98e53f3932ecce2a232d0c314527efe49f62e827
/org.rcfaces.core/src/org/rcfaces/core/internal/tools/GridServerSort.java
cf25fdd30627176768ad9797bae81d7367aaabab
[]
no_license
Vedana/rcfaces-2
f053a4ebb8bbadd02455d89a5f1cb870deade6da
4112cfe1117c4bfcaf42f67fe5af32a84cf52d41
refs/heads/master
2020-04-02T15:03:08.653984
2014-04-18T09:36:54
2014-04-18T09:36:54
11,175,963
1
0
null
null
null
null
UTF-8
Java
false
false
14,847
java
/* * $Id: GridServerSort.java,v 1.4 2013/11/13 12:53:22 jbmeslin Exp $ * */ package org.rcfaces.core.internal.tools; import java.util.ArrayList; import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.faces.FacesException; import javax.faces.component.UIColumn; import javax.faces.component.UIComponent; import javax.faces.component.ValueHolder; import javax.faces.context.FacesContext; import javax.faces.event.FacesListener; import javax.faces.model.DataModel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.rcfaces.core.component.capability.ISortEventCapability; import org.rcfaces.core.event.SortEvent; import org.rcfaces.core.internal.capability.IGridComponent; import org.rcfaces.core.internal.listener.IScriptListener; import org.rcfaces.core.internal.listener.SortActionListener; import org.rcfaces.core.model.IRangeDataModel; import org.rcfaces.core.model.ISortedComponent; /** * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ public final class GridServerSort { private static final Log LOG = LogFactory.getLog(GridServerSort.class); private static final Long LONG_0 = new Long(0l); private static final Double DOUBLE_0 = new Double(0.0); private static final Map<String, ISortMethod> SORT_ALIASES = new HashMap<String, ISortMethod>( 8); static { SORT_ALIASES.put(ISortEventCapability.SORT_INTEGER, new SortLong()); SORT_ALIASES.put(ISortEventCapability.SORT_NUMBER, new SortDouble()); SORT_ALIASES.put(ISortEventCapability.SORT_ALPHA, new SortAlpha()); SORT_ALIASES.put(ISortEventCapability.SORT_ALPHA_IGNORE_CASE, new SortAlphaIgnoreCase()); SORT_ALIASES.put(ISortEventCapability.SORT_TIME, new SortDate()); SORT_ALIASES.put(ISortEventCapability.SORT_DATE, new SortDate()); } public static int[] computeSortedTranslation(FacesContext facesContext, IGridComponent data, DataModel dataModel, ISortedComponent sortedComponents[]) { ISortMethod< ? > sortMethods[] = new ISortMethod[sortedComponents.length]; for (int i = 0; i < sortMethods.length; i++) { UIColumn columnComponent = (UIColumn) sortedComponents[i] .getComponent(); if ((columnComponent instanceof ISortEventCapability) == false) { continue; } sortMethods[i] = getSortMethod( (ISortEventCapability) columnComponent, data); } int rowCount = data.getRowCount(); List<Object> datas[] = new List[sortedComponents.length]; for (int i = 0; i < datas.length; i++) { if (rowCount > 0) { datas[i] = new ArrayList<Object>(rowCount); } else { datas[i] = new ArrayList<Object>(); } } if (dataModel instanceof IRangeDataModel) { // Charge tout ! ((IRangeDataModel) dataModel).setRowRange(0, rowCount); } try { for (int rowIndex = 0;; rowIndex++) { data.setRowIndex(rowIndex); if (data.isRowAvailable() == false) { break; } Object rowData = null; boolean rowDataInitialized = false; for (int i = 0; i < datas.length; i++) { UIComponent column = sortedComponents[i].getComponent(); Object value = null; if (column instanceof ValueHolder) { value = ValuesTools.getValue(column); } ISortMethod< ? > sortMethod = sortMethods[i]; if (sortMethod == null) { throw new FacesException( "Can not get sort method for column #" + i + " id=" + column.getId()); } value = sortMethod .convertValue(facesContext, column, value); if (value == null) { if (rowDataInitialized == false) { rowDataInitialized = true; rowData = data.getRowData(); } // Avoid crahes when compare // then WHY get the full row Data when the column value // is null ? if (rowData instanceof Comparable) { value = rowData; } } datas[i].add(value); } } } finally { data.setRowIndex(-1); } int translations[] = new int[datas[0].size()]; for (int i = 0; i < translations.length; i++) { translations[i] = i; } if (translations.length < 2) { return translations; } Object ds[][] = new Object[datas.length][]; Comparator<Object> comparators[] = new Comparator[datas.length]; boolean sortOrders[] = new boolean[datas.length]; for (int i = 0; i < ds.length; i++) { ds[i] = datas[i].toArray(); ISortMethod sortMethod = sortMethods[i]; if (sortMethod == null) { throw new FacesException("No sort method #" + i + " for grid '" + ((UIComponent) data).getId() + "' of view '" + facesContext.getViewRoot().getViewId() + "'"); } comparators[i] = sortMethod.getComparator(); sortOrders[i] = sortedComponents[i].isAscending(); } for (int i = 0; i < translations.length; i++) { next_element: for (int j = i; j > 0; j--) { int j0 = translations[j - 1]; int j1 = translations[j]; for (int k = 0; k < sortMethods.length; k++) { Object o1 = ds[k][j0]; Object o2 = ds[k][j1]; if (comparators[k] == null) { continue; } int order = comparators[k].compare(o1, o2); if (order == 0) { continue; } if (sortOrders[k]) { if (order < 0) { break next_element; } } else if (order > 0) { break next_element; } translations[j] = j0; translations[j - 1] = j1; continue next_element; } } } if (LOG.isDebugEnabled()) { Set set2 = new HashSet(translations.length); LOG.debug("Valid SORT translation ..."); for (int i = 0; i < translations.length; i++) { if (set2.add(new Integer(translations[i])) == false) { LOG.debug("*** INVALID TRANSLATION ***"); continue; } } } return translations; } private static ISortMethod< ? > getSortMethod( ISortEventCapability columnComponent, IGridComponent gridComponent) { FacesListener facesListeners[] = columnComponent.listSortListeners(); for (int j = 0; j < facesListeners.length; j++) { FacesListener facesListener = facesListeners[j]; // Priorité coté JAVASCRIPT, on verra le serveur dans un // deuxieme temps ... if (facesListener instanceof SortActionListener) { return new SortAction((SortActionListener) facesListener, (UIComponent) columnComponent, gridComponent); } if ((facesListener instanceof IScriptListener) == false) { continue; } IScriptListener scriptListener = (IScriptListener) facesListener; ISortMethod< ? > sortMethod = (ISortMethod< ? >) SORT_ALIASES .get(scriptListener.getCommand()); if (sortMethod == null) { continue; } return sortMethod; } return null; } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private interface ISortMethod<T> { Comparator<T> getComparator(); Object convertValue(FacesContext facesContext, UIComponent component, Object value); } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static abstract class AbstractSortMethod<T> implements ISortMethod<T>, Comparator<T> { public Comparator<T> getComparator() { return this; } public int compare(T o1, T o2) { if (o1 == null) { return (o2 == null) ? 0 : -1; } else if (o2 == null) { return 1; } return ((Comparable<T>) o1).compareTo(o2); } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortLong extends AbstractSortMethod { public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (value == null) { return LONG_0; } if (value instanceof Number) { return value; } if (value instanceof String) { String s = (String) value; if (s.length() < 1) { return LONG_0; } long l = Long.parseLong(s); if (l == 0l) { return LONG_0; } return new Long(l); } return LONG_0; } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortDouble extends AbstractSortMethod { public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (value == null) { return DOUBLE_0; } if (value instanceof Number) { return value; } if (value instanceof String) { String s = (String) value; if (s.length() < 1) { return DOUBLE_0; } double d = Double.parseDouble(s); if (d == 0.0) { return DOUBLE_0; } return new Double(d); } return DOUBLE_0; } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortAlpha extends AbstractSortMethod { public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (value == null) { return ""; } if (value instanceof String) { return value; } value = ValuesTools.valueToString(value, component, facesContext); if (value == null) { return ""; } return value; } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortAlphaIgnoreCase extends AbstractSortMethod { public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (value == null) { return ""; } if (value instanceof String) { return ((String) value).toLowerCase(); } value = ValuesTools.valueToString(value, component, facesContext); if (value == null) { return ""; } return ((String) value).toLowerCase(); } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortDate extends AbstractSortMethod { public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (value == null) { return null; } if (value instanceof Date) { return value; } throw new FacesException( "Invalid Date for \"date\" sort method ! (class=" + value.getClass() + " object=" + value + ")"); } } /** * * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $) * @version $Revision: 1.4 $ $Date: 2013/11/13 12:53:22 $ */ private static class SortAction extends AbstractSortMethod { private final Comparator comparator; private final SortEvent.ISortConverter converter; public SortAction(SortActionListener listener, UIComponent dataColumnComponent, IGridComponent dataModel) { SortEvent sortEvent = new SortEvent(dataColumnComponent, dataModel); listener.processSort(sortEvent); comparator = sortEvent.getSortComparator(); if (comparator == null) { throw new FacesException("Comparator of sortEvent is NULL !"); } converter = sortEvent.getSortConverter(); } public Object convertValue(FacesContext facesContext, UIComponent component, Object value) { if (converter == null) { return value; } return converter.convertValue(facesContext, component, value); } public Comparator getComparator() { return comparator; } } }
[ "jbmeslin@vedana.com" ]
jbmeslin@vedana.com
5207e2ac5075f0eb5bc25091f1bcd43f2ea5e0bc
95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86
/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/mvc/LazySaveableXML.java
5ce69a6fa983f71c8a7f8e29c28b56af46a19dab
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
NationalSecurityAgency/ghidra
969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d
7cc135eb6bfabd166cbc23f7951dae09a7e03c39
refs/heads/master
2023-08-31T21:20:23.376055
2023-08-29T23:08:54
2023-08-29T23:08:54
173,228,436
45,212
6,204
Apache-2.0
2023-09-14T18:00:39
2019-03-01T03:27:48
Java
UTF-8
Java
false
false
736
java
/* ### * IP: GHIDRA * * 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 ghidra.app.plugin.core.functiongraph.mvc; public abstract class LazySaveableXML extends SaveableXML { public abstract boolean isEmpty(); }
[ "46821332+nsadeveloper789@users.noreply.github.com" ]
46821332+nsadeveloper789@users.noreply.github.com
ea51d8005018a1e83b532167c27b8b2a545fb7d0
2c9003f3c4f3b5182ec1e8dbe7e707eb7fac0031
/src/main/java/com/example/suduko/entity/AlienAddress.java
ea7081f5a87079832ad98d8d00e34c5c6a8354fb
[]
no_license
TamtePrathamesh/sb_mapping
208d5c13a0bec0d2c83ba4057cc80ffa65c00576
34a109a5ded2d173c5b1ef75176be13d9f92ad5c
refs/heads/main
2023-04-04T02:51:17.088554
2021-04-04T05:45:09
2021-04-04T05:45:09
354,465,954
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.example.suduko.entity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.io.Serializable; @Entity @Builder @Table(name = "alien_address") @Data @AllArgsConstructor @NoArgsConstructor public class AlienAddress implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private int id; @Column(name = "planet") private String planet; @OneToOne(mappedBy = "alienAddress") private Alien alien; }
[ "tamteprathamesh@gmail.com" ]
tamteprathamesh@gmail.com
52613698385b5cc9f32431364af116149e8ad244
2354eb072ad00d8d11eb037901cb92f40ea1733b
/upload-service/src/main/java/org/upload/model/RequestInfo.java
2e135b20c69ae4ddd02a80b9bcf51c6cb6c3042b
[]
no_license
mcubillos/sample-spring-microservice-file-reader
830f2c6b09573940e93a8746b399fd4c4141e3e9
fc48f728c45515952d6a6b4d1c63fb5583a8e41d
refs/heads/master
2020-03-19T02:03:11.555805
2018-06-12T20:28:38
2018-06-12T20:28:38
135,594,285
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package org.upload.model; public class RequestInfo { private String filePath; public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } }
[ "cubillos.maria0@gmail.com" ]
cubillos.maria0@gmail.com
493580d39e956048327df3d2714301fd536ad058
e6228437bbbb7c190f7d8e07523089993e35f53d
/src/org/delft/naward07/MapReduce/hdfs/Clustering.java
d1a0e0e7a92b61323328b2d17c7a0ec3ca3c2669
[]
no_license
norvigaward/naward07
5bc5603325fe41f85ff36f5169441ca45907d12e
121874c3531d9471d78fa708fd7d145468b97c0e
refs/heads/master
2021-01-01T10:40:02.332187
2014-08-31T22:10:14
2014-08-31T22:10:14
19,768,867
3
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package org.delft.naward07.MapReduce.hdfs; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation; /** * @author Feng Wang */ public class Clustering implements Runnable { private String path; private String outPath; public Clustering(String path, String outPath) { this.path = path; this.outPath = outPath; } @Override public void run() { System.out.println("test3"); // PropertyConfigurator.configure("log4jconfig.properties"); final Configuration conf = new Configuration(); // The core-site.xml and hdfs-site.xml are cluster specific. If you wish to use this on other clusters adapt the files as needed. conf.addResource(Clustering.class.getResourceAsStream("/nl/surfsara/warcexamples/hdfs/resources/core-site.xml")); conf.addResource(Clustering.class.getResourceAsStream("/nl/surfsara/warcexamples/hdfs/resources/hdfs-site.xml")); System.out.println("test4"); conf.set("hadoop.security.authentication", "kerberos"); conf.set("hadoop.security.authorization", "true"); System.setProperty("java.security.krb5.realm", "CUA.SURFSARA.NL"); System.setProperty("java.security.krb5.kdc", "kdc.hathi.surfsara.nl"); UserGroupInformation.setConfiguration(conf); UserGroupInformation loginUser; try { loginUser = UserGroupInformation.getLoginUser(); System.out.println("Logged in as: " + loginUser.getUserName()); RunClustering runClustering = new RunClustering(conf, path, outPath); loginUser.doAs(runClustering); } catch (IOException e) { // Just dump the error.. e.printStackTrace(); } } }
[ "greatwf@163.com" ]
greatwf@163.com
d047eb49d5f0b0c0835482f82755526efd80efe8
5ae0937ba000377673dc701adbed8f211b493c12
/src/main/java/me/charlesj/apu/DividerListener.java
d0458312dc3aa34171df5c9cf4f97ef9cf5d7079
[]
no_license
serach24/NES-Emulator
00e333fdece8f9a5feaafb2c2de77a09366bc687
a9102bdb5fbb56c98cbcdc58b03d58d22ab91415
refs/heads/master
2022-12-27T14:42:28.439891
2020-05-11T23:19:30
2020-05-11T23:19:30
262,898,014
6
1
null
2020-10-13T21:55:08
2020-05-11T00:00:49
Java
UTF-8
Java
false
false
127
java
package me.charlesj.apu; /** * 2020/2/3. */ public interface DividerListener { void onClock(Divider divider); }
[ "jiangchenhao2@outlook.com" ]
jiangchenhao2@outlook.com
41fcec09fc54b8cebf4e0f22cb72b7488b371f27
03d61086047f041168f9a77b02a63a9af83f0f3f
/newrelic/src/main/java/com/newrelic/agent/deps/org/yaml/snakeyaml/reader/UnicodeReader.java
039372946e558bbda0f012ccac624c70836f839b
[]
no_license
masonmei/mx2
fa53a0b237c9e2b5a7c151999732270b4f9c4f78
5a4adc268ac1e52af1adf07db7a761fac4c83fbf
refs/heads/master
2021-01-25T10:16:14.807472
2015-07-30T21:49:33
2015-07-30T21:49:35
39,944,476
1
0
null
null
null
null
UTF-8
Java
false
false
1,851
java
// // Decompiled by Procyon v0.5.29 // package com.newrelic.agent.deps.org.yaml.snakeyaml.reader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PushbackInputStream; import java.io.Reader; public class UnicodeReader extends Reader { PushbackInputStream internalIn; InputStreamReader internalIn2; private static final int BOM_SIZE = 3; public UnicodeReader(final InputStream in) { this.internalIn2 = null; this.internalIn = new PushbackInputStream(in, 3); } public String getEncoding() { return this.internalIn2.getEncoding(); } protected void init() throws IOException { if (this.internalIn2 != null) { return; } final byte[] bom = new byte[3]; final int n = this.internalIn.read(bom, 0, bom.length); String encoding; int unread; if (bom[0] == -17 && bom[1] == -69 && bom[2] == -65) { encoding = "UTF-8"; unread = n - 3; } else if (bom[0] == -2 && bom[1] == -1) { encoding = "UTF-16BE"; unread = n - 2; } else if (bom[0] == -1 && bom[1] == -2) { encoding = "UTF-16LE"; unread = n - 2; } else { encoding = "UTF-8"; unread = n; } if (unread > 0) { this.internalIn.unread(bom, n - unread, unread); } this.internalIn2 = new InputStreamReader(this.internalIn, encoding); } public void close() throws IOException { this.init(); this.internalIn2.close(); } public int read(final char[] cbuf, final int off, final int len) throws IOException { this.init(); return this.internalIn2.read(cbuf, off, len); } }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
cd8b7a380490624ff17fcefd3f0baa58b1753af5
dbe59da45f4cee95debb721141aeab16f44b4cac
/src/main/java/com/syuesoft/sell/model/XsSuppliertraderAccount.java
802a995df33a398d4cd8a25f80022d7aa1fb7157
[]
no_license
tonyliu830204/UESoft
5a8a546107f2093ee920facf6d93eedd1affd248
9dd48ff19f40556d1892688f6426e4bfe68c7d10
refs/heads/master
2021-01-23T15:51:00.782632
2014-03-26T15:56:46
2014-03-26T15:56:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,303
java
package com.syuesoft.sell.model; import java.sql.Timestamp; import java.util.Date; import java.util.HashSet; import java.util.Set; /** * XsSuppliertraderAccount entity. @author MyEclipse Persistence Tools */ public class XsSuppliertraderAccount implements java.io.Serializable { // Fields private Integer enterpriseId; private Integer accountId; private String accountCode; private String remark; private Integer instorehouseId; private Integer accountPerson; private Date accountDate; private Double accountSun; private Double accountBalance; private Double accountMoney; private Integer accountType; private Set xsSupplierAccountlogs = new HashSet(0); // Constructors /** default constructor */ public XsSuppliertraderAccount() { } /** full constructor */ public XsSuppliertraderAccount(String accountCode, Integer instorehouseId, Integer accountPerson, Timestamp accountDate, Double accountSun, Double accountBalance, Double accountMoney, Integer accountType, Set xsSupplierAccountlogs) { this.accountCode = accountCode; this.instorehouseId = instorehouseId; this.accountPerson = accountPerson; this.accountDate = accountDate; this.accountSun = accountSun; this.accountBalance = accountBalance; this.accountMoney = accountMoney; this.accountType = accountType; this.xsSupplierAccountlogs = xsSupplierAccountlogs; } // Property accessors public Integer getAccountId() { return this.accountId; } public Integer getEnterpriseId() { return enterpriseId; } public void setEnterpriseId(Integer enterpriseId) { this.enterpriseId = enterpriseId; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public void setAccountId(Integer accountId) { this.accountId = accountId; } public String getAccountCode() { return this.accountCode; } public void setAccountCode(String accountCode) { this.accountCode = accountCode; } public Integer getInstorehouseId() { return this.instorehouseId; } public void setInstorehouseId(Integer instorehouseId) { this.instorehouseId = instorehouseId; } public Integer getAccountPerson() { return this.accountPerson; } public void setAccountPerson(Integer accountPerson) { this.accountPerson = accountPerson; } public Date getAccountDate() { return this.accountDate; } public void setAccountDate(Date accountDate) { this.accountDate = accountDate; } public Double getAccountSun() { return this.accountSun; } public void setAccountSun(Double accountSun) { this.accountSun = accountSun; } public Double getAccountBalance() { return this.accountBalance; } public void setAccountBalance(Double accountBalance) { this.accountBalance = accountBalance; } public Double getAccountMoney() { return this.accountMoney; } public void setAccountMoney(Double accountMoney) { this.accountMoney = accountMoney; } public Integer getAccountType() { return this.accountType; } public void setAccountType(Integer accountType) { this.accountType = accountType; } public Set getXsSupplierAccountlogs() { return this.xsSupplierAccountlogs; } public void setXsSupplierAccountlogs(Set xsSupplierAccountlogs) { this.xsSupplierAccountlogs = xsSupplierAccountlogs; } }
[ "liweinan0423@gmail.com" ]
liweinan0423@gmail.com
5f6c3d6cb98f3c32d30cd744b37be48bfeff09af
9574ef260fe351f5cdfed8753a1a4fb919517c15
/src/main/java/org/teachmeskills/project/application/utils/Input.java
757823e9bd146b2e9299e796b5393dffb38475f7
[]
no_license
VilchinskiOleg/transport-company-app
cf67a2784647787c905d65d5e4660e248a0106a4
3c038f4dec218ed1cbb6b02305cbf258365d4f04
refs/heads/master
2023-01-29T22:09:24.989283
2020-12-10T21:23:06
2020-12-10T21:23:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,565
java
package org.teachmeskills.project.application.utils; import org.teachmeskills.project.entitiy.TypeTransport; import java.util.Scanner; public class Input { private static Scanner scanner = new Scanner(System.in); public static int getInt() { if (scanner.hasNextInt()) { int number = scanner.nextInt(); scanner.nextLine(); return number; } System.out.println(scanner.nextLine() + " - это не целое число. Поаторите ввод."); return getInt(); } public static int getInt(String massage) { System.out.println(massage); return getInt(); } public static double getDouble() { if (scanner.hasNextDouble()) { double number = scanner.nextDouble(); scanner.nextLine(); return number; } System.out.println(scanner.nextLine() + " - это не число с плавающей точкой. Поаторите ввод."); return getDouble(); } public static double getDouble(String massage) { System.out.println(massage); return getDouble(); } public static String getString() { return scanner.nextLine(); } public static String getString(String massage) { System.out.println(massage); return getString(); } public static boolean getBoolean() { String answer = scanner.nextLine().trim(); if (!(answer.equals("Yes") || answer.equals("No"))) { System.out.println("Не корректный ответ. Повторите ввод."); return getBoolean(); } return answer.equals("Yes"); } public static boolean getBoolean(String massage) { System.out.println(massage + "Yes/No"); return getBoolean(); } public static TypeTransport getTypeTransport() { System.out.println("Выберите тип транспорта:"); showTypes(); return getType(); } private static void showTypes() { for (TypeTransport type : TypeTransport.values()) System.out.println(type.getIdType() + " - " + type.getType()); } private static TypeTransport getType() { int result = getInt(); if (result <= 0 || result > TypeTransport.values().length) { System.out.println("Не корректный ответ. Повторите ввод."); return getType(); } return TypeTransport.values()[result - 1]; } }
[ "vin76423@gmail.com" ]
vin76423@gmail.com
47c5ed2a31f06ca535a9defe163a1a5eccd3bde5
a6cf573d5d5c4fa12d8ba78b3379c0e41740b06d
/src/com/Java8/demo/StaticMethods/MyDataImpl.java
207e28fd9e8853c347cdf1380bdc65fd22f76b28
[]
no_license
ardianalok/java-8-features
510c0fbf4ceacd2aa66bb8518343e0ed59942761
8be27e78fb594dbfd9b034cd6bd60318d1218dd1
refs/heads/master
2021-08-30T13:52:39.794412
2017-12-18T07:01:47
2017-12-18T07:01:47
null
0
0
null
null
null
null
MacCentralEurope
Java
false
false
643
java
package com.Java8.demo.StaticMethods; //letís see an implementation class that is having isNull() method with poor implementation. public class MyDataImpl implements MyData { public boolean isNull(String str) { System.out.println("Impl Null Check"); return str == null ? true : false; } public static void main(String args[]){ MyDataImpl obj = new MyDataImpl(); obj.print(""); obj.isNull("abc"); /* Note that isNull(String str) is a simple class method, itís not overriding the interface method. For example, if we will add @Override annotation to the isNull() method, it will result in compiler error.*/ } }
[ "alok.k.yadav@ge.com" ]
alok.k.yadav@ge.com
5c8dc93dfdb99b2b97a986231ab2cbf3ac4c5008
7082c3df0fcec950e1930740140bcc66d810b065
/Part2/chapter5/SamplePager/app/src/main/java/com/example/samplepager/Fragment3.java
88c80010462eef04954ad563f72c5eb4285d6cbb
[]
no_license
limjh0513/Doit_Android
af8c818c9f6a8a8f032c5099910ab671e306b7d7
aca0730727ac560e3f04d0e40cc52d2593ccd537
refs/heads/main
2023-04-04T01:27:09.289508
2021-03-26T13:29:00
2021-03-26T13:29:00
332,646,063
0
0
null
null
null
null
UTF-8
Java
false
false
511
java
package com.example.samplepager; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.fragment.app.Fragment; public class Fragment3 extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment3, container, false); } }
[ "hwayaqueen1@naver.com" ]
hwayaqueen1@naver.com
75642f03667447aedab7fc5084fd8416a87a23d2
8b695fc59af9228837d798fd8eb900fa09f21db5
/src/org/mjsip/sdp/field/KeyParam.java
feccd3e72461e1b17b66102d72e830418886be78
[]
no_license
k1995/mjsipME
08e1b5e96f962201bb2cd53f58582991daff02db
557318304bc01114621b9977b0fa747de656c87b
refs/heads/main
2023-08-15T00:13:06.939618
2021-09-19T14:56:24
2021-09-19T14:56:24
408,155,865
0
0
null
null
null
null
UTF-8
Java
false
false
1,749
java
/* * Copyright (C) 2010 Luca Veltri - University of Parma - Italy * * This file is part of MjSip (http://www.mjsip.org) * * MjSip 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 2 of the License, or * (at your option) any later version. * * MjSip 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 MjSip; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author(s): * Luca Veltri (luca.veltri@unipr.it) */ package org.mjsip.sdp.field; import org.zoolu.util.Parser; /** Key-param of a crypto attribute field. */ public class KeyParam { /** Key-param value */ String value; /** Creates a new KeyParam. */ public KeyParam(String key_method, String key_info) { value=key_method+":"+key_info; } /** Creates a new KeyParam. */ public KeyParam(String key_param) { value=key_param; } /** Creates a new KeyParam. */ public KeyParam(KeyParam kp) { value=kp.value; } /** Gets the key-method. */ public String getKeyMethod() { Parser par=new Parser(value); char[] delim={':'}; return par.getWord(delim); } /** Gets the key-info. */ public String getKeyInfo() { Parser par=new Parser(value); return par.goTo(':').skipChar().getString(); } /** Converts this object to String. */ public String toString() { return value; } }
[ "k1995328@gmail.com" ]
k1995328@gmail.com
875b0e4072418106920a3143a2a6a4365840c198
018adaf5f1e17065845e1b8fcad32e7c3eab74c6
/paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/mapper/UacGroupUserMapper.java
f9674552845a002f60998cefd22da15ab5eb83d3
[]
no_license
wangwuuw/surpermarket
e367f4daf9581acb48abf9c415ce718fb6b3e5ef
5f0a1b7643d6bbfe276937eafbb99c5bc887100d
refs/heads/master
2020-04-28T15:12:43.642801
2019-03-13T07:54:43
2019-03-13T07:54:43
175,364,625
0
0
null
null
null
null
UTF-8
Java
false
false
1,916
java
/* * Copyright (c) 2018. paascloud.net All Rights Reserved. * 项目名称:paascloud快速搭建企业级分布式微服务平台 * 类名称:UacGroupUserMapper.java * 创建人:刘兆明 * 联系方式:paascloud.net@gmail.com * 开源地址: https://github.com/paascloud * 博客地址: http://blog.paascloud.net * 项目官网: http://paascloud.net */ package com.paascloud.provider.mapper; import com.paascloud.core.mybatis.MyMapper; import com.paascloud.provider.model.domain.UacGroup; import com.paascloud.provider.model.domain.UacGroupUser; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; import java.util.List; /** * The interface Uac group user mapper. * * @author paascloud.net@gmail.com */ @Mapper @Component public interface UacGroupUserMapper extends MyMapper<UacGroupUser> { /** * Query by user id uac group user. * * @param userId the user id * * @return the uac group user */ UacGroupUser getByUserId(Long userId); /** * Update by user id int. * * @param uacGroupUser the uac group user * * @return the int */ int updateByUserId(UacGroupUser uacGroupUser); /** * Select group list by user id list. * * @param userId the user id * * @return the list */ List<UacGroup> selectGroupListByUserId(Long userId); /** * List by group id list. * * @param groupId the group id * * @return the list */ List<UacGroupUser> listByGroupId(@Param("groupId") Long groupId); /** * Delete exclude super mng int. * * @param groupId the group id * @param superManagerRoleId the super manager role id * * @return the int */ int deleteExcludeSuperMng(@Param("currentGroupId") Long groupId, @Param("superManagerRoleId") Long superManagerRoleId); }
[ "wangwu123mtr@sina.com" ]
wangwu123mtr@sina.com
bbc5bc68bb38532f2ac31a58bb83b25a8a8d963e
fb40408fe856a4dc6b158abacdfe9572de7557cc
/src/com/service/AreasServiceImpl.java
07ef2018df628c5d24a7cae6de2ae7ecd43205af
[]
no_license
duxingluochen/stussh
c7df748d1db917d70bb13f87f24b0410667b8e2e
76020b4ee1a9e86cee13a8f98916d21650859a28
refs/heads/master
2021-05-02T02:53:46.040580
2018-02-09T10:04:45
2018-02-09T10:04:45
120,888,746
0
0
null
null
null
null
GB18030
Java
false
false
1,291
java
package com.service; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.beans.AreasCustom; import com.beans.AreasQueryVo; import com.mapper.AreasMapper; @Transactional @Service(value="areasService") public class AreasServiceImpl implements AreasService { @Resource(name="areasMapper") private AreasMapper areasMapper; @Override public List<AreasCustom> queryareas() { return areasMapper.queryareas(); } @Override public boolean deleteareas(int id) { return areasMapper.deleteareas(id); } /** * 根据id查找 */ @Override public AreasCustom queryareasup(int id) { return areasMapper.queryareasup(id); } /** * 去重查询上级 */ @Override public List<AreasCustom> queryprovince() { return areasMapper.queryprovince(); } /** * 去掉重复的地区类型 */ @Override public List<AreasCustom> queryareatype() { return areasMapper.queryareatype(); } /** * 根据id修改地区 */ @Override public boolean updatareas(AreasQueryVo areasQueryVo) { return areasMapper.updatareas(areasQueryVo); } }
[ "359401754@qq.com" ]
359401754@qq.com
a8b5ea366b4b9c41cd7ca7d6dabb108a830f081a
741c50a0da38f213060ff37052c66934bce918eb
/src/main/java/AutomationFramework/SeleniumGrid/App.java
15cec4a6e0e8e09c211e922ba0c883d76cc289c0
[]
no_license
avietlobo/SeleniumGridProject
17c0fffe6696a6519ae19521c22d114d78a9939c
6d460d26ff027f9acf967ed3aae22fb5477dc95b
refs/heads/master
2023-05-15T03:19:11.047155
2020-06-04T10:10:48
2020-06-04T10:10:48
269,289,230
0
0
null
2023-05-09T18:46:42
2020-06-04T07:24:38
HTML
UTF-8
Java
false
false
195
java
package AutomationFramework.SeleniumGrid; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "avietlobo@gmail.com" ]
avietlobo@gmail.com
3b15789de07217b06374c059174fe3fea77fc0c1
071a0709ba083c8248d7606b8fcbc88352738fe5
/src/timeflow/data/db/filter/StringMatchFilter.java
6b9d6500b4afa1b30668b9f2231a615f8ab9ebd4
[]
no_license
mmistretta/TimeFlow
bfc601d5b439b452846e76eeb18bdab2b13bbf3c
0bdd6dfb53b78bcd9d5dd1070df2740e19975f2a
refs/heads/master
2021-01-17T08:09:23.558039
2013-10-13T20:44:42
2013-10-13T20:44:42
13,530,927
0
1
null
null
null
null
UTF-8
Java
false
false
1,539
java
package timeflow.data.db.filter; import timeflow.data.db.*; import timeflow.data.time.*; import java.util.regex.*; public class StringMatchFilter extends ActFilter { private Field[] textFields; private Field[] listFields; private String query=""; private boolean isRegex=false; private Pattern pattern; public StringMatchFilter(ActDB db, boolean isRegex) { this(db,"", isRegex); } public StringMatchFilter(ActDB db, String query, boolean isRegex) { textFields=(Field[])db.getFields(String.class).toArray(new Field[0]); listFields=(Field[])db.getFields(String[].class).toArray(new Field[0]); this.isRegex=isRegex; setQuery(query); } public String getQuery() { return query; } public void setQuery(String query) { this.query=query; if (isRegex) { pattern=Pattern.compile(query, Pattern.CASE_INSENSITIVE+Pattern.MULTILINE+Pattern.DOTALL); } else this.query=query.toLowerCase(); } @Override public boolean accept(Act act) { // check text fields for (int i=0; i<textFields.length; i++) { String s=act.getString(textFields[i]); if (s==null) continue; if (isRegex ? pattern.matcher(s).find() : s.toLowerCase().contains(query)) return true; } // check list fields for (int j=0; j<listFields.length; j++) { String[] m=act.getTextList(listFields[j]); if (m!=null) for (int i=0; i<m.length; i++) { String s=m[i]; if (isRegex ? pattern.matcher(s).find() : s.toLowerCase().contains(query)) return true; } } return false; } }
[ "martin@new-host.home" ]
martin@new-host.home
cb0392b85d143fc9df34819ae7cc60f426a84976
4f9f13d92aa7ccb265d4356bd70895a87f44982c
/app/src/main/java/com/pointhub/db/DatabaseHelper.java
6d16c176e7eff24bb1f1be345912791fd7720c9d
[]
no_license
venugopalbeetkuri/PointHub
e58defb94af25564b7d0690082fc1d72af433b90
c67d829527b13bebffb9f0875d5b39fd551ebbd0
refs/heads/master
2020-05-29T15:15:25.172350
2016-09-06T10:11:03
2016-09-06T10:11:03
63,421,248
1
0
null
null
null
null
UTF-8
Java
false
false
5,258
java
package com.pointhub.db; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Locale; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; /** * Created by Venu on 02/05/2016. */ public class DatabaseHelper extends SQLiteOpenHelper { // Logcat tag private static final String LOG = "DatabaseHelper"; // Database Version private static final int DATABASE_VERSION = 1; // Database Name private static final String DATABASE_NAME = "pointshub"; // Table Names private static final String TABLE_POINTS = "points"; // Common column names private static final String KEY_ID = "id"; private static final String STORE_NAME = "store_name"; private static final String POINTS = "points"; private static final String LAST_VISITED = "last_visited"; // Table Create Statements // Todo table create statement private static final String CREATE_TABLE_POINTS = "CREATE TABLE " + TABLE_POINTS + "(" + KEY_ID + " INTEGER PRIMARY KEY," + STORE_NAME + " TEXT," + POINTS + " TEXT," + LAST_VISITED + " TEXT" + ")"; public DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } private static Context context; private static DatabaseHelper helper; // private User currentUser; public static DatabaseHelper getInstance(Context context) { if(helper == null) { helper = new DatabaseHelper(context); } return helper; } @Override public void onCreate(SQLiteDatabase db) { // creating required tables db.execSQL(CREATE_TABLE_POINTS); // db.execSQL(CREATE_TABLE_USER); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // on upgrade drop older tables db.execSQL("DROP TABLE IF EXISTS " + CREATE_TABLE_POINTS); // create new tables onCreate(db); } // ------------------------ "todos" table methods ----------------// /* * Creating a todo */ public long createPoints(Points points) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(STORE_NAME, points.getStoreName()); values.put(POINTS, points.getPoints()); values.put(LAST_VISITED, points.getLastVisited()); // insert row long todo_id = db.insert(TABLE_POINTS, null, values); return todo_id; } /* * get single todo */ public Points getPoints(String storeName) { Points point = null; try { SQLiteDatabase db = this.getReadableDatabase(); String selectQuery = "SELECT * FROM " + TABLE_POINTS + " WHERE " + STORE_NAME + " like '" + storeName + "'"; Log.e(LOG, selectQuery); Cursor c = db.rawQuery(selectQuery, null); if (c != null && c.getCount()>0) { c.moveToFirst(); } else { return point; } point = new Points(); // point.setLastVisited(c.getString(c.getColumnIndex(LAST_VISITED))); point.setStoreName(c.getString(c.getColumnIndex(STORE_NAME))); point.setPoints(c.getString(c.getColumnIndex(POINTS))); point.setId(c.getInt(c.getColumnIndex(KEY_ID))); } catch (Exception ex) { ex.printStackTrace(); } return point; } /** * getting all todos * */ public List<Points> getAllPoints() { List<Points> todos = new ArrayList<Points>(); String selectQuery = "SELECT * FROM " + TABLE_POINTS; Log.e(LOG, selectQuery); SQLiteDatabase db = this.getReadableDatabase(); Cursor c = db.rawQuery(selectQuery, null); // looping through all rows and adding to list if (c.moveToFirst()) { do { Points point = new Points(); point.setLastVisited(c.getString(c.getColumnIndex(LAST_VISITED))); point.setStoreName(c.getString(c.getColumnIndex(STORE_NAME))); point.setPoints(c.getString(c.getColumnIndex(POINTS))); point.setId(c.getInt(c.getColumnIndex(KEY_ID))); // adding to todo list todos.add(point); } while (c.moveToNext()); } return todos; } /* * Updating a todo */ public int updatePoints(Points points) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(POINTS, points.getPoints()); values.put(STORE_NAME, points.getStoreName()); values.put(LAST_VISITED, points.getLastVisited()); // updating row return db.update(TABLE_POINTS, values, STORE_NAME + " = ?", new String[] { points.getStoreName() }); } /* * Deleting a todo */ public void deletePoint(String storeName) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_POINTS, STORE_NAME + " = ?", new String[] { storeName }); } public void deletePoint(int id) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_POINTS, KEY_ID + " = ?", new String[] { id+"" }); } // closing database public void closeDB() { SQLiteDatabase db = this.getReadableDatabase(); if (db != null && db.isOpen()) db.close(); } /** * get datetime * */ public String getDateTime() { SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss", Locale.getDefault()); Date date = new Date(); return dateFormat.format(date); } }
[ "venugopalbeetkuri@gmail.com" ]
venugopalbeetkuri@gmail.com
089fb41b1ee418876d8d1cac9cf3f84cec873452
e723dd5f7cdda19ee80c4ce82e8394296c43706d
/ontrack-extension/ontrack-extension-svn/src/main/java/net/ontrack/extension/svn/dao/jdbc/IssueRevisionJdbcDao.java
f31246abde84eeccc0eedb3bb5882d8d7c5cb1b6
[ "MIT" ]
permissive
cpf/ontrack
9422a89b15238194c9ba05b78bbc6d0a4afcad8f
15a1d66c2841f964fd4cbc612c62c806631399d2
refs/heads/master
2021-01-18T08:55:47.368338
2014-01-31T10:52:31
2014-01-31T10:52:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,441
java
package net.ontrack.extension.svn.dao.jdbc; import net.ontrack.dao.AbstractJdbcDao; import net.ontrack.extension.svn.dao.IssueRevisionDao; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.sql.DataSource; import java.util.List; @Component public class IssueRevisionJdbcDao extends AbstractJdbcDao implements IssueRevisionDao { private static final int ISSUE_KEY_MAX_LENGTH = 20; private final Logger logger = LoggerFactory.getLogger(IssueRevisionDao.class); @Autowired public IssueRevisionJdbcDao(DataSource dataSource) { super(dataSource); } @Override @Transactional public void link(long revision, String key) { if (StringUtils.isBlank(key)) { logger.warn("Cannot insert a null or blank key (revision {})", revision); } else if (key.length() > ISSUE_KEY_MAX_LENGTH) { logger.warn("Cannot insert a key longer than {} characters: {} for revision {}", ISSUE_KEY_MAX_LENGTH, key, revision); } else { getNamedParameterJdbcTemplate().update( "INSERT INTO REVISION_ISSUE (REVISION, ISSUE) VALUES (:revision, :key)", params("revision", revision).addValue("key", key)); } } @Override @Transactional(readOnly = true) public List<String> findIssuesByRevision(long revision) { return getNamedParameterJdbcTemplate().queryForList( "SELECT ISSUE FROM REVISION_ISSUE WHERE REVISION = :revision ORDER BY ISSUE", params("revision", revision), String.class ); } @Override @Transactional(readOnly = true) public boolean isIndexed(String key) { return getFirstItem( "SELECT ISSUE FROM REVISION_ISSUE WHERE ISSUE = :key", params("key", key), String.class) != null; } @Override @Transactional(readOnly = true) public List<Long> findRevisionsByIssue(String key) { return getNamedParameterJdbcTemplate().queryForList( "SELECT REVISION FROM REVISION_ISSUE WHERE ISSUE = :key ORDER BY REVISION DESC", params("key", key), Long.class); } }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
8bf28e0cb670bcff82e29fd48545d91e15e6478a
2177f9092108d66d6b1c80cc503fcb2aba708519
/src/cn/edustar/usermgr/service/impl/UserServiceImpl.java
d24717f13523af9f61e8026f3cb418c4f18b7461
[]
no_license
yxxcrtd/UserMgr2_branches
6b05705e2b0423711928883993ecdaef32069943
c4a4ad90b174b1f4731791e1f6054c0992f50082
refs/heads/master
2020-05-31T20:21:48.195613
2019-06-05T22:01:06
2019-06-05T22:01:06
190,474,498
0
0
null
null
null
null
UTF-8
Java
false
false
5,148
java
package cn.edustar.usermgr.service.impl; import java.util.Date; import cn.edustar.usermgr.pojos.Ticket; import cn.edustar.usermgr.pojos.User; import cn.edustar.usermgr.service.UserService; import cn.edustar.usermgr.service.impl.base.BaseServiceImpl; import cn.edustar.usermgr.util.MD5; /** * UserService * * @author Yang XinXin * @version 2.0.0, 2010-09-02 11:03:12 */ public class UserServiceImpl extends BaseServiceImpl implements UserService { /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#getUserByQueryString(java.lang.String) */ public User getUserByQueryString(String queryString) { if (queryString.contains("@")) { return userDao.getUserByQueryString("email", queryString); } else { return userDao.getUserByQueryString("username", queryString); } } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#getUserCounts() */ public int getUserCounts() { return userDao.getUserCounts(); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#createUserTicket(java.lang.String) */ public Ticket createUserTicket(String username) { Ticket ticket = new Ticket(username); HASHMAP_TICKET.put(ticket.getTicket(), ticket); return ticket; } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#saveOrUpdate(cn.edustar.usermgr.pojos.User) */ public void saveOrUpdate(User user) { userDao.saveOrUpdate(user); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#getUserByUserTicket(java.lang.String) */ public User getUserByUserTicket(String userTicket) { if (null == userTicket || "".equals(userTicket) || userTicket.length() == 0) { return null; } Ticket ticket = getTicketByUserTicket(userTicket); if (null == ticket) { return null; } if (null == ticket.getUsername() || "".equals(ticket.getUsername()) || ticket.getUsername().length() < 0) { return null; } ticket.setLastAccessed(new Date()); return getUserByQueryString(ticket.getUsername()); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#getTicketByUserTicket(java.lang.String) */ public Ticket getTicketByUserTicket(String userTicket) { Ticket ticket = HASHMAP_TICKET.get(userTicket); if (null != ticket) { if (null == ticket.getLastAccessed()) { return null; } } return ticket; } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#verifyUser(java.lang.String) */ public String verifyUser(String username) { User user = getUserByQueryString(username); if (null != user) { if (null == user.getQuestion() || "".equals(user.getQuestion())) { return NULL; } return user.getQuestion(); } else { return ERROR; } } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#verifyAnswer(java.lang.String, java.lang.String) */ public String verifyAnswer(String username, String answer) { User user = getUserByQueryString(username); if (null != user) { if (user.getAnswer().equals(MD5.toMD5(answer))) { return SUCCESS; } else { return ERROR; } } else { return ""; } } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#resetPassword(java.lang.String, java.lang.String) */ public String resetPassword(String username, String password) { User user = getUserByQueryString(username); if (null != user) { user.setPassword(MD5.toMD5(password)); userDao.saveOrUpdate(user); return SUCCESS; } else { return ""; } } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#updatePasswordByUsername(java.lang.String, java.lang.String) */ public void updatePasswordByUsername(String username, String password) { userDao.updatePasswordByUsername(username, MD5.toMD5(password)); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#updateUserInfoByUsername(java.lang.String, int) */ public void updateUserInfoByUsername(String username, String trueName, String email, int role) { userDao.updateUserInfoByUsername(username, trueName, email, role); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#resetQuestionAndAnswerByUsername(java.lang.String, java.lang.String, java.lang.String) */ public void resetQuestionAndAnswerByUsername(String username, String question, String answer) { userDao.resetQuestionAndAnswerByUsername(username, question, MD5.toMD5(answer)); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#updateStatusByUsername(java.lang.String, int) */ public void updateStatusByUsername(String username, int status) { userDao.updateStatusByUsername(username, status); } /* (non-Javadoc) * * @see cn.edustar.usermgr.service.UserService#deleteUser(java.lang.String) */ public void deleteUser(String username) { if (!"".equals(username) || null != username) { userDao.deleteUser(getUserByQueryString(username)); } } }
[ "yxxcrtd@gmail.com" ]
yxxcrtd@gmail.com
cea76151e65bde265836af0e2881ddca6cd07117
bd882b28a7b644896d2e80b1528fca26693360ad
/src/com/javaex/io/FileStreamEx.java
17d24cb670a4e49ba96523b59eae9cb9ef956feb
[]
no_license
yoonchaiyoung/javaex
3e2f5e13aeac9e0d6c407df48b25f3c92cf79a99
00303847f5e8e4d45d252cf5af9c5a6f57b2b65f
refs/heads/master
2022-12-14T23:28:05.468136
2020-09-21T06:42:45
2020-09-21T06:42:45
295,352,540
0
0
null
null
null
null
UTF-8
Java
false
false
993
java
package com.javaex.io; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class FileStreamEx { private static String rootPath = System.getProperty("user.dir") + "\\files\\"; private static String src = rootPath + "img.jpg"; private static String tgt = rootPath + "img_copy.jpg"; public static void main(String[] args) { // files\img.jpg를 입력 // files\img_copy.jpg로 출력 try { InputStream is = new FileInputStream(src); OutputStream os = new FileOutputStream(tgt); int data = 0; while((data = is.read()) != -1) { os.write(data); } os.close(); is.close(); System.out.println("파일을 복사했어요."); } catch (FileNotFoundException e) { System.err.println("파일을 찾을 수 없어요."); } catch (IOException e) { System.err.println(e.getMessage()); } } }
[ "domo62@naver.com" ]
domo62@naver.com
570a5dcc0a025772af19b77ad18a8fbcc806960d
cabbf8d0bd891ef3ffb257e481f417388f887033
/jack-compiler/src/test/java/com/akwabasystems/ExpressionTests.java
c85ea627e264ef33ba78769f3597235664f98030
[]
no_license
akwabasystems/nand2tetris
8b2b453a528c6ebc22059ddf1f7b7784fc04ac41
503e4f97a4ba16957cd418faae04195d419ddbce
refs/heads/develop
2021-06-24T22:16:39.693378
2020-10-13T23:11:32
2020-10-13T23:11:32
135,829,149
0
1
null
2020-10-13T23:11:33
2018-06-02T15:25:20
Java
UTF-8
Java
false
false
27,105
java
package com.akwabasystems; import com.akwabasystems.parsing.XMLCompilationEngine; import com.akwabasystems.parsing.JackTokenizer; import com.akwabasystems.parsing.Tokenizer; import junit.framework.TestCase; public class ExpressionTests extends TestCase { public void testTerminalOrKeywordConstants() { StringBuilder input = new StringBuilder(); input.append("class Main {\n") .append(" function void test() { // Added to test Jack syntax that is not use in\n") .append(" var String s; // the Square files.\n") .append(" var Array a;\n") .append("\n") .append(" if (false) {\n") .append(" let s = \"string constant\";\n") .append(" let s = null;\n") .append(" }\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Main </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> test </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<varDec>\n") .append("<keyword> var </keyword>\n") .append("<identifier> String </identifier>\n") .append("<identifier> s </identifier>\n") .append("<symbol> ; </symbol>\n") .append("</varDec>\n") .append("<varDec>\n") .append("<keyword> var </keyword>\n") .append("<identifier> Array </identifier>\n") .append("<identifier> a </identifier>\n") .append("<symbol> ; </symbol>\n") .append("</varDec>\n") .append("<statements>\n") .append("<ifStatement>\n") .append("<keyword> if </keyword>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<keyword> false </keyword>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> s </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<stringConstant> string constant </stringConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> s </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<keyword> null </keyword>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</ifStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testUnaryOperatorTerm() { StringBuilder input = new StringBuilder(); input.append("class Main {\n") .append(" function void test() {\n") .append(" let i = -j;\n") .append(" let j = j + 1;\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Main </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> test </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> i </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> - </symbol>\n") .append("<term>\n") .append("<identifier> j </identifier>\n") .append("</term>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> j </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> j </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<integerConstant> 1 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testOperatorTerms() { StringBuilder input = new StringBuilder(); input.append("class Main {\n") .append(" function void test() {\n") .append(" let i = i * (-j);\n") .append(" let j = j / (-2); // note: unary negate constant 2\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Main </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> test </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> i </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> i </identifier>\n") .append("</term>\n") .append("<symbol> * </symbol>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> - </symbol>\n") .append("<term>\n") .append("<identifier> j </identifier>\n") .append("</term>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> j </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> j </identifier>\n") .append("</term>\n") .append("<symbol> / </symbol>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> - </symbol>\n") .append("<term>\n") .append("<integerConstant> 2 </integerConstant>\n") .append("</term>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testParenthesizedExpression() { StringBuilder input = new StringBuilder(); input.append("class Square {\n") .append(" function void moveRight() {\n") .append(" let x = (x + size) + 1;\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Square </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> moveRight </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> x </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> x </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<integerConstant> 1 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testIfWithParenthesizedExpression() { StringBuilder input = new StringBuilder(); input.append("class Square {\n") .append(" function void incSize() {\n") .append(" if ((y + size) < 254) {\n") .append(" let size = size + 2;\n") .append(" }\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Square </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> incSize </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<ifStatement>\n") .append("<keyword> if </keyword>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> y </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("<symbol> &lt; </symbol>\n") .append("<term>\n") .append("<integerConstant> 254 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> size </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<integerConstant> 2 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</ifStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testIfWithParenthesizedExpressions() { StringBuilder input = new StringBuilder(); input.append("class Square {\n") .append(" function void incSize() {\n") .append(" if (((y + size) < 254) & ((x + size) < 510)) {\n") .append(" let size = size + 2;\n") .append(" }\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Square </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> incSize </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<ifStatement>\n") .append("<keyword> if </keyword>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> y </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("<symbol> &lt; </symbol>\n") .append("<term>\n") .append("<integerConstant> 254 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("<symbol> &amp; </symbol>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<symbol> ( </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> x </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("<symbol> &lt; </symbol>\n") .append("<term>\n") .append("<integerConstant> 510 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ) </symbol>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> size </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> size </identifier>\n") .append("</term>\n") .append("<symbol> + </symbol>\n") .append("<term>\n") .append("<integerConstant> 2 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</ifStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testPropertyAccessTerm() { StringBuilder input = new StringBuilder(); input.append("class Main {\n") .append(" function void test() {\n") .append(" let a = a[2];\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Main </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> test </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> a </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> a </identifier>\n") .append("<symbol> [ </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<integerConstant> 2 </integerConstant>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ] </symbol>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } public void testSubroutineTerm() { StringBuilder input = new StringBuilder(); input.append("class Main {\n") .append(" function void test() {\n") .append(" let game = SquareGame.new();\n") .append(" }\n") .append("}\n"); Tokenizer tokenizer = new JackTokenizer(input.toString()); XMLCompilationEngine compiler = new XMLCompilationEngine(tokenizer); compiler.compileClass(); StringBuilder output = new StringBuilder(); output.append("<class>\n") .append("<keyword> class </keyword>\n") .append("<identifier> Main </identifier>\n") .append("<symbol> { </symbol>\n") .append("<subroutineDec>\n") .append("<keyword> function </keyword>\n") .append("<keyword> void </keyword>\n") .append("<identifier> test </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<parameterList>\n") .append("</parameterList>\n") .append("<symbol> ) </symbol>\n") .append("<subroutineBody>\n") .append("<symbol> { </symbol>\n") .append("<statements>\n") .append("<letStatement>\n") .append("<keyword> let </keyword>\n") .append("<identifier> game </identifier>\n") .append("<symbol> = </symbol>\n") .append("<expression>\n") .append("<term>\n") .append("<identifier> SquareGame </identifier>\n") .append("<symbol> . </symbol>\n") .append("<identifier> new </identifier>\n") .append("<symbol> ( </symbol>\n") .append("<expressionList>\n") .append("</expressionList>\n") .append("<symbol> ) </symbol>\n") .append("</term>\n") .append("</expression>\n") .append("<symbol> ; </symbol>\n") .append("</letStatement>\n") .append("</statements>\n") .append("<symbol> } </symbol>\n") .append("</subroutineBody>\n") .append("</subroutineDec>\n") .append("<symbol> } </symbol>\n") .append("</class>"); assertEquals(compiler.toXML(), output.toString()); } }
[ "daniel@akwabasystems.com" ]
daniel@akwabasystems.com
d864bf468ebdf0b8c64a5f2129018cce4cb4000f
7de78e79de0879a91386adcfeb07a51596a13f01
/liuyq-business-common/src/main/java/com/liuyq/Pages/Page.java
08a1e503d434fd6c13d30a81e02ebc8928532d81
[]
no_license
liuyq913/liuyq-businessNew
6f3a172540926e6997de61f9e0a15f7b2c6721a0
588b3025edfb1e8862d36d7042a22e031a6b6ce9
refs/heads/master
2022-12-22T06:36:06.118805
2019-08-22T01:50:45
2019-08-22T01:50:45
123,286,910
0
0
null
2022-12-16T08:25:52
2018-02-28T13:12:52
Java
UTF-8
Java
false
false
4,020
java
package com.liuyq.Pages; import com.github.pagehelper.PageInfo; import java.io.Serializable; import java.util.List; /** * 通用Page组件 * @param <T> */ public class Page<T> implements Serializable{ /** * */ private static final long serialVersionUID = 1L; // 每页条数 private int rp = 10; // 当前第几页 private int page = 1; // 查询集合 private List<T> rows; // 总记录数 private long total; private int firstPage; private int prePage; private int nextPage; private int lastPage; private boolean isFirstPage; private boolean isLastPage; private boolean hasPreviousPage; private boolean hasNextPage; public Page() { } /** * 基本构造 * @param rp 每页行数 * @param page 页码 */ public Page(int rp, int page){ //分页参数的传递,全部统一为Page对象,行数最大允许100行 this.rp = rp > 100 ? 100 : rp; this.page = page; } public Page(PageInfo<T> pageInfo){ this.rp = pageInfo.getPageSize(); this.rows = pageInfo.getList(); this.page = pageInfo.getPageNum(); this.total = pageInfo.getTotal(); this.firstPage = pageInfo.getFirstPage(); this.prePage = pageInfo.getPrePage(); this.nextPage = pageInfo.getNextPage(); this.lastPage = pageInfo.getLastPage(); this.isFirstPage = pageInfo.isIsFirstPage(); this.isLastPage = pageInfo.isIsLastPage(); this.hasPreviousPage = pageInfo.isHasPreviousPage(); this.hasNextPage = pageInfo.isHasNextPage(); } public Page(Integer rp, Integer page, List<T> rows, Long total, Integer firstPage, Integer prePage, Integer nextPage, Integer lastPage, boolean isFirstPage, boolean isLastPage, boolean hasPreviousPage, boolean hasNextPage) { this.rp = rp == null ? 0 : rp; this.page = page == null ? 0 : page; this.rows = rows; this.total = total == null ? 0 : total; this.firstPage = firstPage == null ? 0 : firstPage; this.prePage = prePage == null ? 0 : prePage; this.nextPage = nextPage == null ? 0 : nextPage; this.lastPage = lastPage == null ? 0 : lastPage; this.isFirstPage = isFirstPage; this.isLastPage = isLastPage; this.hasPreviousPage = hasPreviousPage; this.hasNextPage = hasNextPage; } public Page(int rp, int page, List<T> rows, long total){ this.rp = rp; this.rows = rows; this.page = page; this.total = total; } public Page(Page<T> page) { this.rp = page.rp; this.rows = page.rows; this.page = page.page; this.total = page.total; } public int getRp() { return rp; } public void setRp(int rp) { this.rp = rp; } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public List<T> getRows() { return rows; } public void setRows(List<T> rows) { this.rows = rows; } public long getTotal() { return total; } public void setTotal(long total) { this.total = total; } public int getFirstResult() { return ((page - 1) * rp); } public boolean isHasNextPage() { return hasNextPage; } public void setHasNextPage(boolean hasNextPage) { this.hasNextPage = hasNextPage; } public boolean isHasPreviousPage() { return hasPreviousPage; } public void setHasPreviousPage(boolean hasPreviousPage) { this.hasPreviousPage = hasPreviousPage; } public boolean isLastPage() { return isLastPage; } public void setIsLastPage(boolean isLastPage) { this.isLastPage = isLastPage; } public boolean isFirstPage() { return isFirstPage; } public void setIsFirstPage(boolean isFirstPage) { this.isFirstPage = isFirstPage; } public int getLastPage() { return lastPage; } public void setLastPage(int lastPage) { this.lastPage = lastPage; } public int getNextPage() { return nextPage; } public void setNextPage(int nextPage) { this.nextPage = nextPage; } public int getPrePage() { return prePage; } public void setPrePage(int prePage) { this.prePage = prePage; } public int getFirstPage() { return firstPage; } public void setFirstPage(int firstPage) { this.firstPage = firstPage; } }
[ "2273852279@qq.com" ]
2273852279@qq.com
cfdb51c0b63a9472a7f3e2037e14b94d9d09bb98
776ad0b5e19f8bd24cb662d12cebcef69449f18b
/examples/SimpleUI4/src/com/example/simpleui4/ShowMessageActivity.java
7e84062a40e833c4abc09da44199d3e54acfc679
[]
no_license
chinchih/android_class
7f78a37094e1962c7ad90796324a021eb4032250
b687deaf25a9369fa23d1c1d11afefd7b9b97892
refs/heads/master
2021-01-16T22:35:39.401496
2013-04-28T18:33:16
2013-04-28T18:33:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,409
java
package com.example.simpleui4; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.view.Menu; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.SimpleCursorAdapter; public class ShowMessageActivity extends Activity { private ListView listView; private MessageDBHelper dbhelp; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.message); listView = (ListView) findViewById(R.id.listView1); dbhelp = new MessageDBHelper(this); Intent intent = this.getIntent(); String text = intent.getStringExtra("message"); boolean isEncrypt = intent.getBooleanExtra("isEncrypt", false); dbhelp.insert(new Message(text, isEncrypt)); /* 兩種方法實作 Adapter */ // listView.setAdapter(getSimpleAdapter()); listView.setAdapter(getCursorAdapter()); } public SimpleCursorAdapter getCursorAdapter() { Cursor c = dbhelp.getMessagesCursor(); String[] from = new String[] { "text", "isEncrypt" }; int[] to = new int[] { R.id.textView1, R.id.textView2 }; /* * 這個建構方法在 API level 11 的時候被列為不建議使用。 * 建議改用 LoaderManager 搭配 CursorLoader。 */ SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.listview_item, c, from, to); return cursorAdapter; } public SimpleAdapter getSimpleAdapter() { List<Map<String, String>> data = new ArrayList<Map<String, String>>(); List<Message> messages = dbhelp.getMessages(); for (Message mes : messages) { Map<String, String> t = new HashMap<String, String>(); t.put("text", mes.getText()); t.put("isEncrypt", String.valueOf(mes.isEncrypt())); data.add(t); } SimpleAdapter simpleAdapter = new SimpleAdapter(this, data, R.layout.listview_item, new String[] { "text", "isEncrypt" }, new int[] { R.id.textView1, R.id.textView2 }); return simpleAdapter; } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
[ "godgunman@gmail.com" ]
godgunman@gmail.com
ca42bf499a9f404d331db452b2556600c9a5ea65
b2f6bedc4776aab918210fe60d5bd84cc8411562
/src/org/pathvisio/core/model/GpmlFormat.java
094b3e4a02c231839474dd3a795068fb8b3e7afd
[ "Apache-2.0" ]
permissive
nrnb/gsoc2017saurabh_kumar
d70c477f7da6a309c23aac86bd0d92cff8e6f48c
fec80ae4b470fb20668ac3297446451691eace2b
refs/heads/master
2021-01-22T17:40:01.467928
2017-08-24T15:24:42
2017-08-24T15:24:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,452
java
// PathVisio, // a tool for data visualization and analysis using Biological Pathways // Copyright 2006-2011 BiGCaT Bioinformatics // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // package org.pathvisio.core.model; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import org.bridgedb.bio.DataSourceTxt; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.Namespace; import org.jdom.input.JDOMParseException; import org.jdom.input.SAXBuilder; import org.pathvisio.core.debug.Logger; import org.pathvisio.core.util.RootElementFinder; import org.xml.sax.InputSource; /** * class responsible for interaction with Gpml format. * Contains all gpml-specific constants, * and should be the only class (apart from svgFormat) * that needs to import jdom */ public class GpmlFormat extends AbstractPathwayFormat { static private final GpmlFormat2017 CURRENT = GpmlFormat2017.GPML_2017; public static final Namespace RDF = Namespace.getNamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); public static final Namespace RDFS = Namespace.getNamespace("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); public static final Namespace BIOPAX = Namespace.getNamespace("bp", "http://www.biopax.org/release/biopax-level3.owl#"); public static final Namespace OWL = Namespace.getNamespace("owl", "http://www.w3.org/2002/07/owl#"); static { DataSourceTxt.init(); } public Pathway doImport(File file) throws ConverterException { Pathway pathway = new Pathway(); readFromXml(pathway, file, true); pathway.clearChangedFlag(); return pathway; } public void doExport(File file, Pathway pathway) throws ConverterException { writeToXml(pathway, file, true); } public String[] getExtensions() { return new String[] { "gpml", "xml" }; } public String getName() { return "GPML file"; } public static Document createJdom(Pathway data) throws ConverterException { return CURRENT.createJdom(data); } static public Element createJdomElement(PathwayElement o) throws ConverterException { return CURRENT.createJdomElement(o); } public static PathwayElement mapElement(Element e) throws ConverterException { return CURRENT.mapElement(e); } /** * Writes the JDOM document to the file specified * @param file the file to which the JDOM document should be saved * @param validate if true, validate the dom structure before writing to file. If there is a validation error, * or the xsd is not in the classpath, an exception will be thrown. */ static public void writeToXml(Pathway pwy, File file, boolean validate) throws ConverterException { CURRENT.writeToXml(pwy, file, validate); } static public void writeToXml(Pathway pwy, OutputStream out, boolean validate) throws ConverterException { CURRENT.writeToXml(pwy, out, validate); } static public void readFromXml(Pathway pwy, File file, boolean validate) throws ConverterException { InputStream inf; try { inf = new FileInputStream (file); } catch (FileNotFoundException e) { throw new ConverterException (e); } readFromXmlImpl (pwy, new InputSource(inf), validate); } static public void readFromXml(Pathway pwy, InputStream in, boolean validate) throws ConverterException { readFromXmlImpl (pwy, new InputSource(in), validate); } static public void readFromXml(Pathway pwy, Reader in, boolean validate) throws ConverterException { readFromXmlImpl (pwy, new InputSource(in), validate); } public static GpmlFormatReader getReaderForNamespace (Namespace ns) { GpmlFormatReader[] formats = new GpmlFormatReader[] { GpmlFormat200X.GPML_2007, GpmlFormat200X.GPML_2008A, GpmlFormat2010a.GPML_2010A , GpmlFormat2013a.GPML_2013A, GpmlFormat2017.GPML_2017 }; for (GpmlFormatReader format : formats) { if (ns.equals(format.getGpmlNamespace())) { return format; } } return null; } private static void readFromXmlImpl(Pathway pwy, InputSource in, boolean validate) throws ConverterException { // Start XML processing SAXBuilder builder = new SAXBuilder(false); // no validation when reading the xml file // try to read the file; if an error occurs, catch the exception and print feedback try { Logger.log.trace ("Build JDOM tree"); // build JDOM tree Document doc = builder.build(in); // Copy the pathway information to a VPathway Element root = doc.getRootElement(); if (!root.getName().equals("Pathway")) { throw new ConverterException ("Not a Pathway file"); } Namespace ns = root.getNamespace(); GpmlFormatReader format = getReaderForNamespace (ns); if (format == null) { throw new ConverterException ("This file looks like a pathway, " + "but the namespace " + ns + " was not recognized. This application might be out of date."); } Logger.log.info ("Recognized format " + ns); Logger.log.trace ("Start Validation"); if (validate) format.validateDocument(doc); Logger.log.trace ("Copy map elements"); format.readFromRoot (root, pwy); } catch(JDOMParseException pe) { throw new ConverterException (pe); } catch(JDOMException e) { throw new ConverterException (e); } catch(IOException e) { throw new ConverterException (e); } catch(NullPointerException e) { throw new ConverterException (e); } catch(IllegalArgumentException e) { throw new ConverterException (e); } catch(Exception e) { //Make all types of exceptions a ConverterException throw new ConverterException (e); } } @Override public boolean isCorrectType(File f) { String uri; try { uri = "" + RootElementFinder.getRootUri(f); return uri.startsWith ("http://genmapp.org/"); } catch (Exception e) { e.printStackTrace(); return false; } } }
[ "saurabhkumar1311@gmail.com" ]
saurabhkumar1311@gmail.com
9cb337273ee152174dbfa0090467898cbdc6996e
1a4770c215544028bad90c8f673ba3d9e24f03ad
/second/quark/src/main/java/com/airbnb/lottie/ax.java
99f0b227ca0fe2297b9c1cf8aa7e1a0471a5a743
[]
no_license
zhang1998/browser
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
4eee43a9d36ebb4573537eddb27061c67d84c7ba
refs/heads/master
2021-05-03T06:32:24.361277
2018-02-10T10:35:36
2018-02-10T10:35:36
120,590,649
8
10
null
null
null
null
UTF-8
Java
false
false
592
java
package com.airbnb.lottie; import android.graphics.PointF; import org.json.JSONArray; import org.json.JSONObject; /* compiled from: ProGuard */ final class ax implements ay<PointF> { static final ax a = new ax(); private ax() { } public final /* synthetic */ Object a(Object obj, float f) { if (obj instanceof JSONArray) { return bb.a((JSONArray) obj, f); } if (obj instanceof JSONObject) { return bb.a((JSONObject) obj, f); } throw new IllegalArgumentException("Unable to parse point from " + obj); } }
[ "2764207312@qq.com" ]
2764207312@qq.com
66188b2c7fc697ff052c45ed746b80013695f4ac
b6ba1bea35dcaa6b72a8df96f51dfeb20c2fe14a
/src/study/笔试/Main.java
f8b1d1f5935455a492dd26925228c891cd4de7cb
[]
no_license
YinWangPing/algorithm-study
31896d7f488e261c18448f080fa3849d2ec94df8
4843b972fad06b5232836769e33e924520b69c94
refs/heads/master
2021-01-03T04:35:50.491579
2020-06-29T01:32:19
2020-06-29T01:32:19
239,924,456
0
0
null
null
null
null
UTF-8
Java
false
false
13,815
java
package study.笔试; //import java.io.InputStreamReader; //import java.util.Scanner; // //public class Main { // public static void main(String[] args) { // Scanner sc = new Scanner(System.in); // while (sc.hasNextLine()) { // int n = Integer.parseInt(sc.nextLine().trim()); // for (int i = 0; i < n; i++) { // String[] strings = sc.nextLine().trim().split(" "); // String indexi = Integer.toBinaryString(Integer.parseInt(strings[0])); // int indexj = -1; // for (int j = 0; j < indexi.length(); j++) { // if (indexi.charAt(j) == '1') { // indexj = j; // break; // } // } // int level = indexi.length() - indexj; // long res = -1; // long nums = Long.parseLong(strings[0]); // for (int p = 0; p < level - Integer.parseInt(strings[1]); p++) { // res = nums / 2; // nums = res; // } // System.out.println(res); // } // } // } //} // import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) { int [][]people=new int[][]{{0,2},{1,3},{2,4}}; List<int[]> list=new ArrayList<>(); for (int []p:people) { list.add(p[0],p); } int [][]res=list.toArray(new int[people.length][2]); Queue queue=new LinkedList(); System.out.println(queue.add(1)); System.out.println(queue.add(2)); System.out.println(queue.add(3)); System.out.println(queue.offer(4)); System.out.println("---------------"); System.out.println(); System.out.println(queue.peek()); System.out.println(queue.poll()); System.out.println(queue.poll()); System.out.println(queue.poll()); System.out.println(queue.poll()); System.out.println(queue.element()); System.out.println(queue.peek()); // Scanner sc = new Scanner(System.in); // while (sc.hasNextInt()) { // int n = sc.nextInt(); // int []res=new int[3]; // for (int i = 0; i < n ; i++) { // res[i]=sc.nextInt(); // } // int []res1=new int[3]; // for (int i = 0; i < n ; i++) { // res1[i]=sc.nextInt(); // } // int count=0; // for (int i = 1; i <n ; i++) { // if(res[i]<res[i-1]){ // count++; // } // } // System.out.println(count); // } } } //public class Main { // private Stack<Integer> push; // private Stack<Integer> pop; // // public Main() { // this.pop = new Stack<Integer>(); // this.push = new Stack<Integer>(); // } // // public void add(int newNum) { // this.push.push(newNum); // if (this.pop.empty()) { // while (!this.push.empty()) { // this.pop.push(this.push.pop()); // } // } // } // // public int poll() { // if (this.pop.empty() && this.push.empty()) { // throw new RuntimeException("Queue is empty!"); // } else if (this.pop.empty()) { // while (!this.push.empty()) { // this.pop.push(this.push.pop()); // } // } // return this.pop.pop(); // } // // public int peek() { // if (this.pop.empty() && this.push.empty()) { // throw new RuntimeException("Queue is empty!"); // } else if (this.pop.empty()) { // while (!this.push.empty()) { // this.pop.push(this.push.pop()); // } // } // return this.pop.peek(); // } // // public static void main(String[] args) throws Exception { // Main q = new Main(); // BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // int n = Integer.parseInt(br.readLine()); // for (int i = 0; i < n; i++) { // String[] opr = br.readLine().split(" "); // if (opr.length == 2) { // q.add(Integer.parseInt(opr[1])); // } else { // if (opr[0].equals("peek")) { // System.out.println(q.peek()); // } else q.poll(); // } // // } // } // //} // // public static String [] calculate(String [] str){ //// HashMap<String,String>map=new HashMap<>(); //// for (int i = 0; i <str.length ; i++) { //// if(str[i].contains("##")){ //// String []strings=str[i].split("##"); //// if(strings.length>1) { //// map.put(strings[0], map.getOrDefault(strings[0], "") + strings[1]); //// }else { //// map.put(strings[0], map.getOrDefault(strings[0], "")+"*"); //// } //// }else { //// map.put(str[i],map.getOrDefault(str[i],"")+"$$"); //// } //// } //// HashMap<String,String>res=new HashMap<>(); //// for (Map.Entry entry:map.entrySet()) { //// map.put((String) entry.getValue(),map.getOrDefault(entry.getValue(), "")+entry.getKey()); //// } //// Collections.sort(res); //// int i=0; ////// for (int i = 0; i <map.size() ; i++) { ////// visited[i]=true; ////// for (int j = 1; j <map.size() ; j++) { ////// if(map.get()) ////// } ////// } //// return null; //// } //// public static void main(String[] args) { //// Scanner sc=new Scanner(System.in); //// while (sc.hasNextInt()){ //// int r =sc.nextInt(); //// int c=sc.nextInt(); //// int [][]nums=new int[r][c]; //// for (int i = 0; i <r ; i++) { //// for (int j = 0; j <c ; j++) { //// nums[i][j]=sc.nextInt(); //// } //// } //// System.out.println(numIslands(nums)); //// } ////// Scanner sc = new Scanner(System.in); ////// while (sc.hasNextLine()) { ////// int k= Integer.parseInt(sc.nextLine().trim()); ////// HashMap<String,String>map=new HashMap<>(); ////// for (int i = 0; i <k ; i++) { ////// String line=sc.nextLine().trim(); ////// String []str=line.split("//"); ////// if(str[1].contains("/")){ ////// String []strings=str[1].split("/"); ////// map.put() ////// } ////// } ////// } //// } // public static int numIslands(int[][] grid) { // int nums = 0; // for (int i = 0; i < grid.length; i++) { // replace(grid, i, 0); // replace(grid, i, grid[0].length - 1); // } // for (int i = 0; i < grid[0].length; i++) { // replace(grid, 0, i); // replace(grid, grid.length - 1, i); // } // for (int i = 0; i < grid.length; i++) { // for (int j = 0; j < grid[0].length; j++) { // if (grid[i][j] == 1) { // calculate(grid, i, j); // nums++; // } // } // } // return nums; // } // // private static int[][] directions = new int[][]{{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; // // public static int calculate(int[][] grid, int r, int c) { // if (r < 0 || r >= grid.length || c < 0 || c >= grid[0].length || grid[r][c] == 0) { // return 0; // } // grid[r][c] = 0; // int res = 1; // for (int[] d : directions) { // res += calculate(grid, r + d[0], c + d[1]); // } // return res; // } // // public static void replace(int[][] grid, int r, int c) { // if (r < 0 || r >= grid.length || c < 0 || c >= grid[0].length || grid[r][c] == 0) { // return; // } // grid[r][c] = 0; // for (int[] d : directions) { // calculate(grid, r + d[0], c + d[1]); // } // } //} // // //// //// int left = 0, right = 0, max = 0; //// for (int i = 0; i < m; i++) { //// a[i] = sc.nextInt(); //// left = Math.max(left, a[i]); //// right += a[i]; //// } //// if (m == k) { //// for (int i = 0; i < m - 1; i++) { //// System.out.print(a[i]+" " +"/"+" "); //// } //// System.out.print(a[m - 1]); //// }else if(k==1){ //// for (int i = 0; i < m - 1; i++) { //// System.out.print(a[i] + " "); //// } //// System.out.print(a[m - 1]); //// }else //// calculate(a, m, k, left, right); //// public static void calculate(int[] a, int m, int k, int left, int right) { //// int max = right; //// int mid; //// while (left < right) { //// mid = (left + right) >> 1; //// int t = 1, sum = a[0]; //// for (int i = 1; i < m; i++) { //// if (sum + a[i] <= mid) { //// sum += a[i]; //// } else { //// t++; //// if (t > k) break; //// sum = a[i]; //// } //// } //// if (t > k) { //// left = mid + 1; //// } else { //// right = mid; //// } //// } //// } //// if (right != max) { //// int sum = 0; //// for (int i = 0; i < m; i++) { //// if (sum + a[i] <= right) { //// System.out.print(a[i] + " "); //// sum += a[i]; //// } else { //// sum = 0; //// System.out.print("/" + " "); //// i--; //// } //// } //// } else { //// for (int i = 0; i < m - 1; i++) { //// System.out.print(a[i] + " "); //// } //// System.out.print(a[m - 1]); //// } //// } ////} ////https://exam.nowcoder.com/cts/17073371/summary?id=CE8DF681247E5C46 //// 5a 12 5b ba 34 5b bb 88 05 5a 75 cd bb 62 5a 34 cd 78 cc da fb 06 5a ////public class Main { //// public static void main(String[] args) { //// Scanner sc = new Scanner(System.in); //// while (sc.hasNextLine()) { //// String str = sc.nextLine(); //// List<String> list = calculate(str); //// int n = list.size(); //// if(n<1){ //// System.out.println(""); //// }else { //// String res = "5a"; //// for (int i = 0; i < n; i++) { //// if(list.get(i)!="") { //// res += list.get(i) + "5a"; //// } //// } //// System.out.println(res); //// } //// } //// } //// //// public static List calculate(String str) { //// List<String> list = new ArrayList<>(); //// String[] res = str.split("5a"); //// for (int i = 1; i < res.length; i++) { //// if (res[i].length() > 3) { //// int size = res[i].charAt(res[i].length() - 2) - '0' + (res[i].charAt(res[i].length() - 3) - '0') * 16; //// String temp = res[i].trim().replace("5b ba", "5a").replace("5b bb", "5b"); //// int count = 0; //// for (int j = 0; j < temp.length(); j++) { //// if (temp.charAt(j) == ' ') { //// count++; //// } //// } //// if (count == size) { //// list.add(res[i]); //// } //// } else { //// list.add(res[i]); //// } //// } //// return list; //// } ////} //// ArrayList<Character> list=new ArrayList<>(); //// for (int i = 0; i <str.length() ; i++) { //// if(str.charAt(i)>='0'&&str.charAt(i)<='9'){ //// list.add(str.charAt(i)); //// } //// } //// Collections.sort(list); //// String res=""; //// for (char c:list) { //// res+=c; //// } //// System.out.println(res); ////public static void copyAllFiles(String srcPath,String desPath) throws IOException { //// File srcfile=new File(srcPath); //// File desFile=new File(desPath); //// if(!srcfile.exists()){ //// System.out.println("文件不存在"); //// } //// if(srcfile.isDirectory()){ //// File [] files=srcfile.listFiles(); //// for (int i = 0; i <files.length ; i++) { //// String des=desPath+File.separator+files[i].getPath().replace(srcPath,""); //// copyAllFiles(files[i].getPath(),des); //// } //// }else { //// copyFile(srcfile,desFile); //// } //// } ////public static void copyFile(File srcFile,File desFile) throws IOException { //// if(!desFile.getParentFile().exists()){ //// desFile.getParentFile().mkdirs(); //// } //// FileInputStream in=new FileInputStream(srcFile); //// FileOutputStream out=new FileOutputStream(desFile); //// byte[] buf=new byte[1024]; //// int len=0; //// while ((in.read(buf))!=-1){ //// out.write(buf,0,len); //// } //// in.close(); //// out.close(); //// } // //
[ "1648771485@qq.com" ]
1648771485@qq.com
36e7e238d4c5620c57122d1e54ce4fc86afbecd6
f216214c9cf74451fa722587ef0abd138515f122
/app/src/mock/java/com/dnod/simplemovie/service/impl/api/ImagesMockMarshaller.java
db8150b8050dd847727846a0c3650509b65c9e29
[]
no_license
DnoD/SimpleMovie
f88222d79e02eaec10c4635412dbe65af23053bb
4018793ccad78f1077ef2a0049d9eb8d248695ca
refs/heads/develop
2021-01-19T22:47:41.763330
2018-03-01T15:05:23
2018-03-01T15:05:23
83,779,842
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
package com.dnod.simplemovie.service.impl.api; import android.text.TextUtils; import com.dnod.simplemovie.data.Images; import com.dnod.simplemovie.data.Movie; import com.dnod.simplemovie.service.Marshaller; import com.dnod.simplemovie.service.impl.api.dto.ImagesMockDTO; import com.dnod.simplemovie.service.impl.api.dto.MovieMockDTO; import com.dnod.simplemovie.utils.TimeUtils; final class ImagesMockMarshaller extends Marshaller<ImagesMockDTO, Images> { private static final ImagesMockMarshaller instance = new ImagesMockMarshaller(); static ImagesMockMarshaller getInstance() { return instance; } @Override public Images fromEntity(ImagesMockDTO entity) { return new Images().setOriginalUrl(entity.getOriginalUrl()) .setThumbnailUrl(entity.getThumbnailUrl()); } @Override public ImagesMockDTO toEntity(Images entity) { return null; } }
[ "dimon.zakrasin@gmail.com" ]
dimon.zakrasin@gmail.com
faf8cb47a4a65951f22fa83f02b62c1aadcd5e47
6710524ee90cbb4921324f4f05600a2e0920a12c
/app/src/main/java/com/example/test/db_project/Main2Activity.java
576f9145d2b4c398e38dc49e6a166fe1f95e4975
[]
no_license
moonkihun/DB_Project
40cd5375863e2dbe61224c33a932b29775720700
d2eb504fb4d6ea1bea9b2530ee9a91ec610d24cf
refs/heads/master
2020-04-08T07:30:02.887961
2018-11-26T08:39:57
2018-11-26T08:39:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package com.example.test.db_project; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public class Main2Activity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); } public void Reservation(View v){ Intent intent_01 = new Intent(getApplicationContext(), Reservation.class); startActivity(intent_01); } public void Room(View v){ Intent intent_02 = new Intent(getApplicationContext(), Room.class); startActivity(intent_02); } }
[ "fxf24@naver.com" ]
fxf24@naver.com
464c5c8e8a9429f0790d660832ea68318ef56987
3955f3bc4b1e9c41ffabb34fcdbfbfb3a8b2f77c
/bizcore/WEB-INF/youbenben_core_src/com/youbenben/youbenben/retailstoreinvestmentinvitation/RetailStoreInvestmentInvitationMapper.java
1852662f010b0039eddcf87bce41b4230665efd9
[]
no_license
1342190832/youbenben
c9ba34117b30988419d4d053a35960f35cd2c3f0
f68fb29f17ff4f74b0de071fe11bc9fb10fd8744
refs/heads/master
2022-04-25T10:17:48.674515
2020-04-25T14:22:40
2020-04-25T14:22:40
258,133,780
0
0
null
null
null
null
UTF-8
Java
false
false
2,230
java
package com.youbenben.youbenben.retailstoreinvestmentinvitation; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import java.math.BigDecimal; import com.youbenben.youbenben.BaseRowMapper; public class RetailStoreInvestmentInvitationMapper extends BaseRowMapper<RetailStoreInvestmentInvitation>{ protected RetailStoreInvestmentInvitation internalMapRow(ResultSet rs, int rowNumber) throws SQLException{ RetailStoreInvestmentInvitation retailStoreInvestmentInvitation = getRetailStoreInvestmentInvitation(); setId(retailStoreInvestmentInvitation, rs, rowNumber); setComment(retailStoreInvestmentInvitation, rs, rowNumber); setVersion(retailStoreInvestmentInvitation, rs, rowNumber); return retailStoreInvestmentInvitation; } protected RetailStoreInvestmentInvitation getRetailStoreInvestmentInvitation(){ return new RetailStoreInvestmentInvitation(); } protected void setId(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long String id = rs.getString(RetailStoreInvestmentInvitationTable.COLUMN_ID); if(id == null){ //do nothing when nothing found in database return; } retailStoreInvestmentInvitation.setId(id); } protected void setComment(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long String comment = rs.getString(RetailStoreInvestmentInvitationTable.COLUMN_COMMENT); if(comment == null){ //do nothing when nothing found in database return; } retailStoreInvestmentInvitation.setComment(comment); } protected void setVersion(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Integer version = rs.getInt(RetailStoreInvestmentInvitationTable.COLUMN_VERSION); if(version == null){ //do nothing when nothing found in database return; } retailStoreInvestmentInvitation.setVersion(version); } }
[ "1342190832@qq.com" ]
1342190832@qq.com
8de80edb4c4a08663ca40b23bbfd12a5a5c2da6a
0fa2722cc49e4222af6e921ae2cae2de3206b081
/Core/src/id/base/app/util/ReflectionFunction.java
0829c60cfd744d4b7ee5ecbc5f0ff7ec954086c3
[]
no_license
utharamadhan/SimpleRestFramework
185a8a08bf7c91e0a851d9ae088e8cce14b6a1f0
153df491517d08615506bc4d84bf1b7cbe9f54bd
refs/heads/master
2021-01-11T13:32:42.832023
2017-02-10T04:36:59
2017-02-10T04:36:59
81,526,307
0
0
null
null
null
null
UTF-8
Java
false
false
4,751
java
package id.base.app.util; import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.URLEncoder; import javax.persistence.Column; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ReflectionFunction { private static final Logger LOGGER = LoggerFactory.getLogger(ReflectionFunction.class); public static String getColumnName(Class domainClass, String fieldName) { try { Method method = domainClass.getMethod("get"+Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1), null); Column column = method.getAnnotation(Column.class); return column.name(); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } public static void setProperties(Class domainClass, String prop, String value) { try { Field field = domainClass.getField(prop); if (field.getType().isAssignableFrom(Integer.class) || field.getType().isAssignableFrom(int.class)) { field.setInt(null, Integer.valueOf(value)); } else if (field.getType().isAssignableFrom(Long.class) || field.getType().isAssignableFrom(long.class)) { field.setLong(null, Integer.valueOf(value)); } else if (field.getType().isAssignableFrom(Boolean.class) || field.getType().isAssignableFrom(boolean.class)) { field.setBoolean(null, Boolean.parseBoolean(value)); } else if (field.getType().isAssignableFrom(Double.class) || field.getType().isAssignableFrom(double.class)) { field.setDouble(null, Double.parseDouble(value)); } else { // string value field.set(null, value); } } catch (SecurityException e) { e.printStackTrace(); LOGGER.error("Failed setting domain property due to security. Please change checkMemberAccess(this, Member.PUBLIC) or checkPackageAccess() to allow the access."); } catch (NoSuchFieldException e) { LOGGER.error("Field {} has not been declared yet in {}.", new Object[] {prop, domainClass.getName()}); } catch (IllegalArgumentException e) { e.printStackTrace(); LOGGER.error("Illegal value is given for field {}. The value given is {}", new Object[] {prop, value}); } catch (IllegalAccessException e) { e.printStackTrace(); LOGGER.error("Failed setting domain property due to field {} is inaccessible.", prop); } } public static Object getPropertyValue(Class domainClass, String prop){ Object value = null; try { Field field = domainClass.getField(prop); if (field.getType().isAssignableFrom(Integer.class) || field.getType().isAssignableFrom(int.class)) { value = field.getInt(null); } else if (field.getType().isAssignableFrom(Long.class) || field.getType().isAssignableFrom(long.class)) { value = field.getLong(null); } else if (field.getType().isAssignableFrom(Boolean.class) || field.getType().isAssignableFrom(boolean.class)) { value = field.getBoolean(null); } else if (field.getType().isAssignableFrom(Double.class) || field.getType().isAssignableFrom(double.class)) { value = field.getDouble(null); } else { // string value value = field.get(null); } } catch (SecurityException e) { e.printStackTrace(); LOGGER.error("Failed setting domain property due to security. Please change checkMemberAccess(this, Member.PUBLIC) or checkPackageAccess() to allow the access."); } catch (NoSuchFieldException e) { try { LOGGER.error("Field {} has not been declared yet in {}.", new Object[] {URLEncoder.encode(StringUtils.trimToEmpty(prop), "UTF-8"), domainClass.getName()}); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } } catch (IllegalAccessException e) { e.printStackTrace(); try { if (LOGGER.isErrorEnabled()) LOGGER.error("Failed setting domain property due to field {} is inaccessible.", URLEncoder.encode(StringUtils.trimToEmpty(prop), "UTF-8")); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } } return value; } public static Field getField(Class cc, String name) throws NoSuchFieldException{ Field res = null; try{ res = cc.getDeclaredField(name); return res; }catch(NoSuchFieldException e){ Class c = cc.getSuperclass(); if (c != null) { try{ res = getField(c, name); return res; }catch(NoSuchFieldException ee){ throw new NoSuchFieldException(name); } }else{ throw new NoSuchFieldException(name); } } } }
[ "rizki_utha@infoflow.co.id" ]
rizki_utha@infoflow.co.id
139c33c47259df6385e08931485035f0dc5e822d
b991b1eb27db9e6c81e3a477d1911ef29b446c7a
/src/main/java/com/yichen/jwtauthentication/controller/AuthRestAPIs.java
da087620e36d6caa3a5218d3bd4d8c3ced217d0f
[]
no_license
yichenliang/Todo_Backend
90caa7cf8691db3765eb7db170c1412aa825f9d3
7d771736719825cb199dd1b8d3bb4be096eed500
refs/heads/master
2020-04-28T01:33:13.786082
2019-03-10T18:21:33
2019-03-10T18:21:33
174,777,924
0
0
null
null
null
null
UTF-8
Java
false
false
4,151
java
package com.yichen.jwtauthentication.controller; import java.util.HashSet; import java.util.Set; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.yichen.jwtauthentication.message.request.LoginForm; import com.yichen.jwtauthentication.message.request.SignUpForm; import com.yichen.jwtauthentication.message.response.JwtResponse; import com.yichen.jwtauthentication.message.response.ResponseMessage; import com.yichen.jwtauthentication.model.Role; import com.yichen.jwtauthentication.model.RoleName; import com.yichen.jwtauthentication.model.User; import com.yichen.jwtauthentication.repository.RoleRepository; import com.yichen.jwtauthentication.repository.UserRepository; import com.yichen.jwtauthentication.security.jwt.JwtProvider; @CrossOrigin(origins = "*", maxAge = 3600) @RestController @RequestMapping("/api/auth") public class AuthRestAPIs { @Autowired AuthenticationManager authenticationManager; @Autowired UserRepository userRepository; @Autowired RoleRepository roleRepository; @Autowired PasswordEncoder encoder; @Autowired JwtProvider jwtProvider; @PostMapping("/signin") public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginForm loginRequest) { Authentication authentication = authenticationManager.authenticate( new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword())); SecurityContextHolder.getContext().setAuthentication(authentication); String jwt = jwtProvider.generateJwtToken(authentication); UserDetails userDetails = (UserDetails) authentication.getPrincipal(); return ResponseEntity.ok(new JwtResponse(jwt, userDetails.getUsername(), userDetails.getAuthorities())); } @PostMapping("/signup") public ResponseEntity<?> registerUser(@Valid @RequestBody SignUpForm signUpRequest) { if (userRepository.existsByUsername(signUpRequest.getUsername())) { return new ResponseEntity<>(new ResponseMessage("Fail -> Username is already taken!"), HttpStatus.BAD_REQUEST); } if (userRepository.existsByEmail(signUpRequest.getEmail())) { return new ResponseEntity<>(new ResponseMessage("Fail -> Email is already in use!"), HttpStatus.BAD_REQUEST); } // Creating user's account User user = new User(signUpRequest.getName(), signUpRequest.getUsername(), signUpRequest.getEmail(), encoder.encode(signUpRequest.getPassword())); Set<String> strRoles = signUpRequest.getRole(); Set<Role> roles = new HashSet<>(); strRoles.forEach(role -> { switch (role) { case "admin": Role adminRole = roleRepository.findByName(RoleName.ROLE_ADMIN) .orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find.")); roles.add(adminRole); break; case "pm": Role pmRole = roleRepository.findByName(RoleName.ROLE_PM) .orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find.")); roles.add(pmRole); break; default: Role userRole = roleRepository.findByName(RoleName.ROLE_USER) .orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find.")); roles.add(userRole); } }); user.setRoles(roles); userRepository.save(user); return new ResponseEntity<>(new ResponseMessage("User registered successfully!"), HttpStatus.OK); } }
[ "yichenliang@ufl.edu" ]
yichenliang@ufl.edu
6d0842d07f515f21b2dc40c0e0294c94d470e544
b8ecb116ed5eb72343d31b66ab0ced0468a7cde1
/src/util/Duet.java
966029fb515d7ad01db8dc7ae8f341622f6ce8f6
[]
no_license
CLOVIS-AI/PMagic
c83dce6626177da8f99003eccbd87a55ce0287a0
ff6eca33c714e7bd3b450d8b754490f42231c098
refs/heads/master
2021-08-10T12:06:16.305550
2017-11-12T14:57:45
2017-11-12T14:57:45
110,441,417
0
0
null
null
null
null
UTF-8
Java
false
false
1,921
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 util; import java.util.Objects; /** * A duet utility class, working with two elements : t and u, of respective types T and U. * @author CLOVIS */ public class Duet<T, U> { private T first; private U second; /** * Creates a Duet object with the two values set. * @param t first element * @param u second element */ public Duet(T t, U u){ first = t; second = u; } /** * Get the first element. * @return t */ public T t(){ return first; } /** * Set the first element. * @param n new value of t */ public void t(T n){ first = n; } /** * Get the second element. * @return u */ public U u(){ return second; } /** * Set the second element. * @param n new value of u */ public void u(U n){ second = n; } @Override public String toString(){ return "{t=" + first.toString() + ";u=" + second.toString() + "}"; } @Override public int hashCode() { int hash = 3; hash = 17 * hash + Objects.hashCode(this.first); hash = 17 * hash + Objects.hashCode(this.second); return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Duet<?, ?> other = (Duet<?, ?>) obj; if (!Objects.equals(this.first, other.first)) { return false; } if (!Objects.equals(this.second, other.second)) { return false; } return true; } }
[ "clovis.onplag@gmail.com" ]
clovis.onplag@gmail.com
4449fe65b9c82ce507a1f7af20a2b024d21ee9a5
12c7451269650ca797831a3ae627c97b46c65fe6
/src/main/java/com/example/resumegeneratorbackend/service/UserDetailServices.java
a6133a28249b127c0756c3445db5f77da6ab421b
[]
no_license
cebed/Resume-Generator-Backend
7f507de3297e0e300cd30713387095ba685af2e1
a69b1fa63ce00b206e355b1539c6bab23b446c5c
refs/heads/master
2023-08-07T20:48:53.018956
2019-11-20T18:31:30
2019-11-20T18:31:30
176,706,477
0
0
null
2023-07-21T20:19:28
2019-03-20T10:10:35
Java
UTF-8
Java
false
false
1,195
java
package com.example.resumegeneratorbackend.service; import com.example.resumegeneratorbackend.model.Users; import com.example.resumegeneratorbackend.repository.UsersRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class UserDetailServices implements UserDetailsService { @Autowired private UsersRepository usersRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { Users users = usersRepository.findByUsername(username); if(users==null) new UsernameNotFoundException("User not found"); return users; } @Transactional public Users loadUserById(Long id){ Users users = usersRepository.getById(id); if(users==null) new UsernameNotFoundException("User not found"); return users; } }
[ "36077080+cebed@users.noreply.github.com" ]
36077080+cebed@users.noreply.github.com
fe579cc836357e2c2c54ee601e363265af8f4105
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/610ce078fb3c84c47d6d32aff7d77ba850e28f9d/before/IndexFieldDataCache.java
573d66056057fb95eb03d149711c1a492d038bbd
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,773
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.index.fielddata; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.util.Accountable; import org.elasticsearch.index.mapper.FieldMapper; /** * A simple field data cache abstraction on the *index* level. */ public interface IndexFieldDataCache { <FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(AtomicReaderContext context, IFD indexFieldData) throws Exception; <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(final IndexReader indexReader, final IFD indexFieldData) throws Exception; /** * Clears all the field data stored cached in on this index. */ void clear(); /** * Clears all the field data stored cached in on this index for the specified field name. */ void clear(String fieldName); void clear(Object coreCacheKey); interface Listener { void onLoad(FieldMapper.Names fieldNames, FieldDataType fieldDataType, Accountable ramUsage); void onUnload(FieldMapper.Names fieldNames, FieldDataType fieldDataType, boolean wasEvicted, long sizeInBytes); } class None implements IndexFieldDataCache { @Override public <FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(AtomicReaderContext context, IFD indexFieldData) throws Exception { return indexFieldData.loadDirect(context); } @Override @SuppressWarnings("unchecked") public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(IndexReader indexReader, IFD indexFieldData) throws Exception { return (IFD) indexFieldData.localGlobalDirect(indexReader); } @Override public void clear() { } @Override public void clear(String fieldName) { } @Override public void clear(Object coreCacheKey) { } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
bfc72500bdf41acea3fa2e1ad0081528b4b99beb
9cf29da65b935b21f52d9bf5cb32b3309464d429
/contact-center/app/src/main/java/com/chatopera/cc/app/model/WorkOrders.java
b30b4c63985c67366255e3ff26782c28693d382f
[ "Apache-2.0" ]
permissive
zhulong2019/cosin
6e8375debd35f7300b680cb37720aa42e5090790
324fc427ceeed244598aab9a23795ff0b4296c1c
refs/heads/master
2022-09-04T23:37:32.361714
2020-02-26T10:18:50
2020-02-26T10:18:50
243,154,653
1
0
Apache-2.0
2022-09-01T23:20:42
2020-02-26T02:57:32
Java
UTF-8
Java
false
false
11,699
java
/* * Copyright (C) 2017 优客服-多渠道客服系统 * Modifications copyright (C) 2018 Chatopera Inc, <https://www.chatopera.com> * * 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.chatopera.cc.app.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Transient; import com.chatopera.cc.app.basic.MainUtils; import org.hibernate.annotations.GenericGenerator; import org.springframework.data.elasticsearch.annotations.Document; /** * */ @Document(indexName = "cskefu", type = "workorders", createIndex = false) @Entity @Table(name = "uk_workorders") @org.hibernate.annotations.Proxy(lazy = false) public class WorkOrders extends ESBean implements UKAgg { /** * */ private static final long serialVersionUID = 1L; /** * */ private String id = MainUtils.getUUID(); private String orderno; //工单编号 private String sessionid; private String title; //标题 private String content; //内容 private float price; //问题价格 private String keyword; //关键词 private String summary; //摘要 private boolean anonymous; //修改功能 未 是否有上传附件 private boolean top; //是否置顶 private boolean essence; //是否精华 private boolean accept; //是否已采纳最佳答案 private boolean finish; //结贴 private int answers; //回答数量 private int views; //阅读数量 private int followers; //关注数量 private int collections; //收藏数量 private int comments; //评论数量 private boolean frommobile; //是否移动端提问 private String status; // 状态 private String wotype; //工单类型 private boolean datastatus; //数据状态,是否删除 , 逻辑删除 private String taskid; private String orderid; private String dataid; private String eventid; private String ani; private String cate; //工单分类 private String priority; //优先级 private Contacts contacts; private String cusid; private String initiator; //发起人 , 可以是多人发起的工单 private String bpmid; private String tags; private String accdept;// 受理部门 private String accuser; //受理人 private boolean assigned; //已分配 private String username; private String orgi; private String creater; private Date createtime = new Date(); private Date updatetime = new Date(); private String memo; private String organ; // private String agent; // private String shares; private String skill; private int rowcount; private String key; //变更用处,修改为 OrderID private User user; private User current; //当前处理人 private Organ currentorgan; //处理部门 private Favorites fav; /** * @return the id */ @Id @Column(length = 32) @GeneratedValue(generator = "paymentableGenerator") @GenericGenerator(name = "paymentableGenerator", strategy = "assigned") public String getId() { return id; } @Transient public String getSessionid() { return sessionid; } public void setSessionid(String sessionid) { this.sessionid = sessionid; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } public String getKeyword() { return keyword; } public void setKeyword(String keyword) { this.keyword = keyword; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public boolean isAnonymous() { return anonymous; } public void setAnonymous(boolean anonymous) { this.anonymous = anonymous; } public String getWotype() { return wotype; } public void setWotype(String wotype) { this.wotype = wotype; } public String getPriority() { return priority; } public void setPriority(String priority) { this.priority = priority; } @Transient public Contacts getContacts() { return contacts; } public void setContacts(Contacts contacts) { this.contacts = contacts; } public String getCusid() { return cusid; } public void setCusid(String cusid) { this.cusid = cusid; } public String getAccdept() { return accdept; } public void setAccdept(String accdept) { this.accdept = accdept; } public String getAccuser() { return accuser; } public void setAccuser(String accuser) { this.accuser = accuser; } public boolean isAssigned() { return assigned; } public void setAssigned(boolean assigned) { this.assigned = assigned; } public int getAnswers() { return answers; } public void setAnswers(int answers) { this.answers = answers; } @Column(name = "sviews") public int getViews() { return views; } public void setViews(int views) { this.views = views; } public int getFollowers() { return followers; } public void setFollowers(int followers) { this.followers = followers; } public int getCollections() { return collections; } public void setCollections(int collections) { this.collections = collections; } public int getComments() { return comments; } public void setComments(int comments) { this.comments = comments; } public boolean isFrommobile() { return frommobile; } public void setFrommobile(boolean frommobile) { this.frommobile = frommobile; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getOrgi() { return orgi; } public void setOrgi(String orgi) { this.orgi = orgi; } public String getCreater() { return creater; } public void setCreater(String creater) { this.creater = creater; } public Date getCreatetime() { return createtime; } public void setCreatetime(Date createtime) { this.createtime = createtime; } public Date getUpdatetime() { return updatetime; } public void setUpdatetime(Date updatetime) { this.updatetime = updatetime; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public String getOrgan() { return organ; } public void setOrgan(String organ) { this.organ = organ; } public String getAgent() { return agent; } public void setAgent(String agent) { this.agent = agent; } public String getSkill() { return skill; } public void setSkill(String skill) { this.skill = skill; } public void setId(String id) { this.id = id; } public String getCate() { return cate; } public void setCate(String cate) { this.cate = cate; } public boolean isTop() { return top; } public void setTop(boolean top) { this.top = top; } public boolean isEssence() { return essence; } public void setEssence(boolean essence) { this.essence = essence; } public boolean isAccept() { return accept; } public void setAccept(boolean accept) { this.accept = accept; } public boolean isFinish() { return finish; } public void setFinish(boolean finish) { this.finish = finish; } @Transient public User getUser() { return user; } public void setUser(User user) { this.user = user; } @Transient public int getRowcount() { return rowcount; } public void setRowcount(int rowcount) { this.rowcount = rowcount; } @Transient public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getOrderno() { return orderno; } public void setOrderno(String orderno) { this.orderno = orderno; } public String getShares() { return shares; } public void setShares(String shares) { this.shares = shares; } public String getInitiator() { return initiator; } public void setInitiator(String initiator) { this.initiator = initiator; } public boolean isDatastatus() { return datastatus; } public void setDatastatus(boolean datastatus) { this.datastatus = datastatus; } public String getTags() { return tags; } public void setTags(String tags) { this.tags = tags; } public String getBpmid() { return bpmid; } public void setBpmid(String bpmid) { this.bpmid = bpmid; } @Transient public Favorites getFav() { return fav; } public void setFav(Favorites fav) { this.fav = fav; } @Transient public User getCurrent() { return current; } public void setCurrent(User current) { this.current = current; } @Transient public Organ getCurrentorgan() { return currentorgan; } public void setCurrentorgan(Organ currentorgan) { this.currentorgan = currentorgan; } @Transient public String getTaskid() { return taskid; } public void setTaskid(String taskid) { this.taskid = taskid; } @Transient public String getOrderid() { return orderid; } public void setOrderid(String orderid) { this.orderid = orderid; } public String getDataid() { return dataid; } public void setDataid(String dataid) { this.dataid = dataid; } public String getEventid() { return eventid; } public void setEventid(String eventid) { this.eventid = eventid; } public String getAni() { return ani; } public void setAni(String ani) { this.ani = ani; } }
[ "842909231@qq.com" ]
842909231@qq.com
b4c9f5cc6a2940c66bdff9f908265296bc843d8c
abf09f42e594f943927530d4d7dbd08dda436de5
/allPattern/src/patternDemo/PatternDemo24.java
587ae85af41c74c4434329933e4cebc04182350b
[]
no_license
mortozafsti/Jsp-Web-Project
e232148120b026a8eeb87fa3b2582e36c356e0fc
3920d6a4d9161609a2dc9030ba901728363e5423
refs/heads/master
2022-12-02T19:33:56.584746
2019-09-23T08:06:55
2019-09-23T08:06:55
160,851,448
0
0
null
2022-11-24T09:19:21
2018-12-07T16:53:00
Java
UTF-8
Java
false
false
480
java
package patternDemo; public class PatternDemo24 { public static void main(String[] args) { int row = 4, col = 7; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (i == 0 || j == 0 || i == row - 1 || j == col - 1) { System.out.print("0"); } else { System.out.print("1"); } } System.out.println(""); } } }
[ "mortozafsti@gmail.com" ]
mortozafsti@gmail.com
22987927cee8f6d651891fa7d89593e6c93b39d0
552d28e539386e6401d19c2a641d046bbf32fe2c
/app/src/main/java/com/shukhratKhaydarov/sudoku/Classifier.java
4b88f60f6193c632b33ac07b83b7c6686056edc0
[]
no_license
SeanKh/ScanSolveSudoku
3797fcd162e66a0b8eb298ed01a0999109259a6b
c25401417a2ef5046d4609e1f5c835292e786fbc
refs/heads/master
2022-11-30T12:46:30.720144
2020-08-05T19:18:19
2020-08-05T19:18:19
261,583,991
1
0
null
null
null
null
UTF-8
Java
false
false
2,648
java
package com.shukhratKhaydarov.sudoku; import android.content.res.AssetManager; import android.util.Log; import org.tensorflow.contrib.android.TensorFlowInferenceInterface; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Classifier { // Only returns if at least this confidence private static final float THRESHOLD = 0.1f; private static final String TAG = "Classifier"; private TensorFlowInferenceInterface tfHelper; private String inputName; private String outputName; private int inputSize; private List<String> labels; private float[] output; private String[] outputNames; static private List<String> readLabels(Classifier c, AssetManager am, String fileName) throws IOException { BufferedReader br = null; br = new BufferedReader(new InputStreamReader(am.open(fileName))); String line; List<String> labels = new ArrayList<>(); while ((line = br.readLine()) != null) { labels.add(line); } br.close(); return labels; } static public Classifier create(AssetManager assetManager, String modelPath, String labelPath, int inputSize, String inputName, String outputName) throws IOException { Classifier classifier = new Classifier(); classifier.inputName = inputName; classifier.outputName = outputName; String labelFile = labelPath.split("file:///android_asset/")[1]; classifier.labels = readLabels(classifier, assetManager, labelFile); classifier.tfHelper = new TensorFlowInferenceInterface(assetManager, modelPath); int numClasses = 10; classifier.inputSize = inputSize; classifier.outputNames = new String[]{outputName}; classifier.outputName = outputName; classifier.output = new float[numClasses]; return classifier; } public Classification recognize(final float[] pixels) { tfHelper.feed(inputName, pixels, new long[]{inputSize * inputSize}); tfHelper.run(outputNames); tfHelper.fetch(outputName, output); // Find the best classification Classification ans = new Classification(); for (int i = 0; i < output.length; ++i) { Log.d(TAG, String.format("Class: %s Conf: %f", labels.get(i), output[i])); if (output[i] > THRESHOLD && output[i] > ans.getConf()) { ans.update(output[i], labels.get(i)); } } return ans; } }
[ "sh.khaydarov96@gmail.com" ]
sh.khaydarov96@gmail.com
488d787cdae9ae78b5b58547338ac0fbdc8146b9
80dd48bfb2c7e5552530ac0fe20f2d15a60a1c0b
/kostenstellen/persistence/BucheKontoCommandFacade.java
f3a9a5af44c94fa10c63eeb50ce786649a5a5a9c
[]
no_license
AlineLa/kostenstellen
7d8353d7c4f5241ec5239b878dac6637f65a5c74
128d8abb1648829f2588afb254f9f59e79bad697
refs/heads/master
2021-01-24T22:52:07.969724
2014-11-11T11:40:44
2014-11-11T11:40:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,727
java
package persistence; import model.meta.*; import java.sql.*; //import oracle.jdbc.*; public class BucheKontoCommandFacade{ private String schemaName; private Connection con; public BucheKontoCommandFacade(String schemaName, Connection con) { this.schemaName = schemaName; this.con = con; } public PersistentBucheKontoCommand newBucheKontoCommand(long createMinusStorePlus) throws PersistenceException { oracle.jdbc.OracleCallableStatement callable; try{ callable = (oracle.jdbc.OracleCallableStatement)this.con.prepareCall("Begin ? := " + this.schemaName + ".BchKntCMDFacade.newBchKntCMD(?); end;"); callable.registerOutParameter(1, oracle.jdbc.OracleTypes.NUMBER); callable.setLong(2, createMinusStorePlus); callable.execute(); long id = callable.getLong(1); callable.close(); BucheKontoCommand result = new BucheKontoCommand(null,null,null,id); if (createMinusStorePlus < 0)Cache.getTheCache().put(result); return (PersistentBucheKontoCommand)PersistentProxi.createProxi(id, 120); }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public PersistentBucheKontoCommand newDelayedBucheKontoCommand() throws PersistenceException { oracle.jdbc.OracleCallableStatement callable; try{ callable = (oracle.jdbc.OracleCallableStatement)this.con.prepareCall("Begin ? := " + this.schemaName + ".BchKntCMDFacade.newDelayedBchKntCMD(); end;"); callable.registerOutParameter(1, oracle.jdbc.OracleTypes.NUMBER); callable.execute(); long id = callable.getLong(1); callable.close(); BucheKontoCommand result = new BucheKontoCommand(null,null,null,id); Cache.getTheCache().put(result); return (PersistentBucheKontoCommand)PersistentProxi.createProxi(id, 120); }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public BucheKontoCommand getBucheKontoCommand(long BucheKontoCommandId) throws PersistenceException{ try{ CallableStatement callable; callable = this.con.prepareCall("Begin ? := " + this.schemaName + ".BchKntCMDFacade.getBchKntCMD(?); end;"); callable.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR); callable.setLong(2, BucheKontoCommandId); callable.execute(); ResultSet obj = ((oracle.jdbc.OracleCallableStatement)callable).getCursor(1); if (!obj.next()) { obj.close(); callable.close(); return null; } Invoker invoker = null; if (obj.getLong(2) != 0) invoker = (Invoker)PersistentProxi.createProxi(obj.getLong(2), obj.getLong(3)); PersistentTransaktion commandReceiver = null; if (obj.getLong(4) != 0) commandReceiver = (PersistentTransaktion)PersistentProxi.createProxi(obj.getLong(4), obj.getLong(5)); PersistentCommonDate myCommonDate = null; if (obj.getLong(6) != 0) myCommonDate = (PersistentCommonDate)PersistentProxi.createProxi(obj.getLong(6), obj.getLong(7)); BucheKontoCommand result = new BucheKontoCommand(invoker, commandReceiver, myCommonDate, BucheKontoCommandId); obj.close(); callable.close(); BucheKontoCommandICProxi inCache = (BucheKontoCommandICProxi)Cache.getTheCache().put(result); BucheKontoCommand objectInCache = (BucheKontoCommand)inCache.getTheObject(); return objectInCache; }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public long getClass(long objectId) throws PersistenceException{ try{ CallableStatement callable; callable = this.con.prepareCall("Begin ? := " + this.schemaName + ".BchKntCMDFacade.getClass(?); end;"); callable.registerOutParameter(1, oracle.jdbc.OracleTypes.NUMBER); callable.setLong(2, objectId); callable.execute(); long result = callable.getLong(1); callable.close(); return result; }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public void invokerSet(long BucheKontoCommandId, Invoker invokerVal) throws PersistenceException { try{ CallableStatement callable; callable = this.con.prepareCall("Begin " + this.schemaName + ".BchKntCMDFacade.invokerSet(?, ?, ?); end;"); callable.setLong(1, BucheKontoCommandId); callable.setLong(2, invokerVal.getId()); callable.setLong(3, invokerVal.getClassId()); callable.execute(); callable.close(); }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public void commandReceiverSet(long BucheKontoCommandId, PersistentTransaktion commandReceiverVal) throws PersistenceException { try{ CallableStatement callable; callable = this.con.prepareCall("Begin " + this.schemaName + ".BchKntCMDFacade.cReceiverSet(?, ?, ?); end;"); callable.setLong(1, BucheKontoCommandId); callable.setLong(2, commandReceiverVal.getId()); callable.setLong(3, commandReceiverVal.getClassId()); callable.execute(); callable.close(); }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } public void myCommonDateSet(long BucheKontoCommandId, PersistentCommonDate myCommonDateVal) throws PersistenceException { try{ CallableStatement callable; callable = this.con.prepareCall("Begin " + this.schemaName + ".BchKntCMDFacade.myCmmnDtSet(?, ?, ?); end;"); callable.setLong(1, BucheKontoCommandId); callable.setLong(2, myCommonDateVal.getId()); callable.setLong(3, myCommonDateVal.getClassId()); callable.execute(); callable.close(); }catch(SQLException se) { throw new PersistenceException(se.getMessage(), se.getErrorCode()); } } }
[ "zappdidappdi+4@gmail.com" ]
zappdidappdi+4@gmail.com
da1424b6eaf8b519ed73548924fc3bbd5d04641d
faf7d2e5ac7c5fe55f005f08a2cadf9e26e8cb86
/iflytransporter-common/src/main/java/com/iflytransporter/common/bean/Company.java
6068ac2ba8cf9dd293a5604a52310299ec1bdc8a
[ "Apache-2.0" ]
permissive
zhangyiran0314/20180316
7ab39b4eb49048d79bf795b0fc7212aa78a94241
bddf49414cbc25f43fedf8b708c70f3c0e9cb0d1
refs/heads/master
2021-09-09T17:59:23.816269
2018-03-18T19:08:38
2018-03-18T19:08:38
110,239,220
0
0
null
null
null
null
UTF-8
Java
false
false
2,542
java
package com.iflytransporter.common.bean; import com.alibaba.fastjson.JSONObject; import com.iflytransporter.common.base.BaseEntity; public class Company extends BaseEntity{ private static final long serialVersionUID = 1L; private String name; private String code; private String email; private String address; private Integer status; private String attachmentId1; private String userId; private Integer userType; private String attachmentId2;//spad照片 private String attachmentId3;//公司保单 private Integer amount;//保险额度 public String getName() { return name; } public void setName(String name) { this.name = name == null ? null : name.trim(); } public String getCode() { return code; } public void setCode(String code) { this.code = code == null ? null : code.trim(); } public String getEmail() { return email; } public void setEmail(String email) { this.email = email == null ? null : email.trim(); } public String getAddress() { return address; } public void setAddress(String address) { this.address = address == null ? null : address.trim(); } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public String getAttachmentId1() { return attachmentId1; } public void setAttachmentId1(String attachmentId1) { this.attachmentId1 = attachmentId1 == null ? null : attachmentId1.trim(); } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getAttachmentId2() { return attachmentId2; } public void setAttachmentId2(String attachmentId2) { this.attachmentId2 = attachmentId2; } public String getAttachmentId3() { return attachmentId3; } public void setAttachmentId3(String attachmentId3) { this.attachmentId3 = attachmentId3; } public Integer getUserType() { return userType; } public void setUserType(Integer userType) { this.userType = userType; } public Integer getAmount() { return amount; } public void setAmount(Integer amount) { this.amount = amount; } @Override public String toString() { return JSONObject.toJSONString(this).toString(); } }
[ "252543781@qq.com" ]
252543781@qq.com
584b0fe843362ffdfe4091b10803dea564442c1c
ddce3c1d623fc6887e288a4e5fa022abd2707761
/src/com/MCAAlgorithm/bigshua/class34/Problem_0348_DesignTicTacToe.java
c013d102289643fd1b10ce98fd3979f672912c96
[]
no_license
tjzhaomengyi/DataStructure-java
e1632758761ab66f58dee6f84d81ac101d2a3289
7f1a95bd2918ea7a4763df7858d1ea28e538698d
refs/heads/master
2023-07-07T19:09:21.349154
2023-06-27T02:59:12
2023-06-27T02:59:12
81,512,160
0
0
null
null
null
null
UTF-8
Java
false
false
1,115
java
package com.MCAAlgorithm.bigshua.class34; public class Problem_0348_DesignTicTacToe { class TicTacToe { private int[][] rows; private int[][] cols; private int[] leftUp; private int[] rightUp; private boolean[][] matrix; private int N; public TicTacToe(int n) { // rows[a][1] : 1这个人,在a行上,下了几个 // rows[b][2] : 2这个人,在b行上,下了几个 rows = new int[n][3]; //0 1 2 cols = new int[n][3]; // leftUp[2] = 7 : 2这个人,在左对角线上,下了7个 leftUp = new int[3]; // rightUp[1] = 9 : 1这个人,在右对角线上,下了9个 rightUp = new int[3]; matrix = new boolean[n][n]; N = n; } public int move(int row, int col, int player) { if (matrix[row][col]) { return 0; } matrix[row][col] = true; rows[row][player]++; cols[col][player]++; if (row == col) { leftUp[player]++; } if (row + col == N - 1) { rightUp[player]++; } if (rows[row][player] == N || cols[col][player] == N || leftUp[player] == N || rightUp[player] == N) { return player; } return 0; } } }
[ "tjzhaomengyi@163.com" ]
tjzhaomengyi@163.com
f25c3a34f1fa9d3d275404fa2cb2ba83f4cb54af
56a318ce387afd82054e0c46608fad64ca50a808
/src/com/design/creational/builder/TestBuilder.java
2d39168fe5c042612440daf86dc1e399b945f39e
[]
no_license
SandDeep/InterviewQuest
ed83c1bff2fc5ca4604827e4074629fdf0c39fe2
ee539177d781433956a8626483d1644de6929ee1
refs/heads/master
2016-08-12T13:21:41.628836
2015-11-18T05:25:02
2015-11-18T05:25:02
46,397,145
0
0
null
null
null
null
UTF-8
Java
false
false
257
java
package com.design.creational.builder; public class TestBuilder { public static void main(String[] args) { Computer computer = new Computer.ComputerBuilder("500 GB", "2 GB") .setBluetoothEnabled(true).build(); System.out.println(computer); } }
[ "deepesh.maheshwari@timesinternet.in" ]
deepesh.maheshwari@timesinternet.in
14a8699e2c43dbad6942269e3e73d30da2af139e
b502aa870139c134e72ed9296e666aa4ccf4debf
/dunwu-common/src/test/java/io/github/dunwu/util/regex/RegexHelperTests.java
1c1b672fe42a0565e96640a7cc52f301e5753dc3
[ "Apache-2.0" ]
permissive
JavisZ/dunwu
2fd8dcf0004b6d13f30927e5d67e527e66e1ad19
ae5125b0a18a2f18b0d706cd09d6f0ef280fb248
refs/heads/master
2020-05-31T18:24:22.161525
2019-05-24T06:51:34
2019-05-24T06:51:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,000
java
package io.github.dunwu.util.regex; import org.apache.commons.collections4.CollectionUtils; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import java.util.List; /** * @author <a href="mailto:forbreak@163.com">Zhang Peng</a> * @since 2019-01-16 * @see RegexHelper */ @DisplayName("正则校验测试例集") public class RegexHelperTests { @Test public void test2() { String content = "rulename,{\"m_login_ip\":{\"login_account_cnt\":3.0,\"login_ip\":\"127.0.0.1\"," + "\"window_time\":1547605830000,\"judgementId\":\"hello\"},\"allowed\":false,\"version\":0}"; String content2 = "rulename,{\"m_login_ip\":{\"login_account_cnt\":3.0,\"login_ip\":\"127.0.0.1\"," + "\"window_time\":1547605830000,\"judgementId\":hello},\"allowed\":false,\"version\":0}"; List<String> matchValues = RegexHelper.getMatchValuesInJson(content, "judgementId"); if (CollectionUtils.isNotEmpty(matchValues)) { matchValues.forEach(item -> { System.out.println(item); }); } List<String> matchValues2 = RegexHelper.getMatchValuesInJson(content2, "judgementId"); if (CollectionUtils.isNotEmpty(matchValues2)) { matchValues2.forEach(item -> { System.out.println(item); }); } } @Nested @DisplayName("校验常用场景") class CheckCommon { @Test @DisplayName("正则校验15位身份证号") public void isValidIdCard15() { Assertions.assertEquals(true, RegexHelper.Checker.isValidIdCard15("110001700101031")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIdCard15("110001701501031")); } @Test @DisplayName("正则校验18位身份证号") public void isValidIdCard18() { Assertions.assertEquals(true, RegexHelper.Checker.isValidIdCard18("11000019900101015X")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIdCard18("990000199001010310")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIdCard18("110001199013010310")); } @Test @DisplayName("正则校验用户名有效") public void isValidUsername() { Assertions.assertEquals(true, RegexHelper.Checker.isValidUsername("gdasg_")); Assertions.assertEquals(false, RegexHelper.Checker.isValidUsername("$dhsagk")); } @Test @DisplayName("正则校验有效邮箱") public void isValidEmail() { Assertions.assertEquals(true, RegexHelper.Checker.isValidEmail("he_llo@worl.d.com")); Assertions.assertEquals(true, RegexHelper.Checker.isValidEmail("hel.l-o@wor-ld.museum")); Assertions.assertEquals(true, RegexHelper.Checker.isValidEmail("h1ello@123.com")); Assertions.assertEquals(false, RegexHelper.Checker.isValidEmail("hello@worl_d.com")); Assertions.assertEquals(false, RegexHelper.Checker.isValidEmail("he&llo@world.co1")); Assertions.assertEquals(false, RegexHelper.Checker.isValidEmail(".hello@wor#.co.uk")); Assertions.assertEquals(false, RegexHelper.Checker.isValidEmail("gdsakh23124")); } @Test @DisplayName("正则校验URL") public void isValidUrl() { Assertions.assertEquals(true, RegexHelper.Checker.isValidUrl("http://google.com/help/me")); Assertions.assertEquals(true, RegexHelper.Checker.isValidUrl("http://www.google.com/help/me/")); Assertions.assertEquals(true, RegexHelper.Checker.isValidUrl("https://www.google.com/help.asp")); Assertions.assertEquals(true, RegexHelper.Checker.isValidUrl("ftp://www.google.com")); Assertions.assertEquals(true, RegexHelper.Checker.isValidUrl("ftps://google.org")); Assertions.assertEquals(false, RegexHelper.Checker.isValidUrl("http://un/www.google.com/index.asp")); } @Test @DisplayName("正则校验IPv4") public void isValidIpv4() { Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv4("0.0.0.0")); Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv4("255.255.255.255")); Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv4("127.0.0.1")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIpv4("10.10.10")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIpv4("10.10.10.2561")); } @Test @DisplayName("正则校验IPv6") public void isValidIpv6() { Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv6("1:2:3:4:5:6:7:8")); Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv6("1:2:3:4:5::8")); Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv6("::255.255.255.255")); Assertions.assertEquals(true, RegexHelper.Checker.isValidIpv6("1:2:3:4:5:6:7::")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIpv6("1.2.3.4.5.6.7.8")); Assertions.assertEquals(false, RegexHelper.Checker.isValidIpv6("1::2::3")); } @Test @DisplayName("正则校验时间") public void isValidTime() { Assertions.assertEquals(true, RegexHelper.Checker.isValidTime("00:00:00")); Assertions.assertEquals(true, RegexHelper.Checker.isValidTime("23:59:59")); Assertions.assertEquals(true, RegexHelper.Checker.isValidTime("17:06:30")); Assertions.assertEquals(false, RegexHelper.Checker.isValidTime("17:6:30")); Assertions.assertEquals(false, RegexHelper.Checker.isValidTime("24:16:30")); } @Test @DisplayName("正则校验日期") public void isValidDate() { Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("2016/1/1")); Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("2016/01/01")); Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("20160101")); Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("2016-01-01")); Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("2016.01.01")); Assertions.assertEquals(true, RegexHelper.Checker.isValidDate("2000-02-29")); Assertions.assertEquals(false, RegexHelper.Checker.isValidDate("2001-02-29")); Assertions.assertEquals(false, RegexHelper.Checker.isValidDate("2016/12/32")); Assertions.assertEquals(false, RegexHelper.Checker.isValidDate("2016.13.1")); } @Test @DisplayName("正则校验中国手机号码") public void isValidChinaMobile() { Assertions.assertEquals(true, RegexHelper.Checker.isValidChinaMobile("+86 18012345678")); Assertions.assertEquals(true, RegexHelper.Checker.isValidChinaMobile("86 18012345678")); Assertions.assertEquals(true, RegexHelper.Checker.isValidChinaMobile("15812345678")); Assertions.assertEquals(false, RegexHelper.Checker.isValidChinaMobile("15412345678")); Assertions.assertEquals(false, RegexHelper.Checker.isValidChinaMobile("12912345678")); Assertions.assertEquals(false, RegexHelper.Checker.isValidChinaMobile("180123456789")); } @Test @DisplayName("正则校验中国手机号码") public void isValidPhone() { Assertions.assertEquals(true, RegexHelper.Checker.isValidPhone("025-85951888")); } } @Nested @DisplayName("校验字符") class CheckChar { @Test @DisplayName("正则校验全是汉字字符") public void isAllChineseChar() { Assertions.assertEquals(true, RegexHelper.Checker.isAllChineseChar("春眠不觉晓")); Assertions.assertEquals(false, RegexHelper.Checker.isAllChineseChar("春眠不觉晓,")); Assertions.assertEquals(false, RegexHelper.Checker.isAllChineseChar("English")); } @Test @DisplayName("正则校验全是英文字母") public void isAllEnglishChar() { Assertions.assertEquals(true, RegexHelper.Checker.isAllEnglishChar("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); Assertions.assertEquals(true, RegexHelper.Checker.isAllEnglishChar("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(false, RegexHelper.Checker.isAllEnglishChar("How are you?")); Assertions.assertEquals(false, RegexHelper.Checker.isAllEnglishChar("你奈我何")); } @Test @DisplayName("正则校验全是大写字母") public void isAllUpperEnglishChar() { Assertions.assertEquals(true, RegexHelper.Checker.isAllUpperEnglishChar("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); Assertions.assertEquals(false, RegexHelper.Checker.isAllUpperEnglishChar("abcdefghijklmnopqrstuvwxyz")); } @Test @DisplayName("正则校验全是小写字母") public void isAllLowerEnglishChar() { Assertions.assertEquals(true, RegexHelper.Checker.isAllLowerEnglishChar("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(false, RegexHelper.Checker.isAllLowerEnglishChar("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); } @Test @DisplayName("正则校验全是单词字符") public void isAllWordChar() { Assertions.assertEquals(true, RegexHelper.Checker.isAllWordChar("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); Assertions.assertEquals(true, RegexHelper.Checker.isAllWordChar("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(true, RegexHelper.Checker.isAllWordChar("0123456789")); Assertions.assertEquals(true, RegexHelper.Checker.isAllWordChar("_")); } @Test @DisplayName("正则校验全是非单词字符") public void isNoneWordChar() { Assertions.assertEquals(false, RegexHelper.Checker.isNoneWordChar("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); Assertions.assertEquals(false, RegexHelper.Checker.isNoneWordChar("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(false, RegexHelper.Checker.isNoneWordChar("0123456789")); Assertions.assertEquals(false, RegexHelper.Checker.isNoneWordChar("_")); } } @Nested @DisplayName("校验数字") class CheckNumber { @Test @DisplayName("正则校验全是数字") public void isAllNumber() { Assertions.assertEquals(true, RegexHelper.Checker.isAllNumber("0123456789")); Assertions.assertEquals(false, RegexHelper.Checker.isAllNumber("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(false, RegexHelper.Checker.isAllNumber("How are you?")); Assertions.assertEquals(false, RegexHelper.Checker.isAllNumber("你奈我何")); } @Test @DisplayName("正则校验不含任何数字") public void isNoneNumber() { Assertions.assertEquals(true, RegexHelper.Checker.isNoneNumber("abcdefghijklmnopqrstuvwxyz")); Assertions.assertEquals(false, RegexHelper.Checker.isNoneNumber("0123456789")); Assertions.assertEquals(false, RegexHelper.Checker.isNoneNumber("test008")); } @Test @DisplayName("正则校验不含任何数字") public void isNDigitNumber() { Assertions.assertEquals(true, RegexHelper.Checker.isNDigitNumber("0123456789", 10)); } @Test @DisplayName("正则校验不含任何数字") public void isLeastNDigitNumber() { Assertions.assertEquals(true, RegexHelper.Checker.isLeastNDigitNumber("0123456789", 5)); Assertions.assertEquals(true, RegexHelper.Checker.isLeastNDigitNumber("0123456789", 10)); Assertions.assertEquals(false, RegexHelper.Checker.isLeastNDigitNumber("0123456789", 11)); } @Test @DisplayName("正则校验不含任何数字") public void isMToNDigitNumber() { Assertions.assertEquals(true, RegexHelper.Checker.isMToNDigitNumber("0123456789", 1, 10)); Assertions.assertEquals(false, RegexHelper.Checker.isMToNDigitNumber("0123456789", 6, 9)); Assertions.assertEquals(false, RegexHelper.Checker.isMToNDigitNumber("0123456789", 11, 20)); } } @Nested @DisplayName("校验Markdonw") class CheckMarkdown { @Test @DisplayName("校验含有 Markdonw ![]() ") public void isMarkdownImageTag() { String newstr = RegexHelper.replaceAllMatchContent("![asgad](http://www.baidu.com/test.png)", RegexHelper.Checker.REGEX_MARKDOWN_IMAGE_TAG, "![]("); System.out.println(newstr); } } }
[ "forbreak@163.com" ]
forbreak@163.com
35f83cda2d3a0ce3e4c2b1278d77eae9a79012b9
50c83fb7897213e7bd21621f556b98edbb44775e
/rs289/src/main/java/org/hannes/scoundrel/util/ApplicationResources.java
b056a3d0dbe7510b7ed3d84ac0cdb9f0626208be
[]
no_license
hanz0r/rs289
ae40f63f94f5c7e6c5f0792c818bbffe60b53d70
fc31942f6d36943ba77cce3d5512b97153b69d02
refs/heads/master
2021-01-18T13:59:30.879804
2015-09-14T15:24:03
2015-09-14T15:24:03
41,672,589
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
package org.hannes.scoundrel.util; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; @ApplicationScoped public class ApplicationResources { /** * The entity manager factory */ private static final EntityManagerFactory factory = Persistence.createEntityManagerFactory("test"); /** * Creates a new entity manager when an injection call has been made * * @return */ @Produces public EntityManager produceManager() { return factory.createEntityManager(); } /** * Disposes the entitymanager. Closes the entity manager factory, the entity manager and commits the current active transaction * * @param manager */ public void destroy(@Disposes EntityManager manager) { manager.getTransaction().commit(); manager.close(); } }
[ "Red@192.168.2.101" ]
Red@192.168.2.101
285436c97dd5d4881783b785386580a4349ffc4a
8023fdab8d8142d9b4d34bf5c62b4aa65b54dfe7
/LPC-v2/app/src/main/java/com/example/ives/lpc_v2/Layouts/InteressadoDialogFragment.java
228494357f33dc00fbf74297db7d6ad9f57e86b6
[]
no_license
mhcabral/LPC-v2
2d7b156b754d23988aa4b56bc01847f452fc8a91
4521391ff6088683056ce13a375b23c637d0103c
refs/heads/master
2021-01-10T07:33:39.486508
2016-01-29T21:32:43
2016-01-29T21:32:43
50,674,401
0
0
null
null
null
null
UTF-8
Java
false
false
6,716
java
package com.example.ives.lpc_v2.Layouts; import android.content.DialogInterface; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.example.ives.lpc_v2.Models.BD; import com.example.ives.lpc_v2.Models.Dialogs; import com.example.ives.lpc_v2.R; import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; import java.util.Calendar; import java.util.Date; /** * Created by Ives on 15/10/2015. */ public class InteressadoDialogFragment extends DialogFragment { private Button btnCancelar; private int year, month, day; private TextView txtDataNascimento; private TextView txtTitle; private EditText edtEndereco; private EditText edtTelefone; private Button btnDataNascimento; private Button btnAtualizar; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setCancelable(false); initDateHourCalendar(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View view = inflater.inflate(R.layout.interessado_dialog_fragment, null); int width = getResources().getDimensionPixelSize(R.dimen.popup_width); int height = getResources().getDimensionPixelSize(R.dimen.popup_height); view.setMinimumWidth(width); view.setMinimumHeight(height); txtTitle = (TextView) view.findViewById(R.id.txtTitle); txtTitle.setText("Interessado: " + Dialogs.getInteressado_dialog_title()); txtDataNascimento = (TextView)view.findViewById(R.id.txtDataNascimento); edtEndereco = (EditText) view.findViewById(R.id.edtEndereco); edtTelefone = (EditText) view.findViewById(R.id.edtTelefone); //verificacaodados(); btnDataNascimento = (Button)view.findViewById(R.id.btnDataNascimento); btnDataNascimento.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { initDateHourCalendar(); Calendar cDefault = Calendar.getInstance(); cDefault.set(year, month, day); DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePickerDialog view, int year2, int monthOfYear, int dayOfMonth) { year = year2; txtDataNascimento.setText( "Data de Nascimento:" + "\n\n" + (day < 10 ? "0" + day : day) + "/" + ((month + 1) < 10 ? "0" + (month + 1) : (month + 1)) + "/" + year ); } }, cDefault.get(Calendar.YEAR), cDefault.get(Calendar.MONTH), cDefault.get(Calendar.DAY_OF_MONTH) ); //Calendar cMin = Calendar.getInstance(); //cMin.set(1900,1,1); //datePickerDialog.setMinDate(cMin); datePickerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { year = month = day = 0; txtDataNascimento.setText(""); } }); datePickerDialog.show(getActivity().getFragmentManager(), "Data"); } }); btnCancelar = (Button) view.findViewById(R.id.btnCancelarI); btnCancelar.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); btnAtualizar = (Button) view.findViewById(R.id.btnAtualizarI); btnAtualizar.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { BD.getInteressado_selecionado().setEndereco(edtEndereco.getText().toString()); BD.getInteressado_selecionado().setTelefone(edtTelefone.getText().toString()); BD.getInteressado_selecionado().setData_nascimento((Date) new Date(year,month,day)); Log.i("ScriptInteressado", BD.getInteressado_selecionado().toString2()); Toast.makeText(getContext(), "Dados Atualizados", Toast.LENGTH_SHORT); BD.limpaInteressado_selecionado(); dismiss(); } }); return view; } private void verificacaodados() { if(BD.getInteressado_selecionado().getData_nascimento() != null){ txtDataNascimento.setText(BD.getInteressado_selecionado().getData_nascimento().toString()); } if(BD.getInteressado_selecionado().getEndereco()!=null){ edtEndereco.setText(BD.getInteressado_selecionado().getEndereco()); } if(BD.getInteressado_selecionado().getTelefone()!=null){ edtTelefone.setText(BD.getInteressado_selecionado().getTelefone()); } } public void initDateHourCalendar() { if(year == 0) { Calendar c = Calendar.getInstance(); year = c.get(Calendar.YEAR); month = c.get(Calendar.MONTH); day = c.get(Calendar.DAY_OF_MONTH); } } }
[ "mh.cabral1@gmail.com" ]
mh.cabral1@gmail.com
409c9937003ffb2efdef9ce460dbc2c35f103931
8b406dd015ce24e8637c3712dd6c1850d13295b6
/Java/08 Encapsulamento/src/exemplo03/Principal.java
c68e0281be3a1d10c7ce5a36c3b7c76755fd8231
[]
no_license
gabrielpereira1999/entra21_matutino
8e3d3aab48d13e3898bc7b8a09055bab968c9e78
03ce1c4ac38c2445e51d6ec16fa07d7ad1678927
refs/heads/master
2020-05-25T06:10:02.046685
2019-05-28T14:54:46
2019-05-28T14:54:46
187,662,131
0
0
null
null
null
null
UTF-8
Java
false
false
137
java
package exemplo03; public class Principal { public static void main(String[] args) { Pessoa p = new Pessoa("Gabriel",20); } }
[ "i3i@proway.treina" ]
i3i@proway.treina
92d67d95ecce9a7f717a29ade8e325573015353f
6c3ac4102c128c9a71797dd5626947cfa8e5ea72
/app/src/main/java/ba/sum/fpmoz/imm/ui/adapters/SubjectsProfesorAdapter.java
dcabd3396210a36e3b280d02df114bc071aafe8c
[]
no_license
mmarijad/Ednevnik-1
7fe8426bc78ea72518188c39beded4af60b7a5ab
77018fd3ae83957485d19f9504f3018fc4e69679
refs/heads/main
2023-03-02T08:59:05.811374
2021-02-07T23:20:53
2021-02-07T23:20:53
334,248,415
0
2
null
2021-02-08T07:07:54
2021-01-29T19:52:46
Java
UTF-8
Java
false
false
4,162
java
package ba.sum.fpmoz.imm.ui.adapters; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.firebase.ui.database.FirebaseRecyclerAdapter; import com.firebase.ui.database.FirebaseRecyclerOptions; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import ba.sum.fpmoz.imm.MainActivity; import ba.sum.fpmoz.imm.Ocijeni; import ba.sum.fpmoz.imm.R; import ba.sum.fpmoz.imm.TabbedClassesInfo; import ba.sum.fpmoz.imm.TabbedOcjeneProfesor; import ba.sum.fpmoz.imm.TabbedSubjectsInStudents; import ba.sum.fpmoz.imm.model.Subject; import ba.sum.fpmoz.imm.ui.fragments.classes.ListSubjectsInStudent; public class SubjectsProfesorAdapter extends FirebaseRecyclerAdapter<Subject, SubjectsProfesorAdapter.SubjectClassViewHolder> { public SubjectsProfesorAdapter(@NonNull FirebaseRecyclerOptions<Subject> options) { super(options); } @Override protected void onBindViewHolder(@NonNull SubjectClassViewHolder holder, int position, @NonNull Subject model) { holder.subjectName.setText(model.getName()); holder.id.setText(model.getNastavnik()); } @NonNull @Override public SubjectClassViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.viewholder_subjects_in_students, parent, false); SubjectClassViewHolder viewHolder = new SubjectsProfesorAdapter.SubjectClassViewHolder(view); viewHolder.setOnClickListener(new Adapter.ClickListener() { @Override public void OnClickListener(View v, int position) { } @Override public void OnLongClickListener(View v, int position) { } }); return viewHolder; } public class SubjectClassViewHolder extends RecyclerView.ViewHolder{ TextView subjectName, id, idd; Button ocjeneBtn, gradeStudentBtn; private FirebaseAuth mAuth; Adapter.ClickListener clickListener; public void setOnClickListener(Adapter.ClickListener clickListener){ this.clickListener = clickListener; } public SubjectClassViewHolder(@NonNull final View itemView) { super(itemView); subjectName = itemView.findViewById(R.id.subjectNameTxt); id = itemView.findViewById(R.id.idTxt); ocjeneBtn = itemView.findViewById(R.id.ocjeneBtn); gradeStudentBtn = itemView.findViewById(R.id.gradeStudentBtn); mAuth = FirebaseAuth.getInstance(); ocjeneBtn.setOnClickListener((v) -> { String key = getRef(getAdapterPosition()).getKey(); String keyy = getRef(getAdapterPosition()).getParent().getParent().getKey(); Intent i = new Intent(itemView.getContext(), TabbedOcjeneProfesor.class); i.putExtra("SUBJECT_ID", key); i.putExtra("STUDENT_ID", keyy); itemView.getContext().startActivity(i); } ); gradeStudentBtn.setOnClickListener((v) -> { String key = getRef(getAdapterPosition()).getKey(); String keyy = getRef(getAdapterPosition()).getParent().getParent().getKey(); Intent i = new Intent(itemView.getContext(), Ocijeni.class); i.putExtra("SUBJECT_ID", key); i.putExtra("STUDENT_ID", keyy); itemView.getContext().startActivity(i); } ); itemView.setOnClickListener((v) -> clickListener.OnClickListener(v, getAdapterPosition())); itemView.setOnLongClickListener((v) -> { clickListener.OnClickListener(v, getAdapterPosition()); return true; } ); } } }
[ "marijadominkovic3@gmail.com" ]
marijadominkovic3@gmail.com