199,114 Archived Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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; } … | |
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 … | |
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 … | |
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 | |
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, … | |
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. … | |
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; … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 ( … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
[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] | |
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 … | |
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 … | |
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()) … | |
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. | |
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 | |
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 // … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
Please can any one mail me jsp source code of an e-banking project at [snipped] | |
[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] | |
[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; … |
The End.