instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I want my website to have a checkbox that users can click so that they will not have to log in each time they visit my website. I know I will need to store a cookie on their computer to implement this, but what should be contained in that cookie? Also, are there common mistakes to watch out for to keep this cookie fr...
stackexchange/codereview
I'm really stumped on this one. I want to output a list and have the tag file take care of commas, singular versus plural, etc. but when I display the list it completely ignores whitespace so everythingrunstogetherlikethis. I tried using the HTML entities "thinsp", "ensp" and "emsp" (I can't use "nbsp", these have to b...
stackexchange/codereview
We have a large C/C++ legacy source tree that has been around the block a few times. We expect there are a substantial number of methods no longer used. Is there a tool that can help us quickly identify the unused code?
stackexchange/codereview
I have a Rails app that sets a cookie and does a redirect to another server once the user is logged in. However, the cookie that the Rails app sets isn't seen by the server for some reason. I've tried setting http_only to false but I still can't even see the cookie unless the domain is the same as my Rails app. Here's ...
stackexchange/codereview
I'm struggling to separate the dependencies in the following code: public static SiteConnector ConnectToSite(String Logon, String Password) { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_URI); ConfigureRequest(Logon, Password, webRequest); HttpWebResponse webResponse =...
stackexchange/codereview
Consider the following code: Public Class Animal Public Overridable Function Speak() As String Return "Hello" End Function End Class Public Class Dog Inherits Animal Public Overrides Function Speak() As String Return "Ruff" End Function End Class Dim dog As New Dog Dim animal As Animal ani...
stackexchange/codereview
I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.0 - RUBY VERSION: 1.8...
stackexchange/codereview
We have a CGI based web report framework written in C/C++. The CGI client connects with proprietary code which in turn connects to database. We are looking for a better Java based replacement for CGI due to performance, maintenance and probably security factors. Can JasperReports connect with the proprietary code? Or...
stackexchange/codereview
I have a protected Excel worksheet, without a password. What I'd like to do is trap the event that a user unprotects the worksheet, so that I can generate a message (and nag 'em!). I can setup event checking for the application, for when new workbooks are opened, etc., but not for Unprotect. Does anyone have an idea?
stackexchange/codereview
I have a generic list... public List<ApprovalEventDto> ApprovalEvents The ApprovalEventDto has public class ApprovalEventDto { public string Event { get; set; } public DateTime EventDate { get; set; } } How do I sort the list by the event date?
stackexchange/codereview
I was just writing some quick code and noticed this complier error Using the iteration variable in a lambda expression may have unexpected results. Instead, create a local variable within the loop and assign it the value of the iteration variable. I know what it means and I can easily fix it, not a big deal. But I...
stackexchange/codereview
I have discovered through trial and error that the MATLAB engine function is not completely thread safe. Does anyone know the rules? Discovered through trial and error: On Windows, the connection to MATLAB is via COM, so the COM Apartment threading rules apply. All calls must occur in the same thread, but multiple con...
stackexchange/codereview
I have an exception handler . In my asp.net application. It’s written in Global.asax. In the the Application_Error() method. It works for Exceptions that happen in the context of pages and classes that are called as a result of a request to the application. But if I spawn a thread, as a result of a request (or other ...
stackexchange/codereview
Is it possible via code to programmatically (from .NET for example via SQL query) to ask an Access database if it is corrupt or have tables with corrupt rows in it? //Andy
stackexchange/codereview
I have a variable of type Number, and i like to obtain the sign (if is '-' i like to have -1 and if '+' i like to have 1). So, i made this: var sign = Math.abs(n) / n; But, there is any other way? Better than this?
stackexchange/codereview
I have a FreeBSD box with Bash set up. I'm used to Debian Linux where my command history is automatically saved when I log out, so that when I log back in I can press up or Ctrl-R or whatever and have access to my history. How do I set up Bash to do this on FreeBSD?
stackexchange/codereview
Is there a significance to the word "salt" for a password salt?
stackexchange/codereview
I am running an english language version of WindowsXP, but have set Spanish as my only accepted language in Firefox. I had naively expected the browser's language to be set as the default when I load an applet in a browser session, but this does not appear to be the case. The applet starts up in English, the default la...
stackexchange/codereview
It seems that the decision to make your objects fully cognizant of their roles within the system, and still avoid having too many dependencies within the domain model on the database, and service layers? For example: Say that I've got an entity with a revision history, and several "lookup tables" that the data referenc...
stackexchange/codereview
I have a proxy object generated by Visual Studio (client side) named ServerClient. I am attempting to set ClientCredentials.UserName.UserName/Password before opening up a new connection using this code: InstanceContext context = new InstanceContext(this); m_client = new ServerClient(context); m_client.ClientCredential...
stackexchange/codereview
I'm trying to use opengl in C#. I have following code which fails with error 2000 ERROR_INVALID_PIXEL_FORMAT First definitions: [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern IntPtr GetDC(IntPtr hWnd); [StructLayout(LayoutKind.Sequential)] public s...
stackexchange/codereview
I'm looking for best practices for performing strict (whitelist) validation/filtering of user-submitted HTML. Main purpose is to filter out XSS and similar nasties that may be entered via web forms. Secondary purpose is to limit breakage of HTML content entered by non-technical users e.g. via WYSIWYG editor that has a...
stackexchange/codereview
I want an simple IDE/editor for C in Linux to which I can add features easily. For example: I want to add a right click menu item and a related action for the editor. It should be easy to extent and add any desirable functionality. I tried eclipse CDT but its to much of learning(I mean knowing the eclipse plug-in archi...
stackexchange/codereview
How to create a table with a timestamp column that defaults to DATETIME('now')? Like this: CREATE TABLE test ( id INTEGER PRIMARY KEY AUTOINCREMENT, t TIMESTAMP DEFAULT DATETIME('now') ); This gives an error.
stackexchange/codereview
This is probably a very simple question, but what is the technical term for this class of language? They use an "intermediate" assembly type language which is sent through the JVM or CLR. They both are object oriented and they both depend on an intermediary such as the Java Virtual Machine or the Common Language Run...
stackexchange/codereview
Does anybody knows why this snippet returns false even if the passed string is "Active"? if ($('status_'+id).getText()=="Active") I've also tried changing the code to if ($('status_'+id).getText()==String("Active")) and if (String($('status_'+id).getText())=="Active") and still no luck. I've also checked $('status_'...
stackexchange/codereview
How can I implement a diff function, such as Stack Overflow's question revision history?
stackexchange/codereview
I've been reading many a tutorial/article on unmanaged DLLs in C++. For the life of me, however, I cannot seem to grasp the concept. I'm easily confused by the seeming disagreement about whether it needs a header file, how to export it, whether I need a .lib file and what have you. So, let's assume I have just a functi...
stackexchange/codereview
I want to checkout, and then update as necessary, the Django Subversion trunk on a Mac OS X Leopard 10.5.5 machine. I am only interested in having updated Django code on my Mac. I am not interested in contributing patches to the Django project. I do not need the Subversion history for the Django trunk. I plan to use G...
stackexchange/codereview
If you create a simple "Hello World" VSTO2SE add-in targeting Microsoft Office Excel 2003, it takes 15 seconds to load on a cold startup. During that time, Excel is completely unresponsive. The cold-startup time is always poor in Excel 2003. I have seen one test machine where the startup time is instant in Excel 20...
stackexchange/codereview
I'm quite surprised how large some major websites homepages are. This is the total amount downloaded just when opening the homepage. cnn.com - 845kb microsoft.com - 470kb yahoo.com - 235kb gillette.com (flash) - 3.8Mb abc.com - 3.4Mb nbc.com - 1.4Mb youtube.com - 530kb Anyone care to add to the list? I'm just trying t...
stackexchange/codereview
I am currently porting a lot of code from an MFC-based application to a DLL for client branding purposes. I've come across an unusual problem. This bit of code is the same in both systems: // ... CCommsProperties props; pController->GetProperties( props ); if (props.handshake != HANDSHAKE_RTS_CTS) { ...
stackexchange/codereview
I am a .Net programmer(both C# and VB.net) , and I want to go into F# area also, but can't find some good online article/pdf to start with. Please guide me through this.
stackexchange/codereview
I just saw a really useful UI feature of the forthcoming Windows 7 ( visit http://www.gizmodo.com.au/2008/10/windows_7_walkthrough_boot_video_and_impressions-2.html and scroll down to the video entitled Super Scientific Video of New Window Resizing Feature) In a nutshell you can drag a window by the title bar to the to...
stackexchange/codereview
Is it possible in ASP.NET to take a string containing some HTML and make ASP.NET to parse it and create a Control for me? For example: string rawHTML = "<table><td><td>Cell</td></tr></table>"; HTMLTable table = MagicClass.ParseTable(rawHTML); I know that this is a bad thing to do but I am in the unfortunate situation ...
stackexchange/codereview
I need to match a string like "one. two. three. four. five. six. seven. eight. nine. ten. eleven" into groups of four sentences. I need a regular expression to break the string into a group after every fourth period. Something like: string regex = @"(.*.\s){4}"; System.Text.RegularExpressions.Regex exp = new...
stackexchange/codereview
I have a Windows Forms (.NET) application that can have multiple documents open simultaneously. It would be convenient to have each document (form) running its own event loop. With brief experimentation, starting several event loops in their own STA threads seems to work. Is there any reason why this is a bad idea?
stackexchange/codereview
We are deploying our ASP.NET 3.5 app to a production server for beta testing. Each page is secured using SSL. On our homepage (default.aspx) we have web services which populate flash objects. I am getting an error: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header...
stackexchange/codereview
The issue that prompted me to ask this is a web form that was not persisting data the way I expected it to. That's vague, but the point is, what do you like to do to model state, flow of data, and so forth?
stackexchange/codereview
I'm writing a script to remove some build artifacts older than 1 week. The files have names in the form artifact-1.1-200810391018.exe. How do I go about removing only the files that are greater than 1 week old, excluding the time in hours and minutes at the end of the date-time-stamp? Currently it is removing all of t...
stackexchange/codereview
How do I determine the dependencies of a .NET application? Does Dependency Walker work with managed apps? I've downloaded the latest and tried profiling the app, but it just exits without much of an explanation. If it doesn't work with .NET, then is there some other tool that would help me debug a run-time DLL loading ...
stackexchange/codereview
We have a Silverlight 2 project (game) that will require a lot of character animation. Can anyone suggest a good way to do this. Currently we plan to build the art in Illustrator, imported to Silverlight via Mike Snow's plug-in as this matches the skills our artists have. Is key framing the animations our only option...
stackexchange/codereview
I don't see any obvious way to import ICS files into Google Calendar from the API docs here: http://code.google.com/apis/calendar/developers_guide_protocol.html And I'd greatly prefer not to have to parse them myself just to send the appointments into GCal. I'm looking for a programmatic solution, not something like i...
stackexchange/codereview
In C# I could easily write the following: string stringValue = string.IsNullOrEmpty( otherString ) ? defaultString : otherString; Is there a quick way of doing the same thing in Python or am I stuck with an 'if' statement?
stackexchange/codereview
I am writing a custom session handler in PHP and trying to make the methods defined in session_set_save_handler private. session_set_save_handler( array('Session','open'), array('Session','close'), array('Session','read'), array('Session','write'), array('Session','destroy'), array('Session','gc...
stackexchange/codereview
I have defined a fieldset in HTML, and applied the following (simple) CSS rules to it: fieldset { margin: 2em 0; position:relative; padding: 1em; border:1px solid #ccc; } Everything is great, no big deal, except in all versions (well, up to 7 as far as I know) of IE the top border -- but not, interest...
stackexchange/codereview
I'd like to open the intelligence window without typing a character and then backspacing it. I can't seem to remember the shortcut for this. What is it?
stackexchange/codereview
I am using MS SQL Server 2005, I have dates stored in epoch time (starting 1970) I need to create a statement that will affect any record that has not been updated in the last 24 hours.
stackexchange/codereview
I want to run a background task that reads input from a TextReader and processes it a line at a time. I want the background task to block until the user types some text into a field and clicks the submit button. Is there some flavour of TextReader that will block until text is available and lets you somehow add more te...
stackexchange/codereview
I want to store values in a bunch of currencies and I'm not too keen on the imprecise nature of floats. Being able to do math on them directly in queries is also a requirement. Is Decimal the way to go here?
stackexchange/codereview
I have been asked to audit any/all changes in a MySQL table. Does anyone know of any tools out there to help me do this or do I need to write my own solution? If I write my own audting, my initial thought it to make a separate table and build a string of changes in the PHP code. Something like "fieldname1 -> oldvalue |...
stackexchange/codereview
I have implemented a YUI split button with a menu. The button with menu appears in a scrolling div between header and a footer divs. When exposing the menu near the footer div, the menu appears behind the div. I have tried positioning the footer div with a z-index of -1. I have tried positioning the div (within the ...
stackexchange/codereview
I am working on a windows service that polls for a connection to a network enabled devices every 15 seconds. If the service is not able to connect to a device, it throws an exception and tries again in 15 seconds. All of this works great. But, lets say one of the devices is down for a day or more. I am filling up my...
stackexchange/codereview
Question I have an application written in Java. It is designed to run on a Linux box standalone. I am trying to spawn a new firefox window. However, firefox never opens. It always has a shell exit code of 1. I can run this same code with gnome-terminal and it opens fine. Background So, here is its initialization p...
stackexchange/codereview
How can you find out the number of active users when you're using a StateServer? Also is it possible to query the StateServer and retrieve the contents in the Session State? I know that this is all possible if you use SqlServer for a backing store, but I want them to be in memory.
stackexchange/codereview
Is it possible to have multiple listeners to messages carried by MSMQ? WCF appears to frame everything in terms of services, making communication a point-to-point affair. I want to use a message queue to buffer incoming traffic for another process that records the logs in a database. There can be be any number of othe...
stackexchange/codereview
My application has a command line interface, and I'm thinking about using the GNU Readline library to provide history, an editable command line, etc. The hitch is that my commands can be quite long and complex (think SQL) and I'd like to allow users to spread commands over multiple lines to make them more readable in t...
stackexchange/codereview
In Windows XP what is the best way to execute a particular application when a particular type of USB device is attached (it currently attaches as a storage device - i.e. it appears as a drive). The solution I am looking for must execute the application from the very first time the device is attached or offer the applic...
stackexchange/codereview
I'm searching a C# component or code snipped that does something like that: I want to inform new users about the most important program functions if he opens a new window for example. It should be a box showing text (formated if possible) that is of course not modal and has some mechanism to 'go out of the way' if the ...
stackexchange/codereview
I have a listbox, and I have the following ItemTemplate for it: <DataTemplate x:Key="ScenarioItemTemplate"> <Border Margin="5,0,5,0" Background="#FF3C3B3B" BorderBrush="#FF797878" BorderThickness="2" CornerRadius="5"> <DockPanel> <DockPanel DockPan...
stackexchange/codereview
// goal: update Address record identified by "id", with new data in "colVal" string cstr = ConnectionApi.GetSqlConnectionString("SwDb"); // get connection str using (DataContext db = new DataContext(cstr)) { Address addr = (from a in db.GetTable<Address>() where a.Id == id s...
stackexchange/codereview
I have a Spring MVC web app which uses Spring Security. I want to know the username of the currently logged in user. I'm using the code snippet given below . Is this the accepted way? I don't like having a call to a static method inside this controller - that defeats the whole purpose of Spring, IMHO. Is there a ...
stackexchange/codereview
I often use Dictionary in C#2.0 with the first key as string that was containing a unique identifier. I am learning C#3.0+ and it seems that I can now simply use a List and simply do LINQ on that object to get the specific object (with the .where()). So, if I understand well, the Dictionary class has lost its purpose?
stackexchange/codereview
I'm writing an application and I'm trying to tie simple AJAX functionality in. It works well in Mozilla Firefox, but there's an interesting bug in Internet Explorer: Each of the links can only be clicked once. The browser must be completely restarted, simply reloading the page won't work. I've written a very simple exa...
stackexchange/codereview
I just migrated to Windows Ultimate 64 SP1, because my system's hard drive crashed. I installed Visual Studio 2005 SP1 and all the patches that Microsoft has recommended. I finally got my source code from my SCM, but now debugging does not stop on any of my breakpoints I have set. This is just a plain Winforms app, not...
stackexchange/codereview
Is this possible? I want to have the To:, Body, and an Attachment all pre-populated so all the user has to do is click send. Thanks!
stackexchange/codereview
I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it: The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, a...
stackexchange/codereview
I want to create an MSI installer containing three apps. I will be releasing frequent updates to each app as I work through the list of feature requests and do bug fixes. The three apps are currently at versions 1.6.3, 1.6.12 and 1.8.1 respectively. I was wondering what you guys can recommend for the version of the pac...
stackexchange/codereview
Consider the following two ways of writing a loop in Java to see if a list contains a given value: Style 1 boolean found = false; for(int i = 0; i < list.length && !found; i++) { if(list[i] == testVal) found = true; } Style 2 boolean found = false; for(int i = 0; i < list.length && !found; i++) { found = (l...
stackexchange/codereview
In Ruby, is it possible to pass by reference a parameter with value-type semantics (e.g. a Fixnum)? I'm looking for something similar to C#'s 'ref' keyword. Example: def func(x) x += 1 end a = 5 func(a) #this should be something like func(ref a) puts a #should read '6' Btw. I know I could just use: a = func(a...
stackexchange/codereview
How can I change the color of a DataGridView border when BorderStyle = FixedSingle?
stackexchange/codereview
I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI project in NetBeans, I set the properties of the main pa...
stackexchange/codereview
What is the fastest list implementation (in java) in a scenario where the list will be created one element at a time then at a later point be read one element at a time? The reads will be done with an iterator and then the list will then be destroyed. I know that the Big O notation for get is O(1) and add is O(1) for a...
stackexchange/codereview
When running a CherryPy app it will send server name tag something like CherryPy/version. Is it possible to rename/overwrite that from the app without modifying CherryPy so it will show something else? Maybe something like MyAppName/version (CherryPy/version)
stackexchange/codereview
Does anybody know if there is a built-in function in Mathematica for getting the lhs of downvalue rules (without any holding)? I know how to write the code to do it, but it seems basic enough for a built-in For example: a[1]=2; a[2]=3; BuiltInIDoNotKnowOf[a] returns {1,2}
stackexchange/codereview
Has anyone used Pear: Spreadsheet_Excel_Writer? The Formatting Tutorial lists a script similar to what I'm working with: (trimmed down) <?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $worksheet =& $workbook->addWorksheet(); $worksheet->write(0, 0, "Quarterly Profits for ...
stackexchange/codereview
on any element in the webpage. I need to look at what the element and children elements are. For e.g.
stackexchange/codereview
Today I had an idea of writing a unit testing framework for stored procedures in MySQL. The full idea is written on a recent post on my blog. In short it goes like this: I want to automate my procedure testing, I want to use a standardized way to test my procedures. Unit testing is widely documented, and there are a z...
stackexchange/codereview
Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?
stackexchange/codereview
I understand that these methods are for pickling/unpickling and have no relation to the reduce built-in function, but what's the difference between the 2 and why do we need both?
stackexchange/codereview
Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array? I am implementing the IComparer interface in my sorts.
stackexchange/codereview
Does anyone know of a graphing library for simple transformation of a point from one coordinate system to another coordinate system which is rotated by a angle and some point transformation and just for 2d? And any graphing tool for plotting and verifying the same visually?
stackexchange/codereview
Is it legal to more or less "copy" (or euphemistically, be very "inspired by") the idea and UI of a copyrighted program? This question popped in my mind when looking at "Things" which is a Mac-only program. How legal would it be for someone to make a Windows version of this program with a basically identical UI design ...
stackexchange/codereview
Would it be possible to write a class that is virtually indistinguishable from an actual PHP array by implementing all the necessary SPL interfaces? Are they missing anything that would be critical? I'd like to build a more advanced Array object, but I want to make sure I wouldn't break an existing app that uses arrays...
stackexchange/codereview
How do I connect to an SQL Server remotely and administer my database objects? I need to connect to my database located on the web hosting company's server. I have the server name, IP address, my database username & password. I have an installation of SQL Server 2000 in my machine. Can I use SQL Server Enterprise Mana...
stackexchange/codereview
I have a private const int defined in a C# class. I want compilation to fail with an error if the value of this int mod 3 != 0. How can I accomplish this?
stackexchange/codereview
I'm wondering if it is possible to add methods in main program to an existing class defined in header file. For example: There is class CFun defined in file CFun.hpp, but in our party.cpp we want to add a method void hello() {cout << "hello" << endl;};without editing CFun.hpp Obviously (unfortunately) construction: #in...
stackexchange/codereview
Suppose I have a table. Now, I'm interested in Getting Useful Data Easily. This means I'd rather not drop it into Excel and go through contortions, nor somehow get it into CSV and then into a DB, and then into SQL. I'd like to be able to execute a SQL query directly against a table in HTML. Has anyone heard of a tool l...
stackexchange/codereview
I am trying to debug an ActiveResource call that is not working. What's the best way to view the HTTP response to the request ActiveResource is making?
stackexchange/codereview
I could use some advice on tracking down the cause of memory leaks in C#. I understand what is a memory leak and I get why they occur in C# but I'm wondering what tools/strategies have you used in the past to resolve them? I am using .NET Memory Profiler and I've found that one of my huge main objects is staying in mem...
stackexchange/codereview
I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. The application was running without errors until recently. After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005). The error happens when I make a call to p...
stackexchange/codereview
I am developing a web based intranet for my company. I just want to know is it a good thing for users to login the application using the active directory login details or shall i create a login together with the application db. If there is anything better that this please suggest. This is my first application developm...
stackexchange/codereview
In our program, each customer gets their own database. We e-mail them a link that connects them to their database. The link contains a GUID that lets the program know which database to connect to. How do I dynamically and programatically connect ActiveRecord to the right db?
stackexchange/codereview
I'm using Server.HtmlEncode on a utf-8 string in asp-classic, which works fine until there are some accents in the string e.g. Rüstü Recber, which appears as Rüstü Recber (R&#195;&#188;st&#195;&#188; Recber in the source). I've tried setting the Response.Charset property to utf-8 but this doesn't make any difference....
stackexchange/codereview
A similar question discusses __construct, but I left it in my title for people searching who find this one. Apparently, __get and __set take a parameter that is the variable being gotten or set. However, you have to know the variable name (eg, know that the age of the person is $age instead of $myAge). So I don't see t...
stackexchange/codereview
I'm using a the TreeView control and it scrolls automatically to left-align TreeViewItem when one of them is clicked. I've gone looking at my Styles and ControlTemplates, but I haven't found anything. Is there a default ControlTemplate that causes this? I want to disable it.
stackexchange/codereview
I have an automated test running on my program that generates some large MPG files along with other files. After running the test, I have the script clean up after itself. The other files (a mix of binary and text files) are removed with no problems. The MPG files, however, don't get deleted. If I try and manually ...
stackexchange/codereview
Visual Studio makes calling a web service easy, trying to figure out what is going on under the covers is difficult. How can I see the actual XML generated from my .Net app when making a call to a web service?
stackexchange/codereview
I am working on a web application (ASP.NET) game that would consist of a single page, and on that page, there would be a game board akin to Monopoly. I am trying to determine what the best architectural approach would be. The main requirements I have identified thus far are: Up to six users share a single game state...
stackexchange/codereview
I have a GridView control that I am dynamically creating at runtime. I am creating all the columns like this. foreach (GridColumnConfig column in columns) { BoundField boundField = new BoundField(); boundField.HeaderText = column.Title; boundField.DataField = column.FieldName; boundField.SortExpression ...
stackexchange/codereview