instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Per the Google Page Speed recommendations, I want to Specify image dimensions to "Optimize browser rendering."
Specifying a width and height for all
images allows for faster rendering by
eliminating the need for unnecessary
reflows and repaints.
I am investigating ways to traverse through the image files (PNG, ... | stackexchange/codereview |
The specifications on SQL Azure mention ODBC date and time functions, namely to transform a date to weekday.
Currently, using DAYOFWEEK results in an error message:
SELECT DAYOFWEEK(LastActivityDate) FROM Posts Limit 1;
Error: 'DAYOFWEEK' is not a recognized built-in function name.
| stackexchange/codereview |
I have this code to get the caller of my function's file name, line number, and function. It seems to be leaking frames though and I don't understand why. Is this just throwing me off and my leak must be elsewhere?
rv = "(unknown file)", 0, "(unknown function)"
for f in inspect.stack()[1:]:
... | stackexchange/codereview |
Anyone know does RTSP support MP4 for streaming? Or what file video formats that RTSP support?
| stackexchange/codereview |
I'm having a problem lately that's driving me crazy. I have a multi-dimensional array like this:
$a = array(
'db' => array(
'0' => array(
'id' => '1',
'name' => 'test',
'cat' => array(
'a' => '15',
'b' => '20',
'c' => '30'
),
'canvas' => '... | stackexchange/codereview |
After two days trying to read annotations from a PDF using Quartz, I've managed to do it and posted my code.
Now I'd like to do the same for another frequently asked question: searching PDF documents with Quartz. Same situation as before, this question has been asked many times with almost no practical answers. So I n... | stackexchange/codereview |
I need a simple functionality for adding pages/changing content on those pages. I've looked at n2, and other pre build CMS tools but these are way to advanced for a simple CMS functionality that I need.
What's the best approach? I already have an MVC app that I would like to add/build a simple features like:
specify ... | stackexchange/codereview |
I've noticed that the margin or height of the default Separator as it is styled in the menus in WPF seems to be slightly larger than some other applications such as Visual Studio 2010. I know that these Separators can be re-templated by applying a new style with a custom ControlTemplate but like always I'm looking for ... | stackexchange/codereview |
I am looking at an example online that contains this code in objective-c
-(void)dealloc {
[activeController viewWillDisappear:NO];
[activeController.view removeFromSuperview];
[activeController viewDidDisappear:NO];
[activeController release];
[super dealloc];
}
I assume the MT equivalent wou... | stackexchange/codereview |
I am working on an asp.net web application which uses a fair bit of Ajax - nothing too complex just update panels and the controls from the Ajax Toolkit. Prior to being handed over it was using Ajax 1.0 and was then upgraded to work on the 3.5 framework. The toolkit controls were replaced by the correct version and I... | stackexchange/codereview |
$query_posts = "
SELECT DISTINCT meta_value
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'Product'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'post'
ORDER BY wposts.post_date DESC";
$result = mysql_query($query_posts) or die(mysql_error... | stackexchange/codereview |
If an AS3 method returns a reference to a complex type, is there any way to make that 'readonly', like how you can have const member functions in C++? An architecture I want to use calls for a class building itself from a passed template object... and really the template object should not be modifiable. I'm currently f... | stackexchange/codereview |
Is there anything similar to NUnit TestCaseSource attribute in Visual Studio unit testing? The closest solution I found was to use a DataSource. But I don't want to store my test case parameters in a data source.
| stackexchange/codereview |
Hope this isn't too basic, but...
Suppose I have a base class pa(), and I have derived classes pai(), paj(), etc, that inherit from the base class.
I would like to instantiate an object from base class pa():
>>> from pamod import *
>>> mypa = pa()
>>> mypa
<pamod.pa object at 0x28d4fd0>
>>>
... and then promote it (ca... | stackexchange/codereview |
I want to have a perl subroutine that creates and returns an ordered hash via the Tie::IxHash module. It looks something like this:
sub make_ordered_hash {
my @hash_contents = munge_input(@_); # I get a list of alternating keys and values
tie(my %myhash, Tie::IxHash, @hash_contents);
return %myhash;
}
Now,... | stackexchange/codereview |
I'm trying to get Google Web Toolkit to work with Django through GETs and POSTs, following the examples here. When GWT sends a POST, however, Django sends back an HTTP 403.
My question is then, is Django set up to not receive POSTs? Is there some setting I need to change? Or is there something wrong with the way GWT is... | stackexchange/codereview |
How do you create the Rule to enforce Work Item association on check-in? (TFS2010 Agile 5.0)
| stackexchange/codereview |
I'm trying to pass data from notification to activity:
btnShedule.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Intent noti... | stackexchange/codereview |
I am trying to do some semi complex validation on a spring form using struts.
According to the struts user guide the value null in a validwhen clause tests for either an empty string or a null value.
I would therefore expect the following check to succeed only when when test is an empty string or null.
<field prope... | stackexchange/codereview |
I have the following tables:
users { id, name }
events { id, name }
user_events { id, date, user_id, event_id }
user_summaries { id, user_id, event_id, qty }
Table user_events stores all user events (there are many of the same types at different times) and user_summaries stores how many of each... | stackexchange/codereview |
I was wondering where do you draw the line between a programming language feature and a platform feature.
For instance, is Linq a C# language feature or a .NET feature. Does the programming language work like a specification for the platform?
| stackexchange/codereview |
I have a bunch of posts stored in text files formatted in yaml/textile (from Jekyll) that I am trying to import into my new Django project. The problem is that Django is escaping the actual html code, meaning my post is not getting formatted. How can I got about fixing this? should I change something in the jekyll-impo... | stackexchange/codereview |
I googled a lot and found that its not possible to find whether operator's signal is present or not. But is there valid API to find whether I can place a call or not?
| stackexchange/codereview |
How does one get in the value of request.user into a TemplateTag?
In the file myproject/news/templatetags/news_tags.py I have:
from django import template
from myproject.news.buildnews import BuildNewsList
from django.contrib.auth.models import User
from django import http
from django.contrib import admin
from django.t... | stackexchange/codereview |
Using VS 2010 here. Basically some of my linkbuttons kick off a long database query, how can I automagically display a spinner when the page is waiting for a postback? Mind you, this isn't an ajax postback, but a normal postback after clicking a server linkbutton.
Thanks
| stackexchange/codereview |
I am trying to incorporate an ajax autocomplete/autosuggest control into my website and I am encountering all kind of issues.
I tried the ajaxcontroltoolkit but ran into a deadend there.
I would prefer not to get into jquery being I'm feeling overwhelmed enough as it is.
I found this one that worked great when I ra... | stackexchange/codereview |
I am new to Yii php framework. I know python framework - django and managed to create application based on MVC pattern together with database. Now I would like to create some other project/application in php framework - I was trying symfony, but now I want to try the Yii. My problem/question is how to write the queries... | stackexchange/codereview |
I cannot remember the site, but I showed parameter add etc where we could add the name of parameters instead of forming the whole query as a single statement
Please suggest some good links having coding info for working with SQL Server tables using C# website, following needed most
create table
insert data
delete data... | stackexchange/codereview |
I create an array search prototype
Array.prototype.searchRE = function(searchStr) {
var returnArray = false;
for (i in this) {
if (typeof(searchStr) == 'object') {
if (searchStr.test(this[i])) {
if (!returnArray) {returnArray = []}
returnArray.push(i);
}
... | stackexchange/codereview |
I'm really going crazy of this particular obstacle, the issue in hand is that I have a very simple table with rows and all. what I'm trying to accomplish is that when you click on a row then this script is suppose to read the link that's stored in the last td in the very same row and then direct you there.
What I've co... | stackexchange/codereview |
$10.2/4- "[ Note: Looking up a name in
an elaborated-type-specifier (3.4.4)
or base-specifier (Clause 10), for
instance, ignores all nontype
declarations, while looking up a name
in a nested-name-specifier (3.4.3)
ignores function, variable, and
enumerator declarations."
I have found this statement to b... | stackexchange/codereview |
Hey,
So i am working on a Core Data app and I have an NSTableView linked with the Core Data. The table has three columns. Name, Position, Salary. I also set up a double click action. now what I need is that when I double click on a row i get the three values of that row.
I can do the following:
NSArray* myArray = [arra... | stackexchange/codereview |
A UIView has a SizeToFit method that will make the UIView fit all of it's subviews. Is there anything like that, which will just return the size that it calculates and not modify any view's frame.
I have several subviews on a UIScrollView and I want to do SizeToFit on the scroll view's contentSize, rather than it's fra... | stackexchange/codereview |
I'd like to convert this string into a datetime object:
Wed Oct 20 16:35:44 +0000 2010
Is there a simple way to do this? Or do I have to write a RE to parse the elements, convert Oct to 10 and so forth?
EDIT:
strptime is great. However, with
datetime.strptime(date_str, "%a %b %d %H:%M:%S %z %Y")
I get
ValueError: '... | stackexchange/codereview |
I have a remote function testdwr, which returns a list of objects(test). How should i parse the list of objects in the handler method? Code shown below
public List testdwr(String message) {
Test test = new Test();
test.setName("mahati");
List arrayList = new ArrayList();
arrayList.add(te... | stackexchange/codereview |
I'm indexing PDFs with Solr using the ExtractingRequestHandler. I would like to display the page number along with hits in a document, e.g. "term foo was found in bar.pdf on pages 2, 3 and 5."
Is it possible to include page numbers in the query result like this?
| stackexchange/codereview |
Why this code results empty in my hosting, but works well in my local?
$raw = file_get_contents($rssURL);
$xml = new SimpleXmlElement($raw);
echo "<b>RSS Items:</b><br /><br />";
foreach($xml->channel->item as $item) {
echo $item->title."</br >";
}
libxml version: 2.6.32; libxml2 version: 2.6.32
I also tried thi... | stackexchange/codereview |
I'm going through the example in the AROR book:
http://media.pragprog.com/titles/rails3/code/e1/views/app/views/test/select.rhtml
<% @user = "cat"
def @user.id
4
end
<% form_for :user do |form| %>
<%= form.select(:name, %w{ Andy Bert Chas Dave Eric Fred }) %>
<% end %>
In this example, looks like @user.id is ha... | stackexchange/codereview |
My entire game slows down when returning from another app in the emulator (ie pressing the phone button, then back). frame rate drops by half - which turns it into sludge.
Everything is still there, apart from the thread which I kill when the (only) view is surfaceDestroyed (after calling join repeatedly, as with the l... | stackexchange/codereview |
I have to develop an application wherein I would receive data from parallel port and send it over to internet. This application is to be developed for embedded device running linux. Please suggest me how I can do that.
Regards
| stackexchange/codereview |
In C++, you got the header files (.h), the (.lib) files and the (.dll) files.
In Visual Studio, you provide the location to search for these files in three different places:
Configuration Properties => C/C++ => General => Additional Include directories.
Here you list out the "include" directories that you want searche... | stackexchange/codereview |
I am using PDF::Reuse to write a new pdf:
use PDF::Reuse;
prFile( $copyPdf );
prDoc( $old ) ;
prEnd();
works great but if there's an error, the entire script dies...how can I instead just "warn" if Reuse encounters a problem?
| stackexchange/codereview |
I'm having trouble adding a copy constructor to this class:
http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
I need to add it so that I can add the concurrent_queue in an stl vector container.
Tried the below, and it almost compiles. In fact, if I remove ... | stackexchange/codereview |
I recently have had the need to make a math array or a tabular expand to fill the page width.
The effect I am trying to achieve is that for one line on the page, half is aligned at the left, and the other at the right.
For instance, just now, the following has been giving be problems...
$$
\begin{array}{l r}
\phi... | stackexchange/codereview |
I have two variables that I'm getting from shader in opengl. I do something like this.
vLoc = glGetAttribLocation(progId,"vPosition");
nLoc = glGetAttribLocation(progId,"vNormal");
matViewLoc = glGetUniformLocation(progId,"matView");
matProjLoc = glGetUniformLocation(progId,"matProj");
matTranslateLoc = glGetU... | stackexchange/codereview |
I need to merge two flv files, using PHP. I can't use exec method. I am wondering if is possible to cut some part of one flv file (audio tag) and paste to another and overwrite duration for output file.
I have found interesting solution here: calculate flv video file length ? using pure php but I do not know how can I... | stackexchange/codereview |
I'm trying to make an algorithm that will find the most efficient ordering for eliminating nodes in a small Bayesian network (represented by a DAG). All of the nodes are boolean and can take two possible states, with the exception of nodes with no successors (these nodes must have a single observed value; otherwise mar... | stackexchange/codereview |
I am new to iPhone development.
I have a UITextField, in that when I press enter I need to hide the keyboard.
Any way to accomplish this?
| stackexchange/codereview |
When I run maven test, java.lang.OutOfMemoryError happens. I googled it for solutions and have tried to export MAVEN_OPTS=-Xmx1024m, but it did not work.
Anyone know other solutions for this problem? I am using maven 3.0
Paste the error message here when run mvn test -e
Failed tests:
warning(junit.framework.TestSuit... | stackexchange/codereview |
I have a 15gb SQLite db with 40 columns. I would like to remove most of the columns to make queries faster and the db more portable. I found this guidance, but can't get it to work. It seems like it hangs and I end up corrupting the db and having to start over. Here's the script I use:
BEGIN TRANSACTION;
CREATE TEMPORA... | stackexchange/codereview |
How do you call a PHP function that is in a different file from a JavaScript function?
I have a JavaScript function that recieves a variable from an onClick function. The variable is an id that I will use to retrieve data from MySQL database. The variable is then passed on to a PHP function that will access the databas... | stackexchange/codereview |
With a domain pointing to an app on Heroku, I want to set the canonical link to the main domain, not the Heroku url, when the current url is the Heroku url, and not the domain..
How do I do that and not have the canonical link there when someone goes to the site at the main domain url?
| stackexchange/codereview |
Is there a way to speed up the access to reporting service after recycling happens?
thanks
| stackexchange/codereview |
So right now in my app the URL I'm accessing has a redirect, and when this happens the WebView will open a new browser, instead of staying in my app. Is there a way I can change the settings so the View will redirect to the URL like normal, but stay in my app instead of opening a new browser?
Edit:
I want the redirecti... | stackexchange/codereview |
Most of a web application is pretty standard CRUD. I need some data to be pushed to clients live as it's created. Is it worthwhile to run a separate, more lightweight stack (such as Sinatra or EventMachine) for the AJAX?
If I run one stack, I'll have Rails' overhead. This might require more Rails processes / servers, s... | stackexchange/codereview |
I would like to draw a character (TTF) as vector and wondering how to perhaps draw the outline of the character. It appears that characters are "filled" with color suggesting the possibility to outline. I've tried stroke_color to no avail. I am using ruby and prawn to render in pdf.
Thanks.
| stackexchange/codereview |
So this is my current code:
function addPage($uniquename, $ordernum, $title, $author, $content, $privilege, $description=NULL, $keywords=NULL){
if (!$description) $description = NULL;
if (!$keywords) $keywords = NULL;
//UPDATE `table` SET `ordernum` = `ordernum` + 1 WHERE `ordernum` >= 2
$query = "UPDAT... | stackexchange/codereview |
I wrote a build script and would like to be able to select the latest version of the script when it installs, e.g. the package name is package_X.X.X.tar.gz and there are multiple copies.
Is there a way to point the build command to package_Y.tar.gz? where Y=max(X.X.X)?
| stackexchange/codereview |
i've a Dictionary like
Dictionary<String,List<String>> MyDict=new Dictionary<String,List<String>>();
and which contains
{ "One" { "A", "B", "C" } }
{ "Two" { "C", "D", "E" } }
Now i need to delele the "C" in "One"
so now MyDict will become
{ "One" { "A", "B" } }
{ "Two" { "C", "D", "E" } }
Iterating through... | stackexchange/codereview |
I've been developing using Sharepoint 2007 on a VM, and recently tested some functionality by trying to change the system date.
Ever since then SQL server has been using 50% CPU and a lot of memory.
I've limited it's memory, but have no idea how to fix the problem.
More details: The process using 50% cpu (1 core out of... | stackexchange/codereview |
I have created an application which uses a System.Net.Sockets.Socket and reads data asynchronously. Everything works great and has been working great for a while.
Recently, however, my ISP has been very unreliable and I am losing packets or there are huge delays, and pretty much whatever one could imagine.
Is there a w... | stackexchange/codereview |
I receive the following exception when transforming an XML file to pdf.
The error seems specific to Java
javax.xml.transform.TransformerConfigurationException:
Could not load the translet class 'GregorSamsa'.
Cannot understand the reason.
Any helpful suggestions greatly appreciated.
| stackexchange/codereview |
i have a question about property grid.
when the form is shown i would like a group to be expand rather then collapsed.
i have search a lot for that on the web and could not find it yet.
any thoughts.
| stackexchange/codereview |
If I have a non-scrolling header in an HTML page, fixed to the top, having a defined height:
Is there a way to use the URL anchor (the #fragment part) to have the browser scroll to a certain point in the page, but still respect the height of the fixed element without the help of JavaScript?
http://example.com/#bar
WR... | stackexchange/codereview |
I have a html page with 2 buttons on it and a big javascript function that is executed every 10 ms. Each click on each button executes a javascript function that changes some variables used by the big javascript function and change its behaviour. In time the code got very complex and time consuming and I would like to ... | stackexchange/codereview |
let's say I've got a handler of the wm_paste message in a CEdit descendant:
LRESULT CMyEdit::OnPaste(WPARAM wParam, LPARAM lParam)
{
//do some processing
return 0;
}
and let's say that in some cases I want to trigger the default behaviour for paste
from this method. How do I do it? CEdit::OnPaste does not exist...
Che... | stackexchange/codereview |
I need peer reviews of the critical piece of code below.
This class maintain a queue of runnable objets, and ensure they are executed sequentially, that is, start one new after the previous one is completed until there is no more task in the queue.
I'm pretty sure it does, but I'm must be absolutely sure it behave as i... | stackexchange/codereview |
I have a doubly linked list in C and I'm confused as to how I should go about freeing it. I understand that I have to traverse the list freeing each node. Where the confusion lies is that each of my nodes has a pointer to some other data and I'm unsure how I should free that.
My doubly linked list looks like this:
type... | stackexchange/codereview |
I have a mysql query:
$ziua = "SELECT DISTINCT DAYOFMONTH(ziua) FROM rapoarte";
$ziuaResult = mysql_query($ziua);
With the results i get, i want to add them in a drop down box, like this:
`
echo"Selectati Ziua:
<td><select name='ziua'>
<option value='---'>---</option>";
while... | stackexchange/codereview |
I use Primefaces 2.1
I reference the css files like this:
<style type="text/css">
@import url("resources/css/skin.css");
@import url("resources/css/style.css");
</style>
In style.css I try to change the background color of the container in which the tabs are:
.ui-tabs-nav{
background-color:yellow;
}
This does... | stackexchange/codereview |
Is there any way to paralel programming in .NET 3.5? I have a problem with threads. I create many threads. But i need to control them. I mean if one thread takes more time from 5 seconds i need to abort it. When i use Thread.Abort() sometimes i get ThreadAbortException at logs. I don't want it. In .NET 4 there is TPL. ... | stackexchange/codereview |
I'm using the following for a delete link:
<%= link_to "Delete", photo_path(@photo.id), :confirm => "Are you sure?", :method=>:delete %>
Problem is, if I click CANCEL - it still deletes!!! wooops... Why is that?
| stackexchange/codereview |
Does a method get called when a UISlider's value changes? I want to be able to update a value based on the UISliders value, but only when it changes.
| stackexchange/codereview |
i have a jquery .click() function that executes an .ajax() method call
$(".btn-play").live("click", function () {
//set globalSortNumber
globalSortNumber = $(this).parents("[sortnumber]").attr("sortnumber");//.attr("value") ; //change should be some type of input like mediaid //see if its possib... | stackexchange/codereview |
How would i be able to use gridlayout and panels to create a frame that resembles a checkered board pattern? it would seem that i can't create two panels with two diferent colors within the one for-loop.
import javax.swing.*;
import java.awt.*;
@SuppressWarnings("serial")
public class test extends JFrame {
public ... | stackexchange/codereview |
I'm writing a simple database app on Android. The main activity is just a list of products - a ListActivity using a CursorAdapter. How is the best way to go about changing the order of the list (is sort by Price or ProductID or something). I'm guessing I need to execute a new query to get a new cursor - or can I rec... | stackexchange/codereview |
I am trying to register a Broadcast Receiver that catches "com.android.vending.INSTALL_REFERRER" intents launched by Android after an app is installed from the Market.
I am following the details here: http://code.google.com/mobile/analytics/docs/android/#referrals
However, I cannot use Google Analytics so I have create... | stackexchange/codereview |
I allow some HTML tags to be used in my form. How can ensure my database (mysql) is safe, when using php to insert this data into it?
| stackexchange/codereview |
Looking for advice on passing variables from page to page without using QueryString. The web crawlers such as google get caught up on the querystrings found in a URL. I'm trying to get away from using it. Is there another suggested method for passing the variables? I've thought about using session variables, but th... | stackexchange/codereview |
Im looking for guide(OLE/ADO) or ready native components to read/edit/write MS excel 2007 files.
so far iv tried Native excel ver2 and txlsfile ver 4 , XLSReadWriteII ver 4 but seems native excel can't open excel 2007 .
txlsfile or XLSReadWriteII (sorry i removed them and can't remember which one was ) can open/read bu... | stackexchange/codereview |
I have a mercurial repository which uses Mercurial queues. Assume the following scenario. I create a patch firstpatch, and then pop it.
I make a few changes to the codebase, and create a second patch secondpatch. However, when I try to apply firstpatch again, I am unsuccessful.
$ hg qimport .hg/patches/firstpatch
abort... | stackexchange/codereview |
I'm trying to minimize my SQL queries so my resolve was to list down all ID's of the records I would need. Doing so, with one query, I can get all info regarding a certain ID.
ID Passed flag type Total
123ABC 878 0 1 1070
123ABC 1272 0 1 1507
123ABC ... | stackexchange/codereview |
How do I extend the String class, and attach a method named to_bytes?
| stackexchange/codereview |
Simply, my application's view loads in the simulator, all views intact.
When pushed onto the iPhone, the views fail to load. If it makes a difference, my iPhone 4 is jailbroken, but other applications I've created load with no problem on the phone.
What do you think?
| stackexchange/codereview |
I'm trying to use a 1D array as a lookup table in my vertex shader.. so why when I call
texture1D(tex,gl_TexCoord[0].s);
does it return a vec4? I mean I know that's what it does, but what do the 4 values represent? All I want is the one value from the texture based on the coordinate.
| stackexchange/codereview |
public class Group{
@ManyToMany(fetch=FetchType.EAGER, cascade=CascadeType.ALL, mappedBy="groups")
public Set<User> getUsers() {
if(users == null)
return new HashSet<User>();
else
return users;
}
public void setUsers(Set<User> users) {
this.users = users;
}
}
public class User{
public void setGroups... | stackexchange/codereview |
I have two urls that are supposed to lead to the same actual folder.
I can't do a redirect because the websites are built so they question the URL and perform accordingly.
So I built two application in the IIS (I tried using a virtual directory for one of them, but I kept crashing on the web.config can not be read). Ev... | stackexchange/codereview |
Are there any advantages to Stackless Python implementation over Lua's coroutines?
What's the difference between them?
| stackexchange/codereview |
Now i am working on a social network website and i already built the friends table for this website but i need some suggestion before i moved forward.
I have a user table where user_id is the primary field.
So for friends i made a friends table with fields like
friend1,friend2,is_active
what i do actually when user1 se... | stackexchange/codereview |
I want to show both currency codes and its display name in a table view in order to let users select, e.g.
CHF-Swiss Franc
EUR-Euro
RUB-Russion Rubble
I know I can use [NSLocale ISOCurrencyCodes] to get all currency codes, but how can I get the currency display name (Swiss Franc, Euro, etc...) of the currency code? and... | stackexchange/codereview |
What is best way to determine if the user is actually using Safari?
| stackexchange/codereview |
I would like to extract a block of statments (function) from souce code if some condition is met. e.g in the following code snippet, i would like to extract the function method2() and all its statements to another file for analyis
class MyClass:
def __init__(self):
pass
def method1(self):
pass
def me... | stackexchange/codereview |
I have two classes documentlog and documentversion(with primary keys: int doc_id and int docVersionID) with a many-to-one relationship. I used a composite key class called CompundKey to manage the compound primary key. I need to auto increment docversionID but I am not able to do that. Could you please help me in this ... | stackexchange/codereview |
While my iPhone app is running I store some data (NSStrings) in the NSUserDefaults. I'm storing the high score for a game just fyi. When I double-tap the home button and kill the app the values I store in NSUserDefaults are often not there when I restart the app. Why is this happening?
The code I'm using was working... | stackexchange/codereview |
I have a site that I have completely customized the theme.
Unfortunately the theme and the way it's set up doesn't like you to view the actual page permalink for both the blog and the portfolio to view its content.
Regular pages work fine:
site.com/about
site.com/contact
However, if you go to /portfolio or /blog the pa... | stackexchange/codereview |
Two Files involved:
index.php (html markup, db connection and class object)
getajax.php (db connection, sql + response code)
Need to see how can I eliminate the duplicate connection details off the getajax file and reuse the existing class connection function or contruct on index.
Already using mysql_pconnect for conne... | stackexchange/codereview |
I am using fixtures to pre-populate my database with some information, so I can kill the database and remake it quickly during testing.
Now when I create a new entry in the database using my rails application it is creating two rows with the same information and timestamping one of them as if it were created with the f... | stackexchange/codereview |
Selenium seems to be pausing for about a minute between each step (I haven't seen less than 60 seconds). Even steps that should be simple (like setSpeed) run at the same rate.
However, when I use the PHPUnit_Extensions_SeleniumTestCase class, I am able to run tests at normal speed. (Also, the slow steps run fine on a... | stackexchange/codereview |
I keep hearing that global variables should never be used, but I have a tendency to dismiss "never" rules as hot-headed. Are there really no exceptions?
For instance, I am currently writing a small game in c++ with SDL. It seems to me to make a lot of sense to have a global variable with a pointer to the screen buffer,... | stackexchange/codereview |
I need to dynamically instantiate a web application from a console application. By this definition, I mean that my console application contains a web application that is not bound to IIS/XSP.
Currently, I create the web application into a temporary directory and copy some forged files into it. These are a special Globa... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.