instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm currently facing an issue where a specific SQL-query is taking about 30 seconds to issue from within my Java application but <1 sec in a SQL-client (SQL Developer). In the the question, Slow query in Java by JDBC but not in other systems (TOAD), it is suggested that using a PreparedStatement bound to java variable...
stackexchange/codereview
I'm trying to create a running total, unsuccessfully, what way would you do this: var total = 0; value = $('.price').text(); total += value; $('#subtotal span').html(total); All it does it add the next value to the "span" not actually add the figures together! EDIT: From content of answer posted by OP. $('.addtocart'...
stackexchange/codereview
I'm trying to create a simple game. I've set up a layer "actionscript", where I put all the code in. Then I have a image, instance name is "player". Here's my code: stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyDown); var power = 5; var friction = 0.95; var xspeed = 0; var yspeed = 0; function KeyDown(keyEvent:Ke...
stackexchange/codereview
I want these double values to seed/pre-populate an sqlite file. Thanks! Matt
stackexchange/codereview
I cant see any way to get around this...
stackexchange/codereview
I have created my first SVG game, using Raphaël.js. In Chrome the game feels fast, but in other browser like IE (understandable since it's using VML), Firefox, iPad safari and others, it feels slow at times. I'm looking for some tips on how I can optimize my code to squeeze out the absolute best performance. I've tried...
stackexchange/codereview
Is there any Win32 API for waking up a system that has been shut down, at a specific time? I have seen a program named Autopower On which is able to power the system on at a specified time.
stackexchange/codereview
I need to port a ASP.NET MVC app to Java. To make migration easier, I would like to use the most similar Java web framework to ASP.NET MVC. I know basic Java web development [JSP/Servlets] but I don't any Java MVC framework. What Java web framework would make my migration the easiest? Any recommendations?
stackexchange/codereview
Windows 2003-32bit IIS6 WSS 3.0 (No MOSS Installation) WSS is installed on the Domain Controller (Active Directory). (Not something I did or would do!) WSS is set to NOT allow anoymous access BUT it was at some other time in the past. SSL has been installed and the Web Site on a different website than the original WSS...
stackexchange/codereview
EDIT @mootinator has done awesome work with this. See his answer below. Since I wasn't clear in specifying my exact URI, it may still help people who are looking for something similar. My URI is more like: 9/Here-is-some-text/unwatch ...in which case you need mod_rewrite rules that look a little more like this: Rewrite...
stackexchange/codereview
I have something like this using BeautifulSoup: for line in lines: code = l.find('span', {'class':'boldHeader'}).text coded = l.find('div', {'class':'Description'}).text definition = l.find('ul', {'class':'definitions'}).text print code, coded, def However, not all elements exist at all times. I can en...
stackexchange/codereview
I'm working with a repository with a very large number of files that takes hours to checkout. I'm looking into the possibility of whether Git would work well with this kind of repository now that it supports sparse checkouts but every example that I can find does the following: git clone <path> git config core.sparsech...
stackexchange/codereview
I have user input that consists of a drawn rectangle (freestyle). Now this drawn figure isn't perfect, so I would like to redraw the shape for them based on an algorithm. I have a bunch of coordinates from the user's drawing. I would like to find the greatest (x,y) and the lowest (x,y) coordinates and use the distance ...
stackexchange/codereview
class ItemForm(djangoforms.ModelForm): class Meta: model = Item exclude = ['added_by'] i can not understand what this piece of code is doing .i understood that ItemForm is inheriting Modelform but then a class definition inside a class ?? The Item class is : class Item(db.Model): name = db.S...
stackexchange/codereview
Consider the code above @Path("a") @Produces("text/plain") public class A { @GET @Path("a") public String getA() { return "a"; } @GET @Path("a") public String getB() { return "b"; } } Requesting http://host/a/a i always get "b". What is the strategy to select the appr...
stackexchange/codereview
I have created a web crawler in python that accesses the web page & downloads images from that page. The code of web crawler is: # ImageDownloader.py # Finds and downloads all images from any given URL. import urllib2 import re from os.path import basename from urlparse import urlsplit url = "http://www.yahoo.com"...
stackexchange/codereview
I need a static utility method for selecting objects from a List<T>. I'm running into two issues. Here's a short test program: package com.example.test.gui; import java.util.Arrays; import java.util.List; import javax.swing.JOptionPane; public class SelectionTest { public interface NameExtractor<T> { publ...
stackexchange/codereview
I would like to add a small window (Popup) on call screen activity. Google voice and worldcallplaceandtime are both adding the same window during a call. The problem is that when I open a new activity on the top part of the screen, the rest of the buttons are disabled (End call, Mute etc). The only option to click the...
stackexchange/codereview
I'm trying to generate an excel file using html in php and responding with an excel Content-type. Everything works fine except new lines within a cell . They are not preserved. I've tried &#13 ;&#10 ; \r\n ,chr(13).chr(10) and it didn't work. I'm trying to get the same result from alt + enter from microsoft Excel . I...
stackexchange/codereview
Possible Duplicate: Use of 'prototype' vs. 'this' in Javascript? I've seen both these two ways of declaring methods in Javascript: var User = function() { this.name = 'Foo'; this.greet = function() { console.log('Hello!'); } } and var User = function() { this.name = 'Foo'; } User.prototype....
stackexchange/codereview
I need to open a browser (Internet Explorer 7 or above) for a given URL and then read the contents once it has finished loading. leaving the browser open for the user to use as normal afterwards. Then I need to replace the page (if still open) with a new URL later if needed and read that page... As I'm needing to leave...
stackexchange/codereview
I am getting the following message on a PHP document upload form i created: Warning: fread(): supplied argument is not a valid stream resource in /home/admin/upload.php on line 129 Warning: fread(): supplied argument is not a valid stream resource in /home/admin/upload.php on line 131 Here is my code, line 129 and 131 ...
stackexchange/codereview
I have been programming for a while at an intermediate level of course. I have been executing the same code in these different compilers (mostly GCC and MinGW), but I'm unable to make out the difference between these compilers. I mean by what way is the one better than the other? Or what makes them different? Are the...
stackexchange/codereview
I need to define my own deepcopy function for one of my classes. The documentation says that the function __deepcopy__() is passed a memo dictionary for tracking which objects have already been copied, to avoid getting caught in coping a recursive object. However it doesn't say what to put in the dictionary. Do I put o...
stackexchange/codereview
I have a project folder with merged J2ee application and standard java application. I am having trouble with configuring the Log4j.properties. I want to have separate log files 1 for my web application and another 1 for my standard application. I have two Log4j.properties files one under the root package of my web appl...
stackexchange/codereview
How can I run a WebSocket server on top of Google App Engine? Is it possible? Will it be possible?
stackexchange/codereview
//I'm totally new at apps with GUI , please bear with me :) I'm writing a new stand alone (meaning , no client/server) application in Java. I'm trying to decide if I should use SWT or GWT . GWT seems to be very agile and have more capabilities (so says our UI designer) , but I find it hard to wrap my mind about using...
stackexchange/codereview
I stumbled upon this website: http://www.liptongreenmint.ro/ I like their small and simple slideshow with 5 pictures that are moving independently. I tried to understand how it's done by looking at the code, but came short. I hope someone can open my eyes here. thanks
stackexchange/codereview
I'm doing a read from a file, but the input seems to "overflow" into other variables. I have these 2 variables: char str[250]; //used to store input from stream char *getmsg; //already points to some other string The problem is, when I use fgets() to read the input printf("1TOKEN:%s\n",getmsg); fp=fopen("m.txt"...
stackexchange/codereview
I'm using netbeans to program something with a user interface... I hava a main class that named "NewJFrame.java"(A) and one more class that named "NewClass.java"(B). Class A is extended to class B like this: public class NewClass extends NewJFrame{ ... } Contents of ClassA are public static like this: public static...
stackexchange/codereview
I have a grid-view placed inside a div and scroll bar is there. I want to set the grid view header fixed and while scrolling only the content will be scrollable. How can do this.... Thanks in Advance....
stackexchange/codereview
There are several commands that have esoteric options that I don't use often. For example, git has 'check-attr'. I use 'git checkout' very often, however, so I'd like, git ch to complete to git checkout or show a menu without check-attr in it. I can do this with zstyle ... ignored-patterns. However, I'd still li...
stackexchange/codereview
I am using Redmine and when I run a rake db migration the database gets created in mysql ok. My problem is that the date field is wrong. I want it to be a mysql timestamp type, but instead it is a DATETIME type in MySQL. class CreateChats < ActiveRecord::Migration def self.up create_table :chats do |t| t.co...
stackexchange/codereview
I'm working with Sikuli, which (I think) is build on Jython. I want to make a script that does a small gentle beep to attract the user's attention. (This is on Windows.) How can I do this? I see that the winsound module is not available on Jython. (Note that I want to use the sound card, not the built-in beeper.)
stackexchange/codereview
I'm currently reading this presentation about Augmented Reality and I'm asking myself why the coder are setting the x coordinate of the overlay element to 160-497.8*sin(relDirection). Look at slide 25 for more details. I understand the mathematic background about the geo calculation but how do you know the number 497.8...
stackexchange/codereview
I am trying to compensate for frame rate inconsistencies using the swing timer. I tried: class TimerListener implements ActionListener { public void actionPerformed(ActionEvent e){ timeCur = System.currentTimeMillis(); timer.setDelay(speed - (int)(timeCur - timePrev)); repaint(); } } ...
stackexchange/codereview
How dragonfiresdk works internally as It allows to develop on Windows ? As Apple rules seem harsh about porting code how can dragonforesdk be so sure to be compliant ? Why aren't there any other solutions for developping iphone on Windows then or are there ? Seems like a mystery to everybody ... Update: as Brad Larson ...
stackexchange/codereview
In my app, I have three models: Markets, Deals, and Users. Relationships are pretty straightforward: class Market has_many :users has_many :deals end class User belongs_to :market end class Deal belongs_to :market end Now, in order to more easily query some of those relationships, the Market model has some ...
stackexchange/codereview
I have used self.fields to get all the users full names instead of just user names, now I would like to just add an empty field as the first choice... Currently. def __init__(self, user, *args, **kwargs): super(TrophiesForm, self).__init__(*args, **kwargs) self.fields['outfitter'].choices = [(user.pk, user.get_...
stackexchange/codereview
I am looking for a good conversion tool which basically transforms my xsl-fo(Extensible Stylesheet Language Formatting Objects) document (ver XSLFO 1.1) to PDF. I cannot use Apache FOP cos it renders most of the objects conforming only till XSLFO 1.0 Also a prerequisite : it should expose libraries to use it from .NET ...
stackexchange/codereview
Let's say I tie an event handler to a Timer's Tick event. Timer myTimer = new Timer(); myTimer.Tick += new EventHandler(TickHandler); myTimer.Start(); How long will the associated EventHandler stay tied to the Timer? Will it be removed when Tick occurs? Will it be removed when I do myTimer.Stop()?
stackexchange/codereview
I tried searching the compiler errors on google, but it didn't even return a search result. So, i'm a little lost here. I just downloaded microsoft detours, built it and got the detours.h, detours.lib, detoured.lib, and detoured.dll files from it. Then, trying to use it in my own project, i get the following errors: ht...
stackexchange/codereview
When attempting use the the Adobe GraphAPIDesktop library for use with Adobe Flex and AIR I can login to Facebook and retireve wall posts etc ok using FQL or Graph API calls. When attempting to retrieve users photos I can only get tagged photos when using "me/photos". I am trying to use FQL whcih should work, but whe...
stackexchange/codereview
This is what I want to do: Have a timer with some interval In the timer callback code, if some condition is met, another thread should be run I’ve put my code in a class which is instantiated by the main form and the code is executed upon method call (‘StartSync()’, se sample code). The problem is that the code runs ...
stackexchange/codereview
I am using eclipse and want to use mylyn. however my bug tracking system is home made mssql based system. is there an easy way to plug it to mylyn? how can I achieve that?
stackexchange/codereview
Is it possible to use a Windows 7 TaskDialog in PowerShell? I'd like to convert the following messagebox to a TaskDialog: [System.Windows.Forms.MessageBox]::Show( "There are currently one or more Microsoft Office applications running.`n`nYou must close down all open Office applications before the template update ca...
stackexchange/codereview
I have a problem with elementhost (guess its old issue). When i resize the elementhost programmatically it flickers and flashes black background. Any solution to this? I do not want the flashing of black background. I set the background of wpf control hosted in it to white, still the same issue. Thanks.
stackexchange/codereview
I am using Eclipse 3.5 Java EE 64 bit on OS X Snow Leopard. Was wondering how the .classpath file's tag's order gets changed everytime I run a standard Ant build script. When I manually change the build path order like this (via Eclipse): Right click on project in Project Explorer. A context menu opens up Go to Build...
stackexchange/codereview
I want to insert some tables by default to our sqllite db. I want to display different items according to different categories. In the application, a user can also add items and new categories, for that purpose I want to add some data to db by default. How can we add data to sqlite by default. Please give me some sugg...
stackexchange/codereview
Trying not to select same connection multiple times I have tried to use charindex() = 0 condition the following way: WITH Cluster(calling_party, called_party, link_strength, Path) AS (SELECT calling_party, called_party, link_strength, CONVERT(varchar(max), calling_party + '.' + called_party) AS Path FRO...
stackexchange/codereview
I have the following problem. We used many different URLs to the same page. Now we want to use only one URL for those pages. Here an example: RewriteRule ^(subfolder1/folder1/|(subfolder2|subfolder3)/folder2/|folder3/)?(name1|name2|name3|name4)$ scriptname.php [QSA,NC] As you can see it is pretty messy. What I now wan...
stackexchange/codereview
I'm writing a series of SQL statements to a file using python. The template string looks like: store_insert = '\tinsert stores (storenum, ...) values (\'%s\', ...)' I'm writing to the file like so: for line in source: line = line.rstrip() fields = line.split('\t') script.write(store_insert % tuple(fields))...
stackexchange/codereview
I want to screen scrape the following website using C# Compact Framework because I don't think there is a publicly available api for it (I could be wrong). It has several controls on it that I want to set values for before submitting the page and moving on to the next form full of controls. How can I go about doing thi...
stackexchange/codereview
In IIS 7.0 integrated mode after deleting all headers with Response.ClearHeaders() IIS would add some other headers like Server and X-Powered-By which reveals good information to hackers. How can I stop this behavior (consider I still need to add my custom headers) ?
stackexchange/codereview
Currently I'm working on an ASP.NET MVC 2 website. Company policy says that as many of the connections to backend systems should be done with integrated security. So finally when the website is hosted in IIS, the credentials of the AppPool are being used to connect to databases, Active Directory and so on. But for now,...
stackexchange/codereview
I have pdf page I would like to print/save from the C# windows forms application, however i would like to modify the file before that in adding a final comments page written by the user (only text). Can somebody please point me to the a simple pdf library that does this exact thing in a simple code.
stackexchange/codereview
The most common heuristics to solve the TSP problem (in particular the Kernighan–Lin heuristic) require to work on a randomly generated tour and to improve the solution starting from that. However, the only way I came up with to do that is to generate a random permutation of the vertices and to check if it is a solutio...
stackexchange/codereview
I have the following to display an clickable image (with no border) on a website: <a href="link"><img src="img" border="0" /></a> However this is not strict XHTML 1.0 so I changed it too: <img src="img" class="mystyle" /> And the CSS: mystyle img { border: 0px; } However this only works in Safari & Chrome and do...
stackexchange/codereview
I try to convert a part of a C# Web App to make a C# Library. I used a Response object, but this one is no more recognized in the C# library. Here some code: // Create a CAPTCHA image using the text stored. CaptchaImage ci = new CaptchaImage(textCaptcha, 200, 50, "Century Schoolbook"); // Change the response header...
stackexchange/codereview
Can a website detect what browser extensions are being used? Specifically in this case, the author of the extension wishes to prevent websites from identifying when users are using the extension. So, for a generic example, could the programmers at Yahoo! write code so that www.yahoo.com could tell when it's users wer...
stackexchange/codereview
An activity can use AsyncTask or Handler framework for background work. Both will continue to work even after user has moved away from the activity that started them and the onDestroy for the activity has been called. In other words, an activity is fully capable of doing background work even after its GUI has been shut...
stackexchange/codereview
I have a UL who's LIs are floated right. I would like to center align the text in the UL, but I see that if I don't specify the UL's width, it thinks that it's 100%, and doesn't center align the LIs. However, I cannot give the UL a specific width because the data in the LIs is dynamic. Also, because the UL's width is 1...
stackexchange/codereview
We've recently upgraded our Rails application. To be extra sure everything works, I've tried to get the tests and specs of the various used plugins (26 at current count) to work, thinking then to add those to our continuous integration, which only runs the main application's specs. I've run into a lot of problems even ...
stackexchange/codereview
For a project we do the database design at the moment. We think we should use two auto_increment fields in one table. table master: `pid` int(10) NOT NULL auto_increment, `iid` int(10) NOT NULL auto_increment, ... To start with a alternate auto_incremet you can use ALTER TABLE tbl AUTO_INCREMENT = 100000; This will wo...
stackexchange/codereview
I am starting to learn C++ and Qt, but sometimes the simplest code that I paste from a book results in errors. I'm using g++4.4.2 on Ubuntu 10.04 with QtCreator IDE. Is there a difference between the g++ compiler syntax and other compilers? For example when I try to access static members something always goes wrong. ...
stackexchange/codereview
I receive audio packets from net (4 packets per second, 250ms each) and video - 15fps. Everything goes with my own timestamps. How should I sync them? I've seen the source code of one of our developers but he did syncing VIDEO according to audio. I.e. audio is always played immediately and video can be dropped or buffe...
stackexchange/codereview
I am working on a API for my web application written in CodeIgniter. This is my first time writing a API. What is the best way of imposing a API limit on the API? Thanks for your time
stackexchange/codereview
I was wondering if this loading screen is a preset or a custom build view. If it is a preset, how can I add this to a view?
stackexchange/codereview
let's say, for instance, I have this <h2>I don't love Programming</h2> I'd like to remove 'don't' from the text inside the h2 tag. So far, I've done this var content = $(h2).text(); That's allow me to get the text 'I don't love Programming'. But I need a way to locate don't and replace it by something else or simply ...
stackexchange/codereview
This is something I've just never been able to get my brain around... Let's say I am building a grid of 8 UIViews wide by 8 UIViews high. It could by any x, y set. It doesn't have to be 8 x 8. Let's just be arbitrary and stick to that for now. This init method (part of a subclass of UIView) generates a row 8 UIViews...
stackexchange/codereview
Searching StackOverflow, I found this question on how to Retrieve SMTP settings from Web.Config, but no details on how to update the SMTP back to the web.config file. I started with the following code: Configuration webConfig = WebConfigurationManager.OpenWebConfiguration("~"); MailSettingsSectionGroup settings = (Ma...
stackexchange/codereview
I use a ProgressBar in one of my activities as this: <ProgressBar android:id="@+id/mProgressBar" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> My problem is that when I leave the activity (for example press th...
stackexchange/codereview
i want to use a css style switcher on a live server. i've been asking on irc and a guy said there is a big XSS hole. i don't know too much about XSS vulnerabilities. I hope someone can help me out to secure it! i used this tutorial for the css switcher: http://net.tutsplus.com/tutorials/javascript-ajax/jquery-style-sw...
stackexchange/codereview
Is there a way to detect statically if a any member of a class can throw an exception? Some metaprogramming trick?
stackexchange/codereview
I need help with the following query...Show the names of vendors who have sold us an item more than once. List the vendor, item, and the number of times ordered. Suppose a vendor sold 8 of item 240 on Dec 1 and 12 of item 240 on Dec 30; this counts as two total orders of item 240 (not 20). The tables are ... employe...
stackexchange/codereview
The formula for half vector is (Hv) = (Lv + Vv) / |Lv+Vv|, where Lv is light vector, and Vv is view vector. Am I doing this right in Python code? Vvx = 0-xi # view vector (calculating it from surface points) Vvy = 0-yi Vvz = 0-zi Vv = math.sqrt((Vvx * Vvx) + (Vvy * Vvy) + (Vvz * Vvz)) # normalizing Vvx = Vvx / Vv Vvy...
stackexchange/codereview
Should StringBuilder.Capacity be set to the maximum number of .NET characters, without regards to null termination, or must it be set one higher to reserve space for a null terminator when using P/Invoke. The natural reaction is that it should be set one higher, but it seems like P/Invoke is supposed to automatically c...
stackexchange/codereview
I'm exposing a C++ tree class using Boost.Python to python. The node class holds a list of child nodes and provides a method void add_child(Node *node) The Node class takes ownership of the provided Node pointer and deletes it's child nodes when the destuctor gets called. I'm exposing the add_child method as: .def("a...
stackexchange/codereview
Let's say you want to show the source code for a settings file but don't want 3-4 lines to show up in the public source code. Do you just manually replace those variables or are there some tricks you use, like including them in yet another separate file and including that in the main conf? Or is it more common to just ...
stackexchange/codereview
I wonder if a list of php runtime errors exist? And if not, please tell me: are these php runtime errors? Calling unset variable Calling undefined method Edit: I know how to handle errors well, this question is purely theoretical - I want to know how to call these errors in general.
stackexchange/codereview
I have a very sparse Perl matrix (array of arrays), where undef values are equivalent to zeros. It has 10-1000 rows and up to 100k columns. It looks like: $ARRAY1 = [ [ ( undef ) x 1069, 1, ( undef ) x 47, 1, ( undef ) x 11, ...
stackexchange/codereview
I'm trying to extract one or more urls from a plain text string in php. Here's some examples "mydomain.com has hit the headlines again" extract " http://www.mydomain.com" "this is 1 domain.com and this is anotherdomain.co.uk but sometimes http://thirddomain.net" extract "http://www.domain.com" , "http://www.anotherdo...
stackexchange/codereview
I have a TabView based application on the iPhone. On initial loading, I want to flip-animate the screen for showing some settings. In my AppDelegate, the TabView is added to the window with [window addSubview:tabBarController.view]; I browsed the web and found this: [UIView beginAnimations:nil context:nil]; [UIView se...
stackexchange/codereview
I am developing a multi player game app for the android. One of the participant is acting as the host (the one who created the game instance) and each of the other participants is connecting to the host using bluetooth. My question is as follows, this host has some threads running in order to communicate and holds all ...
stackexchange/codereview
So the tt templates will regenerate every file whenever you save. Now, great, it generates files. However, I am making partial classes to extend other classes, but I only need the files that dont already exist for me generated. The ones that exist, I'd like to preserve. So far, I am finding not one solid solution googl...
stackexchange/codereview
I an a newbie in VC++ and MFC. I am tried to display picture in picture control. The only problem is the control doesn't refresh while I reload another picture. How can I force the picture control refresh before reloading? Is there any function like "Clear" to empty the picture control for another loading? Thx.
stackexchange/codereview
i am building a simple tcp server in c#, now i wanna test the performance of my app, the quesion is, exist any tool o command to send raw data to an tcp port ?
stackexchange/codereview
On this blog post when it comes to the advices on XSS prevention (search "To prevent cross-site scripting" in the text) I can read Disable request validation through use of the ValidateInput attribute. This attribute will falsely reject valid HTML input. Maybe is because my english knowledge is far to be perfect but ...
stackexchange/codereview
I'm trying to ride the HTML5 wave but I'm facing a small issue. Before HTML5 we were checking the file size with flash but now the trend is to avoid using flash in web apps. Is there any way to check the file size in the client side using HTML5?
stackexchange/codereview
I'm on Rails 2.3.5. In a typical user controller create action class UsersController def create @user = User.new(params[:user]) respond_to do |format] if @user.save ... else format.json .... end end end When a client passes an invalid / malformed JSON string for input, Ra...
stackexchange/codereview
Possible Duplicate: strtok wont accept: char *str When using the strtok function, using a char * instead of a char [] results in a segmentation fault. This runs properly: char string[] = "hello world"; char *result = strtok(string, " "); This causes a segmentation fault: char *string = "hello world"; char *result =...
stackexchange/codereview
import javax.servlet.http.*; import javax.servlet.*; import java.io.*; import java.util.Date; public class HelloServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html;charset=utf-...
stackexchange/codereview
I'm starting a new project on Groovy and Grails. I'm now working on the authentication part and as we have an LDAP server I want to work the authentication using LDAP. I began setting my environment, I'm using SpringSource Tool Suite and Grails 1.3.5. When I started working with the authentication part I installed two ...
stackexchange/codereview
ASP.NET MVC - Multiple Buttons on a Form this is what I am trying to do too, except the first answer doesn't satisfy my requirements and the second one uses formcollection. I am not passing formcollection. I am passing values to the ActionResult method, because in my scenario, it doesn't make much sense to use formco...
stackexchange/codereview
Here's the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" cont...
stackexchange/codereview
I have a simple question. I'm doing some light crawling so new content arrives every few days. I've written a tokenizer and would like to use it for some text mining purposes. Specifically, I'm using Mallet's topic modeling tool and one of the pipe is to tokenize the text into tokens before further processing can be do...
stackexchange/codereview
I was looking to build a web based chat application. My primary idea was in the direction of using AJAX and transferring XML messages to-and-fro a centralized server (used for synchronization) However, i recently came across XMPP and would like to know how feasible it is to use it as a web based chat client and server,...
stackexchange/codereview
i'm trying to make a connect four iphone app. I have made my own custom UIView class, which is where the game is played. However, I am trying to use the touchesMoved, touchesEnded, etc. methods to retrieve data based on where the user clicked (so i know which column they are trying to put a piece into). How can i get t...
stackexchange/codereview
I want to build a simple web service that outputs JSON to test a parser on iPhone. I have considered using public apis like twitter etc but I want to use a custom JSON text for a small proof of concept test. I am using a MAC with Apache. I got the web server up and I can access an HTML page saying Hello World from 127...
stackexchange/codereview
I want to make in my xml file something like that: <myfile> <screen> <img src="a.jpg"/> </screen> </myfile> I try to make this in this way: XML file <?xml version="1.0" encoding="UTF-8"?> <myfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="myfile.xsd"> <screen> <im...
stackexchange/codereview