199,113 Archived Topics
Remove Filter ![]() | |
![]() | I have two programs here I cannot seem to get any return value and I have no idea why, everything I'm doing is just like my book says and I cannot get it working. The parts commented out are the other ways I was trying to make this work, somethings … ![]() |
Write and test a function to meet this specification: squareEach(nums) nums is a LIST of numbers. Modifies the list by squaring each entry. [CODE]def squareEach(nums): for number in nums: number = number ** 2 return number def main(): nums = [3,4] print(squareEach(nums)) main()[/CODE] The output in this case is 9... … | |
Hi, beginner in vb here, I'm trying to write a game of blackjack in vb.net, and I'm currently trying to set up a subroutine that will check to see if a card matches another card already dealt, and if so deal a different card (to avoid dealing the same card … | |
[CODE]public class Employee{ public String fNa; public String lNa; public String Title; public int ID; void doEmpThings() } public class Director extends Employee{ void doDrictorThings() } public class UseEmployee{ public static void main(String []args) {codes} } public class UseDir{ public static void main(String []args) {codes } } [/CODE] Now what … | |
abit like the title am looking for a way to scan my full database and to look at each accounts email address and to find any emails the same and then count them can anyone show me how this is done ? thanks below is my basic db table [CODE] … | |
Using: MS Access 2010 Visual Studio 2010 with Provider=Microsoft.ACE.OLEDB.12.0 Connection I have 2 forms: frmCustomers contains datagridview that launches frmEdit used to edit record. The issue I am having is my save button on frmEdit saves changes to the datagridview on frmCustomers but not to the database frmCustomers: [CODE]Public Class … | |
I am entering text into a textarea field and pressing the return key to force a new line. But when the contents of the textarea field is displayed I am seeing the new line html tag <br /> symbol (see below). How do I stop these symbols from displaying and … | |
[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; … | |
I have the following CashRegister class where i must implement 3 methods: -getSalesTotal total up sales for the day -getSalesCount total number of sales for the day - rest a reset method that returns all instance variables to 0 Here is my code any help on mistakes i may have … | |
Since I decided to reinvert the wheel and write a growing MVC, I though having a template class will be cool. Now I have never done any complex templating apart from simple include kind of templating. Now I wrote this base class and here is my concept is explained below. … | |
A console application to multiply two matrix of float numbers and print result on console. Some memory checks are done as it is allocating memory dynamicaly. May give error and exit when short of memory. | |
compiler : visual c++ 2010 os : windows 7 64bits learning template and encounter some problem [code] template<typename T> void easyCopyImpl(T const &A, typename boost::enable_if_c< boost::is_array<T>::value>::type *temp = 0) { std::cout<<"this is array"<<std::endl; std::cout<<typeid(T).name()<<std::endl; std::copy(A, A + sizeof_array(A), typename std::ostream_iterator<T>(std::cout, "") ); } template<typename T> void easyCopyImpl(T const &A, typename … | |
Can any one explain what is the usage of creating a contentpane in swing... | |
Hey, I'm looking for an IDE with .NET capabilities, but not visual studio. As I need it to run off a flash drive. Any suggestions? | |
[CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DiceSimulator { public partial class Form1 : Form { StandardDie die1, die2, die3, die4, die5; Random rand; public Form1() { InitializeComponent(); rand = new Random(); } /// <summary> /// This is the Event … | |
[CODE]class Cents { private: int m_nCents; public: Cents(int nCents=0) { m_nCents = nCents; } // Copy constructor Cents(const Cents &cSource) { m_nCents = cSource.m_nCents; } };[/CODE] will the copy constuctor still work properly if i had decided to implement it was follows [CODE]class Cents { private: int m_nCents; public: Cents(int … | |
Hi! I am trying to write a method w/i a larger program, and it's purpose is to read in a section of the string between " " and then within that section split each subsection apart if it contains spaces and matches a particular RegEx and if a space is … ![]() | |
I have no idea how this would be done, but how would I check the amount of line that exist in a text file. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( myfile.good() ) … | |
Dear ALL, I have a similar problem with a string/replacement 132435 321350 35465162 6561516 546516 654613 65462133 6584652 and so on for some hundreds (!!) raws. What is the best way to edit this textfile to have something like this? 132435,-321350,35465162,-6561516 546516,-654613,65462133,-6584652 Basically, I have to change the 'double space' … | |
Having trouble computing the number of occupied neighbors each cell in the array has. Any help would be greatly appreciated. [CODE] Array[rows][cols-1] Array[rows+1][cols-1] Array[rows-1][cols] Array[rows][cols] Array[rows+1][cols] Array[rows-1][cols+1] Array[rows][cols+1] Array[rows+1][cols+1] [/CODE] | |
Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of string names representing string names (e.g. E,A,D,G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. … | |
Hello! I've written some swing components for which I use timing framework to make some simple animations that hopefully are going to enchance usability. What I am doing is essentially setting the bounds of JPanels for each timing event to animate something that moves and resizes. I also change transparency … | |
Hi, I started with C++ development recently, and I think I'm ready to start building GUIs for my apps. I'm thinking about using Qt, since it is the most popular C++ GUI library, but the licensing is really confusing, and there isn't a lawyer nearby that understands software licensing who … | |
when I start program I get error "Label not definied" in GoTo Resend line module: Public Declare Sub UrlMkSetSessionOption Lib "urlmon.dll" _ (ByVal dwOption As Long, ByRef pBuffer As Any, _ ByVal dwBufferLength As Long, ByVal dwReserved As Long) Public Type INTERNET_PROXY_INFO dwAccessType As Long lpszProxy As String lpszProxyBypass As … | |
Can any one say how to run a java program in Notepad. I have installed JDK 7 and Notepad++ also. But when I run a program in notepad it does not run. Actually I am a newer in notepad using. I have used Netbean IDE. But now I wish to … | |
Hey guys I'm in 11th std and we are supposed to do a C++ project on a topic called FUNCTIONS.What are they? | |
Hey guys, new to the forum, but am in need of some help. I am quite new to Python, but want to be able to program a simple script that basically does three things: -1. Finds a string of text in an .xml file (the length of the string, and … | |
i have this array code that would give the sum of the random numbers in the columns, however i could not figure out how to display the sum of the rows.. can someone help.. Thanks a lot... [code]import java.util.*; public class tabulated { public static void main(String[]args){ Random rand=new Random(); … | |
[code]package rolldice; import java.awt.*; import javax.swing.*; public class Die extends JComponent { private static final int SPOT_DIAM = 9; private int _faceValue; public Die() { setPreferredSize(new Dimension(60,60)); roll(); } public int roll() { int val = (int)(6*Math.random() + 1); setValue(val); return val; } public int getValue() { return _faceValue; } … | |
[code=Javascript] //JavaScript function checkCountry(slctFild) { if(slctFild.selectedIndex==1) { showStateSelectBox(); hideProvinceSelectBox(); } else { if(slctFild.selectedIndex==36) { hideStateSelectBox(); showProvinceSelectBox(); } else { document.getElementById("00N200000013FlZ").selectedIndex = 0; // ERROR gets thrown here!!! document.getElementById("00N200000013Flo").selectedIndex = 0; hideStateSelectBox(); hideProvinceSelectBox(); } } } [/code] [code=Html] //HTML Registraton Form <select id="00N200000013FlU" title="Country" onchange="checkCountry(this)" name="00N200000013FlU"> <option value="" selected="selected">--None--</option> <option value="United … | |
I am trying to alphabetize by generating a weight of a word, saving those numbers, and then comparing which numbers are greater. Don't ask me why I need to do this way. So I am trying to come up with a function that calculates the value of a certain word. … | |
Hi, i have 3 tables in oracle sql developer (packing, detail, header). I need to update the packing table's part no with header table's part no. But header doesn't contain the serial id hence i need to refer to detail table for cross reference. I did like below, but it … ![]() | |
This is a loong story, if you are a student in high school, you might have the idea what "FBLA" is. Let me just state my questions: ( Keep that in mind, i learn vb.net for almost half an year, dont know how to do the data base yet) So … | |
Hey everyone, I'm just wondering if there is a way to get around this problem. I'm running SQLplus on UNIX server and SSHing into the server. Whenever I query Oracle DB, a list of results/bunch of tables comes up but I can not scroll up to the top of tables..... … | |
Hi all I am currently working on a project for tech (university). It's a login form that uses a CAPTCHA as validation and must monitor the IP address of the computer that has currently requested the form. The IP monitoring part is so that if a user has made x … | |
hi every body i have template that it contains this type of java script for displaying wallpaper in the main screen : [CODE] <!-- JAVASCRIPT TRIGGERS --> <script type="text/javascript"> $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto({ theme: 'dark_square' }); }); $.backstretch("images/background-home.jpg", {speed: 'slow'}); </script> [/CODE] and i wanna change it to this form : [CODE] … | |
Hello guys! Basically I have this basic homework, the program must check if the digit sum of one of the 3 inputted integers is equal to the difference of 2 others. So if A = 56, B = 33 and C = 22, the program should output 56, cause 5+6 … | |
Hi guys, I have a problem when using gridview which source is a database VIEWS, not a table. I have a MySQL database running, ASP web application(C# behind). Then the GridView's source is a combination of 8 views from the database. ([CODE]SELECT * FROM v1,v2,v3... v8[/CODE]) Then the problem is … | |
Hello everyone, I am currently learning Java. I find it very hard to use string variable. Does string variables need to be declared differently? Let me explain more: I have a program(in blueJ) which reads a name and returns it. [CODE] public class ReadName { // instance variables - replace … | |
[CODE]#include <iostream> #include <fstream> using namespace std; int underPopulation; // Any cell with less than <underPopulation> liviving neighbors dies. int overCrowding; // Any cell with more than <overCrowding> living neighbors dies. int minNeighborsToLive; // Any cell with <minNeighborsToLive> living neighbors lives. int reproduction; // Any dead cell with <reproduction> living … | |
Hello. I am new to programming and I am trying to find a way to sort an array of numbers. For Example, if I have 30 textboxes with a number inside, I think i could insert the numbers to this array using a For...Next statement. But then, I would like … | |
I am trying to do remote function call in c++. The scenario is like this. There are two programs running say P1 and P2. P1 is trying to call a function implemented in P2. The program P1 calls a function using an object which will make a call to a … | |
I have recently come along a struct of this sort: [CODE]struct Context { Context(): addTitle(false) { } bool addTitle; std::string title; };[/CODE] It looked strange, especially the [B][I]Context(): addTitle(false) { }[/I][/B] part. Can anyone please explain it for me. | |
Hi all, just wondering what the best way is to structure time in sql database. For example, at present i use this format ; 19/08/2011 (which is day/month/year). when i call this in a sql statement, it shows all results, but not in a chronological order. Can any body solve … | |
Hello !! Sorry to bother you again.. I am making a windows app using vb.net, ms access 2003 and vs 2008.. The form i have is named BOM, it contains a datagridview that has checkboxes.. The user needs to select a row by checking on the checkbox.. These selected rows … | |
Hello, Does anyone have any experience with phpwebsocket by google? I'm having a problem connecting to my server... Here is the two files: (server.php) [code] #!/php -q <?php /* >php -q server.php */ error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); $master = WebSocket("[server_IP]",12345); $sockets = array($master); $users = array(); $debug = false; while(true){ $changed … | |
Dennis Ritchie died at age 70. Great loss the creator of C and co-inventor of Unix.Few people can truly say they changed the world. And Dennis certainly is one of the few. RIP Dennis, but also thanks for making the world in which we live in today! Thank you Dennis … ![]() | |
i really don't know how to slove the erro in my program.. ..can you please help me?? thank you in advance ,.. [CODE]Public Class Form1 Dim con As New OleDb.OleDbConnection Dim cmd As New OleDb.OleDbCommand Dim da As New OleDb.OleDbDataAdapter Dim ds As New DataSet Dim sql As String Dim … | |
Hi I just set up my IP Board. Now i want to retrieve some of the data via mysql, so far I have no problem getting a table into a datagridview, but what do i do to get a value from a table right now i got SELECT * FROM … | |
How to write a tic tac toe game program in c language using int char array with the help of for & while loop |
The End.