64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for cwarn23

Hi, I have some strings but I want to convert them to binary (1 way). Are there any functions other then the compression functions that will convert strings to binary? Thanks. cwarn23

Member Avatar for cwarn23
0
70
Member Avatar for 6pandn21

Hello guys! I am trying to implmenent a jQuery library and it worked fine when I ran it out of server. When I tried to run from a XAMPP based web server at home; the images doesn't show and keeps giving this error: 'You don't have permission to access the …

Member Avatar for 6pandn21
0
19K
Member Avatar for greedydeepak
Member Avatar for Rohith Reddy

Hi, I have a problem regarding displaying the files. Actually, my code displays both pdf's and images. I am thinking to have a script to check whether the file is image or pdf before it gets displayed. Can anyone help in this regard. Thanks, Rohith

Member Avatar for Geekitygeek
0
101
Member Avatar for Vigasdeep

Hello, i'm having 2 tables one is CLG and other is STUD. in CLG(columns CID-autoincrement and CName) and in STUD( three columns are ID-autoincrement,Name and CID) > im using this code to store the records into tables [CODE]$sql="INSERT INTO clg (Cname) VALUES ('$_POST[cname]')"; $id=mysql_insert_id(); $sl="INSERT INTO stud (name,CID) VALUES ('$_POST[name]',".$id.")";[/CODE] …

Member Avatar for Vigasdeep
-1
116
Member Avatar for Dimansu

Hi, I have a textbox named fullnameTextbox. I want the user to only type letters in that textbox.I have a code for it but when there is a spacebar between 2 correctly typed words my error message pops up.How can i fix this? [CODE] Match matchMyRegex = Regex.Match(fullNameTextBox.Text, "^[a-zA-z]*$"); if …

Member Avatar for Geekitygeek
0
109
Member Avatar for jozz3

Hello In my program I have a text file that I read from and write to. However, I would like to display the contents of the text file in an alligned and sorted manner. The contents currently read- name, score name, score Would I have to convert this information into …

Member Avatar for jozz3
0
2K
Member Avatar for saulocpp

Hi all. First post on the forum. I'm writing a generic funtion to open files along my program, but am worried if the pointers are being closed correctly. The function definition: [code=c] FILE* openfile(char *FileName, char *Mode) { FILE *TempFile; if((TempFile = fopen(FileName, Modo)) == NULL) { fprintf(stderr, "Couldn't open …

Member Avatar for jephthah
0
192
Member Avatar for LevyDee

So I finally decided to take on some Windows Programming, and everything is going fine, except this: Edit: using this tutorial [url]http://bobobobo.wordpress.com/2008/01/31/how-to-create-a-basic-window-in-c/[/url] [code] #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { WNDCLASS myWindow; myWindow.cbClsExtra = 0; myWindow.cbWndExtra = 0; myWindow.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); myWindow.hCursor = LoadCursor(NULL, …

Member Avatar for nithy.sweety
0
521
Member Avatar for prasadk14

Hi, I'm trying to receive broadcast messages using C# code in an ISDN network with BRI interface at my end. I see the packets sent to the broadcast ip address (239.255.255.255) on some ports using Comm View tool. But when I try to listen to this IP address, it says …

Member Avatar for prasadk14
0
2K
Member Avatar for fyp

