instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
In a web application I am making I want to create the same effect that GMail has for dragging and dropping labels and conversations. Basically I want to be able to make an ondrag function that attaches a "new" html element to the cursor, and upon releasing it over certain elements I want to execute my given functionali...
stackexchange/codereview
I'd like to create a linear transparent gradient to a div. Is there any way to do that with jquery? Or should I use some other library like raphaeljs? I'd like to achieve an effect like the following:
stackexchange/codereview
I'm doing a stack, I have an input box, every time I input a number that number is inserted into stack, and displayed in a label, I keep adding numbers and labels, then whenever I pop a number, the last created label (representing the stack) needs to disappear and so forth until the stack is empty. In short, I add a nu...
stackexchange/codereview
I'am currently trying to create and application (In c#) that parse a XML file and from that change the Text depending on the elements and tags inside the text. Example: <conversation> <message from=Bob> <typewriter dif=0.5> <Text> Bob: Hello <replace>Country<with>Worl...
stackexchange/codereview
I have a large SQL script that creates my database (multiple tables, triggers, and such. Using MySQL), and I need to execute that script from within a python program. My old code did this: sql_file = open(os.path.join(self.path_to_sql, filename), 'r') sql_text = sql_file.read() sql_stmts = sql_text.split(';') for s i...
stackexchange/codereview
I have this code which is initated on load // Display the map function map_it() { var myLatlng = new google.maps.LatLng(13.005621, 77.577531); var myOptions = { zoom: zoomLevel, center: myLatlng, disableDefaultUI: true, mapTypeId: google.maps.MapTypeId.ROADMAP, navigatio...
stackexchange/codereview
** Solved as of now. Please see Edit 2 and Edit 3 ** I am NHibernate Newbie- a week old but I though working with it will save me time on new project and not otherwise. I have been banging my head trying to get Nhibernate to save Parent - Child Collection to SQL server database. My Class Map : public class OrderMap :...
stackexchange/codereview
Floored division is when the result is always floored down (towards −∞), not towards 0: Is it possible to efficiently implement floored or euclidean integer division in C/C++? (the obvious solution is to check the dividend's sign)
stackexchange/codereview
Im working with jquery ui on many of my websites and I am concerned that any content that is in hidden divs that will be used for a dialog is not search engine friendly and I would like to find out if: Is content in hidden divs searched/indexed by google? What is the best practice for using jQuery UI dialogs/tabs or ot...
stackexchange/codereview
Would like to put any js functions in application.js or other .js file. However, doing ajax experiments I'm finding only the javascript functions are only working if placed in application.html.erb. If I put them in application.js I end up with non-helpful browser errors. Have experimented with both link_to and XMLHttp...
stackexchange/codereview
I have been modding Valve games for quite a while, but one that I have never been good at in the least is using the char arrays to manipulate strings. I would REALLY like to improve considering how much time I waste on them. Obviously using proper Strings would be nice, but since all of the SDK functions return char *,...
stackexchange/codereview
Straight to the point, problem is saving the object Operator into MySQL DB. Prior to save, I try to select from this table and it works, so is connection to db. Here is my Operator object: @Entity public class Operator{ @Id @GeneratedValue private Long id; private String username; private String passw...
stackexchange/codereview
Here's the problem I am having: Currently, we need to track across www.chess.com and secure.chess.com. However, I cannot set the domain to .chess.com because the cookie causes some problems on another domain, live.chess.com. So, to work around this, in code - I do something like this: <? if (HTTPS) { ?> <script> ...
stackexchange/codereview
I'm trying to implement an array in the publishStream() function, but the code below is creating problems. Any idea what's going wrong? Thanks a lot function publishStream(){ <?php foreach($usernames as $username){ ?> streamPublish("Vote for me here", 'Please vote for me', 'Checkout', '<?php echo $link.$username; ...
stackexchange/codereview
I've got the basics of inserting records and deleting records with Core Data; however, I'd appreciate help with one of the most common functions - the insert/update. Basically, I use NSMutableArray arrayWithContentsOfURL to get an array that contains rows from a mysql table. What I need to do is now sync up my CoreDat...
stackexchange/codereview
The thing i want to ask, is what the difference, pressing the "make an executable file" button in Dr.Racket, from making an executable file using bigloo. Another question is, that im having problems to complile *.scm files, using bigloo. Anyone can help me on this? thx
stackexchange/codereview
How do I upgrade an existing VS2010 ASP.Net 3.5 project from Entity Framework 3.5 to Entity Framework 4.0? Do I: Change the references? Change the target framework? Thank you!
stackexchange/codereview
I'm using UnitTest++ to allow me to create unit tests for some C++ code (that should build on Linux or Mac OS X). I have a directory structure like this: src - Foo.cpp - Bar.cpp test - FooTest.cpp - BarTest.cpp - Main.cpp - Makefile UnitTest++ - libUnitTest++.a And this Makefile (adapted from the UnitTest++ Makefile)...
stackexchange/codereview
Sorry if this is a very easy question but: I'm trying to create a reference movie of a Quicktime movie . I am cutting parts of the movie out then I want to save the file as a reference not a self contained movie. I know how to do the cutting and how to save a self contained file but I don't know how to make a reference...
stackexchange/codereview
Im not so good with regex. Im looking to add a validation function that will return true/false if the string entered into it is a valid US, UK, or CA zip/postal code. US: NNNNN CA: LNL NLN UK: Lots of combinations L = letter, N = Number There are individual functions for US, and Canada, but I failed to come up with a ...
stackexchange/codereview
In my script I want to be able to write to either a file or to stdout based on certain conditions. I'm curious as to why this doesn't work in my script: out=\&1 echo "bird" 1>$out I tried different combination of quotes, but I keep having a "&1" file created instead of it writing to stdout. What can I do to get this...
stackexchange/codereview
I've encountered a strange problem when translating strings (in the admin) using django's gettext: Locally running the dev server all translations are displayed correctly in the admin, but when the project is deployed on the production server some strings are not translated at all. I cannot determine any system behind ...
stackexchange/codereview
Using Ruby 1.9.2 and Rails 3 - When attempting to use <%= error_messages_for 'story' %> I get this error: DEPRECATION WARNING: error_messages_for was removed from Rails and is now available as a plugin. Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`. (called from _app_views_storie...
stackexchange/codereview
So I've got a set of results that looks something like this: SELECT User_ID, StartTime, EndTime, TIMEDIFF(EndTime, StartTime) AS TimeDiff FROM MyTable ------------------------------------------------------------------ | User_ID | StartTime | EndTime | TimeDiff | ----------------------------------...
stackexchange/codereview
my lucene index contains records like id: 12345, code: AN1234, type:Document, author:Brijesh, Sachin id: 093409, code: XYA1234, type:Paper, author:Brijesh Now I need to query on "1234", so my base query would be based on keyword "1234" and then I need to apply filters to get only those records that have a) author: Brij...
stackexchange/codereview
I want to transform a text like: $$ foo bar $$ to <% tex foo bar %> and $\alpha$ to <% tex \alpha %>. For the single line replace, I did this: re.sub(r"\$(.*)\$", r"<% tex \1 %>", text) ...and it works fine. Now, I added the multiline flag to catch the multiline one: re.sub(r"(?i)\$\$(.*)\$\$", r"<% tex \1 %>", text...
stackexchange/codereview
C# WinApp: Let's say I search for dtg but the items that I am searching in are dvg , dz, dxg ... so I want it to find dvg for me because it is closer to dtg that I was searching for. I know there are some NP-hard algorithms for that but really I do not want to spend a ton of time on this. is there any String methods t...
stackexchange/codereview
I'm trying to integrate a third-party API (used for interacting with the OpenSecrets.org data) into my Codeigniter site, and keeping getting an error about an object being treated as a string even though the variable is an array. The original api is available here: https://github.com/bpilkerton/php-crpapi/blob/master...
stackexchange/codereview
It's November 2010 and I just installed Visual Studio 2010 on a new dev box and am ready to get jiggy with ASP.NET 4.0 and all the new web goodness from Redmond. Will running Windows + Microsoft Update on the system get me where I need to be patch and security wise for VS2010? Or do I need to hunt down additional patch...
stackexchange/codereview
I've stopped IIS but still wamp is not working. In test 80 it's blank. What shall i do now?
stackexchange/codereview
I have a Setup/Deployment Project for my Application and it outputs certain files (*.dll, *.dat) to the Application Folder. I would like a condition to be set to check if a file currently exists or not. If it doesn't, write it but if it does, don't install it from the package. Is it possible? The file is called "data...
stackexchange/codereview
Hello and thanks in advance. Before to post here i search a lot in the net and here as well. I have a site that let the user join with their facebook profile so with their permission (FB application) the web will download their main photo. I used this script server side with classic ASP (and i must use ASP) to download...
stackexchange/codereview
Where can you download an installer file for PyQT? I am unable to figure out how to build it with the source code. Is there a prepackaged version?
stackexchange/codereview
I have a string thats separated by a space. I want to show every part of the string on new line that is separated by space. how can I do that. base1|123|wen dsj|test base2|sa|7243|sdg custom3|dskkjds|823|kd if there is no more | after an initial pipe then the space should break the line and it should look lik...
stackexchange/codereview
This one is bedeviling me. What am I overlooking? I want a button exactly one inch wide, on any density screen. I declare it in the layout like this: <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="160dip" android:text="How wide?" /> What I get is a button that ...
stackexchange/codereview
Hi I'm trying to right a regular expression that will take a string and ensure it starts with an 'R' and is followed by 4 numeric digits then anything eg. RXXXX................. Can anybody help me with this? This is for ASP.NET
stackexchange/codereview
I'm using OpenLayers with an ordinary mercator map and I'm trying to sample a bounding box by finding a grid of points in latlong. The bbox is expressed in latlon, e.g. 48.1388,-15.3616,55.2057,-3.9359 I can define a distance in degrees (e.g. x: 2.5, y: 2.4) and work out the points from there. But I'd like to express ...
stackexchange/codereview
HI all, i need to have this command line command executed from a Perl file: for file in *.jpg ; do mv $file `echo $file | sed 's/\(.*\.\)jpg/\1jp4/'` ; done So I added the folders and tried: system "bash -c 'for file in $mov0to/*.jp4 ; do mv $file `echo $basedir/internal/0/$file | sed 's/\(.*\.\)jp4/\1jpg/'` ; done'";...
stackexchange/codereview
I've created an XML file that contains the "²" character. When viewing the document in Internet Explorer, I get an "Invalid Character" error. Does ² need to be escaped somehow? or is this just an issue with IE8. The actual bit of XML is shown below: <Text>ATTENTION INVESTORS &amp; DEVELOPERS 920m² freehold site on 2...
stackexchange/codereview
Check out the official blog post on the 1.4.3 release: http://blog.jquery.com/2010/10/16/jquery-143-released/ I am thoroughly confused by this sentence (under "Events"): jQuery has already had setData and getData events (which are broadcast whenever data is set or gotten through the .data() method) – overriding ...
stackexchange/codereview
Is there a way to create a View in Drupal based on a custom SQL query? I made the query to test my results and everything is fine, but don't wanna go through the whole process of trying to recreate the same via the View UI... I need to generate it as a View to use the exposed filters and be able to create different dis...
stackexchange/codereview
I'm trying to build an activity that has a checkbox on top, a button at the bottom, and a bunch of other widgets scrolling in between. Conceptually that's LinearLayout CheckBox ScrollView LinearLayout [stuff] LinearLayout-end ScrollView-end Button LinearLayout-end When it renders I get the checkbox at the ...
stackexchange/codereview
Is this a bug? I'm not good at SQL, but it looks like the aggregate function doesn't respect the distinct() passed to the queryset. distinct_queryset = MyModel.objects.filter(reverse_relationship__icontains='foo').distinct() iterated_total = 0 for item in distinct_queryset: iterated_total += item.total aggregate...
stackexchange/codereview
gcc 4.4.4 c89 I am trying to define something. If it is defined I want to do something, else I want to do something different. #define PARSE_STRING for(i = 0; i < NUMBER_OF_STRINGS; i++) { #if defined (PARSE_STING) /* run code for parsing the strings */ #else /* run code that doesn't parse the strings }...
stackexchange/codereview
I've got these definitions: memberx(X, [X|_]). memberx(X, [_|T]) :- memberx(X, T). intersectionx([], _, []). intersectionx([H|T], Y, [_|Z]) :- memberx(H, Y), !, intersectionx(T, Y, Z). intersectionx([_|T], Y, Z) :- intersectionx(T, Y, Z). I get the following result: ?- intersectionx([1], [1], Z). Z = [_G305]. Why do...
stackexchange/codereview
I'm trying to create snippets of animation that will be reproduceable. i.e. punch, walk one cycle, squat Eventually I want use external data to control how the character moves. For instance, reading in a text file and searching for keywords like "love" or "anger" and then creating a list of actions dependent on that da...
stackexchange/codereview
If I have a Container class which holds a bunch of Component objects (similar to Java's UI framework), would it be poor style/practice to keep track of the Container parent within each Component? This ends up causing some strange compiler issues because the Component includes the header file for Container and vice-vers...
stackexchange/codereview
So I created a new branch in git by doing the following: git checkout -b newbranch master I made some changes in newbranch and committed them. git log shows my changes just fine. Now when I do 'git push', I just get 'Everything up-to-date' even though nothing was pushed to the remote repository. I am on git 1.7.1 Grate...
stackexchange/codereview
Given the fact that for pure REST each resource request from the client carries authentication information, it appears to me that the only way to secure against replay or copy-and-paste attacks requires that the REST request runs inside an HTTPS protected channel. Is that assertion correct?
stackexchange/codereview
Is there any performance issue/or any negative effect of having a single assembly referenced in many layers of on application as we are merging all S#arp Arch dlls into one now? What are the benefits except ease of deployment? Many thanks in advance.
stackexchange/codereview
Say I have this C# class: public class HttpContextEx { public HttpContext context = null; public HttpRequest req = null; public HttpResponse res = null; } How do I declare an object of it, inside a function, which will be allocated on the stack and not on the heap? In other words I want to avoid using the ...
stackexchange/codereview
I'm trying to modify the post url of a form depending on the name of the file being posted. Any suggestions very much appreciated. Here is the code (which doesn't work): <script type="text/javascript"> function submit_form() { document.uploadform.action = "upload?name=" + document.uploadform.codejar...
stackexchange/codereview
My current code resembles this: enum Enum1 : signed __int8 { Value1 = 1 , Value2 = 2 , Value3 = -3 // C4341 } ; The error details state: "warning C4341: 'Value3' : signed value is out of range for enum constant" MSDN states that this warning only occurs when you use values outside of the range of an int: ...
stackexchange/codereview
I run Ubuntu 10.10. I just want to debug a simple script. After spending half a day trying to figure out how that could be done I give up. What the heck am I supposed to do? I installed ruby-dev from the Ubuntu repository I ran sudo gem install ruby-debug and sudo gem install ruby-debug-ide I tried a few different ways...
stackexchange/codereview
How can I raise an event from a mock/stub using Rhino Mocks? I've found some answers to this question on the web, but they all seem to use the Record/Replay-syntax, but I'm using the Arrange/Act/Assert syntax. Any suggestions? A little example... Let's say I'm using the MVVM pattern and have this model class: public cl...
stackexchange/codereview
I've created custom object and custom tab (label text="order"). Now my header looks like below just like everyone can do. [home]__[customer]__[order] And when I click on "order" tab, I am redirected to home page of "order" The "order" homepage has: view (which goes to search feature) recent record My question is how...
stackexchange/codereview
I found simple database wrapper at http://www.phpclasses.org/browse/file/24355.html but I cannot fetch rows <?php class DBConnect { static public $HOST; static public $USER; static public $PASS; static public $BASE; static private $LINK = -1; public function Prepare($h,$u,$p,$b) { self::s...
stackexchange/codereview
I've been using SQLObject for a long while, but noticed that SQLAlchemy has become a lot more popular in the last couple years: http://www.google.com/trends?q=sqlobject,+sqlalchemy Are there compelling reasons to switch to SQLAlchemy? How is its performance relative to SQLObject? Its usability? And what is the added...
stackexchange/codereview
How can i pass HashTable in .net to c++ using interop? I know how to pass primitive types but need to know how can I pass the other ones.
stackexchange/codereview
I once implemented an SLR parser generator that generates incremental parsers. The parser can parse a piece of text from beginning to end, but when you delete or insert text it does the minimal amount of work and minimal amount of changes in the token stream and syntax tree, instead of just reparsing everything from t...
stackexchange/codereview
I have setup phusion passenger on my development server. <VirtualHost *:80> ServerName railscasts.local DocumentRoot "/Users/rbates/code/railscasts/public" RailsEnv development RailsAllowModRewrite off <directory "/Users/rbates/code/railscasts/public"> Order allow,deny Allow from all </directory> </...
stackexchange/codereview
I need to get a list of all processes on a windows system including names and PID. EnumProcess can obtain a list of pids, but how do I get the process name from the pid? I don't want to call OpenProcess on the process as that doesn't always work (like if the other process is run by a different user).
stackexchange/codereview
I am trying to play dynamically few mp3 sounds using AVAudioPlayer. The following code works fine and indeed plays the sound, nevertheless I get this error when Analyzing "Pass-by-value argument in message expression is undefined" Why so and how should one fix it? +(void)playSound:(int)soundName { NSString *theSoun...
stackexchange/codereview
A traditional Make process that I cannot modify produces a target on which I must do some post-processing. I use add_custom_target to force the Makefile to always run. I use add_custom_command for my post-processing steps. The problem is that add_custom_target cannot produce an output as far as CMake is concerned. So, ...
stackexchange/codereview
Well, I'm trying to call functions in the AET60.dll, which contains the API for AET60 BioCARDKey (finger print and smart card reader) with c#; actually, I have succesfully called almost every function, except for those that manipulate the finger print template: capture, match, enroll. I'm sure it's a problem of parame...
stackexchange/codereview
I have checkboxes that I have created using Literal now on postback I get the checkboxes which are checked in the Request.form.Allkeys. However I don't know how to read those values how can I use them? how can I count how many values are in there and how can I find some values in there example I want to find if the req...
stackexchange/codereview
I get an error at adapter.getFilter().filter(s) in the onTextChanged() function. I was following this - How to dynamically update a ListView on Android - to creater a filterable List inside a Dialog. public class CustomizeDialog extends Dialog implements OnClickListener { private final String[] cityList = {"Seattle", ...
stackexchange/codereview
For this particular project I will be using PHP 5.3 & MySQL with parameterized queries and CKE Editor. A little background on what my situation is: The users on the site don't interact with each other. All the users have private conversations with me only (confidential information), which contain richtext. I've limited...
stackexchange/codereview
i was wondering what you'r using to test your python wsgi apps and which one is the most updated and easiest to setup. im on appengine python and i would like to start writing tests for my handlers. i've see gaeunit and nose-gae and if there are some more out there and what you think about them.
stackexchange/codereview
I write a code for udp broadcast when i compiled it then error are inet_addr was not declared in this scope sleep was not declared in this scope close was not declared in this scope please guide me i am new to programming sender.c: #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <stdio.h...
stackexchange/codereview
I am struggling with what should be a simple XSL: Copy the updateResponse from the message below (note: I need XPATH 1.0 syntax for my integration system compatibility): <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.c...
stackexchange/codereview
I use the the following code to show a dialog with jQuery UI: var $dialog = $('<div></div>') .text(msg) .dialog({ autoOpen: false, height: 140, modal: true, title: "Confirm", buttons: { "Yes": function() { $(this).dialog('close'); }, "Cancel": function() { ...
stackexchange/codereview
I have Qt GUI application which I want that the user will open one only. I want that if the user will click first time on th exe - it will open the application and when he will click it again it will open the first one. i don't want to do it with QtSingleApplication. I want to know exacly how to open the GUI on the sec...
stackexchange/codereview
I am looking for a way to get the identity of the process which executes a *.vbs file or a *.asp file. How to write code to determine the process identity from within the file itself? Suppose I execute the file, it should output the full name of the user (i.e. domain\username). I've taken a look at this code, but it li...
stackexchange/codereview
From the CodeIgniter config.php file: /* |-------------------------------------------------------------------------- | Allowed URL Characters |-------------------------------------------------------------------------- | | This lets you specify with a regular expression which characters are permitted | within your URLs....
stackexchange/codereview
I am new to mootools and Google Maps API V3 and I am facing the following problem: My goal is to create a base class for representing a generic button and subclasses with different "click" event handlers for adding markers, polygons and polylines. Therefore using mootools, I create a base class with the basic appearanc...
stackexchange/codereview
I have the following html: <p style="margin:auto;border:solid 1px red;width:40%;"> <span style="white-space:nowrap;">a very long word i dont wont to break and this is very very very important</span> </p> I want the p tag to extend if the span needs it to be wider than 40% (like the example above) How can I do that? (C...
stackexchange/codereview
In some circumstances my .Net windows service can generate a StackOverflowException. Unfortunately, the behaviour seems to be that the service simply stops dead and doesn't write anything into the event log. I don't even get a message from the service control manager saying the service has failed. is there any way at a...
stackexchange/codereview
I've searched quite a bit about this on stack overflow and think this question is different enough to merit a new question. For integration tests, I need to enable the Distributed Transaction Coordinator service (SQL Server) so that I can use the database rollback feature of MSTestExtensions. So I need methods like as...
stackexchange/codereview
I have the following code in my HomeController.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Ajax; using MyApplication.Models; namespace MyApplication.Controllers { public class HomeController : Controller { private Ne...
stackexchange/codereview
I'm using a jquery slide menu that works great! I need to add a remove function on sub class when mouseout code below <script type="text/javascript"> $(function() { /* position of the <li> that is currently shown */ var current = 0; var loaded = 0; for(var i = 1...
stackexchange/codereview
So if you have code like this: background: url('image.png'); background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); Your browser will use the gradient if it is webkit, but if it isn't, it will fallback and use the image. If you are using webkit, the image will just not even be downloaded. S...
stackexchange/codereview
We have an Adobe Air application. Now we'll make DVD's an ship them to potential clients. How can I be certain that the client can open this .air file if they don't have adobe Air installed? Also I saw that Mac's often wanna open .air files in applescript(also if Air is installed). I know that there are install badge. ...
stackexchange/codereview
this question is actually a duplicate of this one. I want to detect if my program is being run either with privilege elevation in Winows through UAC, or as root in Unix/Mono. How can I do that in C#?
stackexchange/codereview
I have an application (Delphi Native code) that needs to access a .NET assembly (exposes a few COM classes. I want to do this using side by side assemblies and manifests. I have done this with a test .NET assembly, but am having a problem with the assembly I need to access. When the assembly is registered, I can instan...
stackexchange/codereview
I need to validate that the user entered text in the format: ####-#####-####-### Can I do this using Regex.Match?
stackexchange/codereview
I am following program typedef std::map<std::string, CRTSLogManager*> FileNameToStorageClass; FileNameToStorageClass m_mapFileNameToLogStorage; map<string, void*>::iterator iter; iter =m_mapFileNameToLogStorage.find(cFileName); if(iter == m_mapFileNameToLogStorage.end()) { typedef std::pair<std::string, CRTSLogMa...
stackexchange/codereview
To my surprise, I can't do anything nearly as simple as this, from what I can tell, in the .NET BCL: byte[] response = Http.Post ( url: "http://dork.com/service", contentType: "application/x-www-form-urlencoded", contentLength: 32, content: "home=Cosby&favorite+flavor=flies" ); This hypothetical code a...
stackexchange/codereview
Another question on the Using NServiceBus with Asp.Net MVC 2 thread. Udi has replied saying following method can be used if we really want to do it. var sync = Bus.Send<SomeMessage>(/*data*/) .Register((AsyncCallback)delegate(IAsyncResult ar) { var res...
stackexchange/codereview
I have been plagued with the dreaded OnUserPreferenceChanged Hang that's refered to quite nicely by Ivan Krivyakov, here: http://ikriv.com/en/prog/info/dotnet/MysteriousHang.html#BeginInvokeDance I posted a question a while back, when I originally encountered the problem: Yet another C# Deadlock Debugging Question I th...
stackexchange/codereview
I would like to ensure that an entity is contained in at most one single entity. Is it possible to check this from the mapping files? In SQL land, I want to ensure that if a table has a foreign key, that there are no repeated entries in the foreign key column. Thanks! Jorge
stackexchange/codereview
If you have Html.Hidden(...) inside Ajax.BeginForm and you submit the form more than once and you're updating the value of the hidden field using ViewData or whatever, it won't update. Maybe because Html.Hidden is a server-side control. (Html.Hidden is inside the UpdateTargetId div) Another way things would break is ...
stackexchange/codereview
I recently set up a WCF Resful Service with Entity Framework 4.0 It works with XML perfectly, however when I try to return it in json format I got HTTP/1.1 504 Fiddler - Receive Failure Content-Type: text/html Connection: close Timestamp: 01:11:06.453 ReadResponse() failed: The server did not return a response for th...
stackexchange/codereview
"Pleasant" meaning, for example: you can write grammars in a "natural" way without having to rewrite them in a convoluted way, and without having to introduce boring boilerplate. Let's stipulate for the purposes of this question that, unless the performance of a technology is pathologically bad, performance isn't the b...
stackexchange/codereview
I have a question. class A { static void m1() { int x=10; } } class B { // if i want to access the variable x in b class how can i access it A a = new A(); // a. what should i write here to access x variable }
stackexchange/codereview
I need some portion of the file to display.Actually by using Matcher and Pattern I found a word in the file .By using Matcher.start() and Matcher.end() I got the postion of the word.But how can i get the words before and after this word without splitting.This is like a home work program.Plz help me out. For example:Fil...
stackexchange/codereview
I am new to EF4 . I am using a stored procedure that returns 2 resultsets? I understand that this is not possible and not supported.Pity! What is the workaround? any code examples? Thanks a lot
stackexchange/codereview
I have a question about some C++ standard compliance or lack of it. In my project I'm using some simple Guard class that uses the const reference trick. I'm using Visual Studio 2005 and there are two configurations - one for normal release build and the second one for unit tests. In both cases there is some temporary h...
stackexchange/codereview
I don't exactly know how android updates the applications. As far as I've read around here it keeps the SQLite database. So, imagine this scenario: one application that uses SQLite database for persisting data. After a while I release v2 which contains some database changes and I need to update user data in database. H...
stackexchange/codereview
I just added a Silverlight Unit Test Application (project) to my Solution to test my SL4 App. Also added a Silverlight Test Class to that same project and created a simple test. I'm using SL4, VS2010 and TFS2010 automated builds. I'm not being able to associate that test to one of my test cases. Any reasons why? Though...
stackexchange/codereview