instruction stringlengths 71 71.9k |
|---|
This is a simple hello world sample project used for instruction. I'm just looking for general comments on the approach and design.
AdvancedHelloWorldTest.java
/**
* AdvancedHelloWorldTest.java
* 2014 GetGnosis.com
*/
package com.getgnosis.tutorials.tutorial01001;
import static org.junit.Assert.*;
import java.io... |
I've created a JSON parsing library in C, and would like some feedback on it (feel free to submit a pull request on GitHub). Any and all suggestions are acceptable, but I would prefer if reviews were focused on making this more efficient.
My header file:
#ifndef _json_H_
#define _json_H_
/**
* JSON type identifier. ... |
After reading this question, I've realized that I can do a lot to improve the quality of my question, so I've edited this question quite a bit.
I've been teaching myself F# in my spare time off and on for the last 6 months. I've finally started getting comfortable enough with the language to feel that a lot of my code... |
/*
* LinkedList.h
*
* Created on: Mar 9, 2014
* Author: steven
*/
#ifndef LINKEDLIST_H_
#define LINKEDLIST_H_
#include <iostream>
using std::cout;
using std::endl;
template<class T>
class LinkedList {
template<class E>
struct Node {
Node<E> *rightNode;
E data;
Node() {
... |
Every time I write a new PHP page, I usually need to include this at the top:
<?php
require_once(__DIR__ . '/../libraries/global.lib.php');
function load_classes($class) { // appears to get all the names of the classes that are needed in this script...
$file_name = './classes/' . $class . '.class.php'... |
After reading/watching various introductions and blog posts and some code here and there, doing a bit of the Try F# tutorial and starting to read "Real World Functional Programming", I felt I should be able to write a first small real-world application in F#.
In order to be able to concentrate on getting to grips with ... |
I am not sure what I am doing is right or not and am looking for experienced opinions.
Entity Example
namespace Entities.Shop
{
public class Shop
{
public virtual int ShopId { get; set; }
public virtual string ShopName { get; set; }
public virtual IList<ShopScore> ShopScores { get; set;... |
One of the main problems I have with JList is that no component is actually added to it. This means that things like ActionListeners don't work, and you can't really have a list of interactive components. To solve this, I've tried to quickly implement an alternative.
I have a number of concerns.
Speed: Will this be fa... |
As I was coding this algorithm I found that some variables that are meant to be global behave as they are intended to behave, but others do not. Specifically, my boolean arrays, e.g. processed and discovered, can be modified within any method without the need to declare them.
On the other hand, I had trouble with th... |
I wrote this code to send any binary file from server to client (in our example, I am sending sample_file.txt); the client should recreate the file locally.
Code works fine (I tested with one or two files). Data is sent in chunks of 256 bytes.
I would appreciate remarks and critique, however, not that much from program... |
I'm trying to write a Minecraft server in Ruby as an educational project and I've hit the point now where I need to decide on how I am going to structure the in-game objects (entities). In my mind, an Entity is an in-game thing such as a block, or a player, or a skeleton.
The reason this is code review, and not game de... |
At the innermost loop of my software is a lookup of a function value from a piecewise defined function with interpolation between the sample points.
Illustration:
* *
* *
* *
|--|------|------|--------X---------|------------... |
After suggestions given in this question, modifications to the code has been done.
Only thing I could not do is to decide, where to place the starveTime property (in Shark class or somewhere in a common place) because starveTime is not specific to Shark, it is common to any eating creature (other fish), currently Shark... |
I am working on angularjs, and I have created some directives with bunch of HTML elements within its templates. I have assigned a controller for those directives. Below is my code snippet:
directives.directive('ngLd',function()
{
return {
restrict : "AE",
templateUrl:'partials/ld.html',
s... |
Is there a more efficient/direct way to find an arbitrary perpendicular vector of another vector?
def perpendicular_vector(v):
r""" Finds an arbitrary perpendicular vector to *v*. """
a, b = random.random(), random.random()
if not iszero(v.z):
x, y, z = v.x, v.y, v.z
elif not iszero(v.y):
... |
I haven't thought of a nice way to remove #, fuzzy from the files. I think process_babel_file might possibly become its own module, but on the other hand, having all methods in one script is quite nice for the mean time. I expect there to be bugs, although it works for the languages I've tried.
#!/usr/bin/env python
# ... |
I see that there are quite some words that are appearing double or more times in my code.
I'm thinking there might be a more efficient way of writing this code, only I don't have the knowledge to do so.
function transitionData(data) {
if($("div#facebook div#notice").is(":visible")) {
$("div#facebook div#hea... |
My software has multiple devices connected before starting. I must be sure these devices are working and are well connected. every device has different error ID code so we can see every component that is not working.
When the software will have completly test connection for every devices, we would like to show a messag... |
I have a simple sorting algorithm that I was told is possibly unstable. I'm wondering what in the sort is unstable. I have test cases written to test all fields with no issues.
A secondary problem is that jQuery is not appending the rows for some reason (works fine in local and server environments).
http://jsfiddle.net... |
I have a function that iterates through a list of file updates, and for each file, if updates are needed, download the file from the server, make the updates, and upload the updated version. Each update gets marked with a string identifying the result of the update operation.
There are several steps in the update proc... |
I have isolated a little bit of code that was causing a small debate between myself and another user. I have taken some of the things that he said and meshed it with the code that was being reviewed in the first place here.
Original Code
while (!validInput)
{
var playerChoice = -1;
Console.WriteLine("Please c... |
To avoid switch statements at multiple places, I wrote the following code. This was based on articles found in the Google search. The object names are not real in the sample below. So please ignore that.
//somewhere in the code
foreach (IEmailAlertDt alert in EmailAlertFactory.GetEmailAlertDtType(allowedEmails))
{
... |
I have this piece of code that is running too slow. I was wondering if anyone can help me optimize it as I can't seem to find any more shortcuts. I'm not sure if using List<> is going to help me but I need complex operation such as Union and Overlap.
Also, List is desirable because I don't know how many unique partiti... |
I have decided to make a basic C++ implementation of the std::map class, and I was checking that it is fine, as I am not sure if the operator[] is done correctly: should I be using the has_key function? e.t.c
template < typename _Key, typename _Ty, typename _Cmp = std::less<_Key>, typename _Alloc = std::allocator< std:... |
I have currently been working on a program for a few days now, and I am just about done. The goal of my program is to ask the user for the amount they still owe on their credit card, and assign an appropriate monthly interest rate. I have commented the code to make it a bit easier to understand, and I believe it is c... |
This is a similar question to this, but I am looking for the set of all possible values that will match a regular expression pattern.
To avoid an infinite set of possible values, I am willing to restrict the regular expression pattern to a subset of the regular expression language.
Here's the approach I took (Python co... |
I was wondering if anyone had some general clean up advice on my code. I believe that more helper functions would be my case but I could be wrong. 30 lines maximum per method is my rule. I can't seem to figure out how to clean this up more, though.
Sample Input:
(1/3) (1/5) - (40/1) * #
(2/3) B * #
Sample Output
Ex... |
It might be easier to read the explanation of what I was trying to do, and implement it a completely different way, rather than go through the code. But the code does what I want it to do, just nowhere near any measurable efficiency.
This started off as an assignment that I got finished, but I know there has to be a d... |
What troubles me are the empty /**/ brackets. Is there a cleaner way of handling this logic?
if (opcode == OP_0) { /* continue */}
else if (opcode == OP_1NEGATE) { /* continue */}
else if (opcode >= OP_1 && opcode <= OP_16) { /* continue */}
else { throw new Exception("decodeFromOpN called on non OP_N opcod... |
I made an isSorted function in Scala and Java as well and when I measured the time of functions' run I saw that the Scala version was very slow. It ran about 3.2 sec for 10000 Int but java version just ran about 10 ms!
How can I make faster my Scala version?
Scala:
def main(args: Array[String]) ={
println(isSorted(... |
I'm somewhat new to network programming. I have a server that uses Ubuntu, which needs to send data quickly to about 50 clients.
As of now, I have about 50 concurrent connections (of course), and it needs to be scalable up to 500.
I've created a JSON-based protocol to handle the streams and binary. Can these 2 classes... |
I am trying to find the users who have the highest "Following vs. Friends" ratio in my Twitter timeline.
I have a SQLite database of the users in my Twitter timeline and each column contains data found in the user section of the tweet JSON.
Is there a better way that I could write this search query?
Why does it retu... |
This code uses a ReaderWriterLockSlim to store data (on a disk or wherever), so that only one thread can write and many threads can read.
All writers should be finished before reading, and the write should not block the caller.
Basically my solution would work, but it doesn't look and feel natural to .NET since 4.0 the... |
I have started making a very basic networking library in C++. It is built on UDP, with both reliable and unreliable delivery options.
So far, I have made the base messaging class, so I will show the header, and the code behind a few functions.
Things to note:
While this is thread safe, I'm not actually expecting this ... |
I'm not particularly Python savy and recently wrote a LocalizationEngine for Twisted.
The strategy I implemented was to make a dictionary from base.json and then merge with any existing files set in the Accept-Language set in the URL (or cookie). For instance the Accept-Language of en-US,en;q=0.8,es;q=0.6 would merge b... |
I have the following method which basically converts an input audio file to a monophonic FLAC file.
Now I am getting Member has cyclomatic complexity of 21 (105%) message in Visual Studio, while I've taken care of improving it as in the beginning it was longer, now there's not much I can remove from it as it pretty muc... |
I have written this code to search for a string in a .txt file. Is it possible to optimize the code so that it searches for the string in fastest manner possible? Assuming the text file would be a large one (500MB-1GB)
I don't want to use regex.
import java.io.BufferedReader;
import java.io.FileNotFoundException;
impor... |
Is there any way to take this chunk of an else if and make it its own method? I would need the values of valid and throwLine() to be done in the method containing this if else statement, but I'm around 45 lines in my method which is 15 more than I'm allowed to have for simplicity.
else if(isOperator(readIn))
... |
Specification
A simple PHP script resizes images on-the-fly. The script is called by the web server's 404 handler to return a scaled version of the original. For example, if the original image is at:
http://localhost/images/filename.jpg
Then valid requests for scaled versions include:
http://localhost/images/filename-... |
I've created a regular expression (regex) parsing library in C, and would like some feedback on it. Speed is really important to me, but any and all suggestions are acceptable.
#include <ctype.h>
static int regex_matchHere(const char *regex, char *s, int *len);
static int regex_matchGroup(int c, int group);
static in... |
Here is what I'm trying:
Please review the code:
function quicklyChangePageTitle() {
var currentTitle = document.title; // remember original title
document.title = "temp title"; // change to the temporary title
setTimeout(function() { // revert back to original title
document.title = currentTitle;
}, 1);
... |
I'm wondering if it's bad practice to couple my DTO to my domain object like this and pass the object itself into Create(). Is it better to just give the parameters needed to perform the creation?
public static Playlist Create(PlaylistDto playlistDto, IUserManager userManager, IPlaylistManager playlistManager)
{
Pl... |
This is a follow up to the following questions:
RPSLS Game in C#
Ensuring user input is an integer in a range
I haven't made my way to DecideWinner() yet, but that is next on my To-Do List. I would like the majority of the focus to go into what I have done with the rest of the code, but would still enjoy some input on... |
While trying to learn some more C, I decided to implement a linked list and perform a few operations on it.
The first thing I wanted to do was read from a .csv of numbers (ex: 1,2,3,...) and store the numbers in a Linked List.
Once I have the linked list, I want to reverse the linked list and then I want the user to b... |
def uniop_nested(func,o_list):
def inner(i_list):
if isinstance(i_list[0],np.ndarray):
return map(func, i_list)
else:
return map(inner, i_list)
return inner(o_list)
def binop_nested(func, o1, o2):
if not isinstance(o1,np.ndarray):
return [binop_nested(func,... |
I have a WPF/MVVM form that contains sections for managing Recipient Contacts, CC Contacts and BCC Contacts.
Each of the three sections has buttons/ICommands for 'Add', 'Clear', 'Previous' and 'Next' that move through the collection of objects.
I'm trying to work out how I can remove the repeated code.
I wire up the co... |
I created a very basic "image projector" that shows the current one and shows the next on clicking into the image.
And yeah, it works, but I don't think that's a very elegant way to do it. Any advice please?
Bear in mind I'm just starting my JavaScript classes and that's my third assignment, but the teacher is not real... |
Magic numbers are bad... I totally agree. But there's one magic number I find hard to fix:
'100' is a magic number.
Consider this code:
public double getPercent(double rate) {
return rate * 100;
}
public double getRate(double percent) {
return percent / 100;
}
SonarQube will raise 2 violations, one for each... |
This is a very basic script. If the screen width is larger than say a tablet, and a portfolio link is hovered over, it will fade out the original text and replace it with the text held in the 'data-portfolio' attribute. I'm fairly new to jQuery so any improvements will be welcomed.
You can see it working here.
(functio... |
I've written a query to compare the clients in our database with the people in a list that I've received. It needs to check if anyone from the list is one of our clients. I've created a temporary table which has been filled with the names and the query below makes a cross-join with the two tables. That query works very... |
Is there a way I can write this function with less code?
jQuery
function displayError(display, string, xhr) {
var args = arguments;
var $error = $("div#error");
var visible = $error.is(":visible");
if(args.length == 1 && typeof display === "boolean" && display == false) {
if(visible) {
... |
I want to optimize a Perl function which is frequently used in my application. The function creates a special datastructure from the results of DBI::fetchall_arrayref which looks like:
$columns = ['COLNAME_1','COLNAME_2','COLNAME_3']
$rows = [ ['row_1_col_1', 'row_1_col_2', 'row_1_col_3'],
['row_2_col_1... |
I have a strongly typed enum and std::vector of this type.
enum class Colors { red, green, blue };
std::vector v = { Colors::blue, Colors::red };
I trying to output v to standard output via std::copy.
std::copy(v.begin(), v.end(), std::ostream_iterator<Colors>(std::cout, " ");
Compilation failed because compiler do ... |
I am writing an application that uses ASP.NET MVC for its front end, and for the back end, it uses RavenDB to store data. This has so far worked out great, but I am hitting a huge wall with the use of enum in selecting things.
The problem comes with front end interaction. I have many places where I want enums to be sel... |
The following code is used to find the usual_gp(General Practitioner) from gpCollection variable of type TreeMap<Long(Date), SummableMap<String(GPId), Integer(GPCount)>> and store result (usual GP) along with date on usualGPCollection Map.
Does this code follow common best practices? Logic implemented on below code is
... |
I always see comments about how a Unit Test should only be testing one piece of functionality. For the most part, I definitely agree with that assessment. However, I'm working on testing a method right now that has me pondering if being laxer on this ideal would be a better thing, so I'm curious to everyone's opinions.... |
Is this the good way to create a portfolio article in HTML5 or do you have any suggestions?
Not sure about the section but I need it as overlay over the image. Is it better to use a DIV instead?
<article class="three columns remove-all project">
<section class="project-information">
<header>
<h4>Ski Trai... |
I'm in the middle of a project that was built around Microsoft's Message Queue service. During development all of our machines are on a domain and we were able to create a public queue accessible from the server and client.
When moving this to our test server, I discovered that both the test server and production serve... |
My task was to create a menu that displays three items (A,B,C), and has two nav buttons <- and ->. So for example, a menu of (A, B, C, D, E) starts off showing A,B,C and can press -> twice to display C,D,E.
My questions beyond general code review feedback are:
How would you view the "programmer" behind this code in te... |
This is a user login (some session wrapper I managed to put together after a lot of web searching).
It's for a simple CMS I'm trying to build. It only needs one user and there is no need for multiple user log in at the same time. It works, the problem being I think it has safety issues.
It works like this:
The user ... |
I'm trying to login into a webapi2 site from a desktop application. After a lot of googling, I cobbled together a working prototype. Since we are talking about security I wanted to do a peer review. I'm just starting with security design and I'm not exactly sure about my design.
The WebAPI site that is targeted is a w... |
I created my own indexOf function. I was wondering if anyone could help me come up with a way to make it more efficient. I am practicing for interviews so the catch is that I cannot use any String methods. I believe the runtime of this method is O(n2) with space of O(n). Correct me if I am wrong.
Also, I want to ensure... |
I thought I would try and write a solution to the Wolf, Goat and Cabbage problem in Java 8 to try and get to grips with lambdas.
I am looking for any feedback you might provide. The feedback I am looking for is mainly on code structure and where I could make more, or more simple, use of new Java 8 features.
The basic i... |
This is a partial code of my JavaScript app.
The openDoc function's task is:
call newDoc if use uploads a file through fileInput.
Or, when user drag and drop a file in the document.
I want to review my logic and code.
function stopDefault(event) {
event.stopPropagation();
event.preventDefault();
... |
This is my code for running a background thread. I believe it is very poor in naming and code structure.
package com.ocs.socialshare.bloggershare;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.... |
While trying to learn more about linked lists, I thought I should try the exercise of reading two BigInts from an input file and then adding them up. My strategy was to store the two numbers in two different linked lists and then add the entries of the linked lists while traversing through them. I have my implementatio... |
I've seen others use && for conditionally continuing execution in bash, and found it effective but rather ugly. (I'm not sure if there's a better name for this technique.)
do_something && something_else && the_next_thing
Then I found out that you can simply wrap things in parentheses just because you feel like it. (An... |
I want to refactor the following code because I don't feel comfortable about using assignment inside comparison operator. It looks like pretty idiomatic C, but do you think this is a good practice in Java?
private void demoA(BufferedReader reader) throws IOException {
String line = null;
while ((line = reader.r... |
I suppose this is a two-part question. The first part is just a simple implementation of a Binary Tree (BTree), with pre-order, post-order, and in-order searches implemented by default. The second is the AmorphousBTreeCreator(amorphous because the trees sit in a sort of limbo until they are assembled into their final f... |
I've made a function that takes an array of amounts owed by each user_id and works out the best way to square everyone up. The input array would look something like this, but may consist of 1 or more "users" who all owe (or are owed) money between each other:
//the owings should sum to 0.
$owings = array(
1 => -1.7... |
I have a program that gets 5 random dice throws from random.org over and over. In order to avoid doing getaddrinfo() over and over with the exact same data, I moved some of the code to an initialization function (and an unused finalization function).
My issues are:
is this a bad idea?
can bad things happen to the prog... |
I am new to threading and I am a junior developer, so I guess there are many mistakes. My scenario is this:
look into the database
if there are data which should be sent
add the data to the queue
if queue is not empty
send the next message and remove it from the queue
sleep 10 seconds
if a message from another thr... |
The Rapheal script seems to be too long. Is there any option to make it shorter ?
I think loop can make this script smaller. Does anyone have good suggestions or advice?
http://jsfiddle.net/sweetmaanu/Ta8mR/5/
Here is the long script :
var barTitle = { "font-size": 9};
var svgWidth = 480;
var svgHeight = 300;
var saf... |
I get a map from DB called doc1 and I also have the arrayList called someWord. I will find the subscription of doc1 and someWord and store it in doc2. I will also add the intersecting words with zero index in doc2.
This code consumes too much time:
public void setDocuments() {
// Neighbor contain the arrayList of... |
I created an enum for a class and in the constructor I inserted all the enum values into a set. I am wondering if there is a better way anyone can recommend. I feel like there should be, but have been unable to think of one or find one online. I wrote the code in C++ and am using the Boost libraries.
Here is the enu... |
Description of my code:
I am trying to maximize the number of nodes that could be reachable in a graph. Please do not consider my main algorithm, I want it to be like that. The only parts that I need to be boosted are the way of using data structures and reachability. I don't want to change my main algorithm.
I am look... |
I have a working script that selects image fields in all tables and empty their values if the physical file doesnt exist.
$query1 = "SELECT table_name,column_name
FROM information_schema.columns
WHERE table_schema='schemaname' AND column_name like '%image%' or column_name='video'";
$result1 =... |
The following bit of code requires a string.maketrans table that is only used inside a single function.
I have written three versions of the program that place the table at different locations in the code. The differing placement of the table results in quite varying performance in the creation of DNA instances and cal... |
I've been working on a 3D mathematical vector class which should be as streamlined as possible for use in numerical simulations. It will be used to model 3D-physical vectors.
Here, 3D-vector should be taken in mathematical sense, meaning a tuple (a,b,c).
I hoped to design it in a modern and fast way - but one is never ... |
I'm new to Python and I'm wondering is there a way to streamline this clunky code I've written. Maybe a built-in function I've never come across before?
I run through two lists of binary numbers and if the same number appears at the same index in list one and two, do x.
So in the example below the number 1 appears at i... |
Attached is a generic code I wrote to create an Excel file with x number of worksheets.
The problem I am having is that it's pretty slow, like 5 seconds a sheet. It was my understanding that using a for loop when creating the tables was ideal, but the issue seems to be with tables containing over a thousand or so recor... |
I'm working with AutoFac to do some DI. I think I've got a decent grip on things, but just ran into a question I had with my code and thought I'd check:
public class AutofacRegistrations
{
public static void RegisterAndSetResolver()
{
// Create the container builder.
var containerBuilder = new C... |
I wrote a service object that emails a list of files to a list of email addresses.
I am unsure about my emails method. It splits a string into an array of emails. It then loops over the array and rejects any elements that do not match the email regex. The return value is an array of valid emails stripped of whitespace.... |
I wrote a couple reviews for this CR post. In my most recent review, I refactored @Malachi 's code to fit OO design. I'm looking for any advice/hints/criticisms on it.
A review is welcome for both the OO design I implemented and the `main() method which is a bit sloppy.
Here is the entire dump:
using System;
using Syst... |
I was using setTimeouts for a project where a callback will be called after a duration, but the user has the options of extending, pausing or stopping the timeout. I felt using the default setTimeout was a bit clunky, especially since I needed to remember the timeout ids, and I decided to create a timeout utility objec... |
I know there is a simpler way of doing this, but I just really can't think of it right now. Can you please help me out?
String sample = "hello world";
char arraysample[] = sample.toCharArray();
int length = sample.length();
//count the number of each letter in the string
int acount = 0;
int bcount = 0;
int ccount = 0;... |
I'm writing a simple remote PC app (mouse-keyboard). Android is client and is connect with WiFi to Java PC Server. I'm using TCP but I see a bit of latency compared to other remote apps. Then I used UDP and didn't see any latency or wrong data. UDP look like it's working well. I'm sending a String to Server like these... |
I've got the following code to find the shortest path between two nodes using almost-Dijkstra's-algorithm which was written for an exercise, and I'm looking for things to improve my general Scala style. What I currently have:
object Graphs {
case class Node[T](value : T)
case class Edge[T](from : Node[T], to ... |
Here is my implementation of a simple 3 rotor Enigma machine in C++:
#include <iostream>
#include <cstring>
using namespace std;
char alpha[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char rotors[3][27] =
{
"EKMFLGDQVZNTOWYHXUSPAIBRCJ",
"AJDKSIRUXBLHWTMCQGZNPYFVOE",
"BDFHJLCPRTXVZNYEIWGAKMUSQO"
};
char reflector[] = "YRU... |
Can someone please let me know if they see glaring issues with this code? I tested a handful of cases and it seems to work but in other threads. I often see much more concisely written versions of this. I just want to know if anything I have done is superfluous or just stylistically poor form.
#include <stdio.h>
int... |
I have a situation where I need to store fields of differing types of some data structures along with some similar metadata (The application takes data from one of many sources, some data possibly coming from more than one source, and then does stuff with it).
The solution I came up with was to create a class that woul... |
I have a requirement to validate file names related to architecture after they are uploaded. Once they have been uploaded I must warn the user if the file name is not standards compliant.
What's in a name
To be standards compliant a file name must consist of 7 parts after the extension is removed from the name, and:
p... |
I am trying to create a method that reverses a string that will handle every case. So far the cases I have come up with are
""
"abcdef"
"abbbba"
null
I haven't been able to handle these conditions however
escape characters
"\n"
"\t"
Not sure how to make \n or \t into a string
special characters such as
áe
code:
publ... |
I have written a system for handling the dispatch of events between objects. (I need this functionality for a larger project I am working on. Objects should be able to dispatch events without knowing anything about the objects that will receive them. If this indicates that there is something seriously wrong with my lar... |
I have a generic extension method for validating my entities. The main idea is to be able to specify at runtime (context related) the criteria for validating a specific entity (with the end goal of saving it in the data base).
public static Boolean IsValidEntity<T>(this T entity, List<Predicate<T>> predicates)
{
Bo... |
I am refining my reliable UDP library, its at its 3rd iteration now. It is quiet a bit multi-threaded with almost all major operations having dedicated threads. I need your opinion on the following critical worker methods.
Legend
TAgUDP : Indy UDP Server derived class.
TAgUDPPeer : Class containing a pee... |
I'm using the Game of Life Kata to help me learn JavaScript. I've picked up the syntax through Codecademy tutorials, but my current skill level is Novice.
The example code has working functionality for initialising a World with live cells and asking it to 'tick'.
All suggestions for improvement are welcome. I'd especia... |
I am building a backend to a mobile application that will be hosted on a Django site connected to a PostgreSQL database.
I have never built anything to accomplish this before and this is my first go at it. I have not studied this type of application before so please let me know if the below code follows best practices... |
When running Code Analysis on my project I get the following warning:
CA2202 : Microsoft.Usage : Object 'fs' can be disposed more than once in method
I don't see the problem, and the code compiles fine and produces the expected results in all test cases.
If I remove the fs.Dispose(); statement then Code Analysis ins... |
I am relatively new to Perl and would like to check that the code I am writing docent have any major flaws in it or any bad practices.
This is a fairly simple sub but one that gets used often. Seems to work OK. Simply reads a text file that has parameters in it set by the user.
Config.txt
#cucm username and password of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.