199,114 Archived Topics
Remove Filter ![]() | |
Hi, I have written a 2*3 matrix[1,2,3;4,5,6] to file. And then I tried to read the data back to initialize a 2D C++ vector. The code is as following: [CODE] #include <cmath> #include <string> #include <iostream> #include <sstream> #include <fstream> #include <vector> using namespace std; int main() { ofstream out_file; … | |
Hello All! Here is code of Space Invaders game. It is x86 Assembly Enjoy! [code] ;;; $RCSfile: part0.asm,v $ $Revision: 1.8 $ $Date: 2005/03/09 15:31:55 $ BITS 16 ; outputin koko bitteinä stacksize EQU 0200h ; pinon koko videobase EQU 0a000h ; starting address of video memory delay EQU 150 … | |
Hi, In the VB projects that use Access Databases, its found that the user is able to access the database directly (manually) ie by reaching the file and double clicking it open. But, what all can i do to prevent the user from directly accessing and using the database? What … | |
Hi sed -f /opt/DBACheck.sql.sed /opt/DBACheck.sql > /opt/DBACheck.sql.tmp mv -f $DBACheck.sql.tmp $DBACheck.sql where the contents of DBACheck.sql.sed is { s%${DBMS_USER}%SYSTEM%g } DBACheck.sql is a one line file , that contains line with string DBMS_USER which i want to replace it with SYSTEM. But on executing i get DBACheck.sql to be an … | |
Hi all, I implement Gabor filter in my c++ function (put it in Visual c++) . when I compiled it there was no error but when I clicked on a button for excution this function there was a failure report. I can't find out the mistake so I hope some … | |
Hi. I have created a script that works perfect but I am now told that I could have done it better, but how? This is an example of how I did mine: #!/bin/bash # function users { echo "1. Password file" echo echo "Enter num: " read usernumber if [ … | |
Hi i'm a newbe to javascript and i would like to create a function which will allow me to insert additional row to html table after every x rows. I appreciate every idea | |
Can anyone help me for the Scjp dums? i need them jus to see the type of qus that are asked in the exam. | |
Im sorry earlier i didnt know the rules but i know them now. Ive been trying all day and this is the farthest i could get... [code=java] /** * Program designed to keep the inventory of books in a bookstore. * * @author * @version 1.0 Dveloped on May 3, … | |
can anybody tell me how can i call [QUOTE]displayHeading();[/QUOTE]function for only first if statement??? [CODE]void displayCerteinDate ( ) { //Find records with certain Date and Display all records in same Date. system("cls"); //clear screen int newday, newmounth, newyear; bool flag = false; cout<<"\nEnter the Date You want To Display (dd … | |
I have a Gtk TreeView named phoneBookTreeView Gtk::TreeView * phoneBookTreeView; can someone help me how to sort all the contacts inside the TreeView? if I have a code like this for sorting the contacts byname: [code]void PhoneBookModel::sortByName( Glib::RefPtr<Gtk::TreeSelection> selection ){ /* Enter SortByName Function here */ }[/code] what would be … | |
Hi everyone, I want to make a Discussions Forums Module in my website using PHP Code where i want to make a community for persons in which registered persons that know that by visiting our web site and “talking” to other people they will find answers they need. How i … | |
Hi, open(MYINPUTFILE, "<access.log"); while(<MYINPUTFILE>) { # Good practice to store $_ value because # subsequent operations may change it. my($line) = $_; # Good practice to always strip the trailing # newline from the line. chomp($line); my($time, $elapsed, $remotehost, $csp, $bytes, $method, $url, $user) = split(' ', $line); # Print … | |
HI Can I join two data tables without any database connection,Please let me know if there way to do this.Iam using C# Thanks Tank50 | |
So my Data Structures class has finished the book we were using, but we still have a week of school left. My instructor has started going over binary files... only problem is I wasn't there when he went over it. My assignment is to open a binary file, save the … | |
Write a JavaScript/HTML program that inputs two integers a and b in an input text box, and outputs all odd numbers between a and b (a and b are expected to be between 1 and 30, and a<b) Can somebody help me with the source code for the .html file … | |
Hello, Im having this problem with public interface, i want to use this method (is on a .dll) [code]namespace DS.GS.Admin { public interface BrokerAdmin { int GetCount(); } [/code] But i dont know how to call it, I try: DS.GS.Admin.BrokerAdmin ba; int a = ba.GetCount(); -> Error And: DS.GS.Admin.BrokerAdmin ba … | |
Hi everyone, I'm working on an app that saves data on a text file, as we know, formatting text file is awful and not very user friendly. I'd like to save the information I've collected on my program on a nicely formatted excel file. Given the file it's already created, … | |
What does the below statement do in c++, i have seen these being used in alot of programs. 1.ifstream ipfile; 2. ipfile.fopen(ipfname); 3. char buffer[BUFLEN]; 4. cout.put('\a'); 5. | |
I am trying to copy large files over a network using sockets and channels. Here is a code snippet //sender side FileInputStream in = new FileInputStream(inputFileName); FileChannel fromFile = in.getChannel(); SocketChannel toSocket = sendSocket.getChannel(); fromFile.transferTo(0, 999999, toSocket ); However, in the line where I call transferTo I get NullPointerException. Any … | |
Hello, I am stuck with a multiple declaration error during linking. I have 4 C++ source and corresponding header files(A, B, C,D) and one main source file(Main.cpp). Apart from that, I have one header file which contains two function declarations and some #define constants (Config.h) and 2 array decl which … | |
Hi everyone, i need to design a simple grading system and the requirements are as below: [QUOTE]Mark Grade ----------- -------- 90 – 100 A 80 – 89 B 70 – 79 C 60 – 69 D 0 – 59 F[/QUOTE] input.txt -sample input, i have attached the file too [QUOTE]Felix … | |
this is my code which copies 1st string into 2nd String. [code] AREA StrCopy1, CODE SWI_WriteC EQU &2 ENTRY ; mark the first instruction main ADR r1, srcstr ; pointer to first string ADR r0, dststr ; pointer to second string BL strcopy ; copy the first into second SWI … | |
I can not get my site to connect to its database properly, I have narrowed it down to two files (attached) and I do not know what is wrong with them. I think it is the files, I have looked over the db a few times and it seems fine. … | |
I have to write a template that would swap two arguments, if second one is smaller than first. But in case of string beeing passed to function it would swap them, if second is smaller than first by length. Is it possible to implement that using just one template? Here … | |
I am trying to use [URL="http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm"]Accordion Content script v1.7[/URL] from DynamicDrive.com on some pages. I have set up a [URL="http://www.f1d.com/test_expand_div.html"]test page[/URL] to show the error messages. I have changed the doctype of the page several times, including the exact one they use on the sample/instruction page on DD, but no … | |
the topic is writing/reading text files, but i got this simple question. how do i make this program so it will look like this: [url]http://i39.tinypic.com/5554wi.jpg[/url] i can't figure it out. - to make it keep looping and asking "enter your name or break to exit" continue the question until the … | |
I am using SQL Server 2005 express. I want to insert a record into a table and return its primary key. Here is my SQL Procedure: [code=sql] ALTER PROCEDURE InitialiseHistory AS INSERT INTO StatusHistory (StatusCode, DateChanged, Comments) VALUES (0, { fn NOW() }, 'Status initialised to UNKNOWN') RETURN SCOPE_IDENTITY() [/code] … | |
Hi guys, im having a problem. see, i want to have 2 pull down menus that the options in the second one changes according to the first one. but i dont know how to detect and gain the value changes of the first. thank u. | |
Hi all i'm hoping someone can help here my son is doing a school project and he's doing really well, he loves his computers, his project as come to a dead end as we're struggling to create a menu which will add users doing this in Bash. then adding a … | |
to do this. A pointer gets created, say Head Would it be better to do this Head = new Node; Head = NULL; or is it better to do this. Head = NULL; Head = new Node; | |
hi guys, if you take over a project which is not documented and composed of lots of header files, code files and libraries, what should you do to understand work flow of the project. and if you need to modify some part of it, what should you do to locate … | |
![]() | hi again! at school we were learning about perfect numbers and i thought it would be useful to write a program to find them i currently have this code: [ICODE]b= 1 h= 1 factors = [1,] n = float(raw_input("what is the number?")) while h < n: if h*b == n: … |
[QUOTE=Ancient Dragon;862638]That is incorrect. The pointer is assigned whatever random value is at that memory location. For example [icode]char *ptr;[/icode] the address of ptr is whatever is at that memory location on the stack (assuming its not a global variable). It is never auto set to NULL by the compiler … | |
I am not familiar with C code. I want to convert this code to C++ and run it any help is appreciated. [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include<cstdlib> using std::rand; using std::srand; #include <stdio.h> #include <stdlib.h> #include <time.h> /*Global Declarations */ /* define a new type KEY_TYPE as … | |
Using Windows API's how can i copy to another file and Get different properties of a file (size, type, date created and more). i had done reading and writing file plz someone reply me quickly | |
I need a better solution to a while loop that continualy checks the current time against the time that the user would like the program to end. This loop spikes the processor usage to 100%. [CODE]while( time(NULL) <= endTime ) { printf("\r%4d", endTime - time(NULL)); }[/CODE] Thanks in advance. | |
I want to analyze the content of a text file & search for a string in the file. It is assumed a sentence is terminated by a , . ; ? ! This is what i have so far [code] #include <iostream> #include <fstream> using namespace std; int main() { … | |
I want to disguise a URL and [B]only temporary[/B]. I've been informed PHP command that could be used but I was unclear about the details and I don't want to use frames because the address could still be found if desired. For example if I tell you to go to … | |
Hey everyone I've made this website and want to use PHP to allow users to register and login. I've created a database and connected to it, i've also created the table to store data from the registration page. I've tested it and PHP for the registration page seems to be … | |
i have seen an inheritance statement like this [CODE]className : virtual public anotherClassName[/CODE] what does virtual mean there? | |
Hi all, Is it possible to copy an object (instance) and manipulate the copy without affecting the original one. I mean, Suppose: D.node = 'Node' and D.child = {0:'child1',1:'child2'}. Now, copy D to D_c and put D_c.child={}. So, D should be kept as it is originaly, which means D.node = … | |
Hello, I am having some trouble with my registration form. For some reason when i launch my registration for wheter it be on localhost or webhost nothing is displaying on the page. I get no errors or anything and i cannot detect what is wrong with the script i made. … | |
[code="java"] import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.*; public class SketchPad { public static void main(String[] args) { SketchPad sketchpad = new SketchPad(); sketchpad.gui(); } public void gui() { JFrame mainF = new JFrame(); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("file"); mainF.setJMenuBar(menuBar); … | |
so my project is a text editor and i am trying to make an open button and save. my code only opens the last part of the file it read. i was wondering if someone good help me or give any tips. thanks [ICODE] Private Sub OpenToolStripMenuItem_Click(ByVal sender As Object, … | |
i want to use the getexecutiontime() for a function in my program, but i want to use it for a function with arguments and the piece of code that i have is not working because my function have arguments prim_MCST(adj_matrix,nv); [CODE] long getExecutionTime(void (*func)()); // define Function long GetExecutionTime(void (*func)()){ … | |
Good morning , [COLOR="Green"]I'm facing a difficulty defining some enty type in this case : 1. You are a systems analyst. You have been assigned to design a database management system (DBMS) for Mechanical Engineering (ME) company. ME orders its parts from two types of vendors-local and non-local vendors. Vendors … | |
Hello, I've a c++ project in linux and I want to create a text file and share it between more than one source file so that I can write into it instead of using only printf. Can anyone help me please? Thank you in advance, | |
Hi boys. This has nothing to do with coding. I have written an excellent peace of simulator in C++,for which I am very happy, for my Masters project for my supervisor. Does anyone of you know how to protect this, an aware like, for possible legal actions taken, in case … |
The End.