1,899 Topics

Member Avatar for
Member Avatar for Zachary_1

import java.util.*; import java.io.*; import java.text.*; import java.lang.*; public class Pascals_Triangle public static void main(String[] args) throws IntegerEntryFailException { new Pascals_Triangle(); } public Pascals_Triangle() { int lines = 0, index = 0; char q = ';'; String string = null; Triangle myTriangle = new Triangle(); Scanner scan = new Scanner(System.in); …

Member Avatar for Zachary_1
0
2K
Member Avatar for schroaus

I have looked around on the internet a little bit, but I am unable to find a function or equation for inverse/arcsine. I was able to find Inverse Cosine, but inverse sin doesn't seem to exist. Does anyone know how to use inverse sine in delphi?

Member Avatar for pritaeas
0
377
Member Avatar for HelpWanted2115

Ok, hi guys.... I have some IT homework due tomorrow and I honestly don't know what to do. I've made multiple attempts and it's just not working out for me. So I'm asking for help ASAP PLEASE. The questions states: Write a program to read in the names of a …

Member Avatar for CodingCabbage
0
171
Member Avatar for surya.putra.94849

can someone show me how to make an animation in turbo pascal? i'm a new and i'm stuck in making my first game. especially in the animation of the game.

Member Avatar for surya.putra.94849
0
518
Member Avatar for schroaus

I REALLY need some help. I ahve been writing a tic-tac-toe console application program in delphi. I had most of the logic finished for the program when I made a mistake. At the beginning of a class period the program was working fine, at the end of the class it …

Member Avatar for Schol-R-LEA
0
3K
Member Avatar for andie Offse
Member Avatar for Fireprufe15

I'm trying to make a program that saves images in a database. I've pulled together some info on the net and wrote up code that I think is supposed to work, but fails in a completely unique way on either side (the saving and the loading). Here's my code, could …

Member Avatar for Hemo2013
0
2K
Member Avatar for gerhardjl

Hi Group, (delphi 7 refers) I haven't used delphi for some time. I have now a very basic app. Three buttons on form, Start/Stop/Exit objective> When Start is pressed, the app enters a while(tick=true) do begin..someCode;...end; What I now require is that, when Stop is pressed, the appl abort thisstart …

Member Avatar for pritaeas
0
261
Member Avatar for fernandofranca

Sorry I´m new to PASCAL and I´m using Lazarus to program for Windows CE I dont know why I´m getting the error Error: constructors, destructors and class operators must be methods I have my Unit1 where I´m declaring my form procedures as bellow unit Unit1; {$mode objfpc}{$H+} interface uses Classes, …

Member Avatar for fernandofranca
0
778
Member Avatar for Dani

What is the difference between Pascal and Delphi? I heard they're like the same language?

Member Avatar for seblake
0
1K
Member Avatar for 恒

I use image component to display a picture for JPG,but it is lost a color.why I never meet this. I can't to upload picture to this forum.

Member Avatar for 恒
0
329
Member Avatar for pritaeas

This snippet shows how you can get the headers for an URL, for example to detect a redirect. I had to use the ANSI functions to ensure correctly returned headers. Manual entry for [HttpQueryInfo](http://msdn.microsoft.com/en-us/library/windows/desktop/aa385373(v=vs.85).aspx). Let me know if you have any questions/remarks.

Member Avatar for vrkiro
1
356
Member Avatar for nblackburn

I am string to convert a string to a constant as the `StringChangeEx` function takes the second argument as a const but i have it as a string and am unsure how to get this function working as i am new to pascal. The problem is in the BackupFile function …

Member Avatar for nblackburn
0
326
Member Avatar for pritaeas

I have the following code: const AGENT = 'User Agent'; SERVER = 'www.daniweb.com'; RESOURCE = 'api/access_token'; ID = ''; // my client id SECRET = ''; // my client secret CODE = ''; // my returned code, pasted from the browser REDIRECT_URI = ''; // my redirect uri ACCEPT: packed …

Member Avatar for pritaeas
0
2K
Member Avatar for nadiah.izzati

program WaterBill; uses winCrt; type customer=record acct_no:longint; code:char; liter:longint; amount:real; end; var arrayC:array[1..50] of customer; index:integer; loop:boolean; continue:char; arr:customer; PROCEDURE read_data(var data:customer); begin writeln('Customer Info: '); writeln('Account number: '); readln(data.acct_no); writeln('Code(H,C,I) : '); readln(data.code); writeln('Unit of liter: '); readln(data.liter); end; function calc_bill(code:char):real; begin if (code='H') then begin if (arr.liter<=15000) then …

Member Avatar for pritaeas
0
200
Member Avatar for nadiah.izzati

my code can't seem to find the maximum price. program Mobile; uses winCrt; type Mobilephone=record brand:integer; model:String; price:real; end; var hp:array[1..100] of Mobilephone; count,m,MobileNum:integer; max:real; PROCEDURE read_data(var newMobile:Mobilephone); begin writeln('Brand:(1:Samsung 2:iPhone 3:Nokia)'); readln(newMobile.brand); writeln('Model:'); readln(newMobile.model); writeln('Price:'); readln(newMobile.price); end; PROCEDURE displayexp(var exp:Mobilephone); begin if(exp.price>max) then begin writeln('THE MOST EXPENSIVE HP:'); writeln('Brand: …

Member Avatar for ddanbe
0
161
Member Avatar for corl45

ok, every time i start a new project in dev-pascal. i edit the resource file to somthing like this: [CODE]1 ICON "C:/Dev-Pas/Icons/Edit.ico"[/CODE] ive tried manualy doing it, and with the build in GUI. after i compile the resource file itself it works just fine says: "compiled correctly" but when i …

Member Avatar for miracleX
0
1K
Member Avatar for riki.kavadarci

Hi Does anyone know how to use it? I mean FastMM in Delphi. Or any code to work with memory leaks. Clear memory when application run or stuff like that. My exe (application )growing used memory when work and open forms, click button, read from database etc. thank you

Member Avatar for pritaeas
0
225
Member Avatar for kalo150

it gives me an error and the code is: var a,b,c:integer; begin write('a=');readln(a); write('b=');readln(b); write('c=');readln(c); if a>b then begin if a>c then writeln('a=',a) else writeln('c=',c); end; else begin if b>c then writeln('b=',b) else writeln('c=',c); end; readln; end.

Member Avatar for riki.kavadarci
1
161
Member Avatar for Llama098

Maybe some one can help, to make a programm, who show after some seconds random 30 numbers in massive, then they disappears and you must guess as many numbers as you can.

Member Avatar for riki.kavadarci
0
132
Member Avatar for blob84

Hello when I compile this piece of program written in pascal with gpc (GNU pascal for linux) for pascal, I get errors: cradle: In function `_start': (.text+0x0): multiple definition of `_start' /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crt1.o:(.text+0x0): first defined here cradle: In function `_fini': (.fini+0x0): multiple definition of `_fini' /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o:(.fini+0x0): first defined here cradle:(.rodata+0x0): multiple …

Member Avatar for blob84
0
329
Member Avatar for HelpWanted2115

Hey guys... I keep getting an error(Error 26: Type Mismatch) in line 19(Until num='';) and I don't know how to fix it... Can you guys please assist me.....Thanks.... program sequence; uses wincrt; var num,count_zero,count_non_zero:integer; Begin count_non_zero:=0; Repeat writeln('Enter a number'); readln(num); IF num=0 then count_zero:=count_zero+1 Else count_non_zero:=count_non_zero+1; writeln('Non Zero Count: …

Member Avatar for kalo150
0
214
Member Avatar for Gobroski

This works in C++ Builder: int chcolor; for(int d, d < 5, d++); { String name = "d" + IntToStr(i+1); TLMDSpeedButton* button = dynamic_cast<TLMDSpeedButton*>(this->FindComponent(name)); chcolor = random(6)+1; switch (chcolor) { case 1: button->Color = clRed; break; case 2: button->Color = clSilver; break; case 3: button->Color = clBlue; break; case 4: …

Member Avatar for Gobroski
0
592
Member Avatar for axitya

Yes, I know what I'm talking about. which is Creating my own compiler to compile a language say C++,Java,Ruby, Python ..(Any one of them ofcourse -.- ) Actually, if I can just get the source code for an existing one that would be much better. [example] Say there's Turbo C …

Member Avatar for felceyboy
0
359
Member Avatar for ecostas

Hi. I need help with defining on which monitor a given form is to be presented. I know I can discover how many monitors a computer has with screen.MonitorCount. But I haven't found yet how to change the settings. For example, I'd like to have a one-form application to run …

Member Avatar for raymhuff
-1
3K
Member Avatar for Ali Musa

I have, what I thought, was a trivial question however I am not quite sure of an answer yet. I'd like a two dimensional array of strings and integers. The first "column" will be string and the second "column" will be integer. later i want the first value of array …

Member Avatar for House_of_Dexter
0
202
Member Avatar for HelpWanted2115

Ok, I know you guys don't really just give away the answer to the whole problem like that. But I really can't figure this one out.... The question states: The following represents some sample scores obtained by students in a test: 5,4,7,10,0,6,0,1,9,6,8,999. 999 is the dummy value which terminates the …

Member Avatar for House_of_Dexter
0
273
Member Avatar for terataki

Hello, I want to make something like windows explorer. So the easy part first. I added these: [CODE] ShellTreeView1: TShellTreeView; ShellListView1: TShellListView; ShellComboBox1: TShellComboBox;[/CODE] I connected them and everything is good. I can see files and I can navigate folders, drivers, e.t.c. I changed the ViewStyle attribute of ShellListView1 to …

Member Avatar for House_of_Dexter
0
1K
Member Avatar for HelpWanted2115

Hey guys, I'm making a program to count the number of zeros and tens in a list of numbers in the format: 5,10,5,0,4,6,7,3,0,10,2..... Yeah like in that format, how do I make it read the data like that without a set number of values to be entered and count the …

Member Avatar for zurichy
0
164
Member Avatar for maglarp

How do I specify a mouseDown eventhandler to dynaically creted Tpanels? My intention is to create a number of panels, like tiles, and move them around on the Form I have created a design time TPanel and copied its OnMouseDown event and saved it as PanelMouseDown. My code: Pan:=TPanel.Create(Form2); Pan.Height:=60; …

Member Avatar for maglarp
0
282
Member Avatar for HelpWanted2115

Ok, so I got a program to do in TurboPascal but it's not doing the one of the requirements and I'm not sure how to get it so the question states: Write a program to read in the names of a sequence of products and their price. The program terminates …

Member Avatar for HelpWanted2115
0
188
Member Avatar for HelpWanted2115

Hi guys, so yeah, I got some IT homework AGAIN on programs and I repeatedly did trace tables and they all worked, but somehow, when I enter it in turbo pascal, after the 10th number, the digits start to get negative and after the 6th number, its not following the …

Member Avatar for HelpWanted2115
0
201
Member Avatar for riahc3

Hello Is there some kind of multiplatform library for Delphi (with its SDK) to access webcams while programming? The goal is to take still images but Ive only found ones that are compatible with Windows.

Member Avatar for pritaeas
0
178
Member Avatar for cucolino

Hello One more question. Can't seem to find any info wether it's possible to disable Alt+F4 while MessageDlg pops-up or not. The thing is, that the OnKeyDown event in main form works ok, while set with begin if ((ssAlt in Shift) and (Key = VK_F4)) then Key:=0; end; But that …

Member Avatar for cucolino
0
232
Member Avatar for OASys1

Greetings Friends ! How do I do incremental Builds in Delphi...? I have both the Delphi 7 and Delphi XE2... I have never really incrementally built my apps... pardon my ignorance... but i have taken on a project on a piece of software where the manager wants the build done …

Member Avatar for pritaeas
0
447
Member Avatar for Ali Musa

I have developed delhpi software sql database invlove now want to convert it into web application hwo plz help me iam new in this .

Member Avatar for OASys1
0
231
Member Avatar for Simon180

Am trying to read strings from a html page to get settings the following javascript strings i like to be able to read. <script type="text/javascript"> PP['channel'] = "testchannel"; PP['channel_id'] = 39388311; PP['channel_category'] = "gaming"; PP['channel_meta_game'] = "wow" PP['channel_is_featured'] = false; </script> would be nice that i can pick the data …

Member Avatar for pritaeas
0
1K
Member Avatar for Lennox

I used to do a bit of programming in Turbo Pascal but since Microsoft eliminated DOS I don't know how to set up the compiler in Windows XP or 7. Can anyone advise how I can continue to use Turbo Pascal? Thanks I got this reply "TP will still run …

Member Avatar for Lennox
0
1K
Member Avatar for PolarClaw

Hello everyone, im new here and dont know yet most of the policies.. but i have been reading lots of your C++ codes, mostly, codes made by Narue.... i wonder if you someone could help me make a code for pascal's triangle wherein the ouput would look like a triangle …

Member Avatar for H A hashim
1
1K
Member Avatar for Qazinix

I am working on my first Client server program. The client will have to connect to the server however there is no way to know what the server ip will be so this needs to happen dinamically, at least the first time the program runs. The clients will receive strings …

Member Avatar for Qazinix
0
324
Member Avatar for astian

So... I am sorry if I have posted the question at the wrong place, yet I couldnt find a better place. Anyway, my problem is as follows: A week ago, we had to bring back to life some old projects of the firm. The projects are ... not too complex …

Member Avatar for pritaeas
0
665
Member Avatar for joejodre

plz i need a pascal prog which input 2 values,call dem A and B.print the value of the largest variable. (2)modify the prog above to accept 3 values A,B,C and print the largest.tanx.

Member Avatar for pritaeas
0
157
Member Avatar for cucolino

Hello Once again, I'd need your help. I was messing around (if I say so, although I only set the formstyle properties to mdiform and mdichild once, and then reset them to Normal, ever since my problem appears) formstyle property, and got some strange behaviour for which can't seem to …

Member Avatar for cucolino
0
293
Member Avatar for canadaaaaa

this is an assignment i recieved i have been trying to get it to work but it wont.i edited a couple times but i still get the same messages can anyone assist? The purpose of the program is to assist with the check-in and searching of guests registered at the …

Member Avatar for blesiw
0
431
Member Avatar for hambu

How to generate random number in Free Pascal between 1 and 1,000,000? I have used a variable type as LongInt, Real, Integer, but there is always an RangeError. But random number between 1 and 33,333 is working correctly. Program Random; var a: ...; begin a:=random(1000000); end.

Member Avatar for cereal
0
338
Member Avatar for davecoventry

Depending on a variable 1-7, I am interested in ANDing a byte value to to get that number of bits. Currently I'm doing this: function getMaskedBits(num, Bit_location: Byte): Byte; var masks: array[1..7]of Byte=(127,63,31,15,7,3,1); begin Result:=num and masks[Bit_location]; end; is there a better (or more efficient way of doing this?)

Member Avatar for davecoventry
0
113
Member Avatar for Blousey17

This procedure is called just before the answer is written to a binary file to ensure it is in the correct format. It works but I need it to repeat until it is an integer. I was trying to use a 'repeat','until' but wasnt sure what the 'until' condition woudld …

Member Avatar for pritaeas
0
240
Member Avatar for Niatia

Hi, I'm a bit of a newbie to Pascal and I'm trying to create a simple program to convert binary numbers to decimal, I'm unsure of how I can disallow an input that is not binary, this is my code: var Validation : boolean; Binary, Number : String; Decimal, index, …

Member Avatar for pritaeas
0
332
Member Avatar for jaron1611

Morning, I am loading an xml file where i want to search low level node name if exists. For example: <xml> <A> <B> <c></c> <d></d> </B> </A> </xml> so i have IXMLDOMDocument and IXMLDOMNode, i need to load an existing xml file and to search the node <d> where i …

Member Avatar for pritaeas
0
59
Member Avatar for jameosa

I need help to Write a PASCAL program that reads in ten values and then sort them using the bubble sort method

Member Avatar for pritaeas
0
265

The End.