Programming :: Automatically Assigning Version Numbers To Software?

Oct 2, 2010

I am working on some minor programming projects. and wouldt like to keep track of them by version numbers. E.g. 1.0.0

Is there a tool or other method for automatically assigning version numbers to software ?

I am currently using Mercurial. as far as i can see it only assigns revision numbers. E.g. 5

View 3 Replies


ADVERTISEMENT

Programming :: Create Inverted Files To Associate Files To Numbers ( Numbers Being The Index Of My Paths )?

Apr 4, 2011

am writing a small search program for my class. I have decided to use indexing for my program. Ive researched online about indexing and how search engines do it. If im gonno do that I need to create inverted files to associate files to numbers ( numbers being the index of my paths ) . Now I was wondering what would be the best way to create an inverted file ? I was going to create sql tables using mysql api in C but then again there is no array data type or vectors to store few numbers in a single column in mysql and it is not advised to use Enum or SET

View 14 Replies View Related

Programming :: Assigning Variable Is Messing Up?

Nov 5, 2010

I am trying to run this and was into issues

function() {
node=echo "10.11.12.13" | awk '{split ($0, a, "."); print a[1]}'
}

[code]....

View 1 Replies View Related

Programming :: Assigning A Variable For Later Use In Shell Script ?

May 4, 2010

Using things like awk/sed, but have managed to cobble together what I needed so far without a problem. The only thing I'm struggling with is to assign the content of a particular line as a variable, and then to use it again throughout the file.

For example, if what I want is the first line of the file to become the variable "from1", and then to replace the word "Subject" in the file with the string "Message from [from1]". What I thought would work

I tried a few diff combinations but nothing seems to work. All I get is the terminal hanging indefinitely.

View 3 Replies View Related

Programming :: KSh Script - Assigning A File Path ?

Jul 25, 2011

I am assigning a file path to a variable like

$1 means it should accept some file name from cmd prompt but in my case its not working.

View 1 Replies View Related

Programming :: Assigning Bash Variable With The System Command In Awk?

Mar 1, 2011

I am having all sorts of trouble trying to assign a variable within an awk script with the system command. I know there is a lot of ways around this problem, but for efficiency reasons, I would like to, within my awk script, do something like

system(x=3)

or

system(x=NR)

and, latter on the shell script which calls the awk script, use the variable $x. But nothing is passed to x. I have already tried things like

command = "x=3"
system(command)

and also used a pipeline within the system to pipe it to /bin/sh In fact tried a lot of stuff like that, using $(( )) etc etc etc I can create directories e write to files (yes, i could write to a file and read from there, but I dont think it is efficient, plus I am puzzled).

View 7 Replies View Related

Programming :: Assigning Output Of A Command To An Array In Perl?

Nov 25, 2010

I am trying to execute a Unix Command in perl and assigning its output to an array:

Code:
@File_List=exec("ls -1 /tmp");
but it is not working. I have tried the perl function system() also but its return code is

[code]...

View 10 Replies View Related

Programming :: Pass By Reference A Parameter Without Assigning A New Object?

Dec 28, 2010

How can I pass by reference, a parameter, without assigning a new object? In my first example, var = "changed" creates a new local object. In the second, mylist.append will affect the reference target. How to i achieve the same effect with example 1?

Code:
#!/bin/python
var = "unchanged"
def print_string( var ):

[Code].....

View 2 Replies View Related

Programming :: Assigning Structure Object's Variable Outside Main() Gives Parse Error

Sep 2, 2010

Kindly take a look at the code below :

