instruction
stringlengths
71
71.9k
I know something about pointers, but I'm trying to check my knowledge on a sample. Can somebody check if my code is good? I don't think that I should use pointers in these structs. The second question is: Can I use a for loop like this? for(DLList* i=first; i!=0; i=i->next) Is it correct? struct Node { int id; ...
<?php $page = 'Login'; session_start(); include 'header.php'; $user_error = ''; $pass_error = ''; $login_error = ''; if(isset($_SESSION['username'])){ header('location: control-painel.php'); } if(isset($_POST['login'])){ $username = $_POST['username']; $password = $_POST['password']; $cost = '11'; $salt = 'Cf1f11ePAr...
The below code returns all distinct combinations based on the logic that 1,2,3 = 3,2,1 = 2,3,1, so it only returns 1 instance of that set of numbers. public void GetPowersets() { List<int> ints = new List<int>() { 1,2,2,3,3 }; var results = GetPowerSet(ints); List<String> combinations = ...
What would be the best way to refactor this : @busy.each do |b| title = b.title @events << { :id => b.id, :title => title, :start => b.busy_start_time(b.start_date,b.start_time), :end => b.busy_end_time(b.end_date,b.end_time), :allDay => false, :recurring => false, :color => 'black', ...
Please review this small program I wrote to create a World Cup Group Table. You feed the program match info, and it builds a table based on that info. def table_for(matches) # Defaults that each team in the table should have defaults = { goals_for: 0, points: 0 } # Using the matches, let's create a hash ...
In one finance application I'm working on, the requirements call that I truncate a decimal value at certain number of places and not round. Example: 11.685 truncated to 2 decimal places should be 11.68 I wrote this extension method, but was wondering if someone knew of an easier way. public static class DecimalExtentsi...
What I want to do: Let users add data to an array through an input field and add button. HTML: <body> <input type="text" id="input"> <button type="button" id="btnAdd">Add Number</button> <div id="outputBox"></div> JS: var arrayList = []; $(document).ready(function() { $('#btnAdd').on('click', mkArray); ...
Background We have to cater to large screens. So I created this portion of a grid system which is shown to users with screens larger than 1800px. Solution This grid is 1800px wide but can shrink down to 1200px, has 8 columns. I wanted 10px margin around the sides of each column. So I arrived at the number of 0.55555%. ...
There are a number of things wrong with the code here: @cust = Customer.find_by_id(params[:customer_id]) upd = @cust.update_attributes({:city_id => params[:city], :zip_code => params[:zip], :first_name => params[:first_name], ...
For a game, there is some WebGLRenderer object that wraps around canvas element. There is need to update it's size when browser window size changes. Here goes my current code written using BaconJS. What do you think about it ? Would you improve it in any way or maybe do it other way? I have read that listening to resiz...
While practicing at codinbat.com on the assignment: Given an array length 1 or more of ints, return the difference between the largest and smallest values in the array. Note: the built-in Math.min(v1, v2) and Math.max(v1, v2) methods return the smaller or larger of two values. I wrote a solution (1): public int bigDi...
I'm fairly new to C++ and to game programming itself. Today I decided to build a multiplayer Tic Tac Toe program using only elemental C++ syntax/data structures. I also implemented a text interface for the game instead of real graphics. Any suggestions or tips for the code? #include <iostream> #include <string> #defin...
I have written the following Perl script to monitor the hard drive performance of the particular process (say, for example, Chrome). use strict; use warnings; use Spreadsheet::WriteExcel; #@usage example perl script.pl 5 5 if($#ARGV!=1); my $login = (getpwuid $>); die "must run as root" if $login ne 'root'; my $wor...
This function checks if the EndDate of my grid is valid or not. If it is not valid, it turns the bgcolor of the cell to red color with cell-error class. I need some help in optimizing this block of code. It looks dirty right now. function onAccrualEndDateChange(current) { var endDate = $(current).val(); if (endDate != ...
Here's a function I wrote - am I getting DRY about right? I could add another argument to paramFilter maybe, for even less reuse. Or have I gone too overboard as it is? function goMageHack() { var ampFilter = function (str) { var amps = ["&amp;", "amp%3B"]; for (var j = 0; j < amps.length; j++) { ...
I have been trying to solve this problem, and after a bit of googling, I realised a \$O(\sqrt{n})\$ time complexity works fine (though the algorithm suggested is different from that I have used). My algorithm is as follows (pseudo code): for i in range(sqrt(n/2+1)): if n-i*i is a perfect square: return True...
I need some help in working "Video Rental Store" application design optimization. The application describes the following tasks: Inventory stores videos. Inventory can add/delete/change and receive all videos. Inventory has 3 types of films: Old, New, Regular. Videos have a title, type (described above) and availabil...
I have a problem with parsing RSS from a PHP page because the app is too slow. This is my parsing code: public void getdataparse(String url) { Log.d("Do in Background","Start Call Void"); String dbtitle = ""; String dbDesc = ""; String dbimgicon = ""; String dbimg = ""; String dblink = ""; ...
This is vedic method multiplication. This code takes time on a very long numeric string, and I want to optimize it. I also apply recursion on multIndices (this function is multiplying two given indices values). #include<stdio.h> #include<stdlib.h> #include<string.h> char str1[10000],str2[10000],resultant[10000000]; ...
Intro I am trying to populate a Multi-column Combo-box with a large amount of records.Depending on the selection the user has taken there can be 1 - 50000 items in the Combo-box (I may not display all these items at once, but i still have to process them all). I am using entity framework to get a list of objects and i...
I’ve been experimenting with the Twitter Streaming API and would like some critical feedback on my latest project. Specifically code correctness, code smells, overall structure, and my usage of collections. The application identifies the current top trending hashtags for the supplied hashtag, or string. AbstractClient....
Suppose the following model: public class ViewBookModel { public string Title { get; set; } public string Subtitle { get; set; } } I'm currently rendering it like this in my Razor view: <h1>@Model.Title</h1> @if (Model.Subtitle != null) { <h2>@Model.Subtitle</h2> } My question is about the Subtitle bit. ...
I'm looking for some code review of my usage of async. Mainly why this does not work without the done = this.async() method and why I don't have to invoke 'done()' on every request to download a file. This is working now but it is a bit of magic to me. Hoping to understand why it's working and if I'm abusing something....
Question: Given an index \$k\$, return the \$k^{th}\$ row of the Pascal's triangle. For example, given \$k = 3\$, return \$[1,3,3,1]\$. Bonus points for using \$O(k)\$ space. Can it be further optimized using this way or another? class Solution { public: long long C(int n, int r) { if(r > n / 2) r = n ...
The following code uses scikit-learn to carry out K-means clustering where \$K = 4\$, on an example related to wine marketing from the book DataSmart. That book uses excel but I wanted to learn Python (including numPy and sciPy) so I implemented this example in that language (of course the K-means clustering is done by...
I'm starting to figure out this jquery stuff, but as you can see there's a long ways to go. How would I approach refining and simplifying this snippet. Its purpose is to show a fieldset[data-content] with inputs inside when you click a "show" link, and to hide said fieldset and remove all "required" attributes when you...
In preparation for a job interview I decided to try and implement the classic find all anagrams of a given string solution. I wanted to see if I could translate a javascript solution into python. This was my attempt: def anagrams(word): if len(word) < 2: return word else: tmp = [] for i,...
I'm trying to post a little tutorial on the new Spliterator class. There are many tutorials these days on using stream starting from a standard Java collection, but I want to explore the creation of a stream using data coming from the web (so no stream fully backed by a collection). I decided to implement a infinite UR...
I would love some feedback on this. I use it to validate web-form objects before persisting them in the dangerously-lazy MongoDb. I have a class and many validators for each of my collections. Is there a better way to write or go about this? class ValidationError(Exception): pass class User(object): @s...
I've implemented a simple thread-safe circular queue. I'm looking for code review, optimizations and best practices. public class CircularQueue { int[] queue; int front; int rear; int currentSize; int size; public CircularQueue(int size) { this.queue = new int[size]; this.fro...
This code review expands on an earlier one that deals with generating a football table from match data. This review deals with ordering said table based on several criteria. Your opinions/refactorings are welcome. In particular, I'm looking for ways to optimise this. Given a table with columns name, goals_for, goal_dif...
I have a model that consists of a 100 'agents' that change their x and y coordinates randomly. I use JFreeChart scatter chart to represent agents' locations. package jfreecharttest; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; import java.u...
Is there anything wrong with this? namespace WindowsFormsApplication1 { public interface ICarfactory { ICar getCar(CarType carType); } public interface ICar { } public class Sedan: ICar { } public class Hatchback : ICar { } ...
I've implemented a stack using a queue. Time complexity: \$O(n)\$ - push(), where n is the number of elements in the queue \$O(1)\$ - pop() Space complexity: \$O(n)\$ - n is the number of elements in the queue. I'm looking for optimizations, code review and best practices. public class StackUsingQueue<T> { privat...
How can I simplify and optimize this code? if type(variant_list) == dict: style_color_if(variant_list[style_colors_main], variant_list) else: for variant in variant_list: if type(variant[style_colors_main]) == dict: json_key_getter(variant[style_colors_main], variant) else: ...
I have a threaded pipeline with single producers and (possible) multiple consumers. A producer might wait or not, depending on the policy provided. A problem here is valgrind (helgrind) is reporting a race condition where no race condition should be possible (If so, my code is wrong). #include <algorithm> #include <at...
I have the following LINQ query that should return a result for each Request. I'd prefer to have the query translated to SQL by EntityFramework. private static Expression<Func<Request, RequestResultModel>> requestResultExpression = request => request.Applicant .ApplicantAddresses .OrderBy(ad...
How could I improve or make this program more user friendly? I have not been programming very long, so please don't give me a task that is too complicated. from random import randint import time global word word = "a" shield = 5 #The main function def main(): #This will trigger the introduction intro() whil...
I've written an algorithm which can multiply two hex values and return a hex as a result. What do you think about the below solution? package com.datastructute.arraystring; public class hexadecimal { public static void main(String[] args) { System.out.println(multiplyHex("AE08FE2111111111", "BF")); ...
I wanted just to right align one column in WPF and I found out that the syntax is not exactly syntetic... Is there a way to make it more syntetic? Consider that this one colum, but I have 20 columns which share the same identical structure, changing only the displayed property. <GridViewColumn Header="trial" Width="11...
We have an action merge for two projects. In the projects we have different modules like Feed, Files, Post etc.... modules Convert class Merge attr_accessor :source_ids, :destination_id, :sources, :destination def initialize(source_ids, destination_id) @source_ids = source_ids.class == Array ? source_i...
I'm learning SSE for the first time and trying to optimise some code. Using oprofile shows that the CPU usage in this function went down from 2.5% to 0.9% using the code I created. As I've only been reading up on SSE today, I'm sure my code can be improved. Any suggestions? OProfile shows that time is most spent in: ...
I'd like to get a general review on the following code, and I'll highlight an extra point below: public interface PlayerAction { boolean isActionAllowed(final Player player); void performAction(final Player player) throws PlayerActionNotAllowedException; } public class PlayerActionNotAllowedException extends...
I am writing a management application to replace an existing application. Depending on certain criteria, people are interviewed either quarterly or annually based on certain criteria. The date of the interviews are determined by their birthday. I want a dialog that will display all upcoming interviews, one month in ...
This is perfectly readable code to me, but I'm afraid it may be too confusing to others. What do you think? Note that I'm not interested in validation of the input here (validation will happen long before we get to this line in the code), so assume it is blank or a valid non-negative integer. It's modified from this S...
I have been thinking quite some time and asked an StackOverflow question about extending abstract test classes, but I haven't been able to do it until now. I'll list my approach and then discuss some pros and cons and am asking you for a review of the code. Consider the PlayerAction interface: public interface PlayerAc...
Recently, I have get familiar with Command Pattern implementation. I have a problem where I need to get a choice for user to select what kind of method to execute typing method name or number, which concerns to this concrete method execution. Everything will be OK if I don't need to create separate class for each metho...
I'm using code adapted from this Stack Overflow question to calculate all possible combinations from an array, which may contains strings. For example: [ "x", "y", "z" ] => "x y z" [ [ "a", "b"] , "c", "d" ] => [ "a c d", "b c d" ] [ [ "a", "b"] , ["c" "d"], "e"] => [ "a c e", "b c e", "a d e", "b d e" ] However as ...
This function is part of a the Registry class that can be found on Google Drive. The class was originally written by Steve McMahon for VB6, but I ported it to VBA and added the function below. I would like to know if I have made any mistakes in my logic and (if possible) how I could change this to keep searching after...
I've thrown everything I can at this, and I can't get it to lock or crash. My hope is that I have applied the principles correctly. I write client apps in JavaScript, and this is only the 3rd .NET class I've ever written (using JScript), so a topic as advanced as this really needs a once-over by some experienced develo...
I have created a custom HtmlHelper to render a Grid, and it's working fine, but I know for sure that it isn't written really nicely. I'll provide you with the code that's most important for the grid. First of all, the model which I pass to my grid is an IEnumerable<T>. Then, the Razor syntax for the grid is as follows:...
This is my Java implementation (\$O(n)\$) about how to calculate infix expression with no parenthesis. For example, when we input "3 + 4 * 4 / 8", we will get a double type answer is 5.0. Here to make the algorithm simple, we don't consider any parenthesis in the expression. I think my implementation is kind of tedious...
So my project was to make an algorithm that finds a path out the maze using "backtracking" to help. This is my first time attempting to solve anything with backtracking so I want to be sure if what I did is actually backtracking and if it is an efficient way to apply it to my problem. Bellow is the main logic: public v...
Problem I am learning about HPC and code optimization. I attempt to replicate the results in Goto's seminal matrix multiplication paper. Despite my best efforts, I cannot get over ~50% maximum theoretical CPU performance. Background See related issues here, including info about my hardware. What I have attempted This r...
I'm working on class for a hash table where collisions are corrected using cuckoo hashing, I had difficulty writing the insert function, the function is supposed to insert the key if the h(key) is available, if not it is supposed to find the shortest "path" for moving other keys in order to find a place for the inserte...
Next version of Adding a duplicate entry randomly into a list in haskell using random monad I wrote this trying to set up a Haskell testcase. The aim is to take a list and add a single duplicate from any place in the list to anywhere else in the list. I'm trying to learn to use the Random Monad properly so the main ai...
I have a bottleneck in my program at the point where I calculate the digit sum and product of a number. I am using GMP because I have to work with numbers that follow \$1e8 < n < 1e80\$. To calculate the sum/product of a number, I initially used strings, thinking the division/modulo method would result in an improveme...
I have an application in Ruby on Rails (3.2) and I want all the requests to take into account the currently logged in user's time zone. Also, I want to have a helper that will let me display date time fields using user's time zone. I follow this approach: Inside ApplicationController I hook an around_filter like this:...
I am trying to provide a fluent API for authorization based on roles. As you will see I separated my implementation in two related Interfaces the Session and the Query. The session provides all roles, permissions and user information, so one may query it later via the Query object. I also separated the implementation ...
Input is a file containing numbers in this format: 1.2 3 5.1 2 7 4 6 5 2 9.22 1 0.0 4 3 I am doing the sorting in the simplest way, using Collections.sort method. The running code is as follows: import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Collections; import java.util.LinkedList...
I'm working on writing code which gets several pieces of an image, and reconstructs them to one whole picture. The images are represented by matrices, and two pieces should be "glued" if the right column of one matrix is the same as the left column in the other one. from images import * def reconstruct_image(m): ...
I've written these two command-line tools to be used to facilitate forestry surveys. For a little background, the idea here is that often a landowner needs to know precisely how much wood is coming out of his dirt. Not only that, but he has to account for the fact that you can't turn a cylinder (trees) into rectangular...
I use these in a windows form with fun buttons, I wanted to see what the world thinks of my coding. This is something that I coded about 2-3 years ago, I did change some of the coding when I looked at it and thought "this could be better written like this" Let me know what you think and what I could do differently. Pub...
I've written this code keeping the following cases in mind and I think I've covered them all. I'd really appreciate if someone could help me determine if I've covered all of them. Cases I considered: No comments at all Text /* Text */ Text Text /* Text */ Text /* Text */ Text /* /* Text */ */ Text Text /* /* Text *...
Using Python/Cython, I am trying to construct an efficient way to index boolean values. I have been trying to use the bitarray and/or bitstring packages to construct a fast, non memory intensive way to hold a lot of booleans. My goal was for a list like object that could be sliced as such, and actually managed the bool...
A friend helped me put the following code together, which is made up of a series of repetitive loadContent() functions. I've just shown the first two functions but they're all the same. The code works fine but I'm wondering if anyone could give me a tip as to how I could reduce the bloat in this code and condense the f...
I got bored with opening and closing files whenever I need to write to one, so I wrote a FileWriter class that's used like this: Public Sub TestWriter() On Error GoTo ErrHandler Dim writer As New FileWriter If writer.OpenFile("c:\test.txt") Then writer.WriteLine "foo" End If ErrHandler: If...
I have this table (inradar_ad) with almost 300k entries. I want to know why my query takes 160 secs to run. I tried limiting with LIMIT 10 to see if I get a speed boost, I but didn't. Does LIMIT speed anything up? I don't think so in this case, since it has to calculate everything and then limit it. -- --------------...
Please review my servlet. public class Controller extends HttpServlet { private static final long serialVersionUID = 1L; static List < MRTBean > stop1 = new ArrayList < > (); static List < MRTBean > stop2 = new ArrayList < > (); static List < MRTBean > stop3 = new ArrayList < > (); static List < MRT...
I would like a review on my Console class I made in JavaFX 8. It features the following: A text field where you can enter input, the input gets copied into the text area. A text area where you can observe output and see the input. When you press enter, you send the message. When you press arrow up, you can go back in ...
I wanted to do some statistics over the history of a Git repository. At first I tried using GitPython, but it wasn't as trivial as I imagined it to be. In the end, I just call the necessary git commands with the submodule module. Can this code be considered clean and readable or does it have some style issues? import a...
I am writing a text classifier, and in order to do so, I need TF/IDF values per every word of my single text. Then I need to use the cosine similarity: $$similarity = cos(\theta) = \dfrac{A \cdot B}{\lVert A \lVert \lVert B \lVert} = \dfrac{\overset{n}{\underset{i=1}{\LARGE\Sigma}}A_i \times B_i}{\sqrt{ \overset{n}{\un...
The program is running fine but I was just wondering whether there was anything I could do to make it more user friendly or efficient. from random import randint import time word = "a" shield = 5 #The main function def main(): #This will trigger the introduction intro() while True: shield, word, fin...
I have written a deliberately pretty simple class that wraps a std::vector to basically make it capable of self-populate itself with random generated numbers, simply to be able to test the result of some sorting algorithms that I'm working on. This is only a hobby project, it is not production code :-) so I'd like to...
I finished a program to do connected component analysis using union - find algorithm. Is it true that the complexity of the code is \$O(N logN)\$, where \$N\$ is the total number of pixels (512x512 by example, not 512). Is there any way to improve the performance? import cv2 import numpy as np import random class Quic...
I need to do a few hundred million euclidean distance calculations every day in a Python project. Here is what I started out with: #!/usr/bin/python import numpy as np def euclidean_dist_square(x, y): diff = np.array(x) - np.array(y) return np.dot(diff, diff) This is quite fast and I already dropped the sqrt ...
I've posted this some time ago. Here is the new version that I made based on all the comments that were made. Another look would be much appreciated, especially on: Getting rid of the global statements I read about the use of the return statement which is bad practice in some situations (see code). Is that correct? Th...
To learn the language of JavaScript, I did a dojo exercise by Roy Osherove. Is there a better way to organize this so that the only method exported is add while keeping it in one single module? module.exports = { add: function (string) { this._checkForError(string); this._checkForNegatives(string); return...
One of my first ever Jython scripts lets me get comma-separated values out of an RDBMS: from java.lang import System from java.sql import DriverManager, ResultSet import csv import cStringIO as StringIO import sys def doIt(): if System.getProperty("jdbc.drivers") is None or System.getProperty("jdbc2csv.query") is N...
I have converted this code from Java to Scala, and I need reviews. This works fine, but I am sure that something is wrong with this coding pattern. package models import org.apache.log4j.ConsoleAppender import org.apache.log4j.Level import org.apache.log4j.Logger import org.apache.log4j.PatternLayout import org.apach...
Please review my short 65 lines of code: Is there a way to avoid eval (security)? Is there a better way or place to use shopt -s nullglob? Does shopt -u nullglob always need to be unset through each iteration? Is there a smarter way to define a list of locations? #!/bin/bash if [ $# -eq 0 ] then echo specify at ...
This question is related to this topic. Context: class OperationDevice(Device): def __init__(self): super(OperationDevice, self).__init__() def operation_start(self): # Do operation specific code self.start() def operation_stop(self): # Do operation specific code se...
In an interview I was asked to solve the following problem: find a subarray with max sum I have written a piece of code for the same. I need your help in reviewing this code. package com.ankit.rnd; public class MaxSubArrSum { int largestSum=0; int previousLargestSum=0; public static void main(String[]...
I have this code which works for uploading multiple files (images). However, it seems inefficient due to having to a function for every single file upload (for 2 uploads, but there will be about 12 in total). function readURL1(input) { if (input.files && input.files[0]) { var reader = new FileReader(); ...
In Model View Presenter (MVP) pattern, it is said that our DAL always should returns business models. If I want to get a list of business objects from my DAL, is it acceptable to do it as follows or better to get a DataTable from DAL and then in the applications BLL, converts it to a List? public List<Employee> GetN...
I've two similar functions and I want to use one generic function with two params, dialog and buttons. How do I do it? My functions: LanguageLogosView.showConfirmRemoveDialog = function () { var def = $.Deferred(); var buttons = { buttons: { "Remove": function () { def.resol...
I'm looking for some JavaScript code improvement and optimization. Is it possible to optimize this block of code (for example, remove double array loop)? replace: function(ex, str) { var arr = str.match(/{add_([A-Z]+)}/gi); if (arr && arr.length) { arr.each(function(e){ var id = e.r...
I have written simple code which loops through a list object and create groups in ListView depending on the data in the list. I have a list object of type List<Assignment> where Assignment is a class as follows. public class Assignment { public TimeSpan Time { get; set; } public string Type { get; set; } pu...
I've just written my first full batch of RSpec tests and wondered if anyone can comment at a glance on how they might be written easier, more readable, faster etc. There are some pending specs so excuse those. It should describe what they will test when I finish. I've given examples of models, controllers and feature ...
I'm aiming to get this program right as I might show it at a job interview. The code below runs fine but I would like to know if there's anything that can be improved in terms of readability, good practices and/or standards. The program asks a user to take money from a checking account and move it to a savings account....
This is the code I ended up with that implements the approach I described in a recent answer to another question about the same problem The basic idea here is to not loop through more things than necessary. I have also added a parameterized JUnit test. I would like to know what you think of this code. Any comments wel...
I could really use another set of eyes on this. No one else in the office has a lot of experience working with Android, so I'm on my own with this one. The goal of this class is to encapsulate an image which can be sourced from a camera or file so that it can be uploaded to one of our servers using a POST request. Just...
I have written a simple (read: incomplete) tuple implementation that, AFAICT, does not violate the standard layout requirements. It's largely based on Nish's implementation, but I use a recursive hierarchy of nested members, rather than recursive inheritance. Unfortunately this approach necessitates recursion for eleme...
When playing Killer Sudoku I find myself repeatedly writing stuff like this: 12/3 921 831 741 732 651 642 543 and then crossing out the combinations that include say 9, 7, and 6 IE I need a list of any 3 digits between 1 and 9 that add up to 12, excluding 9, 7, and 6 because they are already in the house. So I wrote...
Performance benchmarking small functions in Java is notoriously difficult, and there are a number of tools out there to help (caliper, others). Those other tools require a fair amount of setup and installation to get them working. This code is adapted from a question @skiwi asked. He produced this ProjectEuler framewor...
I am reading this article about how you can organize JavaScript code for large projects. I am attempting to write a simple events calendar as a way to play with some of these design patterns. Using the module pattern I started to create a calendar module, but I have some questions: var calendarModule = (function() { ...
I'm looking to improve the efficiency of my code. Although my current method works, I feel it can be improved. if ouroraddrlen == (4,): ouropip = struct.unpack(">bbbb", payload[6:10]) # Need to change this to accept ipv6 as well print "Our I.P : ", ouropip notheirip = struct.unpack(">b", paylo...
function min_strpos_array($haystack, $needles) { $min = null; for ($i = 0; $i < count($needles); $i++) { $strpos = strpos($haystack, $needles[$i]); if ($strpos !== FALSE) { $min = $strpos; for ($i = $i + 1; $i < count($needles); $i++) { $strpos = strpos($h...
So here we have a little game of Tic Tac Toe I've made. It runs well on TI-83/84 calculators and it doesn't seem to have any problems. However, I'd like to eliminate some of the code that seems bulky and repetitive as well as possibly add some checks so you can't overwrite a square that's already been played and to fin...
I've just recently started C# and I was wondering if there's anything I can improve on. My project is a pizza form, where people can order pizza and the price gets updated, depending on whether they want delivery or not. Here's a picture of the GUI: using System; using System.Collections.Generic; using System.Componen...