so far I could manage to create OpenFileDialog and select the txt file. after that ,How could I display the contect of selected txt file into TextBox? [CODE] ************************************************************* private: virtual System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { System::Windows::Forms::DialogResult OK = openFileDialog1->ShowDialog(); } private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) { ???????????????????????????????? …

Member Avatar for fyp
0
653
Member Avatar for tinkeydo

The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 4 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character …

Member Avatar for tinkeydo
0
183
Member Avatar for rouse

I am looking for a correct way to test a JavaScript regular expression for phone number and email address. This includes the RegExp string and the syntax. First the syntax: I am confused about using the quote mark (“) in defing the RegExp. Is it [code] var email_test = new …

Member Avatar for rouse
0
173
Member Avatar for ErlendHL

Hey! I am making a chat program. I have a function Chat(); [code] function Chat(){ var fullMessage = document.getElementById('name').innerHTML +' '+ document.getElementById('message').value+'\n'; fullMessage = fullMessage.replace(/\'/g,"'"); fullMessage = fullMessage.replace(/\\"/g,"&quot;"); fullMessage = fullMessage.replace(/\[/g,'*lsb?'); fullMessage = fullMessage.replace(/\]/g,'*rsb?'); sendRequest('http://3rlend.com/pjattappend.php','F=allMessages.txt&D='+'fullMessage','POST',true); document.getElementById('message').value=""; } [/code] sendRequest(url,params,method,Asynch); i an AJAX function. Now when I try to execute Chat();, …

Member Avatar for ErlendHL
0
1K
Member Avatar for piers

Now I am using php and mysql so not sure if this should be in the php section. If you can help I would be most greatful. I am trying to create a search page so that it shows data and one of the columns in the mysql database contains …

Member Avatar for piers
0
111
Member Avatar for PRINCE01

I need instance method(s) within the class am writing that convert from any base to base 10 & vice versa WIThOUT USING ANY LIBRARY ROUTINE. //this is what i have so far private int DecimalToBinary(int Decimal, int BaseNumber) { int Reminder; do { Reminder = Decimal % BaseNumber; } while …

Member Avatar for PRINCE01
0
318
Member Avatar for Bobon

Hey guys, my second java problem in 24 hours :) I'm trying to call a method from another class. So basically what i'm trying to do is put the date from the main class through the method "tomorrow" so it adds 1 to the int day and returns the date …

Member Avatar for Bobon
0
110
Member Avatar for johmolan

I have a Form1 with a method called OrdreUpdate2 I try to run thad method from another form by using the command Form1.Ordreupdate2 in a buttonclick. But nothing happens..What am I missing here?

Member Avatar for johmolan
0
98
Member Avatar for yapkm01

I know that this book is for C++ Primer 3rd Edition (Stanley Lippmann) but can this be used for C++ Primer 4th Edition. There is no C++ Primer answer book for the 4th Edition. Still comtemplating if i should get it. :?:

Member Avatar for Spartan-S63
0
146
Member Avatar for dondajr

Well, here i am one more time. In previos post I asked here about read files. All of those problem were fixed, but now, i really have a problem that I don't know why is happing. In the first , i need to explain what my system will do: My …

Member Avatar for dondajr
0
90
Member Avatar for vivekmet

Hi, Anyone please help me on how to proceed for reading and writing file in j2me. If anyone can provide sample code then that will be very useful! Thank you!

Member Avatar for peter_budo
0
89
Member Avatar for Simes

[CODE=python]#Code should always be in a method or class #Always start variable names with lowercase, classes could be capital #input.upper() allows the user to use lower or upper case for each option import random def isint(x): try: int(x) return True except: return False print "Invalid guess. " def getGuessValidator(): while …

Member Avatar for Simes
0
410
Member Avatar for Colin Mac

I have this C program with multiple files and I want to introduce a new file called enemy.c. and I'm wondering if I'm going about this right. game.h [code] #ifndef GAME_ #define GAME_ extern void game (void); extern void enemyFunc (void); extern int enemyPosX; #endif [/code] main.c [code]int main (void) …

Member Avatar for virgoptrex
0
184
Member Avatar for kayba

