merged
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 10 Feb 2012 00:03:17 +0200
changeset 1221 3354c6e9cb95
parent 1220 74f1ff61a801 (diff)
parent 1218 c3f35f6ea0c9 (current diff)
child 1222 44731d7a3749
child 1241 1b6871f6914a
merged
java.rst
prettyprint.rst
--- a/java.rst	Wed Feb 08 14:23:17 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-.. -*- coding: utf-8; -*-
-
-================
- Java language.
-================
-
-Class version.
-==============
-
-  =========  ====== =====================
-  major      minor  Java platform version
-  =========  ====== =====================
-  45 0x27    3      1.0
-  45 0x27    3      1.1
-  46 0x28    0      1.2
-  47 0x29    0      1.3
-  48 0x30    0      1.4
-  49 0x31    0      1.5
-  50 0x32    0      1.6
-  =========  ====== =====================
-
-where ``minor`` and ``major`` are value of 6 and 8 bytes in .class file::
-
-  0xCA, 0xFE, 0xBA, 0xBE, 0x00, minor, 0x00, major
-
-Access modifiers.
-=================
-
-Public.
--------
-
- * Public class is visible in other packages.
- * Public field is visible everywhere (class must be public too).
-
-Private.
---------
-
- * Private variables or methods may be used only by an instance of the same
-   class that declares the variable or method
- * A private feature may only be accessed by the class that owns the feature.
-
-Protected.
-----------
-
- * Is available to all classes in the same package and also available to all
-   subclasses of the class that owns the protected feature.
- * This access is provided even to subclasses that reside in a different
-   package from the class that owns the protected feature.
-
-default.
---------
-
-What you get by default ie, without any access modifier.
-
- * It means that it is visible to all within a particular package.
-
-static.
--------
-
- * Static means one per class, not one for each object no matter how many
-   instance of a class might exist. This means that you can use them without
-   creating an instance of a class.
- * Static methods are implicitly final, because overriding is done based on
-   the type of the object, and static methods are attached to a class, not an
-   object.
- * A static method in a superclass can be shadowed by another static method in
-   a subclass, as long as the original method was not declared final.
- * You can't override a static method with a nonstatic method.
-
-final.
-------
-
- * A final class can't be extended ie., final class may not be subclassed.
- * A final method can't be overridden when its class is inherited.
- * You can't change value of a final variable.
-
-Exceptions.
-===========
-
-A checked exception is some subclass of Exception (or Exception itself),
-excluding class RuntimeException and its subclasses.
-
-Unchecked exceptions are RuntimeException and any of its subclasses. Class
-Error and its subclasses also are unchecked. With an unchecked exception,
-however, the compiler doesn't force client programmers either to catch the
-exception or declare it in a throws clause.
-
-Inner classes.
-==============
-
-Nested top-level classes.
--------------------------
-
-If you declare a class within a class and specify the static modifier, the
-compiler treats the class just like any other top-level class.
-
-Any class outside the declaring class accesses the nested class with the
-declaring class name acting similarly to a package. eg, outer.inner. Top-level
-inner classes implicitly have access only to static variables. There can also
-be inner interfaces. All of these are of the nested top-level variety.
-
-Member classes.
----------------
-
-Member inner classes are just like other member methods and member variables
-and access to the member class is restricted, just like methods and variables.
-This means a public member class acts similarly to a nested top-level class.
-
-The primary difference between member classes and nested top-level classes is
-that member classes have access to the specific instance of the enclosing
-class.
-
-Local classes.
---------------
-
-Local classes are like local variables, specific to a block of code. Their
-visibility is only within the block of their declaration. In order for the
-class to be useful beyond the declaration block, it would need to implement a
-more publicly available interface.
-
-Because local classes are not members, the modifiers public, protected,
-private, and static are not usable.
-
-Anonymous classes.
-------------------
-
-Anonymous inner classes extend local inner classes one level further. As
-anonymous classes have no name, you cannot provide a constructor.
-
-64-bit problem.
-===============
-
-  http://www.java.com/en/download/faq/java_win64bit.xml
-                Which version of Java should I download for my 64-bit Windows
-                operating system?
-  http://java.sun.com/javase/6/webnotes/install/system-configurations.html
-                Java SE 6 Release Notes Supported System Configurations
-
-Java performance.
-=================
-
-  http://java.sun.com/performance/reference/whitepapers/5.0_performance.html
-  http://java.sun.com/performance/reference/whitepapers/6_performance.html
-
-Creating jar.
-=============
-::
-
-  $ jar cf myFile.jar *.class
-  $ jar cmf myManifestFile myFile.jar *.class
-  $ jar -cfe Main.jar foo.Main foo/Main.class
-
-Profiling Java.
-===============
-::
-
-  $ java -Xprof com.vendor.product.Clazz
-  $ java -Xrunhprof:help
-
-Debugging Java.
-===============
-
-Compile with ``-g`` to preserve source code information::
-
-  $ javac -g -cp $CLASSPATH -sourcepath $SRC_DIR -d $BUILD_DIR
-
-To run Java program in debugger::
-
-  $ jdb -cp $CLASSPATH -sourcepath $SRC_DIR
-
-To attach to Java application you firstly must run application with::
-
-  $ java -Xdebug -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=$PORT \
-    com.vendor.product.Clazz
-
-and then attach with debugger::
-
-  $ jdb -attach $PORT
-
--- a/prettyprint.rst	Wed Feb 08 14:23:17 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-.. -*- coding: utf-8 -*-
-
-===========================
- Pretty print source code.
-===========================
-.. contents::
-
-Code formatter, beautifier, pretty printer.
-
-xml.
-====
-
-tidy.
------
-::
-
-  $ tidy -xml -i -utf8 -o out.xml in.xml
-
-or in Emacs::
-
-  C-x h C-x <RET> c utf-8 <RET> C-u M-| tidy -q -xml -i -utf8 -
-
-  http://tidy.sourceforge.net
-                Home page.
-  http://www.emacswiki.org/cgi-bin/wiki/tidy.el
-                Emacs bindings.
-
-xmllint.
---------
-::
-
-  $ xmllint --format file.xml
-
-or in Emacs:
-
-  : C-x h C-u M-| xmllint --format - <RET>
-
-Emacs and nxml.
----------------
-
-You need introduce line-breaks and then::
-
-  C-x h C-M-\
-
-xmlindent.
-----------
-
-  http://xmlindent.sourceforge.net/
-
-c/c++/java/c#.
---------------
-
-Artistic Style, astyle.
------------------------
-
-A Free, Fast and Small Automatic Formatter for C, C++, C#, and Java Source Code.
-
-There are exist package for Cygwin, Debian.
-
-  http://astyle.sourceforge.net/
-                home page
-
-Uncrustify.
------------
-
-Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA.
-
-Exist package for Windows (binary from home page), Debian.
-
-  http://uncrustify.sourceforge.net/
-                home page
-
-jpplib.
--------
-
-Pretty Printer Library.
-
-  http://jpplib.sourceforge.net/
-                Home page.
-
--- a/web-search.rst	Wed Feb 08 14:23:17 2012 +0200
+++ b/web-search.rst	Fri Feb 10 00:03:17 2012 +0200
@@ -17,6 +17,44 @@
 
   http://www.onelook.com/
 
