Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

*calculated using the average life expectancy for males in The Netherlands
Happy birthday, PT_! Have a delicious, cake-filled day Smile
It appears I'm a little late to the party, but have a very happy birthday PT_!
I haven't prepared anything, so here is a page of random code from my java class. Laughing

Code:
package project6;

import java.io.*;
import javax.swing.JOptionPane;

class distance {

    private double speed;
    private double time;

    public distance(double a, double b) {
        speed = a;
        time = b;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double a) {
        speed = a;
    }

    public double getTime() {
        return time;
    }

    public void setTime(double b) {
        time = b;
    }

    public double getDistance() {
        return speed * time;
    }
}
/**
* happy birthday?
*/
public class Project6 {


    public static void main(String[] args) throws IOException {

        double speed;
        double time;
        do {
            String speedw = JOptionPane.showInputDialog("Please enter a speed");
            String timew = JOptionPane.showInputDialog("Please enter a time");
            speed = Double.parseDouble(speedw);
            time = Double.parseDouble(timew);
        } while (speed < 0 || time < 1);

        distance distance1 = new distance(speed, time);
        PrintWriter pw = new PrintWriter("myFile.txt");
        pw.println("Hours   Distance");
        for (int i = 1; i <= time; i++) {
            distance1.setTime(i);
            pw.println(distance1.getTime() + "       " + distance1.getDistance());
        }
        pw.close();
    }

}

Don't try to figure out a hidden message or anything, cause there isn't, it's really just an assignment I had to do.
Wait, I missed it too, apparently! Happy birthday, PT_!
Thanks everyone! Smile It was quite a fun day, though busy. Got my first driving lesson, but I survived, so no worries Very Happy

Also:

*Someone* needs to time a very little bit better Razz
Happy birthday PT_! Smile
Ha! You thought I forgot didn't you! Well thanks to the magic of time zones, I still have 5 hours left before I'm officially late! Razz

I decided you give you a special picture in my HD picture program!

Happy Birthday PT_ !

Message to population : beware when you walk, PT_ take car driving lessons !!!
Try to learn also the mechanical point of view of a car, it help a lot when there is a car problem specially during a travel.
Happy (Belated) Birthday PT_!
Oh no, happy belated birthday! Did you do/have/receive anything fun to mark the occasion?
Happy birthday PT_!
LogicalJoe wrote:
Happy birthday PT_!


Happy birthday!


Code:
(d=document).body.appendChild(p=d.createElement("pre")),i=0,(a=x=>{for(p[q="innerText"]="",j=20;--j;)p[q]+=(j-i?j>i|j+8<i?"":"   "+")("[(i+j)%2]:' .-"-. \n|     |\n -.,.- ')+"\n";++i<20?setTimeout(a,99):p[q]+="happy birthday, PT_!"})();


JS, 253 235 233 bytes.

I don't feel bad about this, it's my code anyways :V

Code:
q=0,setInterval(l=>{q++,document.body.innerHTML=atob("SGFwcHkgQmlydGhkYXkgUFRfIQ==").split("").map((l,o)=>'<f style="color:hsl('+360*(o+q)/50+',100%,50%)">'+l+"</f>").join("")},20);


Womp's thing, JS, 183 bytes
Though I don't really know you (yet), still, happy birthday!
Happy birthday Smile Hope you have a nice day!
Happy birthday, PT_! What will you do/did you do to celebrate the auspicious occasion?
Merry birthday!

Code:
s=[atob("SGFwcHkgQmlydGhkYXkgUFRfIQ==")];q=0,a=x=>{q++;document.body.innerHTML=s.map((x,j)=>x.split('').map((x,i,a)=>'<f style="color:hsl('+(360*(i+q+j))/50+',100'+'%,50%)">'+x+'</f>').join(''))}
setInterval(a,20);

Thanks to _iPhoenix_ for basically writing this.
Don't try this on a physical calc, kids Razz


Code:
[i]BDAY
Begin()
SetTextFGColor(255
SetTextBGColor(0
Call A
End //gfx

Lbl A
SetTextFGColor(randInt(1,255
PrintStringXY("Happy B-Day!!",0,0
ZeroScreen()
Pause 1000
Return

Code:
// Program Name: Birthday
// Author(s): epsilon5
// Description: says happy birthday

/* Keep these headers */
#define FORCE_INTERRUPTS
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
/* Other available headers */
// including stdarg.h, setjmp.h, assert.h, ctype.h, float.h, iso646.h, limits.h, errno.h
/* Available libraries */
// including lib/ce/graphc.h, lib/ce/fileioc.h, and lib/ce/keypadc.h
// Sample: #include <lib/ce/graphc.h>
#include <graphx.h>
#include <fileioc.h>
#include <keypadc.h>
#include <intce.h>
#include <tice.h>
#include <math.h>

void main(void) {
gfx_Begin();
gfx_SetDraw(1);
gfx_SetTextScale(2, 2);
while (!(kb_Data[6] & kb_Enter)) {
kb_Scan();
gfx_FillScreen(randInt(0, 255));
gfx_SetTextFGColor(randInt(0, 255));
gfx_PrintStringXY("Happy birthday PT_!", 5, 5);
gfx_SwapDraw();
}
gfx_End();
}
Thank you guys, thanks for the wonderful programs in JS, ICE ( Cool ) and C, I appreciate them! I will celebrate my birthday this weekend with family and friends, so I have to wait a few days for the gifts Razz
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 3
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement