instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am using LINQpad to get a grasp of LINQ and in one of the XML examples they have the following code
var bench =
new XElement ("bench",
new XElement ("toolbox",
new XElement ("handtool", "Hammer"),
new XElement ("handtool", "Rasp")
),
new XElement ("toolbox",
... | stackexchange/codereview |
I have a script that works fine in one branch and is broken in another. I want to look at the two versions side-by-side and see what's different. Is there a way to do this?
To be clear I'm not looking for a compare tool (I use Beyond Compare). I'm looking for a Git diff command that will allow me to compare the master ... | stackexchange/codereview |
I'm working with EJBs...I do the following and I don't know why the injected EntityManager is not working as one might expect.
EJB1 calls a method on EJB2 that writes to the DB.
when EJB2 returns EJB1 sends a message to a MDB.
MDB calls EJB3 that reads the DB and does some work.
My problem is that the EntityMana... | stackexchange/codereview |
I have a html page that after ajax call show a lot of data rows, in every row i have input text with different value, the user can edit this text input and then press a button to do some calculate action.
How can I collect with javascript(jQuery) only this values that have been changed, and send them to php script. I s... | stackexchange/codereview |
Hi i have a sql database server runnin on my desktop. I want to create an asp.net application to detect when new data has been inserted into the database. Is there a command in visual studio to detect when theres new data right away?
| stackexchange/codereview |
I have an equation in a multi row cell (aka a merged cell) that should be vertically centered. I do using the following code snippet:
\documentclass{article}
\usepackage
{
multirow,
longtable,
array
}
\begin{document}
\begin{tabular}{|*{2}{c|}}\hline
\parbox[c][1cm]{5cm}{Description} & \parbox[c][1cm]{5cm}... | stackexchange/codereview |
For simplicity's sake, lets say I have the following Abstract Base Controller Class:
public abstract class RESTController : Controller
{
public abstract JsonResult List();
public abstract JsonResult Get(Guid id);
public abstract JsonResult Create(object obj);
public abstract JsonResult Update(obje... | stackexchange/codereview |
Hello and thank you for help.
I have problem with validation.
Basically I have one form with two buttons.
One button need to validate whole form and second only fields with class ".number".
I tried something like this:
$('.save_draft').click(function(){
$('form').validate({
rules: {
field: {
... | stackexchange/codereview |
I have discovered Scintilla/Notepad++ API this week end.
As there is a nice Template vcproj for Notepad++ Plugins available on line then I could start to play with some pseudo code-source really really fastly.
I have just looked briefly at the Scintilla documentation which expose the API which looks promising. Sometim... | stackexchange/codereview |
I'm using the generated folder structure that dh_make generates.
Everything is good as long as I mantain this structure:
./debian/
./debian/rules
./debian/<rest_of_files>
./Makefile
When I execute fakeroot debian/rules clean binary it does make clean && make && make install DESTDIR=properplace and everything works a... | stackexchange/codereview |
I have a requirement in which I have to show the number of documents uploaded by a user in all the lists and libraries in a SharePoint site in a Silverlight webppart.
How much ever I try I keep getting the error "The property or field has not been initialized. It has not been requested or the request has not been exe... | stackexchange/codereview |
I have a list of tokens, like:
hel
lo
bye
and i want to generate all the possible combinations of such strings, like:
hello
lohel
helbye
byehel
lobye
byelo
Language is not important, any advice?
I found Generating permutations using bash, but this makes permutation on a single line.
| stackexchange/codereview |
I'm building an application where every user will have a bunch of items. When a user signs up about 150 user specific item are added into a table for every user from a template table.
Logic as follows: (copy)
User signs up
Copy 150 template items (rows) from template_table to userItems_table
Display items from userItem... | stackexchange/codereview |
Using the python version of GAE and extending models from db.Model, how do you fetch entities where an attribute equals None or does not exist?
#This works
#Fetch 10 entities where duration == 0.0
entities = MyModel.all().filter('duration = ', 0.0).fetch(10)
#This doesn't. How can I do the equivalent?
#Fetch 10 enti... | stackexchange/codereview |
How do I set wifi ip address, dns address, gateway from android java i.e programmatically, I didn't find any method which has the capability to store the values.
| stackexchange/codereview |
I have followed the postgresql wiki binary replication tutorial and cannot get the wal_sender and wal_receiver processes to start on the master or slave server. I'm not seeing any relevant information in the log files to help. I'm able to connect via psql from my slave to my master server, so I'm relatively certain t... | stackexchange/codereview |
I am using Entity Framework for CRUD operations. When I tried to insert data in a table which has an identity column, it throws an exception
Identity_Insert is set to off
I don't know how to turn that on. Do I need to reconfigure entity data model for that?
| stackexchange/codereview |
i have declared a variable in the class 'Main' with name 'context2'. But i cannot use the variable inside the function 'Main_Load'. what am i doing wrong ?
using System;
using System.Windows.Forms;
using Soapi;
using Soapi.Domain;
namespace SO_Console_Client
{
public partial class Main : Form
{
const s... | stackexchange/codereview |
I'm working on a c# wpf application in which I want to validate user input in a textbox. I have a validation rule like this:
public class NumericRule : ValidationRule
{
/// <summary>
/// Checks whether a value can be converted to a numeric value.
/// </summary>
public override ValidationResult Validate(... | stackexchange/codereview |
I was trying to find a way to do some string manipulation and ran across the Commons Lang in a response to another question posted here on stackoverflow. From what I can tell it's a collection of libraries, do I have to download and somehow import this to eclipse?
| stackexchange/codereview |
Hey guys, I'm having trouble understanding a Rails construct. I'm using Rails 3 but I doubt this is specific to this version.
I have a model, Goal that has_many :commits and naturally, a Commit model that belongs_to :goal. I created the proper migration so that commits_table.references :goal.
I am actually going throug... | stackexchange/codereview |
I've searched StackOverflow and there are many ConcurrentModificationException questions. After reading them, I'm still confused. I'm getting a lot of these exceptions. I'm using a "Registry" setup to keep track of Objects:
public class Registry {
public static ArrayList<Messages> messages = new ArrayList<Messages>... | stackexchange/codereview |
I am running a self executing function in javascript to not interfere with any global variables on a page. I have a string with the name of a function I want to call. The function is declared inside my self-executing function. Is there a way to call that function by using the string?
(function(document, window){
v... | stackexchange/codereview |
One of the things that I really like in Windows API is overlapped I/O. I've written dozens of network servers using overlapped I/O (for both sockets and files) with only a limited number of threads. I'm also a driver writer, so that I know well how overlapped I/O is implemented "behind the scenes".
The only thing that ... | stackexchange/codereview |
LS,
I'm trying to open an sharepoint 2010 list with InfoPath 2010 but when I try this I get the following errormessage: "this feature requires sharepoint server 2010 or greater with infopath forms services enabled". Strangely everything works if I create an empty form with InfoPath, it even publishes to SP2010. My curr... | stackexchange/codereview |
the title says pretty much what I'm trying to do. I have nhibernate hql with select case
select application.SubmissionDate, count(candidates)
from Application as application group by application.SubmissionDate
I would like to have the return values from this query into an object (which is not in nhibernate mapping fi... | stackexchange/codereview |
I've worked with C# and other programming languages for a while now, and am ashamed to say I'm unfamiliar with the standard on where to put resources such as program icons, and how to reference them within my code.
Specifically, for a C# Windows Forms Application, where would it be appropriate to put my icon resources,... | stackexchange/codereview |
Im working on a very simple project in java that utilizes the Swing component
and I have a class that when finished with all its statements, Eclipse underlines it with a yellow line and gives the warning "The serializable class HelloComponent does not declare a static final serialVersionUID of type long"
The program wo... | stackexchange/codereview |
I have an ASP.Net 4.0 Web App. I'm try to architect a "remember me for 14 days" requirement. After that period I'd like to force them to re-login.
So my question is how to do this. I'm thinking of creating my own HttpModule and have it hook into the PostAuthenticateRequest event. In this event I'll check if the cur... | stackexchange/codereview |
Hi again :)
I'm using jQuery script to show/hide some content:
<script type="text/javascript">
$('.toggleButton').click(function() {
var id = this.id.replace('toggleButton', '');
$('#content' + id).toggle();
});
</script>
Since I'm using PHP, I am iterating through few items and each of them has a button to sh... | stackexchange/codereview |
What are the best technology for the implementation of CA with respect to programming language ,database ,openssl etc
| stackexchange/codereview |
I'm trying to figure out how to calculate the Internet Checksum in Java and its causing me no end of pain. (I'm horrible at bit manipulation.) I found a version in C# Calculate an Internet (aka IP, aka RFC791) checksum in C#. However my attempt at converting it to Java does not see to produce the correct results. Can a... | stackexchange/codereview |
I have the following setup:
<ul class='_lscolumn'>
<li>column1
<ul class='_lswindow'>
<li>window1
<ul class='_lslink'>
<li>link1</li>
<li>link2</li>
</ul>
</li>
<li>window2</li>
<li>window... | stackexchange/codereview |
Hello i try to set session with some values but i will not set my session :S and yes my $tjek_login is true
if($tjek_login === true)
{
$session_data = array(
'username' => $username,
'ip_adresse' => $this->input->ip_address(),
'sidst_aktivitet' => 'hm',
'logget_ind' => true... | stackexchange/codereview |
How can I detect if a search query is in the form of a question?
For example, a customer might search for "how do I track my order" (notice no question mark).
I'm guessing most direct questions would conform to a particular grammar.
Very simple guessing approach:
START WORDS = [who, what, when, where, why, how, is, can... | stackexchange/codereview |
I'm a C++ programmer entering the world of Java. And I cannot get rid of the bad feeling of having to let the Java garbage collector do my cleaning.
How, for example, will this code behave in Java?
public void myFunction() {
myObject object = new myObject();
object.doSomething();
}
Will the local variable obj... | stackexchange/codereview |
a = raw_input('How much is 1 share in that company? ')
while not a.isdigit():
print("You need to write a number!\n")
a = raw_input('How much is 1 share in that company? ')
This only works if the user enters an integer, but I want it to work even if they enter a float, but not when they enter a string.
So the... | stackexchange/codereview |
I have a midi.dll, where do I install the file with Monodevelop IDE?
| stackexchange/codereview |
I have a file with the following lines in it:
bash$ cat blah.txt
<smsDeliveryStatus value="Provider Malfunction"/>
<smsDeliveryStatus value="Provider Malfunction" id="23434"/>
<smsDeliveryStatus value="Delivery Failure"/>
<smsDeliveryStatus value="Delivery Successful" id="2"/>
bash$
I want to extract value and id from... | stackexchange/codereview |
I had originally asked the original, closely-related question on superuser.com, but I feel this might be a little more stackoverflow speed since I want something programmatic and automated, using tools no one there knows well. Here is the scenario:
Two accounts:
Account A (original work account with
quota)
Account ... | stackexchange/codereview |
I want to segment image of various forms which are handwritten, into separate sections and words. I don't want character recognition; just given an image I want to segment it into all the different handwritten words it contains and if it contains multiple sections (separated by lines), then a separation of those. What ... | stackexchange/codereview |
This is about how MATLAB can take very different times to plot the same thing — and why.
I generate 10000 points in 3D space:
X = rand(10000, 1);
Y = rand(10000, 1);
Z = rand(10000, 1);
I then used one of four different methods to plot this, to create a plot like so:
I closed all figures and cleared the workspace bet... | stackexchange/codereview |
I am not able to access to the server side to change codes.
I have the following output. The second tr shows tax and the third one is the sum.
Now I want to swap them. Showing the sum first and then tax with jquery.
The value of tax and sum will be different each time.
But tax will always have a text of 'Hvorav mva. u... | stackexchange/codereview |
I created a custom Navbar for my application using a protocoll:
@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"navbar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
this works fine. all to... | stackexchange/codereview |
I reinstalled my computer and tried now to import my Android project into the workspace.
(File -> Import -> General -> Existing Project into Workspace)
But now I have got a strange error.
bNormal.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
gotoNext... | stackexchange/codereview |
The following code creates a diagram of a certain calculation. My problem is that even though the terms in denominator are in a nice order, after applying Plus on it, they get rearranged arbitrarily. Any suggestions how to force the original order to be kept?
(source: yaroslavvb.com)
r[i_] := Floor[(i - 1)/n] + 1;
c... | stackexchange/codereview |
In OpenCL, I have a kernel that needs to operate on complex and real data. I could put a conditional statement in that calls the right line of code to handle this, or I could have two kernels that I call and push the conditional statement out to my calling code.
This obviously is bad for maintainability, but is it sign... | stackexchange/codereview |
I am trying to extract data from a string using Regex in VB.net. This is my string
CN=firstname lastname/OU=orgunit/O=org;shortname
I am basically trying to retrieve
firstname lastname (together)
orgunit
org
shortname
can someone please help me.
| stackexchange/codereview |
I'm building a wp7 app in Silverlight. All of my app's state is stored in NavigationContext.QueryString. If this could be saved on application deactivation, and that page navigated to on application reactivation, that would take care of my requirements for tombstoning.
However, I'm not quite sure how to do this. I was ... | stackexchange/codereview |
My objective is this :
creating a rolling text that does not cross borders of a rectangle inside the canvas.
Some text should appear partially. Yet i have not found a way to obtain this.
The only thing i can think is of some setting of the canvas like rotate, and translate that show the drawings only in the limited ar... | stackexchange/codereview |
I wrote a tiny program that requires some libraries including libboost_filesystem, libboost_program_options and libcurl.
I compiled it on my home machine and took the binary to my computer at work to test it there. But there it gives the following error message when I try to start the program:
error while loading share... | stackexchange/codereview |
In delphi 2009 I have a reference to a IInterface which I want to cast to the underlying TObject
Using TObject(IInterface) obviously doesn't work in Delphi 2009 (it's supposed to work in Delphi 2010 though)
My searches lead me to a function that should do the trick, but it doesn't work for me, I get AV's when I try to ... | stackexchange/codereview |
I am currently looking at a solution with 5 projects in it. The are as follows: BusinessLogic, BusinessObjects, DataAccess, and the ActualProject Name. I am wondering what exactly these would each do?
Businesslogic: Has a folder in it called business manager. Here there is some methods possibly looking like this checks... | stackexchange/codereview |
I'm using Netbeans 6.9 and writing a PHP class that implements the Iterator interface. I would like to have the IDE offer Intellisense as I iterate over the items in my object. It seems to work for the Zend Framework as I've noticed that when iterating over a Zend_Db_Rowset I get intellisense for a Zend_DB_Row. For ... | stackexchange/codereview |
This question has probably been asked before so I'm sorry.
I am working on an iPhone app and lets say I have a variable, var, in class1. I want to add a UIButton in class2 which when hit resets the var to 0. The var value is saved when the app closes so when the view loads var is assigned with the value (I assume you ... | stackexchange/codereview |
I tried to get the window viewport width. when i use document.documentElement.clientHeight(or)window.innerWidth i can get exactly what i need. If i logged In at minimize mode,then if i maximize the window the viewport width will not be resized.I got the viewport width when it is minimized. how can i slove it?
I also ... | stackexchange/codereview |
I'm sure MongoDB doesn't officially support "joins". What does this mean?
Does this mean "We cannot connect two collections(tables) together."?
I think if we put the value for _id in collection A to the other_id in collection B, can we simply connect two collections?
If my understanding is correct, MongoDB can connect ... | stackexchange/codereview |
(This question attempts to find out why the running of a program can be different on different processors, so it is related to the performance aspect of programming.)
The following program will take 3.6 seconds to run on a Macbook that has 2.2GHz Core 2 Duo, and 1.8 seconds to run on a Macbook Pro that has 2.53GHz Core... | stackexchange/codereview |
For C2DM to work, a device clearly must be at API level 8. However, does this really require that the application be compiled at that level? None of the code to work with C2DM requires any APIs at level 8. So would it be possible to have an app at a lower level, maybe API level 4 or 6, and have it try to do the C2DM re... | stackexchange/codereview |
I am doing a assignment about this.
For Eaxmple:
I have a message (String), and the length is 302 in dec, 12e in hex.
String message = "THE MESSAGE BODY";
int lengthOfMessage = number.length(); // 302
String lengthOfMessageInHex = Integer.toHexString(lengthOfMessage); // 12e
Now, I need to change the lengthOfMessageIn... | stackexchange/codereview |
I wan't to post a CSV file to a web service using the Jersey Client without having to buffer the csv content in memory.
So I started of with some code similar to this:
String csvContent = [the buffered CSV content];
Client c = Client.create();
WebResource r = c.resouce("http://example.com/services/service");
r.type("te... | stackexchange/codereview |
First I remove control visibility by doing this:
For Each ctl In Me.MySubform.Controls
ctl.Visible = False
Next ctl
and later, I go back and bind those controls I'm going to use for the current list of fields using an array of the caption and control source name.
For i = 0 To UBound(MyArray) Step 2
Me.MySubfor... | stackexchange/codereview |
I needed to create dynamic breadCrumbs that must be realized automatically by the application. So I have the following structure in the URL for navagation:
nav=user.listPMs.readPM&args=5
then i could have a function-file whose sole purpose would be to define the user.listPMs.readPM function itself:
file: nav/user.listP... | stackexchange/codereview |
Is there any way to receive an event via a broadcast or any other way when new activity starts or any task in android?
Thx
Mahmoud
| stackexchange/codereview |
I'm trying to insert a player on a Facebook Page tab with FBML with fb:swf. I have the following:
<fb:swf
imgsrc="http://IP/player/player.gif"
swfsrc="http://IP/player/player.swf"
flashvars="source=http://IP/player/movie.flv"
swfbgcolor="000000"
wmode="opaque"
quality="best"
width="520"
height="430" ... | stackexchange/codereview |
Just started playing with yahoo pipes with twitter for an auto-retweet. For some reason I keep getting an infinite loop. Does anyone know what I am doing wrong? Here is my pipe:
http://pipes.yahoo.com/pipes/pipe.info?_id=ef6d2f2022a9e560484dc69b12fd4a22
| stackexchange/codereview |
I want to do something pretty simple, but I'm not sure what the best solution is. Basically, I want to host a custom .NET web service for a client. The web service is just an integration as it will select data from one source, massage the data, and insert it into its destination. My two-part question is the following:... | stackexchange/codereview |
I want to replace a part of the name attribute with a new value. This value is dependent on the original value. The name attribute has a value of: timeslots[timeslot_1][start]
How do I increment the value 'timeslot_1' to 'timeslot_2' and replace the original value with this one?
The cloneElm consists of two types of e... | stackexchange/codereview |
I want to sort an array I have so that the Umlauts are treated as normal versions of the characters (ä == a, etc.). I thought localizedCaseInsensitiveCompare: should do the trick. But it doesn't. Anyone?
Best
–f
| stackexchange/codereview |
in my 2col-inside.phtml file i can successfully call a block using:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('blue-banner')->toHtml() ?>
however i would like to serve up a unique banner based on the URI or body class. so something like:
<?php if($bodyClass['category-blue']): ?>
<?php echo ... | stackexchange/codereview |
GIT p4merge - 2 or more conflict in same file
I have integrated p4merge with GIT and i came across this situation once.
I have a file with merge conflicts. The file say foo.c has merge conflicts in 3 different lines of code (the first line with conflict, some lines in the middle with conflicts).
When i resolved the f... | stackexchange/codereview |
QVGA is 240 x 320, then WQVGA is 240 x 400, or 240+ x 400?
| stackexchange/codereview |
I often find that I need to find the width or height of a part of a non-client area (sizeable tool window border width, for instance) and I have never come across a complete diagram of what part is what. Much of it I can guess, but I'd love to have a really good set of diagrams that match up with what's found in .Net's... | stackexchange/codereview |
We've been developing an Android app at work for a few months now and recently acquired Droid Incredibles (API ver. 8) to replace our HTC Dev Phones (API ver. 4).
DANG are these some sweet new toys, but unsurprisingly, they've got a few quirks...
1) It's normal for my user to let the program run for long periods witho... | stackexchange/codereview |
I Want Send A File From A Computer To Other Computer With UDP protocol.How Can I do this?
I Want A Sample To Send File...
| stackexchange/codereview |
I have a file with a specific format that I would like to parse. In this file I have a number on a line which specifies the number of lines to follow it.
example excerpt from the file:
3 // number of lines to follow = 3
1 3 // 1st line
3 5 // 2nd line
2 7 // 3rd line
I want to read the number (3 in this example) and t... | stackexchange/codereview |
I wanna fetch my blogger data through google data api
I wrote this code:
public class blogger extends Activity
{
private GoogleService myService;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
... | stackexchange/codereview |
I've been working in a multilanguage site build with asp.net and visual c#.
I'm using Local_resources to get my aspx files in Spanish and english.
If a use my aspx in the root of the website the Local_resources folder find the aproppiate resx for my aspx (because both have the same name). But if i put all my aspx into... | stackexchange/codereview |
Small but boring issue:
We have an Form field inside an DojoX Grid (1.2). If the user changes the value inside this field, and is hitting the "Submit" Button without clicking somewhere else the new value is ignored.
Is there any way to "accept" all Values entered inside the field, when hitting submit? Or something like... | stackexchange/codereview |
i have a user-control designed as a button . The problem is that i can't display an image as the background.
public partial class inout_buton : UserControl
{
Bitmap bmp;
public inout_buton()
{
InitializeComponent();
try
{
Stream s = this.... | stackexchange/codereview |
In order to override the table_exists? method in the Rails PostgreSQL adapter I have tried the following in an initializer file:
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
def table_exists?(name)
raise 'got here'
end
end
This will raise the the following error:
uninitialized constant Act... | stackexchange/codereview |
I am trying to redirect default.php to / (path with no arguments) in Apache with .htaccess, but so far I have not find a way to make this work. If I do something like:
Redirect permanent /default.php powerkaraoke.com/
I get 500 error. Other redirects work fine, for example powerkaraoke.com->www.powerkaraoke.com.
What i... | stackexchange/codereview |
I'd like to integrate one of my Drupal site with Facebook API. One of my questions is:
after a user login my Drupal site
how can my site tell whether the user:
has Liked one of my Drupal pages or not
and redirect the user to a different page based on Liked/Not yet Liked
Thanks!
| stackexchange/codereview |
Dim group11_0_count = 0
Dim group11_1_count = 0
Dim group11_2_count = 0
Dim m As Integer = 0
Dim n As Integer = 0
Dim increment2 As Integer
For m = 0 To machings2.Items.Count - 1
For n = 0 To 3
If machings2.Items(m).ToString.Chars(n) = "1" T... | stackexchange/codereview |
I have, what I think/hope, is a very simple PHP question. I have made a class to create database connections and issue common queries. I am trying to open two different database connections by creating two objects from the same database class. My code is as follows:
//connect to DB
$dbh = new DB('localhost', 'db1',... | stackexchange/codereview |
In Ajax,is there any technique exist to validate ASP.NET GridView, i.e., to check whether the GridView contains at least one row?
Any comments welcomed.
| stackexchange/codereview |
I am trying to save a recorded video to the library using the UIImagePickerController delegate. It works fine for pictures but it doesn't save if it's a video, plus after trying to save a video if I open the Photos app, I get a message "Please wait. Updatring library", and a progress bar with the label "Rebuilding libr... | stackexchange/codereview |
Visual Studio C++ lib project
Project is set to use precompiled headers
stdafx.cpp is set to create precompiled header
I have a header file, MyClass.h
If I build, then make a change to MyClass.h that should fail to compile, compile still succeeds.
If I do a rebuild, or if I make a change to a cpp file that includes "My... | stackexchange/codereview |
I need to write a stored procedure that will search a table based on optional parameters Using sql server 2008.
There will be two modes
basic search mode (we just pass some text)
advanced search mode (Optional parameters are used NOT SearchText is used.)
For testing I am using the AdventureWorks.Person.Contact table
... | stackexchange/codereview |
I have a varchar column with mixed data- strings, integers, decimals, blank strings, and null values. I'd like to sort the column the same way that Excel would, first sorting numbers and then sorting the strings. For example:
1
2
3
3.5
10
11
12
alan
bob
carl
(blank/null)
(blank/null)
I've tried doing something like... | stackexchange/codereview |
I am using the following Structuremap bootstrapping code for my entity framework 4 entities:
x.For<XEntities>().LifecycleIs(Lifecycles.GetLifecycle(InstanceScope.PerRequest)).Use(() => new XEntities());
But when I do two nearly simultaneous requests, I get the following exception:
EntityException:The underlying provid... | stackexchange/codereview |
I have this simple program. Here I try to bind member function with object and call later on with arguments required in member function call.
When the member function taken a pointer to integer, gcc fails to compile. With integer parameter the program gets compiled. Is this a bug with boost::bind or am I missing someth... | stackexchange/codereview |
Not only is this valid and doesn't give any warnings even with -Wall:
void* p = false; // actually 'true' doesn't work here
bool b = "Hello, Boolean!";
but also this compatibility rule permits selecting an overloaded function/operator for a wrong type. Let's say you overloaded your operator << for all fundamental typ... | stackexchange/codereview |
I 'm trying to display the thumbnail for a picture or video my app takes. It works perfectly for video but for a picture it simply doesn't show anything. This is the code I used:
[assetImageView setImage:[UIImage imageWithCGImage:[asset thumbnail]]];
I also tried this as an alternative but also nothing:
ALAssetReprese... | stackexchange/codereview |
Using Drupal 6 with Services 2.2, I can create nodes with title and body populated fine. I can also upload an image. But I can't populate the imageField CCK field. Also, I have a custom node_reference field that I cannot populate.
Any ideas or example services?
Thanks
| stackexchange/codereview |
I am trying to create a WCF Data Service that returns objects that look somewhat like my POCOs; they differ insofar as they have a single property which is computed when a query is called.
In other words say I have a POCO Film. I want to be able to query for Films which gives me Films with each with an added property ... | stackexchange/codereview |
I have the following piece of javascript but for some scoping reason the "names" that is returned from myfunc is empty.
var myfunc = function(client, id) {
var names = new Array();
client.query(
'SELECT stuff FROM mytable WHERE id="'+id+'"',
(function selectCb(err, results, fields) {
if (err) {
... | stackexchange/codereview |
i am setting up a simple UISlider to animate it's progress:
[UIView animateWithDuration:songLength
delay:0.0
options:UIViewAnimationOptionRepeat|
UIViewAnimationOptionAllowUserInteraction|
UIViewAnimationOptionBeginFromCurrentState
animations:^{
[UIView setAnimationDurat... | stackexchange/codereview |
I'm trying to set up my machine to do some Android development, but I'm running into a couple of issues when installing everything I need. Here's some info about my set up:
I'm running Windows 7 64 bit
I have the Java JDK 1.6.0_22 version installed
I downloaded Eclipse Galileo 3.5 R2 for Java Developers
My first issue ... | stackexchange/codereview |
So I have beating my head against the wall on this. I feel like I have interpretted the docs and examples I found, but this just won't seem to go away.
Here is the tag code:
from google.appengine.ext import webapp
register = webapp.template.create_template_register()
def test_tag():
return "TEST!"
register.si... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.