Dream Design Desire Develop

data types in java

Type Explanation Default Wrapper Min Value Max Value
int A 32-bit (4-byte) integer value 0 Integer -2147483648 2147483647
short A 16-bit (2-byte) integer value 0 Short -32768 32767
long A 64-bit (8-byte) integer value 0L Long -9223372036854775808 9223372036854775807
byte An 8-bit (1-byte) integer value 0 Byte -128 +127
float A 32-bit (4-byte) floating-point value 0.0f Float 1.4e-045 3.4e+038
double A 64-bit (8-byte) floating-point value 0.0d Double 4.9e-324 1.8e+308
char A 16-bit character using the Unicode encoding scheme \u0000 Char
boolean A true or false value false Boolean false true

keywords in Java

|abstract |class |extends |implements |null |strictfp |true |assert |const |false |import |package |super |try |boolean |continue |final |instanceof |private |switch |void |break |default |finally |int |protected |synchronized |volatile |byte |do |float |interface |public |this |while |case |double |for |long |return |throw |catch |else |goto |native |short |throws |char |enum |if |new |static |transient

All Arithmetic Operators

Operator Result
+ Addition
- Subtraction (unary minus)
* Multiplication
/ Division
% Modulus
++ Increment
+= Addition assignment
-= Subtraction assignment
*= Multiplication assignment
/= Division assignment
%= Modulus assignment
Decrement

All Logical Operators

Operator Result
& Logical AND
| Logical OR
^ Logical XOR (exclusive OR)
|| Short-circuit OR
&& Short-circuit AND
! Logical unary NOT
&= AND assignment
|= OR assignment
^= XOR assignment
== Equal to
!= Not equal to
? : ernary if-then-else

