199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Kruptein

I have created a script to encrypt and decrypt a text message based on the bifid cipher([url=http://en.wikipedia.org/wiki/Bifid_cipher]wiki about bifid[/url]) everything works fine [B]IF[/B] the text message does only contain letters. How can I integrate the ability off spaces etc... the best way? by adding them to my alphabet might solve …

Member Avatar for Kruptein
0
2K
Member Avatar for drjay1627

I need help with inserting a string for both key and value to a map. [code] while(!myHuffFile.eof()){ string word, code; int freq; myHuffFile >> word >> freq >> code; if(word == ""){ break; }else{ _fileMap.insert(pair<string,string>(word,code)); _freqMap.insert(pair<string,int>(word,freq)); } } [/code] error: error: conversion from `std::_Rb_tree_iterator<std::pair<const std::string, std::string> >' to non-scalar type …

Member Avatar for drjay1627
0
441
Member Avatar for asa88

i dont knw why i am not getting the right ans can someone help? [CODE]#include<iostream> #include<string> #include<cmath> using namespace std; int main() { int sum=0; string val; cout<<"enter a binary number:"<<endl; cin>>val; for(int i=0;i<val.size();i++) { cout<<val[i]; } for(int i=1;i<val.size();i++) { int x = val.size(); sum+=val[x-i]*pow(2.0,i-1); } cout<<sum; return 0; } …

Member Avatar for thomas_naveen
0
115
Member Avatar for leftyb

hi im am using this code(Python) to get the n -grams for a word : [CODE] import string; import sys; # N N = 6; # file f_in = open("test.txt", 'r'); ln = f_in.read() wlen = len(ln); i = 0; while (i < wlen - N + 1 ): for …

Member Avatar for KNatali
0
2K
Member Avatar for timbomo

i cant get this to loop and i cant get it to error trap cout << " Please choose an odd number 3-9 to calculate width and height of your choosing\n"; cin >> number; [CODE]do { if((number!=3) || (number!=5) || (number!=7) || (number!=9)) { cout << "invalid choice " <<endl …

Member Avatar for Fbody
0
250
Member Avatar for iNach

Hey, I have a problem. I want that when the user presses the ESC Key, my program will send him a message if he sure he wants to exit the program. [b]Basicaly what I need help with is how to do the "IF Esc is pressed"[/b] Thanks

Member Avatar for xavier666
0
8K
Member Avatar for xavier666

I just received the MERGE SORT code from my friend, here it is [CODE]void sort_merge (int *array, int low, int high) { int mid; if (low < high) { mid = (low + high) / 2; sort_merge (array, low, mid); sort_merge (array, mid + 1, high); array_merge (array, low, high, …

Member Avatar for xavier666
0
4K
Member Avatar for AnzJ

Hi Guys, I have an image set up, and when you left-click on it, the image closes. I was wondering if there is an onRightClick event or something like that, so I can disable the right-click menu? I'm trying to prevent people from being able to easily save the image. …

Member Avatar for gtugay
0
100
Member Avatar for daviddoria

I am trying to get a variable number of arguments in one function, and pass them to another function. I tried this: [code] #include <iostream> #include <stdarg.h> void Function1(unsigned int num, ...); void Function2(unsigned int num, va_list ap); int main(int argc, char *argv[]) { Function1(3, 1, 2, 3); return 0; …

Member Avatar for daviddoria
0
234
Member Avatar for anish.anick

Hi All, Please tell me how i can call a web service from an HTML page using javascript which works fine on both IE and fire fox.I was successful in calling a ASP.NET web service using javascript in Internet Explorer (using service.useService method).Unfortunately the service.useService method is not working in …

Member Avatar for kvprajapati
0
609
Member Avatar for Denver Cupido

1.Password authentication Write a C++ program that has asks the user to enter a string-input. If the string matches the password stored in the program, then print a suitable welcome message, otherwise allow the user to re-enter the correct password. The user has at most 3 chances to enter the …

Member Avatar for Excizted
0
160
Member Avatar for adino2

[CODE] private void button1_Click(object sender, EventArgs e) { aTimer = new System.Timers.Timer(3000); aTimer.Elapsed += new ElapsedEventHandler(button2_Click); aTimer.Enabled = true; for (int i = 0; i < 16; i++) { mciSendString("open new Type waveaudio Alias record_sound", "", 0, 0); mciSendString("record record_sound", "", 0, 0); } } private void button2_Click(object sender, EventArgs …

Member Avatar for adino2
0
118
Member Avatar for Heinz Stapff

Running Login Validation that is causing problems. Client side 'onchange' of input id=customer email is not writting to <p> for each 'if' statement. Any help greatly appreciated. [CODE] var dbemailstr = ['heinzstapff@hotmail.com']; // emulate database email search var newemailstr = ['gloriamarks@prodigy.net']; // emulate add to databas email addresses var email …

Member Avatar for Heinz Stapff
0
117
Member Avatar for octopusgrabbus

I've read other posts in this form, but still do not know why I get this error: [CODE] File "/home/amr/bin/mysql_lib.py", line 196, in createNewCsRowSQL db_date + ");" TypeError: cannot concatenate 'str' and 'long' objects [/CODE] from this code [CODE] sql_cmd = \ "INSERT INTO customer_synch " + \ "VALUES ( …

Member Avatar for octopusgrabbus
0
340
Member Avatar for princekool

Hi guys; I have a table of books in my DB and each page has a different serial no following each other eg. Page 9 has serial 005065 and 10 has 005066. In my table it only gives me a range of serials as per the book, this is how …

Member Avatar for apegram
0
253
Member Avatar for tryingtofindout

help me!! [CODE]if ( $username == 'admin' and $password == 'ncr' ) { echo("Location: http://localhost/ncr/home"); } [/CODE] if username and password is correct, echo should takeme to specified link. This page ([url]http://localhost/ncr/home[/url]) should be displaced

Member Avatar for tryingtofindout
0
115
Member Avatar for corales
Member Avatar for Cristofor

Hi, I am using Visual Studio 2008 Express Edition, and I wrote my code as follow: ====================================code starts [CODE]#include <iostream> #include <string> #include <sstream> using namespace std; int main() { string *p; int n; cout << "Please input the number of students"<<endl; cin>>n; p = new string [n]; cout <<"Please …

Member Avatar for Cristofor
0
106
Member Avatar for adino2

Well since last month I been working on a project to do a "Speech Recognition System" without the use of any 3rd party help like Speech API. So, this is what I have done in my project. Speech recording, save it to a wave file. Reduce the noise of the …

Member Avatar for adino2
0
136
Member Avatar for Pooja J.

Hello,i m newer to the php. my problem is... i have one form with textfield and multiple selection listbox. i select multiple values form listbox, implode it with comma and put all values in single database field. its working. But, i cant retrieve them with explode function . i want …

Member Avatar for urtrivedi
0
112
Member Avatar for jeeter19

Hi, I'm trying to write a short/simple function that will get the information that is in a COOKIE and return it. I have a COOKIE that is called [B]auth[/B]. This COOKIE is properly set as I can do an [I]echo $_COOKIE['auth'];[/I] and it will show the proper number. The problem …

Member Avatar for Airshow
0
133
Member Avatar for samsons17

hi... i want to ask about joomla...I dont where else to ask but here... I hope you all can help me.. I've installed joomla 1.5 on my localhost which is Xammp... I also have created the mysql database through the free webhosting(zymic.com).. After i finish with the joomla installation,i wanted …

Member Avatar for deina
0
167
Member Avatar for planetcreate

Hi I am trying to use web services for the first time. I am using .net 2.0. I am tring to get what is essentially an array of data. This approach would work. [CODE]Dim test As New ArrayList test.Add("one") test.Add("two") test.Add("three") Return test[/CODE] The only problem here is that I …

Member Avatar for Ramesh S
0
116
Member Avatar for brettbed

Hi Everyone, This is my first post on this forum. I am pretty new to programming so any help is greatly valued here. Was hoping someone could steer me in the right direction with this Dice-Poker style program I am trying to write in C#. So far I am able …

Member Avatar for brettbed
0
487
Member Avatar for cwarn23

Where can I find software and physical parts for making miniature robots. C++/visualbasic or similar languages are preferred. The tools I require is the software to create the script which will be transfered to the robot, wifi capability, 1 video camera linked to the software inbuild (which can rotate 180 …

Member Avatar for cwarn23
0
110
Member Avatar for syed aamiruddin

[code] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class SelectLayout extends JFrame implements ItemListener{ public static void main (String[] args) { SelectLayout sl=new SelectLayout(); } JMenuBar menuBar; JMenu lmenu,cmenu; JRadioButtonMenuItem lrbmenuItem,crbmenuItem; JPanel menuPanel,bPanel; JButton button; public SelectLayout() { super("Select Layout in swing"); menuPanel=new JPanel(); menuBar=new JMenuBar(); lmenu=new JMenu("layout"); ButtonGroup gp=new …

Member Avatar for stultuske
0
296
Member Avatar for rskoora

I have [url]http://localhost/auto/controller/user[/url] this url and i want to rewrite this url to [url]http://localhost/auto/user[/url] please help me

Member Avatar for garromark
0
97
Member Avatar for ryan311

i have index.php [CODE] <form action="login.php" method="post"> <table width="249"> <tr> <td> <span class="style3">Username:</span> </td> <td> <input name="username" type="text" /> </td> </tr> <tr> <td> <span class="style3">Password: </span></td> <td> <input name="password" type="password" /> </td> </tr> <tr> <td> </td> <td> <input name="Login" type="submit" value="Login" /> </td> </tr> <tr> <td colspan="2"> <div align="center" class="style3">Not …

Member Avatar for ryan311
0
97
Member Avatar for sciwizeh

Hello All, While doing an assignment, I caused a simple program to slow to a crawl by replacing the calls to Toolkit.createImage() to ImageIO.read() and making all the Image references BufferedImage references. Those where the only changes I made to the program, and it went from running quickly to barely …

Member Avatar for kvprajapati
0
356
Member Avatar for webdragon89

I have: [CODE]void hughint::operator *=(hughint y) { int i,t1,t2,prod,remainder; int carry=0; for(i=num.length()-1;i>=0;i--) { t1=(int)get(i)-(int)('0'); cout<<"t1: "<<t1<<endl; t2=(int)y.get(i)-(int)('0'); cout<<"t2: "<<t2<<endl; if(carry>0) { prod=(t1*t2)+carry; remainder%=10; carry=remainder/10; } } }[/CODE] I'm using 123*100 and the answer I keep getting is 123. Help please.

Member Avatar for mattjbond
0
111
Member Avatar for Pooja J.

Hello, I have one table with user information contain unique ID and password. When user enters the ID and password in php login form, my php code should check that ID is already present or not. If it is present, my php code should check that the password is same …

Member Avatar for Pooja J.
0
191
Member Avatar for PinoyDev

Hi guys. Good day.! I just want to ask on how to retrieve a query result when i filter a field on one table that has a value base on relationship of other table. example: table1(genderid(autonumber),gender(text) table2(membername(text),gender(text) The value of table2 gender is based on table 1 via relationship created …

Member Avatar for PinoyDev
0
84
Member Avatar for tapas.chand

[CODE] hi there, i am using a sliding bar on my homepage.i want to set focus on a textbox but [COLOR="Green"]document.getElementById("userid").focus() is giving[/COLOR]error,because textbox is invisible on page load. is there any way to do this? Thanks in advance. [/CODE]

Member Avatar for tapas.chand
0
140
Member Avatar for someoneelse

is there a way to set a set a dynamic page size for gridview? for instance, i am choosing 10 from the properites window for PageSize, but I would like to have a form field on the page where the user can type the number of records they would like …

Member Avatar for sarawuthappy
0
1K
Member Avatar for pratima

i must write a program that will convert lower case letters to upper case and vice versa and if a number is entered it must display char is not a letter here is what ave written but when i run it it does not do the conversion.thanks //to convert lower …

Member Avatar for Nick Evan
0
2K
Member Avatar for heValbo

Hi! I’m going to explain to you in details of what I want to achieve. I have 2 programs about dictionaries. The code for program 1 is here: [CODE]import re words = {'i':'jeg','am':'er','happy':'glad'} text = "I am happy.".split() translation = [] for word in text: word_mod = re.sub('[^a-z0-9]', '', word.lower()) …

Member Avatar for heValbo
0
103
Member Avatar for job2617

can anyone help me to create a mouseover effect on an image or a command buttons. your response is highly appreciated . thank you for your help.

Member Avatar for kinwang2009
0
118
Member Avatar for manish_partey

Hi, I want to read all content of PDF file including text and images in to the html file and after that i want to edit that html file and again i want to export that html file into the PDF format. Please provide me any help. Thanks

Member Avatar for Ramesh S
0
79
Member Avatar for daniwebrandom

C++ program creating array the uses the dot product? normalized dot product // Matches the Signal with the Pattern Signal using the "dot product" // of Signal and Pattern divided by the square root of the energy of each. // According to the Cauchy-Schwartz inequality, the result will be // …

Member Avatar for jonsca
0
192
Member Avatar for phoenix911

i need some help on where to start... i have to get an xml file and n xsl file(already created) merge the to... so that the stye sheet is applied.... sofar all i can do is, is select the 2 files... where to go after that im not sure... any …

Member Avatar for phoenix911
0
109
Member Avatar for cmouli

Javascript is not recognising any of the hidden variables on this web form. It simply reports them to be null. I tried declaring a new variable without "runat=server". No luck. <html> <head> <script language="javascript"> function Print() { alert(document.getElementById('hdnMyHidden')); alert(document.getElementById('hdnMyHidden').value); var strmyCodes = document.getElementById("hdnmyCode").value; var strmyDesc = document.Form1.hdnmyCode.value; alert(strmyCodes); alert(strmyDesc); alert('hello …

Member Avatar for cmouli
0
221
Member Avatar for muralibobby2015

hello... i want to move specific location with in a page. for that i used like this [CODE]<a href="knowledge.php#news">HHH</a>[/CODE] then it points the news table. now i have query string is there. how to give like above. now i want to point a div which is in comment.php. where can …

Member Avatar for pushpakalpana
0
108
Member Avatar for low1988

Does anyone know how to compile the file inside the bank.zip with database ? Some of the pages can be view in Tomcat server others needs to bundle with the database

Member Avatar for jwenting
0
114
Member Avatar for blur_guava

Hi everybody, I have this expand/contract thing, whereby a button is situated below a label "Advanced Features". And so when the user clicks on "Advanced Features", the button will drop below the whole expansion. The button should be situated BEFORE the label before clicking onto "Advanced Features". Any ideas on …

Member Avatar for blur_guava
0
281
Member Avatar for diafol

Hi folks, I'm looking for a function, similar to str_replace that replaces just the first occurance of a specified string. I have found such a function: [url]http://www.help2go.com/Tutorials/Programming/PHP_:_How_to_replace_only_the_first_occurrence_in_a_string_with_str_replace.html[/url] However, this does not take into consideration of 'search from an initial position'. My interest is with regard to replacing strings within a …

Member Avatar for diafol
0
176
Member Avatar for Learning78

Hi; I have a number of text strings in an access db file. I want to compare those text strings with the user input. I need to make sure that atleast 60% of the text input matches with the correct string to declare it a correct answer. e.g. for a …

Member Avatar for WaltP
0
272
Member Avatar for axed

Hi, I want to know when and where is memory allocated for static variables. If: 1) static variable is in a function 2) static variable is a member of a class 3) a global static variable inside a file of code. Much appreciated. Google hasn't been much of a friend …

Member Avatar for axed
0
160
Member Avatar for jagsar2323
Member Avatar for tryingtofindout

[CODE]while ( $row = mysql_fetch_array($sql) ) { echo "<table>"; } [/CODE] if nothing is found in the database relating to the query i should get like this [CODE] while ( $row = mysql_fetch_array($sql) ) { [COLOR="red"]if nothing is found in the database[/COLOR] echo "<table no results found>"; } [/CODE]

Member Avatar for tryingtofindout
0
130
Member Avatar for cjsowm

[code] package assignment; import java.io.*; public class AddJava{ public static void main() { int num1,num2,sum; BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); try { System.out.println("enter first digit"); num1=Integer.parseInt(stdin.readLine()); System.out.println("enter second digit"); num2=Integer.parseInt(stdin.readLine()); sum=num1+num2; System.out.println(sum); } catch(IOException e) { System.out.println("input error"+e); } } } [/code] [code] package assignment; import javax.tools.*; import java.io.*; import java.lang.reflect.Method; …

Member Avatar for BestJewSinceJC
0
193

The End.