r/programmingchallenges • • Apr 27 '16

Drilling holes in dice.

4 Upvotes

You have a regular 6 sided die, with equal sized dots on each face. 21 dots total. The the dots are arranged such that the minimum distance between the edge of any non-centered dot and the edge of the cube is equal to the distance between the edges of adjacent dots on the 6 side.

You must drill tunnels through the dice that start at one dot and end at the other. Thus, the maximum number of tunnels possible is 10, with one hole left untouched.The tunnels may intersect if you choose.

What configuration of tunnels leaves the die as fair as possible after drilling? Which number(s) does the resulting die favor?

Edit: I don't think I gave enough information to specify the size of the dots. Let's just say they're .133x the edge length of the cube? Idk. If there's a standard for dot size on traditional or casino dice that you are aware of, let me know and feel free to substitute it. Or alternatively if there's an arrangement scheme that makes the dot size irrelevant within certain bounds, then feel free to use that instead.


r/programmingchallenges • • Nov 18 '19

Project idea (need help)

4 Upvotes

I came up with the idea to make a fully automated Instagram-account and see if it gets anywhere.
I want to do this in Python since I have worked with it before, other suggestions are welcome.

The Idea is as follows:
Every 24 hours it takes the top 6 posts from selected accounts by calculating their engagement ratio (Likes divided by followers).
It then schedules those posts to be posted the next day (1 post every 4 hours) with corresponding hashtags and captions (can be copied from the original post).

How would I go about this? Where do I start? I have some experience in coding but not a lot. But I am willing to learn along the way and adopt google as my new best friend.
The first problem I am running in to, is how do I get the latest posts with stats from someone's Insta?

I hope someone can help me with this project!


r/programmingchallenges • • Oct 31 '18

Reverse engineering a delphi program

0 Upvotes

Hello redditors.

I have a software made in delphi programming language and since the program is very old ( 2011 ) I couldn't find a keygen for it. so I though it would be fun to learn how to crack it. but once I learned I found that this program is very complex and I could not crack it + it works with a device so even if I crack it it stores the key in that device so cracking isn't an option so I need to reverse it and find how he is testing the activation key to make a keygen but no luck so far since i'm not familliar with delphi and Assembly

tried IDA pro and DeDe .... and others but without luck.

Can someone help me making a keygen for this. someone who love to take this challenge

I have some usefull informations that can help in the process.if someone could help me then I will provide the full informations that I've found + I have one key with the working activation if some one could figure out a way to find the relation between the key and the activation

Thanks


r/programmingchallenges • • Jan 21 '20

Motion UI - User Interface Animation (2020)

Thumbnail
youtu.be
4 Upvotes

r/programmingchallenges • • Jun 12 '19

Show your CS skills and decode the message before end of this week!

Post image
10 Upvotes

r/programmingchallenges • • Sep 25 '18

Robocopy

0 Upvotes

I'm using Robocopy to move all files from the source folder to the target folder which is on a different server. But the source copies are not deleted when this runs. The log shows the error "a required privilege is not held by the client" but it does have full control as it is my user and I am a domain admin. I've used the option /MOV.


r/programmingchallenges • • Apr 14 '12

Google Code Jam 2012 qualifications are ending in today

Thumbnail
code.google.com
5 Upvotes

r/programmingchallenges • • Jun 07 '16

Finding relevant information in a document

5 Upvotes

I use a specifications document, which has a number of specifications, to check whether the given product data given meets those specifications. For example, there’s a specification that reads “Where galvanized pipe is buried underground and joined by means of screw fittings, a protective zinc dust coating shall be applied to the exposed threads in the field. Do not leave any exposed metal uncoated”, I will have to search for data which talks about coating, specifically, protective zinc and where it is used. Is there a way to programmatically approach this? Here’s one approach I could think of – take each specification, find key stem words and look for them in the product data document. If it is found in the document, the page result for that specification is stored against the specification number.


r/programmingchallenges • • Dec 01 '19

Two Pointer Technique | Coding Interview Technique | Solve DS Problems i...

Thumbnail
youtube.com
5 Upvotes

r/programmingchallenges • • Nov 29 '19

Time Limit Exceeded- How To Avoid TLE ? | Trick To Pass All Test Cases In Competitive Programming

Thumbnail
youtu.be
5 Upvotes

r/programmingchallenges • • Jun 16 '17

Office Programmers, how do execs/management track your performance and does it represent you fairly?

5 Upvotes

I am trying to provide better metrics around the dev team to execs without making them track time, and I want to represent them fairly to non technical audiences who don't understand a velocity /agile shop. What works for you? What doesn't?


r/programmingchallenges • • Oct 05 '11

Convert Integer to String without toString() (or the equivalent)

6 Upvotes

