instruction
stringlengths
71
71.9k
I was working on a program that simulates the Buffon's Needle experiment. If anyone is not familiar with it, a Wiki link is provided - Buffons's Needle The point of Buffon's experiment is to find the value of pi, or at least approximate it. Usually you draw a couple of lines and then you scatter pins around the board ...
Is there anything I can improve in my UserManager class which saves and loads info about users connected to my server? import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException...
I am working on a site where I need to be able to accommodate frequent flyers but I am not so good at user interface design when I am given such a long leash. I am using ASP.NET (I am restricted by not being able to use MVC), I like the idea of using BootStrap but I am not familiar with it, and it's been a while sinc...
I like to create scripts that are clear as to what they do, I like comment, and use data- * in HTML to define what each component is. I created a script that creates a dropdown, that I can open and close. The result: /*! * Script needed to control the dropdown with the heading options in the new e-mail page * */ '...
Update: Simple Blackjack implementation I was playing Blackjack in a phone app and decided to try to do the game in Java, using the console for a start. So far I'd like to review the deck of cards implementation. I decided to use an OOP approach with the classes Value, Suit, Card and Deck. First of all, I'd like to get...
I wrote a simple JS app to generate passwords. I read up on some of the commenting standards for JS, and started reading the book Clean Code. I am not sure if I am writing the return statements correctly for some of my conditional test functions (e.g. hasAtLeastOne). I also tried to make my variable names semantic. ...
I am converting natural math expressions with fractions to Latex code. What I have done seems to work on examples I've tested, but I'm not sure if the algorithm is safe. And maybe the string part could be improved. Maybe a better approach could be replace the / from left to right, but how in my case target the next? B...
This is my implementation of Bitonic Tour (simplification of the Traveling Salesman Problem). Tests are not done very well, but it is not the point. I would be particularly interested in the comments on architecture and performance. NEW VERSION import math # see https://en.wikipedia.org/wiki/Bitonic_tour for the statem...
I'm pretty sure my code is mostly correct. I think I'm having formatting errors more than anything. I keep receiving warnings about "double to float and int to float,possible loss of data. Here is what I am trying to accomplish exactly. Write a function that accepts a pointer to a C- string as an argument and ca...
This is a graphical Tic Tac Toe game by using SFML cross-platform library. It seems to work fine. I'm actually new to SFML and making GUIs. If anyone is familiar with SFML, I'd appreciate some pointers on how to improve it. #include <SFML/Graphics.hpp> #include <iostream> #include <string> #include <vector> #include <a...
This is quite plain vanilla, but I'm hoping for Objective-C specific feedback. Also I'd be interested in what folks think about sorting in Objective-C vs. doing all sorting in C or C++ (and which?) even in an app. - (NSMutableArray *) quickSort: (NSMutableArray *)toSort{ for(NSNumber *arrayMember in toSort){ ...
The code below doesn't seem right to me. The scenario is: User enters in a "quantity" into a form field. If the user enters in 5, the loop below should iterate 5 times. There should now be 5 new entries in the database with the container.product and container.status. Any advice on making this cleaner? var container...
I've created two methods in a class that allow me to download the contents of an FTP folder and if specified then delete them. Although the code operates as intended I think it's vastly bloated and I'm looking for direction on how to correct it. Of note I believe that there's far too many FTP connections opened in a s...
I'm working on a warning system for my game. I want to display an arrow on the screen where the object is going to be coming from. Here is an image of what I have in mind: The object will spawn from outside the screen and start making its way to the screen. The code that I have created works, but it looks terrible. Ho...
This is a HackerEarth Challenge Problem. Question: Puchi hates to carry luggage, but unfortunately he got a job to carry the luggage of his N friends in office. Each day, one of his N friends, gives him the luggage of a particular weight to carry. You will be given the weight of luggage of each friend in the a...
I have implemented a binary search tree with the methods search, insert, and delete. I want to know if this is the best way to code them or if there are any other way by which I can reduce the code size or redundancies in code, if any. #include <bits/stdc++.h> using namespace std; struct node{ int val; node* l...
Building linked list abstraction using class 'list' data model. ################## # Linked List # ################## #Representation - start empty = 'empty' def is_link(s): """ s is a linked list if it is empty or a (first, rest) pair.""" return s == empty or (isinstance(s, list) and len(s) == 2 and is_l...
I wanted to come up with a 'utility' context to enable testing of the file system with behat. Specifically this is aimed at helping with the behavioral testing of php command line applications that work with the file system, or use a configuration file. I'd love for the whole repository to get a review, which has the c...
I am developing a service application that would implement a peer to peer messaging system. I am wondering if my following code is the best approach. It works, but I am naive and it would be nice to have validation from experts for performance and reliability. There would be about 5 plugins and a large number of messag...
I have a problem set which requires me to print all the multiples of a number in given range in reverse order. So far I have tried this but not sure it is optimized or not! #import <objc/objc.h> #import <objc/Object.h> @implementation TestObj int main() { int limit = 0; int divisor = 5; printf("enter a nu...
Recently I have found in my code several places where I was first gathering some solutions, and then continued processing them only if the solution was unique (solution collection contained only one element). Following code is an attempt to solve this in a more functional manner. implicit class GetOnlyOne[A](val coll...
This is working C++ code for Tic-Tac-Toe (even not using arrays): #include "stdafx.h" #include <iostream> using namespace std; using namespace System; int Decider(char a, char b, char c, char d, char e, char f, char g, char h, char i, int p); int Win(char a, char b, char c, char d, char e, char f, char g, char h, cha...
An implementation of BlockingQueue import java.util.LinkedList; import java.util.List; public class MyBlockingQueue<T> { List<T> queue = new LinkedList<T>(); private int limit = 0; public MyBlockingQueue(int limit) { this.limit = limit; } public synchronized void enqueue(T item) throws In...
An implementation of a ReentrantLock: public class ReentrantLock { private boolean isLocked = false; private Thread lockedBy = null; private int lockCount = 0; public synchronized void lock() throws InterruptedException{ while(isLocked && Thread.currentThread() != lockedBy){ this.wa...
I'm looking to make some improvements to a deliberately crude API written in PHP, it's designed to handle simple requests and talk to the DB. I have the following DB class: class DB { public function connect() { $serverName = "."; $connectionInfo = array("Database"=>"Demo","UID"=>"sa","PWD"=>"qw...
This is my first script in Python, and I am looking for tips and constructive criticism about code style, whether there are more efficient ways of doing things, etc. (not as interested in tips about the method, more so the actual code). Method: Choose random no. blocks (between 2 & 6) Decide whether to start vowel or...
I used saxon v9 to profile an XSL transformation which converts XML to JSON. The profiler tells me that the function which escapes certain characters takes about 70% of the total processing time. The conversion is important because otherwise the created JSON file will be invalid because of characters that break the str...
I have the following code which has too many loops inside it (almost 13 billion). This code is actually for image processing. I am first making a matrix of dimension 1024*360. This is the value of the projection data given to me. f is my image in the polar coordinate. The first loop gives me f in the polar-coordinate. ...
I have to measure execution time of certain sorting algorithms being passed as functions in following program. I also do not have to measure it on random container but also on ascending as well as descending sorted containers. Header file: #include <iostream> #include <vector> #include <chrono> #include <random> #inclu...
On page load, this script will locate all external links, and set their on click to open the page in a new window. "External links" includes pages that are on a different domain, PDF's on any domain, and any links with the class open-new. When a PDF is clicked, it also pings Google Analytics. This is using only pure Ja...
A question on Stack Overflow had me look up the article on bogosort on Wikipedia. There they describe the bogosort algorithm and the bogobogosort algorithm. They say, about this last algorithm, that: bogobogosort was designed not to succeed before the heat death of the universe on any sizable list. I wrote a program ...
I've been working on my own phone number extraction snippet of Regex code and I'd appreciate your feedback on it. I've tried to make it match as many different types of numbers as I knew existed in the US. (I'm sure there's some I missed.) Is there anything I can do to improve this? (?:\+?(\d{1})?-?\(?(\d{3})\)?[\s-\.]...
I would like to request some code review and feedback on a stack implementation using Swift. Disclaimer: I might have not used protocols, optional unwrapping and error and nil check correctly (still trying to figure out the essence of protocols - but that's the drill I'm going through now). import Foundation /* Node c...
This is my implementation of a Hash Table to store information about a student. Everything seems to work as expected, but I'd like some feedback on the following: Is my style good? Is it easy to read the code? Could i do better job naming variables? If so can you give examples? Would your implementation of a hash tabl...
Continuing my previous post, I have completed my game of Blackjack, the simple version. I am aware it's very long. I haven't included some of the suggested changes suggested in the previously to the Deck implementation and the other classes involved. It is simple because I omitted some rules (I am planning on implement...
I have written the following C code to parse a configuration file for settings to my program. I denote comments with a # and blank lines are allowed. e.g.: # Total bytes per line TBPL 70 # bar minimum NUMIN 10. # bar maximum NUMAX 30000. # input filename LLIST_NAME foo.txt Is there anything badly wrong here? I'm use...
I plan to use this menu struct in an RPG played in the terminal. I want to make a RPG similar to D&D. I would like advice on my methods for the menu struct, especially the "hide" and "unhide" option methods. main.cpp #include <string> #include <vector> #include <cstdlib> #include <iostream> #include <initializer_list>...
How can I do the following with less nested loops. How can I output the Table names above their corresponding tables without having to loop. Functions for returning the DB Info: // Return all the Table names in an array public function getDbTables() { $result = $this->query("SHOW TABLES"); while ($row...
I wanted to create a class that would allow me to draw an arc representing a percentage of progress, similar to the activity view on the Apple watch. There are various examples which I found helpful on the web and my output is a combination of many of these. I have posted my code so that it works and renders in a Xcode...
A while ago I got bored and being the beginner programmer I am I made a Russian Roulette game in Java using JFrame. The first few windows are JOptionPanes that are a welcoming screen, an update log and a how to play. The object of the game is you get 5 lives and when you lose all of your lives, you die. At the very end...
This code finds the probabilities of the various scores in Poker. It uses a Monte Carlo approach, in which, two million (\$2 \times 10^{6}\$) hands are simulated and evaluated, not an exhaustive search. According to Wikipedia, my results are accurate. I strived to avoid over-engineering, where the only tricky part is p...
The following code transforms multi-line input into the the Brainfuck equivalent. One line turns into one program. The resulting programs are split by newlines for readability. Brainf.cpp #include "Brainf.hpp" int main() { std::vector<std::string> userInput; std::string currentLine = " "; // do not start empty...
The following code is designed to load and refresh JavaScript code from an external file sandbox.js and allow it to be refreshed dynamically and executed without reloading the entire page. The sandbox.js file is assumed to contain a function sandbox() which may contain arbitrary JavaScript code. As the title within the...
This is my first crack at a identity monad and a maybe monad in Elixir: defmodule Monad do @doc "v is value to be wrapped as monadic value" def return(v), do: fn -> v end @doc "m is monad function, mv is monadic value" def bind(m, mv), do: m.(mv.()) end #Simple identity monad id = fn ...
I'm working to get some practice with SQL functions which are often used in a financial setting, and I created this simple table with products, prices and tax rates basically. I then wrote a query to simulate a purchase invoice type of result set (I realize things like that are most often done at application level, or ...
The algorithm gets the number associated with each char, then adds a random number to it and saves the numbers it added. I plan to make an Encrypter class later. Here is the entire project: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using Sys...
To learn F#, I've implemented this very simple inventory system. While I'm proud that that it's my first program, and that it works, there are still a few areas that I'd like tips on, namely these: I don't like how I'm using a for ... in ... loop in Inventory.ChangeSelectedItem to find the length of Inventory.Items. I...
I am using Java with SQLite and I am wondering if I am in the right track onto writing good code i.e. more or less reusable: SQL scheme: CREATE TABLE Pessoa ( CPF VARCHAR(11) NOT NULL , telefone INTEGER , celular INTEGER , nome VARCHAR(255) , PRIMARY KEY(CPF)); CREATE TABLE Mecanico ( Pessoa_CP...
I'm playing around with RAII a bit lately and I wan't to know if/how I can improve this (quite simple but very helpful) class. A word to two decisions I've made and why: No error handling in construct. I don't think throwing a exception would be appropriate so it's up to the user to check valid(). No copy constructor....
I have a large image of an L-shaped painting on one page. I created divs over parts of the painting I want to explain. When the page loads, I want it to scroll down the length of the image, and then move to the left of the image, stopping at each div for a few seconds. I understand how to get the page to scroll down on...
I was trying to implement the algorithm specified in this research paper (please ignore the math, since it's irrelevant to the question). This algorithm is very basic in formal concept analysis. The input is supposed to be an NxM matrix and a list of lists or array of lists as you can see in the paper section 3.1. In f...
I am solving a simple problem that checks whether a graph is two-colourable (bipartite graph). I am using BFS for this approach using C++ STL. I've replaced cin and cout with scanf and printf as suggested by fellow programmers but still the judge reports TLE. #include<iostream> #include<list> #include<cstring> #include...
The program this function was written for is a Windows forms program. This function downloads videos from the internet one after the other. It runs in a separate thread (so the user can drag the form around or whatever), but otherwise the form is disabled, so no more instances can be created without doing so explicitly...
I have made this little program which allows you to play a slot machine: import random import time import os print() print('''Welcome to the Slot Machine You'll start with £50. You'll be asked if you want to play. Answer with yes/no. you can also use y/n There is no case sensitivity, type it however you like! To win y...
My current condition is written as follows: .Where(m => Math.Round((m.DateAndTime - DateTime.Now).TotalMinutes, 0) <= 30 && Math.Round((m.DateAndTime - DateTime.Now).TotalMinutes, 0) > 0) which basically says where the rounded value is less than or equal to 30 and the rounded value is greater than 0. Is there a neat...
Problem Find (a^b)%M, where a = Nth non-fibonacci number b = Nth fibonacci number modulo M M = 1000000007 Consider fibonacci series 1,1,2,3,..... INPUT First line contains T , the number of test cases. Each next T lines contains a number N. OUTPUT Print T lines of output where each line corresponds to the required an...
I've implemented the well known Luhn Algorithm in Python. It's a simple one, so it's good for beginners. import random from math import ceil def Luhn(digits): if digits >= 2: num = random.randrange(10**(digits-2),10**(digits-1)) num_digits = list(str(num)) for i in range(0,digits-1): ...
I am trying to extract the data from input file and store it for plotting. I have tested this code for a few files of same format. I am not sure if the code works correctly with the little change in input file (like more blank spaces in between). I might have also done some terrible mistakes which I cannot find out whi...
I have some tasks that I'd like to memoize because they connect to a rather slow network and have to wait for the data. Unfortunately this network can be a little finnicky and we get occasional connection issues. Thus I'd like if my memoizer could know to retry a certain number of times. import functools # Python 3....
Here is the task: Create several classes of flowers that extend abstract flower. all fields -- random. make a bunch of 20 different flowers calculate the price of the bunch sort bunch by freshness of flowers find flowers with stalks in a certain range find average level of freshness of the bunch Solution: publi...
I need to parse only valid timestamp formats: Hours followed by minutes followed by seconds: t=1h2m3s Minutes followed by seconds: t=2m3s Only hours: t=3h Only minutes: t=4m Only seconds: t=5s and escape other timestamp formats like t=2m1h or t=3s2m or t=3s1h2m. To get the hours, minutes and seconds, I use this Regex...
I'm working on a Rails application that has a lot of logic in the controller that should be in the model. In the app/controllers/customers_controller.rb#create there is logic to create stripe cc info for the customer. I think this should be in the model. How can I move this logic into the model and still handle any exc...
In angular, I have an input field for a user's full name. And a function called splitName which extracts the first / last name from the field. Is there a way to improve this logic? <input type="text" name="fullName" ng-model="data.full_name" /> On the backend, on form submit I do a POST which requires both a first_nam...
Can you assess source code of my client-server program? I would like to get an advice about design, code security etc. Thank you very much. The program does the following: Show files in directories; Download and upload files (for now, only one file at a time). Syntax: ./client <Server IP> <Server PORT> dir <PATH> ...
I wrote a piece of code that creates an array of objects based on the array of dictionaries. The problem is that my solution uses multiple loops imperatively. Let's consider the following case. There is a class called Drug: class Drug { var name:String var dosage:[(dose:String,time:String)] init(name:String){ se...
A coworker and I want to get feedback on our respective implementations of a JavaScript function. Both seem fast, but we're wondering which is better stylistically. Both functions handle what icons appear in a control panel when navigating between sections inside of an administrator dashboard. The first function funct...
I've used PyLint to harden the styling according to PEP8 as much as I could but looking for feedback on anything I've missed. Also some questions below: Passing argparse values directly to other functions helped me cut down on the number of local variables in main(). Is this a good practice regarding argparse? Should ...
I am trying to read a file using pandas and then process it. For opening the file I use the following function: import os import pandas as pd def read_base_file(data_folder, base_file): files = map(lambda x: os.path.join(data_folder, x), os.listdir(data_folder)) if base_file in files: try: ...
This is my first bit of significant code in Common Lisp, an implementation of insertion sort. Being new to Lisp in general, I'm wondering if this code follows best Lisp practices in regards to program design. ;;; Return a portion of a list (defun slice (elements from-index to-index) (cond ((= from-index to-index)...
I came up with the below code to improve the peformance of pinging a large number of machines. At present it's fairly basic, but thought I should see what people thought before proceeding further. NB: This is my first time playing with workflows, so I've probably committed a few faux-pas there. cls workflow Test-Connec...
I have written a simple application to monitor whether a couple of Java EE 6 web applications deployed to Glassfish 3.1.2.2 are accessible. My intent is to demonstrate to our operations team that the applications are intermittently inaccessible. package monitoring; import java.io.BufferedReader; import java.io.IOExcep...
I have recently started learning Clojure, and decided to write a number-guessing-game as an exercise. The game works as follows: User enters minimum and maximum values Computer generates a number between those two values (inclusive) User has to guess the number (the computer always tells him, whether his guess is bigg...
I have been learning Scala for a couple months and want to get a more concrete understanding of proper oop practice. I find it difficult to optimally use traits, abstract classes and inheritance. import scala.util.Random class Position(posX: Int, posY: Int){ val x = (posX + 16) % 16 val y = (posY + 16) % 16 ...
class Names: def __init__(self,name): self.name = name self.numname = name for letter in name: self.numname = re.sub(letter, rosetta[letter] + ",", self.numname) self.numname = self.numname.split(',')[:-1] Essentially what this does is creates an attribute for the object...
With Delphi 7 I need to create a TStream variable and use/free it in another part of the code. Unfortunately it cannot be passed as "normal" parameter. I created a simple application for testing what I need, using some examples I found on Google and some help from SOF (I am not used to pointers). Here is what I got so ...
This code has one public method. ProcMonDebugOutput(). It will sent a string of text to Process Monitor that process monitor will display. I'm basically ported this file. I don't have a 64 bit version of office to test this on, but I think I used all the LongPtr right. My two big concerns are: * Are the Win32 API call...
I'm written the following code to calculate the position of a motor during each timestep, the result of which will be compared with feedback from a quadrature encoder and subjected to a PID algorithm. The trajectory will follow a trapezoidal profile. i.e. Accelerate to a maximum velocity, coast and then decelerate to t...
I have written a program that divides an geographical area up in cells with size 0.002 degrees longitude by 0.001 degrees latitude, and check every cell whether it's a land area or a sea area. I've done this to effectively to get all the sea area of that area. This is probably insane from a GIS standpoint. Please revie...
First time implementing a adjacency list. Is the use of exceptions correct? If anyone could test/read the code and give some advice on improvments I would appreciate it. #include <iostream> #include <vector> #include <exception> #include <list> class VertexInvalidArg : public std::invalid_argument { public: Vertex...
I'm working on a class to download some data from an external server and feed it into my data model. I'm new to both HttpClient and async methods in C#, so I'm not sure of a few things. Is my placement of new SearchResultSet() reasonable? It's a little contrived, true, but I'm trying to get an example of how async c...
I have written an abstract View Model which all my other View Models inherit when I write any apps in Silverlight, WinRT, WPF etc. The class was written to attempt to address an issue I have run into frequently. That is, after refactoring code, all my property names are wrong and I often forget to rename them. Debuggin...
I recently posted my Hangman game, and got some amazing feedback! The main thing suggested was to create a word generator that could read JSON files so that my hangman brain class didn't have to generate the word used on top of handling gameplay. To do this, I created the HangmanWordGenerator class that parses JSON and...
Approach 1: Repeated division-modulus operations: long num = 123456789; int count = 0; while(num > 0) { int digit = num % 10; if(digit == 1) count ++; num /= 10; } Approach 2: Convert it into an String and get the characters at the position: long num = 123456789; int count = 0; String s = String.valueOf(num); for...
Let me start off by saying I am not new to PHP or PDO, but very new to OO PHP, and have been struggling to get a firm idea of best practices in my head regarding dependency injection and structuring my classes and their methods. The code I am providing will clearly be built on once I know I am doing things the correct ...
I have project where I will need to create lots of immutable strings. If I am using std::string, which has huge overhead - about 60-70% against const char *. On a 64-bit machine, the current implementation uses 8 bytes for the class + the const char * size. This is the same size as it would be with plain C. I will also...
This code is a chunk of big project, so I am sorry in advance for not adding everything as it's just not possible. [DataContract] public class Companionship { [DataMember] public int ID; [DataMember] public string ClientID; [DataMember] public string UserSID; [DataMember] public string R...
I created a function that truncates an incomplete UTF-8 character at the end of std::string in C++. C++'s Standard Library does not yet support character based substr on UTF-8 characters and does substr by number of bytes only. Because of that, in the example below, substr causes a weird broken character to appear in t...
Current code (ES6): getSelectedItem() { let result; return ((result = this.getItems().map((s) => { return Util.isItemSelected(s.toJSON()) ? s.toJSON() : false; }).filter(Boolean)) && result.length) ? result[0] : null; }, s is a Backbone.js Model (hence the need to .toJSON() on it). Apart from a ver...
I was in the mood for doing some GUI coding, and eventually I came with this simple program: you enter a date, press the button, and the program tells you temporal difference in days between the input date and current date. package net.coderodde.gui.date; import java.awt.Dimension; import java.awt.GridLayout; import ...
The method length() in File returns the length of a file in Bytes, this code transforms that into b/kb/mb as can be seen in the Windows Explorer I ended up with the code below, let me know if it can be optimized or the logic can be improved. public static String getFileSize(File file) { String modifiedFileSize = nu...
Let me know if the given code can be improved or optimized: public static String getFileNameWithoutExtensiotn(File file) { String fileName = null; if (file.getName().startsWith(".")) {//if starts with "." like .htaccess fileName = file.getName(); } else { try { fileName = file.ge...
I need to sort files by the type of the File. To accomplish the task I first wrote the code below: private static Comparator SortByFileType() { return Comparator.comparing((File f) -> { String probeContentType = null; try { probeContentType = Files.probeContentType(f.toPath()); ...
I have a very basic version of a media player built using JavaFX. The project is well segregated and has a different packages for controllers, utils and supporter classes. My project follows the MVC pattern and it contains the following important parts: All the views are in FXML files. These views have dedicated contr...
I have an array of objects where each object has a datetime key/value pair: var original = [ { datetime: '2015-07-22 09:00:00' }, { datetime: '2015-07-22 11:00:00' }, { datetime: '2015-07-23 10:00:00' } ] I need to transform them into a new array with objects where the first key/value pair of e...
Here's the challenge: Once upon a time in a strange situation, people called a number ugly if it was divisible by any of the one-digit primes (\$2\$, \$3\$, \$5\$ or \$7\$). Thus, \$14\$ is ugly, but \$13\$ is fine. \$39\$ is ugly, but \$121\$ is not. Note that \$0\$ is ugly. Also note that negative numbers can also b...
This code downloads a list of images, each in a different thread. I have some questions about this code: I don't know how to get information about correcting downloading (sometimes thread just stopped and doesn't do anything: no error, nothing and only part of image has been downloaded). I use the next mechanism for f...
I am looking for advice on my input component. There is no real problem with it yet, but I am just getting started on everything and want to know if there is any obvious problems with it, plus I was looking for advice on a design question of it. The design question refers to whether or not I should treat alt, ctrl, an...
Below is my implementation of the dynamic programming solution to the sequence alignment problem in C++11: #include <iostream> #include <string> #include <vector> using namespace std; const size_t alphabets = 26; /* * Returns the Needleman-Wunsch score for the best alignment of a and b * and stores the aligned s...
Context I have a node.js application that uses many other modules and libraries. Some of these modules pull details from process environment variables, such as URL's for databases, credentials, and so on. In particular, because this node app is running in Bluemix, there's a large JSON variable called VCAP_SERVICES that...
Lately, I've been part of a team working on a utility library for iOS called Thundercats (on Github). We're about to start working on some changes and upgrades in preparation for a 2.0 release, so we figured it might be a good time to get some of our code publicly reviewed. The library is written in Objective-C and is...