instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I wrote a very simple test case and found that Grails does only a shallow validation when i call validate on a domain object. Is it possible for me to do a deep validation in grails? Can anybody help me? class Person { Address address } class Address { String city } When i do new Address().validate() it returns f...
stackexchange/codereview
i am using DIR to open a file: If Dir("some dir" + "some file", vbNormal) <> "" The End If if the DIR does not exist then i get an exception BAD filename or number; However if the dir exists then this IF statement works fine. question how do exception handle in a case where the DIR does not exist?
stackexchange/codereview
I developed on localhost a system using mootools and Json I moved it to the production server and it doesn't work I've developed a really simple model and it produces null too: <script type="text/javascript" src="bookingSystem/mootools/mootoolsCore.js"> </script> <script type="text/j...
stackexchange/codereview
I'd like to know if it is possible to automatically import all subclasses of a class in python without writing import subclassxy for every subclass.
stackexchange/codereview
I have a JSP that uses jQuery and CRIR to display a form with radio buttons. I'm using CRIR to style the radio buttons to give them a custom look. CRIR appears to set itself up on load with something like this: crir.addEvent(window, 'load', crir.init, false); I want to perform some initialization on page load but afte...
stackexchange/codereview
I'm working on a ServerControl (SuperFish Menu). Below is my codes. Menu.cs [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] [ParseChildren(true, "MenuItems")] [Persist...
stackexchange/codereview
I am having a problem with mod_rewrite. I want to do this: i have urls in the form of mydomain.com/index.php/tag/123/some-name/ i want to change this url to mydomain.com/some-name/ i have written below code in my .htacess file and this does not work :-( first rewrite RewriteCond %{THE_REQUEST} ^/index.php/tag/(.)/$ [NC...
stackexchange/codereview
Where can I find one ready for use? Or for that matter, a good collection of "standard" data structures, if you know of any?
stackexchange/codereview
I have made a contentscript which "injects" the following into a website: < a href="somewebsite.html">mytext< /a> The trouble I'm facing is that I want to link it to a function in my chrome extension instead. Something like: < a href="mychromeextensionfunction">mytext< /a>. How would I manage to do that, Is it even ...
stackexchange/codereview
I made a web project in Java, using Java-WS. How can I invoke service methods through HTTP only. I don't want to generate (or worse write) any java web clients, and similar stuff. I'd just like to invoke the method with a HTTP request. And parse the result (manually) from response. In .NET web services I invoke methods...
stackexchange/codereview
I am getting permission denied errors when trying to create a com object in asp. The com object is a VB6 dll that has been registered. Procmon does not show any permission errors. I have granted permissions to the folder that contains the dll to the AppPool user and well as the authenticating user (IUSR). I noticed tha...
stackexchange/codereview
Hi Thank you for the responses I'm new to this I am trying to find out, where is the physical path of the SVN repository is on my Window Server so that I am able to back the files up. Does someone know where they could be stored and the best way of backing them up. Thank you
stackexchange/codereview
I'm now still in development my own CMS. can somebody inform me the list of function in PHP to check the performance of my script, example: check how much resource needed to run my script check MySQL query time check script execution time and etc. or maybe even if possible the javascript to check my JS script perform...
stackexchange/codereview
I am currently working on my fourth year project (computer science) which involves the automatic transcription of music -> sheet music. I am doing it in Matlab at the moment but will have to be converted to java at some stage. My problem: I have my program returning the correct notes for pure sine tones, I ha...
stackexchange/codereview
I'm trying to remove the index.php from the url in a codeigniter project thats hosted inside a subdomain 'test' I've tried the following .htaccess, but I'm getting an internal server error. RewriteEngine On RewriteBase /test RewriteRule ^(.*)$ /index.php/$1 [L] can anyone see the problem, thanks
stackexchange/codereview
i'm trying to define an scheme rule in XSD, for which a string is 8 characters long: <PostedDate>42183296</PostedDate> and space-filling is also allowed: <PostedDate> </PostedDate> which led me to the XSD: <xs:simpleType name="DateFormat"> <xs:restriction base="xs:string"> <xs:length value="8" /> ...
stackexchange/codereview
In order to understand how JFace databindings is working, I have a model object with two properties. Changing one property should set the other to the same value: public class Model { private double x; private double y; private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this); public voi...
stackexchange/codereview
I've written a rake task to run a few other rake tasks via system (so as to bind ActiveRecord to different databases, among other things). It works fine on my OS X box, but fails on our production Linux boxes with a load error. The tasks trivially boil down to: namespace :jobs do task :foo => :environment do sys...
stackexchange/codereview
I stumbled on a strange problem. In my WPF (.NET 4) window I have a simple combobox (DisplayMemberPath="Name" SelectedValuePath="Id"). When I load the window I set the combobox's ItemSource property to context.Currencies.ToList() using LINQ to SQL. The Currency table in SQL is simply [Id] [uniqueidentifier] NOT NULL PR...
stackexchange/codereview
i am currently building a website using HTML and and external CSS Stylesheet. I have a "container" which holds the content of my page, central to the body. What i want is that when a user adjusts the text size using there browser that the "container" automatically resizes with the text so that it stays in proportion. A...
stackexchange/codereview
As stated in the Lucene documentation there is a parameter that enables for specifying similarity required for a match. The value of is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example: roam~0.8 Know I wonder whether this parameter is meant in a relative sence,...
stackexchange/codereview
I'm using NUnit and Rhino Mocks. I use the AAA-syntax and I do the Arrange and Act in the setup method, and every Test method is an Assert. [TestFixture] public class When_subSystem_throws_exception { SomeClass subject; // System under test [SetUp] public void Setup() { // Arrange IDepe...
stackexchange/codereview
I have a CoreData based application which supports shake-to-undo. This is currently working fine, however when I shake the device, the undo happens immediately, without first showing the usual undo prompt which NSUndoManager normally provides for free. I've read "Using Undo on iPhone" from the "Undo Architecture" docu...
stackexchange/codereview
I'm looking to develop a greenfield web application which will reuse a lot of Java components. To me, the obvious options for this are Grails or jRuby on Rails, but I'm having trouble finding objective comparisons of the two. Are there any clear reasons to pick one over the other with respect to: ease of integration...
stackexchange/codereview
20101109-240000 or 20101109-235959 How to convert the date format above into MySQL format, Y-m-d H:i:s Thank You
stackexchange/codereview
I'm trying to get familiar with Android and its database API. I've created a class that inherits from SQLiteOpenHelper and this is how I create the table in the database @Override public void onCreate(SQLiteDatabase db) { try { db.execSQL("CREATE TABLE " + FUELS_TABLE_NAME + " (" + "_ID INT...
stackexchange/codereview
I have a xsd (lets name it as afb) which imports another xsd (lets name it as kts). And I refer to an element of kts.xsd in afb.xsd along with correct namespaces. But when I generate the classes using JAXB, the namespace for refered element is wrong. I mean, the referred element should have kts namespace where as it is...
stackexchange/codereview
I have a model Child inheriting from a model Parent. In the Parent admin I've got Parent and Child instances, while I would like to have only Parent instances (Child instances are managed in Child admin). How can I do that? thanks jul
stackexchange/codereview
I have a simple TCP client which is connected to twisted using: reactor.connectTCP(host, port, SomeClientFactory()) The program is able to receive a HUP signal to trigger a reload. I'd like to basically: Remove the old clients Reload config Create new clients based upon new config However, I can't seem to find a way...
stackexchange/codereview
I want to know what's the most optimized way to work with mysql. I have a quite large database for orders. i have another table for previous orders, whenever the order is completed, it's erased from orders and is moved to previous orders. should i keep using this mothod or put them all in the same table and add a colum...
stackexchange/codereview
I want to check if a query variable exists or not. Then I would do something based on that query value. If it exists and is true, do something. If it doesn't exist or is false, do something else such as show a 404 page. e.g If the url was domain.com?konami=true if (condition) { //something } else { //show404 } ...
stackexchange/codereview
Here i know the source folder path.But i want to search a particular folder like "MANAGERS" in the list of directories for files.Could we do this type of operation in C# Windows Application?Please help me regarding this.
stackexchange/codereview
next_permutation is a C++ function which gives the lexicographically next permutation of a string. Details about its implementation can be obtained from this really awesome post. http://wordaligned.org/articles/next-permutation Is anyone aware of a similar implementation in Python? Is there a direct python equivalent ...
stackexchange/codereview
I try to draw something on canvas every 1 second .Then, I create a thread to call a method to draw after sleep 1 second. The problem is calling Canvas object to draw. The program tell me error message The calling thread cannot access this object because a different thread owns it. Code private void drawTimeTick() { ...
stackexchange/codereview
Instead of specifying the width and height of a Raphael canvas, I need it to be 100% the size of its container. So I could just do a Raphael("container", containerElement.width, containerElement.height) and set the onresize function to reset those values. But then the content gets very jumpy and hectic as I resize th...
stackexchange/codereview
I am facing a problem where I need fresh minds opinion: I have an asp.Net page with a grid that has Selection column. The grid is populated fine and the data is visible. But when the Select link is clicked on any row in the grid, instead of having a post pock and calling the event handler: void dgvMyGrid_SelectedIndex...
stackexchange/codereview
In this code, when button1 is clicked twice, it creates 2 separate threads. On one click, it creates a new thread on the heap and field t1 points to the new thread on the heap. When I click button2, it aborts the last thread (which t1 refers to). How do I abort the other thread? Thread t1; ThreadStart ts1; private...
stackexchange/codereview
I am binding custom class to Datagridview and want to show Editable combobox for one of the Enum property. Public Class Contact Public Enum GenderTypes Male Female End Enum Private _Firstname As String Private _Lastname As String Private _Gender As GenderTypes Public Property ...
stackexchange/codereview
I have a series of dates associated with a unique identifier in a table. For example: 1 | 1999-04-01 | 0000-00-00 | 0000-00-00 | 0000-00-00 | 2008-12-01 | 2 | 1999-04-06 | 2000-04-01 | 0000-00-00 | 0000-00-00 | 2010-04-03 | 3 | 1999-01-09 | 0000-00-00 | 0000-00-00 | 0000-00-00 | 2007-09-03 | 4 | 1999-01-01 | 0...
stackexchange/codereview
When I try to execute my application based on jersey, guice, and jpa on jetty (7.2.0 or 8.0.0.M1) I get the following error, even if I don't use JNDI. java.lang.ClassCastException: org.eclipse.jetty.jndi.NamingContext cannot be cast to javax.sql.DataSource Caused by: javax.persistence.PersistenceException: java.l...
stackexchange/codereview
I've been trawling the internet looking for an answer for several hours, but I can't seem to find anyone who has been able to solve this. I've got a listview which uses a custom adapter. A row looks like this The list is filled by an array. Everything works great. Now, I want the ImageView and the ToggleButton to rea...
stackexchange/codereview
I have the below table ID First Name Last Name 1 Ruby Rails 2 Loop Western The columns have a space in them and so when I write a query like $sql = "SELECT * FROM Persons where [Last Name] = 'Western' "; it throws the error Error, could not list tables MySQL Error: You have an error in ...
stackexchange/codereview
I've setup my website with Rails 3 and Passenger (via nginx) and, although its only being used by one person, the web server has to essentially wake up the rails instance to render the page. This happens only when the website is not accessed for a while (hence its sleeping), but I'm a little paranoid that could it stil...
stackexchange/codereview
How can I get the current location from user in iOS?
stackexchange/codereview
I want to pass this string 'index1','index2','index3' to a batch test2.cmd 1 'index1','index2','index3' 3 and if test2.cmd is echo %1 echo %2 echo %3 I'd like to see echo 1 echo 'index1','index2','index3' echo 3 But it does not work... cause I see echo 1 echo'index1' echo 'index2' How can I fix this please?
stackexchange/codereview
Although running "python" from the shell runs Python v2.7, Django is loading files for python2.4, as shown in the error when I load a django site: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287, ...
stackexchange/codereview
I'm trying to set up a MSBuild with NUnit as unit test driver but the script keeps hanging after NUnit is done. It doesn't seem to finalize its work and let MSBuild get on with its job. I'm working in .NET 4.0 and using NUnit 2.5.8. If I run the test manually or using the gui (either VS2010 or NUnit) it works fine but ...
stackexchange/codereview
I'm trying to deploy J2EE application to Weblogic. It consists of web-module and ejb-module. My web-module uses JSF 1.2 and JSTL 1.2. I've deployed both libraries to Weblogic and then point my WebModule to use these libraries in weblogic.xml <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app" ...
stackexchange/codereview
I am creating a dashboard in WPF with a bunch of key performance indicators, each of which consists of three values. Whenever the values change I would like the user control to blink for 5 seconds. I would like to make the background color of the control to switch the foreground color of the textblock, and the textbl...
stackexchange/codereview
I have to program a simple polymorphic engine. I use linux (32-bit) and i can code in assembly and c. I don't know how to start. Can you give me a schema for constructing such an engine? My idea is to make a program that: read the code section of a file encrypts it in a buffer, make space at the beginning (is it...
stackexchange/codereview
I'm trying to use new-style properties declaration: class C(object): def __init__(self): self._x = 0 @property def x(self): print 'getting' return self._x @x.setter def set_x(self, value): print 'setting' self._x = value if __name__ == '__main__': c = C...
stackexchange/codereview
Is it possible to set a different windows user with Java? I have following issue: My application executes written program as admin. However, at one point I need to switch windows user in order to execute program from the command line (this program can only be accessed by this user - I cannot start it as admin due to it...
stackexchange/codereview
I am extending the selenium RC by using user-extension.js. It is able to call the new method function, but throwing following error message. *ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Object doesn't support t...
stackexchange/codereview
I wrote an application working with contacts and store some data in db using contactId as key. Being far from computer (terrible english?) I noticed that data tied on a contact is gone. Can it possible that contactId for contact is changed by Android (or any application?). Thanks
stackexchange/codereview
i'm completely new to webservices (and especially with SOAP / WSDL) Right now, i have a .WSDL in the root of my server which i have fully automatically generated. How to test that my webservice is functionning (echoing the right results) without bugs ? *How to interact with that .wsdl file ?* Regards.
stackexchange/codereview
I'm looking to use UISwipeGestureRecognizer for implementing a tweetie like interface for my application. (Replacing the view of a tableview cell with a custom view on detecting a swipe) However, this API was added only in version 3.2+ of iOS. I need to support all the devices running OS versions 3.0+, so I'm not sure ...
stackexchange/codereview
When I run my Selenium tests from Selenium-IDE everything works fine, but when I export this test to Java and run it as a JUnit test from Eclipse, I get a timeout when trying to retrieve jQuery from googleapis. I believe this is because selenium-server overrides my proxy settings when I run it this way. I have seen som...
stackexchange/codereview
There are many different viewing devices nowadays. Monitors, netbooks, slates, mobile phones, TVs, etc. and even within each of those categories they vary in size, resolution, aspect ratio, etc. So my question is: Are there any libraries for web developers with intelligent restructuring of viewable elements on the page...
stackexchange/codereview
I am trying to parse java bytecodes into an intermediate data structure for later use. I stumbled into ASM. It is powerful and stable. However, I am difficult time translating the binary instructions back to normal java expression and statements. Could anybody point out a direction for me? The deal data structure may l...
stackexchange/codereview
lets say I have a table call payment that have a field call thing_id that will be the foreign key of buy and storage depend on the thing_type field in payment table. How do I implement this relationship? In migration file , how do I define the foreign key? In model file , I should use :through ?
stackexchange/codereview
I'm working on a website where I want to make a nice menu, that fades in link by link. Se code below: First fade in #navigation a.toplevel, then the first #navigation dt, and then the next, and the next until there ain't no more. How do you make a sequence of fadein? <div id="navigation"> <a href="#" class="top...
stackexchange/codereview
I am attempting to add validation to my application. I have some rules I need to check before allowing the information to be written to the database. I have the basic data validation added to the model, but I also need to make sure that if one field has a certain value, this other field is required. At one time the Ner...
stackexchange/codereview
I am trying to download an xml file from a website with c#, but I get an 404 on some urls. this is wired because they still work in the browser. Other urls still work without a problem. HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); request.Method = "GET"; request.Timeout ...
stackexchange/codereview
i have this picking function but it doesn't seems to work. the function should return true if it collide with an object but it return 0; and it never change. here is my picking function BOOL D3dDevice::Picking(HWND hWnd, LPDIRECT3DDEVICE9 d3ddev, CXFileEntity *entity) { D3DXVECTOR3 v; D3DXMATRIX matProj; POINT pt; ...
stackexchange/codereview
I am building a webpage for which I need a multi-file upload implementation that can hash a file before uploading it to the server. The idea is that users can upload files that may or may not exist on the server already. To save bandwidth I want to hash the file before uploading it to the server, send the hash via POST...
stackexchange/codereview
I have a web application on CherryPy. I'm trying to configure a css file to use over all application but I can't. This is my conf file: [global] server.socket_host = "127.0.0.1" server.socket_port = 8090 server.thread_pool = 10 server.logToScreen = 0 [/main.css] tools.staticfile.on = True tools.staticfile.filename = "...
stackexchange/codereview
I need to execute a PHP script at a LAMP shutdown/reboot. The script will update the state of local server on Mysql databases running on remote servers. <?php print "Updating Hosts..."; mysql_connect('localhost','ivo','andream'); mysql_select_db('ecom'); $query = "SELECT * FROM companies"; $result=mysql_query($query);...
stackexchange/codereview
I have a query of this form: SELECT e.date, SUM(e.size) as bytes FROM entries AS e GROUP BY e.date ORDER BY bytes DESC and I have a column named client, which is composed of static values (0,1,2,3), so I want to get this: SELECT e.date, SUM(e.size) as bytes FROM entries AS e WHERE e.client = 0 GROUP BY e.date ORDER B...
stackexchange/codereview
I'm using jqgrid and i need to update a graph (jquery flot) based on the content of the grid. My question is, is there an event that i can catch each time a search is preformed?? I've been reading the documentation on jqgrid but so far i just can update the graph when the grid is created not when a search is done. Any ...
stackexchange/codereview
is there any way to get js variable in php, i try something funny like this: <script> var x = "random text"; alert("aaa<?php echo md5(;?>"+x+"<?php); ?>"); </script> Of course it gives me error. Parse error: parse error, expecting `')'' in X:XXX\index.php on line XXX If there is a way without refreshing the page or ...
stackexchange/codereview
I am currently developing for Android (my first app) an application which lets users see the subway map and be able to pinch zoom and drag around. I am currently modifying the code found in Hello Android, 3rd Edition and got the pinch zooming and dragging to work. I'm using Matrix as my layout scale. However I now have...
stackexchange/codereview
In a KeyDown event I have: if (e.Key == Key.Delete) { if (HtmlPage.Window.Confirm("r u sure?")) { //Do stuff.... } } And I am getting this error " Attempted to read or write protected memory. This is often an indication that other memory is corrupt." @Confirm? EDIT: workaround shown below and the l...
stackexchange/codereview
I have a control. It's a text box. I want to draw an image at the left of the control. The image should be painted outside the control. I could paint it one but inside. Here is the code: private static Image requiredIcon = Resources.Icon_required; protected override void OnPaint(PaintEventArgs e) { base.OnP...
stackexchange/codereview
I have been using drawImage to cause some video to explode as taught in this tutorial: http://www.craftymind.com/factory/html5video/CanvasVideo.html I would like to also be able to manipulate other objects using drawImage. The thing is when I try this on anything other than an image/video (an Iframe for example), I get...
stackexchange/codereview
Is there an easy way to develop services in .Net when I'm not running as administrator? There are a couple problems I encountered. First of all when debugging, you can't just press F5 from visual studio, as it says services must first be installed and then run from the services administrator tool. The problem is that ...
stackexchange/codereview
Hey guys. How do I know the methods that a child class overrided in my super class? I have this: class Test def self.inherited(child) # child.overrided_methods??? end def self.foo end def self.bar end end def Child < Test def self.bar puts "bar" end end The method self.inherited is called ...
stackexchange/codereview
Assume these 4 values: double lat1 = ToRadians(53.14722222222222); double lon1 = ToRadians(-1.8494444444444447); double lat2 = ToRadians(52.20444444444445); double lon2 = ToRadians(-0.14055555555555554); I calculate in Google map get direction, I got about 181 km, but in this website (h...
stackexchange/codereview
I have a NavigationController in MainWindow.xib. It loads a RootViewController that basically manages a TableView (in the .xib there is a view which contains the table view and a search bar). Now I'd like to add a segmented control to switch between the table view and a map view. My idea is to manage the map view with ...
stackexchange/codereview
I am using Jquery templates to display incoming JSON data I would like to load the template in a cacheable external file. How do I do this? UPDATE http://encosia.com/2010/12/02/jquery-templates-composite-rendering-and-remote-loading/ very close to the solution I ended up with, I just used a iframe instead;
stackexchange/codereview
I'm getting troubles getting the applications associated with a remote file how has a URL like: "http://servername/folder/file.png". The code I use is: ... NSURL *url = [NSURL fileURLWithPath:@"http://servername/folder/file.png"]; NSArray *apps = (NSArray *)LSCopyApplicationURLsForURL((CFURLRef) url,kLSRolesAll); ... ...
stackexchange/codereview
I have a sharepoint siteActions on the left hand side and My links tab on the right hand side. One is in td tag and other one is on div tag. I cannot understand the code. Could any one showm me how to update the same. The following is the code in my master Page. <SharePoint:SiteActions runat="server" AccessKey="<%$Reso...
stackexchange/codereview
Can someone give me some examples of what type of values are valid for the aria-label attribute.
stackexchange/codereview
I have seen a lot of related questions but none really helped. I'm trying to create a zip archive from a folder (on the iPhone). The structure of the folder is the following: In this example the zip would be "folderToBeZipped.zip" What is the easiest way to accomplish this and how do I unzip it (also iPhone) later on?...
stackexchange/codereview
This is mostly out of curiosity. I was wandering if anyone has encountered any good usage for Object.finalize() except for debugging/logging/profiling purposes ? If you haven't encountered any what would you say a good usage would be ?
stackexchange/codereview
i want to open a file, write some data on it so i have to use (Fopen) " i can't use open because i need fopen in some other things " now if i want to write on the file using fwrite it just don't i don't know why this is what i referred to in my code #option1, but if i get the file descriptor and use normal write metho...
stackexchange/codereview
I am writing a small integration piece to to retrive the testcases from TestCase Management tool in java, in which i have the following scenarios:- 1) I have testcase which is “failed”, that time I am checking whether there is any defect which is already exists in the Defect management tool for the failed testcase usin...
stackexchange/codereview
I'm thinking that Silverlight 4.0 would be a good choice to build our business application. However, the one part I'm afraid of is the loading. If I understand it correctly, Silverlight compiles ALL the pages into one binary, which is loaded on the client at load time. It's fine now with just a few pages, but if I re...
stackexchange/codereview
Is there a way I can set a minimum zooM level for my MapView?. The map looks really ugly when zoom level is set to one because the whole world map replicated. I would like to block that zoom level. Ideally, it would work whether the user is zooming through gestures or zoom controls.
stackexchange/codereview
Can anyone help me to solve the following case? I am trying to generate my first web site using java and working with Eclipse Galileo running on Ubuntu 9.10. Since I generate my first lines of code I haven't seen the web. All the time when I try to run the program I get the following error: Several ports (8080, 8080) ...
stackexchange/codereview
I am doing a practice to understand read and write zip files in java. I'd read about reading a file and making it to zip file, and i have also tried. I'd read about reading a zip file using java. How can i combine this read and write operations together. Like, i want to read a zipped file in HDD and i want to save it i...
stackexchange/codereview
I'm currently writing a application that would benefit extremely from caching, I'd like to use the NSCache class which delivers exactly what I want (in-memory caching with cost, key-value pairs, and automatic cleaning). However, NSCache is only available for iOS 4.0 and greater but I want to target iOS 3.0 too, so I ca...
stackexchange/codereview
I have a really trivial perl script that I would like to distribute to a number of clients who are not very computer savvy. They are all running Windows XP or above. Furthermore, it is safe to assume that they do not have Perl installed on their systems. I'm looking for a Perl module or other solution that would allow ...
stackexchange/codereview
This is a follow up to this question. The answer suggested there is to copy the Process out, err, and input streams to the System versions with IOUtils.copy as follows (after fixing various compilation errors): import org.apache.commons.io.IOUtils; import java.io.IOException; public class Test { public static v...
stackexchange/codereview
Hi I get this error when i hit the submit button on a user login form because there is a repeater on the same page with is repeating html which is being posted back with the form content. apart from applying ValidateRequest="false" to the login usercontrol is there anything i can add around the repeater to stop this?
stackexchange/codereview
Hey guys, I have this great scripts someone on stack overflow helped me out with, except the one major function I need is missing. This is a game where the user picks a number (by entering that number in a text field) then hits a play button. After they hit the play button a series of numbers will appear, they then hav...
stackexchange/codereview
I'm writing a clone of inetd in which I must run a server that prints the IP and port of the client connecting to it. As I overwrite STDIN and STDOUT with the socket descriptor, my initial solution to do this was to recover the sockaddr_in structure, which contains the needed information. Doing this with getsockname()...
stackexchange/codereview
Update: Turns out I was being very stupid. I was checking the modification time when I should be checking the access time. The reason it was not reproducible was that the test files were made with dd if=/dev/urandom of="$target" bs='1K' count=1 || exit 1, which most of the time was too fast for the modification time (e...
stackexchange/codereview
I've built a full ajax site using jQuery and asp.net. All database data are loaded dynamically via client-side ajax calls. There are no html forms or postbacks, just ajax calls to a web service returning (xml) data. Now, I need to make the site SEO friendly with emphasis to google. What is the least time expensive way ...
stackexchange/codereview
I have some trouble with pointers. I have a function that should return the node in a linked list, the function should return the pointer to a variable. I'm confused and cannot see what I do wrong! data.h - header file int add(int num); struct message *findMessage(int num); typedef struct list_el message; data.c - Li...
stackexchange/codereview
I'm trying to debug Tomcat while running as Windows Service (on Windows 7 64 bit). The Tomcat instance starts just fine, but it seems to ignore any Java options (entered through the "Java" tab on the Tomcat manager window). I know it ignores them because this line doesn't cause it to wait for a debugger, and the approp...
stackexchange/codereview