Posts

Exception System.Arithmaticoverflow .NET

I happened to face exactly the same problem. This problem appeared on my machine when I was trying to work with  two versions of .NET framework 1.1 and 2.0 Beta  concurrently installed. It was very annoying indeed as it was not letting any drawing/showing of dialogs as it would popup a message that unable to calculate because of Arithmatic Exception.   Anyway I figured out that this problem was because of corrupted version of .NET framework. And the binaries (.exes and .dlls) are either missing or corrupted in the installed .NET path. The .NET contains all the required libraries and executables to compile and run the .NET application. My problem was solved when i  reinstalled .NET  only. The CDs that comes with VS.NET installation have a separate CD containing the Windows Component Update. On this CD there is a specific folder having only the .NET installation setup with name something like dotnetfx etc. Just run this executable and hopefully yo...

Connecting Oracle8i with Java

Bear this in mind that whenever you use Oracle DON'T use Microsoft provided Driver. Always go for the one provided by Oracle itself e.g. "oracle odbc driver" Next is instead of using the following:        Class.forName ( "sun.jdbc.odbc.JdbcOdbcDriver" );        String url = " jdbc:odbc:thin@localhost:1521:orcl "; You can also use       Class.forName (" oracle.jdbc.driver.OracleDriver ");       String url = " jdbc:oracle:thin@localhost:1521:orcl "; As far as the Datasource name is concerned, the default datasource name is                  beq-local.world   PS:Oracle is bit tough when it comes to running server on Windows box. Anyway the best pair for both Oracle and Windows is "Oracle 8.0.5 for Windows NT" and "Windows NT 4.0 Server" respectively. Also the old Oracle Developer works qui...

Images vs Graphs - Zooming In/Out

About Zooming In or Out, the concept is fairly logical. When dealing with  images  we follow a different technique as compared to  graphs .   In case of  Images  Zooming In ( making the picture bigger ) actually copies each pixel's value arround itself in all directions. For instance consider the following is pixels values from an arbitrary location within an image.                           89  56  74                   82 82 82   4  82   5    When Zoomed    82 82 82  i.e. The pixel at the middle 66   2  19                   82 82...

Graph Implementation

For  C++ Implementation  of Graph Abstract Data Types ADT:   The Graph Template Library - Stable branch http://freshmeat.net/projects/thegraphtemplatelibrary/   based on STL, Standard Template Library   Java Implementation   JGraphT - Default branch http://freshmeat.net/projects/jgrapht/   JGraph - Default branch http://freshmeat.net/projects/jgraph/   based on SWING.

Bjarne Stroustrup: The Design of C++0x

Bjarne Stroustrup The Design of C++0x Reinforcing C++’s proven strengths, while moving into the future http://www.informit.com/content/images/art_stroustrup_2005/elementLinks/rules.pdf

Google "20 percent time" policy for its Employees

http://www.pcma.org/resources/convene/archives/displayArticle.asp?ARTICLE_ID=5074 "To a person, these Googlers pointed to so-called “20 percent time” as a key ingredient of the company’s innovation effort. Put simply, 20 percent time allows Google’s technical people (the vast majority of the company’s employees are engineers) to spend 20 percent of their time working on new ideas large or small. Although it is not a new idea (3M has had a 15 percent rule in place for many years), it is interesting to consider just how vital this mechanism for creativity is to Google’s current success." Also http://www.eightypercent.net/Archive/2005/03/24.html

Integrating Matlab files w/ other languages

MATLAB provides a compiler which can convert .m files into dll or even C code. MCC  is MATLAB to C/C++ compiler. It can compile m-files to executable files with  exe  or  dll  extension. Consult the following article: MATLAB MEX-files http://www.codeproject.com/samples/mexFunction.asp   Visual Basic can used to call dlls using Declare   Function  matfunname  Lib  "dllname"  Alias  "matfunnameA" (ByVal/ByRef  arg1  As   String, ByVal/ByRef  arg2  As String,...  )  As String syntax. Moreover with the full version of Matlab available from market contained on two cds, the compiler is also available. I hope that above explaination will suffice.

Convert 2D points (screen coordinates) into 3D points

The monitor/lcd screen is actually a 2D space. Any point having both x and y values can be plotted over a monitor/lcd screen. How is it possible to have a third coordinate or a 3D look on a 2D space? The concept of 3D in the above mentioned case is a third coordinate namely 'z'. The effect of using the 3rd coordinate on a 2D space appears in terms of   1. " ZOOMING In or Out "  2. " Which object/item/thing should come to forth or back ".  In case of GUI development a very infamous term  Z-order  is used which decides  which object/control should come above which object etc.  Whereas  Zooming In (object is magnified/bigger) or  Out (object is de-magnified/smaller),  either of the two to choose, the z coordinate decides.   Also the  lightening-effect  and the  shadow-effect  plays a very important role in case of 3D games. The concept related to them is called " Ray Tracing ". I hope the above wo...

Oracle doesn't have the scrollable cursor support?

