Posts

Showing posts from 2013

Java - String Rotate

import java.io.*;

class StringRotate {   
publicstaticvoid main(String[] args) {
String inpstring = ""; InputStreamReader input = newInputStreamReader(System.in); BufferedReader reader = newBufferedReader(input);
try             { System.out.println("Enter a string to rotate:");                   inpstring = reader.readLine();
int len = inpstring.length(); int lastindex = len - 1;
char[] outstring = inpstring.toCharArray();

for (int i = 0; i < len; i++)                   { char ch = outstring[0]; for (int j = 0; j < len - 1; j++)                         {                               outstring[j] = outstring[j + 1];                         }                         outstring[len - 1] = ch;                         { for (int k = 0; k < outstring.length; k++) System.out.print(outstring[k]); System.out.println();                         }                   }
System.out.println(); System.out.println();
for (int i = 0; i < len; i++)                   {

Pascal Triangle

import java.io.*; import java.lang.*;

class PascalTriangle { 
publicstaticvoid main(String[] args) {
String inpstring = ""; InputStreamReader input = newInputStreamReader(System.in); BufferedReader reader = newBufferedReader(input);
try             { System.out.print("Enter number of rows for pascal triangle:");                   inpstring = reader.readLine(); int n = Integer.parseInt(inpstring, 10);
for (int y = 0; y < n; y++)                   { int c = 1;
for(int q = 0; q < n - y; q++)                         { System.out.print("   ");                         }
for(int x = 0; x <= y; x++)                         { System.out.print("   "); System.out.print(c); // 3 digits System.out.print(" ");                               c = c * (y - x) / (x + 1); }
System.out.println(); System.out.println(); }

How sort list of object with multiple data sort in java

Javascript StartsWith And How to Check Plugin in Firfox and Crome

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <script>
function demo(){
    var L = navigator.plugins.length;
    if (typeof String.prototype.startsWith != 'function') {
  // see below for better implementation!
  String.prototype.startsWith = function (str){
    return this.indexOf(str) == 0;
  };
}

document.write(
  L.toString() + " Plugin(s)<br>" +
  "Name | Filename | description<br>"
);

for(var i = 0; i < L; i++) {
  document.write(
    navigator.plugins[i].name +
    " | " +
    navigator.plugins[i].filename +
    " | " +
    navi…

Remove Delta Search features from Internet Explorer

Remove Delta Toolbar from Add-ons managerOpen Internet Explorer. Click the Tools icon (Cogwheel) and select Manage add-ons. Under Add-on Types, select Toolbars and Extensions.In the right pane, select Delta Toolbar & Delta helper Object and click the Disable button.
Remove Delta Toolbar from Windows programsClick the Start button and select Control Panel.Select Programs and Features.Select the Delta Toolbar from the Programs list and right click to uninstall.
Remove Delta Search from default search enginesOpen Internet Explorer. Click the Tools icon (Cogwheel) and select Manage add-ons. Under Add-on Types, select Search Providers.Set your preferred default search engine.Select Delta Search and click the Remove button.
Remove Delta Search home pageOpen Internet Explorer. Click the Tools icon (Cogwheel) and select Internet Options. In the General tab, delete the Delta URL from the Home page text box. Click OK to save the changes
Remove Delta Search home page If you open a new t…

Remove Delta Search features from Google Chrome

Remove Delta Toolbar ExtensionOpen Chrome. Click the Customize and control button ("3 streaks” icon or wrench icon in older versions) and select Settings. Click Extensions in the left menu.Remove/Disable the Delta Toolbar.
Remove Delta Toolbar from Windows programsClick on the Start button and select Control Panel.Select Programs and Features.Select the Delta Toolbar from the Programs list and right click to uninstall Click YES on the popup message.
Remove Delta Search from default Search enginesFrom the Customize and control button ("3 streaks” icon or wrench icon in older versions), select Settings. In the Search section, click Manage search engines and remove Delta Search from the default search engines list.Click OK to save the changes.
Remove Delta Search home pageOpen Chrome. Click the Customize and control button ("3 streaks” icon or wrench icon in older versions), select Settings. In the On Startup section, Click on Set Pages and delete the Delta URL (you can …

Remove Delta Search features from Mozilla Firefox

Remove Delta Toolbar from Add-ons managerOpen Mozilla Firefox. From the Firefox orange button (Or from the standard Tools menu), click Add-ons.In Add-ons manager left side menu bar, make sure Extensions is selectedDisable or remove the Delta Toolbar add-onRestart the browser.
Remove Delta Toolbar from Windows programsClick the Start button and select Control Panel.Select Programs and Features.Select Delta Toolbar from the Programs list and right click to uninstall.Click YES on the popup message.
Remove Delta Search from default search enginesOpen Mozilla Firefox. Click inside the Search text field and press the F4 key Select Manage Search Engines from the drop down listSelect Delta Search and click the Remove button.
Remove Delta Search home pageOpen Mozilla Firefox. From the Firefox orange button (or from the standard Tools menu), select Options.In the General tab, delete the Delta URL from the Home page text box.Click OK to save the changes.
Remove Delta Search home page from New …

How to scan document in zul using TWAIN

Download sample provided by Dyansoft here


<zk xmlns:x="xhtml" xmlns:zk="zk" >

<window   title="scan" closable="true" width="600px" height="400px" mode="modal" popup="true" border="normal" apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.csdcsystems.amanda.jems.web.viewmodel.ScanToInsertAttachmentViewModel')" >

 <script type="text/javascript">

            <![CDATA[

            var DWObject;
            var seed;
            function pageonload() {
                     seed = setInterval(initControl, 500);//Wait 500ms after opening the webpage, call “ControlDetect” function
            }

            function initControl() {
                if (DWObject) {
                    //alert("init");
                    if (DWObject.ErrorCode == 0) {
                        clearInterval(seed);
        …