instruction
stringlengths
71
71.9k
So my app needed a cookie store that persists over the app closing, device reboot etc. I decided to use the sharedPreferences for this. The class works pretty well, in both my tests and on the device. However there are couple of things I think can be improved. First is error handling. The problem is I cannot throw the ...
I am fresh at OOP and I am curious if the code below is object oriented and can be improved: class cTitleBreadcrumb { public function __construct($sAction, $sItem){ $this->sAction = $sAction; $this->sItem = $sItem; } public function displayAction(){ if($this->checkUrlAction($this->sAction) === true){ ...
I want to make sure find_value_from_key() is safe and efficient. My constraints are language C++, use of standard library ok, but cannot use Boost or any new C++11 features. Can anyone offer any comments/criticisms/feedback on my implementation of the function here? Any flaws in my test cases would also be interestin...
I'm learning Go at this moment and it is my first program in Go, so I will be thankfull for any suggestion, remarks and observations. package main import ( "fmt" ) const ascii = "abcdefghijklmnopqrstuvwxyz" var goodness_values = []float32 { .0817,.0149,.0278,.0425,.1270,.0223,.0202, .0609,.0697,.0015,.0077,.0402,...
I'm writing out two numbers separated with a dash. The first number is padded with leading zeros until 6 digits, the second number, 4. string taskNumber = order.ID.ToString("D6") + "-" + task.ID.ToString("D4"); If I was going to rewrite this using string.Format I would simply say: string taskNumber = string.Format("{0...
I currently use this code pattern fairly frequently if(array_key_exists('possible_key', $array)) { $my_variable = $array['possible_key']; } else { $my_variable = 'my default value'; } Is there a better way to be writing this?
Users can define custom controls that are added to an entry form at run-time. The values of these controls are later stored in a MySQL database. Optionally, users can define 'recipes' to auto calculate some controls. For an example, a user could enter Gross and Tare weight and use a FieldCalc for the Net Weight. In th...
Please review this for concurrency correctness: #include <iostream> #include <queue> #include "boost\thread.hpp" #include "boost\timer.hpp" std::queue<int> itemQ; boost::mutex m; boost::condition_variable qFull, qEmpty; const int max_size_q = 5; void producer() { int i = 0; while (1) { boost:...
Here is my problem. Do I need to give a new identifier to each delegate I write of the following delegate type? like so: or could i use one delegate that accounts for any Datatype I need to use so i don't have to keep repeating the code? Something that may or may not be relevant: I'm calling these functions to prompt ...
I was looking for a C function that reads lines of arbitrary length from a file. I didn't find anything absolutely portable and safe from buffer overflows, so I tried writing my own. Does it look like I made any memory management mistakes? Does it make sense to have this function return NULL everywhere that it does? H...
I've written a small routing system in PHP but I'm not sure if it's done the right way and what changes can they be done to the code and improvements. <?php namespace Twelve\Router; use Twelve\Utils\Utils; class Router { public $routeMaps = [], $controller; private $...
I have written the following script which simply: Loops through JavaScript files (either defined in a particular package, or separately with the libraries array) Reads the files into the script and combines them into one string Minifies the string and saves the contents to a cached file on the server and returns the c...
I'm trying to develop a better function and curious what others would suggest I do to it so that its not so robust and still accomplish what I need. A couple of things I need to account for is when I have a last 5 messages as well as getting just the regular number of messages. /** * Gets all or last $x number of pers...
I'm a brand new JavaScript guy (currently playing with Meteor) and would love some critique of the following: The goal: I've got two collections Buckets Widgets. I'm displaying a select for each bucket, populated with an option for each widget. The goal is simply to mark the appropriate option as selected if t...
Given a string, find its rank among all its permutations sorted lexicographically. For example, rank of “abc” is 1, rank of “acb” is 2, and rank of “cba” is 6. Assuming there is no duplicated character. The following is my code: #include <iostream> using namespace std; // A utility function to find factorial of ...
I was surprised that I didn't find this approach to logging anywhere while reading up on the subject. So, naturally, I think I may be doing something wrong. I set up some simple tests, and this seems to work: First, the source: log.py import datetime import logging import os import config #this is very straightforwar...
I have some code that is used to hook into third party code. It goes pretty much like below (mind you CodeWeDontHave can't be posted because we dont have the source). I have an issue where sometimes my code will deadlock on the line commented below. Also, we get a object reference error now and then. Is this the m...
I'm implementing a version of the mean shift image processing algorithm for color segmentation in Python/NumPy. I've written a pure NumPy version of the actual mean shifting per pixel (which I imagine is where the majority of time is taking). It slices an array of RGB values to work on out of the parent image, then cre...
I was trying, just for fun, to solve http://code.google.com/codejam/contest/dashboard?c=2075486#s=p4 I can easily solve the small set, but I struggle to solve the big one (my implementation would use approx. 30GB or RAM, which is a bit too much. Any hint or direction is appreciated! def solve_maze(case_no): case =...
Just wondering if anyone can see a way to optimize this piece of code. It is a key piece of my program and needs to run as quickly as possible. The part of the code I am unsure of is the while loop for finding the nearest key -- but any assistance with optimizing the code would be appreciated. // TODO: Move to snippet...
First, some background. I have a Payment model that has_many :subscriptions. When a user pays (creates a new payment), I have an after_create callback that adds the newly created @payment.id to @subscriptions.payment_id. Here's what it looks like: def update_subscription @unpaid_subs = Subscription.where(:user_id => ...
My application has two parts -- a client and a server. Within this, there are different versions for different platforms. The user specifies this in the args, i.e. "make PLATFORM=x11". However, I feel like I'm separating the client and server build operations in a very inefficient way, and that I have too many variab...
I have the following .click() functions: $('.tab').click(function(){ $('.tab').removeClass('activeTab'); $(this).addClass('activeTab'); }); $('.edit').click(function(){ $(this).hide(); $(this).next().show(); }); $('.cancel').click(function(){ $(this).parent().hide(); $(this).parent().prev().sh...
With some free time, I decided to study artificial neural networks as an academic exercise (not homework). Over the course of my studies, I decided to write a Python application that would allow me to create and train arbitrary feed forward networks so I could see the concrete math. So far, the test harness only includ...
This has taken me months to complete. From what little testing I have done, it seems to work. Let me know what I can do to spruce things up. I can't wait to start learning some more advanced concepts that would have made this easier. # Imports, lots of imports, from random import randint from random import choic...
Below is my written code to determine if, based on the hypotenuse, a Pythagorean triple is possible, and what are the lengths. I was wondering if there is a more efficient way of doing so. #Victor C #Determines if a right triangle with user inputted hypotenuse is capable of being a Pythagorean Triple import math tripl...
This code snippet is intended for validating the value of a property of an object. The min and max range is supplied as an .xml file like Nhibernate .hbm files. Since the data-type of the property is also read from the .xml file, we can only know the type of the property at run-time. Is there any better way of improvin...
I am using the Jersey client to make API calls to validate a session. This call is being made at a rate of around 5 calls/second. I want to ensure that the client call doesn't have performance issues. String sessionUrlPrefix = Config.getInstance().getString(Helper.SESSION_SERVICE_URL); String urlParameters = getParamet...
I've written this relatively simple class to help with managing arrays of anonymous objects in my scripts. /** * AoHandler - accepts an array of objects or creates a new array * @param {array} ao */ function AOHandler(ao) { this.ao = typeof ao === 'object' ? ao : []; /** * pluck() * @param {object} se...
I would like to submit my enhanced concatenating function for your review. Originally, its method signature is: char *concat (const *char1, const *char2); but after knowing that the calling code must supply all the arguments when it calls the function, I modified the method signature to: char *enhconcat (const char *s...
I just wrote this function and am wondering if it's secure enough for storing passwords in a database: public static function hash($salt, $str) { $salt = md5($salt); $salt = '$2y$12$HfuPgoDY94nHJssqQeVLmH' . $salt . '$'; return crypt($str, $salt); }
I'm trying to create my user.class.php constructor but I don't know really much about POO so I'm going to tell you what I'm doing and I hope you could help me. user.class.php class user { private $fullname; private $age; private $email; private $sex; private $nacionality; public function __...
I would appreciate some feedback on my design of a few classes to query the Trakt.tv API. public abstract class TraktQuery { private const string baseUrl = "http://api.trakt.tv/"; private const string apiKey = "[API key here]"; protected abstract string QueryUrl { get; } protected abstract List<string...
I've been working on my own PHP framework for my projects. I just finished coding my DI container. There is always room for improvement. Any input be it good or bad on my code would be appreciated. Also, would using exceptions instead of die() be a better approach? Should I move the higher API functions (register() and...
I'd love to improve this code. I know I should put a lot of stuff in another class but I have no idea how. import java.util.Scanner; public class UserInteraction { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int choice = 0; String[] subjects = new Strin...
I have a console application that I'm trying to make with minimal redundant code. I have 4 functions, Create, Read, Update, and Delete. is it possible or practical to combine the four functions into one function that takes different parameters to create, read, update, or delete? is it possible to also adjust that one ...
I'm writing some crypto code, and as part of it, we have to implement modular exponentiation. I have it working, both with the right-to-left binary method and with the Montgomery formula. While they both work, the Montgomery calculations take three times longer than the right-to-left binary method. This is extremely ...
Even though it's simple, I've spent quite a bit of time on it, learning as I go. Is there anyway I can make this code more efficient, more crossbrowser compatible or just generally better? jsFiddle <!-- Geocode --> $(document).ready(function () { var GeoCoded = { done: false }; autosuggest(); $('#myform').o...
Summary I've created a function that blends tiles on a 2D hexagonal grid with their neighboring tiles based on an image that serves as a "blend mask". It runs, and isn't too intensive, but I feel it can be better / faster. Drawing pixel-by-pixel is very intensive even for the 108x122 (Relatively small) images I'm using...
I want to give users help in which format they have to enter a date. The label content is: Date (YYYY-MM-DD) I used the following markup: <label>Date (<kbd><abbr title="four-digit year">YYYY</abbr>-<abbr title="two-digit month">MM</abbr>-<abbr title="two-digit day">DD</abbr></kbd>)</label> Note: the new HTML5 input...
In ruby, is there a more concise way of expressing multiple AND conditions in an if statement? For example this is the code I have: if first_name.blank? and last_name.blank? and email.blank? and phone.blank? #do something end Is there a better way to express this in Ruby? 1.9.2 or 1.9.3
I had this interview question like a year ago and was asked to code, on a piece of paper, how to reverse each word of a string. Since I am used to Java, I proposed the obvious answer of using split + reverse, which are native commands in Java. I was then told I couldn't use those, so I floundered and ended up with a ...
Basically this code is for an upvote/downvote system and I'm basically Incrementing the count by 1 when voting up Decrementing the count by 1 when voting down If the number of downvotes > upvotes, we'll assume it's a negative score, so the count stays 0 Reverting the count back to what it originally was when clicking ...
Here is a class that executes the CreateAPerson use case. It takes a request object (which is a simple data structure), validates the request, creates a new person, and then returns a response object (another simple data structure). For testability, I've created a setter that allows me to inject a mocked entity manager...
I'm trying to see if there is a loop I can use in order to pull off this code a little more elegantly. I was previously using a foreach($row as $cell) with $row = mysqli_fetch_row($result) but because of that I couldn't access the data from the 'user' column in order to check it against the session variables in the if ...
I think my code has too many functions... can it be written better? Please help reviewing my jQuery functions. HTML <div class="event_owner"> <p> <label for="xxx">xxx</label> <input type="radio" name="event_owner" id="xxx"> </p> <p> <label for="yyy">yyy</label> <input type="...
I just spent the whole night writing this little script for my search engine. Now i want to improve it. Any ideas? <?php echo "KEYWORDS : ". $searchstring = "the and"; $sentence = "Skype Home is unavailable at the moment. Check back later to see your news and alerts. It's easy to start a conversation on Skype: Ch...
I am new at OOP and I wonder if the code below is OOP or it can be better and also what can be better? class cForm{ private $_TagAction; private $_TagMethod; private $_TagName; private $_TagExtraAttr; //var form field private $_FieldType; private $_FieldName; //var button private ...
The following script closes a virtual machine (which is run in a screen session), waits for the session to close, creates a backup of the VM, and restarts the VM. The shutdown and bootup scripts speak for themselves, but I can post them if necessary. Is there any way to clean up the sockets_found function? It seems lik...
I just wanted to confirm if this example I created would qualify as a good example of a multithreaded producer consumer. I would like any review changes on improving this example. I found that static fields are essential for synchronization of the threads. The wait-timeout mechanism along with the available flag fun...
I have an XML layout used by 2 activities. Within this layout, there's a view that is visible for Activity1 and gone for Activity2. Activity1 is used more times compared to Activity2. I would like to know which of the following methods is a better practice, if there's a better one. Method 1: The view is gone and it's t...
A while back I was asked to write some sample code for a job that I was applying for. They wanted a class that had a function that would accept three lengths and return the appropriate type of triangle (Scalene, Isosceles or Equilateral) based on that. They also wanted unit tests. After sending this I never heard bac...
I have an application where I am receiving big byte array very fast around per 50 miliseconds. The byte array contains some information like file name etc. The data (byte array ) may come from several sources. Each time I receive the data, I have to find the file name and save the data to that file name. I need some gu...
I have an implementation of a BrickBreaker-like game where instead of pieces being just removed from the ceiling, each impact results in a new ball being released, gradually building up to a pretty chaotic game. The SDL related code that actually draws the game is not included here. This is my second "big" project usin...
Background: I need to use mutation observers to watch for nodes being added/removed under a specific element. The code below is an attempt to implement something re-usable that uses MutationObservers where available and falls back to mutation events where not available, providing a simple unified interface to both. The...
Recently, I've been thinking about better ways to make my WP themes more maintainable. What I've tried on one of my last projects is to separate out the presentation and logic as much as I can. First, I created a function with the loop in it and has all of the logic. It returns all of the data into an array. In the tem...
I posted a question last week about refactoring an after_create callback. The code in this question is for the create action. I'm using Stripe to handle credit card payments and am roughly following the railscast on Stripe integration. Here's my create action on the Payment model: def create @unpaid_subs = Subscripti...
I am making a review system and I need to be able to only select the DISTINCT url from the database, but then pull the relevant page title and rating time. I have managed to get it working by using: <?php //opens conection include 'conn.php'; echo $_COOKIE["search"]; $sql = "SELECT * FROM feedback WHERE url LIKE '%$_...
I'm pretty new to asp and c# and I have a couple of concerns with the security of the code I have written (shown below). Basically all it does is allow you to enter a quantity before you add the item to your cart using a razor form. Every example I see uses validation on input fields, like: [Required] [DataType(DataT...
I'd like to display a vector (implemented in my custom Vector class) and have the output width of the elements be configurable. I've done this by creating a simple wrapper for the element being displayed which stores the desired width in a static field. I'm not sure if this is the best approach. /** A struct for format...
I am asking this for coding style. I have a program class that calls a function(of a data access class) that reads from a table (using entity framework by the way), and I'm preparing to write the DataAccess.ReadMethod(). Is it better to pass the function a 2d string array string[rows][fields], reading each field and ...
I've simplified this for posting, since there are going to be more than 4 options sets for this function to cycle through: function redundantSee() { var optionSet1 = $('.wrapper:eq(0)'), optionSet2 = $('.wrapper:eq(1)'); optionSet1.find('.options').each(function(){ var self = $(this), input ...
I am doing a database design I want to create a database with information of employees, their jobs, salaries and projects. I want to keep information of the cost of a project (real value of project and the days a employee invested). For Employee and Project, each Employee has one role on the Project through the PK cons...
(function( $ ){ var monthNames = [ "Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь" ]; var dayNames = ["Пн","Вт","Ср","Чт","Пт","Сб","Вс"]; var now = new Date(); var methods = { init : func...
I have a method(C#) which takes an XmlNodeList and a String and saves the xml data into a database. That code isn't the problem (at least for the moment), but because I have multiple XmlNodeLists, each needing a different String (the heading), I end up with code like saveToDB(students, "Students"); saveToDB(teachers, "...
There are a number of different ways to do this. What do people prefer and why? public boolean checkNameStartsWith(List<Foo> foos) { for (Foo foo : foos) { if (!(foo.getName().startsWith("bar"))) { return Boolean.FALSE; } } return Boolean.TRUE; }
If I have this basic structure var Foo = function(str) { console.log('Object string: ' + this.str); console.log('Param string : ' + str); } var Bar = function() { this.str = 'object string'; } var obj = new Bar(); Foo.call(obj, 'param string'); It's fairly obvious what .call() is doing in context. I re...
I am new to WCF and need to work with another programmer's code. I am unsure of the way the WCF service client is used here: private void barButtonDocuments_ItemClick(object sender, ItemClickEventArgs e) { try { MyServiceClient myServiceClient = new MyServiceClient(); try { ...
I have a select statement which is infact a subquery within a larger select statement built up programmatically. The problem is if I elect to include this subquery it acts as a bottle neck and the whole query becomes painfully slow. An example of the data is as follows: Payment .Receipt_no|.Person |.Payment_date|.Type|...
Okay, so I wrote this function yesterday for one of our websites here at the office, the site is responsive, but one of the banners wasn't behaving at a certain screen size (was getting chopped off when screen size was less than 1067px). Basically, this script checks for window size of 1067px (higher than 1068px, banne...
I came across an exercise (in the book "The Art and Science of Java" by Eric Roberts) that requires using only GArc and GLine classes to create a lettering library which draws your initials on the canvas. This should be made independent of the GLabel class. Write a GraphicsProgram to draw your initials on the graphics...
Here is my QuadTree class and node. The problem is really with Querying. In my game, I have a city which can have n * n streets (randomly generated). And each street has buildings. What I do is put all buildings and roads in a quadtree and render the result. The problem is as the city gets bigger, I lose lots of FPS. B...
I'm new to Python, just attempted the task here. The part I found hardest was parsing the expression into the tree structure. I was originally trying to build a regular tree structure (i.e. a Node object with left and right nodes), but without any logic for the insertion (i.e. newNode < node then insert left, newNode >...
I'm writing a validation class, and I need one version which takes one type parameter, and one which takes two, and who knows one day I might want one which takes three. I have a lot of repeated code as the two versions are effectively identical except for the different number of type parameters. I'm looking for sugges...
I have two sieves that I wrote in python and would like help optimizing them if at all possible. The divisorSieve calculates the divisors of all numbers up to n. Each index of the list contains a list of its divisors. The numDivisorSieve just counts the number of divisors each index has but doesn't store the divisors t...
This is a script I use to count how many items are selected in a form. It currently loops through the entire form to count how many check boxes are selected, each time a checkbox is clicked. The form has thousands of checkboxes, and it's painfully obvious how slow the script is with this many elements (About 18,240 ite...
I've been reading The Pragmatic Programmer for a few days and I've come across a reference to the strategy pattern. Looked it up in Design Patterns and figured I could refactor a piece of code I'm currently working on to comply with the strategy pattern. I need to process text using many string algorithms much like Luc...
Just saw this at work in a code review and was wondering if this style of coding - for loop, doing && like that, seems fine to you or is there a better way of doing the same? for (int j = 1; j <= ETtop; j++) { // Check everything. int k = ET[j].PriIdx; for (int z = 1; z <= ET[k].ArgTop; z++ ) { ...
I want to insert about 10000 new rows into an existing table which already contains 10000 rows. I need to get the insertid for the query and to use that id in another function inside the loop. foreach($values as $val){ $sql = "INSERT INTO wp_posts (`post_author`, `post_date`, `post_content`, `post_title`, `post_exce...
I am using C# and the .NET entity framework, and I'm also learning how to better use OOP concepts in my program. My code is all displayed below. I would like to ensure my logic is properly organized before I try to implement the next step in my program. My goal is twofold: Ensure my code is SOLID, OOP, reusable, etc....
This is what I have, But I think I can write it in a sohrter and more efficient way too, what do you suggest? string actionString= string.Empty; if (auditAction == DSRHelper.SaveStatusEnum.Save) { actionString = Properties.Resources.SAVE_ACTION_MESSAGE; } if (auditAction == DSRHelper.SaveS...
My argument sanitization lib has a byproduct which does some typechecking and constructor investigation. I'm unsure if I'm using the fastest / most efficient approach here. What are your opinions? Total rubbish or does it have a right to exist? ;) // Return the type of an object aka safe typeof function typeOf(o) { ...
I'm working on a school project right now. It's an ordered(ascending) doubly linked list. I just wrote the Insert operation on it but I feel like the way I wrote it isn't that great. void OrdListClass::Insert(ItemType item) { if(Find(item)) { //throw DuplicateKeyException; }//End Duplicate Key Check...
Based off simple controller implementations like those seen in micro-frameworks like Slim, Silex, F3, Laravel, Tonic, Flight, Klein, etc. /EDIT tried to link the above sources, but as a new user I only get 2 links... Any potential issues? Improvements? class Router { private static $routes = array(); p...
For homework, I had to write an RPN Evaluator and write the results to a text file. I've done all that, but it feels weird, like the writing to my results text file. It also doesn't feel efficient. There are some constraints, like no <vector> or <string> libraries and no other external classes besides my stack. Any tip...
I have 2 methods that do almost the same things except a few lines of code. The sample is like below. public void Method1() { DoX(); if (value) { var input = GetA(); DoA1(); DoA2(input); } DoY(); } public void Method2() { DoX(); if (value) { var input ...
I'm brand new at OOP PHP and I would like to get as many of the coding conventions right as fast as possible. I made this tiny guestbook script, and I would like to know if there's anything not done as it should. Index.php: <?php $username = "root"; $password = ""; $database = "oop"; $host = "localhost"; mysql_connect...
This is a simple demonstration of a singly linked list, from my class work: #include <stdio.h> #include <stdlib.h> #include <wctype.h> #include <errno.h> #include <assert.h> #include <ctype.h> #include <stddef.h> #include <wchar.h> #include <locale.h> #include <setjmp.h> struct node { int info; struct ...
It was written in Emacs Lisp and requires Common Lisp loop facility. Can this code be improved? Did I hit any anti-patterns along the way? (defun combos (list) (let* ((a (car list)) (d (cdr list)) (s (and d (combos d))) (v (loop for c in s collect (cons a c)))) (cons (list a) (append s ...
I wrote a simple class implementing the collections.Sequence interface, that forwards calls to its items to member functions of its items. I'm requesting a review of the following code snippet. import collections class ForwardSequence(collections.Sequence): def __init__(self, *args, **kw): super(ForwardSeq...
I'm just starting to develop more in C# after being mainly a VB.NET developer and was looking for someone to critique my implementation of a NewtonSoft Json.Net serialiser. Can you provide some feedback on the following points: Is this a good way to build the class (using Unity)? Is it acceptable to be throwing an exc...
I have been working on a Playfair Cipher in C++ for a final Project in a Cryptography class. I was hoping for some feedback on the project so far. I recently got a job programming before I've even graduated and I feel like I've already learned so much. I would just like some feedback on my code style, comments, formatt...
Below is a script I've written that uses AJAX to check if all links on the page are alive or dead. Could this be modified to be more efficient in any way? Thank you very much. $(document).ready(function() { var liveLinks = []; var deadLinks = []; function updateLive() { $live = Number($('#liveLinkC...
Here's some code that removes the specified character, ch, from the string passed in. Is there a better way to do this? Specifically, one that's more efficient and/or portable? //returns string without any 'ch' characters in it, if any. #include <string> using namespace std; string strip(string str, const char ch) { ...
I'm using linear algebra as my basis. One very specific change I'd like to make is to allow for equality tests between points and vectors with an unequal number of components by assuming that all undefined components are zero (all points and vectors have infinite components; equality tests stop testing once a check for...
I made this Rock Paper Scissors game and I would like for this to be critiqued. import System.IO import System.Random import Control.Monad import Control.Arrow data Throw = Rock | Paper | Scissors deriving (Show, Read, Enum, Bounded) instance Random Throw where random g = first toEnum $ randomR (a, b) g ...
I am writing a program for learning purposes that takes an input of a file structured similarly to: 13,22,13,14,31,22, 3, 1,12,10 11, 4,23, 7, 5, 1, 9,33,11,10 40,19,17,23, 2,43,35,21, 4,34 30,25,16,12,11, 9,87,45, 3, 1 1,2,3,4,5,6,7,8,9,10 Which will then read the values from the file, figure out and print the larg...
I was asked a question in an interview the other day: You have an array list of numbers from 1 to 100, the problem is that one number is missing. How would you find that number? This is a mock of the question. The code seems to work. Could you give me some feedback? private int count; public void find() { //pr...
I am working on legacy code, specifically a sort of BoundedBlockingQueue (mainly used as a pipe between different threads). As it is heavily used in the system and the current implementation features fully synchronized methods and a wait/notify mechanism, I attempted to rewrite it, using the java 5 concurrency utilitie...
I created small module to help me create rich sendgrid html emails using the mako templating engine. Any feedback on the design would be appreciated: makosg.py from sendgrid.message import Message from mako.template import Template from mako.lookup import TemplateLookup class MakoMessage(Message): def __init__(s...