64,152 Solved Topics
Remove Filter ![]() | |
Hi guys, i have been trawling around looking for a decent and simple way of working out an age from a birthday. The way i'm working is a date of birth is added to a database then when pulled we echo the actual age and not the d.o.b. It's probably … | |
Hello, I am trying to make an rpg, and I am having troubles with functions. I am currently working on the 'potion' aspect of my rpg, which I have highlighted in red. My question is this: Is it possible to make the function return money, potion number, potion size, etc? … | |
Hey all, I've been trying to get my int 10h to set the color for a STRING, not just a single character. Here's my code, i'm running windows XP and using NASM16 assembler. So, what I want it to do is display something like "Hello world", instead of just.. "a", … | |
Hi, I've imported a Visual FoxPro database to MS SQL Server 2008 and had a couple of queries; The VFP tables used Numeric(5,0) for the Index fields, but I'm thinking of converting them to Integers in SQL Server. Is there any issues I should be aware of? A co-worker keeps … | |
I'm supposed to merge a ordered data of two files into a third file, keeping the data in order. I'm suppose to create a MergeFiles application that merges the integers ordered from low to high in two files into a third file, keeping the order from low to high. Then … | |
Hi I need help on how to use LDR and ADC0804 in 8051 microcontroller. So far I have this in my project but I want to replace the switch with LDR (dark activated). What happens here (attached file)is that I use the switch to decrement/increment the number of cars and … | |
I have developed two large VB 6 programs and apparently and unintentionally developed one as a Project Group rather than a stand alone Project. As A group I have problems that all releases of the program seem to be altered each time I make a development change, which I dont … | |
Hello I am new to this forum so be patient.. I am currently having an issue with a map iterator well the code i am talking about: [CODE] leafnode<LeafEntry<recno_t> ,blocknum,char*,recno_t>* descend(Object<dimensionality,Type>& ob,nonleafnode<NonLeafEntry<dimensionality,Type>,dimensionality,Type>* rt,blocknum* leafblocknum){ std::map< int,NonLeafEntry<dimensionality,Type>* >* entries; std::map< int,NonLeafEntry<dimensionality,Type>* >::iterator it; leafnode<LeafEntry<recno_t> ,blocknum,char*,recno_t>* L; int i,elements; if(rt == NULL) … | |
If I have a file that has a content of this kind: a,b c,d e,f g,h I need to make a list of the letters in the first column, i.e., [a, c, e, g]. I wrote some code which prints these letters but I don't know how to put them … | |
Ok so what i want to be able to do is connect to a mysql database. Here's my code so far: [CODE] Connection connection = null; try { // Load the JDBC driver String driverName = "postgresql-8.4-701.jdbc4.jar"; // MySQL MM JDBC driver Class.forName(driverName); // Create a connection to the database … | |
Python beginner try to learn pygame. Here is a program I made for random color circles popping out. [CODE]import pygame, random pygame.init() X = 680 Y = 460 def main(): screen = pygame.display.set_mode((X,Y)) pygame.display.set_caption('circles') background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(pygame.color.Color('white')) run = True clock = pygame.time.Clock() while run: clock.tick(30) … | |
How can i sort this array pls.. [CODE]#include<iostream> #include<algorithm> using namespace std; int prompt(int x[]); void printreverse(int x[]); int main() { int x[5]; prompt(x); printreverse(x); system("pause"); return 0; } int prompt(int x[]) { for(int i=0;i<5;i++) { cout <<"Enter integers:"; cin >>x[i]; } } void printreverse(int x[]) { for(int i=0;i<5;i++) { … | |
I have my program working but, I need to cut out the repeated code. How do I change this part of my code to pass arguments to a user defined method? I'm lost. I really have no clue exactly where to start on this. Basically when a user clicks a … | |
I need to create a triangle in C++ that will take the user inputted letter (capital) and then create a triangle that will look like. I can only use nested loops NO arrays or strings Enter a letter: F F FE FED FEDC FEDCB FEDCBA here is the code i … | |
I'm trying to write a c++ program that first asks how may people are in a party, then it takes that number to calculate how many times to ask what the next person wants to order. This is what I have so far. I can get the program to recognize … | |
How would I ask the user to input what type of engine they want and getting an output of $150 [CODE=vb.net]Console.WriteLine("Enter EngineChoice for your vehicle:") Response = Console.ReadLine() EngineChoice = Convert.ToString(Response) If EngineChoice = Sixcylinder Then Convert.ToInt32(Response) Console.WriteLine(150) ElseIf EngineChoice = Eightcylinder Then Console.WriteLine(475) ElseIf EngineChoice = Diesel Then Console.WriteLine(750) … | |
Hello I'm doing a program about UART in Borland C. And I have a few questions. This is the code: [code] #include <iostream.h> #include <dos.h> #include <conio.h> #include <stdio.h> #define COM1 0x3F8 int main(void) { clrscr(); // outportb( COM1 + 1, 0 ); outportb( COM1 + 3, 0x83); outportb( COM1, … | |
hi...i'm making a game that uses the direction arrows and fires with space...the problem is that when i keep holding 2 keys it makes only the behavior of one....can any1 tell me what i shall do | |
In Design mode in NetBeans IDE, I had a palette with all of my AWT and Swing controls and some netbeans that I can drag and drop onto the Jframe I'm designing, I accidentally closed it. I am not seeing a menu option anywhere to add that palette back as … | |
i am using SSRS 2005. In my dataset there are some blank rows and in SSRS is showing blank rows. Is there a way that i just show rows with data and ignore blank rows. i set the visibility property but it is showing blank line. dataset: a b c … | |
Hi, I have some code to dynamically retrieve one of three AJAX files and insert it into a DIV The Javascript is [code=javascript] function createajax() { var Ajax; try{ Ajax = new XMLHttpRequest(); } catch (e){ try{ Ajax = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ Ajax = new ActiveXObject("Microsoft.XMLHTTP"); … | |
hello plz i need help with this urgently as it i supposed to be used tomorrow :S i get this error from the following script Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/aybasuco/public_html/MySQL-Formmaker/lib/db_index.inc.php on line 42 thanks in advance for your valiable time [CODE]<?php # … | |
Hello, I have to write a program that merges 2 seperate files and then outputs to a single file. Each input file is to have numbers in ascending order and the output is supposed to compare these and then put them in ascending order. ex.: input1 = 1 3 5 … | |
Hello everyone, I have a problem when i use json and array. And i need your help. Here is my code: [CODE] while($row = mysql_fetch_assoc($result)){ echo json_encode($row); } [/CODE] The result is: [CODE]{"id":"1","title":"event1","start":"2009-11-10 14:18:15","end":"2009-11-03 14:38:22","allDay":"false","url":null}{"id":"2","title":"event2","start":"2009-11-09 15:41:20","end":"2009-11-10 16:41:25","allDay":"false","url":null}[/CODE] But i want the result is like this: [CODE] [{"id":"1","title":"event1","start":"2009-11-10 14:18:15","end":"2009-11-03 14:38:22","allDay":"false","url":null},{"id":"2","title":"event2","start":"2009-11-09 15:41:20","end":"2009-11-10 … | |
I'm reading in a file and sending the data (once encrypted) to a dictionary, with a hash of the data before and after encryption. I then pickle the dictionary but find the file size is massive compared to the source file size. If I write the encrypted data straight to … | |
I am trying to remove a specific substring from a string... Here are the doctests. I'm just absolutely stumped. Can someone point me in the right direction on where to start? def remove(sub, s): """ >>> remove('an', 'banana') 'bana' >>> remove('cyc', 'bicycle') 'bile' >>> remove('iss', 'Mississippi') 'Mippi' """ def remove_all(sub, … | |
f = \ ''' Product: DECNET Node: ALETHA Address(es): 1.1 Product: TCP/IP Node: aletha.ind.hp.com Address(es): 15.146.239.174 ''' lines = f.split('\n') i = 1 ###### To get the IP Address(es) adapter_config = True for line in lines: if adapter_config: # print line import re if (re.match("^Product:\s+",line)): line1=re.split("\s+",line) print line1[5] I want … ![]() | |
Hello all, my first post. I have identical tables in my db. Is there a way to create a view with dynamic query to combine/union all the identical tables into one view? dbo.table.x-1 dbo.table.x-2 dbo.table.x-3 dbo.table.x-{n} | |
Hi All, I have just started learning how to write C++, I have written my very first very simple program using notepad and saved the file as simple.cpp. So my question is how do I compile or build my program into an executable file, I understand I have to use … | |
Hi All, I am currently learning C++ and i have started to write some small programs that explain operators, integers and values, my question is this. How do I make my programs stay on screen, at the moment I run my program it displays the message on screen for about … | |
I'm writing pseducode for a Java class. Obviously being pseudo the language shouldn't matter but thought I'd mention it as it would explain any 'bias' I have. BTW, this is my first programming class. I'm revising for my end of semester exam. Write a pseudo code algorithm which will input … | |
![]() | Hi I need to integrate paypal gateway on my website. We sell memberships. There is a trial period for using some features of the website. After that users must purchase their memberships - it can be a mounth or 6 mounths or a year. Now, I could dynamically generate the … |
Hi guys, I am trying to restrict users to access the sources of my application so I have used tomcat-users.xml file , but later I will be facing a problem which is how if I have a lot of authorized users , so I will add each one to that … | |
Hi all. Before you all scream "search the forum", i already have, this and many others. cant seem to find the problem with my code. Basically, i have a fairly large text file, each line consisting of 20 fields seperated by a `. i have got my program to split … | |
Hi. I have a web application whereby I perform a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as follows(in java class): /***********************************************/ [code=Java]//......after connecting to … | |
Hi All the coders out there. I need a suggestion. I have windows xp installed on my computer and i need to develop application for windows vista. I would prefer to use .net framework 2.0 and visual studio 2005. Instead of .net framework 3.5 and visual studio 2008. Well, selection … | |
Hi! I have a form with two dateTimePickers (first with date of one month ago, and the secod with current date), a dataGridView and a button. When i click the button i want to populate the dataGridView, but only between date1 and date2 [CODE] mySqlCommand = con.CreateCommand(); mySqlCommand.CommandText = "SELECT … | |
Hi all, I've got a spot of bother with my radiobuttonlist. It has 3 items in it and I want them to control the visibility of certain divs/tables. But even simple text changes are becoming a headache and the postback is not firing the event I clicked on but the … | |
danni web has been a great help to me i want just one more help i am able to connect to MSSQL present in my localhost using wamp but i am unable to connect to my MSSQL running in a pc with ip 123.xxx.xxx.xxx can u guide me on how … | |
Could someone lend me their brain? :D I thought I had most of it done, until I got an error saying that my 'calcAverage' definition was not defined.. x.x here is the prompt for the program: Write a program that asks the user how many pumpkin weights they have, and … ![]() | |
hey all.. i was wondering if anyone culd help me wid this.. i've a html file with javascript and a php file.. i need to access the db result generated by the php file in my javascript..to dynamically load drop down menu in the html file.. was wondering if i … | |
Hi to all, May I ask any help for a code in VB6 in saving images in either SQL server or MS Access databases? Please give me some idea thanks a lot in advance. | |
Dear All I am new in ADO.Net and i am using C#. My problem is I want to execute one trigger in my program I am having name of student in my student table now from my C# program I will pass any name which is in table from textbox … | |
Anyone can help me to give link or website / tutorial about binding data with gridview ??.... | |
can anyone explain tranaction in .net ..when we go for it ? explain locking in .net along with example plz? | |
I have put an array list in a hash map, but the problem is the old values of the hash map are over written everytime. So the old values of the hashmap aren't stored. Could someone tell me what mistake I am making? [CODE] import java.util.*; public class Cain { … | |
[code]# Reading the .csv file energyFile = open("EnergySources.csv","r") stateDict = {} for line in energyFile: line = line.strip() fields = line.split(",") if fields[0] == "State" or fields[0] == "": continue state = fields[0] total = fields[-1] float(''.join(total)) coal = fields[1] float(''.join(coal)) naturalgas = fields[2] float(''.join(naturalgas)) petroleum = fields[3] float(''.join(petroleum)) nuclear … | |
I have created form resembling a standard dialog box where some enters there name into a text box and then hits 'ok' taking them to the main form..On this form I need to get the name that is typed into the text box to be displayed on the main form. … | |
Hello, I begin in Python, and I have the following problem: I retrieve an excerpt of a HTML webpage from the web, and then want the result to be hold in a variable (before being processed by a reg-exp). The function do get the HTML source, but when I assign … |
The End.