You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server
Administration Center

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - PT_

#1
Contests / Code Golf Belgium Numbers
August 16, 2017, 06:37:13 PM
Hello ladies and gentlemen!

It was a rather long time ago that Code Golf - The Reboot was active, and I enjoyed it so much, that I decided it would be fun to pick that up again. So here I am with a new task. Don't know what Code Golf is? Check some old topics. You have one week to complete this task, and entries should be submitted by sending a PM to me. Without any further ado, here is your task:

Write a program that inputs a positive integer and outputs the Belgium k-number of the input. Of course, you have no idea what a Belgium k-number is, so let me explain that first. Let k be one of the integers 0-9. The input N has the Belgium k-number, if N occurs in the increasing sequence which starts with k, and the difference between 2 consecutive numbers in the sequence are the same as the digits of N. See this for a better explanation. Let me give an example.

k = 7, N = 85
Sequence starts with 7
7  + 8 = 15
15 + 5 = 20
20 + 8 = 28
28 + 5 = 33
33 + 8 = 41
41 + 5 = 46
46 + 8 = 54
54 + 5 = 59
59 + 8 = 67
67 + 5 = 72
72 + 8 = 80
80 + 5 = 85
STOP

As you can see, 85 is in the sequence (7, 15, 20, 28, 33..), which means 85 as Belgium k-number 7.

Other example:
k = 7, N = 152
Sequence starts with 7
7  + 1 = 8
8  + 5 = 13
13 + 2 = 15
15 + 1 = 16
16 + 5 = 21
21 + 2 = 23
23 + 1 = 24
...


Providing that ANY input N has at least 1 Belgium k-number, find one of the Belgium k-numbers with any input.

Good luck! :)

I've no idea if this is a simple or a hard task, we will see later!

Sorry, didn't realize there are already 2 open contests at CW :(
#2
Web / Listen to MP3 files but not download them
April 15, 2017, 05:00:57 PM
Situation: my dad wants to host a paid service, where people can pay for his own music to listen online. However, they should not have the possibility to download them, because the service is paid. I tried several tricks to hide them, or making it really hard to find. I tried htaccess, but if I then block the MP3, <audio> doesn't work anymore, so that doesn't help. Another idea was to copy the MP3 to a temp folder, load it in the <audio> tag, and then immediately remove the folder, but I can't get that working yet + an experienced person can easily remove the JS code to remove the folder. Also, in HTML5, there is an option to download the MP3 IMMEDIATELY. I can remove that with CSS, but again, an experienced user can display it again, and download it.

@c4ooo said I can maybe stream it, so downloading them second by second, which might work, so I might give that a try.

Any more ideas? :)
#3
Other / [DUTCH ONLY] AIVD Christmaspuzzle 2016
January 13, 2017, 10:04:03 PM
[Only for Dutch people :)]

Zijn er mensen hier die nog bezig zijn geweest met de AIVD Kerstpuzzel 2016? Ik, mijn broer en een vriend van hem zijn nog op zoek naar de volgende antwoorden: 7b, 9-13, 15, 18, 21, 23, 24c, 25c, antwoord op 27. Zou wel leuk zijn als we wat hints en/of tips kunnen uitwisselen :D
#4
General Help / Change OS menu
July 12, 2016, 05:32:37 AM
Yo guys! While I was working a bit around with hooks and menu's, I was trying to change a menu completely. Let's say I want to add a submenu at EDIT->PRGM. What is the best way to do that? I can either make my own one, chopping off the standard menu, but the submenu COLORS would be very hard to replicate.

Another way is to increment the amount of submenu's when the hook is for the first time called (a=04h), but then the text will show up incorrectly, as it has an extra submenu.

My latest thought was, before drawing the first option, display the extra submenu, and increment the amount of submenu's, but I haven't tried it. Any thoughts? Thanks in advance!
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal