199,114 Archived Topics
Remove Filter ![]() | |
I created a program that will display a question, then the user has to answer the question within a time limit. I want to make it so for long questions, the question will just go to the next line instead of cutting off. Is there another way to display the … | |
This loop is going slow because of the push_back part at the end, can i make this go any faster? Basically this is what it does 1) Reads file into a char array 2) takes each char in the array and transfers to vector. [CODE]char *tempItem = new char[1]; delete … | |
Ok, here's another problem which i really need help. One suggestion from our panel suggested if we can have a module which do not allow deleting a record (one or more) in the database which are Administrator type. Those records cannot be deleted whether through 1. the program itself (via … | |
The below code works well in my localhost, but gives an error whenever I upload it to my hosting server! :?: Somebody please suggest me what to do ??? [B]Here is the code:[/B] [CODE]<?php error_reporting(E_ALL); ini_set('display_errors',1); require('Connections/cn.php'); if(isset($_POST['modify_m']) && $_POST['modify_m']=="Update") { //Update image $file_name= $_FILES["file_m"]["name"]; $file_type= $_FILES["file_m"]["type"]; $file_size= $_FILES["file_m"]["size"]; $file_temp= … | |
![]() | ...i'am quite confuse about event-driven programming in java applet... ....i have been using a "TextField" for creating an applet that would require a password ... ...my goal is to make an error_message saying "SystemBlocked" whenever I entered 3 wrong passwords and would terminate the applet at the same time... ...how … ![]() |
For example here is some code..... [CODE] preg_match_all("/<a(?:[^>]*)href=\"([^\"]*)\"(?:[^>]*)>(?:[^<]*)<\/a>/is", $stripped_file, $matches);[/CODE] What I don't get is all of those special characters? (?:[^>]*) How can I do this with the h1 tag, h2 tag, and h3 tag? | |
hi, i'm new to python. i want to read from a text file (as attached) and i want to plot a scatterplot. i want to plot lane as X-axis, EyVt and EyHt as Y-axis. i have a sample code but i need help on how to get python start reading … | |
Hello, i m looking for the database connectivity in asp.net with sql server 2005 or ms access 2007? please anybody solve my query. thanks in advance, looking for your response. | |
Hi. I have a troubble with reading string from file and saving it in a structure. Here's my code: [CODE] FILE*t; t=fopen("file.txt", "r"); wt=(pointer)malloc(sizeof(list)); w=wt; for(i=0; i<3; ++i) { w=(pointer)malloc(sizeof(list)); fscanf(t, "%d", &w->id_t); fscanf(t, "%s", &w->name); fscanf(t, "%f", &w->price); fscanf(t, "%d", &w->tax); printf("%d\n", w->name); //for check w->next=NULL; fscanf(t, "%c", &c); … | |
Hi, I'm new to Python and having difficulty opening my .py file (ex1.py). In the command prompt I cd to the folder containing the file and when I try to open it nothing happens. The prompt just gives me a new line. It looks like this... 1. I open the … | |
I am confused, I seem to be losing the variable item.Size when i go from one for loop to the next....why? When i show item.Size the first time it shows all the #s, the second time I get straight 0s? [CODE]for (unsigned long int q = 0; q < tableCount; … | |
I have a question about function precedence. How does the compiler decide which function to call in quasi ambiguous situations? Is it laid out in the standard or is it implementation dependent? If you look at the attached code you'll see I'm outputting the value contained by the myint object. … | |
Hello, My friend and I are learning to program by creating and solving little challenges for each other. In the most recent one, he hid something in the resources of his program. I can find and save the resource off manually using .NET Reflector; but I am trying to do … | |
I have already completed a form registry and works!!. Well nearly I have an error which displays this [CODE]Warning: extract() expects parameter 1 to be array, null given [/CODE] Heres the code [CODE]<?php /* Program: Login.php * Desc: Login program for the Members Only section of * the pet store. … | |
When i am trying to run a C program in Eclipse, it gives error. Saying, "launch failed, Binary Not found" Could anyone plz tell me how to put in Binaries into Eclipse........ | |
Hi, I have the code below for a login script. I not finished it yet and i moved from Dreamweaver to Netbeans a while ago and all my code has lost it's indentation and formatting. I am missing some curly bracelets i am sure of it but cannot find where … | |
Hi! I would like to make transparent my two JScrollPane components. Could please someone explain me why the code [ICODE] scrollPane1.setOpaque(false); scrollPane2.setOpaque(false); imagePanel.setOpaque(false); beads.setOpaque(false);[/ICODE] does not work? Thanks! [CODE] public SelectablePanel() { beads = new BeadsCollection(NR_OF_BEADS); imagePanel = new ImageSelectionPanel(0, NR_OF_BEADS_SIZE); p = new Point(); JInternalFrame jif = new JInternalFrame("Title", … | |
if i were to do this in a program, would it possibly overwrite data/memory that is already being using by my application? int main() { char *pointer = "hi"; pointer = "weeeeeeeeeeeeeeeeeeeeeee"; return 0; } | |
i am trying to register 2 sessions. one is supposed to get the id of the user logging in, the other is supposed to get the persons username. here is the login page: [CODE]<?php session_start(); include "dbconnect.php"; $myusername=$_POST['user']; $mypassword=$_POST['pass']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = … | |
This Code works fine, but i try add all Offsets and memory bytes into txt db, anyone have idea? i want read all lines from a txt to compare in memory... is for anticheat.. :) ex of txt.. Offset Memory Dump Offset Memory Dump.. but i donw know how use … | |
This is a very simple bbcode example to use on a forum or your pages. Add this to a function page and make sure the function is required on the page you want to on. ENJOY!! :D | |
Hi there, I'm trying to develop some old code (for a class to model affine transformations) which was working thanks to a Daniweb member. The old code is [CODE] void IFS::eval(float x, float y, float& a, float&b) { a = (matrix[0]*x + matrix[1]*y + matrix[2]); b = (matrix[3]*x + matrix[4]*y … | |
Pretty much what it says in the title, _orgDrspath = std::string, newDrsName = std::string [CODE]std::cout << "Opening original " << _orgDrsPath << std::endl; // Store all bytes into a variable called exe std::ifstream inFileDrs(_orgDrsPath, std::ios::in | std::ios::binary); inFileDrs.seekg(0, std::ios::end); size_t len = inFileDrs.tellg(); int newLen = 1024*1024; char *theDrs = … | |
for ($i=0;$i<=$SIZE;$i++) { $_=$LINES[$i]; if (........... need to know how to ask if a line contains <!--addsearch--> AND more than two " speech quotes Hope you can help Marko | |
Here is the query: [code]mysql_query("UPDATE il_pageparameters SET totalvisitor_to_refer=$totalvisitor_to_refer, referer_page_url='$referer_page_url', message='$message', rewardmessage='$rewardmessage', background_image='$bg', poweredby='$rg', istoshowrm=$istoshowrm, msg1='$msg1' WHERE id=$configid;");[/code] I have tried echo'ing the output: [code] echo "UPDATE il_pageparameters SET totalvisitor_to_refer=$totalvisitor_to_refer, referer_page_url='$referer_page_url', message='$message', rewardmessage='$rewardmessage', background_image='$bg', poweredby='$rg', istoshowrm=$istoshowrm, msg1='$msg1' WHERE id=$configid;"; [/code] Run the echo'd output manually in phpmyadmin and it works fine. … | |
I I'm trying to create an application in real mode that uses the flags to store the results of calculations and other stuff. I'm trying to do this to take up less memory. So can someone please give me some example code or tell me how to do this. I … | |
Hi... I want to insert a variable [I]finalScore[/I] into an array [I]competitorsArray[competitorCounter] [/I]. I can't find any instructions anywhere on how to do this, so I'm wondering if it's even possible. Also, how do I output an error message if the user enters a number that I then store into … | |
Hello! I am very pleased to join Daniweb. I found it very interesting and helpful and immediately joined the community in the hope of getting some help regarding my final year project. Well coming to the point, m designing an Attendance Management System(AMS) for my college. I have created accounts … | |
I have this IRC bot that I am hard coding from scratch just for kicks. In it I pasted all of my functions to a separate file so that it saves spaces on my eyes when I code the mainframe. So on my imports I have: [code] import socket, re, … | |
I am trying to get xsl comments on my XMLSpy XSLT output console, but the comment is not appearing. My xslt script is: [CODE] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ota="http://www.opentravel.org/OTA/2003/05" exclude-result-prefixes="ota xsl"> <xsl:output encoding="UTF-8" version="2.0" method="xml"/> <xsl:strip-space elements="*"/> <xsl:variable name="no_of_adult_persons" select="count(//ota:PassengerListItems/ota:PassengerListItem[@Code = '10'])"/> <xsl:variable name="adult_persons_prices"> <xsl:call-template name="adult"> <xsl:with-param … | |
I am using Fedora 14 since last month , i tried to use do C coding on it but unfortunately compilation command is not working in it although GCC is installed on it. Need some help! | |
Hi, I currently created a video uploader, but when the video is too big in size, the page seems to be not doing any until the video is completely uploaded. I want to put somewhat like "loading.. please wait" script until the video is not completely uploaded. Thanks. //Ana | |
I have to [B]sort around 12GB of integer data[/B] which is kept in a file. I have a [B]1 GB RAM[/B]. How should I do it? The problem is I cant read whole of data together and store it in a vector because it goes out of memory bound. Which … | |
I've found some tutorials but they all need to browse the file first. I need to play the file automatically without the need of finding it by a browse button. | |
Hi, I am trying to write function overloaded function template, but I get some kind of an instantiation problem and here is my code: [CODE] /* * File: main.cpp * Author: cppguy * * Created on 20 January 2011, 19:10 */ #include <cstdlib> #include <iostream> #include <cctype> #include <cwctype> #include … | |
hi can u plz tell me that how to Enable and disable of text box through a button in php???? plzzzzzz give me any little example or syntax!!!!!!!!!!!!! | |
Hello guys! I just want to ask if how can I use java file reader? I badly need this for my program... Thank you in advance! :) | |
i just want to kno if the default gw part is correct should it be with or without the brackets ? [CODE] #!/bin/bash ifconfig eth0 146.192.188.106 netmask 255.255.255.0 broadcast 146.192.188.255 up sudo route add default [gw] 146.192.188.254 dev eth0 ifconfig eth1 10.10.160.188 netmask 255.255.255.0 broadcast 10.10.160.255 up sudo route add … | |
Hi, I am trying to write a simple c++ script to learn more about file manipulation. First script is adding some info a file as a structure and second one is reading from the file. However when i try to read from my file it always shows the found values … | |
hey friends...i request you all to pls help me out...im damn confused... im planning to make a website by March,2011 in which i will be using HTML/JSP and Mysql as d/b. however, i have a few doubts abt. Mysql.... 1) on the mysql site, there are many packages available to … | |
Hi, I'm a relative newb to Python and I'm starting my first major project - a logarithmic graphing system. I'm using tkinter for the GUI part of the design, but I've run into a problem. Basically, I want my graph (a tk canvas) to appear in the same (root) window … | |
I am currently working on a project in which I need to check the similarity between images... I have started of trying the cosine similarity.. the formula available online needed to be modified since it was only for text and in images the 1st pixel of one image will have … | |
[code=cpp] #include<stdio.h> #include<math.h> #include<stdlib.h> int minimal(int seed); int main (void)//random=countpassenger; { int check=0, tempEarnings, ctr4, info[17][31],ctr3,capacity=0, ctr, ctr2,denomination[6]={1,5,10,20,50,100}, x[6],seed, random=0, loose=0,y[17]={0}, a, change, money, passenger=0, destination, station, pay, payment, n ,km, earnings, out[17]={0}; int passengerlimit[17]={0,30,15,10,10,15,20,10,10,20,5,20,15,10,10,5,0}; printf("Hello, Good day!\nWelcome to our bus! Just seat back and relax.\n\n"); printf("Please enter the seed: … | |
Hello, I have a WPF/C# ListBox with one column with several items loaded from an SQL Sever Compact Edition database. I'm trying to delete a selected item from the database, but I'm having difficulties getting the value of the selected item, and because of this it is always returned null … | |
Hi, I have a sign up form that generates a activation key and emails it to user and they cannot login until account has been activated etc. I know how to do the MySQL query to check if activation key already exists and have a function that generates a random … | |
Hi, I am trying to make a program which formats the date for the user and verifies leapyears and checks for invalid dates. Below i have worked out the code to calculate leap years. But how would i go about formating the date so for example: If the user entered … | |
Why do I get the extra "3" in this replacement? $s='This is 3a and 3b'; $pattern='/3([a-z])/'; $replace='[$0]'; preg_replace($pattern, $replace, $s) gives 'This is [3a] and [3b]' I thought $0 refers only to the match in the parenthesis. Same with $replace='[\0]'; I want: 'This is [a] and [b]' Thanks for any … | |
Hello, I'm a beginner in these to programming language. Here I want to know how to display the actual value of variable of enum holds. Like this in C++: [code] #include <iostream> #include <conio.h> using namespace std; int main(void) { enum Difficulty { Low = 1, Medium, High }; Difficulty … | |
Hello dears. I am using python 2.6 in Ubuntu 10.10. I need an interface that make me able to trace my project. for example portable python ver 1.1 has this ability. please intruduse me an interface that be compatible with my os. Thanks. | |
I am new to SQL and databases in general. My problem is that I am trying to create a table that will store information about users in each row based on the date of that activity. So I need to create a table with 365 columns representing with one representing … |
The End.