User Profile

Collapse

Profile Sidebar

Collapse
gskbond
gskbond
Last Activity: Jun 18 '10, 02:36 PM
Joined: Oct 15 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sorry for posting in wrong folder...should have posted in question answers folder than parent folder
    See more | Go to post

    Leave a comment:


  • Monitoring CPU Usage in Linux (Need to integrate it with C#)

    Hello,

    I have a driver program in C# which uses performance counters for windows to get perf stats (CPU Usage) for windows.

    But for linux there is no known method in C# or .NET using which you can monitor CPU Usage of remote or local unix system.

    I wanted to know that is there any way to achieve this in linux and get performance data in C#. (May be a web service running on Linux and C# program calling...
    See more | Go to post

  • How to monitor performance data (CPU Usage) on linux

    Hello,

    I have a driver program in C# which uses performance counters for windows to get perf stats (CPU Usage) for windows.

    But for linux there is no known method in C# or .NET using which you can monitor CPU Usage of remote or local unix system.

    I wanted to know that is there any way to achieve this in linux and get performance data in C#. (May be a web service running on Linux and C# program calling...
    See more | Go to post

  • regarding replacing a placeholder by windows / unix style path in perl

    I have a template file whose line reads as:

    CREATE TABLESPACE "CUSTTBS" LOGGING DATAFILE '{DBFILE_PATH}c ust.dbf' SIZE 1000M REUSE AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

    The place holder is {DBFILE_PATH}

    I am replacing this by contents in a perl array which has paths in it

    The code to open a file replace contents and write...
    See more | Go to post

  • gskbond
    replied to Unix and Windows style CR LF in C program
    in C
    Ok here is what I am doing

    I have written a perl script which takes input from user about on which system is the database server is installed as a parameter Sys_Type

    I m executing the compiled C binary by passing this parameter to C program and redirecting its output to csv file

    So if user is executing perl script on windows system and gives linux as sys_type (since he prb has mysql DB on linux), it will...
    See more | Go to post

    Leave a comment:


  • gskbond
    replied to Unix and Windows style CR LF in C program
    in C
    Hello all,

    Thanks I just passed a new parameter to C program (0/1 ) indicating system is either win / linux

    If system is win

    In printf I use \r\n

    For Linux I use \n only in printf

    Now regardless of whichever system I run C program on and pipe data to files I am getting correct files in correct format as that of target system.

    We can simply avoid using perl or...
    See more | Go to post

    Leave a comment:


  • gskbond
    replied to Unix and Windows style CR LF in C program
    in C
    Ohh yes sorry my mistake....But the problem is I do not want to use any other utility to convert....

    I want my C program to handle it
    See more | Go to post

    Leave a comment:


  • gskbond
    started a topic Unix and Windows style CR LF in C program
    in C

    Unix and Windows style CR LF in C program

    I have a c program create_row which creates a database row using rand function.

    I am redirecting its output to csv file

    (./create_row param1 param2 param3 param4 > row.csv )

    I have a printf inside program:

    printf("%d,%s,% s,%s,,%s,%s,%05 d,%s,%1d,%s,%10 .0f,%1d,%16.0f, %s,%s,%s,%d,%d, %s\n",
    customerid, firstname, lastname, address, city, state, zip, country, region,...
    See more | Go to post

  • gskbond
    replied to use queue to Level traverse a tree
    in C
    I used following code:

    bool BTree::AnotherT raverseLevelOrd er(Node *root,int lvl,int displaylevel)
    {
    int i;
    int level;
    Dq<Node *> Q;
    Node *tmp;
    Node *tmpPush,*tmpPo p;
    tmp = new Node(mway);
    tmpPop = new Node(mway);

    if(root != NULL)
    {
    level = lvl;
    Q.Add(root);
    while(!Q.IsEmpt y())
    {

    tmp = Q.First();
    //Visit...
    See more | Go to post

    Leave a comment:


  • gskbond
    replied to use queue to Level traverse a tree
    in C
    Hello any other advise??? I did not get above advise...please reply
    See more | Go to post

    Leave a comment:


  • gskbond
    replied to use queue to Level traverse a tree
    in C
    I still did not get what you are trying to say....this is supposed to be a recursive algorithm...... and I cant figure out whether there is a way to find out which nodes are at same level....any other suggestions?
    See more | Go to post

    Leave a comment:


  • gskbond
    started a topic use queue to Level traverse a tree
    in C

    use queue to Level traverse a tree

    Following is my logic to traverse level by level an mway search tree....

    (Yeah I finally used templates to implement a queue... :) )

    void mWayTree:: TraverseLevelOr der(Node *root,int lvl)
    {
    int i;
    int level;
    Dq<Node *> Q;
    Node *tmp;
    Node *tmpPush,*tmpPo p;
    tmp = new Node(mway);
    tmpPop = new Node(mway);

    if(root != NULL)
    {
    ...
    See more | Go to post

  • I am aware of stl...can not use it....have to implement my own queue....
    I still did not get what exactly needs to be done and where???
    Is it at destructor??
    See more | Go to post

    Leave a comment:


  • What I am trying to do is to have a queue implemented for level by level traverse of tree..... I want to push the node for tree on queue as data ....But I am getting error in above implementation. ... please suggest where its going wrong..
    See more | Go to post

    Leave a comment:


  • Queue using a linked list in c++ which stores a mway tree node

    Below is the node for m way tree

    Code:
    class Node
    {
    	public: Node(int imway);
    		    ~Node();
    		    int noofKeys;
    			int *keys;
    			Node **childPointer;
    
    	private:
    			int Nodemway;
    
    };
    
    Below is the node for the queue .
    struct QueueNode
    {
    			Node *storedNode;
    			struct QueueNode *next;
    			QueueNode(int mway)
    			{
    ...
    See more | Go to post
    Last edited by Banfa; Oct 24 '09, 09:49 AM. Reason: Added [Code]...[/code] tags

  • I have done according to above...
    Now I am facing another problem...

    I want to implement a queue using templates...... In this queue I will be pushing class object which itself is using a template....

    template <class T>
    class BNode
    {
    public:
    int Nodemway;
    int noofKeys;
    int *keys;
    BNode<T> **pointer;
    BNode(int imway);
    ...
    See more | Go to post

    Leave a comment:


  • Hello???Is there anybody who can reply?
    See more | Go to post

    Leave a comment:


  • gskbond
    started a topic How to take input from user and create class object??
    in C

    How to take input from user and create class object??

    #include<iostre am>
    using namespace std;

    template <class T, int mway>
    struct BNode
    {
    int noofKeys;
    T keys[mway-1];
    BNode<T, mway> *pointer[mway];
    BNode();
    };

    template <class T,int mway>
    class BST
    {
    public:
    BST();
    ~BST();
    int SearchRecord(T &toBeFound );
    int...
    See more | Go to post
No activity results to display
Show More
Working...