199,114 Archived Topics
Remove Filter ![]() | |
I have a simple display() method that essentially looks like this [CODE] #include <stdlib.h> #include <iostream> #include <iomanip> #include "Pieces.h" using namespace std; void Pieces::BeginInstruct(int& i){ cout<<endl<<endl; cout<<i++<<":"<<setw(5)<<"Open the program."<<endl <<i++<<":"<<setw(5)<< "Click \"File\" and then\"New\"." <<endl; } [/CODE] Theres obviously more but what I am concerned with is that setw() … | |
Hi Everyone, I am searching the most effective way of sorting a list of objects. Say i have a bean [CODE]public class MyClass { private string name; private string id; // Getters and setters } [/CODE] Now say we put some values in a List [CODE]List<MyClass> myClassList = new ArrayList<MyClass>(); … | |
Simply put, in Firefox, the ajax links work fine. They're targeting a div and in Firefox everything is fine, but in IE, it mucks up. I do not see any links at all. Here's my javascript code. [CODE]<script type="text/javascript"> /*********************************************** * Dynamic Ajax Content- © Dynamic Drive DHTML code library … | |
Hi, I have added web reference using Visual Studio tool i-e Website > add web reference but it add only .disco and .wsdl file. My question is, are these the only 2 files to add? i mean i was expecting .asmx file so that i can see its methods properly. … | |
so my PHP is operational. The script I want to run is here: [CODE] <div style=""> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align=center><script language="JavaScript1.2"> /* Left-Right image slideshow Script- By Dynamic Drive (www.dynamicdrive.com) For full source code, terms of use, and 100's more scripts, visit http://dynamicdrive.com */ ///////configure the below … | |
Been studying what I thought was a fairly authoritative article about BSTRs by Bruce McKinney... [url]http://www.ecs.syr.edu/faculty/fawcett/handouts/cse775/Presentations/BruceMcKinneyPapers/COMstrings.htm[/url] where he states that the four bytes before the start of the BSTR contains the string's length. Here is the exact quote... [QUOTE] What Is a BSTR? The BSTR type is actually a typedef, … | |
hey guys where can i get some homework especially on writing C programs | |
I can reproduce this bug in IE7 (and a colleague in IE6), my link is here: [url]http://www.pritaeas.net/tools/linkfarm/[/url] If you select a tag the list gets filtered and the tag added to the selected div. Unselecting it will reset the taglist, and remove() the tag from the selected div. Selecting another … | |
The essential problem is to determine the index i of the first Fibonacci number Fn to have at least d digits. The specific challenge is to determine the index of the first Fibonacci number to have 1000 digits. Obviously, this problem could be brute forced by stepping through all the … | |
How would I get the code below to time both the iterative version and the recursive version of the Fibonacci function so that I can see which one is faster. I already have the timer.h file to go along with it. I'm thinking i should use t.start() and t.stop() to … | |
Basically, I need to figure out how to change a buttons text when its clicked(X or O). [code] button1 = CreateWindow(TEXT("BUTTON"), TEXT("1"), WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON, 10, 10, 50, 50, hwnd, (HMENU)ID_BUTTON1, myInst, NULL); [/code] Im using buttons like this. I have it set up in the WM_COMMAND case … | |
Hi all, I have a question that , can we use java program as c++ program? Means, when we compile a c++ program we get a .exe file and we can run it anywhere or send to any one. Is the same possible in Java? As I know java creates … | |
Hi guys, I'm implementing a viewer for skinned character animation. Each frame of animation requires thousands of (4x4 matrix * vector) and (float * 4x4 matrix) calculations. This is the section that is repeated thousands of times: [code] // For each vertex influenced by bone for (int j=0; j<(int)Character::bones[i].get_vertices().size(); j++) … | |
I'm trying to write code for finding the number of same number in array. For example, in [1, 2, 3, 3, 4], the number of same number is 2. In [1, 2, 1, 3, 1], the number of same number is 3. How can I implement this? Please, help me. | |
[CODE]#include<stdio.h> #include<string.h> #define count 2000000 void add(char word[],char meaning[]) { FILE *fp; fp = fopen("words.txt","a"); fprintf(fp,"%s = %s\n",word,meaning); } void processing(void) { int i = 0,delay; printf("Processing....\n\n"); for(delay=0;delay<count;delay++) ; printf("\n"); } void getwords(void) { FILE *fp; fp = fopen("words.txt","r"); if(fp!=NULL) { printf("\n/**************************** DICITIONARY **********************************/\n\n\n"); char words; while((words = fgetc(fp)) != … | |
Hai, In the below code I am deleting a file from client pc [code]Dim fs fs = Server.CreateObject("Scripting.FileSystemObject") 'If fs.FileExists(upfile.PostedFile.FileName) Then fs.DeleteFile(upfile.PostedFile.FileName) 'End If[/code] In the Web.config file, I have configured the trust level also. : [code=xml]<configuration> <system.web> <identity impersonate='true'/> </system.web> <location allowOverride="true"> <system.web> <trust level="Full" originUrl="" /> </system.web> </location> … | |
Hello everyone, I'm not sure the title fits my question, but I didn't know how to word it correctly. Here is my question. I'm working on a forum that pulls data from a SQL database via PHP. It's data on employee data (name, job title, what programs they have access … | |
Hi guys I would like some help with creation of Java ME class I have only been capable of coming up with the peudo-code Can someone please assist? Thanks CLASS ImageGetter Method 1: CREATE a connection to a remote server to request the image Method 2: RECIEVE the image and … | |
i need to create a program that translates an english phrase to a spanish phrase. i have a text file with english words and their spanish meaning. i am unsure how to start this as i am quite new to phyton. ignore the grammar, i want to translate the phrase … | |
here I have code in python and now I want to transfer it in Java. import logging import urllib import re from waveapi import events from waveapi import model from waveapi import robot from waveapi import document from django.utils import simplejson from google.appengine.api import urlfetch def OnDocChanged(properties, context): #Get Contents … | |
Hi all, I'm writing a card game but I can't seem to set the cards in the deck. I'm getting a runtime exception error, whether I first try to set the suit or the rank. Here's my code: Card.java [CODE]public class Card { private String suit; private int rank; Card() … | |
Hello, I have downloaded "Microsoft SQL Server JDBC Driver 3.0" and tried sample code. I added "sqljdbc.jar" and "sqljdbc4.jar" in Libraries. But getting error, [COLOR="Red"]java.sql.SQLException: No suitable driver found for jdbc:sqlserver:bug_tracking at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:185) at Main.main(Main.java:18)[/COLOR] The code is given below : [CODE]import java.sql.*; public class Main { public … | |
I am having trouble connecting to a sql database. I have vb.net and it came with vs 03. I have doen a varity of simple programs with vb. I have recently added a server with sql 08 and connected with a workgroup. When I use vs to put a sql … | |
Hello! I am need help with this code I am creating. The object is to read from a file with variables horizontal (horizontal axis data) and vertical (vertical axis data). I can't seem to figure out how to indicate the minimum point with a red open circle and the max … | |
hi everyone can someone please help am trying to convert numbers to words but there no response at all when i run the prog. i used the codes below [CODE] Function Getword(strNumber) Dim strtemp As String Dim x, y, z As Integer x = Val(Mid$(strNumber, 1, 1)) y = Val(Mid$(strNumber, … | |
Hey so I'm trying to get one of my c variables to be a bash variable. Is there a way that I can do this? | |
Hello , I am working on getting this Mortgage repayment calculation code to work for my Access07DB, the code for was copied from some 2006 post on a vb forum. But some things I cant get to work [COLOR="red"]I will put the bad lines in red[/COLOR] [CODE] Option Compare Database … | |
I would like to find and replace a string in a file. I know how to do this, but I can only do it for all instances. Is there a way to do it for just the first instance of the string in the file? import fileinput for line in … | |
[code] Traceback (most recent call last): File "C:/Python31/sample.py", line 10, in <module> calendar.prcal(year) AttributeError: 'module' object has no attribute 'prcal' [/code] Hello, I just started learning Python with this fantastic site. Unfortunatly I get this when i try to execute the following code [code] import calendar print( "Show a given … | |
Hi, In my application I have <li>s and I am using Jquery to remove a particular <li> The code I am using is [code] $(".close").click( function() { $(this).parent().remove()// Links with the class "close" will close parent return false; } ); [/code] Using this I am successfully able to remove a … | |
I connected jsp with mysql. i m beg. level programmer in JSP. So, plz dont comment on my code writing style, bt plz help me to improve ma programming. I can execute query bt whn i try RESULTSET to retrive, getting error. my code is below : <%@page import = … | |
Ok so i have a template script my friend built for me. I'll include all file names OK so what is not working is file_get_contents is not grabing the content (1 I don't know where the content should be placed and 2 i want it placed in a directory so … | |
Hi, I have added web reference to my web space but dont know how to call its method from my code behind .aspx.cs file. can somebody please guide me in this matter. Thanks | |
It's saying I have 6 errors. Need help, please..or a push into the right direction. Thank-you. :) [CODE]#include <iostream> #include <cctype> using namespace std; int Len_String(char *); int CountCapitals(char *); int CountVowels(char *); int main() { char msg[] = "Strayer - what a University !"; char msg2[] = "Programming is … | |
I want to know what is const type in C and what is its uses etc. i dont know anything about this term used in C so please give detailed description... | |
Hi all, I'm basic programmer of Java..I tried to use JFormattedTextField for the first time.. It's giving error in importing sentence only.. I hav written import javax.swing.JFormattedTextField; It shows error "Cannot resolve symbol class FormattedTextField" I don't know what the problem is..Everything seems right..Please help me.. | |
asp.net with C# how to show the message box after saving the data in db(sqlserver) ?? earlier i was using javascript alert like this [code] <pre lang="xml">public static void ShowMessage(string strMessage,Page pgno) { Label lbl = new Label(); lbl.Text = "<script type='text/javascript' language='javascript'>" + Environment.NewLine+ "window.alert('" + strMessage + "');</script>"; … | |
[CODE] public class TryCatchTest { public static void MyNumber(String x) throws TryCatchException1{ try{ String y = x.substring(0,200); }catch(TryCatchException1 e){ System.out.println("BBBBB"); System.out.println(e.getMessage()); // e.printStackTrace(); }catch(java.lang.StringIndexOutOfBoundsException e){ System.out.println("AAAAAAA"); e.printStackTrace(); e.getMessage(); } } } class TryCatchException1 extends java.lang.StringIndexOutOfBoundsException{ TryCatchException1(){ super(); } TryCatchException1(String msg){ super(msg); } }[/CODE] why is my exception not caught on … | |
Hello I am glad to find this site. I have been searching for help with learning C++, to no avil. So my question, which is multi-fold: I have a book from 10 years back or so, ansi compliant, should it work with dev-cpp. Second, I learned the difference between char … | |
Hey Guys... I've got a bit of a fiddly problem... I have an XML doc in the following format: <row> <DNOrPattern>0444</DNOrPattern> <HuntList>HL-1104 C Capital</HuntList> <LineGroup>LG-1000-COREVM1</LineGroup> <RNAReversionTimeout>4</RNAReversionTimeout> <DistributionAlgorithm>Top Down</DistributionAlgorithm> <Member>20130</Member> </row> <row> <DNOrPattern>1015</DNOrPattern> <HuntList>HL-1104 B Ltd</HuntList> <LineGroup>LG-1000-COREVM1</LineGroup> <RNAReversionTimeout>4</RNAReversionTimeout> <DistributionAlgorithm>Top Down</DistributionAlgorithm> <Member>20110</Member> </row> <row> <DNOrPattern>0444</DNOrPattern> <HuntList>HL-1104 C Capital</HuntList> <LineGroup>LG-1000-COREVM1</LineGroup> <RNAReversionTimeout>4</RNAReversionTimeout> <DistributionAlgorithm>Top Down</DistributionAlgorithm> … | |
how would i get the file below to display the number of moves by adding an output statement after the call to move() in main() to display the value of moveNumber, which will be the number of the last move. Thanks! [code] #include <iostream> #include <iomanip> #include "timer.h" using namespace … | |
this is my code:: [code] TextBox[] tbArray = new TextBox[] { TextBox1, TextBox1, TextBox1 }; for (int j = 0; j < tbArray.Length ; j++) { tbArray[j].Visible = true; } [/code] this code is success but only one textbox show not three textbox.. Can any one help me. Thanks | |
hello guys... can you help me to find coding for grading system for my new assingment...( grade n grade point) grade A= 4.00 A- = 3.70 B+ = 3.50 B = 3.00 B- = 2.67 C+ =2.50 C = 2.00 C- = 1.67 D+ = 1.33 D = 1.00 E … | |
Hi, I've got a DropDownList with a list of colours, when one is selected and the "Add to ShoppingCart" button is pressed, all the colours in the DropDownList are duplicated. Can somebody please help. [CODE] // fill the control with data private void PopulateControls(ProductDetails pd) { // display product recommendations … | |
ok so im trying to search list for a student by the last name and i keep getting a error as Error 1 Cannot convert type 'string' to 'Project2.Person' and i do not know how to fix it. any advice? [CODE] class StudentData { private List<string> Page; public StudentData() { … | |
My assignment this week deals with using a struct. I think I can do that part. What I'm having trouble with is reading the file into each variable. The first item in the file is text with spaces. The next items are numeric and need to go into other variables, … | |
hello everyone I am teaching myself c++ and I was wondering if anyone could give me a site that has some c++ exercises particularly on 2d arrays and string manipulation. thank you. | |
Hi All, I have a C++ DLL, which has a function called INPUT and it is defined as follows in DLL: [code] extern "C" __declspec(dllexport) char* _cdecl INPUT(int a,int b,double D[2],double Z[2],double e,double f); __declspec(dllexport) char* _cdecl input_balr2(int a,int b, double *D,double *Z,double e,double f) { //Do Something } [/code] … | |
i want the user to enter the name in the query and only after entering the name the next input text appears. Unfortunately it doesnt work the way i want it to. here is the code [code] <?php // formtest2.php $flag = 0; if (isset($_POST['name'])) { $name = $_POST['name']; $flag … | |
Sir, I am using front end as a VB.net 2005 and I am a beginner in this language. I am creating Desktop application and using controls TAB controls 1st tab control is Contact in contact I am using one text box, two button and one datagrid while I am using … |
The End.