instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I run MAC OS X. So I have completed a python script that essentially parses a few sites online, and uploads a particular file to an online server. Essentially, I wish to run this script automatically from my computer about 20 times a day. Is there a solution to schedule this script to run at fixed time points everyd...
stackexchange/codereview
I am dealing with a problem which is driving me mad. I have looked at other forums and my code seems to be ok, however it fails when invoking addObject method for NSMutableArray. I am implementing a simple xml parser class and storing some of the information in a NSMutableArray: - (void)parser:(NSXMLParser *)parser did...
stackexchange/codereview
I have a plugin that needs to add something the the base Redmine layout. The change consists of a couple divs and a call to a JavaScript function. Currently I am accomplishing this by simply overriding the base layout view. I don't like doing this since if we upgrade Redmine any pages overridden would not update with t...
stackexchange/codereview
I have a function in an external library, for which I do not have the source code, which is causing problems. If I were putting in a breakpoint in my own code, I would put it on the first line of the function, but as it is an external function, I do not have that option. Is there any way to as Visual Studio to break an...
stackexchange/codereview
I'm attempting to build a c# console application to test a rest service that uses cookies for various things. I have been attempting to use hammock but it does not appear to manage cookies. Is there a c# rest client that manages cookies?
stackexchange/codereview
Hi does anyone know how to pass a list throught the "ViewData". This is what I'm trying but I think I'm missing a cast some where. List<GalleryModel> galleryList = new List<GalleryModel>(); galleryList.Add(new GalleryModel() { isApproved = true, uri = "www.cnn1.com" }); galleryList.Add(new GalleryModel...
stackexchange/codereview
bit of a silly question but how do I use the linkedin gem(https://github.com/pengwynn/linkedin) I have installed the gem and understand about getting the actual profile data but the bit in the middle confuses me. Where should the api key code block go ? should I be creating a seperate .rb file or should I call it at th...
stackexchange/codereview
I read up on inline positioning: http://www.webdesignfromscratch.com/html-css/css-block-and-inline/ And then I created a test page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <style type="text/css"> p {display:inline} .inline ...
stackexchange/codereview
I have using jsp technology in my project.I want to do session tracking in my login form. After logout when i press back button it should be show session is expired.Please help me.
stackexchange/codereview
Example: var x, y, z; //... x > 100 ? y = x : z = x ;
stackexchange/codereview
What could be the implications of having a setter member function in an exception class? The motivation for having a setter is that sometimes there isn't enough data available at the point of throw in order to handle the exception properly at the point of catch; so the additional information has to be added when the st...
stackexchange/codereview
I'm hoping someone can help me out here - I'm testing some javascript and put an alert in a while loop to show how some variables were changing, but... I put it in the wrong line and now Safari (on a Mac) is just looping the alert. Is there any way to stop it without force quitting the app (which I don't want to do as...
stackexchange/codereview
When I run msbuild on my BizTalk 2009 .btproj file, the default targets execute and the project is built. Is there a target I can invoke to deploy the project?
stackexchange/codereview
I've found an arraylist class on the internet, on http://code.google.com/p/arraylist/downloads/detail?name=arraylist-v1.zip . On windows using MS Visual C++ it compiles fine, under OS X with GCC I get tons of errors. Here's the error output: "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf...
stackexchange/codereview
I have followed all the rules of memory management but can someone explain to me why this is causing a double free exception: - (NSString *)formattedStringWithDecimal:(NSDecimalNumber *)decimalNumber { NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; [formatter setMaximumFractionDigits:0]; //zer...
stackexchange/codereview
Is there a way using a Rails 3 initializer to make all application emails sent out by delayed_job by default? I tried something like this: # config/initializers/delayed_mailer.rb class ActionMailer::Base Delayed::Worker end But it errors with: execution expired
stackexchange/codereview
suppose you have 2 separate lift applications (CRM and shop). The shop depends on CRM (clients). How do you connect them? In Django you just have to put it in INSTALLED_APPS setting tuple... Is there any similar mechanism for lift? Is it possible to build lift applications from such modules? Thianks in advance, Etam.
stackexchange/codereview
I'm using the Galleriffic plugin for a custom slideshow gallery. It works wonderfully in every major browser (IE 8, Firefox 3.6.x, Safari and Chrome) except for IE 7. It does the weirdest thing in IE 7, it won't display the image, the div is being displayed but the image isn't being loaded into it. Both ways of linking...
stackexchange/codereview
I am playing around with ActionScript 3 and trying to build a very simple prototype for a video game (top-down action/shooter) and realized that handling bullets is a little bit more challenging than I originally imagined. In order to get a fairly decent "flight" of the bullet between the character and the target, I en...
stackexchange/codereview
I am in the process of writing a win forms desktop app in VB.net that employs user data in the form of rich text, stored internally as an object and then serialised to an XML file for persistent storage purposes. To create the user data (the application's "document" it might be called), I have written a seperate app th...
stackexchange/codereview
I have some log parsing code that needs to turn a timestamp into a datetime object. I am using datetime.strptime but this function is using a lot of cputime according to cProfile's cumtime column. The timestamps are in the format of 01/Nov/2010:07:49:33. The current function is: new_entry['time'] = datetime.strptime( ...
stackexchange/codereview
I am going to build vim and see that it supports the pythoninterp feature by --enable-pythoninterp. What is it? Since I am a big Python fan, I'd like to know more about it. And also, what's the --with-python-config-dir=PATH for?
stackexchange/codereview
Say I have an unordered list, like so: <ul> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul> How would I, using JQuery, hide the last 2 list items and have a 'show more' link there, so when clicked upon, the last 2 list items would appear? <ul> <li>One</li> <li>Two</li> ...
stackexchange/codereview
I have a problem with my site after implementation of SSL that images do not appear. The scenario is that images come from images.domain.com (hosted on Amazon S3) and my certificate is for www.domain.com. This problem only seems to happen in IE and not in any other browsers.
stackexchange/codereview
Everyone use lot of List. I need to iterate over this list, so I use the known SyncRoot pattern. Recently I noticed in this post that the SyncRoot should be avoided in favor of "embedded" thread-safety (each method will lock on an private object without exposing it using SyncRoot property). I can understand it, and par...
stackexchange/codereview
How can I do this in haskell? equal(S,S) -> true; equal(S1, S2) -> {differ, S1, S2}.
stackexchange/codereview
I'm load testing a webservice which writes to a lucene index. If I make the same call repeatedly I get a org.apache.lucene.store.LockObtainFailedException: I assume this is because I'm trying to write to an index which is already locked by another thread and that thread waits. My question is, what is the best way to ...
stackexchange/codereview
I need to improve my windows form application UI, is there any free plugin that can make my application better? please advise. Thanks.
stackexchange/codereview
On Linux (BusyBox, QNAP-NAS) I want to add some extra path to my .bashrc file via script using sed. The relevant part of the file looks as follows: [...] export PATH=\ /bin:\ /sbin:\ /usr/bin:\ /usr/sbin:\ /usr/local/bin [...] The extra line to be inserted (at position 4 in the original file) is /opt/bin:/opt/sbin:\. ...
stackexchange/codereview
I have a project I am trying to learn unit testing and TDD practices with. I'm finding that I'm getting to quite confusing cases where I am spending a long time setting up mocks for a utility class that's used practically everywhere. From what I've read about unit testing, if I am testing MyClass, I should be mocking a...
stackexchange/codereview
I'm working on a module which loads data from Twitter's user_timeline REST API. Once I have the JSON decoded, I do a foreach statement in my PHP to get each of the returned tweets. I'm currently having an issue checking for items under the retweeted_status portion of the JSON string. The JSON I'm calling is: "http:/...
stackexchange/codereview
The hover rules are not being applied. When I view in firebug it doesn't seam to load the rule at all. What is the correct way to implement the hover below?\ The html markup is: <li class="ui-menu-item" role="menuitem"><a target="_blank" title="Click here" href="http://........" class="ui-corner-all" tabindex="-1"> <sp...
stackexchange/codereview
I apologize if this question comes across as asinine, but is it possible to spoof the UA string of an iPad in Safari via a script of some sort? I know it can be done through the Develop > User Agent menu item, but I am interested in making a Safari extension that forces a page that only serves HTML5 video to iPads to...
stackexchange/codereview
my question is simple , i want to uninstall sql express 2005 which is removed half and now not showing in add remove program list, it is not allowing me to install new one as well i am not able to remove it , i am stuck please help me ?
stackexchange/codereview
Consider a Winforms app connecting to a SQL Server 2008 database and running a SQL SELECT statement: string myConnectionString = "Provider=SQLOLEDB;Data Source=hermes;Initial Catalog=qcvaluestest;Integrated Security=SSPI;"; string mySelectQuery = "SELECT top 500 name, finalconc from qvalues where rowid between 0 and 2...
stackexchange/codereview
So I Have a design question for you. Basically I have an app in which I fetch 20 items from a server when the app loads, and displays them in a table view. I also have a loading table cell that appears in the last cell. What I want to do is when that cell appears, load the next 20 items and add them to the list and ...
stackexchange/codereview
So I am trying to work around the lack of stored procedure support in my silverlight reporting application and Im having a bit of trouble with my linq. I have a stored procedure that looks like this: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Some Dev...
stackexchange/codereview
I need to know whether a given .exe is 32-bit or a 64-bit, before I launch it. IsWow64Process is no use here, since there is no process yet. Is there some other API that will give me this information?
stackexchange/codereview
i was doing an svn update, and a couple folders suddenly became obstructed, and cleanup was useless - it reported locks that i couldn't find or release. i ended up deleting the offending folders and cleanup worked. i think i understand that svn wasn't able to compare subfolders or something... my question is: how did t...
stackexchange/codereview
..where do you begin? As a basis for any design - for instance a package - where do you as a developer start. I start by mapping out the requirements and breaking them down into sub categories and from this objects and methods. Usually takes a while before I start drawing it out by hand - then that goes through a few v...
stackexchange/codereview
What is the most efficient way to make the first character of a String lower case? I can think of a number of ways to do this: Using charAt() with substring() String input = "SomeInputString"; String output = Character.toLowerCase(input.charAt(0)) + (input.length() > 1 ? input.substring(1) : ""); ...
stackexchange/codereview
Hey guys, forgive me if this is too simple a question. I basically want a count of the number of males and females in a database. So I know two simple queries will accomplish this, such as: select count(*) from table where gender='male' select count(*) from table where gender='female' However, this seems very ineffici...
stackexchange/codereview
I have had a good think and just can't get my head around this. I have a table (transfers) like the following id | playerid | old | new | amount They are all integers. I am joining this table (teams) to the following id | name | founded The join is going to be on old and new. old and new are both ints and i need the ...
stackexchange/codereview
I am trying to build a histogram of counts... so I create buckets. I know I could just go through and append a bunch of zeros i.e something along these lines: buckets = [] for i in xrange(0,100): buckets.append(0) Is there a more elegant way to do it? I feel like there should be a way to just declare an array of ...
stackexchange/codereview
I am looking for learning materials (like blog posts and tutorials) for ASP.NET MVC 3.0 specific materials. If you know of any books, blogs, sites or online resources that are exclusively, predominently or even mainly MVC 3.0 related, I would love to hear about them, also, specific links to individual MVC 3.0 related t...
stackexchange/codereview
I am trying to find the @ in a string field. The follow data item in a Congos 8 returns 0 for every call. instr ( test@email.com, '@', 1 ) Any ideas? New to Cognos and Oracle in general but I feel like I have to be missing something obvious.
stackexchange/codereview
i need to define a class partially in seperate assemblies. actually i need to redefine a class partially, that is already defined in an assembly written in C++ Cli, but this is maybe a different question. for the case, all codes written in c#, i have a baseclass definition in basenamespace assembly using System; names...
stackexchange/codereview
We have three entities called Product, ProductType, and ProductCategory. Let's pretend we have three kinds of ProductType: Book, Music, and Video. We have three different ProductCategory's for Book: Fiction, Novel, Technical. Three different ProductCategory's for Music: Rock, Jazz, Pop. And we have three different P...
stackexchange/codereview
I have to check out my source code from two days ago. Whenever I have to do this, I have to look up the syntax. It's not in the git-checkout page. I'd like to have a convenient Stack Overflow question to refer to so I don't have to look it up every time. If this has already been asked, please point me to the dupe. ...
stackexchange/codereview
I have the following columns in my table: value1 value2 value3 value4 value5 I want to be able to loop through them like this: <% for i in 1..5 %> <div><%= user."value#{i}"</div> <% end %> Of course this code doesn't work, so how can I get the value from an ActiveRecord object with a string?
stackexchange/codereview
I trying to achieve something like as below :- <%= link_to "<%= user.email %>", users_path %> So that each user's email id is to be used as a hyper link to their user profile page. How to achieve this ? I'm using rails 3.0.1. Thanks in Advance
stackexchange/codereview
I'm trying to compile a trivial command-line tool with XCode: #import <Cocoa/Cocoa.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; //NSSpeechSynthesizer *speeker = [[NSSpeechSynthesizer alloc] initWithVoice: nil]; NSLog(@"%@", [NSSpeechSynthesize...
stackexchange/codereview
Which method should I use to assert that two lists contains the same objects with MSpec?
stackexchange/codereview
It was kind simple in other OS. I just got mouse movement x and y and redraw my character, however I do not see mouse event in Cocoa. COuld somebody point on a code samples?
stackexchange/codereview
I will try my best to explain what's going on. The app that I'm working on relies on soap services extensively. Since I'm making so many calls to different services I figured I would take a shot at creating my own webservice class. My new class is named SoapServiceRequest. I've defined a few instance variables alon...
stackexchange/codereview
I'm writing an engine for Dungeons & Dragons Basic Set (Red and Blue Box) First Edition (1E) in Python and would like to be able to read from an existing database of what is in the players and experts guide books. I'm looking for all the numerical data and spell data for all the classes and monsters. I figure that some...
stackexchange/codereview
I want to display custom cells, but my code is only displaying one custom table cell at once.. what am I doing wrong? I have a UIViewController nib set up with my UITableView inside the UIView. Also there is a UITableViewCell in the nib, whose class is CustomCell (a subclass of UITableViewCell). Both the UITableView an...
stackexchange/codereview
I need to allocate very large arrays of simple structs (1 GB RAM). After a few allocations/deallocations the memory becomes fragmented and an OutOfMemory exception is thrown. This is under 32 bit. I'd rather not use 64 bit due to the performance penalty I get - the same application runs 30% slower in 64 bit mode. Are y...
stackexchange/codereview
Want to make the URLs SEO friendly when using grails webflow. It is quite limiting with the convention grails uses and hard to go around the way it's built. For example, i have a flow called fooProcess in the controller called FooController, when i trigger the flow i would like the display: /foo/bar/test, instead of /...
stackexchange/codereview
I'm trying to get focused node value, but in c# "treeList.FocusedNode" always returns null. Then i tried "CustomCallBack" event of the treelist to get node by key value, using "treeList.FindNodeByKeyValue()". I pass the key value but it still returns null. How can i fix this problem? Here is the aspx codes of the TreeL...
stackexchange/codereview
In my project i'm using Hibernate3 (depends on slf4j-1.6) and RESTeasy (depends on slf4j-1.5). Both are not compatible and give errors at runtime. SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. Excep...
stackexchange/codereview
I have this part of code: NSDate *date =nil; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; [dateFormatter setDateFormat:@"dd-MM-yy"]; date = [dateFormatter dateFromString:inString]; [dateFormatter release]; It works perfectly fine, as expected...
stackexchange/codereview
Is there anyway in a BizTalk map to force destination elements to be created when the source elements don't exist without using an xslt call template? I'm mapping parent/child xml to a wcf-sql adapter generated schema that has table-valued parameters for stored proc parameters. So my source xml is: <Category> <Catego...
stackexchange/codereview
Short version: After branching in P4, how can I find out the "source" changelist of the branch? Long version: Let's say I have a main branch of my project at //project/main/... The latest changelist submitted here is @123, when I decide to create a branch for release 1.0 in //project/1.0/... From P4V, a new change...
stackexchange/codereview
This is my solved program that will read a text file with delimiters and transfer the data to a table using datagridview. Now I'm having a hard time because the while loop is only reading every other line. This is my code: private void Form1_Load(object sender, EventArgs e) { TextReader tr = new StreamReader("apl...
stackexchange/codereview
Morning All, I have an Allowed systems field in my record that can contain an array such as: 22, 18, 21 What I want to do is if system 18 is accessing the database and is pulling all the records that are allowed for system 18, how can I write that in sql. +----------+----------------+------------+ | AdvertID | AllowedS...
stackexchange/codereview
I've done all of the research on the matter. I know that Google thinks it's pointless and that the developers, know that it's not. I also know that there is no known workaround, but I know that I am close to making one. The user DougW posted this code: public class Utility { public static void setListViewHeightBase...
stackexchange/codereview
For my requirement is need to access sms which we have in Inbox, is there any framework expose sms to access in iphone. please suggest me workaround, if it is not there direct framwwork. sri
stackexchange/codereview
In msdn Filter Categories, What categories to be chosen to make screen capture video link text
stackexchange/codereview
I'm getting this error when I try and invite people to my event: 114 must be a valid ID string (e.g., "123") method events.invite ... Here is my php5 code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.facebook.com/home.php"); curl_setopt($ch, CURLOPT_USERAGENT, "Firefox/3.5"); curl_seto...
stackexchange/codereview
this is the demo that a Simple chat client , you must open it on webkit Browser like: chrome and Safari, the demo use a web socket server based on node.js: websocket-server-node.js, but i think it cant Deploy on google app engine , so did you know how to make a websocket using python on google app engine , and runnin...
stackexchange/codereview
I'd like to utilize the Windows Authentication Model for authenticating users that use my C# 3.5 WinForms application: The user that has logged on Windows is automatically logged in to my application. If the user wants to log in explicitely, his user name and password should be checked by Windows, or even better, prom...
stackexchange/codereview
I am working on a site that has multiple sections, each with around 5-10 projects within them. I am trying to create a next/previous navigation that will allow you to scroll through the projects within each section. This is the code I had for this: var prev_li = $('.projects ul li.selected').prev('li'), prev_hr...
stackexchange/codereview
I basically have two comboboxes. Initially when you enter the screen the two comboboxes are set to null and it works correctly. The user then makes a selection from the combo boxes and after they press a submit button, the details are moved across to a different screen. When this submission happens, I effectively wa...
stackexchange/codereview
I've written a command line program using c++ in the netbeans IDE, then compiled it using mingw. The program takes as its only argument the name of a file (with the fairly unique extension .mmf) , then it plays a movie based on the file. What I would like is to be able to set the default application for the .mmf exten...
stackexchange/codereview
I need to implement a paint type program that will run on all major browsers as well as can be packaged as an app on the iPad/iPhone. After some investigation I have learned the following facts (correct me if any are wrong): Javascript is entirely too slow to handle an app of this type by itself HTML5 seems like a goo...
stackexchange/codereview
How can I checkout the the sources of the OpenJDK? I want see if some bug fixes work. The last download is very old. I use the the mercurial URL http://hg.openjdk.java.net/jdk6/jdk6. But I see only a revision of 58 and some make files in the repository. It does not look like the sources of the OpenJDK. Is this the wron...
stackexchange/codereview
I want the result no:5 but I get no:23 public class Assignment3 { public static void main(String args[]) { String str1 = "2"; String str2 = "3"; System.out.println("Result:" + (str1+str2) ); } }
stackexchange/codereview
How to set table not to collapse when i make the size of browser smaller ! in vb.net
stackexchange/codereview
Do I understand correctly that table/row lock hints are being used for pessimistic transaction (TX) isolation models of concurrency ONLY? In other words, when can table/row lock hints be used during engagement of optimistic TX isolation provided by SQL Server (2005 and higher)? When one would need pessimistic TX i...
stackexchange/codereview
I have the following class structure: public class Result { protected int Code {get; set;} protected List<string> Messages {get; set;} protected Result (); public static Result Success (int code, List<string> messages) { Result result= new Result(); result.Code=code; result.Messages=message...
stackexchange/codereview
I would really apreciate some help to delete the rows returned by this query: select count(av.sesskey) as total from also_viewed av where av.sesskey not in(select op.sesskey from orders_products op) group by av.sesskey having total = 1 Thank you very much to all
stackexchange/codereview
I must be missing something here, or I'm blind or I've had too much coffee. Basically, I'm trying to get the username of each user in a specific group i AD. Then I want to take these username and pass those to a powershell script. But that's another case. This is probably a quick win for you guys. Dim groupName group...
stackexchange/codereview
I'm trying to figure out how to copy a users text input in one form field to another. Specifically, when someone fills in their email address in the contact form, it will be duplicated in the mailing list form. Both these forms are using ajax so there's no concerns about the input text being lost on submit. This is the...
stackexchange/codereview
I'm trying to write a program using C# that would allow me to remotely take control of the mouse on a windows machine. This would allow me to issue commands to the mouse to move to a certain part of the screen and then click on that part of the screen. I was wondering if there were any C# classes that I would be useful...
stackexchange/codereview
My task is to define a function weekdays(weekday) that returns a list of weekdays, starting with the given weekday. It should work like this: >>> weekdays('Wednesday') ['Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday'] So far I've come up with this one: def weekdays(weekday): days = ('Mo...
stackexchange/codereview
I cannot make PHP & JasperReports work on Tomcat 6. I have xampp (apache, php5.3.1, mysql, tomcat6) on Windows XP. I followed the steps to install the php-java bridge, but PHP pages throw error. Does someone have successfully integrate php, php-java bridge, JasperReports? Can this be done without Apache Tomcat?
stackexchange/codereview
I have a model that I want to be commentable. I am having difficulty creating a form on my model's 'show' view that will allow comments to be created. I am not finding any good or useful examples. Can anyone point me to or show me an example of how to do this? Example: A simple blog application. I have a model called P...
stackexchange/codereview
I'm in the process of developing a 2D fighting game in the same style as Capcom's Street Fighter Alpha for the iPhone. For collision detection, I'm thinking about creating several hit boxes per sprite frame in an animation and checking for collisions between them in the main game loop. Are there any tools for creating ...
stackexchange/codereview
The normal way to setup a client is to generate a model by reading the odata metadata using VS UI or datasvcutil. Is there a way to do it without that step. Why? Imagine trying to make a general purpose odata UI (thats not what I am doing but the same need would exist). I know that I can do raw HTTP/XML etc but that se...
stackexchange/codereview
I want to call a function when a certain field gets blurred, but only if a certain element is clicked. I tried $('form').click(function() { $('.field').blur(function() { //stuff }); }); and $('.field').blur(function() { $('form').click(function() { //stuff }); }); But neither works, I ...
stackexchange/codereview
recently we observed that our application server memory is increasing with some client API, in the end it leads to crash. so we tried using boundschecker and it shows NO memory leak and leads to crash as memory is increasing ( private bytes are increasing ). verified in Process Explore of MS(sysinternals). so is there ...
stackexchange/codereview
In my Win32 C++ DLL I find that if I try to use RegisterClassEx this way it works just fine: WNDCLASSEX wx = {}; wx.cbSize = sizeof(WNDCLASSEX); wx.lpfnWndProc = (WNDPROC)WndProc; // function which will handle messages wx.hInstance = GetCurrentModule(); wx.lpszClassName = pClassName; atomRet = RegisterClassEx( &...
stackexchange/codereview
I'm trying to debug why certain handlers in one of my controllers is not invoked by Spring's AnnotationMethodHandlerAdapter. I don't get any errors in Netbeans, just a 404 in the browser. I tried placing a breakpoint in one of my working controllers/handlers then walking up the chain to place a breakpoint in the disp...
stackexchange/codereview
Is there a standard way to add a footer to a context menu, in which I can add a checkbox to make the selected option the default one? Similar to the context menu that comes up when choosing the default home screen for example. From the Api docs for ContextMenu I see that you can set a header view, but not a footer vie...
stackexchange/codereview
I've got a function, public SharpQuery Each(Action<int, HtmlNode> function) { for (int i = 0; i < _context.Count; ++i) function(i, _context[i]); return this; } Which calls the passed in function for each element of the context. Is it possible to set what "this" refers to inside Action<int, HtmlNode> fu...
stackexchange/codereview
I've built a C# COM class that is running in a native windows app (MFC C++). The COM class is used to display video on a window handle from the main application. I'm using the .NET interop to access DirectShow in my C# app. After I render the graph I'm seeing the ActiveMovie window pop up before it is correctly posi...
stackexchange/codereview
Hy everyone, Long time reader, first time poster. This sounds like it should be really simple but I can't find the solution anywhere. I'm building a ratings system where people can rate if something is active or not. It has its own little logic but for it to work I need to. check the items rating depending on the cu...
stackexchange/codereview
I'm starting out with the Facebook C# SDK and trying to run the MVC Sample on my test server and am running into the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your s...
stackexchange/codereview
I have a simple question that relates to good programming practices. Specifically, I am curious to the proper way to handle grouping constants. In school, they taught us to place our constants at the top of the file in which they are fist declared (usually a class file and there is some variation by professor). Now,...
stackexchange/codereview