instruction stringlengths 71 71.9k |
|---|
I am just starting out in my Clojure journey and I wonder if anybody can point out my beginners mistakes in my function below that simply reverses a list. I know that there is already a reverse function so this is purely for learning.
(defn rev
([l]
(if (= (count l) 1) l (rev '() l)))
([l orig]
(if (= (count... |
I had written a solution for Project Euler problem 18 in Python 3. It is good in its efficiency but the problem is the readability and I think reuse.
The algorithm used is that at every iteration the maximum for all numbers in a row is calculated starting from the top and going down to find the largest path.
#This fun... |
I created a singleton class for managing sound effects on Android. This class will only be instanced and loaded once at the beginning, and each activity will use the loaded songs.
I don't know either if this is the good approach for Singleton, nor if this is the good way to play sounds in Android. This is working like ... |
I am going on with refactoring my code base while migrating from Python 2 to Python 3. I am using generators to make reusable components this time as I am more comfortable with them this time then last time. But there are times when I am stuck at their use. Like below example. These two are essentially same with one in... |
I implemented the atoi() function! Here is my code:
int my_atoi(char* pointer)
{
int result = 0;
char* pointer1;
multiplier = 1;
char sign = 1;
if(*pointer == '-')
sign =- 1;
pointer1 = pointer;
while(*pointer != '\0')
{
if(*pointer >= '0' && *pointer <= '9')
... |
Find the element the occurs more than \$\dfrac{n}{2}\$ times in an input array, where \$n\$ is input array length.
I'm looking for code review, optimizations and best practices.
public final class VotingAlgorithm {
// non-instantiable.
private VotingAlgorithm() {}
/**
* Returns the number which ... |
Is this the right way? Any comments on the hash functions? If asked a question like this in an interview, do I need to follow all OOP concepts(because I am using Java)? Like encapsulating the variables by writing getter and setter functions?
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.... |
I put together this Ruby script (1.9.3) to load data into MySQL from many .xlsx files that contain data entered by people. These files typically have many illegal characters and it has been difficult to handle the different errors. I have tried multiple rescue and character escaping approaches but now this method is no... |
My goal is to make File_Path_Handler constructor the only thing a user can access. Oh, is it too coupled? but the main question is: is File_Path_Handler the only accessible part of this package?
The handler:
package file_path_handler;
//| File_Path_Handler
//| - a component that lets the user pick a file,
//| ... |
Task:
Given comma_separated.txt file with string:
1,2,3,4,5,6,7,8,9,10,11,12...,n
Calculate the average value.
For example: 1,2,3 should be equal 2 (float) as result.
Here is my solution in C:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int element_counter;
float* all_elements;
void mark_element_a... |
System I'm building has Users and Articles. Users can upvote/downvote Articles and cancel their votes if they want to. Each vote changes article's score. Score equals to sum of all vote values together.
So I created three models: User, Article, ArticleVote. Even though the most natural way for me would be to be able to... |
If I was at an interview, and wrote this code, what would you think? Please be brutal.
Time it took to wrote it: 13 minutes
Problem:
Write an efficient algorithm that searches for a value in an m x n
matrix. This matrix has the following properties:
Integers in each row are sorted from left to right. The first integer... |
I am doing a project for school and had to create a function to check if 2 time ranges overlap. I searched the net a bit but failed to find a simple function to do that. I played around a bit with my code and I think I created a working one.
Note: it works for 24 hour times only & don't forget the 0 in front of AM time... |
I wrote a package manager in clojure that does 5 things:
depend a b //creates a and b (if they don't exist) and adds dependency on a
install a //installs a and its dependencies
list //prints out the install packages
sys //prints out all packages
remove or uninstall packages and dependencies that are no longer needed.... |
This is all in one methods but I would like to see it in individual separate methods. The code works fine but all of the code is in the canvasApp() methods and I would like to see it all in individual methods so that I could call them as below.
Question: How to make all of the code into separate function?
canvasApp();
... |
Solution to bounded knapsack 01 problem. Once again comprehensive description is difficult in this space, refer here. Looking for code review. optimizations and best practices.
final class Item {
private final int value;
private final int weight;
public Item (int value, int weight) {
if (value == 0... |
Counterfactual Regret Minimization is an algorithm that can be used to find the Nash Equilibrium for games of incomplete information. I have tried to adapt the exercise from here to Clojure. You can see the original RPSTrainer.java, my first functional version of the algorithm rps.clj and finally a version that I trie... |
I have a modal window that needs to be closed, obviously. I've created this piece of code that works okay. But is there a way to optimize it?
// close the modal window
$('.modal-close').click(function(e) {
$('#modal').hide();
$('#modal-overlay').hide();
e.preventDefault();
});
$(document).keydown(... |
I am trying to solve this Binary tree lever order traversal:
Given binary tree {3,9,20,#,#,15,7},
3
/ \
9 20
/ \
15 7
return its bottom-up level order traversal as:
[
[15,7]
[9,20],
[3],
]
How can I improve the speed of the code below? It always gives me a time exceed error.
/**
* Definiti... |
I have datalayer code as below which is implementing an interface as:
Note: I have hand written this code on Notepad so it may contain some typo errors, which you can gracefully ignore. I am searching for an approach here.
public interface ISimpleInterface{
void DosSomething(long someValue);
}
public class Concr... |
Could someone help me on how to eliminate some nested blocks or improve this code? I am concerned this will slow down my site dramatically.
function dispalyEvent($weekNr, $week, $year){
echo "<p>";
$gendate = new DateTime();
$gendate->setISODate($year,$week,$weekNr);
$event_query = mysql_query("SELECT... |
I am using using the following code to choose the transport layer security protocol while issuing a request to server. Could someone please review it.
This is in reference to the following question:
https://stackoverflow.com/questions/22657498/i-want-to-choose-the-transport-layer-security-protocol-in-urllib2
import ssl... |
In an effort to teach myself some python and programming in general I made a Sudoku Solver (as many others have done before me from what I can tell). The one thing that bugs me a little is my use of deepcopy which I think I can avoid by implementing __eq__ in my classes.
My questions:
Is this understanable?
How Python... |
I have implemented a HTML table sorting. I actually implemented a sort first using jQuery and then modified it based on the answer to this question for performance as I had done the same mistake. My question is how to make sure if the code I have written is stable or not?
I know that the stability of sorting depends on... |
This snippet from a downloader callable handles HTTP status codes. I need critique on both the style (for or do-while loop better here?) and functionality. Should I manage the delay differently? Do I need to handle InterruptedException specifically?
HttpURLConnection connection = null;
boolean connected=false;
outer:
f... |
I have a class used to return a single integer, but think there is room for improvement. The class should only return a single row every time and if no row is found it might be a good idea to throw an error from the class rather than from the calling code which will break when the integer comes back as zero.
The functi... |
I wrote a BFS implementation that walks a tile-based field. It takes a function that should return true for walkable tiles and false for walls. It also takes the start and end points. It currently takes about 5 seconds to find the shortest path from (0, 0) to (1000, 1000) which isn't bad, but it really isn't great.
imp... |
We have an entity data model (database first) for a legacy product we are migrating to .Net from Delphi. We recently deployed to a server where some of the tables had been modified and columns deleted. The results were catastrophic. I'm working on a way of validating the EDM schema against the live SQL server database.... |
I'm writing a program that will perform a long-running computation, gradually improving a solution. On top of that, there's a simple UI that basically allows the user to stop the computation (letting the worker finish a step it's working on) and shows the best solution.
Here's a simplified version of what I have, I'm u... |
How can I make the following code shorter or efficient (maybe with other loops or other nice ideas), and keep the current functionality?
my $examine = shift; my $detect = 0;
foreach my $ProteinDB (@DB) {
my $Set = $ProteinDB->{'ID'};
if($Set =~ /$examine/) {
$detect = 1;
my @Pointer = keys(%$Pr... |
To solve a polynomial equation I have written following program, is there any way to optimize this program.
Following code is working code:
Program takes input n,x where n is the deg of polynomial and x is the point at which the polynomial is to be evaluated.
#include<stdio.h>
int power(int x, int y);
int ma... |
I am trying to step to the next level from student to amateur web developer, and I would like to make sure I am not making any web-development no-no's, that's all. What caused me to want to ask SO this question is that I had to make some tweaks to make my responsive design work.
For instance, I had to make a lot of my ... |
Problem Statement
Generate as many distinct primes P such that reverse (P) is also prime
and is not equal to P.
Output:
Print per line one integer( ≤ 1015 ). Don't print more than
106 integers in all.
Scoring:
Let N = correct outputs. M= incorrect outputs. Your score
will be max(0,N-M).
Note: Only one of P a... |
I used a standard calculator design from Java. I wanted to expand it so I created a class to create buttons for different operations, like +, -, *, /. The original program didn't do this, they just made them individually without a template method. Do you think I should do it like this?
//The java Template Calculator ... |
if($row['best']){
$id = $row['best'];
} elseif($row['average']){
$id = $row['average'];
} elseif($row['bad']){
$id = $row['bad'];
}
If row['best'] is null, I need $id to equal the 2nd best. If 2nd best is null, $id is equal to the next best.
|
This is my function returning matrices from Matlab. This code run very slowly.
I was trying to use Parallel.For in-order to run it in parallel threads but I got different results than running it on one thread.
Am I iterating the matrix in a wrong order? Row, col vs col, row?
Can you please review this code any sugge... |
I recently added a feature to my application to serve arbitrary markdown documents from a directory. This is designed to allow authors to populate a folder full of help documents, and be able to view them without any code changes. However, because this is an MVC application, I needed a few extra features. Straight to i... |
I need to create variable-length strings of dots/periods/full-stops to add to some text content, in a way that is similar to a formatted table-of-contents:
Chapter 1 .................................... 1
Section 1.1 ................................ 1
Subsection 1.1.2 .......................... 12
I know that thin... |
I'm looking for some feedback on my implementation of the algorithm. How can I improve it? I ran into problems when calculating the larger prime numbers > 46349 due to integer overflow, but fixed that by using sqrt instead of pow.
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int number;
... |
I have been using this code for a while for a project at work. Actually I got it from a friends who got it from a book. But either way it worked for my demonstration.
But the other night I decided to sit down and see if I could make it into all functions and then to see about moving the variables up to the top of each ... |
Please let me know your thoughts on the code below, please be brutal. Here is the question I solved:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given binary tree {3,9,20,#,#,15,7},... |
A brief background:
I'm working on a game prototype for a simple strategy game. After I created a number of possible jobs I wanted to create something to manage them. This is the first time I've attempted something like this so code review would be helpful.
I created a set of methods that adds Jobs to a Job Queue and... |
This question is a follow-up to a previous version of this program, which I wrote because I found it annoying that VLC Media Player (which I love) prevents the screensaver from starting after playback of media has ended on my Ubuntu 12.04 system.
There have been several changes which are listed in the comments at the t... |
When a user presses a key in my game, their avatar can move down, left, right or up. By move, I mean their avatar animates while various other things move around them on the screen. This is accomplished by raising an event from the InputHandler class.
public class InputHandler
{
public delegate void ActionListener(... |
This is my code for a server using EAP (Sockets).
Is AsyncOperation.Post the right way to raise thread safe events?
AsyncOperation.Post states:
Invokes a delegate on the thread or context appropriate for the application model.
Is there any other mistake in the code (i.e something that can be improved or is a bad thi... |
I'm trying to write a JavaScript library to allow inheritance with knockout.
The fundamental problem when implementing inheritance in Knockout is that each Knockout observable is its own instance, thus if you try this:
x = function () {};
x.prototype.m = ko.observable();
y = function () {};
y.prototype = new x();
... |
I am working on a project involving the unique partitioning of integers. I.e. I am looking to have all of the partitions of n = x1 + x2 + x3 + ... + xk, where xi = xj implies i = j.
For example, if I give my code input of 10, I want to have as output (in an ArrayList<ArrayList<BigInteger>>) the following:
[[1, 2, 3, 4]... |
Given an expression string exp, write a program to examine whether the
pairs and the orders of
"{","}","(",")","[","]"
are correct in exp.
For example, the program should print true for
exp = "[()]{}{[()()]()}"
and false for
exp = "[(])"
Complexity:
Time complexity: O(n) where n is length of the string
Space co... |
As suggested in The 2nd Monitor, I'd like a review of this in-place reversal of a singly linked-list:
#include <iostream>
struct node {
int data;
node *next;
};
node *reverse(node *list) {
node *prev = NULL;
node *next;
while (list) {
next = list->next;
list->next = prev;
... |
I've created a linked list class in Python, but I'm not sure how to enforce only passing Node objects into the insert routine.
# linked list in Python
class Node:
"""linked list node"""
def __init__(self, data):
self.next = None
self.data = data
def insert(self, n):
n.next = self.ne... |
first let me explain what I am trying to achieve here :
I am supposed to compute some results, using data from several tables, filtered by a run_id.
One of these tables has about 500.000 rows per run_id, and 60 columns.
All other tables have only a few thousand rows per run_id.
I also have to write about 500.000 rows o... |
Before I go too far, does this look right?
This is mostly to have a "central" place that hold a "hierarchical/structured" errors message.
public static class ValidationError
{
static ValidationError()
{
Prefix = "VE";
Notice = new _Notice();
Exporter = new _Exporter();
Importer =... |
I was thinking about how to implement a GPS navigation for my quadcopter. I was writing some functions to calculate the angle between two positions (from home point to the target).
I'd like a review of this code. I am not very sure whether I was calculating the geographic position right.
/*
* Geographic calculations... |
This code connects to a mongodb database and returns collection objects. I am concerned about the exception handling, variable names and comments.
import config_files
import tweepy
import csv
import warnings
import importlib
import sys
from MongodbConnections import MongodbConnection... |
Is my approach good to naming variables and exception handling? I would like to make this code more robust and maintainable. I need advice on exception handling, var naming and comments.
import config_files
import math
"""
Performs logistic regression on tweets object passed and returns followback pred... |
public class AnagramNumber {
public static void checkAnagram(String[] str)
{
String[] sortedArray=new String[str.length];
for(int i=0;i<str.length;i++)
{
char[] strToCharArray=str[i].toCharArray();
sortedArray[i]=new String(sortCharArray(strToCharArray));
}
... |
I have a form that posts (a,b) values into the following .php file, and displays an error message when the user tries to reach the .php file directly, instead via POST request.
This code is probably pretty messy, for example, I'm not sure I can post <p> tags right away, instead of having them inside the <html> tags, bu... |
Is there anything horribly wrong with creating different representations of data behind the scenes when constructing a std::vector<T> from a std::vector<U>?
std::vector<Color> initialScene(Settings::HRes * Settings::VRes);
std::vector<Pixel> finalScene(std::begin(initialScene), std::end(initialScene));
With the Pixel... |
In my current project, I find myself using Dispatcher.Invoke a lot. Before each call I test if the current dispatcher is the right one. I want to write a wrapper class like so:
class SafeRunner
{
//From the thread we always need to run on
public static System.Windows.Threading.Dispatcher disp;
public stati... |
Please review my code for bearer token (JWT) authentication of Web API 2 (Self Hosted using OWIN)
Are there any security issues in the implementation?
Quick overview:
Token creation and validation using JWT Handler
Symmetric key encryption
CORS support not yet checked for the authorization header
Web traffic will be o... |
I need to delete a file when an error occurs during loading it. It is not allowed to perform async operations in a catch block.
This has lead me to writing the following code:
public async Task LoadFromStorageFile(string fileName)
{
StorageFile file = null;
Exception ex1 = null;
... |
I have been developing a small application for a client which combines two arrays together and then creates a URL and then loads the images on the same page from the given URL.
I'd like you to look at my code and give feedback on how to make it more maintainable and robust.
function displayContent() {
document.getE... |
How can I get Monday and Friday from a date range (start and end date)?
Example:
startdate - 03/24/2014
enddate - 04/01/2014
Result should be:
Monday - 2
Friday - 2
I tried this code:
Monday = CountDays(DayOfWeek.Monday, startDate, endDate);
Friday = CountDays(DayOfWeek.Friday, startDate, endDate);
static int Coun... |
Given an expression string exp, write a program to examine whether the
pairs and the orders of
"{","}","(",")","[","]"
are correct in exp.
For example, the program should print true for
exp = "[()]{}{[()()]()}"
and false for
exp = "[(])"
Complexity:
Time complexity: \$O(n)\$ where \$n\$ is length of string
Spac... |
For my own linked list implementation, I've decided to try something different: a linked list of groceries.
The main differences between this implementation and a standard list are:
more data fields (name, quantity, if item has been purchased)
two size data members (different items and total items)
depending on quanti... |
http://crystalcleanhomes.com/slide/
There are countless scripts that perform this simple slide-out navigation menu but they are all so bloated and the styles are so convoluted that I decided to make my own and it seems almost too simple and too basic so I've come here for criticism. From my testing it even works in IE7... |
I'm looking for a more cleaner and simpler solution to auto-format a text-box field intended only for the user to enter their college Grade Point Average (GPA). Here is my code:
<label for="collegeGPA">GPA:</label>
<input type="text" name="collegeGPA" id="collegeGPA" maxlength="4" style="width:45px;">
<script type="te... |
Here is another example of a moving ball. I would like to see how to make it more efficient and better. I think that moving the variables to the top of the function would be better but then I tried this and it would not work as good as it did.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CH5EX... |
Inspired by all of the lovely linked lists lately, I decided to implement one in assembly language. This code maintains two linked lists - one is a free store and the other is the active linked list. Rather than allocating memory whenever a new node is needed, the Node is pulled from the free list and all of the poin... |
I wrote a stack implementation using a singly linked list in x86_64 assembly. This stack supports the usual push/pop operations as well as first/next for iterating over each element.
I'm looking for general feedback.
Here are the stack subroutines:
; Stack Structure
; Pointer Head
; Pointer Current
; Stack Node
; ... |
Given ( and ) and length of 4, generate the following combinations -
()() and (()).
Looking for code review, optimizations and best practices. Also verifying complexity to be O(2(n+1) - 1), where n is half the 'input length'.
public final class BraceCombinations {
private BraceCombinations() {}
/**
... |
I just wrote this pool to avoid calling malloc and free when I have some code that frequently allocates and deallocates chunks of same-sized memory. I would like to know if there are any bugs I didn't notice and what would be the best solution to achieve this goal.
I'm using some small functions that aren't really requ... |
I wonder if there are some possible ways to simplify my code.
startDate = '04/02/2014'
endDate = '04/06/2014'
mondayTag = 0
tuesdayTag = 0
wednesdayTag = 1
thursdayTag = 0
fridayTag = 1
saturdayTag = 0
sundayTag = 0
public int GetRemainingDays(DateTime startDate, DateTime endDate, bool mondayTag, bool tuesdayTag, bo... |
Here is the code as it stands right now:
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
from random import randint
arraySize = 50
Z = np.array([[randint(0, 1) for x in range(arraySize)] for y in range(arraySize)])
def computeNeighbours(Z):
rows, cols = len(Z), len(Z[0])
... |
Writing a MMORPG server in nodejs, I have to handle packets. These packets have a structure of
<length> <id> <data>
So what I did was use a node package called packet
And first get the packet id:
client.on('data', function(data) {
parser.extract("l16 => length, l16 => id", function (packet) {
if (packet.id === ... |
I was asked to answer the following question before setting up a phone interview, but they said my code wasn't detailed enough.
Question:
Without using any of the .NET Collection or Linq libraries (i.e.
without using List), implement a ListOfStrings object that
contains a set of strings. This object has the follow... |
Recursive version. The only interesting function:
List& List::reverse()
{
if (empty())
{ return *this;
}
int val = head();
//
// The fun bit.
// See if you can figure this bit out.
return pop().reverse().ap... |
I implemented K-Nearest Neighbours algorithm, but my experience using MATLAB is lacking. I need you to check the small portion of code and tell me what can be improved or modified. I hope it is a correct implementation of the algorithm.
function test_data = knn(test_data, tr_data,k)
numoftestdata = size(test_data,1);... |
I just read the Lib/argparse.py code (class FileType) on http://hg.python.org/cpython/file/default/Lib/argparse.py. File objects are opened without the with statement. For safe file opening/closing, should I instead encapsulate my argparse.ArgumentParser() in a contextlib stack like below? I feel very stupid for asking... |
I'm coding a little class hierarchy printing tool for easy show hierarchies of java classes.
This is my current code:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
imp... |
public class SudokuChecker{
static int[][] sMatrix={
{5,3,4,6,7,8,9,1,2},
{6,7,2,1,9,5,3,4,8},
{1,9,8,3,4,2,5,6,7},
{8,5,9,7,6,1,4,2,3},
{4,2,6,8,5,3,7,9,1},
{7,1,3,9,2,4,8,5,6},
... |
I'm a beginner and I only know limited amounts such as if, while, do while. So I'm here to check if I'm coding with best practise and the most effective methods to my current knowledge.
import java.util.Scanner;
public class SixtyTwo {
public static void main(String[] args) {
Scanner keyboard = new ... |
I needed a script for working out billing dates over a period of time. The date should be the same day every month however if the billing date starts on a date that doesn't exist in another month, then it should be on the last day of that month. This rules out the DateTimeInterval Object, because that causes months to... |
Please review my code and let me know how I can possibly improve it.
#include<iostream>
using namespace std;
class node
{
private:
int data;
public:
node *next;
node(int element)
{
data=element;
... |
I'm in a beginner JavaScript class and I feel like I have a pretty good grasp on all the intro material. All of my homework assignments work but they seem longer than they have to be, especially my most recent one. I'm not asking for answers to my homework as it is already complete (you can see the code works below) bu... |
I just got into Object Oriented Programming, and it made me think about certain code how I can make them as efficient as possible.
Right now I am just including my header and footer like the following:
PHP
require_once 'core/init.php';
require_once 'includes/header.php';
//Big block of content goes here
require_once... |
The purpose of the below code is to update a column based on the name of the field name sent from the .NET code. This allows one piece of code to handle multiple rows when a user is only adding/updating one at a time.
I have been using Stored Procedures for a while but normally just Add/Update but not using variable fi... |
This is a form generator I created so users can input a URL, description and link. The output will eventually be a JavaScript news slider. The HTML the form generated is irrelevant for now but I'd like to see how I can improve the JavaScript code handing the processing.
This is my first version/draft.
<style>
body{
... |
I've borrowed and written the following code to output the disconnect time. All works well but I'm curious as to how I could tighten/ shorten the code. If anyone feels like having some fun then I'd love to see what can be done. Be a learning lesson for me.
Excerpt of input:
ftp> !:--- FTP commands below here ---
ftp> l... |
This is my code which receives a file to read and converts binary values to ASCII text.
The code works fine, so I am looking for a review on what I have written, and suggestions on how I could do it better, perhaps without the use of a StringBuffer.
import java.io.File;
import java.util.Scanner;
/**
*
* @author Tump... |
I was asked to create a test APK file by a company HR when I applied for an Android developers job,
Specification:
The goal is to develop a simple application which finds the local
restaurants. The application will contain 2 screens:
A list of nearby restaurants within 1 mile radius A map that shows the
restaurant... |
The following is some code I just wrote. I keep wondering as always what I can do to make this more efficient. Please help me make this code object oriented and if anyone could help me write automated or even non automated tests for my widget...
Also is this considered a closure? I don't think it is but I would love ... |
I'm on chapter 7 of Chris Pine's book, trying to work on the last exercise in that chapter. This code works fine, but I'm wondering if there is a better way to do this...
toc_array = ['Table of Contents', 'Chapter 1: Numbers', 'page 1', 'Chapter 2: Letters', 'page 72', 'Chapter 3: Variables', 'page 118']
linewidth... |
I've currently got a MSSQL stored procedure that uses multiple SQL functions to achieve a number of returns. Now I've been told about using sets rather than functions as it creates " bad code smell of a DBA who is not yet thinking in sets" Original Link
I'd like to better my code and love to know what sets are. So belo... |
I have spent a few hours on this code, but think it could be improved a bit. It requires eSpeak to be installed to run the speech synthesis, but the voice can be toggled on or off using the togglevoice command. This was created for Python 2.7.3.
My major concerns are the fluctuations of the use of global to define glob... |
I am a high school intern, and I am trying to parse my mentor's code so that he can read in an XML file and call simple methods to edit or get information from his XML file.
I was hoping someone could provide me with some (any) feedback - ways to optimize the code perhaps?
The XML file that my mentor uses is: (It's n... |
I'm trying to implement interfaces in my design but not sure if this is correct or if there is a better way to do it.
What I need to do is
open a text file
keep searching blocks of text until I find a string that matches against one of the classes that defines that string pattern
process the string I found
continue p... |
I've built this small jQuery plugin to work with HTML5 History State functions. It's my first jQuery plugin, so I'm not sure if it's up to the best practices, or what could be done better. Keeping it simple and small is my main concern.
If you have any suggestions on how to improve it, I'd love to see them.
// FunkyHis... |
I wrote this script for a code challenge on TreeHouse. I already submitted my code, but I am looking for an after the fact feedback.
The challenge was to open a file of text, remove specific words (provided in another file) and do the following:
Output to the screen in a readable fashion
1. total word count after fi... |
I have a GUI that contains a Table Object (for displaying columns of data) and a Table Model. The Table Object contains the Table Model.
Is it better to store the Table Model as a object in the User interface or de-reference it as needed? Is there any performance gain keeping it separate? If there is, is it a good d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.