Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: fabien
  • Content: Threads
  • Order by date
  1. fabien

    Raw pixel storage

    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!
  2. fabien

    Binary read write problem

    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)...
  3. fabien

    finger and usernames

    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!
  4. fabien

    GLubyte and read problem

    Hi! I have the following code /* open file */ fstream file (filename, ios::in | ios::binary); if (!file) { PRINT_ERROR("Cannot open file (%s)\n",filename); } file.seekg (0, ios::beg); /* read dimensions */ file.read(&hi,1); file.read(&lo,1); lenx = hi*256+lo...
  5. fabien

    Delete files from list

    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,
  6. fabien

    Memory reallocation

    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!
  7. fabien

    Adding data from different lines

    Hi! I have the following sample file: VE_ORINOCO_FULL 100 99.9921875 VE_ORINOCO_FULL 2264 11.609375 VE_SINCOR_3_2004 4000 967.296875 VE_SINCOR_SED_3D 740 273.039063 XX_AO_TEST 110 42.8203125 XX_BODATALOAD 110 37.1640625...
  8. fabien

    Transfor data problem

    Hi! I have the following input data file: 782341.2 1184897. 1.000000 782420.8 1184892. 1.000000 782460.0 1184809. 1.000000 782568.9 1184796. 1.000000 782651.7 1184739. 2.000000 782764.9 1184770. 2.000000...
  9. fabien

    Multiple patterns with glob

    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!
  10. fabien

    Using egrep and mv

    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...
  11. fabien

    Move files

    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 =...
  12. fabien

    Problem Converting data file

    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...
  13. fabien

    Tcl and SQL

    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...
  14. fabien

    Problem reading data

    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...
  15. fabien

    Segmentation fault problem

    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...
  16. fabien

    Segmentation fault reading char array

    Hi! Following a previous post I managed to create a code to encrypt Tcl code into C; now the problem is to decrypt it to be "Evaled" The tcl code is stored as follows: static char tcl_script[] = "«šíðéåøäíŠüã\n" "«šÌíåçæûüúéüíûšÜëä§ÜãšéæìšËšáæüíúéëüáçæšÿàáäíšìçáæïšûçåíüàáæïšýûíîýä©\n"...
  17. fabien

    How to encode/encrypt then decode a string

    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...
  18. fabien

    Const char error

    Hi! I have made a const char as follows: char const Ccode [] = "#include <stdio.h>\n" "#include <stdlib.h>\n" "#include <math.h>\n" "include <tcl.h>\n" "#include <tk.h>\n" "\n" "#define TCLGO TCL_GLOBAL_ONLY\n" "main(int argc, char *argv[])\n" "{\n" " Tcl_Interp *interp;\n" "...
  19. fabien

    Exit errors

    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 ...?"...
  20. fabien

    Entry highlight selection color

    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...

Part and Inventory Search

Back
Top