instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
okay, so I am using prolog to build a simple xml parser. And I have the following xml file: <ip> <line> 7 </line> <envt> p1:1 in main:1 </envt> </ip> <contour> <name> main:1 </name> <items> <item> <var> x:int </var> <val> 2 </val> </item> <item> <var> y:int </var> <val> 2 </val> </item> </items> ...
stackexchange/codereview
I have a project that is going to create hotspot client, so it imports net.rim.device.api.wlan.hotspot.* When the code runs it complains that it cannot find net_rim_api_wlan_hotspot. If I display the table-of-contents for the jar file, *\BlackBerry JDE 5.0.0\lib\net_rim_api.jar, the file class files are listed. What s...
stackexchange/codereview
I was just learning how to use the LINQ/EDM combination to retrieve and update a simple user-thread-and-comment webapp as part of evaluating it. When I turn on SQL Profiler, I rarely see a SQL statement executed by my app. I'm starting to really like how well it keeps things cached, coz as soon as I add new data, it ma...
stackexchange/codereview
I have JSON like this: { "Property":"Blah blah", "Dictionary": { "Key1" : "Value1", "Key2" : "Value2", "Key3" : "Value3" } } I want to extract the "Dictionary" object as a Dictionary (so it'd be like Key1 => Value1, etc.). If I just had the "Dictionary" object directly, I could use: ...
stackexchange/codereview
I was curious as of what would be the fastest way to check if a JS object (used as a dictionary) has a given property. And I was baffled by the results. See for yourself: http://jsperf.com/object-membership-check-speed/6 In Chrome, the in keyword method is 96% slower than the dot syntax. And in Firefox, it's also aroun...
stackexchange/codereview
Does anybody know how to do a Like of a facebook page/personn by code ? Is it possible with the graph api ? how ? Can you give code example ?
stackexchange/codereview
i am using Pdfsharp.dll to convert tiff image to pdf file in vb.net, and it is successfull when i run in my machine, when i use it from other machine, which shows the Error like "Raw string contains invalid character with a value > 255.", please any one help me to fix error, i using the PdfSharp.dll library and the fol...
stackexchange/codereview
My aim is to create a child processes which will execute in parallel the piece of VB.NET code say a function. I want to do it specifically using processes and not threads. Please suggest the ways to do this?
stackexchange/codereview
How can I ensure a user can not run a PHP script and that it is only ever run as part of a cron job?
stackexchange/codereview
I'm pretty new to Android development and would appreciate some help. All I want is to display a ListView showing a Twitter timeline. I do this in an iPhone app using MGTwitter but I've been trying and am not sure how to get the same effect on Android. I can use a list view, but I'm not sure how to get the updates. In...
stackexchange/codereview
CC -Wall -g `xmlrpc-c-config client abyss-server --cflags` `xmlrpc-c-config client abyss-server --libs` xmlrpc_sample_add_server.c -o xmlrpc_sample_add_server above is command line command I used to compile xmlrpc_sample_add_server.c but I get this error, xmlrpc_sample_add_server.c:11: fatal error: xmlrpc-c...
stackexchange/codereview
In Python, I have a string which is a comma separated list of values. e.g. '5,2,7,8,3,4' I need to add a new value onto the end and remove the first value, e.g. '5,22,7,814,3,4' -> '22,7,814,3,4,1' Currently, I do this as follows: mystr = '5,22,7,814,3,4' latestValue='1' mylist = mystr.split(',') mystr = '' for i in ...
stackexchange/codereview
Many a times, I've come across statements of the form X does/doesn't compose well. I can remember few instances that I've read recently : Macros don't compose well (context: clojure) Locks don't compose well (context: clojure) Imperative programming doesn't compose well... etc. I want to understand the implications o...
stackexchange/codereview
Say I have the list '(1 2 3 (4 5 6) 7 8 9). It should return (9 8 7 (6 5 4) 3 2 1) using the following code below. I'm trying to understand how this iterative process works. Showing how this is done step by step would be very helpful. The part I get confused the most is when deep-reverse is called twice at this point ...
stackexchange/codereview
I have defined the following interface in F# [<ServiceContract>] type ICarRentalService = [<OperationContract>] abstract member CalculatePrice: pickupDate:DateTime -> returnDate:DateTime -> pickupLocation:string -> vehiclePreference:string -> float then I tried to implement it like this: type CarRentalService(...
stackexchange/codereview
Can someone point me to examples of multiparadigm (object-functional) programming in F#? I am specifically looking for examples which combine OO & functional programming. There's been a lot of talk about how F# is a hybrid language but I've not been able to find examples which demonstrate the example of multiparadigm p...
stackexchange/codereview
i am developing a sound application. javax.sound.sampled.TargetDataLine reads from the input channel in 16 bit format i have a 3rd party app that reads in 32 bit to a byteBuffer how can i convert/interpert the 32 bit bytebuffer to a 16 bit byte array?
stackexchange/codereview
For example, I want to Validate Minimum-Length, and if it's Email, a PhoneNumber. How is this possible in android. I want to validate.
stackexchange/codereview
I have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?
stackexchange/codereview
I have an NSView in an NSScrollView that I want to create an NSImage from. Because it's in an NSScrollView it's not always completely visible, and it can be even bigger that the screen's size. Can anyone help me? Thanks.
stackexchange/codereview
In a class I have a property: public Move plannedMove; By default I would like it to contain nothing, so that I can test if it is set in my code in some some way similar to if(!plannedMove) Or something like that. I also want to be able to unset it so that it is blank to being empty. How can I do this? Just in case I...
stackexchange/codereview
Our Swing application performs some long-running tasks in a background thread using the excellent SwingWorker class. However, a lot of older Macs only support Java 5, so we want to compile our application as 5 instead of 6. Because SwingWorker was introduced in Java 6 we can no longer use it. Would the following be an ...
stackexchange/codereview
If there are two branches, and I have been doing work on the default branch, I think one way to push to the foo branch of the other clone is cd ~/development/clone2 hg up default hg pull ~/developmet/clone1 hg up foo hg merge default or cd ~/development/clone1 hg up default hg push ~/developmet/clone2 cd ~/development...
stackexchange/codereview
Rails seems to be ignoring authenticity tokens for AJAX requests. For instance, I purposely changed my AJAX call to test this with an invalid token and requests seem to go through normally. The application has the default configuration to use session cookie store and has the protect_from_forgery call in the Application...
stackexchange/codereview
But completely ignored so that the code keeps continuing from where the exception was thrown? I thought it was simply having the catch method empty.. but my code does not seem to be continuing, just doing nothing... but not crashing.
stackexchange/codereview
I did a Git pull when I was near my quota, and as a result (so I think), got a corrupted file: $ git pull walk dffbfa18916a9db95ef8fafc6d7d769c29a445aa fatal: object d4a0e7599494bfee2b5351113895b43c351496b3 is corrupted $ git fsck --full bad sha1 file: .git/objects/66/b55c76947b1d38983e0944f1e6388c86f07a1b.temp fatal...
stackexchange/codereview
I'm new to PHP, having trouble when I move a class definition out of my "main" page and into an include file. Suppose I have main.php, with the below contents. It works fine: <?php class SimpleClass { public $var = 'a def value'; public function displayVar() { echo $this->var; } } ?> <html> <h1>bla...
stackexchange/codereview
So, I'm writing a user/authentication system for my node.js web framework. What edge cases should I be concerned about from either a usability or security perspective?
stackexchange/codereview
Not using table and must work in IE 7 and Firefox, Chrome, Safari The easiest way to vertically align this: A Title (20px) With a variable length description (12px), can be 1 line or 2 (when wrapped) inside a div that has a width 500px, and height 60px, is probably by using a table. Without using a table, what is the...
stackexchange/codereview
If I have a <ul> list that has the rule "list-style-type: none" (and the rule "background-image: url(whatever.jpg)" for the <li> items), I can't seem to override those rules if I have a <ul> list as a child of one of the <li> items. I want to make the child list have the classic style "list-style-type: disc", but the b...
stackexchange/codereview
I am making an OS from scratch. I have made a hello world bootloader using the tutorials from the internet. I am stuck at the next step though. I need to call an executable ( basically my shell code from the ASM bootloader code ). I googled around and couldn't find anything substantial that was explained in a good wa...
stackexchange/codereview
I would like to simply draw a string (if possible in a specific font and size) on the screen (at a specific location). I am within a C# windows forms application. Unfortunately, I could not found any hint on how to do this in the web. Please help! Christian
stackexchange/codereview
I am creating an Android Widget containg some contact info I discovered that the getContentResolver()-method only exists in the Activity-class, and not in the AppWidgetProvider-class. How do I query content from a widget? Like so: Cursor people = getContentResolver().query(SOME QUERY); UPDATE: @Override public vo...
stackexchange/codereview
I am very new in cloud computing world(including Amazon Web Service), so I have a very simple question: How do I set the region of a amazon sqs when I create it? The default region is "US-West (Northern California)". Thanks!
stackexchange/codereview
I'm trying to build the Izpack project in Eclipse to add my own panels. I was able to build the sample provided on the command line, but not in eclipse. I've read the documentation and I'm still a bit confused. My questions, does the actual Izpack source code have to be included with the project (if so which componen...
stackexchange/codereview
I am banging my head against the wall here, and I am hoping someone can help me out. I have an AJAX function which calls a PHP page. That page returns a JSON object, which should then be parsed and displayed to the user. Everything works fine except when the JSON object is returned, trying to parse it gives undefined....
stackexchange/codereview
I need to customize a number of XML files which are not under resources (in particular, they are under an EAR's project src/main/application). The filtering mechanism would be perfect for this, but my understanding (correct?) is that it works for resources only. Is there a way to use filtering for files in other direc...
stackexchange/codereview
I am developing Android Web App using JSP with xml parsing. I developed it in Java using Tomcat Server but I couldn't develop in Android. I am new to the web app development. So can anyone kindly suggest me how to proceed further... waiting for a response guys...Thank you
stackexchange/codereview
fellow Java warriors! I have this managed bean to handle the Rede (Network) entity related operations called RedesBean (NetworksBean). I have three pages to insert a new network: redes/nova.xhtml (new.xhtml), which is basically a series of input fields to insert the Network properties and a commandButton which invokes ...
stackexchange/codereview
I have problems with NHibernate updating some of my entities when this is not supposed to happen (dirty checking). As I use NHibernate.Mapping.Attributes to map my classes, I have found that there is a parameter "Check" to the element "Class" of NHMA. I would like to know if I can turn off dirty checking by setting th...
stackexchange/codereview
In a RoR application, I would like to load a set of key/values from db into a global variable which persists across requests and clear the variable as and when I need. My application runs in a WAS cluster. I tried a few things. 1. Used memcachestore and read/write/clear as needed. 2. Load the key/values in a yaml file ...
stackexchange/codereview
I am trying to make a really simple Tic-Tac-Toe game. I have stored values of "X" and "O" in a 0-8 ArrayList (3x3 square, essentially). I can do the following for each instance of a winning situation: if ((newBoard().get(0)).equals("X") && (newBoard().get(1)).equals("X") && (newBoard().get(2)).equals("X")){ Sy...
stackexchange/codereview
I'm creating a multiplayer game for windows phone 7. How can I run multiple instances of the emulator in order to debug it?
stackexchange/codereview
Is it possible to use a C++ application that has a mono runtime embedded inside of it to perform a mono_jit_exec on a C# app that is a service (uses ServiceBase to start)? I can start a simple C# application from a C++ app that has a normal C# application (not a service) but I'm having some trouble starting a service. ...
stackexchange/codereview
I would like to get inner bean by it's name. Is it possible with Spring API? Right now I'm using such Spring 2.5 API ConfigurableApplicationContext.getBean(String paramString) Example of XML: <bean id="parent" parent="t_Parent"> <property name="items"> <bean id="child" parent="t_Child"> <proper...
stackexchange/codereview
I have a rail app that serves multiple domain_name and is deployed by nginx & passenger. I need to put one domain under maintenance mode while the other still work as usual. Here is my config: server { listen 80; server_name domain1.com domain2.com domain3.com domain4.com; error_page 503 http://$host/mainte...
stackexchange/codereview
I' m calling doSaveItems: like [NSThread detachNewThreadSelector:@selector(doSaveItems:) toTarget:self withObject:aObject]; doSaveItems: method has a code that references to one of my Outlets: [uiProgressLedIdle setHidden:YES]; of course I'm setting an autorelease pool inside this method. The problem is that [uiProgr...
stackexchange/codereview
Okay, so I'm not sure at all what is going on here. I just got my MAC, and I am trying to download and install setuptools, so I can download different python packages (using easy_install). So, following the instructions here (http://pypi.python.org/pypi/setuptools): I currently have version 2.6 I downloaded the foll...
stackexchange/codereview
I need to convert date (m/d/y format) into 3 separate columns on which I hope to run an algorithm.(I'm trying to convert my dates into Julian Day Numbers). Saw this suggestion for another user for separating data out into multiple columns using Oracle. I'm using R and am throughly stuck about how to code this appropria...
stackexchange/codereview
Basically the poker client program generates files (txt) as handhistory logs, I would like to have some program that edits the handhistory automaticly, just adding "$" signs in front of numbers then generates new txt files in a new directory so I can have the newly created files analyzed in another software. below is a...
stackexchange/codereview
Although I have set Expires to a date in the past, and Cache-Control to no-store, no-cache, I still get one of my web pages cached. Here are the HTTP headers sent to the browser: Date: Tue, 02 Nov 2010 09:13:23 GMT Server: Apache/2.2.15 (el) X-Powered-By: PHP/5.2.13 Set-Cookie: PHPSESSID=2luvb7b316lfc8ht570s1l1v84; pat...
stackexchange/codereview
I'm generating the csv file with the following header commands: header("Content-type: text/csv; charset=utf-8; encoding=utf-8"); header('Content-Disposition: attachment; filename="products.csv"'); If I open the file in Excel 2007, then I get £ wherever a £ sign should appear. However, if I open the file in Notepad++,...
stackexchange/codereview
Where Can I learn all the API of Windows ?
stackexchange/codereview
Possible Duplicate: C/C++ check if one bit is set in, i.e. int variable e.g. if I had a integer and i wanted to check what the value of bits 20-25 were, or if i just wanted to check if one of the bits is 0 or 1, how would i do that?
stackexchange/codereview
I'm using Visual c# express 2008. I have a huge text file that has data similar to this: "text/text/text/text" I'm using a delimiter to separate the data. Now I want to transfer this data to an .sdf file that will be displayed in table format through the windowsformapplication using dataGridView. I already created an s...
stackexchange/codereview
can someone help me to write RegExp to remove all characters except numbers and hyphen (minus sign or "-") between them. string looks like: C:\Documents and Settings\User\Desktop\New Folder 2\New\Folder\1586-10 bougsfiugUYG(jygf) hoihd.xls it needs to be: 1586-10 only. the number of digits before -10 unspecified (can b...
stackexchange/codereview
I am currently writing a token recognizer for XML. I am going along the basis of FSA's to do so. So I have a Header file that has the following code... #define MAX_LENGTH 512 #define MAX_NAME 25 struct token { char name[MAX_NAME + 1]; int type; unsigned char str[MAX_LENGTH + 1]; }; #define TOKEN_TYPES 8...
stackexchange/codereview
I want to grab config settings for a module, and I was told to use an initializer for this. Can someone show me how to do this and how I will reference the config settings from the initializer?
stackexchange/codereview
I'm trying to keep my application working even if the user doesn't have js, and I noticed my lightbox wasn't working with ajax goodness on an old brower and went about trying to fix it but wasn't sure how to get around this. I have a link with a class <a href="/blah/1234", class="modal">Blah</a> but I need to tell the...
stackexchange/codereview
I am looking to create a page with a single form on it that does the following: Contact a webservice with input from the form. Perform an action (programmed using C#) depending on the result of the webservice call. Since I am not interacting with any lists or similar on the SharePoint site, I was thinking a WebPart w...
stackexchange/codereview
Is it possible to make an anchor tag behave like a .submit (with certain post characteristics?) Reason why I have an anchor tag, because I dislike the submit button look and wanted a CSS button. Here's what I'm doing right now (and it's not working) html file <div class="footer"><a href="#" id = "test_btn" class="butto...
stackexchange/codereview
I'm trying to use the google search API services in the backend using C#. I know there is ajax api that you can use with javascript. so what is the similar thing in C# so I can use it at the backend level. I know that I can do it this way: var searchTerm = "Paris"; var web = new WebClient(); web.Headers.Add("Referrer"...
stackexchange/codereview
I am thinking to work on two combos for: country and city. When user selects country in first combo, its cities should be populate in the city combobox. For it: 1.) Prepare 2 javascript variables: first one with countries id and name, second one with cities id, name and country_id For Countries: [ {"id":1, "title":"uk"...
stackexchange/codereview
Can anyone recommend a ruleset.xml file that would be best for use with CakePHP? I was using the PEAR ruleset.xml, and tried out the Squiz ruleset.xml, but I was wondering if there's something specifically for CakePHP?
stackexchange/codereview
I have my (sandbox) In App Purchase working, but how do I determine if the app is busy communicating with the server? I am having a rough time getting my normal ActiviyIndicator to work in this setting, the app seems to go in and out of responsiveness throughout the process. Then if the user closes the screen before fi...
stackexchange/codereview
Trying to make a validation on form without <form> tag. Its a structure of cms plugin, which uses ajax, don't know why inputs aren't wrapped with <form></form>. Html: <div class="feedback"> <input id="name" type="text" name="ajax-name" value="Your name" /> <input id="mail" type="text" name="ajax-mail" value="Yo...
stackexchange/codereview
numpy.unravel_index() takes a shape and a flat index into an array, and returns the tuple that represents that index in the array. Is there an inverse? I can compute it by hand, but this seems like it must be a built-in function somewhere...
stackexchange/codereview
I am planning to use pure C MPI library in C++ application, I don't want to add unnecessary bloat by running eg. Boost MPI layer that wraps all stuff in the MPI::<func> classes. Is there anything I should be aware of?
stackexchange/codereview
I'm having some problems referencing a file on my website in a PHP script. Let's say the full path is www.mydomain.com/img/peggy.jpg I can't use relative addressing like in ../img/peggy.jpg because the script is in an include file which is included in several files at different levels. /img/peggy.jpg do...
stackexchange/codereview
I am trying to make a list in Scheme like this: (list 'quote 'a) and I expect the output to be (quote a) but the interpreter excutes the quote and the output is: 'a How can I write the code to get the expected output?
stackexchange/codereview
I'm trying to get the absolute pathname of a PHP class that inherits from a superclass. It seems like it should be simple. I think the code below explains it as succinctly as possible: // myapp/classes/foo/bar/AbstractFoo.php class AbstractFoo { public function getAbsolutePathname() { // this always return...
stackexchange/codereview
I'm new to NHibernate so I'm sure that I'm just missing something fundamental. I have an table called Issue that has a ParentId column. The ParentId can refer to different tables (i.e. - Project or Customer, etc.) How can I do that query in NHibernate so that I can show only the Issues that belong to Project. Here i...
stackexchange/codereview
My Zend Studio 5 has a feature where it reports broken HTML or invalid tags in red. As ZS5 was developed before HTML5, and tags are showing as broken. Does anyone know if there is some kind of XML file containing the list of valid HTML tags that I could append the newly created HTML5 tags to. Thanks.
stackexchange/codereview
I've got a catalyst specific model class that I'd like to instanciate by wrapping it with the help of a Catalyst::Model::Adaptor package MyClass; use Moose; has 'c' => ( is => 'ro' , isa => 'Catalyst' ); 1; package MyAPP::Model::MyClass use base 'Catalyst::Model::Adaptor'; sub prepare_arguments { my ($self, $ap...
stackexchange/codereview
I am using Spring Integrations 2.0.0 and am trying to configure the following: An application places an object on an ActiveMQ JMS queue which is processed by the Spring-integration-driven backend. The sending application is awaiting a reply on a temporary response queue since the backend places the response in this par...
stackexchange/codereview
To be able to sort a dictionary by value I'm using this code: Dim idCurrentJobs As IDictionary(Of String, Int32) = New Dictionary(Of String, Int32) 'The string in the dictionary represents a jobname and the integer is a counter for how many jobs im currently are running in the application' idCurrentJobs.Add("JobName1...
stackexchange/codereview
Hey, i think this is an easy question. I have a URL and i want to set one of the directories in a variable. URL: http://www.domainname.com/Irving/For-Sale/Used/Dodge/Ram-1500/2009--Black-Truck/4691335/ var usedInventory = _____ I need a variable that equals "Used" Let me know if you have any questions! Thanks!
stackexchange/codereview
I am trying to grab all the <entry> tags from this site. It will load just fine into an XDocument but I cannot seem to grab any of the <entry> elements. Here is the code I have: XDocument netflixPage = new XDocument(); netflixPage = XDocument.Load("http://odata.netflix.com/Catalog/Titles"); foreach (XElement xe in net...
stackexchange/codereview
I currently have some modest HTML/CSS Know-How and want to improve from there. I found out for myself that the best way is to get the HTML/CSS from an existing Website and to rebuild it from scratch and do some old fashioned learning by doing: why is this element needed, what happens if I remove it in firebug, etc... B...
stackexchange/codereview
I need an image compression program that works in Linux that is capable of compressing all the major image formats. I need it for my tomcat webserver so if it was a Java implementation, that would be great (I know, not likely). I have looked around and only came across GraphicsMagick/ImageMagick (which are excellent) b...
stackexchange/codereview
Like this one. I thought it was a frame but apparently is not.
stackexchange/codereview
This is the only tar on the site.. no help online.. Is there some parameter I missed? where do I get this lib?
stackexchange/codereview
At the moment I'm trying to build a restful HTTP backend framework. I've read a book called "Restful webservices" and it kicked off some brainwork on this area. I have now a bigger picture about why resource oriented architecture is a good thing but there are still blurry parts I cannot understand. I'll try to explain ...
stackexchange/codereview
I've implemented a custom sort for a aspxgridview, following the steps mentioned here: http://documentation.devexpress.com/#AspNet/CustomDocument3818 However, I've noticed that it only sorts the current active page, so whenever I go to another page I have to click again on the column to sort it. Is this behavior correc...
stackexchange/codereview
I've got a map containing some keys (Strings) and values (POJOs) I want to iterate through this map and alter some of the data in the POJO. The current code I've inherited removes the given entry, and adds it back in after making some changes to the POJO. This doesn't work well, since you shouldn't be modifying a map w...
stackexchange/codereview
How can I map Oracle column types TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE to a Java data type using Hibernate 3.3.2GA? Can I map each of these to a Date or Calendar data type?
stackexchange/codereview
I have a label lblCountCharacter with text "4000" and a textbox txtAddNote where users can enter text. On entering one character in txtAddNote, the label text is decreased by one. Please help me write a function for this in asp.net using C#.
stackexchange/codereview
I have a button in a form which constructs a base google search url and then launches a browser window. I store a reference to the created window. What I want to be able to do is then get the href back from that window. Firebug tells me I am not allowed. e.g <input onFocus='javascript:document.getElementById("url").val...
stackexchange/codereview
I have been asking in previous questions about how to get multiple string inputs to control the flow of the program, using if else statements. and everything worked out fine. the code for the YES and NO is fantastic and i'm very happy, except I built a test rig in the form of a function that is called again and again i...
stackexchange/codereview
1 Create a project use flex sdk 3.4 2 Create a new mxml app Testadd.mxml 3 Add a source jpg Any.jpg content of Testadd.mxml just two line. [Embed(source="Any.jpg")] public var NotUsedSource:Class; I think this just defined a class which represent some data. And I never use it or initialize any instance of it in th...
stackexchange/codereview
Actually i am using the Microsoft OLE DB Provider for SQL Server with ADO, my question is about the Packet Size parameter which is used in the connection string, the MSDN documentation says Packet Size Indicates a network packet size in bytes. The packet size property value must be between 512 and 32767. The d...
stackexchange/codereview
In C++, how to deal with NULL values in a context where we might expect a string or an integer? Typically, the context would be when retrieving data from a database, e.g. with a LEFT JOIN where some non-existing values in some column would be represented by a NuLL value instead of the expected string or integer. Strong...
stackexchange/codereview
I am brand new to AS3 and I am trying to move all of the data from an html file, into a swf. The old html file contained this coding: <EMBED src="https://www.pandora.com:443/radio/tuner_9_2_0_0_pandora.swf" WIDTH="640" HEIGHT="528" FlashVars="_tunervar_shost=www.pandora.com"> So far from what I have learned I can use ...
stackexchange/codereview
I am trying to sort a number of integers using 4 threads, splitting the array and then recombining. I think I have accomplished using 2 threads, can anyone help from here how i'd move up to using 4? import java.util.Random; import java.util.Arrays; public class threadSort implements Runnable { private static final int...
stackexchange/codereview
I'm creating an Intranet site in ASP.NET MVC 3 Beta and would like to use Windows Authentication exclusively. In addition, I'd like to use the Visual Studio Development Server in VS2010. I modified the default web.config file to remove all references to forms authentication and switched to this: <authentication mode="W...
stackexchange/codereview
I posted a question about how to get user input such as YES or NO to control the flow of a program using if else statements, I got a answer and now i'm a step closer to making this work, however another problem has arisen, i really need to allow for multiple inputs, for example this is what im trying: if (input == ("YE...
stackexchange/codereview
How do you go about designing/structuring a completely ajaxed MVCish style site? I guess what confuses me the most is that there would only be one view that adapts and changes to the user actions... I'm looking to build a really simple app, both front end and back end in this style.
stackexchange/codereview
I have been writing a file uploader, and I want to validate the types and size, and I currently have this: <?php //SETTING UP LOCAL VARIABLES $username = trim($_POST['username']); $password = trim($_POST['password']); $name = trim($_POST['name']); $email = trim($_POST['email']); $message = trim($_POST['message'])...
stackexchange/codereview
It seems to me that when creating a module you are using Drupal's hooks like an interface, typically the interface that you implement forces the same method names but could it be said that the naming conventions that Drupal institutes conform to this design pattern?
stackexchange/codereview
I downloaded the latest sample code from the Apple developer site and even though I've set the Project settings, I can't build the project. I have the XCode version 3.2.4 with iOS 4.1 and I get the error: There is no SDK with the name or path 'iphoneos4.0' I've changed the value of "Base SDK" to "iOS Device 4.1" fo...
stackexchange/codereview