instruction
stringlengths
71
71.9k
I've been writing classic ASP.NET web services for a while now, and this is my first time writing a PHP based web service. I'm rather new to PHP as well. In ASP.NET, you directly call the web method that you wish to be executed, but I'm not sure if PHP has a similar functionality. Instead I'm calling a PHP page, and t...
I'm working on a code where it converts shoe sizes and distance. I require help making it "nicer" because I feel like it is a little messy. I was thinking about maybe making an enum to hold the distances and then using that enum to figure out how to convert it, but I'm looking for someone to just look at my code and te...
The question is probably quite simple, but I would like to hear what drawbacks we will have with our code. So, we had a simple implementation and interface for it: public interface ISettings { bool IsOnline { get; set; } } public class Settings : ISettings { public bool IsOnline { get; set; } } The property s...
Below is the code I have written for counting perfect squares between a given lower and upper bound. I am using the following concept to solve this: Starting with 1, there are \$\sqrt{m}\$ square numbers up to and including \$m\$. public static int CountPerfectSquares(long A, long B) { int count = 0; ...
I made a method that finds synonyms to words using thesaurus.com and I'm looking for comments and feedback to it. In what ways can I improve it, both when it comes to speed, security, reliability (regardless of how "reliable" it is to rely on a third-party website for look-ups), etc. /// <summary> /// This meth...
Implement a coin jar in C#. The coin jar will only accept US coinage and has a volume of 32 fluid ounces. Additionally, the jar has a counter to keep track of the total amount of money collected and has the ability to reset the count back to $0.00. I received the question above from one of the recruiter for ini...
The question is about sorting alphanumeric string in a "more natural" order. Source: Marc LeBrun's "Sordid Sort" Computist Quiz Often a system string comparison sorts alphanumeric data “unnaturally”, as with these filenames: File1 File10 ← ? File11 ← ? File12 ← ? File2 File3 File3X File4 File5 File6 File7 File8 File99...
I'm working on a page where a user can create new records, but not all values are required. When creating the SqlCommand with potentially null values, I'm wondering what's the best way, from a code readability standpoint, to check if there's any valid/useful information in a given field. If there is, add that informati...
Is this implementation of binary search correct? Any special or edge cases that I missed out? Maybe it should be optimized for elements that are less than the first element of the array or greater than the last element? bool binarySearch (int* array, int arraySize, int element) { if ( arraySize == 0 ) { ...
Does this code create sufficiently hard-to-guess session tokens, assuming the server and client are communicating over HTTPS? Take 2 (thanks to this crypto.SE answer): (ql:quickload (list :ironclad :cl-base64)) (let ((prng (ironclad:make-prng :fortuna))) (defun new-session-token () (cl-base64:usb8-array-to-base6...
Abstract I have little C/C++ skills. I've learned programming mainly with Java, and so I chose C++ (targeting C++11) as the language to learn better. In my current C++ project, I have to use the discount C library for its Markdown functions. To explain briefly my code: the member variable std::string markdown_ is the ...
I have a List, and I have to delete one item from the list when I find it. I am using the code below to do that: Iterator<MyClass> iter = flist.iterator(); while (iter.hasNext()) { Long deletedFiId = iter.next().getId(); if (deletedFiId.equals(fiId)) { iter.remove(); break; ...
This is an assignment that I have already turned in. It works great, but I was wondering if there are any flaws in the code, or how to write it in a more pythonic way. import random tie = 0 pcWon = 0 playerWon = 0 # Displays program information, starts main play loop, after main loop is executed (user pressing 4 in me...
So, this is a ton of code, but that's what I came up with for an efficient and extendable implementation of the A* search algorithm. The first four classes can be seen as interfaces to show the user what the interface looks like. (Is this a good way of doing that?) I can also provide examples if needed or wanted. """ T...
SQL Server 2008 R2 + .NET 4.5: I have the following metadata table: CREATE TABLE [dbo].[Metadata]( [Id] [uniqueidentifier] NOT NULL, [ContentId] [uniqueidentifier] NOT NULL, [ContentType] [varchar](50) NOT NULL, [ContentDate] [datetime] NOT NULL, [MetaName] [varchar](50) NOT NULL, [MetaValue] [v...
I have an expandable list view: public class ExListViewAdapter extends BaseExpandableListAdapter { private Context context; private ExpandableListView exv; private String[] sportList; private final int AVAILABLE = 3; private String[][] childList = { { "Fifa Net Width", "Fifa Penalty...
I wrote a D implementation of the nul2pfb utility from here, as the link to the source code was broken and I wanted to try to learn D. I noticed that it was rather slow (could barely keep up with the find -print0 that was passing it data, when it should be far faster as it need not do anywhere near as many system calls...
Code in Java but should be readable also for c#... Let's assume I have a class with some reference types. Example: class MyClass { private int uniqueId; private double doubleValue; private MyReferenceType refType1; // ... public MyClass(int id, double doubleValue, MyReferenceType refType){ this.id...
I've made a small skeleton for a larger project that will include cross-platform multithreading (by using Boost) and thread-safe random numbers (by using GNU scientific libraries and mutexes). My goal is to run a simulation (probably over 100,000 loops) in which each thread will utilize a random number and read from a...
I've been implementing functional linked lists in different languages, just as a learning exercise. I'm looking for feedback in general: code correctness, best practices, design patterns; everything you think about this. Is it bad code? Where can it be improved? /** * * Constructing Linked Lists * * Our linked list dat...
I am trying to implement a distinct counter to detect if all tasks that is added to the ThreadPool has completed and want to use it as a barrier. So, when a function that is added to the ThreadPool is completed, workDone will be called, and count will be decreased. The main thread will be locked by calling waitForALL()...
I'm trying to design a generic caching system that takes keyed items and allows either read-only or read-write access to a cached version of it. The read-only backing interface is: public interface IReadableItem<TKey> { TKey Key { get; } } However, I need to be able to dynamically update the key of my writable items...
Given a list which can can contain elements as well as lists, write an iterator to flatten a nested list. Please make this code better and suggest any improvements. public class FlattenIterator implements Iterator { private final Stack<Iterator> iteratorStack; private Object next; public FlattenIterator(...
So, I made a console interface. It prompts users with several options they can enter. 1 for the first option, 2 for the second option, etc. Using the switch statement, each option will bring them to a different screen. Now, after any of the options are entered and the users are brought to a particular screen, how do I ...
Wouldn't it be better to always pass parameters by reference to avoid creating unnecessary copies? #include <iostream> void deliver(const std::string& message){ std::cout << message; } void say(const std::string message){ std::cout << message; } int main(){ std::string message = "Hello World"; del...
I have a MVC design for a GUI Java program. I was wondering if: Someone could either comment the code to help me out in understanding what I am doing better. Help me fix newbie mistakes to make this program function better. This program asks the user for some info about a train ticket and trip and basically processe...
Code reviewers, I request you review the code and suggest all tips for improvement. public class LRU<K, V> { private final Map<K, Entry<K, V>> map; private Entry<K, V> eldest; private final int lruSize; public LRU (int lruSize) { if (lruSize <= 0) { throw new IllegalArgumentExcepti...
I am new to C, and this is my first attempt at creating a linked list. If anyone has a minute and could point out any errors or bad practices in this small linked list program, it would be really helpful. note: I'm using the get_choice function to run a loop to either delete, insert, locate, print-out links, or exit. #...
I have found a password hashing article and an implementation. Is this code secure if I increase the salt to 64 bytes, hash key size to 128 bytes and the iterations to 10000? Are there vulnerabilities or incorrectly implemented sections in this code? I know that Rfc2898DeriveBytes is making use of HMAC-SHA1, but with a...
Many of you might have come to the point and wished to have a Peek for IEnumerator and IEnumerator. I tried to implement it by cheating a bit and looking up the next element before the actual MoveNext call. So I ended up with some kind of wrapper. First of the extensions to convert default enumerators: public static cl...
I cache the data and use local database in my Windows Phone app. The algorithm is very simple: Get data from DB and show in UI Get data from a web service and show in UI Update data in DB from the web service Some data need to be saved in DB, and some do not need to. For these purposes, I have the following classes. ...
I am trying to create a new object with nested value pairs. My initial challenge is that I have a huge object containing lots of junk data, and I'd like to strip away the value pairs that I do not need as well as renaming certain values. Performance is vital as this will iterate over thousands of items. I assume that c...
I have an enum like the following: enum MeasurementBandwidth { Hz1 = 1, Hz3 = 3, Hz10 = 10, ... } But I do not like the Hz1, and 1Hz is not valid as it starts with a number. Does anyone have an idea how to solve this "more elegant"? Why I am doing this: I have an API, which offers a method like the f...
I have written the below code where the server is getting requests from clients on a socket and creating a thread per client. Each client thread is then writing to a file which is common to all the threads. The file has been opened when main starts, so the same fd is being used by each thread. In such a scenario I have...
I'm trying to code a simple and scalable PHP framework for my own use. Could you please offer some critiques or mandatory improvements for these two classes? <!-- language: PHP --> <?php class Xmysqli extends mysqli { public function __construct($dataDB = array()) { global $config, $debug, $err; ...
Is there any way to reduce this? //vars defaultTextColor="#444" correct = "#99CC00" incorrect = "#FF4719" answer1value = "1" answer2value = "3" totalquestions= "5" //tap on the words $(function() { $("#word1a").click(function() { $("#word1b").css("text-decoration", "line-through").css(...
I have a PHP script on my server that validates a form and sends the form to a CRM and an email address that I specify. In order to send the form data to my specified email, the script must include a valid email account and the account password. Basically, this script with an email address and password is sitting on my...
I have the following interface: struct IFilter { virtual enterClass(ClassData&, int recursiveLevel) = 0; virtual enterStructure(ClassData&, int recursiveLevel) = 0; virtual enterVariable(ClassData&, int recursiveLevel) = 0; virtual enterFunction(ClassData&, int recursiveLevel) = 0; }; And here is an ex...
EDIT: The full source code in question can be found here. Is this code reasonably safe against dead/livelocks, and if not, how can I fix it? I know processes are usually recommended over threads for operations like this, but processing's version of queue doesn't do what I need. The choose function will be called on 10...
I am creating a simple Boxing sim engine and have got things working fairly well. A few months ago I was instructed to avoid copy and pasting code and to try and "conserve my logic". Anyways, I feel I have done a fairly good job overall but there is one area (posted below) that I feel definitely has room for improvemen...
Below is the code I would like some help with. I'm just trying to understand if there a better way to use getters and setters. Can someone fill me in on the correct way to use them if there is a textfield, JRadioButton set that I am trying to get info from? //This class sets gets all the information that the user has...
FASTQ is a notoriously bad format. This is because it uses the same @ character for the id line as it does for quality scores. Deciding what is a quality score and what is an id is a tricky endeavor with many pitfalls. I'd like your opinion of my while 1 approach in the function read_fastq. This works, but I'd like you...
I have the following code working on a WordPress plugin. But there's no WP issue, the matter is: can I trust @get_headers to perform most of times? public function enqueue() { $http = is_ssl() ? 'https:' : 'http:'; $url = "$http//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.csss"; if( $th...
I have this (working) code: class CalendarDay attr_accessor :from_month, :to_month, :year def self.line_of_day_numbers(month,year,start,offset) @line='' @offset=offset finish = (start+6)-@offset self.first_line_padding(start) start-= @offset self.day_numbers(month,year,start,finish) end ...
In the _form partial I have a rather complicated logic which builds necessary options for input fields: - input_html_params = dynamic_settings_select_options('#service-settings', settings_aps_instance_services_path(parent)) = simple_form_for [:aps, parent, resource] do |f| = f.input :service_status, :as => :readonly...
Here is my code: public void findMiddlePos() { int pos = 1; Node pointerOne = first; Node pointerTwo = first; while(pointerOne.next.next != null) { pointerOne = pointerOne.next.next; pointerTwo = pointerTwo.next; pos++; } System.out.println("The middle element is : ")...
I'm just putting together a small project, checking to see if this would be the fastest/cleanest way to write out a function that grabs the 3 latest vital signs. Edit: I am thinking GetRecentVitalSigns should be in the domain model. Also, if I wanted to grab all the vital signs, I would just call the VitalSigns list, ...
I'm working my way through The Java Programming Language, Fourth Edition - The Java Series. This is Exercise 13.3: As shown, the delimitedString method assumes only one such string per input string. Write a version that will pull out the delimited strings and retun an array. The provided delimitedString method: publ...
It's not finished yet, but I want to know if the structure and the classes are ok and what can I change. Feel free to say anything. To be more specific, I want to know what you think about the login function in the Login_Controller class: public function login() { if (!empty($_POST['username']) && !empty($...
Any way to make this more concise/efficient? // Write a loop that reverses the elements of an array. #include <iostream> #include <iomanip> const int SIZE = 10; void reverse(int iArrayRef1 []); void display(int iArrayRef2 []); int main() { int iArray[SIZE] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // Display ...
I frequently have patterns as below, usually not this simple, which require me to first code a working solution for a single test case, and then to refactor the code to make it more concise. See the first incarnation below, then the final code. I'm looking to see what other techniques some use to skip the initial step,...
Please review my code/code quality. var textarea = document.getElementById("textarea"), inputFile = document.getElementById("input-file"), prtHelper = document.getElementById("prt-helper"), overlay = document.getElementById("overlay"), help = document.getElementById("help"), appname = " - ...
Given a sorted array of N elements, I need to find the absolute sum of the differences of all elements. Given 4 elements (1, 2, 3 and 4): |1-2|+|1-3|+|1-4|+|2-3|+|2-4|+|3-4| = 10 Here is my code in Java: List<Integer> a = new ArrayList<Integer>(); //just for understanding , the Array List is already filled with numbe...
I have an Access database that I'm converting to SQL Server 2008. One of the queries in the database uses the LAST function. The table has a AutoNumber ID so true order is simple. SELECT tbl_unit.unit, LAST(tbl_unit.date) AS Date, LAST(tbl_unit.mileage) AS Mileage FROM tbl_unit GROUP BY tbl_unit....
I have a matrix transpose function that takes arrays with a possibly different number of rows and columns. How can I improve performance and code quality? void matrix_transpose(float *matrix, int rows, int columns) { int current_row; int current_column; float temp; float buffer[MATRIX_TRANSPOSE_BUFFER_S...
I have two admin groups - VCS, and VPN. For each group, I need to get the list of all the people in that group, along with their IDs. What is the best way to do this? Could you please suggest if it is good enough? Also, should I use a map to store the data instead of creating a new object GetAdminInfo? public class Ge...
class MyClass{ static Integer carry = 0; public static void main(String args[]){ String s1 = "7654729850328997631007285998163550104"; String s2 = "5980139243970186632651869926335829102"; add(s1, s2); } public static void add(String a, String b){ ArrayList<String> res = n...
I have written code, but I don't like it, it seems very ungeneralized. I want to make it more abstract and universal and independent of type. I have the task to write programm, which can operate with multi level list. List should be done on array of void pointers. Data structure should be roughly like on the picture: ...
Per a Reddit Daily Programming Challenge, I am performing a matrix transposition on a string using JavaScript. Example input: 'The quick brown fox jumped over the lazy dog' Output: Tqbfjotld hurouvhao eioxmeezg cw pr y kn e d While my code works, I wanted to know: From a readability standpoint, would it be be...
I need array to store elements, but I don't want to make memory allocations at runtime. So I reuse elements. Some fields are never changes so as I reuse elements I need to assign those fields just once. This is what I wrote, only sceleton, need to add "errors test" etc, but enough to demonstrate the idea: public sealed...
I took a JavaScript challenge to finish a task related to logo of "Breaking Bad" where letters in your first name and last name are spotted with elements of periodic table and its respective atomic number. I wrote the below code, any suggestions to improve performance or any best coding practices function Process()...
I was receiving 405 method not supported errors on get requests to my save controller, so I created a get method which just calls the existing post one as follows: class Save(webapp2.RequestHandler): def get(self): self.post() def post(self): #... This seems to be working, but is there a more...
AccountController Code: public class AccountController : ApplicationController { public AccountController(ITokenHandler tokenStore, IUser user) : base(tokenStore, user){} public ActionResult LogOn() { return View(); } // // POST: /Account/LogOn [Ht...
I'm just after some sanity checking of this code: public struct function defer(required function job, function onSuccess, function onFailure, function onError, function onTerminate){ var threadId = "deferredThread_#createUuid()#"; local[threadId] = ""; try { cfthread.status = "Running"; th...
This is my first try with Python. I wanted to parse some Log4J so I thought it a good opportunity to write my first Python program. The format of the logs I deal with are simply like [INFO BLA 08:00:00] Blabla. Most of the time there are single lines like the above; but sometimes, there is a stack trace logged, so a l...
Here is a program that I've wrote to extract JPEGs from a file. It reads a file that contains the image data and separates it into individual images. import hashlib inputfile = 'data.txt' marker = chr(0xFF)+chr(0xD8) # Input data imagedump = file(inputfile, "rb").read() imagedump = imagedump.split(marker) count=0...
I'm trying to review this block of code to make sure logic is fine. The first version that I commented will create duplicated order 'my college developer' but I fixed it but "really not sure" I want to make sure my fix it exactly same as commented code the old logic "this code include duplicated" public void setOrdere...
Below is my implementation of an immutable stack class. The reverse function is trying to return a stack with all elements reversed. Is my implementation good? Maybe the reverse function can be faster? public class ImStack<T> { private final T head; private final ImStack<T> tail; public ImStack ( T head,...
I've written a function to parse configuration files. It doesn't handle file opening, but instead takes an array with the file contents and tries to find fields based on an array containing the fields' names. If found, it puts the content into its respective place. The only rules it has so far are: each field is delim...
I have ChaplinJS View, with template which varies according to the condition. I try to avoid switch statements, but I think it's messy at this moment. What can you advise? var SiteView = View.extend({ region: 'date', autoRender: true, className: 'date-label', containerMethod: 'append', initialize: ...
This was just an experiment to see if I could replicate something like C++ function pointers in Java. Basically, the idea was to have an object which represented a method call, and when you call .invoke() on that object, the method would run. It feels a little sloppy to me, and I feel like there may be some tricks of ...
I wrote a function that dynamically stores statistical data. I tried to clone the functionality of how I had originally written my solution in Bash. Is there perhaps something I could improve, or do better? Bash Solution #!/bin/bash data_set=() while IFS= read -r -p 'Enter statistical data (empty line to quit):' input...
I have the following piece of java method code: @Override public void applyStates(int timestamp, State[] states) { // Calculate the time diff between current time and the time stamp of the given states. int diff = getNetworkTime() - timestamp; if (diff <= 0) { Log.e("Ignoring states th...
Code review requested to make this code simpler, cleaner, and better. Input array is sorted. This program finds the greatest number smaller than x. So, in an array [10 20 30 40] and x = 25, the output should be 20. public class GreatestValueLesserThanEqualToX { public static Integer findGreatestValueLesserThanOrE...
I have inlined temporary FileOutputStream that I am not able to explicitly close. Is that a problem? File raw = new File(uri.getPath()); Bitmap myBitmap = BitmapFactory.decodeFile(uri.getPath()); File compressedPicture = MEUtils.createTemporaryFile(getPackageName()); // see here myBitmap.compress(Bitmap.CompressFormat...
I was trying to post this code to a Wikipedia article, but it was soon removed. I then asked about the code in the page's talk section, and some other contributors said that is was "very poor" and that "there are clearly going to be underflows all over the place." What does that mean? What is an "underflow"? Could...
I recently made a program in Python to open a list of URLs and split the queries into different files. I want to make this code more generic and simple. I am open to suggestions. def parse_file(): # Open the file for reading infile = open("URLlist.txt", 'r') # Read every single line of the file into an ar...
I find myself using this bit of code very often when I am retrieving the results from a Cursor SearchItem searchItem = new SearchItem(); searchItem.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_NAME_ID))); searchItem.setOrigin(cursor.getString(cursor.getColumnIndex(COLUMN_NAME_ORIGIN))); searchItem.setDestination(cu...
I recently wrote a function that replaces every white space with '%20', just for fun (and sharping my coding skills). The input string is terminated with extra white spaces, with the length that the string should have after encoding takes place. For example: input = "Not encoded " //2 white spaces in the end output = ...
I have a select with 3 options and two datepickers, a start and an end date. Based on the option selected, the date end date can either be any future date or limited to a 30 day date range. In the jsFiddle provided below, when Option 1 is selected, the date range is restricted to 30 days. If either Option 2 or Option 3...
I have some code to write Error Logs to different places like Console/SignalR Messages/Text File. The code is as follows:- public class Logger { public void WriteToLog(string message, LogType logType) { switch (logType) { case LogType.Console: Console.WriteLine(me...
I have a some classes and interface public interface IGeoObject { GeoCoordinate GetGeocoordinate(); } public class User : IGeoObject { public GeoCoordinate GetGeocoordinate() { //... return GeoCoordinate; } } public class Venue : IGe...
Following up on List<T> implementation for VB6/VBA, I'd like some thoughts about the revisited IsTypeSafe function, below. The previous version pretty much implemented VB.net's Option Strict setting, by only allowing widening numeric type conversions, and preventing implicit conversion between numeric and string data t...
Okay, here's a challenge at Coderbyte that completely stumped me. I came up with a solution, but I know it is flawed. Have the function ArrayAdditionI(arr) take the array of numbers stored in arr and return the string true if any combination of numbers in the array can be added up to equal the largest number in the a...
I am currently working on a game and found myself in need of an event handler. I wrote an event handler similar to this one some time ago, but decided to update it using variadic templates (this is my first time using them). I really wanted something with the simple usage that C# events provide. I found some example...
Today I've noticed that the source code for a Boolean adder is very repetitive, so I wrote a Python script to generate the C source code. The script generates an adder of varying size depending on the length of the added numbers, but the script is very hard to read and understand. How can I improve the readability of...
I've been working on implementing a doubly linked list from scratch in Java, and if anyone has time, could you critique it? class Node { Node prev; Node next; int data; public Node(int d) { data = d; prev = null; next = null; } } class LinkedList { Node head; publi...
I would like a code review to make this code better, clear, and concise. The problem it's solving is as follows: Given a matrix, print the circumference of each of the items. For example: 1 2 3 4 5 6 7 8 9 should result in 1 : 2 4 5 2 : 1 4 5 6 3 3 : 2 5 6 etc. Also, am I correct in saying the time complexity...
This is a boggle solver in Java. I would like code reviewers to optimize the code, suggest better coding practices, and help make it cleaner. I am also unsure of the complexity and would appreciate an explanation of it. public final class Boggle { private static final NavigableSet<String> dictionary; private ...
so, I am pretty new to this game, and am trying to understand javaScript way better than I currently do. I have this block of code, if it is too long to read, then just skip to my question at the bottom... function createCSSRule(selectorName, necessaryProperties){ //add class to control all divs var propert...
Just ended up with this approach for wp7 (no tag yet), in case someone would find it useful. Also, improvement considerations are welcome. It works with SimpleLogger.WriteLine("JustLine"); SimpleLogger.WriteLine(ObjectToBeCastedToString); SimpleLogger.WriteLine("Price is {0} {1}", price, currency); public class Simp...
I use the following code to get the changes between two collections. Objects are "joined" using a primary key. Any tips on performance issues or other optimizations appreciated. /// <summary> /// Gets the changes [Deleted, changed, inserted] comparing this collection to another. /// </summary> /// <param name="local">T...
I have two active records StudentDemographics and StudentWeeklyReport both having has_many relation like this: class StudentDemographics < ActiveRecord::Base has_many :student_weekly_reports, :foreign_key => :student_id end I have to check marks for each student in the last fifth week seminar with the latest one. If...
I'm not a Python developper, but I enjoy programming with it, and for a project I wanted to have generators that I can easily index. Using python's slice model is obviously the way to go, and here's the solution I've come up with. class _SubscriptableGenerator(): def __init__(self, generator, *args): self.g...
I am trying to setup an odds calculator for a best of 7 series, given independent odds for each event. The following code works, but I would like to add recursion to simplify the end. public class Game { public int No { get; set; } public List<decimal> Odds; public Game(int no, decimal odd1, decimal odd2) ...
Just a wrapper around IsolatedStorageSettings. The only thing i'm not sure about is isoSettings.Save(); Should i call it there? Looking like it works without it, setting [] is enough. class IsoSettingsManager { private static readonly IsolatedStorageSettings isoSettings = IsolatedStorageSettings.ApplicationSettings...
I am writing a dice roller winforms application using C# 2012 VS. Dice roller is set up for playing Shadowrun tabletop. I feel that there might be too much code going into the GUI, but I am unsure how it should be formatted. I am also very open to general advice. This is my first program I am trying to construct on ...
I am getting object of a class AAA from somewhere and I want to add more information in that object. So, I am creating a new class BBB which is derived from AAA. The class BBB has additional field dictionary. I am populating this dictionary in derived class constructor which is taking the Class AAA object and array of ...
Please take a look at this query and try to give me any other ideas that will give the exact same results more efficiently. SELECT username FROM users WHERE username NOT IN ( SELECT DISTINCT username FROM users, friends WHERE 'user1' IN (you,friend,username) AND you IN ('user1',username) ...
I am trying to format my code properly. I have already read the programming standards document and I believe that my code follows these rules. I have also used the CtrlShiftF keys in Eclipse which should format the code automatically. Could someone tell me if this looks ok? It would be nice to get some feedback back a...