Majestics 84 Posting Pro

can you show me the code where you are saving data to database (local)?

Majestics 84 Posting Pro

Your quesiton is not clear, please give an example with your question that what you want to achieve, Any how i just guessed that synchronization can be your issue , check this link http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html it will help you to grab the basic knowledge of synchronization.

Majestics 84 Posting Pro

I compiled your code at first i got the errors you have described, so i took some parts and re compiled one by one .. Your code is o.k it works.

Majestics 84 Posting Pro

http://docs.oracle.com/javase/tutorial/essential/io/rafs.html Use Random Access File Class, it helps you to position your cursor on desired location on file and over write the sold objects with empty spaces. And instead of using text file why dont you use database, like mysql or access. or you can move towards xml to make the process more efficient.

Majestics 84 Posting Pro

You havnt mentioned your code. But according to the error you mentioned this thread can help you. http://stackoverflow.com/questions/5180713/old-format-or-invalid-type-library-exception-from-hresult-0x80028018-type-e

Majestics 84 Posting Pro

When i started the J2ME i used this forum http://www.roseindia.net/j2me/. Hope this help you too.

Majestics 84 Posting Pro

Kindly paste the error or explain it. Reading a huge code is a bit difficult for every programmer.

Majestics 84 Posting Pro

Your question is not clear, kindly please paste some code and some explanation to elborate your problem.

Majestics 84 Posting Pro

Your welcome, kindly please close the post if it solved your problem, so in future other can be benefited.

Majestics 84 Posting Pro

Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes (JFC) — an API for providing a graphical user interface (GUI) for Java programs.

Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit (AWT). Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform. It has more powerful and flexible components than AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides several advanced components such as tabbed panel, scroll panes, trees, tables and lists.

Unlike AWT components, Swing components are not implemented by platform-specific code. Instead they are written entirely in Java and therefore are platform-independent. The term "lightweight" is used to describe such an element.

http://en.wikipedia.org/wiki/Swing_%28Java%29

More Links
http://cs.nyu.edu/~yap/classes/visual/03s/lect/l7/
http://www.javabeginner.com/java-swing/java-swing-tutorial

engrjawad commented: Nice Info +0
Majestics 84 Posting Pro

You actually need to learn events through buttons in c#.
http://www.homeandlearn.co.uk/csharp/csharp_s1p8.html
Check out the link.

Majestics 84 Posting Pro

You have to change your key listener from Released to Pressed. Reason is on release it check so your characters go out of range. Hope this help.

 public void keyPressed(KeyEvent key)
Majestics 84 Posting Pro

I want to control a row inside DGV. I have already applied the keypress event with DGV but it doesnt work.

Majestics 84 Posting Pro

I am working on grid view in c#. I want to attach a key press listener with grid view to dectect up and down keys. I tried "Editcontrol" but it didnt worked. Also "Keypressed event" with grid view , it also didnt worked. Before that I used "Mouse Event" and it worked the way i want... Any help will be greatly appreciated.

Majestics 84 Posting Pro

I have created a project in c#.net. At the time of implemenation it require framework and updations which become a headace, i want to remove this .net nature from my application. I mean to say i want to embed the dll libraries with the application so they become independent of frameworks.. Is there any possible way? Thank you for your precious comments in advance.

Majestics 84 Posting Pro

It isnt difficult, all you have to learn graphics library of java. Its drawing of a rectangle and putting buttons over it. Also u can draw a jpanel and put buttons and increase it size gradually.

http://www.imint.com/demos/islide/demo3500.htm

this website will help you.

Majestics 84 Posting Pro

Woooo great thanks alot. I like the php motion , and clip bucket in them..

Majestics 84 Posting Pro

i just found one... can u list some?

Majestics 84 Posting Pro

Are there any open source video hosting complete websites?

Majestics 84 Posting Pro
Majestics 84 Posting Pro

its because scanner class reach to end when counting the letter. It will return 0 for other two.
1) You can solve this by making a string. and pass that string to scanner
2) make a custom class which has three variable count, total count and length. and make function accordingly and check all of three variable in a function.

Majestics 84 Posting Pro

yes there is, place that file with the jar, or in a folder with the jar.
Like FILES in folder. then reference throught
FILES//file-name
Thats how you can make it dynamic, it will work on all platform.

