Hi there,
What'd be the most effective and efficient sql query to grab an article and the comments?
It'd be two tables (articles, comments.) Would it be best to have it in one SQL query or two SQL querys? Speed is the main concern.
Thanks in advance
I'm trying to invoke C++ from Java using GCJ using the CNI, so far I'm able to invoke Java code from C++. How can I invoke C++ from Java using the CNI?
I'm trying to learn some javascript and i'm having trouble figuring out why my code is incorrect (i'm sure i'm doing something wrong lol), but anyways I am trying to create a login page so that when the form is submitted javascript will call a function that checks if the login is in a mysql database and then checks the validity of the password for…
I have a Dojo/Dijit Dialog that contains a FORM. There is a top border between the title bar and the content, and a bottom border below the content. Both are about 19 or 20 pixels high and colored #eeeeee.
I can't find these borders in the CSS anywhere -- actually, neither can the IE Developer Toolbar -- they just don't seem to exist as…
Trying to understand S3...How do you limit access to a file you upload to S3? For example, from a web application, each user has files they can upload, but how do you limit access so only that user has access to that file? It seems like the query string authentication requires an expiration date and that won't work for me, is there…
I am an experienced iPhone dev beginning to work on my first Mac app. One thing that is really throwing me off is the differences between UIView and NSView. It seems that I cannot set the background color of a NSView via interface builder as I can with a UIView. It also seems that I cannot do it by simply sending a…
How can I find all elements on a page which have a color of "blue"?
alert($("* [color=blue]").attr("id"));
The above example does not work. Please recognize that color is a CSS attribute. I'm certain it is possible I just cannot figure out the correct method to do so.
I am trying to wrap a Java library with a Clojure binding. One particular class in the Java library defines a bunch of static final constants, for example:
class Foo {
public static final int BAR = 0;
public static final int SOME_CONSTANT = 1;
...
}
I had a thought that I might be able to inspect…
Hi,
I've a JEditorPane inside a JDialog. I'm loading a web page when this JDialog is loading.
This web page is larger then the JEditorPane size. So I want to display a certain position in the web page by default.
For example, I've a 175x200 size jdialog and JEditorPane. I want to display the web page sontent…
I'm upgrading a VC++ 6.0 project to VS2010 and I'm getting this error when compiling.
c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atlalloc.h(643): error C3861: '_resetstkoflw': identifier not found
Does anyone have any suggestions?
Thanks
I have read that creating a namespace for JavaScript projects helps to reduce conflicts with other libraries. I have some code with a lot of different types of objects for which I have defined constructor functions. Is it good practice to put these inside the namespace as well?
For example:
var shapes = {
…
to read a child node content i use :
MYDATA = xhr.responseXML.getElementsByTagName("MenuItem")
[INDEX].getElementsByTagName("PageContent")[0].childNodes[0].nodeValue;
sometimes when the childnode data contains an HTML tag (eg b or br tags, because they have the <), i have problems since they are counted…
Hi I have some controls on an asp.net modal which I show manually via code behind. Now I am trying to attach a selector on one of the controls inside pageLoad(), problem being is that the modal container is initially set to visible=false.
I tried checking for length but it still throws exception
if…
I have the following function I modified based off someone elses function:
function showCombinations($string, $nameString, $linkParts, $i){
$wordDivider = "/"; //the divider between the words/values
if ($i >= count($linkParts)){
echo "<a…
I work on a very high volume public website running on Tomcat 5.5. Currently we require stickiness to a particular server in order to maintain session. I'd like to start replicating session, but have had trouble finding a good FOSS solution. I've written my own Manager (using memcached as…
I have a simple website where I establish a connection to a Mysql server using PDO.
$dbh = new PDO('mysql:host=localhost;dbname=DB;port=3306', 'USER',
'SECRET',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
I had some traffic on my site and the servers connection limit…
I'm new to version control, so I apologize if there is a well-known solution to this. For this problem in particular, I'm using git, but I'm curious about how to deal with this for all version control systems.
I'm developing a web application on a development server. I have defined the…
I'm playing with rewriting part of a web application in Rails + Ext. However, I'm having trouble getting an associated models' name to display in the grid view.
I've been able to successfully convert several models and arrange the views nicely using tabs and Ext's layout helpers.
…
The output from the following program is:
Non-Static
Static
Non-Static
Is this a compiler bug? I expected:
Static
Non-Static
Non-Static
because I thought the static constructor was ALWAYS called before the non-static constructor.
I tested this with Visual Studio 2010 using…
I have two activities: a MainListActivity, and a DetailViewActivity. DetailViewActivity is set with android:launchMode="singleTop".
When clicking an item in the "main list" activity, it launches the "detail view" activity via:
startActivityForResult(detailIntent,…
I am using symlinks generated in PHP. They are generated when someone requests a download, and I want them to expire at the end of each day.
The problem is, what if someone starts downloading a symlink 1 minute before the end of the day and then I delete the symlink…
I have a GtkEntry with a GtkEntryCompletion attached to it. The Entry does something fairly expensive if the user hasn't changed the text in it for a second (to preview search results). However it's very common for the user to stop typing in order to select the…
can someone please explain why this code is not working as expected:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class temp : System.Web.UI.Page
{
…