assembly 2,768
c++ 47,932
java 29,800
pascal 1,795
perl 1,612
program 807
programming 692
python 14,205
shell-scripting 1,803
vb.net 19,230
visual-basic-6 9,831
xml 1,318

hello ! i want to develop the keycounter , i mean i want to get the total no. of key pressed by the user in the specific time , i have a code of keylogger , i can use it to get the text in that time period and after that just get its length , but i dont want to use this . here is a code of VB.net which i found so for on msdn Private Shared keyPressCount As Long = 0 Private Shared backspacePressed As Long = 0 Private Shared returnPressed As Long = 0 Private Shared …

Member Avatar
Member Avatar
+1 forum 8

hello, i'm newbie here and also in programming world. so I would to request help from pros here. my question is, how to print out number entered in random in ascending order WITHOUT USING ARRAY AND FUNCTION? let say the user key in 4, 56, 31, 90, 11 and the output would be 4, 11, 31, 56, 90. hope anyone would help me. thank you.

Member Avatar
Member Avatar
+0 forum 27

**Task** Your task is to write a program that will draw graphs and output them as coloured image in the .ppm file format and display them using a suitable external image viewer (IrfanView). The program will use code generated sine waves, and harmonics of these, to calculate and display the harmonic components of a square wave. All sine wave harmonic should be displayed, each in a different colour – and the square wave that results from summing all the sine waves should also be displayed. The resultant waveforms should be output as a single file in the .ppm format. Initially, …

Member Avatar
Member Avatar
+0 forum 26

Well I guess it is my turn to ask a question, since most of the time I spend answering questions on DaniWeb. The Problem: DataViewGrid throws a "System.ArgumentException parameter is not valid..." when the dataset contains an SQL 2005 TimeStamp type column. The error occurs in System.Drawing.FromStream... da da da It is because a TimeStamp is a Byte[8] unique value that my grid thinks is an image. I am creating a type of Query Analyzer form. A simple select * from mytable is given to an adapter... [code] QueryDataSet.Tables.Clear(); SqlDataAdapter adapter = new SqlDataAdapter(Query, conn); adapter.Fill(QueryDataSet,"Table"); DataResultsGrid.DataSource = QueryDataSet.Tables[0]; QueryBindingSource …

Member Avatar
Member Avatar
+0 forum 4

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar
Member Avatar
+0 forum 9

Just trying to find out which of these five isprime functions is the fastest.

Member Avatar
Member Avatar
+1 forum 7

Looking to create an asset for the Unity Asset store in C#. I don't want to give away the source code, yet I want users to be able to purchase + download my work and use it in their projects. I'm not sure what this is called or how to do it. Any ideas? Much appreciated!

Member Avatar
+0 forum 0

I have scoured Stack over flow and the Pandas documentation for a solution to this issue. I am attempting to recursively move through a directory and concatenate all of the headers and their respective row values. Below is what I have so far after much experimentation with other libraries: import pandas as pd import csv import glob import os path = '.' files_in_dir = [f for f in os.listdir(path) if f.endswith('csv')] for filenames in files_in_dir: df = pd.read_csv(filenames) df.to_csv('out.csv', mode='a') However all of the headers and their corresponding values are stacked upon each other. In addition, the files' headers and …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am new to Python. I am learning boxsizer. I want to put two buttons on my panel. One at top right corner and one at bottom right corner. How do I achieve this? Thanks

Member Avatar
Member Avatar
+0 forum 4

Here is the code for [B][COLOR="Red"]Insertion Sort, Bubble Sort and Selection Sort[/COLOR][/B] [B]Insertion Sort[/B] [CODE] #include <stdio.h> main() { int i,j,key; int a[5]={5,2,3,4,1}; for(i=1;i<5;i++) { key=a[i]; while(i>0 && a[i-1]>key) { j=a[i]; a[i]=a[i-1]; a[i-1]=j; --i; } } int k; for(k=0;k<5;k++) {printf("%d ", a[k]);} printf("\n"); } [/CODE] [B]Bubble Sort[/B] [CODE] #include <stdio.h> main() { int i,j,x; int a[5]={5,2,3,4,1}; for(i=0;i<5;i++) { for(j=i+1;j<5;j++) { if(a[i]>a[j]) { x=a[i]; a[i]=a[j]; a[j]=x; } } } int k; for(k=0;k<5;k++) {printf("%d ",a[k]);} printf("\n"); }[/CODE] [B]Selection Sort[/B] [CODE] #include <stdio.h> main() { int i,j,x,min,k; int a[5]={5,3,2,4,1}; for(i=0;i<5;i++) { min=i; for(j=i+1;j<5;j++) { if(a[min]>a[j]) { min=j; } x=a[min]; a[min]=a[j]; a[j]=x; } } …

Member Avatar
Member Avatar
+0 forum 19

