199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for nanchuangyeyu

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; …

Member Avatar for nanchuangyeyu
0
121
Member Avatar for Joonas

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 …

Member Avatar for Joonas
0
203
Member Avatar for RahulV

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 …

Member Avatar for zela
0
298
Member Avatar for shyamalaa

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 …

Member Avatar for shyamalaa
0
286
Member Avatar for Truclam

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 …

Member Avatar for Nick Evan
0
253
Member Avatar for scottyscotty19

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 [ …

Member Avatar for scottyscotty19
0
127
Member Avatar for visnia

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

Member Avatar for essential
0
144
Member Avatar for pyscho

Can anyone help me for the Scjp dums? i need them jus to see the type of qus that are asked in the exam.

Member Avatar for peter_budo
0
52
Member Avatar for tone10lite

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, …

Member Avatar for peter_budo
0
1K
Member Avatar for pczafer

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 …

Member Avatar for pczafer
0
95
Member Avatar for valtikz

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 …

Member Avatar for Nick Evan
0
89
Member Avatar for gagan22

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 …

Member Avatar for gagan22
0
128
Member Avatar for santhanalakshmi

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 …

Member Avatar for santhanalakshmi
0
173
Member Avatar for Tank50

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

Member Avatar for Tank50
0
120
Member Avatar for Duki

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 …

Member Avatar for vmanes
0
153
Member Avatar for mibit

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 …

Member Avatar for essential
0
121
Member Avatar for AntonioMG

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 …

Member Avatar for kvprajapati
0
262
Member Avatar for MrDiaz

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, …

Member Avatar for MrDiaz
0
107
Member Avatar for Mem21

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.

Member Avatar for siddhant3s
0
111
Member Avatar for eba4

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 …

Member Avatar for kvprajapati
0
112
Member Avatar for abhishek2301

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 …

Member Avatar for Ancient Dragon
0
166
Member Avatar for all blacks

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 …

Member Avatar for NathanOliver
0
4K
Member Avatar for j_cart007

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 …

Member Avatar for j_cart007
0
157
Member Avatar for maddogsprofiles

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

Member Avatar for maddogsprofiles
0
102
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
119
Member Avatar for cmcooper

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 …

Member Avatar for cmcooper
0
144
Member Avatar for StarZ

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 …

Member Avatar for vegaseat
0
196
Member Avatar for gillivt

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] …

Member Avatar for gillivt
0
197
Member Avatar for Egypt Pharaoh
Member Avatar for mehdighobakhloo

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.

Member Avatar for vanu
0
233
Member Avatar for blueman

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 …

Member Avatar for JeoSaurus
0
99
Member Avatar for BlackStar

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;

Member Avatar for BlackStar
0
415
Member Avatar for serkan sendur

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 …

Member Avatar for serkan sendur
0
90
Member Avatar for leegeorg07

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: …

Member Avatar for jlm699
0
259
Member Avatar for tux4life

[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 …

Member Avatar for Ancient Dragon
0
217
Member Avatar for redmaverick

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 …

Member Avatar for vmanes
0
172
Member Avatar for bilawal420

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

Member Avatar for siddhant3s
0
75
Member Avatar for AfroZenPizza

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.

Member Avatar for jephthah
0
67
Member Avatar for gryft

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() { …

Member Avatar for tux4life
0
165
Member Avatar for Siberian

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 …

Member Avatar for chrishea
0
159
Member Avatar for brandguru

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 …

Member Avatar for brandguru
0
119
Member Avatar for serkan sendur

i have seen an inheritance statement like this [CODE]className : virtual public anotherClassName[/CODE] what does virtual mean there?

Member Avatar for serkan sendur
0
137
Member Avatar for faniryharijaona

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 = …

Member Avatar for scru
0
92
Member Avatar for genieuk

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

Member Avatar for genieuk
0
137
Member Avatar for Lensva

[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); …

Member Avatar for Lensva
0
84
Member Avatar for infernojmd

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, …

Member Avatar for Teme64
0
106
Member Avatar for pikkas

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)()){ …

Member Avatar for tux4life
0
109
Member Avatar for dreamygirl

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 …

Member Avatar for dreamygirl
0
141
Member Avatar for miskeen

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,

Member Avatar for miskeen
0
109
Member Avatar for booker

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 …

Member Avatar for tux4life
0
135

The End.