43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for MrNoob

hello i was reading today some stuff abt bitfield but here in this program I understand most of it but there unnamed fields inside the structure book says its stuff for allgiment or something like that i dont rlly get what does it do [code] /* fields.c -- define and …

Software Development c
Member Avatar for codeguru_2009
0
145
Member Avatar for brando|away

I'm trying to crop an image: [code] Bitmap bmp = (Bitmap)pictureBox1.Image; Bitmap cBmp = bmp.Clone(croppedAreaRectangle, bmp.PixelFormat); pictureBox1.Image = cBmp; bmp.Dispose(); [/code] It's partly working, but the image result is smaller, and from a different area out side the selected cropped area. So what's wrong?

Software Development image
Member Avatar for Diamonddrake
0
93
Member Avatar for KonkaNok

Hi, I noticed a few snippets recently where a size_t variable was used for array indices, and after searching around I'm still not sure what the obvious advantage of using a size_t variable over a typical int would be.. To clarify, what would be the difference between this: [code=cplusplus] for(size_t …

Software Development c++
Member Avatar for KonkaNok
0
148
Member Avatar for Tommy_101

Hi, I've been trying to create a program that gets wikipedia pages, and lists all the links found in the page source. I've used the urllib.urlopen() method to do this, and unfortunately I've run into a little problem. Instead of getting the actual page like say the main page, or …

Software Development file-system python
Member Avatar for Tommy_101
0
208
Member Avatar for kyumi419

hello~ Write a program that will display a pattern depending on n. Assume n as a one digit odd number. Example: if n=9, display *000*000* 0*00*00*0 00*0*0*00 000***000 how will i start doing this type of problem? ^^

Software Development c
Member Avatar for kyumi419
0
205
Member Avatar for crash override

I've been trying to get started with sockets programming. However, when I try to use the getaddrinfo and freeaddrinfo functions, my linker complains that they are "not declared in this scope" and that they are "unused variables". I have checked the header (ws2tcpip.h) and the headers appear to be declared …

Software Development c++
Member Avatar for ndarkduck
0
4K
Member Avatar for papanyquiL

Hi everyone. Basically what I want to do is search for a specific *.exe file upon initialization of my application. The *.exe file that I want to search for happens to be a .NET debugging tool. When / if my application finds this file, I want it to automatically close …

Software Development file-system
Member Avatar for papanyquiL
0
206
Member Avatar for MattyRobot

what is the difference between openGL glut and openGL?

Software Development c++ opengl
Member Avatar for mrnutty
0
134
Member Avatar for ddanbe

Talking about a shoebox type of database here. Would like to make a nice interface in C# for it. Typically something around 50 records or so. (e.g. my wine cellar;) ) To use a genuine SQL DB seems to me like a bit of an overkill. Could use a flat …

Software Development dataset
Member Avatar for ddanbe
1
1K
Member Avatar for sftwr21

I'm a noob when it comes to C programming. I wrote a simple program that runs an infinite for loop. But inside that loop I wanted to create another loop to stop the user three times after entering incorrect passwords. I tested from different angles it seems like the infinite …

Software Development c programming-construct
Member Avatar for sftwr21
0
214
Member Avatar for iwaqasi

Hi, I am working on a Project that has to search some specific folders and inside those folders I want to check if any file resides. I used the following techniques but they are not working if I need to connect to the machine as USER: [CODE] If Directory.Exists("\\" & …

Software Development vb.net
Member Avatar for samir_ibrahim
0
132
Member Avatar for yonghc

I am inclined to suspect that Borland C++ compiler 5.02 is seemingly full of bugs. Even though my C++ codes could be bug free, it reported External errors on compiling and failed to create an EXE file to run. Thanks to Mr. Salem, I have successfully compiled the above codes …

Software Development c++
Member Avatar for yonghc
0
414
Member Avatar for javanub123
Member Avatar for javanub123
0
87
Member Avatar for AirGear

i usually use Visual Studio 6 or sometimes Dev Cpp.. but, they can't show me the runtime and the memory spent.. i need that information, to make sure that my program is qualified.. can someone help me about cpp compiler that can do that? thx.

Software Development c++ visual-studio
Member Avatar for AirGear
0
134
Member Avatar for MrNoob

I m trying to find idea to change like from 1 to one and 2 to two and 3 three from 1 to 999 i m had an idea to do like a string with information etc ? but i want better idea so i dunno how to do it …

Software Development c
Member Avatar for Anjoe18_Edica
0
225
Member Avatar for =OTS=G-Man

Hello, I am having the hardest time getting my strings to format right I want it to only show the first 14 chars of the string. sounds simple, but I think ive been looking at the code to long to see where im messing up :). here's the code I …

Software Development
Member Avatar for sknake
1
191
Member Avatar for sp00ks

Hello everyone, My problem is that I am creating different objects, and I want them to add themselves to either a List or an ArrayList (difference?) without having to write [I]insects.Add(spider); [/I]after each new object I create. How can I add this in the constructor of the insect class? right …

Software Development
Member Avatar for DdoubleD
0
160
Member Avatar for arelius

Hello all, I am taking a course in C++ and in Ada. Our professor has given us the choice to be tested in language profficiency in either C++ or Ada. The test format will be of simpler programming problems and more geared towards shortanswer concepts. I was wondering if anyone …

Software Development c c# c++ first-post
Member Avatar for dgr231
0
240
Member Avatar for Kombat

p1a.c: In function `main': p1a.c:20: parse error before `char' p1a.c:46: parse error before `char' p1a.c:47: `result' undeclared (first use in this function) p1a.c:47: (Each undeclared identifier is reported only once p1a.c:47: for each function it appears in.) p1a.c:47: `basechars' undeclared (first use in this function)

Software Development c c# c++
Member Avatar for Kombat
0
148
Member Avatar for AceiferMaximus

Is it possible to call a .dll I made in C#, and use it in my unmanaged C++ code? If so, can someone show me an example of how this is done, or a link to go about doing it. I wasn't able to find much on google, and most …

Software Development c# c++
Member Avatar for AceiferMaximus
1
2K
Member Avatar for BullzEyezz

I'm making a project that gets folder and file names in a specific path and I want to edit the folder or file names? (e.g: folder name is X.Men.DVDrip I want to change it to X Men DVDrip) I have the path of the folder, but I dont know how …

Software Development c#
Member Avatar for BullzEyezz
0
221
Member Avatar for PoisonedHeart

Hi guys, how can I attach or link a file (an "HTML document") - a saved Web page... that when I click a command button, the "HTML document" will be executed, just like double-clicking it in the explorer window. Just view the attached image file for better understanding about my …

Software Development visual-basic
Member Avatar for AndreRet
0
995
Member Avatar for AndreRet

A reply on so many data and SQL questions, this attachment has 20 forms with all different connection samples and data related queries. This will put any beginner on the right track to successful coding in vb6. I have put together this sample from numerous others over the past few …

Software Development microsoft-access oracle sql visual-basic
0
859
Member Avatar for yonghc

Two lines in the codes below have been remarked out else compiling would fail: //arrcon[1]=*scon; //count << "arrcon[1] " << arrcon[1]; The intention was to assign character values to an array with 5 elements, each with a maximum 35 characters, declared as a string array, arrcon[5],[35]; I was trying to …

Software Development c++
Member Avatar for yonghc
0
411
Member Avatar for drabsch

I need to create a form using code. Is there a way to do this. like in the code i need to create a form with a name, caption and text box in it.

Software Development visual-basic
Member Avatar for drabsch
0
3K
Member Avatar for linkpraveen

Where ever i see i find a Stack example on generics.. can anyone please point me to some real world example or sample project using Generics. Regards Praveen

Software Development
Member Avatar for Rashakil Fol
0
2K
Member Avatar for markfisher

Dear Programmers, Hi I wrote a simple asm program to output a char on STDOUT in windows (MS-DOS) Here is my code: ------------------------------------ .386 .MODEL FLAT .STACK 256 ;Reserve 256-Bytes .DATA char BYTE "a" .CODE _main: MOV AH, 02h ;Sub-function 02h -> Output STDOUT MOV DL, char ;Char to output …

Software Development assembly
Member Avatar for wildgoose
0
157
Member Avatar for benjaminhan

Hi All, Is it possible to filter 2 fields in Adodc? My code is shown below: *****-----*****----- With Adodc2.Recordset .Filter = "DOC_DATE = '" & myDate & "'" If .EOF Then MsgBox "Item Not found" .Requery End If End With *****-----*****----- But I need to filter another field on top …

Software Development visual-basic
Member Avatar for benjaminhan
0
121
Member Avatar for benjaminhan

Hi, All I am trying to do 2 level filter on datagrid. First I search the datagrid for same customer number. Than search again by date. The problem I encounter is the first search works just fine (it return me records of a particular customer no.). But when it comes …

Software Development visual-basic
Member Avatar for benjaminhan
0
132
Member Avatar for PYGUY

HI, I've got a list of 10 websites in CSV. All of the sites have the same general format, including a large table. I only want the the data in the 7th columns. I am able to extract the html and filter the 7th column data (via RegEx) on an …

Software Development python regex
Member Avatar for PYGUY
0
1K
Member Avatar for AutoPython

The title doesn't really make sense, as a number with some thing like .23238382 attached to the back of it isn't an integer, but that's not the point. I want to make a program that places commas in the correct position in a number you give. Well, in some of …

Software Development python
Member Avatar for AutoPython
0
192
Member Avatar for Kombat

You are required to write a C program that accepts two decimal integers, say d and r. You may assume that the first decimal integer d is nonnegative and that the second decimal integer r which represents the radix, will be one of 2, 3, 4, . . ., 15, …

Software Development c
Member Avatar for yellowSnow
0
2K
Member Avatar for dbmikus

I am writing a function to extract decimals from a number. Ignore the exception and its syntax, I am working on 2.5.2 (default Leopard version). My function does not yet handle 0's. My issue is, the function produces random errors with certain numbers, and I don't understand the reason. I …

Software Development python
Member Avatar for dbmikus
0
237
Member Avatar for lotrsimp12345

I know their are some in C so shouldn't their be some in C++?

Software Development c++
Member Avatar for lotrsimp12345
0
174
Member Avatar for blahbla

hi i need some help with adding a bunch of random numbers. i dont understand how to add them all. heres the code: [CODE]#include <iostream> #include <cmath> using namespace std; int main () { int i,x; srand (time (NULL)); for (i=1; i<=10; i++){ x=rand()%10+1; cout<<x<<endl; } system ("pause"); return 0; …

Software Development c++
Member Avatar for blahbla
1
160
Member Avatar for Merovingian

I have two function that replace certain strings in a text file. The first one works perfectly: [CODE] Dim readAlias As String Dim RxDIR As String = Nothing Try RxDIR = Registry.GetValue("HKEY_LOCAL_MACHINE\Software\RLtd\R", "MAIN", False) RxDIR = RxDIR + "\Bin\Configuration\alias.config" Dim sr As StreamReader = File.OpenText(RxDIR) readAlias = (sr.ReadToEnd()) sr.Close() sr.Dispose() …

Software Development regex vb.net
Member Avatar for Merovingian
0
122
Member Avatar for nateuni

My unit doesn't teach this so I am unaware about the correct syntax to go about what I want to do. I have hit google but have produced no answers to my specific problem. So here we go. I have a series of nested structs. Is this possible that instead …

Software Development c
Member Avatar for nateuni
0
527
Member Avatar for klabak85

Hi all, I'm a completely new user of python (and by new I mean I started using it yesterday) but I've been programming for a couple of years now in other languages such as Java. I have a question to ask you all. So what I want to do is …

Software Development file-system python
Member Avatar for jice
0
150
Member Avatar for Caleb2419

I was given an assignment to create a high/low program (well, the first part anyway) that fulfills the following pseudocode: • Print instructions to the user • Start with the variables high = 1000, low = 1, and tries = 1 • While high is greater than low â—¦ Guess …

Software Development python
Member Avatar for Caleb2419
0
241
Member Avatar for ihatehippies

My app works fine when its a .py file, however as soon as I compile it with py2exe 0.6.9 I get LookupErrors when using the email MIME library. I tried including the "packages": ["encodings"] option in py2exe but to no avail. I'll post the relevant code and traceback. (note: not …

Software Development audio file-stream os-x python
Member Avatar for ihatehippies
0
135
Member Avatar for gendler.max

I'm trying to learn how to add and move objects in VB6 through the code module. SO far i've figured out how to insert an object but have no idea how to change the position. This is what i have so far: Option Explicit Private WithEvents cmdOk As CommandButton Private …

Software Development visual-basic
Member Avatar for gendler.max
0
242
Member Avatar for Mafia619

i am tryin to make a c++ program to play tic tac toe.........there are some errors hope u guys can help me out......... [CODE]#include<iostream.h> #include<conio.h> #include<stdlib.h> char matrix[3][3]; void cou(void); int main() { int m,n; char ch='y'; while(ch=='Y'||ch=='y') { for(m=0;m<3;m++) { for(n=0;n<3;n++) { matrix[m][n]='\0'; int i,j,sum=0; while(sum<10) { if(sum==0) { …

Software Development c++
Member Avatar for sfuo
0
280
Member Avatar for mckinnm

I have a Form A that is displayed on a thread that also contains a heartbeat monitor. When an error occurs, we need the new form, Form B to be displayed until the close button is depressed and for Form A to be non-functional until that time; however, we need …

Software Development
Member Avatar for mckinnm
0
93
Member Avatar for samm22

If I have a vector v={1,2,4,6,8} and I find my maximum element of this vector using this: " vector<int>::iterator iter_max = max_element(v.begin(), v.end()); cout<<"Largest element is "<< *iter_max; " which works fine. But I need to know the position of this max element. Is it second, third or fourth in …

Software Development c++
Member Avatar for JasonHippy
0
105
Member Avatar for brando|away

Im trying to create a listview showing images with text so how exactly can i do this? (im using visual studio if it helps) Heres the code that isn't working now [code] // adding images ... imageList1.Images.Add("Unique key", Image.FromFile("...")); listView1.Items.Add("text for image", "Unique key"); /* * more * images * …

Software Development listview visual-studio
Member Avatar for DdoubleD
0
1K
Member Avatar for avgVBUser

I'm trying to understand the sql connection a little better. I have some code that returns data via a stored procedure on the sql server. Here is the code to execute the procedure and put the data in a data grid: [code]Dim tblSteps As DataTable = New DataTable Dim cnPMSQL …

Software Development open-source sql vb.net
Member Avatar for avgVBUser
0
120
Member Avatar for drabsch

im making a program that gives you the age of the person that enters there date of birth the code i got at the moment is: Private Sub Command1_Click() Dim age As String age = Month(Now) - Text4.Text If age < 0 Then age = 1 Else age = 0 …

Software Development visual-basic
Member Avatar for drabsch
0
2K
Member Avatar for samuelmoneill

Can anyone tell me what is wrong with this code? [code] Dim current_date As String Dim filename As String Private Sub Form_Load() Dim path As String current_date = DateValue(Now) current_date = Format(DateValue(Now), "YYYYMMDD") Debug.Print current_date filename = "Daily SMS Backup " & current_date & " 200.sql" Debug.Print filename path = …

Software Development visual-basic
Member Avatar for omoridi
0
257
Member Avatar for Mongz

Hi Guys. Finally i can read excel, thanks to all of you who responded. Now i though its easy as i think to extract from data table, here im searching for a specific record on excel then i need to select certain columns on that row of that record, my …

Software Development
Member Avatar for Mongz
0
120
Member Avatar for xWiredx

hi guys.. kindly help me in this one... i'm creating an inventory system.. i have a problem in their Item No. format... i use maskedbox... my mask is ##-####### ... im using a barcode reader..their current Item number has only 4 digit... i want the output will become this one …

Software Development visual-basic
Member Avatar for omoridi
0
1K

The End.