Recent Notes
Displaying keyword search results 1 - 10
Created by mee2 on October 20, 2011 16:52:33
Last update: October 20, 2011 16:54:17
Alfresco RESTful URLs provided by Web Scripts are extensively documented, but examples are hard to come by. This makes it hard to ramp up for beginners. Here are some examples I tested on 3.4.4 enterprise edition and 4.0a community edition, with the results documented. To list the available scripts:
http://localhost:8081/alfresco/service/index There's a Refresh Web Scripts button at the bottom of the page. If you add a Web Script, you need to click that button in order for the system to know about your addition. To get information about the root folder ( Company Home ): http://localhost:8081/alfresco/service/cmis/p To get information about the folder Data Dictionary : http://localhost:8081/alfresco/service/cmis/p/Data... To get information about the folder Data Dictionary/Space Templates : http://localhost:8081/alfresco/service/cmis/p/Data... You get the idea. To list the children...
Created by freyo on August 25, 2011 09:07:40
Last update: August 25, 2011 20:45:43
This is a list of built-in Android permission values: Permission Description Since API Level android.permission.ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded. 1 android.permission.ACCESS_COARSE_LOCATION Allows an application to access coarse (e.g., Cell-ID, WiFi) location 1 android.permission.ACCESS_FINE_LOCATION Allows an application to access fine (e.g., GPS) location 1 android.permission.ACCESS_LOCATION_EXTRA_COMMANDS Allows an application to access extra location provider commands 1 android.permission.ACCESS_MOCK_LOCATION Allows an application to create mock location providers for testing 1 android.permission.ACCESS_NETWORK_STATE Allows applications to access information about networks 1 android.permission.ACCESS_SURFACE_FLINGER Allows an application to use SurfaceFlinger's low level features 1 android.permission.ACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks 1 android.permission.ACCOUNT_MANAGER Allows applications to call into AccountAuthenticators. Only the system can get this permission. 5 android.permission.AUTHENTICATE_ACCOUNTS...
Created by freyo on July 27, 2011 13:28:07
Last update: July 27, 2011 13:28:07
From Android doc :
Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's no common storage area that all Android packages can access.
Android ships with a number of content providers for common data types (audio, video, images, personal contact information, and so on). You can see some of them listed in the android.provider package. You can query these providers for the data they contain (although, for some, you must acquire the proper permission to read the data).
Well, maybe not the only way, but definitely the only recommended way.
Created by Dr. Xi on April 26, 2011 20:12:01
Last update: April 28, 2011 15:28:12
An XML schema is a definition of XML files, in XML. It plays the same role as old-time DTDs. Overall, an XML schema file looks like this:
<schema attributeFormDefault = (qualified | u... The attribute meanings: targetNamespace : The name space targeted by the current schema definition. It can be any URI. id and version : For user convenience, the W3C spec defines no semantics for them. xml:lang : Natural language identifier defined by RFC 3306 . attributeFormDefault and elementFormDefault : Set default values for the form attribute for attribute and element declarations. blockDefault and finalDefault : Set default values for the block and final attributes for attribute and element declarations. The W3C defined some built-in datatypes . Examples of primitive datatypes are: string ,...
Created by Dr. Xi on March 28, 2011 11:11:33
Last update: March 28, 2011 11:13:21
grep is a versatile command with many variations (grep, egrep, fgrep, then various implementations). It uses a regula expression (regex) pattern to filter input. But then there are basic and extended flavors of regex - leading to even more confusion. And, beware that there are lots of bad examples of regex in the wild... There are two critical questions to ask when you use grep: which grep implementation are you using? what is the flavor of the regex? Here are some examples for gnu grep v2.7:
# Find all numbers (no decimal point), basic regex... Use the -o flag to show only the matching part instead of the whole matching line: grep -o -E '\b[0-9]{2}\b' The good thing about the gnu grep is that it...
Created by woolf on February 10, 2011 12:51:14
Last update: February 10, 2011 13:06:11
Windows command line shell does not come with a sleep command. One trick is to emulate sleep using the ping command:
C:\>ping /?
Usage: ping [-t] [-a] [-n count...
To sleep for about 5 seconds:
@rem make sure to ping a non-existing IP, otherwis...
If you have the Windows Resource Kit installed, it does provide a sleep command:
C:\>sleep
Usage: sleep time-to-sleep-in-s...
Created by magnum on December 03, 2010 08:53:18
Last update: December 03, 2010 08:54:23
You can use the ntfsresize utility on Linux to shrink or expand an NTFS partition (boot, for example, with the DRBL live cd).
To shrink an NTFS partition:
shrink NTFS (the file system) with ntfsresize.
re-create a smaller partition to hold the shrinked file system with FDisk.
To expand an NTFS partition:
Recreate a partition that's bigger than the previous one.
expand NTFS to the full size of the new partition.
The following are from excerpts from ntfsresize FAQ (Frequently Asked Questions) :
ntfsresize help:
[tinker:root]:(~)# ntfsresize -h
ntfsresize v1....
ntfsresize example session:
[tinker:root]:(~)# ntfsresize -s11000M /dev/hd...
Fdisk example session:
[tinker:root]:(~)# fdisk /dev/hdc
...
Created by Fang on August 10, 2010 21:37:36
Last update: October 25, 2010 20:18:47
The tags <fmt:formatNumber> Format a numeric value as number , currency or percentage - controlled by the type attribute (defaults to number if type is missing). Syntax:
<fmt:formatNumber value="numericValue" [type="... Attributes: Name Dynamic? Type Description value true String or Number Numeric value to be formatted. type true String Specifies whether the value is to be formatted as number, currency, or percentage. pattern true String Custom formatting pattern, must follow the pattern syntax specified by the class java.text.DecimalFormat . currencyCode true String ISO 4217 currency code. Applied only when formatting currencies (i.e. if type is equal to "currency"); ignored otherwise. currencySymbol true String Currency symbol. Applied only when formatting currencies (i.e. if type is equal to "currency"); ignored otherwise. It is used only when currencyCode is...
Created by Fang on August 23, 2010 22:55:58
Last update: August 24, 2010 15:45:04
The tags XML flow control tags are exactly the same as their Core flow control equivalents, except that the test condition with a boolean EL expression is replaced by the select condition with an XPath expression. In the case of the forEach tag, the items attribute is replaced with the select attribute. In a test condition, the XPath expression is evaluated to a boolean value by the rules of the XPath boolean() function, which converts its argument to a boolean as follows: a number is true if and only if it is neither positive or negative zero nor NaN. a node-set is true if and only if it is non-empty. a string is true if and only if its length is non-zero. an object of...
Created by Fang on August 17, 2010 19:27:32
Last update: August 17, 2010 19:27:32
Get the length of a collection The length function returns the size of a collection. It can be applied to any object supported by the JSTL core tag <c:forEach> , namely: Arrays Implementation of java.util.Collection Implementation of java.util.Iterator Implementation of java.util.Enumeration Implementation of java.util.Map String When used on String , it returns the number of characters in the string. Test it Make these additions to the expanded test application : Create a new Java class LengthFunction :
package jstl.demo.handler; import java.... Create a new JSP ( lengthfunction.jsp ) under webapp : <%@ taglib uri="http://java.sun.com/jsp/jstl/c... Compile and package the WAR with: mvn package Deploy the WAR to a servlet container of your choice (for example, Tomcat or JBoss). Test the page with this URL...