+Google Code.
+============
+
+  http://code.google.com/
+
+Koders.com.
+===========
+
+Search for code in released Open Source tarballs. You can select license and
+language.
+
+  http://www.koders.com/
+                search page
+
+merobase.
+=========
+
+Search for file names in Open Source VCS.
+
+  http://www.merobase.com/
+                search page
+
+snipplr.
+========
+
+Search for code snippets from its service.
+
+  http://snipplr.com/
+                search page
+
+DuckDuckGo.
+===========
+
+General search engine.
+
+  http://duckduckgo.com/
+                search page
+
 Google historical corpus statistics.
 ====================================
 
@@ -208,47 +246,6 @@
 
   define:WORD
 
-Google Code.
-============
-
-  http://code.google.com/
-  http://www.google.com/codesearch
-  http://www.google.com/help/faq_codesearch.html
-
-file:
------
-::
-
-  file:\.(x|abc)$
-
-lang:
------
-::
-
-  lang:"c++", -lang:java
-  lang:^(c|c#|c\+\+)$
-
-license:
---------
-::
-
-  license:apache,-license:gpl
-  license:bsd|mit
-
-package:
---------
-::
-
-  package:"www.kernel.org"
-  package:\.tgz$
-
-Koders.com.
-===========
-
-You can select license and language.
-
-  http://www.koders.com/
-
 Yahoo search query syntax.
 ==========================
 
@@ -454,4 +451,3 @@
   http://marketshare.hitslink.com/
                 Market Share for Mobile and Desktop. Browsers, Operating
                 Systems, Search Engines and Social Media Marketing
-