instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to write a company's details parser that can split text like the following into it's constituent parts: THALES LAND AND JOINT SYSTEMS Total Signature Management Wookey Hole Road Wells Somerset BA5 1AA Tel: +44(0)1749 682384 Fax: +44 (0)1749 682235 The problem I am having is, how I can tell that "Total Sig...
stackexchange/codereview
What's the best way to (relative) grade a class (of 50 students) on a test (with 7 questions)? They did not want the traditional percentile-intervals answer, but a more CS-ey one. It's a pretty open ended question, they asked to assume the following framework: Input [m_1,...,m_50], where each m_i is a 7-vector for m...
stackexchange/codereview
TL;DR: How can I consolidate logic shared by two custom ModelBinder implementations into a single base class, when both implementations rely on Autofac to inject a (common) dependency into them? While reviewing some code in an ASP.NET MVC project I'm working on, I realized that I have two custom model binders that ess...
stackexchange/codereview
I have download a xSocket.jar which will be use as a classpath and compile myprogram.jar, both are in Java folder. Is adding a classpath in Manifest able to find xSocket.jar without the need to define a -cp in commandline? In my commandline D:\> location, I tried running java -jar java\myprogram.jar -n 0 Exception in t...
stackexchange/codereview
I have a Bada application. How can it be launched by Widget ? The application cannot be listed out via bondi.applauncher.getInstalledApplications How can it be registered so that Widget can launch it ?
stackexchange/codereview
I am using maven war plugin to exclude some common jar and put them in the classpath. I am able to generate war file properly which excludes specified libs and add them in the classpath but exploded war directory still contains excluded libararies. How can I generate exploded war file which use configuration of maven w...
stackexchange/codereview
I am using Excel 2007, VS2008 Pro. I am building a VSTO Add-in that requires "drag and drop from Excel cells to a drag-enabled task pane". So far I notice that I can only drag and drop within the cells themselves. It does not allow me to drop into the task Pane or drag past the sheet limits. (http://www.computerimages...
stackexchange/codereview
When connected to a postgresql database using psycopg and I pull the network cable I get no errors. How can I detect this in code to notify the user?
stackexchange/codereview
n00b here Is there some kind of control panel for Sphinx (to make things easier)? Or is there a way I can use Plesk to handle it? I already installed (sphinx-0.9.9) on my CentOS, I just don't know what to do next to index and search on MySql (with php) Also, can someone explain about using the daemon, api, etc......
stackexchange/codereview
I'm wondering which is semantically and technically most optimal of my choices here. I've created a simple object registry class, but the method of object access has me wondering what's best. I'm currently using the first variation: //the Registry methods can chain, each returning a self reference $registry = Registry:...
stackexchange/codereview
I have a subdomain which is added as a serverAlias to the main domain. I am using this subdomain only for static content such as images and js, so I dont want the subdomain to follow rewrite rules and load index.php if a file is not found, I want it to show generic 404 page which is default from the server
stackexchange/codereview
I have folder called Email which contains 20 aspx pages I am trying to apply master page to this email folder through web.config i Got following error The relative virtual path 'MasterPage.Master' is not allowed here. code in web.config Please help in this issue
stackexchange/codereview
I am trying to read text from a textarea in IE8 using some JavaScript, using the prototype library selector - "$F(text-area-id)" The text I get out of this does not preserve the new lines present in the textarea. Is there any CSS properties I need to set for achieving this? Thanks!
stackexchange/codereview
When I try to run 'rails server' it's giving me an error saying that it can't find 'jcode', and I think jcode is a default ruby lib. Do you guys have any clue as to whats going on? /Users/seanfchan/.rvm/gems/ruby-1.9.2-p0@global/gems/gdata-1.1.1/lib/gdata.rb:21:in `require': no such file to load -- jcode (LoadError) f...
stackexchange/codereview
Is there a generic way to determine if there is dialog currently shown ? Sure, i can keep track of all createDialog and dismissDialog invocations, but that's cumbersome. thanks
stackexchange/codereview
I don't see the different between C#'s (and VB's) new async features, and .NET 4.0's Task Parallel Library. Take, for example, Eric Lippert's code from here: async void ArchiveDocuments(List<Url> urls) { Task archive = null; for(int i = 0; i < urls.Count; ++i) { var document = await FetchAsync(urls[i]);...
stackexchange/codereview
I'm going to be implementing Ektron CMS for a client and they may require conversion of units from imperial to metric for different values. The best thing would be an Ektron module, then would be something in C# I could use, finally a webservice I could access. Anyone have suggestions or best practices regarding any of...
stackexchange/codereview
I have a maven module with 2 profile profile-a and profile-b profile-a can be used independent but profile-b should be run with profile-a mvn install -P profile-a // valid mvn install -P profile-a,profile-b // valid mvn install -P profile-b // INVALID is there anyway to ma...
stackexchange/codereview
I am trying to define merge in recursive way using mapReduce. mapReduce is defined as mapReduce mapFn wayAheadFn turnAroundCond turnAroundFn reduceFn xin | (turnAroundCond xin) = turnAroundFn xin | otherwise = reduceFn (mapFn xin) (mapReduce mapFn wayAheadFn turnAroundCond turnAroundFn r...
stackexchange/codereview
Related question: why does Git send whole repository each time push origin master The short version: When working with two Git repositories, even if 99% of the commit objects are identical, using git push to send a commit to repository B when origin is set to point to repo A causes all objects (200MB +) to be transferr...
stackexchange/codereview
I do lazy loading of the google maps api v3 javascript The documentation says about putting as a callback parameter in the url the name of the function, which will be executed, when the script has loaded. $(document).ready(function(){ var s = document.createElement("script"); s.type = "text/javascript"; s.src...
stackexchange/codereview
I get this question a lot =/ But I only know how to answer it at a very high level. From the minute a user enters a URL and hits enter, what happens on the client and server side, and how do requests/responses work? How does the server interact with CGI/interpreters? It would be helpful too if you could direct me to a...
stackexchange/codereview
If i have an ASP.NET MVC 2 Web Application with the following Views: Main.aspx Page1.aspx Page2.aspx And all Views inherit from a MasterView called Site.master, I want to be able to have a default Title/H1 for the page, which can be overriden in the deriving Views. E.g Main.aspx would have "MySite - xxx", Page1.aspx ...
stackexchange/codereview
I’m using OpenMP and need to use the fetch-and-add operation. However, OpenMP doesn’t provide an appropriate directive/call. I’d like to preserve maximum portability, hence I don’t want to rely on compiler intrinsics. Rather, I’m searching for a way to harness OpenMP’s atomic operations to implement this but I’ve hit a...
stackexchange/codereview
Edit: While this post is a duplicate of Django's ModelForm unique_together validation, the accepted answer here of removing the 'exclude' from the ModelForm is a much cleaner solution than the accepted answer in the other question. This is a follow-up to this question. If I don't explicitly check the unique_together co...
stackexchange/codereview
I have been trying to connect to simply connect a datastore (ItemFileReadStore) to a dijit.form.Select widget and have been unable to. If I use the options field to populate it then the widget works fine but when I go to use the store field to populate it the widget appears but its contents are empty. The code that I ...
stackexchange/codereview
Is it possible to add a DockWidget to my QGraphicsScene scene .? If yes how to do it.
stackexchange/codereview
I'm trying to count the number of entities in my db that were created between certain dates. I know that google removed the limitation on fetching more then 1000 results per query but every time I try to use the remote api I get only 1000 result count. Does any one knows how can I count more the 1000 entities in or...
stackexchange/codereview
I try to use the ExportAsFixedFormat in PowerPoint 2007 from a PowerShell 2.0 script. Only the first two arguments are required, but that won't work. I always get: Exception calling "ExportAsFixedFormat" with "2" argument(s): "Type mismatch. ( Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))" I've read t...
stackexchange/codereview
Right now I have a set of tools for AutoCAD that get deployed to users in our company. Currently they are being deployed via an msi that I maintain through a Visual Studio Setup Project. The files include .NET dlls for some of our custom commands and lisp functions as well as many script, lisp, .pc3, .ctb, etc. files...
stackexchange/codereview
It's been a while since I have had to write C++ code and I'm feeling kind of stupid. I've written code that is similar to, but is not exactly, the code below: class Parent { ... }; class Child : public Parent { ... }; class Factory { static Parent GetThing() { Child c; return c; } }; int main() { Par...
stackexchange/codereview
Let's assume some shared library projects called Graphics, Sound, IO, etc, and multiple applications which use these. What's best, one WC for the shared projects and one WC for each application? Or each application has a WC and a distinct WC for the libraries? I.e. the difference between: src | |---libs | | | |---g...
stackexchange/codereview
Does anybody here solved a similar problem? I have a link that contains nothing but another link. For example, given a URL lets say it is www.abc123proxy.info. And then that URL contains another URL on its page (yeah, just text) lets say the URL for this one is www.masked-url.com?token=231940812093810. I need go to the...
stackexchange/codereview
I have been working on this for a few days now and I have checked two or three books I have laying around for VB.Net 2003 and the method to do this has changed. Also, I have searched this website for other answers to the same, and found a reference to the MSDN that said something about a ConnectionString. I could not f...
stackexchange/codereview
I was trying to have two Jcomboxes, where second Jcombox should changes its values according to the change in the first one. I tried but could not succeed,Any help is appreciated. Thanks This is what I have tried so Far: public class SharedDataBetweenComboBoxSample { static private String selectedString(ItemSelect...
stackexchange/codereview
So I'm thinking about what to use for an iphone game, it will be basically be my first iphone game. I am lost between unity3d and cocos2d. But aside from that, I'm an AS3 developer and when I add items and animate units I usually use the handy .copyPixel() method and play with bitmapData, basically my question is that ...
stackexchange/codereview
I need to create a app in which I have to show list of word files(.doc,.docx). Clicking on that file it should open up. can anyone help ? Like Dropbox in android. I m new to android.
stackexchange/codereview
I just need some clarification in regards to unit testing with VS2010. Currently, we use nUnit for our unit testing requirements but have recently upgraded to VS2010 and are thinking about migrating to VS2010 for our unit testing. Our core project which we ship to customers targets .NET framework 2.0. we note that the ...
stackexchange/codereview
I want to create an index page for which I need the page number from the Word document. I am working with C++ managed code and Word interop.
stackexchange/codereview
Example of input: I 67 85 49 R 4 D 4 G 65 97 /end input.txt So I'm sure this is a elementary programming question but i've been playing with code and tried looking it up in books. But I need a way to keep reading in numbers after the I because theoretically the numbers could be endless. Now the D,G,R I can just code it...
stackexchange/codereview
I'm having some weird results from this perl code - I need to delete several elements from a list of Association objects. My approach is to scan the list once, push the matches to another array, then iterate that array and delete each one, but I haven't escaped the "don't delete while iterating pitfall". Any ideas on h...
stackexchange/codereview
Which is the best method to implement user activity log in cakePHP? I already gone through these tutorials logable behavior http://www.cakephp.co.uk/user_activity_cakephp_tutorial.html My aim is to log these activities Login Logout Update Profile Change Password placing an order review order cancel order whe...
stackexchange/codereview
I used the following code to check this--- (the request is my request) NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { nslog(@"connection is present"); } else {-------error message1------------- } and then in the delegates I relay on to...
stackexchange/codereview
This is part of cachegrind output. This part of code has been executed for 1224 times. elmg1 is an array of unsigned long of size 16 x 20. My machine L1 cache size is 32KB, 64B cache line size and 8-way set associative. for (i = 0; i < 20; i++) 78,336 2,448 2 50,184 0 0 1,224 0 0 { telm01 =...
stackexchange/codereview
I was working on a Stock Market Analysis website as a college project. I was keen on knowing some algorithms which I could potentially use for analysing trends in the stock market. I would be glad if some one could help.
stackexchange/codereview
Hey, I have noticed that when using Internet Explorer my websites background completely disappears, I am not doing anything different to what I useually do so does anyone have any ides of what could be going on? I think it may have something to do with either the use of HTML5 elements or the Blueprint CSS framework. Th...
stackexchange/codereview
I wrote an application where you can drag left and right some timeline. When i do dragging i know that this is a mouseDragged event. Since i move mouse cursor outside component it stops dragging, but i don't want that. So i want to somehow lock mouseDragged event on that component, but if i move cursor outside compone...
stackexchange/codereview
I'm trying to put a multi command git alias in my .gitconfig per: YUI Gallery Doc I'm using git from the msysgit bash shell. Neither of the commands from the doc work for me: [aliases] pu = !"git fetch origin -vn git fetch upstream -vn git merge upstream/master" gives: $ git pu Enter passphrase for key '/c/Users/m...
stackexchange/codereview
I want to create a website that allows the user to enter in their address and get back their local representatives in Ireland. So the way I see this working is that I use some google tool to define what the regions (electoral constituencies) are in Ireland and then when a user enters their address google returns which ...
stackexchange/codereview
I am using a tooltip to display information when the user mouse_hovers on treeview nodes. That side of it works perfectly as expected. However I am having difficulty with the tooltip being visible when the mouse cursor leaves the treeview control. I have tried messing around and setting the properties such as AutoPo...
stackexchange/codereview
Using Open GL ES 2.0, I want to create a large grid of squares, where each square can take a certain color as specified by a definition file. So this is not a simple checkerboard of only black and white squares... What is the best way to do this in order to avoid artifacts? Thanks in advance
stackexchange/codereview
I created some kind of text rendering tool for a 2D graphics framework in c#. Now i was trying to parse a text with specific html tags in it, like: "Hello <b>world</b>!" But the parsing code was getting ugly and I thought, there must be some lib that does exactly that. At the end it should output an array of data st...
stackexchange/codereview
I have created a table using HTML that retrieves data from my database. At the end of each row, I have manually added a submit button which is inside the while loop as the data is retireved from the database. Once the button is clicked, the session username is inserted into a table in the database. I also want it to en...
stackexchange/codereview
In my app, I am trying to figure out the location of my app user using WiFi (not GPS because my main area is inside the buildings), can any one please tell me how can I get user location using hotspot of WiFi. Any basic guide or example is good . Thanks in advance. egards
stackexchange/codereview
I get this error while compiling this .c source file /INIT_SOURCE_BUILD/src/names_list.c:7: error: storage size of ‘names’ isn’t known #include <stdio.h> #include "list.h" int main(){ struct List names; names->size = 3; struct ListElmt michael; struct ListElmt john; struct ListElmt adams; ...
stackexchange/codereview
I want to know if a ray from an arbitrary point will strike a polygon. It would be useful to know the point in space that intersection occurs and also a reference to that polygon. I'm using the System.Windows.Media.Media3D library and have done a ray trace test but have yet to crack any of teh information i want out of...
stackexchange/codereview
I sort of want to do the reverse of this. Instead of unzipping and adding the collection files to S3 I want to On user's request: generate a bunch of xml files zip the xml files with some images (pre-existing images hosted on s3) download zip Does anybody know agood way of doing this? I think I could manage this n...
stackexchange/codereview
I do not understand why MutableDateTime.setDate() is setting the time to "yesterday" (see the log timestamp hours - it is 20:28). Is this timezone related? Do I need to set something on the formatter? I would expect that after calling setDate with "10/27/2010", the date would be the same as the parsed date 00:00 EDT ...
stackexchange/codereview
I hope my description will not be too confusing! I am trying to integrate a javascript shopping cart, simplecart-js, into a Jquery LightBox, Yoxview. Yoxview has an option to add button links in the popup title pane for various options, downloading, shopping cart, etc. The relevant code for the shopping cart button is:...
stackexchange/codereview
I can't seem to figure out how to bind the color of the datapoints in my BarSeries. I see tons of posts about this using control templates and BarDataPoint. I can't seem to figure how to attach the template. <charting:Chart Name="chtIndPerformance" Canvas.Left="464" Canvas.Top="275" Height="363" Width="444" FontSize...
stackexchange/codereview
I'm trying to track down an 0x8badf00d error which is caused by the watchdog process killing our app on startup for taking too long. The problem is that it only happens on the first launch of the app (when the app is creating our database). So I need to be able to deploy the app from XCode to my IPad without having...
stackexchange/codereview
This is my server code byte[] data = new byte[1024]; IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 9050); UdpClient newsock = new UdpClient(ipep); Console.WriteLine("Waiting for a client..."); IPEndPoint send = new IPEndPoint(IPAddress.Any, 0); byte[] data1 = newsock.Receive(ref send); int test1 = BitConverter.ToI...
stackexchange/codereview
Somehow my MainWindow in my qt project has become unlinked from the .ui I created in qt designer (I am using qt creator as my IDE). The implementation file does have both: #include "mainwindow.h" #include "ui_mainwindow.h" But if I add a widget (for example, a lineEdit) into the UI in the designer, if I try to do anyt...
stackexchange/codereview
I'm looking for a good modeling tool to use for designing java applications that use the playframework. Considerations: Should be able to generate valid java code for skeleton of play app Should be able to round trip java code and update model appropriately Shouldn't be too cumbersome -- I don't want to be generatin...
stackexchange/codereview
How can I set the Row filter to a value so when the form loads it filters by that columns value in devexpress gridview.
stackexchange/codereview
I have a repeating list of this text, and the "testestewst" is unique for each item in the list: testestetet *testest = [testeeste qtestest:@"I need this text"]; [testesteste:@"I need this text"]; [stesteset atestestest]; How in the world do I do a SED replace to remove everything but the text I need?
stackexchange/codereview
This is a little form that I have that is a submit button a text box and a javascript date picker. What it does is they pick the date, click submit and it places the date selected into a query string works great. I just want to add an error message if the date is not in the correct format, the format should be 11-05-2...
stackexchange/codereview
I got UnitTest method which calls method with callback [Test] public void GetUserAsyncTest() { User result; _restTest.GetUserAsync((user) => { result = user; }); Assert.AreEqu...
stackexchange/codereview
Running the following C code (a bunch of mmaps and munmaps on a 2GB file) on a MacOS X machine seems to be dramatically slower than on a Linux one. #define BUFSZ 2000000000 static u_char buf[BUFSZ]; .... // Time 10000 mmaps and munmaps from random offsets for various // sizes of mapped chunk. for (msize = 4096; msize...
stackexchange/codereview
I have an absolute positioned div in a relative positioned div. I want the inner div to overflow on the x-axis, but not on the y-axis. <html> <head> <style> #wrapper { width: 100px; height: 100px; background-color: blue; position: relative; overflow-y: hidden; overflow-x: visible; } #wrap...
stackexchange/codereview
i have made a very simple labview VI which has an activeX component in it. I can insert an ActiveX container, and I can right-click on that container to get a microsoft toolbar 6.0. However, when I then click (left or right) in block diagram mode on that control, no menu appear, no properties, nothing. It works fine on...
stackexchange/codereview
If I have the following HTML: <tr id="record_1" > <td id="name_1"><a href="#" class="logNameAndValue">Charles Dickens</a></td><td id="value_1">A Christmas Carol</td> </tr> And another jQuery function is called to replace it with this: <tr id="record_1" > <td id="name_1"><a href="#" class="logNameAndValue">Kurt Vonnegu...
stackexchange/codereview
Does anyone have experience implementing an api with Zend framework? I see it's possible to implement index, get, post, put, delete for the api, then implement new and edit actions for the web in the same controller. But is this a good idea? I want to know if this implementation has been tested enough that people don't...
stackexchange/codereview
I delete entity FriendWith and create RelationShip. But the JPA still think FriendWith is there. When I deploy the EE application here is what I got in my server log. [#|2010-11-05T14:31:51.190-0400|INFO|glassfish3.1|javax.enterprise.system.core.classloading.com.sun.enterprise.loader|_ThreadID=17;_ThreadName=Thread-1;...
stackexchange/codereview
I am new to Spring MVC and I'm in the process of learning how to test my controllers. I have a simple test: @Test public void shouldDoStuff() { request.setRequestURI("/myCompany/123"); ModelAndView mav = controller.getSomeDatas("123", request); assertEquals(mav.getViewName(), "company"); assertTrue(mav....
stackexchange/codereview
So I've been doing some JavaScript class-like stuff such as MyClass = function() { var x; this.sayX = function() { alert(x); } } but I've also seen MyClass = function() { this.x = 0; } MyClass.prototype.sayX = function() { alert(this.x); } The big question is, am I still wasting memory space...
stackexchange/codereview
In each div, there are two buttons: higher and lower. When 'higher' is clicked, if this div is not at the top position, then it is moved higher than original. When 'lower' is clicked, then the element will be moved lower than original. The question is: How to the elements can be moved up and down of with respect to an...
stackexchange/codereview
I am trying to parse a chemical formula (in the format, for example: Al2O3 or O3 or C or C11H22O12) in C# from a string. It works fine unless there is only one atom of a particular element (e.g. the oxygen atom in H2O). How can I fix that problem, and in addition, is there a better way to parse a chemical formula strin...
stackexchange/codereview
import java.util.*; import java.text.*; public class GetPreviousAndNextDate { public static void main(String[] args) { int MILLIS_IN_DAY = 1000 * 60 * 60 * 24; Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yy"); String...
stackexchange/codereview
I think I have an other quest. I have a form with user information in table one which controls table1. In table2 I have more detailed information. For some reason I get a eeror when I point a text field to [Tabel2]![Bevindingen] How can I point to table2 field: Bevindingen so when data is entered in that text field is ...
stackexchange/codereview
How can I create a Unit test for Spring MVC Controllers that use annotation @RequestParam? I have created junit tests for controller that uses HttpServletRequest object in the handlerequest method, but I am looking a way to test a controller using @RequestParam. Thanks @RequestMapping("/call.action") public ModelAndVi...
stackexchange/codereview
I'm having troubles figuring out a python regex for django urls. I have a certain criteria, but can't seem to come up with the magic formula. In the end its so I can identify which page is a CMS page and pass to the django function the alias url it should load. Here are some examples of valid strings which would match:...
stackexchange/codereview
I'm doing a project in Java which includes (x,y) coordinates. I have created a class of Cell which has protected integers X & Y; Upon initialization, i do a for loop which sets an array of cell by multiplying the X & Y given by the user, say if X= 10 and Y = 10, i create an array of cells[100]. However, how can i searc...
stackexchange/codereview
I have been detect the audio and video devices and build the Capture Graph, but in the last filter I cannot render both of them. DsDevice dev = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice)[0]; hr = m_FilterGraph.AddSourceFilterForMoniker(dev.Mon, null, dev.Name, out capFilter); ...
stackexchange/codereview
stream.filter(locations=[-122.75,36.8,-121.75,37.8,-74,40,-73,41],track=["twitpic"]) This works. However, it's not "AND". It's "OR". This line gets the location OR keyword. How do I make it "AND"? Here's the code to the library I'm using: def filter(self, follow=None, track=None, async=False, locations=None): ...
stackexchange/codereview
in the Microsoft.Ink world for WinForms, using an InkCollector object, a user could get the timestamp of a point in a stroke via this approach. The WPF world relies instead on the InkCanvas object, and while it has many properties, I can't seem to find a Tick or Timestamp for StylusPoints collected in the strokes. Is...
stackexchange/codereview
$a = array ('x' => 2, 'y' => 3); $b = array ( 'y' => 2, 'z' => 3); // $c = $a * $b; // i would like to have // $c = array ('x' => 0, 'y' => 6, 'z' => 0);
stackexchange/codereview
I am currently trying to create a html:select tag from an enum so it could be set in a specific object: class someClass { SomeEnum someProperties = null; public getSomeProperties() { return someProperties; } public setSomeProperties(SomeEnum e) { someProperties = e; } The JSP with Struts tags: <html:select...
stackexchange/codereview
It's possible that this question either has a simple answer that's a standard practice, or has no answer because it can't be done for a simple reason, or is otherwise just an interesting thought exercise. I'm currently sitting on the last option, but hoping for the first... Let's say I want to create a "group" or "cla...
stackexchange/codereview
My NSMutableURLRequest is sending the strings twice to PHP. What am I doing wrong? - (void)viewDidLoad { // Printando os Dados ///// NSString *endereco = [[NSString alloc] initWithFormat:@"%@ - CEP: %@", self.sharedData.dataEndereco, self.sharedData.dataCEP]; NSMutableURLRequest *request = [[NSMutableURLRequest a...
stackexchange/codereview
When I view my site in IE7 the <hr /> has a weird gray border around it. How do I get ride of it? Link to my site: http://julianjosephs.com/
stackexchange/codereview
I have a database table field named User_Created_Date of type Varchar.I want to write a query to fetch all records where the difference between Today's date and User_Created_Date is greater than 31 days pls help
stackexchange/codereview
Zend Framework has a great component called Zend_Locale. There's all kind of nitty gritty details in properly parsing out language and locale, partly because it's been hacked into HTTP Accept-Language header. In the Zend Framework locale docs, it says: Note: Be aware that there exist not only locales with 2 characte...
stackexchange/codereview
For one Model called Email.rb, I have a method shown below called new_todos. This same method needs to be made available for Call.rb, Postalcard.rb, etcetera. Rather than cutting and pasting this exact snippet across multiple Models of Active Records, how can I have it written just once and make it available to the app...
stackexchange/codereview
SELECT DISTINCT tr.object_id,tt.taxonomy, im . * FROM term_relationships AS tr INNER JOIN term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN image AS im ON tr.object_id = im.ID In the above query I want it not to display the results I get from tr.term_taxonomy_id = tt...
stackexchange/codereview
I'm looking for a java library to use SVG for work flow presentation. My question: is Batik this dynamic that you can move the objects in a svg drawing? E.g. moving icons in a canvas. Something like this: moveable objects
stackexchange/codereview
Below is my code for multidimensional array to show it as a table with alternate-row colors. <?php $Mags = array( array( '1', 'Krish','1977/03','V10', 'M3','March-77' ), array( '2', 'Vansh','1978/09','V11', 'M9','Sept-78' ), array( '3', 'Sushi','1981/07','V14', 'M7','July-81' ) ); ?> <table id="fancytable"><tb...
stackexchange/codereview
We have a quite common object in our application. In this case, we'll call it a Ball. Balls work fine, but in some configurations they act differently. It is currently set up like this: class Ball { private static readonly bool BallsCanExplode; static Ball() { bool.TryParse(ConfigurationManager.AppS...
stackexchange/codereview
I am writing code in C++ for a data server in Linux. I have a socket list in the form of file descriptors for all the subscriber connections. My server need to continuously send data to the subscriber. I have about 100 to 200 subscriber at max. What is the fastest way to push data to all the subscribers simultaneously?...
stackexchange/codereview
Is there a good validation framework for node.js that validates a variable for: if its a type of String, Date, Number etc max and min length email, phone etc...
stackexchange/codereview