Whenever accessing Database I would highly recommend that you maintain a  table cache  of your own inside the program and traverse through the table within that cache.   Better not to use ResultSet and replace it with your own  Data Structure . There are two reasons why this technique should be followed.  First  a ResultSet contains mostly redundant info as well and it occupies space in memory for all the time.  Secondly  most of the time ResultSet if bounded with Database itself and causing delay for extremely large tables, because of the rule of Thumb that HardDisk seek time is much greater than memory access time.   A custom data structure (a structure or class) can be very easy to implement since the table entries obtained from the ResultSet are mostly parsed as Strings.   We can use any of  java.util.Vector  or  java.util.ArrayList . The  ArrayList  class is also available in C# under  Syst...

Branch and bound algorithm in C#- Article by AsiF Munir

A very authoritative Article along with Implementation by Asif Munir ( http://www.navicosoft.com ) on  Branch and bound algorithm in C#  h ttp://www.codersource.net/microsoft-net/c-image-processing/branch-and-bound-algorithm-in-c.aspx It was also selected as a   Top Pick of the month at  http://www.codersource.net/default.aspx A very encouraging contribution indeed.

The DEMISE of Visual Basic 6.0

Microsoft MVPs move to save Visual Basic http://www.zdnet.com/news/microsoft-mvps-move-to-save-visual-basic/141731 Microsoft walks VB tight rope http://news.cnet.com/Microsoft-walks-VB-tight-rope/2100-1007_3-5620821.html

Artificial Intelligence - Weak AI vs Strong AI

Source:  http://www.faculty.umb.edu/gary_zabel/Courses/Bodies,%20Souls,%20and%20Robots/Texts/Artificial%20Intelligence%20.htm Artificial Intelligence As a theory in the philosophy of mind, artificial intelligence (or AI) is the view that human cognitive mental states can be duplicated in computing machinery. Accordingly, an intelligent system is nothing but an information processing system. Discussions of AI commonly draw a distinction between weak and strong AI. Weak AI holds that suitably programmed machines can simulate human cognition. Strong AI, by contrast, maintains that suitably programmed machines are capable of cognitive mental states. The weak claim is unproblematic, since a machine which merely simulates human cognition need not have conscious mental states. It is the strong claim, though, that has generated the most discussion, since this does entail that a computer can have cognitive mental states. In addition to the weak/strong distinction, it is also ...

Some words about me up there... :)

Talha Obaid, a senior and very intelligent person working with bits, bytes and compilers at ATI Source  http://weblogs.com.pk/fahad/archive/2005/02/26/1443.aspx

JAVA goes Open Source................. Finally

Check out http://java.sun.com/j2se/1.5.0/source_license.html

Evolution of a Programmer...

High school/Jr. High 10 PRINT "HELLO WORLD"   20 END First year in college program Hello(input, output);     begin       writeln ('Hello world');     end Senior year in college (defun hello     (print           (cons 'HELLO (list 'WORLD)))) New professional #include <stdio.h>   main (argc,argv)   int argc;   char **argv; {   printf ("Hello World!\n");   } Seasoned pro #include <stream.h> const int MAXLEN = 80; class outstring;   class outstring {      private:    int size;      char str[MAXLEN];         public:      outstring() { size=0; }      ~outstring() {size=0;}      void print();      void assign(char *chrs);   };   void outstring::print() {     int i; ...

Serial Port Interfacing

There are many ways to communicate with Serial Port. It depends on which Development Environment you are using.   For instance suppose we are using Microsoft Development tools like; Visual C++ 6.0/.NET, Visual Basic 6.0/.NET than we can make use of a very robust control namely Microsoft Communication Control 6.0 (Visual C++) or Microsoft Comm Control 6.0 (Visual Basic). MSComm Control MSDN Link Explaining the control functionality http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcomm.asp   MSComm Control Example ( Visual Basic Example ) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcommx.asp ------------------------------------------------------------------------------------------- Private Sub Form_Load ()    ' Buffer to hold input string    Dim Instring As String    ' Use COM1.    MSComm1.CommPort = 1    ' 9600 baud, no parity, 8 data, and 1 stop...

3D Desktop from JAVA(TM) Technology

http://wwws.sun.com/software/looking_glass/details.html http://java.sun.com/developer/community/chat/JavaLive/2004/jl1026.html

Windows XP - Installing & Checking for License

Laptops are usually shipped with pre-installed windows XP. The Windows within them is OEM and licensed. So there is not need to install Windows again on the same machine. Moreover you can update windows from Control Panel->Windows Update (On the left banner). This will scan your machine and install all the required updates. There is Windows XP SP2 available on the internet. Try updating your machine by using Windows update from Control Panel. To check whether the windows installation on your machine is licensed, try the following steps: Open System properties by pressing Windows+Break button together. Here you will see the information about your machine. Also Registered to: area shows to whom your windows is registered. Moreover you will also find a product key having format something like this 55274-640-8252092-23317 ?????-64?-???????-????? Check that if your product key contains any number other than 640 means that your windows is not licens...