instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Short description of my environment :
Symfony : 1.4.8
Doctrine : 1.2.3
Centos 5.5 (PHP 5.3.3)
MySQL 5.1.52
I've a new project built in Symfony and here is the project schema :
# Car
RjCar:
actAs: { Timestampable: ~ }
columns:
id: { type: integer(4), unsigned: true, primary: true, autoincrement: true }
yea... | stackexchange/codereview |
I have a problem with exception handling and parallel tasks.
The code shown below starts 2 tasks and waits for them to finish. My problem is, that in case a task throws an exception, the catch handler is never reached.
List<Task> tasks = new List<Task>();
try
{
tasks.... | stackexchange/codereview |
I have a memory management bug in my iOS app. I have set NSZombieEnabled, and the "message sent to deallocated object" message duly appears in the console. But execution appears to go past the point of that message before the app crashes. At a minimum, it is stepping out of some methods. This makes it harder to tra... | stackexchange/codereview |
I'm currently working on a website for the iPhone. The website is longer than the viewport of the iPhone, so I want to hide the overflow. How can I do this?
I'm already using…
<meta name="viewport"
content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
... so it's not possible to... | stackexchange/codereview |
I'm looping to loop over a range with multiple rows and columns using Excel 2007 VBA.
I'm specifically trying to loop over a user selected range, and perform a calculation on each column in the range, and output the calculation two rows below each column.
| stackexchange/codereview |
I have the following models in a Rails 3 app, and select requirement:
class Item < AR
has_many :holdings
class Holding < AR
belongs_to :item
The Holding model has an 'active' boolean value.
I wish to find each Item that has 0 'active' holdings ( it may have any number of associated holdings ), I've tried quite a few... | stackexchange/codereview |
The following (simplified version of our) code passes our JUnit tests under Hibernate, but not under EclipseLink. What is needed to make this work under EclipseLink?
public static void store(EntityManager em, String a, String b) {
Entry entry=new Entry();
entry.setFirst(a);
entry.setLast(b);
em.persist(... | stackexchange/codereview |
Hi I know I can load the javascript ajax libraries from jquery and other sources from google, but is there a central place that you can reference for the standard themes in the jquery ui as shown on jqueryui.com, so I don't have to download a standard theme?
| stackexchange/codereview |
How can I set TimeZone using Powershell, on a Windows Server 2008 R2 target machine?
| stackexchange/codereview |
I am following the steps listed here: http://developer.android.com/guide/developing/device.html.
I'm using eclipse 3.6 (It was the only download i could find... couldn't find 3.5). When i run SDK Manager.exe I see that I have USB Driver Packer, Revision 3 installed.
I Set my phone to enable USB Debugging and I plug in... | stackexchange/codereview |
I got this code to mute/unmute the master volume
private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int WM_APPCOMMAND = 0x319;
[DllImport("user32.dll")]
public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (I... | stackexchange/codereview |
Floats are not calculating as expected in my Java/JOGL (OpenGL for Java) program. In a draw method when each frame (at 60 frames per second) is called I try to modify the position of an object. All values are float values.
float timeElapsed=((float)(System.currentTimeMillis()-lastdrawn))/1000;
float moveZ=(timeElapsed... | stackexchange/codereview |
i have an ASP.net page that generates dynamic xml but the get statement of a jquery ajax request won't recognize the file. this solution worked with a php doc getting the dynamic xml. The asp.net page that generates xml works fine. The ajax request never succeeds. any ideas as to why much appreciated
<%@ Page Language... | stackexchange/codereview |
Hi I have been using Emacs23 for some time now and find it a really cool editor. However I am not happy with the cursor (or point in Emacs lingo) being a ' little black box'. I want it to be a nice thin straight line just the way it is in gedit or notepad. Any suggestions on how to do this?
| stackexchange/codereview |
I have a ViewModel carved from several Entity relations:
Products[].Prices[].Others[].myField
How do I order Products[] by the nested myField? When I do the Where clause, it's like this:
Products.Where( p => p.Prices.Any( q => q.Others.Any( r => r.myField == 4)));
So if I wanted to Products.OrderBy() and order by my... | stackexchange/codereview |
I've basically got a little function called findItem() that is supposed to be finding the elements I'm looking for based on custom data- attributes on the element.
In this case these are purely numerical eg. data-slide=1.
I'm a bit clueless as to how to match the value of each item's data-slide to one that is contained... | stackexchange/codereview |
I need to POST some data to a PHP page using cURL, and the request contains three parameters:
Two of them are regular text values
One is a Base64 encoded file
I've noticed that the Base64 value is corrupted during the transmission.
This is the code that's sending the request:
$filename = "img2.jpg"; //A sample image ... | stackexchange/codereview |
I have a problem with FaceBooks API.
I can login and logout with no problem. But when i logout and then try to login back it logs me in automatically without even asking to enter username and password. But when i logout again it works fine. It will show me back the username and password fields.
I think it has something... | stackexchange/codereview |
I need to develop an application that is hosted in Google App Engine and access mysql database that is hosted in separate server which is not enable RMI or tomcat installed. Data(music files) stored in same server and for music files paths are stored in mysql database. Users can select music category and play them.
Ju... | stackexchange/codereview |
i am using the following code
<?php
$rFile = $_GET['sfile'];
$rExt = $_GET['ext'];
header("Content-disposition: attachment; filename=".urlencode( $_GET['sfile'] ).".".$_GET['ext']);
header('Content-type: Image/jpeg');
readfile( "wallpapers/".$rFILE.$rRes.$rExt );
?>
i pass the variables and the files are being down... | stackexchange/codereview |
Something so easy..
I just want the 'run' window of intellij, that prints output, to wrap instead of just running off the side of the screen. I've spent 15 minutes trying to figure it out. Please someone tell me!
Thanks!
| stackexchange/codereview |
I'm using the following to add one to number:
<div id="count">00</div>
<div id="count">03</div>
<div id="count">08</div>
<div id="count">12</div>
$('#count').text(function(i,txt) { return parseInt(txt, 10) + 1; });
I always want there two be 2 places, 00 even if the number is under 10. How can I get the func above, w... | stackexchange/codereview |
In ASP.NET MVC 3, what class doe Views and Partial Views inherit from and can the class (presumably it's a class somewhere) be inherited from to extend functionality.
For example, the default LogOnPartial control has the following (using Razor syntax)
Welcome <b>@Context.User.Identity.Name</b>!
Where is the Context ob... | stackexchange/codereview |
I have one page which has one banner at top and one link to watch video.
This video is open in thick box.
My problem is when i close that thick box when video is completed then it also stop all flash content on that particular page.
I have also added one code to display that flash object which is
function showHideFlas... | stackexchange/codereview |
I already looked at the Scala question about emulating Java's enum and case classes vs. Enumeration but It seems too much effort for too less benefit.
Basically I would like to have a values method returning all singleton objects of DayOfWeek without repeating myself a few times.
This is how my code should look like:
o... | stackexchange/codereview |
I have edited the standard GroupBox template as I wanted to customize it. Apart from other customizations, I wanted the GroupBox header to be Horizantally aligned in the Center instead of Left or Right. The alignment of the Header is not a problem however, the real problem is the OpacityMask defined for the Border cont... | stackexchange/codereview |
I want to connect with MS Access from my Java code.
How to do this?
I have written the following code:
import java.sql.*;
public class Test
{
public static void main(String[] args)
{
String dataSourceName = "test";
String dbURL = "jdbc:odbc:" + dataSourceName;
try {
Class.forName("sun.jdbc.odbc.JdbcOd... | stackexchange/codereview |
I want to optimize this SP, anyone have some idea how I can do that? Thanks in advance.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Members] (
@StartTime datetime = null
, @EndTime datetime = null
, @CustomerEmail nvarchar(255) = null
, @CustomerName nvarchar(255) = null
, @S... | stackexchange/codereview |
I have a situation which I will try to explain clearly. I have two services, Service A and Service B.
Activity C connects to service A using onBind(). Service A connectes to Service B using a callback object. I want Service A's onbind to not be executed until Service B is connected to Service A. What will be a good wa... | stackexchange/codereview |
I need to make a light-weight application for video editing and viewing.
I was thinking of either writing an executable program written in Python, or a light-weight web app using JavaScript and HTML5. Flash, as a third option, is pretty much out of the question, since it's too fat and has many security flaws.
EDIT: The... | stackexchange/codereview |
I am relatively new to asp and have this stupid problem which returns null all the time. Here is my function which I think is pretty straightforward. I have been reading Steven Sanderson's book which has been extremely helpful. Anyway here is my function which I will explain afterwards
public ActionResult Menu(string ... | stackexchange/codereview |
I want to provide a way to upload plugins (assemblies) to a site by users for a scripting propose. Through mono.cecil I can analyse those assemblies and limit access only to a predefined list of functions, but I also need to limit memory usage, execution time and kill the thread if it goes to overdraft this resources.
... | stackexchange/codereview |
I'm using SQL Server 2000 and i'm trying to run an update query to a linked server but it is really slow.
It seems that it may be an indexing issue but i'm yet to figure out how to add indexes to linked servers
Does anyone know if this is possible?
| stackexchange/codereview |
I have in an HTML page, an element that appears several times, and running the same JS.
Problem is, I want it to do a specific function only if it was the first one to run it (his siblings never ran it - YET).
I need semaphore to sync between them.
I am unable to know how to declare a variable and to do semaphore in t... | stackexchange/codereview |
I would like to load a table element from another HTML (additional_content.html) into the current HTML via jQuery. I managed to load the content but I am not able to access the elements inserted as if they were not inserted. However, when inserting an alert statement just after the load statement, I am able to access t... | stackexchange/codereview |
Possible Duplicate:
Spring + Hibernate : a different object with the same identifier value was already associated with the session
I've been having problems with my hibernate annotations. I have a bidirectional relationship between 2 classes. Here's the mapping(thanks to axtavt):
@Entity
public class Receipt implem... | stackexchange/codereview |
Is there a way to do this from the application.rb?
| stackexchange/codereview |
I have a table of 2+ million (rows) products with 44 fields (columns).
I am attempting to query this table based on the 'NAME' field (varchar 160) which I have a fulltext index on.
Here is the query that is currrently taking 71.34 seconds to execute with a three word $keyword,
62.47 seconds with two word $keyword and 0... | stackexchange/codereview |
Is it possible to make the phone vibrate for ANY toast message in your program?
Or do you have to insert a vibrate command on each toast?
Cheers.
| stackexchange/codereview |
I have a script that animates a menu. I don't want it to if the menu contains an object with an active class (.active). I can't figure it out. I have tried several things, but I guess I'm thinking all wrong. Can you help me?
This is the script:
$('#navigation .toplevel, #navigation > ul > li').each(function(idx) {
... | stackexchange/codereview |
I'm creating a VBA macro that will validate a submitted document, but I can't seem to find a way to check for the Outline Level of the document as a whole. What I need is a way to tell the outline level selected in the Outlining Ribbon, 1-9 or All Levels.
| stackexchange/codereview |
I have a Post object I am rendering in a partial, where one element is
= post.created_at
I want to format the time so I've tried variations of strftime in the partial and as a model hook.
= post.created_at.strftime('etc etc')
&
= post.formatted_time
These work fine when there is something to render, but when there i... | stackexchange/codereview |
There is a common pattern:
there are many developers working on one project and the Gemfile(.lock) is shared via SCM. But what if some developers want to use different tools for testing and development? How to do it?
The problem is, that when you put conditional sections to your Gemfile, also the Gemfile.lock will be ... | stackexchange/codereview |
I have a Spring-MVC 3.0 web application built with Maven. All Spring dependency versions are defined with a maven property <spring.version>3.0.3.RELEASE</spring.version>. When I change the version to either 3.0.4.RELEASE or 3.0.5.RELEASE, then the web application fails with the following exception:
ERROR: [DispatcherSe... | stackexchange/codereview |
I have a frame that I fixed the size of using the grid_propagate() method. I'd like to center a frame within this frame. How do I go about this?
| stackexchange/codereview |
I have a null pointer on a button that I need to take me to a new layout when pushed. I have the code set as:
((Button) findViewById(R.id.analyzee)).setOnClickListener(btnClick);
inside a method that uses conditional statements.
It is a basic face detect app. If faces are not found, I do this:
if (facesFound < 1) ... | stackexchange/codereview |
I do not have any experience regarding #D animation.
But which one is better java with open GL or c++?
What is the diffrence between java 3d and opengl?
| stackexchange/codereview |
I have 2 servers set in Mirroring without Witness - Transaction Safety OFF for some databases and Safety Full on most critical. I know what are the failover scenarios when Principal or Mirror server fails and what needs to be done to bring the db's online but I never tested one specific scenario:
The Principal server... | stackexchange/codereview |
I'm trying to create an intelliJ plugin that needs to execute maven targets on the current project. All the talk in the intertubes recommends using the MavenEmbedder. Good luck with that. The 2.0.4 version isn't well supported and there are no references for how to use it.
I gave it a whirl and ran into a wall whe... | stackexchange/codereview |
I'm new to bison and I'm getting a "conflicts: 1 shift/reduce" error. Can anyone shed some light on this?
Here's the y file.
test.y:
%{
#include <stdio.h>
#include <string.h>
#define YYERROR_VERBOSE
#define YYDEBUG 1
void yyerror(const char *str);
int yywrap();
%}
%union
{
int integer;
char *string;
}
%token... | stackexchange/codereview |
I have another puzzling problem.
I need to read .xls files with RODBC. Basically I need a matrix of all the cells in one sheet, and then use greps and strsplits etc to get the data out. As each sheet contains multiple tables in different order, and some text fields with other options inbetween, I need something that f... | stackexchange/codereview |
As a followup to Class containing auto_ptr stored in vector, I believe the unstated conclusion there is that it is OK to use classes with an auto_ptr member as container elements, so long as both copy construction and copy assignment are user-defined (so as not to invoke the auto_ptrs copy constructor and copy assignme... | stackexchange/codereview |
I try to understand how Protovis works, and I stumbled upon code like this:
force.node.add(pv.Dot)
.size(function(d) (d.linkDegree + 4) * Math.pow(this.scale, -1.5)) // notice this
.fillStyle(function(d) d.fix ? "brown" : colors(d.group)) // and this
.strokeStyle(function() this.fillStyle().darker()) // and... | stackexchange/codereview |
As I say in the topic, I want my WebView to prevent from reloading the webpage when another activity comes to the foreground or just when the orientation is changed. The reason why is because the WebView content is generated by Javascript/AJAX almost completely. After searching on a couple of forums, I found out many p... | stackexchange/codereview |
I have created a PostgreSQL database dump using psql.
Now I want to restore this backup from the file:
psql -d thesamename -f /my/backup/file
But I get errors that the data already exists.
Is there any command to delete everything from the database to bring it to just created state, except dropping and creating once a... | stackexchange/codereview |
Okay, so what I wanted to do was to use DOM introspection to recursively analyze the current state of the DOM and return it as a single, formatted string to be displayed elsewhere.
Either standard DOM functions or JQuery would be sufficient for my purposes.
So far I've tried things like
var txt = $("body").tagName;
va... | stackexchange/codereview |
When calling User.last it looks like Active Record sorts by id.
User Load (1.4ms) SELECT * FROMusersORDER BY users.id DESC LIMIT 1
But when calling User.first it doesn't use an order clause.
User Load (1.9ms) SELECT * FROMusersLIMIT 1
So is this guaranteed to return the User with the lowest id? It seems to in prac... | stackexchange/codereview |
I have a really strange problem that I can't explain and fix, it is driving me crazy.
I have this logo that I am showing on a webpage :
https://i.stack.imgur.com/rnV9i.png
Note the background color value is #400000 or rgb(64,0,0)
I am displaying this image on a webpage set with background color #400000 too.
When displ... | stackexchange/codereview |
Alright, I'm working on a (supposed-to-be) simple counting script using ncurses. Everytime it increments the number, I need it to delete the previous number before adding another number, so that it updates rather than appends.
Here is my code:
<?php
ncurses_init();
$i = 0;
$nStr = "Number: ";
ncurses_addstr($nStr);
nc... | stackexchange/codereview |
This is a tough one. There is probably a name for this and I don't know it, so I'll describe the problem exactly.
I have a dataset including a number of user-submitted values. I need to be able to determine based on some sort of average, or better, a "closeness of data", which value is the correct value. For example, i... | stackexchange/codereview |
Is it possible to use both jQuery and Processing inside the same canvas element?
It's easy enough to combine the two on the same page, but I am wondering if it's possible to place - for example - some jQuery UI draggable boxes in a canvas rendering some Processing code.
| stackexchange/codereview |
I have a C# console program which main functions should let a user grep lines / columns from a log text file.
An Example within the text file the user wishes to grep a group of all the related lines starting from a particular date etc. "Tue Aug 03 2004 22:58:34" to "Wed Aug 04 2004 00:56:48". Therefore after processin... | stackexchange/codereview |
This might be a bit advanced to explain, as it's a pretty complicated thing I'm trying to do (at least to me).
I'm currently building a movie-database for personal use in PHP and MySQL, and the MySQL part is killing me. The current setup is like this:
I have a main movie database containing names, description and value... | stackexchange/codereview |
I tried to learn the meaning of arrows, but I didn't understand them.
I used the Wikibooks tutorial. I think Wikibook's problem is mainly that it seems to be written for somebody who already understands the topic.
Can somebody explain what arrows are and how I can use them?
| stackexchange/codereview |
How do I have an app return to the 'Home' screen when the user is on a different class and they click the back/return button on their phone?
Right now, when they access a different class and hit the back button, it goes back to the Home screen on the Droid rather than the Home screen on the app - how do I get it to go ... | stackexchange/codereview |
I have a maven plugin that transforms class bits after compilation. This plugin works precisely as designed when run from the command line. However, the problem arises in Eclipse (3.6.1) when the Maven project is building from a clean state. What happens is that I get an error message in the console informing me tha... | stackexchange/codereview |
I'm developing a simple p2p program that is meant to work over the Internet, this works fine on a LAN, but when a router and internet connection are involved nothing gets to the machine. I am aware that this is a network question more than a C# question, but I can't have users of this program set up port forwarding eve... | stackexchange/codereview |
I want to program to integrate this 2 devices GPS Device and RFID. To show a map that have direction to navigate user to destination that input from RFID Card.
What devices or platform that I should use?
| stackexchange/codereview |
Using mongoose, I would like having a callback after 2 different queries have completed.
var team = Team.find({name: 'myteam'});
var games = Game.find({visitor: 'myteam'});
Then how to chain and/or wrap those 2 requests within promises assuming I want those requests non blocking and executed asynchronously?
I would l... | stackexchange/codereview |
I use the MySQL Connector/Net to connect to my database by referencing the assembly (MySql.Data.dll) and passing in a connection string to MySqlConnection. I like that because I don't have to install anything.
Is there some way to "Choose Data Source" in Visual Studio 2010 without installing something?
How can I get ... | stackexchange/codereview |
Console is not showing any errors, neither is Firebug so I'm at a loss as to why this isn't working.
My form:
<form action="" method="post" id="sendEmail">
<div class="alignleft">
<p><label for="order_ref">Photo ID:</label><input type="text" name="order_ref" id="order_ref" class="text smallinput" disabled="... | stackexchange/codereview |
What is the actual difference between memchr() and strchr(), besides the extra parameter? When do you use one or the other one? and would there be a better outcome performance replacing strchr() by memchr() if parsing a big file (theoretically speaking)?
| stackexchange/codereview |
Possible Duplicate:
List selectors for obj-c object
Does anybody know how to get all selectors that a instance respond to during runtime in objective C?
| stackexchange/codereview |
If I apply an arbitrary number of manipulators to a stream, is there a way to undo the application of those manipulators in a generic way?
For example, consider the following:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << "Hello" << hex << 42 << "\n";
// now i want to "roll-... | stackexchange/codereview |
In my application I have a JTable and a List.
The List:
The list is populated using a JPA query. The user can re-execute the query by changing attributes in the GUI. Let's assume the query has a named parameter "year" and the user can change this. Then the following happens (simplified by leaving out exception handlin... | stackexchange/codereview |
There is an HTML table as
<table>
<tr><th>NAME</th></tr>
<tr><td>SAL</td></tr>
<tr><td>TOM</td></tr>
<tr><td>SAM</td></tr>
<tr><td>Jenny</td></tr>
</table>
Download to excel sheet
On click hyperlink how to save the table to excel sheet
| stackexchange/codereview |
I have a statement like this:
if(window.location.hash != '' && window.location.hash != '#all' && window.location.hash != '#')
Can I write it so I only have to mention window.location.hash once?
| stackexchange/codereview |
I can't figure out how to create a query like this with Hibernate Criteria synthax
select * from x where x.a = 'abc' and (x.b = 'def' or x.b = 'ghi')
Do you have an idea of how to do that?
I'm Using Hibernate Restriction static methods but I don't understand how to specify the nested 'or' condition
| stackexchange/codereview |
I'm trying to install the jQuery plugin for Grails. Now I have a path and an include but it's pointing to js/jquery/jquery-1.4.3.js. I would like to change this. Following the documentation I should add
jquery {
sources = ''
version = '1.4.4'
}
To my Config.groovy file. Having done this I see no change. What i... | stackexchange/codereview |
I'm transferring a very large (35GB) file through SFTP and FileZilla.
Now the transfer is 59.7% done, but I keep getting this error, and it hasn't changed that number for hours.
Error: File transfer failed after transferring 1,048,576 bytes in 10 seconds
Status: Starting upload of C:\Files\static.sql.gz
Status: ... | stackexchange/codereview |
I've spent a couple of hours trying to find the answer to this, and although there are tutorials all over the 'net none of them work for me (or I am too n00b to understand what they're telling me...)
Anyway, I'm creating users in asp.net using Membership. What I want to do is add the generated UserId to a column in a c... | stackexchange/codereview |
What is the difference between JSPF and JSFF file-types in ADF ?
I have not been able to find sufficient information on JSFF files online.
JSPX and JSFF refer to JSP Fragment and JSF Fragment respectively. JSFF is typically used in ADF projects.
| stackexchange/codereview |
I'm using Python 2.6 on Linux. What is the fastest way:
to determine which partition contains a given directory or file?
For example, suppose that /dev/sda2 is mounted on /home, and /dev/mapper/foo is mounted on /home/foo. From the string "/home/foo/bar/baz" I would like to recover the pair ("/dev/mapper/foo", "home/f... | stackexchange/codereview |
I’m trying to use a premade script for a calendar function on our website.
The script is from:
http://cubiq.org/iscroll/
I’m really really new, so I’m really sorry if this is really newbie.. but is there any way for the script to snap to each list item, when scrolling?
Thanks a lot!!
S
| stackexchange/codereview |
I can successfully compile the source, but when I hit this ant task:
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<path refid="project.class... | stackexchange/codereview |
I trying to output a list of todo items from the Mac app Things using AppleScript.
But I get a syntax error:
Expected expression but found “to”.
Since Things uses the name "to dos" and AppleScript doesn't like this, since to is a reserved keyword. It works without a problem if the repeat code is directly inside the tel... | stackexchange/codereview |
I have a C#-4 MVC3 RC test-application which is using Entity Framework 4.
I have this method:
public static List<Content> FetchMenu(int websiteID) {
return (from w in ContextHelper.Current.Websites
where w.WebsiteID == websiteID
select w.Contents).ToList();
}
The objects involved here (Cont... | stackexchange/codereview |
I have a dict that has many elements, I want to write a function that can return the elements in the given index range(treat dict as array):
get_range(dict, begin, end):
return {a new dict for all the indexes between begin and end}
How that can be done?
EDIT: I am not asking using key filter... eg)
{"a":"b", "c":"... | stackexchange/codereview |
I have a question about a project I should implement for my Distributed System course.
The project consist in designing and implementing a library that provides a reliable multicast service to user processes. All processes belong to a group, and a message is sent by a member process to all members of the group. The sen... | stackexchange/codereview |
I am building an ASP.Net website, I have a db table which I want to reset a column in it for all rows. column type: byte
I want to do this every day at midnight, in an automatically way. I know I can set a job in SQL Server Management Studio but I want to do this in a programmatic way and my website will be the trigger... | stackexchange/codereview |
I want to databind a ListBox to a linked list
public class MyClass
{
public string MyText{ get; set; }
public MyClass PreviousItem{ get; set; }
}
I want to use an instance of MyClass as the datasource of a ListBox, to basically show a list of the MyClass instance and all it's PreviousItems.
Of course binding t... | stackexchange/codereview |
this may be a easy question, but I really need a light to go on.
I have this huge PHP system in codeigniter, and I'm using the library Quick Auth, and I need let users log on only at one computer/browser at a given time. So if Jake logs on In PC1, then Jakes tries to log on in PC2, PC1 session get invalidated and close... | stackexchange/codereview |
In my last two projects I've seen the strange guideline, "All Methods/Functions should return error-code using some common ERROR_CODE type". In both projects ERROR_CODE is an int typedef.
Is there any good reason doing it in C++? Some MISRA requirement or something like that?
I can see only disadvantages:
If a functio... | stackexchange/codereview |
I want to write a SQL statement that uses a pivot in SQL Server 2000. The PIVOT keyword is not available in SQL Server 2000 so I found some examples that use a case statement but that requires that you know the column names beforehand which I won't. How do I do a pivot which dynamically generates the column names from ... | stackexchange/codereview |
I have created two gtkmm button and added to HBox object. I called pack_end, and maintained the size as 21,20. But, the sizes are not maintained. Here is the code i have written and the window that i got while running the program.
Note: MYWindow is subclass of Gtk::Window
void MYWindow::customizeTitleBar()
{
//cre... | stackexchange/codereview |
When using prepared statements with named parameters in SQLite (specifically with the python sqlite3 module http://docs.python.org/library/sqlite3.html ) is there anyway to include string values without getting quotes put around them ?
I've got this :
columnName = '''C1'''
cur = cur.execute('''SELECT DISTINCT(:colName)... | stackexchange/codereview |
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int square(int a){
return a*a;
}
struct Point{
int x,y;
};
int distance (const Point& a,const Point& b){
int k=(int) sqrt((float)((a.x-b.x)*(a.x-b.x))+((a.y-b.y)*(a.y-b.y)));
return k;
}
int main(){
vector<Point>a(10)... | stackexchange/codereview |
I am using NuSOAP in PHP and using a web service built in Java.
When calling NuSOAP, I pass this argument:
$args[]=array('name'=>'content', 'value'=>base64_encode($content), 'type'=>'Base64Binary');
However, when examining the SOAPXML, I see the following:
<content xsi:type="xsd:string">PD94bWwgdmVywIiBlbmNvZ....cmQ+... | stackexchange/codereview |
I have this piece of code on a JSP file :
// MainHomePage pageApp = new MainHomePage(session);
String pageValue=request.getParameter("page");
if((pageValue!=null) && (pageValue.compareTo("1")==0)) {
MainHomePage pageApp = new MainHomePage(session);
} else if((pageValue!=null) && (pageValue.compareTo("2")==0)) {
... | stackexchange/codereview |
I have a navigation controller app. I created a RootViewController class with Xib file. In that xib file I had table view and nothing more else. Toolbar and buttons on the toolbar I created in program way. Table view had datasourse and delegate File Owner.
I deleted this xib file, and created a new one with previous na... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.