instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have a string which looks like this 512.3 is there a way to add a trailing zero so it looks like this 512.30 Just to clarify (sorry I didn't know there where different ways etc.) My string is an amount which is passed so changes all the time I only need the trailing zero on amounts like 512.3, 512.4,512.5 etc. as so...
stackexchange/codereview
Example: INDEX | SOME_DATA 1 | some_data1 3 | some_data3 4 | some_data4 5 | some_data5 I want to do an INSERT to add ---> 2 | some_data2. Is there an SQL command or some way of doing this? [edit] OK. Maybe if i explain every thing what i want to accomplish you'll see why i'm trying to do what i want to...
stackexchange/codereview
How do I create a transparent numberpad view for a passcode view ? Like this ?
stackexchange/codereview
So I am trying to use a custom wpf control on a winforms using: var f = new FileStream (@"C:\sample.xaml", FileMode.Open, FileAccess.Read); var element = XamlReader.Load(f); f.Close(); var elementHost = new ElementHost(); elementHost.Dock = System.Windows.Forms.DockStyle.Fill; elementHost.Child = element; this.Con...
stackexchange/codereview
I have this database file under the usual databases folder and a bunch of tables inside it. Please note that I don't want to retrieve under the command line. I know I can use the ".tables" command. I want to retrieve a list of all tables in it, using code, so that I can execute some specific algorithms on each of them....
stackexchange/codereview
In javascript, What is the difference between function declaration and function expression in terms of scope? function declaration means we are polluting the global space. Is it the same case with function expression? Function declaration function sum(){ // logic goes here } Function expression var sum = function(){}...
stackexchange/codereview
So there could be two rows for each proposal, one row where bt.stage_id = 1 if it is accepted, but not reconciled, and 1 row for stage 2. I want to perform the following calculation, but only add the stage 2 not the stage 1 if the stage 2 is present, how do I do this? SELECT SUM(bt.novartis_total) AS 'NovartisTotal' ...
stackexchange/codereview
Basic information: Ruby version : 1.8.7 JRuby version: 1.5.3 Rails version: 2.3.5 Mysql version: Ver 14.14 Distrib 5.1.48, for apple-darwin10.3.0 (i386) using readline 5.1 I've been having a hell of a time trying to get JRuby, Rails, and MySQL to play nicely together. I've come to a dead end and now need some help. I...
stackexchange/codereview
I'm launching a child process that exposes a WCF endpoint. How can I signal from the child process to the parent process that the child is fully initialised and that it can now access the endpoint? I'd thought about using Semaphores for this purpose but can't quite figure out how to achieve the required signal. ...
stackexchange/codereview
Is there a way to get the list of gems or paths to gems that are being loaded for the current project by Bundler (it's a Rails 3) project. I'm looking for something like: Gem.path but that returns only the ones being actively required by Bundler in the Gemfile.
stackexchange/codereview
I am doing a site in cakephp where users can upload videos and those get published on the site once approved by the moderator. Currently, I am accepting video files which are being uploaded on my server. These files will be downloaded and checked by the moderator and if they seem fine the moderator will click a button ...
stackexchange/codereview
I need to call a wrapped function from a C++ DLL with the following declaration: [DllImport(@dllPath, EntryPoint = "Calling_fooBar")] private static extern int Calling_fooBar( uint* a, uint* b, uint* c, ...
stackexchange/codereview
I'm curious about the technical reason for cin.getline and the global getline function being in different places. What was the motivation for not simply defining all these function signatures for cin: //THESE TWO EXIST istream& cin::getline (char* s, streamsize n ); istream& cin::getline (char* s, streamsize n, char de...
stackexchange/codereview
Twitter sometimes shows an message: Twitter is over capacity This is to prevent too much pressure on the servers. Which avoids that the servers go down. How do I implement this in my application? Edit: I am NOT looking for a PHP specific solution.
stackexchange/codereview
I'm currently doing this using Javascript, however, I was wondering if it's possible to select a certain child of an unordered-list and then its immediate sibling, using CSS. Example with 4 list-items: ul.tab li:hover + (the next sibling that follows the current hovered one) { }
stackexchange/codereview
I have the following classes (pseudocode): Item ( int Field1 ) ItemDetail : Item (int Field2, string field3) If I set ItemDetail as the datasource for an asp.net gridview: grid.DataSource = new List<ItemDetail>(); grid.DataBind(); Can I use Field1 in the GridView? If so, what is the correct DataBinder syntax? The fo...
stackexchange/codereview
I have few doubts and queries regarding Digg OAuth Tokens. My purpose is to authenticate user once for my application, save the credentials in database and then access digg API on user's behalf even when user is offline. However, there seems to be a problem. The authenticated tokens initially work fine but expire after...
stackexchange/codereview
I have a form which I intercept with a event.preventDefault(); when it is submitted, until the result of a callback function is returned (to get the lat and lng of a postcode). Brief mockup below: $(".form").click(function(){ event.preventDefault(); if(calculateLatLng($(".postcode").val())){ $(this).submit(); } }); Ho...
stackexchange/codereview
The format to view a status is: http://twitter.com/<screen_name>/status/<mention_id> Is there an alternate that does not require the screen name (or alternatively uses the user_id)?
stackexchange/codereview
I have some EditViews in the rows of a ListView. This works just fine except when the soft keyboard raises and lowers. When I touch the EditView within the ListView with the soft keyboard down, focus jumps to the EditView, then the keyboard comes up, removes focus from the EditView and sets focus to the ListView, resu...
stackexchange/codereview
I'm just wondering if there is a better way to detect the width for each of these .modal elements (there could be N number of them in that markup). With the way I've got this figured now, it seems to only be using the .width() of the first .modal in the markup. <script type="text/javascript"> $(document).ready(func...
stackexchange/codereview
As MemoryStream is an unmanaged resource does it always have to be disposed? Given: 1) A method is invoked. 2) A MemoryStream object is created (MemoryStream ms = new MemoryStream();). 3) An exception occurs and is caught from the invoking classes. The reference on the MemoryStream object is therefore lost. Does this...
stackexchange/codereview
The following C# program does what I expect, which is to output "First," "Second", "Third." However, when I change the type of foo in Main to dynamic, it raises an exception that says: "Cannot implicitly convert type 'MyProgram.Program' to 'System.Collections.IEnumerable'. An explicit conversion exists (are you missin...
stackexchange/codereview
Sorry about the clumsy title; I couldn't find a bit way of expressing what I'm trying to do. I am getting an input from the user of multiple 32-bit integers. For example, the user may enter the following values (showing in hex for ease of explanation): 0x00001234 0x00005678 0x0000abcd In this particular case, the fir...
stackexchange/codereview
I don't think this is quite possible or if it is recommended to do... but is there a way to connect or comunicate or deploy Java and .NET application for method beside Web Services. I mean I understand there are Messaging server that allows Java application communicate to each other but I dont know if this can cross de...
stackexchange/codereview
I am dealing with hundreds of thousands of files, I have to process those files 1-by-1, In doing so, I need to remember the files that are already processed. All I can think of is strong the file path of each file in a lo----ong array, and then checking it every time for duplication. But, I think that there should be s...
stackexchange/codereview
I want to provide a templated function that converts most basic types to string. The best I have come up with so far is the following: template<typename T> inline std::string anyToString(const T& var) { std::ostringstream o; o << var; return o.str(); } The function can e.g. be used for the following: class Time...
stackexchange/codereview
This is my table: id id_1 camp 1 0 x1 2 0 x2 3 0 x3 4 1 x4 5 1 x5 6 1 x6 7 3 x7 8 3 x8 9 3 x9 I am in need of a SQL that, if there are no rows with id_1 of "x"...
stackexchange/codereview
I have form submission doing a post back. The controller action accepts the values as parameters. For ex: EditProduct(int productid, string productname). productid is supplied from the form in a hidden field. How can I ensure that that a user will not invoke this action and pass this productid and name as queyst...
stackexchange/codereview
As not all our development machines have internet access, we want to cache the API docs of various libraries in our local network. I was thinking of a webapp that handles caching and listing the available Javadocs after someone uploads them (in jar format). Ideally, the source jars would be automatically pulled from ou...
stackexchange/codereview
I have changed my server with a project running on codeigniter. I already installed everything (PHP, MySQL, Codeigniter, etc) and all the processes seem to work fine. But now I'm trying to connect to my project homepage, but I only receive a blank page. It's not a rewrite problem (the Codeigniter index.php works fine.....
stackexchange/codereview
what is gamekit framework in iphone 4.0? can we develop individual game applications using it instead of cocos2d framework?
stackexchange/codereview
I have had this happen to me often. I am working on a master branch and I need to test a plugin, so I create a new branch and check it out. I download the plugin into the project directory and test it out. Then I switch back to the master branch and delete the branch I had created. What ends up happening is the files ...
stackexchange/codereview
Suppose the following structure on an svn server: -svn-| |-trunk --- | | | - dirA | | - dirB | |-branches -| | - foo - | | - dirA At a revision X, the foo branch was created from the trunk. Some time later at revision Y, directory...
stackexchange/codereview
I need to escape quotes from a string before printing them out. I've written a function, using char arrays to be as explicit as possible. But all this function seems to do is print out its own input: public static String escapeQuotes(String myString) { char[] quote=new char[]{'"'}; char[] escapedQuote=new char[]{'\\'...
stackexchange/codereview
I have a function that gets raw HTML to output to a table, but I want to take out the first three columns and put them in another div. I am considering making a div on the page that is hidden, setting this div's html to the raw HTML I get, and then using the selector syntax to strip it into each table's div. Is there ...
stackexchange/codereview
In mysql you can view a table's structure via explain tablename; What is the equivalent for sqlite3?
stackexchange/codereview
As I've understood, when you create a new list with expression like the following, Erlang doesn't copy L1, it just copies H. L2 = [H|L1] Does Erlang have persistent a data structure (see Persistent data structure) for dict, that is, when you add/remove/modify nodes in the tree only few elements are being copied (like ...
stackexchange/codereview
I want to know this because I want to do something 'explorable' with just the mouse, with zoom-in and out, etc.
stackexchange/codereview
I have made a drum app in iphone. When i play drum record the sound of that after finishing play i want to save session which i played. How it possible...?? Please someone help me...
stackexchange/codereview
I am trying to develop an app for which I want multiple screen support. I have read the Android article on Best practices for Multiple Screen Support. As per the article we have to follow 3 important things: Mention support for different screen sizes(large, medium and small) and any density in AndroidManifest.xml. Pl...
stackexchange/codereview
I am using SmsManager to send text messages from my application. The code snippet is smsManager.sendTextMessage(number, null, content, null, null); For messages with less than 160 characters. And for multipart messages I use, ArrayList<String> parts = smsManager.divideMessage(content); sMan.sendMultipartTextMessage(nu...
stackexchange/codereview
I have a query that return employees: Name Form Bob abc Bob gfd Bob fgf John abc Gavin abc Jessie ala Jessie asf How would I say if abc exists for the employee then result = yes and if abc doesnt exist then no? What I would want to see is this: Name Result Bob Yes John Yes G...
stackexchange/codereview
I have a custom function in Excel 2007. It returns array of doubles. Dim ResultArray(10) As Double If I use it with Ctrl-Shift-Enter I get 10 results in a row. I want to access a particular resut within the result array. Say second result. I'd expect something like =myFn(a,b,c)(2) but it doesnt work.... Is it possible...
stackexchange/codereview
I'm interested in writing a python binding or wrapper for an existing command line utility that I use on Linux, so that I can access its features in my python programs. Is there a standard approach to doing this that someone could point me to? At the moment, I have wrapped the command line executable in a subprocess.P...
stackexchange/codereview
I have an XML schema that was built with an old version of the XML spec (http://www.w3.org/1999/XMLSchema). I am trying to parse XML messages using the schema (shown below). By default, the Xerces 1.1 parser looks for the schema in the app domain root directory. I am trying to move the schema to a public location in ou...
stackexchange/codereview
Any ideas of how to implement an efficient algorithm (better than O(n2)) to solve the assignment problem in a non-bipartite graph? The main idea is the following: I have two identical sets, lets say S1 = [A,B,C,D], and S2 = [A,B,C,D], and there are some edges between different elements of the sets, with a given cost,...
stackexchange/codereview
what I am looking to do here is create a string based on the value of an int. I know I am able to create a vale of an in based on a sting via the length() method but was wondering how to do the opposite. for example I have an int of 30, with that int I would like to create 30 dots ina line based on that int and place ...
stackexchange/codereview
Possible Duplicate: Using eclipse CDT without creating a project Can Eclipse CDT (Helios Release) be set up for multiple build targets for a single project? Say for example I have several small programs I would like to edit with the IDE and build, do I need to create a new project for each? Or the other case of an e...
stackexchange/codereview
I have a Facebook application where I am using it in Windows phone 7 application. I am done with share on Facebook option through my mobile application. I want to add an extra link at the bottom of my application wall post (beside the like and comment links present) How can I achieve this? Which setting need to be set ...
stackexchange/codereview
Let me explain my problem with a scenario: I have webpages "A.jsp" and "B.jsp". "B.jsp" is a page with a form that requires input field, 'username' and on submission displays a certain page "C.jsp" with user-specific information. "A.jsp" has table with an element that would correspond to 'username' on "B.jsp". Onclick ...
stackexchange/codereview
I created a custom NSString Category which lets me find all strings between two other strings. I'm now running into the problem of finding that there are a lot of kBs leaking from my script. Please see code below: #import "MyStringBetween.h" @implementation NSString (MyStringBetween) -(NSArray *)mystringBetween:(...
stackexchange/codereview
I have two datetime fields here: actual_delivery and scheduled_delivery What I want to do an ORDER BY on is how much great actual_delivery is than scheduled_delivery. I'm using MySQL locally and PostgreSQL in production, so it needs to work for both.
stackexchange/codereview
I'm trying to familiarize myself with CoffeeScript and backbone.js, and I must be missing something. This CoffeeScript: MyView = Backbone.View.extend events: { "click" : "testHandler" } testHandler: -> console.log "click handled" return false view = new MyView {el: $('#test_container'...
stackexchange/codereview
I have a page-curl modal working. But I need to be able to track when the user hits the page curl to close the page so I can see some vars. Is there an event I can listen for or some delegate where I will get a call to tell me of this event? Many Thanks -Code
stackexchange/codereview
I would like to stop the execution of a process with Ctrl+C in Python. But I have read somewhere that KeyboardInterrupt exceptions are only raised in the main thread. I have also read that the main thread is blocked while the child thread executes. So how can I kill the child thread? For instance, Ctrl+C has no effect ...
stackexchange/codereview
How do I write a RewriteRule for htaccess to block access to php/html (unless authenticated) and allow access to all other extensions?
stackexchange/codereview
I'm a bit further along in converting some sample test/specs from Watir to Selenium. After my last question here and suggested response, I began using Selenium 2.0 with WebDriver instead of Selenium 1. The example in question deals with gathering all links within a table into an array -- that part is complete. Howeve...
stackexchange/codereview
I have an application that the UI Image resources are designed target iphone3 screen (320*480), which looks not perfect on iphone4, is there any way to make it also looks nice on iphone4 ? what I'm thinking is have two different set of resources for different resolution and choose it at runtime according ios version. ...
stackexchange/codereview
Does PyTables support storing Python objects? something like this : dtype = np.dtype([('Name', '|S2'), ('objValue', object)]) data = np.zeros(3, dtype) file.createArray(box3,'complicated',data) I get error when trying to do this of course... How to properly store arrays of objects?Is it possible? Thanks
stackexchange/codereview
I wanted to know if a new project in eclipse we could import the jar Alfresco and used for example by creating just a jsp with a field of research that would seek a metadata ..? Thank you.
stackexchange/codereview
How can I achieve something like so: AllocFactorPolicy<1.25> allocDouble; AllocFactorPolicy<125,-2> allocMaE; I've tried something like this: template<class T&> struct AllocFactorPolicy; template<double&& value> struct AllocFactorPolicy { double value_; AllocFactorPolicy(): value_(value) { c...
stackexchange/codereview
I want to generate a where condition in nHibernate Like Below Can any one Help me out Select Id,Name from Employee where (id=@id or Id is Null) i want the code to generate the where condition.
stackexchange/codereview
I want to create a PDF reader like iBooks. So that you can see the thumbnails for the pages, press on it and it opens the page etcetera. Also the bookshelf for showing the loaded PDF's Does anyone know how I can create something like that? Is there a library or does somebody knows a good tutorial? Thanks in advance! Wh...
stackexchange/codereview
Given an arbitrary HTML element with zero or more data-* attributes, how can one retrieve a list of key-value pairs for the data. E.g. given this: <div id='prod' data-id='10' data-cat='toy' data-cid='42'>blah</div> I would like to be able to programmatically retrieve this: { "id":10, "cat":"toy", "cid":42 } Using jQu...
stackexchange/codereview
When I upload my asp.net web application to the server and access to the url link, it is asking for the authentication... if I dont, I got this error message: ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base p...
stackexchange/codereview
Have a client facing web-service which this morning started throwing a very strange exception. Thread was being aborted. at System.Net.UnsafeNclNativeMethods.OSSOCK.recv(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags) at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset...
stackexchange/codereview
I'm trying to do some image manipulation on the iPhone, basing things on the GLImageProcessing example from Apple. Ultimately what I'd like to do is to load an image into a texture, perform one or more of the operations in the example code (hue, saturation, brightness, etc.), then read the resulting image back out for ...
stackexchange/codereview
I have a relatively expensive-to-calculate function which, given a single scalar, returns a numpy.array() object. When I try to integrate this function with respect to the scalar argument, using scipy.integrate.romberg, I get an error internal to scipy from the condition it uses to determine convergence: Traceback (mos...
stackexchange/codereview
I am trying to use hobocopy to do a copy from X to Y. I do not want a couple of the folders to come across so I thought the /ignorepattern param would be fine to use. It works fine like so: HoboCopy.exe /full /statefile=C:\scripts\test.dat /y /r C:\GIT\Apache \\192.168.0.2\backups\websites\testcopy /ignorepattern=rep...
stackexchange/codereview
About P2P, I know that structured overlays are good for exact-match query. And I read that unstructured overlays are good at complex query. I didn't understand what "complex" refer to here, in what sense or logic ?
stackexchange/codereview
I am simply looking for a way to compress multiple files in a GZip file with the GZipStream class. Anybody has an idea how to do that?
stackexchange/codereview
I had display in link as follows. Three Links on left hand side ,two links on right hand Side and in between Some space has to be there. Please suggest how to do this. I have an idea's please suggest which is possible and the technical difficulties. For three Links i thought to put LinkBar and for the left ha...
stackexchange/codereview
Is there a comprehensive comparison of different versions of DirectX, different versions of shaders? There's an article on Wikipedia about HLSL with comparison of different versions of shaders. It is useful, but only if you already know a lot of details about shaders (what is instruction predication? what are gradient ...
stackexchange/codereview
I have a log4j.properties file that looks something like this: log4j.logger.com.foo=INFO, foo-log log4j.logger.com.foo.BarImpl=INFO, bar-log Usually for classes that match the package structure of com.foo I would want the foo-log appender to be used. However, within that package, I want the BarImpl logs to use the ba...
stackexchange/codereview
It appears that C# 4.0 does not support covariance (using the "in" keyword) on parameters in overrides; is that the case? If so, is there a more elegant way to do this? CONTEXT public interface IBaseEvent { /* ... */ } public interface IDerivedEvent : IBaseEvent { /* ... */ } public class MoreDerivedEvent : IDerivedE...
stackexchange/codereview
I am looking for a list of towns, cities by country (the countries I mean here are all countries that exist on planet Earth). Is there any open-source SQL database available online which I can download and use, or any geography social network sites APIs I can use? Or is it something I have to make it up myself? - I hop...
stackexchange/codereview
I made a wordpress blog: link text I have a separate htm page with the form and input field to search. It does not work. But when I have the search field and submit bitton in the sidebar on every page, it works fine. I left bot the sidebar search and the "search blog" page available. Is it possible to have a separ...
stackexchange/codereview
I am supposed to draw an enumerator for the language 0^k1^k (k>=0). I am not sure how that is different from building a Turing machine state diagram for this language: the way I understand it is that I need to build an enumerator that recognizes the aforementioned language given all strings above {0,1} by simulating th...
stackexchange/codereview
Does anyone know a Joomla Extension for moderated FAQs? Something which can let the users ask a question. After that the admin would have the option to moderate the question and respond to it... Please let me know. Thanks.
stackexchange/codereview
i have asked myself if there is an easy way to check if a ListBox has a maximum of 5 selected items. There must be at least one and at most 5 items selected. Do i need a CustomValidator with server-side validation? Many thanks in advance...
stackexchange/codereview
I'm used to eclipse's and notepad++'s behavior of automatically opening the files and tabs present on last exit. Does anyone know if there is a way to enable this in Gedit? The session management plugin that I'm using seems to require explicit menu selection of load and save in order to retrieve a session. Anyone know ...
stackexchange/codereview
i've to submit this assigment in few hours and i'm very nervous, it's sort of Gas Station managing programs, handeling input files, and printing results... it's only 1 .c file and that's my first code lines, which defines the structs #include <stdio.h> #include <string.h> #include <stdlib.h> struct Gas_Station *pgas...
stackexchange/codereview
Is this the fastest (execution time) way to find the longest element in a list? #!/usr/bin/env perl use warnings; use 5.012; use List::Util qw(reduce); use List::Util::XS; my @array = qw( one two three four five six seven eight nine ten eleven ); my $l = reduce{ length($a) > length($b) ? $a : $b } @array; say $l;
stackexchange/codereview
$people = array( array('id' => 12345,'first_name' => 'Joe1','date' => '02/06/2011'), array('id' => 12346,'first_name' => 'Joe','date' => '01/27/2011'), array('id' => 12347,'first_name' => 'rah','date' => '01/22/2011'), array('id' => 12348,'first_name' => 'sar','date' => '02/21/2011'), array('id' => ...
stackexchange/codereview
I have seen following style class definition several times. What exactly are the pros/cons of this style? typedef class _MyClass { public : _MyClass(); } MyClass;
stackexchange/codereview
I want to know the difference between the public and internal visibility modifiers. When should we use internal on a class and when public? I am confused with when a method should be public or internal. I read that internal can be accessed through the assembly, while public can also be used through the assembly. Then w...
stackexchange/codereview
lately I got a problem on using .net WebBrowser control. when redirect to a file downloading, the WebBrowser control popup the SaveFileDialog, I don't know if there is a way avoid this to let me choose a filename and save it to some location. Thanks for any helps.
stackexchange/codereview
I have a web server that hosts Ruby version 1.8.5. Which version of Rails is compatible with that version of Ruby? On the Rails site, it says that the pre-requisite for running Rails 3.0 is Ruby 1.8.7. Does Rails 3.0 work at all with versions prior to 1.8.7? Any help appreciated.
stackexchange/codereview
I need to find the next (minutes divisible by five):00 from from the result of obtaining the current time in UTC, let me explain... I use the SELECT UTC_TIMESTAMP() Function in MySql, which returns me "2010-11-11 16:26:19". I then want to convert this value to "2010-11-11 16:30:00", preferably using MySql only, or a c...
stackexchange/codereview
I wrote program in C# that invokes MSTest from command line. One of test cases throws StackOverflowException and it causes, that QtAgent32 (and my application) process breaks. What can I do to prevent from this situation (I can't change unit tests)?
stackexchange/codereview
I'm doing some internal domain-specific library development at the moment, and incidentally the stuff i'm trying to model mimicks "class" and "object" relations fairly well. So objects of my C# class MyClass should sort of act like a domain specific class for objects of my C# class MyObject who play the part of object ...
stackexchange/codereview
I use this function courtesy of a Stack Overflow user to update controls from a BackgroundWorker. static void SynchronizedInvoke(ISynchronizeInvoke sync, Action action) { // If the invoke is not required, then invoke here and get out. if (!sync.InvokeRequired) { // Execute action. action(); ...
stackexchange/codereview
i am using UIImagepickerController to take pictures from camera..i am using my own view over the camera view by using the cameraoverlayview property...i want to take a picture from camera when user clicks on a button in my custom view...i am using the following code - (void)viewDidLoad { imagePickerController = [[UII...
stackexchange/codereview
How should I call this Soap Webservice from an android <AddCar xmlns="http://abcd.com/"> <clsAddCarRequest> <clsCredentials> <EmailAddress>string</EmailAddress> <Password>string</Password> <TokenID>string</TokenID> </clsCredentials> <clsCar> <CarID>int</CarID> <Us...
stackexchange/codereview
I have the following: validates :fname, :presence => true, :length => { :minimum => 2 } How do I add a message to that? Right now the errors says "Fname is too short (minimum is 2 characters)" I'd like it to say First Name and not Fname. thanks?
stackexchange/codereview
I have programmatically added a datagridviewcheckboxcolumn as such: DataGridViewCheckBoxColumn cb = new DataGridViewCheckBoxColumn(); dataGridView1.Columns.Add(cb); It adds the column of check boxes fine, but it won't allow me to check any of them when I click on them? Anybody know why? Thanks.
stackexchange/codereview
I am trying to delete a bunch of different things from the stage all at once. I have 3 dynamically created text fields and 2 dynamically created movie clips. I added them to the stage through my document class buy creating them, editing their properties and then... addChild(myText1); addChild(myText2); addChild(myText...
stackexchange/codereview
i have file like this "a",205 "b",214 "c",223 """,13 and i need to parse it i read line by line to str and i have to convert second character from string to integer, but when it comes to quote <"> character it throws an exception string subscript out of range. std::string STRING; std::ifstream infile; st...
stackexchange/codereview
I am trying to export Facebook Page Fans. The closer I found was this article. It states: Getting fans from a Facebook page is not yet supported by the Facebook API. Luckily, the Facebook Web interface uses a simple AJAX/JSON call to supply the data when you view the page.the data when you view the page. And...
stackexchange/codereview