instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a .NET 3.5 web application, and I am adding Silverlight 4. I can build and test the whole project in VS 2010. My assemblies still targets 3.5. I had to upgrade NAnt from .85 to .91-alpha2 to get the build to work at all, and I had to use an call to msbuild v4.0.30319 rather than NAnt's task. That all works ... | stackexchange/codereview |
Recently I've been getting into Minecraft, which is a 3D game made in Java. I've made a few 2D java games, without any external libraries or IDE's or anything.
What I'm looking for, is just some libraries. Not anything with a GUI, just libraries. Rendering *.obj files would be nice, antialiasing not a requirement.
| stackexchange/codereview |
Having a md5 hash like:
md5("test") = "098f6bcd4621d373cade4e832627b4f6"
How can I write a function to return a number between 1 and 9 every time I pass the md5 hash to it? The number must always be the same, i.e. myfunc("098f6bcd4621d373cade4e832627b4f6") should always return the same number.
Thanks for your help. ... | stackexchange/codereview |
I want to speed up the following code using cython:
class A(object):
cdef fun(self):
return 3
class B(object):
cdef fun(self):
return 2
def test():
cdef int x, y, i, s = 0
a = [ [A(), B()], [B(), A()]]
for i in xrange(1000):
for x in xrange(2):
for y in xrange... | stackexchange/codereview |
I'm new to OpenStreetMap and I've been browsing the wiki and the net and I can't seem to find a tutorial anywhere but I've seen examples on the net.
Basically I want to generate my own OpenStreetmap and plot markers taking the latitude and longitude from a MySQL database and plotting them on my map. When the user clic... | stackexchange/codereview |
EDIT2:
New training set...
Inputs:
[
[0.0, 0.0],
[0.0, 1.0],
[0.0, 2.0],
[0.0, 3.0],
[0.0, 4.0],
[1.0, 0.0],
[1.0, 1.0],
[1.0, 2.0],
[1.0, 3.0],
[1.0, 4.0],
[2.0, 0.0],
[2.0, 1.0],
[2.0, 2.0],
[2.0, 3.0],
[2.0, 4.0],
[3.0, 0.0],
[3.0, 1.0],
[3.0, 2.0],
[3.0, 3.0],
[3.0, 4.0],
[4.... | stackexchange/codereview |
I have a MFC dialog application with a picture control. I add an icon file with different size of images (32x32, 48x48, etc...) into the icon resource. Then I set the following picture control properties:
Type - Icon
Real Size Image - True
I have the following code under OnInitDialog():
HICON hIcon = (HICON) LoadImage(... | stackexchange/codereview |
I want to use a grid as subgrid in jqGrid because I read that "simple subgrid" doesn't allow cell edit.
I'm filling main Grid with dataType function successfully and I'm trying to do the same for subgrid, but subgrid shows without data, and I don't know why because I debugged and I catch data correctly from web service... | stackexchange/codereview |
I have the following (idealised from a bug) short script in Perl:
my %metadata = undef;
if (defined %metadata)
{
print "defined";
}
For some reason the output of the program is always "defined". So setting the hash to be "undefined" somehow makes it defined. Is it defined as being "undefined"?
EDIT:
This is an i... | stackexchange/codereview |
I am taking my first steps with Sencha touch. The results are just what I am after, getting there however is a struggle to get how sencha is put together. I am slowly figuring it out but sometimes the way the code works is a bit WTF.
I am trying to build a very simple app that does the following.
1) Has three tabs, Sea... | stackexchange/codereview |
I am having an html listbox with a lengthy content. The width of the content is also too long that horizontal scroll bar is a necessity. Unfortunately horizontal scroll bar is not there in listbox. How can get both horizontal and vertical scroll for the listbox.
I have given a div as a parent to this html listbox and ... | stackexchange/codereview |
I've figured out how to get the shape of a text string before drawing it on this screen in Java, for example by using the TextLayout class [1]. However I could only find a way to get the Shape of the whole text. I need a Shape for each character in the text. Does anybody know an elegant way of how to obtain the Shape p... | stackexchange/codereview |
I am trying to render a tabular layout (html table) for a form such that first cell contains a checkbox.
$form = array();
$res = query('SELECT * FROM {mytable}');
$rows = array();
while($row = db_fetch_array($res)){
$record = array();
$checkbox = array(
'#type' => 'checkbox',
'#attributes' => ar... | stackexchange/codereview |
Lets say i have something like this coded
class Normal_Mode;
class Fast_Mode;
class File_Control; //handles all operations with reading/writing in file
class Main_Control {
private:
some_class *root; //all other classes need access to root pointer since there is all the data(binary tree)
File_Control *c_file_control... | stackexchange/codereview |
I have extended objects of type IDataReader with some extension methods that I needed. The problem is now when I try to mock the IDataReader, the extended method is not included in the mock so when the row Expect.Call(reader.ExtensionMethod()).Return(someValue) is reach the ExtensionMethod is executed which is not what... | stackexchange/codereview |
Assume the x86 64 and linux platform.
If you look into the ELF header, the offset are all 64bit.
So it's easy to create an object file larger than 4G with relocatoin R_X86_64_64. This means a static .o file and executable can be as large as 64bit can represent.
However, for shared library, like gcc , we only have R_X86... | stackexchange/codereview |
What is faster in SQL to check value for NULL or 0
I want to have the fastest way to check is value already in table.
For example which is faster :
IF ((SELECT ID FROM [SomeTable].[dbo].[BlockedSubscriberNumbers]
WHERE VALUE = @myVal) is null )
BEGIN
....
END
ELSE
BEGIN
....
END
or
IF ((SELECT COUNT(ID) FROM [S... | stackexchange/codereview |
I'm looking for advice on how best to construct a "watch-list" for the app I'm currently working on.
Models as follows:
# user.rb
has_many :items
# item.rb
belongs_to :user
I need to now add a watch-list, where users can favorite certain items, without taking ownership.
I've tried the following:
# user.rb
has_many :i... | stackexchange/codereview |
Hi everyone i am new to iphone development.I am working on an application which required to check and register the user name and password using soap web service.could anyone help me how to do that with that web service.i have two text fields for login.and button to check if the credentials are correct or not.
| stackexchange/codereview |
I'm trying to send an Ajax request to a Spring MVC controller and map it to a Java class accordingly:
public class Person implements Serializable {
private MutableLong Id = new MutableLong();
@NotEmpty
@Size(min = 1, max = 50)
String FirstName=null;
@NotEmpty
@Size(min = 1, max = 50... | stackexchange/codereview |
My project downloads lots of xml (as text) and images then I parse the xml and interpret the data there. When I check some of the xml downloaded some of them are getting truncated only showing a partial part of it. The beginning parts of it is gone. I use:
InputStream in;
in = OpenHttpConnection(url);
SAXP... | stackexchange/codereview |
Is there a way I can trap event when a presenter switches to a slide on PowerPoint 2010?
| stackexchange/codereview |
I've been doing some playing around with POCO objects and EntityFramework. Because of this I have to write my own Context and Repository(s). I would like all repositories to use the same context instance so changes are shared between them. To facilitate this I coded my Context as a Singleton. This way instead of gettin... | stackexchange/codereview |
how do I remove focus from options menu item? I.e. when I open the menu for the first time, none of the items has focus. however, if I focus on one of them using track ball, and then close and re-open the menu the focus is still there. How do I get rid of it?
I am clearing and recreating the menu in onPrepareOptionsMen... | stackexchange/codereview |
I'm adding a view with -addSubView. I'm also using the view elsewhere and presentModalViewController.
-viewWillAppear is called with presentModalViewController but not with addSubView.
No doubt this is something obvious ?
| stackexchange/codereview |
I use ini_get('tmp_dir') but it returns false.
I found out I can't use ini_get() and ini_get_all() on server.
Why can I not use it?
| stackexchange/codereview |
in my project, i need to send emails to the registered members of the site once every month. For this, i have setup a cron job on cpanel and it is working fine.
Whats my doubt is that, tomorrow the number of users in the site will increase and there would be thousands of users. Then does the cron job work as usual ?
I ... | stackexchange/codereview |
My php application logs into to Gmail via oauth provided access keys and fetch headers for all messages in inbox. The php-imap extension allows only for login/password based authentication. I want to modify the extension so that it support oauth based authentication too. I need to figure out how to make that change ins... | stackexchange/codereview |
I am trying to figure out how to remove a node from a binary search tree, I understand that it is different for each node whether it is a leaf, has one child or two children. So as of now my function is nothing more than:
bool BinSTree::remove_root(treeNode*& node) {
if(node -> left == NULL && node -> right == NULL... | stackexchange/codereview |
I have an application wherein when the user taps iPhone's central button, the application is sent to background, but I want it to be closed.
I can hand event and close it, but may be there is some configuration setting to deny running in the background?
Thank you
| stackexchange/codereview |
there`s a problem using the jQuery Range Slider plugin. I want to trigger an event every time the slider changed.
I don`t know on which elemt i can trigger events. For exmaple i wana have an alert message ro see if it works.
Thanks
Peter
| stackexchange/codereview |
In our development environment we use Windows, Mac, and Linux. I am having trouble when it comes to the commit -> pull -> push work flow.
The problem is end of line characters. If someone makes an edit on Mac and some one else makes an edit on Windows they conflict when pulling. The diff shows the entire file as differ... | stackexchange/codereview |
Suppose I have two objects $obj1 and $obj2 that are both instances of Moose classes. I want to find out which of the following applies:
$obj1's class is the same as $obj2's;
$obj1's class is a subclass of $obj2's;
$obj1's class is a superclass of $obj2's;
Neither object's class is a subclass of the other's.
How can I... | stackexchange/codereview |
On Mac, I installed kdiff3 to use with Mercurial to do
hg vdiff
but every time, it shows
Qt: qcolorFromCGColor: cannot convert from colorspace model: 0
Qt: qcolorFromCGColor: cannot convert from colorspace model: 0
Qt: qcolorFromCGColor: cannot convert from colorspace model: 0
Qt: qcolorFromCGColor: cannot convert fr... | stackexchange/codereview |
I'm looking into creating a Rich Internet Application. For the interface, I want something smooth, fast, and robust. I realize there are several technologies out there to do just that (Flex, standard HTML/Javascript, Silverlight).
After using Grooveshark, I am very impressed with its interface (written in Flex). Perso... | stackexchange/codereview |
I'm new to wxWidgets (C++), and threads for that matter. What should I be aware of concerning shared resources? Should I implement some sort of semaphore-based locking of resources that may be used by both the GUI thread and the worker thread(s)? Does wxWidgets offer some capability for dealing with this?
| stackexchange/codereview |
I have 3 Models:
User
has_many :user_projects
has_many :projects, :through => :user_projects
Project
has_many :user_projects, :dependent => :destroy
has_many :users, :through => :user_projects, :uniq => true
UserProject
belongs_to :project
belongs_to :user
I then have a form that allows the creation of a new Pro... | stackexchange/codereview |
ive ran into an issue while creating a PHP telnet script at work to gather network data.
as the amount of data returned from the 'Action: Status' command could be of any size... im concerned about using a static number with fread() on line 13. I have also tried using fgets() instead but it only grabs the first line of ... | stackexchange/codereview |
Actually, I have a very complex problem, but I have narrowed it down here to the most essential part with some dummy-data.
Say I have the following text:
a
aa
aaa
aaaa
aaaa
aaaaa
a
aa
aaa
aaaa
aaaaa
aaaaaa
aaaa
a
What I would like to do is, FOR EXAMPLE when a line of 4 a's is followed by a line of 1 a. I'd like to add... | stackexchange/codereview |
I was trying to find a tool to increase performance in the reports of our application and I heard about OLAP + Reporting Services which is described as an excellent combination to do this work. Anyway I didn't find the way to keep the OLAP cube up-to-date since the data in the original DB can change. (It's a transactio... | stackexchange/codereview |
$tmp = mysql_query("SELECT commercial FROM Channels WHERE name='".mysql_real_escape_string($_POST['name'])."'");
while( $row = mysql_fetch_assoc($tmp))
{
echo $row['commercial'];
}
I only want to access the first element.
not in a while loop
| stackexchange/codereview |
Is there any way to obtain the AssemblyVersion of a .Net executable in Linux without using mono? What I am trying to have is a script or command that will let me obtain the AssemblyVersion on Linux boxes. I tried: #strings file.exe | grep AssemblyVersion but it only the string and not the number. Also checked with:#... | stackexchange/codereview |
I'm trying to make a converter, but i don't know the formula to do this, for example, how do I get the ratio of 85694 of 30711152. So, i can get the % like 85694/30711152*100=0.28 (rounded) but how do I then get the ratio of like 1 in a 100? I believe that'd be around 1:400? But i don't know how to get it exactly or wh... | stackexchange/codereview |
I am writing an application that will behave similar to the existing Voice recognition but will be sending the sound data to a proprietary web service to perform the speech recognition part. I am using the standard MediaRecord (which is AMR-NB encoded) which seems to be perfect to speech recognition. The only data prov... | stackexchange/codereview |
I have the following code, but it doesn't update my status (the username and password has been removed for this snippet) and it throws the error eeek. Any ideas why it's not working?
EDIT:
Apparently Twitter NEEDS OAuth instead now. I have been following this tutorial here: http://ditio.net/2010/06/07/twitter-php-oauth... | stackexchange/codereview |
I am trying to send image from my midlet to an HTTP server. images are converted into byte
and sent to server using http multipart/form-data request format.
ByteArrayOutputStream bos = new ByteArrayOutputStream();
bos.write(boundaryMessage.getBytes());
bos.write(fileBytes);
bos.write(endBoundary.getBytes());
When the... | stackexchange/codereview |
I have an index.html in my wampserver www directory. On this html, there is a link for a user to upload file. When I hit the link, I select files to upload but instead of the uploadmanager.php which i have tested in my eclipse debugg environment to work, it displays the some part of the code on the web page without do... | stackexchange/codereview |
Possible Duplicate:
How do you iterate through every file/directory recursively in standard C++
Hello everyone!
I've been looking for a way to check if a determined folder is empty or not, and if it isn't, list the existing files in the folder, but of course to no avail.
I've been looking around and found something ... | stackexchange/codereview |
I am trying to access a web service and calling a method to pass my request parameters. I am programmatically setting my credentials, using:
service.Credentials =
new NetworkCredential("username", "password", "domain_url");
When in the above code, I pass domain_url, I get this Web Exception,
Unable to automatic... | stackexchange/codereview |
I have an object which is marked as [Serializable] and it's properties are marked with [XmlAttribute] and [XmlIgnore].It's serialized for our web-site use, and it works well.
Now I need to serialize the same object for a different use (web service), in json format.
I know I can easily serialize objects with the [Data... | stackexchange/codereview |
The method I am doing right now is breaking the string into array of words in NSSet and minus the set of stopwords. Is there a more efficient way?
| stackexchange/codereview |
I am trying to devise a strategy for Web Services versioning and how to handle versions from a SCM point of view.
We are doing bottom-up (JAX-WS) services, and therefore have less control over the schema and can't follow some schema versioning of the best practices. My current thoughts are:
1) Major changes (non-backwa... | stackexchange/codereview |
Let's say we have a short program:
namespace ConsoleTryIt
{
static class Program
{
static void Main(string[] args)
{
var sum = Add(1, 2);
}
private static int Add(int p, int p2)
{
return p + p2;
}
}
}
When create the unit test class f... | stackexchange/codereview |
I am using Eclipse 8.6 and Subclipse 1.6, and svn 1.6.x server. I created a branch, made some changes in both branch and trunk, and now I am trying to merge from trunk to this branch. All what I am getting is nothing but tree conflicts for every directory and every file under the root of the branch. I get that even wit... | stackexchange/codereview |
In my app, I have a form where user should submit a facebook page URL.
How to check that it's correct?
Presently, I'm just checking that it begins with 'http://www.facebook.com'
How can I check that it is a page (where you can become a fan) and not a profile, event or whatever?
I'm using the python api and appengine.
T... | stackexchange/codereview |
Hi I am quite new to Powershell but I have one niggling question. I want to be able to tell if a command has completed successfully so I can give meaningful messages to host.
I am using the appcmd command to add a binding in IIS. Essentially that goes as follows:
./appcmd set site /site.name:........................
Bu... | stackexchange/codereview |
let's say I have a text file I'm inputing text from...
File file = new File("example.txt");
Scanner inputFile = new Scanner(file);
if I want to reference the next line of text I would do
inputfile.nextLine();
Let's say I want to reference that same line of text again. Is there like a "currentLine()" method? What e... | stackexchange/codereview |
I inherited a solution and all of the mvc website projects in it won't open because they have been setup to use IIS instead of the built in webserver in VS.
How would I go about changing these projects back?
And why would it be beneficial not to and use IIS instead?
| stackexchange/codereview |
In my application one Datagrid and down one Canvas is there.
I have a DataGrid with Data. When i select the data in the Data grid, the focus is displayed in the canvas. In the canvas i have a chart component.so when i select the link data on the datagrid the focus should be in the chart component in the canvas. Can any... | stackexchange/codereview |
Right now I clarify this may be a duplicated question from: Right-aligned labels in WinForms
But non of the answers satisfied me.
The problem is very simple:
I have a right aligned label with autosize set to true. The expected behavior is that when the text is increased the right coordinate remain unchanged. But that i... | stackexchange/codereview |
I'm trying to upgrade my versions of the above packages to meet PCI compliance.
I ran apt-get upgrade and almost all of them upgraded but the version numbers stayed the same. Ubuntu 7.10 is Long Term Support so I assume there are these newer patched version available but I can't find them in the official repos.
| stackexchange/codereview |
I've got a query like this:
select a, b, c, group_concat(d separator ', ')
from t
group by a;
This seems to work just fine. As I understand it (forgive me, I'm a MySQL rookie!), it's returning rows of:
each unique a value
for each a value, one b and c value
also for each a value, all the d values, concatenated into ... | stackexchange/codereview |
Using C#, I have a List of type Foo, which has a string property Bar.
I'd like to convert this List into a string array using the Bar property.
Is there an easy (LINQ?) way of doing this without having to loop through the collection?
| stackexchange/codereview |
I have wondered for a while about the feasibility of having Java run on the CLR.
After seeing a previous question here, I realize that there are quite a few differences between the Sun Java platform and the .NET runtime that would make cross-compiling impossible in all but the most trivial cases.
That being said, isn't... | stackexchange/codereview |
In SQL based db's, I'm able to perform a "loose" query by appending e.g. %taxi% and consiquently get an entry containing taxi in it (e.g. w10taxi or taxiAirport or parcelTaxi).
How do I do this in FMP? (I've tried ~taxi but this appears not to work)
I'd appreciate any help. thanks in advance
Giles
| stackexchange/codereview |
When you create a default iphone OS project in xCode, you have a main.m in "Other Sources" on the side panel in xCode. How does the int main() in there use argc and argv and why does it need it?
Thanks :)
| stackexchange/codereview |
I have a windows server 2003 machine, installed on it, a cisco product called "Cisco Voice Portal", this product runs on JRE version 1_5_0_12.
Getting the date/time either by:
new Date();
or
Calendar.getInstance();
always the date is one hour ahead of the system date.
At first, i thought it is a timezone mismatch, ho... | stackexchange/codereview |
I'm working on a system that performs matching on large sets of records based on strings and numeric ranges, and date ranges. The String matches are mostly exact matches as far as I can tell, as opposed to less exact full text search type results that I understand lucene is generally designed for. Numeric precision is ... | stackexchange/codereview |
I have a rails app with a wordpress blog sellotaped on the side (totally separately at /blog).
The client want's to the latest blog post on the main homepage of the rails app, so I need to do a one-off mysql query to the word-press database. How would I go about doing this in the rails app. The word-press is completely... | stackexchange/codereview |
echo $ul; // gives this code:
<ul id="menu">
<li id="some_id" class="some_class">...</li>
<li id="some_id" class="some_class">...</li>
<li id="some_id" class="some_class">...</li>
</ul>
How to add some class for the first and the last <li>?
Need a regex solution.
echo $ul; should give (if we add class my_class for th... | stackexchange/codereview |
I have 4 .c files hello.c,here.c,bye.c and main.c.
One header file mylib.h
The contents are as follows
hello.c
#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
here.c
#include<stdio.h>
void here()
{
printf("I am here \n");
}
bye.c
#include<stdio.h>
void bye()
{
printf("Bye,Bye");
}
main.c
#i... | stackexchange/codereview |
I want to use return false to break a .each() but also return a value at the same time. How can I do this?
Please refer to a work-around function to see what I am trying to do:
function HasStores(state) {
var statehasstores = false;
$(stores).each(function (index, store) {
if (state == store.state && s... | stackexchange/codereview |
Currently I'm using the below code to allow a user to download a file that's attached to a couchdb document. I'm using couchdbkit with Django.
def get_file(request, user_id):
user = User.objects.get(pk = user_id)
application = user.get_profile().application()
attachment_name = request.GET.get('name', None)
... | stackexchange/codereview |
I'm trying to write a code that calculates the approximate factorial of a number using Stirling's formula.
Here's the line that calculates it:
appFact = pow(exp, -num) * pow(num, num) * sqrt(2 * num * PI);
The error comes in at pow(exp, -num) with pow underlined in red.
IntelliSense: no instance of overloaded function... | stackexchange/codereview |
I have a web page that uses Google's Visualization API to generate a timeline but now that I'm trying to add some jQuery stuff to it, things are falling over. So, I'm trying to do it with Closure. However I can't seem to find any examples of how to use the Visualization API under Closure. Does anyone know where I can f... | stackexchange/codereview |
I want to connect 3 devices via bluetooth (My Droid must connect to 2 bluetooth devices). I 've connected my Droid to 1 device using Bluetooth chat.
How should I modify it for multiple bluetooth devices?
| stackexchange/codereview |
I have a question regarding Sitecore Analytics and user profile keys. I need to be able to get the score of a profile key for an individual page. For example, if I have a profile key called "traveler" that could have a value of 1-10 on a given page, I need to be able to get the value for that key that was assigned by t... | stackexchange/codereview |
Im making my little site where users can create blogs, and have studied publishing tools like wordpress and vbulletin.
When a user creates a post with BBcodes/mark up language, should i parse it into HTML and insert in db, and then only echo the text for the user, or should insert it with bbcode in the db, and let the... | stackexchange/codereview |
Sorry if this is noobish, but I'm new to development and am teaching myself.
Let's say I've got 2 tables
BioData
Name (string)
Birthdate (datetime)
BloodType (int)
BloodTypes
BloodTypeId (int)
BloodTypeName (string)
When I pull a record, i'll use a join, so that I pull the BloodTypeName and not just ID.
Now, should... | stackexchange/codereview |
I wanted to create simple plugin using jquery.
Also suggest me standard practice while writing jQuery plugin.
Please folks suggest me some better pointers.
| stackexchange/codereview |
I have many images on remote server say images.foo.com/222 & i want to access file names of all files that resides in the folder 222 on images.foo.com/.
i have tried following code but getting error "virtual path is not valid" :
imageserver = http://images.foo.com/222;
DirectoryInfo di = new DirectoryInfo(imageserver);... | stackexchange/codereview |
Given a DFS path how would I know what is the active path it is currently on programatically.
For exmaple I have 2 Servers shares as "\\Server1\Folder\" and "\\Server2\Folder\" and it has DFS turned on so it can be accessed on "\\DFS_Server\Folder\", how would I know what is the active path currently "\\DFS_Server\Fold... | stackexchange/codereview |
Can someone show an example on how to log in to AIM, then send and receive messages using the IMframework?
Thanks!
| stackexchange/codereview |
I would like to take a video of a flame, close up, and be able to show it on any background (where the background is seen through the flame). Ideally the flame animation (say 60 frames at 15 frames a second) would be alpha transparent png that I could lay over another image.
My question is how would I make those images... | stackexchange/codereview |
Hi I am building Cmake based build system.
I would like to group header files in folders (VC++ can do it) under the general folder Header Files.
Similar, I would like to group the corresponding .cpp files in folders under the Source Files directory.
Unfortunately I could not find any instructions of how to do it.
Plea... | stackexchange/codereview |
I'm just starting with node.js + express + ejs. I can't find anywhere how to pull in the requested ejs file to the layout file.
I know full well that yield is not the right thing here.
e.g.
layout.ejs
<html>
<head><title>EJS Layout</title></head>
<body>
<%= yield %>
</body>
</html>
index.ejs
<p>Hi</p>
| stackexchange/codereview |
I have an SqlCommand with parameters. Due to some external requirement (see PS), I need one T-SQL string instead, i.e., I need ... @parameter ... replaced by ... the-value-of-@parameter-encoded-correctly ... (e.g. O'Brien --> 'O''Brien', 02 Mar 2010 --> '20100302', 3.5 --> 3.5).
I know that I could home-brew such a so... | stackexchange/codereview |
I'm interested in using the Rails 3 AutoComplete plugin for jQuery but the one tutorial provided doesn't match my use case. Hoping for some help...
Plug In: http://github.com/crowdint/rails3-jquery-autocomplete-app
I have a Permissions Controller where people can add team members.
On the Permissions SHOW view I want to... | stackexchange/codereview |
This LINQ to SQL query
From g In Db.Context.Current.Groups
Select g.GroupID
generates this SQL:
SELECT [t0].[GroupID]
FROM [dbo].[Groups] AS [t0]
But this query
From g In Db.Context.Current.Groups
Select g.GroupID, g.MemberCount
generates this SQL:
SELECT
[t0].[GroupID], [t0].[Title], [t0].[Description], ...
... | stackexchange/codereview |
I'm having a little trouble building the grids for a Battleship game for my Java class. So far, I can easily make a for loop to add JPanel or JButton objects to the JFrame. However, my issue is that I'll need to use those Panels or Buttons again when playing the game (such as clicking on a button to see if your opponen... | stackexchange/codereview |
I'm new to C# but not to OOP.
I'd like to make a "canvas" panel on which a user can draw shapes by mouseClick-ing but also delete them (nothing fancy, fixed sizes and whatnot, plain old pen objects). Like I said, I want the user to be able to delete whatever objects he alt-clicks on.
I'm not sure how exactly could I go... | stackexchange/codereview |
I am currently trying to debug a blackberry application on a real device.
I find the setup time to be ludicrous!
Here is my workflow:
Uninstall the application using Blackberry Desktop Manager (BBDM)
it takes about one minute to select the options to uninstall the app...
BBDM needs to connect to the device and load... | stackexchange/codereview |
Is it possible to use the java.util.Calendar in a Struts2 IntRangeFieldValidator?
The following code does not produce any OGNL errors but does not work either. I'm trying to create a validation rule for a year range, min= 1970 and max= current calendar year.
@RequiredFieldValidator(message="Year cannot be blank")
@IntR... | stackexchange/codereview |
Came across the following MS Unit Test:
[TestMethod]
public void PersonRepository_AddressCountForSinglePerson_IsNotEqualToZero()
{
// Arrange.
Person person;
// Act.
person = personRepository.FindSingle(1);
// Assert.
Assert.AreNotEqual<int>(person.Addresses.Count, 0);
}
I have never seen the use ... | stackexchange/codereview |
I have the following python code
from urlparse import urlparse
def clean_url(url):
new_url = urlparse(url)
if new_url.netloc == '':
return new_url.path.strip().decode()
else:
return new_url.netloc.strip().decode()
print clean_url("http://www.facebook.com/john.doe")
print clean_url("http://fa... | stackexchange/codereview |
HI, is it possible that I created a image from matplotlib and I save it on an image object I created from PIL? Sounds very hard? Who can help me?
| stackexchange/codereview |
In SQL Server I used the following hints inside queries:
rowlock (row level locking)
updlock (prevents dirty reads)
readpast (don't block waiting for a rowlock, go to the first unlocked row)
e.g.
select top 1 data from tablez with (rowlock,updlock,readpast);
Are there equivalent in-query hints for Oracle?
| stackexchange/codereview |
Can you script SharePoint configuration (as in settings done in the "Configure your SharePoint farm" and "Reporting Services Configuration Manager") through .Net ?
Does anyone have any links that might help ?
| stackexchange/codereview |
I know I've seen this done somewhere, but I can't find it anywhere.
Basically, I have a side scroller (here: http://www.allisonnavon.com) that I'm putting together.
The main problem is if the browser window is just a bit too short on height, the site will scroll vertically and cover up the title that is supposed to be ... | stackexchange/codereview |
I have a list of product names in Chinese. I want to translate these into English, I have tried Google AJAX language API, but it seems that translation is not good, it would be great if someone could give me some advice about or point me towards a better choice.
Thank you.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.