64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for voidyman

I want to remove blank lines (empty or with spaces and tabs) from a file from within a perl script. here's what i tried. [CODE]`sed '/^ *\$/d' $file1`;[/CODE] Does not seem to work for some reason. Any Help please?

Member Avatar for voidyman
0
939
Member Avatar for ktsangop

Hello everyone! I want to add a licence expiration feature in my application (written in visual c++). When the licence expires i would like my application to generate a random numerical key which will be sent to me by the user. Using this key and a personal key-generator i would …

Member Avatar for ktsangop
1
2K
Member Avatar for abshah

Hi, I am facing a bit of issue in writing a network software. When I try to send or receive a struct that contains a data type of 8 bytes the next sent or received struct is somehow affected. I have a few things in mind but first I wanted …

Member Avatar for abshah
0
481
Member Avatar for FBG

Hi everyone, I'm a beginner in working with PHP and I'm stuck with an annoying problem. With the help of a tutorial I've made a pagination for database results that works great. Now I'm trying to adapt the code and use the same pagination for a search-page on my website, …

Member Avatar for FBG
0
2K
Member Avatar for varoluscu_prens

Hi There; I have a problem during connection to a MS-SQL server. I copy the code there: [url]http://www.webcheatsheet.com/PHP/connect_mssql_database.php[/url] [CODE] <?php $myServer = "localhost"; $myUser = "Murat"; $myDB = "examples"; //Point 1 //connection to the database $dbhandle = mssql_connect($myServer, $myUser) or die("Couldn't connect to SQL Server on $myServer"); //Point 2 //select …

Member Avatar for varoluscu_prens
0
299
Member Avatar for Ruchi224

Hello !! I have a windows form having combobox and textbox controls.. I have to generate a part number, consisting of combobox and textbox values included.. I can explain in detail.. This is the code i have used to define a variable "type".. [CODE] If ComboBox1.SelectedIndex = 0 Then type …

Member Avatar for Ruchi224
0
138
Member Avatar for nchy13

i don't know why but my compiler reads only upto insert statement. this is what compiler looks like: [B]nchy@ubuntu:~/Desktop$ g++ tree.cpp nchy@ubuntu:~/Desktop$ ./a.out 2 insert 0 14 10 85 15 70 20 60 30 50 65 80 90 40 5 55[/B] [COLOR="Red"]i want to implement following input format[/COLOR] 2 insert …

Member Avatar for jmichae3
0
120
Member Avatar for furlanut

i posted on this earlier and with forum help get my function code to work as I want when I test it. But when I insert it into the php document I only get errors. The function is: [CODE] <?php function fix_it($name) { $name=ucwords(strtolower($name)); echo $name; } ?>[/CODE] The document …

Member Avatar for Stefano Mtangoo
0
149
Member Avatar for shahiduop

hi i display images from database, i want that there should be at most 4 photos in each row,when the number photos exceeds 4, it should displays the remaining images in next rows, the code i have written displays all images in the same row, i don't know how to …

Member Avatar for andy106
0
951
Member Avatar for showman13

Hi All, I know this sounds like a simple issue, and it may in fact be, but I have never figured out how to give the admin of a website an easy to use ability to enter the body of an email that they want to send to their members. …

Member Avatar for showman13
0
101
Member Avatar for triumphost

Hey guys I'm here again with another problem. I want to search in a string for a string with quotes in it. Example: [CODE]String to search = {' </a></div></div></div><div class="clearfix"><table cellspacing="0" class="wsod_quoteData"><tr><td class="wsod_last wsod_lastIndex" nowrap="nowrap" '} What to search for = {' <table cellspacing="0" class="wsod_quoteData"> '} Then if found, from …

Member Avatar for triumphost
0
173
Member Avatar for crownedzero

Using strings [CODE] #include <iostream> #include <string> using namespace std; string replaceSubstring(string, string, string); int main() { string string1 = "the dog jumped over the fence", string2 = "the", string3 = "that", newString; cout << "This program will replace a keyword in a sentence with another word.\n\n\n"; cout << "Our …

