199,123 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for leo88

hi, i wants to ask some string problems, as below: string []first 1 2 3 4 5 1 4 5 1 3 4 5 string second="2 3"; [code] double sum=0; foreach(string a in first) { if( ) // what should i write here? { sum++; } } [/code] In program …

Member Avatar for leo88
0
101
Member Avatar for AdmiralDonkey

Hi all. I've been working on a Binary Search Tree as a beginner and have the majority of functions working, however in the program I need to give the option to choose how to traverse the contents and then display them in that order. I've got the traversal methods, however …

Member Avatar for AdmiralDonkey
0
469
Member Avatar for nssltd

Hello, Hi i have been just looking at C++ games programming and i have bought a book and learned the basics of C++ aswell as some indepth games programming. I have been thinking of developing a small game with physics and stuff but for physics i'd like to use the …

Member Avatar for DarKKendO
0
142
Member Avatar for CrazyProgrammer

Hey, was wandering if somebody could help we with some classes and objects, I haven't done c# in a while and i can't remember. Could someone tell me what String falls under in c#, ie allowing one to write somthing like [CODE] static void Main(string[] args) { string s = …

Member Avatar for CrazyProgrammer
0
158
Member Avatar for lilbenji25

Hey, i know you are all probably very bored with the infix to postfix program and its many incarnations but i seem to be having a problem getting the linked list we have to use as a stack to work. More specifically; pushing to the stack, reading from the top …

Member Avatar for nezachem
0
207
Member Avatar for TailsTheFox

Hello, So I get MS visual studio 2010, and the first thing that I find, is that after a whole lot of trouble, I finaly get the tools to appear, and they're all greyed out. Screenshot attatched I think the problem might be: [list] [*]I'm using the trial [*]The file's …

Member Avatar for TailsTheFox
0
79
Member Avatar for JDevelop

Hi, I'm beginning with C and makefiles. I'm trying to compile a list of C files with GNU Make. My code should compile all the C files in the folder into .o files along with few flags and then use these .o files to compile an executable file 'main'. and …

Member Avatar for nezachem
0
8K
Member Avatar for Taimoor Rana

hello guys, I don't have a programming question but a mathematical one but need to implement it in a program. I need a formula the will let me find the X,Y position of Circular motion. For example: earth travelling around the sun, I would wanna know the X,Y position of …

Member Avatar for Slimmy
0
145
Member Avatar for kokfui

<?php require_once("includes/connection.php"); ?> <?php require_once("includes/functions.php"); ?> <?php require_once("includes/session.php"); ?> <?php find_selected_item(); ?> <?php include("includes/header.php"); ?> <?php if (isset($_POST['submit'])) { $top_up_cash = mysql_prep($_POST['top_up_cash']); $user_id = $_SESSION['user_id']; $result = mysql_query("SELECT * FROM users WHERE id='$user_id'"); while($row = mysql_fetch_array($result)) { $bidot_cash = $row['bidot_cash']; } $new_bidot_cash = $top_up_cash + $bidot_cash; $query= "UPDATE users SET …

Member Avatar for diafol
0
135
Member Avatar for kipslem

Hello, Please help... I have a small application. When I click on a ListView row to Edit the details populated from the MS Access DB, I have the Else statement being executed all the time. Initially the code is attached behind a button named Edit. I have a Refresh button …

Member Avatar for kipslem
0
236
Member Avatar for jasperFernandes

Hi, i wanted to create a JTextField to receive the user input instead of having the user key in the input through the IDE console. This is my code. Now, my code just runs fine if the user key in the inputs through the console. After running the code, the …

Member Avatar for mKorbel
0
2K
Member Avatar for ChieftanBill

I've been working on this program recently and its been blowing up with errors, every time I work through a bug, more surface. Now I keep getting incompatible type errors at the spots I marked out. If someone could help me sort it out or point me in the right …

Member Avatar for Slimmy
0
127
Member Avatar for dr.4030

Hello every body, I created some pages for downloading files directly from my website But i have problem with adding download link in php tags so is there any body to tell me how i can make download link inside the php tags. i wrote some things like this : …

Member Avatar for diafol
0
107
Member Avatar for lightshift

Hey guys, I am trying to update the Quantity field in my database on button click. I have a checkout system, and on the final checkout page it displays my basket items in a listview bulleted list. Now say there is 1 item, and the quantity is 5, upon the …

Member Avatar for lightshift
0
215
Member Avatar for Falcon25

Hey everyone. This is my code at the moment: [CODE]namespace Experimenting { class Program { const int maximum = 5; static int[] myArray = new int[maximum]; static void Main(string[] args) { RandomNumbers(); ScreenOutput(); } static void RandomNumbers() { int x = 0; for (int i = 0; i < maximum; …

Member Avatar for Falcon25
0
881
Member Avatar for ashley11

In my arrayList, i have number which are shown below: 1 2 1 2 [COLOR="Red"]2 1[/COLOR] 2 1 [COLOR="Red"]2 3[/COLOR] 2 3 1 2 3 1 2 3 [COLOR="Red"]3 1[/COLOR] 3 1 1 3 2 1 3 2 [COLOR="Red"]2 3 1[/COLOR] 2 3 1 now i want to sort some …

Member Avatar for ashley11
0
73
Member Avatar for ggeoff

Hi I am using the PHP include statement to enable publication of a piece of news. The news is filed as "news.txt" and the user has access to a directory to upload the file or delete old news but no access to the code. If the file does not exist …

Member Avatar for diafol
0
212
Member Avatar for Awah Mohamed

hey people. i am asking if it is posible to check for the user status using php. i mean to know if the user if online or offline. i am trying to build a chatting system that alow me to know who is online and who is offline.

Member Avatar for 84hd0ns
0
769
Member Avatar for SIFA

Can someone show me a sample code in c which can read in a user inputted sentence/line and then split that line down by white spaces into separate words please? I shall worship you as my new God if someone out there can just show me a sample solution.

Member Avatar for L7Sqr
0
131
Member Avatar for ravi1991

[B]hi! i have installed tomcat newly on windows 7.i have got the following error in browser. Please help me out. thanks in advance. [/B] HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.IllegalStateException: …

Member Avatar for peter_budo
0
273
Member Avatar for andimiami

I need to write a program for class that calculates student averages and quiz averagages. It has to read a 2-dim array from a file that looks like this: 10 10 10 2 0 1 8 6 9 8 4 10 The four students are the rows and the three …

Member Avatar for andimiami
0
163
Member Avatar for sergent

I am trying to allow user to input something while there is time so I took a function sleep() that I found somewhere and changed it for input. Well, it doesn't work. [CODE] char sleep(clock_t wait) { char c; clock_t goal; goal = wait + clock(); while(goal > clock()) { …

Member Avatar for sergent
0
2K
Member Avatar for Christoph928

I'm relatively new to this and need help counting the number of times a user provided word appears in a user provided file this is what I got:[CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream infile; string str, filename; int count, num; count = 0; …

Member Avatar for bharathmakawana
0
177
Member Avatar for amna masood

This is my code:[CODE]#include<stdio.h> #include<iostream> #include<string> #include<conio.h> #include<fstream> using namespace std; class TESTnonteaching { private: string oname[3]; string osir_name[3]; int oid[3]; public: int count3; void TESTadd(); void TESTsearching(); //void editing(); //void TESTdisplay3(); void TESTsetcount3() { count3=0 ; } }; //ADDING STAFF// void TESTnonteaching::TESTadd() { if(count3>=3) {cout<<"NO SPACE LEFT"; return; } …

Member Avatar for redmaiev04
0
176
Member Avatar for monta2020

i'm working on building my website but i'm facing stupid problem.. i don't know how to create a php file for my html's one to then connect them to the database .. i need my page to able me to insert,update and delete records from my database, and then submit …

Member Avatar for monta2020
0
89
Member Avatar for venomxxl

I'm writing a pure C game engine. I assert every pointer returned by malloc() in my code. Now I'm writing a function that will "slice" a loaded texture into new textures (parts of the parent texture). The parent texture is loaded correctly (other textures loaded by the same loader were …

Member Avatar for venomxxl
0
325
Member Avatar for smidhunraj

i havae got a ubuntu machine .I typed in ftp in the command and it comes as ftp> then it ask for connection .I googled it and found that i have to give an address for it. Under one forum i found that the address lies in the /etc/hosts file …

Member Avatar for smidhunraj
0
142
Member Avatar for Phil++

Hello, I have a few checkboxes thatwhen you check them, they set a varible to bool. For example, if someone selected that they want to see a square it would then change the bool "square = true" however, when someone unchecks the checkbox, I want the boolen to go back …

Member Avatar for Momerath
0
92
Member Avatar for avinash_545

Dear All, I am working on an assignment. I am using graphics.py to draw polygons and so on. My problem is that I have to get the pixel color under getMouse() or just get that pixel color. Can you all please help me with it.

Member Avatar for TrustyTony
0
104
Member Avatar for magravis

Hi, I'm trying to write this program where there is: (1) a greeting (2) make columns (3) have a stored text file input into the program automatically The file is like so: NOT 11010011 AND 10010010 etc. (4) read the first word and then output it (5) read the first …

Member Avatar for magravis
0
116
Member Avatar for amit.hak50

I have a website pdf search engine called <URL SNIPPED> I don't want to provide my search engine for backlink so ,please don't remove my post,I need some help.. what is happening is the when you type "C tutorials" in search box it creates two instances like "C tutorials" and …

Member Avatar for evanism
0
152
Member Avatar for hercx

hey everyone need to set focus onto a text box when the tab key is pressed because at the moment the focus jumps all over the place lol any help greatly appreciated

Member Avatar for hercx
0
101
Member Avatar for stereomatching

my compilers::tdm gcc4.5.2 my os::windows xp sp3(32bits) boost 1.45 Sorry, I have another problem again [code] template<typename accStrategy = float> int const adaptSR(int const MAX_AL, float const CONFIDENT_LV, int const OFFSET, accStrategy PLAN) { return 1; } template<typename accStrategy = float> int const adaptSR(int const MAX_AL, float const CONFIDENT_LV, int …

Member Avatar for stereomatching
0
364
Member Avatar for gerard4143

How do you initialize a dynamic structure that has a const data member? I can provide an ugly hack but I'm at a loss as how to do it correctly. Actually, can you do this in a platform independent way? [code] #include <stdio.h> #include <stdlib.h> struct mys { const int …

Member Avatar for Narue
0
164
Member Avatar for stereomatching

As I know, perfect forwarding is design for reducing the need of many overloaded functions when you pass the reference to the function and pass those reference to another functions Besides, to fullfill the objective of perfect forwarding && should be able to swallow the lvalue and rvalue That means …

Member Avatar for stereomatching
0
109
Member Avatar for wonder_laptop

hello there, this is really urgent, do you know how to convert from a string to AgletProxy ?? i have two classes : Parent.java and Child.java, The Parent.java class, creates a child , passes it its agletproxy while creating it and dispatches it to another machine : [CODE] package examples.help; …

0
241
Member Avatar for genzoman

I have an array of links that when clicked will show a corresponding hidden div element. Every link has it's own div. I'm trying to use an image to close each div as well (which isn't working yet). More importantly, when I click on the first and second links, two …

Member Avatar for Airshow
0
221
Member Avatar for debasishgang7

I am using a XXS filter function to filter unwanted code.Here is my function xxs.php [CODE]<?php function clean($data) { // Fix &entity\n; $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data); $data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data); $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data); $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8'); // Remove any attribute starting with "on" or …

Member Avatar for debasishgang7
0
1K
Member Avatar for azegurb

hi all, I cannot understand for what reason and how is used [B]call_user_func_array[/B] Can anyone explain me in a very simple manner what is [B]call_user_func_array[/B]? and with examples if possible Thanks in advance

Member Avatar for Kraai
0
170
Member Avatar for michaelzip

Hi, I'm quite new with Data Adapter on VB.NET. I'm having a problem with retrieving data on different tables. Example database: [QUOTE][B]BookInfo[/B][INDENT]BookID: HSD993Z Title: Introduction to SQL[/INDENT] [INDENT]BookID: LDJA293 Title: Advance Computer Programming[/INDENT] [INDENT]BookID: KSKL194 Title: Object Oriented Programming[/INDENT] [B]StudentInfo[/B] [INDENT]StudentID: 2938485 FullName: Michael Zip[/INDENT] [INDENT]StudentID: 2949284 FullName: Ray Williams[/INDENT] …

Member Avatar for michaelzip
0
1K
Member Avatar for Danny1994

Hello guys, im using this function : [CODE] //All Includes of my project #include <windows.h> #include <iostream> #include <fstream> #include <string> #include <direct.h> #include <urlmon.h> if (!File::Exists("c:\\MySettings\\Items.txt")) { URLDownloadToFile(NULL, ("http://download1225.mediafire.com/x6i9klhsm3dg/q6z21pgg9t5t6dn/Items.txt"), ("C:\\MySettings\\Items.txt"), 0, 0); }[/CODE] And i get a compiling error : [I]Unresolved external symbol ""extern "C" long __stdcall URLDownloadToFileA(struct IUnknown …

Member Avatar for Danny1994
0
2K
Member Avatar for Appienator

IIf(Time()>=TimeValue("00:00:00");IIf(Time()<=TimeValue("07:00:00");Format(Now()-1;"dd mm yyyy");Format(Now();"dd mm yyyy")))

Member Avatar for Appienator
0
245
Member Avatar for rain_meiwah

I've built successfully my server & client program in C, able to establish the connection and message can be sent from both side client <-> server. Pls help me to deploy for:- (1) How to transfer file? (2) If i enter command e.g. - "pwd" in client side, current directory …

Member Avatar for jamesbondbest
0
122
Member Avatar for lightshift

Hey all, I am making a website for a project which allows the user to "purchase" items. Currently, I have all the items displayed in a grid view which has selection enabled. When you click this, it stores the cell values into sessions which I retreive on another page as …

Member Avatar for Erra93
0
181
Member Avatar for fadia

Hi guys I newly started learning oracle.I'm working on my assignment and I'm stuck in this step because of a silly error and I'm sure of my syntax. It looks fine to me but I get this error: ORA-00907: missing right parenthesis This is the command: CREATE TABLE WORKER ( …

Member Avatar for pratik_garg
0
168
Member Avatar for ziggystarman

Hi been using the following code to close an external program. [CODE]ShellExecute(0, L"open", L"taskkill.exe",L" /f /im program.exe", 0, SW_HIDE);[/CODE] However once in a while I get the dreaded windows blue screen, not sure what to make of the mini logs it produces. One suggestion on microsoft's site is that it …

Member Avatar for ziggystarman
0
181
Member Avatar for newbie14

Dear All, For now I have two tables as below. The tblTyre store all the tyres.Then tblTyreConfig store the relevant tyreID in each of the column for instance fl(front left wheel),fr(front right wheel),b1LI(back first left in wheel),b1L0(back first left out),b1RI(back first right in wheel),b1R0(back first right out),b2LI(back second left in …

Member Avatar for smantscheff
0
132
Member Avatar for debasishgang7

I am trying to make a php Database Driven commenting script.I have to fetch comment and name from the Database according to page id.Suppose i have to fetch comments against the id 45.Then the "fetchcomment.php?id=45".It should fetch all the comments One by one Under the Page ???How to do this.The …

Member Avatar for debasishgang7
0
147
Member Avatar for Jaily

I'm trying to make a digital clock in Java. The program is at the end going to be an alarmclock. So far I've made 3 classes: Main, Clock and Time. Main only creates an object of Clock. Time handles the javax.swing.Timer function for the clock. And the Clock creates a …

Member Avatar for mKorbel
0
491
Member Avatar for shuzay8

hi everyone, i'd like to know of any websites or software that helps in c++ flowcharts. thank you

Member Avatar for jonsca
0
97

The End.