instruction
stringlengths
71
71.9k
I have a function for applying gravity forces between every possible pair of bodies on my game. It is the most used function, and can run more than 100k times per frame so every minor improvement on performance will make a HUGE difference here. I replaced some divisions by multiplications and the general FPS increased ...
Today I had to write a small tool to help me send HTTP requests in bulk. Rabbit was overloading my server, so I decided to change my consumers to buffer the contents of the request, before sending. After changing my API, I did this: #include <amqpcpp.h> #include <amqpcpp/libev.h> #include <ev.h> #include <cpr/cpr.h> t...
Imagine you have a call center with three levels of employees: respondent, manager, and director. An incoming telephone call must be first allocated to a respondent who is free. If the respondent can’t handle the call, he or she must escalate the call to a manager. If the manager is not free or not able to handle it, ...
I wrote a simple Pomodoro Timer in Python 3: from datetime import datetime, timedelta from gi import require_version require_version('Notify', '0.7') from gi.repository import Notify import sys class State: #length: the length of the state in minutes def __init__(self, length): if not length == None: ...
I've recently started working with Elixir and am writing an app that queries various URLs and parses the response. I am having issues with my parse method, which is included below. The code works just fine, but I am concerned that I may have taken pattern matching too far. The method signature looks like spaghetti. Thi...
I have following code in QT in // myEditor.h class myEditor : QScintilla { public: readFile(); }; #include "myEditor.h" // myEditor.cc myEditor::readFile() { FILE* fp = fopen("mynew.v","r"): QTextStream ts(fp, QIODevice::ReadOnly); /* reading the text stream buffer by buffer bufferSize is c...
I have made a Rock Paper Scissors game. It works fine but I would like to know how can I improve it further. #include <iostream> #include <algorithm> #include <string> #include <random> #include <array> #include <map> #include <limits> namespace { enum Winner { Tie, Player, Computer, WinnerCount }; enum Items ...
I want to extract the creation of different objects in a factory class for the reason of reusability. The problem is that within the current code the objects are configured also for the specific problem. Now I want to reuse only the creation of the objects within another code place. if (FieldConfiguration.FIELD_TYPE.T...
I'm learining JS. I have prepared a simple color flooding game, like Pixelated. The engine below works, though scoring is not implemented. Please help me find out how this code could be made better, more idiomatic JavaScript, or more efficient. // global variables var canvas = document.getElementById("game"); var co...
See the previous iteration: Bare bones painter app in Java. I have improved my program thanks to all the answers in the initial post. Now I have this: App.java: package net.coderodde.javapaint; import javax.swing.JFrame; /** * This class implements an application for simple drawing. * * @author Rodion "rodde" Efr...
I want a mechanism for specifying arbitrary order of type conversion for arbitrary set of types for each operation on that types (separately). For example, let's have set of types Bool, Date, Number, String and operations isEqual and isLess. For isEqual I would like to have order Bool -> Date -> Number -> String and fo...
I'd like to have a discussion on the data model (mostly) for a tree with nodes having multiple children and multiple parents. I already have a working algorithm, but I'm looking for improvements. The things to keep in mind are the feasibility of the algorithm and the performances. Here is the data I'm using currently: ...
I created a class to add functionality to c++ std::string (std::basic_string actually), let's call it String. I would like to know, what changes to do to String to boost it performance. Maybe having an internal std::basic_string member is not the best idea and it would be better to implement my own (that maybe would be...
So here is the ugliest fragment of my application, I tried to reformat as much as I could but I think it's still pretty ugly. Basically, I'm trying to use an API call to receive JSON which tells me what type of field to create dynamically (Edit text, checkbox, Multiple choice, single choice). And then, I add them dyn...
I created a web service which can be called from a form to add new users to the system. The final service will add users to Active Directory and Exchange in the required format (please note that FirstName and LastName are required fields in the form, so they will never be null): using System.Collections.Generic; using...
Problem Statement Consider a rover and a plateau of size nxn. The rover takes three type of instructions L,R and M. 'L' and 'R' rotate the rover in the left and right direction. 'M' moves the rover one step forward in the direction it faces. Input: Plateau size, Initial direction, Initial position and Instructions....
I have an abstract class Player, which plays several games of Roulette (samples). For each game, the desired player is cloned into a session method. for (int i = 0; i < samples; i++) { IList<int> sessionStakes = this.Session(player.DeepClone() as Player); this.maxima.Add(sessionStakes.DefaultIfEmpty(0).Last());...
I'm a very new to CUDA, so I'm still trying to understand how to make the best use of the GPU. I've ported a C algorithm to it. This algorithm works by loading the memory with an initial input, then calling a rewrite function, which rewrites 128 bits of memory, consecutively, until we arrive at an answer. Since rewrite...
I'm in the process of converting a custom UIButton from Objective-C to Swift which has custom properties and default values for those properties: MyButton.h @interface MyButton : UIButton @property (nonatomic, strong) IBInspectable UIColor *buttonColor; @property (nonatomic, strong) IBInspectable UIColor *buttonSelect...
Following yesterday's advice on my Customer class, I have now created a new class which is for looking up descriptions from a MySQL database. I have a Lookup table which contains type, name, value, and descriptions. Here's a basic example of type = customer and name = state Customer States New Customer Pending Appro...
First full program in C++. I'm having trouble understanding when I should use classes and when I should not. Ultimately, after this review, I would love to have a better idea of what circumstances I should use classes and how I can more efficiently write in c++. I plan to rewrite the program using classes and re-pos...
I am practicing classes and subclasses in Python. I'm not sure whether it might be useful to add a subclass to the following code, instead of just adding methods to the class. # Practice with classes class ElixerTroops(object): def __init__(self, name, dps, life, special): self.name = name self.dps ...
This is my submission for the June 2016 Community Challenge. It is R code that takes as input the number of squares on the board, the desired number of chutes and ladders, and the desired total sum of the chute and ladder deltas. It then samples uniformly at random from all feasible boards with these properties to retu...
I am implementing fundamental data structures in C# while trying to learn techniques in the language to make my code cleaner, more concise, and reusable. I have implemented a generic graph with a few elementary search algorithms. What are some ways to improve my implementation and coding style? /// <summary> /// Implem...
Inspired by the StackOverflow question Auto-increment release version Jenkins I developed the following generalized solution. Is there anything that can be done better, shorter, more elegant, more performant, etc.? release.cmd :: :: GROM - Generalized Relase Order Management :: release.cmd - A script to create a releas...
This is probably my third Go application. It essentially takes one or two command line arguments of wikipedia articles and pulls every /wiki/ link that isn't a special page, memoizes them to avoid loading the same page twice, and sees how many 'clicks' it takes to get from the first article to the target article. As t...
This is a script I made for the ESP8266 that uses the Wi-Fi chip and creates a new Access Point every 5 seconds in order to display a message on WiFi lists on nearby devices that looks like this: The code is: #include <ESP8266WiFi.h> const char* ssids[] = {"Never gonna give you up","Never gonna let you down","Never g...
I submitted the following Python 3 code for this HackerRank challenge. Given an n × n grid with an m in the center and a p in one corner, it prints the directions to move the m to the p. I wanted to know how improve it or other observations. #!/usr/bin/python def displayPathtoPrincess(n,grid): #first, find where p ...
I'm wondering how I can make this function better, more compact, even faster. char* DectoBin(int dec) { int counter = 0; int x =0; while (dec>=x) { counter++; x = pow(2, counter); } //counter is the # of bits in the converted binary number char* bin = new char[counter+1]; //...
I'm building a framework for comparing files (in my own way) using JUnit. All test cases have been packaged in a JAR which is ran independently using a .bat file I wrote. I needed to output the test results in a file instead of the console. I was just using normal System.out.println() in the TestRunner class and also i...
I have written a script that checks if data is known in memcached, and if not it queries it from the mysql db and stores it. I would appreciate any inputs if i have done this the "correct" way, since i'm trying to optimize the code as much as possible. _query() & _rows() are simple mysqli functions Save in memcache /...
I created a function that will tell me how many times a number is divisible by another number and what the remainder of it is: <?php function divisible_times($number, $divider) { $count = 0; $remainder = $number % $divider; $num_array = range($number, 1); foreach($num_array as $num) { if($num %...
I have a task formulated like this Please print a matrix in spiral order, clockwise from outer rings to inner rings. I decided to implement it in Clojure. (def matrix '((1 2 3 4) (5 6 7 8) (9 10 11 12) (13 14 15 16))) (def big-matrix '( ( 1 2 3 4 5 6 7 8 9 ) ( 32 33 34 35 36 37 38 39 10 ) ( 31...
I have coded this static method for converting a double matrix into a nifty String. It considers the width of the matrix to be equal to the length of the longest row. Now, if some matrix entries are considered missing, strings of the format x.xx.. are added instead of them to the overall string. Also, rows that are emp...
I recently read and answered Martin R's Recursive flattening of Swift sequences and continued to play around with the code until I arrived at something that was both pretty cool and possibly an abomination. So I figured I'd come back to CR with it and ask others' opinions. If you want a full context, you should refer t...
As title says, this piece of code migrates files (binary and metadata) from a database to another one with different structure. Currently my problem is that when I have to deal with a big database (between 12 and 30GB) , at a certain point the script CRASHES. With the 30GB database, this took 4 days of activity and th...
I've developed a spreadsheet that has evolved over several years to help keep track of the number of student contact hours that have been used to help flag up when students have run out / are running out of allocated hours (so that additional hour requests can be made if necessary). There is a master workbook, which co...
The task is to merge 2 text files containing sorted integers into one file. Each number in both files is stored in new line(there are no empty lines,and only numbers are stored). Requirements are that if file1 has n numbers and file2 has m numbers, running time must be O(n+m) and memory consumption O(1). My current sol...
I'm looking for feedback about anything and everything to do with this short program. For example, is there a risk in not sanitising the data, and if so, how would I do that given the need for non-alpha-numerics? How is the logic? Is my html up to date? Suggestions for styling? All input appreciated. I'm on a learning ...
Please help me reduce its complexity and maybe optimize it a little bit more. #include <stdio.h> #include <string.h> #include <time.h> #define size 3 void Clear_board(char (*)[size]); void Player_turn(char (*)[size],char); void PC_turn(char (*)[size],char,char,int*); void Print_board(char (*)[size]); void Scan_corners...
I have a process that does a bunch of document processing. One of the tasks being performed is OCR, which is the slowest part of the process, so I decided to run that in another thread. I decided the producer/consumer would work best because I will be adding document ids as each document is being processed (and ther...
I have some code that reads from an XML file and updates if needed. I want to move some of the stuff around. Here is the code overall: priv.refAddUpdate = function(addressDoc, addressLine, value) { if(!S(value).isEmpty()) { var found = $(addressDoc).find('addressLines').find(addressLine); if(found.lengt...
I just picked up Async Await and I am trying to use Async Await in Console App along with TPL for querying webservices. The code works fine and I am able to get the speed using HttpClient and async. Wanted to know if I am overusing async/await and if there is anything that I should avoid and can be simplified further. ...
I have a modified version of the first Project Euler problem — where I find the sum of all the numbers below the value 2100000000 that are multiples of 3 or 5 using a multi-threaded program. The concept of the partially-multi-threaded version: we have a value sum, where we add together all the multiples of 3 (that are ...
In my office, we use a software called Blue Prism, a Robotic Process Automation System. The idea is to allocate tasks for the robots to perform thereby simulating users. The system enables you to use a code stage ( with an option of C# with dotnet framework 2.0) and to import some objects in C#, you require a DataTable...
I'm a complete beginner at python and I know I'm probably approaching this the wrong way but I've tried making a quiz and can't work out how to make it more concise and work with longer lists of questions and answers without having to use lots of "if" statements. Here's the code: import random score = 0 questions = [...
I have written a small calculator REST API and I need someone to look the structure and design of what I did. I want to know how I can make it better. Here is an example with multiplication. Other operations are similar. Task was to write RESTfull API that will take request like this /multiply/a/b/c with double type p...
This is my attempt at the mirror encryption challenge posted on r/dailyprogrammer/. The idea is that each character is to be replaced by its counterpart in the mirror field, as if a laser pointer were reflected off of all of the diagonal barriers in the grid. Since I am relatively new to python, I'd like for someone t...
As a study project I was supposed to write an RSS reader in Java (I used Swing to make GUI) using MVC pattern. I finished it, but it's not quite polished yet (still gotta write these javadocs and add deleting categories/channels) and there are most likely a lot of dumb things as I wrote my first line of code in Java a ...
Quite similar to my earlier review this script parses a frequency calculation and reformats the found values to either fit into one row for easier importing into a spreadsheet software or a formatted table. The whole project including sample calculation files for testing can be found on github. I checked the script wit...
In Voxel Islands, each individual voxel is represented by their own unique class. Each of those unique classes is a subclass of a parent, Voxel class: using UnityEngine; using System.Collections; using VoxelIslands.Engine.Utilities; namespace VoxelIslands.Engine { /// <summary> /// This class represents a voxe...
Background I often see blogs/articles split out the implementation of the Query and QueryHandler classes. I had briefly asked a question on Stack Overflow about whether or not a self-executing Query class would be a violation of SOLID design principals (I deleted the question as it was feeling like the wrong place to a...
I was wondering if I am doing any useless conversions byte←→int, for example: byte((int(ch-'A')+shift)%26 + 'A') Converting ch-'A' to an int is because the shift argument can be negative (to implement the decode function). I couldn't figure out a simpler way to negate the operation using bytes. package main import ( ...
While reviewing Encryption using a mirror field, I decided to write my own solution from scratch. The challenge, from Reddit's /r/dailyprogrammer, is to implement a monoalphabetic substitution cipher whose key is derived from a pictorial 13×13 grid. Here's a simplified 5×5 example: abcde A \ f B g C \ h D ...
Here's my implementation of Game of Life. I'm quite new to Python and would like to know how could I improve that code, especially in terms of performance, compactness and readability. import copy import pygame from pygame import * import random #constants red = (255, 0, 0) black = (0, 0, 0) white = (255, 255, 255) #n...
The four parameters a, b, c and d can be -1 (meaning it's not set) or a random one of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}. If they are different from -1, they are guaranteed to be distinct. The code looks at the four least significant bits of the four ints and tests if they all have a bit in common: ...
I'm making a simple guess a number game. In game, user should input minimum and maximum value and program should generate random number between this numbers, later user should try and guess the number. This is one of my first programs, so I'd like to check my coding techniques, what should I do differently etc. I have ...
I have solved the problem "Substitute" at Topcoder. A simple, easy to remember system for encoding integer amounts can be very useful. For example, dealers at flea markets put the information about an item on a card that they let potential buyers see. They find it advantageous to encode the amount they originally paid...
We have an integer array as: private int[] arr = {1, 3, 5, 14, 18, 29, 78}; We have a function which takes three inputs of the array and checks whether: a * a = b * b + c * c If the function returns true then those 3 inputs are stored in an ArrayList: private boolean findTriplet(int a, int b, int c) { int squareA...
This is a simple script for moving my MP3 files from one directory to another. I'd like to know if there is a more efficient way to handle my task in the script. I analyzed the algorithm to be \$O(n^2)\$. import os import shutil import re files = os.listdir(os.path.dirname('/home/rich/Downloads/')) regex = r"(.mp3)" ...
I want to compare (500) and find duplicate daily records within 2 sheets, and copy the unmatched row to another sheet, copy the match from another to 3rd sheet, and delete the matched records from original sheet. I have 3 worksheets (results, Master List, Follow Ups) " results" update daily with 500 records, and added ...
The reliability polynomial (specifically, the all-terminal reliability polynomial) is, given a value \$0 \le p \le 1\$, outputs the probability that a given graph \$G\$ is connected. Note: at the link given, the probability is given to an edge being deleted, and not to an edge existing (which is the definition we will ...
I want to capture some state in a Haskell function. For instance, I have many thread trying to print on the console and I want the to play nice with each other. So I want to have some XX to make the police among the threads and I want that to be hidden as most as possible to my client. I can think of a few alternatives...
I am creating this converter. There are three units that can be converted: kelvin, celcius and fahrenheit. I used two variables to check which unit is chosen. It's cek and cek2. Is there any way I can shorten this code, or I just have to add all possible combination using if statements as i am doing now? if (cek=="cel...
The purpose of this program is to run an infinite prime generator that won't stop unless I tell the console to stop. This is not a sieve of Eratosthenes; it stores prime numbers in an array and divides by those primes to check if they are prime. This allows me to avoid dividing by the multiple of all primes. Are there ...
As a personal exercise, I'm trying to write an algorithm to compute the n-th derivative of an ordered, simplified polynomial (i.e., all like terms have been combined). The polynomial is passed as an ordered list where the i-th index corresponds (though is not equivalent) to the coefficient of x to the n-th power. Examp...
I needed a mechanism for creating types dynamicaly from strings and bytes etc. I tried really hard to use the .net's TypeConverter system as it seemed to be the right choice. Unfortunately it turned out to be extremely hard to customize (either by adding attributes to classes via reflection (which is like hacking it) ...
I am calling a ajax method for a number of hidden client ids on an aspx page. The ajax method returns some html to a div provided. So the code looks like below: <asp:HiddenField runat="server" ID="hdnSomeProperty" Value="False"/> <asp:HiddenField runat="server" ID="hfMyIndex" Value="0" /> <asp:HiddenField runat="serv...
Challenge Given a list of words mixed with extra symbols. Write a program that will clean up the words from extra numbers and symbols. Specifications The first argument is a path to a file. Each line includes a test case. Each test case is a list of words. Letters are both lowercase and uppercase, and mixed with ex...
I have written this code to simulate a Turing machine and wonder what could be improved. In particular, the --tape.end() seems a bit dodgy. #include <array> #include <iostream> #include <list> typedef enum {right, left} Direction; template<int n> // n is the number of symbols struct State { std::array<in...
I'm new to C#, so I'm eager for any and all criticism/advice. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FileTransfer { class Program { private static string targetPath; public static bool runnin...
I made a small function that is getting looped when an input is getting focus and stopping the loop when the input is losing focus. Now I would like to know if there is a better way to write this code. var timer; function Change () { if( !$('#eventurl').val() ) { $("#js-skipbutton").text('overslaan');...
Does this code outperform the common implementation with path-compression and union-by-rank? I'm still okay with a review. GitHub import java.util.*; public class DisjointSet<E> { public static void main(String... args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); DisjointSe...
I started writing this program to get a better understanding of different aspects of Ruby. I tried to follow the ruby style guide here. What it's supposed to do is take the exercises/tasks you give it, and record those tasks. It uses a record of those tasks to automatically create/update the header row of a .csv file f...
I am trying to create a function that can either beat numexpr or perform comparably for the vectorized mathematical operation k * exp(ee), where k and ee are 1D arrays of complex numbers. I had tried using OpenMP in Cython directly, but I have resorted to creating a DLL in C++ and then wrapping with Cython. Here are th...
I have an app that uses the file system a lot to store generated files (zip files and scss/css fil). When a user generates a file, the metadata and other information is stored in the db for later retrieval and action in another part of the app. Through testing or error, I realized the DB and file system could beco...
I recently decided to code some in Python after coding in Java using lombok for quite some time. However, I got bit real hard when I forgot to implement __eq__, since Lombok normally does it for you. I decided to try to implement something similar to Lombok's @EqualsAndHashCode, which I called eqhash. Then, I added a s...
I'm moving away from map, reduce and filter in favour of list comprehensions. I like list comps but I feel like this is getting on the unreadable side. Is this the most idiomatic way of achieving this? Is it easy enough to read? int_list = [-1,-3,5,7] absolute_diffs = [max( [abs( int_2 ) - abs( int_1 ) for int_2 in in...
Is there a way to collapse multiple_get into as few lines as possible? def single_get(target): return [some list of objects] # might be an empty list def multiple_get(targets): result = [] for target in targets: result.extend(single_get(target)) return result
I submitted the following Python 3 code for this HackerRank challenge. Given an n × n grid with an m and a p in random cells of the grid, it prints the next step in a path that moves the m to the p. I'd like any feedback on this. def nextMove(n,r,c,grid): #First, find the princess for i in range(len(grid)): ...
I 'm trying to create a universal CSS template for global styles. I can not find unambiguous recommendations. After inspecting various sites, I have compiled the following template . I ask your advice . Thank you! *, *:after, *:before { box-sizing: border-box; } html, body { overflow-x: hidden; overflow-y:...
My Person class has two properties; name and surname, and a function that returns the first name and the surname together. Is there anything that can be done better? Anything that is done poorly? public class Person { private string Firstname { get; set; } private string Surname { get; set; } public Person...
This is the second version of my type converter framework. The the previous one can be found here: Type creator service & framework In this version I mostly implemented what @Dmitry Nogin suggested in his great reviews I also extended it so that each converter has access to all the registered converters in case it need...
I'm using a simple logger on a server, which uses a method that looks like this: @Override public synchronized void write(String logtag, String reason, int severity) { long logtime = System.currentTimeMillis(); String message = ""; switch (severity) { case DEBUG: if (!debug) return; ...
I wish to make a mixin to produce the following result of modifier classes: .text-left { text-align: left } .text-right { text-align: right } .text-center { text-align: center } .text-justify { text-align: justify } .float-left { float: left } .float-right { float: right } .float-none { floa...
I have a table with (CompanyNumber, File_Date, [various financial results]) I wanted to get only the most recent set of accounts for each company. After various googling I eventually got a query that does what I want it to do. Is this a good way of doing it? N.B. the File_Date field is actually a text field, so need...
I am getting back into python after a year of not doing it at all. I just wrote a bit of code to create a file that looks like this: 1,2 1,1,1,1 -1,0,1 42,17 Then I decided to take the average of each line and put it into a list. For this I wrote the following: def line_averages(): out_file = open("data.csv", "w")...
I am relatively new to Ruby, having worked with Rails for about 8 months. For fun and my own education, I have written a Ruby gem (no Rails) that models dates with a precision (second, minute, hour, day ... billion years). A big part of my goal was create dates from the date format on Wikidata, and format them as huma...
Challenge Write a program which reads a file and outputs a specified number of lines, sorted on length in descending order. Specifications The first argument is a path to a file. The file contains multiple lines. The first line indicates the number of lines to output. The following lines are of differing lengths and p...
This is the "Clean up the words" challenge from CodeEval: Challenge Given a list of words mixed with extra symbols. Write a program that will clean up the words from extra numbers and symbols. Specifications The first argument is a path to a file. Each line includes a test case. Each test case is a list of words. ...
I'm using the command pattern to enable actions in my game to be undoable. ICommand defines individual commands, ICommandHandler does the undo-redo logic and might be decorated with other handlers like logging etc. public interface ICommand { void Execute(); void Undo(); } public interface ICommandHandler { ...
I was given a school assignment to implement atoi(). Please review my code. int my_atoi(char *ato) { int res; int sign; res = 0; sign = 1; while (*ato == ' ' || *ato == '\t' || *ato == '\n' || *ato == '\f' || *ato == '\r') ato++; if (*ato == '-') sign = -1; if (*ato == '-' |...
I wrote a UserScript that auto-sorts contacts by offline time using the MutationObserver API. I tried to make it as DRY as I could think, and I also tried to make my code as straight-forward as possible, commenting thoroughly. Please let me know any improvements I can make. // ==UserScript== // @name Facebook M...
The problem Project Euler: 35 is stated in the following way Circular primes Problem 35 The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. How many ci...
I wrote codes that listener and callback function like this: struct MyListener { virtual void callback1(int value) = 0; virtual void callback2(string value) = 0; ... }; vector<weak_ptr<MyListener>> _listeners; void MyClass::fireCallback1(int value) { vector<weak_ptr<MyListener>>::iterator iter = _lis...
I'm attempting a programming challenge type task in C#, where the goal is to determine how many unique strings can be obtained by removing two characters. The prompt for the task implied that I should create the set of all possible strings with 2 chars removed, then return the number of items in the set. I was initiall...
Following is Objective-C method implementation I did for one of the most simplest sorting algorithms, Bubble Sort to sort an array of integers. Note:- I have defined it as a static method in the SimpleAlgorithms class. /** * When given jumbled or discending ordered array of integers, following bubble sort method will ...
My code takes a long time for big graphs. How can I make it faster? I'm trying to calculate the shortest path for 3 path's using queue but for big input my program crashes. I'm stuck here. Can someone help me? def bfs(graph, start, end): queue = [] queue.append([start]) while queue: path = queue.pop...
So I need to update some certain values within text file based on actual values there. Any advice on making it more effective or just readable is appreciated. Example text file: Lalala There is tons of text in this file log-12345sr And somewhere within There are log file names log-23456sr Some more text here I want ...
http://pastebin.com/7UqD0gwF I'm looking for serious feedback on my first serious program. This is a program to calculate PvZ income over time of sunflowers and sunshrooms on nighttime pool levels. Shrooms might have an obvious advantage but this program was borne over the idea that once all space allocated to income ...