instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Well, this is a bit awkward. I currently have a set of reports on a 32-bit sql server 2005 instance that references an access database on a network location. I'm currently trying to migrate these over to my new reporting services instance (sql server 2008 64-bit), and i've ran into an issue. Well, i did a google sea...
stackexchange/codereview
I have two controls of interest on a page: a DropDownList and a Button. If the user presses the button, he gets a popup form which, when completed, causes the base page to completely reload, losing the value in the DropDownList. To clarify, it's a refresh, not a postback. I cannot change it to make it a postback. What ...
stackexchange/codereview
I have a chat feature on my website that I want to replicate the facebook functionality of blinking "new message from John" in the title tag when a new message comes in. I can do this for one instance of a new message however I need to do this for all new messages (infinite possibility). Therefore a setInterval loop ...
stackexchange/codereview
I have two lists IEnumerable<Citrus> grapefruit = citrusList.Where(x => x.IsSmall == false); IEnumerable<Citrus> tangerines = citrusList.Where(x => x.IsSmall == true); I want to put my all of Citrus in a PackingContainer, but I want to first make tangelos-- a combination of grapefruit and tangerine-- from my grapefr...
stackexchange/codereview
Iam trying to find the id for the listview, but it dosen't work just typing like this: this.view = (ListView) findViewById(R.id.list); R.id.list -> dosen't work, cause it can't find the id Iam using my own custom made list. <ListView android:id="@+id/android:list" android:layout_width="fill_par...
stackexchange/codereview
I'm having a funky problem with drawing a custom view in a UITableView. The drawRect function of my custom view, called ChatBubbleView, is just drawing a rectangle of a constant size. I have an NSLog debugging statement in the drawRect function of ChatBubbleView. The first 5 times I add a cell to the UITableView, ever...
stackexchange/codereview
How can I find the difference between this, for example, 1700 hours and 1020 hours. This time is in varchar type. I want to find the exact time difference between this (24 hour format). Need: I want to get 1800 - 1715 = 45 mins. How to achieve this? Answer select DATEDIFF(mi, convert(datetime,LEFT('1020',2) + ':' + RI...
stackexchange/codereview
I am working on a ASP.NET MVC 3 beta Razor engine website. Its a small project. I would like to know if its possible to deploy Razor engine site to normal hosting provider. I assume I would need to copy relevant dll's to my site bin folder. Will this work or I would need to do something more than this to successfully d...
stackexchange/codereview
I'm trying out a core plot iphone example and I get: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6 armv7). Under project settings -> architecture, the only options are standard, optimized, and native arch. Any ideas? Thank you.
stackexchange/codereview
Suppose i have two text fields t1 and t2 and when T1 is entered we need to remove validation for t2 and when T2 is entered we need to remove for T1 Iam using addClass() and removeClass() methods if($("input:text").val()!=''){ $("#txt1").attr('class','validate[optional] '); $("#txt2").attr('class','validate[o...
stackexchange/codereview
is there a problem calling web service built in .net 2 from application built in .net 1.1?
stackexchange/codereview
F# does not support implicit conversions. I understand that this is a feature, but I don't understand why implicit conversions are forbidden even when no information would be lost. For example: sqrt 4 // Won't compile. I don't see a problem implicitly converting the int 4 to a float, which is what sqrt requires...
stackexchange/codereview
I recently acquired this book from Microsoft Press. I currently have Office Enterprise 2007 (Access included) and have firmly decided to convert my Informix-SQL app to Access 2010. However, I'm not experienced with VBA, Macros and several other functionality my app needs. This is going to be a new learning process for ...
stackexchange/codereview
I have added a css class validation rule for jquery validator as follows: jQuery.validator.addClassRules({ requiredDatepicker: { required: true, date: true } }); However, when doing this I get the default error messages. How can I assign custom error messages when using ad...
stackexchange/codereview
Below is the sample code of one of my class: #region Constructors public ItemMaster() { } public ItemMaster(string argItemName, string argItemCode, decimal? argStockInHand, decimal? argAlertLevelQty, string argUnit, decimal? argDiscount, string argWhetherInPercent, int argCategoryID) { this.ItemName = argItemName...
stackexchange/codereview
I am using sticky notes in ubuntu . And was wondering if it would be possible to read the text written in sticky notes using any scripting language .
stackexchange/codereview
I have the current week as an integer (43 as of now). I need the date for Monday in a format like 'Mon Oct 25'. Thought I could accomplish that by a function from but I don't know how to do that. Any suggestions? EDIT: I tried the suggestion from R., but it doesn't give the expected result. Did I implement it wrong? t...
stackexchange/codereview
I need to know how to display the result of a select query in a datagrid or GridView with VB.NET? Consider SELECT * FROM some_table. I don't know what columns the table has. Is there a way to just output the result to a table, with a dataset for example? How can this be done easily?
stackexchange/codereview
These days I am learning HTML5 new element where I read that the canvas tag is only a container for graphics, you must use a script to actually paint graphics. so I want to know that Is JavaScript necessary to learn ,to use all HTML 5 features? If yes than for which tags of HTML5 , JavaScript knowledge will be needed?...
stackexchange/codereview
I'm trying to use networkx to do some graph representation in a project, and I'm not sure how to do a few things that should be simple. I created a directed graph with a bunch of nodes and edges, such that there is only one root element in this graph. Now, what I'd like to do is start at the root, and then iterate thro...
stackexchange/codereview
In my application I have the following pattern: using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required)) { Function1(); Function2(); Function3(); } My problen is that Function2 calls another function that connects to another DB ... and the transaction becomes distributed...
stackexchange/codereview
I'm having trouble with my hooks running on a remote server while the Mercurial process is running locally. The error message is not very informative, but I'm pretty sure it's a Python path issue. I get the error when I try to commit a changeset. Is there anyway to get a complete stack trace? None of the following outp...
stackexchange/codereview
I've been trying to understand how flash animations or a Java Applet work within a browser. I can think of a couple of ways - The Flash Player/Java Applet are machine code that's dynamically linked it, and given some parameters about the area of the screen that belongs to them; after that, they run within the same pro...
stackexchange/codereview
I've been doing some honest-to-God-TDD for my latest project, and am loving it, having previously done unit testing but not serious TDD I'm finding it helpful. Some background on my project: ASP.Net Front End- NHibernate for database interaction with SQL Server 2008 express- C# 4.0 DLL's for DOmain Logic and Unit Test...
stackexchange/codereview
I was stepping through some simple Objective-C code with gdb (inside of Xcode) and noticed something strange. Here is the relevant snippet: NSString *s = nil; int x = (s == nil); As I'd expect, the value of x after these two lines is 1. Strangely, if I try something similar in gdb, it doesn't work the same: (gdb) pr...
stackexchange/codereview
My output has more than 1 line, so I am trying to match the linebreak at the end of the line and then have only 1 max occurance. I was trying something like this: ^$output*\n$\{,1\} but that didn't really work out right.
stackexchange/codereview
MySQL manual is not very detailed about what expressions it supports, so I am not sure if the following is possible with MySQL at all. I am trying to create a query with RLIKE which matches the following. The task is to get from SQL all the sentences which contains at least any two words from the given sentence. Let's ...
stackexchange/codereview
How to set tablelayout row background color programatically.
stackexchange/codereview
In some versions of IE, there is a thin 2px border surrounding the document view port. I haven't noticed it for any other browsers yet. This poses a slight problem in calculating mouse positions for the page and client areas. Originally, I simply subtracted 2 from each of the calculations to account for the border. But...
stackexchange/codereview
I have some asp code with an asp:Repeater object. I am familiar with using <%# Eval("field") to print dataitem.field to the HTML code. However, what can I do if I want to get the result of Eval("field") saved to a string literal for further processing? Update: I feel like I owe an apology for not being more specific. ...
stackexchange/codereview
Preface Please note, I'm not looking for a code solution, but rather insight into why this may occur. The error occurs in IE (tested 7 & 8), but not Firefox, Chrome, Safari. Description When manually calling a function assigned to onclick, IE with throw a Error: Object doesn't support this action if all of the follow...
stackexchange/codereview
On a webpage, is it possible to split large files into chunks before the file is uploaded to the server? For example, split a 10MB file into 1MB chunks, and upload one chunk at a time while showing a progress bar? It sounds like JavaScript doesn't have any file manipulation abilities, but what about Flash and Java app...
stackexchange/codereview
Rails 3.0 Paperclip 2.3.5 I have two models Order and Replay, Replay is nested in Order. Replay sole purpose is to save a file with paperclip to an independent table in the DB. My problem is that validates_attachment_presence is not doing is job, it doesn't trigger an error if my upload file is empty. So the order ...
stackexchange/codereview
Good afternoon, I'm sorry if this question is too silly, but I don't know much (almost anything) about .Net's memory management system, and I really need to clear up this doubt... I have a Dictionary<String, Int32> which I need to use, and now I need a tree whose nodes are labeled with the strings in that same dictiona...
stackexchange/codereview
I have an array and a variable declared like this NextPacketRegister : array (1 .. Natural (Size)) of Unsigned_32; PacketBufferPointer : Unsigned_32; for PacketBufferPointer'Address use To_Address (SPW_PORT_0_OUT_REG_ADDR); for NextPacketRegister'Address use To_Address (16#A000_0000# + Integer_Address (Pac...
stackexchange/codereview
I have the following Cassandra configuration: <ColumnFamily CompareWith="LongType" Name="MiFamily"> But when I try to insert the following value: public byte[] dateToByte(Date date) throws Exception { ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOu...
stackexchange/codereview
I have a foo.py def foo(): print "test" In IPython I use: In [6]: import foo In [7]: foo.foo() test Then I changed the foo() to: def foo(): print "test changed" In IPython, the result for invoking is still test: In [10]: import foo In [11]: foo.foo() test Then I use: In [15]: del foo In [16]: import fo...
stackexchange/codereview
I am in a view editing HTML and I may for example need one line of C# code inside <% %> tags.. If that C# code contains a bracket like { or } after I press enter or complete the command, VS automatically spreads the line over 2 lines to kind of auto-indent the brackets. It's really annoying because I am not in code vie...
stackexchange/codereview
I'm using Hibernate for a personal project. In my project, I have these directory: + conf log4j.properties + bin my classes Using Windows console, I go to project directory (the parent of bin and conf) and I start the application with a command like this: java -cp conf;lib/lib1.jar;lib/lib2.jar;[etc] com.moc.Mai...
stackexchange/codereview
I am currently writing a web service using Restlet, and logging with slf4j in front of log4j. Currently I have standard log4j Appenders in place for logging to files. What I was trying to do is also include log output in the HTTP Response, using a custom Appender. The issue I am seeing is that Appenders by default ...
stackexchange/codereview
Using Qt Creator, I have set a QWidget's background property to black. However, some parts of the QWidget, more specifically, between QFrames/QGroupBoxes are still in its system's default color. Now, I thought that the QFrames and QGroupBoxes need to have its background property set to black too, but it did not work. I...
stackexchange/codereview
PacketBuilder is a little Class which allow to write into a char* array. The Append Functions: template <class T> void PacketBuilder::Append(const T value) { memcpy((&m_Buffer) + m_Index, (const void*) &value, sizeof(T)); m_Index += sizeof(T); } Compiling without errors. If I call Append and use T as unsigned short ...
stackexchange/codereview
I have been reading about REST and SOAP, and understand why implementing REST can be beneficial over using a SOAP protocol. However, I still don't understand why there isn't the "WSDL" equivalent in the REST world. I have seen posts saying there is "no need" for the WSDL or that it would be redundant In the REST worl...
stackexchange/codereview
The code below doesn't compile on gcc 4.5 because the call to foo is ambiguous. What is the correct way to disambiguate it? #include <iostream> #include <functional> using namespace std; void foo(std::function<void(int, int)> t) { t(1, 2); } void foo(std::function<void(int)> t) { t(2); } int main() { ...
stackexchange/codereview
I've noticed that when i populate textboxes from a selected row in a gridview that if the field is blank it displays "&nbsp" in the textbox. Here is the solution I came up with. I check each cell before adding it to the textbox. I get the feeling that I'm either doing something wrong to have this problem in the first ...
stackexchange/codereview
I have this extremely basic example here: http://jsfiddle.net/arhVd/1/ <form> <input type="text"> <input type="submit"> </form> $(function () { $(document).keydown(function(e) { e.preventDefault(); $('form').submit(); }); }); I want to ensure that when pressing F4 it does not do the bui...
stackexchange/codereview
I'm very new to Windows Form programming, and I'm coming across a problem. I have a windows form, Form1, with a textbox: tbx_Log. In another class in the same project, I want to write something to the log textbox, but I cannot reference tbx_Log in that class. How can I achieve this?
stackexchange/codereview
I'm developing an iPhone application where the data comes from a webservice that returns a json file. I'm using the following command in the viewDidLoad of the UITableViewController where I want to bind the data: responseData = [[NSMutableData data] retain]; NSURLRequest *request = [NSURLRequest requestWithURL: ...
stackexchange/codereview
I am trying to implement my sites little chat function like facebook uses. I used Html, PHP, JQuery and Apache. I made before some exaples with JMS but I couldn't figure out how to send message to a JMS server with PHP? For JMS I used Weblogic.
stackexchange/codereview
So I have this nice slider script that I want to use on this page: http://tuscaroratackle.com/rods for several instances on the page. (In other words each rod posting will have it's own slider, a total of about 11 sliders on the page) In order to run the script I have to include this function declaration: $(document)....
stackexchange/codereview
Consider the following xaml snippet: <ToolBarTray> <ToolBar Band="1" BandIndex="1"> <Button>Go</Button> <Separator></Separator> <Button>Camera 1</Button> <Button>Camera 2</Button> <Button>Camera 3</Button> </ToolBar> </ToolBarTray> Ho...
stackexchange/codereview
I have several classes (for a Form generator class thing I'm making...I know sad.. :( ),anyway, the hierarchy is as follows: class HTML_Form accepts abstract class FormElement objects (using type hinting). FormElement class has several children classes such as Textbox, Password, Radio .etc How would I add validation ...
stackexchange/codereview
I'm a bit confused about how to handle the situation where you update a row in sqlite if it exists, or insert it if it doesn't. I seem to see a different solution on every answer there is to this problem. Whats the most efficient or easiest way? EDIT: I meant sqlite, sorry
stackexchange/codereview
in my Zend Framework App i wanna use Dojo Form. I have problem with encoding i guess. when i add element into form with label containing some specila chars like éíá it works but it doenst show any label! $this->addElement ( new Zend_Dojo_Form_Element_TextBox ( array ( 'name' => 'TextBox', 'label' => 'áíé', ...
stackexchange/codereview
Say I have a million records in a model in the appengine datstore. Will I pay a performance penalty with the following query. records = MyModel.all().filter("words =", "foo").fetch(offset=250000, limit=20) From the appengine docs it says The query has performance characteristics that correspond linearly with the offse...
stackexchange/codereview
A while back I asked our developers to use rebase instead of merge before pushing. Eliminating trivial merges makes for a much easier to follow commit graph (ie: gitk, git log). Sometimes folks still accidentally do trivial merges, then push. Does anyone have handy or have tips for writing a server-side hook that block...
stackexchange/codereview
I'd like to restrict write access for the master branch to only several developers, while allowing others to pull everything and push to other non-master branches. Idea is that a developer would push to some other branch and then if code passes review, reviewer would merge it into the master branch. I'm pretty sure tha...
stackexchange/codereview
I've added a QAction to my QToolBar in my MainWindow in Qt Designer (using the Qt Creator IDE) and given that Action an icon (done by "Choose File" and selecting my .png located in the same directory as my project and source code). The icon shows up fine in the toolbar in Qt Designer, but does not show when the project...
stackexchange/codereview
I'm working on a new Django site, and, after migrating in a pile of data, have started running into a deeply frustrating DjangoUnicodeDecodeError. The bad character in question is a \xe8 (e-grave). There's two sticky issues: It only happens in the production server, running an Apache-fronted fcgi process (running the...
stackexchange/codereview
I am currently the lead of my site's dev team (3 people) and we are looking into ways to incorporate git into our daily work flow. Some requirements: The site must have 1 main repos. Everything commited to this repos must be approved by me only. Everyone works in their own computers. They will need to pull from the ...
stackexchange/codereview
In Unity3D, which supports mono 2.6ish, for a gui element, I'd write this SomeProperty = GUI.FloatField(SomeProperty); However I would like to write something like GUI.FloatFieldFor(SomeProperty); How would I go about doing this? Note that SomeProperty is a float, and this GUI stuff goes in an OnGUI method which is c...
stackexchange/codereview
Assume that I have one big table with three columns: "user_name", "user_property", "value_of_property". Lat's also assume that I have a lot of user (let say 100 000) and a lot of properties (let say 10 000). Then the table is going to be huge (1 billion rows). When I extract information from the table I always need inf...
stackexchange/codereview
This is driving me crazy. Is there someone out there that can help? Traceback (most recent call last): File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/www/django_test1/omu2/views.py"...
stackexchange/codereview
Ive been having a problem with a webpart in a sharepoint (moss 2007) site. Basically I cannot remove the webpart, every which way results in an error and we cant get rid of the darn thing. Unfortunately SharePoint designer errors out as wel when I try to remove the webpart manually from Default.aspx (its only on the ho...
stackexchange/codereview
I have an application that allows users to query an sqlite DB. When the app starts up it downloads a URL to see if there are any database updates on a background thread. Unfortunately this causes locks to occur if the user chooses a function that attempts to query the database whilst the update is running. My questi...
stackexchange/codereview
As the title is self explanatory, I have a html textarea and a HTML input type="button". Simply I call an asmx web service (via ScriptManager, ms ajax fw). I call the service to send the text and save to DB. After calling this service a few times, IE (8) crashes with no error msg whatsoever. Any leads will be appreciat...
stackexchange/codereview
I'd like to have the contents of my table to scroll around on top of my background image. or I don't mind if the cells can take chunks of the background image, so that the background remains behind the cells but scrolls with the cells. Is this possible? if so how ? I've tried adding an image view and setting my cells a...
stackexchange/codereview
Should I run ALTER DATABASE DbName SET ALLOW_SNAPSHOT_ISOLATION OFF if snapshot transaction (TX) isolation (iso) is not temporarily used? In other words, why should it be enabled, in first place? Why isn't it enabled by default? What is the cost of having it enabled (but temporarily not used) in SQL Server? --Updat...
stackexchange/codereview
This is the code i'm currently using: (note - %s is replaced on the server side) <!--[if !IE]>--> <object type="application/x-java-applet" width="300" height="300" > <!--<![endif]--> <!--[if IE]> <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/u...
stackexchange/codereview
This is kind of a noob question. I have a simple property bool IsRoot { get { return parent==null; } } that I call over and over many times from other properties and methods within the class (and derived classes) I like to keep it like this because it makes the code readable (to me), but I am afraid that all the IsRoo...
stackexchange/codereview
I am working on a site that have an international aim; I.o.w., logged in users can add text in their own language. I am hoping for international page names and content. An URL example, like the Japanese Wikipedia: http://ja.wikipedia.org/wiki/メインページ (Both pagename and content text). I know by using UTF-8, I can do this...
stackexchange/codereview
I got many time durations in "hh:mm:ss" and want to display the sum of these as "dd hh:mm:ss". Excel 2007 does this correct as long the summation number of days is less or equal the number of days in current month. It is not possible to overload days using "[dd]" as you can with hours, minutes and seconds. Duration exa...
stackexchange/codereview
In TIJ4 P1208, there is one consumer (WaitPerson) and one producer (Chef). Each synchronize on itself when checking if there is meal available. I think they should synchronize on the meal instead. Otherwise, when the waitperson is checking if the meal is available, the chef could well be producing the meal, which makes...
stackexchange/codereview
I'm running into a bug that appears to be caused by File.getAbsolutePath() returning null. What conditions could cause this? (The system seeing the exception is running Windows XP.) The javadoc has a brief description of the path resolution procedure, but doesn't mention any situation that would result in a null path...
stackexchange/codereview
I've done MVC in the past, but I am new to ASP and ASP MVC. I really love the ease that ASP MVC provides me, so far, but I am having trouble figuring out how to get more control over the Users. By default, the MVC provides a minimal user registration form. I have looked around quite a bit, but I still have two question...
stackexchange/codereview
I'm using devise invitable: gem on github I want to implement controller inheritance, so I added a controller: class InvitationsController < Devise::InvitationsController include Devise::Controllers::InternalHelpers before_filter :authenticate_inviter!, :only => [:new, :create] before_filter :require_no_authenti...
stackexchange/codereview
McCarthy's original Lisp and some number of incarnations thereafter did not have a macro facility like we now have in Common Lisp, Clojure, Scheme, etc... This I know. However, it is unclear to me exactly how macros came to be, what implementation(s) had them first, and what motivated them. References to papers and...
stackexchange/codereview
I have an NSDictionary, with six objects, and the keys a, b, c... etc. What I am doing is removing three objects by their keys, and I don't know what objects are going to be removed, as they are determined by user input, so I could be left with a, d, and e. If this was an array, I could just access the ones left over b...
stackexchange/codereview
If an Eclipse project includes a .jar file, the package explorer treats it like a tree and enables the user to click the "+" sign to the left of the file name to expand the tree and show the files in the .jar archive. I would like the package explorer to treat other file types the same way. A really simple example woul...
stackexchange/codereview
i have this fql statement $fql_query = array( 'method' => 'fql.query', 'query' => 'SELECT aid, owner, name from album WHERE owner = ' . $uid ); $albums = $facebook->api($fql_query); the print_r dump of the return contains aid= matching the id of the owner rather than the id of the actual album. but the aid is ret...
stackexchange/codereview
I want to be able to embedd a panel (with size A4, A5, A6 custom etc) in a scrollable a page with a drop-shaddow, similar to how visio or ms word displays. I'm a bit of a beginner to python - been using it for 6 months full-time now. Ideas of how to do this or links to examples / tutorial would be welcome. Thx DM
stackexchange/codereview
I want to develop with Servlets in Eclipse, but it says that the package javax.servlet / jakarta.servlet cannot be resolved. How can I add javax.servlet / jakarta.servlet package to my Eclipse project?
stackexchange/codereview
Consider the following: class OrderForm(models.Model): title = models.CharField(max_length=100) desc = models.TextField() class OrderFormLine(models.Model): order = models.ForeignKey(OrderForm) lagel = models.CharField(max_length=100) qty = models.IntegerField(...) price = models.FloatField...
stackexchange/codereview
I am using TCP Socket in my java project. I am trying to receive data from some equipment. When ever the device is sending data from 0x80 to 0x9f, the data gets corrupted. For example if device is sending 0x86(134 in decimal) i am getting 0x2020(8224 in decimal). Please find below example code BufferedReader in = new ...
stackexchange/codereview
having several connections in several different threads.. I'm basically doing a base class that uses boost/asio.hpp and the tcp stuff there.. now i was reading this: http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/tutorial/tutdaytime1.html it says that "All programs that use asio need to have at least one io_s...
stackexchange/codereview
I have a .htaccess file in a directory, but it has no effect (no matter what I put in it). My apache2.conf file contains AccessFileName .htaccess <Directory "/var/www"> AllowOverride All </Directory> It already said AccessFileName .htaccess but I added the Directory tag myself, thus I'm not sure if it's correct. ...
stackexchange/codereview
Is this possible somehow? I mean for my own bundle? Thank you Misha p.s. More specifically, I am interesting in having a class within my bundle (well, within a fragment) return my custom classloader from a call to MyClass.class.getClassLoader() rather than the bundle's??? Thank you very much Yours Misha p.s. Some helpf...
stackexchange/codereview
I want to draw from discrete distribution. I have a matrix, pi, which consists of vectors of probabilities (with the same number of columns, and sum of each row is 1). In Python, I can do the following cumsumpi = cumsum(pi, axis = 1) [bisect.bisect(k, random.rand()) for k in cumsumpi] to get the vector of draws by th...
stackexchange/codereview
Using Python I can test my code in the terminal / command line by typing python python> print "hello world" I would like to do this with PHP too, but when typing: php echo "hello world"; it does not work.. Is this possible? what should I do? A quick search on the internet gives a lot of results that call an actual ...
stackexchange/codereview
This must be a misunderstanding from my side, but I have the following: I have added an ItemListener to a Jcombobox. In the item listener, I check in the event if it is of type ItemSelected. If it is, I update a value in a JTextPane. The problem is that it works as follows: I click on a new value in the jcombobox and n...
stackexchange/codereview
My current application consists of a UITabBarController with 4 different tabs and a UIViewController. My tabBarController is the rootController and the UIViewController is primarily being used for my user login view. When the application loads both views are loaded with the login view covering the tabBar. I have ad...
stackexchange/codereview
How do you display the filename of the file you are working on in vim?
stackexchange/codereview
I want to have a numerical, multidimensional array of scores. The first index is the page load, and the second is the score value for the particular question. When I push to the array, the load value is already defined. I keep getting this error: Warning: array_push() expects parameter 1 to be array, null given in (......
stackexchange/codereview
I need to find the quadratic equation term of a graph I have plotted in R. When I do this in excel, the term appears in a text box on the chart but I'm unsure how to move this to a cell for subsequent use (to apply to values requiring calibrating) or indeed how to ask for it in R. If it is summonable in R, is it saveab...
stackexchange/codereview
I have a stored procedure that returns a single recordset. is it possible to convert it into xml like below <employee> <firstname>x</name> <lastname>x</name> <dob>x</dob> </employee> using some simple options in sql 2000?
stackexchange/codereview
I am working on an application that will allow users to create queries on their own to view data in their database. However the stipulation is that the application should prevent any modification of the tables and data stored in the database. The Application will be written in C#. Any good suggestions of how this could...
stackexchange/codereview
I have written some Java code with 3 simple classes where the first, Controller, has the main method and creates the instances of the other classes. Floaters is a classes that creates a linked list of Floater instances, each with a particular length and boolean value to say if they are vertical or not. My problem, as i...
stackexchange/codereview
In C# one only uses an using directive for a namespace. In C++ like in this example below, one must do an include then use a namespace, why isn't it the same thing like in C# ? #include <iostream> int main() { using namespace std; cout << "Hello world!" << endl; return 0; }
stackexchange/codereview
when i try to serialize the list variable returned by the database query, an error of 'non-serializable is returned. But when i hardcode the same exact string in, or so it seems...serialization works. Any ideas why? car_list = Car.objects.get(id=query).all_cars.values('id','name').order_by('name') #car_list = [{'id':...
stackexchange/codereview
UPDATE: rules: { firstname: "asdfsadf", lastname: "123123", city: "required", state: "required", country: "required" , question_1: "required" }, messages: { ...
stackexchange/codereview