instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to commit changes with the command git commit "commit message" to a local branch, but am getting the following message: error: pathspec 'commit message' did not match any file(s) known to git.
stackexchange/codereview
I have a custom module which allows a user to invite friends to see his/her favourite(flagged) nodes. Upon the invitation/registration.. I want to be able to duplicate the (inviter)users flags for the new(invited) user. i read http://drupal.org/node/305086 and it says to use: function flag($action, $content_id, $accoun...
stackexchange/codereview
I'm looking for a script that would have a form with the fields: comic name, comic ID (like a number), date, image link to the comic, and create a page for that comic, with the URL being http://example.com/# of comic/. Have a system of sending you back one comic (previous), forward one (Next), and the the first and la...
stackexchange/codereview
I want to add double status bar state in my app, like 'in call' or internet tethering so far I imported SBStatusBarController.h and static Class $SBStatusBarController; [[$SBStatusBarController sharedStatusBarController] setDoubleHeightMode:2 glowAnimationEnabled:YES bundleID:@"com.test.test"]; [[$SBStatusBarControll...
stackexchange/codereview
I have a php script that steps through a folder containing tab delimited files, parsing them line by line and inserting the data into a mysql database. I cannot use LOAD TABLE because of security restrictions on my server and I do not have access to the configuration files. The script works just fine parsing 1 or 2 s...
stackexchange/codereview
I'm trying to do a File.exist?(file) but my ruby script doesn't find the file because of \, spaces, - and . in the filepath. I'm a beginner in ruby and need some help to fix this.
stackexchange/codereview
I am using ASP.NET MVC 2 with nhibernate. I have this Sales class. Sales has many Payments. Sales' payments should not be modified once the sales' status becomes confirmed. I need suggestions on how to enforce this. I'm stumped on several things when trying to put this validations: For adding and deleting payments: ...
stackexchange/codereview
I have the following entities AddressType is simply an enum field that define if the Email is Personal/Work/Other. Is it possible to do a query that returns a flattened result like the one in the following sample? CustomerID Full Name Personal Email Work Email ----------- -------------- -----------...
stackexchange/codereview
I'd like to print the max number of concurrent events given the start time and end time of each event in "hhmm" format (example input below) $ cat input.txt 1030,1100 1032,1100 1032,1033 1033,1050 1034,1054 1039,1043 1040,1300 For this, I would Sort by start time (column 1) Use awk/sed to iterate over all val...
stackexchange/codereview
I have a simple .NET console program that uses OdbcDataReader to fetch rows from Advantage Local Server. I am using System DSN defined via ODBC Administrator on windows 7. Data Source uses Advantage StreamlineSQL ODBC driver v 10.00.00.03 and following params: Database Path: Table Type: Advantage Available Server Typ...
stackexchange/codereview
I have some process which creates some files of 0KB size in a directory and its sub-directories. How can I delete the files from the file system using the windows command prompt? Any single command or a script that will do the task will work. I can only run simple cmd commands and scripts, working on a remote machine ...
stackexchange/codereview
What library do you use for matrix calculations on CUDA? Or are there any? It seems as if everybody writes this by himself. For usual processors, I use Eigen. What about GPUs?
stackexchange/codereview
What's the best way to deal with i18n and text images? I have a number of images that have text in them that need to be swapped out for the right version for each language. i.e. I have a "header.gif" with the text in English, then another "header.gif" with the text in French. what's the easiest way to say if my image e...
stackexchange/codereview
What is the preferred way to hook up and run some code in Application_Start and Application_Endrequest without having to put the code in the MvcApplication class each time? Maybe there is an event, an attribute or something I can hook up in asp.net 4?
stackexchange/codereview
I am making an XElement with an element that has LINQ.Binary in it.. The line looks like: new XElement("Data", binData)); Where binData is of type System.Data.Linq.Binary what I dont understand is that when I look at the xml created it shows <Data>"mydata"</Data> instead of <Data>mydata</Data> why are there quotes a...
stackexchange/codereview
Got a report that gives the user a Group by parameter with two possible values - Customer and Country. If user selects Customers then the report groups on Customers else on Country if that is the user selection. I want to create two parameters Customer and Country for filtering reports. I want to structure the report ...
stackexchange/codereview
Coding a small script to copy some files, however I get the error: fileops.rb:6: syntax error, unexpected ')' Heres my code require 'ftools' plays = ['RomeoAndJuliet.txt', 'Hamlet.txt', 'TheTempest.txt', 'TheMerchantofVenice.txt', 'AMidSummerNightsDream.txt'] plays.each do |filename| File.new("/clean/_cleaned" + ...
stackexchange/codereview
I need to get data back when the oauth redirect returns from Twitter. Is it possible to append additional parameters to the oauth URL?
stackexchange/codereview
I have the following regular expression, which lets me parse percentages like '20%+', '20%', or '20% - 50%' using re.split. '([0-9]{1,3}[%])([+-]?)' I want to use string formatting to pass the series identifiers (i.e. '+-') as an argument from config.py. SERIES = '+-' The two methods I've tried produced errors. New-s...
stackexchange/codereview
I am using Symfony 1.3.x for a project. In the configure() method of one of my forms, I have the following code: 'terms' => new sfWidgetFormInputCheckbox(array('value_attribute_value'=>'terms', 'default' => false )), The idea is to present the user with a checkbox (default unchecked), which the user will have to check...
stackexchange/codereview
I am trying to achieve something and can't manage to do so. I have a div with fixed HEIGHT & WIDTH. I want the text to be centered vertically. up till now I managed to do so: <div> <a>this is a long text</a> </div> and it will look like this ------------- This is a long text ------------- which is great But if...
stackexchange/codereview
I'm currently developing HTML 5 mobile web apps. If you add such an app to your homescreen on an iPhone, it pretty much looks like a native app since I am able to hide the mobile safari's address bar. This can be achieved by using some meta-tags within my HTML code. Now I was wondering if hiding the address bar is also...
stackexchange/codereview
How can an Eclipse bundle (eg. within activator code) find the dependent Bundle instances at runtime? I would like to find the bundles that Eclipse has choosen to satisfy the dependency requirements, I do not want to interprete the manifest myself. An example: I would like to find all resources named "marker.txt" in a...
stackexchange/codereview
I need to do that, like when you put the PIN code in your phone, the numbers transforms into stars (**). Is there a way to do that in the layout xml file? If not, is there a way to do it with java?
stackexchange/codereview
greetings all, i am using spring security 3.0.2, urlRewrite 3.1.0 , and i have a problem with spring security that i have a rule that all the pages in the app requires authentication except for some pages so my security.xml is: <http use-expressions="true" > <intercept-url pattern="/" access="permitAll" /> <intercept-...
stackexchange/codereview
I'm trying to implement some functionality of caching data from third-party web service into the sql server database. I have several methods like IProduct GetProductById(int productId), IEnumerable<IProduct> ListProductsAllByCategoryId(int categoryId), IEnumerable<IProduct> ListProductsPagedByCategoryId(int categoryI...
stackexchange/codereview
I'd like my iOS app to display information specific to the user's current state (i.e. California, Oregon, etc). How is this done using core location? The CLLocation class has coordinates—how do I turn that into the state? (FYI I don't need more detail such as city or street)
stackexchange/codereview
I'm using gdb to debug a c++ program which terminated with a segmentation fault. Looking at the stack, the first few frames are: #0 0x0041c496 in cDefaultList::doInsert (this=0x9c69708, obj=0x9c69348) at cdefaultlist.cc:119 #1 0x0041c86c in cDefaultList::take (this=0x9c69708, obj=0x9c69348) at cdefaultlist.cc:189 #2...
stackexchange/codereview
I found the GC kicks in frequently freeing memory in my map activity, I couldn't trace out the reason and this happens when map start constructing titles i.e when we slide the map. And eventually the activity stops to force quit due to memory out of bound exception. The activity points the geo points of various locatio...
stackexchange/codereview
I'm building an AJAX enabled web application in which I'm accepting to inputs from user or sometimes building query string based on user action. Using firebug or other tools anyone can inspect and view data being sent to server. I would like to know how to validate query variables at server side using java to detect ...
stackexchange/codereview
I want to move the location of label vertically or horizontally and it should appear from in the windows form and should be invisible at a location by moving. I want to make it through .net application using c# so can any one help me for this?
stackexchange/codereview
I've been tasked with investigating n-tier architecture/design for a new C#.NET winforms project (produce a small app to prototype the proposed approach). We have lots of stored procs which we want to keep. We want to learn ORM and Entity Framework has been selected. We want to keep business objects (pocos) separate f...
stackexchange/codereview
Public Class ScoringStrategyEntity Public Enum TotalingMethodType Weighted_Share Multiply_Components End Enum Private _TotalingMethod As TotalingMethodType Public Property TotalingMethod() As TotalingMethodType Get Return _TotalingMethod End Get Set(ByVa...
stackexchange/codereview
I'm seeing all kinds of threads like this and they have accepted answers, and yet I'm still stuck on this. I have a view that should start a backup procedure, and I got it to the point where the view returns, and the process is still running in the background, however if apache is restarted, the backup process then die...
stackexchange/codereview
How can I create Word files in C# using Visual Studio 2008, without Word on my PC? Do I need to have Word installed on my PC, to be able to create Word files using Visual Studio 2008? Thanks in advance!
stackexchange/codereview
Before I implement it by hand (simple, I know), I am wondering if ActionScript or Flex support ranges? You can do it in Ruby: 1..101 You can do it in .Net: Enumerable.Range(1, 10) Can you do this in AS3 or Flex? I just don't want to re-invent the wheel.
stackexchange/codereview
I get this error when building a project, that could be built without problems before: [INFO] Trace java.lang.IllegalStateException: Unable to call isArchivingDisabled. Invalid object ID 5 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:268) at hudson.remoting.RemoteIn...
stackexchange/codereview
I am using wordpress with WPML and I came across a small issue. The previous website had the urls in this format: domain.com/lang/title-inglish.html eg: -> domain.com/hello-world.html {English users} -> domain.com/fr/hello-world.html {French users} The problem is that WPML {Multi language plugin for wordpress} creates...
stackexchange/codereview
I have a PDF form template that I fill from your C# code with values, to be printed out. Suddenly, my customer reports errors - when trying to print the PDF (from an ASP.NET page), they get: Unable to cast object of type 'iTextSharp.text.pdf.PdfName' to type 'iTextSharp.text.pdf.PdfIndirectReference' When digging...
stackexchange/codereview
I am adding a to the "Company" RibbonApplicationMenuItem in my RibbonWindow with the following code: var reset = DataContext as ICompanies; if (reset != null) { // ToDo: Create interface to populate the mymenutems var mymenuitems = new List<string>(); foreach (var item in mymenuitems) { var...
stackexchange/codereview
I'm currently using ASP.NET MVC3 RC and I'm using the unobtrusive JQuery validations as described by Brad Wilson on his blog. It works great but when I send my form (in Ajax) to the server, I do some server side validations and return the same row (that is included in a partial view) if my model state isn't valid. 2 pr...
stackexchange/codereview
I apologize if this has been asked before. My search results did not turn up a similar question. This is a conceptual question. According to MSDN and others as well: A constant member function cannot modify any data members or call any member functions that aren't constant Why then are we allowed to access static mem...
stackexchange/codereview
#include <iostream> using std::cout; using std::endl; class Base { public : void f(); void g(); int mBaseData1; }; class Derived : public Base { public : int mDerivedData1; }; void main() { Base* base = new Base(); Derived* derived = (Derived*)(base); // DownCast derived->mDerivedDat...
stackexchange/codereview
I keep getting this exception in LogCat Failed to find provider info for android.server.provider.checkin The android dev reference seems to have no info on this at all, I have however seen some vague reference's to a provider tag and an authorities attribute relating to a getType method??? I have a getBytes() method bu...
stackexchange/codereview
I have the following code: My big big big problem is, that I don't know why the parseDate function return with an object the first time, but not the second... What the heck is this... Maybe I'm missing something trivial? Thanks! EDIT2: OK, as others pointed out, the problem resides inside Firefox's javascript engine. T...
stackexchange/codereview
Hello Here is my code.... THe problem is at $product variable. Is there any way to fix this? It is defined two times and causes problem overwrites THE PROBLEM UPDATED $productsIDs = array(); foreach ($rowsProducts as &$product) { $product["features"] = &$productsFeatures[$product["product_id"]];...
stackexchange/codereview
is it possible in Sharepoint 2010 set a permission on a document in order to allow a specific user to view this document (when viewing the documents of a specific document library for example) without giving him the privilege to open it? For example, [user1] can see that in the list of documents of document library [Do...
stackexchange/codereview
I am asking here because I haven't gotten any help from the OpenCV developers so far. I reduced the problem to a very simple test case so probably anyone with some background with CPython could help here. This C code does not leak: int main() { while(true) { int hist_size[] = {40}; float range[] = {...
stackexchange/codereview
I'm currently learning Erlang at a reasonable clip but have a question about gen_server with supervisors. If a gen_server process crashes and is consequentially restarted by a supervisor, it receives a new pid. Now, what if I want other processes to refer to that process by Pid? What are some good idiomatic ways to ...
stackexchange/codereview
How would I go about adding items to the DataGrid with the code below <sdk:DataGrid AutoGenerateColumns="False" Height="294" HorizontalAlignment="Left" Margin="63,27,0,0" Name="Assignments_datagrid" VerticalAlignment="Top" Width="533" IsReadOnly="True" SelectionChanged="Assignments_datagrid_SelectionChanged"> ...
stackexchange/codereview
We are planning NOT to use MSDTC for transaction managment in SSIS and instead want to use local trsnactions using Begin transaction and commit transaction. From design wise it seems to be OK except one issue. When SSIS package fails in any of the task we have an error event handler which inserts records into errors ta...
stackexchange/codereview
I'm using Devise for authentication and the sign in form uses flash notices instead of form errors to display any issues when signing in. But I want to highlight the appropriate form fields that have associated errors like normally happens in rails forms. Anyone know how to do this?
stackexchange/codereview
I completed a Window Function kernel in OpenCL. Basically a window function just applies a set of coefficients over another set of numbers piece by piece (Wikipedia explains it better). I was able to stuff the window coefficient float array in constant cache for most cases. I expected my results from Compute Prof to sh...
stackexchange/codereview
Telerik Report messed up like this Tried this fix that the article suggests but in vain..ie added "preCondition" attribute but we.config says preCondition="integratedMode" Attribute is not declared"..Where do I need to declare it and how!?? I added xmlns value like this in web.config after reading a forum:- <configurat...
stackexchange/codereview
I understand that HTML5 is out. One question is that, what can I use to create HTML5? Can I use CS5 to create HTML5? I'm sorry but I'm just trying it out on my own to create HTML5.
stackexchange/codereview
I created UIAlertview for my application as follows. NSString *message=@"\n\n\n\n\n\n\n\n\n"; UIALertView *successAlert = [[UIAlertView alloc] initWithTitle:@"title" message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:nil]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(12, 8, ...
stackexchange/codereview
Hi i have a table where i list different values. Now i want to add a total values to my table that counts the values from each column and adds it to a column with the total value. How do I do this? And is it possible to do this in a simple way in the view, or am I bound to do it in the model? Thanks for any help! <div ...
stackexchange/codereview
$('#myImage').removeAttr('class').removeAttr('style').removeAttr('border'); That one works just fine but is there a way to remove a set of attributes from an element? I altered the code a bit, like $.fn.removeAttrs = function () { // Convert all passed arguments to an array var args = arguments[0].split(' '), ...
stackexchange/codereview
I'm very new to JQuery and don't have much experience with javascript at all, and after hours of trying to figure this out i give up. I know how to do it in PHP, but there's something I'm missing when I try it in JQuery. I have a html-file that generates a dorpdown box that looks something like tihs: <form action="" me...
stackexchange/codereview
Is it possible to stretch the background image. Actually I have a image of size 320X480, I want to use this image as background for a QWidget screen with size 360X640. I tried with the followings: 1). Here the image gets stretched for the screen but a button with another image is loaded along with the Main screen im...
stackexchange/codereview
I am porting a project from Win32 to Win64. We are using make file but we get the following error 1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(17) : error C2371: 'size_t' : redefinition; different basic types1> binding.cpp : see declaration of 'size_t' ...
stackexchange/codereview
I am creating a business directory website which has street addresses stored in the database. I would like to calculate the distance from a given zipcode to the street address using google maps in ASP.Net. I don't even know where to begin. Can someone please help?
stackexchange/codereview
Im using jqgrid wherein i need to pass addtional data to the controller while editing... but i m not able to do so... here is my code below.. <script type="text/javascript"> // var checkMileageLimit = function (value, colname) { var clName = (colname == 'MileageLimitPM' ? 'MileageLimitAM' : 'Mil...
stackexchange/codereview
I've always created arrays by just populating them $foo[] = 'car'; but I've seen a lot of $foo = array(); $foo[] = 'car'; and $foo = new array(); What's the difference between not initializing, using array(), and using new array();? thanks!
stackexchange/codereview
How can I write the following SQL using CreateCriteria: SELECT sa_bec_matricula.* FROM sa_bec_matricula INNER JOIN sa_matricula ON sa_bec_matricula.sa_mtc_num = sa_matricula.sa_mtc_num INNER JOIN sa_periodo ON sa_matricula.sa_per_cod = sa_periodo.sa_per_cod INNER JOIN sa_tpo_beca ON sa_bec_m...
stackexchange/codereview
I've looked around for OpenID tutorials and I can't seem to find anything that's just really simple and straightforward on how to skip a registration process and get the user's email address and stuff like that for PHP (or any language for that matter). Is it just too new or does it just lack content? Perhaps you kno...
stackexchange/codereview
Gotta question. On my website I have a registration form that, once submitted, writes the data to a database. The address that the user provides is used to display their information on a google maps (city, state, country... not SPECIFIC location). Everything shows up on google maps instantaneously, but I'm worried t...
stackexchange/codereview
I am trying to re-design a data access layer that was originally built using Raptier. Raptier generats methods that accept a where clause as a parameter to be passed in to a stored proc. I really need to retain the existing mesthos signatures, so my new DAL needs to accept where clauses as well. I want to use the mo...
stackexchange/codereview
This is from a practice exam, anyhow, I was thinking, what are the exception that I should take care of? Thanks.
stackexchange/codereview
We have configured teamCity on which we run our builds for testing. The problem is, there are couple of testcases (talking about one particular class having 5-15 test methods) which take almost 45 min when we run on TeamCity. I have been trying to test the same cases on local machine and they don't take more than 6-7 ...
stackexchange/codereview
I'm looking for a good technique on paging List Views Currently I'm building a Active Directory (LDAP) Manager for a company I Work for, the company has over 12K Employees across the board and we need to be able to navigate through these with ease The two types of pagination I'm considering are: Binding a < > at the t...
stackexchange/codereview
I'm working the the Outlook (Outlook 2010) object model via the Office PIA and I need to know if I still need Outlook installed on the machine that my program executes on. This seems like a basic requirement, but I can't find anything that says "Outlook is required to be installed in order to use the Outlook object mo...
stackexchange/codereview
One of the most powerful features of the Kinesis dvantage keyboards is the ability to remap keys. I've been using one for about 6 months with the Colemak layout and am loving it. Below is my layout. I primarily use Matlab. What is your optimal layout? The 2 things I found most useful were to put the shift key unde...
stackexchange/codereview
I'm creating a debugging module that will allow the user to make single-line ajax calls while they are actively watching how the page changes. The problem is if the user is trying to make database calls. The user can run the function mysql_connect(), but then that connection immediately closes once the ajax call compl...
stackexchange/codereview
i define an imagebutton like this: <ImageButton android:src="@raw/blaimage" /> now how can i also define which method should be called when the button is clicked. in the android documentation it says that you can use onClick but it doesnt seem to compile for me. android:onClick="selfDestruct" and in the activity ...
stackexchange/codereview
I am entering data in the text field of my form that contains 2 new line character but no carriage return character. (I can confirm by strlen in js or using str.charCodeAt() function.) Now I submit this form to a php script, which is somehow receiving a carriage return along with the new line character. So basically, \...
stackexchange/codereview
For my self-education purposes, I would like to investigate the code of a complex Ruby On Rails (preferably 3) business application(s) so that I can get the feel of how to do things in the real world with Rails. There are tons of "another blog" or "another CMS", but I am really looking into a Rails app with pretty high...
stackexchange/codereview
I am building my Win7 embedded OS. I have the following error when I run a small java program trying to open a file from it. Can anybody tell me which Windows library/package/assembly was missing here? thanks, Start LogViewer.............. Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.io.IOExc...
stackexchange/codereview
I am facing a problem with xlrd and xlwt. Pasting the sample code below. from xlwt import Workbook, Formula, XFStyle import xlrd book = Workbook() sheet1 = book.add_sheet('Sheet 1') myFontStyle = XFStyle() myFontStyle.num_format_str = '0.00' sheet1.write(0,0,10, myFontStyle) sheet1.write(0,1,20, myFontStyle) sheet1.wr...
stackexchange/codereview
i have the below page and i am racking my brain as to why when i have two update panels do they both get post backs. i can tell cause i have two user controls- one in each panel and they both fire page load events when only the left panel should be posing back and updating itself... or else whats the point of update pa...
stackexchange/codereview
I'm sure I remember reading that there is a way to make any subclass of the superclass define certain methods. How do I do it? In my example, the superclass is Account (and is abstract), and the subclasses are SavingsAccount and CurrentAccount. All subclasses must implement their own withdraw() method.
stackexchange/codereview
I have an ajax heavy website. I update the hash values in the address bar so that surfing history is stored - thus the forward and back buttons still function. For example, a typical use case would be: site.com/directory#sports/1 site.com/directory#sports/2 site.com/directory#sports/3 site.com/directory#movies/1 site....
stackexchange/codereview
Is there any way to know which dlls are required by a net assembly???. The program was built with some external libraries, but idont know what libraries was.
stackexchange/codereview
I'm building a list of nodes I need to load from XML document using SelectNodes(xpath): Set oNodeList = xmldoc.selectNodes("//Object/Property[@Name='Group' and Value='True']") and looping thru the nodes: For Each curNode In oNodeList Set nAttr = curNode.parentNode.Attributes If (nAttr.getNamedItem("Seq").nodeValue...
stackexchange/codereview
In a stored procedure I'm writing, I need to convert a string (e.g. 'ABCD') to a list of its component characters (e.g. ('A','B','C','D')). Is there an easy way to go about doing this? (Using T-SQL in SQL Server 2008.)
stackexchange/codereview
I would like to setup a small program that retrieves info from a database and then distributes that information to another program when requested. For instance, a program called 'Master' would retrieve data from the database and create a collection of objects (list, array, etc. whatever works best) and then a program ...
stackexchange/codereview
I want to add a simple web server to my .net windows service project that supports PHP. I have scoured the internet for something that I can embed into my project without a lot of success. The closest thing I found was Mongoose which used to have support for c#, but as of Sept. 2010 that has been discontinued due to ...
stackexchange/codereview
We have a couple of ASP.NET applications running here at work and our users get the test site confused with the production site. What is the best way to help the users know they are at the test site. Is there a best practice for how this can be accomplished? Maybe have a custom control or something on the screen dis...
stackexchange/codereview
I have a problem switching the content of a div using jQuery functions clone and append. In a few words, I'm using two links to show and hide flash videos: link1 shows video1 and hides video2. Link2 shows video2 and hides video1. Here's the code I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "ht...
stackexchange/codereview
Given the string: /home "1020....2010" main I would like home, 1020 and 2010 using regex, but keep having problems with the quote. Can anyone help me out? Thank you guys for your post. I realize that my code might have some problem. Here it is string pattern[1] = @"blablabla"; string pattern[2] = @"blablabla"; ....
stackexchange/codereview
I imagine this should be a pretty trivial task but using Firefox for Mac, 3.6.12 the following does not work: // assign data attributes $('.gallery li').each(function(i) { $(this).data('slide',i+1); }); // outputting an empty jQuery object console.log($('.gallery li[data-slide]')); // this does not work either ou...
stackexchange/codereview
I have memory mapped a large formatted (text) file containing one integer per line like so: 123 345 34324 3232 ... So, I have a pointer to the memory at the first byte and also a pointer to the memory at the last byte. I am trying to read all those integers into an array as fast as possible. Initially I created a spec...
stackexchange/codereview
I have a button_to that I want to perform a PUT action (there is only one thing that can be updated about this resource - it will be updated as being 'acknowledged', so there are no other form fields associated with firing the action). This is in my view (the controller is given explicitly because the button is on a v...
stackexchange/codereview
I'm reading Bruce Eckel's Thinking in Java and there's an exercise I'm just not getting: Pg. 161: Exercise 8: (4) Following the form of the example Lunch.java, create a class called ConnectionManager that manages a fixed array of Connection objects. The client programmer must not be able to explicitly cre...
stackexchange/codereview
MonoTouch related now; I'd like to turn my iPad into a host for WCF web services. I have already an .NET implementation of such that runs on Mac (Mono). That solution uses classes System.ServiceModel.ServiceHost and System.ServiceModel.Web.WebServiceHost. However these classes are not to be found with iPad project, eve...
stackexchange/codereview
I have a small app that uses a few different clases. In each file i am setting the include paths to the relevant folders and declaring an autoload function. This works fine but there must be a better way to do this as I have to do this on every file. Is there a way to do this once instead of having to do it for every ...
stackexchange/codereview
I've successfully written a twisted web server that displays dynamically generated content. However, when I attempt to display image (png) files from a directory (~cwd/plots/image.png), the server fails without error and the browser either displays the alt text or the broken image icon. What am I doing wrong? import s...
stackexchange/codereview
class LogManager { private: mutable mapManagerMutex mapMutex; typedef std::map<std::string, LogStorage*> FileNameToStorageClass; FileNameToStorageClass m_mapFileNameToLogStrg; public: int write( const string& strFileName, char* text ) const; }; int LogManager::write( const string &strFileName, ...
stackexchange/codereview
I am developing an android project. I am using dom parser to parse the xml file. Issue is my xml file contains html numbers like &#189 (semicolon will come in the end of every char code) for example <quote>We &#8220;love&#8221; our nation</quote> which is nothing but <quot>We "love" our nation</quote> I am not able...
stackexchange/codereview
There is a session cookie with expiration time which says 'At end of session'. When exactly does it expire or will it be alive forever?
stackexchange/codereview