Majestics 84 Posting Pro

for checking strings use equal function. == sign doesnt work properly while checking strings.

E.g String a  = "hello";
    a.equal("hello"); // ---- true ----------------
Majestics 84 Posting Pro

Better check the documentations for these warnings.
http://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html

This error is because of serializable class. You have two ways to eliminate this

1) Give it a ID
private static final long serialVersionUID = any_Id;

2) If you using eclipse then use
@SuppressWarnings("serial") // this anotation will disable the warning because of serial.

vinnitro commented: thnx for helping it worked +2
Majestics 84 Posting Pro

If you are using JDK 1.7.0 then you have to use generic type as stated in its documentation
http://docs.oracle.com/javase/7/docs/api/javax/swing/JComboBox.html

You wont find that problem in 1.6.

Majestics 84 Posting Pro

You can follow two syntax for loading image

//-------- Directly File Location ------------------
pictureBox1.Load(imageFileName);

OR

//-------------- Load an image from image object -----------------
this.pictureBox1.Image = image;
Majestics 84 Posting Pro

there is no need for OR operator.... use this

while(name.toUpper().equals("anything".toUpper()))
{
    //-------- use to upper function to make it in one case and equal to compare them.
    // Above is java syntax i hope there will be same in c#
} 
Majestics 84 Posting Pro

First Problem Solution : Select All deptno and then select the user specific dept no. and make it selected

Please post your code here, so i can check it out.

Majestics 84 Posting Pro

Is it shuting down during booting process or after boot? Can be battery problem.

Majestics 84 Posting Pro

Caches is a intermediate memory which is required to hold data. This provide faster performance by hardware. In computer cpu has registers then caches. L1 Come first then L2 and then L3 and so one. In last it has access to Ram. The more near to cpu the more it is faster. If we eliminate the register and cache memory and consider ram is only source for temporary storage then cpu will take longer time to process the application which effect the computer performace badly.

As the near to cpu the most faster they are , which make register very fast. but it is very costly to build register so cache was introduced to take extra heavy burden.

L1 can have more or less memory the L2. But L1 memory is faster because it is present in each single cpu. If you have multi core cpu then you will have multiple L1 cache. L2 on other hand is shared among all cpu cores.

If the size of L1 was the same or bigger than the size of L2, then L2 could not accomodate for more cache lines than L1, and would not be able to deal with L1 cache misses.

References http://stackoverflow.com/questions/4666728/size-of-l1-cache-and-l2-cache

Majestics 84 Posting Pro

The reason the program isnt ended is still the process is running. You have to terminate the process.
Write exit and you will see the program ends.

Majestics 84 Posting Pro

There is no error in the program, When u run the jar... U must run like this.

java UDPClient message ipaddress //------------ message can be any message u want to transfer while ipaddress is needed of destination computer

In your program args[0] point to message while arg[1] point to ip address. If u are not running through DOS, then u must have to set the running arguements in the IDE, Like in eclipse you have to go to
Run As -> Run Configuration -> Arguments -> Program Arguments and provide the necesary argurmenets with spaces.

Hope this Help ....................

Majestics 84 Posting Pro

Are u trying to fetch the table names only?
If Yes the query the database with "show table", after that get the records and add them as an item in jcombobox. and can u send me full code, i will help u. or just paste it here properly.

Majestics 84 Posting Pro

Here is Syntax for Switch

switch (expression)
{
   case constant-expression:
      statement
      jump-statement
   [default:
      statement
      jump-statement]
}

In your case it will be like this

swith(result){
case 100: showMessage("Some Message"); break;
default : showMessage("No Match Found");
}

//----------- Default case show when no matching case found in swith statement.
Majestics 84 Posting Pro

Seems like cable problem. Check your cable... Also other p.c can have virus which is creating connection problem.

Majestics 84 Posting Pro

Check out the reference , I havent checked myself but it was accepted answer from msdn forum...

Majestics 84 Posting Pro
TEXTBOX FORMATTING in a single statement.

Textbox formating using a single line of code. I Hope this helps.

Example :

      textBox1.DataBindings.Add("Text",myDataSet,"UnitCost",true,DataSourceUpdateMode.OnValidation,0,"C");

