instruction
stringlengths
71
71.9k
I recently created pong game using Java. This is my first time not copying any code from the internet or using any help. While it does work, my code feels well written but no streamlined or smooth (other than the fact that I made additional classes that would help create further code in this project). When playing it, ...
I made a class that would do alpha beta pruning on a binary tree of 40 degree. However there is a time limit on a single move of 30 seconds. I am to play against my professor and his opponent class. I tried going down 6 levels but I would lose. I tried going down 7 levels and I was taking too long. Is there a way to ma...
I have a C# file, that makes some modifications on screen (changes the text on the user interface) but I have some doubts: How I can re-use the below methods to be more concise and reusable? How I can separate the database methods in another file class? private void GetDoencaNome(){ using(IDbConnection dbConnecti...
The Sherlock and the Beast challenge from HackerRank asks to generate the following number with \$n\$ digits for \$T\$ test cases: A Decent Number has the following properties: its digits can only be 3's and/or 5's. The number of 3's it contains is divisible by 5. The number of 5's it contains is divisible by 3. If th...
I am relatively new to web development and I created an image gallery with pagination using the Twitter Bootstrap framework. Basically, I want to know if I approached creating an image gallery correctly and what I could do to improve. The basic idea was that each pagination <li> element linked with a different get vari...
I have this table in my db: table ---------- cityID value parameterID The table looks like this: cityID value parameterID 500 30 1 500 60 2 500 7 3 600 25 1 600 50 2 600 6 3 .... ... ..... where 1...
Purpose Validate if a number is an Armstrong Number. An Armstrong Number is a number such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 33 + 73 + 13 = 371. Strategy Calculate the remainder and quotient of the candidate value. While the quotient i...
I've been working on a project originally for school regarding object-oriented design, where I was supposed to write a class for a book and a bookshelf, and then have a driver class to add a couple books and print out their details. I originally started this project a while ago, adding and changing things as I've learn...
Is there any object oriented way or design pattern I can use to make this code better? How can I avoid casting in this code? What if I add new Object like WaterTank how will it interact with fitting? Run.java package main; import fittings.Fitting; import fittings.Tap; import bathroom.Bathroom; import user.User; publi...
I ran into this challenge a couple of times today and thought I could tackle it with PowerShell. I refused to look at other peoples approaches to this hoping to complete it on my own. I'm sure the general idea is the same in either case. I have included more comments than I would normally to help people not familiar wi...
I decided to help @Matt out a bit and ask a PowerShell question. This is a simple guess-the-number game learning how to use functions with and without parameters, and use the input and output functions. All comments are welcome. Function GetNumber([int]$min, [int]$max) { Return Get-Random -minimum $min -maximum (...
The goal of this code is to read-in a stream of terminal ESC sequences, and break them down and fill a vector of parameterized sequences for processing later on. For example ESC[5C would be filled in the vector as: Vector[0] = C Vector[1] = 5 Colors for example ESC[0;44;32m Vector[0] = m Vector[1] = 0 Vector[2]...
I've got to delete / replace elements in an array. For accomplishing these task one usually uses Array.splice(). Problem: Array.splice() expects the replacement items as a comma separated list. But I got the values as an array. I've made this helper function which makes it possible to use splice with an array instead...
I'd like to convert some integer number from a cell between 0 and 1,000,000,0000 into Hungarian text. I've found already a solution, a VBA function. How can be improved this solution? Function num2txthu(cellvalue As Double) '------------------------------------------------------------------------------ 'VBA-function, ...
I just started to learn C, and for practicing, I tried to implement a simple stack data structure, and I want to know if I'm making any mistakes, or how could I improve it: My stack.h: #ifndef STACK_H #define STACK_H #define STACK_MAX_SIZE 125 typedef struct { int max_size; int items[STACK_MAX_SIZE]; int ...
I am a self-taught programmer, so please be gently. Please give as much feedback as possible for my code. I want to make sure I am doing things the right way and efficient way. What is the proper directory to save this info? What file type and what format? How do I load these settings when the program loads and make su...
My algorithm is quite simple. I simply iterate over the entire map arr and if I find the start of the combination I need to find, I begin exploring. My combination data structure is simply the combination I need to find, column at a time. If each column in arr matches, I return True. If at any point the value doesn't m...
I wrote a basic command prompt Tic Tac Toe Game. I want to know what can be improved in terms of modeling and what mistakes I've made (if any). void Main() { TicTacToeBoard board = new TicTacToeBoard(); while(!board.GameOver()) { var i = int.Parse(Console.ReadLine()); board.MakeMove(i); ...
I'm building a JSON API. I'm writing my controller tests so that they compare the response body to actual JSON I'm generating in my tests using ActiveRecord. I wrote two helper methods that make the process easier. The first simply parses the actual response body and returns it. def json_response_body(&block) JSON.pa...
Often I end up with var askName = () => { return new Promise((resolve, reject) => { this.waitForInput('Name:').then(name => { this.ask('Are there more players?', ['Yes', 'No']).then(answer => { if(answer === 'yes') { askName().then(resolve); }...
I wrote a MessageBus class whose only purpose is to deliver messages from object to object without direct link between them. I encountered a problem with duplicate code caused by requirement for same methods with and without generic types, however it does bother me and a better solution would be appreciated. using Syst...
I am learning Swift and object oriented programming. I am new to design patterns and protocol oriented programming. In my test code I have several related objects: Security: the most important object that will be contained in the other ones. AssetClass: Contains Security objects Portfolio: Contains Security and Asset...
Task Write an implementation that returns whether a String has vowels (English language) in alphabetical (A-Z) order or not. Feedback Is my vowels variable appropriate? Is there a better way to implement a vowel lookup? If a candidate String has no vowels, the validator will return true - is that reasonable? From a lo...
I made a pieChart function thanks to the main CSS properties rotate:xdeg, border-radius:100% and overflow:hidden. That helped me to make rotating quarter pies of any size. Here is the code: function getRandomColor() { var letters = '0123456789ABCDEF'.split(''); var color = '#'; for (var i = 0; i < 6; i++) { ...
I was asked to create a jQuery plugin that would sort homogeneous DOM elements in a given DOM container element. I came up with the idea to attach data-priority attribute to the elements that are to be sorted, e.g.: <div class="offer-item" data-priority="10">..</div> , and later use that attribute in a jQuery plugin. T...
I'd just like to ask if there's anyway to make the functions play_Game() or is_move_valid() anymore efficient. For example, using a loop of some sort, I haven't been able to figure out how and would like any help in trying to make those functions shorter. #TicTacToe import sys rows=[[0,1,2],[3,4,5],[6,7,8]] columns =[[...
This is a class I built to handle post/get requests to URL's, but also check for connection and provide different callbacks depending on success or failure. It is intended to work without being attached to a GameObject by using static methods. It can set up like so: MHSOnline.Domain = "http://yourdomain.com"; MHSOnline...
I'm practicing my C coding and I wanted to implement my own version of the getline function in C for learning purposes. I'd like a review on coding style, correctness, improvements I can make for performance, and overall quality of the code. My main concerns are correctness and performance (in that order). #include <st...
Here's a bit tricky one, because AFAIK there is no existing platform, where conditionally compiled part of the code would actually get included by compiler, so it is entirely up to the human review to see if it is correct. The purpose is to have abs function, which does not trigger undefined behavior with any user inpu...
I'm just looking for a cleaner way. Obviously I could store a variable for some of the int parts. Personally, I think the one-liner looks better and everyone's definition of what constitutes clean readable code differs. def gen_isbn(isbn): for i, val in enumerate(isbn): if len(isbn) == 9: yield (i...
I have code that parses through web pages finds commentaries and saves commentary info in DB. I have an array where all necessary pages are stored. I iterate through all these pages one by one and find HMTL element which contains all the info about commentary if there are multiple pages with commentaries I iterate thro...
I wrote this program to remove comments from a C source file, accepting a file name from the command prompt. Let me know if I missed anything or if there are any improvements that can be made in the program. #include<stdio.h> #include<stdbool.h> void m_cmnt( FILE *fp ) { int prev=0 , ch ; while ((ch=getc(fp))...
At first, I had Database to contain std::list<Student> students, but because there are over 2000 students, searching by students should not be done in linear time. However, searching for students can be by name or by student number. To enable both searches in logarithmic time, I decided to give Database two maps that...
The code calculates a n-bonnaci sequence to a certain number, based on the user's input. It then can print it to a file and/or print it to the console. The calculateSequence function calculates the sequence. The first loop fills the sequence with ones (0, 1, 1, 2...). Next, it calculates the value of the current number...
I am implementing a feature that reminds users to make a post via email if the user has set daily reminders to true he has not posted yet today and if the current hour matches when he would like to receive the daily reminder in his time zone. I am going to write a Rake task for it and then schedule it to run every ...
For some time, JavaScript string concatenation could be optimised by join()ing an array of strings, instead of +ing them together. Recently, browsers have been optimised to handle strings better, and +ing is back in favour. The various posts I've read on the subject have cited many jsperf.com tests, which are invariabl...
This is a class called Board which handles the tracking and checking of the state of the game. self.board is a dict of coordinate: state pairs, for e.g. (0,1): 'x'. I could have hardcoded the checking lists in but decided to be adventurous and learn a bit of itertools. The complete program is about 130 lines of code an...
I had to create this program, and I did it fine, all is working and stuff but I was wondering, what is better way of doing such thing? I want more efficient method. Problem assignment: In the file is unknown amount of numbers. Create a program, which output is amount of numbers, the lowest number and the highest num...
This is a plugin for hangoutsbot/hangoutsbot that listens for words people say and then gives them an ETA and a link with directions. Happy to hear about any optimisations that could be made. import logging import hangups import plugins import asyncio import googlemaps logger = logging.getLogger(__name__) from textb...
I have a little project where i am implementing an immutable linked-list (not only...) based on a pair-structure like the LISP cons-cell. The linked list works well and is basically wrapping two variables in a closure in an object, the variables are "head" and "rest" (think LISP´s car and cdr). I have also added some u...
I wrote simple online users tracking for my ASP.NET MVC project. In Global.asax I added: protected void Session_Start(Object sender, EventArgs e) { // get current context HttpContext currentContext = HttpContext.Current; if (currentContext != null) { if (!currentContext.Request.Browser.Crawler...
This is the Hash-Matrix that I used in order to process the matrix for my quadratic sieve algorithm. You can find the full code at here(it's java 7), but I only want you to review this class. My prime focus is performance and any feedback will be welcome. The entry point is the solve method, you can skip the init part ...
I made a simple comparison window in WPF that has two RichTextBoxes highlighting the differences (in red) of two StringCollections. I knocked the code up in about 5 minutes and having gone back to look at it it appears pretty shoddy. I've included comments to show my intentions. private static void DifferentiateText(R...
I am writing a class which can log the activity of an application during run time. The plan is that the SupportMI string will be sent to a DB, from where I can use some other code to format it properly for readability. I need this class to be usable with .Net-3.5 due to system limitations. What I need is the method nam...
The goal is to create an activity or update its counter if it's already present. And to be super accurate, the code avoids race conditions with a custom insert_on_duplicate_key_update MySQL query. All user activities are already preloaded, so in case the service knows that there was an existing activity it will just do...
I have made a connect 4 console application in C++ and would love some feedback. In this project I have learned about inheritance and using virtual functions. Main.cpp // ConsoleApplication2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "Player.h" #include "humanPlayer.h" #...
I previously posted a question on finding the maximum value of an InputIterator range. For completeness, I thought it would be useful to post an implementation that finds the minimum & maximum values, in a similar way to std::minmax_element. #include <iterator> #include <algorithm> #include <functional> #include <utili...
I've written a small implementation for doubly linked lists. While actually intended to be only used by me in subsequent projects, I wrote it as generically as possible. Maybe this'll be advantageous. I tested the implementation and resolved as many bugs as possible but maybe there are more lurking somewhere in the cod...
I wrote a program to solve a problem, I am not so good in python so want help to find areas where this program can be improved or simplified and readable too:- I got this problem in a code challenge Problem Professor Hatim is researching the sexual behavior of a rare species of lizard. He assumes that they feature t...
This is how I posted a method from C to Swift. I tested it well, it seems to work. It's there a way to write this better, following good practices of Swift? The original is in C and the target must be in Swift. Original C Code: inline float mac(const float *a, const float *b, unsigned int size) { float sum = 0; ...
This Excel VBA function was originally the subject of a previous question on Code Review. This function (Namify()) takes a string as input, modifies it to make it valid for use as a range name, and then returns the valid string. I've revised the function based on some excellent input from Mat's Mug and RubberDuck and I...
I have a table of patients that has a field for which hospitals they visited. I want to retrieve a list of patients that have visited Green Hospital and have also visited other hospitals. Is this query accurate? SELECT COUNT (DISTINCT PatientID) FROM Patients WHERE PatientID IN ( SELECT PatientID FROM Patients...
I've started Python some days ago and wrote a small Telnet implementation according to RFC 854 and RFC 5198. It is pretty low-level and sending messages directly isn't even supported. The highest abstractions are commands and user data where commands include negotiation (like "Do") and "general-purpose" commands (like ...
The following Pascal script needs a bit of context for its purpose to be understood. For those who don't give about purpose, feel free to skip ahead. Background A game I'm terribly fond of has a couple of levels which have nothing to do with the rest of the game. One of those is a puzzle: Alpha Sector::virgilw::Brain W...
I recently wrote a BMP writer in C: bmpWriter.h #ifndef BMPWRITER_ #define BMPWRITER_ #include <stdint.h> int write24BitBMP(const char *outputFileName, uint32_t width, uint32_t height, uint8_t *rgbData); #endif /* ifndef BMPWRITER_ */ bmpWriter.c #include <stdlib.h> #include <stdio.h> #include "bmpWriter.h" type...
I recently started getting into machine learning and I wanted to write a "beginner program" which would learn to play Tic Tac Toe. This code was inspired by a different program I saw, meaning some ideas (like saving the valid moves in a String) are not from me. You can either play against the AI or let it play against ...
After asking Randomly choose a game executable from a folder, I applied the recommended changes. I also redesigned the program to make use of the MVVM (Model-View-Viewmodel) paradigm, using Prism 6.0. This was such a large change that I bumped the version number to 2.0. The project can be found at https://github.com/nz...
My application relies on an unknown number of DLLs that each produce a report. The only thing that is known in advance is the location of the files and the classes that each will contain, including the base types. When the user needs to define a new report for use in the application, a list of every available report ...
I have a Python script that generates a dictionary of all possible 3 digit password combinations. It essentially works by just nesting for loops. This is fine, but say I wanted to change it so it could generate 4, 5, 6, ... digit combinations. This would require me to keep adding more nested loops and changing the prin...
I'm writing a small checkers game in python (international rules) and I need some pointers here and there. For the moment, I am only drawing the board and checking the syntax of moves with a regex. For review: Usage of a value package for passing around game state (grid, turn_count, and current player), is there a bet...
Following-up on my last question where I wrapped the Sage API with a familiar IRepository interface, I decided to push the abstraction a step further, and... implement an actual LINQ provider. So my client code looks like this: class Program { static void Main(string[] args) { using (var context = new S...
I wrote a pretty simple bash script. It takes a directory with subdirectories with incremental prefixes in their names (01test, 02test, 03test), creates a new directory with the next highest prefix and creates a couple of files and fills them with some default text. I'd like to do this in fewer lines of code and elimin...
Purpose This problem comes from this dailyProgrammer subreddit challenge. The task is to take an input of C / cs and V / vs and to replace Cs with random consonants and Vs with random vowels (English alphabet) while keeping the case the same. Y is not considered a vowel in this case. Example: CcVvv => BgAoi ccVVV => z...
It works, just feel that my solution is too complicated. # Write a method that takes a string in and returns true if the letter # "z" appears within three letters **after** an "a". You may assume # that the string contains only lowercase letters. # # Difficulty: medium. def nearby_az(string) i = 0 while i < st...
I am in my first year of formally learning computer programming in high school (we are using Java). One of the tools we used was Karel J. Robot, which can be downloaded here. Although we finished using Karel after a semester, I felt that there was a lot more I could do with it. I decided to use some of what we are now ...
As the title states, this is a compiler written in C with a ruby build script that translates a minimal LISP dialect and spits out an executable jar file. I designed this LISP dialect and named it mjLisp. It has some missing features (that requires some extra parsing effort, thus more code) as you can see in the list b...
I have 4 booleans and all must be met to determine the value of a String: String message = (!isNameBlank && !isDestinationBlank && isDestinationValid && isAmountValid) ? "Have a safe trip!" : "Please try again!"; If I do this, it doesn't look elegant either: String message = ""; if(!isNameBlank && !isDestinati...
Here is my lock-free queue implementation for single producer with some preallocated memory. T is a simple type with no need for move operations. I don't use bool pop(T& result) in order to avoid double checking. I would love to see your feedback! template <typename T> class LockFreeQueue { public: void setup(U8* b...
I'm having some issues coming up with a sensible solution for using shared state in a C-style function pointer. I am using GLFW to handle my OpenGL context and have created a thin wrapper around all of the setup code. I want to provide a way of registering callbacks for key presses, however the glfwSetKeyCallback takes...
I have this C implementation of the natural merge sort: #include "stable_sort.h" #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> typedef struct run_length_queue { int* storage; size_t capacity; size_t head; size_t tail; size_t size; size_t mask; } run_length_qu...
I have this really long httppost action results that I add and update 3 db tables I think it's too long and can get shorter and smarter. public class AllVm { public AllVm() { this.wri = new Writer(); this.sub = new Subject(); this.rev = new Review(); } public Writer wri { get;...
I am working on a JavaFX application where the user through a series of textfields and dropdown menus has to create some sort of report. The data from the user are written in an .xml file, I also convert the .xml file to HTML and display it with the Webview class. The following code is the save method I use to help th...
I am pretty new to Python and I would like some tips and criticism on my formatting style/code and what can be better organized. I am a bit shaky on how classes work, but I think that it can be used here to make it more simple. from tkinter import * from tkinter import ttk import random #frame setup main = Tk() frame ...
I have a ton of jQuery onClick events. onClick I hide/show different UI elements. I was wondering, how can I tidy the code up and make multiple onClick events more readable? $('.info_2').on('click', function() { $('#nav-wrapper').toggleClass('hidden_nav'); $('#card-wrapper').toggleClass('centre_share'); $('.E_inf...
I am trying to solve a string matching question mentioned here. I recently learned the Knuth–Morris–Pratt algorithm and tried to implement it to solve this question. But I am getting a TLE for this code: import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Go...
I wrote a program that manipulated data from VLA observations and created FITS files to be used in creating spectral energy distributions of high redshift radio galaxies. I really tried to be as efficient as possible. I made lists of the variables and lists I had to use. I looped everything where I could, but it still ...
It is well known that 0 dependence implies 0 correlation, while 0 correlation does not imply 0 dependence. I have a paper here illustrating nonlinear correlation coefficients from relationship subsets of the joint distribution. I have another paper here demonstrating that dependence is the average absolute value of the...
How can I achieve a more performant tick code keeping my minimum frame rate high? installLoops() { window.requestAnimationFrame(this.loop.bind(this)); } loop() { this.now = Date.now(); var delta = this.now - this.last; this.last = this.now; this.dt = this.dt + delta; ...
I'm using some simple files for caching and some basic user data. I was first just using file_put_contents() and file_get_contents(), but realized this could quickly go wrong when traffic starts increasing. I've been trying to figure out how to do it properly with flock(), correct file modes, etc, and come up with the ...
I'm writing tutorials for new programmers. The tutorials show programmers how to structure events. I've attached the code for one of the tutorials. Can someone take a look at my code and let me know if you see any bugs or gotchas? The goal of the code is to be extremely easy to read and short show a clear separation ...
I'm looking for your opinions about ways to improve the access to data in my application. I develop web applications, using Entity Framework 6 code first, and Autofac for dependency injection. Before you dive in the code, keep in mind that all components in my application (except for the problematic RepositoriesFactory...
I'm working on a Clojure implementation for Project Euler #14, which asks for the initial element, under 106, that produces the longest collatz-sequence chain. I'm trying to make use of every optimization I know of, including transients and loop/recur. My code is based on a Lua implementation I wrote which runs in a ...
I would like to write simple application where I'm going to make a few views: Login Register Main app I think that my method is not the best way to do this. Can someone give me a tip? Main.java package application; import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import ja...
My code asks the user for the type of conversion, the degrees and spits the result back. It will prompt the user to ask for the type of conversion again if it's invalid. It will also prompt the user to see if he wants to quit or rerun the program again. I was wondering if there is a more efficient way of doing this. I ...
I need help with a question my teacher wants us to do by tomorrow. I would love for you to try to help me out with this. The following functions must be implemented: A function that initializes all variables Variables that keep track of which player is currently playing, and which player is next Variables that keep co...
Goal: make this code as efficient as possible. Given a finite dataset (Colors - this isn't Crayola here :D) how do I know what colors are not assigned to a given user? Additional requirement - the final result should output a single column of comma-delimited colors. Spaces do not matter, but it'd be nice. This current...
Note that this code is not going to be used for anything, it's more of a thought experiment. I've been seeing a lot of NumPy code lately and noticed that they use a custom indexing process, presumably by defining an object's __getitem__ method. I wrote the following class that allows for a multi-dimensional array to be...
I currently have an HTML <Table> with all the socket.io-rooms. Client-side, the table gets fetched if you visit the page. If some room gets created or deleted, it get updated with the following code. There's also a button that gets updated to show if the room is full or not. Now I want to know if there's any "better" w...
This is a partially persistent data structure using a red black tree. It will copy \$O(lg(n))\$ items for each remove or add operation. #pragma once #include <functional> #include <utility> #include <iostream> #include <stack> #include <queue> #include <memory> #include <deque> #include <iterator> #include <type...
I wanted to implement the cat function in Julia and I ran a few test cases but I am not sure if I am missing anything: for line in eachline(STDIN) write(line) end It's really simple code and I tested it with the following test cases: $ cat hello.txt | julia cat.jl first line second line third line $ cat hello.jp...
I recently have been working on moving from projects written in Java and C++ to C and realized that the lack of std::vector in C makes it a bit more difficult to create multi-dimensional arrays. Also, without the std::string in C, it's harder to store arrays of strings and keep track of their sizes. To automate the pro...
Purpose Validate whether the open brackets within a String have matching closed brackets, in the correct order. The three types of valid brackets are [ and ] { and } ( and ) Examples: A[B]{C}(D) returns true A[B{C}(D) returns false Feedback Creating a new Map of open brackets to closed brackets seems a bit expensi...
Is there anything that I could have reworked here? I have a Java 7 mind but I'm working on getting my Java 8 ready, so if there are any improvements over readability of performance here I'd love to read import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; import java.util.regex.Patte...
I have written code for generating all the permutations in C as explained here. How can the code be optimized? Are there any memory leaks? int factorial(int n) { int fact = 1; for(int i = 2; i <= n; i++) fact *= i; return fact; } int main(){ int len = 4, i, j; int **p; int **q = (int**)...
My context was basically to get my linked list implementation in C++ reviewed, since I wrote it from scratch and wanted to make it as simple as possible and learn from suggestions I get. I am trying to learn to create modular/re-usable, efficient (wrt time complexity), and yet simple code. #include <iostream> struct n...
I'm currently working in the math library for a game framework that I'm writing and am working to improve some functionality that was affected during a refactor. Formerly, my Matrix4.SwapColumns(int, int) function looked like this: /// Documentation public void SwapCols(int i, int j) { for(int k = 0; k < 4; k++) ...
The idea is that I am getting the params from a GET request in the form of a Hash (symbol→str) and I want to transform them into dates and booleans. For that reason, I created two private methods to_date and to_b. class Report include ActiveModel::Model attr_accessor :start_date, :end_date, :show_sales, :show_dail...
The code is fetching records from a table called CSAT_SUMMARY_REPORTS[driver table] but due to the filters conditions applied which needs to be checked in another table called CSAT_REPORT_FIELDS. In this table the filters are in different rows so a group_concat is needed to satisfy the ANDed filter condition. Then it ...
I created a program to get frequency of word in all files in a directory using Future API import java.io.File import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global class GetWordCount{ def inFileCount(source: File):Future[Map[String,Int]]= { val futureMap:Future[Map[String,In...
I wrote a doge meme generator in racket some time ago, mainly as a joke, and I would like some criticism about the general style and what could be improved. Here is how the program output looks : plainDoge.jpg refers to a plain image for the doge meme (700 * 525) #lang racket (require racket/gui racket/draw...