User Profile
Collapse
-
Sorry for posting in wrong folder...should have posted in question answers folder than parent folder -
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... -
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... -
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... -
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...Leave a comment:
-
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...Leave a comment:
-
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 itLeave a comment:
-
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,... -
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...Leave a comment:
-
Hello any other advise??? I did not get above advise...please replyLeave a comment:
-
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?Leave a comment:
-
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)
{
... -
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??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..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) {
-
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);
...Leave a comment:
-
-
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...
No activity results to display
Show More
Leave a comment: