User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 374,505 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,783 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 41
Search took 0.01 seconds.
Posts Made By: mank
Forum: *nix Software Apr 18th, 2008
Replies: 0
Views: 356
Posted By mank
Running CentOS on dual monitor

Hi,

I am trying to run centOS 5.0 on dual monitor from my laptop
I installed ATI catalyst driver for linux and I get the dual monitor but its not working correctly.

I hear there is a way by...
Forum: Kernels and Modules Apr 5th, 2008
Replies: 9
Views: 1,208
Posted By mank
Re: running CentOS(fedora in vmware)

yes, for linux it doesnt install the tools automatically
I found a link that describes this process very nicely, I used it and it works fine...
Forum: Kernels and Modules Apr 4th, 2008
Replies: 9
Views: 1,208
Posted By mank
Re: running CentOS(fedora in vmware)

hi, when i goto vmware server this is what I get, by I dont know what to download from here
http://www.vmware.com/download/server/drivers_tools.html

btw I run XP in the vmware too, and I can install...
Forum: Kernels and Modules Apr 4th, 2008
Replies: 9
Views: 1,208
Posted By mank
Re: running CentOS(fedora in vmware)

The problem right now is that although Fedora Core works inside vmware
I cannot increase the screen resolution since I cannot install the vmware tools

when I press "install vmware tools then the...
Forum: C Mar 27th, 2008
Replies: 2
Views: 567
Posted By mank
Re: random number generator for float with +/-

I think I found my bug
here is the fixed code

#include <stdio.h>
#include <stdlib.h>
// int ttt;

