Search Results

Search found 15210 results on 609 pages for 'technical writing'.

Page 25/609 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • xmlEncoder not writing in netBeans

    - by Greg
    Hi, I am trying to use the xmlEncoder to write to xml file in net-beans but it doesnt work. Here is the call to the writing function: dbManipulator.writeStudents(deps); where deps = new Hashtable<String, Department>(); dbManipulator = new DataBaseManipulator(); Department is an class-object I made, and here is writeStudents method which is located in the DataBaseManipulator class: public void writeStudents(Hashtable<Integer, Student> students) { XMLEncoder encoder = null; try { encoder = new XMLEncoder(new FileOutputStream(".\\test\\Students.xml")); } catch(Exception e){} encoder.writeObject(students); encoder.close(); }//end of function writeStudents() Any ideas why it isnt working? I tried changing the hashtable to vector but still the xml file looks like that after the writing: <?xml version="1.0" encoding="UTF-8"?> <java version="1.6.0_18" class="java.beans.XMLDecoder"> <object class="java.util.Hashtable"/> </java> Thanks in advance, Greg

    Read the article

  • SQL Server INSERT, Scope_Identity() and physical writing to disc

    - by TheBlueSky
    Hello everyone, I have a stored procedure that does, among other stuff, some inserts in different table inside a loop. See the example below for clearer understanding: INSERT INTO T1 VALUES ('something') SET @MyID = Scope_Identity() ... some stuff go here INSERT INTO T2 VALUES (@MyID, 'something else') ... The rest of the procedure These two tables (T1 and T2) have an IDENTITY(1, 1) column in each one of them, let's call them ID1 and ID2; however, after running the procedure in our production database (very busy database) and having more than 6250 records in each table, I have noticed one incident where ID1 does not match ID2! Although normally for each record inserted in T1, there is record inserted in T2 and the identity column in both is incremented consistently. The "wrong" records were something like that: ID1 Col1 ---- --------- 4709 data-4709 4710 data-4710 ID2 ID1 Col1 ---- ---- --------- 4709 4710 data-4709 4710 4709 data-4710 Note the "inverted", ID1 in the second table. Knowing not that much about SQL Server underneath operations, I have put the following "theory", maybe someone can correct me on this. What I think is that because the loop is faster than physically writing to the table, and/or maybe some other thing delayed the writing process, the records were buffered. When it comes the time to write them, they were wrote in no particular order. Is that even possible if no, how to explain the above mentioned scenario? If yes, then I have another question to rise. What if the first insert (from the code above) got delayed? Doesn't that mean I won't get the correct IDENTITY to insert into the second table? If the answer of this is also yes, what can I do to insure the insertion in the two tables will happen in sequence with the correct IDENTITY? I appreciate any comment and information that help me understand this. Thanks in advance.

    Read the article

  • Suggestions on writing a TCP IP messaging system (Client/Server) using Delphi 2010

    - by Shane
    I would like to write a messaging system using TCP IP in Delphi 2010. I would like to hear what my best options are for using the standard delphi 2010 components/indy components for doing this. I would like to write a server which does the listening and forwarding of messages to all machines on the network running a client. 1.) a.) clients can send a message to server to be forwarded to all other clients b.) clients listen for messages from other senders (via server) and displays messages. 2.) a.) Server can send a message to all clients b.) Server forwards any messages from clients to all other clients thanks for any suggestions NOTE: I am not writing a instant messaging or chat program. This is merely a system where users can send alerts/messages to other users - they can not reply to each other! NO commercial, shareware, etc links - please! I would like to hear about how you would go about writing this type of system and what approachs you would take, and possibly the TCP IP messaging architecture you would use. Whether it be straight Winows API, Indy components, etc, etc.

    Read the article

  • Stop writing blank line at the end of CSV file (using MATLAB)

    - by Grant M.
    Hello all ... I'm using MATLAB to open a batch of CSV files containing column headers and data (using the 'importdata' function), then I manipulate the data a bit and write the headers and data to new CSV files using the 'dlmwrite' function. I'm using the '-append' and 'newline' attributes of 'dlmwrite' to add each line of text/data on a new line. Each of my new CSV files has a blank line at the end, whereas this blank line was not there before when I read in the data ... and I'm not using 'newline' on my final call of 'dlmwrite'. Does anyone know how I can keep from writing this blank line to the end of my CSV files? Thanks for your help, Grant EDITED 5/18/10 1:35PM CST - Added information about code and text file per request ... you'll notice after performing the procedure below that there appears to be a carriage return at the end of the last line in the new text file. Consider a text file named 'textfile.txt' that looks like this: Column1, Column2, Column3, Column4, Column 5 1, 2, 3, 4, 5 1, 2, 3, 4, 5 1, 2, 3, 4, 5 1, 2, 3, 4, 5 1, 2, 3, 4, 5 Here's a sample of the code I am using: % import data importedData = importdata('textfile.txt'); % manipulate data importedData.data(:,1) = 100; % store column headers into single comma-delimited % character array (for easy writing later) columnHeaders = importedData.textdata{1}; for counter = 2:size(importedData.textdata,2) columnHeaders = horzcat(columnHeaders,',',importedData.textdata{counter}); end % write column headers to new file dlmwrite('textfile_updated.txt',columnHeaders,'Delimiter','','newline','pc') % append all but last line of data to new file for dataCounter = 1:(size(importedData.data,2)-1) dlmwrite('textfile_updated.txt',importedData.data(dataCounter,:),'Delimiter',',','newline','pc','-append') end % append last line of data to new file, not % creating new line at end dlmwrite('textfile_updated.txt',importedData.data(end,:),'Delimiter',',','-append')

    Read the article

  • Will learning programming be as fundamental as learning reading/writing to the kids of the future?

    - by pythagras
    It seems I encounter more and more economists, scientists, and miscellaneous other professionals that have jobs that involve programming on some level. More and more, the jobs that my peers have in many many technical professions involve at least some simple scripting if not something more involved. It seems it used to be that "software engineer" was a distinct profession, now its becoming just another skill like writing -- something that any serious technical professional should be able to use for their job. I see a future where programming is essential to getting any kind of technical/mathematical job. Extrapolating on my anecdotal view of my colleagues... Will the kids of the future become literate in programming in the same way they become readers/writers? Will it become so fundamental to our economy and society that it will be taught at an early age? Will interacting with computers be as important as interacting with other people?

    Read the article

  • What is the best euphemism for a non-developer?

    - by Edward Tanguay
    I'm writing a description for a piece of software that targets the user who is "not technically minded", i.e. a person who uses "browser/office/email" and has a low tolerance for anything technical, he just "wants it to work" without being involved in any of the technical details. What is the best non-disparaging term you have seen to describe this kind of user? non-technical user low-tech user office user normal user technically challenged user non-developer computer joe Surely there is some official, politically-correct retronym for this kind of user that the press and software marketing use.

    Read the article

  • Char error C langauge

    - by Nadeem tabbaa
    i have a project for a course, i did almost everything but i have this error i dont know who to solve it... the project about doing our own shell some of them we have to write our code, others we will use the fork method.. this is the code, #include <sys/wait.h> #include <dirent.h> #include <limits.h> #include <errno.h> #include <stdlib.h> #include <string.h> #include<stdio.h> #include<fcntl.h> #include<unistd.h> #include<sys/stat.h> #include<sys/types.h> int main(int argc, char **argv) { pid_t pid; char str[21], *arg[10]; int x,status,number; system("clear"); while(1) { printf("Rshell>" ); fgets(str,21,stdin); x = 0; arg[x] = strtok(str, " \n\t"); while(arg[x]) arg[++x] = strtok(NULL, " \n\t"); if(NULL!=arg[0]) { if(strcasecmp(arg[0],"cat")==0) //done { int f=0,n; char l[1]; struct stat s; if(x!=2) { printf("Mismatch argument\n"); } /*if(access(arg[1],F_OK)) { printf("File Exist"); exit(1); } if(stat(arg[1],&s)<0) { printf("Stat ERROR"); exit(1); } if(S_ISREG(s.st_mode)<0) { printf("Not a Regular FILE"); exit(1); } if(geteuid()==s.st_uid) if(s.st_mode & S_IRUSR) f=1; else if(getegid()==s.st_gid) if(s.st_mode & S_IRGRP) f=1; else if(s.st_mode & S_IROTH) f=1; if(!f) { printf("Permission denied"); exit(1); }*/ f=open(arg[1],O_RDONLY); while((n=read(f,l,1))>0) write(1,l,n); } else if(strcasecmp(arg[0],"rm")==0) //done { if( unlink( arg[1] ) != 0 ) perror( "Error deleting file" ); else puts( "File successfully deleted" ); } else if(strcasecmp(arg[0],"rmdir")==0) //done { if( remove( arg[1] ) != 0 ) perror( "Error deleting Directory" ); else puts( "Directory successfully deleted" ); } else if(strcasecmp(arg[0],"ls")==0) //done { DIR *dir; struct dirent *dirent; char *where = NULL; //printf("x== %i\n",x); //printf("x== %s\n",arg[1]); //printf("x== %i\n",get_current_dir_name()); if (x == 1) where = get_current_dir_name(); else where = arg[1]; if (NULL == (dir = opendir(where))) { fprintf(stderr,"%d (%s) opendir %s failed\n", errno, strerror(errno), where); return 2; } while (NULL != (dirent = readdir(dir))) { printf("%s\n", dirent->d_name); } closedir(dir); } else if(strcasecmp(arg[0],"cp")==0) //not yet for Raed { FILE *from, *to; char ch; if(argc!=3) { printf("Usage: copy <source> <destination>\n"); exit(1); } /* open source file */ if((from = fopen(argv[1], "rb"))==NULL) { printf("Cannot open source file.\n"); exit(1); } /* open destination file */ if((to = fopen(argv[2], "wb"))==NULL) { printf("Cannot open destination file.\n"); exit(1); } /* copy the file */ while(!feof(from)) { ch = fgetc(from); if(ferror(from)) { printf("Error reading source file.\n"); exit(1); } if(!feof(from)) fputc(ch, to); if(ferror(to)) { printf("Error writing destination file.\n"); exit(1); } } if(fclose(from)==EOF) { printf("Error closing source file.\n"); exit(1); } if(fclose(to)==EOF) { printf("Error closing destination file.\n"); exit(1); } } else if(strcasecmp(arg[0],"mv")==0)//done { if( rename(arg[1],arg[2]) != 0 ) perror( "Error moving file" ); else puts( "File successfully moved" ); } else if(strcasecmp(arg[0],"hi")==0)//done { printf("hello\n"); } else if(strcasecmp(arg[0],"exit")==0) // done { return 0; } else if(strcasecmp(arg[0],"sleep")==0) // done { if(x==1) printf("plz enter the # seconds to sleep\n"); else sleep(atoi(arg[1])); } else if(strcmp(arg[0],"history")==0) // not done { FILE *infile; //char fname[40]; char line[100]; int lcount; ///* Read in the filename */ //printf("Enter the name of a ascii file: "); //fgets(History.txt, sizeof(fname), stdin); /* Open the file. If NULL is returned there was an error */ if((infile = fopen("History.txt", "r")) == NULL) { printf("Error Opening File.\n"); exit(1); } while( fgets(line, sizeof(line), infile) != NULL ) { /* Get each line from the infile */ lcount++; /* print the line number and data */ printf("Line %d: %s", lcount, line); } fclose(infile); /* Close the file */ writeHistory(arg); //write to txt file every new executed command //read from the file once the history command been called //if a command called not for the first time then just replace it to the end of the file } else if(strncmp(arg[0],"@",1)==0) // not done { //scripting files // read from the file command by command and executing them } else if(strcmp(arg[0],"type")==0) //not done { //if(x==1) //printf("plz enter the argument\n"); //else //type((arg[1])); } else { pid = fork( ); if (pid == 0) { execlp(arg[0], arg[0], arg[1], arg[2], NULL); printf ("EXEC Failed\n"); } else { wait(&status); if(strcmp(arg[0],"clear")!=0) { printf("status %04X\n",status); if(WIFEXITED(status)) printf("Normal termination, exit code %d\n", WEXITSTATUS(status)); else printf("Abnormal termination\n"); } } } } } } void writeHistory(char *arg[]) { FILE *file; file = fopen("History.txt","a+"); /* apend file (add text to a file or create a file if it does not exist.*/ int i =0; while(strcasecmp(arg[0],NULL)==0) { fprintf(file,"%s ",arg[i]); /*writes*/ } fprintf(file,"\n"); /*new line*/ fclose(file); /*done!*/ getchar(); /* pause and wait for key */ //return 0; } the thing is when i compile the code, this what it gives me /home/ugics/st255375/ICS431Labs/Project/Rshell.c: At top level: /home/ugics/st255375/ICS431Labs/Project/Rshell.c:264: warning: conflicting types for ‘writeHistory’ /home/ugics/st255375/ICS431Labs/Project/Rshell.c:217: note: previous implicit declaration of ‘writeHistory’ was here can any one help me??? thanks

    Read the article

  • Help me out in writing REGEX

    - by giri
    Hi I like to know how to write REGEX for the following code. <a href="/search?q=user:111111+[apple]" class="post-tag" title="show all posts by this user in 'apple'">Apple</a><span class="item-multiplier">&times;&nbsp;171</span><br> I just need to fetch Apple from the above source code. Can anybody help me out in writing REGEX. Thanks

    Read the article

  • Writing an OS kernel in assembly with NASM

    - by Betamoo
    I want to know what is the standard way for writing a -simple- kernel to be compiled on NASM? To get it clearer: I was able to define the code block with all the following ways: [segment code] [segment .code] segment code segment .code [section code] [section .code] section code section .code I need to know what is the standard way to do that, And what is the difference between them... Thanks

    Read the article

  • What defines writing PHP?

    - by cdburgess
    When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a good coder. This is a legitimate question as I find I have difficulty always remembering all of the functions that are available to me so I find I use php.net as a crutch. Is there anyway to improve this?

    Read the article

  • Downsides to using FakeWeb compared to writing mocks for testing

    - by ajmurmann
    I never liked writing mocks and a while ago someone here recommended to use FakeWeb. I immediately fell completely in love with FakeWeb. However, I have to wonder if there is a downside to using FakeWeb. It seems like mocks are still much more common, so I wonder what I am missing that's wrong with using FakeWeb instead. Is there a certain kind of error you can't cover with Fakeweb or is it something about the TDD or BDD process?

    Read the article

  • Writing number keypad

    - by theojero
    I am writing a program that prints out telephone numbers that are to be entered by users. On the west side, I need a picture icon of 3 people. In the center, I need the keypads. On the North side, I need the numbers to be displayed. Can someone help with the layout of the buttons?

    Read the article

  • Writing .htaccess mod rewrite for hierarchical categories

    - by NetCaster
    i need to rewrite urls for my classified ads directory i have 4 types of links /City == display all ads in city /City/Cat1 == display all ads in city + category /City/Cat1/Cat2 == display add ads in city + category 1 + category 2 /City/Cat1/Cat2/Ad-id == display the ad itself and pass cat1 cat2 and city variables original hidden url should be index.php?city=alexandria&cat1=cars&cat2=bikes&adid=EWSw22d Can you please help me writing .htaccess for this structure

    Read the article

  • Literature and Tutorials for Writing a Ray Tracer

    - by grrussel
    I am interested in finding recommendations on books on writing a raytracer, simple and clear implementations of ray tracing that can be seen on the web, and online resources on introductory raytracing. Ideally, the approach would be incremental and tutorial in style, and explain both the programming techniques and underyling mathematics, starting from the basics.

    Read the article

  • Writing multiple NSData to File

    - by user326943
    I need a hint on how to write multiple NSData chunks to single file. Downloading a file using NSURLConnection in chunks. Each chunk is downloaded in a separate NSOperation thread. As the chunks finish downloading they need to be written to a file so combined result is the file downloaded. What would be the best way to manage the NSData that is returned and writing it to a single file?

    Read the article

  • Avoid writing SQL queries altogether in SSIS

    - by Jonn
    Working on a Data Warehouse project, the guy that gave us the tutorial advised that we stick to using SQL queries over defining a lot of data flow transformations, citing points like it'll consume a lot of memory on the ETL box so we'd rather leave the processing to the DB box. Is this really advisable? Where's the balance between relying on GUI tools over executing a bunch of SQL scripts on your Integration package? And honestly, I'd like to avoid writing SQL queries as much as I can.

    Read the article

  • Writing SDK documentation, need useful beginner tutorials

    - by David Rutten
    I'm currently writing SDK documentation for one of our products, but for obvious reasons I don't want to talk about the essentials of OOP. Does anyone know any good online teaching material that explain (aimed at absolute beginners) concepts such as classes, inheritance, constructors, instances etc.? Preferably urls that are likely to survive for a couple of years to come... It's a DotNET SDK and we're including only VB and C# samples, so C++ or Delphi or Lisp material is not that useful.

    Read the article

  • SNMP: OID to use when writing custom MIBs

    - by justcatchingrye
    If you are writing your own MIB for a bespoke application, is there a 'best practice' for which branch you should use. I'm thinking of something analogous to private IP addresses, that can be used within enterprises, without conflicting with Registered IP addresses I have been asked to make a suggestion, as I advised Application Developers that they should not use OIDs under .1.3.6.1.4.1.111 - This is the Oracle branch

    Read the article

  • Writing user agents to control Internet access

    - by gipsy
    Ho will I go about writing a light weight agent to be installed on machines (windows to begin with) that controls Internet access Also these agents need to communicate to central server over the Internet. What areas of technology I should start reading/learning in order to develop it myself?

    Read the article

  • C check before writing to closed pipe

    - by Gary
    Is there an easy way to check if a pipe is closed before writing to it in C? I have a child and parent process, and the parent has a pipe to write to the child. However, if the child closes the pipe and the parent tries to read - I get a broken pipe error. So how can I check to make sure I can write to the pipe, so I can handle it as an error if I can't? Thanks!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >