instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Suppose there are two models m1 and m2, and now we need to run a query equal to "SELECT * FROM m1, m2" in django. How to do it? Thank you.
| stackexchange/codereview |
I have 2 tables. The first table is a list of customers.
The second table is a list of equipment that those customers own with another field with some data on that customer (customer issue). The problem is that for each customer, there may be multiple issues.
I need to do a join on these tables but only return result... | stackexchange/codereview |
I have a rails project deployed on heroku which has only a production environment.
I've created a staging environment by doing:
"heroku create appname --remote staging"
the slug size for on my exsiting application is 4.4MB
and the .git repository is 85MB.
when I do git push staging master, it tries to upload all 85MB t... | stackexchange/codereview |
I’m investigating Windows Workflow (WF) for .NET 4.0, and there seems to be a few pieces missing. From a BPM perspective, you want to have the concepts of work queues and security (user authorization).
For instance, say you have multiple long-running workflow instances from several different workflows running on an app... | stackexchange/codereview |
I am following along on this tutorial, after I add the templates and put the pattern in urls.py, I go the website I get a template not loaded page.
This is my template dirs section from settings.py:
TEMPLATE_DIRS = (
"/home/django-projects/base/templates/",
)
the base folder hierarchy is this:
blog<dir>
dbs<dir>
_... | stackexchange/codereview |
I am trying to detect gesture events on the emulator by making mouse clicks, should this work? I've tried double clicking (which i would expect to produce a onDoubleTap), clicking (which I would expect to produce a onSingleTapConfirmed), and dragging (to hopeful produce a onScroll), but these all produce the same thre... | stackexchange/codereview |
Hi
We are going to start a CRUD project.
I have some experience using groovy and
I think it is the right tool.
My concern is about performance.
How good is groovy compared to a java solution.
It is estimated that we can have up to 100
simultaneosly users. We are going to use a
MySql DB and a tomcat server.
Any comment... | stackexchange/codereview |
I am looking at some Java Code in Eclipse on Windows. The line termination characters (DOS-style) do not display properly (empty lines everywhere..).
The Problem is that the Code is from a Windows ClearCase vob for which I do not have check-in permissions, so it is read-only (changing the line-termination characters wi... | stackexchange/codereview |
I've heard from a couple of different sources that when using HTML helpers in ASP.NET MVC2, one can create custom attributes with dashes in them (e.g. <a data-rowId="5">) by using an underscore in place of the dash, and when the HTML is written to the page the underscores will be replaced by dashes.
So, something like ... | stackexchange/codereview |
I am developing a windows phone 7 app which will need some basic database functionality. I came across the following projects on codeplex. Has anyone tried any of these projects and can help me decide to choose one, please?
http://rapidrepository.codeplex.com/
http://winphone7db.codeplex.com/
Pratik
| stackexchange/codereview |
I would like to cache the result of the twitter api result and display them to users..
What's the best method to cache the result?
I'm thinking a writing the result into a file based on a time limit.. Is that ok or any other method should be used?
And most importantly what would be the ideal cache time ? I would like... | stackexchange/codereview |
I need to send file from my directory to user. The problem file was not send.
Can any one help me?
My code is like:
CHttpServerContext* pCtxt;
// ... there i set headers for open
DWORD dwRead;
CString fileName = "c:\txt.doc";
HANDLE hFile = CreateFile (fileName, GENERIC_READ, FILE_SHARE_READ,
(LPSE... | stackexchange/codereview |
I would like to hear you opinion on how to make secure buttons with django-paypal. I do have a subscription based website an, if possible, I do not want to use the encrypted buttons that django-paypal supports.
Furthermore I don't think that it is possible to use the protected payment buttons that paypal provides (the ... | stackexchange/codereview |
I have problem with unicode functions under my Ubuntu 10.10 linux. Lot of unicode functions doesn't work correctly. When I try following simple code:
#include <wchar.h>
int main(int argc, char *argv[])
{
wprintf(L"test %s %s %s\n",L"one",L"two",L"three");
return 0;
}
and compile using g++ (gcc version 4.4.5 U... | stackexchange/codereview |
I have a local Mercurial repository that is up-to-date. I want to retrieve an earlier version of one of the files without disturbing my local copy of the repository.
Is there a way to do this? (looks like maybe hg archive but I'm not sure how to use it)
| stackexchange/codereview |
is there a function like PHPs substring? I saw Left and Mid but those all make me specify the length of what I want the string to be.
Here is PHP's function example:
$rest = substr("abcdef", 1); // returns "b"
I just want to be able to take a string and start it at a certain point, not end it as well.
| stackexchange/codereview |
char *input[2];
input[0] = cat /etc/passwd
input[1] = grep root
I am trying to create a 2 dimensional array of C strings such that
char **dArray;
dArray[0][0] = cat
dArray[0][1] = /etc/passwd
dArray[0][2] = NULL // Append NULL to mark end
dArray[1][0] = grep
dArray[1][1] = root
dArray[1][2] = NULL // Append N... | stackexchange/codereview |
I need to select a range of rows and sort that range by column D. How can I assign this task to a macro (so I can do this to lots of different ranges of rows as needed)?
| stackexchange/codereview |
Possible Duplicate:
What does a colon following a C++ constructor name do?
I am finding this syntax strange in C++
TagDetails::TagDetails(QWidget *parent) :
QDialog(parent),
ui(new Ui::TagDetails)
This is declaration of constructor in C++... What does the thing after colon stand for, i.e. what does ui(new Ui::TagDe... | stackexchange/codereview |
<?php
class Popular
{
public static function getVideo()
{
return $this->parsing();
}
}
class Video
extends Popular
{
public static function parsing()
{
return 'trololo';
}
public static function block()
{
return parent::getVideo();
}
}
echo Video::bloc... | stackexchange/codereview |
In the class I am testing, there are a few assert statements that check for various conditions.
One of the methods is
GetNames(string id){
assert(! id.Equals("")); // Causes all junit tests to stop
...
}
and there is an assert statement to check if id is not blank.
In my unit tests, I have one test where I p... | stackexchange/codereview |
How is it possible to use hyphen in resources urls?
For example: /my-model/ or /my-model/1.
If I define route as resources :"my-model" I get syntax error because rails generates method def hash_for_my-models_url(options = nil).
| stackexchange/codereview |
What is the best jQuery plugin for serializing XML to JSON?
| stackexchange/codereview |
Following this post (I was looking for a library allowing me to declare Django models on a ldap backend), I have decided to use ldapdb. After having played a while with this library, I figured out that it doesn't reach the level of control I need, and I am therefore looking for other solutions. What I am thinking of no... | stackexchange/codereview |
I would like to write a C# app to handle my HTTP (including AJAX requests) rather than go the PHP, PERL or ASP route as I just need to return some standard HTML, albeit obviously, as I want CGI, dynamically generated.
UPDATE: I am not proposing to write my own web server but have the exe hosted by a webserver such as I... | stackexchange/codereview |
I want to select a given row in the UTTableView from a index but need to know also the section index.
int localCurrentIndexPath = 9;
NSIndexPath *scrollIndexPath = [NSIndexPath indexPathForRow:localCurrentIndexPath inSection:??];
I need fill in the inSection part. Do I need to supply the inSection value?
| stackexchange/codereview |
I'm working on a php/mySQL/ajax shoutbox and have run into a small snag.
On the page I want the content to be loaded from oldest to newest, with the newest on the bottom. I also want to limit the output to reduce load times once the database starts to get a lot of data in it.
Here is the current code;
<?php
inclu... | stackexchange/codereview |
Ok I have the css sorted:
Now to style the input box ( but this isnt working ) any suggestions. Think my js is messed up.
The html element:
<input name="latLng" class="latLng" id="latLng2" type="text" disabled />
The JS:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('input.latLng').loca... | stackexchange/codereview |
I need to write a recursive function that prints out the elements of a list twice. For example, rdouble '(1 2 3) would print (1 1 2 2 3 3) and rdouble'(1 (2 3) 4) would print (1 1 (2 2 3 3) 4 4).
So far I have:
(defun rdouble(struct)
(cond
((atom struct) struct)
(t (cons (rdouble (car struct)) (cons (car s... | stackexchange/codereview |
I have a simple script that I use to automate CLI calls to our software (the Moab Workload Manager) in testing, to avoid having to use the '--xml' flag to get xml output and then pipe it through tidy so it's easily readable. It uses a subprocess.Popen call to run the command, then uses str.strip() and str.replace() to ... | stackexchange/codereview |
How do I retrieve the first line of a .CSV file as a string?
This current method I am using is failing to return the first line, but is instead returning the second line:
$content = file($filepath);
echo $content[0];
| stackexchange/codereview |
container
.Register
(
AllTypes
.FromAssemblyContaining<TestInterceptor>()
.BasedOn<IInterceptor>()
.Where(t => t.Name.EndsWith("Interceptor"))
.WithService.AllInterfaces()
.Configure(c => c.LifeStyle.Transient),
Component
.... | stackexchange/codereview |
I have this query:
SELECT votes, option
FROM poll_maker_options
WHERE poll_id = " . $row['poll_id']
I see nothing wrong with that but I get the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option FROM poll_maker_opti... | stackexchange/codereview |
I have exposed a simple RESTful JSON url via CherryPy (Python web framework). I have a second application (using Pylons) which needs to reach a URL exposed by CherryPy. Both are being served via localhost. Both URLs resolve just fine when using a browser directly.
But, when a DOJO script running from the initial Pylons... | stackexchange/codereview |
I am creating a user control that I wish to have inner properties as well as normal attributes. Although the actual function of the control has nothing to do with, say, UpdatePanel, I am trying to create something with similar ASPX markup. The developer designing the page should be able to use my control like:
<ns:My... | stackexchange/codereview |
I am developing a plugin for FileMaker Pro 11 Advanced on Mac using its C++ plugin API. I want to show an NSWindow on screen that is loaded via an XIB file, but I am unable to get the window to display without setting the "Visible at Launch" property of the window to YES in the XIB file.
I am trying:
[window makeKeyAnd... | stackexchange/codereview |
ok.
I want to stop a running process and then continue with the script only once the process has stopped.
for example: stop media player and then delete the media player database (if you have wmp12 you may understand the reason why!)
But the rest of the script starts executing before the app has time to shut down.
#st... | stackexchange/codereview |
I am trying to cache long string in the cache. It is limiting itself to 255 char length. I am not able to figure out why?
Is there any way to re configure this?
| stackexchange/codereview |
I want to extract all Strings (texts, written in " ") in hundreds of java classes, to get them to a translator for a multilanguage platform translation.
Does somebody have an idea how I could do this? Any special free program or method?
| stackexchange/codereview |
I'm redirecting all exceptions to a simple error page with the following entry in my web.xml file:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.xhtml</location>
</error-page>
My error page contains:
<ice:form id="errorForm">
<ice:outputText value="#{guiProps.UnknownError}"/>... | stackexchange/codereview |
I have an multiselect option selector and up/down buttons:
<select id="animalSelector" multiple="multiple">
<option>Elephant</option>
<option>Duck</option>
<option>Dog</option>
<option>Giraffe</option>
<option>Dinosaur</option>
<option>Whale</option>
</select>
<input type="button" id="btnMoveUp... | stackexchange/codereview |
Is there a method in Linq that does the same as ElementAt except it returns an IEnumerable<T> with a single element, rather than the actual element? Isn't there some SelectRange(startIndex, endIndex) method I could use and just pass the same index twice?
| stackexchange/codereview |
I have a class that doesn't extend webapp.RequestHandler, and I can't use self.response.out.write(), I get:
AttributeError: Fetcher instance has no attribute 'response'
If I extend webapp.RequestHandler (I thought it would work), I get:
AttributeError: 'Fetcher' object has no attribute 'response'
How can I use th... | stackexchange/codereview |
I installed the RSE plugin in Eclipse intending to either use SSH or FTP to work with files on a remote machine. I set up both an SSH and FTP connection, but neither works.
For example, here is what happens when I connect using FTP:
As you can see, the directories on the server show up, but I can't do anything with th... | stackexchange/codereview |
How do I use python_select with fink installed python? It won't find it and I don't want to go through the whole process of installing python using macports. I got python_select from macports though. It reports:
Available versions:
current none python26-apple
I used fink to install python in:
/sw/bin/python2.7
| stackexchange/codereview |
I have this XML
<items>
<item validate="NotEmpty ValidEmail" class="xxx yyy zzz" type="input" name="Id" value="" label="Id" />
<item validate="NotEmpty" type="input" name="NazovProjektu" value="" label="NazovProjektu" />
<item type="input" name="Oz" value="" label="Oz" />
I want to get the value of the attribut... | stackexchange/codereview |
Does anyone know a good way (either through reflection or special attributes) to replace certain functions calls with no-ops in C#?
Basically, what I'm trying to do is something like this
#ifdef DEBUG
StopWatch.start();
#endif
DoSomething();
#ifdef DEBUG
StopWatch.stop();
Log.TimingInfo(StopWatch);
#endif
witho... | stackexchange/codereview |
I'm building a Windows Phone 7 app. For it, I'm making a ListBox that has two modes: editing and not-editing. When it's in editing mode, + and - icons are displayed next to the items. When it's in normal modes, the icons are hidden.
I'm trying to figure out how to do this. Here is the control:
<Grid x:Name="LayoutRoot... | stackexchange/codereview |
I have a 3rd party badly designed library that I must use.
It has all sorts of types it works with, we'll call them SomeType1, SomeType2 etc.
None of those types share a common base class but all have a property named Value with a different return type.
All I want to do is to be able to Mixin this class so I'll be able... | stackexchange/codereview |
I have been experimenting with Hibernate 3.6 and I am wondering about the capabilities of the provided infinispan distributed cache.
I have a requirement to have database replication between my main site and my disaster recovery site.
While it is possible to configure PostgreSQL to replicate, I am thinking that it migh... | stackexchange/codereview |
I am curious to know how the platforms like Ning, SocialGo are designed. Not particularly about Social Network Platforms, but generally platforms that allow the users to build similar websites.
My understanding is when the users register they get a sub domain through which their members can register and access that par... | stackexchange/codereview |
I want something to turn ?a=5&b=8 part of a URL into a dictionary { a:5, b:8 }.
Is there such method in .net or am I on my own?
I need to parse query part so that I can implement my own URL decoding.
The problem is that Firefox uses different encoding (UTF8 or ISO-8859-1) depending on the used alphabet.
Example:
Firefo... | stackexchange/codereview |
Designing my first app against the Graph API, using version 2.1.2 of the Facebook supplied PHP library. Trying to maximize performance, etc out of the box and want to batch a few calls together into one call, but can't find anything in the documentation... I am sure I must be missing something simple, but am stumped.... | stackexchange/codereview |
I am adding the following query to a .NET dataset TableAdapter.
select * from users ORDER BY RAND()
LIMIT 0,10
But the LIMIT word is not recognized as a part of the query and I am unable to proceed further.
Is there any workaround for this issue?
| stackexchange/codereview |
I was previously using Ruby 1.8.7 & Rails 2.3.5 on Heroku.
I upgraded my development environment to Ruby 1.9.2 and Rails 3.0.1 using the instructions this railscast. RVM is used, so the system versions of Ruby and Rails are still 1.8.7 & Rails 2.3.5 respectively, but I have an RVM environment with 1.9.2 and 3.0.1, whic... | stackexchange/codereview |
I went through the documentation in http://www.opengroup.org/onlinepubs/009695399/functions/pthread_cond_wait.html but this is not mentioned explicitly. Any prompt response will be very appreciated.
| stackexchange/codereview |
I've downloaded qt 4.5.0 evaluation but during installation it asks for a license key but I don't have a one so please help me out.
Is there any way by which I can download a free GPL or LGPL license key for qt 4.5.0 or I would have to download the full qt SDK for windows????
I know it's a noobish question but I ll be... | stackexchange/codereview |
I need in to popup thr "Run As" form when user tries to run my application (C#.NET 4, on Win XP), that he could easily to log as other user. It may be in the application itself (in the C# code) or in some other preceeding batch/exe file ("launcher") or such. I didn't find any way to pop this form. How could it be done?... | stackexchange/codereview |
According to what I have read, the only possible outputs for this program are "A" or no printouts. But since the statement new MyString("A").concat("B"); is creating a new object with string "AB", couldn't this object also be garbage collected resulting in output "AB"?
class MyString {
private String str;
My... | stackexchange/codereview |
I have an iOS action - (void)download; - which I have running at the launch of my iOS application.
However, I need another - (void)showData;- which displays data on a UIMapView to wait until all the data has been downloaded through - (void)download - before it begins. Just wondering if anyone knows a way to do that?
T... | stackexchange/codereview |
I know this has been asked before but I haven't found a decent solution. I'm using events (as a function) and .ajax. Of course everything displays correctly except in IE. I'm using FullCalendar v1.4.8 and jquery-1.4.2.min.js. Here's my code:
$('#calendar').fullCalendar({
theme: true,
events: function(start, end... | stackexchange/codereview |
I just checked my page size using firebug and all, and javascript files equal 478.2K!
<script src ="<%= Url.Content("/Scripts/MicrosoftAjax.js") %>"></script>
<script src ="<%= Url.Content("/Scripts/MicrosoftMvcAjax.js") %>"></script>
<script src ="<%= Url.Content("/Scripts/jquery-1.3.2.min.js") %... | stackexchange/codereview |
I have a table of data to describe a person's scheduled time. It looks like this
Name | day | start_hour | end_hour
-
Tom | Monday | 8 | 12
Tom | Weekend | 16 | 20
Dick| Weekdays | 9 | 15
Sue | Sunday | 7 | 23
How can I make a view that looks like this?
Hr | M | Tu | W | Th | F | Sa | Su
...
... | stackexchange/codereview |
Pls I want to keep a count of every word from a file, and this count should not include non letters like the apostrophe, comma, fullstop, question mark, exclamation mark, e.t.c. i.e just letters of the alphabet.
I tried to use a delimiter like this, but it didn't include the apostrophe.
Scanner fileScanner = new Scanne... | stackexchange/codereview |
My problem is this; I have to order a table of data. Each row of the table is an object (lets call it TableObject) stored in a List. Each column of data is a property of the class (usually a String).
I have to do the typical ordering of data when the user clicks on any column. So I thought about changing the List to a ... | stackexchange/codereview |
Trying to make the example PhysicsRemoveExample.java from here.
I get this message when the program starts:
Sorry! The application PhysicsRemoveExample(process org.anddev.andengine.PhysicsRemoveExample) has stopped unexpectedly. Please try again.
I have Build Path andengine.jar and andenginephysicsbox2dextension.jar
a... | stackexchange/codereview |
Greetings!
I'm looking for a way to search a collection for the object that best satisfies my criteria. Since I have to do this quite often, I was looking into how to execute the query using LINQ, but cannot find a simple way to do this that doesn't 'appear' to waste time.
A functional implementation would be:
collecti... | stackexchange/codereview |
In C++ we can import msxml DLL to our application and then implement the methods of the interface ISAXContentHandler in a class of our application. Later create an ISAXReader object and invoke the contentHandler with the instance of this class where we have given the implemnatation for the eventhandler interfaces.
... | stackexchange/codereview |
We have a property whose job is to look up a description. If the lookup fails it should show an empty string.
So we can code the property like this:
If foo.bar Is Not Nothing Then
Return foo.bar.Description
Else
Return String.Empty
End If
But that involves executing foo.bar twice, and if doing so is expensive, it'... | stackexchange/codereview |
I have a WebView, UIToolBar and I have a Next button and Previous button.
I have 6 HTML pages that I need to display in sequence depending on the press of the next or previous button.
So for example: start at HTML page 1, press next and load HTML page 2. Press next and load HTML page 3. and so on.
The UIWebView current... | stackexchange/codereview |
I'm new to PHP and do not consider myself a coder. I am tackling my first database driven action and am having trouble getting the date output to format properly. The line where I am formatting the date seems to be ignored. Am I doing something incredibly wrong?
This is what outputs on the page:
Comment from: Jeremiah... | stackexchange/codereview |
I have a followup question to this question.
I'm writing a web service which dynamically calls other web services, using the WSProxy class found here.
Using WSProxy returns an object with a dynamic type, depending on the web service method called. For example, if I'm calling a method that returns...
<StateCodes>
<S... | stackexchange/codereview |
I'm having issues while coding for my Evo. While touching the screen, the Evo interprets me touching the buttons as another press on the screen instead of a onKeyDown, onBackPressed, etc. (It actually sets the MotionEvent pointer count to 2, and I can get the co-ords that I'm touching that are off the main screen, for ... | stackexchange/codereview |
How do i check if ssl 2 is enabled on iis6?
Thanks
Sp
| stackexchange/codereview |
What is the best pattern for an application to play sounds while enabling user to use his iPad app to play music as well? Right now if the music is playing any sound played by my app will stop the music. Is there a way to disable sounds while ipod is playing?
| stackexchange/codereview |
I am working on a few applications. I like to keep my applications small, but I'd like to make it so that users that utilize more than one of these programs don't need to login to each application - it would remember and share session info. across the applications. Any thoughts on how I could accomplish this? Here are ... | stackexchange/codereview |
I have gallery and a custom css drop-down menu to choose a category. If the user does not have javascript enabled, he should be able to click the a anchor without any problems. Otherwise, jquery & ajax are used.
My problem is, how do I know the category selected? Storing it as an attribute isn't an option, because it d... | stackexchange/codereview |
Scenario: A website I use to research stock data has a link on the page to Export Data to Spreadsheet. The URL displayed when hovering over the export link is of the form http://www.stocksite.com/historical/export.php?symbol=C .
Question: Rather, that manually visiting the page for each stock I would like to automate ... | stackexchange/codereview |
I am using Mac OS Snow leopard and installed erlang from source (R13B04). Now I started using mac ports system to manage software. This port utility installed a newer version of erlang (R14A) runtime during the set up of rabbitmq server. But it looks like when I start rabbitmq it is using the old erlang run time and ca... | stackexchange/codereview |
i hav a image back ground and i should able to add some images and buttons with proper images at particular place...
i should able to place these sub images wherever i want on the background image ..dynamically ...
| stackexchange/codereview |
I am new to web.config transformations but have it working for my connection string. However, my transforms for a custom section (nhibernate) are not being applied. Here's the transform file:
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?Link... | stackexchange/codereview |
There is something weird about this ImageView, after big image scaled down there is still "free space".
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
... | stackexchange/codereview |
Can you please explain what is the
purpose of the NSNotification, and
what are some situations I could use
it?
Does a notification call all classes
in the app, or does it call a
specific class, by passing a
delegate?
Is it possible to create 1
notification, and receive it on
multiple classes?
| stackexchange/codereview |
I'm looking to run a query that will return a list of columns in a table that are FULLTEXT indexed. The table is in MyISAM format and i'll be using php to construct the query.
Ideally i would run the query and it would return the information so i could construct a comma separated string of the columns.
e.g. "first_nam... | stackexchange/codereview |
Good Moscow evening to everyone!
I'm still unfamiliar with principles of iPhone animation (btw, does anybody know a big and nice tutorial on this?), but in my project I want to do button "highlighted-not highlighted" flicker to notify the user that its label has changed.
This code doesn't do anything (it's just a fragm... | stackexchange/codereview |
I can't seem to change the size of the tab bar. The tabs are incredibly small, and I can do it through the "gui" tool in the examples. Can I do this programatically, or am I missing something?
QTabWidget::pane {
//border-top: 2px solid #C2C7CB;
//doesn't work, neither does 20px
//height:20ex;
}
QTabW... | stackexchange/codereview |
I would like to read the output of a zlib stream's inflate() into a buffer one byte at a time, so that I can parse out single lines.
Is there a way to specify the number of bytes that inflate() returns, so that I can watch for newlines?
| stackexchange/codereview |
Conisder anchor tags a1,a2,a3 in div1 and if a person clicks on a1 thn a div2 sud open and it contains some anchor tags with some default href value...how to change the href values for those anchor tags in div2 according to the anchors selected in div1.....
Example...
One
1One
1Two
2One
... | stackexchange/codereview |
I have a single form that, depending on which radio button is clicked (Login or Signup), displays either:
email address
password
or:
name
age
email address
password
Clicking on the radio button toggles the visibility of the Login/Signup fields:
<form id="myForm">
<input name="userAction" type="radio" value="log... | stackexchange/codereview |
In Visual Studio there is a tool called TaskList, which searches the code for TODO comments, compiles a list of them, and lets you go to a TODO item in the code by clicking on it in the list. Is there an equivalent tool in Matlab? Is there even a convention for TODO comments in Matlab?
| stackexchange/codereview |
I'm stucked on a Hibernate inheritance problem while working on a JSF-based. At first, I was oriented to use a interface implemented by two concrete classes but since mapping interfaces is not possible I used an abstract class extended by the two concrete classes. In terms of code:
@Entity
@Inheritance(strategy=Inherit... | stackexchange/codereview |
jQuery plugins make code much more reusable.
I previously made a plugin that would open a dynamically created lightbox that pulled information from an IMG tag's attributes. This plugin registered a click event handler for the image.
I recently made another plugin that I had wanted to use on these images to dynamically ... | stackexchange/codereview |
I have been reading about ths approach and understand the theoretical part to a certain degree. However, I wanted to ask the community to share their real life experience of where and how they applied this technique as well how their software had benefited from doing so.
This is not discussion of which IoC Container Fr... | stackexchange/codereview |
While I was debugging some illogical behavour I came to the following weirdness in Python 2.5 sorted() function calls:
>>> aa = [10, 5, 20]
>>> sorted(range(len(aa)))
[0, 1, 2]
sorted(range(len(aa)), key=lambda a: aa[a])
[1, 0, 2]
sorted(range(len(aa)), key=lambda a: -aa[a])
[2, 0, 1]
First two calls work as expected,... | stackexchange/codereview |
I wish to have a stored proc that is called every n seconds, is there a way to do this in SQL Server without depending on a separate process?
| stackexchange/codereview |
Like all good programmers, I'm trying to get some things straight when using TDD with MS Test. I'm following the basic Arrange, Act, Assert pattern, and something looks too complicated for my Act code. I'm under the assumption that there should only be one action in the Act line. So, given my sample code below, am I... | stackexchange/codereview |
I'm currently reading the Boost.Program_options tutorial.
Here is some of the code they introduce:
// Declare the supported options.
po::options_description desc("Allowed options");
desc.add_options()
("help", "produce help message")
("compression", po::value<int>(), "set compression level")
;
I understand the... | stackexchange/codereview |
I am struggling to see the real-world benefits of loosely coupled code. Why spend so much effort making something flexible to work with a variety of other objects? If you know what you need to achieve, why not code specifically for that purpose?
To me, this is similar to creating untyped variables: it makes it very fl... | stackexchange/codereview |
I want to do a query to update values that I forgot to copy over in a mass insert. However I'm not sure how to phrase it.
UPDATE table
SET text_field_1 = (SELECT text_field_2
FROM other_table
WHERE id = **current row in update statement, outside parens**.id )
How... | stackexchange/codereview |
I'm working on a script to put watermarks on images uploaded by users. Because every user wants his own user name on his picture, I decided to make a transparent PNG first with the name of the user. After that I use a simple watermark technique to merge the PNG and uploaded files together.
I got the script working, but... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.