Jump to content

Post your programs!

DeadlyGrnSpirit

Big or small, I want to see what you guys have made. Be it a calculator for your class or a full 3d game. However for the safety of everyone on the forum I have a few rules for posting:

 

1. Please provide a link to virus total with the scan results of your program

1. (If you're willing) Provide the source for the program. This not only helps ensure your program isnt malicious, but really helps others to learn. Please consider it.

 

With that said, I look forward to seeing what you guys have made B|

Link to comment
Share on other sites

Link to post
Share on other sites

[Rainmeter]
Update=1000

[Variables]
Color=255,255,255
;path to the music player program below
;so that when clicking on cover art
;the program opens up
Path=T:\Stuff\AIMP\aimp.exe

FontFace=Ubuntu
FontSize=13

[Metadata]
Author=deXxterlab97
Version=1.0.0.0.97
Information=Simple skin that displays cover art of current song and have media player buttons below. 
License=I have a driver's license

[mPlayer]
Measure=Plugin
Plugin=NowPlaying

;edit this line below to the player you use
;accepted format AIMP, CAD, iTunes, MediaMonkey, Winamp, WMP
PlayerName=AIMP 

PlayerType=Cover

[mShuffle]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[mPlayer]
PlayerType=Shuffle

IfCondition=mShuffle = 1
IfTrueAction=[!SetOption MeterShuffle Text "S"]
OnUpdateAction=[!UpdateMeter MeterShuffle][!Redraw]
IfFalseAction=[!SetOption MeterShuffle Text ""]


[mReplay]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[mPlayer]
PlayerType=Repeat

IfCondition=mReplay = 1
IfTrueAction=[!SetOption MeterReplay Text "R"]
OnUpdateAction=[!UpdateMeter MeterReplay][!Redraw]
IfFalseAction=[!SetOption MeterReplay Text ""]

[Prev]
Meter=Button
ButtonImage=Media Buttons\prev.png
X=72
Y=215
LeftMouseUpAction=!CommandMeasure "mPlayer" "Previous"
Group=Toolbar
AntiAlias=1
ToolTipText=Previous
Grayscale=1
ImageTint=#Color#

[Next]
Meter=Button
ButtonImage=Media Buttons\next.png
X=180
Y=215
LeftMouseUpAction=!CommandMeasure "mPlayer" "Next"
Group=Toolbar
AntiAlias=1
ToolTipText=Next
Grayscale=1
ImageTint=#Color#

[PlayPause]
Meter=Button
ButtonImage=Media Buttons\playpause.png
X=108
Y=215
LeftMouseUpAction=!CommandMeasure "mPlayer" "PlayPause"
Group=Toolbar
AntiAlias=1
ToolTipText=Play/Pause
Grayscale=1
ImageTint=#Color#

[Stop]
Meter=Button
ButtonImage=Media Buttons\stop.png
X=144
Y=215
LeftMouseUpAction=[!CommandMeasure "mPlayer" "Stop"][!Update]

Group=Toolbar
AntiAlias=1
ToolTipText=Stop
Grayscale=1
ImageTint=#Color#

[MeterShape]
Meter=Shape
Shape=Rectangle 1, 1, 201, 201 | Fill Color 255,255,255,100 | StrokeWidth 3 | Stroke Color #Color#

[MeterText]
Meter=STRING
Text="No cover art"
X=100
Y=90
StringAlign=center
FontFace=Ubuntu
FontColor=255,255,255,240
FontSize=11
AntiAlias=1

[MeterCover]
Meter=IMAGE
MeasureName=mPlayer
LeftMouseUpAction=!execute [#path#]
ToolTipText=Launch media player
X=2
Y=2
W=200
H=200
PreserveAspectRatio=1

[MeterReplay]
Meter=String
FontSize=#FontSize#
FontColor=#Color#
FontFace=#FontFace#
X=37
Y=235
AntiAlias=1
StringStyle=Bold

[Shuffle]
Meter=Button
ButtonImage=Media Buttons\playtest.png
X=0
Y=215
LeftMouseUpAction=!CommandMeasure "mPlayer" "SetShuffle -1"
Group=Toolbar
AntiAlias=1
ToolTipText=Shuffle
Grayscale=1
ImageTint=#Color#

[Replay]
Meter=Button
ButtonImage=Media Buttons\replaytest.png
X=36
Y=215
LeftMouseUpAction=[!CommandMeasure "mPlayer" "SetRepeat -1"]
Group=Toolbar
AntiAlias=1
ToolTipText=Repeat
Grayscale=1
ImageTint=#Color#
SolidColor=0,0,0,1

[MeterShuffle]
Meter=String
FontSize=#FontSize#
FontColor=#Color#
FontFace=#FontFace#
X=2
Y=235
AntiAlias=1
StringStyle=Bold

 

Link to comment
Share on other sites

Link to post
Share on other sites

Numerical Integrator in Python

There is a lot on non code portion in this.

 

import math
from decimal import Decimal as D
from decimal import getcontext
getcontext().prec = 20
e=math.e
pi=math.pi
def repeat():
    Q=input("\n Run again? \n Type Y or N \n")
    if Q=="Y":
        main()
    else:
        if Q=="N":
            print("OK")
        else:
            print("I didn't get it. \n ")
            repeat()
      
def main():
    
    k = input("\n Please type the function that you want to integrate. \n")
    lower_limit=D(input("Please put lower limit. \n" ))
    upper_limit=D(input("Please put upper limit. \n" ))
    dx=D(input("Please put sixe of small element dx.\n" ))
    
    def f(x):
        return D(eval(k))
    
    def integration(lower_limit,upper_limit,dx):
        sum= D('0')
        n=lower_limit
        while n<upper_limit :
            sum = sum + (f(n)+f(n+dx))*dx
            #print(sum)
            n = n+dx
        sum = sum/2
        print("\n The integral of "+str(k)+" from "+str(lower_limit)+" to "+str(upper_limit)+" is "+str(sum) )
        print("Please note that the answer might not be accurate")
    integration(lower_limit,upper_limit,dx)
    #repeat()
    
main()

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, LabRat said:

you sound like a dev that ran out of ideas.

Who are you refering ??  You might want to clarify that.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, nvpendsey said:

Who are you refering ??  You might want to clarify that.

My guess is OP

Don't forget to @me / quote me for a reply =]

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, LabRat said:

you sound like a dev that ran out of ideas.

If you have some I could use some :P

Link to comment
Share on other sites

Link to post
Share on other sites

I make maps and custom textures. I'll sell you some. I even script once in a while.

Link to comment
Share on other sites

Link to post
Share on other sites

#!/usr/bin/env node
const fs = require('fs-extra')
const p = require('commander')
const process = require('process')
const child = require('child_process');
const path = require('path');
const def = {
    def_compiler : "g++11",
    targeted_comps : [ 'g++', 'g++11', 'g++14', 'g++0x', 'g++1y', 'clang', 'g++17', 'g++1z'],
    supported_comps : [ 'g++', 'g++11', 'g++14', 'g++0x', 'g++1y', 'g++17', 'g++1z'],
    gcc_family : [ 'g++', 'g++11', 'g++14', 'g++0x', 'g++1y', 'g++17', 'g++1z']
}
function is_in(what, where){
    for (el of where) {
     if(el===what) return true;
    }
    return false;
}

function get_buid_cmd(comp,file,parms){
    if(!is_in(comp,def.supported_comps)) return false;
    if(is_in(comp,def.gcc_family)){
        var out = "g++ ";
        out += "'" + path.normalize(file) + "' ";
        if(comp === 'g++11') out += '-std=c++11 ';
        if(comp === 'g++0x') out += '-std=c++0x ';
        if(comp === 'g++14') out += '-std=c++14 ';
        if(comp === 'g++1y') out += '-std=c++1y ';
        if(comp === 'g++17') out += '-std=c++17 ';
        if(comp === 'g++1z') out += '-std=c++1z ';
        if(parms.optymalization) out += '-O' + parms.optymalization + ' ';
        out += "-o '" + path.join(path.dirname(file),path.basename(file,path.extname(file))) + "'";
        return out;
    }
}

p
  .version('0.0.0')
p
  .description('builds file')
  .option("-c, --compiler <compiler>", "Which compiler to use('g++','g++11','g++14','clang')")
  .option("-f, --file <file>", "Which file to compile")
  .option("-r, --run", "runs builded file")
  .option("-i, --fin <fin>", "if runs builded file, stream this file to it's stdin")
  .option("-o, --fout <fout>", "if runs builded file, stream it's stdout to this file")
  .option("-O, --opt <opt>", "if and how much opt you desire, number for g++")
p.parse(process.argv);
if(!p.compiler) p.compiler = def.def_compiler;
p.file=path.resolve(p.file);
/// BUILD
console.log("[CCE] executing command: "+get_buid_cmd(p.compiler,p.file,{optymalization: p.opt}))
child.execSync(get_buid_cmd(p.compiler,p.file,{optymalization: p.opt}));
/// RUN
var fsin, fsout;
if(p.fin){
    if(!p.fin) p.run = false;
    else{
        p.fin = path.resolve(p.fin);
        fs.ensureFileSync(p.fin);
        fsin = fs.createReadStream(p.fin);
    }
}
if(p.fout){
    if(!p.fin) p.run = false;
    else{
        p.fout = path.resolve(p.fout);
        fsout = fs.createWriteStream(p.fout);
    }
}
if(p.run){
    file = p.file;
    const binpath = path.join(path.dirname(file),path.basename(file,path.extname(file)));
    var dbout = "[CCE] running binary: " + binpath;
    if(p.in) dbout += " with " + p.in + " > stdin"
    if(p.in && p.out) dbout += " and"
    if(p.out) dbout += " with stdout > " + p.out
    console.log(dbout)
    var time = process.hrtime();
    const suicide = child.spawn(binpath, {
        stdio: [
        'pipe',
        'pipe',
        1
        ],
        timeout: 1
    });
    fsin.pipe(suicide.stdin);
    suicide.stdout.pipe(fsout);
    suicide.on('close', (code) => {
        var diff = process.hrtime(time);
        var ns = diff[0] * 1e9 + diff[1];
        var ms = ns * 1e-6;
        ms -= ms % 1;
        var s = ms * 1e-3;
        s -= s % 1;
        console.log(`[CCE] execution ended with code ${code} after  ${s}s or ${ms}ms or ${ns}ns`);
    });
}

I've made it for my personal use during preparations for Polish IT Olympic, it runs between Sublime Text 3 build system and GCC.

I've called it CCE and it's job is to

  1. create {*.cpp file basename}.in file if it doesn't exist 
  2. build *.cpp file and pipe any gcc output to Sublime's console
  3. run builded file and pipe
    1. *.in file => stdin
    2. stdout => *.out file
    3. stderr => sublime console (CCE stdout)
  4. log approximated time program has been working before

For example building hello world named main.cpp will produce

  • empty main.in
  • main.out containing "Hello world!"
  • binary called main

It is overkill and terrible solution but it works and that's all that matters (in this case ;)

Sorry for not-really-english, this code was not meant to be public ><

Link to comment
Share on other sites

Link to post
Share on other sites

I'm currently writing a vector-like graphics based animation tool for games, partially because I accidentally discovered some interesting things when experimenting with ideas in Scratch, but also because the topic interests me.

 

Virus Total:

https://www.virustotal.com/en/url/2504e74e4fb823073ec4d9cbdfbc7e50d51a31f5c8f53a7cd1a94ef2afd33f32/analysis/1488208832/

 

Dropbox Folder:

https://www.dropbox.com/sh/uaz02qit5kvj7ki/AACKCCpyEkACvb_0q4vGyAMRa?dl=0

 

The files are in Js written under the Sphere 1.5 API

 

 

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

This is my MVC framework. Still a work in progress though.

Created for learning purposes only. Maybe I'll use this someday for a personal project.

 

https://github.com/iDutch/RHMVC

CPU: i7-12700KF Grill Plate Edition // MOBO: Asus Z690-PLUS WIFI D4 // RAM: 16GB G.Skill Trident Z 3200MHz CL14 

GPU: MSI GTX 1080 FE // PSU: Corsair RM750i // CASE: Thermaltake Core X71 // BOOT: Samsung Evo 960 500GB

STORAGE: WD PC SN530 512GB + Samsung Evo 860 500GB // COOLING: Full custom loop // DISPLAY: LG 34UC89G-B

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×