Click here to Skip to main content
15,890,947 members
Everything / General Programming

General Programming

programming

Great Reads

by OriginalGriff
Marking code you need to return to later
by jurhas
A small simulator for a 6 axis articulated robot
by super
A rough guide for developers how to approach development of software for Internal use especially in Engineering companies, where shorter turnaround is more important
by Colin Vella
This article presents an algorithm and data structures to implement auto-tiling as seen in RPG Maker, the Starcraft level editor, etc.

Latest Articles

by Henrik Vestermark
The steps needed to build an Interval Arithmetic class in C++
by Jackson Jiang
Introduction to and development journey of a real-time transcription function
by Shun Huang
Use Python to build atomic binary trees
by Andreas "PAX" Lück
Investigation of PE file modifications performed by Microsoft Detours

All Articles

Sort by Title

General Programming 

23 Sep 2013 by Member 10292973
Hi! This program is supposed to write to a file, then read it. It's reading randomized coordinates generated by the program. Whenever I compile the program it gives me the error of:File: F:\COMPSCI 12\J4.java [line: 54]Error: F:\COMPSCI 12\J4.java:54: '.class' expectedI'm not sure...
19 Jul 2010 by psynergy
Is there an existing framework or example of calling a service / web service settings stored within a Database that can be dynamically invoked?I have looked into Microsoft Service Factory 2008, Service Invocation Framework and Web Service Dynamic Proxy but not found anything all that helpful.
19 Jul 2010 by #realJSOP
Your question makes little sense. If you are asking if you can get aweb serive's settings from a database in order to communicate with the web service, yes you can, but only if that database can be accessed without the use of the web service. Typically, a web service can only be accessed...
22 Sep 2011 by ahsanriaz1K
Hi,1)Why .Net is not preffered over java other than open source reason?2)Who is most powerful, java or .net?3)What features .net has in comparison to java?Please answer these.. as i want a detailed answer about these.
22 Sep 2011 by Richard MacCutchan
1. It is preferred - by some; the answer is a matter of opinion not fact.2. It depends, today Java, tomorrow .NET.3. Go and do some research into this as there will be lots of differences and similarities.
22 Sep 2011 by André Kraak
Start by reading this http://en.wikipedia.org/wiki/Comparison_of_the_Java_and_.NET_platforms[^].
22 Sep 2011 by Pravin Patil, Mumbai
You will get different answers to your question, as this is a subjective question and can be argued as well. Here is my take :Why .Net is not preffered over java other than open source reason?Ans - In real world, it is not 100% correct. JAVA is definitely preferred in some scenarios but...
22 Sep 2011 by Nagy Vilmos
If you're targeting windows only then stick to .NET, that's what it's designed for.If you're targeting multiple platforms then go with Java.To be honest, if you learn one the other will be relatively straight forward to pick up so there is no need to go with one or the other. Learn both,...
8 Nov 2012 by x.aerodynamik
I was working on some Assembly code, and I need to separate the digits of my WORD variable (12345). I've done this, and I am unsure as to how to loop this:org 100h section .text start: mov bx, output ; put address of output into BX mov ax, [num] ; put 16-bit value...
8 Nov 2012 by OriginalGriff
Instead of dividing by 10000, then 1000, then 100,... the more normal way is to divide by 10 each time and output the bytes backwards - least significant first. This way, you can cope with numbers more flexibly. You then return a pointer to the most significant byte and only loop while you have...
9 Jun 2013 by Arsineh Boodaghian
Hi, I have edited my question...Im having problem with this part of program, if ((n = sendto(dccp_sockfd,cmdframe, 18, 0, (struct sockaddr*)&PMU_addr,sizeof(PMU_addr)) == -1)) { perror("sendto");// when I use the program, this error execute at runtime by saying sendto: broken...
6 Jun 2013 by KarstenK
You should search for some working sample code.I guess you mismatch some flags
23 Feb 2014 by pharap@hotmail.com
I don't think int is the right type for that kind of array.Whoever set you that task wants you to figure out what a multi-dimension array is: Multi-Dimension Array[^]I'd guess that this is probably what the person wants your code to look like:int[,,] studentIDs = new...
23 Feb 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Why would we tell you? This is not what we usually do here.Here we answer specific questions which members face during programming.If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario. Members will...
23 Feb 2014 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
23 Feb 2014 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
28 Nov 2011 by AndrewG1231
I have been upgrading a program from WinXP to Win7 and I would like to take advantage of the ability to preview the contents of the data in saved files. The original data files are images and the file format is custom but they are displayed as bitmaps within my program. In my efforts to learn...
28 Nov 2011 by barneyman
the preview handlers are COM objects - so you're best off starting an ATL Project (DLL) and adding a Simple Object to itYou can use BNF[^] to register your DLL (there will already be an RGS file for your object you can augment) - this will automatically get called when you regsvr32.exe your...
27 May 2013 by Member 10053453
Have you found the solution for it..i also have to preview an image in preview pane. I dont understand why they have used CreateStyleSheetNode() ??? Could you please send me information on my email id [deleted email] thanks...
27 May 2013 by Espen Harlinn
Have a look at: View Data Your Way With Our Managed Preview Handler Framework[^]Best regardsEspen Harlinn
14 Feb 2014 by Member 10598049
Actually am doing my final yr project in scilab...My project title is Efficient cluster labeling for support vector clustering..we were facing problems in incorporating the tools in matlab with tools in scilab...can anyone provide solution for us????????
14 Feb 2014 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
12 Dec 2013 by Atlys
I've been trying to code for a couple of years now, and I still haven't made anything.I feel I know what the different things mean, but at the same time, don't.I know what it does up front, but not what it does behind the scenes, at least not consciously while coding.This makes me...
12 Dec 2013 by OriginalGriff
I'm really sorry, but we can't answer that!We have no idea what your skills are, or how well you apply them, and without that we have no frame of reference.I would suggest that if your boss is happy with what you are producing, then you are doing ok, at least - there may be more to...
17 Feb 2011 by jobin007007
My problem is Multiple Sockets are not able to receive data from connections to different ports on a server.This is what I have in code: Please look at comments.Socket [] sockets=new Socket[10];for (int socketnumber=0;socketnumber
31 May 2013 by Mohammed Hameed
Hi Experts,Can anybody suggest me a best approach on how to generate a XML file programmatically using C# other than XmlReader/XmlWriter? (so that parsing it should be easier).Basically, it is a Xml Hbm mapping file for NHibernate. Any .NET Api available for reading/writing Hbm files...
31 May 2013 by Jignesh Khant
System.Data.DataSet ds = new System.Data.DataSet(); System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter("Select * from demo", "Data Source=184.107.55.15;Initial Catalog=demo;User ID=sa;Password=1947"); da.Fill(ds); // Write to XML...
17 Dec 2014 by George Jonsson
You can use XmlDocument[^].XmlDocument xmlDoc = new XmlDocument();XmlElement elRoot = xmlDoc.CreateElement("body");xmlDoc.AppendChild(elRoot);XmlElement elParam = xmlDoc.CreateElement("param");XmlText elValue =...
23 Oct 2012 by kisaac01
i would like to help me with a c language source code that prints figures in words and words in figures.
23 Oct 2012 by OriginalGriff
Start here: Converting numbers to the word equivalent. [^]
11 Feb 2012 by Ilya Builuk
This article describes the key principles of PhoneCore Framework implementation and how to use it for building Windows Phone 7 application.
20 May 2015 by Saikrishna35
Hi.Here I have an array short days = 80;short[] possibleDays = new short[] { 1, 2, 4, 8, 16, 32, 64 };Now I want to get the numbers for which the given variable days is the sum of any digits in the array.For example 80 = 64+16 (if I/p is 80, O/P should be 64,16)37 = 32 + 4 +...
20 May 2015 by Pankit Patel
you can Try this It's Working..... Console.WriteLine("Enter Input:"); string input = Console.ReadLine(); double days = Convert.ToDouble(input); //short days = 80; short[] possibleDays = new short[] { 1, 2, 4, 8, 16, 32, 64 }; ...
20 May 2015 by Frankie-C
Your array is an array of binary power:2^0=1, 2^1=2, 2^2=4, 2^3=8, 2^4=16, 2^5=32, 2^6=64Simply check corresponding bits states: for (i=1; i
12 Feb 2014 by charles henington
This is an alternative for "Send Mail With Attachment File"
5 Sep 2015 by User 11044701
I need to create a simple software which will store information likeNameJobSalaryDate of joiningand all data will be searchable by "Employment number"any suggestion will be appreciated,I dont know much about database and all that stuff so please a little help
5 Sep 2015 by Wendelius
You could benefit going through some tutorials and concepts. Have a look at:- Data Access Using ADO.NET (C++/CLI)[^]- ADO.NET[^]- Data Normalization[^]
5 Sep 2015 by Richard MacCutchan
Try http://www.sqlite.org/index.html[^].
30 Jan 2012 by Pablo Aliskevicius
Do you believe that memory corruption will generate an immediate, repeatable crash? Some programmers actually do...
23 Jan 2012 by Stef Cas
A VB.NET project showing how to build a simple magnifying glass.
31 Jan 2013 by Agustin Recoba
Hello im new in this web site... well, i want to know something, is it too dificult to program in 2d barcode? like making a qr code? i mean, i dont want a website that makes that, i want to make a software to do it or something like that... Like this examples:...
3 Feb 2013 by H.Brydon
There is a public domain QR code generator available here[^]...
22 Aug 2013 by Member 10225445
Is there any coding for print preview ? we tried a lot but we didnt get any idea.. so please tell if there is any solution.
10 Dec 2013 by Petr Ivankov
Multidisciplinary paradigm of software development
5 Oct 2012 by ridoy
Can someone briefly explain ACM problem solving process?As i am very new in this topic,so i have some questions over it..1.From where i get the problems of ACM? As i am new,so i think i should start from low ranked problems.But where i get those rankings?2.For solving problems,i think...
5 Oct 2012 by ridoy
Ok,i have got my solutions.I describe those here if it helps any newcomer like me..:)1. ACM problems should be found in this link..http://uvatoolkit.com/problemssolve.php[^]2. Programming language should be C,C++ or Java.3. For coding Codeblock may be good one(for my case).4. For...
26 Apr 2012 by EddyGuzman
Hi to all. I need to set a max. of 2 hours after a first selection, this in Delphi 5. This is what I mean:I have two date-time-pickers set to show only the time, when I select a Time in the first one I need to limit the second to show or to select just 2 hours after the first (Ex. If in...
26 Apr 2012 by Sandeep Mewara
To put it out of unanswered list. OP found the solution and updated:I found the solution...it was so easy...To anyone who cares about it:tmrEnd.Time:=tmrEntry.Time+ EncodeTime(2,0,0,0);
14 May 2013 by ayesha hassan
I have created a window and added almost 50 buttons to it. But the problem is that I can only see a few of those buttons as my window does not scroll up/down or left/right to show me the remaining buttons.If my window is an edit box, I can easily add AutoScroll to it i.e. as soon as the text...
14 May 2013 by Yuriy Loginov
put your buttons inside the System.Windows.Forms.Panel and set AutoScroll = truemore info here:Customize a panel with Autoscroll property[^]
14 Aug 2015 by Member 11292470
Hello All, below i attached a code where i need a control on recursive function. Means, it should wait for my button press signal to move further.void PlaySongs::performance(int step){step++;if (waitForInterruptSys (iOnePin, -1) >0){ cout
14 Aug 2015 by bling
If "(waitForInterruptSys (iOnePin, -1)" represents your button press, change the if statement to a while statement ...if (waitForInterruptSys (iOnePin, -1) >0){ cout
13 Aug 2012 by Sachin Chandanshive
Addin Containg Useful Macros & Easily Accessible From Ribbon Menu
27 Mar 2024 by Rick York
Firstly, there are no limits to DLL sizes or capacities. Secondly, it is important to note what is emitting that error message. It could be the compiler or the linker. If it is from the compiler then you have not defined a prototype for the...
27 Mar 2024 by samtoad
Currently, I'm trying to add another "C" routine into a DLL file. I've made the routine inside a DLL source file. I've declared the routine, and also indicated the intentions as it will be exported. The function name is also included in a DEF...
28 Mar 2024 by KarstenK
Verify that your new dll function has the same export macro signature as the other dll function. Mostly some DLL_EXPORT or similar macro stuff. Another common issue is that, your new dll isnt used by the calling program but a stale version in...
7 Oct 2014 by Sinisa Hajnal
public partial class Default2 : System.Web.UI.Page{ DataTable Basket_DataTable = null; protected void Page_Load(object sender, EventArgs e) { if (Session["basket"] != null) { Basket_DataTable = (DataTable)Session["basket"]; } ...
7 Oct 2014 by Sinisa Hajnal
For persistent cart you need some way to identify the user that comes back. Both solutions below will keep the cart on project restart.You can do that in several ways, simplest of which is to add the cart products into the table CARThaving columnscart_id uniqueidentifierproduct_id...
6 Oct 2014 by AnoopGharu
Hello everybody, I am making on a small shopping website project using layer architecture in c# asp.net and now I am working on the cart_page to add the products in the cart_page.Here's below is the code & I use to add the products but it can't works well and products can't be add in the...
27 Sep 2012 by AfterShave
I have searched over the web but i can't find an answer. How can I adjust contrast or brightness if a trackbar's value is changed?
27 Sep 2012 by Sergey Alexandrovich Kryukov
Please see this CodeProject article: Setting Screen Brightness in C#[^].I don't understand how could you miss it if you did the search.—SA
29 Jun 2013 by Ghosuwa Wogomon
An example of a clean way to implement classes in C
9 Sep 2015 by TheBigBearNow
Hello I created a small application and some forms for someone to be able to create a user account and then go to a login screen and the user can login with the account that they just created.Now my next step is I would like to bring up a new form which I created and I want to be able to use...
31 Aug 2015 by Peter Leow
This is a simple web application to illustrate visually the difference between Ajax and non-Ajax calls that take place all in a single web page.
18 Jun 2014 by Member 10893646
Hi guys, I have a new laptop and its features are: Intel I7-4700HQ CPU 240 GhzGeforce GTX 765MRam 12 GbI want to program in most used languages (Objective-C,Php,Python,Java,C++,C#,js, Ruby, ASP.NET, JavaEE, JavaFX) and you know, put in my laptop a COMPLETE programming station,...
19 Jun 2014 by Sergey Alexandrovich Kryukov
What should you install? Whatever you want. You need to make a choice between multiple boot and virtualization, or the combination of both approaches. Both have benefits and drawbacks. It highly depends on the expected life time of each OS installation. When it comes to a laptop, one problem is...
16 Jul 2011 by Member 8033321
hi everyone...I would like to know if anyone could help me out on what is alpha testing and the processes or steps involved?Thank you in advance.
16 Jul 2011 by Richard MacCutchan
See here[^]. Google is always the first port of call for general questions such as this.
9 Jul 2011 by jesus42
I want to start use programming because am i was all way like computer and how they work am want to learn a programming langue to get started the easiest can any one help me pliz
9 Jul 2011 by thatraja
I can't say the easiest way but here I give you more than couple of ways to learn anything. I have answered DD's question on last year, see that. Hope this will help you.Education Needed[^]
9 Jul 2011 by Mohibur Rashid
In case of learning we all follow the same easy way. But If the case is passing in the exam, all you need to is cheat
3 Nov 2010 by Dave Midgley
.NET delegates and Generics allow for an elegant implementation of the Command pattern.
14 Aug 2014 by TheCannyCoder
Java 8 is perhaps one of the most exciting editions of the Java language in recent times. One of the headline features is support for functional programming which is the focus of this blog. The support comes mostly in three features: Support for [work pipeline] streams. Streams allow us to process d
23 Aug 2015 by Richard Silveira
Android Material Design for old devices with Design Support Library
3 Mar 2016 by Member 11403735
Hello. I have a program for send a file via Bluetooth but i want to send a file via Bluetooth without show Bluetooth device chooser. I already tried.Please help me
20 Aug 2012 by Espiritu John
An android-style notification component for .NET Framework.
29 Dec 2013 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Here we answer specific questions which members face during programming. We can't work on the whole source code. You need to do that yourself.If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario. ...
6 Aug 2010 by OriginalGriff
Oooh. That was hard. What is next? "Write a program to add two single digit binary numbers and print the result as a pie chart?" ;P
6 Aug 2010 by Richard MacCutchan
This answer prevents the question from remaining in the unanswered queue.
6 Aug 2010 by Dalek Dave
Go back to school or ask CSS about Pizza College.
6 Aug 2010 by Smithers-Jones
Ouh, another gimmecode-question by laxmikanth1234. Fake answer to get it out of "unanswered questions" and here is an advice: Codeproject is clearly not the place for you.
6 Aug 2010 by Dalek Dave
Whilst you have not actually asked a question, I can see that it may mean :"Has anybody ever written this program".The answer, of course, is Yes.It was the person who passed his exam and is now making a moderately successful living as a developer.You, on the other hand, will remain...
6 Aug 2010 by OriginalGriff
Done. Now what?.........................
6 Aug 2010 by Dalek Dave
I could answer, but only if you pay me.You see that's how it works, you learn a skill and sell it.I do not see people buying your skill when you wont's pay attention in class!
7 Aug 2010 by laxmikanth1234
Does anybody know this logic "2^n + 1" ?
7 Aug 2010 by Abhinav S
Dude - what exactly are you trying to ask? You can post your question in Hindi on the Hindi forum here.
7 Aug 2010 by Dalek Dave
That is not logic, it is a exponential scale.
8 Sep 2010 by Vadluri Sreenu
Hithis is not logic, it is statement.2^n+1 means exponential of 2 is n and plus 1i.e,2n +1
8 Sep 2010 by CPallini
laxmikanth1234 wrote:Does anybody know this logic "2^n + 1" ?There's no logic in your question. :)
18 Jun 2014 by OriginalGriff
That isn't a question we can even begin to answer: the fault lies between your ears, and wetware isn't something we can provide code solutions for.
18 Jun 2014 by ZurdoDev
Do what you love. If you don't love programming, don't do it. Find something you are passionate about.
18 Jun 2014 by Peter Leow
Hope this may enlighten you: learn a programming language[^]
18 Jun 2014 by Sergey Alexandrovich Kryukov
It's not clear why did you decide that this is a site for psychologists who should help you to put your mind in order.However, I have my own advice in this direction: real man do not need psychologists, they always control themselves. So, be a real man, if you can. If not, nothing can help...
27 Jun 2013 by Joan M
I've found it: it is the programming script for CASIO calculators... x|Hello all,I need help in order to understand a code snippet I've found in the Internet and that I want to translate into another language.The problem I have is that I don't know which language it...
27 Jun 2013 by OriginalGriff
Answered only to remove from unanswered list - Solved by OP.
27 Jun 2013 by Joan M
Just in order to prevent the question of appearing as unanswered, I've found it: it is the programming script for CASIO calculators... X| Thank you all for spending time on that. :thumbsup:
23 Apr 2012 by soraya2012
please give me some information about APL langauge ?
23 Apr 2012 by Sandeep Mewara
Start from here: Wiki: APL[^]If needed, it has links to various references to move on.
21 Nov 2013 by ali64iust
hello dearsour team want to implement an application control.i have some question.we have some white list that if an application was in thatlist can run in a system and other application should not run anywhere.our goal is to prevent application to create process. for example...
21 Nov 2013 by Richard MacCutchan
Look at some of these links[^]. There are many ways of restricting your systems by the security policies in Windows.