simple

2 Minute question - HTML / CSS If div within div expands expand parent div

I have a setup lets say like follows: <div id="nav"> <div id="innernav"> //With dynamic content here. </div> </div> I am running a script that sizes #nav to the size of the browser window in height. But sometimes my dynamic content is now getting bigger than the height of the window.. Is there a way I can enforce that when...

how to add a new product add page in magento admin side??

The product add page is very large..can anybody help me to create a single product adding page in the admin side... ...

How to display value from SQL Server database in input box?

I would like to do something like simple data binding in Windows Forms, but in Web Forms. So I would like to get data from a column NAME from table CATS (one row) and display in on website in text box (input type='text') and next I would like to click on "save" button to save this data to database doing an update. Could you please give ...

Simple LISP function not working

I decided to learn LISP today, and have been playing around with it for a bit. I wrote a simple baby function just to test my understanding, and now understand that my understanding doesn't understand as much as I had understood it to understand. :D Anyway, here is the function. The idea is that when it is called, e.g. (esexp base x) it...

[CakePHP] How to echo selected record?

hi all, i'm still a beginner, and guess it's a simple CakePHP question... all i want is to echo retrieved data from database (one row is selected). i have next code: $cover_page = $this->Publication->find('list', array('conditions' => array('Publication.id' => $id))); now, how can i echo field title from selected database row? tn...

Javascript working in Java web browser?

is this possible? i have made a simple web browser, it can view some pages fine, but most are messed up, i believe it can be because of this (javascript not enabled). For example this is how CNN.com shows up: http://www.glowfoto.com/static_image/07-181402L/5111/png/07/2010/img5/glowfoto here is my code so far: public class Browser exte...

Simple PHP script help, if/else/timestamps/ less than / bit-shift

I am trying to make a timestamp function that checks which displays a time if it has been less than 24 hours and a date if it has been more. If anybody knows of a prebuilt way to do this please let me know. Anyways, I've started with this simple php which is suppose to return a number less than 86400 if $temprow1 or 2 are less than 8640...

WPF simple property vs. complex property

Hi! In WPF it's better to create a property "complex" (i.e. of type "Visibility") or a property simple (i.e. of type boolean) and then using a converter to bind the property? The first way is shorter to write, but I don't know what is better about the performances. Thank you! Pileggi ...

how to output an int in binary?

int x = 5; cout<<(char)x; the code above outputs an int x in raw binary, but only 1 byte. what I need it to do is output the x as 4-bytes in binary, because in my code, x can be anywhere between 0 and 2^32-1, since cout<<(int)x; doesn't do the trick, how would I do it? ...

OpenGL: Texturing a cube.

Hi, Recently I have been looking into OpenGL, and I've got up to the stage were I want to texture things. I thought I would start with texturing a simple cube. I currently have this code, and understand fully how it works: #include <glut.h> #define WINDOW_WIDTH 400 #define WINDOW_HEIGHT 400 float angle = 30.0f; void Draw() { glLoa...

What's the point of a system registry?

Sorry for being really ignorant here, I just want to learn, why is the registry needed for programs? What's it for and why can't software just write variables to their own local files? Does it do something I'm not aware of? ...

Noob question (Java): problem with simple battleship game

Hello. I have a problem with this code: import java.util.Random; public class DotComObjects { public int[][] setBarcos(int tablero[][]) { boolean repetido; //Variable booleana para comprobar si una casilla ya esta ocupada por otro barco do { repetido = false; //Suponesmos que no esta ocupada ninguna de las casillas Rand...

SimpleModal OSX Style

At the moment i have this code: <!-- modal content --> <div id="osx-modal-content-1"> <div id="osx-modal-title">OSX Style Modal Dialog</div> <div class="close"><a href="#" class="simplemodal-close">x</a></div> <div id="osx-modal-data"> <h2>Hello! I'm SimpleModal!</h2> <p>SimpleModal is a lightweight jQuery Plugin w...

Best article about how to use jQTouch .

I want to use jQTouch on my project, but I can't find many examples. So do you know some website which has many jQTouch examples. Thanks ...

Why is this code running before the 'click' event?

Hello, I have what seems to be a simple issue. I have a jquery function that's running on page load, despite the fact that I specifically set it to run after the 'click' event on a specific element. This is the function: $('#boxShow').click(function() { $('#colorBox').animate({ height: 'toggle' }, 400, functio...

Python: "global name 'time' is not defined"

I'm writing a silly program in python for a friend that prints "We are the knights who say 'Ni'!". then sleeps for 3 seconds, and then prints "Ni!" twenty times at random intervals using the random module's uniform() method. Here's my code: from time import sleep import random def knights_of_ni(): generator = random.Random() pr...

How Do I make this SimpleModal to onLoad??

Hi, How do I make this SimpleModal script to load when the page loaded instead of clicking the button? Thank You =) < div id='basic-modal' > <a href='#' class='basic'>Demo</a> </div> Basic Modal Dialog For this demo, SimpleModal is using this "hidden" data for its content. You can also populate the m...

php simple xml parse problem on invalid tags

how can i parse element like this example <?php $xmlstr = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> <actor:view id='44' /> </character> <character> <name>Mr. Coder</name>...

Simple XML - How to select all elements which have a specific attribute value

A user can select a performance, so the performance elements have unique ID's. I want to basically say: Select all reservations->reservation['seat'] FROM performances->performance['id=2']. Hope that makes sense, I really am struggling with selections in simple XML. Thanks in advance, Henry. <performances> <perform...

Craigslist, CURL, Simple PHP DOM Issues

I am logging into Craigslist with CURL to scrape the status of my posted listings. The problem I encounter is the transfer of HTML from CURL $output to file_get_html. While Craigslist statuses are actually nested inside TR elements, I just wanted to test the most basic functions to see if things were getting passed through (i.e. link s...