199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for RLS0812

I am attempting to use preg_replace to purge everything except letters and numbers in the $_POST, however is seems to be failing to work. Sample code below demonstrating the problem. <html> <?php if( isset($_POST["name"]) || isset($_POST["age"]) ) { $x1 = preg_replace('[^A-Za-z0-9]', "", $_POST['name'] ); $x2 = preg_replace('[^A-Za-z0-9]', "", $_POST['age'] ); …

Member Avatar for RLS0812
0
234
Member Avatar for barry.gold.963
Member Avatar for andrew mendonca

Write a program to read a maze from a text file into your array, print the unsolved maze, solve the maze, and then print the solution. You may assume the maze will fit in a 24-row by 81-column character array (for 80 character C-strings). The maze will be in a …

Member Avatar for owenransen
0
1K
Member Avatar for klfrancisco

I have a social security program that I need finished. I have the code so far but I need to know how to make is where the user can only input numbers and no letters. This is what I have and I just do not know how to program only …

Member Avatar for deceptikon
0
322
Member Avatar for hassan12

// onlyme.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include<stdlib.h> using namespace std; int inputa; int inputb; int Andgate(void); int orgate(void); int notgate(void); int andgate(void) { cout<<"input Gate A, enter 1 or 0, enter 2 to end program "; cin>>inputa; cout<<"input Gate B, …

Member Avatar for richieking
0
118
Member Avatar for beastie805

Basically I need to change the Two StudentType* functions to const but i know its not letting me because of the &ersand sign on the ReadStudentData function, is there anyway around this? I am not asking for someone to do my hw just point me in right direction it brings …

Member Avatar for richieking
0
185
Member Avatar for Kwesi_1
Member Avatar for LaxLoafer
0
151
Member Avatar for Simon180

Hi there I got a little problem with a small bit of code am unfamiliar with orcale database the scripts I have were done by a other person for version 6/7 am currently using version 8i for compatibley reasons with the server software I am currently setting up. the script …

Member Avatar for pritaeas
0
992
Member Avatar for ultmt.punisher

I want to put 1 variable in my send.php page and get its value by if statement on 2nd (page-contact-us.php)page, because I have my form in 2nd page with <form action="<?php bloginfo('template_directory');?>/send.php" method="post" id="contactform"> and in my first page (send.php) i have if statement like, if($security=="10") { mail($to,$subject,$message); $var='1'; } …

Member Avatar for diafol
0
294
Member Avatar for TIM_M_91

Ok so I have three tables Customers,Invoices,and Delivery with the fields: Customers: CustomerID Address ........ Orders: OrderID DeliveryID ....... Delivery: DeliveryID DeliveryToAddress ...... So what I want to do is update my delivery table for the DeliveryToAddress for when the customers address changes within the customers tables. To get the …

Member Avatar for diafol
0
132
Member Avatar for paul.rothenberger

Hey Everyone, I'm stuck... I've got a 1-dimensional array from a text file that is displaying in a list box. I have buttons to sort ascending and descending but cannot seem to get them to work. My code for the array is Dim name() As String = IO.File.ReadAllLines("Countries.txt") lstCountries.Items.AddRange(name) This …

Member Avatar for velota27
0
283
Member Avatar for beastie805

this is probably a dumb question but how would I remove the array so that there is no max size on it. struct StudentType { string studentName; int testScore;//Between 0 and 100 char grade; }; const int NUM_STUDENTS = 20; int main() { StudentType student[NUM_STUDENTS]; } this is what i …

Member Avatar for beastie805
0
124
Member Avatar for david.roun.7_1

I have a webiste and would like to send an email to someone, and myself, when they request their lost password. For some reason, I can't get the mail() function to work, no matter what I do. I unsuccessfully tried to model it after the listserv I created and am …

Member Avatar for david.roun.7_1
0
174
Member Avatar for mikewyatt

I am trying to add /edit records in an embedded database. I have written some code that I think might work, but I would like a second set of eyes to look at to see if it is coded correctly..... private void Save_Item___MouseClicked(java.awt.event.MouseEvent evt) { if ("Equipment - Mundane".equals(jComboBox1.getSelectedItem().toString())) { …

Member Avatar for mikewyatt
0
211
Member Avatar for casey.li.146

Hi, I have a already designed web page with tables and stuff, but there are challenges for me to insert or include php and inserting the data that is from mysql to the tables in the webpage. I do not know how to do it to maintain the integrity of …

Member Avatar for casey.li.146
0
294
Member Avatar for Exinta

In my project I have a Settings form and a Main form. I'm trying to call the Main form's MasterReset function from the Setting form, but nothing happens. The Main form's MasterReset function looks like this: public void MasterReset() { DialogResult dialogResult = MessageBox.Show("Are you sure you want to perform …

Member Avatar for deceptikon
0
2K
Member Avatar for borgasia

Can't get this work properly: FormatRange(ref ws.Range[curRange.Offset[1, 0] , gives A property or indexer may not be passed as an out or ref parameter Any help would be thankfull public static void WriteDetailData(ref Worksheet ws, string type, ref int row, int col, Hashtable parts, Hashtable refList) { Range curRange = …

Member Avatar for borgasia
0
4K
Member Avatar for mln_ndh

Hello I'm new to android development. So I've tried this coding where when I clicked on the imageview it will change to another image. And it's working perfectly. But I have 10 imageview. And every time each of the image being click it will change to another image. Is there …

0
170
Member Avatar for Tko_1

Hello, so the code i have gets the files in the directory and lists them in a dropdown. what im trying to do is rename the selected dropdown file with the input of the text field. error i get is: Warning: rename(test.php,) [function.rename]: No such file or directory in..... For …

Member Avatar for Tko_1
0
191
Member Avatar for gahhon

public class PrintHelper { public PrintHelper() { } public static void PrintWebControl(Control ctrl, string Header, string Date) { Label lblHeader = new Label(); lblHeader.Text = "MSJ Bank Financial - " + Header + " (" + Date + ")<br/><hr/><br/>"; PrintWebControl(ctrl, lblHeader, string.Empty); } //Print Method public static void PrintWebControl(Control ctrl, …

Member Avatar for gahhon
0
136
Member Avatar for Deep Modi

I am using the richtextbox, and now when I am saving the File, then the File get saved but not as I want.? Example: File Name: example File extension: .txt Body: **1.)**Hey guys, Whats up? **2.)**R u Fine ??? **3.)**Reply soon Now When I save the file and open in …

Member Avatar for Deep Modi
0
1K
Member Avatar for Lilantha

I have a simlpe excel sheet with table data and also I have web page with SpryTabbedPanels . so i want to show this my excel sheet in one Sprytab in the web page. So anyone explain me how to show excel sheet in DVI tan

Member Avatar for urtrivedi
0
465
Member Avatar for Syafiq_1

why i cant move the formula under int main()? #include <iostream> #include <stdlib.h> using namespace std; double fIntoCm(double dIn) { double dCm; dCm = dIn*2.54; return (dCm); } double fYtoM(double dY) { double dM; dM = dY*0.914; return (dM); } double fOtoM(double dO) { double dM2; dM2 = dO*29.574; return …

Member Avatar for gerard4143
0
190
Member Avatar for Delira

I'm trying to finish up this vending machine. It worked well until I tried to add multiple items via inheritance while using a toString method. I'm not sure what is wrong about how I've done this. import java.util.Scanner; public class VendingMachine { public static double moneyCredit; public static double itemCost; …

Member Avatar for Delira
0
3K
Member Avatar for Abdul Qayyum_1

Hello, I am trying to get HTML source of my vendor website's URL using cURL but I am not getting correct result, the output is coming only Header Template and Footer Template. I have given code below which I m using. Please help me out to get correct result. Thanks …

Member Avatar for pritaeas
0
371
Member Avatar for Indians

![1085c1c3bd57d0a1fb75f1b1edbbda0f](/attachments/small/4/1085c1c3bd57d0a1fb75f1b1edbbda0f.PNG "align-left") look at this image. when i send this page via email it shows the php code. it does not fetch the details from mysql and then i'm fetching the mysql records based on the particular voucher id. how to send mysql fetch records page via email?

Member Avatar for Tpojka
0
266
Member Avatar for Rawan_1

Complete program - design two recursive functions with menu: Write a program that asks the user to input a positive integer, and then produces a menu where the user can choose to either check if the number entered is a prime number or print the sum of all the integers …

Member Avatar for kal_crazy
0
153
Member Avatar for fheppell

The output of this code is a 0 byte file: if ($_GET['download']== 'true'){ $downloadarray = array(); while($row = mysql_fetch_array($res)){ $url= $row['loc']; $path = 'tmp/'; $path .= rand(100,999); $path .= $row['name']; $fp = fopen($path, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); curl_close($ch); fclose($fp); echo print_r($data); $downloadarray[] = array($path, …

Member Avatar for fheppell
0
328
Member Avatar for castajiz_2

Is there any option which i can activate when using ECLIPSE so that when i m typing S... for String or i.. for int etc... to automaticly give me suggestions that i want a int if the first letter is i or i want a String if the first letter …

Member Avatar for JamesCherrill
0
183
Member Avatar for meempat

I am just trying a simple code which executes on a form submission ( self). It runs perfect in local. But shows "Error: No database selected" in the remote server. Can anyone say why ? Thank you [CODE]<?PHP $con = mysql_connect("localhost","aby","pass123"); if (!$con) { die('Could not connect: ' . mysql_error()); …

Member Avatar for diafol
0
5K
Member Avatar for sandipan.rcciit

hi friends, I already have a code that upload image with re size it. [CODE]<form action="<?php echo $_server['php-self']; ?>" method="post" enctype="multipart/form-data" id="something" class="uniForm"> <input name="new_image" id="new_image" size="30" type="file" class="fileUpload" /> <input type="submit" name="submit" value="Submit"><p> </form> <?php if(isset($_POST['submit'])){ if (isset ($_FILES['new_image'])){ $imagename = $_FILES['new_image']['name']; $source = $_FILES['new_image']['tmp_name']; $target = "images/".$imagename; move_uploaded_file($source, …

Member Avatar for diafol
0
996
Member Avatar for aelajj

I need to create a method compact that can remove all zeroes from an array and leave the order of other elements unchanged, but without creating a new array. The method must actually remove all zeroes, not just print out the other elements, and it should only use one private …

Member Avatar for JamesCherrill
0
1K
Member Avatar for annyangel

hlo, i have a code in php with different functions. i want to test that functionality with php code. plz tell me how this automated test code would be written? individually i had test these functions but there is a requirement of a single code with which all the functions …

Member Avatar for annyangel
0
312
Member Avatar for daniel.s.mattos

I am trying to create a simple string class, but i am getting a run time error. What i want to accomplish is to store a const char pointer to a char pointer. I am trying to use the strncpy function, i also tried the memcpy, but both gave the …

Member Avatar for kal_crazy
0
678
Member Avatar for deceptikon

This will be a relatively quick article because it's a simple issue. The `system` function gets a lot of flak for being slow because it calls the shell runtime to execute a command, but I rarely see the more devastating issue of security brought up. `system` is insecure in many …

Member Avatar for Assembly Guy
0
305
Member Avatar for jeromesturt
Member Avatar for Shaun_2
0
236
Member Avatar for m1m6jbr

I'm designing a LongDouble datatype which take a 16 byte space. my question is how to add or substract a two double numbers correctly ex : a= 3.025466 b=4.132655`` the result will be 7.158121 but in my code it's different here is my code LongDouble LongDouble::operator+( LongDouble olong) { LongDouble …

Member Avatar for kal_crazy
0
211
Member Avatar for murdoc311

'Hi all. I'm trying to create an application that computes the average monthly 'rainfall, number of months with above average rainfall, and the number of with 'below average rainfall, given the rainfall amounts for each month in a year. 'is what I have so far. Sub Main() Dim sngRainfall() As …

Member Avatar for murdoc311
0
344
Member Avatar for Ghayth_1

hello everybudy i'm writing a code to revers a stack but i have a wrong output when i Calling the reverse function can anyone help me please :) :) # header.h # class intnode { public : intnode(int , intnode*); int info; intnode* next ; }; class Stack { public: …

Member Avatar for Ghayth_1
0
262
Member Avatar for marComm

Hi, I am trying to add a new set of filters to one large set of data on this page: http://vigstage.pearsonhighered.com/etextbooks/titles-available/index.html I modified code that I took from a different site- I am calling a data.js file that filters by discipline. I want to add a second set of filters …

Member Avatar for marComm
0
134
Member Avatar for code2cplus

a simple program to find out the permutations of all the letters in the word ex: abc gives abc acb bac bca cba cab[code]void swap(char *p,char *q){ char c; c=*p; *p=*q; *q=c; } void perm(char *a,int m,int n) { if(m==n){ for(int i=0;i<=n;i++) cout<<a[i]; } else { for(int j=n;j<=m;j++) { swap(a[j],a[n]); …

Member Avatar for Assembly Guy
0
685
Member Avatar for jackbauer24

My computer does not have the swing.properties. How to make a swing.properties file and with what software?

Member Avatar for durim.kryeziu.927
0
1K
Member Avatar for stresstedout

Hi, I am new to java, so please be nice. I am trying to make an application in Netbeans, i know the basics of how to use the program but get a little stuck when it comes to programming. At the moment i am trying to get a button to …

Member Avatar for ObSys
0
165
Member Avatar for razamughal67

I have a 2 textbox 1 text box is empty . text2 is multine true second text box have some words. text2 text Example : "12345 is my number and 03451234567ddddsfsa somethingis wrong034512345find 03451234567" .............. i want to find 03451234567 11digit number in text box with first 3 or 4 …

Member Avatar for Reverend Jim
0
320
Member Avatar for Mehak murtaza

there is a large busy cosmetic store. In store, for billing, there are four counters with four tellers (who deal payment etc) . A customer comes to the store and collects the things he/she wants to purchase and go to one of the counters to pay for purchase. If there …

Member Avatar for Ancient Dragon
0
234
Member Avatar for dean.ong.14

I know this is stupid but how do i add a quit button? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) def frame(frame, side=LEFT, bg="black"): f = Frame(frame, background=bg, padx=5, pady=5) f.pack(side=side, expand=YES, fill=BOTH) return f …

Member Avatar for dean.ong.14
0
198
Member Avatar for Iikeloa

Hi I'm working on a registration form.So every one can register but to regeister you need to upload your logo.! this is the file:register.php : <?php $page_title = "register"; require_once("inc/config.php"); require_once('inc/header.php'); ?> <center> <form action="check-register.php" method="POST" encrypt=”mulipart/form-data”> <input type="text" name="username" /><br /> <input type="password" name="password" /><br /> <input type="password" name="repassword" …

Member Avatar for Iikeloa
0
227
Member Avatar for princessophia

Here is the problem as it is written in the book: Write a function that accepts a C- string as an argument and returns the length of the C- string as a result. The function should count the number of characters in the string and return that number. Demonstrate the …

Member Avatar for Assembly Guy
0
255
Member Avatar for cmps

Hey all, I would like to know why when having big data in mysql table, executing a query for the first time takes 0.1.. sec, but if executing again the same query later, it will take only 0.0006 sec ? Exemple: SELECT name FROM `users` where id > 310000 limit …

Member Avatar for cereal
0
230
Member Avatar for <M/>

Hello.... I am trying to create my first iphone app and I have decided to make a compass. I am trying to make the compass face a specific gps coordinate rather than facing north. Does anyone know how this is done or have any resources that I can use? Thanks!

Member Avatar for rubberman
0
153

The End.