User Profile

Collapse

Profile Sidebar

Collapse
jhamb
jhamb
Last Activity: Jun 3 '08, 06:12 AM
Joined: Feb 21 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jhamb
    replied to Calculation of sine values in C
    in C
    Yeah..!! That is what I know. But everytime it came out to be 10 instead 0..
    So, I posted... I found a bug in the code, just above the loop.
    That was printing an extra 1 before 0....

    Now its done with full accuracy..! :))...
    See more | Go to post

    Leave a comment:


  • jhamb
    replied to How to store the data in buffer
    in C
    Couldn't make out with the work, still.
    Dint understood, how to do..!
    See more | Go to post

    Leave a comment:


  • jhamb
    started a topic Calculation of sine values in C
    in C

    Calculation of sine values in C

    I have to complete a task related to calculation of Sine values.
    I made whole of the program but the first value Im getting, i.e. a * Sin(0), is always displayed as 10 rather than 0.

    This is the loop code I tried :
    Code:
    //All the values a,f,fs.... are of float type.           
    	for(n = 0;n <= N-1; n++)
    	{
    		double *s = malloc(sizeof(double));
    		double *x = malloc(sizeof(double));
    ...
    See more | Go to post

  • jhamb
    started a topic How to store the data in buffer
    in C

    How to store the data in buffer

    Hello,

    I want to read a file and to pass the values in a buffer but the values are of different datatype. So I cant put the values in the char type buffer.
    What to do?

    I found this but dint worked for me...
    Code:
    void print ( char *Buffer, usigned long bufferSize, int chunkSize );
    
    /*This fn will accept file buffer and the buffer size and the chunk size
    Send the buffer in chunks which
    ...
    See more | Go to post

  • jhamb
    started a topic graphs in vb
    in .NET

    graphs in vb

    can anybody tell me how to draw a graph in vb2005
    and input values are enter in textbox
    See more | Go to post

  • jhamb
    replied to Passing data from one page to other
    in .NET
    I've done with my work now.
    Its working with that code, provided by you in #2.
    I have just put up a textbox instead of Dropdownlist in next page.

    Thanks... :))
    See more | Go to post

    Leave a comment:


  • jhamb
    replied to Passing data from one page to other
    in .NET
    This helped but gave an error...
    I got some problem in getting the value by querystring n to get into dropdownlist2 in next page !!...
    See more | Go to post

    Leave a comment:


  • jhamb
    started a topic Passing data from one page to other
    in .NET

    Passing data from one page to other

    Hye,
    I have a task to complete.
    In that, I have to pass data between web pages.
    The selected item from dropdownlist in one page should be passed to dropdownlist in other page.

    This is what i have tried..
    Code:
    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
         
            DropDownList1.AutoPostBack
    ...
    See more | Go to post

  • jhamb
    replied to To output the contents of a text file
    in C
    Its a CPP file..
    Code.txt file contains digits 1 or -1.
    Here we use -1 in place of 0.
    They are 1024 in total....
    See more | Go to post

    Leave a comment:


  • jhamb
    started a topic To output the contents of a text file
    in C

    To output the contents of a text file

    Hye,

    I wanted to get a help to display the contents of a text file.
    It contains 1024 bits but output shows just 300 bits.
    There may be some problem. The program should start reading the file from beginning, but its counting only last 300 bits.

    Here's my code :
    Code:
    #include "iostream.h"
    #include "stdafx.h"
    #include "conio.h"
    #include "string.h"
    ...
    See more | Go to post

  • jhamb
    replied to Help with basic C problem
    in C
    Then can try one thing only.
    To calculate the difference between numbers and check them if they are positive or negative... :):)...
    See more | Go to post

    Leave a comment:


  • Hey all,
    I am done with the complete task..! :)

    Code file name: perl_code.pl
    Code:
    $Start_Str = shift @ARGV;                  # to pass starting string
    $End_Str = shift @ARGV;                    # to pass ending string
    foreach $file (@ARGV)                       # to repeat the task for each file
    {
       $Flag = 0;
       $filename = "Final_".$file;
       open(DATA, ">$filename");
    ...
    See more | Go to post

    Leave a comment:


  • jhamb
    replied to Help with basic C problem
    in C
    Hey, You can check the condition like if you are sorting numbers in order
    Then second number will always be a median... :):)
    I think, this would not get you any obstacle while using float numbers too.
    But that code would be too lengthy for you..
    I recommend the following:
    Get 3 variables as a,b,c or change as you may like.
    Code:
                    float a,b,c;
                    cin>>a>>b>>c;
    ...
    See more | Go to post

    Leave a comment:


  • Rohit,
    KevinADC was just telling you to add lines in the loop to make up the task of removing all the sequence of lines in FOR_LAB'ed code. :):)

    For instance the Input File content is as below:

    Code:
    if (file.open(pszFileName))
       {
                            pby = (char*)file.getBufferPointer();
    #if FOR_LAB
       DWORD dwSize = file.getFileSize();
       DWORD dwMinFileSize = sizeof(CVTableCfgFileHeader)
    ...
    See more | Go to post
    Last edited by eWish; Feb 25 '08, 02:24 PM. Reason: Please use code tags

    Leave a comment:


  • Sorry, for repetition of same post..
    Please ignore this post... :):)
    See more | Go to post

    Leave a comment:


  • One more thing I had to look upon:
    The code should be able to do it for multiple files and directories, recursively.

    But I would like to see working for single file first, before going further.
    I will try writing some code by self. If get stuck, I'll post...

    Anubhav Jhamb
    See more | Go to post

    Leave a comment:


  • Nithinpes,
    Thanx for that loop code, I was just looking for that kind of job to be done. :)

    Rohit,
    Well, thank you too for correcting the search condition. Now I gotto know about it. :)
    See more | Go to post

    Leave a comment:


  • Perl code for parsing a text file and output a text file

    Hi,
    This code is in Perl (just a trial, not tested) to parse a text file and output to another file.
    It is used to delete lines that are not required and output lines that the user wants, to a new file.

    The problems are:
    1 This script is giving blank lines in the new file.
    2 I have to remove a whole delimitter (#if FOR_LAB) from the text file.
    3.The tool should be able to parse the file, and remove...
    See more | Go to post
    Last edited by eWish; Feb 21 '08, 02:10 PM. Reason: Please use [CODE][CODE] tags
No activity results to display
Show More
Working...