Code:
#include <stdio.h>
struct test
{
int i;
int j;

[Code]....

why i am getting this error. I know the error is occuring because i have assigned values to obj.i and obj.j outside main(). But i want to know why do that result in an error. From my part i have created an object 'obj' of stucture 'test' and assigned values to its variables.

View 7 Replies View Related

Programming :: Get A Number Between Two Numbers?

Feb 1, 2010

I have some code that opens a directory and reads in the names of files which are e.g. 0001, 0002, 0003 up to 9999I need to get all these numbers and then generate a new number that is not one of these numbers already.here is my code to check the files in the directory

DIR *d;
struct dirent *dir;
int i = 0;

[code]....

View 11 Replies View Related

Programming :: Sum The Numbers Between And Including A And B?

Feb 11, 2010

write a script in bash or shell to add the numbers between and including two numbers

View 3 Replies View Related

Programming :: Perl - Interpreter For Fib Numbers

Apr 1, 2010

As some of you know that I am new to this forum. I have another problem that I got stuck on. I have this file called "Fib.rbb" and my instructor told us to write an interpreter program by using Fib.rbb.

"You are to write an interpreter in Perl for Rongs Basic Basic (RBB) as explained in class. The BNF description for RBB and a test file called Fib.rbb are part of the RBB.zip file which is available in the Course Documents folder on blackboard. If you call your interpreter myIntp.pl, you would execute the program via perl myIntp.pl Fib.rbb

Code: Print "A few Fibonacci numbers:"

View 3 Replies View Related

Programming :: Code To Add 5 Numbers In Assembly?

Mar 28, 2011

Looking for code to add 5 numbers in assembly? I want to use array for input of those 5 numbers. No problem if the output is 1 digit(0....9).

View 3 Replies View Related

Programming :: Extract 2 Numbers From A Same File?

Dec 22, 2010

I am trying to extract 2 numbers from a same file and my goal is to print them both in another file, on the same line, separated with a space. I have to do that for 20 files and I would like to have therefore 20 lines like this in the output file. It would look like this :

Quote:

number1_file1 number2_file1
number1_file2 number2_file2
...
...
number_1_file20 number2_file20

So far, I did only extract one number and got an output file like this :

Quote:

number1_file1
number1_file2
...
...
number1_file20

And I did this by running a bash script with the following content :

Code:

#!/bin/bash
ls execution$1$2*.* | while read filename
do
cat $filename | grep -e "Total aborts:" | cut -d " " -f3 >> abort$1$2.dat
done

$1 and $2 are just strings to identify the different files I want to consider in this loop. This script works well to extract a number which is the 3rd field of a line starting with "Total aborts:".Now, how could I change this script to do what I mentioned above (i.e. extracting two numbers from two different lines) ? The second number is the 3rd field of a line starting with "Total throughput:"

View 7 Replies View Related

Programming :: Date Subtraction Using Numbers

Nov 15, 2010

I want the get the date of the oldest log in this directory and compare it with current date.Time of the each log can be seen before ".Z" prefix.I have written the following piece of code. However, it is not working for the following case:

LOGDAY=20101129
TODAY= 20101201

Difference is 72, which is not correct, since these are dates.

View 11 Replies View Related

Programming :: Generating Prime Numbers In C?

Mar 9, 2011

I'm trying to write a program that generates a random number and then tells if it is prime or not. I have doe some research about how to calculate prime and random numbers but I'm still having trouble. I don't really get how to calculate a prime number. I know a prime number is a number that is divisible by 1 and and itself. how to calculate a prime number in C?

View 10 Replies View Related

Programming :: Matching Numbers With Nawk

May 11, 2011

I am struggling to understand why nawk matches values that are either 1 or 2 digits in length, but not 100 (3 digits).

Am I missing something obvious ? Should I use substr to remove the % ?

I am sure it's something to do with character and string matching behaviour with nawk.

Code:

View 9 Replies View Related

Programming :: Storing Numbers In QByteArray?

Dec 15, 2010

I have a program that sends QByteArray datagrams over a udp socket. I would like to have 4 bytes of the datagram that contain a 32 bit integer. When saving numbers to the QByteArray, I have tried the static function number(int) and member function setNum(int), but they convert the integer to its decimal string representation and save that in the byte array. So if the number were 10, it takes 2 bytes, if it were 10,000,000 it takes 8 bytes. This wastes space, and makes it more difficult to get the number when it is packed with a few other pieces of data in the same datagram. Is there a standard way of doing this in Qt?

View 1 Replies View Related

Programming :: Allowing Export To Take Numbers As Variables?

Jan 26, 2011

I'm playing around with some shell scripting and I've got a directory call CS005 and I'm trying to write a script to I can locate to the directory really quick and easy.

export CS005DIR=/home/stud/0/043234/CS005

Now I get this error

CS005DIR=/home/stud/0/043234/CS005 No such file or directory.

This is because I've got numerical values within my variable.

Is there a way to allow numbers for variable names?

View 3 Replies View Related

Programming :: Append Numbers To A Word List?

Dec 30, 2010

If I do:

for i in $(cat names); do seq -f "$i%03.0f" 0 999; done > output5.txt

I got ( tail snipped):

997munt
998munt
999munt

If I do:

for i in $(cat names); do seq -f "%03.0f$i" 0 999; done > output4.txt

I got:

997Zygmunt
998Zygmunt
999Zygmunt

How I can get numbers from 000 to 999 appended like:

Zygmunt997
Zygmunt998
Zygmunt999

View 8 Replies View Related

Programming :: Bash Rounding Up Numbers With Printf

Feb 2, 2010

For eg: $NUMBEROFPASSES=6.19 to round up I use NUMBEROFPASSES=$(printf %.0f $NUMBEROFPASSES) What I need to do is round up from eg: 6.10 to be 7 and if lower than 6.10 round down to 6

View 5 Replies View Related

Programming :: C - Check If An Input Char Contain Numbers?

Mar 19, 2010

I would like to create a small C tool. I encounter a problem of how to make a function to check an input chars contains numbers (started from the second element).

Some samples:

char *mychar= "a3547"; (The result of function checking this is true)
char *another_char = "t6548"; (The result of function checking this is true)
char *next_char = "appl3"; (The result of function checking this is false)
char *new_char = "b1aa3"; (The result of function checking this is false)

View 4 Replies View Related

Programming :: Generating Series Of Numbers Of Sequence?

Mar 19, 2011

I am trying to generate sequence of number in the order of :

1
2
3
4

[Code]....

View 7 Replies View Related

Programming :: Find The Average Of First 12 Numbers In The Third Column Using 'awk'

Nov 20, 2010

I have a text file with 4 columns and 18 rows. All are integers. I wish to find the average of first 12 numbers in the third column using 'awk'.

View 8 Replies View Related

Programming :: Loop Produces Wierd Numbers

Aug 13, 2010

I'm learning c but then when i tried looping as i follow a tutorial, the numbers are wierd that it seems not right..

This is the example.

Quote:

When i run it, it outputs this.

Quote:

why?

View 2 Replies View Related

Programming :: Random Float Numbers In BASH

Mar 27, 2011

I'm learning shell scripting using bash and I want to generate 4 floating point number with 5 decimal places and write them to a file and a variable. I've done all this except the $RAMDOM enviroment variable does not generate a float number but a integrer.

[code]...

View 4 Replies View Related

Programming :: Replacing Numbers In Bash Scripts?

May 25, 2010

I have lines in some files that look exactly as below, and the line numbers they occur in are always the same. (Lines 136-139)

W 0.00000000 0.00000000 2.00000000
W 0.50000000 0.50000000 2.50000000
W 0.00000000 0.00000000 3.00000000

[code]...

View 1 Replies View Related

Programming :: Sed To Remove Non-numerics From Phone Numbers?

Jan 26, 2011

Can sed remove non-numerics (apart from an optional leading +) from phone numbers when prefixed with text that must be retained? The need is to make phone numbers exported from an Orage address book to a .ldif file suitable for gnokii to send to a mobile phone. Here are sample lines:

Code:
facsimiletelephonenumber: +91 (123) 1234567
telephoneNumber: +44 (123) 1234567

They have to end up as:

Code:
facsimiletelephonenumber: +911231234567
telephoneNumber: +441231234567

I could do it in awk but am curious to learn if sed can do it.

View 11 Replies View Related

Programming :: Bash - Test If First 2 Characters In A Filename Are Numbers?

Oct 21, 2010

I have a directory with files like this:

Code:

And what I'd like is to have the files renamed like this:

Code:

How could I code it so that it removes the numerical part of the filename (at the beginning), even with different patterns (like the 01 - artist vs the 01-artist)?

View 8 Replies View Related

Programming :: Read A File That Counts Each Line And Numbers

May 13, 2010

I ran into it while google Segmentation Fault. I'm writing a simple C program that reads a file that counts each line and numbers it then writes to a file called sdout. I copyed my program mostly from the text book but im still having problems. Heres my code:

#include <stdio.h>
#include <stdlib.h>
void new_line(FILE *, FILE *);
int main(char *argv)

[Code]....

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved