instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Problem I'm trying to get a list of print queues available on a remote server. Ultimately this will need to be performed from ASP.NET, but for now I'd settle for a console application to work. When I create an instance of the System.Printing.PrintServer class using the path to a remote server I am able to get basic i...
stackexchange/codereview
The following code is being used by the admin to save a Loan object import uuid from django.db import models from django.contrib.auth.models import User from apps.partners.models import Agent # Create your models here. class Loan(models.Model): """ This is our local info about the loan from the LOS """ guid =...
stackexchange/codereview
I recently installed Visual-Web-Developer 10 and open my old asp.net 3.5 solution in it and converted it to asp.net 4 solution. every thing is working fine exept one strange problem: suddenly all chars like: ' or " in header script code become: ' or " and this making all my javascript do not work and give er...
stackexchange/codereview
I need to create something like this. Have several nodes ( NODE A ) with: C++, PHP, PLSQL, JAVA, etc... ( in each node ) And for, each one of these nodes i will have something like (NODE B): 1 - medium skills; 2 - good skills; 3 - guru; I have a reference field in (NODE B) to (NODE A) but i have always to create the ...
stackexchange/codereview
When I try to render a partial view whose model type is specified as: @model dynamic by using the following code: @{Html.RenderPartial("PartialView", Model.UserProfile);} I get the following exception: 'System.Web.Mvc.HtmlHelper<dynamic>' has no applicable method named 'RenderPartial' but appears to have an extension...
stackexchange/codereview
I'm currently attempting to implement APC caching as a datastore in my web application. Currently, the system retrieves data directly from the MySQL database, and requires a database call per request. I'm currently attempting to change this by prepopulating the cache with data which is intercepted and served from the ...
stackexchange/codereview
Is there a way to intercept the raw data that's being sent over a TCP WCF endpoint? I have implemented IClientMessageInspector but I am not sure if that's what's actually being sent over the wire. My goal is to measure the performance of different serializers. I know there is some information out there but I would like...
stackexchange/codereview
I currently have 2 filters, Auth and Redirect that do the following: Filter Auth, who implements IAuthorizationFilter and ActionFilter, checks for user login and authorization, and if that fails sets the filterContext.Result to be a HttpStatusCodeResult of 403 (forbidden). Filter Redirect, who implements IActionFilter ...
stackexchange/codereview
This is the CSS for the dropdown menu I create, the problem is that the menu disappears as soon as I hover the children items. It gets fixed If I set Height:30px and line-height: 30px but I do not want to adjust height. I want it to auto adjust. I can't get it to work in IE7. This is my CSS #menu { display: block;...
stackexchange/codereview
I'm learning MVC to develop a website, and I'm finding confusing the (apparent?) differences from the "theory" and the current widespread implementations. In the original and Martin Fowler's article the MVC concept seems to favor a "smart" View, which interacts directly with the Model to retrieve the data to display, a...
stackexchange/codereview
What are the relevant differences, in terms of performance and use cases, between simulated annealing (with bean search) and genetic algorithms? I know that SA can be thought as GA where the population size is only one, but I don't know the key difference between the two. Also, I am trying to think of a situation where...
stackexchange/codereview
My E-Commerce System will have 5 bases type of products: Cell Phones Computers Shoes Shirts Default (No specific attribute) Each one have specific attributes associated... What I done (Class Table Inheritance): Product Id Name Sku Price ... Shoe ProductId Size Color ... Computer Pr...
stackexchange/codereview
I have an windowless IViewObject object. I want to call its Draw function to render into Opengl PBO memory (alternatively OleDraw is simpler). Right now i first create an HBITMAP using CreateDIBSection (which allocates its own memory) and then copy from this into my PBO memory. However, I'd like to avoid this extra cop...
stackexchange/codereview
I'm trying to get back an entry list of leads by status. The query I'm using is "leads.status = 'New'" however when I try this in php, I get back leads of other statuses as well. function get_leads_over_x_days($session_id, $days) { $daysAgo = date("m/d/Y", strtotime($days . ' days ago')); $wher...
stackexchange/codereview
I have an instance of MySQL 5.0.4.1 with an application written in Hibernate. On one of the pages, I get the following error message in the server log: Unknown character set index for field '123' received from server.at com.mysql.jdbc.Connection.getCharsetNameForIndex(Connection.java:1664)at com.mysql.jdbc.Field.(Fiel...
stackexchange/codereview
I need to customize the knob of JSlider. I need to put my own knob's image over default knob of Jslider. The problem is that currently two knobs are coming in response. One my own knob and second the default knob. Please tell me how i can i hide the default knob or any other solution. Below code is used to do so. publ...
stackexchange/codereview
I am having jQuery tab control and first tab has a edit form and other tab is where users can upload images.Problem is that when I am on second tab and try to upload image it always validates the first form also. First tab Edit Form: <% using (Html.BeginForm()) {%> Second tab Form: <% using (Html.BeginForm("UploadImag...
stackexchange/codereview
I'm using a numbers matching table, from one upwards. However, I realize I need to start at zero instead. Can't figure it out.. CREATE TABLE IF NOT EXISTS util_nums (n integer primary key autoincrement not null); insert into util_nums(n) select null from (select 0 as n union select 1 union select 2 union select ...
stackexchange/codereview
I was wondering, how does pthreads-win32 (windows implementation of pthreads) implement cross-threading? Is it written exclusively with windows API? I checked some of the sources and it seems that most is indeed written with windows API, tho i was wondering if it uses windows scheduler to switch between threads (and co...
stackexchange/codereview
I have updated the crossdomain.xml security settings for my site - but it seems that the older version is being cached in both IE and Chrome. I've checked the headers sent by the server and it's not sending any cache control headers that would be forcing the browsers to be caching crossdomain.xml. In an attempt to get ...
stackexchange/codereview
how do achieve the equivalent of awk '{print $1}' /tmp/data | sort | uniq -c for a particular column in R? Example: cat /tmp/data alama alama alama bbbb bbbb ccc alama bbbb bbbb awk '{print $1}' /tmp/data | sort | uniq -c 1 4 alama 4 bbbb 1 ccc i.e. count of every item in the column. Based on @Joshua...
stackexchange/codereview
I have a number of Jquery plugins being called through my Drupal Acquia Marina theme .info file. They work fine in all popular browsers with the exception of IE6 and IE7, in which they don't appear to load at all. Some of the plugins are very basic, like the following slidetoggle, which like all of them, exists as a a ...
stackexchange/codereview
I want to "replicate" a database to an external service. For doing so I could just copy the entire database (SELECT * FROM TABLE). If some changes are made (INSERT, UPDATE, DELETE), do I need to upload the entire database again or there is a log file describing these operations? Thanks!
stackexchange/codereview
I have a function that updates a <div /> via AJAX: function update() { <!-- .ajax() --> setTimeout(update(), 3000);} } What I need is that this is not executed when the user is not present on the website, so if there is no movement of the mouse (we will suppose that if move it is in the website) it will not u...
stackexchange/codereview
In a document containing a large number of DIVs, I want to select the text inside the asset-body elements, but only if the bookmark link inside the asset-name entry-title of that "entry" contains the text democrat in the href value. So, in the example below, containing two "entries" (entry-1 and entry-2), I only want t...
stackexchange/codereview
I'm planning to develop a small business app that I'd like to be deployable either as a standalone desktop app or a web app. I would like to know if having a Silverlight + WCF RIA Services stack will be challenging to deploy as a standalone desktop app (with Cassini and SQL Express). I'd like to reuse as much of the p...
stackexchange/codereview
I have been given some work to do with the fractal visualisation of the Mandelbrot set. I'm not looking for a complete solution (naturally), I'm asking for help with regard to the orbits of complex numbers. Say I have a given Complex number derived from a point on the complex plane. I now need to iterate over its orbit...
stackexchange/codereview
How come this test I wrote fails in jodatime 1.6.2? Is it a bug? @Test public void testIfJodaTimePeriodsHandlesPeriodTypesOtherThanMinutesAndHours() { long twentyDaysInMillis = TimeUnit.MILLISECONDS.convert(20, TimeUnit.DAYS); Period twoWeeks = new Period(twentyDaysInMillis, PeriodType.weeks()); Assert.assertEqu...
stackexchange/codereview
I have a very simple c programme: int main() { return(1); } and a simple Makefile: all: gcc -ansi -pedantic -o tmp tmp.c ./tmp However, when I type make I get the following error message: $ make gcc -ansi -pedantic -o tmp tmp.c ./tmp make: *** [all] Error 1 What obvious thing am I missing?
stackexchange/codereview
What would be a smart data structure to use to represent a Sudoku puzzle? I.e. a 9X9 square where each "cell" contains either a number or a blank. Special considerations include: Ability to compare across row, column, and in 3X3 "group Ease of implementation (specifically in Python) Efficiency (not paramount) I suppo...
stackexchange/codereview
When the TAGS file is re-generated, and I try to visit tag in Emacs (M-.), Emacs asks me if I really want to re-read that file: Tags file /path/to/TAGS has changed, read new contents? (yes or no) And I have to enter yes every time. Not very convenient (M-. Enter y e s Enter are 7 keys to press against only 2 in Vim)....
stackexchange/codereview
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13965430 bytes) PHPInfo shows that I have a memory_limit of 128M, so I'm confused as to why the error says I only have 64M. Is it possible for phpinfo to report incorrectly? Or for PHP to use two separate php.inis? The error was being cau...
stackexchange/codereview
should all c# classes override Equals and GetHashCode? For correctness
stackexchange/codereview
Here is a challenge for you - .NET C# 4.0 or below. I have a basic C# application which has a single button on a form. The button uses an API which takes a file path as a parameter for the location of an audio file. The API then allows the calling of the file e.g. someoneElsesAPI.Play("C:\myfile.vox") to play the file....
stackexchange/codereview
in ruby/ror you can do this: user = User.new(params[:user]) which populates a new object with the values from a posted form. Can something similar be done using django/python?
stackexchange/codereview
I want to login to an https site on the internet with java and then read some information. I already looked with firebug to the headers, however I couldn't manage to make it ... Firebug tells: https://service.example.net/xxx/unternehmer/login.html?login=Anmelden&loginname=xxx&password=xxx&sessionid=&sprache=de And the...
stackexchange/codereview
Does anyone have a good tutorial or some advice on how to implement one's own XAResource? I need Spring's MailSender to be transactional, so that the mail will only be sent once the transaction commits, and it seems there isn't any existing transactional wrapper.
stackexchange/codereview
Have run into jquery question while learning ajax. $('div_hello'); --> answers an 'Object' document.getElementById('div_hello'); --> answers an 'HTMLDivElement' getElementById works ($ does not). For this experiement, I simply want to use innerHTML. Not clear on how a jquery 'Object' differs from an HTML element. ...
stackexchange/codereview
So does anyone know if there is a program that will allow me to track how many times my app is opened daily? I'm not looking to track the users behavior or anything, I just what stats on the average use of my app.
stackexchange/codereview
Can I check in C(++) if an array is all 0 (or false) without iterating/looping over every single value and without allocating a new array of the same size (to use memcmp)? I'm abusing an array of bools to have arbitrary large bitsets at runtime and do some bitflipping on it
stackexchange/codereview
Specifically, I have written a Rails app in which I'm using the default (in Rails 2.3.5) CookieStore session store and I've spotted an odd problem in development. Myself and a few others had been using the site for a few weeks and we each had a login based on a username and password (each user registered themselves and...
stackexchange/codereview
I have a table some thing like as follows for Inventory details. InventoryTable. InventoryTableID DateCreated quantity ItemName ------------------------------------------------- 1 2010-02-04 12 abc 2 2010-03-10 4 abc 3 2010-03-13 5 xyz 4 ...
stackexchange/codereview
Has anyone discovered a relatively easy way to add lightbox to a theme that doesn't support it out of the box?
stackexchange/codereview
I am trying to create a service which tracks the desktop events like LOCK, LOGOFF, SHUTDOWN etc, I need to write the time (and date) in a text file, regards.
stackexchange/codereview
In my objective-c project, I have a weird, lets say, feature I have a class, like this: #import <Foundation/Foundation.h> @interface Convert /* : NSObject */ // <--- is that necessary? +(int) toInt:(id) obj; @end @implementation Convert +(int) toInt:(id) obj { return [obj intValue]; } @end What happens is,...
stackexchange/codereview
following on from this question i have the following lists in python which i want to recombine into a dictionary/list: from fromfruits = { "names" : ['banana','grapefruit','apple'] , "colors" : ['yellow','pink','green'], ... } to tofruits = [ {'name':'banana','color':'yellow',...}, {'name':'grapefruit','color':'pink'...
stackexchange/codereview
Here is what I have in my member.php for my fancybox: <script type="text/javascript"> $(document).ready(function() { $("a#uploadpage").fancybox({ 'titleShow' : false }); }); </script> . . . <a id="uploadpage" href='uploadpage.php'>Change Image</a> <br/> This wor...
stackexchange/codereview
My question is sort of stupid that why JSON.stringify({"annotation": [{"x":1, "y":2}, {"x":1, "y":2}]}) does not return {"annotation": [{"x": 1, "y": 2}, {"x": 1, "y": 2}]} but returns {"annotation":"[{\"x\": 1, \"y\": 2}, {\"x\": 1, \"y\": 2}]"} and how can I get the first output?
stackexchange/codereview
List. ['Chrome', 'Chromium', 'Google', 'Python'] Result. {'C': ['Chrome', 'Chromium'], 'G': ['Google'], 'P': ['Python']} I can make it work like this. alphabet = dict() for name in ['Chrome', 'Chromium', 'Google', 'Python']: character = name[:1].upper() if not character in alphabet: alphabet[character] = list...
stackexchange/codereview
I created static pages in admin and when I try to open www.website.com/static-page-identifier We get 404 page If we put index.php in front like this www.website.com/index.php/static-page-identifier It works I have checked that mod-rewrite works on server. I have been switching 'Use Web Server Rewrites' to yes and no ...
stackexchange/codereview
I need several words to be highlighted in a String while appending it to a JTextArea. So that I try this: jta.append("<html> <b>Termination time : </b></html>" + CriterionFunction.estimateIndividual_top(individual) + "\n"); Where jta is a JTextArea. The output I get is: <html> <b>Termination ...
stackexchange/codereview
How do I determine the link_to arguments for show, edit, and destroy? I know "new" is "new_user_post_path". Nothing else seems to follow this convention though? My relevant routes.rb snippet: resources :users do resources :posts end
stackexchange/codereview
I'm fairly new to SQL, and I'm trying to work out how to speed up a complex SQL query in postgres, perhaps by improving my use of indexes. This is the query: SELECT (SELECT ev.code FROM classification_item ci, enumeration_value ev WHERE ev.key_id = :ak_0 AND ci.entry_id = t.id AND ci.value_id = ev.i...
stackexchange/codereview
I need to keep Security.level set on medium for Ajax reason. But I want that If the user close browser his session will destroy. How can I do that? Thanks in advance!
stackexchange/codereview
This is my situation: i need the code to run in a loop, over and over again asking the same question(s) to the user, until the user types a "q" for any point to terminate/exit the loop, thus exiting the program. The problem is that i tried to used a do-while/while loop, and those loops executes only if the conditions ...
stackexchange/codereview
I have Scenario and i want to convert it to a query. My Scenario: I have lot of dbs with same structure "Clientxxxx" i want to make loop for all these dbs to get data from one table exists in all these dbs called "EventLog" these event log recorded in this table for clients exists in another db called "Portal" I want ...
stackexchange/codereview
Here's a simple jquery and html script to simulate the facebook wall, but it isn't working. Could someone help me out? <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { $("form#submit_wall").submit(function () { var message...
stackexchange/codereview
I really don't understand why the getMyClass2 method below cannot be static, why isn't it valid Java code? public class MyClass { private class MyClass2 { public String s1 = ""; public String s2 = ""; } private MyClass2 myClass2; private static MyClass2 getMyClass2() { ...
stackexchange/codereview
I have a flash movie and I am using ExternalInterface.call function to call a javascript function from within the movie. The problem is that whenever the javascript function gets executed in Mozilla Firefox, the browser becomes non-responsive. I have uploaded the file here: http://www.aakashb.0fees.net/carbon6.html Thi...
stackexchange/codereview
I have a SQL Server 2000 database and some tables in a database. I want to export them (the structure, definition and indexes) to another database. I don't want to copy the entire database, only some tables. And it doesn't matter the data that I have in the tables. Is there a form to do it?? I know the export data opt...
stackexchange/codereview
Imagine you have a completely normal four-point bezier curve (two points and two control points) created using curveToPoint:controlPoint1:controlPoint2: in your cocoa application: How do you find points (and the tangents), along the curve? Later: for a complete, simplified, solution based on Michal's answer below, c...
stackexchange/codereview
I have a two column TableLayout as the only child of a scroll view. The first column contains TextViews ('labels') and the second column contains EditText/Spinner/DateWidget etc ('values'). Even though I have have specified android:layout_width="fill_parent" for TableLayout, TableRow & all widgets (in 'values' column)....
stackexchange/codereview
i have create 18 Stored Procedure , and i want to call then when i design a new Report but in the Retrieving data step only the tables appears but there is no Stored Procedure and i am using SQL 2005 and VS 2008 Professional Edition
stackexchange/codereview
I'm currently working on a project where we want to interface with TWAIN scanners on both the PC (Windows) and the Macintosh. On Windows, we basically have everything squared away and the code works successfully with the vast majority of scanners. On Mac OS X, we also basically have everything working and with the mai...
stackexchange/codereview
I am looking for good SIP, telecom and VoIP resources. In particular videos, talks and presentations that are considered "a must see" from the community. Do you suggest anything?
stackexchange/codereview
I followed a tutorial using depth buffer in opengl es 1.1. But I use opengl es 2.0. The implemented code results in an error: Failed to make complete framebuffer object 8cd6. See implemented code below: (void)createFramebuffer { if (context && !defaultFramebuffer) { [EAGLContext setCurrentContext:context...
stackexchange/codereview
I have this simple perl daemon: #!/usr/bin/perl use strict; use warnings; use Proc::Daemon; Proc::Daemon::Init; my $continue = 1; $SIG{TERM} = sub { $continue = 0 }; $SIG{USR1} = sub { do_process(1) }; # basic daemon boxesd_log("s...
stackexchange/codereview
I have a table in which i keep different meters (water meter, electricity meter) and in another table i keep the readings for each meter. The table structure is like this : The meter table MeterID | MeterType | MeterName The readings Table: ReadingID | MeterID | Index | DateOfReading The readings for a meter are read...
stackexchange/codereview
This question may seem completely stupid, but say i have a PHP page with some form processing at the top in php and a html form underneath with the action of submitting to same page and method of post. How do i get the result via ajax, ie. send form to self without refreshing the page, if that makes sense? Thanks
stackexchange/codereview
I'm making a test application for learning purposes. It's targetted for the .NET Framework 4 Client Profile. I created a new Windows XP virtual machine that doesn't have a .NET Framework installed. Ideally I'd like to create a setup project for my little application and bundle that with the .NET Framework 4 Client Prof...
stackexchange/codereview
I've installed nodejs and ran couple of simple examples like opening a server on a port and listen on that port. However, I still can not relate nodejs to web development. so to learn and implement nodejs I'm thinking about making tic tac toe using rails and nodejs. Is this possible? I'm envisioning a multi-player t...
stackexchange/codereview
I am using @Scheduled and it have been working fine, but can't get the @Async working. I tested it many times, and seems that it is making my method asynchronous. Is there any other thing, configuration, or parameter I am missing? I have one class that has two methods one, the method marked with @Scheduled, executes an...
stackexchange/codereview
i am currently setting up a PBX System at my work. I´m having trouble figurung out how to connect to the Exchange LDAP Server. To be more specific, how do find out what the LDAP base directory is? I have to enter something like o=foo,... I think I saw a command once to run on the Server running Exchange which would sho...
stackexchange/codereview
I have a table that has a class name partnerGridClass. I would like to set one of the rows background colors that corresponds to a certain index n. n is just a javascript variable. $("table.partnerGridClass tbody tr:nth-child(n)").css("background-color", "#CCCCCC"); What I have above is not working for selecting the ...
stackexchange/codereview
I have a function which has a jQuery.post being done, with POST parameters passed to it. function executeFunction(){ jQuery.post("../somefile.php", {executeFunction:true}); } If I'm not wrong, this is async behavior. Elsewhere in the code, I have: executeFunction(function(){ jQuery('#box').reload(); ...
stackexchange/codereview
How do you wrap the view of a 3rd-party app (let's call the view to wrap "view2wrap" and the app "3rd_party_app") so you can do some custom things before the app does its thing? I've set urls.py to capture the correct url: url( r'^foo/bar/$', view_wrapper, name='my_wrapper'), I've created my custom view: from 3rd_pa...
stackexchange/codereview
I have the following piece of code to replace all tokens in a given set of files: (I'm using the msbuild extensions detokenise task). <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="MSBuild.ExtensionPack.FileSystem.Detokenise" AssemblyFile="Exte...
stackexchange/codereview
java.net.SocketTimeoutException: Read timed out at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker...
stackexchange/codereview
SELECT a.id, a.name, a.ad, c.name, c.phone, c.email, ( SELECT b.id_user FROM price_b b WHERE b.id = a.id ORDER BY b.date DESC LIMIT 1 ) AS f_user_id FROM a_emtp a LEFT JOIN customer c ON c.id = f_user_id WHERE a.show = "1" Hi, why show this error: Unknown...
stackexchange/codereview
I have this Django model: from django.contrib.gis.db import models class Event(models.Model): address = models.TextField() point = models.PointField('coordinates', null=True, blank=True) When I sync this model using MySQL, this error message is printed while creating indexes: Failed to install index for event...
stackexchange/codereview
I need to draw, move, change shapes (rectangles, circles an so one) on canvas (represented by standard "Static Control"). All drawing operations are realized by standard GDI functions. I've realized it like this: (example for moving shape, other operations use the same principle) ... // Before any actions set foregrou...
stackexchange/codereview
Possible Duplicates: Merging dictionaries in C# What's the fastest way to copy the values and keys from one dictionary into another in C#? I have a dictionary that has some values in it, say: Animals <string, string> I now receive another similar dictionary, say: NewAnimals <string,string> How can I append the enti...
stackexchange/codereview
I'd like to play two videos at the same time from an HTML page in a UIWebView. By default any playing video is stopped when another is started. This happens even if the two videos live in different web views. Is there a way to force continued play for the first video?
stackexchange/codereview
An open delegate is a delegate to an instance method without the target. To call it you supply the target as its first parameter. They are a clever way to optimize code that otherwise would use reflection and have poor performance. For an intro to open delegates see this. The way you would use it in practice is to have...
stackexchange/codereview
Possible Duplicate: FindBugs for .Net I need something like FindBugs for C#/.NET ... Could you tell me where I can find something like this ? Thanks.
stackexchange/codereview
I have a webservice that I want to Consume in my application. Too be able to test the other parts of the application I have built an Interface that allows me to test using mocks and stubs. I can add the Interface to the generated code from the web service, however if at any point in time a regenerate the code I loose ...
stackexchange/codereview
Why does the tab text overlap the drawable in the tab? Is there a way to prevent this? Is the drawable always centered? What's the point of being able to add text as well as a drawable to the indicator if it gives this output. xml <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.co...
stackexchange/codereview
I'm using Django on the backend and jQuery on the front end. I would like to accept both fractions and whole numbers (like "1/2", "1 1/4" or "2", for ingredient quantities in a recipe.) I'm using a FloatField to store these values. What is the best way to convert these fractions/whole numbers to floats?
stackexchange/codereview
Is there a simple link to open Facebook in Safari with some text for people to post on their "News Feed"?
stackexchange/codereview
I'm trying to pass an array of character arrays to a C function using ctypes. void cfunction(char ** strings) { strings[1] = "bad"; //works not what I need. strings[1][2] = 'd'; //this will segfault. return; } char *input[] = {"foo","bar"}; cfunction(input); Since the array that I throw around is statically define...
stackexchange/codereview
Currently I am using xdelta to make the update files and send only the difference of the user current application version but I would like to know if there are better ways or other ways to approch this sort of situation and the advices the community could give me. Our application is written in C# and our webserver is r...
stackexchange/codereview
Mahjong is one of the most popular games in Asia (not the solitaire style found in Windows 7). There were plenty of Mahjong games out there including online ones from Yahoo or offline ones back in the DOS days! Just another day I was thinking to myself, how can I write one (excluding the GUI)? The data modeling part i...
stackexchange/codereview
In C#, the following code doesn't compile: class Foo { public string Foo; } The question is: why? More exactly, I understand that this doesn't compile because (I quote): member names cannot be the same as their enclosing type Ok, fine. I understand that, I won't do it again, I promise. But I really don't under...
stackexchange/codereview
i deleted a folder from my local Git repository then i committed and pushed the changes to the remote repository, the files are deleted but the folder and the sub folder are still there. How could i remove the empty folder from the remote repository?
stackexchange/codereview
I removed a substantial amount of text from this question because I feel it needed to be more succinct. - Serg Here's what I'm trying to do. User selects a State, then a ComboBox loads with Cities in that State, then when user selects a Сity a ListBox loads all projects from that City. When running the method that's su...
stackexchange/codereview
Not getting the data to the array variable NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path=[documentsDirectory stringByAppendingPathComponent:@"Employees.plist"]; NSData *datas = [NSData dataWithCont...
stackexchange/codereview
I am writing a sample app in WPF and I'd like the Model to be easily reusable in a WinForms app so I'd like to keep WPF specific stuff like INotifyChanged and DependencyObjects out of it. If a Model class has a List of some other Model class, how do I implement the corresponding ObserveableCollection in the View-Model ...
stackexchange/codereview
Is there a way to set a website like google.com as homepage through C++ or C ? How ?
stackexchange/codereview
I have a question regarding how to call ruby classes that reside outside of rails app structure. I have few Ruby classes that are used/invoked from cron job periodically. I would like to use the same ruby classes to be invoked from a rails controller after user creates a model object. Is it possible to invoke code that...
stackexchange/codereview
I feel like I'm taking crazy pills. About to lose my mind solving the issue at hand but ultimately IE7 does not use jquery 'slideDown' and 'slideup' function as it should. All other browsers work. My initial theory is the issue lying with the .focus (since ie does not recognize). When i switch the function to .click, ...
stackexchange/codereview