64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Swiftle

Hey, I made a small program for the k-clusters algorithm. In the current state though, I'm unable to erase the position of the centers from the previous itterations. If I use paintComponent(g) my jPanel will move down to the right and I have no idea why. (as shown here: http://tinypic.com/r/2eba0j8/6 …

Member Avatar for Swiftle
0
2K
Member Avatar for minitauros

Hello there. I am kind of confused. In PHP I substract two unix timestamps from each other. The first: mktime(0, 0, 0, 10, 22, 2012) The second: mktime(24, 0, 0, 10, 28, 2012) For as far as I know the time difference between these two timestamps is exactly 7 days. …

Member Avatar for diafol
0
240
Member Avatar for Kyle Willett

Hi Im not sure if this question belongs in the form so sorry if it doesn't. Here is my question, in a cs class of mine we have to write a make file that compiles the two seperate programs in the project. The only problem is that none of the …

Member Avatar for Kyle Willett
0
251
Member Avatar for highonbikes

This is an assignment from school, I have spent a week bashing my head against the wall atrying to figure out how to get this to work. The program reads in a 'maze' or X's and stuff from, a file, and my functions are to fill a pre diminshied char** …

Member Avatar for Lucaci Andrew
0
153
Member Avatar for MWEB

Hallo! I would like to create a script to search a MySQL table (data). The table has two columns (ID & PRICE). Search must be done by ID and Price has to be displayed in the page, any ideas? Thanks in advance! PS: I've tried to modify [this script](http://www.phpjabbers.com/index.php?controller=FrontFrees&action=details&seo_url=mysql-table-search&page=4) but …

Member Avatar for MWEB
0
218
Member Avatar for breakid