[code]import java.util.Calendar; import java.util.Scanner; public class Main { public static void main(String[] args) { int userBirthDay = 0; int userBirthMonth =0; int userBirthYear=0; Scanner input = new Scanner(System.in); System.out.println("Enter The day of your birth"); userBirthDay = input.nextInt(); System.out.println("Enter The month of your birth"); userBirthMonth = input.nextInt(); System.out.println("Enter The year of …

Member Avatar for kayba
0
125
Member Avatar for valter

Hi, This has been driving me crazy so I hope someone can assist. I have a project with several custom dlls being referenced. I have found that although I add changes to my dll and rebuild etc, the program uses the old version. When I look at add reference there …

Member Avatar for jcao219
0
96
Member Avatar for Bobon

Hey lads, I have a small problem re inheritance. The 1st piece of code is the superclass which contains hour and minute. The 2nd piece of code which is the subclass, contains the int second. The 2nd piece inherits the code from the 1st piece. Now when seconds go over …

Member Avatar for Bobon
0
74
Member Avatar for phpdev

Hi all! this is my first post in this site.. the following code works fine with ff but not with **ie 8** - i had given [B]'windowname' [/B]in the place of **'_blank'** for ff, but that did not allow ie to open the window, so replaced it with blank, now …

Member Avatar for Suresh Vanam
0
144
Member Avatar for musikluver4

[code] import java.io.*; public class SortDoubleArray { public static void main(String[] args) throws IOException { double[] doubleValue = new double[10]; Input(doubleValue); ascendingSort(doubleValue, doubleValue.length); descendingSort(doubleValue, doubleValue.length); } public static void Input(double[] array) throws IOException { BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in)); String[] numbers = {"first", "second", "third", "fourth", "fifth", "sixth", …

Member Avatar for litchi
0
224
Member Avatar for asmhelp

Hello, I'm having a problem trying to trying to store a local variable in my asm program. I push 3 parameters: nbrElts (number of elements in the array), nbrArray (the address of the array), and result1 (the average). I'm trying to divide by the number of elements that I push …

Member Avatar for asmhelp
0
169
Member Avatar for rouse

I am writing a contact form using jQuery AJAX POST and PHP. The form works well and sends the email. What I want to know is how to get the return values for error and success on the same page where the contact form is rather than having the message …

Member Avatar for rouse
0
115
Member Avatar for Krzysztow

Hello everyone, I have a problem and almost found a solution, for example this: [url]http://www.parashift.com/c++-faq-lite/multiple-inheritance.html[/url]. However in my case I cannot solve it in a proposed way and will explain it shortly why... So basically, I have a BaseView, that derives from QWidget like this: [code=c] class BaseView: public QWidget …

Member Avatar for Krzysztow
0
86
Member Avatar for Pynolathgeen

I'm programming my own game at the moment, its connecting to a server and the server sends some spawn info and eventual other players who are connected. When a player moves, and an other player is also connected, the client of Player2 crashes. I don't know what is causing this, …

Member Avatar for Pynolathgeen
0
115
Member Avatar for rainhider

[CODE] $result = mysql_query("SELECT * FROM Users") or die("could not select ".mysql_error()); if (!$result) { echo 'Could not run query: ' . mysql_error(); } $rows = mysql_num_rows($result) or die("no rows" . mysql_error()); if ($rows > 0) { $row = mysql_fetch_assoc($result); while ($row = mysql_fetch_assoc($result)) { print_r($row); }[/CODE] Every time I …

Member Avatar for rainhider
0
122
Member Avatar for mjacqu3

I'm new to Assembly and trying to write a program that requires a simple graphic display: a 10x10 grid of "|##|" . I need to make changes to it and redisplay it every so often. I can get it to display perfectly once but the second time I call the …

Member Avatar for mjacqu3
0
135
Member Avatar for dondajr

Hi guy, i have this little program: [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <unistd.h> //Obtem o nome do buffer de trade baseado na hora char *btfile() { char *fname; fname = malloc(14); time_t t = time(NULL); struct tm *lt; lt = localtime(&t); strftime(fname, 14, "%m%d%H%M.tbf", lt); …

Member Avatar for dondajr
0
147
Member Avatar for SasseMan

Hi, I have really weird layout problem. I have a class VerticalGridPanel, which uses GridBagLayout to place components top to bottom, left to right, nothing special. Then I have a List of components, which i want to add a part of to a VerticalGridPanel. I then want to add another …

Member Avatar for SasseMan
0
291
Member Avatar for lrolsto1

I habitually compile after every change I make, i had all of 5 minutes to start a project and this will not compile!!: [CODE] public class Battleship{ public static void main(String[] args){ int boardInput = parseInt(args[0]); } }[/CODE] I get this error: Battleship.java:19: cannot find symbol symbol : method parseInt(java.lang.String) …

Member Avatar for lrolsto1
0
123
Member Avatar for DanielaCrisan

[code] private void button1_Click(object sender, EventArgs e) { n = Convert.ToInt32(textBox1.Text); for (; i < n; i = i + 2) { textBox2.Text = textBox2.Text + " " + Convert.ToString(i); ; } } [/code] I an mentioning that i,n=0; is located in the declarations zone of InitializeComponent(); I get the …

Member Avatar for Diamonddrake
0
151
Member Avatar for davidgoldsmith

syntax error, unexpected T_STRING in /home/earning1/public_html/wordpress/wp-content/themes/DavidGoldSmith_Theme/sidebar.php on line 40 Don't see the error???[code]<div id="cat_top"></div> <div id="sidebar"> <div class="rsidebar"> <div class="blog"> </div> <div id="photo" class="picture"> </div> <p> <?php wp_list_pages('title_li=<h2>David's Links</h2>' ); ?> <ul style="line-height:18px;"> <li ><div ><!-- SiteSearch Google --> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://davidgoldsmith.com/wordpress'>Home for David's Blog</a> </td> …

Member Avatar for Arsench
0
85
Member Avatar for oggiemc

Can someone please tell me what im doing wrong in this program..im gettin a compiler error saying: C:\Dev-Cpp\projects\proto.cpp In function `int main(int, char**)': 46 C:\Dev-Cpp\projects\proto.cpp a function-definition is not allowed here before '{' token 46 C:\Dev-Cpp\projects\proto.cpp expected `,' or `;' before '{' token C:\Dev-Cpp\projects\Makefile.win [Build Error] [proto.o] Error 1 The …

Member Avatar for oggiemc
0
125
Member Avatar for Accendo

This program I thought was working fine. It reads something I type in then it's supposed to break up the words (or random letters) separated by a " " and pop them into array [B]arr[/B]. It works, well sometimes... I don't know what's stopping it and them other times allowing …

Member Avatar for Accendo
0
171
Member Avatar for sachintha81

People, I need help with this problem. I have a string like the following. [CODE]<JDF ID="n20090409EQ0001" Type="Product" JobID="000004-01" xmlns="http://www.CIP4.org/JDFSchema_1_1" Status="Waiting" Version="1.3" xsi:type="Product" JobPartID="B30" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:scr="htt://new.scr.url/abc" Activation="Active".......[/CODE] It continues like that. From it, I need to extract ALL the occurrences which start with "xmlns:" For example, you have these three tags …

Member Avatar for fesmaeili
1
167
Member Avatar for ragnarok511

I am kind of new to php. However, I created a form in html and the form action is linked to a php which all on the localhost. When I run the html file enter in information and hit submit. A window pops up and asks me if I want …

Member Avatar for ragnarok511
0
136
Member Avatar for Lolalola

Hi, i have error in line: "student.Add(info);" Error 1 Use of unassigned local variable 'info' [code="C#"] public struct Students { public string Name; public int ID; public string Date; }; static void Main(string[] args) { ArrayList student = new ArrayList(); Students info; info.Name = "Marko"; info.ID = 12; student.Add(info); foreach …

Member Avatar for Lolalola
0
66
Member Avatar for checho

i have the next string array {10100100, 11010000, 01000001, 11011000, 00000000, 10111100} how can i convert it to byte[]. i tried bitconverter and some encoding options it didnt work. Any ideas?

Member Avatar for checho
0
158
Member Avatar for David22

Hey guys. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. Here is the line: [CODE]prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");[/CODE] All the field names and variables exist correctly, so I really …

Member Avatar for csjbot
0
99
Member Avatar for PierlucSS

I've been working on something with alot of iteration (foreach) and now that everything is working I'd like to optimize it by changing it to link. Currently I am trying to translate this foreach code to LINQ [CODE] int count = 0; foreach( string file in Directory.GetFiles( path )) { …

Member Avatar for PierlucSS
0
145
Member Avatar for ganesanronaldo

hey guys... Thanks for your help in my previous post. Havin another problem in my stack assignment this time.. Have done how much i could but there is a lil error in it.. Possible in the [B]convertip[/B] function... Hope i can get the help needed.. Thanks in advance...=) [CODE]#include <stdio.h> …

Member Avatar for ganesanronaldo
0
146
Member Avatar for Katsurou

Hi so I wanted to make a little quiz in php [CODE]if(isset($_POST['City'])) { echo "<strong>Answer nr1:<BR></strong>"; $cities= $_REQUEST["City"]; $odp = "Madrid" || "madrid"; //$odp = "Madrid" && "madrid"; //neither of OR/AND works here if($cities== $odp){ echo "Your answer is <Font Color=#009900>correct</font> <P>"; } elseif($cities== ""){ echo "Please fill in this …

Member Avatar for Katsurou
0
110
Member Avatar for charlieruns

To be honest...I am horrible at java. I just got a job and have missed class a few times because of it and im supposed to create a project that can read the number of lines, words, characters, average words length, and letters in a file. I am trying to …

Member Avatar for javatechgirl
0
1K

The End.