Member Avatar for mzimmers
0
2K
Member Avatar for Mirfath

hi! i have a form to enter data i want to put validations in the text boxes and prompt the user if he/she enters the wrong data i want to put validations for phone number Date of birth email i tried using regex but it says that i am missing …

Member Avatar for Mirfath
0
138
Member Avatar for libathos

Is there a way i can modify the Bresenham circle algorythm in a way so that it actually draws arcs with specified start and end angle instead of complete circles? the algorythm in c is like this [CODE]void DrawCircle(int xM,int yM,int radius) { int f = 1 - radius; int …

Member Avatar for Adak
0
194
Member Avatar for lxXTaCoXxl

I've noticed that while programming sometimes a tool tip window pops up beside the selected class in the drop down window while typing. This tool tip often contains a description of the class or variable that is highlighted or selected. I was wondering how to do this for my own …

Member Avatar for lxXTaCoXxl
0
94
Member Avatar for alarifth

Hi everyone! When i compile my small piece of code it gives me the error [COLOR="Red"]C2512 : No appropriate default constructor available[/COLOR] this is my definition of class person: [CODE] // Person.h // A class defining a person #pragma once #include <iostream> #include <string> #include <functional> using std::cout; using std::endl; …

Member Avatar for mzimmers
0
10K
Member Avatar for McLaren

Hello, I am having trouble in starting apache. I had vista before and it worked well. Now I installed win 7, and have trouble. When I want to start, I get messages: Busy... Apache started [Port 80] I tried turning off skype, because it was causing problems often. But didn't …

Member Avatar for McLaren
0
3K
Member Avatar for Tortura

Hey guys, I created a main GUI for a measurement program. Beside all existing controls, there are two important buttons. START and ABORT. By pressing the START button, a method for measuring is run. Now I can not press any control on the form. That's okay, but I need the …

Member Avatar for Tortura
0
223
Member Avatar for bilal_fazlani

I have tried this : [CODE]update customers set customers.acc_balance = (select sum (invoices.inv_amount) from customers left join invoices on customers.cust_id=invoices.cust_id group by customers.cust_id)[/CODE] this [CODE]update customers set customers.acc_balance = (select sum (invoices.inv_amount) from customers inner join invoices on customers.cust_id=invoices.cust_id group by customers.cust_id)[/CODE] error is : Subquery returned more than 1 …

Member Avatar for bilal_fazlani
0
264
Member Avatar for a.oprea

Hello. I want to ask you all how to remove an element from an arraylist? Let's say the arraylist is made of the Integer elements: 23, 43, 40, 10; I want to remove the number 43. How do I do that? And don't tell me arraylist.remove(1); because this removes the …

Member Avatar for JamesCherrill
0
214
Member Avatar for nickg21

Hey everyone, I'm fairly new to .Net and I am just starting to write some queries to begin using my database files, and I keep running into these errors. I have stepped through numerous tutorials and reference guides and still cannot seem to get things working properly. Basically I have …

Member Avatar for nickg21
0
173
Member Avatar for nsyncpilu

Hy , Is there any way to remove the windows borders (the upper with the name and (space) close , minimize , maximize ,the right one , left , down) from an java app? I develop the app in NetBeans , so here is my code for opening the "main" …

Member Avatar for nsyncpilu
0
906
Member Avatar for Dakot

hello , i made a election program , here it is [CODE]#include <iostream> #include <cstdlib> #include <string> #include <conio.h> #include <iomanip> #include <fstream> using std::ofstream; using namespace std; string users[4]; char choice2; int votes[100] = {0}; int choice; int totalVotes=0; void votes1() { cout<<"Voting! : "<<endl; cout<<setw(21)<<left<<"(1) To vote " …

Member Avatar for StuXYZ
0
183
Member Avatar for javaAddict

This is not much of a question, but a discussion and searching for opinions. I have seen that many use the Scanner class for getting input from the keyboard. Some, like myself, use the BufferedReader. Why will someone use one over the other? Or they both do the same thing …

Member Avatar for StephNicolaou
0
553
Member Avatar for Shodow

help me update my database.. when i click edit it will add a new record.. i want to update a record.. to edit a new record it will be base on the cutsomer's nameu [CODE]Dim conn As ADODB.Connection Dim RS As New ADODB.Recordset Set conn = New ADODB.Connection conn.ConnectionString = …

Member Avatar for Shodow
0
2K
Member Avatar for Basteon

So, I need to make a program that draws a [URL="http://en.wikipedia.org/wiki/Automata_theory"]finite automata[/URL] from the input data. I had some experience with the [I]graphics.h[/I] header but as far as I know it's a Borland only header and VC++ doesn't support it. So I was wondering, is there a way to draw …

Member Avatar for sathishraji
0
1K
Member Avatar for ChaseRLewis

The below code gives an output of: [CODE] Allocated! Allocated! Deleted! Allocated! Allocated! Deleted! Size: 3 Capacity: 4 vector[0]: isAligned! 20 30 40 Deleted! Deleted! [/CODE] Can someone explain the first allocation and why there are 4 allocations instead of 2 (one for each reserve?). I figure the first is …

Member Avatar for vijayan121
0
151
Member Avatar for Motifaithed

Hi everyone, I'm new to php and I'm working on a project, it's very typical that when you type in a search box and press the submit button, it will link you to a table with minimal content, but upon clicking a list on the table, it will link you …

Member Avatar for rpv_sen
0
336
Member Avatar for collinskawere

how can i create something of this sort: * *** ***** ******* ********* ******* ***** *** * this is my source code: #include <stdio.h> int main() { int i; i = 1; while(i <= 5) { printf("*\n"); i++; } getchar(); }

Member Avatar for collinskawere
0
171
Member Avatar for greenblack

anyone please help me, whats wrong with this code: this is codeigniter, i can't upload file with this code/script: [code=php] class MUpload extends Model{ function MUpload() { parent::Model(); } function upload() { $data = array( 'my_file' => $_POST['userfile'], 'my_user' => $this->authniter->getUsername(), //this is user login name with my library 'authniter' …

Member Avatar for saadi06
0
104
Member Avatar for ariffin246

Hi Everyone. I am totally new here and this is my first post.. I have tried many place, since i could get any solution. I have no choice then posting here. basically, i have one delete form, where i will load the firstname from a table in access(hardcode) to listbox. …

Member Avatar for jhade
2
124
Member Avatar for avgvstvs

[CODE] cout<<"\n\n Please Input The Drive Letter Of Your Input Device \n"; cin>>DRL; string str(DRL); string str2(":"); string src; string hi; src=str.find_last_of(DRL); cout<<src; if(src!=str2) { hi=string(DRL)+string(str2); cout<<hi; } else*/ cout<<hi; [/CODE] [What am i dong wrong.i am trying to enure a colon input in the drive letter regardless of user …

Member Avatar for avgvstvs
0
1K
Member Avatar for zachattack05

Does anyone have a link to a good article or guide on creating help files that work with Windows XP, Vista and 7? I've used a program in the past to create help files, but it was a demo product and quite costly (and if I recall poorly supported). I …

Member Avatar for Mirfath
0
126
Member Avatar for aru211285

Dear All, I have created a multi dimensional array and stored elements in that through while loop like $human = array(); and at every iteration the while loop will add elements like $human["IPI"]["Description"][] = $row; $human["IPI"]["link"][]= $link; but when i wanted to print this array contents in a table format …

Member Avatar for diafol
0
515
Member Avatar for reemhatim

I'm writing a program as a beginner in assembly my program is about summing up all integers in array and then getting their average . I'm stuck with the average is that i need to divide the sum of numbers by my array size and i don't know according to …

Member Avatar for reemhatim
0
141
Member Avatar for triumphost

Hi guys. I have a php script that reads some values off a website and prints to a file every second.. The thing is, the script is always ran in my browser and I don't like that. I want to write a c++ program that can run that script within …

Member Avatar for thines01
0
361
Member Avatar for scamquist

I am new to php. I am trying to run a loop 5 times. Each time the loop runs I need to run a batch file and test the value of a query. If the query is > 0 exit the loop. Otherwise run a different batch file and continue. …

Member Avatar for scamquist
0
258
Member Avatar for noobprogrammerr

public List<EventEntity> GetCurrentUpComingEventsByEstate(string EstName) { EventDBModelDataContext context = new EventDBModelDataContext(); var res = from e in context.EventEntities where e.eventDate >= DateTime.Now _estatename(?) select e; return res.ToList(); } Hi experts, How do i declare the estatename part so that when i test the program in web browser, i will only get …

Member Avatar for thines01
0
96
Member Avatar for DK58

Ok so i am writing a program to determine a users hat,jacket, and waist size. I have most of it done but i am still getting an error. Any help would be appreciated! [CODE]import java.util.*; public class Sizes1 { public static void main(String[] args) { int answer = 0; int …

Member Avatar for hfx642
0
158
Member Avatar for v_janssens

I am using _getcwd() to get the full path of the current working directory but I am having a strange problem with this: When I run the program from within Visual Studio _getcwd returns "F:\...\ProgramName\bin" to which I append "\Debug\config.txt" to give the path of a text file. However, when …

Member Avatar for Tumlee
0
409
Member Avatar for Amr87

Hello Everyone , I`m trying to build MVC pattern using OOP PHP , please read the rest of the post to understand what I want exactly This is the homepage controller which extends the main controller [CODE]class Home extends Controller { function __construct () { parent::__construct(); } public function index …

Member Avatar for Amr87
1
125
Member Avatar for sofia85

Hi, I want to create a matrix containing 20 rows and 2 cols. I know how to do this, but I have these two files; number and amount (each file contains 1 col and 20 rows) and I don't know how to add these files into this matrix that I'm …

Member Avatar for Gribouillis
0
156
Member Avatar for furlanut

I have been able to write functions but cannot get them to work. Many sites show you how to write them but not how to call them in your web programming. Can someone explain why this call does not work for me ? the function is: [CODE] <? php function …

Member Avatar for furlanut
0
115
Member Avatar for Estella

Hi Masters... I want to hide folder or drive with vb6, but i don't have idea how to do this. any one know how to solved this? Please Help. Any suggestion will appreciated much.

Member Avatar for Lesbassnett
1
945
Member Avatar for SamarthWiz

hi i'm having some trouble with web2py models: [CODE]# -*- coding: utf-8 -*- db = DAL("sqlite://storage.sqlite") from gluon.tools import Crud crud = Crud(db) db.define_table("shout", Field("author", "string"), Field("shout","text")) db.shout.shout.requires = IS_NOT_EMPTY [/CODE] (there is more but it is for the admin interface) It is all correct but I get this error: …

Member Avatar for SamarthWiz
0
248
Member Avatar for ram619

This is a piece of code from some book. According to book, this code must not have worked and should have given a error message saying "cannot convert parameter 1 from 'const char[15]' to 'char*'" but this code is running on turbo C giving just a error message of const …

Member Avatar for ram619
0
197
Member Avatar for v_janssens

I am trying to call a C++ program for a Windows Forms App and to subsequently wait until the exe finishes. So far here is what I have: [CODE] Dim ProcessID As Integer Dim ProcessHandle As Integer ProcessID = Shell(filepath_exe, AppWinStyle.NormalFocus) ' Check the Shell command worked If ProcessID <> …

Member Avatar for BitBlt
0
291
Member Avatar for daneaum

[B]I have created a static Main class called ProductButtonTestDriver, that will run my class ProductButton.java- the prof wants a picture of each coffee shop item, with the name and price to appear in a button, then a check box if the customer selects that item- I am only on the …

Member Avatar for daneaum
0
1K
Member Avatar for komara

pls help i am beginner and i am trying to create a simple Guestbook but i got error "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /index.php on line 43" here is the code i use : <?php require ($_SERVER["DOCUMENT_ROOT"]."/komara/config/db_config.php"); $connection = @mysql_connect($db_host, $db_user, $db_password) or die …

Member Avatar for pritaeas
0
234
Member Avatar for kanyonb38

I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!! Thank you …

Member Avatar for BitBlt
0
100

The End.