instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
This may be too ambiguous of a question, but I'm looking for some help or best practices on handling exceptions in a JavaServer Faces application. Right now, whenever I catch an exception, I log it and then throw another exception that I created, say MyCustomException. This custom exception takes the Throwable object ...
stackexchange/codereview
I'm using a SqlConnectionStringBuilder instance to parse a connection string, but don't want to check its key names for validity. By behaviour the builder will throw an exception if an unsupported key is encountered in the string. For example, exception on unknown key "whatever" is: Keyword not supported: 'whateve...
stackexchange/codereview
I have a model, ContactEmail that has a date_sent attribute and an email_id, referencing another model Email. I would like to create a bar graph which shows on the x-axis dates and on the y-axis the number of ContactEmails that were sent on a specific date. I would like to also do the same, filtered for ContactEmails w...
stackexchange/codereview
I have a list of links which point to html pages. <ul id="item-list"> <li><a href="assets/data/item1.html">Item 1</a></li> <li><a href="assets/data/item2.html">Item 2</a></li> <li><a href="assets/data/item3.html">Item 3</a></li> <li><a href="assets/data/item3.html">Item 4</a></li> </ul> And I have a J...
stackexchange/codereview
is it possible to know which direction the phone is pointing while looking at the camera preview, or do you have to have the phone flat like a compass. Thanks
stackexchange/codereview
Is there any specific order in which the external CSS or Scripts should be called in a ASPX page which could help a bit in decreasing the page load time? i.e script type="text/javascript" src="../Includes/JavaScript/jquery.ui.tabs.js" link href="../Includes/css/ui.all.css" rel="Stylesheet" type="text/css" or link hr...
stackexchange/codereview
I've found 2 ways of converting from an old GTK+ UI xml format (using Libglade) to the new format (using the built-in GtkBuilder). One is using Glade 3 Interface Builder (Save As button), and another is using gtk-builder-convert. They give different outputs, so I would like to know which one to trust more.
stackexchange/codereview
I need to parse string to DateTime. The string is always in the following format "10.10.2010" That means dd.MM.yyyy, separated with dots. I want to use DateTime.TryParse or any other method. Please suggest. UPDATE Updated the question. I am just looking for the right method to achieve the goal. Not manual parsing
stackexchange/codereview
I am attempting to completely empty a div, I have it populated on load with PHP and a foreach loop, its printing programs from a database, here's what the source looks like when the page is first loaded <div class="frame" id="program_list"> <div class="box"> <div class="box-ho...
stackexchange/codereview
I am not that familiar with core data so im wondering if its possible to load different pre-populated sqlite db's into core data and how the performance would be? I have a client who is storing their data in multiple sqlite db's on a remote server. Each sqlite db would basically represent a group in the app and there c...
stackexchange/codereview
I'm a little confused on the correct way to make my class support NSCopy mechanics and I'm hoping someone can help clear things up for me. The big question is this: If my class is mostly immutatble except for a collections property, when I'm implementing the 'copyWithZone' method through NSCopy inheritance, do I need t...
stackexchange/codereview
The Problem: Until now, I create a IIS website/app using the IIS manager tool. The problem is that changes to a IIS website aren't documented as they should be. For example: when I update the URL Rewrite rules this changes should be documented in a version control solution. What is your solution to solve this issus?
stackexchange/codereview
Is there a CLI script I could run on the server (probably from cron) to install the new .zip file? I'm working on a joomla project and I would like a way to automatically have the new version installed on my remote test server when I commit. Currently I build the package and then have to log into the test server, selec...
stackexchange/codereview
As title suggests, My question is that how i can convert a php class to an associative array? For example I've class MyObject { private $size = null; private $length = null; private $width = null; public function getSize(){ return $this->size; } public function setSize($size){ $this-...
stackexchange/codereview
I want to serialize my object to xml and then to a string. public class MyObject { [XmlElement] public string Name [XmlElement] public string Location; } I want to obtain a single line string which will lok like this: <MyObject><Name>Vladimir</Name><Location>Moskov</Location></MyObject> I am usi...
stackexchange/codereview
I'm writing an AS3/Flex4 game engine, and I want to have a base class for any item that can be put in the scenegraph. I wondered if extending UIComponent is the right approach, but there seems to be a whole lot of internal stuff there I don't want to get tangled up in... if possible I'd have some separation between my ...
stackexchange/codereview
my post is same like This... but that post didn't solve'd my question, so my question is. m building a win app in c#, and in that im using backgroundworkder thread and Application.DoEvents. here's my code: for(int i=0;i<gridview.rows.count-1;i++) { if (backThread.CancellationPending) { e.C...
stackexchange/codereview
I'm using Eclipse Helios to develop a PHP/Smarty project. Is there a plugin that can help me easily publish code to the web server? Something like setting up the location of the web root once, then I can just right-click on a file to send. Currently, I'm using FileZilla to send my code to the web server. Any help or ad...
stackexchange/codereview
I have a maven plugin generating some code for eclipse to build, but I have to manually refresh the project before eclipse sees the code. How can I make eclipse automatically refresh the project as part of the build? I'm trying to use a custom builder, but it wants to run a command (which I don't need to do).
stackexchange/codereview
I want to load bitmaps into ImageViews in Android, but I don't want to use the R.drawable syntax because I have a lot of images with a standard naming convention so it's much easier to get the image with some logic. For example, all my images are named: img1.png img2.png img3.png So if a user selects a value, let's say...
stackexchange/codereview
I'm trying to make a custom report. I've just put some test code on my main page: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-12323748-3']); _gaq.push(['_trackPageview']); _gaq.push(['_setCustomVar', 2, // This custom var is set to slot #1 'Test_va...
stackexchange/codereview
I want to show some formatted text in a client WPF application which the user can select and copy to word. It needs to be easily created by the app, and the biggest formatting thing inside is a table where some cells are right-aligned. What is best to use here? A richtext control is hard to fill (I think) and html is n...
stackexchange/codereview
Is there a HTTP header that makes sure that no content will be displayed? Even if there is some content in the body? edit: I take the answers as a "no", and accept the fact that headers have no control over the content.
stackexchange/codereview
For caching matters, I'm caching an array of the attributes of the objects I need: friends = [{:id => 4, :name => "Kevin"}, {:id => 12, :name => "Martin"}, …] Is it possible to have a list of Users using this array, so that I can use Ruby methods? For instance, I usually get a list of non-friends with this: non_friend...
stackexchange/codereview
Is there any way to display a Google Map (embedded via the Javascript API) in grayscale without losing any other functionality?
stackexchange/codereview
I wrote this code in C++ as part of a uni task where I need to ensure that there are no duplicates within an array: // Check for duplicate numbers in user inputted data int i; // Need to declare i here so that it can be accessed by the 'inner' loop that starts on line 21 for(i = 0;i < 6; i++) { // Check each ot...
stackexchange/codereview
I'm using a 1280×850 image for background. With this CSS: body { line-height: 1; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; background:url(../images/bg.png) no-repeat bottom left; } Everything is ok in all browsers but not in Firefox. In Firefox, body background is wh...
stackexchange/codereview
I have two Database (eg. two .mdb file). both have same name, same table and same field. the difference is one is old and other is updated copy of .mdb file. i want to copy only new records from the updated copy of the .mdb to the older one. is there any way other than iterate trough all the records and compare and fil...
stackexchange/codereview
How can i gain control on window based appliaction in java. I am not asking like world or Excel. I am asking for a window based application, suppose a media player(not specific window media player) any media player that is running on window.
stackexchange/codereview
I'm working on a REST webservice, and in particular authentication methods for browser-based requests. (using JsonP or Cross-domain XHR requests/XDomainRequest). I've done some research in OAuth, and also Amazon's AWS. The big drawbacks of both is that I need to do either of the following: Store secret tokens in the ...
stackexchange/codereview
i am using linked api for profile search.. the api is ""http://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,headline,public-profile-url))?keywords=[" + txtsearch.Text + "]";" but i get only 10 profiles at a time.. so how can i get all the profile related to that search. with regards. plz do reply
stackexchange/codereview
I am using EF4 code first and want to generate a composite key which is made of a class property and foreign key. I have two classes: Order and Company. The Order class holds a reference but this will not necessarily be unique between companies. So I intend to use a composite key made up of Reference and Company.Compan...
stackexchange/codereview
I am trying to save many new objects in a form to one pre-existing parent object. - form_for :parent_object do |f| This is the beginning of my form. And then within it, I would do: - 2.times do - fields_for :child_object do |f| Now if I were to save this, it would render as an ParentObject_Controller Update act...
stackexchange/codereview
How to serialize Django model in json format if I want to include foreign key models fields? If I have: class Model1(models.Model): name=models.CharField() child=models.ForeignKey(Model2) class Mode2(models.Model): field1=models.CharField() field2=models.IntegerField() I wanna include everything in js...
stackexchange/codereview
basically want to have a multiple update based on a few conditions. So this is my sql query which returns error: Table have 3 columns: user_id, week and change INSERT INTO rank (user_id, week) VALUES (364709193,'201042'),(291179703,'201042'),(394613472,'201042'),(284220417,'201042'),(395465205,'201042'),(394807905...
stackexchange/codereview
I have a multidimensional array built from Strings that is initially created with the size [50][50], this is too big and now the array is full of null values, I am currently trying to remove these said null values, I have managed to resize the array to [requiredSize][50] but cannot shrink it any further, could anyone h...
stackexchange/codereview
Well, I'm in a middle of some design issue. I'm trying to built kinda universal commenting system for my site. So I started with two tables: Comment_node has many Comments Now I want to be able to attach my cool comment system to various places on my site. For example to blog_posts and to user_pages. blog_posts has on...
stackexchange/codereview
I have the a full XML file in an XDocument variable which I get from some API like this using (var reader = XmlReader.Create("website")) { doc = XDocument.Load(reader); } I need to get the structure of the XML and navigate through its nodes, but through the XDocument variable, I only get th...
stackexchange/codereview
How can I get the IP address of the system. I want the Ip address as I can see after doing ipconfig or /bin/ifconfig
stackexchange/codereview
I'm tring to set the default encoding of my console to UTF-8 so it can display cyrillic letters and accented letters. Here is my code: from Parser import parser import sys print sys.getdefaultencoding() sys.setdefaultencoding('utf-8') Output: ascii Traceback (most recent call last): File "C:\Users\Sergio.Tapia\Doc...
stackexchange/codereview
When you're making a web app, you frequently need different things to happen at a given URL for HTTP POST requests than happen for HTTP GET requests. I am making a web app in Pylons, and I'm encountering this question. Is it better to distinguish between POST and GET in my URL dispatcher (Routes) or in my controllers?...
stackexchange/codereview
Let's say I am getting requests such as: http://www.example.com/index.php?id=123&version=3&id=234&version=4 Is it possible to extract these in a simple way inside my php code? I realize I could get the entire querystring with javascript using window.location.href and handle it manually but I'm looking for something mor...
stackexchange/codereview
I am trying to implement an EPL query that can pick up the avg for Time(t) & Time(t-1). For example: a) in the first 5 seconds (seconds 0-5) there are 2 events with an avg of 12 b) in the next 5 seconds (seconds 5-10) there are 3 events with an avg of 23 , and in the EPL query that catches this information, I am a...
stackexchange/codereview
I have a Rails simple application that has two main models. A person model and a gift model. Gifts belong to people, and people have many gifts. I am currently (in the people index view) listing all people in the database with the following code: <% for person in @people %> <li><%= link_to h(person.name), person %></li...
stackexchange/codereview
How do I make a Silverlight TabControl arrange the tabs vertically?
stackexchange/codereview
In my application user input some text in searchbar and application genrate RSS feed agiant this text when done button is pressed. I want that the same action is performed when the user click on search button of keyboard. Any Idea.
stackexchange/codereview
CSS & html id0 is the class for the div that's got background as a sprite image and inside of this div..there's a list of links (in repeater)..when the user hovers over links..the background image of div displays diff parts of sprite image accordingly Now I want that the classes id1 to id5 be set as the classes of the ...
stackexchange/codereview
i have a problem with my cxgrid. in my cxgrid there a different rows and columns which have comboboxes as properties. but how can i cast a special cell value to a combobox-object? for example: i want to set the itemindex of the combobox in row 1 and column 2 to 0. thanks!
stackexchange/codereview
Here’s the situation: We have a 3rd party application that intermittently displays an error message. Usually the error occurs when no one is in the office, so we don’t know exactly what time the message box is popping up. We are working with our vendor to determine what the issue is, and they want to know exactly when ...
stackexchange/codereview
Well i have the following problem. I want to stress test an application of mine that is deployed on a Tomcat server. The case i want to test is the following: a user uploads a file, the file is transcoded to another format and the new file is downloaded back to a user's device. I simulate every user with a thread(with ...
stackexchange/codereview
Given two seperate computers, how could one ensure that colours are being projected roughly the same on each screen? IE, one screen might have 50% brightness more than another, so colours appear duller on one screen. One artist on one computer might be seeing the pictures differently to another, it's important they ar...
stackexchange/codereview
I am interested in writing a small windows application for Google Keyword tool in C#. Just wondering anybody could give me a sample code or some pointers to move in the right direction any help highly appreciated.
stackexchange/codereview
I have a site created in Drupal 6 and am having problems with a particular page. The page uses a specific content type (type_a). This has it's own page template (page-type_a.tpl.php) This all works fine. I've then added a view onto that page using views_embed_view(). This view has pagination. The first page looks great...
stackexchange/codereview
I am using jQuery UI to provide a modal window when a page loads. This works fine, however, the background layout is messed up compared to the way it should be. Here is the dialog code: <div id="dialog" title="Dialog Title"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt u...
stackexchange/codereview
I'm just getting started with Sinatra. I'm running Ruby 1.9.2 on Ubuntu. After my first issue, I've run into another one: When I follow the simple sample application instructions at sinatra.rubyforge.org/doc/, I modify my source file, but the changes aren't apparent until I restart Sinatra - even though the tutorial m...
stackexchange/codereview
I'm trying to show a Facebook post to wall window when the user dismisses a UIAlertView, I.E., it is showing the window inside the clickedButtonAtIndex delegate method called when the person taps on OK. WHat appears to happen is the UIAlertView dismisses itself and puts the original view (the main application view) to ...
stackexchange/codereview
I need to create a new target in project SDKTest.xcodeproj (say target is named lib_SDK.a) which contains all of the files in SDKTest.xcodeproj. I would then like to be able to import the lib_SDK.a file in my third party application called Client.xcodeproj and instanciate objects from that library, say an object called...
stackexchange/codereview
How do I disable(grey-out) the arrow button on the JSplitPane. I do know how to get the button from BasicSplitPaneDivider like this: final int UP_ARROW = 0; final BasicSplitPaneUI ui = (BasicSplitPaneUI) splitPane.getUI(); final BasicSplitPaneDivider divider = ui.getDivider(); final JButton upArrowButton = (JButton) ...
stackexchange/codereview
I have jpa annotated entity class like: @Configurable @Entity @Table(name="PLAYERS") public class Player { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="ID") private Integer id; @Column(name="NAME") private String name; @PersistenceContext public transient En...
stackexchange/codereview
So I have a service where you sign up for events. When you sign up, you get an email with an url where you can sign off the event. The given parameter of the url should be something that not anyone can guess. I've thought of UID, but that just isn't human readable. I also thought of hashing, but I don't know if I want...
stackexchange/codereview
i am trying to implement an extract function to grab data from my database and display it in a form so i cn update the database. the form is ok but the extract function.. this is what i have: $id = $_GET['id']; $qP = "SELECT * FROM test_mysql WHERE id = '$id' "; $rsP = mysql_query($qP); $row = mysql_fetch_array($rsP)...
stackexchange/codereview
As part of a bigger problem of enumerating a set, I need to write an OCaml function 'choose' which takes a list and outputs as the list of all possible sequences of size k made up of elements of that list (without repeating sequences which can be obtained from each other by permutation). The order they are put in the e...
stackexchange/codereview
I have created a simple WCF (.NET 3.5) service which defines 10 contracts which are basically calculations on the supplied data. At the moment I expect quite few clients to make a call to some of these contracts. How do I make the service more responsive ? I have a feeling that the service will wait until it process on...
stackexchange/codereview
Is there a simple and portable way to build JNI - in particular the C components - with an automated build system such as ant or make (or both, with one calling the other) without having to manually input things like the extension of the final library file or the path to the Java includes folder to the C compiler?
stackexchange/codereview
First of all I'd like to apologize if there's another question like this one and I didn't find it. I've been trying but since the problem is quite specific I couldn't find one. Now, the problem. I have a Base class and a Derived class (say BNode and DNode ), and I have a std::vector of BNode*. I have also a function wh...
stackexchange/codereview
I want to create tables in SQL Server 2008, but I don't know how to create composite primary key. How can I achieve this?
stackexchange/codereview
It seems to me that the most of the time you'd want to have ignoreDupResponse set to true on your a4j:support, a4j:commandLink, a4j:commandButton, etc. components. In which scenario it can be useful to have ignoreDupResponse set to false? Is there any performance cost of having ignoreDupResponse set to true? If not, wh...
stackexchange/codereview
I want wxListCtrl in report mode and I want to lock one or more columns such that when you scroll left and right those columns remain visible at all times. For example: | name | field1 | field2 | field3 |....| When scrolled to the left I want it to be like: | name | field3 | field 4 | ... | I can't find a way to ge...
stackexchange/codereview
I'm diving into ASP.NET MVC and I'm coming from a Ruby on Rails background. I'm trying to understand how ASP MVC handles AJAX functionality and, after reading some of the tutorials on the ASP website, it appears they implement AJAX functionality very differently. One of the ways that RoR handles AJAX functionality is...
stackexchange/codereview
If I create a mx:Label or mx:Text control in Flex and then set an opaqueBackground to it, I notice that there is some space around the text. I would like to be able to get rid of that space to where the text is completely flush to the top and bottom of the label. Changing the gap, padding, and leading didn't seem to h...
stackexchange/codereview
I'm working on my task in computer vision course. One of sub-tasks is gradient direction computation based on image brightness. I've made a matrix bright[width][height] containing brightness values for every pixel of the image. And i have two such functions: double Image::grad_x(int x,int y){ if(x==width-1 || x==0)...
stackexchange/codereview
public class prime { public static void main(String[] args) { long thing = 600851475143L; for(long i = 300425737571L ; i == 0 ; i-- ){ if (thing % i == 0) { long answer = i; System.out.println(answer); break; } } } } This is the code I currently have, how...
stackexchange/codereview
I have a crontab file which executes a shell script as shown below 27 11 * * * /usr/python/bi_python/launcher/launch_script_leds.sh The shell script does a number of things: 1)executes python script launcher.py which runs tests and outputs to log files 2)sends mail notification when tests have completed with test outp...
stackexchange/codereview
can anyone please suggest a method (ruby, python or dos preferable) to remove only the different files and sub-folders between two given folders? I need it to recurse through sub-directories and delete everything that is different. I don't wanna have to install anything, so a script would be great. Thanks in advance
stackexchange/codereview
Compact Framework .net C# Desktop Application for Windows Mobile I got 2 buttons that open 2 different "modules" / "screens" Code looks like: /*previous declaration in static class Program */ public static Form ofrmBin = null; /* this is called for both buttons */ Program.ofrmBin = new frmMainBin(); Program.ofrmB...
stackexchange/codereview
Vim is almost perfect for me. But I still want a line comment and block comment feature, I want to know how to write a vimrc to do this in python and javascript. No Addons
stackexchange/codereview
Can anyone recommend a good CMS which will output PURE RDF documents (I don't just want HTML pages with RDF properties). I basically want to have a database containing some data and have the CMS format that into pure XML RDF documents. I know Drupal has limited support but this seems to just add RDF attributes to HTML ...
stackexchange/codereview
From Coderanch and Sun Forum, I know the technique to have a horizontal scroll bar for JComboBox. However, their suggested solution are bounded to Look n Feel specific. As you can see, the below key code snippet will not work well, if users are under Linux machine with GTK+ look n feel, or Windows machine with Nimbus l...
stackexchange/codereview
I am trying to debug an old project in Visual Studio 2008. When I go to an asp page I get the following. Server Error in '/website' Application. This type of page is not served. Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorr...
stackexchange/codereview
Like that: COUNT(i.t_1) AS total_images WHERE total_images > 2 Throws an error: Unknown column "total_images" in where clause If this way: WHERE COUNT(i.t_1) > 2 Throws an error: Invalid use of group function How to do it right way? If need i'll post full statement. The meaning of this query to pick the 1 ad with t...
stackexchange/codereview
I am using jquery and the each function but I am having trouble finding the last item in a ul list. DATA: <ul id="1"> <li>1</li> <li>2</li> <li>3</li> </ul> <ul id="2"> <li>1</li> <li>2</li> <li>3</li> </ul> <ul id="3"> <li>1</li> <li>2</li> <li>3</li> </ul> I have tried mu...
stackexchange/codereview
I have an application that get/send data from/to a remote DB on internet. I need to get my application working in background mode, then i supose that i have to put all the send/get remote data in a service..... but.... How can this service change values of variables and UI textfields of my activities? i can't find any ...
stackexchange/codereview
I am creating a XMl editor. I want the JeditorPane to have expand collapse feature accoring to nodes.. If anybody is having any idea how to do it please tell...
stackexchange/codereview
How to Change the color of the text present in table view from its default black color in an iphone application ?
stackexchange/codereview
I have some problems adding a new custom button to the ribbon. As explained in the sharepoint 2010 SDK (How to: Modify the User Interface Using Custom Actions), i've created a visual studio project and copied the xml code which should create the new button. Here is the code: <?xml version="1.0" encoding="utf-8"?> <Elem...
stackexchange/codereview
I am proposing to convert my windows-1252 XHTML web pages to UTF-8. I have the following character entities in my coding: &#39; — apostrophe, &#9658; — right pointer, &#9668; — left pointer. If I change the charset and save the pages as UTF-8 using my editor: the apostrophe remains in as a character entity; the p...
stackexchange/codereview
i have to show a custom form like below either upload image or paste a url for the image O Radio button to set for image upload -------Input field for image upload OR O Radio button to set image url --------- input field to get that url im struggling with custom form code whether to use #type=>radio or ...
stackexchange/codereview
I have 2 classes: DataObject and DataElement. DataObject holds pointers to (only) DataElements, and a DataElement contains pointers to several types, among which a DataObject. This used to be no problem, since I only use pointers to DataObjects in DataElement, so a forward declaration of DataObject in the header of Dat...
stackexchange/codereview
I'm trying to sort the layout for one of my Android apps, but I'm finding layouts a nightmare. Principally I have to have a portrait and landscape layout for normal, small and large screens. So thats 6 layouts to maintain to start with, let alone having to launch the app on three emulators each time because my UI wi...
stackexchange/codereview
Need to get Visual Studio 6 Processor Pack installed on Windows 7 (32 bit). First i installed VS6 + SP6, which prevents the PP from installing. I uninstalled VS6 and re-installed VS6 and am trying to install SP5. It is now complaining that MDAC 2.5 or 2.6 needs to be installed first. I've tried 2.5, 2.6, and 2.8. All r...
stackexchange/codereview
I have a library that contains a class that references dwm. If this library is use in an XP system but the class is not used, would this cause an error? Supposed this library was to be used on WP7 or XNA? Would this cause an error?
stackexchange/codereview
I am currently writing a program that reads records from a txt file and prints the data on the screen as such: GRADE REPORT NAME COURSE GRADE ----------------------------------------------------------- JOE FRITZ AMERICAN GOVERNMENT ...
stackexchange/codereview
For a custom TableModel, I am overriding isCellEditable, which is returning true always. I am also overriding setValueAt, but don't know how to use the method, so that, JTable reflects the changes done by editing. Below is the modified code for PersonTableModel :- class PersonTableModel extends AbstractTableModel{ ...
stackexchange/codereview
I work on speed optimization of my application, and what I have found is that LINQ (or EF) is creating some strange SQL for me that works slow. Here is some code : SomeList.AddRange(_databaseView .Select(l=> new SomeViewModel { Date = l...
stackexchange/codereview
I'm having a heck of a time figuring out how to use the sax parser for libxml2. Can someone post an example that parses this XML ( yes, without the <xml...> header and footer tags, if that can be parsed by the libxml2 sax parser): <hello foo="bar">world</hello> The parser should print out the data enclosed in element...
stackexchange/codereview
I'm trying to complete a simple task in Python and I'm new to the language (I'm C++). I hope someone might be able to point me in the right direction. Problem: I have an XML file (12mb) full of data and within the file there are start tags 'xmltag' and end tags '/xmltag' that represent the start and end of the data sec...
stackexchange/codereview
I have a rails3 app that has some observers. I can't for the life of me figure out how to turn these off for my rspec tests!
stackexchange/codereview
Quoting from http://sites.google.com/site/gson/gson-design-document: Why are most classes in Gson marked as final? While Gson provides a fairly extensible architecture by providing pluggable serializers and deserializers, Gson classes were not specifically designed to be extensible. Providing non-final c...
stackexchange/codereview
I'm currently trying to implement the game of Nim using Java, I want to be able to have one player act as the server and another as the player. I'm fairly new to Java networking and have only had experience using basic TCP/IP where the human client connects to a computer host. The trouble I'm having is that I need to b...
stackexchange/codereview
Given these params: ex: 1 {:field => 'admin', :id => "1"} ex: 2 {:field => 'client', :id => "1"} ex: 3 {:field => 'partner', :id => "1"} Is it possible, (and how of course) could i dynamically apply this to the User model such as: controller #note the field attribute is not a field #the field attribute I'm trying to...
stackexchange/codereview