199,114 Archived Topics
Remove Filter ![]() | |
Im trying to write a program which simulates ten coin tosses and returns the results to the user .can anyone help please!! [CODE] Imports System.IO Imports Microsoft.VisualBasic.ControlChars Public Class Form1 'write a program that simulates 10ncoin tosses using Random Number generator + Returns the results to the user. Private Sub … | |
Well, I seem to have some little error. Purpose: Finding Max and Min numbers from txt file by inputting four numbers. Then I calculate the Range by using (Max - Min) Problem: It does great with positive numbers. However, when I input negative numbers, calculation seems to be off. For … | |
i tried using this where ros and cols is an integer which is equals to 8 [CODE]if (i == ros || j == cols) { if (i == ros && j > cols) { cols++; } else if (i == ros && j < cols) { cols--; } else if … | |
Hi guys, I'm not good at programming so would you help me with this?! No fancy codes, just make it simple. Problem Statement For research purposes and to better help students, the admissions office of my college wants to compare how well female and male students perform in certain courses. … | |
I have a table made up of a number of columns, id, room_id, property_id, and date. The property_id could be a category with different room_id being subcategory. An additional variable is the number of dyas, eg.2 .The date is stored as a timestamp, so if two nigths are selected along … | |
I am trying to write a script for my site that will check if a user has submitted a review for a particular cigar in the past [B]30 days[/B] and if they have, prevent them from creating a new review. I am trying to figure out the code but I'm … | |
Having trouble with this assignment can anybody give my a hint as to where I should start? Write a program that prints letter grades based on a score (between 0 and 10) entered from the keyboard. The simplified scoring system will be: 9-10 A 8 B 7 B- 6 C+ … | |
Hello Everyone, I have this small system that i developed for a company that is basically a Skill Map for the employee's, so in the following image will show the search of the employee's skills through the Family, in the following image the users does a search of the family … | |
I am really confused about how to write functions before main(). My teacher didn't explain it well at all or the stipulations. I have a homework assignment due this weekend and I am so confused. Here is the prompt, below that is my program and what I think I should … | |
![]() | Hey, Can you please give an solution of why this doesn't work correctly? [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * */ public class Main { static Thread hare = new Thread(new ThreadRunner("hare",90,100)); static Thread tortoise … ![]() |
Hi, I am trying to use AJAX to pull back mysql table information. I tried to alter an example I found (w3 schools) where they showed how use a selection table to pull a specific line out of a mysql table, using the "q" (not really sure if the "q" … | |
i am writing a web server thats serves one html file but when i go to my browser and type in localhost:50000/home/user/www/index.html i get something like this viewd on my browser heres my code for writing to a socket [CODE] n = read(connectfd, buffer, 255 ); if (n < … | |
Hi. I'm wanting to append some information to a file, which is found in a different file. I have simplified the problem using animals. Here is the basic code to add the line to the file: [CODE]grep "some important info about rabbits" rabbits.data >> rabbits.txt[/CODE] Very simple, but this must … | |
Hi. I have written a process that takes a list of values from a spreadsheet and updates a foxpro table, adding records if they do not exist, or updating them if they do. I determine if the record exists by a seek command, which works fine. But if my process … | |
Hi everybody o/. I'm studing Linked List in C. I made two functions: add ( add data on the list) and destroy (destroy the list). For now, it's just this two functions that i need, but the function destroy doesn't works well. When I call the function destroy only the … | |
Hi all. Is there a command in C that can delete a string contained in a longer string and then replace the deleted string with another? Big thanks to those who can help me with this. | |
hey friends... i am using fedora 13... when i am trying to access a database i am getting this error-- mysql> use bgm_scr; ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'bgm_scr' --------------------------------------- i also tried accessing by switching to superuser.. but i get this error -- [CODE][user@localhost … | |
Hello there, I'm selecting only one column, so if I have 20 rows in result, how to merge all these rows into [U]one row[/U] where all the rows will be [U]comma separated[/U]? Thnx in advance | |
Hi All, I'm using SOAP::Lite to do some online payments. The whole mechanism is set on separate machine which is communicating with payment gateway. So WWW machine sends a message to invoke SOAP::Lite and SOAP message is sent to payment gateway. In development I had both "machines" running on one … | |
Hey All! I am trying to update some records using forms - But something gets mixed up when I send my info to the database: [B]My form with the info I wish to update, look like this:[/B] [CODE] //Getting the info from a dropdown list, where the user has picked … | |
[code]import javax.swing.*; import java.awt.*; import java.awt.event.*; class CelsiusTemperature extends JFrame implements ActionListener{ private double readingInCelsius; private JButton button; private JTextField field; private JTextArea area; private JLabel label; public CelsiusTemperature(){ setSize(500,200); setLocation(250,150); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); label = new JLabel("Celsius"); field = new JTextField(20); button = new JButton("Convert"); area = new JTextArea(10,20); Container container; … ![]() | |
Hi! Can anyone please point me to any good C# book or tutorial, which includes a step-by-step guide to building an example Windows Database program?? Thanks for any help! | |
Hello, I have two DataGridViews in one window. The first one displays 2 columns, itemNo and task. When I click on a row in this grid, I want to populate the second grid with corresponding material. It is organized so that the itemNo in grid1 is 1, 2, 3, and … | |
I've been looking for an exercise book for Python, a book that we get some stuff to code, like ideas, and etc. I have already finished the "Invent your own computer games with Python". Is there any other book? Thanks in advance. | |
I'm trying to create a simple login page by following a tutorial i saw online. I did everything it required but i got this error Deprecated: Function session_is_registered() is deprecated in C:\xampp\htdocs\final\login_success.php on line 7 Login Successful my code is login_success.php [CODE]<? // Check if session is not registered , … | |
K I just got this Idea that I want to implement into a program I downloaded. Yes the program is open source but I dont wanna compile it, I just want to sort of Inject?.. What I want to do is add a button to the program and have the … | |
guys i am having problems with my jquery code . the slider that has the words "portfolio , service , contacts" etc . doesn't seem to be working here is my site here [url]http://homejobsinc.t35.com/test2.html[/url] here is my source code [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" … | |
I just learned about Recursive functions and they seem very confusing to me, and hard to trace the logic, sometimes i end up staring at it pretty much time to understand the logic, so i can write it. So, i was wondering if there are some simplified steps i could … | |
Is there any way to get the play button to stay hidden in the background during recording until the user intervene to click the screen to allow the button to resurface the play button to stop the recording process?? Is the code coded in the .xml file or somewhere else.. … | |
Im learning about postfix and prefix operators and how to overload them. I've created my class with overloaded pre and post fix operators how ever when used in the main program the results aren't what I expected. The program creates a simple shape from a class that has default constructor, … | |
I have a jQuery form in which I create a series of checkboxes: <?php <form method="post" id="b-form" action="../createb.php"> for ($i=0; $i<$request_count; $i++){ <div class="request-check"> <table> <tr> <td><input type="checkbox" name="show_request[]" value="request".$i." checked="checked"/>select request</td> </tr> </table> </div> } javascript $.ajax({ type: 'POST', url: '../createb.php', data: $('#b-form').serialize(), success: function (msg){ alert(msg); } }) … | |
I have to folowing problem I have links in a table Some of thes cells are empty So if have the folowing code: </td><TD WIDTH='180px'><p CLASS='WithBreaksNarrow14'><a href="<?php If echo (!$row['link'])) $row['link']; ?> target="_blank" <?php else echo ' '; ?>"><font color="orange"><?php echo $row['treffpunkt_wo']; ?></a></font></p></td> But my target="_blank" dosn't work and even the … | |
i have this list, about some company payment , in the list, some company pays two times in a particular day. i need to write a perl program to add up the company's total payment for that particular day such as eid date amount 00101 2009-12-21 3009 00101 2009-12-21 165 … | |
Does anyone know of or have a website where you can upload your applets and other people can play them? (like kongregate for flash games) and maybe even make some money every time someone plays your game? If you're wondering why, I need money for school. 0.o | |
Hi, i wants to add key and value of enumerator into a dictionary list, what should i do? My code as below: [code] public void Display1() { Dictionary<string, double> sortList2 = new Dictionary<string, double>(); Dictionary<string, double> sortList3 = new Dictionary<string, double>(); foreach (string sortComb in listbox1.Items) { if (!(sortList2.ContainsKey(sortComb))) { … | |
Hello friends! Suppose I have something similar to this HTML (this is not my exact HTML, rewritten to simplify): [CODE] <a onclick="ShowHide(); return false;" href="#">show/hide</a> <div> <div id="summary">Summary of info below</div> <div id="enclosure" style="display:none;">Information</div> </div> <a onclick="ShowHide(); return false;" href="#">show/hide</a> <div> <div id="summary">Summary of info below</div> <div id="enclosure" style="display:none;">Information</div> </div> … | |
Hello! I'm trying to modify opensourced application but due to lack of knowledge, I'm stuck. Explantions are in the comments of the app :-) Thanks in adavance for your support! [CODE]void CBaseGame :: FixSlots( ) { struct Struct1{ list<string> UserList; list<CGameSlot> PlayerSlots; }; list<string>::iterator IT; list<CGameSlot>::iterator TI; for( vector<CGamePlayer *> … | |
I'm currently putting together a map that shows the jurisdiction of different offices. I'd like to be able to draw the borders on the map (already done in a PNG), and allow users to either click the map roughly where they live, or type in a postal code. This will … | |
hi.. i need help in comparing value from the same table for my final project. example : table 1 : SubjectCode Classes Sub A class 1 Sub A class 2 Sub A class 3 Sub B class 2 Sub B class 3 Sub B class 4 Sub B class 5 … | |
Hello all, I seem to have a problem, hope if you can help me out. So the application is written in asp.net c#, and its implemented on a win server 2008 R2 iis 7. sql 2008 The server has two network cards, each on a seperate subnet. So that people … | |
I made my own program for N-queen problem (A popular algorithm in Data Structures). Check this code and post your suggestions. If you have any ideas for the improvement of algorithm speed, please post here. Thanks. [CODE] #include <stdio.h> #include <stdlib.h> //N-Queen Chess problem solving Algorithm// //Note:- Uncomment The printf("") … | |
I tried to figure out the Queue with moveup and movedown (like swap). But I will make the consoleApplication but i can't make the window forms application. I want to know about it. If I will make thread safe too. Thanks. | |
Can someone help me with these codes. I'm trying to validate the date(e.g if the users entered February 31, which is not an existing date, the program should give an exception output). Aside from this, we are required to do our own exception. Thank you! [CODE]class MyDateException extends Exception {} … | |
i, Here is the scenario I'm dealing with: My company has a bunch of old servers and workstations that have data on them that I need to copy to a "drobo" (multi-storage device) and eventually send the storage unit to someone else. I have a list of "contract numbers" that … | |
Hey guys, I got my application working fine but it's using a constant 50%-ish of my CPU power, which is way too much I believe. Can any of you figure out what's causing this, or tell me how I can find out myself? :) What we're doing is reading a … | |
Hi everyone, I have a pagination script that is working great - What I am trying to is use a variable from the url and insert that into my pagination Here is the working pagination - [code] <?php /* Now we apply our rules and draw the pagination object. We're … | |
Hi y'all. I'm looking for feedback and discussion on the use of annotations to eliminate the boilerplate code for linking buttons and methods. Hopefully this will be especially useful in RAD or rapid prototyping environments. Over the weekend I hacked together a little proof of concept that supports two ways … | |
Hi all, I have a programming assignment to store sparse matrices using a list<list <myclass> >. I have pretty much everything nailed down but I'm going wrong at some point, the output is incorrect. Instead of giving me 4 lines with the column position and value of non zero values … | |
Hi, I use a command with awk in bash shell so as to extract info from a file. [CODE]awk -F'[=,: ]' '{print /uid=/?$4:(/^telephoneN/)?$2:$3}' 1.txt[/CODE] the output is something like aaaa bbbb cccc dddd eeee ffff gggg tttt I would like to write this output in a file 2.xml [CODE]<xml> <name>aaaa</name> … | |
[CODE]#include <stdlib.h> #include <iostream> #include <cstring> #include <string> /* Include directly the different headers from cppconn/ and mysql_driver.h + mysql_util.h (and mysql_connection.h). This will reduce your build time! */ #include "mysql_connection.h" #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/resultset.h> #include <cppconn/statement.h> using namespace std; int main(void) { sql::Driver *driver; sql::Connection *con; sql::Statement … |
The End.