The last parameter "C" formats the UnitCost field to Currency Format. The table below is a list of string formatting parameters that you could use.

Table of Formats
--------------------------------------------------------------------------------------------------------------------------------
Type                            Format                        Example
--------------------------------------------------------------------------------------------------------------------------------
Currency                       C                                 $1,234.50

Scientific
Exponential                    E                                 1.234.50E+004

Percentage                    P                                  45.6%

Fixed Decimal                F?                                ?=no.decimals Ex. F3=123.4000

ShortDate                     d                                  M/d/yyyy

LongDate                      D                                 MMMM dd, yyyy

Long Date 
Short Time                    f                                  dddd,MMMM dd, yyyy HH:mm aa

Long Date 
Long time                      F                                 dddd,MMMM dd yyyy HH:mm:ss:aa

Month & Day                 M                                 MMMM dd

General                        G                                 Date & Time format depends on system locale settings
-------------------------------------------------------------------------------------------------------------------------------

References http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/c860168f-46e5-4786-a68d-ac69c6a7a248/

Majestics 84 Posting Pro

When user buy a product then deduct it with present quantity. Check must be applied for quantity value. And update the new reading in the database.

Majestics 84 Posting Pro

Yes you can save data as much as you have space, after opening the connection. There is no need to re open the connection again and again. After sending the data closing the connection is best practice.

Majestics 84 Posting Pro

http://www.daniweb.com/software-development/csharp/threads/202843/take-backup-of-sql-server-database-using-c

Error :
Back failed for Server

I am using smo code from this thread , but it cant backup...

Majestics 84 Posting Pro

Answer of 2nd question is 1/2 is took at integer and there are answer is converted to int. Thats why we cast it to double.

Majestics 84 Posting Pro

Its a easy task. U better learn some joins for database. I am writing a pesudo query for you , use the syntax and build one for you.

select the required fileds from table t1, table t2 where t1.articlenb = t2.article and t1.cell = 'yes' and t2.instock > 0
Majestics 84 Posting Pro

It Solved Finally , Just BeginInvoke Was required. Some time i think i am a genious :) Thanx buddy to be with me.

Majestics 84 Posting Pro

//statusUpdate("Msg") it hangs here... I dont know how to close this delegate. I have pasted the code for delegate.
After further analysis i came to know that it happens when it tries to write in status Label. Is there any thing UI thread to do with this.

Majestics 84 Posting Pro

I think delegate is causing the problem. I checked my code again and need solution how to end this delegate.

Majestics 84 Posting Pro

HelperCheckDLLS is a simple function for checking file.

//------------------ Caller -----------------------------
Thread t = new Thread(new ThreadStart(checkDLLS));
            t.Start();

            while (t.IsAlive)
            {
                Console.Write("Hang");
                Thread.Sleep(300);
            }


//-------- Checking DLL'S -------------------------------------         
 private void checkDLLS()
        {
            if (HelperCheckDLLS("GSMCommShared.dll"))
            {

//------------------------ Delegate ---------------------------         
        private void statusUpdate(String msg)
        {
            if (statusText.InvokeRequired)
            {
                updateStatusTextDelegate deleg = new updateStatusTextDelegate(statusUpdate);
                statusText.Invoke(deleg, new object[] { msg });
            }
            else
                statusText.Text = msg;
        }
Majestics 84 Posting Pro

Its runs fine... But thread is Alive status remain true which causes infinite loop.
Its the same as actuall, I am using VS 2005 Professional

Majestics 84 Posting Pro

I have reach to main problem... its the while loop which checks for condition , it stops all process. I used Sleep function but its not working.. AnY hELP...

Majestics 84 Posting Pro

I am working on a project, i am using threads over here.. I run a thread and waiting for its isAlive status to become false but my thread is not terminating... Here is the Code Sample.

Thread t = new Thread(new ThreadStart(print));
t.start();

while(t.IsAlive)
{
}

console.writeline("Thread is Dead Now");

private void print()
{
console.writeline("Hello,World");
}

//------------------------------- Syntax is buggy but logic is same as of my app -----------
Majestics 84 Posting Pro

Check the graphics card compatibility with Ram.