199,114 Archived Topics
Remove Filter ![]() | |
Greetings all. I'm preparing for my java data structure/algorithms class and I'm starting a personal code repository of sorts and such. I started out with c++ and my question is this: I'm implementing a controller class and a class full of sorting and search methods in java. Instead of copying … | |
Requesting help with my homework problem. error: conversion from 'std::string*' to non-scalar type 'std::string' requested The lines with the error are under the comments. Thanks. [CODE] #include <QtCore/QCoreApplication> #include <iostream> #include <cstdlib> #include <string> using namespace std; typedef string* stringPtr; string* addEntry(string *dynamicArray, int &size, string newEntry); string* deleteEntry(string *dynamicArray, … | |
How do I replace a string in a text file with another string, including quotes? For example, I have an xml sting that reads: <test name="My name is Rick" value="False" /> and I want replace to replace the value="False" to value="True" so that it ends up like this: <test name="My … | |
i was able to find a good script on centering a div vertically but not compatible on ie old browser and another issue my div is pushing up because i have a footer and i dont know how to adjust on script adding a top border :( [CODE] <script type="text/javascript"> … | |
I'm writing a program that rolls a die a number of times that the user enters, and counts up each time a one, two, three, and so on is rolled. Right now, it only prints out zero's. Any guidance would be appreciated! Here's my code: [CODE] // dice.cpp : Defines … | |
Why does it load my DLL but the pointer to the Proc returns 0? It loads the DLL and says "DLL Loaded" but it just won't say "Function Found." Help me please :)? [CODE] #include <windows.h> #include <iostream> //DLL Function: void DLL_EXPORT Theading(HANDLE hThread, DWORD ThreadID, void* FunctionToPass); typedef void … | |
Hello everyone! I am currently working on creating a Poker Simulation using the language C++. However, I am having issues with my swap function and also creating the conditions, such as declaring a Flush or Pair. Here is the code I have so far, and if you can assist me … | |
I have this line of code (repeated with a bit of change) [CODE] if (ropeChosen == 1){ g.drawImage(rope, 321, 0, 10, 505, this); g.drawImage(rope, 521, 0, 10, 704, this); g.drawImage(rope, 721, 0, 10, 703, this); g.drawImage(rope, 921, 0, 10, 702, this); if (p.idol2){ g.drawImage (idol, 275,485,100,100,this); }else{ g.drawImage (snake, 300,505,50,100,this); … | |
Is there a script that when div resize(browser) it will maintain aspect ratio? ive tried using css which adjust the width through min-max but wish to maintain the aspect ratio (height) [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"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style … | |
Hello people, I've got a 2-d array, the first row has a string in each position, the second has a number in each position returned by a function that run on the strings.I run the mutatedstring function, run the matchmutated and put the values into the array, offspring times. Then … | |
Hi, i have been working on a questionnaire that will allow me to show a question and then have three possible answers in the form of radio buttons. Users will have to select one then hit the NEXT button to move onto the next question. I have managed to use … | |
Hi Looking for some general advice: I have taken over support of a large and complex web site, which uses multiple Access databases. At present it makes use of the MS Jet database engine (Provider=Microsoft.Jet.OLEDB.4.0). (as well as MySQL, used in a Snitz forum). After solving many specific problems I … | |
[code=java] final String cardListStrings[] = {"First Card", "Next Card", "Previous Card", "Last Card"}; cardList = new JList(cardListStrings); cardList.setVisibleRowCount(4); cardList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); cardList.addListSelectionListener( new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { System.out.println("Inside List Event Handler"); if (cardList.getSelectedIndex()== 0) { cardManager.first(deck); System.out.println("First Card"); } if (cardList.getSelectedIndex()== 1) { cardManager.next(deck); System.out.println("Next Card"); } if (cardList.getSelectedIndex() … | |
Hello, can anyone help me on this when i try to hit an invalid link to my site it gives me this : [B]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/nadia/public_html/showarticle.php on line 39[/B] here's my showarticle.php [CODE]<?php require_once ("includes/config.php"); require_once ("includes/functions.php"); $script_name = 'showarticle'; … | |
Guys i always get an error in this...it says "Syntax error in Update Statement" please help... [CODE] Sub updateaccount(ByVal Username As String, ByVal Password As String, ByVal FName As String, ByVal MName As String, ByVal LName As String, ByVal Restrict As String, ByVal FullName As String) connect = New ADODB.Connection … | |
Hi, I was wondering if Perl has a command line interpreter like Python's IDLE, where you can test things readily without having to save them as a program and run them. If not, why? Why is it that Python or Matlab has command line interpreters where you can type 4+3 … | |
Dear all, how can i make a program that count the different words in a text(input stop with EOF) and the number of the lines which a word appears? | |
I need a user to input int and get the name of the month in return. I have this: [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package se211.dz14; import java.text.DateFormatSymbols; import java.util.Scanner; /** * * @author Boris */ … | |
Hello I'm tring to declare a BinaryOut type of object in a Java web project but it doesn't seem to work. I've imported the same libraries I used in a standard Java project so I don't know what's wrong. Any tips???? | |
Guys just wondering how can I create a program that does specific actions just by pressing any of the alphanumeric keys on my keyboard instead of the very traditional clicking of a button in a GUI. Example, I want to close the window just by pressing the letter x on … | |
I would like to write Perl script to read just first line of a file & calculate the length of second field which is comma separator file. For example - 1001,abcd,9999 1002,xyz,0001 expecting result - 4 (character length of second field from just first line i.e. abcd) Can somebody help … | |
Hey all, I'm trying to make a DLL that can be used in Pascal to enable multi-threading. I've decided I want to export Threads in C++ to a DLL. Before I make DLL's I usually write the program first to test everything then I convert it to a DLL. [CODE] … | |
hi i used from regular command for showing date in php [CODE]<?php echo(Date("l F d, Y")); ?>[/CODE] that as you know the result is some things like this : Monday December 12, 2011 but i need the brief form of date some things like this one : 12/30/2011 . please … | |
![]() | ...hello!!!...I need some help in python... ..Im new to Python programming and I need a window form builder that can script it into a python program....can you please give me suggestions.???..I have tried also searching on google but Im afraid the results might not help me well....unlike asking here at … |
can any1 tell me wats wrong in my code i cannt change my password using this code [CODE]<?php $con=mysql_connect("localhost","root",""); mysql_select_db("pras2"); if (!$con) { die('Could not connect: ' . mysql_error()); } $username = $_POST['username']; $password = $_POST['password']; $newpassword = $_POST['newpassword']; $confirmnewpassword = $_POST['confirmnewpassword']; $result = mysql_query("SELECT password FROM customer WHERE username='$username'"); … | |
Hi, i am making a text editor with mouse programming.Given is my code .the compiler is not giving any error but i am unable to use enter,delete,backspace and arrow keys . can any one please tell me the logic with which i can make my project more better. THANKS in … | |
Hey guys, So, I have a CheckedListBox that will be used to choose what columns they want to select from a database. Is it at all possible to display it in the format of [Table Name].[Column Name]? So far I have this: [CODE]con.Open() theQuery.Connection = con theQuery.CommandText = strColumns theAdapter.SelectCommand … | |
[B]Form.php[/B] [CODE] <form autocomplete="off" enctype="multipart/form-data" method="post" name="form"> <p></p> <div class="form-elements-malling"> <label for="fullnamemalling">Name<br /></label> <input type="text" name="fullnamemalling" id="fullnamemalling"/> <span></span> </div> <p> </p> <div class="form-elements-malling"> <label for="emailmalling">Email<br /></label> <input type="text" name="emailmalling" id="emailmalling"/> <span></span> <input type="submit" value="Submit" style=" background:#0060a1; color:#FFFFFF; font-size:14px; border:0; " class="submit"/> <span class="error1" style="display:none"> Please Enter Valid Data</span> <span class="success" style="display:none"> … | |
Hey all, Apologies for this question, as I imagine it will be very easy. I'm creating a form that will be used to update fields in a table. I don't want the user to be able to update primary keys though, so I'm trying to disable the textbox so it … | |
Im a completely retarded person when it comes to creating regex patterns! I want to check a users input, and allow certain urls, so here I have half of a pattern I have put together - Well it is actually the whole bit, but im missing bits and parts to … | |
hello, i want my program to have the ability to generate a graph from the existing data. it works well. but i want there's a block of text that describe the generated graph or maybe to have a link or button in the same page with the graph. i read … | |
plzz help me some one to solve this problem as early as possible... | |
I need to get the public key associated with a certificate.. The code which I found was as follows... // The path to the certificate. string Certificate = "Certificate.cer"; // Load the certificate into an X509Certificate object. X509Certificate cert = X509Certificate.CreateFromCertFile(Certificate); // Get the value. byte[] results = cert.GetPublicKey(); Now … | |
hello guys how can i update datagridview to display the newly added data to the database here is my sample code for adding data to the database [CODE]MySqlCommand cmdAdd = new MySqlCommand("INSERT INTO tblelemdetails (STUD_ID,LNAME,FMNAME,AGE,ADDRESS,BDAY,BPLACE,RELIGION,CITIZEN,CITY,LSCHOOL,LSCHOOLADD,SCHOOLYEAR,GENDER,LEVEL) VALUES('" + Ids.ToString() + "','" + txtLName.Text + "','" + fnamer + "','" + txtAge.Text … | |
I am creating a login form together with sql as may databse but when i run may program an error occur at "myData = myCommand.ExecuteReader()" stating that "Connection must be valid and open" what should i do on that to make it fix?? someone help me please thanks in advance … | |
Hi, My title may be wrong but I would like to explain this process that I need here, Here is my Process, I already have imported excel file and inserted it in the datatable, and then I also validated it's format before inserting it in the database. Now Here is … | |
[CODE]#include<stdio.h> #include<conio.h> int main() { FILE *p,*p2; char c; long l; long x; p=fopen("file1.txt","w"); printf("enter the content of file:"); while(c=getchar()!=EOF) { putc(c,p); } fclose(p); p=fopen("file1.txt","r"); // l=fseek(p,1L,2); l=ftell(p); p2=fopen("file2.txt","r"); c=getc(p); while(l!=-1) { if(c==' ') { x=ftell(p); // fseek(p,-1L,1); while(c=getc(p)!=' ') { putc(c,p2); fseek(p,-2L,1); } // fseek(p,x+1,0); } fseek(p,x,0); l=ftell(p); c=getc(p); … | |
Hi, How could I find a sample web application with php for a database in mysql ? I just don't know how it will look like ! thanks in advance ... | |
Hey guys! I need to make a very simple login-like app. I could just write an program that would accept one masked text-box and verify its contents with a predefined string, but I want something more secure. How to make it encrypted, like web login forms? I've read a bit … | |
i finally started having a look at gui yesterday, and tried to do some things with PySide, however i have the following problem; Whats wrong with this code? [CODE] !/usr/bin/python # -*- coding: utf-8 -*- import sys from PySide.QtCore import * from PySide.QtGui import * class Form(QDialog): def __init__(self, parent=None): … | |
I have a menu: [code] #include <exec/types.h> #include <intuition/intuition.h> #include <libraries/gadtools.h> /* Prototypes for system functions. */ #include <proto/exec.h> #include <proto/intuition.h> #include <proto/gadtools.h> /* ANSI C includes. */ #include <stdio.h> struct IntuitionBase *IntuitionBase = NULL; struct Library *GadToolsBase = NULL; struct NewMenu window_menu[] = { { NM_TITLE, "Project", 0 , … | |
I have a static class, with all methods and fields static. My methods in that class are going to use a static field declared in that class. I want that static variable(which can not be made final) to be initialized with a value taken from a database when that static … | |
Hi, I just want to know how can vb.net validate the format of a certain string for example, i have a string with 2011/13/02, and I want to check if it's format is in yyyy-dd-MM format,. how can this be done? Thanks | |
Hi, Want to remove duplicates from a list so if my list contains: [CODE]www.test.com test.com mytest.com[/CODE] I want the final list to look like below(only selecting the domains with www from the duplicate in front) : [CODE]www.test.com mytest.com [/CODE] I have this linq but it seems to ignore all the … | |
[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); int A[20][2],n,sum; cout<<"\n\tEnter the no. of terms: "; cin>>n; cout<<"\n\tEnter "<<2*n<<" numbers to the "<<n<<"*2 array: "; for(int i=0;i<2;i++) { for(int j=0;j<n;j++) cin>>A[i][j]; } cout<<"\n\n\tThe Array you entered is: "; for(i=0;i<2;i++) { cout<<"\n"; { for(int j=0;j<n;j++) cout<<A[i][j]<<" "; } } for(i=0;i<2;i++) { sum=0; for(int … | |
I have tried this code but its not working....what I want is that when I click on "Available" hyperlink a popup form should be opened. I have copied the code below <? if($GotPro['available']==1) { echo ($GotPro['PropertyName'].":". '<a href="#" ><script type="text/javascript">window.open(<a href="checkavailability.php" ></a>)</script>Available</a>'); } else if($GotPro['available']==0) { echo ($GotPro['PropertyName'].":". '<a href="#" … | |
Is there a simple way to get a list/array of all the predefined colors? (without listing them all individually) ? It seems as though the colors are properties of the class "Color" rather than an enumeration. | |
Hi, Is it possible to take the input from a textbox that's in chinese (unicode) and convert it into hex to output to a text file? Any insight would be great, thanks! | |
Hello, I'm new on using PHP language and using SQL for database. and yesterday I stumbled upon using the column ACCOUNT_CODE on one of my table in my database as a reference to check if the user that will about to logged in have a premium membership or not.. my … | |
Hi guys i have a problem with my code :[CODE]#include<stdio.h> #include<string.h> #include <stdlib.h> #include <conio.h> struct blahblah { char id[11]; char name[30]; float gpa; }lol[100]; int main(){ int count = 0; char name [50][100] ; for(int i =0;i<=4;i++){ printf ("Student %d\n",i+1); printf ("ID: "); gets(lol[i].id); printf("Name: "); gets(lol[i].name); printf ("GPA … |
The End.