A friend of mine just had an interview with Microsoft and came back with an interesting technical interview problem:

Given an arbitrary Integer, print it out to the user without using system libraries intended to do so for you.

I'm working on it now, but I can already tell you probably need two things: ascii values of the 0-9 characters, mod mod and mod some more?

I have a feeling someone is going to break out some bit manipulation on this one.


r/programmingchallenges • • Oct 10 '17

I am a Computer Science student currently in my second year of my B. E..I'm somewhat better in c and c++. What re the steps to be taken to take my programming skills to next level?

6 Upvotes

That is coding apps using c++


r/programmingchallenges • • Jan 29 '20

Website design help

0 Upvotes

I am looking for help to design a website where I can send the link to a customer they fill in the required boxes and hit apply and it will send all the info to me or load onto google calendar. Is this possible?


r/programmingchallenges • • Dec 17 '18

How to create script that automates the pages of an online book reading subscription.

1 Upvotes

Hello everyone, I buy a lot of books often at a price ranging from 24 to 50 euro, soon a total of 500 euros but I realized that the site offered a subscription to 30 euros per month with access to all books large collection on programming, but without possibilities to download and I understand. In short I am here to know if it would be possible to create a script that will allow me to make copies of every page of the book in an automated way, JS or PHP .. I would like to have your opinion. Thank you guys !! ;)


r/programmingchallenges • • Dec 01 '12

How would you explain/teach fundamental programming concepts using metaphors and similies?

0 Upvotes

Hey programmingchallenges,

I've been thinking about this for a while, but I don't have nearly the programming knowledge to actually explain the fundamental concepts, in fact, I am just starting out. I want to know how YOU (yes, that is you reading!) would explain concepts like variables, functions, arrays, methods, classes, and OOP programming concepts to newbies using metaphors and similes? Or even kids to get them interested in programming?

I think this would be very helpful to me and to many others just beginning to program, and I would love to use the examples to teach a friend of mine, who is absolutely at the very beginning of programming then myself.

Thanks!


r/programmingchallenges • • Oct 14 '16

Find the elements of the last row of a matrix when the elements of the first row are given without using a complete loop

1 Upvotes

I am given the elements of the first row of the matrix.

also

a[i][j]=a[i-1][j] ^ a[i-1][j+1] &    // ^ is XOR operation
a[i][n-1]=a[i-1][n-1] ^ a[i-1][0]   //elements in the last column

I have to find the elements in the last row of the matrix when the total number of rows of the matrix is given..

How can I do it without using a complete loop till the number of rows?


r/programmingchallenges • • Dec 17 '19

Picture frame auto slideshow

0 Upvotes

Hello! I have an idea for a christmas present at work, I work for a creative media company, and thought I would come to reddit for help!

I want to make one of those standard picture frame slideshow things that you can buy, but I want to custom build it.

I basically want it to slideshow through pictures/videos on an instagram home page feed instead (so if I was to have it set to be logged into their instagram it can show a feed of creative peoples work that they follow, perhaps the last 50 posts on the feed changing every 20 to 30 seconds)

The idea is that it would be act as an inspiration board.

So anyway, I assume the first things would be getting some sort of screen that I can wire up, and maybe an arduino? I've never done programming before, but I can learn fast, I have experience building websites for example and some basic java. I hoped that this might be a basic task.


r/programmingchallenges • • Nov 28 '19

How to get these numbers as an output?

0 Upvotes

From inputting

1

2

10

23

It should return

0

1

4

7

Does anyone know if this is a trick question? what ever maths operation you use it will do it to all the numbers. e.g a vector/array holds these numbers so you cant just * / - + each element individually and hard code it.

What magic maths function solves this?


r/programmingchallenges • • Feb 20 '18

When exectuting a array rotation Python code it gives the error TypeError

Thumbnail
self.learnprogramming
1 Upvotes

r/programmingchallenges • • Jan 10 '20

Reconciling schedule data (Solve a logic problem)

1 Upvotes

I have a problem I need to solve using Node. The question I have is surrounding the best logical way to solve it. Any advise is appreciated.

Summary

You will build a tool that imports train schedules from an external data source and is stored in an internal database. 

Eternal Data Source

There is a service that provides a list of trains:

[{"id":1,"name":"A EXPRESS"},{"id":2,"name":"B EXPRESS"},{"id":3,"name":"C EXPRESS"},{"id":4,"name":"D EXPRESS"},{"id":5,"name":"E EXPRESS"}]

And a list of train stations:

Example for train "A EXPRESS":

