Hi!
Image files in raw format can have different pixel storage length (1bit 8bit 16bit, unsigned 8bit etc) WHat is the best way to determine in C++ the type from the file?
Thanks!
Hi!
Following on my previous post: http://www.tek-tips.com/viewthread.cfm?qid=982641&page=1
I have a read function like this:
/* open file */
fstream file (filename, ios::in | ios::binary);
if (!file)
{
PRINT_ERROR("Cannot open file (%s)\n",filename);
}
file.seekg (0, ios::beg)...
Hi!
I have a file which contains a list if usernames and I would like to get a new file with columns like
"username" "In real life" (output from finger -m "username")
Many thanks!
Hi!
I have a file which contains a list of files to be deleted.
What simple command should I use with that file as input to delete all the files listed in one go?
I tried rm -f `cat /tmp/filename` but that does not work
Many thanks,
Hi!
Say that I have a simple array like float* r = new float[10]; Then I do some operations etc on it. Later on I realise that 10 is not enough but I need 100 values. How do I reallocation memory to r without loosing its data?
Many thanks!
Hi!
I know I can use glob to get a list of filenames like
[glob -nocomplain "$currentdir/*.log"]
How can I get a list with multiples patterns like *.log *.dat etc?
How can I get a list of files that are not in the patterns i.e not *.log*.exe?
Many thanks!
Hi!
I would like to move files from one directory to another keeping dates, owner etc and based on a search pattern.
With the command below I can COPY files as I want:
[code]
cd $dir ; find . -print | egrep -v '$pat' | cpio -pdvmu $outdir
[\code]
What is the equivalent command to move the...
Hi!
I have the following awk script
delfiles = "\\.inp|\\.tmpcgm|\\.lst|\\.log|\\.w1|\\.hzbf|\\.w2|\\.w3|\\.core|\\.tmp|\\zap3workfile|\\tmpcgm|\\hzbf\\."
#file extensions not to copy for ASI
asifiles =...
Hi!
I have the following data file:
PUITS surface X (fsurface Y (ftBOTTOMWB LB1 LB2 UB1 UB2 UB3 TOP_BURGAN TOP_MAUDDUD W1 W2 W3 W4 W5 W6 W7 W8
MN-0001 2455354.3 10549550.5...
Hi!
Does someone know an SQL extension I could use to connect to an ORACLE database from a Tcl script?
I could create a sql script and call this script with sqlplus from the Tcl script. However I will have several queries/updates to do so I'll have many scripts and I'd rather have everything...
HI!
Part of my script is to read some input file and extract some info like:
[code]
nwells = 0
while ( ( getline < inputfile ) > 0 ) {
nwells++
common[nwells] = $3
uwi[nwells] = $7
}
[\code]
the inputfile looks like
Well Name: Adzva-Vost 1 Unique Well ID: WB268736
The...
HI!
My Tcl program crashes not all the time with segmentation fault and I can't find why. I tried putting some flags and I can't find the error. If I do some modifs (adding lines etc) it does not crash then for some time. I downloaded Tcl Dev Kit Debugger and the program does not crash cwhen I...
Hi!
Say that I have a script stored in a string like
static char tcl_script[] =
"# example.tk\n"
"# -------------------------------------------------\n"
"# A simple decimal degree to deg,min,sec converter\n"
"# -------------------------------------------------\n"
"# main window\n"
"#\n"
"wm...
hi!
I have a button created with Bwidget:
$bbox add -image $exit -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 -padx 1 -pady 1 -helptext "Exit" -armcommand {Quit}
proc Quit {} {
exit
}
I get an error:
wrong # args: should be "exit option ?arg arg ...?"...
Hi!
I am using set tk_strictMotif 1 to avoid having highlight problems when clicking on buttons etc. My problem is that when I select the text inside an entry it is highlighted in black. I have tried all the options in entry without luck.
So 1) How can I set the color black to something else...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.