Thursday, December 29, 2011

Delete alfresco footer and share footer (with community-3.4-share.png)

When using alfresco community your application send request to www.alfresco.com to get community-3.4-share.png file. And if your project works on local domain as our (www.istinadm.loc) then u'll want delete alfresco footer and share footer.
Open your favourite IDE (eclipse:) ) and create alfresco project. In build.xml write jar file name (jar name must begin with "aa" or "aaa" - when tomcat sorts jar files your file must come first). Create class as following:

Wednesday, December 7, 2011

Android ImageView: Zoom in Zoom out And Drag

Short description about ImageView:
Android supports 3 common image formats PNG, JPG, GIF, along with 9 patch PNG images. Images are stored in the directory res/layout/drawable. 
As of version 1.6 of the Android SDK multiple drawable directories exist for different screen resolutions. There are low, medium, and high DPI specific directories, drawable-ldpi, drawable-mdpi, drawable-hdpi respectively. This allows you to create images at different DPI to enhance the appearance of your application. 
All image filenames should be lowercase and only contain letters, numbers, and underscores.

Friday, November 18, 2011

How to recover mysql db from .myd, .myi, .frm files

One thing to note:
The .FRM file: Regardless of the storage engine you choose, every MySQL table you create is represented, on disk, by a .frm file, which describes the table's format (i.e. the table definition). The file bears the same name as the table, with a .frm extension. MySQL stores .frm files in datadir/database_name (If u don't know where is located your datadir then see your <mysql_install_dir>/my.ini file's #Path to the database root) .frm file is specific to your MySQL version.
The .MYD file is NOT specific to version, at least not minor versions.
The .MYI file is specific, but can be left out and regenerated with REPAIR TABLE.
Recover MySQL DB:
1. Create a dummy database (say vmdb)
2. Copy all these .myd, .myi, .frm files to mysql\data\abc wherein mysql\data\ is the place where .myd, .myi, .frm for all databases are stored.
3. Then go to phpMyadmin, go to db vmdb and you find your database!

Friday, November 4, 2011

Do Before Publish Your Android Application

Preparing and packaging an application for publication is called the release process. The release process is an exciting time: The application is stable and working as expected, all those troublesome bugs have been resolved (within reason, at least), and you feel that you’re ready to put your app in front of users.
The final build you perform - the build you expect to deliver to users - is called the release candidate build. The release candidate build should be rigorously tested and verified before it reaches users’ hands. If the release candidate build passes every test, it becomes the release build - the official build for publication.

Wednesday, November 2, 2011

An unhandled win32 exception occured in emulator-arm.exe

An Android Virtual Device (AVD) is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator. For more information u can read from developer.android.com


When u debug your Android application in eclipse on win32 u may be see exception as following:


An unhandled win32 exception occured in emulator-arm.exe [xxxx]

Monday, October 24, 2011

PayPal Instant Payment Notification (IPN)

Lets start.

WHAT IS PayPal?
PayPal is a service that enables you to pay, send money, and accept payments without revealing your financial information.


WHAT IS IPN?
Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other information related to a transaction.


The Following diagram shows requests and responses, which are the result of processing button clicks or API operations on PayPal. PayPal sends an IPN message when it sends a response to a request. The IPN message is not actually part of the response sent to your website. Rather, the IPN message is sent to the your listener, which allows you to take actions that are not directly tied to the operation of your website.

Friday, October 21, 2011

Debugging Applications with DDMS

 The Dalvik Debug Monitor Service (DDMS) is a debugging utility that is integrated into Eclipse through a special Eclipse perspective. The DDMS perspective provides a number of useful features for interacting with emulators and handsets and debugging applications.

You can use the DDMS File Explorer to browse files and directories on the emulator or a device You can copy files between the Android file system and your development machine by using the Push and Pull buttons available in the top right-hand corner of the File Explorer tab. You can also delete files and directories by using the Delete button or just pressing the Delete key.

Thursday, October 20, 2011

Creating Android Projects

Brief History
Android is the first complete, open, and free mobile platform. Developers enjoy a comprehensive software development kit, with ample tools for developing powerful, feature- rich applications. 
The platform is open source, relying on tried-and-true open standards developers will be familiar with. And best of all, there are no costly barriers to entry for developers: no required fees. (A modest fee is required to publish on thirdparty distribution mechanisms such as the Android Market.) Android developers have numerous options for distributing and commercializing their applications.


Creating Android "Hello World" App.
Before u start creating Android Projects you should already have the Java (JDK 5 or JDK 6) installed + Eclipse ( >= 3.5 (Galileo)) + Android SDK + ADT Plugin.

The Android Project Wizard creates all the required files for an Android application.
Open Eclipse and follow these steps to create a new project:

Monday, October 10, 2011

Google Docs integration with Alfresco

Hi again :) In this post I'll write How to Use the Google Docs Integration with Alfresco. Lets start:

Alfresco provides powerful and massively scalable repository services for the control of critical information. Google Docs™ provides a refreshing and empowering user experience for the creation and development of that information. Both solutions have experienced extraordinary adoption within the small/mid-market market and both have moved into the Enterprise market with equal aplomb and success.

The increasing market demand for and adoption of Alfresco and Google Docs™ has made an intersection of the two solutions immanent. True to the character of the company and culture of the community, Alfresco recognized the need, identified the value, and delivered a solution.

Thursday, October 6, 2011

Show Help Ballon (tooltip) in Alfresco Share