Hi I have 2 Tables: CREATE TABLE IF NOT EXISTS `questions` ( `question_id` int(11) NOT NULL AUTO_INCREMENT, `createddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updateddate` timestamp NULL DEFAULT NULL, `active_flag` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`question_id`), UNIQUE KEY `id_UNIQUE` (`question_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `alarts` …

Member Avatar for ammonsutherland
0
263
Member Avatar for salford6129

I'm working on an assignment and I've run into a small problem. Our teacher wants us to read a line from a file containing three things we need sperated by a whitespace. I'm trying to figure out the cleanest way to read the line and then break it into the …

Member Avatar for TnTinMN
0
152
Member Avatar for AdLab

Hi Everyone, I'm trying to interpret some data from an embedded sensor device into a C++ program. The device uses a numerical format called 1.15 fractional format. This means it transmits 2 hex bytes into a value rangle of ~1 < n < -1. A full description of the format …

Member Avatar for AdLab
0
533
Member Avatar for mmcdonald

Hey all, I am currently using the following to echo the 1st Current_month: echo "1st '.date('F').'."; So that would say, for example, 1st October. What would I need to do to echo the next month? In this case 'November'? Thanks for any help!

Member Avatar for mmcdonald
0
114
Member Avatar for Goldfinch

Hi, I want to use PHP to take one image, draw another on top of it and output it as a single image. So it might for instance be that the first image would be of a duck and the next image would be of an x, so the third …

Member Avatar for pritaeas
0
84
Member Avatar for FUTURECompEng

Currently this method has a run time of O(N^2) and I am trying to get it to O(N). Any suggestion as to where I should start? public void removeAll(e removeNum) { node nodeToFind = this.find(removeNum); while(nodeToFind != null) { this.remove(nodeToFind); nodeToFind = this.find(removeNum); } } Thanks

Member Avatar for JamesCherrill
0
302
Member Avatar for s123456

spring model....i want to get the program to return the value of the period of the motion of the pendulum i have tried putting this outside the loop oldVelocity = vector(0,0,0) and this inside the loop before v: oldVelocity = m.v with print statement: if oldVelocity.y/m.v <0: print ("time = …

Member Avatar for s123456
0
437
Member Avatar for alyssa.wilkins.77

#include <iostream> #include <fstream> #include <string> using namespace std; const int numRows=5; const int numCol=7; void openfile(ifstream& , ofstream& ); void initialize(ifstream& , ofstream& ); void ave(ifstream& ,ofstream& , double , double,string ); void printout(ifstream& , ofstream& ,string ,double ,double ); int main(){ ifstream infile; ofstream outfile; string names[numRows]; double …

Member Avatar for dx9_programmer
0
332
Member Avatar for HunainHafeez

i am retrieving textual data from database on my page , asp.net(c#), now i want to save in pdf format and want to store that pdf file on my server(localhost) so how ?

Member Avatar for Mark-W
0
281
Member Avatar for charles.coogan

Dim num1, num2, sum As Double num1 = txtFirstNum.Text A variable input any number can go here num2 = txtSecondNum.Text A variable input any number can go here sum = num1 + num2 txtoutput.Text = sum My goal is to have the txtoutput show the equation 2 + 2 = …

Member Avatar for charles.coogan
0
105
Member Avatar for e.patricioparga

Well, I have a code that just won't run. It says it has a syntax error, but I've been looking at this code for 20 minutes and haven't found any. Could you guys plese tell me if something is wrong? // $anio holds the name of my table. $query="INSERT INTO …

Member Avatar for e.patricioparga
0
134
Member Avatar for kar0x

Hallo Im new in the game programming world with C++, really new! I want to make a 3D game.I installed today VS 2010 because I heard that there are unfixed errors(since 2005). I have a couple of books called " beginning C++ game programming" , "mastering Autodesk 3ds mask 2013"( …

Member Avatar for kar0x
0
170
Member Avatar for tapuwa2002

I would like to find a method where i can find a character position in reverse.For example last "e" starting count in reverse. From example $string="Kelley"; $strposition=(strpos,'e'); it will give me position 1.

Member Avatar for adam.adamski.96155
0
225
Member Avatar for PinoyDev

Good day! I just need a little help on how to create this program the precise way. Example if the user will enter 123450, it should output the sum of all individual integers, in the example the result must be 15. If the user will enter a character or a …

Member Avatar for JamesCherrill
0
153
Member Avatar for dancks

error: 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 1 Its valid sql I checked I just don't understand what would cause that error. I also tried different statements and …

Member Avatar for radow
0
376
Member Avatar for kalelovil

The code below should be extracting the pixel data from the mapProvinceFile bitmap specificed and placing it into a byte array, modifying some of that color data depending on the contents of a custom ArrayList, vertically flipping the image, and then displaying the resulting modified image in a new pane. …

Member Avatar for JamesCherrill
0
407
Member Avatar for nostalgia

Hello, It appears that I'm having a slight problem with a pesky ArrayIndexOutOfBoundsException when trying to assign a value to an array embedded within an object. I *think* it's because the array hasn't been instantiated before I try to add values to it's index. The purpose of the program is …

Member Avatar for richieking
0
224
Member Avatar for asaidi

Hi i have an htm created by ob_start--ob_clean (query from mysql) i can have more than 1 html each one for a user these htmls are converted to pdf using html2pdf and each file is called by the name of the cleint ex:if the user name is xxxx===>he will get …

Member Avatar for urtrivedi
0
464
Member Avatar for La:)

I am trying to write a program to generate hailstone sequences for different starting values of n and have achieved this. Now however, I am trying to find the average length of the sequences and what the longest and shortest sequences are in the range(5,1000)and am not sure how to …

Member Avatar for abc0502
0
1K
Member Avatar for johndohmen1963

Who can help me with the following i have 5 or more rows in a table the last column is called rank one row is called points. I want automatic insert the rank like when a person has 123 points is rank 1 the second person with 120 point rank …

Member Avatar for johndohmen1963
0
144
Member Avatar for vegaseat

[B]Intro[/B] C is using structures to group data, mostly data that belongs together. Here we have some data that a campaign manager might keep for the volunteers. First we take a look at the C code: [code=c]#include <stdio.h> struct person { char *name; char *sex; char *slogan; }; int main(void) …

Member Avatar for georgooty
0
767
Member Avatar for daino

I'm trying to build libpng which has worked up to a point. I'm using Windows XP, and have a MingW compiler. I also have MSYS installed and am using it to configure libpng. The issue I'm having is that libpng can't find zlib. I've tried every variation under the sun …

Member Avatar for daino
0
1K
Member Avatar for zygimantelis

I creating a test program for TKinter, and getting some errors :( from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Entry(frame, text="Hello", command=self.say_hi) self.hi_there.pack(side=LEFT) username = StringVar() name = Entry(frame, textvariable=username) name.pack(side=LEFT) print name.get() def say_hi(self): …

Member Avatar for Schol-R-LEA
0
1K
Member Avatar for Some Dude

Alright, so I need some more help. This time, the problem is not inherently in the code (Though I've had trouble with that thus far too). I am currently playing around with open and close file dialogs trying to get what seems to be an out-dated "GetOpenFileName()" function to work. …

Member Avatar for Some Dude
0
645
Member Avatar for Elixir42

Hi I am setting the sampler states initially then setting them on the fly with keypresses that I know runs but I dont see anything changing. Am I missing something. Can I just call SetSamplerState(...) anytime or do I need to call something after? static bool bToggleH = false; static …

Member Avatar for Elixir42
0
230
Member Avatar for hwoarang69

i getting error on getdocumentbas(). is there a easy way to display image on screen??? public class Player { private Image mario; public Image getPlayerImage() { return mario.getImage(); } public void init() { mario = new Image(getDocumentBas(),"Image/player_walk_right.GIF"); } public void paint(Graphics g) { g.drawImage(mario,x,y,this); } }

Member Avatar for hwoarang69
0
189
Member Avatar for freakvista

So i was wondering if it is possible to make something <a class='photo' href=<?PHP 'lala.php?blu=$q&subf=$subf&img=$imagenr' ?> target='_blank'> <span><img src=<?PHP'{$handle}/{$file}'?> /></span></a> lala.php is already made with all needed, but when i'm trying to make something with this code it doesnt show up the photo. I named class photo so i can …

Member Avatar for freakvista
0
176
Member Avatar for JokerAce89

Im currently a student having degree in Computer Science. I had learn Java, C language, SQL, asp.net, javascript and html. In my course structure, I had learn AI, algorithm analysis, database system, object-oriented programming practices and etc. Im interest in forensic things and I want my final year project is …

Member Avatar for kathirvelan
0
634
Member Avatar for barrelr0ll

Hey there, so I recently joined an online course, and the first mini-project is to create rock, paper, scissors, lizard, spock. upon testing my program it seems I've got an error in my code and I can't for the life of me figure it out, I was hoping you guys …

Member Avatar for barrelr0ll
0
95
Member Avatar for furlanut

I need one result from 3 tables. The JOIN query fields of the first table repeat throughout the 3 tables. Is the JOIN query set out incorrectly or do I have to re-define the $row index in some way to avoid repetition of the fields. I have been using 3 …

Member Avatar for furlanut
0
181
Member Avatar for LastMitch

Hi I having issue trying to add `2` months from the `date()` function? Here is my code: <?php // current date $todayDate = date("Y-m-d"); echo "Today: ".$todayDate."<br>"; // Two months from now is Christmas! echo "strtotime($todayDate) . "+2 month")"; echo "Today is Christmas: strtotime('l dS \o\f F Y', $todayDate)"; ?> …

Member Avatar for LastMitch
0
164
Member Avatar for mmcdonald

Whats the best way to collect all the users where `server_id = X` Table: id server_id user 1 2761 adam 2 2567 tom 3 2761 luke 4 2761 mike 5 2346 lucy So what should I do to echo all users where `server_id = 2761`? What output should look like... …

Member Avatar for diafol
0
147
Member Avatar for bprosic

Hi, I have datetimepicker and next to datetimepicker is textbox. When I choose date from datetimepicker, selected date goes into textbox. Works fine. -- txt1.Text = Format(DateTimePicker1.Value, "dd.MM.yyyy") Problem is, when selected date from datetimepicker is shown in txt1, that date doesnt want to be saved into database. Database is …

Member Avatar for bprosic
0
2K
Member Avatar for rotten69

I'm using jQuery for mobile and making the app show users a dailog box to let them enter their credentials when they want to log into the app. Ok. it redirects them to the home page but the url stays as mysite.com/login.php rather than mysite.com/index.php This removes the menu bar …

Member Avatar for rotten69
0
168
Member Avatar for romiaujla

This is a part of the question of my assignment and i am facing problems on how to access the array in a function. Write a function that finds the 2nd minimum value among the given data items of float type, and returns the 2nd minimum. You should use pointer …

Member Avatar for romiaujla
0
216
Member Avatar for showman13

OK, this may sound like an odd request, but hopefully someone can help. I have always developed scripts behind webpages that were 800 wide so they would fit on basically any display. The one I'm working on now I have designed for 1200 wide because I just needed more space. …

Member Avatar for showman13
0
92
Member Avatar for FUTURECompEng

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that …

Member Avatar for jalpesh_007
0
307
Member Avatar for anandschiru

import javax.swing.* ; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.Calendar; import java.util.*; import java.text.*; import java.util.Date; /* <applet code="gui.class" width=250 height=100> </applet> */ public class gui1 extends JApplet implements ActionListener { JTextField t1,t2,t3,t4,t5; JLabel l1,l2,l3,l4,l5,l6; JButton b1,b2; Calendar c1,c2,c3; JPanel p,p1,p2; Date sd,sd1; SimpleDateFormat sdf; public void init() { …

Member Avatar for anandschiru
-1
281
Member Avatar for tapuwa2002

I have a csv file with data I would like the data to be filled in the empty spaces. then export to excel file or into a database for example. I would like the first column to copy the first Product A to fill the other spaces For example Type …

Member Avatar for LastMitch
0
928
Member Avatar for randomkid73

As stated in the title, I'm trying to load a single row of user information into an array, preferrably associative. Here's what I have so far: function load_User_Info($id) { $parameters = array(); $results = array(); $query = "SELECT * FROM users WHERE User_ID=$id"; $stmt = $this->conn->prepare($query) or die('Error preparing query'); …

Member Avatar for randomkid73
0
2K
Member Avatar for eburlea

Hi. In March current year I started learning html, css, php, mysql, and a month ago started with Javascript. I have a webpage that I am working on to have practical tasks for finding solutions to them. I have created a Javascript code that colores the rows of a table …

Member Avatar for eburlea
0
252
Member Avatar for Stuugie

Hi all, I'm about to get a little long winded here and I'm sorry for that but I have a couple of issues that I need guidance with. I have assembled a procedure that basically performs a bunch of web browser clicks to query Statistics Canada (SC). The query itself …

Member Avatar for Stuugie
0
533
Member Avatar for eburlea

Hi. I have a javascript code inserted before closing tag </body> that is meant to change the color of a table row when the mouse is placed over it. It works only when I remove the css file. Please advise what is the problem, I need them working together. The …

Member Avatar for eburlea
0
221
Member Avatar for Stuugie

Hi all, I have the following procedure that connects to my database. Sub getDateModified() Dim fileCreatedDate As DateTime = File.GetCreationTime(strFilePath + "\CPI1.csv") Dim stmt As String SQLConn.ConnectionString = ConnString SQLConn.Open() stmt = "select Table_Numbers From tblRelease_Dates Where (Release_Date Between '" + fileCreatedDate + "' And GETDATE())" SQLCmd.Connection = SQLConn SQLCmd.CommandText …

Member Avatar for Reverend Jim
0
166
Member Avatar for NYCRAVEN

I have written a VB reservations program that writes back to a SQL 2008 database. When I write the reservation event back to the data base, I also write the reservation 'end time' back to the database as reservationtime + 4 hours in order to block off the event resource. …

Member Avatar for NYCRAVEN
0
371

The End.