199,124 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jkrueger

Hi Am trying to get my head around using with in some code which is putting 2 files together using random.choice. How do I prevent repeats with random.choice? [CODE]with open(name, "r") as f1: beginnings = [word.rstrip(" \n") for word in f1] with open("conjunct.txt", "r") as f2: endings = [word.rstrip(" \n") …

Member Avatar for jkrueger
0
258
Member Avatar for eman 22
Member Avatar for gedas

hey, i have been trying to sign jar file in order to use my applet to connect to mysql database. i am using netbeans and i have been looking for the turorials how to sign jar file but all of them tend to skip steps and i am not sure …

Member Avatar for Ezzaral
0
106
Member Avatar for SeanC

Hi all, I'm currently trying to solve a problem with a JList. I've got an actionPerformed event applied to the JList (also tried the item updated event but it has the same effect), and whenever this event is fired, (i.e. the user makes a selection), something happens. Now, the problem …

Member Avatar for Ezzaral
0
406
Member Avatar for WigglesMcMuffin

Hey, I have trying to build a large hierarchical tree of all sorts of creatures in Python by using class inheritance. However I seem to have been halted before I can even get anywhere. I created my first base class: [CODE=python] class Creature(object): def __init__(self): self.hitPoints = 100 self.legs = …

Member Avatar for WigglesMcMuffin
0
187
Member Avatar for nory22

Am trying to make this program in c which draws the following [CODE]\\* * * \\** *** ** \\*** ***** *** \\***************[/CODE] if the user in puts 4.... ((need help)) i only want to use the nested for loop and the if else statements so please need help that's what …

Member Avatar for Narue
0
114
Member Avatar for osirus0830

I am currently attempting to teach myself C++ so I don't have the benefit of a prof or TA. The question at the end of the chapter that I'm working on wants me to create an array of structures and to initialize the array of structures using the new function. …

Member Avatar for osirus0830
0
184
Member Avatar for Sydney123

Hello there I have a script for creating 3 dependant drop down menu Selection A in 1st drop Down returns Selection B in 2nd drop Down which returns Selection C in 3rd and final drop down To C I would like to attach a string of 3 value ( prices …

Member Avatar for Sydney123
0
113
Member Avatar for yirax

Hi everyone, glad to be here... BTW, this is my first post... please i need help on this Write a function that is given a list of students' grades (on a scale from 0 to 100), and returns the number of students who have an A in the class (grade …

Member Avatar for yirax
0
82
Member Avatar for Geertc

Hello, I have a problem with htmlentities(). I 'm missing something here, but I don't know what it is. In my webpage, which is set to utf-8, the result of [CODE]echo htmlentities('éè')[/CODE] is [COLOR="Red"]éè[/COLOR]. Why isn't the result [COLOR="Red"]éè[/COLOR] ? Thing is : I want to put the name 'Hélène' …

Member Avatar for Geertc
0
330
Member Avatar for zuko9215

Hey guys i d like to pick your brains about something.. Suppose i want to create a database for storing, lets say computer stuff, parts, hardware, peripherals etc.... Which way would be better? 1 ------ Create a Basictable with all the common fields (like ProductName, Price,Guarantee....) and then create multiple …

Member Avatar for AdeelM
0
147
Member Avatar for ninjatalon

Today I was taught about virtual methods but got lost somewhere in the pointers. Here is an example [CODE] class Person { protected: string name; public: virtual string get_name() { return name; } }; class TFaculty:public Person { private: string title; public: virtual string get_name() { return title + " …

Member Avatar for Fbody
0
143
Member Avatar for amit.hak50

I have the below code [CODE]<script="text/javascript"><a href="costs_prices_rates_book_editing.php" onmouseout="turnoff(´pic2)" onmouseover="lightup(´pic2´)"> <img alt="Get a FREE Book Editing Sample" name="pic2" src="images/pricequote.jpg" style="border: 0px solid; width: 215px; height: 51px;" /></a></script>[/CODE] What is happening ? when I try to save onmouseover="turnoff'pic2'),the system is not able to save the file and the changes remains unchanged and …

Member Avatar for diafol
0
124
Member Avatar for Mike Bishop

i have the following code which works fine where there is data in the table. when the table is empty and there is no data in the @Ctotal varible i get my error MessageBox.Show("Unable to get Claim Total") is there anyway i can ignore this if there isn't a value …

Member Avatar for Unhnd_Exception
0
88
Member Avatar for magravis

Hi! I am trying to make a program, where it opens a text file. If it reads, for instance the "UP and the 2 #s after" in the file, it will print, on the same line (with the data) a result of another #. for instance: (command, code, and code2 …

Member Avatar for WaltP
0
118
Member Avatar for rohit b k

hi guys.. in my project i am storing some data in database in a varchar field with field length 255 characters. i want to extract only few of these characters that are stored in database.. please help me how can i do that..

Member Avatar for diafol
0
132
Member Avatar for SMITA6076

I wrote the following method to get the current date for an invoice: [CODE] public String getDate() { DateFormat dateFormat = new SimpleDateFormat("MMMMMMMMM d, yyyy"); Date orderDate = new Date(); return dateFormat.format(orderDate); }[/CODE] but now I have to add two weeks (14 days) to that date (to get the expected …

Member Avatar for SMITA6076
0
922
Member Avatar for vineeth vs

is it not enough to declare the struct variables as shown?? getting error that some are undeclared pls help... insertion on a binary search tree....[CODE][/CODE] [CODE]#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *lchild,*rchild; }*ptr,*new; void insert(int item,struct node *root) { ptr=root; while(ptr!=NULL) { if(item>ptr->data) { if(ptr->rchild!=NULL) insert(item,rchild); else …

Member Avatar for Narue
0
246
Member Avatar for Kath_Fish

hey..now i want to split my output to vertical form.But my output got no any space.So how should i split it to vertical form. output now: 212132134214 i want split to 2 1 2 1 3 2 1 3 4 2 1 4 Hope someone can help me...thanks ya...

Member Avatar for Momerath
0
91
Member Avatar for darkelflemurian

Hello everyone, I have the following situation: The computer i use to develop sometimes is getting very slow and the ram memory goes to 100%. I want to know if using visual basic 6, or visual basic net, or visual basic script, there is a way to clean ram memory, …

Member Avatar for jlego
0
112
Member Avatar for Clinton Portis

I was just wondering if ya'll knew of any dictionary libraries that I could include in one of my c++ projects. A quick google & forum search have offered solutions in other languages, such as python and c# but have seen nothing specific for c++. Thanks in advance. -d.w.

Member Avatar for Narue
0
110
Member Avatar for feedz87

Private Sub MDIForm_Load() show Me.BackColor = &H80000005 HideTBButton "", True frmShortcuts.show CrystalReport0.Connect = "westranet.westham.com.my" & ";UID=sa;PWD=123;DSQ=WMS_TEST;" **Error point on Connect

Member Avatar for samsylvestertty
0
247
Member Avatar for Swift2

Currently I have this code: [CODE]if any(w in itemname for w in ("Password","User","Server")): entry.setvalue(myutils.password_recover(itemvalue)) [/CODE] And I want "E-mail To" to also be a string next to "Server" .. However, if I add "To" then it picks up EVERYTHING that has the letters 'to' . If I add "E-mail To" …

Member Avatar for Swift2
0
84
Member Avatar for lu25

i have a file that contains hexadecimal values and i want to convert them to int how do u do that exactly?? [CODE] import java.util.Scanner; import java.io.File; import java.io.IOException; public class CacheSimulation { public static void main(String args[]) throws IOException { int hexAdd [] = new int [32]; //array to …

Member Avatar for Slyvr
0
180
Member Avatar for Robert955

Hello, Im trying to install XNA 3.1, I have visual studio 2008 professional and I really need 3.1 (not 3.0 or 4.0) also I cant use visual studio 2010. Ive uploaded all the logs here: [url]http://cid-598c7218de9e79e1.skydrive.live.com/redir.aspx?resid=598C7218DE9E79E1!123[/url] Thanks in advance! Robert.

Member Avatar for Robert955
0
325
Member Avatar for caltech

Here are my error messages: [INDENT]! "printStock(int, int)", referenced from: _main in main.o _main in main.o ! "Sales(int, int, double)", referenced from: _main in main.o Symbol(s) not found[/INDENT] Here is my code: [CODE]#include <iostream> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void printStock(int,int); double Sales(int,int,double); int main () …

Member Avatar for caltech
0
131
Member Avatar for ram.patil

1. .......Algorithm to find the first n Hardy-Ramanujan numbers.... since 1729 is the least ..... I request to post the solution for this............

Member Avatar for TrustyTony
0
2K
Member Avatar for Ksadler818

Below is my home work problem. I don't want the answer, I am just looking for an example of how I can count the occurance of each number in the array numbers and assign that value to the count array. Thanks for your help!!!!!! *---------------------------------------… * Sample Output: *** start …

Member Avatar for WaltP
0
195
Member Avatar for atticusr5

I am not sure what I have done wrong. Essentially I am searching an array for colors. If there is no input, on button click you get an error. If the color does not exist you get an error. If it exists then it tells you. The latter two events …

Member Avatar for abhay1234
0
69
Member Avatar for umeshMCA

hi i have a php dropdownlistbox (select button of html) which having three values on is all and second is activated and third one is deactivated. i want when use select all then show all values of database and when user click on activated then show only activated values and …

Member Avatar for diafol
0
220
Member Avatar for nigelv1

Please help. Im having trouble displaying the checkbox's text in the listview form. It only display's the text of the 1st checkbox. I cant seem to display the remaining checkbox.text. It only display's the 1st checkbox in my ListView form. I have another form for ListView.vb Here is the code: …

Member Avatar for codeorder
0
105
Member Avatar for lxXTaCoXxl

Okay, I have a menu Item that I only want to be enabled and visible if the user activates it through encryption key. My menu item is on a separate form than the encryption analysis and I can't figure out why it won't enable the item. It will pop up …

Member Avatar for lxXTaCoXxl
0
85
Member Avatar for Mars1936

Is it possible to check a random query against another table through php? Say I pull a random query from table A and then transfer it to table B. Then I pull another random query from table A. Is there a way to check the 2nd random query against table …

Member Avatar for Mars1936
0
319
Member Avatar for Nfurman

Hello, My code is: [CODE] protected void Button1_Click(object sender, EventArgs e) { string EducatorName = tbEducatorName.ToString(); string Educatorfamilyname = tbEducatorFamilyname.ToString(); int Hisclass =Int32.Parse(ddlClasses.DataValueField.ToString()); SqlConnection conn = new SqlConnection(DBconn); SqlCommand cmd = new SqlCommand("AddNewEducator", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "AddNewEducator"; cmd.Parameters.Add("@EducatorName", SqlDbType.VarChar).Value = EducatorName; cmd.Parameters.Add("@Educatorfamilyname", SqlDbType.VarChar).Value = Educatorfamilyname; cmd.Parameters.Add("@EducatorClass", SqlDbType.Int).Value …

Member Avatar for Nfurman
0
104
Member Avatar for narekm

Hello there..While installing Joomla i am facing this problem...These are the requirements [CODE] Directive Recommended Actual Safe Mode Off Off Display Errors Off On File Uploads On On Magic Quotes Runtime Off Off Register Globals Off Off Output Buffering Off On Session Auto Start Off Off [/CODE] As you can …

Member Avatar for narekm
0
175
Member Avatar for PaulBird

[IMG]http://i1187.photobucket.com/albums/z394/crazythang/photo-1.jpg[/IMG] i try to compile a simple c++ hello world, and i get this, PLZ HELP i compile with g++...

Member Avatar for rubberman
0
308
Member Avatar for ahsan1

Error is: Warning: Invalid argument supplied for foreach() in D:\wamp\www\greenmusic\admin\sec.php on line 269. Code is: [CODE] <?php if(isset($_REQUEST['action'])) { echo $values=$_REQUEST['check']; foreach($values as $id) { $mdelete="DELETE FROM songs WHERE id='".$id."'"; mysql_query($mdelete); } } ?>[/CODE] Can anyone help me. I'll be thankful to you.

Member Avatar for Ezzaral
0
313
Member Avatar for iamthesgt

I am working on a VideoServer for my company, and in making the cgi files for the Web interface, I came across the following error: " invalid conversion from ‘int’ to ‘VideoOutputMode‘ " This was from line 4 of the below code, in the WebInterface file: [CODE]form_iterator vout_mode = formData.getElement("DisplaySettingsVOutMode"); …

Member Avatar for iamthesgt
0
3K
Member Avatar for kanio

Hello, i'm exporting mysql data to excel with php-excel library ([url]http://code.google.com/p/php-excel/[/url]). I don't know how to print new line in excel... i try "\n", "CHAR(10),"NEWLINE" without success. I have all exported data in one line, but i want to have each row in new line. Here you can look at …

Member Avatar for Wraithmanilian
0
2K
Member Avatar for manofhouse

Trying to convert from binary to hex but for some reason it keeps bringing up the error instead of the output [CODE] #include<iostream> #include<string> #include<cmath> using namespace std; void BintoHex (int[]); bool CheckBin (int[], bool); void Hexadecimal (int[]); string hexadecimal; void main() { int bin[4]; int binary; bool reentry = …

Member Avatar for Narue
0
234
Member Avatar for lauw0203

Hello :) I'm creating a license plate recognition system for my coursework at University. We need to use Binary trees, which I've done but the information needs to be stored in a file to read and write to. I've created some text files with XML tags in for Cars, Lorries, …

Member Avatar for lauw0203
0
183
Member Avatar for Aepexx

So what I'm aiming for here is to take the user's input as float and write code to split up that input into individual digits and use an array. How would I go about doing this? Here is what my code looks like currently: [CODE]import java.util.Scanner; public class Asn8 { …

Member Avatar for FRGT/10
0
231
Member Avatar for bluem1

Team - This has to be way more simple that I am getting. Been searching google for hours with no luck. Simply stated, I am trying to delete a datalist row which is bound to a mssql database. Simple right! I am missing where it is putting the key or …

Member Avatar for pinkygirl
0
959
Member Avatar for pinkygirl

Hello! 1) I have no idea how to use Session objects, especially when it has to remember the Session of the logged user. When the user clicks logout, his session should be removed until the next time he logs in. 2) Also, how to validate the user in such a …

Member Avatar for pinkygirl
0
109
Member Avatar for iainiow

Hi, I have written a polling service that checks a directory for new files & then distributes them to new locations. The service is so quick, that no soon as the file has arrived in the watched folder, it is moved in to its new location. One concern that I …

Member Avatar for iainiow
0
80
Member Avatar for ahsan1

[CODE]<?php if(isset($_REQUEST['action'])) { $value=$_REQUEST['check']; foreach($value as $ids) { $mdelete="DELETE FROM songs WHERE id='".$ids."'"; mysql_query($mdelete); } } ?>[/CODE]

Member Avatar for KamranArshad
0
375
Member Avatar for low1988

Is there anyone how to write the print function so that i can print out the web form with the web control contents.Here is the scenario , the web form i would like to print out have: 1.TextboxA.txt = "Sample1" 2.TextboxB.txt = "Sample2" 3.DropdownlistA.selectedIndex = "1" 4.CalendarA. Please teach me …

Member Avatar for pinkygirl
0
106
Member Avatar for debasishgang7

I am designing a php,Ajax chat application with Mysql back-end.Its working fine.I wanna add an extra feature in this apps.I wanna show the users who is present in the chat room.When some one left the chat room it should write XXXX has left the chat room and his/her name should …

Member Avatar for debasishgang7
0
133
Member Avatar for arshi9464

i am designing a small client server system for a hospital, in this system a receptionist will forward the details of patients as they come to the particular doctor, like i go with a problem related to skin disease, my case would be transferred to that particular doc, I am …

Member Avatar for arshi9464
0
163
Member Avatar for jpknoob

Hi all, i am having issues with my php and sql script. I have created a an update form that is populated with the database contents, however, when i edit the fields, the update script fails to update the database. The form looks like; [CODE] <form action="update-stock.php" method="post"> <input type="hidden" …

Member Avatar for KamranArshad
0
147

The End.