Hi.
When I have developed our document management (+case management) head our IT department want show comment in every task which typed by task sender.
I'm using Alfresco 4.0 version. And I have done this using alfresco share standard functions which developed by Alfresco team.
Code for salution goes here:

Wednesday, September 14, 2011

Update server date time at user side by JavaScript

Hello. u can update server time at user side with different ways. I have done this as following:
On refresh I get server date time as milliseconds:

Tuesday, September 6, 2011

A Java PreparedStatement with a SELECT statement and LIKE clause

I want to select site language texts with filter. (I have added a LIKE clause to the SELECT statement.)

For me, the hard part of this example is figuring out how to use wildcard characters with your PreparedStatement parameter. I tried adding it directly to the SQL SELECT statement, then realized I just needed to use the ? character there, and then add the wildcards in the prepStmnt.setString() statement.

Friday, August 26, 2011

Pure Javascript Bar chart

To show a chart, an existing library for charts creation will be necessary. I have chosen to use The jit Javascript library. In this library u create JSON object in server side then call your javascript function with JSON string parameter in user side. This is pure javascript library.

I choose this library because when  I search library for my genealogy tree I have found this lib more useful. For example I have created one diagram yesterday, which must show purchased ecards count by country.

So my SQL looks like following:

Sunday, August 14, 2011

YUI Date Formatting for MySQL date field

For example we want show report with date column. For this I have used YUI datatable (The DataTable control provides a simple yet powerful API to display screen-reader accessible tabular data on a web page. Notable features include sortable columns, pagination, scrolling, row selection, resizeable columns, and inline cell editing. For more information about YUI datatable read from here). Date field is timestamp type in MySQL DB.

Tuesday, August 2, 2011

JasperReport from XML Datasource with Inline Images

There are many library for creating reports. But personally I use Jasper Report. JasperReports is an open source Java reporting tool that can write to screen, to a printer or into PDF, HTML, Microsoft Excel, RTF, ODT, Comma-separated values and XML files. It can be used in Java-enabled applications, including Java EE or Web applications, to generate dynamic content.

I'm adding XML datasources for reports @ my work place and needed to embed the image signature for every report document.

Read Alfresco node to byte array in Javascript

When I created response document for all appeals I want replace signature in document too. But I must save signature images in repository because I want nobody can see signatures. Then I write small class and read image node from repository to byte array then send it to jasper report as Base64 encoded.
But how can u read image from byte array and show it in your document? If u are interested about this then u must read my other post :)

Friday, July 29, 2011

Update Task variables from Alfresco Javascript API

Hi. Alfresco has it's own javascript API for workflow. U can read abaut this from alfresco wiki:
1. Alfresco Javascript API
2. Workflow Administration

U can read and write task variables in JBPM. The Alfresco JavaScript action lets you embed custom JavaScript into process definitions in much the same way that you can embed BeanShell scripts. To do so, simply add an <action> element with class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript" attribute. Inside the <action> element, include a <script> element that defines the JavaScript to execute. As with the BeanShell script definitions, this <script> element may optionally contain <variable> elements
and an <expression> element if you want to limit access to process and task variables.

Wednesday, July 27, 2011

Add Syntax Highlighter for Blogger

Syntax Highlighter are generally used for blogs, which mainly focus on scripting tutorials. We could have seen in many popular blogs using script highlighter to highlight the script. It not only highlight the 
script, but also give us a clear idea, how the script was formulated. This javascript can be capable of displaying css, xml, jscript, python, c# and much more supported programing languages.


Before you could start registration JS for your blog, I recommend you to back up your template.

Saturday, July 23, 2011

Errors and SOLUTIONs for Alfresco installation

Hi.
      Alfresco uses log4j for logging. When u install and use Alfresco u can see errors, warn, debug and etc. in alfresco.log file.

In Linux u can follow errors as: tail -f /opt/usr/local/apache/tomcat/logs/catalina.out
In Windows u can do this by any log tail programs. Personally I am using WinTail :)

U can configure your logging settings in file log4j.properties in directory  <tomcat_webapps_dir>/alfresco/WEB-INF/classes

Thursday, July 14, 2011

JBPM Swimlane for Alfresco

Often, a process has the notion of a role in which multiple tasks during the process get assigned to the same  actor playing that role. For example, suppose you are defining a process that contains multiple tasks performed by "marketing". Rather than assign the marketing group or individual repeatedly to each task, it would be nice if you could make the assignment once, and then tell the other tasks to use the same assignment. In jBPM this is implemented through swimlanes. An actor can be assigned to a swimlane, and then all tasks that need to be performed by the same actor refer to the swimlane.

Alfresco creates one swimlane for you automatically called "initiator". The initiator swimlane is a convenient way to assign tasks to whoever started the workflow.

Thursday, June 30, 2011

Creating a User Defined Language in Notepad++

In notepad++ you can bring up the User Defined Language editor from the menu (View & User Define Dialog...):

There are four tabs to fill out - Folder (as in code folding), Keyword, Comment, and Operators. (For a more in depth overview of the User Defined Language system, check out the Notepad++ docs) Make sure to set the file extension and language name. There's no save button, which is a little confusing, but the changes take effect as you make them.

Installing a user defined language file that someone else has written is pretty simple: In window click import and select user defined language xml file and this will appear in User Language list box.

Wednesday, June 29, 2011

Welcome!

Welcome to my blog.
In this blog I'll write about Alfresco (+ ECM, Java, JS and etc.)