instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am writting unit tests for various bean property constraints. For most of the constraints such is field length , format of the field and whether a field is null or not, I am able to test using the JSR303 validation API. My question is, how do I write a unit test for this constraint: 'The field username of entity Use...
stackexchange/codereview
I have a website running on cakephp. I want to implement pagination there. I have a result set in an array. and I have included the paginator helper. Can someone tell me how to apply pagination to my result.
stackexchange/codereview
If I group a list by a column, a count is displayed in brackets indicating the number of entries in that particular group. I need this count to populate another list to make a dashboard. How can I do this?
stackexchange/codereview
Can someone tell me how I can amplify the recorded audio in iPhone and then play it simultaneously?
stackexchange/codereview
How to create Postgres ltree data type for Django? and how to use it with QuerySets? (create wrapper? how?) About lree here: http://www.postgresql.org/docs/current/static/ltree.html About custom fields in Django here: docs.djangoproject.com/en/1.2/howto/custom-model-fields/ P.S. Also there are "Django Tree Libraries" b...
stackexchange/codereview
when I put in a menu control on a page, and set the default dynamic pop out image true, the resulting html to the client gets the image from a web resource url under my project folder. How does that work? Where is the actual image, and how does the web resource get generated?
stackexchange/codereview
Here is my web.xml <filter> <filter-name>pollingTest</filter-name> <filter-class> webapp.controller.core.servlet.PollingService </filter-class> <async-supported>true</async-supported> </filter> <filter-mapping> <filter-name>pollingTest</filter-name> <url-pattern>/app/poll</ur...
stackexchange/codereview
System.Drawing.Color drawRedColor = System.Drawing.Color.Red; System.Windows.Media.Color mediaColor = ?drawRedColor.ToMediaColor();?
stackexchange/codereview
How would I write a bookmarklet that applies a given XSLT stylesheet to XML file that is displayed in, e.g., firefox? The XML Document is already loaded in the browser and displayed without a stylesheet, and the XSLT is available under a fixed URL which should be encoded in the bookmarklet.
stackexchange/codereview
Can i access/control iPhone/iPad VPN settings programmatically?
stackexchange/codereview
I have a huge report which works fine when I browse through report viewer. I have created a subscription so I can run this in the background. The subscription works if it's the only subscription running. If I run 2 subscriptions starting at the same time and pointing to the same report, the thread is aborted for one su...
stackexchange/codereview
is it possible to mark parameters as private, only accessible/useful for the class that owns the function? example: //PRIVATE CLASS (.SWC) public function set AutoBounce(value:Boolean):void { if (value) addEventListener(MouseEvent.CLICK, bounce); else removeEventListener(MouseEvent.CLI...
stackexchange/codereview
I am creating a mortgage calculator android program and I was trying to figure out how to get the EditText value (comes back as an Editable) to convert to an integer so I can use those integers in the calculation of the mortgage. I know that there is a toString() method. Would that be the way to go and then try to co...
stackexchange/codereview
I just started working at a company that doesn't have any kind of source control. I brought up that we might need to get some sort of source control going and one of my co-workers suggested that we use SharePoint. I think he likes the idea because we already use sharepoint he is a big SharePoint guy. I came up with s...
stackexchange/codereview
Hi I'm trying to call my method offer_bid through the following link_to erb line:- <%= link_to "Offer Bid", {:controller => "bids", :action => "offer_bid"}, :remote => true %> But I'm getting the following routing error:- No route matches {:action=>"offer_bid", :controller=>"bids"}. Should I explicitly d...
stackexchange/codereview
I have an IEnumerable<double> I want to convert to an IEnumerable<string>. The problem is the code below throws an argument null exception on the select statement. What am I doing wrong? The actual problem occurs when I try to iterate through the returned IEnumerable<string>. I get an InvalidCastException. I see...
stackexchange/codereview
I am trying to add a comment to an existing XML document. The document, when opened in an XML reader (I use notepad++), is formatted perfectly. However, when I run it through my code that simply adds a comment to the top the XML comes out as one long line. In other words, all the line breaks have been removed. How ...
stackexchange/codereview
How can I convert relative symbolic links to absolute symbolic links recursively in bash?
stackexchange/codereview
I've tried looking at the properties for the asp.net checkboxlist on msdn and searching google and I can't seem to find a way of setting the checkboxes to unchecked as default. Am I missing a glaringly obvious solution? Thanks,
stackexchange/codereview
I'm running a new Rails app on Postgresql and I do not understand why on Earth they made Postgreql case sensitive and didn't even make an option to turn this off. I mean, really, if someone registeres as "Sam" on my site, won't be able to log in as "sam", but there can be two different accounts "Sam" and "sam". This is...
stackexchange/codereview
is there something like Selenium for Flash? Or any other record/playback tool for authoring tests for Flash? Many thanks.
stackexchange/codereview
Apologies if my question is noob. I'm running Django 1.2 with pgsql 8.4 and I'm required to run a Java program after getting the inputs from the user, does some calculations and return the results back to the user. May I know what is the best way to pass data between the Java and Python Django, such that the above scen...
stackexchange/codereview
I'm trying to assign a short to a enum like this:; public enum ValueRepresentation : short { ApplicationEntity = short.Parse("AE"), AgeString = short.Parse("AS") } This however, obviously, doesn't work. But is there a quick fix to make this work? Cheers
stackexchange/codereview
I'm considering writing an app that has the following requirements. I'm proficient with Ruby, but I'm willing to learn a new language like Scala, Clojure or Python. Concurrency / Best performance This is my main goal. It needs to be amazingly fast and support concurrency in a decent way. Use Redis as a back-end This w...
stackexchange/codereview
I'm trying to display an HTML table of values with about 20 columns where say staff users see one subset of columns, and non-staff users see another subset of columns. I may want to define further types of users later. Now right now I have three static header rows so the template looks like <table> <tr> <th>Col A<...
stackexchange/codereview
I'm trying to achieve the following task: Imagine having a 2:1 aspect ratio drawing canvas. I want to place rectangular images on this canvas (..x,y Cartesian coordinates) and as I move the image around further away from the canvas center (0,0) I want to get the distortion to the image as if it was sliding over the ima...
stackexchange/codereview
I am looking to write a program that searches for the tags in an xml document and changes the string between the tags from localhost to manager. The tag might appear in the xml document multiple times, and the document does have a definite path. Would python or vbscript make the most sense for this problem? And can an...
stackexchange/codereview
I am interfacing with a USB-to-serial port that can be inserted or removed at any time. I've found that I can use WMI (particularly with the use of WMI Code Creator) to query for device changes in the PC. In the generated snippet below, the Win32_DeviceChangeEvent is subscribed to. However, this event doesn't reveal w...
stackexchange/codereview
i am trying to write udp chat server in c language. i have written tcp chat server before and it is ok. in tcp server, accept function returns an fd number and server communicate with a specific client according to this fd number. but in udp, how can i listen a specific client? In my tcp server, after a client conne...
stackexchange/codereview
I know this may sound extremely nooby, so sorry in advance but I am learning and I have spent nearly 2 hours trying to find out how to do this now with no result... I'm wondering how I would go about deleting a specific file from isolated storage in windows phone 7. Thanks in advance!
stackexchange/codereview
I want to pull out capitalized words that don't start a sentence along with the previous and following word. I'm using: (\w*)\b([A-Z][a-z]\w*)\b(\w*) replace with: $1 -- $2 -- $3 Edit: It's only returning the $2. Will try suggestions. And regarding natural language? Don't care for this thing. I just want to see where...
stackexchange/codereview
I have a problem with google maps V3 Code is part of example from google. I want to add listener to EACH marker, so I set marker as array. But its not working :( can anyone help me? function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.set...
stackexchange/codereview
I am attempting to setup Config Transforms on my project that I migrated to VS 2010. The web project works just fine, but I have a WCF Host project that I seem to be unable to add transforms. Has anyone had this problem before?
stackexchange/codereview
There used to be 3 dots in the splitter bar of a SplitContainer. Just like there are three lines in question details text box on StackOverflow that shows it can be grabbed. How can I do this with the splitter bar of a SplitContainer in .NET?
stackexchange/codereview
I'm diving into web development after ten years of desktop development and I'm experimenting with some testing concepts. I was wondering if it's possible to sandbox and run C++ code that's entered in a textfield in a browser? By that, I mean run the C++ or C# code on the backend webserver and return an analysis of th...
stackexchange/codereview
I'm using POI to manipulate data in Excel files for a university project. I'm having trouble inserting a new column in an existing Excel. I tried to use Cell c = createCell(int column); c.setCellValue("someValue"); but it seems that if the column already exists, it replaces the existing data. What I need is to shift a...
stackexchange/codereview
When I try to run the following <body> <div style="width: 400px;height: 1px;background-color: red;position: absolute;bottom: 0;right: 0"></div> </body> It doesn't understand the height of my div in IE6 (also in 5.5). Is this known bug? And how can I solve it?
stackexchange/codereview
I hate to ask a question that's been asked here countless times, as well as been blogged about all over the place, but I still can't get my upgraded project to work. My application was originally written in VS2008, targeting .NET 3.5 SP1. I just upgraded to VS2010, and figured that I'd try to take advantage of the new...
stackexchange/codereview
I just downloaded the Java ME Platform SDK 3.0 and created my frist Midlet (from some Oracle Tutorial). Which works fine on the Emulator. When I deploy it on my Nokia N97 I can run it but as soon that I press "Connect" and allow to proceed I get a IOException: -1 Here is the code: package hello; import java.io.*; impor...
stackexchange/codereview
I have a question about the in parameter type of a stored procedure. Normally the definition of a parameter will look like this: in param_test VARCHAR(100) Do you know if I can defined a parameter like this?: in param_test table.column%type This way the parameter will be the same type as the column of an specific tab...
stackexchange/codereview
I am writing an ipad application where you can drag around the screen with 1 or 2 fingers. I use the touchesBegan, touchesMoved and touchesEnded methods to recognize the touches. I have multipletouches enabled for the view. Now I have recognized one strange behaviour. If I place a finger outside of the upper screen bor...
stackexchange/codereview
I am making a windows forms project in C#, in which I made a class LabelX which inherits System.Windows.Forms.Label, then added a property Mass of float type Now, my question is how can I handle, when value of Mass is changed. e.g.: When user enter value zero or less than zero I want to fire a message that "Mass can'...
stackexchange/codereview
How can I deliver a module that requires patching flymake, with minimal startup time (=autoload) and minimal impact on the user's emacs.el? I'm working on the flymake-for-csharp module. It works with flymake, teaches it how to be more flexible with C# code files. For example, instead of just using a makefile, flymake...
stackexchange/codereview
To familiarize myself with Qt's graphics view, I'm implementing a simple chess board in Qt. There are no chess pieces, for now. I use rectangles to represent every tile, so I made the BoardTile class (which inherits from QGraphicsRectItem) so that I can define a mousePressEvent. Here's a little test code that I associa...
stackexchange/codereview
I currently have a problem implementing the following scenario using the following configuration: GCC 3.4, Linux. I have written a tool (in C++) which loads a shared library (written in C). This library has a bug which I cannot influence to fix. The problem is that it reads some input and writes decoded output. Sometim...
stackexchange/codereview
I am trying to replace a value in a drop down box. The replacing works fine (after help from this fine community) but afterwards the slide function stops working. I can't find any errors so I'm asking if this could be related to how jQuery and javaScript works? Are elements "mapped" to the DOM on load and if so; would ...
stackexchange/codereview
How do I check if a string contains of at least one Chinese character?
stackexchange/codereview
I noticed that a significant part of my (pure Python) code deals with tables. Of course, I have class Table which supports the basic functionality, but I end up adding more and more features to it, such as queries, validation, sorting, indexing, etc. I to wonder if it's a good idea to remove my class Table, and refacto...
stackexchange/codereview
I have a servicereference.clientconfig. Now my install team is creating an install for my silverlight application. It is an issue because in the servicereference.clientconfig there is a set of web services and they all point to localhost. What is the easiest way to set this to the server that the install is going to? ...
stackexchange/codereview
I have 3 asp.net standard checkbox control and 1 textbox. I check 1 and 3 checkboxes. In textbox how to calculate how many checkboxes are checked? If I checked 1 then textbox result is 1. If I check 1,2 the textbox result is 2. If I check all checkboxes then the result is 3 How to do this in vb.net?
stackexchange/codereview
I can only find docs for predefined handlers. I guess I would have to override one of the handler classes, but which methods do I actually have to override? I read somewhere that new handler for Views 2 need to be registered with Views. Where and how? I want to define a field which is not a DB field, but a field calcul...
stackexchange/codereview
I have a web application that integrates DWR 3 and Spring 3. All requests are handled by the Spring's DispatcherServlet. Everything works. When I request an AJAX request, it's handled correctly by the backing DWR service bean annotated with @RemoteProxy. To return a response, my DWR service bean returns either an HTML ...
stackexchange/codereview
So I have a detail page on my WP7 app that shows a listbox showing some data from my app. In the codebehind, I set the listbox itemssource = to a collection of objects. Pretty simple so far. I also have few text boxes and a button on the same screen that lets me add to that object collection. Ideally when I navig...
stackexchange/codereview
I'm using binary uuids for keys. Is there any way to edit table data with Mysql Workbench for this kind of schema? I end up with: UPDATE `db`.`table` SET `foo`='bar' WHERE `uuid`=?; Which obviously returns an error: ERROR 0: Value not set for all parameters I have no other way to reference the rows I want to edit. Ph...
stackexchange/codereview
A lot of times my queue will remain empty. But when it does fill up, how does that queue notify my server to execute a python script? I could make it so that the python script hits the queue every 5 seconds, but that's silly.
stackexchange/codereview
Hi experts What is the best way to work with xml configurations file to my application in java? Any XML parser that i found in the internet is too complex. thank you guys. Regards. elad.
stackexchange/codereview
How to increase the height of the text area as and when we type to a max of 50px from 18px. then if someone types more the scrollbar should take over. is this possible ?
stackexchange/codereview
I made a commit about a month ago that involved me creating new folder and sub-folders and moving my source code files in between them. I just was looking through my history for the first time since then and realized git has 'lost' history since the original files were deleted and then re-added, I suppose - i.e. when I...
stackexchange/codereview
I want to set a toolTip on each of the data Points of the pie charts. I know how to do that, but as you can see in the attached picture, the toolTips look different according to the data points directions. Someone has an idea how can I do that ?
stackexchange/codereview
I am working on code minimization and enhancement. My question is: is it possible to swap the if statements above without destroying the logic of the code? int c1 = Integer.parseInt(args[0]) ; int c2 = Integer.parseInt(args[1]) ; int c3 = Integer.parseInt(args[2]) ; if (c2-c1==0) if ( c1 != c3 ) ...
stackexchange/codereview
I am trying to make a simple mp3 player using flash. The songs are loaded using an XML file which contains the song list. I have "play" button with the instance name "PlayBtn". I have an actionscript file named "playctrl", the content of which are listed below: package classes { import flash.media.Sound; import...
stackexchange/codereview
I'm currently learning php, and I'm testing out oop and classes. My code is: <?php require('user.php'); $user = new User($username); $projects = $user->getProjects(); for ($n = 0; $n<count($projects); $n++) { echo "<li>"; echo "<a id=\"menu_pages\" href=\"\"><img src=\"../images/types/project.png\"/>" . $proj...
stackexchange/codereview
I see a lots of how to about rails and memcached. But I cannot find an updated how to that teach how to use memcached in a site where there is both a public section and a logged users section.
stackexchange/codereview
I am developing an Windows phone7 application, I have a .NET webservice that returns a List. This list should be bound to a ListBox. Product is a class defined in the server and Visual Studio gets its definition from WSDL and creates a stub in my windows phone application. What happens is that the list calls the "toStr...
stackexchange/codereview
I displayed the text in UILabel by using wrap method. Now I want to need to find the how many number of line is there in UILabel. If there is any possible way to find the UILabel's number of lines count. Thanks.
stackexchange/codereview
I'm trying to make an android app (I'm new in the Android programming world), and I'm having problems creating the GUI. The point is that I get information of some data that is divided in days... The problem is that I don't know, until I retrieve the information, how many days the GUI should display. http://img574.imag...
stackexchange/codereview
I have a strange question here. Am I the only programmer here that constantly feels like I must rewrite / refactoring my own codes ? Sometimes I do it only because I think the speed might be improved, or simply because I believe the code could be easily imported in a later project. Hey, sometimes only because it looks ...
stackexchange/codereview
I have a simple nginx rewrite rule below : if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 break; } It works fine with urls' like http://mydomain.com/controller/action, however when the requested url is something like : http://mydomain.com/index.php/controller/action it failed to recogn...
stackexchange/codereview
Say I am modelling this scenario - what design pattern could I use to best model this? The base class is a CellPhonePlan. CellPhonePlan has two properties: int MonthlyPrice List of type string, StandardFeatures Where StandardFeatures might include a value such as "200 minutes call time". I also want to provide some ...
stackexchange/codereview
When a file is uploaded in Rails, it creates a rack multipart file in the /tmp folder. RackMultipart20101109-31106-ylgoz0-0 After the request is completed, I use delayed_job to first process then upload this tmp file to Amazon S3. The problem starts when rails (or rack) sporadically deletes these files when a fresh u...
stackexchange/codereview
Two Java libraries to connect to the Twitter streaming API are twitter4j and tweetstream4j. The Twitter streaming API allows "tracks" with spaces: Comma separated keywords and phrases are logical ORs, phrases are logical ANDs. Words within phrases are delimited by spaces. A tweet matches if any phrase matches. A phras...
stackexchange/codereview
Action results encoded using JsonResult seem to be excessively verbose in their serialisation. For example: {"foo":"bar","list":["a","b"],"map":{"a":1,"b":2,"c":3}} JavaScript seems perfectly happy with this shorter version as an equivalent: {foo:"bar",list:["a","b"],map:{a:1,b:2,c:3}} So this question is two-fold: ...
stackexchange/codereview
In an mxn matrix having k objects, what are the number of ways that an object be placed in a matrix cell.(k<=n,m). By giving an example the more better illustrated, if the 1st object out of the "k" objects was placed at location (1,1),then the next object could not be placed on the 1st column or on the 1st row, and on ...
stackexchange/codereview
I'm converting a Sharepoint 2007 installation to Sharepoint 2010. In 2010 each Web Part has an arrow in right side of the menu bar that only displays on mouse hover. How can I make that arrow always display? I've tried adding this to my custom CSS: .ms-WPHeaderMenuImg{ visibility:visible !important; } The visibili...
stackexchange/codereview
I've reduced my code to the following to illustrate my problem: #include <iostream> #include <stack> #include <utility> std::pair<double,double> test(double a, double b) { std::stack<int> my_stack; return std::make_pair<double,double>(a,b); } int main() { std::pair<double,double> p = test(1.1,2.2); st...
stackexchange/codereview
Whats's wrong with this code? typedef struct jogador{ char nome[7]; int pecas[6][2]; }Jogador; void distribuir_pecas( Jogador* jogadores ); int main() { Jogador* jogadores; jogadores = (Jogador*) malloc( 4 * sizeof(Jogador)); distribuir_pecas( jogadores ); return 0; } void distribuir_pecas( Jo...
stackexchange/codereview
Two tables: a) svn3 with columns name revno compname b) archdetails with columns name version compname inFlat Shouldn't these 2 queries output the same result. The output of query 2 is correct. What is wrong with query1? query1: select sum(CASE WHEN inFlat=1 THEN 1 ELSE 0 END) from archdetails inner join svn3 on archde...
stackexchange/codereview
The query below works just fine. I would like it to do the following: Update flag1 = '$uflag' only if flag1 is empty. Update flag2 = '$uflag' only if flag1 had a value in it and flag2 is empty. Update flag3 = '$uflag' only if flag1 and flag2 have values in them and flag3 is empty. How could I do this? UPDATE submiss...
stackexchange/codereview
I like the way jQuery wraps events when you use its "bind" method. However it's awkward to set up the bindings. Is there any way to combine the ease of html (e.g. onKeyPress="foo(event)" ) with jQuery's browser-independent event-handling goodness?
stackexchange/codereview
The code is simple enough: #include <iostream> #include <fstream> #include <string> int main(int argc, char* argv[] ) { std::ofstream theStream; theStream.open("trash.txt"); theStream << "some words" << std::endl; theStream.close(); } If I run it from the command line then I get the expected file in t...
stackexchange/codereview
I have a page with a RadWindow open. THe RadWindow page executes response.Redirect. For some reason, when the radwindow redirects, all scripts are failing to load: Sys and JQuery are undefined. Why would that be? Thanks.
stackexchange/codereview
I need to define a hash for posting some ajax data using jQuery. The hash will look something like: var setname = 'set_1'; elements = { set_1: {'beer','water','wine'} }; The challenge I need to solve is 'set-1' (the key of Array elements) should be dynamically named based on the value of var setname. I want to avoid u...
stackexchange/codereview
How to get all the current code from one php-file inside other php-file? Like, we have file a.php with some functions inside. And file b.php, where we want to get all the code (without running any functions) from a.php and echo it to the browser when requested. Like (inside b.php): $content = get_all_file_text(a.php); ...
stackexchange/codereview
I can activate an apache webserver in the System Preferences. Now I want to install some mods but I can't find the path. Everybody suggests it is /usr/local/apache, but that doesn't exist. Where can I find my apache path to install the mods? Thanks, MrB [edit] Specifically, I want to install Ruby integration so I can i...
stackexchange/codereview
Do you know what is the name of this layout for Java/Swing? Does the Java library already bring us this or should I do that on my own? If so, could any one of you show some samples?
stackexchange/codereview
I have several similar comboboxes with custom templates that display one custom control on the dropdown. Suddenly one of those controls have broken and they give me the following error when I open the combobox. Message: Unhandled Error in Silverlight 2 Application Error 0x17F8. Debugging resource strings are unavailab...
stackexchange/codereview
it seems android calendar api is not available. can you please give me some tips and tricks for creating a similar thing.just like creating events,meeting, birthday etc.. and also notification when the event occurs. and also layout should be similar to-our in-built calendar give me some ideas or hint about look and log...
stackexchange/codereview
I am looking for multi-level accordion menu (drill down to few levels deeper) (expand and collapsible) for my website. Is there a sample anywhere I can use? Thanks in advance. it will be nice if I can dock it to the left by clicking on an icon and slide back when I click on the icon again. Something like this: menu1 ...
stackexchange/codereview
Using the the Geo Fix command to set the virtual device's location in the Android Emulator works properly for the Maps application. However, when I attempt to view my current location in Google Maps in the virtual device's browser, I receive the "Your location could not be determined" error. Does the Geo Fix command ...
stackexchange/codereview
I am from .NET background and I forwarded my steps for SQL Server. I want to know that how this statement works Select x,y,z FROM tbldemo Where x > something What I understand the sql compiler [if any], compile the right side first [just like .NET] and produce a bit result, i.e. if x > something, then it produce true....
stackexchange/codereview
I'm looking for more information on the extension points within NHibernate. For instance I know about IUserType and ICacheProvider. However I can't seem to find a good reference of all the different extension points that NHibernate provides? Is anyone's Google-fu stronger than mine :)
stackexchange/codereview
My console application contains one exe and 10 dlls. I want to and can only obfuscate five of the dlls. The rest are shared dlls and contain common code so they cannot be obfuscated. With the current design the obfuscated assemblies also cannot be merged or the app will break. Can SmartAssembly be used for my situatio...
stackexchange/codereview
It's an old project that i'm updating so is not th prettiest of coding. I am trying to adapt a plugin for my specific needs, the plugin in question is a simple colapsible panel plugin. I want to be able to style each panel with a different color depending on the rel that is assigned to the div. its actually php code th...
stackexchange/codereview
I have used a happy test to create a method and now i am using a null test on it. I need to change the assert in the test method but i have no clue how to go about it. i did some searches but i can seem to only find happy path tests or returns in the main method. is there a way to do a moq and test for not excecuting o...
stackexchange/codereview
is anyone able to help me to increase the display image number 5 from 3 at carousel. I am using the following files jquery.jcarousel jquery.jcarousel.min
stackexchange/codereview
I have a customer requirement where they would like to have different windows of a web application on 2 different displays (monitors): data lookup and entry on one screen and a document viewer on the other. The document viewer will be Flash or Silverlight based and loaded in a webpage. The app will be at least partiall...
stackexchange/codereview
I'm trying to write ALAsset in a NSData and somehow came up with the following code which does not work. What I would like to know is, whether the code is similar to this? Or is there another way of doing it? NSData *data = [[NSData alloc] initWithContentsOfFile:@"assets-library://asset/asset.MOV? id=100000009&ext=MO...
stackexchange/codereview
I have a member website, doesn't matter what language or framework as it is general question. A member can cancel his subscription from the inside and from outside. While member is inside i store his userID in session and call a function called CancelSubscription() which gets userID from session and makes a call to DB...
stackexchange/codereview
Possible Duplicate: jQuery change input type How to replace input[type=submit] to input[type=text] using jQuery? This way does't work: $('input[type=submit]').removeAttr('type').attr('type','text');
stackexchange/codereview
I have the following C# code: sqlCommand.Parameters.AddWithValue("@Parameter", table.Value ?? DBNull.Value); But it throws the following compilation error: Operator ?? cannot be applied to operands of type string and System.DBNull Why doesn't the compiler allow this syntax?
stackexchange/codereview