64,152 Solved Topics
Remove Filter ![]() | |
I can't reverse the inputted word... Here is my code... Please correct it... Sample Output: Type word(s): hello The reverse is: 'olleh' [CODE=c]#include <stdio.h> #include <conio.h> #include <iostream.h> #include <ctype.h> #include <stdlib.h> #include <string.h> char orig [300]; char rev [300]; int len; void original () { cout << "\n\n\tType word(s): … | |
![]() | Hi, I have this code: [code=python] import urllib2 as url import webbrowser def extract(text, sub1, sub2): """ extract a substring from text between first occurances of substrings sub1 and sub2 """ return text.split(sub1, 1)[-1].split(sub2, 1)[0] start="http://xkcd.com/" permlist=[] textlist=[] for i in range(1, 638): temp=start+str(i) permlist.append(str(url.urlopen(temp).readlines()[88])) textlist.append(str(url.urlopen(temp).readlines()[77])) for i in permlist: … |
Hello! As the title suggests I need some help regarding an "open directory" dialog box. I tried this code but every time I run the module it appears a blank window in the back of the dialog box and normally after I select the directory it should disappear but it … | |
I'm having trouble getting this program to keep going through the lines in the first loop. It just prints out the output for the first (searchline) and stops. Can anyone help me to figure out why it won't keep reading the lines in the birthday file? [CODE] import string def … | |
![]() | I have a struct WRITER and I made [CODE]typedef WRITER* WriterPtr;[/CODE] also there is another struct called BOOK and a [CODE]typedef BOOK* BookPtr[/CODE] in my BOOK struct I have a [CODE]WriterPtr writerPtr; //pointer to the writer struct[/CODE] now I have a func: [CODE]void choiceA(BookPtr parr, int n,WriterPtr *pWriter, int *psize)[/CODE] … |
I need a back-end that can: -be used in python -handle multiple-users reading and writing to a database at the same time -can be accessed on a mapped share drive I have used sqlite but I have read that it is not recommended for multi-user use. I have looked into … | |
How can i extact the personal address from html file.. After i get the source from the html file using read() method,what pattern should i consider if i wanna extact the address? Currently i think is use the compile() method to set the matching the address' pattern, but what rule … | |
My code is: [CODE] import re import urllib import urllib2 webURL="http://www.sc.iitb.ac.in/~bijnan/personal-details.htm" #the website is connect=urllib.urlopen(webURL) #connect to this website htmlDoc=connect.read()#get the html document from this website patternIN="Permanent Address" # Where to begin to keep the text patternOUT="</tr>" # Where to end to keep the text (after the begining) keepText=False # … | |
![]() | Sorry for posting this in this forum, but there is no forum for PostGreSQL. I am currently attempting to optimize a function that uses up to 3 seperate SELECT queries, by using a CASE conditional in my query. Right now my function does an initial query, then if no results … ![]() |
I have two form. Form 1 and Form 2 In form 1, i have a few textbox and and combo box. and BTNOk [to save] and BTNCancel[when BTNCancel is click, user are prompt whether to save file if there is changes in entry] Form 2 is the file where BTNCancel … | |
when i run cat . i displays some weird characters which is fine, but after that i can not turn back to my normal directory path. it always shows some weird characters in my directory path too. Why? how to turn back? | |
I'm new to recursion and object oriented programming, but we have been assigned the knight's tour problem. This is where the knight's piece has to travel to every space on a chess board and land on each spot only once. I pretty much have my program done, except i'm having … | |
Hi, i am using vb.net2008 and mySql 5.1.36 to do an assignment. I need to count the number of seat available in a table in my database. When i run my code, the error [COLOR="Red"] MySQL :: invalid attempt to access a field before calling Read()[/COLOR] occurred in the code … | |
hi I have just took from internet dinamic table. this table is dynamic and its rows dynamically can be increased. but i would like how create SUM function that automatically sums each added row value (text value) here is the code if possible please help me Thanks beforehand [code=html]<html xmlns="http://www.w3.org/1999/xhtml" … | |
hi helpers, i'm trying to read an array from jsp in to java(servlet) page the code is JSP CODE (readingcheck box values): [CODE] String select[] = request.getParameterValues("sel"); if (select != null && select.length != 0) { for (int i = 0; i < select.length; i++) { out.println(select[i]); [/CODE] its working … | |
The title to the thread pretty much describes what I am getting stuck at. I was able to create a procedure successfully, but everytime I try to execute it, I get an error:[QUOTE]The EXECUTE permission was denied on the object 'sp_OACreate', database 'mssqlsystemresource', schema 'sys'.[/QUOTE] Logically speaking, if the DB … | |
Hi all, I have ms office2003 installed on my machine. Therefore I use Excel 11. I have excel export button which worked perfectly well before I installed VS2008 SP1 . After the installation I'm getting exception from my excel export button saying " Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" I delete and … | |
Hi , i am using the following function to verify whether a given tree is balanced or not. its working for some inputs and not working for others 1) 15 2) 15 10 3) 15 10 25 ( the above are balanced ok) 15 10 25 7 12 16 11 … | |
![]() | Hi, I've created a base user control from which I want to inherit to create custom controls. This control will be used for data entry and includes a tablelayoutpanel control and panels. When I inherit from the base control, the derived control will not allow the dragging and dropping of … ![]() |
Hi All! I am VERY NEW to Python and I am trying to make a program that can generate random words from a list of letters given to it. The command line can be: [I]program.py abcdefghi[/I] and then as a result the program will print all possible 9 letter words. … | |
Good evening, all! My current assignment is a small Appointment Book written in Java. It should scroll through the times of the day, and display the appointment (if any) for that particular time of day. I can scroll through the different times with no issue, but I can't seem to … | |
Hello all. I was looking for a way to make some grafical stats of recieved files on my honeypot. After thinking on the way to do so, i understood that the easiest way would be parsing the filename with regullar expression or using dir() command. But for parsing the data … | |
Hi All, I have a PHP Code That is Search Input Value from Database and Print it. but i want to Print Serial Number (1,2,3......) before my Every Query. For Ex: 1. Name F Name Add 2. Name F Name Add 3. Name F Name Add 4. Name F Name … | |
I was trying to run a spring program with different style. I am new to this framework. I tried to load configuration file with types of loader. like [CODE] (1) BeanFactory factory = new XmlBeanFactory(new FileSystemResource("spring.xml")); (2) ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml"); (3) ApplicationContext context = new FileSystemXmlApplicationContext("/spring.xml"); [/CODE] But … | |
Hi, I was honing my linux programming skill when this nuisance started bugging me. I wanted to create an empty file creator program. While creating a large file it must print # for progress bar. But the output shows it happening reverse way. ie. first it copies file and shows … | |
Hi, I am developing a software. I need to show only those subscriber, their subscription will expire after 90 days and less then 90 days. and when it show these subscriber it saves information in another table automatically. For Example: if Subscriber have expiry date 15-decemeber-2009, it shows alerts that … | |
Getting error for the simple code Please help me out. Thank you[code]I have a textbox and one table. Once the user enters data in the textbox & click save button, the data gets saved to database. I've written following code but I'm getting following error. Please help me out. Thank … | |
On visual studio watch1 "NumbersLcl(xc, yc)" is 6, "NumbersLcl(x1, y1)" is 7. Both "y1" and "yc" are 0. All variables are byte and NumbersLcl is (2,2) as byte. How can the following statement evaluate as true? If y1 = yc And NumbersLcl(xc, yc) = NumbersLcl(x1, y1) Then isfound = False | |
Hi a kind member (ardav) helped me with some php scripting to get a drop list to be populated using an exploded function in php. I need to also add a first option to the list that would say "Choose Color" as the client wants the light and dark colors … | |
Hello all: I wanted to remove the padding on my datagridview cell and used some code I found here on this forum.. this.dataGridView1.CellPainting += new DataGridViewCellPaintingEventHandler(dataGridView1_CellPainting); void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)//remove padding { // ignore the column header and row header cells if (e.RowIndex != -1 && e.ColumnIndex != -1) … | |
I have a project were the user enters an arrival date and a departure date and clicks the Calculate button or presses the enter key and the app. calculates, formats, and displays the number of nights and the total price. The price per night should be $115. The application should … | |
Hi everyone, Want a DateTimePicker column in my DataGridView. Essentially used code I found on MSDN [url=http://msdn.microsoft.com/en-us/library/7tas5c80.aspx]here[/url] Just dropped the different classes in separate files. It works, but the problem is I have to click from 2 to 4 times before I can select a date! The first click shows … | |
This code was originally for an assignment. I met the requirements of the assignment but wish to expand the code to further check for valid input. I am quite new at this but trying to learn... Anyway, the problem is this. I can check if the float is non-negative with … | |
hello im writing a if statment for class and i cant get the program to terminate if the user goes to the else statement it still prints out the other cout's here is my program your supposed to enter in a id number then the crn of the class u … | |
I am receiving a System.IO.FileNotFoundException when attempting to access a path like "C:\Path\~somePath\Path\file.ext" it reports the error: [code]System.IO.FileNotFoundException: Could not find file 'C:\Path\~s'. File name: 'C:\Path\~s' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, … | |
[CODE]ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const … | |
I am trying to get my button1 on window1 to close window1 and open window2, have you got any ideas on how this can be achieved. Thank you in advance | |
Hi, This is vaguely related to my last post, but not entirely so I'll make a new one. Hope that's consistent with the board rules :) I have a path [CODE]String path = "C:\\test\another\\directory\\";[/CODE] It seems the trailing slash is appended automatically when using the OpenFileDialog, so I used to … | |
[code]void swap (int *first, int *second) { int temp = *first; *first = *second; *second = temp; } int main () { int i = 5, j = 6; swap (i, j); printf ("i=%d j=%d\n", i, j); } [/code] warning: [37] $ gcc -o ex321 ex321.c ex321.c: In function `main': … | |
I have a question that pertains to any programming language but since C/C++ is my primary language I'll ask it here. I'm designing a test program that will simulate the outcome of a 12 round fight between 2 boxers. Now my question is, is there a limit or number I … | |
I am using the file ex3test.c to run the following program, but the UNIX gives the errors: [38] $ gcc -o ex3test ex3test.c Undefined first referenced symbol in file discrete_uniform /tmp/scratch.hYayTQ/ccRDoT1o.o printFirst /tmp/scratch.hYayTQ/ccRDoT1o.o addToList /tmp/scratch.hYayTQ/ccRDoT1o.o printSecond /tmp/scratch.hYayTQ/ccRDoT1o.o disparity /tmp/scratch.hYayTQ/ccRDoT1o.o clearList /tmp/scratch.hYayTQ/ccRDoT1o.o ld: fatal: Symbol referencing errors. No output written to … | |
Hi, everyone! I am using Interop.Photoshop.Dll from my C# Windows Forms application. I am using a com object that Adobe Photoshop CS4 provides to use Photoshop in my C# program. I'm using the ApplicationClass class to launch Photoshop. I have Photosoft CS3 and CS4 on my machine. When I do … | |
Hi and I have just noticed with my media wiki installation that all of my pictures in mediawiki are suddenly broken. The files are there but if I enter the path location in the url bar it takes infinit time to load (never loads - no error). Same for in … | |
Hi all, I have an SQL Datasource: [code=asp.net]<asp:SqlDataSource ID="shownMovie" runat="server" ConnectionString="<%$ ConnectionStrings:MovieTix %>" SelectCommand="SELECT movie.title, movie.category FROM [movie],[session],[theatre],[cinema] WHERE cinema.cinemaLocation=theatre.cinemaLocation AND theatre.theatreNumber=session.theatreNumber AND session.movieID=movie.movieID AND ([movieID] = @movieID)"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="movieID" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>[/code] However, i get the following error message: Ambiguous column name 'movieID'. Basically I … | |
Hi, all I am completely new to webprogramming and I am trying to make a table with expand and collapse feature. When clicking on each row from table, the row should expand and display other information below. I already got partially working, but this only works for the only the … | |
Hi I need to format a decimal value to time and then display it in a textbox in the proper format. eg: double value = 1.25 to "1:15" I do not have a clue how to go about it Thanks | |
Hi Guys, I have a file with lots of similar records example shown at end, I want to be able to delete one of the records and have the following line of code which finds the record I need to delete, my question is now I have found the record … | |
Hi, I am having a little access/control issue. I can add a user to the database using a signup page, go back to the login page, and then log in using the new user. but if i click on a link to go to anoher page that requires the user … | |
//Binary Search Tree Program #include <iostream> #include <cstdlib> using namespace std; class BinarySearchTree { private: struct tree_node { tree_node* left; tree_node* right; int data; }; tree_node* root; public: BinarySearchTree() { root = NULL; } bool isEmpty() const { return root==NULL; } void print_inorder(); void inorder(tree_node*); void print_preorder(); void preorder(tree_node*); void … | |
hey every1 im struggling with something simple, that i cant figure out, or im on the wrong track. the user must enter an id of any sort, 1 - 8 numbers, if it is less than 8 numbers it must be left padded with 0s. and the 1st character must … |
The End.