Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~5K People Reached
Favorite Tags

21 Posted Topics

Member Avatar for clife

Hi , I am new to python. I am trying to have a logrotate feature and also try to print the logs in formatted fashion. So I have created two handlers one for log roataion and other for log formatting. The log rotation is working fine as alone, but as …

Member Avatar for rproffitt
0
104
Member Avatar for clife

I am trying to convert the GMT time into unix epoch (starting from 1970), looks like there is a small bug in code , i could not get and exhausted. I see following difference Non leap years Expected output: Jan 20 19:00:01 2019 GMT = 1548010801 Actual output: 1548097201 (which …

Member Avatar for rproffitt
0
209
Member Avatar for clife

Hi , Below code prints odd and even numbers using two threads.code works correctly . But i am unable to figure out whether it works in all scenarios. My doubtful scenario is: Lets say `evenfun` thread is invoked first when the value of `count` is 2 , so the thread …

Member Avatar for clife
0
222
Member Avatar for clife

Hi , Below is the code for printing even/odd numbers alternatively.But some how i am not able to achieve the result. I have seen a version with while loop http://www.bogotobogo.com/cplusplus/quiz_multithreading.php working perfect. But i would like to use one thread for printing one value instead of same thread running in …

Member Avatar for clife
0
194
Member Avatar for clife

Hi, I would like to learn dbus as i encounter it more in my daily work.The problem is that the applications already using it are very complex and there is very less scope to understand exact use of DBus communication. I know other IPCs like message queue, socket etc, the …

Member Avatar for rproffitt
0
183
Member Avatar for clife

Hi, I would like to view the source code( the current line it has executed/going to do) in gdb while i am debugging, and i know list and other commands will display the code. what i would like to know is do i need to set some path or something …

Member Avatar for rproffitt
0
320
Member Avatar for clife

Hi, I am using the below program to parse a file ,extarct values and store them into an array. Here i have same values repeated for example IP , so i need to take only instance of it but rest of data store accordingly. so the correct format is {IP …

Member Avatar for David W
0
248
Member Avatar for clife

Hi, I have the a file which contains information as mentioned in the below format. IP:20.20.20.50 DLBytes:0 IP:0.0.0.0/0 DLBytes:0 IP:20.20.20.52 DLBytes:0 IP:0.0.0.0/0 DLBytes:0 IP:20.20.20.53 DLBytes:187329 IP:0.0.0.0/0 DLBytes:17176 IP:0.0.0.0/0 ULBytes:0 IP:20.20.20.50 ULBytes:0 IP:0.0.0.0/0 ULBytes:0 IP:20.20.20.52 ULBytes:0 IP:0.0.0.0/0 ULBytes:187329 IP:20.20.20.53 ULBytes:17176 I am using below commands to extract entries which have proper …

Member Avatar for clife
0
366
Member Avatar for clife

Hi , I would like to monitor upload and download datas of devices connected to the router. I am using the following iptables rules: sudo iptables -N DMon sudo iptables -A FORWARD sudo iptables -A FORWARD -d 70.70.70.1/26 -j DMon sudo iptables -A DMon -d 70.70.70.50 sudo iptables -A FORWARD …

Member Avatar for clife
0
332
Member Avatar for clife

Hi, I am familiar with C and C++, but dont use sockets regularly.I am facing problem in clinet-server program. my purpose is : 1. First client sends some info to server. 2. Server should read info and inturn send some info to client 3. Client reads info and again sends …

0
177
Member Avatar for clife

Hi, I need to change the nice value of a process, but not sure how to do it. My process has a priority of 0 when it is launched , i need to decrease it to some +ve value. I know we use os.system("renice -n value -p pidof process"). to …

Member Avatar for Gribouillis
0
241
Member Avatar for clife

Hi, The meaing of ^[0-9] is to exclude the characters specified in the [..], but what is the meaning of ^[0-9][0-9]*$. The expression is used to get the process information from /proc , it lists all the PIDs of all running processes with some appended text. but could not understand …

Member Avatar for clife
0
663
Member Avatar for clife

Hi, I am trying to accessing a function from thread created from a class member function. but i am getting error does not come under scope . please help to slove the problem. below is the scenatrio.. typedef void (*Fptr)(type *ptr); class test{ public : Fptr fun; void init(Fptr fun1); …

Member Avatar for clife
0
114
Member Avatar for clife

Hi, I am trying to prepare a shared library using another shared library. but the second shared library does not contian the definations of funtions which are defined in first shared library. lets say i have libfirst.so. in this there are no undefined functions. while creating libsecond.so, i am linking …

Member Avatar for L7Sqr
0
226
Member Avatar for clife

Hi, How will i grep for a string which has '/' in it. I have so many script files some are having #!/bin/bash and some are having #!/bin/sh how can i find the scripts which are having #!/bin/sh. Thanks

Member Avatar for rch1231
0
120
Member Avatar for clife

Hi, I have installed ubuntu 11.10 on my PC and the default shell i got was dash i found it out by ll /bin/sh But i could not run some of the scripts and thought of changing the shell to bash. so i did, cd /bin rm dash unlink dash …

Member Avatar for rch1231
0
147
Member Avatar for clife

What is the meaning of INSTALL_ROOT_DIR ?= ${INSTALL_DIR}/${TARGET_ROOT_DIR} I googled for ?= in shell script , but none showed up. Thanks

Member Avatar for TKSS
0
133
Member Avatar for clife

I try to run a script which has #!/bin/bash but i am getting error as "Illegal option --" /bin/sh is not bash , aborting . i try to change the first line to #!/bin/sh this time it is saying x: unexpected operator i tried runnigscript with ./ and sh, but …

Member Avatar for rch1231
0
189
Member Avatar for victor_3

There are somany mistakes in the code. > QuitorNot(0); arguement is passed( which is infact not needed i guess) , but not handled. in side function QuitorNot(0); while((quit == 'q') || (quit == 'Q')) { return 1; } not required. just if will do. and the return value of QuitorNot() …

Member Avatar for victor_3
0
208
Member Avatar for ragnacrap

The first probelm is scanf("%c",&timein); timein is an array of char pointers , so the correct way of reading if you want to store the time in string format scanf("%s",timein[index]); but first you need to allocate memory for timein[5]. timein[index] = (char *)malloc(sizeof(char)*NO_OF_CHARS); you need to either use fixed number …

Member Avatar for Banfa
0
333
Member Avatar for smdjilani

The #ifndef is used for checking if the macro is not already defined, if macro is defined already it will do nothing, if not we can define macro. below example should clarify your doubt. to see effect uncomment #define MAX 5 #include <stdio.h> //#define MAX 5 #ifndef MAX #define MAX …

Member Avatar for rubberman
0
139