I have to convert a piece of C++ code to Python. Except I can't understand what it's doing. This is the code: [CODE]#include <iostream> using namespace std; int calculate(int values[], int size) { int answer = 0; for (int 1 =0; i< size; i +=1) } answer += values[1]; } return answer; } int main() { int myArray[5] = {0, 2, 4, 8, 16}; count << "The answer is " << calculate(myArray, 5); }[/CODE] This is my attempt at converting it to Python: [CODE]def main(): myArray[5] = (0, 2, 4, 8, 16) print "The answer is ", calculate(myArray, 5) def …

Member Avatar
Member Avatar
+0 forum 16

What "Hello World" is to the console, the "Bouncing Ball" is to the Graphical User Interface. Nothing fancy, the ball is created via a call to the API function ellipse() and then bounced within the confines of the windows form. For the DEV C++ crowd: Let me know if you find these snippets somewhat helpful in your learning process in the comments section at the end.

Member Avatar
Member Avatar
+1 forum 23
Code Snippet Bouncing ball

Wanted to let two forms work together. One form would be the input form and the main form would consume this data. I managed to succeed with the help of a few of my friends here at daniweb., who helped me setup a static form. Just posted a bit of the most relevant code here, the rest of the project can be found in the attachments. I also like to mention a technique used here to attach a value to a selection of a name in a combobox.(Found it on MSDN) See the list of Planets. (Yes, throw a ball …

Member Avatar
Member Avatar
+1 forum 4

Hi, I am getting an error while making a vector. frame.h #include <wx/wx.h> class Frame : public wxPanel { public: Frame(wxPanel* parent, int xx, int yy); ~Frame(); private: int x; int y; } frame.cpp #include "frame.h" Frame::Frame(wxPanel* parent, int xx, int yy) :wxPanel(parent) { x = xx; y = yy; } Frame::~Frame() { } in another wxPanel , I am creating a vector- std::vector<Frame> vFrames; And using it in a function- FinalFrame::addFrame() { vFrames.push_back(Frame(this, 20, 40)); } And I am getting this error- `error: use of deleted function 'Frame::Frame(const Frame&)' ` Is this related to wx or I am coding …

Member Avatar
+0 forum 0

Hi! We are a 4 member group for our thesis and we already have submitted 5 topic proposals yet nothing was accepted...and here are the topics: enrollment system, gadgets on track, employment resource system, subdivision technical entry pass Now, I need a help for new ideas that can be developed through visual studio and it can be a web-based or window-based projects. Hope you can help me Thanks in advance!

Member Avatar
Member Avatar
+0 forum 38

first of all, I wanna say hi to u all as I'm new to daniweb. I'm a freshman in a college so I don't know much of c yet. So please be understanding in case that I will ask some n00b question later on :) So this is my problem...first one I was using this code to get input from player to move the pad right and left [code=c] while(i<10) {i++; clrscr(); mov='s'; //supposed to be null, need more knowledge about \0 y=10; gotoxy(x,y);puts(pad);/*supposed to remove the cursor if it's possible. Ended up using puts to make the cursor less …

Member Avatar
Member Avatar
+0 forum 7

Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? Mostly because learning new things keeps my brain active. And besides, nobody on Daniweb seems to be asking questions about vb.Net anymore. So I thought I'd give it a try. After a few weeks of puttering I managed to learn enough Python to rewrite all of my vbscripts (stop laughing, …

Member Avatar
Member Avatar
+7 forum 20

Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'TextBox1.Text = Token() If Button1.Enabled = True Then Label1.Text = Label1.Text + " A1 " If Button1.BackColor = Color.Yellow Then Button1.BackColor = Color.Red Else Button1.BackColor = Color.Yellow End If Else Label2.Text = "" Label2.Text = True End If Button1.BackColor = Color.Yellow End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click If Button2.Enabled = True Then Label1.Text = Label1.Text + " b1 " If Button1.BackColor = Color.Yellow Then Button1.BackColor = Color.Red Else Button1.BackColor = Color.Yellow End If Else Label2.Text = "" Label2.Text = True End …

Member Avatar
Member Avatar
+0 forum 3

Hi, I hv vb.net applivcation. I have following CODE1 to save data & to prevent duplicate data entry into table. The following code I put in button save event. However I want to put this CODE2 in perticluar textbox e.g. here SpecimenNoTextBox. so that when the user enter duplicate SpecimenNo.it says "Specimen No. already exist". How can i do this? **CODE1** If SpecimenNoTextBox.Text = "" Then MsgBox("Enter") Else Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\data\Histopathology New.accdb") con.Open() Dim cmdlogin As New OleDbCommand(("SELECT SpecimenNo FROM HPReport"), con) Dim dalogin As New OleDbDataAdapter Dim dslogin As New DataSet …

Member Avatar
Member Avatar
+0 forum 11

There are times when you need to make sure your counter starts at an odd or even number. Even is pretty simple - `counter = counter + modulus(counter)`. If counter is even it stays, if it's odd it gets incremented by 1. Odd is a bit more complicated - `counter = counter + modulus(counter + 1)`, If counter is odd it stays, if it's even it gets incremented by 1. if you're in danger of counter being the max value you can always subtract instead. These basic algorithms should work for any language that has a modulus operator/function. I've included …

Member Avatar
Member Avatar
+2 forum 4

Hi! I want to learn programming. I'm 14 years old and very fond of computing. The only problem I face is *Which programming language should I learn?* or should I learn *Programming* i.e I learn the basics of programming so that I will be capable of learning any programming language. Also, when you recommend me one of the choice I stated above then please give me resources for learning e.g book names or some websites which will start me learning from scratch. Furthermore, I want to state that I want to create cool games, softwares or even Operating Systems from …

Member Avatar
Member Avatar
+2 forum 10

HI everyone, _SBLOCK *allocateMemBlock(size_t size) [ _SBLOCK *block = (_SBLOCK*)sbrk(0); void *memadr = (void*)sbrk(0); void *allocate_mem = (void*)sbrk(BLOCK_SIZE + size); if(allocate_mem == (void*)-1) [ return NULL; ] else [ block->next = NULL; block->isfree = false; block->size = size; block->memoryAddress = memadr+BLOCK_SIZE; return block; ]

Member Avatar
Member Avatar
+0 forum 8

Listed below is the original word jumble python program. According to the exercise i'm supposed to add hints see next thread on my modified program however it doesn't work correctly. [code=python] # Word Jumble # # The computer picks a random word then "jumbles" it # The player has to guess the original word # import random # create a sequence of words to choose from WORDS = ("python", "jumble", "easy", "difficult", "answer", "xylophone") # pick one word randomly from the sequence word = random.choice(WORDS) # create a variable to use later to see if the guess is correct correct …

Member Avatar
Member Avatar
+1 forum 5

how to select an item in the combobox and then put item quantity in the textbox. and how to price the combobox items. Really need help .. Next week is my system defense.. Thank you

Member Avatar
Member Avatar
+0 forum 1

Hi, I've been having issues with my program where I make the rocket do what its supposed to do when it comes to outputting a filled and hollow rocket body depending on either a odd or even value. The only problem I am currently having is duplicating the body length also known as adding stages of how long I want the boyd to be. Here's my code: [code] //Draw a Rocket with a filled or hollow body with stages #include <iostream> using namespace std; void drawOddBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters void getDimensions(/* …

Member Avatar
Member Avatar
+1 forum 1

Hi all, I have an application which saves data (books details like book title, author and location) to a mySql db and performs CRUD operations. I thought I'd use hibernate to take care of the ORM side of things and everything was OK when it came to create a record, but for RUD operations I had an issue. If I'm a user, I'm likely to be willing to find a book by its author, title or location, certainly not by its ID and yet as far as I can see, hibernate uses IDs for these kind of operations. I dug …

Member Avatar
+0 forum 0

I dont understand the appearent discrepency in the treatment of the variabe x, y, and z. Why y isn't treated as x and z? #include <stdio.h> #include <string.h> int main() { char result[100] = "Philippe Dupont 30"; char x[50]; char y[50]; int z; /*We use sscanf to give a value to the three variables x, y and z. the two first are strings and don't need &.*/ sscanf(result, "%s%s%d", x, y, &z); /*Printing the value of the variables works fine.*/ printf("%s\n", x); printf("%s\n", y); printf("%d\n", z); /*But when I want to print a string in which the variables are, the …

Member Avatar
Member Avatar
+0 forum 2

Hi! I have made a POS Sotware. I have used only one JFrame as Main/Home Screen of the software and used JDialogs for all other screens. In this post I have concern with the 2 screens; Home Screen(which is a Jframe) and Sales Screen(which is a JDialog). As Home Screen appears I instantiate an instance of the Sales Screen in the constructor of Home Screen as : Sale sale = new Sale(); And on Pressing a Button on Home Screen I called : sale.visible(true); In the WindowOpened Event of the "Sale" Screen I load the products data from database and …

Member Avatar
Member Avatar
+0 forum 14

Hi, I apologize if my english is bad, I need some help printing the value of a variable in the code that I show below, I'm using emu8086 and I need that this works in this code example that is the same that comes in the examples of emu8086 (PrinterDemo.asm) with a little of modification that is of what I need to print. Thanks for your help [CODE] ; the printer demonstration. ; this is simplified/ms-dos complatible version. ; this example may not work on Windows XP, however it may work for Windows 95/98: ; http://support.microsoft.com/default.aspx?scid=kb;en-us;Q258878 ; the printer device …

Member Avatar
Member Avatar
+1 forum 2

Hello, I am learning Tkinter. As a part of the learning process I am building a Notepad clone in order to become familiar with Tkinter widgets. I am pretty close to completing it - I added about 90% functionality to the application - but I face two problems: 1) The text widget has a default fixed size (80x25 chars I believe). If I resize the root window at a greater size, the text widget stays at the initial size. This is an undesirable behavior - I expect/want the text to resize along with the root. Now, I came with something …

Member Avatar
Member Avatar
+0 forum 4

The End.