instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm writing my own 3D engine and I have this matrix to make a perspective look. (It's a standard matrix so there is nothing interesting)
public static Matrix3D PrespectiveFromHV(double fieldOfViewY, double aspectRatio, double zNearPlane, double zFarPlane, double mod)
{
double height = 1.0 / Math.Tan(fieldOf... | stackexchange/codereview |
I have two tables in the database(videos and viewData) .
Im trying to build a script that runs for each record in the "videos" table and does something using the "videoID" field for that specific entry in the "videos" table. The does something part would be dumping some data into the viewData table.
Would I need to sto... | stackexchange/codereview |
My company is moving from Subversion to Mercurial. One of the reasons is with Hg we hope to be able to work more independently.
We are looking forward to using rebasing as our primary way to update from the main repository, at least in the beginning, to keep the history in one line, making the transition from Subversi... | stackexchange/codereview |
I have this line of string
Fruits-banana|apple|orange:Food-fries|sausages:Desserts-ice cream|apple pie
the : (colon) is the separator for the main topic, and the | is the separator for the different type of sub topics.
I tried to explode it out and put it into array, I need the result to be something like this to be d... | stackexchange/codereview |
How can I read .epub files like iBook application of apple?
Is there any SDK or just java script.
If anyone has any idea please let me know.
Thank You.
| stackexchange/codereview |
I'm using perl with the Net::Telnet module.
My problem is while sending a command that has an output of 1000 rows, the "wait_for" looks for a string in the middle.
The wait_for stops but the buffer is still keeps storing the command's output.
the problem is with the next command that I send - I'm getting the rest of th... | stackexchange/codereview |
I have several lists that I would like to map together, but I can't quite work my head around how to do it.
I am scraping a live feed of Horse Racing results. The feed only lists the course/time once and three horses and their positions (top three) OR four horses and blank (i.e. "") positions IF the race was abandoned.... | stackexchange/codereview |
I have an Entity Framework 4.0 model implemented with pure POCO's (no code generation, no self-tracking entities, just plain old CLR objects).
Now, here is some code i have in my UI to perform an UPDATE:
[HttpPost]
public ActionResult UpdatePerson(Person person)
{
repository.Attach(person);
unitOfWork.Commit();... | stackexchange/codereview |
I am struggling to achieve this simple thing...
I have some static pages which should be like
www.domain.com/profile etc..
The problem is how to write the rewrite rules in order to ..
There would be some fixed rewrites
like /home
I want every file that exists not to be rewritten
www.domain.com/... | stackexchange/codereview |
What is the query to determine the full hierarchy of an employee's managers?
example: Alex is the input
Sara (Manager - Level 1)
James(Manager - Level 2)
David(Manager - Level 3)
Alex(Simple Employee)
| stackexchange/codereview |
i am developing a dating website, in which users can register from all over
the World. The Dating section is divided into cities from again, all over
the World.
The Problem i see here is, i do not have a database that covers all cities
around the Globe.
I am confirming every user by hand so this gives me the opportunit... | stackexchange/codereview |
I have some pretty boilerplate Java code that does a while loop with a tg.getParent() to get the root thread group. This has been working for several months on four different environments (one Windows and three Linux). Recently we added a fifth environment for our Accessment Validation testing. This environment is supp... | stackexchange/codereview |
I need some advice here. I have a bunch of 10 products and every product has atleast 200 different pages associated with it, with varying details about the product. That makes around 2000 pages.
The structure of each page is as follows:
**Product Name
Details About the product ( 500 words or more)
ProductImage | Purc... | stackexchange/codereview |
Hi I´m trying to create a robust facial capture system, which detects facial expressions, like blinks simles,etc, so the it can be translated into an animated model.
I have no idea where to start but I´m looking for some kind of c++ or java library to code this program.
The idea is that the video has to come from a we... | stackexchange/codereview |
private void equal_AxB() {
int x = matrix_A.length;
int y = matrix_B[0].length;
matrix_C = new double[x][y];
for(int i = 0; i < x; i++) {
for(int j = 0; j < y; j++) {
for(int k = 0; k < y; k++){
matrix_C[i][j] += matrix_A[i][k]*matrix_B[k][j];
}
}
... | stackexchange/codereview |
I am using the following code for send the email in symbian c++ (I am using the Symbian_3_SDK_v0_9_en for developing in Windows 7)
I got the application crash when the line "sendAsMessage.CreateL(send, KUidMsgTypeSMTP);" reached.
Please assist me.. How to solve this. I am very new to the symbian c++. Thanks in advance
... | stackexchange/codereview |
I want to know if it is possible to add multiple handlers for the same filter. For my case I use sfGuardPlugins remember me filter, but I would like to use the remember me filter from sfFacebooConnectPlugin.
Can I make both these filters to work on the remember_me filter, or should I create my own filter handler which ... | stackexchange/codereview |
What's the best way to handle lots of connections at once in python? The first way I think of is threading, which works but at 10MB of RAM per thread that's rather expensive.
So what other ways are there to handle lots of connections at once ?
The only problem I see without using threads is that using the socket.recv()... | stackexchange/codereview |
I need to page records but I don't know the Entity's fields. Any way to OrderBy the Key (whatever it is) or simply specify some default OrderBy Lambda?
For example, I can do this with the Where Clause without knowing the Entity's properties:
var myRecords = DC.Products.Where( p => p);
This is a case where the Skip a... | stackexchange/codereview |
I have an array of structures that contain multiple variables:
struct test_case {
const int input1;
//...
const int output;
};
test_case tc[] = {
{0, /**/ 1},
// ...
{99, /**/ 17}
};
int tc_size = sizeof(tc) / sizeof(*tc);
and I want to extract a vector of the outputs so I can compare them... | stackexchange/codereview |
I'm writing a restful XML API for a university assignment, the spec requires no HTML frontend.
There doesn't seem to be any documentation (or guessable functionality) regarding how to change the default format? Whilst thus far I have created all templates as ...Success.xml.php it would be easier to just use the regular... | stackexchange/codereview |
I have the following MessageContracts to use as a request:
<MessageContract(WrapperName:="get")> _
Public Class GetRequest
Inherits BaseAuthenticatedRequest
Protected _typeName As cEnum.eType
Protected _id As Integer
<MessageBodyMember()> _
Public Property TypeName() As cEnum.eType
...
<M... | stackexchange/codereview |
EDIT:Question Updated. Thanks Slott.
I have a TCP Server in Python.
It is a server with asynchronous behaviour. .
The message format is Binary Data.
Currently I have a python client that interacts with the code.
What I want to be able to do eventually implement a Web based Front End to this client.
I just wanted to... | stackexchange/codereview |
I am using jQuery UI for an in-house application.
I am looking for an easy way to remove all style information provided by jQuery UI on a given widget instance. I'm open to really anything, but a reusable javascript solution would be perfect. It's absolutely imperative that no functionality is lost.
the most importa... | stackexchange/codereview |
Is there any way to convert odt documents to doc or rtf on linux without openoffice or any library that relies on having openoffice installed ?
| stackexchange/codereview |
I am loading a component which makes a HTTPService call to get data that will then be used to set certain variables in the component. I make the HTTPService call in an init() function (for the initialization event) and then set the variables according to the data received in the HTTPService result handler. However, t... | stackexchange/codereview |
I've used typedef enum in the past with method parameters and had no problem, but today I'm having problems...
h file
typedef enum
{ eGetVarious1,
eGetVarious2,
} eGetVarious;
- (double)getVarious:(eGetVarious)eVar:(NSDate*)pDate;
an m file
| stackexchange/codereview |
If there are hundreds of form and 20-30 projects in the application and during localization the number of .resx files generated will be very high.
Is there any way to organize the .resx files and satellite assembly?
If I move the .resx file to common assembly then the design time support for previewing the form is lost... | stackexchange/codereview |
I want to do some calculations with polygons. So I need the user to input some x and y coordinates. This is performed by the following code:
private static boolean isX = true;
private static Scanner scanner = new Scanner(System.in);
private static double readDouble() {
double value = 0;
System.out.print("Koord... | stackexchange/codereview |
Here is the scenario
We are load testing a web application. The application is deployed on two VM servers with a a hardware load balancer distributing the load.
There are tow tools used here
1. HP Load Runner (an expensive tool).
2. JMeter - free
JMeter was used by development team to test for a huge number of users. ... | stackexchange/codereview |
I need to develop some classes that should be callable from VB6 with Managed C++ (C++/CLI).
I've developed first a sample in C# and I can use the assembly through COM without problems
just using the setting "Register for COM interop" and "Make assembly COM visible" (and using the attribute [ClassInterface(ClassInterfa... | stackexchange/codereview |
I'm searching for a best practice for securely sending data FROM a remote server TO an android device. This data needs to be secure from anyone sniffing the wire, and I expect HTTPS to handle this much. The real concern I have is this...
The data will be consumed by the app, but the real content hidden from the user. T... | stackexchange/codereview |
Is there a way to only allow a user to check one Checkbutton widget at a time out of a set of Checkbutton widgets? I can imagine some brute-force solutions, but I'm looking for something elegant.
| stackexchange/codereview |
On my web app, I take a look at the current URL, and if the current URL is a form like this:
http://www.domain.com:11000/invite/abcde16989/root/index.html
-> All I need is to extract the ID which consists of 5 letters and 5 numbers (abcde16989) in another variable for further use.
So I need this:
var current_url = "th... | stackexchange/codereview |
Find below the json response...
{"Object":
{"PET ANIMALS":[{"id":1,"name":"Dog"},
{"id":2,"name":"Cat"}],
"Wild Animals":[{"id":1,"name":"Tiger"},
{"id":2,"name":"Lion"}]
}
}
In the above mentioned response, what is the way to find th... | stackexchange/codereview |
How can I change/set permissions of a file or directory using asp.net under mono and apache2?
I have an aspx page that needs to check if a directory exists, if not, it must be created, but with group read permissions set. Tried with DirectorySecurity, but it throws PlatformNotSupportedException.
Apache is using www-d... | stackexchange/codereview |
I would like to numerically find the solution to
u_t - u_xx - u_yy = f on the square y ∈ [0,1], x ∈ [0,1]
where f=1 if in the unit circle and f=0 otherwise. The boundary conditions are u=0 on all four edges.
I have been trying to use ND-solve for ages but I keep getting error messages. I'm new to Mathematica so I do... | stackexchange/codereview |
I'm new in network programming and want to create new socket thread base on a request. My thread send request via tcp/ip socket and waiting the response. How can i using threadpool to create and run threads parallel ? Can anyone show me the sample ? Thank !
| stackexchange/codereview |
I'm building a application to suggest friend lists for facebook user based on his/her mutual friends with each friend. My idea looks like that:
http://i219.photobucket.com/albums/cc213/DoSvn/example03.png
I can get all mutual friends of A with each his/her friend (b1, b2...). It's the intersection between b1, b2... (... | stackexchange/codereview |
How can I get the current ISO language code in IOS?
| stackexchange/codereview |
For example, having:
<script type="text/javascript"
src="http://somedomain.com/js/somejs.js?14">
</script>
So what does "?14" means here?
| stackexchange/codereview |
I'm doing a android app. I want to add icon before the preference. I want to add icon before the title of the inner preferencescreen, checkboxpreference,... like icon|title
Thank you for your help.
like that picture:
Top Android App: Quick Settings Dialogue View
| stackexchange/codereview |
HI,
I have a SP which returning more than 100 fields with 1000+ row. I need to to save all in temp table and and rum my customize query to get the appropriate data.
I did many search but i am unable to find the right solutions for my project. I will appreciate if anyone can share his idea.
create table #SP_Result
(i n... | stackexchange/codereview |
For all submits of all forms of a given site, I would like them to be replaced by a href links. The "a submit button" is done by applying a sprite technique.
So, something around those lines:
#formLogin .submit
{
width:60px;
background:url('../img/botaoLogin.png') no-repeat;
height:22px;
... | stackexchange/codereview |
Assuming I have a piece of code similar to this:
SOMESTRUCTURE *info;
info = malloc(sizeof(SOMESTRUCTURE));
while(something...)
{
info->mini[0] = malloc(sizeof(SOMESTRUCTURE *)); // It's a structure inside the same structure
while(something...)
{
info->mini[x]->name = malloc(sizeof(char *)*st... | stackexchange/codereview |
So I have an object and I want the object to be able to use in 2 different methods. Is it possible? If not, is there any work arounds for this.
| stackexchange/codereview |
this is a handler for building menu
new MenuItem('Owner', lang('Owner'), assemble_url('Owner'), get_image_url('navigation/Company.gif')),
new MenuItem('Client', lang('Client'), assemble_url('Client'), get_image_url('navigation/people.gif')),
One system module class in which i've mapped the route
$router->map('Own... | stackexchange/codereview |
Trying to convert a plain text document into a html document using xslt, I am struggling with unordered lists.
I have:
<item>some text</item>
<item>- a list item</item>
<item>- another list item</item>
<item>more plain text</item>
<item>more and more plain text</item>
<item>- yet another list item</item>
<item>even mor... | stackexchange/codereview |
I have the following that selects a list of benefits for a given product:
foreach (var benefit in Model.Products.Where(x => x.ProductId == "454").SelectMany(p => p.Benefits).Where(b => b.HeadlineBenefit == false))
However I want to change this to select a list of befits for the first product in the collection. I thoug... | stackexchange/codereview |
here's the problem: I have a custom hardware device and I have to grab images from it in C#/WPF and display them in a window, all with 120+ FPS.
The problem is that there is no event to indicate the images are ready, but I have to constantly poll the device and check whether there are any new images and then download t... | stackexchange/codereview |
I have a view with one UIImageView and a slider. Slider Min 1 Max 10. When slider is moved UIImageView should display a different image. Slider is 1 test1.png will display, slider is 2 test2.png will display, slider is 3 test3.png will display etc...
In Interface Builder I have connected IBOutlet slider to Horizontal ... | stackexchange/codereview |
I know that this question could have been asked a million times before, but unfortunately I can't compile all these answers to get it working.
I want to write a PHP code that uses facebook graph API, to search for a profile (by name for example) and then grab this information to a local store. I revised facebook graph ... | stackexchange/codereview |
How can I delegate the invocations within a baseclass to the base class implementation rather than the inherited class implementation? For example:
class A
def foo
p "hello"
end
def bar
foo
end
end
class B < A
def foo
p "world"
end
end
A.new.bar
# prints "hello"
B.new.foo
# prints "world"
... | stackexchange/codereview |
I'd like to programmatically add user forum permissions in Drupal.
Do I have to use ACL module? Is there any example out there, as the documentation is a bit thin?
| stackexchange/codereview |
I need to get how many checkboxes are checked in listbox. Do you have some idea how to get it?
| stackexchange/codereview |
I am newbie in C#.I have one confusion.
There are two classes A and B.
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
A objA = new A();
A objB = new B();
}
}
class A
{
public void MethodA()
... | stackexchange/codereview |
So i'm having trouble figuring how to overcome this.
Take for example, i have a red black tree implementation that works with items:
typedef unsigned long int Key;
struct rbt_node{
Item item;
int color;
Key key;
struct rbt_node* parent;
struct rbt_node* left;
struct rbt_node* right;
};
then in ... | stackexchange/codereview |
Are there methods in Mono C# to interact with file ACLs and extended ACLs?
I found the assembly Mono.Posix.dll, and the class UnixFileInfo.
This can give me nice things like the owner group and user, but no ACLs.
Does it exist? Or would I have to basically use DllImport for everything?
| stackexchange/codereview |
I am curious if you have a string how would you detect the delimiter?
We know php can split a string up with explode() which requires a delimiter parameter.
But what about a method to detect the delimiter before sending it to explode function?
Right now I am just outputting the string to the user and they enter the de... | stackexchange/codereview |
I was asked this question in an interview and I gave various solutions but the interviewer was not convinced. I am interested to find a solution. Please throw in your views :
Q: Write an efficient data structure to implement the shuffle in an ipod. It must play all the songs, each time in different random order, the s... | stackexchange/codereview |
I have published a website on my windows server using IIS 7.0 and visual studio 2010. Its an asp.net project.
While publishing it I chose the option
"Allow this precompiled site to be updatable"
But what I do not know is how to update it when I change my templates/pages/IP address etc in my visual studio project file... | stackexchange/codereview |
hi i'm building app with some rich text content on it and text content i have with NSMutableAttributedString. I cought links in my text with regex and made it blue but don't see the way to add some interaction to string ranges of NSAttributedString. is it any way? is there a way to do so?
thank you
| stackexchange/codereview |
I'm so sure that this must exist, but if it doesn't maybe there is a macro for it...
One of my most favourite features of vim is the insert before when in visual mode (<C-v>, select the lines, <C-I>, type a little, then Esc).
My issue is that I want to paste the clipboard contents before, not 'insert'. I tried <C-P> bu... | stackexchange/codereview |
Recently I have been thinking combining C# applications with a website, so that we can run multiple threads in C# and complete more tasks in the time it would take PHP would to do 1.
Most of us know that PHP Runs on a single thread and therefor we cant do multiple actions at the same time
But it would be nice if we can... | stackexchange/codereview |
Possible Duplicate:
Android app loading images from /drawables-nodpi/ with scaling
I recently rebuilt my Android project to target 2.2 from 2.1.
In the old project, I did not specify a target SDK (the manifest did not contain something like: android:minSdkVersion="8"). This gave me an error in the console when runni... | stackexchange/codereview |
My application of OEIV Filter doesn't seem to be getting applied to my Struts actions. I am using Spring 3, Spring Security 3, Struts2, Tiles2 and JPA backed by Hibernate 3. When I try to access a collection for an entity in a struts action, unless the Entity has a fetch type of eager, I am getting a JPA LazyInitializa... | stackexchange/codereview |
I have seen this function call get_query_var('paged') work in other places
my page is /news/page/2
But get_query_var('paged') is allways returning 0.
What gives?
Thanks!
| stackexchange/codereview |
I am new in c++ programming and I have been trying to convert from const char* to unsigned int with no luck.
I have a:
const char* charVar;
and i need to convert it to:
unsigned int uintVar;
How can it be done in C++?
Thanks
| stackexchange/codereview |
(I am new to perforce and am trying to avoid getting myself into problems, I have hit problems doing this with other source code control systems)
When I rename I class I need to
Change the class name it’s self
Get Visual Studio to Refactor all the code that uses the class
Rename the file in the Visual Studio project
R... | stackexchange/codereview |
I want to setup a Blackberry OTA downloader using Servlets. How do I set the URL for .jad and .cod files? I have set the content type for both files. How do I send both files to the client when I receive a request from the client? Do I need to create two servlets or is one enough?
| stackexchange/codereview |
I place a file name g.rb in side Rails.root/lib folder
The file content is like this:
module Google
end
Then I add
config.autoload_paths += %W(#{config.root}/lib #{Rails.root}/app/delayed_jobs)
to my Rails.root/config/application.rb
However, when I try to invoke Google from rails console, an exception is thrown. The... | stackexchange/codereview |
I want to support the following scenarios on my ASP.NET MVC website:
First time visitor wants to
register, via facebook connect. I'd
like the user to have an entry in my
user membership table - so I have
them enter a username/password
(email gets populated via facebook
connect).
Registered user returns to my
site, log... | stackexchange/codereview |
I would like to know the OpenGL Rendering settings for having a program render OpenGL over top of any window on screen that has a specific color code (screen-level buffer?)
I.E. VLC Media Player and Media Player Classic both have rendering modes which allow you to full-screen then minimize player, but maintain watching... | stackexchange/codereview |
How would I make the following JTextArea scrollable?
private JTextArea getJTextArea1() {
if (jTextArea1 == null) {
jTextArea1 = new JTextArea();
jTextArea1.setBounds(new Rectangle(225, 162, 68, 29));
jTextArea1.setText("text");
}
return jTextArea1;
}
| stackexchange/codereview |
Entity's are classes that map directly to our database (which we use for Hibernate).
Our service classes contain business logic with these Entities before DAO is called.
We also have Command Objects, which are POJO's that relate to specific views. I've been told that the Entities themselves shouldn't be used as comman... | stackexchange/codereview |
Here's my code
Dim RefsUpdate As String() = Session("Refs").Split("-"C)
Dim PaymentsPassedUpdate As String() = Session("PaymentsPassed").Split("-"C)
Dim x as Integer
For x = 1 to RefsUpdate.Length - 1
Dim LogData2 As sterm.markdata = New sterm.markdata()
Dim queryUpdatePaymentFlags as String = ("UPDATE OPENQUERY ... | stackexchange/codereview |
I've created a simple test case exhibiting a strange behavior I've noticed in a larger code base I'm working on. This test case is below. I'm relying on the STL Map's "[ ]" operator to create a pointer to a struct in a map of such structs. In the test case below, the line...
TestStruct *thisTestStruct = &testStructMap[... | stackexchange/codereview |
I want print PDF file from the client machine. The PDF file exists on the server.
Please help.
| stackexchange/codereview |
my css for the menu
ul#menubar {
width: 800px;
padding: 27px 10px 5px 10px;
list-style: none;
text-align: center;
}
ul#menubar li {
display: inline;
}
ul#menubar li a{
border-right: 1px solid #111111;
font: 12px "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unico... | stackexchange/codereview |
We're currently in the process of upgrading our build scripts from 3.0 to 3.5, and fixing a bunch of old ICE errors along the way. I've read through a number of articles, but I'm slightly confused as to what is usually the best approach to using companion files.
Now, assuming File A.manifest is a companion file to A.ex... | stackexchange/codereview |
I inherited a huge code base which was written to work on Windows XP. Now we would like to migrate to Windows 7. I do not know what is the proper way to go about this. What is the proper approach to do the above task? I did some googling on differences between XP and Windows 7 but I do not get any proper links which de... | stackexchange/codereview |
I have a web page where you can customize your game character. In order to speed up browsing (gems) I load entire gems database (600 entries, 247KB) as a separate .js file, so it can be cached and I don't need to load it every time.
I don't notice a delay, is it still a bad idea?
Should I ajax-get necessary records on ... | stackexchange/codereview |
I have a result that looks like this when I do a print_r($array);
(
[0] => 96
[1] => 95
[2] => 94
)
Array
(
[0] => 96
[1] => 95
[2] => 94
)
Array
(
[0] => 96
[1] => 95
[2] => 94
)
How can I simply return something like "96,95,94"? And not return all 3 duplicate instances?
Thanks
| stackexchange/codereview |
I have a ListActivity and a MapActivity. I would like to launch either one of these activities on application startup that has been chosen by the user in a preferences window.
So far the only way I see to launch an activity on application startup is to specify it in the application manifest file using...
<activity a... | stackexchange/codereview |
I need to encrypt some info using my Public/Private key, and allow the other party(users) to ONLY DECRYPT what I encrypted. I don't want them to be able to know how I encrypted my message. How it is possible in .NET using public and private key pair?
I tried RSACryptoServiceProvider in .NET but the issue with that is
i... | stackexchange/codereview |
Consider this script:
function Obj(prop) {
this.prop = prop;
}
var NS = {
strings: ['first','second','third'],
objs: [],
f1: function() {
for (s in this.strings) {
var obj = new Obj(this.strings[s]);
obj.f2 = function() {
alert(obj.prop);
}
... | stackexchange/codereview |
http://www.bunzburgerz.com/
If you look at the background image I'm not able to get it to position to the bottom of the page. Despite having height: 100%, the body tag doesn't want to make it work.
Any suggestions?
| stackexchange/codereview |
At Android application, it always extends Activity and the entry is onCreate. So it seems that user has to select application and click to luanch it.(if it is wrong,please advise me. sorry)
So, how to implent a service running on background without user clicking to start application?
| stackexchange/codereview |
How can I change position of the map, from where it is pointing now, to ie. 45.00,19.00, but in a runtime, now when map is initialized?
my application have to "jump" from some coordinates to other, so that's why I need this ability.
| stackexchange/codereview |
Pretty much the title explains what I try to achieve.
Having a set of points in two dimensions, I want to create somehow the curve tha passes from all these points.
Whether it will be a graphical window with the mathematical curve or just a jpg produced, is of no importance.
Any help? Thx!
| stackexchange/codereview |
I'm taking some C++ classes and have send the teacher 9 exercises, each exercise is a simple directory with the name 'ex$' where $ is the number. Each directory has a single source file named 'ex$.cpp. I want to create a makefile that will allow me to type:
make ex$
And it will build a executable that corresponds to ... | stackexchange/codereview |
My application has several tables: a master OBJECT table, and several
tables for storing specific kinds of objects: CAT, SHOE and BOOK.
Here's an idea of what the table columns look like:
object
object_id (primary key)
object_type (string)
cat
cat_id (primary key)
object_id (foreign key)
name (str... | stackexchange/codereview |
A typical SWT sample code looks like the following code:
final Display display = Display.getDefault();
final Shell shell = createMyShell(display);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
What is the difference between Display and Shell?
If mult... | stackexchange/codereview |
Pretty straight forward question. I'm quite happy with my simple text editor but sometimes it'd be nice to run something like PyFlakes on my code before running to check for any obvious errors like undeclared variables or syntax errors.
| stackexchange/codereview |
I am looking at the assembly language code of a switch statement.
I understand how the code works and what the cases are. My question is how do I decide on the case names?
Below is the assembly language code, which will be followed with my interpretation of it. I basically just need to use the jump table and fill in t... | stackexchange/codereview |
This is an interview question: "You're given a string, and you want to split it into as few strings as possible such that each string is a palindrome". (I guess a one char string is considered a palindrome, i.e. "abc" is split into "a", "b", "c".)
How would you answer it?
| stackexchange/codereview |
I'd like to display all roles from database as check-boxes and check the ones that the current user is already in.
Question: How can I check the check-boxes where the user is already in that role.
<?php
// DB QUERY: get role names
// ------------------------------------------------------------------
$get_roles = mysql... | stackexchange/codereview |
Context
I'm working a c# module which is responsible to integrate our business with an external entity as part of our SOA system. The external entity provides web services. They're a throughly tested as it is a federal government product.
The module has been developed using test-driven approach, we use nUnit and everyt... | stackexchange/codereview |
I have the following collection of nodes and edges. What I want to do is to find all the distinct graph from it.
my %connections=(36=>[31],10=>[3,4],31=>[30,22],30=>[20],22=>[20,8],20=>[1],8=>[5],5=>[2],2=>[1,20], 3=>[7]);
In this example it will yield:
my %all_graph = {
graph1 => {36=>[31],31=>[30,22],30=>[20],2... | stackexchange/codereview |
I am using the following script to get the running process to print the id, command..
if [ "`uname`" = "SunOS" ]
then
awk_c="nawk"
ps_d="/usr/ucb/"
time_parameter=7
else
awk_c="awk"
ps_d=""
time_parameter=5
fi
main_class=RiskEngine
connection_string=db.regression
AWK_CMD='BEGIN{pr... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.