instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to compile this: public class DNSLookUp { public static void main(String[] args) { InetAddress hostAddress; try { hostAddress = InetAddress.getByName(args[0]); System.out.println (hostAddress.getHostAddress()); } catch (UnknownHostException uhe)...
stackexchange/codereview
On the right end, there is a vertical slider, which I think is meant for you to choose the "intensity" of the color, eg darker red or paler red. Is this correct? The second question, as a layman to colors, I'd thought a dark red and a pale red has the same RGB proportion? But apparently this is not the case. Are darke...
stackexchange/codereview
I have created something cool for my purposes here: http://hinternet.com.au/projects/fullcalendar-1.4.8/index.php To try to declutter it, I have cloned everything to a new directory named calendar: http://hinternet.com.au/projects/calendar/index.php Note how the header is being duplicated? I can't figure out what is ...
stackexchange/codereview
i have a databound treeview in asp.net. how can i expand the root node and have the rest of the tree nodes all colapsed? thanks
stackexchange/codereview
In SQL Server 2008 I have a table called Zone with a column ZoneReference varchar(50) not null as the primary key. If I run the following query: select '"' + ZoneReference + '"' as QuotedZoneReference from Zone where ZoneReference = 'WF11XU' I get the following result: "WF11XU " Note the trailing space. How is this p...
stackexchange/codereview
Does anybody know if I can show the direction between two points using UIMapKit or another component (if there is any) just like how it is shown on the map used by Iphone with the same features (walking , driving )?
stackexchange/codereview
Im changing the background color of each row overriding onListItemClick with this piece of code @Override protected void onListItemClick(ListView l, View v, int position, long id) { // First time touching the item if(mLastPosition==-1) { mLastPosition = position; } else { mLocalBG.remove(String.valueOf(mLastId)...
stackexchange/codereview
I am trying to query a database that's on a server that I have a Remote Desktop connection to. What is required to be able to query a database on this server using my php web application.
stackexchange/codereview
I am currently working on an assignment for a datastructures and algorithms class. I have to delete the node out of the heap given; 6 after replacing the node ; 20 / \ / \ 11 9 11 9 / \ / \...
stackexchange/codereview
Firstly, let me apologize for the title, as it probably isn't as clear as I think it is. What I'm looking for is a way to keep sample data in a database (SQL, 2005 2008 and Express) that get modified every so often. At present I have a handful of scripts to populate the database with a specific set of data, but every t...
stackexchange/codereview
So one of my coworkers accidentally made a merge that actually only kept one side of the tree. So he started a merge, deleted all the changes introduced by the merge, and then committed the merge. Here is a simple test case I did on a test repo. This repo has three branches. idx is the topic branch that was accidentall...
stackexchange/codereview
Question If an ant target uses both if and unless, which is evaluated first? Example What comes first, the chicken or the egg? . . . <target name="prepare" if="chicken" unless="egg" > <echo>Dinner time. Chicken is served!</echo> </target> Would ant evaluate the chicken property first? Or the egg property?
stackexchange/codereview
For example: console> please enter 3 digits: 1 2 3 I only know how to accept 1 digit using scanf: scanf("%d", &space);
stackexchange/codereview
I am working on an exercise where I need to send the following bytes of data "0x80, 0x07, 0x52, 0x1f, 0x1f How would I go through with this? Thanks
stackexchange/codereview
In my application I want a search box, probably like the one provided by wx.SearchCtrl, with the search button and the cancel button included. I also want to know when the user presses Up or Down, so that I can browse through the search results. When I make a demo with wx.TextCtrl I can bind the event like this self.te...
stackexchange/codereview
I am having trouble playing audio inside a MPMoviePlayerViewController in the background. I can point it to mp3's just fine and listen to the audio, but when I go into the background, I don't hear audio anymore. I set the plist entry to keep playing audio and set the audio session toAVAudioSessionCategoryPlayback. When...
stackexchange/codereview
What is the best way to store a BitSet in App engine? They don't allow java.util.BitSet to be a property.
stackexchange/codereview
I am newbie C# developer. When I just have started to learn programming thins were pretty simple, you see the problem, you develop solution, test it and it works, that simple. Then you find out the design patterns and the whole abstraction thing, and you begin to spend more time on the code that yields no results, alwa...
stackexchange/codereview
I created two projects for iPad development. When i try to install two projects separately on iPad, it override one another. I mean, first i used my first project and run on the device, it has successfully installed, and then used my second project and tried to install, this time the second app overrides with the first...
stackexchange/codereview
I have a dev network setup modeled after a production setup at work, and I've been able to successfully query Active Directory when I'm in the same subnet and can resolve the server. Now, I'm trying to set this up where I am required to remote into a terminal server, which is the only internet accessible server, and us...
stackexchange/codereview
I used RMySQL for import database, sometimes when I try to close the connection, I receive the following error: Error in mysqlCloseConnection(conn, ...) : connection has pending rows (close open results set first) I have no other ways of correcting this other than restarting the computer, anything I can do so solve...
stackexchange/codereview
Say I have the following code in groovy: class Human { Face face } class Face { int eyes = 2 } def human = new Human(face:new Face()) I want to access the eyes property using the []: def humanProperty = 'face.eyes' def value = human[humanProperty] But this does not work as I expected (as this tries to access a p...
stackexchange/codereview
i have been using NHibernate in TDD environment and found it very helpful to be able to generate schema out of mapping file etc... And now i'm thinking of going with Entity Framework for next project. So just wonder if there is any equivalent library or tools for EF to generate DB schema etc?
stackexchange/codereview
Many people have this same problem, but everyone's implementation is different. I need help with my implementation of it. void sendUsingTcp() { try { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse(...
stackexchange/codereview
I have two forms Form1 and Form2 I am opening Form2 from Form1 on button_Click Form2 obj2 = new Form2(); this.Visible = false; obj2.Show(); then I want to get back Form1 Visible (on disposing Form2) in same states of Controls on which I left.....
stackexchange/codereview
Any ideas/tips/answers on how to keep the browser's Find [text on page] functionality while implementing Infinite Scroll, especially with a text subject matter entries (e.g. Facebook wall, or a blog that infinite scroll displays posts...). I can't recall an event for onFind or such. I guess you could watch for the key...
stackexchange/codereview
I've been having issues with STL sort. I'm trying to sort a vector of objects by a data member in the object. I've looked up several examples, but once it falls into my configuration it somehow doesn't compile under GCC. I tested on Visual Studio and it works. I get this error on GCC: no match for call to '(test::by_sy...
stackexchange/codereview
I'm looking to split a List of Strings up as i iterate throught the list imagine the following as the List. ["StringA.StringB.StringC"]["StringA.StringB.StringC"]["StringA.StringB.StringC"]["StringA.StringB.StringC"] So i want to iterate through the list pull out each string ("StringA.StringB.StringC") Then want to se...
stackexchange/codereview
On a system where size of a pointer is 4 bytes when the intention is to just address parts of memory that are addressable by two bytes(lower parts), is it possible to store the pointer as a two byte WORD when it's not in some cpu register? I don't see any way cause assuming we've got any WORD like one named "twoBytes" ...
stackexchange/codereview
I'm stumped, how do i fix this? The ProductAvailability table in my query does not have a record for each product found and throws the following error each time I run it. The cast to value type 'DateTime' failed because the materialized value is null. Either the result type's generic parameter or the query must use ...
stackexchange/codereview
I need to implement a WSDL interface (HTTP binding) for a variable list function. What I need to do is something very similar to a wrapper for an ipothetic WSDL export of a printf function, in example. The parameters that i'll receive will have both a name and a value, and they are both not known in advance. So an inpu...
stackexchange/codereview
How would I get a handle to the active gtk.Window in python? (not a window I created, but the currently focused window).
stackexchange/codereview
The first obvious way is to create a shortcut (.LNK) file in the Start Menu (or on Desktop) and in the Properties dialog to assign a keyboard shortcut (let's say Ctrl + Alt + F10). However, this way seems to have different issues, such as the shortcut key does not work if I'm pressing it in Firefox in Full Screen Mode ...
stackexchange/codereview
I'm running an online store on Magento. I have Google Checkout as a Payment method. The problem is if someone pays using it they don't always return to the site so it throws my Google Analytics conversion rates off. Is there a way to pass this information to analytics when the people don't return to the site after t...
stackexchange/codereview
I want to run some tests when my ASP.NET webapp comes online (preferably before anyone tries to access it), to make sure all of my runtime dependencies are available as I expect them to be. When is a good time to perform these tests (e.g. Application_Start, Application_Init, somewhere else, etc), and what's a good tech...
stackexchange/codereview
Do you know how strong VLIW architectures (or EPIC, like Itanium) support exists in LLVM compiler infrastructure? Are there good documents/slides materials on this?
stackexchange/codereview
Assuming a query as such in T-SQL. SELECT * FROM Stock S LEFT JOIN StockBarcode SB ON SB.StockID = S.StockID AND SB.ShopID = @ShopID AND SB.Inactive = 0 LEFT JOIN StockBarcode SB1 ON SB1.StockID = S.StockID AND SB1.ShopID = 0...
stackexchange/codereview
How can I have the ^-N in the statement below mean "to the power of -N" in Flashbuilder? Thanks var M:Number = 1 - (1 + J)^-N;
stackexchange/codereview
I have been looking at this code for a while now, and cannot figure out why matlab is not calculating correctly. Does anyone see anything that I may be doing wrong with this code? ((1-EU_P2par3(:,1))*US_P2par3(:,1))+((1-EU_P2par3(:,2))*US_P2par3(:,2))+((1-EU_P2par3(:,3))*US_P2par3(:,3))+((1-EU_P2par3(:,4))*US_P2par3(:,...
stackexchange/codereview
What is the most common strategy for tracking users with cookies without forcing them to register? Do I create a guest account, assign a GUID, and then put that GUID value in their cookie? Is there a more generally accepted method of doing this? Although this is a general web app question, I'm using ASP.NET MVC.
stackexchange/codereview
I am attempting to shuffle an array, but the way I am doing it only works about every fifth time. I would greatly appreciate if someone could explain why it is not working properly and perhaps propose a tweak. private Button[] scrambleBoard(Button[] buttons) { for (int x = 100 * buttons.Count(); x > 0; x--) { ...
stackexchange/codereview
I am populating jQuery accordion from simple xml file, I can get my data and append it as html to simulate accordion markup. Then I call for accordion, it won't work! I guess the problem is binding newly created data to DOM, I have tried .live() and .delegate with no success. How should I proceed? Here is simplified ex...
stackexchange/codereview
Multiple sites reference combining JavaScript and CSS files to improve web page performance, including examples of using ANT build scripts to concatenate the files prior to deployment. I've search, and haven't found any information how to automate updating references to those files in HTML and other documents. I am lo...
stackexchange/codereview
In the facefancheck directory, >git add . >git commit -m "facefancheck" >git push heroku In a random directory, >git clone git@heroku.com:facefancheck.git >cd facefancheck >rails s I get the thing I want in 127.0.0.1:3000, but not in facefancheck.heroku.com. So, why facefancheck.heroku.com did not run the same as git...
stackexchange/codereview
I have a perl script that is writing to stdout which is a tty. Is there a way to determine how many spaces to a tab on that tty?
stackexchange/codereview
I'm trying to make a communication between a PHP page and running Java server. Just a simple string exchange through sockets. This is my Java Code for thread that handles the connection: InputStream in = clientSocket.getInputStream(); BufferedReader br = new BufferedReader(new InputStreamReader(...
stackexchange/codereview
Possible Duplicate: How can I rewrite this query without sub-queries? I am not allowed to use sub-queries or any kind of temporary tables as a part of an answer, does this query use any of those? SELECT DISTINCT item_no, avg_price FROM Prices NATURAL JOIN (SELECT AVG(totalamount) avg_price FROM Prices GROUP BY pr...
stackexchange/codereview
Environment: WinXP. RAD: Version: 7.5.3 (Eclipse 3.4.2) Websphere 6.1 I have two web projects on my local RAD environment and 4 or 5 sub jar projects. When I change classes in debug and regular start mode, the files don't get copied to the server for runtime. So, normally I have to restart the server completely or add/...
stackexchange/codereview
Is there a way without using logic and bitwise operators, just arithmetic operators, to flip between integers with the value 0 and 1? ie. variable ?= variable will make the variable 1 if it 0 or 0 if it is 1.
stackexchange/codereview
In the following line of code: bootrec_reset(File(path, size, off), blksize); Calling a function with prototype: static void bootrec_reset(File &file, ssize_t blksize); I receive this error: libcpfs/mkfs.cc:99:53: error: invalid initialization of non-const reference of type 'File&' from an rvalue of type 'File' libc...
stackexchange/codereview
I am using python/django as for programming language/framework. What i need to know is totally about postgresql and indexing... For those who uses django probably know Content Type and Django Admin Log. But shortly, Admin log is logging user action. I also use it for logging all actions performed within the site. So it...
stackexchange/codereview
I am having issue in federating data from remote server into my local machine, my local machine is a virtual machine running mysql server. I have create a replica of table structure from federated server, using the connection string CREATE TABLE Contacts ( ID INT(20) NOT NULL default '0', AccountNumber ...
stackexchange/codereview
I have my company dependencies (including non-FOSS third party stuff) in a Nexus repository, including source jars (downloaded with mvn dependency:resolve), where available. I would like to have the source jars (and javadoc jars) download to my local repository (~/.m2/repository) so that I can go "offline". I tried var...
stackexchange/codereview
I'm trying to parse a legacy language (which is similar to 'C') using FLEX and BISON. Everything is working nicely except for matching strings. This rather odd legacy language doesn't support quoting characters in string literals, so the following are all valid string literals: "hello" "" "\" I'm using the following r...
stackexchange/codereview
why not: public native long hashCode(); instead of: public native int hashCode(); for higher chance of achieving unique hash codes?
stackexchange/codereview
Do you know how to achieve the same effect as winamp for android ? I want to do the similar thing. That is when I click on listview, sliding drawer popup. But so far I only can show the sliding drawer in new activity not in the same. How can I achieve in overlap view. That is when I close the drawer, the layout is show...
stackexchange/codereview
I am using MVVM pattern for Silverlight. I have these projects: MVVMDemo.Data (Ria services link set to MVVMDemo.Data.Web) MVVMDemo.Data.Web (Contains all RIA services) MVVMDemo.Data.ViewModels MVVMDemo.Data.Models MVVMDemo (contains all views) MVVMDemo.Data.Common (contains all interfaces) This is my RIA servi...
stackexchange/codereview
We have a solution comprising of a windows application and various library files. Not all of the library files are referenced by the main windows application however we would like to have all the library files included in the output build folder "bin". Obviously one solution is to simply reference every single library ...
stackexchange/codereview
I'm needing to extract a portion of an href attribute using javascript. I've come up with a solution, but I'm not sure it's the best way. Below is my sample code. I've got a variable with the complete href path -- and all I'm interesting in extracting is the "Subcategory-Foobaz" portion. I can assume it will always be...
stackexchange/codereview
I use annotations to mark methods which should be executed in a transaction. But, in one place I need to do transactionManager.rollback() manually, without annotation. How can I obtain transactionManager object?
stackexchange/codereview
I write a demo mapview in Titanium (iPhone). Here's the code I get from KitchenSink: var win = Titanium.UI.currentWindow; var annotation = Titanium.Map.createAnnotation({ latitude:42.334537, longitude:-71.170101, title:"Boston College", subtitle:'Newton Campus, Chestnut Hill, MA', animate:true, ...
stackexchange/codereview
I have an objects array like this: Array ( [945] => member Object ( [id] => 13317 [name] => Test 999 [last_name] => Test 999 ) [54] => member Object ( [id] => 13316 [name] => Manuel [last_name] => Maria parra ...
stackexchange/codereview
I still have some issues with my c code that deals with an memory mapped device. At the moment I declare the address space for the registers I write as volatile pointer and I write data to them as shown below: volatile unsigned int *wr_register = (int *) 0x40000000; volatile unsigned int *c_register = (int *) 0x400001...
stackexchange/codereview
Alright I have been trying to figure this out and I read the MSDN page on the JavaScriptSerializer. However, I still can't figure out how to get this to work on an asp.net page. I want to convert my dataset into a json string so I can graph it using FLOT(graphing tool) THIS MADE IT WORK THANKS FOR YOUR HELP GUYS: thi...
stackexchange/codereview
This is a question specifically about plugin development for the Eclipse platform: I want to add a menu item to the default menu which appears when right clicking a kind of IMarker (all markers would be a good start). I have had some success with implementing IMarkerResolution and referring to it in my plugin.xml <exte...
stackexchange/codereview
I can't seem to find any useful sites about MySQL news/tips other than mysqlperformanceblog.com. Much of that sites postings are way over my head. I was wondering if someone could share what other useful MySQL sites are out there?
stackexchange/codereview
I'm trying to get the IODeviceTree path of a device using the IOKit framework. I'm able to get the IOService path (IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SATA@B/AppleMCP79AHCI) of the device using this code: CFMutableDictionaryRef matchingDict = NULL; matchingDict = IOServiceMatching("AppleMCP79AHCI"); ...
stackexchange/codereview
I've been working on a pet project for a few weeks now, and starting to think that it may get used by myself and a few friends. At present, it's really just a pile of Objective-C classes in an XCode project with a main() I've been using to test various features. Going forward it seems easiest to use this library in p...
stackexchange/codereview
When selecting, and holding, one of my custom cells for a UITableView plain-style table, it displays my custom selection color (redColor in this case), but then if I keep it held down and scroll, the custom selection color and the custom background disappear (showing through to the UIImageView behind the table. The UIT...
stackexchange/codereview
Does a OpenID library that works on mono 2.8 exist? I tried DotNetOpenAuth, but it fails.
stackexchange/codereview
After installing the Groovy plug-in in Eclipse, clicking Run brought up a list: Groovy Console - Groovy Script - Java Application. I'd select Groovy Script and it would take off. Now, after checking out a colleague's Groovy project with Subclipse, opening a script in it, clicking Run brings up "The selection cannot be ...
stackexchange/codereview
In my rails app I have a contact form that lets users send an email to my gmail account. Problem 1 I'm using the same gmail account to send the emails as I'm using to receive them, and thus when I click the 'reply' button, gmail sets-up a new email to myself.... My mailer looks like this: class Notification < ActionMai...
stackexchange/codereview
I'm using the push handler of Core Motion for accelerometer updates: CMAccelerometerHandler accelerometerHandler = ^ (CMAccelerometerData *accelerometerData, NSError *error) { // handle update }; [motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue mainQueue] withHa...
stackexchange/codereview
I have a question about WiX installers Currently if the user selects Custom Setup, they get this screen. It defaults to having nothing selected to install, but the “Next” button is still enabled. If the user clicks “Next” when nothing is selected, the installation attempts to proceed, but encounters throws and except...
stackexchange/codereview
I'm using the awesome JSLint tool to ensure my JavaScript is "strict". When I use it however, I get the following errors: 'hexRed', 'hexGreen', 'hexBlue', 'color' are already defined (referring to the "else if" clause) My code is below. Any ideas how to fix my code to make it JavaScript "strict"? function fade(curren...
stackexchange/codereview
Does any know any simple library that can generate some "loading" effects without using any images? The reason why i'm asking is that i've been using ajaxload.info now and then, but it only really works well on a solid background color.. with a background gradient or pattern, it looks bad... it's also annoying to have ...
stackexchange/codereview
I have set up an ldap authentication using the following configuration. I just need to user to authenticate to the LDAP data store, then have their session get an authentication token. From reading the docs, this is what I am thinking is supposed to happen: applicationContextSecurity.xml <ldap-server id="contextSource...
stackexchange/codereview
I'm new and a little ignorant in C++ and I encounter a C++ code that used a singleton pattern, class CFoo { public: static CFoo& getInstance() { static CFoo self; return self; } private: CFoo(){} ~CFoo(){} }; I am just confused why return a static reference? Is this a valid code? Why the pr...
stackexchange/codereview
Is there a way to tell Django Evolution to add a new field to a database table at a specific position, similar to the AFTER statement of (My)SQL? I have a table with some columns and I want to add new_column after column1. Using SQL directly I would do this: ALTER TABLE `db_table` ADD `new_column` DATETIME NULL DEFAU...
stackexchange/codereview
in a Silverlight-Windows Phone 7-project I am creating an HttpWebRequest, get the RequestStream, write something into the Stream and try to get the response, but I always get a NotSupportedException: "System.Net.Browser.OHWRAsyncResult.AsyncWaitHandle threw an exception of type 'System.NotSupportedException' My produc...
stackexchange/codereview
We are upgrading from Java 1.5 to Java 6 and J2EE 1.4 to Java EE 5. We are using Oracle 10g. Java EE 5 only supports JDBC 3.0, but Java 6 supports JDBC 4.0. If I am running on a Java EE 5 server with Java 6, can I use the JDBC 4.0 API in my Java EE 5 web app? Which Oracle thin driver should I use? Is it ojdbc6.jar from...
stackexchange/codereview
In C# 4.0, you can use the "dynamic" keyword as a placeholder for a type that is not known until runtime. There are certain corner cases where this is extremely useful behavior. Is it possible to emulate anything like this in C++, possibly using C++0x features or RTTI?
stackexchange/codereview
Many people believe Hungarian notation is bad. How then do you name a variables that represent the same value casted to different types? I've got a variable called value, that might be a string, or a decimal. What would you call the different formats? strValue, decValue? valueAsString?
stackexchange/codereview
In my application, I will remember user's language choice in session. The problem is if I use output cache, then the change language function will not work, because it caches the result when I retrieve from database according to the Session["lang"] value. So if I have another method to use cache function ? Or how can ...
stackexchange/codereview
I've got an idea for an app I'd like to work on to learn a bit more about Twisted and WebSockets. I was thinking of integrating a previously written IRC Bot into a web application. As far as I can see it, I would need three reactors to make it work: Primary Reactor: Web Server (HTTP). This would be your average tw...
stackexchange/codereview
In my page I've added Facebook Comments as well as Share button. Everything was done according to their instruction, so : I've included loading script : <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '161771113844567', status: true, cookie: true, xfbml...
stackexchange/codereview
I have made a simple script application which accepts radius as input from user and calculates and displays area of circle based on input: -- initializing radius variable to some text set radius to "Some text" repeat until class of radius is number -- asking user for radius display dialog "Enter radius: " default ans...
stackexchange/codereview
how can i track the number of undo operation of a wpf richtextbox?
stackexchange/codereview
Is it possible? how is it implemented?
stackexchange/codereview
Hi please refer the following HTML code: <div id="content"> <p> <font size='2'> <img src="something.jpg" width="500" height="500" /> this is the text content. this is the text content. this is the text content... </font> </p> </div> this is the html code which is being generated fro...
stackexchange/codereview
I am going through a piece of code for packet injector. When I tried to compile it, It is showing the error : IP-Packet-Injection.c:155: error: lvalue required as left operand of assignment IP-Packet-Injection.c:156: error: lvalue required as left operand of assignment Code for that particular part is : unsigned char...
stackexchange/codereview
I have the following models with associations as given below:- class Comment < ActiveRecord::Base belongs_to :post belongs_to :user end class Post < ActiveRecord::Base belongs_to :user has_many :comments end class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverab...
stackexchange/codereview
My installer creates the reg key under HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace which creates an icon on the desktop during installation but after uninstallation, that icon stays until I press F5. So I googled and found it from here, so I added : <CustomAction Id="CA_RefreshDesktopVB" ...
stackexchange/codereview
When shutting down my project's WebSphere-based JavaEE application, distributed transactions are sometimes left alive in the SQLServer 2005 database. These retain their locks forever and must be killed manually. They are described generally in this very good article. The article talks about how the transaction coordina...
stackexchange/codereview
BigQuery at the top gets a set of Products and nested related tables. Then, I apply filtering in a poor attempt at a specification pattern. This is the filter code. There are three tables in the query, and I want to filter the top query by the value nested in the bottom query. Like I said, this currently produces t...
stackexchange/codereview
I am working on a Facebook App that needs to be able to average three numbers. But, it always return 0 as the answer. Here is my code: $y = 100; $n = 250; $m = 300; $number = ($y + $n + $m / 3); echo 'Index: '.$number; It always displays Index: 0 Any ideas?
stackexchange/codereview
I wish to avoid switch statement by defining a pointer to a vector. I need help to use insert and erase methods. bool selectFirst = true; std::vector<int> v1, v2; std::vector<int> *v = selectFirst ? &v1 : &v2; v->push_back(0); But how to insert or erase values from v ??? Thank you
stackexchange/codereview
We're using the PostMethod in org.apache.commons.httpclient.methods and noticed that the recycle method from the HttpMethod interface has been deprecated. Is there an alternative to this method?
stackexchange/codereview
So my question is around a complete AJAX driven website with a powerful / normal Codeigniter backend. What I want to do is when a user comes to: http://domain.com/#/controller/function The main view is rendered based on the value after the #. I want to route my request based on the value after the # symbol and pretend ...
stackexchange/codereview
I'm working on a django project where all my unit test cases were working perfectly. Ass soon as I introduced a second database all my test cases that inherit from TestCase are broken. At this stage I haven't build any test case for that second database but my router is working fine. When I run the tests I get the err...
stackexchange/codereview