132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for thegreymatter

Hi recently while trying to solve a core Java algorithm question I got trapped into a problem. Let me explain the puzzle. > There is a series of numbers. where difference between any consecutive > numbers is either a or b. The 1st number of the series is 0. Our …

Software Development algorithm java puzzle
Member Avatar for JeffGrigg
1
1K
Member Avatar for mcdczzz

can anyone help me?..i trying to make a very flexible report according to a search Results...i use vb6 and ms access as database...

Software Development visual-basic
Member Avatar for Hiroshe
1
227
Member Avatar for Gribouillis

This snippet defines a function [icode]mousepos()[/icode] which gets the mouse position on the screen. The package python-xlib is required.

Software Development pc-peripheral python
Member Avatar for woooee
1
6K
Member Avatar for happygeek

Bugs are, and always have been, a fact of life for the software developer. However, if Microsoft researcher Andrew Begel has his way, they could be a thing of the past. Last month a paper entitled '[Using Psycho-Physiological Measures to Assess Task Difficulty in Software Development](http://research.microsoft.com/apps/pubs/default.aspx?id=209878)' was published which Begel …

Member Avatar for Hiroshe
1
299
Member Avatar for ivan3510

Hi! So, I made this code #include<iostream> #include<cstdlib> #include<pthread.h> using namespace std; const int m=6; const int n=5; const int s=5; const int r=8; const int num_thrd=3; class data{ public: int* A; int* B; int* C; int start; }; void* multiply(void* pod) { data* P=(data*)pod; for(int i=P->start;i<m;i+=num_thrd) { for(int j=0;j<r;j++) …

Software Development c++
Member Avatar for ivan3510
1
214
Member Avatar for vegaseat

The Fibonacci series of numbers was used by Leonardo of Pisa, a.k.a. Fibonacci (around the year 1200), to describe the growth of a rabbit population. The series has been noted to appear in biological settings, such as the branching patterns of leaves in grasses and flowers. We take a look …

Software Development python
Member Avatar for Stefan_3
1
2K
Member Avatar for vegaseat

Because of their demand only nature, generators are ideal for finding the combinations of larger sequences. This code applies a Python generator to find the combinations of the sequence. Since permutations are a special case of combinations for all the items in a sequence, I have expanded the result to …

Software Development python
Member Avatar for Stefan_3
1
439
Member Avatar for deceptikon

I love barcodes. In my line of work (image processing and document imaging), barcodes play an integral part in high quality automation. As such, I've developed code from the lowest level of encoding and decoding barcodes up to using a number of libraries for working with barcodes. The biggest problem …

Software Development
Member Avatar for deceptikon
1
2K
Member Avatar for mgold

I love the idea of dependency injection. I started doing psuedo dependency injection on my own before I knew about DI because I was frustrated programming without it. I then discovered Guice. From a program design point of view, I like it a lot. Everything is much more decoupled and …

Software Development java spring-framework
Member Avatar for JeffGrigg
1
295
Member Avatar for Zsolt Szücs

