43,549 Solved Topics
Remove Filter ![]() | |
I'm doing active rendering for a game, and I was wondering,,, Does drawing outside a canvas still use just as much CPU? As in, If I draw one rectangle, and then draw another outside the canvas, does it ignore the other rectangle, or waste CPU on it? I want to … Software Development java | |
Hello there! I am new to Java and DW, though I usually find great help already here! Say I need a constructor that accepts [COLOR="red"]variable number of parameters[/COLOR] up to 2 parameters, but if I pass only one parameter to this constructor, both parameters will take this number, and if … Software Development java | |
Hi, I've been working on this for two days. I need to pass an arraylist to another class. It gets the information, and will print out the menu, until the program goes back to the initial class, then the list empties. I don't get it, and I'm so confused. [CODE]public … | |
I making a game that would use multiple canvases drawing on one canvas then switching to another... is there any way to get a new canvas and be able to restore the old canvas with the drawings still on it? | |
Hi, Is it possible to write and compile a cross-platform C++ Program in Visual Studio (C++) Express or Professional? I only ask this question (before starting on a big project) because I would like to support other platforms without changing my coding environment, if you get what I mean. Kieran … Software Development c++ visual-studio | |
Hi! How should I change the TableModel that extends AbstractTableModel to allow displaying empty data sets? Should the getValueAt method be chaged as follows? [CODE] public Object getValueAt(int row, int col) { Object str = ((Object[]) cache.elementAt(row))[col]; if (str != null) return str; else return ""; }[/CODE] ...or something else … Software Development java | |
Hi! how could I delete all spaces in the string: [ICODE]String str = "AAA BBB CCC";[/ICODE] in order to get "AAABBBCCC" as a result? The following doesn't work: [ICODE]str.replaceAll(" ", "");[/ICODE] Thanks! Software Development java | |
Hello! Now I have written a function for numbers over 3999: if arabicnumber<=3999: print arabToRom else: parenthesis=0 while (arabicnumber)>3999 arabicnumber/=1000 for i in range (parenthesis... etc and i compare all the numbers that i write in so if i write like 5560 it pirints out ( V ) and the … Software Development python | |
Hi I have a saved file like: name - item1 - item2 -item3 name - item1 - item2 -item3 so on .... Now i want to get like item1 to display in combobox. How can i do it?? Thx Software Development | |
Hello, I am parsing a rebase file and using different subroutines from the BeginPerlBioinfo module. I have used the subroutines I think I need but I keep on getting the message"use of initialized value $site in concatenation or string <$fh>. [CODE]use strict; use warnings; use P4; # Declare and initialize … Software Development file-system perl | |
Hi! I'm new at python and I don't get the while statement. I'm trying to make a simple function that returns each term of a geometric progression 'til 'n'. [CODE]def gp(a1,r,n): while not n == 0: n = n - 1 an = a1 * (r ** n) return an[/CODE] … Software Development python | |
Hi! I'm making a program that uploads my game to an Ftp server but when the data is compressed something goes wrong and I end up with an array of zeroes. Here's my code: [CODE] FileStream filestream = File.OpenRead(file); byte[] filebyte = new byte[filestream.Length]; filestream.Read(filebyte, 0, filebyte.Length); filestream.Close(); //MemoryStream inS … Software Development file-stream | |
Hello folks, For my final project I decided to write an online poker game. Long story short I'm having trouble with a class I wrote to manage java.net.Sockets. The source for this class is: [CODE] import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.util.Iterator; import java.util.LinkedList; public … Software Development java open-source | |
Hey all. I find myself having some issues with parent and child communication. What I have been asked to do is create a MDI program with many children. I was able to get that part working great but then the kicker was brought in that the if the focus changes … Software Development | |
I would really need some help :( Write a recursive method, as a parameter to accept the folder name (absolute or relative to the current folder) that prints lists of all the files and all folders in the folder, which is given in parameter, and displays all folders in all … Software Development python | |
**CHANGE PANELS IN TITLE TO Grid Layout I first want to apologize for filling the board with a noob question but I don't know how to phrase my question on google. So here we go! My prof has us working on GUI programming. I am trying to split up my … Software Development gui java java-swing | |
I tried this class a couple of different ways and I had it print just memory location I think one way now I have an error that says: Traceback (most recent call last): File "F:\Python_Stuff\CSC143-901\Lexicon.py", line 83, in <module> source = Lexicon.OpenFile('word') TypeError: unbound method OpenFile() must be called with … Software Development file-system open-source python | |
Good morning, I'm learning some basic programming and fundamentals and I am having a hard time troubleshooting why a certain part of my code is not working. In my "calcTotal" function, my If, Else statements do not seem to be working. The program runs through, but the output is always … Software Development python | |
Hi friends, I'm having problems to use 2 consecutive "cin.get()". The second get() is not been accessed. But if debug I can answer the name of second file. Can you help me? Cheers, Sads [CODE]cout << "\nEnter the name of the first FILE : " << endl; cin.get (FileName1,256); cout … Software Development c++ | |
HI all, Normally I've been lucky to find someone who has had the same problem and applied their solution but after hours of searching I'm not able to find a solution to this one. I've got a FormView which is default mode set to Insert. When the page is loading … | |
"Why does this not compile?" [CODE]int main(){ struct people{ char name[20]; short age; } people; struct people me; cout<<"Write your name"<<endl; gets(me.name); cout<<"How old are you"<<endl; gets(me.age);//error }[/CODE] Software Development c | |
Hi, I am using VB 2008 Express to connect to an Access 2007 database. I have a combo box called SelectYearMonth that is populated by the database. When I used the Access report VBA, I used the AfterUpdate() event to calculate a sum. I need to know how to do … Software Development vb.net | |
Hi friends, I'm newer in C++ and I'm trying write a code using ifstream, vector and substr. A) I have 2 problems: A.1) When I read files with small number of lines OK, but if I increase the number of lines, PROBLEM. As example: file1.txt (Work well with 9 lines, … Software Development c++ | |
I have a simple class that creates unique ID numbers: [CODE] public static class ID { private static int iD = 0; public static int GetNextID() { return iD++; } } [/CODE] If I want each instance of an abstract class to automatically get a new non changeable ID when … Software Development | |
Hi guys, i have a String time 23:00, how do i subtract it against a String today's time and get the remaining minutes? do i parse the String into a date type? any ideas is appreciated, thanks. [CODE] public String getTime() { SimpleDateFormat sdf = new SimpleDateFormat("kk:mm"); Date s = … Software Development java | |
Hi guys. I've just installed libnetty-java package on my ubuntu $ sudo apt-get install libnetty-java and then try compile this code [CODE] import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelUpstreamHandler; ... [/CODE] It throws this error: javac QuoteOfTheMomentClientHandler.java QuoteOfTheMomentClientHandler.java:1: package org.jboss.netty.channel does not exist import org.jboss.netty.channel.ChannelHandlerContext; ^ QuoteOfTheMomentClientHandler.java:2: package org.jboss.netty.channel … | |
hello everyone, i need a tips about "search coding" im using adodc connection: [CODE] Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistempengurusanrumahsewa.mdb;Persist Security Info=False" Adodc1.RecordSource = "Select * from Owner" Set DataGrid1.DataSource = Adodc1 [/CODE] im trying to make "search" button to search a Name in my datagrid1. can anyone … Software Development visual-basic | |
Hi, I am developing a new Application and am getting the below error Error Description: When I click the record in DataGrid, then the values should be populated from DataGrid columns to respective Text boxes. However if i click in the datagrid when there is no record then there should … Software Development open-source visual-basic | |
Hi I am displayed a HTML file in web browser. Now i want to edit the matter which are displayed in web browser. e.g. font style ,color etc. I am used vb.net 2008 Can anybody help me! Software Development vb.net web-browser | |
Hi I am trying to compile and run my prog3.c program, but I am getting the compiler errors below. I have tried to reference the information by doing #include "node0.c" etc., but no luck. Any ideas on how to fix this problem? I attached the files below that I am … Software Development c | |
I am using Windows XP 32-bit, VC++ 2008 with OpenGL and the Windows API. When I run my program, it seems to work fine, but whenever I click anywhere on the title bar of the window, the program exits. I have no idea where to start to look for the … Software Development api c opengl windows-api | |
Hi is there an accepted way to calculate the number of times a specific day would come round in a given timespan? For example if we have 32 as a variable that represents the number of weeks I would then need to find out how many times the first of … Software Development | |
hello all i m new to shell scripting.i have seen th code substitution like a=`ls -l` and a=23 R=$(a/23/bb) first time we use ` ` and second time we use $ . can anyone tell me Why so? Software Development shell-scripting | |
Hi, I have am building an uninstall program and can't get the process to stop so that the files can be deleted. I am using code that I copied from a sample and it works fine with any process as long as there is no space in the name. works … Software Development vb.net | |
Hello, My assignment is to create a christmas tree using methods with defined parameters. 1) Print the tree at position 50 (50 spaces in) 2) Call the following Triangle (2,6) (six rows without the first 2 printed) 3) and the 1st row of these cut off triangles with the symbol … Software Development java | |
Hi! Could someone please explain me the difference between the following three approaches to inserting nodes in JTree? I cannot understand why the insertNodeInto method doesn't work in the recursive procedure (Approach Nr1), but it works if it is executed from JButton (Approach Nr2). So, Recursion itself (Approach Nr1) works … Software Development java | |
if been using python's tkinter for awhile to write programs when I caused an issue that I'm not sure what is my code is long even after I gutted it. [CODE]from Tkinter import * import random import operator info_dict = {} info_dict["area"] = 1 info_dict["slime_spot"] = random.randint(1,36) info_dict["slime spotter"] = … | |
Hi, everyone this is my first post here and let me tell you my problem I have a C# application, i have SQLServer 2005 installed on my computer my database is there and the program works fine the problem I'm facing is that i need to make an installer for … Software Development c c# c++ client-server sql | |
so i am creating this message field with [CODE]self.text = wx.TextCtrl(panel, pos=(150,22),size=(100,20))[/CODE] and it works, no problem but i'd like that the text gets written from the right and not the left which is a pain... anyone have a slight clue on how to do it ? help appreciated :) Software Development python | |
I am very new to C++ need to draw rectangle "JUST THE BORDER" using for loops, the below code draws three sides but i am not able to draw the right side line please help if anyone can. #include <cstdlib> #include <iostream> #include <string> using namespace std; int main(int argc, … Software Development c++ | |
Hi all professionals, I uesd subprocess module to spawn a new process and then implement the command. The final result is the output via stdout. Here is the code I wrote: [CODE] import subprocess proc = subprocess.Popen('egrep '^HTTP/' *', shell=True, stdout=subprocess.PIPE,) stdout_value = proc.communicate()[0] print 'results:' print stdout_value [/CODE] And … Software Development python | |
Hello, I would like to know if I need to use a regular expression to match the desired substring in order to print out 10 characters of the start codon ATG. My dna sequence is "CATAGAGATA" Thanks for any advice. Software Development perl | |
the file looks like: 11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes 13.54 17.83 12/02/2010 S 5140 5 How can I extract out "2907" from file using >>? i think its myfile >> then something. #include <iomanip> #include … Software Development c++ | |
[CODE]#include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const; {return title;} [/CODE] [ICODE]error code C2059(syntax error: '{' ) and C2334(unexpected token preceding '{' skipping apparent function body occur [/ICODE] [CODE]double getPrice() const; {return price;}[/CODE] … Software Development c++ | |
So I have the y and e endings down, just need some help with the middle. Basically, I need to double the last letter before adding er if: the last letter is b,d,g,l,m,n,p,r,s or t and the second to last letter is not the same as the last letter. [CODE]def … Software Development python | |
hello someone out there...help me with algorithm to determine range of marks!! here is my code so far [ICODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> struct stumarks { int studentid; int progassn; int lab; int test; int exam; char seperator; double finalmark; } stumarks[9]; using namespace std; int main() … Software Development c++ | |
Hi I am trying to compile and run my prog3.c program, but I am getting the compiler errors below. I have tried to reference the information by doing #include "node0.c" etc., but no luck. Any ideas on how to fix this problem? I attached the files below that I am … Software Development c++ | |
pls check my database design and give comments. i'm a newbie database designer i dont have any experience, i've researched on the net but i think it's not enough. here's my ERD: [IMG]http://i43.photobucket.com/albums/e355/bettybarnes/asas.jpg[/IMG] Software Development database-design vb.net | |
hi, so i've been looking for a string matching algorithm that gives me a "rating" based on how close the 2 strings match.. luckily, i googled and read this article: [URL="http://www.catalysoft.com/articles/strikeamatch.html"]how to strike a match[/URL] here's the original java class code [CODE=java] package strike_a_match; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; … | |
btw any tutorials out there on how to create database with vb.net with mssql just to let me get started, i was hoping for a simple db to practice on like id,name. ive made db with php and mysql but vb.net is a bit far from php and mysql though … |
The End.