instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Ok so at first I thought this was easy enough, and maybe it is and I'm just too tired - but here's what I'm trying to do. Say I have the following objects: public class Container { public string Name { get; set; } public List<Address> Addresses { get; set; } } public class Address { public string Address...
stackexchange/codereview
in my app i used touchesBegan , touchesMoved and touchesEnd but i faced a big problem if the user drag 2 fingers just one finger handle the drag. how can i fix this bug ?
stackexchange/codereview
I have an assignment to write an algorithm to find duplicate in a Dynamic Sorted Array. I want to write this algoirthm but before starting, I must know the data structure Dynamic Sorted Array but, I dont know it. I tried to googling but I couldn't find anything like Dynamic Sorted Array. would you please guide me? What...
stackexchange/codereview
I want to find how much time a PHP http request spends in Database. Rails logger prints out such information (how much time is spent on rendering, database and app). Example: Completed in 0.01224 (81 reqs/sec) | DB: 0.00044 (3%) | 302 Found [http://localhost/posts] Is there something similar for PHP too? Thanks in adv...
stackexchange/codereview
I've got a game, a custom View class draws my gameboard. I'm thinking of drawing some elements on a separate layer above the gameboard. I could do this in the View's canvas code, but since they won't change frequently, was thinking of introducing a frame layout to display this top layer: <FrameLayout> <LinearLayout /...
stackexchange/codereview
I need to deal with patterns like f[{a,b}]=... where a and b are supposed to be orderless So far I've implemented this by using default Sort[] on subexpressions every time f is defined or evaluated. My questions are Is this as robust as Orderless? Is there a better way? PS: An example application is tree decompositi...
stackexchange/codereview
I'm trying to deploy an Applet with new Java JNLP specifications, but I always receive the following error by Java Plugin Console: BadFieldException[ Il campo <jnlp><applet-desc>width presenta un valore non valido: 0,0] This is my HTML code: <script> var attributes = { id:'signingApplet', code:'it.insi...
stackexchange/codereview
I haven't seen any thing on this topic in Django's online documents. I am trying to save a list of objects to database, but what I can do is loop through the list and call save() on every object. So does Django hit database several times? Or Django will do one batch save instead?
stackexchange/codereview
I'm using curl_multi_exec in php to check the status of a number of URLs. I want to benchmark this so that, for a given system, I know how many handlers I can check synchronously before curl starts queuing. Does anyone have any experience on how to gauge capacity? Thanks, Adam
stackexchange/codereview
what do i need to do for invoke cross-domain reference using 3.5 framework? i learned that JSONP support by default in 4.0 framework. what is the alternative any help?
stackexchange/codereview
Currently when I add a Facebook Like button to my site it works correctly but it uses the domain of my site as what is being "liked". So on Facebook it appears like: xxxxxx likes http://localhost:3000/ on localhost. I would like to be able to change the content of what's being liked, but I couldn't find any clues in th...
stackexchange/codereview
I'm currently trying to build an android application to take pictures and I need to freeze the camera preview on a given event (i.e. picture taken) and restart it only after another event. What I want, in other words, is for the view to display whatever the camera sees until the freeze event occurs and then to freeze t...
stackexchange/codereview
We have some data which represents many model runs under different scenarios. For a single scenario, we'd like to display the smoothed mean, with the filled areas representing standard deviation at a particular point in time, rather than the quality of the fit of smooting. For example: d <- as.data.frame(rbind(cbind(1:...
stackexchange/codereview
I created an adorner on a WPF line element, because there was neet to add some text. Now, when this line is moved, the adorner does not "follow" the line automatically. In fact, it does not refresh itsef: here black curves is the Control drawing, and the red "120 m" is the adorner one. Some code void SegmentLine...
stackexchange/codereview
I'm kind of new at SQL, so please bear with me :) I have a population of people and about 60 or so possible characteristics, let's call them x1,x2,...,x60. For each person, one, many or none of these characteristics may apply. This information is stored in a table: TABLE1: ID C 1 x1 1 x2 1 x6 2 x3 2 x7 3 x...
stackexchange/codereview
I have an object to populate with xml. I think that I might use a contructor which accept this xml to build the object. But, is there a better design pattern to do it ? Is it to the object to handle all the xml parsing ? Thank you !
stackexchange/codereview
Let's say I have a sting with a number of words separated by spaces. Each word has a single digit number after it. If I have a word, is it possible to find the word in the string and return it along with the number after it? (using Ruby) For example: string = "test0 chance1 already0 again4" word = "chance" How can ...
stackexchange/codereview
Let's say I have the following table relationships (via keys existing on both ends) table a -> table b table b -> table c table c -> table d table d -> table e table e -> table f And I want to group by a key on table a and sum() values from table f as if both tables were directly joined. Problem is that if I do that, ...
stackexchange/codereview
friends, i have read complete article related to avoiding memory leaks in android. http://developer.android.com/resources/articles/avoiding-memory-leaks.html right now 1) i am using private nested class not static if i make that nested class static will it be usefull? 2) article says If you're about to use Inner Clas...
stackexchange/codereview
I want to create a preview image before the actual form upload. I have a preview button for the user to first look at the photo before submitting it. Once the use clicks the preview button, what is the best way in django to respond with an image without actually saving the image? Thank you!
stackexchange/codereview
This is my scenario: I upload a zip file Check each file in zip file If file != image, then move file to destination if file == image, resize image and move to destination I googled around and seen different solutions, but none where one can process files before saving them at the final destination. This is the funct...
stackexchange/codereview
Just getting started with OpenFrameworks and I'm trying to do something that should be simple : test the colour of the pixel at a particular point on the screen. I find there's no nice way to do this in openFrameworks, but I can drop down into openGL and glReadPixels. However, I'm having a lot of trouble with it. Bas...
stackexchange/codereview
I have a csv file where each row defines a room in a given building. Along with room, each row has a floor field. What I want to extract is all floors in all buildings. My file looks like this... "u_floor","u_room","name" 0,"00BDF","AIRPORT TEST " 0,0,"BRICKER HALL, JOHN W " 0,3,"BRICKER HALL, JOHN W...
stackexchange/codereview
I have a JPanel and I create, dynamically, JCheckBoxes inside. These have to be added JCheckBoxes always a side by side. In case there is more space to be inserted in the side, a new line of JCheckBoxes is created, as in a simple text editor. This is happening perfectly. But ... I set the layout on this JPanel to FlowL...
stackexchange/codereview
Is using a String() constructor as against string literal beneficial in any scenario? Using string literals enable reuse of existing objects, so why do we need the public constructor? Is there any real world use? For eg., both the literals point to the same object. String name1 = "name";//new String("name") creates a n...
stackexchange/codereview
My core file claims that a SIGFPE was thrown from gcc-4.3.4/include/c++/4.3.4/bits/stl_iterator_base_funcs.h on line 176. This is here: template<typename _InputIterator, typename _Distance> inline void advance(_InputIterator& __i, _Distance __n) { // concept requirements -- taken care of in __...
stackexchange/codereview
I need to be able to detect whether the current language my user is viewing is an RTL (Right To Left) language like Arabic. At the moment I'm just detecting this based on the language code from the system property user.language, but there must be a better way.
stackexchange/codereview
In my Visual studio 2008 project, I've added app.config file where I store some app-data in xml format. I read this data in code like this: string somedata = ConfigurationSettings.AppSettings["somedatakey"].ToString(); when I start application in Visual studio, it works. But if I try to run the exe file (release...
stackexchange/codereview
is there a way to fill everything outside of a closed path (polygon)? Background: I'd like to render some maps with coastlines - so sometimes I need to fill the sea with blue color, so I thought it would be the easiest and in my situation the most efficient to fill everything outside of this coastline polygon with blue...
stackexchange/codereview
I am attempting to parse the following String into a DateTime object in c#: DateTime.ParseExact("20101108 230125", "yyyyMMdd hhmmss", null) although the value looks correct the ParseExact method just keeps giving me the following: String was not recognized as a valid DateTime. Can anybody tell me why and how I can p...
stackexchange/codereview
Possible Duplicate: WPF Application that only has a tray icon how to write WPF application running on system tray only since the application start?
stackexchange/codereview
I uploaded an apk file to a web server and attempted to access the link from the browser on the phone. When I attempt to download from that link I receive an error message that reads "An SD card is required to download." I do not have an SD card installed, but the internal memory is not full, so I would expect the ap...
stackexchange/codereview
I have a link: <a href="#" id="link">Here's my link</a> This is not a normal clickable link, it's coded in jQuery like this: $("#link").hover(function(e) { e.preventDefault(); $("#tv").stop().animate({marginLeft: "50px"}); $("#tv img)").animate({opacity: 1}); }) So after hovering unclickable link t...
stackexchange/codereview
Is it safe to assume that the value PHP's curl_getinfo() returns for array key 'http_code' is the value of libcurl's CURLINFO_RESPONSE_CODE? In other words: does the value of CURLINFO_HTTP_CODE using curl_getinfo() in PHP correspond to the value of CURLINFO_RESPONSE_CODE using curl_easy_getinfo() in libcurl? And it is ...
stackexchange/codereview
The question that I have is regarding converting the process of reading lines from a text file into an array instead of just reading it. The error in my codes appear at string[] lines = File.ReadLines("c:\\file.txt"); with cannot implicitly convert.... Can someone please advise on the codes to save the results in an ar...
stackexchange/codereview
For embedded signatures I can use X509Certificate.CreateFromSignedFile to extract the certificate. For catalog signatures, in C/C++, I can use CryptCATAdminEnumCatalogFromHash to do the same thing. What is the .Net way to extract the certificate for a file in the system's store?
stackexchange/codereview
Is it possible to make a computer behave as a bluetooth HID device? That is, given a local machine with a standard USB keyboard plugged into it, other devices could discover this machine and use it as a bluetooth keyboard. I'd like to create a linux or OS X application (or use an existing one, though I've found none) w...
stackexchange/codereview
How would I go about persisting an object that has a java.util.Properties object in it? Note that a java.util.Properties object has the ability to lookup properties not only in itself, but also in a default properties list. The default properties list is itself another Properties object, so it too can have another defa...
stackexchange/codereview
Hy,... So u can see that my test is blurred at the UITextfield in my cell. But I search in the internet about it, and the only solution is to use int-coordinates and I do that! But when I push to my other subview's ('Kollege', 'Fahrten', etc.) then the text gets more blurred and when I want to write another text in th...
stackexchange/codereview
I need a function to hide a group of text boxes, I wrote the following to do so - var allTxtBoxes:Array = ["title_txt","l1_txt","l2_txt","l3_txt","l4_txt","l5_txt"]; for(var i:Number = allTxtBoxes.length - 1; i >= 0; i--) { var hiddenT:String = "newOverlibTxt."+allTxtBoxes[i] hiddenT.visible=false;;...
stackexchange/codereview
I need to show a small dialog on top of my existing views (so then can be seen). I've adjusted the size of my SmallTutorialDialog but when I load it it occupies the whole screen. How can I adjust this ? -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; SmallTutorialDialog *lvc = [[SmallTutorialDia...
stackexchange/codereview
Look at the profile pages of users that have asked more than 10 questions. (e.g., https://webapps.stackexchange.com/users/2496/tobeannounced) Now try skipping to questions 10-20, or page 2 of the questions they have asked. The load for the new page is almost instantaneous. How is this accomplished? Simply be loading a...
stackexchange/codereview
I developed a powershell application on an XP box that made an OLEDB connection to a Sybase server to extract data that is then inserted into a SQL Server 2008 database instance. After debugging this script and ensuring the process operated correctly, I moved the script to a new Windows Server 2008 R2 box. In order to ...
stackexchange/codereview
I am developing an application that involves a type hierarchy and started by defining the models for each type via inheritance. When it comes to writing the corresponding controllers I am not sure how to approach the whole thing in a clean way. Should I write only one controller for the base type that is able to handle...
stackexchange/codereview
I'm running several hundred datasets through glm.nb using a wrapper function. Nothing fancy, I just pass on each list item via llply, then fit using glm.nb, write the coefficients to a data.frame and return that back. Not surprisingly, glm.nb fails to converge for some datasets. Rather than have the function cough up a...
stackexchange/codereview
It is one of the things I should have the know how but it really bugs. I have a large script which automates several tasks. It starts with uploading of files after which data from the files are extracted and then imported into mysql. In debugging mode it works perfectly but on my web front-end, execution stops after th...
stackexchange/codereview
I've imported a spreadsheet of U.S. Government statistics into a mysql table with the aim of working through a tutorial. However, it would appear that the U.S. Government has changed its formatting so that some of numerical figures are wrapped in quote marks, turning them into strings. For example, this is the format o...
stackexchange/codereview
After applying CSS to one of my forms, some of the fields cannot be accessed without tabbing to them. I am applying relative positions, padding, and float. What is the likely cause of this problem?
stackexchange/codereview
I have a jquery game that you can view here link text The game starts by you entering a number in a text field. then you click the play button. After clicking the play button a set of square appear each rotating random numbers, click on the square that has your number to build up your score, miss 3 times and you are ...
stackexchange/codereview
I'm looking to optimise the mobile browser experience in a small webapp, using the awesome jQuery mobile to do so. It goes without saying that a user doesn't want to DL 200k of data, I'm just trying to draw the line between using external and internal URLs. Is there any existing guideline of what sort of page sizes / l...
stackexchange/codereview
Is it possible to test intersections with 2 sprites in XNA using the sprites' alpha channels to determine if alpha > 0 with an intersection there is a collision but if alpha is 0 even if there is an intersection there's no collision. I know j2me supports it at least...
stackexchange/codereview
I recall reading somewhere that in HTML5 it was no longer okay to use target="_blank" in HTML5, but I can't find it now. Is it alright to continue to use target="_blank"? I know it's generally considered a bad idea, but it's by the easiest way to open a new window for something like a PDF, and it also doesn't require y...
stackexchange/codereview
I need to make a script that gets from the user the following: 1) Process name (on linux). 2) The log file name that this process write to it. It needs to kill the process and verify that the process is down. Change the log file name to a new file name with the time and date. And then run the process again, verify th...
stackexchange/codereview
One of my applications runs about 100 workers. It started out as a threading application, but performance (latency) issues were hit. So I converted those workers to multiprocessing.Processes. The benchmark below shows that the reduction in load was achieved at the cost of more memory usage (factor 6). So where precisel...
stackexchange/codereview
When releasing desktop apps we usually rename the binary to contain the version number. This version isn't stored anywhere else but in the file name. What are the advantages of storing the version number elsewhere? (ex. In the project properties, in the setup script, etc) How to automate the version number update proc...
stackexchange/codereview
I am a creating a MySQL updating script which will allow me to merge all my sql changes to several databases using a timestamp to determine which changes have already been updated. I have set @cv to the current version of the database. The problem occurs in the if statement. What ever I change the IF statement to it ca...
stackexchange/codereview
I would like to learn how to represent liquid (water) in 2d and/or 3d mathematically to create a simulation using the HTML5 canvas. Any resources for this and/or representing other real-world materials in 2d or 3d mathematically?
stackexchange/codereview
In C, I understood that if we close a socket, it means the socket will be destroyed and can be re-used later. How about shutdown? The description said it closes half of a duplex connection to that socket. But will that socket be destroyed like close system call?
stackexchange/codereview
I'm trying to model a complex Business Object (named Prenda) that contains an attribute of the same type of the object (Prenda) using JDeveloper 11g. This is my xsd: <?xml version="1.0" encoding="UTF-8"?> <?bpmo version="11.1.1" build="6.84" fullName="Mx.Org.Frd.Bo.Prenda" modifiers="0"?> <!--##########################...
stackexchange/codereview
Using Rails3, I have a downloads table with download_date and credits columns. What I want to generate is a table like: Date Credits 2010-11-01 25 2010-11-01 27 *2010-11-01 52 <= Sum of previous 2 rows 2010-11-02 32 *2010-11-02 32 <= Sum of previous row This can be accomplished using something like: ...
stackexchange/codereview
i want to display the table view and above that i hav some buttons to display ... which type application is better to fulfill this and it must support navigation... i hav tried navigation based app but it is not allowing to move table view in root view controller...
stackexchange/codereview
I have a pivot table showing the total of orders in each month of year. Each column is a year and each row is a month. Some months don't have values at all, e.g Sept 2006. There is still a 2006 column for other months that have values and there is still a Sept row for the other years. Just the cell for Sept 2006 is emp...
stackexchange/codereview
I have a Textfield which hides the keyboard when I touch somewhere else on the screen (through my TouchesBegan function and resign...blah). But when I touch a Textview the TouchesBegan does not get invoked and the keyboard doesn't hide! Is there any way to invoke TouchesBegan in order to hide the keyboard?
stackexchange/codereview
I've been trying to figure this out for a while but now thought I would just post it here and see if I can finally understand this issue with setInterval I am having. In case this matters, I'm using jQuery 1.4.4 in this document. Given the following: var MS = {}, MS.timer = 1200; // this both would be user accessib...
stackexchange/codereview
I have one question with mixing C-string and fortran-string in one file. Supposed I am playing with the name string with fixed length 9, I define a length Macro like #define NAME_LEN 9 in a .c file. There is an existing fortran-function, let's name it fortran_function(char* name) Now I have to call this fortran f...
stackexchange/codereview
I am studying the boot process in Linux. I am looking through this html page http://www.tldp.org/HOWTO/Bootdisk-HOWTO/x88.html. The first line under the section 3.1 "The boot process" says that "All PC systems start the boot process by executing code in ROM (specifically, the BIOS)". My doubts are Who loads the code i...
stackexchange/codereview
I have some code I found somewhere on the Net. unsafe static Bitmap SaveFrame(IntPtr pFrame, int width, int height) { try { int x, y; int linesize = width * 3; byte* scan0 = (byte*)Marshal.ReadIntPtr(pFrame); IntPtr bufferPtr = Marshal.AllocHGlobal(li...
stackexchange/codereview
I trying to build an application that is using the torrent technology to make it easier to share the files between friends. The question are, is it possible to modify a torrent at runtime and that everyone using the torrent then are possible to fetch the update version of the list of files. Could be that a file is modi...
stackexchange/codereview
Im getting segmentation fault from pthread_mutex_lock, heres my backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff61b03f0 in pthread_mutex_lock () from /lib/libpthread.so.0 (gdb) bt #0 0x00007ffff61b03f0 in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0x000000000041141f in boost::as...
stackexchange/codereview
One of my clients wants to click on a link to load a pdf. The pdf will load in a new browser window. All ok. My client then wants the window to close if the pdf is not used for a period of time. I was planing on using the JQuery Media Plugin to display the pdf. In the browser I can have timer and if .mousemove() is cal...
stackexchange/codereview
Can be in any language or even pseudocode. I was asked this in an interview question, and was curious what you guys can come up with.
stackexchange/codereview
At work it seems like no week ever passes without some encoding-related conniption, calamity, or catastrophe. The problem usually derives from programmers who think they can reliably process a “text” file without specifying the encoding. But you can't. So it's been decided to henceforth forbid files from ever having ...
stackexchange/codereview
i am using following code to get GPS location. now i want to get GPS location without automatic updates. for example i want to get latest location on button click only once not all the time. so please tell what value should i use for minTime and Distancewhile getting location updates for once and without intervals and ...
stackexchange/codereview
I have a string with the following format: 2010-11-04T23:23:01Z The Z indicates that the time is UTC. I would rather store this as a epoch time to make comparison easy. What is the recomended method for doing this? Currently (after a quck search) the simplist algorithm is: 1: <Convert string to struct_tm: by manual...
stackexchange/codereview
System: Mac OSX 10.6.5, Python 2.6 I try to run the python script below: from mrjob.job import MRJob class MRWordCounter(MRJob): def mapper(self, key, line): for word in line.split(): yield word, 1 def reducer(self, word, occurrences): yield word, sum(occurrences) if __name__ == '__main__...
stackexchange/codereview
I am facing a problem deploying a stand alone WPF application. I have a huge .zip file of pdf files that I want to include in the deployment. Is there a way I can add these to a click once deployment and have the installer unzip the files into a specific directory on the user's machine? So basically, what I'm looking f...
stackexchange/codereview
I'm fading out an imageview with alpha animation. I'd like the image to stay transparent after the animation. Tried with different combinations of fillAfter and fillEnabled, no luck. How can this be achieved? pom
stackexchange/codereview
I know how to send signals to child process in C using the kill(pid_t pid, int sig) function. What about sending signals to threads? is it possible?. If so, how to catch signals on the "child" thread. For example, if the main thread sends me a terminate signal, how can I in the other thread catch it.
stackexchange/codereview
Is there a best practice or widely accepted way of structuring and validating data using MVVM in conjunction with RIA services in Silverlight? Here's the crux of my problem. Let's say I have an EmployeeView, EmployeeViewModel and some Employee entity. In regular RIA applications I will expose that Employee entity on th...
stackexchange/codereview
Say I have the following: $cars = "auto1,auto2,auto3,auto4"; If I parse $cars to insert the value in my database, I get a string like "auto1,auto2,auto3,auto4". I want to split this string when I parse the feed into "auto1, auto2, auto3, auto4" - basically add spaces between words. How can i do it? Here's how I get va...
stackexchange/codereview
I have asked this before, but my meaning was not understtod... My Situation is that I need the Start and End JQuery datepicker on the webpage, and it must... #1 - The End Date must always be greater then Start Date... #2 - The date range must POST data from MySQL to create a table of the data on the webpage. How can I...
stackexchange/codereview
How concurrent operations are done in B Trees in database management ?? How they are actually implemented and done??
stackexchange/codereview
I want to have a form with two buttons, submit & preview, the preview button should open a new window with the text from the input areas how do I make that happend? <form method='post'> //input <input type='text' name='headline' id='headline' /> <textarea name='content' id='content'></textarea> //buttons <input type='s...
stackexchange/codereview
Hey I am making an app with the UIWebView and there are ajax things on the site. I need to run 1 ajax thing so the source code will change and after it I need to optain the source code. Anyway I could do this? Sorry if I explained it too complicatedly.
stackexchange/codereview
Utilizing the sqlite c interface I need a way to find the rowid for a row in a result set. The select statement that created the result set does not include the rowid column in the result set. Assume that I have a successful SQLITE_ROW return from sqlite3_step(stmt). How can I retrieve the rowid for the current row? I...
stackexchange/codereview
For classroom, how do I actually able to remotely control 100's PC from a master application? Like control the student who also using Flex application is possble with XMLsocket? I found some software use Mac address which allow the master application to access but I don't know what is need to build. Need guidance.
stackexchange/codereview
How can I create a calculator in C without using if else and switch case ? Here is the code so far : void main() { int a,b,sum,sub,pro,divide; /** sum is for addition,,sub is for subtraction,,pro is for product,,divide is for division**/ char operator; clrscr(); printf("enter a value:"); sca...
stackexchange/codereview
I have an nsdateformatter [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; for value : 2010-01-01 05:00:00.000 it returns the correct value but for value: 2010-01-01 05:22:00.000 it returns null. According to the documentation if i am correct for minute i am suppose to use "mm" So what's wrong with my code an...
stackexchange/codereview
I asked a question regarding returning a Disposable (IDisposable) object from a function, but I thought that I would muddle the discussion if I raised this question there. I created some sample code: class UsingTest { public class Disposable : IDisposable { public void Dispose() { va...
stackexchange/codereview
I would like to dynamically set the session expiration time in Codeigniter. I'm autoload the session class. I have a view that contains checkbox for users to click (remember me). Right now if they click the check box or not the expiration time stays the same :/ // Config.php $config['sess_expiration'] = ...
stackexchange/codereview
I seem to be getting application crashes at: parent.findViewById(R.id.a_1).setVisibility(View.VISIBLE); not sure what im doing wrong code is below layouttext.java public class layouttest extends Activity { private Spinner solvefor; private ArrayAdapter<CharSequence> featuresAdapter; private List<CharSequence...
stackexchange/codereview
I'm using a QSlider (v4.6) for input as well as to provide feedback to the user. For the feedback I will be calling the setValue method. I'm trying to find a signal that will fire only if the user modified the value. The valueChanged signal fires when the user changed the value as well as when I call setValue. sliderMo...
stackexchange/codereview
What is the difference in behavior / performance when including tag in body or head part of html document. Also i noticed that google analytics is usually embedded at the end of body. why is that?
stackexchange/codereview
one question I always ask myself is how is it possible that javascript has still a reference in a callback function of a AJAX request when the variable was declared in the function which isssues the AJAX call. Here an example var loadMask = {name:"test"}; form.submit({ url: 'request.php', timeout : 180000, succe...
stackexchange/codereview
I know that I can code on one machine and have it build on a different machine (ie. a build server). Now I have also heard that you can have visual studio run a build on a virtual machine (i think it requires Virtual PC). Now my question is if anyone has been able to code on machine A, have it compile on machine B and ...
stackexchange/codereview
I have a datatable with two columns. I want to store the rows of each column in an array so that I can return rows for each individual column. This way I believe I can populate a list box(the option text as one column and the option value as the other column). Here is what I started out with: public object dbAccess2()...
stackexchange/codereview
Is there a way to pass command line switches to devenv which are then passed as-is when it calls MSBuild?
stackexchange/codereview
I am trying to create a model for an existsing DB. Using the output of manage.py inspectdb, My models.py file looks like this: from django.db import models ...some more stuff here... class Scripts(models.Model): run_site = models.ForeignKey(Sites, db_column='run_site') script_name = models.CharField(max_lengt...
stackexchange/codereview
Given an array of values, I want to find the total "score", where the score of each element is the number of elements with a smaller value that occur before it in the array. e.g. values: 4 1 3 2 5 scores: 0 0 1 1 4 total score: 6 An O(n^2) algorithm is trivial, but I suspect it may be possible to do it in O(nlgn), by ...
stackexchange/codereview
I'm trying to implement a group messaging feature in ASP.NET MVC. I want to display a list of all threads for a specific ContactID, displaying the latest message in that thread (no matter who it's from). I've set up my table as below: MessageID ThreadID MessageBody ContactID 10000004 300152,300160, msg1 300160 1000000...
stackexchange/codereview