I have basic experience in the topic, enough for smaller projects but I would like to improve my knowledge. I would highly appriciate any source about good practices (I have hard time to decide whether a solution belongs in the "good practice" or just in the "good enough to use" …

Software Development java
1
144
Member Avatar for philosopher779

This is my first post on Daniweb so forgive me if I make any mistakes. Introduction: I recently graduated from Dev Bootcamp. It is an accelerated 9-12 week camp which teaches Ruby and Rails. A traditional computer science degree will teach students algorithms, data structures etc before moving onto higher …

Member Avatar for Dani
1
385
Member Avatar for Kellypyz

hello everyone, i have a datagridview filled with a dataset and i want to store all the records it has to new table in database. i added a new column,("pos") to a dataset that fills the datagridview through a query so that it ranks records based on a field (total).my …

Software Development dataset vb.net
Member Avatar for cgeier
1
254
Member Avatar for iConqueror

Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster: #include <algorithm> #include <ctime> #include <iostream> int main() { // Generate data const unsigned arraySize = 32768; int data[arraySize]; for (unsigned c = 0; …

Software Development algorithm java
Member Avatar for ~s.o.s~
1
371
Member Avatar for iConqueror

I have a home project that I am working on that manipulates the network cards state ie on or off. I have already completed this usinng WFA, it runs with batch scripts that takes the adapters name and sets its state. However doing it through batch scripts, If I wanted …

Software Development visual-studio
Member Avatar for pritaeas
1
282
Member Avatar for guideseeq

What is the difference in: Set<Object> linksSet = new LinkedHashSet<Object>(); LinkedHashSet<Object> linksSet = new LinkedHashSet<Object>(); Actually, I want to create a Set, that would hold the objects in the same order, I insert into it. Many thanks for the help, in advance.

Software Development java
Member Avatar for guideseeq
1
243
Member Avatar for Reverend Jim

Sometimes you want to add a little functionality to an existing class but you don't want to go to the trouble of sub-classing. A technique that you can use is known as **Extending**. For example, I frequently use regular expressions when working with strings. Wouldn't it be nice if strings …

Software Development regex vb.net
Member Avatar for ddanbe
1
381
Member Avatar for BogdanCov

Hello, guys, I encountered a big problem. There is a genereted matrix of buttons: private void Single_Load(object sender, EventArgs e) { //code here for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { //a lot of working code here b[i, …

Software Development gui matrix-multiplication
Member Avatar for BogdanCov
1
221
Member Avatar for arunkumars

Hi all, We are using TortoiseHg(Mercurial) as a sub version control in our project currently, we are now planning to migrate the sub version control to TFS 2013. 1. is this possible without the loss of any revisions that are exisitng. 2. is this possible without the loss of any …

Software Development
Member Avatar for pritaeas
1
136
Member Avatar for hwoarang69

# What I am using: # I am using java & libgdx to create a game in desktop & android. # Error: # Could not find class 'com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator', referenced from method com.aa.GameStates.MainMenu.init so on desktop version, everthing work fine and no errors. Problem is when I run it on android. …

Software Development android android-development java
1
185
Member Avatar for laguardian

Hey guys! So I'm writing a code that takes 10 numbers from the user which is stored in a array. The user then inputs the problem number (1 or 2) depending on what they want to do to the array. Unfortunately, I'm getting and error on line `array[i].prob1(); `.. Here's …

Software Development java
Member Avatar for laguardian
1
242
Member Avatar for Tamara_1

Program For Standard Form def stnfrm(a,b,c): one = (b/(2.0*a)) two = c-((b**2.0)/(4.0*a)) axis = one/-1.0 x = -b/(2.0*a) y = a*(x**2.0)+(b*x)+c print x if a == 1: print "(x + %f)**2 + (%f)" % (one,two) elif a == -1: print "-(x + %f)**2 + (%d)" % (one,two) else: print "%d(x …

Software Development python
Member Avatar for ddanbe
1
540
Member Avatar for deceptikon

## Disclaimer ## Full disclosure, this is a problem I've recently encountered at work. I couldn't find a reasonable solution and ended up recommending a logistics approach rather than a full code approach to solve it. The code performs a subset of required functionality to give users more options, but …

Software Development
Member Avatar for ddanbe
1
581
Member Avatar for TrustyTony

I did code for challenge that I saw posted for C# by deceptikon: http://www.daniweb.com/software-development/csharp/threads/479304/coding-challenge-string-to-date Here it is. Of course normally the code would be without prints and put in function, but this is enough for now for me. There could also be normalization from '/' separated form not producing ambiguous …

Software Development c# python
1
269
Member Avatar for crazyboy

hi frds ... I want to notify my application whenver user open any file. i just want to notify the name of that file, which is opend by user. how can achive this. FileSystemWatcher class is not giving this facilities. I want only notification for opening any file.. please reply …

Software Development
Member Avatar for aryan123
1
393
Member Avatar for bonzie1923

how do you display image from a access database into a jtable in java

Software Development java
Member Avatar for JamesCherrill
1
156
Member Avatar for Gribouillis

This script computes the formal series expansion of a mathematical function on the command line using the python module swiginac, an interface to the CAS Ginac. Typical invocation in a linux terminal looks like $ serexp.py -n 7 "log(1+x)*(1+x+x**2)**(-1)" 1*x+(-3/2)*x**2+5/6*x**3+5/12*x**4+(-21/20)*x**5+7/15*x**6+Order(x**7) As far as I know, swiginac does not work in …

Software Development python ubuntu
1
487
Member Avatar for zegarnek

Hi, I am just playing with C code in the console under Linux. In the old times a fair bit of code was written for a console; programs were operating in text mode, creating menues was quite a fun. I coded very simple c routine to print a strings of …

Software Development c legal ubuntu
Member Avatar for N1GHTS
1
3K
Member Avatar for M_I_K_E_911

I am new to programming and picked up the following book by microsoft. I am taking Computer Science in college and would love to know if this is the correct step. I am very interested in how computer language works and wantto get into this a lot more. I've read …

Software Development c# microsoft
Member Avatar for M_I_K_E_911
1
353
Member Avatar for William Hemsworth

Saw [this](http://www.daniweb.com/software-development/cpp/code/216430/add-a-little-graphics-to-your-console) and decided to make a little spinoff with some physics of mine. Enjoy!

Software Development c++
Member Avatar for YassinTAH
1
448
Member Avatar for Richa_2

` Hey can u solve my prob. I was running an Applet program(.html file) with java Browser but it showing error = "your security settings have blocked a local application from running" So can u say ... which application is this

Software Development java
Member Avatar for Richa_2
1
233
Member Avatar for bumsfeld

A simple program to show you how to create a table of Fahrenheit and Celsius values using a for loop. You may be able to learn from this code.

Software Development c
Member Avatar for rubberman
1
280
Member Avatar for SQLpower

Hello, So I basically created SQL Server Database and I got it working with displaying my images and drop downlist and everything, however, I want to make it to display an image only if a continent is selected. So if I select Europe, I would like to receive a picture …

Software Development c# display image
1
124
Member Avatar for agrbinoo.albaker

Write a program that uses a for statement to sum a sequence of integers. Assume that the first integer read specifies the number of values remaining to be entered. Your program should read only one value per input statement. A typical input sequence might be 5 100 200 300 400 …

Software Development c++
Member Avatar for agrbinoo.albaker
1
981
Member Avatar for newbiewwcode

Can you guys please help me understand when to use const? For example, if I have the following functions: viod add (int* array) { int total = array[1] + array[2]; } viod subtract (int* array); viod times (int* array); viod divide (int* array); viod printArray(int* array); and I only intend …

Software Development c++ dataset
Member Avatar for newbiewwcode
1
209
Member Avatar for softwaretime

Well this is quite a large program so there is a lot of information to sort through, but when I compile it now it comes up with this: /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp: In member function ‘virtual int dbase::todo()’: /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp:393: error: invalid conversion from ‘const char*’ to ‘int’ /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp:394: error: invalid …

Software Development c++ daniweb-bug
Member Avatar for frank.dekievit.50
1
13K
Member Avatar for priyanka raj

Would you please help me in writing a c code to read data from a file and perform 1)numeric sort, 2)alphabetical sort. the file may contain data of any kind.Like it may contain only numbers,only names or a database of employees of a company.(which contains their employee id,name,designation and salary,....in …

Software Development c c# c++
Member Avatar for aaaymen
1
7K
Member Avatar for stupidenator

Hey Everyone, This is my first post. Recently, I have been working on an instant messenger program in java. I have created the networking part of the client, and I have almost finished the server side. I know the program works and I am allowed to send messages, but now …

Software Development client-server first-post java
Member Avatar for stultuske
1
2K
Member Avatar for pooja_4

hey can any one try out this problem.... 1)Write a program to read a sequence of N integers and print the number that appears the maximum number of times in the sequence. INPUT Input contains two lines. First line in the input indicates N, the number of integers in the …

Software Development c++
Member Avatar for Faizal Shariff
1
297
Member Avatar for kumar.rupesh

Hi Friends, Please share your's experience about best supporting programming language for BigData & Hadoop. I'm also doing some research about this topic plz contribute your idea & experience for this topic. Regards, Rupesh

Software Development java python
Member Avatar for kumar.rupesh
1
232
Member Avatar for TrustyTony

Here is simple text file example for beginners, using try..except for reading old content as it may not yet exist.

Software Development python
Member Avatar for TrustyTony
1
473
Member Avatar for yousafc#

Hello Experts Here is my connection string [CODE] string con = "Data source =YS-8462BA359936;Initial Catalog = Schooldata;Integrated Security = True";[/CODE] and my store procedure is [CODE] SqlConnection objCon = new SqlConnection(con); objCon.Open(); SqlCommand cmd = new SqlCommand("Studentinsertadmission", objCon); cmd.Parameters.Add(new SqlParameter("@Studentid",Convert.ToInt32( studentid.Text))); cmd.Parameters.Add(new SqlParameter("@StudentName", firstname.Text)); cmd.Parameters.Add(new SqlParameter("@Image", image.image )); cmd.CommandType = …

Software Development image open-source sql
Member Avatar for mostafarafi
1
5K
Member Avatar for ajanah.ibrahim

Write a function to remove all trailing blanks from the right end of a string. Assume the prototype is void trimRight(char a[]); Write a function to remove all leading blanks from the left end of a string. Assume the prototype is void trimLeft(char a[]); Write a function to add extra …

Software Development c
Member Avatar for Ancient Dragon
1
164
Member Avatar for ajanah.ibrahim

IS IT POSSIBLE TO PASS AN ARRAY INTO A FUNCTION AND THEN CALCULATE THE PRIME NUMBERS OUT OF THE LIST?

Software Development c
Member Avatar for David W
1
208
Member Avatar for Labdabeta

Hello, Looking at the standard streams provided by the stl libraries, it seems as though it is impossible to have 1 stream to use for both standard console IO and file/string IO. However, before I give up I would like to ask, is this possible: generic_stream stream; stream=cin; //now I …

Software Development c++ file-stream ios
Member Avatar for Labdabeta
1
575
Member Avatar for Reverend Jim

If your Excel spreadsheet is laid out as regular columns and rows with a header row that identifies the columns then this code will allow you to read the data using ADODB the same way you would read records from a database table. To try this code 1. Create a …

Software Development microsoft-office vb.net
Member Avatar for Reverend Jim
1
4K
Member Avatar for Krokcy

Hey! So I am having trouble with this [problem](projecteuler.net/problem=18)! Basically you have to find the path that gives the largest sum down this tree: 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 19 01 23 75 03 34 88 02 77 73 07 …

Software Development data-structure programming-construct
Member Avatar for Krokcy
1
300
Member Avatar for codefinger

So frustrating...I've been Googling all over, posted at various developer forums, but so far I can't find an answer: The goal -- use VB.Net to write a windows forms application that responds to a limited set of voice commands after the user says a keyword, (such as "Wake Up"). I …

Software Development vb.net windows-xp xml
Member Avatar for rizwanakhalid
1
547
Member Avatar for fliponymous

hello everyone i have wrote a code but i have problem compiling it ( making it run ) it's running but there are no any text's that i'm typing in Writeline here's the code! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication5 { class Program { …

Software Development
Member Avatar for castajiz_2
1
138
Member Avatar for 21345570

Hi, I would like to find out how you would go about using your database online, as if you were to do online shopping or online banking. Where all the details of the users can be accessed from the internet and the database doesnt have to be on the particular …

Software Development visual-studio
Member Avatar for 21345570
1
169
Member Avatar for 21334929

How do you validate checkbox/radiobutton lists? will it be like normal validation?

Software Development
Member Avatar for 21310051
1
299

The End.