instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm adding ItemAdding event receiver for custom list template. Both event receiver and list template are deployed by the same feature. Also the same feature creates List Instances.
The problem I've got is that the event is fired for each list item in site to which it was deployed. Elements.xml for eventreceivre is:
<Re... | stackexchange/codereview |
I'm building a site with nanoc and cannot find out how to use a global variable that could be incremented on the compilation of each page. The idea behind this is to get the list of all tags (incrementing the appearance number each time a tag is seen).
I though that declaring the variable in lib/helper.rb would do the ... | stackexchange/codereview |
I am trying to delete received SMS in ContentObserver (on "content://sms/") onChange() method using contentResolver.delete, but after deleting ContentObserver is invoked one more time.
Could you explaing my, whe ContentObserver invokes itself despite deliverSelfNotifications() returns false?
I foud soultion to uregist... | stackexchange/codereview |
#include <stdio.h>
typedef struct pduct {char name[20];
int price;
int stock;} PRODUCT;
void init(PRODUCT * product)
{
printf("What is the name of the product: ");
fgets(product->name, 20, stdin);
printf("DEBUG: Did it get written...: %s", product->name);
... | stackexchange/codereview |
Preamble: I'm working at heavy-loaded applicaion that produces large data arrays.
I wrote the following class
using System;
using System.Collections;
using System.Collections.Generic;
namespace CSharpSampleApplication.Data.CoreObjects
{
[Serializable]
public class CalcItem
... | stackexchange/codereview |
I'm a junior iphone developer and got familiar with developing on xcode on top of Mac OS.
I wanna build some Cross-Platform apps in the near future and wanna Use Ubuntu as my Operating system.
I found many solutions that run only on Mac OS or need mac to build apps for iphone but this is not what i need . i need someth... | stackexchange/codereview |
I am new to Symfony framework. I got Symfony (v1.4.8) on my Netbeans 6.8 and also got the initial success page.
Now, I want to Configure a database using Propel ORM Tool. But in Netbeans I am getting Doctrine as the default tool enabled. I am not even getting the PROPEL commands in my Run Commands window. I configured ... | stackexchange/codereview |
Is it possible to build a Perl wrapper around the GNOME terminal which would help me to pass commands to it and also capture the ouputs on the terminal?
| stackexchange/codereview |
I am currently testing out Blueprint to create the layout for a site. So far it has been going great, but now I've run into a problem I'm wondering if there is any elegant solution to.
I am using the default 24 column layout and have a situation where I would like to do something similar to:
<div class="span-8 box">..<... | stackexchange/codereview |
In geocoder class document i read below lines
The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform.
How can I know if my framwork(1.6) providing background service for Geocoder.... | stackexchange/codereview |
I'm developing an ASP.NET website in Visual Studio 2008. The thing is that I changed a line in the code. This change threw an exception (NullReferenceException) at runtime. After I changed the line back it still throws the same exception. I want to follow the stack trace to look into the error and solve it. Can you gu... | stackexchange/codereview |
I'm using Spring WebFlow 2. Here's my situation.
View states: state1, state2
Transitions: state1 goes to state2 if validation passes
state2 pops up a new window using the following:
<view-state id="state2" view="externalRedirect:${flowScope.myUrl}" redirect="true" />
I want to be able to continue my business at state... | stackexchange/codereview |
Given the following table:
CREATE TABLE BitValues ( n int )
Is it possible to compute the bitwise-OR of n for all rows within a subquery? For example, if BitValues contains these 4 rows:
+---+
| n |
+---+
| 1 |
| 2 |
| 4 |
| 3 |
+---+
I would expect the subquery to return 7. Is there a way to do this inline, without... | stackexchange/codereview |
a) Why must global element and attribute declarations always belong to a namespace and as such must always be qualified within instance documents?
b) Are local element/attribute declarations ( with their form attributes set to unqualified) still part of a schema’s target namespace, even though they aren’t associated wi... | stackexchange/codereview |
I have made an iPhone app building with SDK 3, expecting it to run on all platfroms of IOS 3 and up.
My app uses location services, and in iPhone 4 IOS one can shut down location services for a specific app. Doing so causes my app to hang indefinitely. I handle the case where location services are disabled in genera... | stackexchange/codereview |
It seams that Dalvik's garbage collector doesn't respect SoftReferences and removes them as soon as possible, just like WeakReferences. I'm not 100% sure yet, but despite the fact that there is still ~3MB of free memory my SoftReferences get cleared after I see "GC freed bla-bla-bla bytes" in LogCat.
Also, I saw a comm... | stackexchange/codereview |
I have a large arrayObject which I'm looping over using the following:-
$rit = new RecursiveIteratorIterator(new RecursiveArrayIterator($hierarchy));
foreach($rit as $key=> $val) {
}
How can I access the a specific key within the array? I can access them by echoing $key and the $val but I have specific keys I wish to... | stackexchange/codereview |
Sorry if the title is confusing, but here's what I mean:
If I have a script that can accept several parameters, I'd use the getops command in order to more easily control script actions based on the parameters passed. However, lets say one of these parameters can be any number from 5 - 9, or whatever. Is there a way to... | stackexchange/codereview |
I have got a question about event and bound command.
What happens if I bound a command to my button and also handle the click event in my code behind ?
I mean, I have already tried and everything is ok but I was wondering whether this affects the efficiency or something else ?
Is it a good practice ?
In my case the cod... | stackexchange/codereview |
I have 3 subviews in a UITabBarController. The first tab's view has objects which are manually moved when willAnimateRotationToInterfaceOrientation is called. However, if another tab's view is visible on rotate, willAnimateRotationToInterfaceOrientation is never called, and the items on the first tab's view are not in ... | stackexchange/codereview |
I have this regex:
var alphaExp = /^[a-zA-ZåäöÅÄÖ\s]+$/;
This is for a name-field in a form validation.
I need to make it possible to type names like this "Anna-nicole" (note the hyphen).
Currently the hyphen causes error.
I need to remake this regex so that a hyphen can be included in the name; preferably I should ... | stackexchange/codereview |
I am looking for dlls , which I read on google is in C:\Windows\System32\Application Server extension . I cannot see this folder on the machine where appfabric is installed.
CacheBaseLibrary.dll
ClientLibrary.dll
FabricCommon.dll
Any ideas, how to get this folder?
| stackexchange/codereview |
I need to complete a series of tasks across several Windows 2008 servers that need elevated permissions and as such I've had to create a series of scheduled tasks that i'm running via psexec. Since they have to run in sequence, I found and modified a powershell script that 'stalls' until scheduled tasks are completed o... | stackexchange/codereview |
I want to create a simple method that accepts both value type and reference type parameters, i.e. int is value, and string is reference.
So this is what I start with:
public bool AreBothNotNull<T>(T? p1, T? p2)
{
return (p1.HasValue && p2.HasValue);
}
So I want to be able to use it like this:
var r1 = AreBothNotNu... | stackexchange/codereview |
In eclipse, I can say to editor (and of course compiler) I don't use that variable so remove the underline with
@SuppressWarnings("unused")
Anyone knows in Netbeans 6.9 how can I remove the underline of unused variables in editor?
Thanks in advance
| stackexchange/codereview |
the following is a script which was generated using generate script option.
the wizard says that this can be used to copy, create db on different servers
so its made for it, then why does this error occur.??
the error is
Msg 5170, Level 16, State 1, Line 2
Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL... | stackexchange/codereview |
Is it considered bad practice to combine synchronous and asynchronous socket calls on the same server? For example (modified from the msdn):
// Initalize everything up here
while (true) {
// Set the event to nonsignaled state.
allDone.Reset(); //allDone is a manual reset event
// Start an asynchronous... | stackexchange/codereview |
This is my code:
(define p (read(open-input-file "starbucks4.sxml")))
(define get-artifacts
(lambda (l)
(member (list 'opm:artifact) l)))
(get-artifacts p)
I was told that the member function searches completely throughout a list. In the .sxml document there is a complicated list that has many elements c... | stackexchange/codereview |
I have an issue with testing routes using the MVCContrib Fluent route testing. The test fails yet the application recognises the routes.
Let me explain....
I have the following routes in my register (shown in order)
routes.MapRoute(
"PurchaseUnitsPaged",
"PurchaseUnits/Page{page}",
... | stackexchange/codereview |
Table Reords:
TableA
SerialNUmber Status
001 OK
002 N/A
TableB
SerialNumber Status
001 OK
003 N/A
var ret = (from p in TableA.AsEnumerable()
join q in TableB.AsEnumerable()
on p.Field<string>("SerialNumber") equals q.Field<string>("SerialNumber... | stackexchange/codereview |
How can I write a MS dos ftp batch file to:
download files from the server to my local pc
remove these files from the server after download
Edit:
So far I have...
Batch file:
ftp.exe -s:ftp.txt
FTP.txt:
open domain.com
usernamehere
passwordhere
cd /httpdocs/store/files
need get, list and delete commands here??
qui... | stackexchange/codereview |
Consider two extension methods:
public static T MyExtension<T>(this T o) where T:class
public static T MyExtension<T>(this T o) where T:struct
And a class:
class MyClass() { ... }
Now call the extension method on a instance of the above class:
var o = new MyClass(...);
o.MyExtension(); //compiler error here..
o.MyExt... | stackexchange/codereview |
I am starting an open source project by using RFID card readers for saving data from an hotel information system. heres my scenario, i will be using rfid to save the data from the database and store it into the rfid cards. and then they can use the card as an id to their room.
btw my platform is wpf vb2010
| stackexchange/codereview |
I am working on a Java server side application that needs to provide a SOAP service. For this, we are using Axis2 and deploy in a Tomcat 6 installation.
We have the following issue: we need to run a couple of background threads; one to periodically query another web service for changes in provided data and a second one... | stackexchange/codereview |
I am new to multi-threading in VB.NET and have come across a problem whereby I am wanting to append text to a text box on a form from a service thread running in the background.
The application I am developing is a client/server listener, I have been able to get the client and server PC's to talk with each other (confi... | stackexchange/codereview |
I was wondering if there is a way to find out if a given string is an image e.g.
$a = 'php';// output false
$b = 'jpg';// output true
$c = 'js'; // output false
$d = 'png';// output : true
I know it can be done by checking it against an array but I am just wondering if there is a better solution.
| stackexchange/codereview |
I'm having an issue with one user. No matter what he does he ends up getting throwing an ActionController::InvalidAuthenticityToken error. I have tried having him clear his browser's cache, cookies, etc. He gets this using both FireFox and Internet Explorer. I'm at a loss as to why this would be occurring for just ... | stackexchange/codereview |
I've recently developed a c# application that uses a mysql connector. I've run into some issues with other computers not having the Mysql.Data library. So my question, what is the best way to deploy a c# application that uses these Mysql.Data libraries? Install the mysql connector on every computer? Is there some way I... | stackexchange/codereview |
I'm a newbie programmer / designer trying to configure jquery ui autocomplete. I have it working, using a javascript object (array). The array contains retailer stores that we are directing our customers to. We have certain stores that are preferred and so we would like for them to come up earlier than other stores but... | stackexchange/codereview |
I have installed 3 different python script on my ubuntu 10.04 32 bit machine with python 2.6.5.
All of these use the urllib2 and I always get this error:
urllib2.URLError: <urlopen error [Errno 110] Connection timed out>
Why ?
Examples:
>>> import urllib2
>>> response = urllib2.urlopen("http://www.google.com")
Traceba... | stackexchange/codereview |
Thanks for reading this. Hope you can help me.
When I have a Mysql table with these row values
id| search
========
1| butterflies
2| america
3| birds of america
4| america butterflies
how can I tell which rows have all the words in column 'search' occuring in the string "butterflies of america", regardless of the numbe... | stackexchange/codereview |
Does anyone know if you can do this by default rather than having to use context menu?
| stackexchange/codereview |
In iPhone, Map application, Right corner button, that is next page animation button, Can we impletement this button action, Is it animation? Can you explain more in details.
Thank you,
Madan Avulagadda.
| stackexchange/codereview |
I have a SQL Server CE database I am developing with and would like to downgrade the version so that 2005 Management Studio will open it. Currently, I have to use VS 2010 to open it, but it is a real pain to use that way.
I know I could install the 2008 version of SSMS, but the machine I use has serious problems with a... | stackexchange/codereview |
class Foo
@@default = "default"
p instance_variables
p class_variables
class << self
p instance_variables
p class_variables
# How do I access the @@default variable here?
end
end
| stackexchange/codereview |
I have two semaphores x (initially at 1) , and y (initially at 0).
My thread function code is somewhat like this:
...
wait(x);
//setting some vars
signal(x);
wait(y);
...
I want to ensure that the threads wait on y in line, ie. if the first thread completed the x-guarded section first, it should get to wait on y... | stackexchange/codereview |
I am creating a desktop application with Flex for the first time. I am having problems with the position and size of the elements in the screen. For instance
Elements with 100% width do not resize when the window is resized or maximized
Elements positioned relative to the bottom of the window do not move when resizing... | stackexchange/codereview |
I have read about a number of posts for developers who want to plot out a route on a map on an iPhone but there is no satisfactory answer as how to best achieve this. You can use the Route-Me library, add a layer on top MKMapView or send coordinates to phones map software then you navigate from your application, which ... | stackexchange/codereview |
The question might sound vague but I'm trying to understand the general concept of the EHCache transaction ability.
Assuming I configure EHCache as a memory cache and I also configure it to cache a MyObject.
Does EHCache clone the instance of MyObject I'm retrieving if this is done as a part of a transaction?
I'm mai... | stackexchange/codereview |
Struggling getting a query to work……..
I have two tables:-
tbl.candidates:
candidate_id
agency_business_unit_id
tbl.candidate_employment_tracker
candidate_id
The candidate employment can have duplicate records of a candidate_id as it contains records on their working history for different clients.
The candidates tables... | stackexchange/codereview |
I have written the following two functions in Bash:
function prepend_path() { PATH=$1:$PATH }
function prepend_manpath() { MANPATH=$1:$MANPATH }
The bodies of the functions are actually going to be more complicated. To avoid code duplication, I would like to do something like the following:
function prepend() { "$1"=$... | stackexchange/codereview |
is it possible but I guess that memory is read only. I tried something like that
void (*b)();
b = *test;
char * z = (char * )b;
and when I print contents of z, it prints constants from test function.
but that memory is read only and I get segfaults when I edit them and call test. I tried this.
char x[100];
for(i=0;... | stackexchange/codereview |
Hey all, I have a pretty simple problem someone should be able to help me with. All I want is a small frame with a progress bar that updates, right now it's not updating:
final JProgressBar bar = new JProgressBar(0,250000);
bar.setValue(1000);
bar.setIndeterminate(false);
JOptionPane j = new JOptionPane(bar);
final JDi... | stackexchange/codereview |
This may have been asked before and I just can't find it.
I have a one to many relationship in the database on a few tables.
table1
table2
table3
table2 - table3 is the 1-many relationship
here's a mock of what I have:
select
table1.id
table1.Column
table2.Column2
-- I want all entries here from table 3 here as well... | stackexchange/codereview |
My xsl is working fine when "xmlns" attribute doesn't exist in a node integration_test_results of xml. What i can do in xsl so it will work when "xmlns" attribute exist in integration_test_results node.
Please help me ASAP.
Here i am attaching my xml and xsl file:
Attach xml:
<?xml version="1.0" encoding="UTF-8" standa... | stackexchange/codereview |
I've got an image background which content I want to be always visible, no matter what is the user's resolution. Therefore, I want to be able to determine what is the resolution and set appropriate background image file before page loads, on the very beginning. Is it possible somehow?
| stackexchange/codereview |
I am working with a fairly complex GUI and am trying to pass a lot of data from the GUI to a backgroudWorker. The problem I am running into is accessing some of the GUI values from the background worker. For example, if I try to get ComboBox.Text I get a InvalidOperationException due to cross-threading. However, if I s... | stackexchange/codereview |
Hello I write LSP program for reading and changing traffic. Questions is, do software like anti virus, firewall, anti spyware etc see my program as virus because LSP function?
| stackexchange/codereview |
Can someone explain the differences in simple terms?
| stackexchange/codereview |
The XML within the 'formslist' variable is created using apply-templates. This snippet is from a 2.0 stylesheet.
<xsl:variable name="formlist">
<forms>
<FORM form_name="form1" print_seq="1200"/>
<FORM form_name="form2" print_seq="1500"/>
<FORM form_name="form3" print_seq="9000"/>
<FORM form_nam... | stackexchange/codereview |
I am a newbie to C#. I have a java REST service which returns a xml response and I am trying to deserialize the xml document using C# XmlSerializer. A sample xml document response is pasted below.
<?xml version="1.0" encoding="UTF-8"
standalone="yes" ?> <ns2:Document
xmlns:ns2="http://hxps.honeywell.com/model/impl"
... | stackexchange/codereview |
When I use a DataTable as a DataGridView's DataSource, I often have to find which row(s) a user has selected and read specific values from the DataTable (not the DataGridView)
I wanted to know if there is any reliable way of determining which DataRow a DataGridViewRow is bound to especially when the user has sorted the... | stackexchange/codereview |
I am trying to compile the following for the android ndk
#include <jni.h>
#include <string.h>
extern "C" {
JNIEXPORT jstring JNICALL Java_com_knucklegames_helloCpp_testFunction(JNIEnv * env, jobject obj);
};
JNIEXPORT jstring JNICALL Java_com_knucklegames_helloCpp_testFunction(JNIEnv *env, jobject obj) {
return ... | stackexchange/codereview |
I need you help here.
I want to turn this:
sometext sometext http://www.somedomain.com/index.html sometext sometext
into:
sometext sometext <a href="http://somedoamai.com/index.html">www.somedomain.com/index.html</a> sometext sometext
I have managed it by using this regex:
preg_replace("#((http|https|ftp)://(\S*?\.\S... | stackexchange/codereview |
I got this div tag who's background image's being set in the CSS using some method like this..
Inline CSS:-
.id0, .mySprite:hover div
{
background-image: url(<%=GetImage()%>);
background-repeat: no-repeat;
width: 728px;
height: 243px;
}
HTML:-
<div class="id0"></div>
Now do I ... | stackexchange/codereview |
I have a database that I created using the CREATE DATABASE statement in the terminal and I have a .sql file full of statements creating tables and rows.
I just wanted to know what was the command line to execute that .sql on the database I created?
| stackexchange/codereview |
System.DateTime can take a wider range of values than SQL Server's DateTime. Hence there is class System.Data.SqlTypes.SqlDateTime which mimics the later.
Consequently I would have expected Entity Framework to choose SqlDateTime, but it didn't.
So my questions are...
What are the best practices to insure that your Da... | stackexchange/codereview |
I'm performing a rotation of an UIImageView in place first before performing a rotation animation:
// rotate to the left by 90 degrees
someView.transform = CGAffineTransformMakeRotation((-0.5)*M_PI);
Then calling a rotation on the view by 180 degrees... but it seems like it is rotating the image starting from the orig... | stackexchange/codereview |
I was working with php's ftp_rename function and getting a permission denied error when renaming the extension of a file to indicate that it had been downloaded.
To make sure it wasn't a php config issue, I tried ftping manually. This is where I'm stumped.
ftp> ls
200 PORT command successful. Consider using PASV.
150 ... | stackexchange/codereview |
I've been experimenting with rwlock's on Mac and am experiencing something that seems to me shouldn't be happening. There's some weird combination of using read/write locks with recursive read locks that is deadlocking, but shouldn't be.
I posted the code on pastebin because it's more than just a snippet. The way this... | stackexchange/codereview |
following is my code for drag and drop in wpf. i used the same code in windowform for drag and drop images but i does not seem to work for wpf Can you help ?
<Image Height="464" Name="PictureBox" Stretch="Uniform" Width="769" AllowDrop="True" DragEnter="PictureBox_DragEnter" Drop="PictureBox_Drop" />
private v... | stackexchange/codereview |
I was reading the design patterns page on Wikipedia, particularly the "Criticism" section.
Could you point me to some articles or books about shortcomings of design patterns?
| stackexchange/codereview |
i have an access front end. users need to be able to open a table and edit the contents of a table. this is a multi-user application. please note that i do not care that i might run into problems with people editing the same data.
how do i allow a user who only has the access RUNTIME to be able to edit and view a tabl... | stackexchange/codereview |
Possible Duplicate:
Convert form data to JS object with jQuery
Here is my problem, I have a whole bunch of elements that look like this...
<input type="email" id="email" data-item="email" data-key="contact_details"/>
<input type="tel" id="mobileNo" data-item="mobileNo" data-key="contact_details"/>
<input type="text... | stackexchange/codereview |
I have several tables with different numbers and types of columns, and a single column in common.
+--------+---------+------------+-------------+
| person | beardID | beardStyle | beardLength |
+--------+---------+------------+-------------+
+--------+-------------+----------------+
| person | moustacheID | moustacheS... | stackexchange/codereview |
I'm having issues getting something which seems very basic running with Grails. I want to call grails commands from an Ant script - Grails provides a Grails task to achieve this. I have defined the Grails taskdef and classpaths as per the docs however, no matter what command I call I get the same error...
grails-compil... | stackexchange/codereview |
In the context of MS SQL Server 2005
Is there a way to stop delete, and update sql statements being executed against the database that don't have a WHERE clause?
Ideally it would be nice to restrict this 'blocking' to a set of users/roles.
| stackexchange/codereview |
How do I compare two lambda functions in C++ (Visual Studio 2010)?
std::function<void ()> lambda1 = []() {};
std::function<void ()> lambda2 = []() {};
bool eq1 = (lambda1 == lambda1);
bool eq2 = (lambda1 != lambda2);
I get a compilation error claiming that operator == is inaccessible.
EDIT: I'm trying to compare the f... | stackexchange/codereview |
I'm extracting a part of a web application that handles the signup, the other part will be rewritten.
The idea is the signup part can exist as a separate application, interface with the rest of the application for creating and setting up the account. Obviously there are a ton of ways to do this, most of them network ba... | stackexchange/codereview |
Like this only but not in joomla and less than 10 users.We are going to give the demo of our web application on intranet and also we may implement in intranet only.So the concern is
The source code and database needs to be secure(i.e.Not easily readable by clients)
What are the security measures I need to follow i... | stackexchange/codereview |
I trying to upload a file from an iPhone to a server. I'm trying to avoid using any libraries that aren't made by apple, and from what I can tell it looks like I'll need to go pretty low level on constructing my request. Can someone tell me what the "boundary" is in a multipart/form-data request and how to use it prope... | stackexchange/codereview |
I have the below code that is suppose to copy data from an excel file I receive in a email and paste it to another file on the row that has the same date. When I try and run the macro it says there is an error. Can anyone look at my code and direct me as to where my error is. I am fairly new to coding and creating macr... | stackexchange/codereview |
$sql = $empire -> query("select * from issue
where disabled='0' order by issue desc");
while($r=$empire->fetch($sql)){
//get total
$total = $empire -> gettotal("select count(*) as
total from sendbook where issueid='".$r["issue"]."'");
$list .= 'id: '.$r['id'].' issue :'.$r['issue'... | stackexchange/codereview |
I have added a new record to a table using phpMyAdmin
I then run select * within phpMyAdmin and it works listing all records.
However if run the same select * from a PHP page the new record is missing.
I am using PHP 5 and am not sure what is going on here. It used to work in PHP 4.
.php files run as PHP 5 Apache mod... | stackexchange/codereview |
In the latest version of Oracle Database (11g Release 2), there's a new option called Real Application Clusters (RAC) One Node. What is "One Node", and how does it differ from regular RAC?
| stackexchange/codereview |
I am currently overriding the setter of a given class with Reflection.Emit.
Everything works fine except when I use it with a nullable property....
Here is the code I use :
ilSetterGen.Emit(OpCodes.Ldarg_0);
ilSetterGen.Emit(OpCodes.Call, baseGetter);
ilSetterGen.Emit(OpCodes.Ldarg_1);
ilSetterGen.Emit(OpCodes.Ceq);
La... | stackexchange/codereview |
So I have a problem and know exactly what is causing it, just not how to fix it. Basically I have a tableViewCell that is loading something like this:
BroadcastTableViewCell *cell = (BroadcastTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
/*
* Other code to finish cell setup
*
*/
//... | stackexchange/codereview |
I've binded the tooltip of a slider control to it's Value property and i'm trying to use StringFormat to make it display "Current Value {0} of 10" where the {0} is the Value property. Below is one of the various things I tried when trying to figure this out.
<Slider.ToolTip>
<Label>
<Label.Content>
<Bindin... | stackexchange/codereview |
I am trying to do a simple persistence with jpa 2.0 and derby but I keep getting a NullPointerException.
Exception and entity class - http://pastebin.com/QqXhRdcN
The code where I am trying to persist
EntityManager em = emf.createEntityManager();
Course c = new Course("cse", 214, "fall", 2010);
em.getTransactio... | stackexchange/codereview |
I am developing a project in cakephp. And the requirement is to integrate all types of payment getway for donet. I dont know how to integrate credit card like master card, visa, american express etc. into my project in cakephp format.
Please help me. I am very grateful to you.
| stackexchange/codereview |
What symbol should I use ?
| stackexchange/codereview |
I'm implementing the IObservable<T> interface on some classes. I used Reflector to figure out how this is typically done in Rx. Concerning how an observable keeps track of its subscribers and notifies them via their OnNext method, I stumbled upon code similar to this:
private List<Observer<T>> observers;
// subscribe ... | stackexchange/codereview |
I've seen two recent answers using _1 as a pure C++0x solution (no explicit mention of boost lambdas).
Is there such an animal as std::_1 I would think that having native lambdas will make such a construct redundant.
A Google code search for std::_1 brings two results from the same project so that's inconclusive.
| stackexchange/codereview |
This seems insane, but I've been able to reproduce an issue where my JOGL app crashes if I'm not using an external monitor. All I do is start the app, and it immediately becomes unresponsive. If I plug in an external monitor, the problem disappears.
If I let the app run, then randomly pause it in a debugger, I get the ... | stackexchange/codereview |
On the page
http://developers.facebook.com/docs/reference/fbml/share-button_%28XFBML%29
It talks about the Share Button, and states that it is best to use the Like Button with Open Graph API.
It is not so entirely sure whether using the Share Button is supported by the new Facebook Javacscript SDK. The Button should... | stackexchange/codereview |
I'm trying to float a div over another one but in the center (width).
EDIT: I want the container div to be over the top div and centered.
Current CSS:
body {
background-color: #FFF;
margin: auto;
}
#top {
background-color: #F2F2F2;
border-bottom: 1px solid #CCC;
height: 150px;
position: relati... | stackexchange/codereview |
Which are the valid xml encoding strings? For instance, what is the way of specifying UTF-8:
encoding="utf8"
encoding="utf8"
etc
Or Windows 1251:
encoding="windows-1251"
encoding="windows1251"
encoding="cp-1251"
etc.
I am making a character decoder as well as a xml parser. Thus, I need to be able to set the encodin... | stackexchange/codereview |
I am trying to create a small augmented reality application where I move an image on top of the camera capture. So the only thing I change is the center of the UIImageview:
[imageView1 setCenter:CGPointMake(x-16, 240)];
and the center gets updated but the position of the image on the screen stays the same.
after the ... | stackexchange/codereview |
You know the feature for example, you opened C:\test.txt if you also have the same file in another editor, and you edit it there, when you return, the app will prompt that the file has changed, whether you want to update it. How do I check if the file has been updated?
UPDATE
Asked a sister question "Using FileSystemWa... | stackexchange/codereview |
I Have a stored procedure:
CREATE OR REPLACE PROCEDURE UpdateFileMapping(field in number, original_Field_Names in DBMS_SQL.varChar2_table, mapped_Field_Ids in DBMS_SQL.number_table)
IS
C NUMBER := DBMS_SQL.OPEN_CURSOR;
N NUMBER;
BEGIN
DBMS_SQL.PARSE(C,'INSERT INTO input_file_mapping VALUES(input_file_mapping_id.NextVa... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.