instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
the values are comma separeted so I am using a stringbuilder to build up the values. then write them to the appropriate buffer. I noticed a considerable time spent in the builder.ToString and the Parse functions. Do I have to write unsafe code to overcome this problem? and what's the best way to acheive what I want
... | stackexchange/codereview |
We have a daemon server program which forks one child. When the child exits, Parent is receiving SIGTERM signal. So, we want to know
1) Who sent this SIGTERM?
2) Whether the SIGTERM is only for parent or its group?
3) What are the possible ways SIGTERM can be generated under this scenario?
4) Is it possible to mask th... | stackexchange/codereview |
In my wordpress plugin I need to have a JSON option to load, using jquery, info about a custom post type. This jquery call will come in a page where all users should see it.
as far as i understand from the codex I should have a function:
function my_json_returning_function(){
// get json objects here
echo $jso... | stackexchange/codereview |
This question is related to my other question.
I have an MVC application with caching disabled for all controller actions. I do this by setting cache response headers in Application_BeginRequest:
protected void Application_BeginRequest()
{
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.Ad... | stackexchange/codereview |
I have a Jruby app that spins up several background Java threads that share an ActiveRecord (2.3.5) connection. If they sleep for some time and then try to do something database related, the first queries never execute. I believe this is because the connections are stale, but the code itself doesn't throw any errors.... | stackexchange/codereview |
I noticed a lot of ASP .Net sites does not have the URL ending with ".aspx".
An example would be:
- https://stackoverflow.com/questions
Did they create a Questions folder and put a Default.aspx inside?
In that case, wouldn't there be A LOT of default.aspx in many folders which is hard to maintain (even though it is use... | stackexchange/codereview |
I was given some high-res images, which were originally made for a printed magazine, to show in an iPhone app, like the Xcode PhotoScroller app (like iPhone's native Photo viewer app). I'm down-sizing them to 1024 x 1536 px and I'm going to be slicing them up for use with UIScrollView and CATiledLayer.
When I'm resizi... | stackexchange/codereview |
I'm using L. Bugnion's MVVM Light Framework.
What are some of the recommended approaches to pass parameters such as Customer's ID to ViewModel's constructor?
Edit:
The parameter I need for each ViewModel is not something that is shared across models. it is something unique to each viewmodel instance.
| stackexchange/codereview |
What is difference between ByteBuffer and CharBuffer in case java.nio package. Is it the same difference as byte and char has?
| stackexchange/codereview |
I have Visual Studio 2010 installed. However, MATLAB doesn't find the compiler.
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[0] None
Compiler:
If I answer n to the question, I get the followin... | stackexchange/codereview |
HI Every One. I am new to android Developmemt . Actually my project requires to show Timepicker but i doesnot want to show AM or PM option and also not in the header of the picker, There is any way to do this ?
Please reply ASAP
| stackexchange/codereview |
I want to apply the inner shadow only to the bottom and right sides. Is there a way around this? The few hacks I have seen seem to be relating to regular border shadow, where it's easier to cover up a drop shadow then remove an inner shadow
-moz-box-shadow: inset 0 0 10px #161616;
-webkit-box-shadow: inset 0 0 10px #16... | stackexchange/codereview |
I'd like to create event monitor on DB2 z/OS 9.2
i have spent a lot of time trying resolve this problem.
So i suggest this link: http://www.ibm.com/developerworks/data/library/techarticle/0303kolluru/0303kolluru.html
and trying to make this steps:
db2 => connect to dbname user username using password
db2 => update... | stackexchange/codereview |
import copy
class Polynomial(dict):
def __init__(self, coefficients):
self.coeff = coefficients
def dictionary(self,x):
sum=0.0
d=self.coeff
for k in d:
sum +=d[k]*x**k
return sum
def __add__(self, other):
new=copy.deepcopy(self)
for k,d i... | stackexchange/codereview |
I'm working on an economics project at the moment and a web component was a suggestion in the guidelines, so I jumped into it.
Basically, I have to chart out a graph of the U.S. budget deficit and describe certain key dates.
The bar graph is causing me some grief, however. I have constructed graphs before by generating... | stackexchange/codereview |
I have a report running on hourly basis checking for new orders. It's working great however, I would like to only send the report if there at least one order. If the report is empty - I don't want to send the report at all.
To extend this, I would like to only send the report if there new orders.
Ideas?
| stackexchange/codereview |
I'm getting these warnings:
payment_method.rb:11: warning: multiple values for a block parameter (0 for 1)
payment_method.rb:12: warning: multiple values for a block parameter (0 for 1)
payment_method.rb lines 11 and 12:
class PaymentMethod < ActiveRecord::Base
...
named_scope :expiring_next_month, lambda {|pm| {:... | stackexchange/codereview |
Does anyone know an online "software dictionary"? I want to translate my small application to other languages, it doesn't have much to translate, simple words like Save, Options, Username etc. I don't trust Google Translate to do it because software language is usually different... is there some kind of software langua... | stackexchange/codereview |
I happen to come across the following function pointer.
char (*(*x())[])();
It looks like an array of function pointer in the following format, but I can't see what f -> (*x()) means. How to interpret this messy function pointer?
char (*f[])();
ADDED
With John Bode's help, I make an example as follows.
#include <stdi... | stackexchange/codereview |
Has anyone had tried OpenFaces 3 and can give a short review with respect to the following:
Stability
Compatibility with other libraries (PrimeFaces, RichFaces, etc.)
Ease of use
Skinning capabiltites (Theme support, etc.)
I'm looking for a JSF 2 component library. I'm currently using PrimeFaces 2 and considering usi... | stackexchange/codereview |
I am a little confused about the HttpApplication events.
I have a SessionService* that is initialized from an HttpModule. The HttpModule subscribes to HttpApplication.BeginRequest.
In the module I create a new SessionService().
The constructor of the SessionService setsSessionService.ServiceId = Guid.NewGuid().
... | stackexchange/codereview |
My C# class works as a holder for a bunch of values, which now are stored as properties. In a move to increase extensibility I'm going to add a Dictionary to it, so that people can store whatever properties they want in there, without having to change the class code. However I would like to keep backwards compatibility... | stackexchange/codereview |
I have a table on access database A (store more 60.000 records), which I must import into a table on another Access database B.
In the beginning, table on Access database B stores 3000 records from table on Access database A.
The access database A is handled by another program, and it would be best if I did not have ... | stackexchange/codereview |
Please do help me out in one of the scenario, where I got stucked.
It goes like this.
A dynamically created List of table and List of Fields( inside Table ) using PropertyGrid.
BindingList<Table> table = new BindingList<Table>();
[Serializable]
[TypeConverter(typeof(TableConverter))]
public class Table {
priva... | stackexchange/codereview |
So, I'm not completely sure this is the best idea ever but I do find myself trying to switch tabs in VS 2010 using [CTRL] + [1, etc] to switch windows (tabs). Is it possible to configure VS to behave like a web browser causing CTRL+1 switch to the first open window?
| stackexchange/codereview |
Does anyone ever experience random Hudson server crash? See the following log:
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "env": java.io.IOException: error=12, Cannot allocate memory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.jav... | stackexchange/codereview |
Hi I have teh following code in HomeController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using MovieApp.Models;
namespace MovieApp.Controllers
{
public class HomeController : Controller
{
private MoviesDBEnti... | stackexchange/codereview |
I am implementing the Pivot control in Windows Phone 7.
I want to know which Pivot item is selected and active after the user does a swipe gesture.
How to detect the swipe gesture event related to Pivot control?
Which delegate method should I use ?
| stackexchange/codereview |
I am trying to convert a HSB Color to RGB. The way I am doing that is
System.Windows.Media.Color winColor = value;
System.Drawing.Color drawColor = System.Drawing.Color.FromArgb(winColor.R, winColor.G, winColor.B);
Hue = (byte)(drawColor.GetHue()*255);
Saturation = (byte)(drawColor.GetSaturation()*255);
Luminosity = (... | stackexchange/codereview |
I have an array of objects. The object has two properties a value and an index.
I use a linq to entities query with the contains keyword to bring back all results in a table that match up to value.
Now here is the issue... I want to match up the results to the object index...
what is the fastest best way to perform th... | stackexchange/codereview |
SMALL VERSION OF THE QUESTION: " I need a lib for python or program (pref. for Linux) that receives a list of urls for images and gives me the hmtl for a table (maybe easy to configure(rows and look))
LONG VERSION OF THE QUESTION:
I have and array with a list of url's for images, and I want to make a table (I don't kno... | stackexchange/codereview |
I am working on video player in android.when i created surface holder in on create method ,it did not create.but when i created the surface holder in button onclick method,its created
My coding is,
preview=(VideoView)findViewById(R.id.surface);
preview.setEnabled(true);
preview.bringToFront();
holder=previe... | stackexchange/codereview |
<html>
<head>
</head>
<body>
<cfhttp method="Get"
url="http://localhost:90/myweb/xmlwork/xmlfile.cfm">
<cfoutput>
#cfhttp.filecontent#
</cfoutput>
<br>
<br><br><br>
<!---<cffile action="read" file="http://localhost:90/myweb/xmlfile.cfm" variable="myxml">--->
<cfset mydoc = XmlParse(cfhttp.filecontent)>
<cfset dd =... | stackexchange/codereview |
I am trying to install python on windows, and this is my first day on python. Install goes well on windows 7 x64. But almost all scripts fails. I am trying to install celery and running following command on celery folder.
python setup.py build
and it fails, following is an error
File "setup.py", line 40
except Impor... | stackexchange/codereview |
Whenever I try to quit an application using AppleScript I get the following error
An error of type -9874 has occurred.
The AppleScript command which I am using is
tell application "app_name"
quit
end tell
| stackexchange/codereview |
Is there room in C# for a but operator in C#?
i.e.:
if (checkBox.Checked but comboBox.SelectedItem == null) { ... }
as opposed to
if (checkBox.Checked == false || (checkBox.Checked && comboBox.SelectedItem != null)) { ... }
What other currently non-existent operators could be useful to save typing out a less readabl... | stackexchange/codereview |
I just have two questions on Obj-C.
I have a string value: "234.67". How can i change the dot to comma? Resulting 234,67?
Another questions is, how work the split/division on Obj-C? I have a value, 255.45 and i want to divide it twelve times.
Thanks!
| stackexchange/codereview |
I have a question that I have never been able to solve:
Considering these two architecture
1st
UI layer
|
Application layer
|
Domain Layer
|
Infrastructure Layer
2nd
Client Tiers
|
Presentation Tiers
|
Business Tiers
|
Integration Tiers
|
Resources Tiers
What are the difference between the... | stackexchange/codereview |
Is there a way to detect if the alpha of a pixel after drawing is not 0 when using OpenGLES on the iphone?
I would like to test multiple points to see id they are inside the area of a random polygon drawn by the user. If you know Flash, something equivalent to BitmapData::getPixel32 is what I'm looking for.
| stackexchange/codereview |
My question is: given a list L of length n, and an integer i such that 0 <= i < n!, how can you write a function perm(L, n) to produce the ith permutation of L in O(n) time? What I mean by ith permutation is just the ith permutation in some implementation defined ordering that must have the properties:
For any i and a... | stackexchange/codereview |
I'm trying to do a blog post's comments section where comments are listed below the post.
I have Posts and PostComments classes
I have posts/show.html.erb to show the blog post and I have made a post_comments/_post_comment.html.erb partial to render a comment
in posts/show.html.erb i have the following:
<% @post.post_c... | stackexchange/codereview |
I've downloaded Subsonic 3 from the website.
I added a connnectionstring section to my webconfig and updated the settings file as suggested on the website.
When It builds the code The Context.cs errors with the following:
All the other classes that it's built look ok. The correct table names are there etc. I'm sure t... | stackexchange/codereview |
i m doing a project in java i m using jmf (media package) for the same.it plays mpg mp3 files but it can't play .avi files give me some hint.
| stackexchange/codereview |
I'm not sure if this is effective or not. It works, but sometimes i feel...weird about it. Can you please tell me if this is a good way or not?
I threw the code on pastebin, because i think it's a bit too much to put here: http://pastebin.com/662TiQLq
EDIT
I edited the title to make it more objective.
| stackexchange/codereview |
I have an ASP.NET web site project, which I'm publishing to IIS on my Win2k8 R2 server. It has a default page called login.aspx. I set that up on the published web site.
Trouble is, every time I publish a new version of the web site, the login.aspx entry gets erased from the "Default Document" settings of the web sit... | stackexchange/codereview |
I'm currently reading this amazing book called "Dive into Python". Up to now everything has made sense to me, but the following method has left me with some questions. Its in the chapter about initializing classes:
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDi... | stackexchange/codereview |
We have FullCalendar in use on a community website. There are a large number of events and we would like to add a summary list of the next 15 events (by date). I visualise it being an ordered list with links to the details of the events - so basically the same information / functionality that appears for an event on t... | stackexchange/codereview |
I use SQL Server and when I create a new table I make a specific field an auto increment
primary key. The problem is some people told me making the field an auto increment for the primary key means when deleting any record (they don't care about the auto increment field number) the field increases so at some point - if... | stackexchange/codereview |
I want my users to see one confirm box after say 15 min,alerting them about the session timeout.I want this process to continue repeatedly.
That is even if the user selects cancel from the confirm box he will get the same alert after 15 min.
| stackexchange/codereview |
Do facebook applications written with the help of FBJS need access to cookies? Say for example, my application just gets the the friends of logged in user into an array.
| stackexchange/codereview |
With args=['e:\\lynx\\lynx.exe','-dump',some_url],
subprocess.check_output works fine if the current-directory is e:\lynx.
Elsewhere, it fails with a CalledProcessException and retcode of -1.
For now, I do not wish to add e:\lynx to PATH.
Any thoughts?
| stackexchange/codereview |
How can i replace an attribute in xml using xsl transformation, depending on its value.
For example, if there is such xml
<Text Style='style1'>
...
</Text>
transform it to
<Text Font='Arial' Bold='true' Color='Red'>
...
</Text>
For Style='style2' set another attributes and values, for example Font='Sans' Italic='true... | stackexchange/codereview |
Good Morning at all,
i have a big problem in the following code and no solution, so i hope someone could
help me:
- (IBAction)goToChart {
[rootViewController switchViews];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
... | stackexchange/codereview |
i have sorted array of numbers like
1, 4, 5 , 6, 8
what is the way to find out if this array contain Arithmetic progression (sequence) ?
like in this example
4,6,8
or
4,5,6
remark : the minimum numbers in sequence is 3
| stackexchange/codereview |
One thing I really miss on my windows phone 7 is the ability to set a custom ringtone.
Is it possible to write a program which installs (custom) ringtones for selection in the phone?
Or is there any way to buy/sell ringtones (create a package with a ringtone and sell it on app hub, for example)?
In the German documenta... | stackexchange/codereview |
How does InProc distributed cache in .Net 4.0 deal with serialisation?
Is there any plugins or thirdparty frameworks that support it out of the box?
| stackexchange/codereview |
I've just installed the latest dotTrace (v4.0, evaluation) and I'm trying to profile the code by running tests using TestDriven.NET. From what I've googled out, this should be possible: "Test With... dotTrace" menu item should be visible, but it is not (only the standard ones provided by TD.NET). Has anyone had any luc... | stackexchange/codereview |
I am fairly new to using mysql. I have an application that performs some basic querying. I am also trying to run a simple delete statement -
delete from mydb.mytable
This table is a simple 2 column table with not keys or triggers or anything defined. For some reason, the delete is not being performed. If I run th... | stackexchange/codereview |
I have a lot of items of same class “first”
I want to keep the class of the first item as such without change
I want to make the class of the last item to “last”
I want to remove class of the all items between first and last.
I have tried:
var mailHeadding = $('.first');
$.each(mailHeadding, function (indx) {
... | stackexchange/codereview |
I'm trying to write some code to change the volume name on Mac OS X. Unfortunately, the documentation in this area is less than helpful.
What I have found so far:
FSGetVolumeInfo can be used to get the volume name, but the corresponding FSSetVolumeInfo lacks the parameters to set it.
PBGetVolumeInfoSync can be used t... | stackexchange/codereview |
Guys i have following sql query , that does some mathematical calculation and outputs like this 1.40672427843473E18 , i need to reverse engineering to get the date back.
SELECT (TO_DATE('01112010','DD-MON-YY'))*POWER(2,44)+POWER(2,60) FROM DUAL
to get the original date back i did this
SELECT (1.40672427843473E18/POWE... | stackexchange/codereview |
I am getting warning when installing the distributed build in the iphone as "A valid signing identity matching this profile could not be found in your chain" how can I generate a .p12 file.
After creating the .p12 file what are the steps to use that .p12 file.
I am trying it from 2 days how can i build the distributed ... | stackexchange/codereview |
Background
The enscript command can apply syntax highlighting to various types of source files, including SQL statements, shell scripts, PHP code, HTML files, and more. I am using enscript to generate 300dpi images of source code for a technical manual to:
Generate content for the book based on actual source code.
Dis... | stackexchange/codereview |
I'm trying to build a minimum payment calculator and am having a problem with the minimum payment not being able to calculate based on the current monthly value. What I think should work...locks up the browser. I've commented out the line that is giving me a problem in the code below. I would appreciate if someone c... | stackexchange/codereview |
Possible Duplicate:
Print leading zeros with C++ output operator (printf equivalent)?
#include <iostream>
#include <iomanip>
int main()
{
int n = 16;
std::cout << ???(5) << n << std::endl;
}
I want the output to be 00016
setw() prepends with spaces. Isn't it configurable what characters to prepend with setw()... | stackexchange/codereview |
The standard defines that Unions cannot be used as Base class, but is there any specific reasoning for this? As far as I understand Unions can have constructors, destructors, also member variables, and methods to operate on those varibales. In short a Union can encapsulate a datatype and state which might be accessed t... | stackexchange/codereview |
I am using lightbox and wz_tooltip they both working individually fine.
means when i use tootip for some lightbox link on the page it shows me properly and when i click on that link i can see lightbox properly but when i use tootip function for the link in the lightbox it doesn't work properly. it hides behind the lig... | stackexchange/codereview |
I'm developing a web-app in Rails using jQuery where a lot of the processing is via AJAX POSTs of forms. I need to set up handlers for the various "ajax:" events (ajax:success, ajax:failure), which I think trigger on the <form> element.
Due to Rails, it's easy for me to add a class to the <input type="submit"> elements... | stackexchange/codereview |
How would I set about loading an xml data file inside an AS3 application for iphone? Will there be a cross-domain issue for requesting data files from the device?
| stackexchange/codereview |
After updating to the latest (and now deprecated, sniff...) update of Apple's JDK, Eclipse does not show the source code for JDK classes anymore. It asks me to attach the source location file or folder. Where can I find that?
| stackexchange/codereview |
This is a simplified version of a real query to show the problem. It can be executed on the sample Adventureworks database:
SELECT Person.Address.*,
(SELECT TOP 1 [Name]
FROM Person.StateProvince
WHERE Person.StateProvince.StateProvinceId = Person.Address.StateProvinceId AND Person.StateProvince.TerritoryId IN (5, 6... | stackexchange/codereview |
I have an OpenGL program (written in Delphi) that lets user draw a polygon. I want to automatically revolve (lathe) it around an axis (say, Y asix) and get a 3D shape.
How can I do this?
| stackexchange/codereview |
I have searched the Internet but failed to find a satisfactory answer. What is the threading model present in an OSGi container? Does it simply spawn a new thread to each registered bundle e.g.? Any reference regarding the threading model would be great.
| stackexchange/codereview |
I'm new to multithreading and I'm working on parallelizing an area in my application. I've read a number of posts on this site but I'm still confused as to the best way to approach my problem:
[1] In .NET 3.5, is ThreadPool the only way for a program to exploit the multi-cores in the machine ? i.e. Is it possible to sp... | stackexchange/codereview |
In many pieces of example code I see variables instatiated with null values and later assigned more meaningful values.
I was just wondering why people may do this. I'm guessing try-catch blocks may well come into this, but I also see variables instantiated will null values inside of a try block.
(I'm sure this is a fai... | stackexchange/codereview |
In a sharepoint list, there is a column name "Created By" and "Modified By". When we click on this column values, the page is redirected to user info page. I want to disable this redirection. I just want to show the user who created or modified. how to do this?
| stackexchange/codereview |
I've a
List<String> MyList=new List<string>();
I need to fill the list MyList with n values.
if the value of n is 2 then the list MyList will contain
"A","B"
if 10 then
"A","B","C"....."J"
if 30 then
"A"....."Z","AA","AB",AC","AD"
if 1000 then
"A",....."Z","AA","AB"......"AZ","BA","BB"......."BZ"........"YZ","... | stackexchange/codereview |
I wish to implement a zoom-to-mouse-position-with-scrollwheel-algorithm for a CAD application I work on.
Similar question have been asked (This one for example), but all the solutions i found used the
Translate to origin
Scale to zoom
Translate back
approach. While this works in principle, it leads to objec... | stackexchange/codereview |
So I have a movie clip called signInBtn and one called signOutBtn
initially,
signOutBtn.visible = false;
but when a user signs in
signInBtn.visible = false;
signOutBtn.visible = true;
But after I do that, I can't click the signOut movieclip. I thought it might be because the signOutBtn was under the invisible signIn... | stackexchange/codereview |
I am trying to read in the contents of a file, so that I can commit it to a database (I dont need to parse the data and don't really care what it says).
The files can be anything any arbitry type (.exe, .txt, no extention, etc.), but from what I can tell, there is a non-binary way to read a file, and a specific binary... | stackexchange/codereview |
I am validating my login form. I have created a validation.xml, added the plugin in struts-config.xml, created ApplicationResource.properties file etc. I have done all the necessary things for validation frame work, my application is also running without errors but it is not validating the data. I have rechecked many t... | stackexchange/codereview |
Following this example, I've created a little hello.pyd library file, the contents of which are at the end of this question.
When I enter python interpreter I get the following:
D:\test\build\lib.win32-2.6>C:\Python26\python.exe
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type ... | stackexchange/codereview |
I'm trying to figure the best way to get my functions executing in the correct order.
I have 3 functions
function 1 - squirts OPTIONs into a SELECT via JSON and marks them as selected
function 2 - squirts OPTIONS into a 2nd SELECT and marks them as selected
function 3 - gets the values from the above SELECTs along wit... | stackexchange/codereview |
I am going to have a database with several (less than 10) "main" tables. Additionally to that I want to have hundreds or thousands tables of the same type (let same "user_1", "user_2", "user_3" and so on). Is it possible to put all these tables in a directory/folder? Or database itself is already considered as a "folde... | stackexchange/codereview |
the first param of php mail function is TO. Is there anyway to skip this parameter and use only CC/BCC to send bulk mails?
Thanks
| stackexchange/codereview |
I have written some application in c# .net and I want it to be able be called from Firefox like an add-on.
Add some button in Firefox menu and when it pressed my application is launched.
Is it possible to be done ? If so can you refer me to some tutorial how those things are done .
| stackexchange/codereview |
Given:
public interface PrimaryKey<Key extends Comparable> {
Key getKey();
}
and
public class PrimaryKeyComparator implements Comparator<PrimaryKey> {
public int compare(PrimaryKey first, PrimaryKey second) {
return first.getKey().compareTo(second.getKey());
}
}
This combination works, but gives w... | stackexchange/codereview |
I have a method in an API that takes a lat/long coordinate and will find other coordinates within a specified distance. That distance is in radians.
All the math I do these days deals with accounting or maybe x,y coordinates for laying out UI elements, so I appreciate some help validating these numbers.
Lets ignore ... | stackexchange/codereview |
I'm trying to help undergrads visualize some basic graph algorithms, like Prim's and Dijkstra's. This audible representation of sorting algorithms got a great reaction. I'm looking around for something similar for graphs, but haven't been able to find anything yet.
It would also be cool if I could find some app that wo... | stackexchange/codereview |
Is is there some way to put a publish between clients in the network in Progress 4GL.
An (ugly) way would be to "publish" (write) to the db and let all clients poll the db - but of course I would like to avoid that.
I am using in Progress OpenEdge Release 10.0B02.
| stackexchange/codereview |
I want to do something relatively simple: I want to create a Bitmap object entirely in code, draw on it (lines, text, ellipses, rectangles, points etc.), and display it in a BitmapField on the BlackBerry screen.
Can anyone give me a simple code sample that shows how to do this, or a link to a good sample project?
Upda... | stackexchange/codereview |
I need a little help with (probably) something really simple.
I want to use a script which converts images from color to grayscale.
I got it working partially — the first image turns gray, but the second won’t.
I know this is because an id cannot be used multiple times:
var imgObj = document.getElementById('grayimage')... | stackexchange/codereview |
Possible Duplicate:
Performance Cost Of 'try'
I stumbled upon this remark in "Best Practices for Handling Exceptions" at MSDN:
" using exception handling is better because less code is executed in the normal case"
in the context of whether one should check for the state of an object before calling a method or just c... | stackexchange/codereview |
I have come across this Cocoa application (source code) that shows a main Window.
As long as this window is key it is possible to open the Preferences window from the Main menu as well as by hitting Command-, but when the main window is not key and another window from the same app is, the NSMenuItem is grayed out and ... | stackexchange/codereview |
I added output=AST; to the grammar options at the top of cs.g to print out the tree.
options
{language = 'CSharp2';
output=AST;
}
When I build up the project after the change I got this message:
The command ""C:\Program Files\Java\jre6\bin\java" -cp "C:\Program Files\Java\jre6\lib\antlr-3.3.jar" org.antlr.Tool -mess... | stackexchange/codereview |
So I have a Class object, say for class 'D'. Is there a way to figure out if that class object is a subclass of another Class object, say 'B'? I tried -isKindOfClass: and isMemberOfClass, but neither worked. Thanks!
| stackexchange/codereview |
I've created a module and hosting it in iis7 integrated mode.
The BeginRequest event always get triggered for any request both aspx and html/php/whatever extension.
But the Error event only triggers for aspx extensions, but it works in cassini.
Tried: <modules runAllManagedModulesForAllRequests="true">
It's registered... | stackexchange/codereview |
Is there any documentation about the format Apple uses to save their Text-to-Speech voices?
Is there any application that already can generate such voices?
I'm guessing that most of the information is contained in the file "PCMwave", but I can't figure out what the structure might be.
| stackexchange/codereview |
In my C++\CLI i have this piece of code:
array<Byte>^ out_buf = gcnew array<Byte>(stream_size);
Marshal::Copy(IntPtr(buf), out_buf, 0, Int32(stream_size));
System::IO::MemoryStream^ stream = gcnew MemoryStream(out_buf);
in MemoryStream(out_buf), does memory stream allocate memory again or just take ownership of the o... | stackexchange/codereview |
I'm writing a class for solving sudoku puzzles that has some two dimensional arrays which contain pointers to Cells that point back to these two dimensional arrays. Something like this:
def class Sudoku
attr :rows, :columns, :blocks
def initialize
# build each of the rows, columns, and blocks with a 9x9 map of... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.