199,114 Archived Topics
Remove Filter ![]() | |
I'm new to C# and I'm having some trouble getting input from a file and using it properly. I need to get input from a file and insert the values given into a function but the problem is I need to give the functions parameters that aren't strings. TimePiece is … | |
[CODE] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int odd(int nValue) { nValue= nValue -1; return nValue; } int main() { int nValue; cout << "Enter a Positive Number: "; cin >> nValue; while ((nValue>2) && (nValue % 2 == 0)) { nValue = nValue -2; cout << … | |
Im trying to use a regular expression backreference to reference a hash key. Here's an example of the non working code so you can see what I'm trying to achieve (I hope!): [CODE] $str="String of text containing item1 and item2"; $x['item1']="Item 1"; $x['item2']="Item 2"; $str=preg_replace("/item1/","$x[\${1}1]",$str); print $str; [/CODE] I want … | |
[CODE]from copy import deepcopy sis = file("teedtest.01.sis", "r") val = file("rp.val", "wt") N, K = map(int, sis.readline().strip().split()) alist = [] for i in range(0, K): t = [] for i in range(0, K): t.append(0) alist.append(t) for i in range(K): a, b, c = map(int, sis.readline().strip().split()) alist[a][b] = alist[b][a] = c … | |
how can i return cases 1,2,3 and default in to the main function? when i press 1 as key to return to the main function.. the prompt will appear "press any key to continue" how can i return it to the main menu? [CODE]#include <iostream> #include <cstdlib> using namespace std; … | |
Hi. I was wondering about how you might go about executing a file as you log in to your account. For instance, I want to run a file that prompts the user of the date, and any other information as you log-in. Might I need a registry entry or such? … | |
Here is my code at the moment: [code] import java.util.Scanner; class menuOperations { String[] fNames = new String[50]; String[] lNames = new String[50]; String fName = " "; String lName = " "; String sFName = " "; String sLName = " "; int dAmount,dTimes,i; Scanner in = new Scanner(System.in); … | |
Hi, I would like to using POSIX API system calls in C, and via command line arguments know how to go about extracting from an archive file.(in Linux). I have done the archiving process it archives the files I enter into the command line , and the last but one … | |
Hey I have a program that has a webBrowser navigate through a few pages, and when it gets to the last page I set it to navigate to, checks if there is a certain string on that page. I just switched my code around to use multithreading and now the … | |
How do I comunicate with an API? I'd like to create a thing that would comunicate with other people through another server (say Gmail) Thanx, JT | |
Hello, I have my site set up so that everything is done with AJAX requests to a script depending on what action is taken. If my script returns an error - such as the user is not allowed to take the action they tried to take - it returns an … | |
![]() | Hi I got the code from here: [url]http://www.642weather.com/weather/scripts-image-handler.php[/url] And I wanted to put a date in the text overlay. I know that this is possible and easy to do but I don't know how to do it in php. Could someone tell me please. Thanks in advance. ![]() |
My original question stated: 1. Write a function named "digits" that takes an integer argument in the range from 1 to 9 , inclusive, and prints the English name for that integer on the computer screen.[B][U] No newline character should be sent to the screen following the digit name.[/U][/B] The … | |
If I have [CODE] class Class1 { string message { get; set; } int age { get; set; } public Class1(string msg, int ageof) { message = msg; age = ageof; } [/CODE] and am passing the parameters from another class in to the constructor... [CODE] class Program { static … | |
I need to restrict access to other table id's by making a check against an (id) of a table named users and then check that the (user_id) of another table is the same i.e table1 id username password table2 id somedata user_id if table1 id is the same as table2 … | |
for removing the last element from a chain in my linked list? [code] Action *temp = head; //Action is my node while(temp != 0) { if(temp->link == tail) //tail is my last node { delete last; tail = temp; tail->link = 0; return; } temp = temp->link; } [/code] I … | |
Hi All, Been coding Python on and off for a year now, but only just started looking at wx. Got a problem in a larger project I'm working on, trying to remove all items from a GridSizer - I've created the following test code to demonstrate the problem, but to … | |
hy, i'm new in .net -c# and I have a problem.I have a database with a field where is a long text, for example a description for a product.Well, i want to create a form where where i select something from a listbox, for example the name of product, i … | |
I have used this piece of code which is working great. It allows me to add different items from combo boxes to my order form. The problem is that i dont know how to extract the data from my db to display in a form view when i want to … | |
Hi !!! I have a table with two columns. The first column is called 'Login', the second column is called 'Password'. I wish with help of some query to extract how many rеcords I have in this columns. I use 'SELECT COUNT(*) FROM TableName WHERE Login = @login AND Password … | |
Hi, I'm a bit new to php and am hoping that someone would be kind enough to help me with my problem. What I want to achieve is as follows: I created a form in my .php file, once I click the add button I want another form to appear … ![]() | |
![]() | I am building a website with a forum that I am building myself. I just don't know how to let the user change their time zone. My server time zone is my time zone ([B]date_default_timezone_set('Europe/London');[/B]). Please could I have some help with this. Thanks in advance, Cameron ![]() |
Hi! I'm trying to zoom in/out ImageIcon in JLabel. The problem is that after 2-3 zooming actions, the image quality becomes horrible. How could I solve this problem? Thanks! [CODE] private void doZoom(int scaleFactor) { Component[] c = SelectablePanel.getMainPanel().getComponents(); for(int i = 0; i < c.length; i++) { if(c[i] instanceof … | |
Ok, so I have a website on a CMS. Love it, except I can't process and dynamic code like PHP. My problem is thus: I have a form that needs to be processed through PHP due to it's complex nature (the CMS can't fully process the info). Now, we have … | |
Hi everyone... [CODE] Class1 myobject = new Class1(); [/CODE] Am I right in saying that "myobject" holds a copy of all the members in class1? Also say for instance I have.. [CODE] Class1 myobject = new Program(); //using the common names of classes... [/CODE] Can anyone explain or point me … | |
I have been searching for ways to do this but I was not able to find any. What I want to do is this: movie_genre (Table) movidId movieTitle movieGenre (Varchar) 1 Copying Beethoven (2006) Biography 2 Copying Beethoven (2006) Drama 3 Copying Beethoven (2006) Music movie_plot (Table) movieId movieTitle moviePlot … | |
How to put this tool in vb.net 2010 plz check this image.. i hav rounded tat tool in red colour. [url]http://img192.imageshack.us/img192/6697/24961035.png[/url] | |
[CODE]#include <iostream> #include<cstdlib> #include<iomanip> using namespace std; int* userInput(int mat); void multiply(int mat, int* array); void print(int **mult, int **divides, int mat, int row, int col); //Main method, calls IO and handles the case for only 1 matrix. int main() { int mat = 0,i,j; int arrayA[mat][mat]; cout << "Enter … | |
It is possible to run dynamic web pages on a pocket PC without internet connection? I would like to read/write files using a browser on my pocket PC without internet connection. | |
Hi! I am trying to create a callout using jquery but somehow the code is not working. [CODE]<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <link rel="stylesheet" type="text/css" href="Scripts/Menu.css"/> <script type="text/javascript" src="Scripts/jquery.js"></script> <script type="text/javascript" src="Scripts/jquery.callout.js"></script> <!--<script type="text/javascript" src="jquery.callout-min.js"></script>--> <script type="text/javascript" src="Scripts/callout.js"></script> <title></title> </head> <body> <form id="form1" runat="server"> <ul id="myMenu" class="contextMenu"> <li class="insert"><a href="#insert" class="link" … | |
Good Day to All: This is my first post here, so I apologize upfront for any etiquette violations. Please feel free to point them out. [B][U]My Dilemma[/U][/B] I have built a site in WordPress that is a business directory site. The idea is that a business owner will have their … | |
I want to extract .cab files using C++ when extraction finishes i want the extract .exe to run how can i do this? | |
Hello friends, You have been of great help to me till now. I got a new problem , I am unable to run the JAR file. When i click on the Jar file, I got the following error : "Could not find the main class: socketprog.Main. Program will exit." Thanks … | |
I'm trying to set up NetBeans IDE on my Vista Home, and have a choice between those two compilers. Which one would you choose? I also want to have Code::Blocks. | |
How to run PHP on pocket PC without internet connection? (under WM2003) | |
RE: Using C++ MD5 hash for software verification & licence files Hi The last few days I've been searching the net for ideas about building in some sort of software protection/security schema within a development for educational but perhaps more importantly to understand good & bad security coding/practises do's & … | |
Hi there everyone, I need some help getting started creating a Java program for a class I am taking. Here is what I need to do: Create A program written in Java (without a graphical user interface) that will calculate and display the monthly payment amount to fully amortize a … | |
The first paragraph of the code above is the loginview control that resides in my Masterpage. the second paragraph is the login page. where i inserted a login control and writes the code for user authentication the third paragraph is the code that processes the user authentication and the redirection … | |
Hi, I wonder if someone could help, please. I'm having trouble with a drop down menu; it works fine in IE, but appears in a different position in Chrome and Firefox. If I alter the positioning, then it works fine in Chrome and FF, but not it IE. I've tried … | |
I'v written the program below, but I'v been told its too "intense" Any ideas on how I can get the same results but with a simpler program? [CODE]#define MAX_SIZE 10000 char buf[MAX_SIZE], name[1000]; int min(int a, int b) { return a<b?a:b; } int main(int argc, char** argv) { FILE *out, … | |
Hello,i m trying to make a program that uses 2 .dat files for student managment..here's my code and the problem main: [code=c] #include <stdlib.h> #include <stdio.h> #include "tei.h" /*orismos domwn*/ struct address{ char odos[16]; int noumero; }; struct foititis{ char am[7]; char onoma[11]; char epitheto[16]; struct address dieuthinsi; float mo; … | |
helloooo i am trying this query to compare records of two different tables... i m geting this message!! no required out put pplzz somebody help me its really urgent.. values for these ($jobTitle $industry $stationBase $gender $maritalStatus)are coming from textboxes! here is the code... [CODE]$query = "SELECT *, MATCH(industry, gender, … | |
Hi there)) I cann't deal with the file opening operation - [CODE]char* fpath = "D:\TC\myprog\readit.txt"; FILE* fp; fp = fopen (fpath, "r"); if (fp != NULL) printf ("\n(!) File opennig error\n"); else printf ("\n(+) File have been opened successfully!\n"); for( i=0;i<=n-1;i++) { a = getc(fp); putchar(a-48); putchar('\n'); }[/CODE] For some … | |
HI all, Im trying to create a simple MP3 player. I hope that by amalgamating a series of strings, example 1, that they can collectively contain the full play and filename/path instruction instead of the self-contained method in example 2. When I try to compile the solution in example 1 … | |
[CODE]allPatches = patchFiles.Select(patchFile => Patcher.TryReadPatch(patchFile, true)).ToArray();[/CODE] I don't understand what this line of code does....allPatches is a class, and patchFile is a string. What is this doing? And is there a way to do the same thing in C++? Ty | |
I'm trying to adapt the opensource code from the page [url=http://tlrobinson.net/iphone/lighttable/]Drag and Drop in MobileSafari[/url], here is a snippet of the code I've changed from: [code] function jsonFlickrApi(data) { for (var i = 0; i < data.photos.photo.length; i++) { var p = data.photos.photo[i], img = document.createElement("img"); img.src = 'http://farm'+p.farm+'.static.flickr.com/'+p.server+'/'+p.id+'_'+p.secret+'_m.jpg'; img.className … | |
I'm doing a second year student in computer and information sciences and it is the first time for me to do a project so I need help . My problem is how to enter a branch information and update the branch information,update holder information .Ijust need a hint to start. … | |
I have a number 2879068. I want to display it in currency format as like [B]28,79,068[/B] in C# Can any one help me | |
I need to link an access database to my visual vasic express 2008 class i have made (as been set an object orientated project) but am struggling to link the database and get it to show the information from the database through the class to the product form. I'll attach … |
The End.