void populate(int generations)
{
Forum: C Mar 27th, 2008
Replies: 2
Views: 567
Posted By mank
random number generator for float with +/-

I cant seem to figure out whats wrong with this code, I am trying to generate random floating point number numbers with values from 0 to 1 with positive and negative values

here is the...
Forum: Perl Mar 26th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

yes
I dont want to use that label there, its just going to re-read my file,
I dont want to do that, I just want to make sure @line has all the sequence after line containng ">" to line containing...
Forum: Perl Mar 26th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

thanks
this is what my current code looks like.
But I still cant make it stop once it gets a (">") and then output the result
and then again start concatenating till it finds the next ('>') or stop...
Forum: Perl Mar 26th, 2008
Replies: 9
Views: 1,055
Posted By mank
Re: merging two files and removing duplicates

can I use something like
@a = split /\t/, $_; ?
and then compare it everytime ?
Forum: Perl Mar 26th, 2008
Replies: 9
Views: 1,055
Posted By mank
Re: merging two files and removing duplicates

thanks but how can I make sure that there is no record duplication

so there can be different names in the first column(the other columns can be same/different)
name1 account1 123
name2 account2...
Forum: Perl Mar 26th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

ok, so the file contains data as

output.txt

>name1
lsdflsjdfljdsfsjdlfjlksdjfsdf
ksjdfjdsf
ksjdflkjsflksdf
>name2
ksajdasjd
Forum: Kernels and Modules Mar 25th, 2008
Replies: 9
Views: 1,208
Posted By mank
running CentOS(fedora in vmware)

I can run Fedora on vmware, but I cant do "install vmware tools'
So I tried to run /usr/bin/vmware-config.pl and this is what I got.
please help

None of the pre-built vmmon modules for VMware Server...
Forum: Perl Mar 25th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

its showing errors when I try to run that code

#!/usr/bin/perl -w

open (IN, "<$fileName") || die "Cant open $fileName";

my $line = '';

while my $1(<IN>){
chomp;
Forum: Perl Mar 25th, 2008
Replies: 9
Views: 1,055
Posted By mank
Re: merging two files and removing duplicates

so there are two files
fileX
name1 account1 123
name2 account2 324
name3 account3 345

fileY
name1 account1 123
name2 account4 324
name5 account3 345
Forum: Perl Mar 25th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

this code only reads line by line
so if there is a single sequene like (distributed over 2 lines)

LASJDLKAJSDKJSADJLKSADLJLSAKJDK
AKSJDKLJSAKDJJSAD

so my code only prints character in the first and...
Forum: Perl Mar 25th, 2008
Replies: 14
Views: 1,264
Posted By mank
Re: print, number of character from a file

This only checks in a line, but what if the sequence is multiline

#!/usr/bin/perl -w

use strict;
use warnings;

my ($fileName, $firstSequence, $lastSequence) = @ARGV;

open (IN, "<$fileName") ||...
Forum: Perl Mar 25th, 2008
Replies: 14
Views: 1,264
Posted By mank
print, number of character from a file

HI

I am trying to print a certain number of sequences from a file.
So if the sequence is like
LKSAJDLSAJDLSAJDLKSJD.
then I want to write from 10th character to 20th character.
please help. Here is...
Forum: Perl Mar 25th, 2008
Replies: 9
Views: 1,055
Posted By mank
Re: merging two files and removing duplicates

I tried this one, but it isnt working

my ($file1, $file2) = @ARGV;

open (FILE1, $file1) or die "Can't open $file1: $!\n";
open (FILE2, $file2) or die "Can't open $file2: $!\n";
open (MERGE,...
Forum: Perl Mar 25th, 2008
Replies: 9
Views: 1,055
Posted By mank
merging two files and removing duplicates

Hi
I am trying to read two files and then copy their content to a third file while removing duplicates
please help

#!/usr/bin/perl -w
{
open A,shift;

foreach (<A>)
{$a{$_}++};
Forum: Perl Mar 18th, 2008
Replies: 32
Views: 3,227
Posted By mank
Forum: Perl Mar 18th, 2008
Replies: 32
Views: 3,227
Posted By mank
Re: count characters in a string

This is what I am looking for
input file

>abc
XXYYZZ
XXYYZZ
>bcd
XXZZ
XXYY
>cde
Forum: Perl Mar 18th, 2008
Replies: 32
Views: 3,227
Posted By mank
count characters in a string

This code counts number of characters in a single line
how can I make it count(give total X Y Z) it in multiple lines seperated by ">"

while(<IN>) {
chomp;
my @line = split(//, $_);
...
Forum: C Feb 25th, 2008
Replies: 4
Views: 342
Posted By mank
Re: two questions

thnkas, line #11 was extreamly helpful
Forum: C Feb 23rd, 2008
Replies: 4
Views: 342
Posted By mank
Re: two questions

Thanks for the anwers

The first one shows that the value of variable is only retained in btween { and }
something like a local scope.

for the second one I am thinking something like a coin toss...
Forum: C Feb 22nd, 2008
Replies: 4
Views: 342
Posted By mank
two questions

I have two questions regarding c
#1
if I have value(initialize a variable with a value) inside a block, like { }
then how is it different than the value outside that block, but within the same...
Forum: C Nov 27th, 2007
Replies: 2
Views: 376
Posted By mank
parsing a tree

I want to parse a tree
the tree is like (((1,2)3,4)5,6)
see the attached parse tree
the program would produce an array from root to each...
Forum: C++ Nov 7th, 2007
Replies: 7
Views: 494
Posted By mank
Re: segmentation fault

THanks Ancient Dragon
This one works :D

#include <iostream>
#include <iomanip>
using namespace std;


void input_array(int a[], int &n)
{
Forum: C++ Nov 7th, 2007
Replies: 7
Views: 494
Posted By mank
segmentation fault

I want to create two functions, one that takes array values and lenngth
and the other displays array values and length

Here is my code, it gives me segmentation fault

#include <iostream>
#include...
Forum: C Nov 2nd, 2007
Replies: 4
Views: 1,294
Posted By mank
Re: returning three dimensional array

thanks

I think this one works fine

#include <stdio.h>

float *array(void);

float *array(void)
{
Forum: C Nov 2nd, 2007
Replies: 4
Views: 1,294
Posted By mank
Re: returning three dimensional array

For example

multi_return.c: In function ‘funct1’:
multi_return.c:27: warning: return from incompatible pointer type
multi_return.c:27: warning: function returns address of local variable


...
Forum: C Oct 31st, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

thanks guys, looks like I need to change my code a lot :)
Forum: C Oct 26th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

Thanks Salem for pointing that out

how do i get funct() local value eva_container inside main ?


main()
{
funct();
print_it(getMove(eval_container1));
}
Forum: C Oct 26th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

Sorry for posting again

Here is the entire short-code


#include <stdio.h>

float eval_container1[4];

float *getMove(float *a)
Forum: C Oct 26th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

sorry the code should be

float eval_container[4];

function1()
{
eval_container[4]={1.0,2.0,3.0,4.0};
getMove(eval_container);
}
Forum: C Oct 26th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

THanks for clearing that out Ancient Dragon

I got my basics really wrong here

I just wanted to know one thing, the reason I wrote all my code in that way is because eval_container[] is inside a...
Forum: C Oct 25th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

ok I figured what my problem is

I didnt do the function definition and just did the declaration for getMove()

so this is my latest effort

float eval_container[4];
void getMove(float...
Forum: C Oct 25th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

Btw this is what I am running

gcc -I/usr/local/include -c container.c
gcc -static container.o -lgsl -lgslcblas -lm

the first one doenst have problem
in the second line the error shows
Forum: C Oct 25th, 2007
Replies: 19
Views: 1,915
Posted By mank
Re: pass an array from one function to another

Thanks Ancient Dragon and all for posting, I am following your technique
In my code it is showing this error(at the bottom)
TO explain my first code, I have three functions and I am accessing one...
Forum: C Oct 25th, 2007
Replies: 19
Views: 1,915
Posted By mank
pass an array from one function to another

I want to pass a float array from one function to another function
I want to make use of the float array type(here container)


void funct1()
{
float container[4]={0.1,0.2,0.3,0.4}

void funct2() ...
Forum: C Oct 24th, 2007
Replies: 3
Views: 896
Posted By mank
Showing results 1 to 40 of 41

 
All times are GMT -4. The time now is 2:13 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC