199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for bchin

Hi, I have been searching high and low on google, and I cannot seem to figure out how to convert unicode to integers. Take the unicode codepoint, u'3001', for example. I know in utf-8, this is suppose to be ideographic comma. The hexadecimal representation is 0xE38081. I know if I …

Member Avatar for bchin
0
3K
Member Avatar for danielagaba

hi i'm pulling multiple rows of data from my database to display in a csv document but every row it displays is the same as the first row. appreciate the help. [CODE] <?php session_start(); include 'include.php'; connect_db(); $filename = date("Ymd")."_summary.csv"; header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=$filename"); $date = date("Y/m/d"); $sql = …

Member Avatar for colweb
0
76
Member Avatar for merse

Is it possible to do function overloading with different return type? For example: [CODE] void myfunc(double x, double y); double myfunc(bool x); [/CODE]

Member Avatar for mrnutty
0
79
Member Avatar for eggberto

I have an integer 'a'. It is a random number from 1-10. How do I express interger 'b' to be a random number from 1-10, but not equal to 'a'? Would it be something like this?: srand ( time(NULL) ); a = rand() % 10 + 1; b = rand() …

Member Avatar for mrnutty
0
97
Member Avatar for timbomo

i cant figure out why this error is coming up saying that "exams" are undeclared identifier. all of them? // basic file operations [CODE]#include <iostream> #include <fstream> using namespace std; void read_file_in_array(int exam[100][3]); double calculate_total(int exam1[], int exam2[], int exam3[]); // function that calcualates grades to see how many 90,80,70,60 …

Member Avatar for Sodabread
0
108
Member Avatar for nonshatter

Hey guys, I am in need of a live real-time clock to count down to zero depending on the length of days specified in a database (Like an auction count-down timer). For example, I can retrieve the length of time specified in the database, somehow put that value into the …

Member Avatar for nonshatter
0
708
Member Avatar for darrenbkl

[CODE]#include <iostream> #include "IntStack.h" int main() { int i; TIntStack a(5); TIntStack b(20); TIntStack *ip = new TIntStack; for (i=1; i <=5; i++) { a.Push(i); b.Push(-i); } for (; i <=10; i++) b.Push(-i); TIntStack::PrintStack(a); a = b; TIntStack::PrintStack(*ip); delete ip; return 0; } [/CODE] [CODE]#ifndef INTSTACK_H #define INTSTACK_H const unsigned …

Member Avatar for Narue
0
2K
Member Avatar for daviddoria

Consider these functions: [code] void OperateOnDoublePointer(double* a) { std::cout << a[0] << std::endl; } void OperateOnFloatPointer(float* a) { std::cout << a[0] << std::endl; } [/code] This works as expected: [code] double* c = new double[1]; c[0] = 3.3; OperateOnDoublePointer(c); [/code] but when I try to do this: [code] double* c …

Member Avatar for Narue
0
2K
Member Avatar for tquiva

I have a project which is to design a came called Miensfeld. In Miensfeld, the player, Timmy, is located on one side of a 8 by 10 cell area minefield. My task is to move Timmy safely through the minefield to get to the other side, earning points as he …

Member Avatar for Adak
0
3K
Member Avatar for icgc

I have a class with a public property exposing a collection of objects. The collection is being maintained within the class by multiple threads. The objects within the collection will change and also the properties of those objects. Observers can view the collection as read only from other threads, for …

Member Avatar for icgc
0
101
Member Avatar for spdbump08

Hi, I'm hoping someone can help me figure this out. I have to write a program to average scores and print grades using structs and arrays. It's a problem for my class and I think I'm close to finishing but I'm just missing something...maybe a couple of things. I'm getting …

Member Avatar for Sodabread
0
109
Member Avatar for morteza_ipo

Hi everybody! I want to get list of files and folders with permission from ftp! This is my code: [CODE] from ftplib import FTP ftp=FTP('ftp.domain.com','username','pass') a=ftp.dir('') [/CODE] after runnig : (Output) drwxrwxrwx 1 user group 0 Mar 01 14:29 Backup drwxrwxrwx 1 user group 0 Mar 01 14:29 logs drwxrwxrwx …

Member Avatar for nezachem
0
152
Member Avatar for cherryduck

Hey, this is a continuation of my image editing program, I am trying to perform intensity thresholding with an intelligent threshold. My code thus far: [CODE] private void thresholdMenuItemActionPerformed(java.awt.event.ActionEvent evt) { BufferedImage inputImage = getImage(); setUndoImage(inputImage); BufferedImage thresholdImage = new BufferedImage(inputImage.getWidth(), inputImage.getHeight(), inputImage.getType()); int threshold = 0; int tnew = …

Member Avatar for cherryduck
0
185
Member Avatar for PierlucSS

I'm starting a process in a thread that is used to built up a treeview with a recursive method. I'm getting the following error "Action being performed on this control is being called from the wrong thread. marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action." …

Member Avatar for PierlucSS
0
1K
Member Avatar for camac

Hi people, I am new to Java but have experience programming in C/C++/C#. I wanted to learn Java SE 6 first before moving to Java EE 6. After making some research online for appropriate Java SE 6 books, I found that these are appropriate for me to get an excellent …

Member Avatar for tux4life
0
140
Member Avatar for joker.med

Hello everyone, After I created a JTable with: JTable MaTable =new JTable(); MaTable.setModel(new DefaultTableModel(new Object [N][1], new String [1])); I wanted to add new columns to it, so I did this: TableColumn Colonne = new TableColumn(); MaTable.addColumn(Colonne); The operation did worked, even the new columns displayed correctly, but, when I …

Member Avatar for joker.med
0
87
Member Avatar for blackmagic01021

I have an attachment PDF with pixel alignment. Then I have this code which assigns short integer to appropriate pixels. [CODE] void CMFC3xxDevice::prepare_data_decompress(data_package_ex &pdata) { char *input = (char*) pdata.pData; int incount=pdata.cbData; int finalarray_pos = 0; DWORD dwTempBufferSize = pdata.cbData; for(int i = 0; i < incount; i+=3) { MFC3XXPixelAlignment …

Member Avatar for Salem
0
182
Member Avatar for koitfm

I have to read from input file (which contains strings and integers) only integers, rearrange them to descending order and write to output file. How should I do this?

Member Avatar for jephthah
0
4K
Member Avatar for obeem

Hi guys, I am trying to make the Tic Tac Toe Class game but I am encountering an error with the initialization of my array for the game board. Instead of initializing everything to blank spaces, random characters end up in there and I don't know what is causing this …

Member Avatar for obeem
0
120
Member Avatar for lionaneesh

Please suggest me some tutorials on Windows programming in C with detailed review on windows registry and header files like #include<windows.h> #include<functions.h> #include<fstream> #include<dos.h> etc...

Member Avatar for limodetroit
0
112
Member Avatar for Uni616

Hey, I have to read numbers from a text file. Heres an example input: 6 8 1 2 10 1 3 9 2 3 7 2 4 2 3 5 5 4 5 3 4 6 8 5 6 4 The parser I coded works fine in NetBeans and Dev …

Member Avatar for VernonDozier
0
115
Member Avatar for paul9998

I try to make a program that read the content from a .txt file and then print the content using Console.WriteLine() .I add the file that I want to read to my project . This is the content of my file: Hello.txt: [CODE]Hello World!!!!!!!!!!!!![/CODE] And this is my code: [CODE]using …

Member Avatar for paul9998
0
135
Member Avatar for DrkNite

we use a terminal emulator called facetwin to run our main unix based applications we want to attach a small document scanner and magnetic strip reader to the system this runs on currently we have a magnetic reader that emulates a keyboard so it sends keystrokes back to the unix …

Member Avatar for jimhutchins
0
137
Member Avatar for sana zafar

Hey, Im trying to write a program that using gauss-jordan elimination to solve a set of linear equations.It reads in two files names for matrix A and C. I have to first form an augmentes matrix (A|C) and then do the elimination.Can any one help me by telling how to …

Member Avatar for mrnutty
0
119
Member Avatar for krishnisilva

can someone show me how to upload and download files from the database in C#.NET 2008 standard edition, please help me with this or send a link so that i can follow step by step because i am not familiar with these. thanx appriciate a lot

Member Avatar for krishnisilva
0
91
Member Avatar for cokaznsyco72

I need to get character input from the user and convert it into a float type. However, I can't use arrays, strings or the functions printf() and scanf(). I have to do everything with putchar() and getchar(). How would I do this?

Member Avatar for DoctorBinary
0
154
Member Avatar for Jimingle10

Intro - I am an electrical major. Having said that, my school has a pilot program this year that I was randomly selected for, that includes introduction to C# in the program. I am not very familiar with programming at all but I must admit, I have made decent progress …

Member Avatar for newenglandguy
0
854
Member Avatar for egoche

Some of the fields in a form are desired but not required. As a result of these fields being left alone, PHP will return errors similar to: "Notice: Undefined index: manager in C:\wamp\www\form.php on line 12". My current question is how do you tell PHP to disregard a field if …

Member Avatar for egoche
0
2K
Member Avatar for dex.ter

hi guys, here's my code im having a hard time on how to edit. i can add and view it yet unable to edit it. thanks! [code]/* * dental.c * * Created on: 30/04/2010 * Author: danovert */ #include<stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> typedef struct { char fname[30]; …

Member Avatar for Banfa
0
131
Member Avatar for oniongirl

Hi all, I think I've got myself into an unresolvable situation. I have a form (it is used so that non-techies can create their own questionnaires) that asks for a user to enter a number that reflects the number of options they want that question to have. A button is …

Member Avatar for oniongirl
0
79
Member Avatar for tarheelfan_08

Hey guys, I have created the following code and I can not figure out how to do one thing, add users. I can do it manually, but I need to prompt the user for two new accounts and then add them to the list. Can someone please inform me of …

Member Avatar for Banfa
0
120
Member Avatar for jacob07

Hello, i have proplem with the following excercise: There's a txt file which contains tab seperated words like: [CODE] Name N1 N2 Type FFapple 11 15 fruit ZZbanana 33 45 fruit ZZcarrot 22 25 vegetable FFapricot 10 30 fruit ZZmelon 22 50 fruit FFbroccoli 16 40 vegetable[/CODE] i want to …

Member Avatar for jcao219
0
220
Member Avatar for farsen

Hi. I have this UpdatePanel with som boundfield content. In this panel, there is an edit link, which will edit the content. It works fine. Now I want to make all the boundfields clickable as a link, so they act as the edit button. In that way, I dont have …

Member Avatar for dnanetwork
0
2K
Member Avatar for d.devendran

hi expert, i'm newbie for python, anywhere i'm learning from internet sample, i got doubt here, i found below sample for thread import threading def hello(): print "Hello" t = threading.Timer(2, hello).start() t = threading.Timer(2, hello) t.start() this working fine when run manually ( python thread.py) but i try to …

Member Avatar for jcao219
0
161
Member Avatar for ans2007kumar

I performed the following code to retrieve the path from database and show image [CODE]protected void Button2_Click(object sender, EventArgs e) { string t = TextBox2.Text.Trim(); SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\Anshul\\College site\\App_Data\\afset.mdf;Integrated Security=True;User Instance=True"); SqlCommand cmd = new SqlCommand("Select dmc from Semr Where Rollno='" + t + "'", con); con.Open(); …

Member Avatar for dnanetwork
0
117
Member Avatar for needanswer

I want to search the records from the textbox and display the records to the datagridview, if there are no records, just display empty on the datagridview. this is not working: [CODE] Dim sqlsearch As String sqlsearch = "SELECT * FROM setting WHERE mname LIKE '%" & TextBox.Text Dim adapter …

Member Avatar for pritesh2010
0
672
Member Avatar for danale

Hello, I am writing an ASP.NET application using javascript. It uses a modal dialog which has a button. When pressing the button another window is opened. I'd like to perform the action on submit without opening a new window. Here is some code for example: [B]code for first.aspx:[/B] [CODE] <html …

Member Avatar for saulat78
0
680
Member Avatar for fugnut

Hello all, I am at the beginning of a new program working with structs and I am getting an error I cannot figure out. My code so far is [CODE]//PJ901 PAtrick Nealey //Acme Payroll Program #include <iostream> #include <fstream> #include <iomanip> #include <cstring> // for _strcmp using namespace std; const …

Member Avatar for Fbody
0
131
Member Avatar for xirian

Hello to everyone.Sorry if the question has been already made, but is like i need to waste 1 day to find what i'm lookin for so if someone could tell me please how to pass data from ajax to a php page in resonable way(meaning that i don't need to …

Member Avatar for xirian
0
106
Member Avatar for smartness

# Query_time: 6.081227 Lock_time: 0.000085 Rows_sent: 1 Rows_examined: 1339 SELECT COUNT(id) FROM `article` WHERE `category` = 'shkrime-te-perkthyera' Is there a way to speed it up. Should I index the category column? Or what do you suggest? I use this query to get the number of articles on that category!

Member Avatar for smartness
0
99
Member Avatar for kjelle392

Hello all. I'm sorry if this question has been answered before, but I'm a real noob trying to understand Ajax and JavaScript. Therefore I need a (simple) explanation how to pass multiple selections from a list to my Ajax-script - if there are any simple solutions. I'm not using any …

Member Avatar for kjelle392
0
133
Member Avatar for j_kathiresan

Hi, I may get more than 1000 lines in a file. Each line ends with a new line character. Sometimes the file may have 4 lines. Other lines will have characters such as , : alone. I'm storing each line in the database if it is a valid line and …

Member Avatar for javaAddict
0
161
Member Avatar for miturian

So, in the course of trying to write my own matrix-class (as an exercise, if nothing else), I ran across the following problem, exemplified in a dummy class: [CODE]class dummy { public: int a; int b; dummy(int a, int b): a(a), b(b) {}; dummy& operator=(dummy &rhs) { a=rhs.a; b=rhs.b; return …

Member Avatar for miturian
0
112
Member Avatar for born star

can somebody tell me how does data reader work in following list and what will the result of............if(dr.Read()).. [CODE] public List<clsproductprp> RetFind_rec(clsproductprp prp1) { SqlDataReader dr=null; List<clsproductprp> obj = new List<clsproductprp>(); SqlCommand discmd = new SqlCommand(); try { if (con.State == ConnectionState.Closed) { con.Open(); } discmd.CommandText = "spFindFromProduct"; discmd.CommandType = …

Member Avatar for sebastian3
0
79
Member Avatar for Duki

Hey guys, i have this project that, when i compile, 11 of the header files cannot be opened. I have no clue why - i've never seen this type of error. The project is much to large to copy/paste here, but does anyone have an idea of what would cause …

Member Avatar for Fbody
0
560
Member Avatar for venet

I have been programming in PHP with globals enabled since around 2005. I have started to develop on a more professional scale now, and with security at stake, I need to make the change. Trouble is, I haven't been able to find a tutorial that answers my questions regarding globals …

Member Avatar for venet
0
113
Member Avatar for yushuan718

Hello all, I am writing a function to download a HTML page from another server. I am wiring this code using MFC's Casyncsocket Basically, this class runs the callback function (onReceive) whenever it detected some new that can be received. Originally, I had something like this: [CODE] void CLASSNAME::OnReceive(int nErrorCode) …

Member Avatar for yushuan718
0
98
Member Avatar for murugavel84

Hi friends, I am facing this problem while adding a panel to another panel. Please give me the solution. I have put my code below. [CODE] Dim pan As Panel = DirectCast(UserControlTest1.FindControl("Pan_ItemBind"), Panel) pan.Controls.Add(Panel1)[/CODE] Thanks in advence...

Member Avatar for jarceri
0
172
Member Avatar for C++_Beginner

Help me please. I don't know where the error is. If you find it i will appreciate it. Very much. It says its inhere somewhere : [CODE] else (ENEMIES > ADVENTURERS) { cout << "\nAlong the way a band of Ogres ambushed the party. "; cout << "All fought bravely …

Member Avatar for C++_Beginner
0
96
Member Avatar for filch

I had a working ticket purchase page and I have done something to break it but cannot find what I did to do so. I have the following javascript functions: [CODE]<script type="text/javascript"> function newqty( what ) { price = document.getElementById( what + "_cost" ).innerHTML.replace( "$", "" ); var qty = …

Member Avatar for fxm
0
134

The End.