instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
In Core Data is there a way to have one instance of an object to have multiple links to another? This is best understood with an example. You have a shopping cart object, ShoppingCart, and you have books, Book. How do you properly put multiple copies of the same book into the cart?
No matter how many times you run [sho... | stackexchange/codereview |
I'm learning assembly using the MARIE program but I can't figure out hot to do this question from the book:
Divide one number by another and store the quotient and the remainder in two different memory locations.
This is what I have so far, what am I doing wrong? FYI there is no divide or multiplication built into th... | stackexchange/codereview |
I had Rails 2.3.5 installed, and wanted to upgrade to 2.3.10 as a stepping stone to Rails 3. I thought running gem install rails -v=2.3.10 would install 2.3.10 and keep 2.3.5 as well. But now when I do rails -v, it only lists Rails 2.3.10. How can I install different versions of Rails and keep the existing ones?
| stackexchange/codereview |
I'm developing a mobile wep app, and would like to allow my users to login using Facebook connect.
I initially implemented the standard Oauth2 authentication, but I found a couple issues:
When I install the app as a home screen shortcut and the user needs to authenticate the user is redirected to facebook's site for ... | stackexchange/codereview |
How can protecting my server from malicious activity when accepting and executing uploaded, untrusted code?
The users should be able to implement my interface and given data, perform some calculations and return data. No I/O operations are required and certainly no thread/process manipulation or other tomfoolery.
Using... | stackexchange/codereview |
I have a website centered around an online chat application where each user can have up to several hundred contacts. Each contact has there own profile image. I want to make it so that the contact's profile image is loaded next to there name. However, having the user download 100+ images every time they load the site s... | stackexchange/codereview |
I have a UILabel I created on one of my views in my application. I have it set to a static text in IB, but I'm going to change that text programmatically.
Here's how I was trying to do it.
fahrenheitLabel.text = (@"Temperature: %@", text);
//fahrenheitLabel is my UILabel
//"text" is a NSString
I expected the outpu... | stackexchange/codereview |
Let's take a simple example, a blog post. I would store comments to a particular post within the same document.
messages = { '_id' : ObjectId("4cc179886c0d49bf9424fc74"),
'title' : 'Hello world',
'comments' : [ { 'user_id' : ObjectId("4cc179886c0d49bf9424fc74"),
... | stackexchange/codereview |
My WP7 application requirement is to send the email with an attachment and use device default SMTP settings.
I have tried EmailComposeTask class but it doesn't have any member for attachment.
The other idea, i am thinking is to upload the file on server and then send the email from that server.
What you think if there ... | stackexchange/codereview |
I am kinda new to WCF and the setting up of service and have 2 questions. My first question I have a service that will be accessed via https on a web server. However locally on my local IIS7, it will be accessed via http as https is not available. How can I set up a service to be accessed by both?
My second question is... | stackexchange/codereview |
I am trying to implement a (non-concurrent) NSOperation for location updates using the iPhone SDK. The "meat" of the NSOperation subclass goes something like this:
- (void)start {
// background thread set up by the NSOperationQueue
assert(![NSThread isMainThread]);
if ([self isCancelled]) {
return;... | stackexchange/codereview |
I have the following problem using Joda-Time for parsing and producing date and time around Daylight Saving Time (DST) hours. Here is an example (please, note that March 30th 2008 is Daylight Saving change in Italy):
DateTimeFormatter dtf = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");
DateTime x = dtf.parseDateTim... | stackexchange/codereview |
My Goal
I am attempting to make a Java program in which a user can select any .class or .jar file from their computer. My program will then pop up a JInternalFrame with a JEditorPane in it as the console, capturing any console output from the user's program. When the user's program closes (calls System.exit(int status... | stackexchange/codereview |
I would like the main layout file (main.xml) respond to the main activity. I would like a TextView inside the layout file only to show if a variable, located in the main activity, equals a certain number, like 0. If the variable is 1 or 2, I want it to show something else.
What's the easiest way to perform this? I'm no... | stackexchange/codereview |
I downloaded the daterangepicker available here : filament group
I am using jQuery 1.4.x version in my page, and all other plugins I am using are supported only on latest version of jQuery.
The daterangepicker tool fails because it is using date.js (which uses a very old jQuery).
If I use datepicker, all other plugin... | stackexchange/codereview |
I have UIPickerView component that receive data from its datasource (NSMutableArray) which is populated from sqlite.
When user click on button new data row is added to databse.
Now I need to reload UIPickerView to display fresh data from datbase.
I know that I need to use method [storedDataPicker reloadAllComponents]; ... | stackexchange/codereview |
I got this some kind of permission error in my log. Everything was working fine previously, I have tested the photos controller of mine, and it worked well. So I started working on other controllers. Then somehow I found this error happening. Appreciate if someone could help.
Processing PhotosController#create (for 1... | stackexchange/codereview |
I have the following code(Server is Tomcat/Linux).
// Send the local file over the current HTTP connection
FileInputStream fin = new FileInputStream(sendFile);
int readBlockSize;
int totalBytes=0;
while ((readBlockSize=fin.available())>0) {
byte[] buffer = new byte[readBl... | stackexchange/codereview |
I have a table within another table, that look like below. What I want is to have the +0 all line up vertically. I have them float:right. The problem is there is a small gap, as you can see, between the two tables, making the +0 of the inner table indent inward a bit. Is there a way to take out these gap?
EDIT Image ... | stackexchange/codereview |
How can I set up the designed in visual studio to put a space after my javascript functions?
At present when I press the return key I get this
var myfunc = function() { .... };
When I want this
var myfunc = function () { .... };
Know its a setting somewhere but cant find it - will help with my JSlinting!
| stackexchange/codereview |
Here, I wondered about how to implement Collection#toArray(T[] array) properly. I was mostly annoyed that array.getClass().getComponentType() is of type Class<?> and not Class<? extends T> as I would have expected.
Therefore, I coded these three functions:
@SuppressWarnings("unchecked") static <T> Class<? extends T> cl... | stackexchange/codereview |
I'm trying to "skin" my Flash application's buttons using either ActionScript or Flash Professional, without having to rely on Flex code or libraries.
Right now my buttons have no skins at all, though there is black text where the label is, so I know they're there.
I've tried using the getStyle and setStyle methods, bu... | stackexchange/codereview |
I have a class library and was to add a resource file to it to support both English and Spanish.
Any tips as how I can do this? The language will be dictated by the user visiting the site. Would like to have to only load each resource file once and cache or set in static variable and avoid any overheads.
| stackexchange/codereview |
I am new to this of course.
I am trying to configure PHP and Apache on a new Amazon EC2 AMI. This is a very lightweight server so the Micro instance fits the bill.
I just need
Apache
PHP
I ran
sudo yum install apache2
sudo yum install php
I copied info.php to /var/www/html
info.php only contains
<? phpinfo(); ?>
... | stackexchange/codereview |
I am using Erica Sadun's method of Asynchronous Downloads (link here for the project file: download), however her method does not work with files that have a big size (50 mb or above). If I try to download a file above 50 mb, it will usually crash due to a memory crash. Is there anyway I can tweak this code so that it ... | stackexchange/codereview |
I have in my database longitude-latitude verticies from user-defined polygons. My questions is: how do I recreate and display them on a map now? This is quite easy to do with the Google Maps API, but I can't find any documentation or examples on how to do this with OpenLayers. Has anyone had any experience doing this? ... | stackexchange/codereview |
Thought I would try out Spring Roo so I've had loads of new fun problems today. Hopefully you guys can help me with latest one. Roo has the ability to generate integration tests for your entities, but most of them fail for me. The most common failure is some form of constraint violation like null is being inserted into... | stackexchange/codereview |
I'm getting the chance to develop a mildly complex project and have been investigating the various approaches that I can use to tackle this project. Typically I would have ran with the traditional 3-Tier approach but after spending some time looking around at various options I've got an inkling that some kind of ORM m... | stackexchange/codereview |
How can I pass a parameter to the method called by a NSTimer? My timer looks like this:
[NSTimer scheduledTimerWithTimeInterval:4 target:self selector:@selector(updateBusLocation) userInfo:nil repeats:YES];
and I want to be able to pass a string to the method updateBusLocation. Also, where am supposed to define the me... | stackexchange/codereview |
I am trying to run a batch script from within a c sharp program the code I am using is shown below:
Process proc = new Process();
proc.StartInfo.FileName = "G:\\Media\\Downloads\\print.bat";
proc.Start();
The script is simple (for testing purposes) and contains one line:
echo hello > output.txt
When I run the scri... | stackexchange/codereview |
My Android app, which uses a TabActivity to display its contents, has 4 tabs which all use a state-list drawable for the icon. They all have the same structure, just with different images:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item andr... | stackexchange/codereview |
I have a question about generics.
I have a function that knows about a class type of object that I want to create:
public static <T> XmlParserInterface<T> createXmlParser(Class<T> rootType, String currentTagName) {
XmlParserInterface<T> result = null;
if (rootType.equals(List.class)) {
result = new XmlParserList<... | stackexchange/codereview |
I want to manipulate a pickled python object stored in S3 in Google App Engine's sandbox. I use the suggestion in boto's documentation:
from boto.s3.connection import S3Connection
from boto.s3.key import Key
conn = S3Connection(config.key, config.secret_key)
bucket = conn.get_bucket('bucketname')
key = bucket.get_key... | stackexchange/codereview |
Is there a NoSQL (or other type of) database suitable for storing a large number (i.e. >1 billion) of "medium-sized" blobs (i.e. 20 KB to 2 MB). All I need is a mapping from A (an identifier) to B (a blob), the ability to retrieve "B" given A, a consistent external API for access, and the ability to "just add another c... | stackexchange/codereview |
I'm working on a project right now where we have to implement all communications to the database via stored procedures. We are using Linq-to-SQL, so all the database entities are in place. My question is how you could write a stored procedure that returns an entity, if this is possible.
Example, we validate a user when... | stackexchange/codereview |
I am facing strange problem with eclipse [Ganymede]. Once I added some breakpoints in my code and now even after I delete all those breakpoints, it appears again when I start the eclipse.
So, regularly first thing what I have to do after starting the eclipse is manually delete all breakpoints to start working. Probably... | stackexchange/codereview |
I want to use the image in view which will move like marquee as in HTML,from one end to another end of view.
Could anyone provide me with that code how to do that.
Thanks in advance n please help me out with this.
| stackexchange/codereview |
I'm learning JQuery and I'm trying to understand how to parse an unsorted list.
My script works and it can highlight in yellow sublist (click on "level 2C" and 2d anchor), but i'm unable to highlight only level 3 or only level 4.
Any clue on how to do that ? Thanks.
Here is my code :
<script type="text/javascript" ... | stackexchange/codereview |
So, when I save the data into database, PHP will add a \ on single or double quotes. That is good.
However, when data is passed back to the client using json_encode(); TEXT like McDonald's is STORED as McDonald's in the DB but once passed back from PHP to js, it will be encoded as McDonald\'s
Since I'm using jQuery,... | stackexchange/codereview |
I have some trouble with PEAR when I'm using the Mail_mime class to send out HTML/text mail with embedded images.
What I need script to do, is to provide an email with both a text and HTML version of the content. The content will be somewhat different.
The text version will contain some text, and an image attachment.
... | stackexchange/codereview |
I have a very simple application that use a 2 component UIPickerView that causes me a crash every time I click over it. I dragged it into my view by IB, then hooked up dataSource and delegate to File's Owner. In the .h file:
@interface SettingsViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDeleg... | stackexchange/codereview |
I remember a while ago reading about an alternative (aka faster) way to perform a getPixel()-ish method.
Problem is, I don't remember where I read that, and I've searched thoroughly.. I think.
The answer had something to do with locking the Bitmap in memory, or something like that.
I need to run getPixel() multiple t... | stackexchange/codereview |
With an extreme amount of SO user help, I used ASP.NET MVC 2 Futures to employ JSON to load 600 some products and display them with Microsoft Jquery templates in 400ms with the code below.
Is there a way to use Microsoft JQuery Linking to bind the object to the generated form data without looping through every one? (A... | stackexchange/codereview |
I'm an android-newbie and I'm looking for a solution, how to overlap a horizontal-scrolling image-gallery with a vertical-scrolling image-gallery. that means one transparent image of the vertical-scrolling gallery should overlap one image of the horizontal-scrolling gallery (like a cross).
furthermore it should be pos... | stackexchange/codereview |
Say I have a file containing these lines:
tomatoes
bananas
tomatoes with apples
pears
pears with apples
How do I replace every line containing the word "apples" with just "oranges"? This is what I want to end up with:
tomatoes
bananas
oranges
pears
oranges
| stackexchange/codereview |
I'm building an ecommerce application and I have a controller that is responsible for the buy process.
What I've noticed in creating the methods within these controllers is that each method is responsible for processing input from previous view.
So I have a Quote method that returns a Quote view, and the user is intera... | stackexchange/codereview |
Possible Duplicate:
Problems when handling orientation changes
I have a very simple Activity...
public class ShowOrientation extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d("ShowO... | stackexchange/codereview |
I'm working with a large data frame called exp (file here) in R. In the interests of performance, it was suggested that I check out the idata.frame() function from plyr. But I think I'm using it wrong.
My original call, slow but it works:
df.median<-ddply(exp,
.(groupname,starttime,fPhase,fCycle),
... | stackexchange/codereview |
In MFC Treeview control, how i can check condition if particular child node is already present in treeview?
My requirement is like if particular child node is present in treeview dont add it again in that treeview...
Any code snippet is welcome ........
Thanks.
| stackexchange/codereview |
I'm new to BIRT and looking for some help. I've already set up a basic grouping that for every "Computer Host" shows a table with the current virtual running and its operative system.
In BIRT I have a table with a group "Hosts" (data item). Then I have the data items "Virtual Machinese Name" and the data item "OSnameOf... | stackexchange/codereview |
I am using windows Authentication and accessing user name as.
IIdentity winId = HttpContext.Current.User.Identity;
string name = winId.Name;
but i want to get other details like User full name and EmailID.
| stackexchange/codereview |
I have made a c++ wrapper for an allegro bitmap. I create an AguiBitmap as a global variable for testing, then later I say,
bitmap = AguiBitmap("somepath");
after allegro has been initialized.
However, when I close the application, it crashes in the bitmap's destructor. If I do al_destroy_bitmap(0); its fine, but the... | stackexchange/codereview |
Our project is Rails 2.2.2, maybe it can't use Bundler? (or maybe for some other reasons, Bundler cannot be used)
Then in that case, what is the most preferred way of freezing the gems into the project source tree?
Some that I know of are:
rake gems:freeze
needs gemsonrails and it doesn't work with the current gem 1... | stackexchange/codereview |
Is there an Image cropping Activity in Android? I know that when you save an images as your wallpaper, it pops up an image cropper... and I've looked into the sourcecode for that, but it depends on a LOT of gallery specific stuff. Not very reusable.
Does anyone know how this might be done, or are there any third part... | stackexchange/codereview |
I want to define a schema that allows child elements to occur in any order, similar to <choice minOccurs="0" maxOccurs="unbounded"> but will allow only one of each element, similar to <sequence minOccurs="1" maxOccurs="1">
can this be done?
for example
<Root>
<ele1>
<ele3>
<ele2>
</Root> <!--Valid-->
And as belo... | stackexchange/codereview |
In hope to simplify a homework problem dealing with inheritance, I thought it might be better to use polymorphism to accomplish the task. It isn't required, but makes much more sense if possible. I am, however, getting symbol errors making it work as I thought it should or just the base class definition is called. I... | stackexchange/codereview |
I'm looking for a simple way to add a post to a user's wall when this one just allowed my application.
I have the publish_stream & status_update enabled in the below code.
'req_perms' => 'email,publish_stream,status_update'
Now I'm just looking how I could make a simple Wall post like "'username' is now using xxx appl... | stackexchange/codereview |
I have a portfolio application that lists projects and their detail pages. Every project generally has the same information (gallery, about etc. ), but sometimes the user might want to add extra information for a particularly large project, maybe an extra page about the funding of that page for example.
Would it be po... | stackexchange/codereview |
I tried many "Display" param in CSS and seem none able to set a proper alignment, please help me to solve it.
<div id="fadeshow2toggler" style="text-align:center; width:290px;">
<a href="#" class="prev"><img src="http://i31.tinypic.com/302rn5v.png"/></a>
<div class="status">1 of 1</div>
<a href="#" class="n... | stackexchange/codereview |
I have Camera class, which handles camera behavior. Among it's fields is a reference to the target's Cube class (Cube is just one of the object, but I won't mention others to keep it simple). In order to calculate the View matrix, I need the camera's position and target's position, so I can explain to my program that: ... | stackexchange/codereview |
Where can I find source code for travelling salasman problem?
| stackexchange/codereview |
File monday.csv
223.22;1256.4
227.08;1244.8
228.08;1244.7
229.13;1255.0
227.89;1243.2
224.77;1277.8
File tuesday.csv
227.02;1266.3
227.09;1234.9
225.18;1244.7
224.13;1255.3
228.59;1263.2
224.70;1247.6
This Perl one-liner gives me the row with the highest value in the second column from the rows where in the first col... | stackexchange/codereview |
The first part of the TDD cycle is selecting a test to fail. I'd like to start a community wiki about this selection process.
Sometimes selecting the test to start with is obvious, start with the low hanging fruit. For example when writing a parser, an easy test to start with is the one that handles no input:
def tes... | stackexchange/codereview |
Can anyone answer a quick question for me? I'm working on a control that contains multiple types of subcontrol. This is so that it can represent a heirachial list.
--Group--
--Company--
--Site--
--Group--
Due to the increasing complexity I'm looking at the posssibility of using collections. I found an article ... | stackexchange/codereview |
One very annoying thing with strict MVC is that you can make the smallest processing in template. While it's usually a good practice, in this case it gets in the way:
I make a for loop on a queryset of a lot of objects and display some attributes;
Attributes are properties, making heavy processing (I don't want to tri... | stackexchange/codereview |
I've been working on the best way to test an abstract class named TabsActionFilter. I've guranteed that classes that inherit from TabsActionFilter will have a method called GetCustomer. In practice this design seems to work well.
Where I've had some issues is figuring out how to test the OnActionExecuted method of the ... | stackexchange/codereview |
I am trying to benchmark the run time of one of my scripts. I get following output
#time ./foo.py
real 0m37.883s
user 1m0.648s
sys 0m4.680s
#
Internally, foo spawns multiple other processes and waits till all of them die.
From this thread and my earlier understanding of real, user and sys times, I had though... | stackexchange/codereview |
I'm trying to write some apps using wikitude, and I'm having some problems running even the example.
I've put the sample ( BasicOpenARDemo ) that comes with the SDK inside eclipse and tried to run it, where I encountered the next error: "wikitude was not found on the system. Please press the ok-button to access the And... | stackexchange/codereview |
I just started with JRuby on Rails and absolutely love it. I know how to use current classes within the Java API in my Rails app, but if I wanted to create a new custom class written in purely Java code, how would I be able to use it in my Rails app?
For example, let's say I created Dog.java:
class Dog {
private Stri... | stackexchange/codereview |
I have been assigned to create a XSD schema for a proposed XML. i know what tables will be involved and what will be required fields which we always going to expect in the XML as well as optional.
I am very new to XSD and don't know where to and how to start.Can any one suggest me how to proceed so that i can start exp... | stackexchange/codereview |
I'm a bit rubbish with Regex and was wondering if some kind person would be happy to assist!
The format is:
optionally 1, 2 , A or B
Day Name, possibly short or full, eg
Mon, Tuesday, Thursday, Fr
Colon : or Space
Integer
The following are valid:
EDIT: included "Mon:20"
Mon:3, Tuesday:6, AWe:9, 2Fr:2, 2Wed 3, Fri... | stackexchange/codereview |
I'm looking to strip out non-numeric characters in a string in ASP.NET C#, i.e. 40,595 p.a. would end up as 40595.
Thanks
| stackexchange/codereview |
I hope you can help!
In brief, what I need is something like a cross platform web browser, with little or no chrome, that is easily distributable and allows the (local and remote) HTML pages running in it to receive messages (JavaScript?) when system global hotkeys are pressed.
I'm developing a desktop application whi... | stackexchange/codereview |
I would like to get the same behaviour that you get in Microsoft Word with several columns. When column 1 is filled, the text automatically starts in column 2.
I figured there would be a tag or technique on how to do this, but google gave me no usable results.
The obvious workaround would be to manually place text in t... | stackexchange/codereview |
Need help reworking this php code/logic. Right now, if I have no value for either column 'Duration' or 'Size', my html table is blank and I put a default value of n/a.
I want to change the logic to continue to handle that condition and give an n/a value, but also add the logic to read if BOTH are n/a, then set my colu... | stackexchange/codereview |
I have a pivot control:
PivotItem sectionPivot = new PivotItem()
{
Header = sect.Name,
Content = new StackPanel()
};
How can I add content to it?
Edit: The reason I'm doing it programmatically is because I don't know how many pivots there will be or w... | stackexchange/codereview |
I am scripting Illustrator CS5 with the Extendscript Toolkit.
I set several breakpoints in my code, they show up as red dots next to the line number. But when I run the script, it executes all the way to the end without stopping and the breakpoint dots turn dark.
What am I missing here?
Thanks!
| stackexchange/codereview |
According to the GMP documentation here:
Function: unsigned long int mpz_remove
(mpz_t rop, mpz_t op, mpz_t f)
Remove all occurrences of the factor f
from op and store the result in rop.
The return value is how many such
occurrences were removed.
So the mpz_remove function should be able to be used to answer ... | stackexchange/codereview |
I'm attempting to write my own http 1.1 server, just for fun and learning about more about HTTP, sockets, and threading.
I've gotten a good start i think with only delivering static pages (using c, which I would prefer to stay in for the time being). I have a test page I wrote a while ago and deliver it's ~50 files in... | stackexchange/codereview |
Is there a fast way in CSS to remove all of the styles applied to an element? For example, say a tab menu of some sort:
<div class='outer'>
<div id='d1'></div>
<div id='d2'></div>
<div id='d3'></div>
<div id='d4'></div>
</div>
The CSS is applied...
.outer { foo:blee; bar:blah; bas-bloo:snork; /*...long long l... | stackexchange/codereview |
I need to clear about android:anyDensity attribute with true | false,i gone through the developer guide,but i can't clear about.what the difference of using true or false value for it,Please clear about it.
| stackexchange/codereview |
There's something weird going on in my fortran folding. This is the example file
module foo
contains
subroutine hello()
end subroutine hello
subroutine hello()
end subroutine
subroutine hello()
end subroutine
end module foo
subroutine hello()
end subroutine
subroutine hello()
end subroutine
subroutine hello()
e... | stackexchange/codereview |
We are releasing a new version of our application and we would like it to be able to uninstall the previous installed version from the client's computer.
How would we be able to do that?
edit: I'm installing this application (and also the previous version) with a deployment project in Visual Studio, so I assume it is a... | stackexchange/codereview |
I'm trying to get the integer value of an NSNumber initialized with a float and I was expecting that intValue handle the conversion (as the docs say).
#import <Foundation/Foundation.h>
#import "Fraction.h"
#import "Complex.h"
#import "ComplexMathOps.h"
int main (int argc, const char * argv[]) {
NSAutoreleasePool *... | stackexchange/codereview |
I have an array containing image objects. I am looking for an image nearest my size constraint. For exemple I want an image equal to 400x600 or nearest.
By nearest I mean nearest by size, a little bit bigger or smaller.
I am not looking for an implementation just for an algorithm.
Do you have an idea how to achieve thi... | stackexchange/codereview |
As cloud computing seems to be one of the most popular topics, It got me thinking, And as i dont know much about the topic excuse me for any ignorance in the question.
What exactly is a cloud database and how would this service even be created. Would it simply be a MySQL database with a web frontend that would allow us... | stackexchange/codereview |
Inspired by:
NServiceBus.Configure.With().Log4Net(a => a.YourProperty = "value");
I want to use something similar as configuration, suggestions are welcome. My biggest problem is that I can't quite figure out how to use the parameter input...
What exactly is going on here?
NServiceBus uses Log4Net, as instance? se... | stackexchange/codereview |
Based on the results of my query in this thread, I've decided that I need to maintain my own database of metadata for the media that I'll be accessing. It seems like MediaStore is a very good start for this, as it will give me a good deal of information and is regularly updated by the MediaScanner. In an ideal world, I... | stackexchange/codereview |
I'm building a iphone app and using c++ and am having trouble checking if a pointer is null.
IMyInterface* myInterface;
if ( !myInterface ){ //doesn't work
myInterfacee->doSometing();
}
if ( myInterface != 0 ) { //doesn't work
myInterfacee->doSometing();
}
if (... | stackexchange/codereview |
I have a table called product_attributes in a MySQL Database. It consists of a product SKU (foreign key), an attribute label and an attribute value. I need to ensure that combinations of SKU and attribute labels are unique.
EXAMPLE -
inserting this would be legal
{001, 'weight', '100 lbs'}
{001, 'color', 'blue'}
{00... | stackexchange/codereview |
I am writing a commercial Android app to take survey, which should also give option to edit survey.
What is the best approach to link UI fields to database without writing explicit logic to do that.
| stackexchange/codereview |
Have created a stored procedure which is utilised for monitoring purposes of a website.
On first run the procedure takes over a minute to execute and if run shortly after this it takes only a few seconds to run. The problem is that the script is scheduled to run at ten minute intervals and each time it runs, it takes ... | stackexchange/codereview |
I am aware that using @font-face allows the browser to download a custom font and use it in a web page just like any system font.
What I want to know is if the browser encodes the font or uses it without exposing it?
Thanks
| stackexchange/codereview |
Possible Duplicate:
Why should hash functions use a prime number modulus?
Why is it necessary for a hash table's (the data structure) size to be a prime?
From what I understand, it assures a more even distribution but is there any other reason?
| stackexchange/codereview |
I am writing a Maven plugin (Mojo) that imports a Jar library used by other projects. At least one of the classes in that library use Apache Log4j for logging, but Log4j is not going to be properly configured by the logger that Maven provides to the Mojo.
Is there any simple way to bridge between these? Unfortunately, ... | stackexchange/codereview |
I'm using drupal and a pgsql database, but after long searches I still can't figure out how to put a CURRENT_TIMESTAMP or now() into the database when inserting a row into a table. Putting now() on the default value of a column won't work, because drupal won't accept it on the database schema, so that's out of question... | stackexchange/codereview |
While exploring my database in Netbeans I could only see Tables, Views and Procedures in schema tree. So these are the only types of objects that it could explore? What about Java sources and java classes at least?
| stackexchange/codereview |
I have written a PowerShell script that will create an email, however I can't seem to attach a file. The file does exist and PowerShell can open it, Could anyone tell me what I'm doing wrong?
$ol = New-Object -comObject Outlook.Application
$message = $ol.CreateItem(0)
$message.Recipients.Add("Deployment")
$message.S... | stackexchange/codereview |
i need help with a little code that i have below. i'm a newbie in javascript so i hope someone could help me here
i've used the function below to grab parameters from URL:
<script type="text/javascript">
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([... | stackexchange/codereview |
I have a Silverlight 4 application. The MainPage which is the RootVisual of the application has many controls on it - one of which is a user control called VideoPlayerView. What I would like is when a user clicks on the fullscreen icon on this control, for this control to "pop out" of the page and go full screen (i.e. ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.