Some Interesting Utilities

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
public final class Interesting {
/**
* Get a Boolean from a boolean, equivalent to the java 1.4 method Boolean.valueOf(boolean)
* @param value the boolean
* @return the Boolean equivalent
*/
public static Boolean valueOf(boolean value) {
if (value)
return Boolean.TRUE;
else
return Boolean.FALSE;
}
/**
* Test the equality of two doubles by converting their values into IEEE 754 floating-point "double format" long values.
* @param a Double to check equality with.
* @param b Double to check equality with.
* @return True if a equals b.
*/
public static boolean equals(final double a, final double b) {
return Double.doubleToLongBits(a) == Double.doubleToLongBits(b);
}
/**
* Test the equality of two doubles by converting their values into IEEE 754 floating-point "single precision" bit layouts.
* @param a Float to check equality with.
* @param b Float to check equality with.
* @return True if a equals b.
*/
public static boolean equals(final float a, final float b) {
return Float.floatToIntBits(a) == Float.floatToIntBits(b);
}
/**
* Test the equality of a given sub-section of two byte arrays.
*
* @param a The first byte array.
* @param abegin The begining index of the first byte array.
* @param b The second byte array.
* @param bbegin The begining index of the second byte array.
* @param length The length of the sub-section.
* @return True if sub-sections are equal.
*/
public static boolean equals(final byte a[], final int abegin, final byte b[], final int bbegin,final int length) {
try {
int i = length;
while (--i >= 0) {
if (a[abegin + i] != b[bbegin + i]) {
return false;
}
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
/**
* Test the equality of two byte arrays.
* @param a The first byte array.
* @param b The second byte array.
* @return True if the byte arrays are equal.
*/
public static boolean equals(final byte a[], final byte b[]) {
if (a == b)
return true;
if (a == null || b == null)
return false;
if (a.length != b.length)
return false;
try {
for (int i = 0; i < a.length; i++) {
if (a[i] != b[i]) {
return false;
}
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
}
Read More

As i mentioned back, I am good at some projections. So, lets do that thing first.

  1. Need list of target sources, which were influencing me
  2. Need Bookmarking for targeted sources
  3. Categorize the domains, call them in category, on which i want to write
  4. Write synopsis of what to write, for sake of category
  5. Drill down to sub-category if any
  6. Go to 4, till needed
  7. Prepare some initial topics for all categories
  8. again write statement of work kind of proposal
  9. start working, enough listing, go with the flow :)

Completely Random:

Java Language, Java Data Type, Java Collection, Java Date,Java I/O, Java Reflection, Java JDBC, Java Thread, Java XML, JDK Misc, EJB3, JPA, Java Web Services,Java SOA, Email, Spring, Hibernate, JSP, Servlet, JSTL, JSP EL,Java RegEx,Java I18N, Java Network, Java Design Patterns, Java Security, Java Genrics, AWS, Heroku, Cloud Foundry, MongoDB, Redis, Oracle, MapReduce, Spring Data, Spring Social, Spring Security, Spring Batch, Spring HATEOAS, Spring AMQP, OpenShift, Spring Web Services, REST, Scheduling, Spring MVC, ASYNC, WebSocket, YAML, JSON, SAP HANA, Caching, NGINX, Java Script, ECMA 5, ECMA 6, Maven, jQuery, DOM Manipulation, Web Components, Polymer, Adobe Spry, Octopress, JKyll, Hexo, Sublime Text 2, jQuery Mobile, Appcelerator Titanium Mobile, IONOC, Backbone, Underscore, LoDash, Require Js, Node.JS, NPM, Bower, Moments, Angular JS, Marioonette JS, Chaplin, ExoSkeletion,Socket IO, Phantom JS, Jasmine, Mocha, Chai, Sinon, Istanbul, Karma JS, Should JS, When JS, Q js, Mustache, Hogan JS, Dust JS, EJS, Handlebars, Jade, Browserify, Twitter Boostrap, Foundation, HTML5 Boiler plate, jQuery UI, Magnific Popup, Reveeal JS, Nyro.Model, Mousetrap, keyboard js, Masonry js, ISOTope, impress js, d3 js, chart js, raphael, faker js,pdf js, Modernizer, html5 shim, grunt, brunch, Klass, axis2, junit, CXF, Camel, Common-Colleection, commons lang, commons http-client, logging, JULI, Log4j, SLF4j, Logback, commons pool, DBCP, C3P0, erby, Maria DB, Postgress SQL, Apache HttpComponents Client, Apache HttpComponents Core, Lucene, SOLR, Elastic Search, JSF, Rich Faces, My Faces, ODE, Tiles, TomEE, TomCat, vFabric, JBoss, velocity, wicket, Spring Test Conetxt, JBoss logging, Kibana, Logstach, Guava, Mockito, Easy Mock, Jackson, GSON, Jettison, xerces, JAXB, JAXP, JAXR, commons io, play, jetty, netty, cgilb, asm, javassist, h2, hsql, mckoi, google collections, aspect j, aop alliance, FEST Reflection, resin, freemaker, thymleaf, JTA, Joda Time, UML, SVN, GIT, GitHub,Findbug, checkstyle, pmd, sonar, fortify, contrast, eclemma, cobetura, Codepro, mylyn, xtext, jaspersoft, properties, pl-sql, triggers, soapui, ivyde, gradle, selenium, cucumber, TDDD, BDD, jBeehive, apache directory, hex editing, java profiling, groovy, grails, eclipse rcp, markdown, OPPE, terminal, ubuntu, lua, HTML5, CSS3, hudson, jenkis, travis-ci, agile, scrum, EMF, GMF, Activiti, glass fish, Java EE7, mysql, DB2, SQLLite, riak, drools, wildfly, arquilian, infispan, jBPM, resteasy jeresy, XSD, DTD, SPEL, dropwizard, classcyle, jDepend, FEST, Eclipse Link, BoneCP, HikariCP, Proxool, Protocol Buffer Java API, apache thrift, EHCache, mule, fabric8, sevicemix, JOOQ, Spring JMS, Rabbit MQ, Hornet MQ, Active MQ, Hessian, Apache Shiro, Acegi, XPath, Dough Lea’s Util.concurrent Package, Backport Of JSR 166, Disruptor Framework, oro, Bouncy Castle Provider, JASYPT: Java Simplified Encryption, MX4J, WSDL4J, Metrics Com.codahale.metrics » metrics-core, poi, quartz, iText, sankeYaml, drools, leveldb, liferay, jmeter

1
TODO

Its a non ending job.

credits: Github
Read More

I want to write about lot of things, but, i lack the strength for writing. I know, I am lazy, Still projection is a good thing. And this is the best thing, i am good at. Another thing, where i am best, is thinking about the worse.
I took a very long time, to start this blog. 7 + years, in the making. What made this delay is a lot of things, but most importantly the comfort. I was not comfortable with the blogging platforms, i didn’t had control.
I can’t be online all the time, and working offline was almost impossible for blogspot, wordpress, tumbler etc. Believe it or not, i have tested all.
choose any blogging engine, and put subdomain abhiesa, in front of it, and i am there. But that was out of my comfort zone. Too many options in editing, and not having control on output, like css, js, html etc.

After my long patience, i moved to jkyll like system last year, and still, it was tough for me. Ruby, Rake, RVM, etc etc. Yes i am a nerd, but not for ruby, python, jade etc. Also, i needed my home laptop for doing anything on it. I was unable to write, at office (whenever i was free), on the move, at night (when my little daughter, goes to sleep, and illumination is another problem.), etc etc.

Recently i found out something called Hexo.IO, and Travis-CI, and i combined both of them.
Now I have tweaked theme, control over output generation, and automated builds. That means, i office i can just write something on notepad, and in evening, i can create a new file on github and paste its content it.
I can do the same thing from my Nexus 7, and my cheap Micromax Canvas phone.
Whenever I check in, I get my blog updated. I can always revert, and change anything a lot.

Still, somethings are left.

  • learn markdown as pro
  • optimize css
  • move from ejs theme to handlebar theme
  • optimize site for speed, currently speed is very bad
  • have total control on output
  • find a place to host images

I am using sublime text 3 for typing, this blog, most of the time.
I don’t know right know, how good this setup is going to be, but for now, this looks ok, but still impossible.

Read More

Hexo Travis Config Oct 20 2014

My Kind of Hello World

Travis Config to deploy hexo blog automatically using Travis-CI

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
language: node_js
node_js:
- "0.10"
branches:
only:
- source
before_install:
- npm install -g hexo
install:
- npm install
before_script:
- git config --global user.name 'Abhishek Prashant Pandey'
- git config --global user.email 'abhiesa@gmail.com'
script:
- hexo generate
after_success:
- mkdir .deploy
- cd .deploy
- git clone --depth 1 --branch master --single-branch $DEPLOY_REPO . || (git init && git remote add -t master origin $DEPLOY_REPO)
- rm -rf ./*
- cp -r ../public/* .
- git add -A .
- git commit -m 'Auto Update from TRAVIS-CI'
- git branch -m master
- git push -q $DEPLOY_REPO HEAD:master
Read More