Blog moved to http://how2that.blogspot.com
tushar kapila 2
Anyone can comment, so leave your views
Tuesday, December 8, 2009
Thursday, November 5, 2009
advanced comands in XP..... exes in the windows system32 folder that can be of use
blog moved to http://how2that.blogspot.com/
Posted by Tushar Kapila at 9:09 AM 0 comments
Sunday, November 1, 2009
how would a mobile phone control a PC?
personal computer/ desktop
| internet | 3rd part web site | internet | mobile phone with app |
www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Posted by Tushar Kapila at 2:44 PM 0 comments
Tuesday, August 18, 2009
MS Office excel VBA features
Posted by Tushar Kapila at 2:02 PM 0 comments
Wednesday, April 22, 2009
I love Java , PHP, VBA, mysql, J2ME, VB6, oracle, linux win 2000+
blog moved to http://how2that.blogspot.com/
Posted by Tushar Kapila at 4:00 AM 0 comments
Wednesday, February 25, 2009
Java Apache releasing new HttpComponents
http://hc.apache.org improved library and better code. bug fixes over earlier versions. but its a new set of packages so cannot port directly. but worth the time as its better than the earlier blokes. Quick Start Enjoy!
HttpComponents is used to make requests to a page web page as get/ post. site scraping etc. Contact us for a solution Sel2In
Posted by Tushar Kapila at 7:19 AM 0 comments
Monday, February 23, 2009
Low-Tech Fixes for High-Tech Problems
Dry Ink Cartridge
If your printer's ink cartridge runs dry near the end of an important print job, remove the cartridge and run a hair dryer on it for two to three minutes. Then place the cartridge back into the printer and try again while it is still warm.
"The heat from the hair dryer heats the thick ink, and helps it to flow through the tiny nozzles in the cartridge," says Alex Cox, a software engineer in Seattle. "When the cartridge is almost dead, those nozzles are often nearly clogged with dried ink, so helping the ink to flow will let more ink out of the nozzles." The hair dryer trick can squeeze a few more pages out of a cartridge after the printer declares it is empty.
Remote Car Key
Suppose your remote car door opener does not have the range to reach your car across the parking lot. Hold the metal key part of your key fob against your chin, then push the unlock button. The trick turns your head into an antenna, says Tim Pozar, a Silicon Valley radio engineer.
Mr. Pozar explains, "You are capacitively coupling the fob to your head. With all the fluids in your head it ends up being a nice conductor. Not a great one, but it works." Using your head can extend the key's wireless range by a few car lengths.
Credit Card wont swipe
...he reaches beneath the counter for a black plastic bag. He wraps one layer of the plastic around the card and swipes it again. Success. The sale is rung up. "I don't know how it works, it just does," says Mr. Azar, who learned the trick years ago from another clerk. Verifone, the company that makes the store's card reader, would not confirm or deny that the plastic bag trick works. But it's one of many low-tech fixes for high-tech failures that people without engineering degrees have discovered, often out of desperation, and shared.
Posted by Tushar Kapila at 2:50 AM 0 comments
Tuesday, January 13, 2009
Java HTTP Client 4 beta2
Regards
Tushar Kapila
www.worldcommunitygrid.org Volunteer computer Cancer cures
www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: http://tusharkapila.blogspot.com/2008/05/s.html
Posted by Tushar Kapila at 5:31 PM 0 comments
Tuesday, November 25, 2008
Select Files & Folders: C# dotnet project excerpts
using System.Threading;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.Generic;
using Infragistics.Win;
using Icons2;
using Infragistics.Win.UltraWinTree;
using Infragistics.Shared.Serialization;
using FldrSel.draw;
using System.Runtime.InteropServices;
{
/**
* a holder for an icon and its ID
* not required in all cases
*/
public class IconInf
{
public Icon theIcon;
public int id;
}
[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public IntPtr hIcon;
public IntPtr iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
};
{
public const uint SHGFI_ICON = 0x100;
public const uint SHGFI_LARGEICON = 0x0; // 'Large icon
public const uint SHGFI_SMALLICON = 0x1; // 'Small icon
public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
}
public class Othr
{
private struct SHFILEINFO
{
public IntPtr hIcon; // : icon
public int iIcon; // : icondex
public int dwAttributes; // : SFGAO_ flags
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
}
private static extern IntPtr SHGetFileInfo(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, int uFlags);
private const int SHGFI_SMALLICON = 0X1;
private const int SHGFI_LARGEICON = 0X0; // Large icon
public const string FOLDER_STR = "[folder]";
public const string DRIVE_STR = "[folder]";
Dictionary<string, IconInf> icons = new Dictionary<string, IconInf>();
{
}
public void init(){
string sExtn = "txt";
if (!icons.ContainsKey(sExtn))
{
IconInf oIconInf = new IconInf();
oIconInf.theIcon = di.GetIcon(sExtn);
oIconInf.id = icons.Count;
icons.Add(sExtn, oIconInf);
}
}
public IconInf getIcon(string sFileName)
{
return getIcon2(sFileName);
}
private IconInf getIcon2(string FileName)
{
lock (icons)
{
if (icons.Count > 1100)
{
System.Collections.ArrayList keys = new System.Collections.ArrayList(icons.Keys);
for (int i = 700; i < 800; i++)//remove from the middle, hopefully they are less used
{
icons.Remove(keys[i].ToString());
}
init();//reinit
}
System.Drawing.Icon myIcon = null;
IntPtr hImgSmall = default(IntPtr); //The handle to the system image list.
IntPtr hImgLarge = default(IntPtr);
string sExtn = null;
sExtn = "txt";
{
//FileName = "d:\Dev"
if (!System.IO.Directory.Exists(FileName))
{
sExtn = FileName.Substring((FileName.LastIndexOf(".") + 1));
}
else
{
sExtn = FileName;
}
if (icons.ContainsKey(FileName))
{
sExtn = FileName;
}
else if (icons.ContainsKey(sExtn))
{
//do nothing
}
else
{
DefaultIcon di = new DefaultIcon();
IconInf oIconInf = new IconInf();
oIconInf.theIcon = di.GetIcon(sExtn);
oIconInf.id = icons.Count;
icons.Add(sExtn, oIconInf);
catch (Exception ex)
{
{
SHFILEINFO shinfo = new SHFILEINFO();
shinfo = new SHFILEINFO();
hImgSmall = SHGetFileInfo(FileName, 0, ref shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_SMALLICON);
myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
//icons[sExtn] = myIcon;
IconInf oIconInf = new IconInf();
oIconInf.theIcon = myIcon;
oIconInf.id = icons.Count;
icons.Add(sExtn, oIconInf);
}
catch (Exception ex2)
{
//default
sExtn = "txt";
}
}
return oIconInf2;
}
}
Posted by Tushar Kapila at 2:53 AM 0 comments
Friday, September 19, 2008
StringTableModel1Col JAVA jtable table model for one column of data all of type string
StringTableModel1Col JAVA jtable table model for one column of data all of type string
@author tushar.kapila at gmail .com
import java.util.*; import javax.swing.*;
public class StringTableModel1Col extends AbstractTableModel{
ArrayList<String> data = new ArrayList<String>();// need array of arrays for multi col
int rowIndex,
int columnIndex){
int toAdd = rowIndex - data.size();
for(int i = 0; i < toAdd; i++){
data.add("");
}
}
data.set(rowIndex,(String)aValue);
}
return data.size();
}
public int getColumnCount(){
return 1;
}
public Object getValueAt(int row, int column){
return data.get(row);
}
Posted by Tushar Kapila at 3:25 PM 0 comments
Wednesday, September 17, 2008
mocha host - bad www.MochaHost.com
Posted On: 05 Sep 2008 12:49 AM
i requested the restart 2 days back but i got no email informing me of restart ! nor does it seem to have worked the site is not working - jsp not appearing.
Posted by Tushar Kapila at 11:05 AM 0 comments
Sunday, September 7, 2008
Blog Archive
Ads by google:
Source code, testing article - one stop shop Software applications written in Java for cell phones, PHP, Java Dot net, PHP & Perl for the web and Vb6, Java, VB6, Perl and Excel VBA for the desktop .
- Tushar G Kapila
Bangalore India 2007 © Remaining page can be removed if you save on your pc or server.