64,152 Solved Topics
Remove Filter ![]() | |
Well... im making some kind of graphic engine for console in [B]c++[/B], ASCII based, just for exercise... anyways, i was wandering, can i print text [B]faster[/B]? Right now i'm printing the whole map of characters (pix[160][120]) in a [B]single line[/B], so it is fast, however i need it faster cause … | |
Hi everyone, I'm trying to pass data to managed object arrays. In this case i got no errors also no correct output. So what's wrong in the code below ? Please help. PS. This code writes " MyDataType" on textBox1 ??! [CODE] ******************* * MyDataType.h * ******************* using namespace System; … | |
I am running trough the [url]www.winprog.org[/url] tutorial, I have run into yet another error. [CODE] #ifndef __BORLANDC__ #include "winres.h" #endif [/CODE] it says it cannot open "winres.h", which I would agree with because it is not located on my computer at all! Is this file part of some other program, … | |
ive been working on this script as a project, and when i run it and click on the button to sleep(its going to be an rpg game) it loops and sends the command a bunch of times through the function. [CODE] import sys, random, time, pygame from pygame.locals import * … | |
[CODE]# 619480 import time from random import * def main(): lst = [] result, length = 0, 500000 while result <= 0.50: for i in range(length): lst.append(randint(1, length)) value = randint(1, length) t0 = time.clock() linearSearch(value, lst) result = time.clock() - t0 print("This LINEAR SEARCH took {0:4.2f}seconds with a length … | |
i am starting to learn to connect a cprogram to a mysql database. i have got this elementary program to connect to server , create a database and disconnect from it. [code]#include <stdio.h> #include<windows.h> #include <mysql.h> static char *opt_host_name = NULL; /* server host (default=localhost) */ static char *opt_user_name =NULL; … | |
Error messages should be displayed within the html if certain fields on my member register form are left empty, if they are invalid types or if the username entered already exists. I've tried adding a record with an already existing username and it does direct to the member registration failed … | |
Application coding Project Name: PhoneProblem Write a program which allows the user to input information to solve the following problem: “Sometimes it’s difficult to decide which phone to use – my mobile phone or my home phone. If I’ve got free minutes left on my mobile phone, then I use … | |
Problem: I'm having trouble in this part of my code [CODE] if (sexCode[ctr] == 'F') totalF++; else totalM++;[/CODE] I want my program to determine how many females and males in the list but whenever I execute my program I always get an output with an error that looks like this: … | |
I have created one application in JavaScript. And i have created logic gates(e.g AND,OR,NOT) and I displayed these gates on on particular grid background but when I drag and drop these Gates on grid , the borders of gates and lines are not matched to the background grid. So how … | |
hi, how can i select only unique string out of a series of iterating strings? for example, i have this folder which contains number of files with quite long names. i have used readdir() to find all the files. assume that the name of the file has an format. eg: … | |
Need help, I need to know on how can VB.net validates the format of each cell on the excel file that it opens, for example, the first row should only be numeric, or cannot be null, is it possible that vb.net can check it before it inserts it in the … | |
Just what is wrong with this simple code of mine? [CODE]#include<stdio.h> #include<string.h> #include<stdlib.h> main() { int i=0, num; char a[8]; char keyword[8]; system("cls"); while(i<8) { num = rand()%3; if ( num == 0 ) a[i] = 65 + rand()%26; /* 65 is the ascii value of A */ else if … | |
Can someone tell me, step by step, how python interprets this code? [CODE] Numbers = [1,2,3,4,5,6,7,8,9,10] Numbers[8:3:-1] [/CODE] I know that the "-1" is the counting bit of it, and it goes in the negative direction, but I'm lost on everything else... :( | |
hi all, I am creating a basic threaded server and chat client... so far everything is going to plan however i am confused as to how i will make two clients(which ever they maybe) connect and send their data to each other. My idea is in the server app i … | |
In a program i have to calculate pow(2,N) where 0<N<=1000. which data type is suitable for this? I have used unsigned long long int but its range is also limited. | |
Hi, I'm doing an app that adds info to a MySQL BD [CODE] Imports MySql.Data.MySqlClient Public Class curso_add Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.Filter = "Ficheiros de Imagem |*.jpg;*.bmp;*.png;*.gif" OpenFileDialog1.FilterIndex = "2" OpenFileDialog1.Title = "Escolha uma imagem..." OpenFileDialog1.InitialDirectory = "C:\" OpenFileDialog1.ShowDialog() End Sub … | |
Hi, I’m having difficulty with the GetForegroundWindow() API function and the .hWnd property. I want to check whether my application has the focus in the Windows environment and if it does, prevent an automatic time-out. I’m trying to do this by comparing the handle of the window that has the … | |
Hi, I got this function on index.php: [CODE]//user 'logado' ou nao function is_logged() { if(isset($_SESSION['username'])) { return true; }else{ return false; } }[/CODE] And i want to use it on top.php (on top is the banner and the menu). [CODE]<div> <ul class="menu"> <li class="top"><a href="index.php" class="top_link"><span>Página Principal</span></a></li> <li class="top"><a href="inscricao.php" … | |
Hello :) i am an aerospace engineer that has a dream to become a programmer. and after that i wanna to specialize in game development. my strategy is to learn C# in .NET by doing big projects, and i am doing it ok i guess. suddenly i saw the XNA … | |
As part ogf my studies I am now looking at JavaScript and am working on a project that works similar to a slideshow where an image is loaded and then changes every 7 seconds. Having successfully achieved this using my limited knowledge I now need to add various bits of … | |
Hello daniweb, I've been having problems with a program I'm trying to make, in my function definitions, I'm trying to reference the output of one function in the other's definition, but not sure how to, I'm guessing pointers could help me but I'm not sure how to use them: These … | |
Hey friends, I want to compile a C program using Command prompt. I have the turbo C compiler. Please show me the way with a simple example. | |
Title says all. I need to make a code that gives the prime factorization of a number and put them in a (this is important) a list. | |
im a total newbie and i dont get this: i dont get this flat text file my professor is talking about. I read from wikipedia that: A "flat file" is a plain text or mixed text and binary file which usually contains one record per line[2] or 'physical' record (example … | |
Hi everybody, I wrote a game in which you have to guess a number generated randomly,but when i try to assign a random number to the variable, it just doesn't work but it compiles fine. The code : [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () … | |
hi m making aregisteration form for employees. n validate its some very basic field. but the problem is that if i enter wrong it shows me the error and says click here to refill as told by me but when i enter the correct data even then it shows click … | |
Im trying to put current system time in YYMMDD format but having problem with day function. is Day() which returned day of month in VB6 not available in VB.Net? If I want to get the current day of month, how would I do that? [CODE] Dim dt As Date Dim … | |
I am creating a simple program where a character (Picture Box) is moved using the arrow keys through adjusting the x and y. I have figured out how to detect key presses and adjust the x and y, but I cannot figure out how to redraw the picture box so … | |
Hello, i am a newbie on php programming and try working on my last project in my school. My program is to compare 2 different xml file, it working well at first. but when i tried to add more xml file to compare, the page keeps telling "Fatal error: Call … | |
I knew radio buttons allow for a single selection, but mine allows multiple button selection. please i need a solution. thanks. | |
Hey there I have a project im working on in netbeans6.9.1 I was having problems with all the bugs in that version so i went over to 7 But now all my generated code has a bug in wich messes up EVERYTING. is there something im missing? this is the … | |
Hi all, I haven't changed anything in the config file in phpMyAdmin folder. I don't know why the WAMP server gives me this error. Although everything was working perfectly yesterday. Does anyone know how I can fix this problem? [CODE] You don't have permission to access /phpmyadmin/ on this server. … | |
Hi i need to get all running application not process and then list it in a listview Thank you but by the way can any one tell me how can i do an action to the selected element of a listview on buttonclick thank you all again this will help … | |
Hi, I want to iterate over a list, printing each item and subsequently deleting it, so that at the end, the list is empty, while all the numbers are printed out. I have tried two tactics (to me the logic for both is the same, just checked to spot the … | |
I am trying to Build a JAR File of Interface Classes I am using Linux and working throughout the terminal I keep getting this error Syntax error , type parameters are only available if source level is 1.5 I searched many sites and most solutions were about java on windows … | |
![]() | Hey guys , i am working on a login page that will only allow an admin login , if the user is part of a trade account or is classed as a customer i would like them to be redirected. [CODE]<?php session_start(); if (isset($_SESSION["superUser"])){ header("location: index.php"); exit(); } ?> <?php … ![]() |
hi, I developed one web application and I have created div in JavaScript and on that div I have created more than one images and when I click on save button i want to save all images on to the database and when I retrieve that image from database as … | |
Hello, Any help will be much appreciated. I have created a page tht will show search results on a datalist. this page was running perfectly before the addition of following lines in the page Load and BtnSearch_Click respectively. if (Request.QueryString["query"] != null) { string searchParam = Request.QueryString["query"].ToString(); BindList(searchParam); } .................................... … | |
![]() | I have been assigned to write a program to print the calendar of a given year. Its almost complete, but, I haven't yet found a proper algorithm to find the first day of the year which is required by the function to print the calendar year. Will provide the code … |
I got this error while trying to view my websites on Chrome after reformatting my OS (Windows Vista Ultimate 64bit). I noticed I cant view my adsense ads from my laptop, but I can see them on iPad, so it might have something to do with my Google Chrome browser … | |
Hi i would like to build a c++ game with SFML graphic library now i see sprites can move using floats ( sprite.move(+x,+y) ) how do i connect between the graph ( configured by a matrix ) and the graphic library? since the graphic library uses floats and set positions … | |
Hello fellow daniwebians, I seem to have run into a problem echoing MySQL/HTML and am hoping one of you may be able to point me in the right direction. I'm trying to echo portions of HTML(if there is an event for that date) inside HTML that's not echoed, so it … | |
Hello again! So now i can save the picture in the database, now i have to retrieve it. this is my code for the saving of the picture, [CODE]Dim ms As New MemoryStream() studentpic.Image.Save(ms, studentpic.Image.RawFormat) Dim arrImage() As Byte = ms.GetBuffer ms.Close() Dim strFilename As String = lblfilePath.Text.Substring(lblfilePath.Text.LastIndexOf("\")) Dim cnn … | |
Ok so I am using the default WebApplication in Visual Web Developer 2010, and applied Paladine's example of Simple ASP.Net Login page. And it is working, but only to some extent. I am sure I am just missing something INCREDIBLY simple, but after looking at this code for 2 days, … | |
I created a foreign key on a table just using this statement. When I wanted to drop it, phpMyAdmin didn't allow me to do so. Would anyone suggest a nice way of getting away with it? [code] ALTER TABLE `likes` ADD CONSTRAINT (fk_user_id) FOREIGN KEY REFERENCES `users` (user_id); [/code] This … | |
Error: Debug Assertion failed: Expression: BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Code: #include "stdafx.h" #include<iostream> #include<stdlib.h> #using <System.dll> #include< math.h> #include< time.h> #include<List> using namespace System; using namespace System::Collections::Generic; using namespace System::Linq; int someSize=2000; # define SIZE 20 class queue { int aMsg[SIZE]; int front; int rear; public: queue(); ~queue(); void insertMessage(int i); int removeMessage(); … | |
[COLOR="Green"][b]I reworked my code into a way that was simpler.[/b][/COLOR] [COLOR="Red"]I have a URL in the following format: "http://sub.domain.tld/path/to/page" I need to extract 'path' and 'page' and discard the rest of the URL. I know about the [ICODE]System.Uri[/ICODE] class and with [ICODE]Uri.AbsolutePath[/ICODE] I can get "/path/to/page/". I need a way … | |
I'm trying to create 10 files with random names and random data. Each line in the file consists of two integers and represents one "record". Naming the files and generating random data didn't turn out very difficult. But for some reason I fail to recognize, while I create 100 records … | |
hi m trying to make a login page. m trying that when username and password is confirmed it shows name of customer with welcome message and further page appears accordingly. this is my code for login GUI [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- DW6 --> … |
The End.