instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have run into this problem a few times and I'm not happy with the solutions I've used before.
I have an input box with a blur event that validates the content of it and a button which will fill the input box on click. The problem is clicking the button fires the input blur event and then the button click event so con... | stackexchange/codereview |
i'm having a List<List<String>> MyList and which contains
{ "A1","B1","C1" }
{ "A2","B2","C2" }
{ "A3","B3","C3" }
i need to add this to a ListView control with three columns
so the list view will be like
__Clm1________________Clm2________________Clm3_______________
A1 A2 ... | stackexchange/codereview |
I have a table of comments and a table of posts
Whenever a post is deleted, a query runs to subtract the number of comments (that are deleted later) from each user's comment_count
So if a user has 2 comments in a post, and that post is deleted, their balance should have 2 subtracted from it
My query is as follows:
... | stackexchange/codereview |
I'm programming in C++ right now, and I love using pointers. But it seems that other, newer languages like Java, C#, and Python don't allow you to explicitly declare pointers. In other words, you can't write both int x and int * y, and have x be a value while y is a pointer, in any of those languages. What is the reaso... | stackexchange/codereview |
Objective:
I want to send multiple images using multipart/form-data. Below is a snippet of my code.
Problem:
On one PC, the multipart attachment is sent by the correct MIME header Content-Type: image/jpeg, but on another PC, the MIME header is Content-Type: application/octet.
Question:
How can I force cURL to set th... | stackexchange/codereview |
How do I use getMeasuredWidth() and getMeasuredHeight()? It always returns 0. What is the difference between this and getHeight() and getWidth()?
| stackexchange/codereview |
Well as the title says
is there any way to get the system architecture within c++?
Thanks!
| stackexchange/codereview |
I'm using :
Apache Tomcat 6.0.20
Spring 3.x
I want to create simple "Hello World !!!" on my index page. Unfortunately, I get the following error:
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
... | stackexchange/codereview |
I have an app that stores times in GMT, but associated with airports which have Olsen tz names like 'America/New York'.
I need to determine if a given date is within the local daylight savings period.
The closest I could find is TZ_OFFSET('Tzname'), but no simple way to get the next DST start/end time relative to so... | stackexchange/codereview |
I'd like to list all the methods that are called from a specific method. E.g. if I have the following code:
public void test1() {
test2();
test3();
}
The list should contain test2() and test3(). It would be great if methods of the same class but also methods of another class could be listed.
Additionaly I'd l... | stackexchange/codereview |
I don't know how to start and stop the Marquee. Could you give some example about Marquee usage;And i don't want to set the initial status of progress bar to be continous or blocks becuase there will be flash when i change the style of progress bar to be Marquee..
thanks in advance
| stackexchange/codereview |
I am currently working on a class that uses another class which has only static functions.
Everything worked fine until I tried testing my class.
Here is a simple code example of the problem:
class A {
static String getSometing() {
return String("Something: ") + heavyCalculation().asString();
}
}
class... | stackexchange/codereview |
[got a bit further so its updated]
Hello There, i really hope you are able to help me!
Now the first part of my code does work, and I do get my report numbers out in my combobox, and i'm able to write that number to a lbl. now I need to take that number and get the rest of my data from my Access 2003 database, and dro... | stackexchange/codereview |
For the pch file I get these errors:
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:6:34: error: Foundation/Foundation.h: No such file or directory
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:7:24: error: UIKit/UIKit.h: No such file or direct... | stackexchange/codereview |
So , i still don't completely understand how lists and recursion work in prolog, could be why i am having trouble with this, but i don't even know how to begin this problem.
There is a list of friends.
f(a,b).
f(a,c).
f(a,d).
f(b,c).
f(b,e).
f(b,f).
f(c,e).
f(c,g).
f(g,e).
etc..
I have to find if someone is a friend t... | stackexchange/codereview |
I'm very confused about how to use git archive.
I have a git repository with folder Foo, Bar and Baz at the top level. I need to export folder Foo in a SVN-ish sort of way for quick test deployment.
I learned that I could use git-archive in an SVN-ish export sort of way.
But here's the thing, The following works fine... | stackexchange/codereview |
I've got a bunch of useful Project Item templates for Visual Studio 2010 and I'd like to share them with the developers in my team. At the moment the zip files are sitting on a network share with an instructions text file telling users to copy the zips deep into their Documents folders.
I'd much rather have Visual St... | stackexchange/codereview |
I am having problems with our third party vendor implimenting an sso. They are receiving the following error when verifying my signature:
java.lang.ArithmeticException: BigInteger: modulus not positive--at java.math.BigInteger.modPow(BigInteger.java:1556)
I have no control over their Java code. Here is what I am doing... | stackexchange/codereview |
I need an easy way to load the same style sheet for two different installations of wordpress. One is at main.com and the other is at main.com/secondary. Thanks.
| stackexchange/codereview |
I'm building a rudimentary ajax calendar using jquery and colorbox. Here's the link to the site in progress:
http://208.79.237.222/calendar/
When a user clicks on a link in the calendar controls, a script requests that page via ajax and updates the calendar.
The issue I'm having is with the pop up links in the calendar... | stackexchange/codereview |
I'm tearing my hair out over this. I would like a ListView where each item in the list is an ImageView. I want each item to have a radio button next to it and only one item can be selected at a time (i.e. single choice mode). This code works fine for creating a list of text box with radio buttons:
ListView listView... | stackexchange/codereview |
For example:
code = '7777-5';
input = code.substring(0, 4); // Returns '7777'
checkdigit = f(input); // f() produces a checkdigit
assert.areEqual(code, input + "-" + checkdigit)
Is there a technical term for input used above?
Specifically I'm calculating checkdigits for ISBNs, but that shouldn't effect the... | stackexchange/codereview |
I have a PHP based site with dynamic pages , such as /page.php?ID=1.
The ID in the URL represents a unique key in a MySQL database of an entry which have a "Name" field as well.
I understand that in order to convert all my URLs from /page.php?ID=1 to /page/New-York (where the Name field of row ID=1 is New York) I need... | stackexchange/codereview |
Could you please help me with following problem?
Very often I must do the same task which is deleting almost all files from one directory - all files but 2 of them (let say 1st.file and 2nd.file).
I found multiple solutions how to erase all from directory but have no idea how to work this one out.
Could you point to w... | stackexchange/codereview |
I need to focus on window opened on further clicks on anchor tag. I have used the below function to do so.
function newwindow(url)
{
OpenWin = this.open(url,"mywindow");
OpenWin.focus();
}
OpenWin.focus() is not working on Mozilla Firefox. Is there any other solution to focus on window opened on further cli... | stackexchange/codereview |
In a pivot, i'm loading images, each image dynamically created as an pivot item and whose source is an URL. It works fine for 10 images, but if there are more images it is crashing.
The problem is no error is shown in the debugging too.
this is the code i'm using to add images as the pivot items
foreach (Photo photo in... | stackexchange/codereview |
I want to create routes to also get links like:
my.site.com(/:controller/:action)
admin.site.com(/:controller/:action)
I tried to add:
resources.router.routes.www.type = "Zend_Controller_Router_Route_Hostname"
resources.router.routes.www.route = ":module.nameofmysite.com"
resources.router.routes.www.defaults.module =... | stackexchange/codereview |
I had seen the following code in a J2EE project.
public class RequestContext {
private final static ThreadLocal<RequestContext> contexts = new ThreadLocal<RequestContext>();
/* Initialization */
public static RequestContext begin(ServletContext ctx, HttpServletRequest req, HttpServletResponse res) {
... | stackexchange/codereview |
I have a generic list class that implements a particular interface.
The list items in the interface also implement the same interface.
public abstract class List<T extends SomeInterface> implements SomeInterface
{
protected LinkedList<T> m_list;
...
}
So now I want to make a subclass of this list that stays ... | stackexchange/codereview |
I need the most efficient way to filter out Nodes from a XmlNodeList.
The XmlNodeList is what i get back from dtSearch.
The list contains a list of items that are found on a specified searchPhrase.
I want to filter out all items that are not belonging to the website i want to look on.
The information about what websi... | stackexchange/codereview |
I'm created a few forms in WinForms application and want to implement validation of user input. There are several ComboBox'es and TextBox'es. I have to check that some fields are not empty and some field require decimal number format. I know there are Enterprise Library Validation Blocks and integrated ErrorProvider. W... | stackexchange/codereview |
I would like to parse a response from the NYT Search API given in JSON format. The JSON string looks as follows (excerpt):
{"facets" :
{"des_facet" :
[
{"count" : 745 , "term" : "POLITICS AND GOVERNMENT"} ,
{"count" : 702 , "term" : "UNITED STATES INTERNATIONAL RELATIONS"}
],
"desk_facet" : ... | stackexchange/codereview |
I need some help in adding the replace all functionality into my Flex project. I would prefer doing this in a way that is as natural as possible.
What I want to achieve is to be able to run this code (with the Flex compiler) "aabbaaba".replaceAll("b","c") and get "aaccaaca". Also I want to chain replaceAll calls.
Note:... | stackexchange/codereview |
The "cutting" effect I am talking about can be seen in the famous iPhone game "Fruit Ninja" and "Cut the Rope", that is, when you move your finger across the screen, there is a trail following your finger to simulate the knife cutting effect.
I am wondering what's the name of this kind of effect and how it is implemen... | stackexchange/codereview |
Is there a standard way of reading MANIFEST.MF key-value pairs from a fragment in OSGi?
| stackexchange/codereview |
I am trying developing an applet which transmits audio and video. But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.
Is there any possibility to run the applet without JMF installation on the client side ?
Anyone can help on... | stackexchange/codereview |
I'm using uploadify and the script (which uses adobe flash) creates a new session instead of using the current one when requesting the upload action url. To fix that I need to pass ahead the session id.
Is there a way to do this without permit session fixation (hijacking)?
Here are some details of the problem:
Sessions... | stackexchange/codereview |
Possible Duplicate:
Why not use tables for layout in HTML?
Why not use tables for layout? I don't see what's the big deal. All my sites use a CMS so presentation is separated from the content from the get go.
And some things are easier to do with tables... like columns of equal height. Sure there are plenty of hacks... | stackexchange/codereview |
After taking a look at some old code:
//Nothing like a destructor!!
function destroy() {
settype(&$this, 'null');
}
And called by
$Cache->destroy();
However in PHP 5.3 I get
Deprecated: Call-time pass-by-reference has been deprecated in /blah/-cache-.php on line 154
How should I do this?
| stackexchange/codereview |
It feels strange to me to be casting null to a type so I wanted to double check that this is the right way to do this:
decimal? d = data.isSpecified ? data.Value : (decimal?)null;
NOTE: I am marking the answer that suggests the method that I personally like the best:
decimal? d = data.isSpecified ? data.Value : defa... | stackexchange/codereview |
I'm trying to find a way to loop through each of the results from using the sql execute. I'm using the 'for' loop but it bunches all the values into one cell. I need to separate each value
So my table would have:
row1 = 1, 2, 3
row2 = a, b, c
Currently using this returns the values into one table cell:
<% for values in... | stackexchange/codereview |
I have been working for some time on a library which performs numeric calculations. It is written in pure native C++, and until now I have been using simple console applications to test its functionality.
The time has come to build a GUI on top of the library - to better display tables of results and also to render the... | stackexchange/codereview |
Short version: I'm looking for the JavaScript equivalent of Perl's
for my $key ( sort { $hash{$a}{foo} cmp $hash{$b}{foo} } keys %hash ) {
# do something with $key
}
More detail:
I have a JSON object which consists of a bunch of other JSON objects which have identical properties to each other, like a hash of hashe... | stackexchange/codereview |
I use pyscripter for coding, it supports auto-completion. So, when I say:
a = []
a.
It gives me all the list functions. similarly with strings I do b=''.
But for the file type, I have to use file. and choose the function and write its arguments and then replace file with the variable name.
Is there a way to declare a... | stackexchange/codereview |
I've installed snow leopard on the old tiger and I tried to run apache2 by clicking system preferences->sharing->web sharing. It seems to run but if I try to access http://localhost or http://127.0.0.1 or http://192.168.1.6/ (my ip on my network) it doesn't work. I don't know where is the log file (no files on /private... | stackexchange/codereview |
I'm really struggling with how to handle Error Handling in Rails 3. I have hacked some ideas that could work but would rather do it the proper way. If anyone can help or give guidance I would appreciate it. Here is what I have so far
ItemController
def show
@item = Item.find(params[:id])
@note = @item.notes.... | stackexchange/codereview |
I have to break a HTML content string in to multiple lines...
And each line should have some fixed characters, 50 or 60
Also I don't want to break the word..or html tags...
ex : <p>Email: <a href="mailto:someone@gmail.com">someone@gmail.com</a></p>
<p><em>"Text goes <font color=red>Hello world</font> Text goes her... | stackexchange/codereview |
In a GSP (Groovy Server Page), I'm using <g:submitToRemote update="..."> to update a <div> after the server-side call.
According to the tag's documentation and other sources on the web, the target <div> can be placed arbitrarily at the page. In my testings, however, I find that the <div> needs to surround the <g:submit... | stackexchange/codereview |
I’m trying to extract some numbers ranging from 1-99 from a picture. I’ve tried several OCR methods using PHP, but eventually my script will fail, since the numbers occasionally is rotated 5% to the left or right. This making the picture not being recognizable.
I’ve now installed Ocropus http://code.google.com/p/ocropu... | stackexchange/codereview |
How did they accomplish this? Have you guys seen: http://www.skittles.com? The site never ends!
| stackexchange/codereview |
I'm doing some testing that requires a large folder tree. 1000s of folders, 100000s of files, atleast a gigabyte but not over 5 thats a little big. (around 2 is fine).
Anyone have one that they use as a test file? I can provide storage and transfer mechanism to share if you need it.
| stackexchange/codereview |
I have a SQL Server 2008 database and I am working on it in the backend. I am working on ASP.NET/C#
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
//how do I read strings here????
}
I know that the reader has values. My SQL command is to select just 1 column from a table. The colu... | stackexchange/codereview |
Is there a plugin/standard HTTP API for accessing user roles/permissions in a Drupal 6 instance from other applications, e.g., on different hosts?
Our organization uses Shibboleth to allow easy authentication across all our hosts, but I'd like to use our central Drupal 6 installation to manage user roles rather than st... | stackexchange/codereview |
I want to handle events when user pastes some text in TextBox. Which event is fired in this situation? I tried ValueChange and Change handlers, but they didn't work.
| stackexchange/codereview |
I was wondering if rather than creating another table to store the results of the MySQL JOIN query is it possible to just export a queries result, like to a CSV?
The query for example would be something like this..
SELECT
us.id,
CONCAT_WS(' - ',cats_sic_us.sic,cats_sic_us.category) AS sic_cat
FROM
us
I... | stackexchange/codereview |
When I run KitchenSink example project on iPhone emulator everything is OK, but trying to launch for Android emulator produces errors:
[ERROR] /Users/lukasz/Android/android-sdk-mac_x86/tools/apkbuilder
[ERROR] Failed installing com.appcelerator.kitchensink: pkg: /data/local/tmp/app.apk
It happens whatever Androig API ... | stackexchange/codereview |
I have found some similar questions but with no helpful answers.
I need to manipulate an MS SQL Server database named PDPJ_Student from my java application and i cannot connect to it. I get the following error:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'LAPTOP-TITI/Titi'. The user i... | stackexchange/codereview |
I am attempting to have a new view appear on top of my main view.
Here is the XML for the new view:
<RelativeLayout
android:id="@+id/mapdetaillayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left"
xmlns:android="http://sch... | stackexchange/codereview |
How would you achieve 128-bit atomic operations in x86?
Intel's System Programming Guide, Part 1, 8.1 Locked Atomic Operations specifies guaranteed 16-, 32-, and 64-bit atomic operations. So, can you achieve 128-bit atomic operations by doing 2 64-bit ops with the LOCK prefix? Something like...
LOCK mov 64bits->addr
... | stackexchange/codereview |
Do you create a Viewcontroller per view screen? or should you share a viewcontrollers? (ie in the example below Should there be 3 controllers or just 1 controller?)
Example
Screens are related
Screen1 (input information),
Screen2 (Review and confirm Information),
Screen3 (thank you / status response).
| stackexchange/codereview |
I recently changed domains and the new site has a different permalink structure. Instead of redirecting everything from the old site to the new one, I'd like to set up .htaccess to rewrite the old URL as query string so that the requested page can be found without having to type it into the search of the new site.
For ... | stackexchange/codereview |
Background information:
This application is .NET 4/C# Windows
Forms using SQLite as it's backend.
There is only one user using the
database and in no way does it
interact through a network.
My software needs to save images associated to a Project record. Should I save the image as binary information in the da... | stackexchange/codereview |
When I load an xls file, which is created by the user, to SpreadSheetGear workbook it changes date format from dd/mm/yyyy to mm/dd/yyyy. How can I prevent this?
I use the code below (VB.NET) to load xls file:
WorkbookView1.ActiveWorkbook =
SpreadsheetGear.Factory.GetWorkbookSet.Workbooks.OpenFromMemory(xlsFile)
... | stackexchange/codereview |
we're trying to find a way to see the entire changeset of one or more incoming revisions in a mercurial repository inside the pretxnchangegroup hook. We use version 1.6.3.
We can get the first incoming change with $HG_NODE, but hg tip still points to the oldest, committed change, not to the one that we're about to tack... | stackexchange/codereview |
How do I make image effects to rotate and skew images in PHP?
I want to know the underlying stuff the magic, what php extension should i look into and learn to make this happen, any good tutorials online to make cool image effects?
| stackexchange/codereview |
AFAIK GHC is the most common compiler today, but I also see, that some other ompilers are available too. Is GHC really the best choice for all purposes or may I use something else instead? For instance, I read that some compiler (forgot the name) does better on optimizations, but doesn't implements all extensions.
| stackexchange/codereview |
How do I scrape any website for creating a feed for my website? What format do most popular sites follow?
| stackexchange/codereview |
Basically, since XMLList are similar to Arrays in many ways, I was wondering if I could do something like:
XMLList.length = 10;
I know this is not possible because 'length' in XMLList is not a property but is a method. Hence is something like a get method without a set method. Only XMLList.length() would work.
But is ... | stackexchange/codereview |
I have a click function:
jQuery("#element").click(function(e){
var op = jQuery("#box").GetOp();
op.flag1 = false;
op.flag2 = true;
executeFunction();
jQuery("#box").reload();
});
I want the functions executeFunction(); and jQuery("#box").reload(); to execute in serial order only after the pre... | stackexchange/codereview |
today is not my day i am stuck with this problem
how can i access other application preference screen from my application by specifying in the preference screen layout using intent or something
what is the better or correct way to do so??????
thanks in advance
regards,
kariyachan
| stackexchange/codereview |
i am trying to record a video from front camera of iPhone using AVFoundation class while user watches a video...with the help of WWDC 2010 samples i am able to record the video using front camera when the video is not playing but when i try to record it while user plays a video in MPMovieViewController the video does n... | stackexchange/codereview |
I want to be able to (live) stream the frames/video FROM the iPhone camera to the internet. I've seen in a Thread (streaming video FROM an iPhone) that it's possible using AVCaptureSession's beginConfiguration and commitConfiguration. But I don't know how to start designing this task. There are already a lot of tutoria... | stackexchange/codereview |
I have the following html code:
...
// javascript function
if(the user press the user box) {
// do some action
}
...
user: <input type="text" id="user" name="user" />
Email: <input type="text" id="email" name="email" />
There are 2 input boxes. When the user presses either input, it will call a JavaScript functio... | stackexchange/codereview |
We talk about exception handling everyday. We all konw that it is something that is created when execution meet some unexpected situation.
Here come several questions:
What is an exception? What's its most low-level in-memory composition? In .NET, I can think of it as some object instance of some exception type. In th... | stackexchange/codereview |
I'm trying to get a login page to redirect to https and all other pages revert to standard http. When I have /login as the address, it shows up as /index.php?page=login and isn't displayed on a secure page.
The htaccess code in question is below :
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/login$
Rewri... | stackexchange/codereview |
We have a web application which must be deployed as independent subdomains to the url http://clientName.webapp.com. Each client can choose a site name, but the web application are all the same. We are currently running .NET 2.0 moving to 3.5 on iis7, and servers are load balenced with inproc session management done on ... | stackexchange/codereview |
Is it possible to set the minimum number of products required for a category per order in Magento. A client sells wildlife paintings, one of the shop categories is 'cards', it isn't very cost effective to ship less than 6 of these at a time.
How would I force a minimum of 6 products from the cards category?
Thanks,
Dan... | stackexchange/codereview |
I'm doing an AR app that shows a UILabel in the cameraView depending of the position of a concrete place. When the compass of the iphone is leading to the place, the label is shown in the center of the screen.
My problem is that I want this label rotates to the left or the right when I turn the iphone.
I guess there is... | stackexchange/codereview |
I've created a class that can be parameterised by anything that can be converted to Numeric
class Complex[T <% Numeric[T]] (val real : T, val imag : T) {
//... complex number methods ...
}
Then elsewhere in the code I try:
var myComplex = new Complex(0, 1)
This raises a compilation error because (surprisingly) the... | stackexchange/codereview |
here is my web service :
public class Header : System.Web.Services.WebService {
public Header () {}
[WebMethod]
public string GetArchive(string PageID)
{
StringBuilder sb = new StringBuilder();
BusinessRules.News news = new BusinessRules.News();
BusinessObject.NewsItemList newsLi... | stackexchange/codereview |
I want to create a hello world json rest webservice in test.php:
<?php header("Content-type: application/json; charset=utf-8");
$test[] = "hello";
$test[] = "world";
$json = json_encode($test);
echo $json;
?>
But nothing is returned when I test it with ajax below why ?
<html>
<head>
<s... | stackexchange/codereview |
I am developing a Electronic Bill Payment System for a bank which has more than 100 customers subscribing for Electronic Bill Payment.
I have a table in which I am creating profile for customer like the following.
Customer Table
Customer_ID (Primary key)
Customer_Name
Address
Phone
Bill_Master
Customer_ID
Enrollment_... | stackexchange/codereview |
All exes compiled can be decompiled (but with some hardship )
but delphi application forms are saved as dfms inside exe which can be seen easily (with reshacker) (soooo easily ) can i overcome these problems ,first i thought of copying dfm data to oncreate procedure so i can hide my form information .
tell me a good so... | stackexchange/codereview |
Currently, I am testing a ruby script that uses mechanize with ruby 1.9.2 (Ubuntu Lucid packages).
The first line sets following options:
#!/usr/bin/env ruby -KU
Some mechanize post code triggers following exception:
/usr/lib/ruby/1.9.1/www/mechanize/form.rb:222:in `join': incompatible character encodings: ISO-8859-1 ... | stackexchange/codereview |
I have to write a Jira soap client with C# in Visual Studio 2010 but I have problems with getting die client class imported. The solution presented here doesn't seem to work anymore.
Though the class is accessible, all methods have the type
void Foo()
Also, the program "wsdl.exe", which was previously used to manually... | stackexchange/codereview |
A few months ago, I hastily put together a Python program that hit my company's web services API. It worked in three different modes:
1) HTTP with no authentication
2) HTTP with user-name and password authentication
3) HTTPS with client certificate authentication
I got 1) to work with urllib, but ran into problems wit... | stackexchange/codereview |
I'm trying to figure out the best way to handle a backgroundworker that is triggered off radio button clicks. I created a very simple form with 3 radio buttons and a label. Each of the radio buttons share the same event radioButton_CheckedChanged. If the event completes then I update the label to "Complete". If you ... | stackexchange/codereview |
Does anybody know what type of control is used in WP7 Settings > Theme > Background?
| stackexchange/codereview |
I had a LINQ query that loads a hierarchy of objects like the following.
Query #1
var result = db.Orders
.Include("Customer")
// many other .Include() here
.FirstOrDefault(x => x.Customer.CustomerId == 1 &&
x.OrderId == orderId);
I was ha... | stackexchange/codereview |
What is the best way to write a thread safe method?
I have the following method, sometimes i want to call it asynchronously (call it through a thread)
And sometimes i want to call it directly on the main thread.
Is there a problem with keeping the pool (alloc, release) even if I am not calling the method on a separate ... | stackexchange/codereview |
Also, right now whenever I click the 'X" button on top right, the dialog boxes behaves as if I clicked OK (on messages) or YES (on questions). When the user clicks the X, I want DO_Nothing.
In the code below, when i click on the X on the dialog box, it pops out the 'eat!'. Apparently, the X is acting as 'YES' Option, ... | stackexchange/codereview |
I'm injecting a stress test into my web app that connects to a mysql server and I'm monitoring the show processlist of mysql.
When the load is high (high swap i/o) I get many processes like that:
| 97535 | db| localhost | userA | Sleep | 515 | | NULL
| 97536 | db| localhost | userA | Sleep | 516 | ... | stackexchange/codereview |
I'm trying to create a spinning airplane propeller in Java 3D. At the moment, it is rotating around the origin. However, I need it to rotate around itself. I haven't done much 3D graphics in Java, so I'm pretty much stumped.
TransformGroup rotateTheBlades = new TransformGroup();
rotateTheBlades.setCapability(TransformG... | stackexchange/codereview |
I have been trying to find an 'easy' way of including files in my PHP docs that are subject to mod_rewrite address changes.
At the moment our config.php file is located in public_html/lib/config.php, and what I have tried to do is include('lib/config.php') but it errors on pages that have had their address changed by m... | stackexchange/codereview |
Is there some easy way of transforming KeyValuePairs into json
For Example
{ "keyvaluepairs" :
{ "long": "6,5",
"heavy": "200",
}
}
long and heavy are inside the keyvaluepairs? some easyway of doing this?
| stackexchange/codereview |
I have a list of books that displays edit buttons and a bunch of extra info if the user that's logged in is an admin. Right now I have two separate partials that are rendered depending on what type of user is logged in. I used to have just one partial with a bunch of if user.admin? statements, but it started to get r... | stackexchange/codereview |
I'm stuck with the question, simple at first glance
Which event raises when we close ASP.NET popup window by clicking "x" in the top right corner?
| stackexchange/codereview |
My professor posted this online for a lab this week, but I missed the tutorial and didn't find how to do this. Does anyone know? It is just a simple command line thing, but I have been hunting around and can't seem to figure it out...
Hi everyone,
A new version of gdb (version 6.8) has been installed on the servers csb... | stackexchange/codereview |
How can I automatically set the syntax of a certain file extension same as that of an existing language(say Perl) in Gvim ?
| stackexchange/codereview |
[Python 3.1]
I'm following up on this answer:
class prettyfloat(float):
def __repr__(self):
return "%0.2f" % self
I know I need to keep track of my float literals (i.e., replace 3.0 with prettyfloat(3.0), etc.), and that's fine.
But whenever I do any calculations, prettyfloat objects get converted into float.
W... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.