[{"arrival":"2019-04-30T11:48:00.000Z","departure":"2019-05-01T05:42:00.000Z","service":"Loop 5","station":{"id":"ST1","name":"Waterloo"}},{"arrival":"2019-05-13T18:00:00.000Z","departure":"2019-05-14T05:00:00.000Z","service":"Loop 5","station":{"id":"ST2","name":"Paddington"}},{"arrival":"2019-05-15T04:00:00.000Z","departure":"2019-05-15T11:00:00.000Z","service":"Loop 5","station":{"id":"ST3","name":"Heathrow"}},{"arrival":"2019-05-16T20:00:00.000Z","departure":"2019-05-17T10:00:00.000Z","service":"Loop 5","station":{"id":"ST4","name":"Wimbledon"}},{"arrival":"2019-05-18T15:00:00.000Z","departure":"2019-05-19T21:00:00.000Z","service":"Loop 5","station":{"id":"ST5","name":"Reading"}},{"arrival":"2019-05-21T04:00:00.000Z","departure":"2019-05-21T21:00:00.000Z","service":"Loop 5","station":{"id":"ST6","name":"Algate"}},{"arrival":"2019-05-31T03:00:00.000Z","departure":"2019-05-31T15:00:00.000Z","service":"Loop 5","station":{"id":"ST1","name":"Waterloo"}}]

Note: this train stops at station "ST1" ("Waterloo") twice.

To do

For each imported station call, we want to maintain the latest information as well as the history of the port call: 

-What station is the train calling? 

-What are the latest arrival and departure dates? 

-When was the station call first imported? 

-When was the station call last updated? 

-How did the station call change as time went? (evolution of arrival and departure dates with time) This kind of information is useful for us to understand how often trains are delayed, when do schedule changes happen and if there are patterns to these changes. 

How it works

-The external data source is a simulation of train schedules forecasts 

-The data covers a time range from January 1st 2019 to May 31st 2019 

-This 5 months time window is compressed and simulated over a 24 hours cycle 

-This 24 hours cycle restarts every day at 00:00 UTC 

-The data source provides endpoints to request train schedules

-A train list endpoint provides a dynamic list of trains that you can import (see Data above)

-A train schedules endpoint provides a dynamic list of stations calls for a specific train (see Data above)

-A train schedule consists of a list of station calls with a varying amount of past station calls and future station calls

-This external data source does not provide a unique identifier for each station call

-This means that merging station calls is not straightforward. This is the crux of my question: reconciling external station calls with the existing ones in the database. 

-Station calls arrival and departure dates routinely change, sometimes by multiple days. Sometimes they swap, get deleted or new ones appear

-Station calls can sometimes be deleted (the train will not stop in that specific station

-New station calls can sometimes be created (the train will make an unscheduled stop)

-The train schedules endpoint changes the data returned every 15 minutes. 

Specific requirements

You need to capture 24 hours of all train schedules starting at 00:00:00 UTC on one day and ending at 23:59:59 UTC on the same day.   

Question

As you can see from the task above, there is a need to reconcile the new imported data with existing data as the new data changes.

There is no ID that can be used to match station visits, but these visits need to be updated when the external data changes.

We do have a train ID and a station ID as well as the date of visits.

What is the logic I can apply to keep the database data accurate and up to date?

Thank you

https://stackoverflow.com/questions/59678633/reconciling-schedule-data-solve-a-logic-problem


r/programmingchallenges • • Apr 11 '11

Hackety Hack

Thumbnail hackety-hack.com
0 Upvotes

r/programmingchallenges • • Feb 07 '15

See how you stack up against the best. Demonstrate raw talent, no gimmicks. Top 10 get expert advice and more.

Thumbnail
devdraft.com
1 Upvotes

r/programmingchallenges • • Jan 09 '13

I have a question on the potential of looping through IP addresses for visual analytics

1 Upvotes

I am by no means a programmer. I learn from code snippets, and play around in java / vb, so I have come here to ask a question. Google wasn't really helpful, but maybe I wasn't searching using the right question.

Would it be possible to loop through all possible IP addresses (using simple for x = 0 to y) to -ping an address, record its packet response time, and then get an approximate location of that IP address?

The end result would be a stored table or array with an IP address, a lat lon (that I could use google APIs or some other source to gather based on what type of location information available) and a ping amount in ms.

It seems like this would be fairly easy to accomplish, but would there be any major barriers, legal or programmatic?

This isn't homework, I'm not a hacker, and I have no malicious intent here. I'm just curious if this has ever been done or if there would be any real application to it at all.


r/programmingchallenges • • Jan 29 '17

[Challenge?] Not to be too controversial, but can someone program a account(theoretically) to Tweet the president every time he signs an executive order?

1 Upvotes

Just exactly as I have put it. I know a story circulated a few years back about a guy who automated tweets to AT&T or another company like it every time they did something to him or something like that. Sorry my programming knowledge is low, little Forth, little JS and that's about it.