199,114 Archived Topics
Remove Filter ![]() | |
I have a ResourcePool class that uses generics. [CODE] public class ResourcePool<T> where T : class { bool isWrappable; int wrapIndex; int numberOfInvalidObjects; ValidateObject objectCheck; T[] objects; [/CODE] If I have multiple ResourcePool classes. [CODE] private ResourcePool<PlasmaAmmo> poolPlasmaAmmo; private ResourcePool<LazerAmmo> poolLazerAmmo; private ResourcePool<HappyAmmo> poolHappyAmmo; [/CODE] How can I store these … | |
I've learned c++ and understand most of it (There are a few parts i dont get but i just read over that again and i understand it). I have a book that has taught me the very basics of game programming. Its almost like reading the same book over again!!! … | |
I'm a newbie C# programmer, and I would like to ask for help on this error. I was trying to get a button to change its image when it is clicked, a task that sounds so simple, I know, but whenever I run the program and click said button, it … | |
I have a problem in posting form elements through ajax, what am i doing wrong? Can anyone help me please :( [CODE]<?php error_reporting(5); $uid = "username"; $tid = 500; $photoTiding = "true"; $picName = "picname"; $pid = "pid"; include('sample_db.php'); //displaying users pic and textarea to comment. $user = "SELECT pic … | |
Using nested for loops, how do I write a program that asks the user to input an integral number and then displays a diagonal line with that many dots on the console screen starting in the column? An input of 4 would display four diagonal periods, while an input of … | |
Ok I'm javascript newbie and I have to make script for displaying random images after click on dice picture. The problem is that the script shows only only 1 picture after the clcik and it won't continue with the next random images. [CODE]<html> <head> <script type="text/javascript"> function randomize(){ var delay … | |
anyone knows where i can DL it??...i just prefer video tutorials than ebooks..hehe | |
hi I am trying to add numeric text with [B]thousand seperater format [/B]in three textboxes. Problem is amount after thousand seperate get ignored i.e if text1.text is 1,250.00 text2.text is 3,500.00 and text3.text is 2,100.00 the result in text4.text is 6.00 instead of 6,850.00 Text4.Text = Text1.Text + Text2.Text + … | |
I've got a DropDown which I populate from a database. When an item is selected I want to redirect to another page with the selected id, but the problem is it passes "1" no matter what was selected. [code] protected void Page_Load(object sender, EventArgs e) { Populate(); } public void … | |
This bot has some common functions, along with some not so common. I've been using this code to text my wife from work when my phone dies. Requirements: [LIST] [*]Gmail account (for texting) [*]xgoogle (for lang translation) [/LIST] I know it is messy, and the variables are named poorly; sorry. … | |
Hi All.. I have developed a tool in C++ and I want to check the performance of the tool using [COLOR="Red"]callgrind[/COLOR]. For the first time I have executed my tool with different input sets and I have taken the number of instruction cycles as the referance for further usage. Following … | |
i know i need to post properly using (code) (block codes),, this is my understanding of that rule if i'm wrong pls teach me, i will abide. thank you I have been trying to get this code right for 4 days, i am losing hope. i know you'll understand me. … | |
this is my whole code hi NOrmR1 would you give me a hand mate please [CODE] import java.util.*; class Property { private String ID; private String description; private String location; private double weeklyRR; private char status ; private boolean visibility; public Property (String pID, String pDesc, String pLOc, double weeklyR … | |
I am using Xcode on a mac osx with c++ and std project, I get the following error when I try to compile Build OpenCLCpp of project OpenCLCpp with configuration Debug Ld build/Debug/OpenCLCpp normal x86_64 cd /Users/mohammadjeragh/Documents/MyResearch/OpenCLCpp setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/mohammadjeragh/Documents/MyResearch/OpenCLCpp/build/Debug -F/Users/mohammadjeragh/Documents/MyResearch/OpenCLCpp/build/Debug -filelist /Users/mohammadjeragh/Documents/MyResearch/OpenCLCpp/build/OpenCLCpp.build/Debug/OpenCLCpp.build/Objects-normal/x86_64/OpenCLCpp.LinkFileList -mmacosx-version-min=10.6 … | |
Are they any tool that can help build nice looking , easy to use installer, that will be strictly GUI based, no command line magic, for my end user for a programm I am building. If it is possible I would like to bundle inside my installation python and pygame, … | |
Was researching this but could only find how to use a datagrid which is displaying from a database? I currently have a for loop which goes through a 2d array and prints out all the things I want into a textbox but, what I want is to be able to … | |
Hi All, I need help. I want to make a background processing program. The idea is, the program will start in start up and every about 10 seconds the screen will pop up something. I wrote the code below. The program is starting when simulator begin. In console the timer … | |
I created a function wherein if a textField has no value/input, it will prompt an alert. However, the function is not working. Things I consider that makes it not work: 1) the "inp" variable 2) declaration at <form> tag 3) looping the all the textfields What do you think? Please … | |
Hello, I have a database where content (song lyrics) is stored in multiple languages. But now that i'm testing it some characters do not appear correctly. For example, when i'm retrieving information (searching anything), the letter ë appears as � (a special character square - in case it doesn't appear). … | |
I'm currently doing MIT Opencourseware's Practical Programming in C. I'm finding pointers a little bit confusing. Here are some questions: 1) int *pa=arr Suppose char * pc = (char*)pa; what value of i satisfies (int *)(pc+i)== pa + 3? [Answer:i=12] I get that the address is 12 bits down because … | |
How to read per row in a table in mySQL as the database? i want each username when they login, they will go to their respective forms. Like for example, there are 3 users and each user have their different forms. can someone help me with this... thank you! This … | |
I am using the following function to convert ascii to hex, but it is not working properly. [CODE]Private Function HexString(EvalString As String) As String Dim intStrLen As Integer Dim intLoop As Integer Dim strHex As String EvalString = Trim(EvalString) intStrLen = Len(EvalString) For intLoop = 1 To intStrLen strHex = … | |
Hi, I'm a student from Malaysia and I am trying to do a program where the program will run and then when it reaches a certain part, it will show a message and pauses the program until the user clicks done/continue/yes button at the message. Flow: Programme running-->Message-->"Please close all … | |
Hi, I'm a recent IT graduate, I want to upgrade my skills from what I learnt at college to the SQL Server 2008 platform. I want to also get certified with Microsoft, it seems a lot of companies are asking for this now. If you have gone through the certification … | |
[CODE]from Tkinter import * import tkMessageBox import pygame.mixer # create GUI window app = Tk() app.title("Head Frist Mix") sound_file = "50459_M_RED_Nephlimizer.wav" # start the sounds system mixer = pygame.mixer mixer.init() # create function def track_toggle(): if track_playing.get() == 1: track.play(loops = -1) else: track.stop() # create function volume def change_volume(v): … | |
Hi people, This is my first post here. It really is a nice community, especially for people who are not "qualified" programmers with the "attitude". I am a programmer by hobby and did not like being in any community previously. There are some really nasty folk. Great job guys! This … | |
Hi all, Not that great with javascript and need some help so thanks to whoever helps me out. Well I have run into a problem and cannot figure it out at all. I have a lightwindow inside a <p> tag inside a jquery slideout which is being called with both … | |
I want to crawl my gf's xanga's post into my computer for better reading but it require me to login before viewing the post I am wondering ,can python crawl this password protected webpage? I already have the id and password, because that is my id. the login webpage, for … | |
Basically I have a database and a form set up that enters information into the mysql database using php code. This works perfectly. The problem I'm having is writing a php sequence to send an email that confirms the user wanted to post the information. I would also like the … | |
Hi people, I am doing this funky bit of code where i have the coordinates of several points making a single line... did some work to join the dots and kinda get the equation of a line/curve (cubic/quadratic beziers). This part is pretty much functioning well.:cool: Now, where i want … | |
Is there anyone know how to use LIKE statement? | |
hey, thanks to all of them who helps me in learning this language, again there is one text file file 1.txt >[B]sp|P81928[/B][/B]|140U_DROME 67 198 Tim17 8.9e-19 No_clan >[B][/B]sp|P20905|5HT1R_DROME 179 507 7tm_1 1.1e-97 CL0192 >sp|P28285|5HT2A_DROME 243 805 7tm_1 3.2e-73 CL0192 >sp[B][/B]|P28286|5HT2B_DROME 107 588 7tm_1 7.2e-82 CL0192 * here the number represents … | |
Could anyone tell me what would be the code for this effect please. I want the code for a button effect The button is for a graphic button, on clicking it it changes its graphic to an ('on' image), plays a sound effect, then changes graphic to the first image('off' … | |
I want to get a ListView to display some items with a different color. I have been setting the forecolor of the item in the lv_SelectedItemChanged event, by using item.ForeColor = Color.Red; This all works fine, except that when the item is selected, it defaults to using the system norm … | |
Hi, I have a window and open another window with a button. Then, when the other window is closed I need to update some fields in the first one. Here's what I currently do: MainWindow: [code=python] ... self.connect(self.actionCustomFactors, SIGNAL("triggered()"), self.OnCustomFactorsTriggered) ... def OnCustomFactorsTriggered(self): self.customWin = CustomWindow(self.factorsFile) self.customWin.show() self.connect(self.customWin, SIGNAL("destroyed()"), self.OnCustomWinClosed) … | |
I need to register to a site programmatically and I used an object named webbrowser1 The problem is that there is some object with the same name in the web form like this [CODE] <p><input type="submit" value="Continue" [B]name="submit" [/B]style="width:250px;"></p> <input style="font-size:8pt; background-color:#221e1f; color:#e7e7e9;" type="submit" [B]name="Submit"[/B] value="Login" />[/CODE] so I can't … | |
I'm almost finish with my project that was made in visual studio 2008 using C#, so i want to ask this ahead of time. I want the project to be an executable file, this is my first time so how could I do it? One more thing, my form has … | |
![]() | Hey guys I've tried searching the internet for an answer on this and have come up short. I was hoping someone that does this could help me out setting it up. I want to write C++ using Mac OS. I tried going the Xcode route but found Xcode to be … ![]() |
Of the DB operations I came to is the [B]Division[/B] operation. I really tried to understand this operation from different sources but didn't get the idea of this operation. Can someone thankfully describe it or at least direct me to a source that explains this operation clearly? Thanks. | |
i want to delete an element of array structure to use it again to more understand look to the part of this code [CODE] struct patient { int ID; char name[100]; float age; char sex[7]; char adress[100]; char hometelephone[12]; char mobiletelephone[11]; char workingtelephone[12]; char date[12]; char time[13]; } patients[100]; void … | |
something like this: open red box with key or open red box to be broken down to open as .group("verb"), red box as .group("object"), with as .group("preposition"), and key as .group("indirectobj") my current pattern is [icode]"^(?P<verb>open)\W*(?P<object>\w*\W{1})\W*(?P<preposition>with|\Z)\W*(?P<indirectobj>\w*)"[/icode] it's not working, and i'm kinda out of ideas. | |
Here's the situation: I have a dictionary database. I use special characters in the pronunciation (like this: 'hə.lə.ba.lu). However, when I use a PHP script to output this data, the special characters get replaced with question marks. Like this: 'h?.l?.ba.lu I've read a lot on this topic, but I'm not … | |
![]() | Hi Guys I want to write a program that extracts links from a url and then adds them to a mysql database. I have found some nice examples ie [CODE=php]<? function getlinks($url) { $data=file_get_contents($url); preg_match_all('/(href|src)\=(\"|')[^\"'\>]+/i',$data,$media); unset($data); $data=preg_replace('/(href|src)(\"|'|\=\"|\=')(.*)/i',"$3",$media[0]); return $data; } //now to use the function echo "<xmp>"; var_dump(getlinks('http://www.google.com.au')); echo "</xmp>"; … ![]() |
Hi, I am working on a project and when I run my code, I get a segfault. I checked it with valgrind, and it says that I am trying to access a memory location that I maybe not malloc'd, stack'd or recently free'd. The only 'mysterious' thing I'm doing is, … | |
This is my two tables: [CODE] CREATE TABLE `subject` ( `id` int(11) NOT NULL auto_increment, `subjectName` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `subject` -- INSERT INTO `subject` (`id`, `subjectName`) VALUES (1, 'Maths'), (2, 'Science'), (3, 'English'), (4, 'Chemistry'); … | |
i have two entities. I want the data between them one to many and many to one. But not many to many.How can i implement this using ER diagram and then into relational tables. | |
Hello, I am getting a syntax error in the following code, any suggestions what I need to modify? Thanks "Script line: 7 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line … | |
Hi , I want to get a String from command line argument and add the values. [code] class Sample { public static void main(String args[])throws IOException { String Given_Id=args[0];//Getting input int Add=0;; int Store=0; System.out.println("The length of the String is "+Given_Id.length());//Calculating length for(int i=1;i<Given_Id.length();i++) { Add=Given_Id.charAt(i); Store=Store+Add;//Adding values } System.out.println("The … | |
Whats wrong with my program? class Hw7{ public static void main (String args[]){ String s = "Hello"; int v = String s; System.out.println(v); } } This is the error thats brought up: --------------------Configuration: <Default>-------------------- C:\Users\Stephane\Documents\JCreator Programs\Hw7.java:5: ';' expected int v = String s; ^ C:\Users\Stephane\Documents\JCreator Programs\Hw7.java:5: not a statement int … | |
Hi, I want to make a php validation for textbox which limit user to enter only character. i using following code [CODE]function validate_alpha($val) { return eregi("[^0-9]",$val); } [/CODE] if i type 123 it will give error. that is ok. but when i type keval123 it doesn't produce error. how to … |
The End.