instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am just reading on the MSDN about Precision Handling. Taken out from the table on this site: Operation: e1 / e2 Result precision: p1 - s1 + s2 + max(6, s1 + p2 + 1) Result scale: max(6, s1 + p2 + 1) For the explanation of the used expressions: The operand expressions are denoted as expression e1, with precisio...
stackexchange/codereview
We have a simple HTML login form on our embedded device's web server. The web server is custom coded because of severe memory limitations. Regardless of these limitations, we like Chrome and would like to support it. All browsers post an HTTP Request to our login form containing the expected "username=myname&password=m...
stackexchange/codereview
IVY doesn't seem to be supported in IRAD 7. I wanted to move away from this. Any advice?
stackexchange/codereview
First of all, I have very little knowledge of what shaders can do, and i am very interested in making vertex lighting. I am attempting to use a 3d colormap which would be used to calculate the vertex color at that position of the world, and also interpolate the color by using the nearby colors from the colormap. I cant...
stackexchange/codereview
I have downloaded and installed the pion network library. I am trying to build the sample web services (HelloService etc). However, I cannot find instructions on how to build the examples. Running make in the directory returns 'Nothing to be done for all' Has anyone ever managed to build the pion network library web se...
stackexchange/codereview
I have a number of EditTexts inside a scrollview. In the background these fields are linked to a number of other fields and regularly (once a second or so) the layout has it's textfields updated depending on the values in the EditText. The problem is if one EditText has focus at the top of the ScrollView and the user s...
stackexchange/codereview
I'm trying to build gcc 4.6, but I'm getting some linker errors that look like it means bison or flex isn't getting linked to. When the makefile issues this command: gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -peda...
stackexchange/codereview
Hi I am writing an application with java. In my application I need a method to connect each point to its two closest point between many different points (draw a line from a point to its two closest points). At first I created this method so as to connect each point to its closest point: public void connectingPoints()...
stackexchange/codereview
Suppose we have 'foo.cpp' includes 'bar.h' includes 'baz.h' includes 'grog.h', and 'grog.h' has an error in it. GCC will produce a message that says something like "error in file grog.h, included from baz.h:10, included from bar.h:5, included from foo.cpp:20." Is there any way to make MSVC produce a similar message? So...
stackexchange/codereview
Possible Duplicate: Operation between hours. I have 2 buttons if you press each one will come out time picker and return the time chosen in the button. How do I subtract the two times? I try to explain it with and example: I press button one, and I have time picker coming out, I choose lets say 6:00pm. 6:00pm will r...
stackexchange/codereview
I'm trying to instantiate a Regex with the correct pattern for getting only the right value of a string. My text file has: Comment ID : 1234.5 and I would like to get the right value as follows: 1234.5 What would be the correct Regex pattern? here what I have so far new Regex(@"^Comment ID\s*:\s*(?<comment_id>\w+)", ...
stackexchange/codereview
I am trying to display a loading.png graphic in the very short time it takes to do my query e.t.c Everything below works perfectly currently. I just need to get the graphic loading in the td.available only when the productcode has been entered and is being checked. Any ideas? Here is my JS $("#prodcodecheck").blur(fu...
stackexchange/codereview
I try formatting text in richTextBox, something like in skype chat. 1.column-"Nick" 2.column-"Text of Messange" 3.column-"DateTime" I want alling 1. column max left and 3. column max right. What is the best way how can I do it? I am using WPF.
stackexchange/codereview
Explain the following 2 regular expressions. Where would they be used? What potential problems do you foresee in using them? ^[a-zA-Z0-9]+([_.-]?[a-zA-Z0-9]+)?@[a-zA-Z0-9]+([_-]?[a-zA-Z0-9]+)*([.]{1})[a-zA-Z0-9]+([.]?[a-zA-Z0-9]+)*$ ^[^<>&~\s^%A-Za-z\\][^A-Za-z%^\\<>]{1,25}$
stackexchange/codereview
In sharepoint 2003 (and 2007 I believe) when I put an HTML file in a shared folder I could visit it's URL and view it as a website. With Sharepoint 2010 the 'attachment' content-disposition header is sent and I can no longer do this (the HTML file is downloaded rather than viewed). I really want to make a micro site us...
stackexchange/codereview
We started to migrate a project from VS2008 with stored procedures to VS2010 with the Entity Framework 4 as ORM. Now I had to do a rather complex LINQ query to get the data out of our database. I usually first try to figure out the LINQ query using LINQPad (great tool btw!). Now what I have noticed is that the LINQ to ...
stackexchange/codereview
First let me explain that I am on a hosted solution, and there is not much I can do in ways of configuration and settings for IIS 6. I have MVC2 working to a degree, I'm using the following Global.asax code: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{...
stackexchange/codereview
I have to use this piece of code to save some values in table when page loads. The function to search values is in php. I have to use those values in script. I am trying this way but its not working. <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <script> $(document).rea...
stackexchange/codereview
How do I go about adding a ButtonColumn to a DataTable. I am basically using a DataTable as the DataSource of a DataGrid and need to add a ButtonColumn to the DataTable so that when I DataBind it to the DataGrid it all works. Although when I try dt.Columns.Add(buttonColumn) This is not allowed. It has to be a basic Da...
stackexchange/codereview
I have a situation where I need to process and finally insert 1000s of records from a temptable into a database table. Before each insert, I need to ensure that conditions are met and right after each insert, I need to update a second table in my database. My problem is that currently, it takes approximately 25 minutes...
stackexchange/codereview
I am very curious why Ruby render decimal with precision 2 inconsistently. For example: helper.number_to_currency 9.995 => "$9.99" whilst helper.number_to_currency 10.995 => "$11.00"...should it be "$10.99"?
stackexchange/codereview
I'm working chequePrinting project using windows-form, where one of my requirement is to print Cheque Receiving voucher by clicking print button, but it's giving me the print out of whole window form instead of giving only white part of the following image. The code, which I'm using for print preview event handler ...
stackexchange/codereview
In my project, legacy code generates xml which has following structure : <Output> <Template recordID=12> <Employer type="String"> <Value>Google</Value> <Value>GigaSoft inc.</Value> </Employer> <Designation type="String"> <Value>Google</Value> </De...
stackexchange/codereview
Okay, I'm about 2 inches away from solving my problem, and now I'm not sure how to proceed. Dev site: http://www.kendraschaefer.com/meilin I'm using Mootools and jQuery in the same page to create a one-page site. Mootools handles the page scrolling - page scrolls up and down within a specified div. Jquery handles all...
stackexchange/codereview
Good day. I never really got a good hand at JavaScript, therefore this unusual and simple question. How can i load a page content to a JavaScript variable, with the least amount of code, no framework, and the less impact possible on performance? Thanks. EDIT Sorry guys. I forgot to mention: Get the page content from t...
stackexchange/codereview
I am adding a system to leave "notifications" for users that can be displayed the next time they log in. I created a simple Notification class in the models.py file. I have this UserInfo class (in the same models.py) to add on some attributes to Django's existing user system as part of socialauth: class UserInfo(models...
stackexchange/codereview
I have to show the list of products added to a particular category on ajax request. So when i tried to use category filter method it shows fatal error. Using magento 1.4.1 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.category_ids' in 'wh...
stackexchange/codereview
I have a compound visual control which consists of edit box and a drop down button. The drop down button is not a windowed control and is drawn over edit box. I limit edit's width with following call: SendMessage(Handle, EM_SETMARGINS, EC_RIGHTMARGIN, (DropDownButtonWidth + 2) shl 16); It works fine under Windows X...
stackexchange/codereview
What does the |= operator mean in C++?
stackexchange/codereview
Can i set any cell attributes dynamically of a report file from the c# code in its host 'report.aspc' page. I have a db and have added a report.rdcl to my solution, i have also put a reportViewer component into my report.aspx page. I get the data displaying ok but i want to color certain rows etc based on data itself.
stackexchange/codereview
I’m trying to build a Deployment Package in Visual Web Developer Express 2010 which sets the ACL for a subfolder of the deployed website. I used the following information http://leethams.wordpress.com/2010/06/12/modifying-directory-permissions-with-web-deployment/ This is my test: Create a new blank ASP.NET Applicatio...
stackexchange/codereview
I would like to import an C++ GUI Project with its own Makefile in Eclipse. In the command prompt, everything works fine. But when I import the project, it gives an error make all make: *** No rule to make target `all'. Stop. Would be glad, if you give me an idea where I am going wrong. Thanks Kiran
stackexchange/codereview
I have a list of tracks (model railroad tracks) with different length, example: TrackA on 3.0cm, TrackB on 5.0cm, TrackC on 6.5cm, TrackD on 10.5cm Then I want to find out of what kind of track I should put together to get from point A to point B with a given distance and a margin. And I should also be able to a priori...
stackexchange/codereview
This is not so much a problem, just something that I would like to understand. I have a function within a dll that returns a datagridview to a GUI call. Within the dll file I have an eventhandler that monitors for a click within a certain area of the datagrid. When I run this on the GUI using the returned Datagrid, t...
stackexchange/codereview
i have an iframe that which source need to be updated and refreshed. the way i want to do it is to click on an and with it's onclick function, i need to send something like myiframe.Attributes["src"] = "blah.aspx"; is there any quick way to do this? thanks in advance
stackexchange/codereview
Is it possible/recommended to use the InstallService element to install a Windows service written in managed code (C#)? (I tried it and it does install the service, but the service won't start) Or does this require a custom action which invokes Installutil? Or is there another way to do this?
stackexchange/codereview
I have a table that stores a queue of tasks. Every task looks like: Id | Operation | Argument | Status Operation is a string Argument is a single number Status is one of : Queued, Busy, Complete, Failed I need to figure out a position of an item in a queue, but need to skip tasks that are not queued. Example: 1 A ...
stackexchange/codereview
I've created a combobox from converting a xmlWidget to a comboBox with the function castTocomboBox and now I want to get the text or the index of the active item. The problem is that if I use the comboBoxGetActive function it returns an IO Int result and I need to know how can I obtain the Int value. I tried to read ab...
stackexchange/codereview
Just as my title . I want my VS to auto indent for me like in VBNET . Please help.
stackexchange/codereview
I'd like to ask for recommendations for a development environment with the following basic requirements: on recent Fedora (e.g. 13 or 14) GNU/linux distribution developing gtk+ apps with C isolated (installation of files shouldn't affect the main system's system files) allows for cheap snapshot of the entire developme...
stackexchange/codereview
Learning about SOA. Is it mostly decoupling by way of web services, one service provides web services to another, thereby staying decoupled and encapsulated? Thanks. edit: that and maybe a good front end to them like some MVC design?
stackexchange/codereview
I would like to re-design my application into components, so it is more modular and easier to re-use in the future, but I've never really designed applications, so I don't really know how I should do this. Here is a brief description of the application: The purpose of the Application is to allow the User to create "Ev...
stackexchange/codereview
I am trying run phpUnitTest (3.5.4) with Zend_Framework (v 1.10.8) and still receive Zend_Controller_Exception: No default module defined for this application for example test of class AuthControllerTest which extends Zend_Test_PHPUnit_ControllerTestCase /** * @test */ public function loginPage() { $this->dispat...
stackexchange/codereview
I'm using RSpec 2 with webrat in Rails 3 to test my views. I want to make sure the views don't show special characters (like &ldquo;). Here is my spec: it 'does not show special HTML characters' do get '/' response.should_not contain('&ldquo;') end Problem is webrat parses the &ldquo; quotes while the browser - test...
stackexchange/codereview
Config file. How should I read values of username and password in C# using System.Configuration.ConfigurationManager class? I have tried several stuff but to no avail. The app.config is given below. <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.Applicat...
stackexchange/codereview
I have a set of .doc files which I want to perform some simple changes to (e.g. set the font of all the text in each file to be arial). I don't want to do all the operations manually. I thought I'll try to automate it with a Python script. Is it a complicated task? How is it done? I use Python 3.
stackexchange/codereview
I need to read lines in URL html page from specific line. For now, I have the following code: u = new URL("http://s.ll/message/" + counter); is = u.openStream(); // throws an IOException dis = new DataInputStream(new BufferedInputStream(is)); while ((s = dis.readLine()) != null) { if (s.contains('%') .....
stackexchange/codereview
I see this: // thread is a member of this class synchronized( this.thread ) { this.thread.running = false; this.thread.notifyAll(); // Wake up anything that was .waiting() on // the thread this.thread = null; // kill this thread reference. // can you do that in a synchronized block? } Is it ok to set the t...
stackexchange/codereview
Let's say that a function which returns a fixed ‘random text’ string is written like char *Function1() { return “Some text”; } then the program could crash if it accidentally tried to alter the value doing Function1()[1]=’a’; What are the square brackets after the function call attempting to do that would make the p...
stackexchange/codereview
I have a couple instances of a J2EE app running in a single WebLogic cluster. At some point, these apps do a MERGE to insert or update a record into the back-end Oracle database. The MERGE checks to see if a row with a specified primary key is there or not. If it's there, update. If not, insert. Now suppose two app ins...
stackexchange/codereview
What's the best way to export changes between 2 SVN revisions and save the changes (files/folders) locally? Possibly through the command-line? Thanks
stackexchange/codereview
I am trying to test an Android application. I need to send mock location to test this. I have registered for requestlocation updates(..)method (as follows) locationManager.requestLocationUpdates(bestProvider, 20000, 0, this); Tried sending mock locations through Eclipse DDMS tab as well as telnet-ing from command...
stackexchange/codereview
So I'm designing a website (using WordPress), and I want to use JQuery to hide/show a certain element when another element is moused over. The HTML looks roughly like this <div class="post" style="clear:both;"> <a href="..."> <img src="..." /> </a> <div class="autohide"> <h3> <a...
stackexchange/codereview
I'm experimenting with a very simple php server. It accepts one connection, reads what's sent, writes it and exits (I'm running it from the cli). The code is what follows. The problem is that whenever the length of the data exceeds 1024, it doesn't intercepts the end of data and so it just hangs. Any help? Thanks $out...
stackexchange/codereview
I want to round the top right and top left of the UINavigationBar. I know that there are functions for changing the views corner radius, but is it possible to do something similar to the standard UINavigationBar? If you don't know what I'm talking about, check out this: Thanks!
stackexchange/codereview
I have this program that simulate a soccer penalty kick between 2 teams. -The goal is 24 x 8 with coordinate (0,0) at the bottom left corner. -Each team has 5 kickers and 1 goalkeeper (for convenience, I'll call the 2 team Team A and Team B) -Team A - there are 5 strategies for the kickers (one for each), and there are...
stackexchange/codereview
i have sharepoint 2010 Portal and created Performance point Dashboard in this portal the dashboard contains page that have Report and Filters these filters is multi tree filter type the problem that i am unable to expand filter tree in arabic website which is RTL but in English site it works good. Thanks
stackexchange/codereview
I use DispatcherTimer because I need to do an operation every couple of minutes. Inside this I call a BackgroundWorker to do my work, and then use the dispatcher attached to the timer to update my UI. I'm thinking the error I'm getting has to do with the timer, but I'm not sure. Is the dispatcher done or the background...
stackexchange/codereview
The customer needs to change the order of items as he wants, which means I need some "order" or "sequence" column to save actual position of each item. How can I implement this using Doctrine 2?
stackexchange/codereview
In routes.rb I have map.resources :groups, :collection => { :find_or_create => :get, :search => :get } do |group| group.resources :recruitment_periods, :controller => 'groups/recruitment_periods' do |period| period.resources :recruits, :controller => 'groups/recruitment_periods/recruits' if I wanted to redirect...
stackexchange/codereview
I'm using Codeigniter 1.7.2 with the OBsession library to handle sessions and store them in a database. The app I'm working on consists of a domain (the one with CI) that acts as a service (don't know if this is the correct terminology). Other sites include a JavaScript file from that domain and from there, make an AJA...
stackexchange/codereview
I have a Facebook application build with PHP/MySQL, both are installed in the same server. The server have a high load now, and I want to order a new server only for MySQL Server, Server stats today : 4.5 M Queries / day. 164.57 k Queries / hour. 2.74 k Queries / minute. 45 Queries / sec. What is the best server hard...
stackexchange/codereview
I'm parsing something like this: 11/23/10 23:29:57 which has no time zone associated with it, but I know it's in the UTC time zone (while I'm not). How can I get Ruby to parse this as if it were in the UTC timezone?
stackexchange/codereview
I've written this beauty: #include <iostream> struct something { static const char ref[]; }; const char something::ref[] = ""; template<int N, const char(&t_ref)[N], typename to> struct to_literal { private: static to hidden[N]; public: to_literal() : ref(hidden) { for(int i = 0; i < N; i++)...
stackexchange/codereview
C99 adds several useful features to the language, yet I find it difficult to recommend any practice which depends upon C99. The reason for this is because there are few (any?) actual implementations of the C99 language. Sure, there is limited support in a few compilers, but nobody wants spend the time to write C code o...
stackexchange/codereview
I have a RadioGroup inside of a RelativeLayout. I've got a few RadioButtons for different options, like "Bob", "Joe", and "Fred". However, I need to add an "Other..." option with an EditText right next to a RadioButton in case a user wants to enter "Steve". Is there a way to do this?
stackexchange/codereview
In my war, built by Maven, I find two identical copies of web.xml file, in the same exact path. This is shown by opening the war in 7-ZIP. How can I debug this and find what exactly is causing this duplication?
stackexchange/codereview
I have now managed to get a status posted when a user clicks a link. I would now like a status to be posted when they first login with Facebook and accept the permissions. Please help! I am using this code for the login button: <fb:login-button ></fb:login-button> Be specific with me I'm new to the Facebook Connect.
stackexchange/codereview
I have an ObservableCollection items. I want to convert these to XML format so that I can store them for later use. I'm a little new to LINQ and I'm not sure how to do this. I know that I need to rely on the XDocument. But I'm not sure how to execute the query and get the results into a string format. Can somebody plea...
stackexchange/codereview
I need help with a program I'm making. It's a version of Conway's Game of Life. This game is right now made out of 3 files: main.py, cellBoard.py, cell.py main.py takes care to instance cellboard and make it update its data, give it mouse input, and tell it to draw itself (an instance of the pygame surface is given to ...
stackexchange/codereview
I have a simple rectangle-tile collision scheme set up, and it works beautifully. The only problem is when you start falling off of a ledge. Your speed reaches the point where the change in Y/X each frame is large enough for you to clip into solid objects and glitch about. Basically my setup is as follows: To start wit...
stackexchange/codereview
I am trying to create a set of custom tags for some liquid templates using Rails 3. I added a 'liquid_tags.rb' in my lib/ directory with content like this: class UserControls < Liquid::Tag def initialize(tag_name) super end def render(context) tag = "<b>TAG...
stackexchange/codereview
The question says it all: How can I get an access token to use on graph api calls from a asp.net webforms 4.0 iframe canvas app. My canvas application has been configured to enable the OAuth 2.0 for Canvas (beta) among other things. This means I am getting the signed_request parameter on my iframe which I am successfu...
stackexchange/codereview
I'm using MySQL Workbench to model my database. In it, I have the option to create relationships by identifying foreign keys, etc. What's the point of this? I am able to run my queries just fine without these relationships. My tables do have an actual column for foreign keys, I just didn't define them in MySQL Workbenc...
stackexchange/codereview
I am trying to write my first program in C++, and I need to use Boost library. I am trying to write a program which recursively goes through a directory tree and returns the date of the newest and the oldest file. This is where I'm now: #define BOOST_FILESYSTEM_VERSION 3 #include "boost/filesystem.hpp" #include <iostr...
stackexchange/codereview
Hey all, I received a termination on my app and this error in the logcat: 11-22 22:41:25.193: ERROR/AndroidRuntime(30974): FATAL EXCEPTION: main 11-22 22:41:25.193: ERROR/AndroidRuntime(30974): java.lang.ArrayIndexOutOfBoundsException 11-22 22:41:25.193: ERROR/AndroidRuntime(30974): at com.project.main.main.analyze...
stackexchange/codereview
Is there a quick-and-dirty way to access the "producer" metadata of a PDF file, using Regex or XML parsing, from a PHP application? The technique does not have to be infallible. The objective is to prompt the user if they upload a PDF created using TeX.
stackexchange/codereview
If the Controller have the code $this->autoRender = false; the session can't write. function login() { $this->autoRender = false; $this->Session->write('Student', 'test'); }
stackexchange/codereview
Ubuntu 10.10 gcc 4.4.4 I am just experimenting with allocating and freeing. However, I am trying to avoid the problem when a object is freed more than once. However, when I test I notice that the obj that is created and freed doesn't return to a null state. So is there any condition that I can set that will avoid if t...
stackexchange/codereview
I am attempting to parse an output file for some data, and am having problems returning the value to my Windows shell. What I am trying to do is simply return a value using a simple regular expression, and store that into my shell variable. I currently have something like this: %VAL% = %PERL% -e '$tmp="Value: 1000"; if...
stackexchange/codereview
Please help me on parsing an EPS file in order to extract only the required information, using C#. Thanks in Advance...
stackexchange/codereview
I know there are more threads about this but they dont help me and I'm going insane here! I wanna pass some parameters in to a web method using jQuery Ajax. var paramList = ''; for(i = 0; i < IDList.length; i++){ if (paramList.length > 0) paramList += ','; paramList += '"' + 'id' + '":"' + IDList[i].value...
stackexchange/codereview
I want to generate UUID for a unique string, i am using the following code:- thread.createSession(); HexGenerator gen1 = new HexGenerator(); gen1.setHexId("2"); thread.ses.save(gen1); gen1 = (HexGenerator) thread.ses.load(HexGenerator.class, gen1.getHexId()); System.out.println("gen1-->" + gen1.getHexId()); thread.comm...
stackexchange/codereview
I have a set of PDF photo album templates (they have blank squares where text and photos should go). My need is to use these templates to generate actual albums. My plan was to use iText and Java. I would send the app an array of all the image URLs to use. I will know exactly where the images should be placed on the te...
stackexchange/codereview
Any help with the following will be much appreciated. I need to have a picture outside a droppable box. The user should be able to drag the picture to the box and once the picture is inside the box, the user should still be able to drag it, but only inside of the box. Thank you in advance for any pointers.
stackexchange/codereview
I have an instance of Scintilla working in .NET, but there is something in the JavaScript lexer that I'd like to remove. It is the cyan/green background when replacing something between apostrophies. I think this image shows it clearly enough: click here, I'm new so I cannot post the image here I cannot find this color...
stackexchange/codereview
Does anyone have any idea how to find the n-th field (string) in a delimited string where the delimiters (separator) could be either a single char or several chars. For instance, string = "one*two*three" separator = "*" and the syntax for user-defined function is FindNthField(string,separator,position) so position 3...
stackexchange/codereview
For a small program that I am developing, I decided it's best to implement a Quick Access Toolbar (like those that come with Ribbon controls (office 2007, 2010?)). Now my problem is that I cannot find any free Ribbon control for winforms from which I could extract the toolbar. I have a pseudo-QAC at the moment but th...
stackexchange/codereview
I'm having trouble accessing the EntityManager from within a grails service: My setup is as follows... Basic Grails application with the AppEngine and GORM-JPA plugins Default settings for pretty much everything. I haven't touched resources.groovy, persistence.xml etc. Some things are good... I am able to access th...
stackexchange/codereview
I have a list of "bad" words having around 450 words in it. I'm trying to check the sentence for it with <?php $sentence = "A quick brown fox jumps over the lazy dog"; foreach($words as $word) { $check = strstr($sentence,$word); if(!empty($check)) return false; } return true; ?> Is there a f...
stackexchange/codereview
public static Dictionary<int, string> dic = new Dictionary<int, string>() { {1,"anystring1"}, {2,"anystring2"}}; I need to use this string str= dic[1]; // it is possible int a=dic["anystring1"]; // My dream is it
stackexchange/codereview
I have a application which uses socket connection to send and receive data from another application. While creating socket it uses the port 4998 . That is where my problem lie. Once I start my application the socket starts using port 4998. So if I want to execute the application again then I get socket binding error. S...
stackexchange/codereview
What is the best way to prompt a user for username/password using .NET 4? I could build my own prompt using the WPF PasswordBox, but it seems like this should be part of the framework. Ultimately I'd like it to work with Windows XP, Vista and 7, but Windows 7 is enough to get me started. I have searched the web but th...
stackexchange/codereview
Lets say we have a problem we implemented using X algorithm with O(n) or O(log n) or etc.... When is the value of n big enough that we must consider an alternative implementation? Let's see if i can explain myself a little better. For n=10,000 O(n^2) = 100,000,000 O(n) = 10,000 O(Log n) = 4 . . . Obviously the best a...
stackexchange/codereview
I can't figure out why I'm getting the out of range exception on the following piece of code. The values for _maxRowIndex and _maxColIndex are 5, and 0 respectively. The exception is being thrown on the first time through when row and col are both equal to 0. I don't understand why 0, 0 would be out of bounds on the ar...
stackexchange/codereview
setattr allows you to dynamically name attributes in Python classes. I'm trying to do something similar with an App Engine Model: class MyModel(db.Model): def __init__(self, *args, **kwargs): super(MyModel, self).__init__(*args, **kwargs) # Doesn't fully work setatr(self, 'prop1', db.ListP...
stackexchange/codereview
XCode 3.2.5 Organizer hanged when I try to "Use for Development" a Touch (2nd Generation), for over 30 mins: If I try to quit, it shows a warning: How can I fix it?
stackexchange/codereview
I have a canvas in a scrollviewer. To be able to use the scrollviewer, I've overridden the Canvas's MeasureOverride method to return the size of all children. This works fine, except that the canvas can only contain items in positive space for the scrollviewer to work correctly. I'd like the user to be able to drag ele...
stackexchange/codereview
I am trying to deploy a dynamic web application in eclipse made up of JSP's, and multiple Java classes and packages using the Spring, and Hibernate frameworks. I am using tomcat6 as my webserver, and MySQL as my database backend. Unfortunately, when I try to deploy my application, I am getting the following stacktrac...
stackexchange/codereview
I'm working on a system which consists of a chain of data transformation components. Each of these components performs a very simple task on an object before passing it on to the next component in the chain. Each of these components runs as a Windows Service. I've designed the system in this way to improve maintenance ...
stackexchange/codereview