I have a very custom template, and it works great if there are 1 or 2 posts on the blog page. But as soon as a 3rd post is added, it alters the structure of the template... Literally moves a div inside of another and I can not understand why. The code for the blog template is here, and a screenshot of the structure as it should be and an...
So below I have a code in C++ that is supposed to invert the arguments in a vector, but not the sequence. I have listed my problems as sidenotes in the code below. The invert function is supposed to invert each argument, and then the main function just outputs the inverted words in same order
For instance, program("one two three four")=...
I was looking to create a boolean test for a number when it is 10, 20, 30, 40. This would be used in a loop, 1 to 100. ParseInt seems a bit part but was wondering what a method for a true or false answer maybe.
...
Iterating though an array isn’t a problem but what if I only wanted to incremented only when the method is called?
Im not even sure if this would work but is there an easier way of doing this
int counter;
string[] myArray = {"foo", "bar", "something", "else", "here"};
private string GetNext()
{
string myValue ...
I'd like to have something similar to the following pseudo code:
while input is not None and timer < 5:
input = getChar()
timer = time.time() - start
if timer >= 5:
print "took too long"
else:
print input
Anyway to do this without threading? I would like an input method that returns whatever has been entered since the...
Hello.
Straight to the point:
I have this javascript:
for(item=1;item<5;item++)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",'zzz.php', true);
xmlhttp.send();
}
And in PHP file something like this:
usleep(5);die('ok');
Now the problem is javascript seems to be waiting for each ajax call to be completed before send...
My primary question is:
Is this alot of loops?
while ($decimals < 50000 and $remainder != "0") {
$number = floor($remainder/$currentdivider); //Always round down! 10/3 =3, 10/7 = 1
$remainder = $remainder%$currentdivider; // 10%3 =1, 10%1
$thisnumber = $thisnumber . $number;
$remainder = $remainder . 0; //10
$decimals += 1;
}
Or could...
I have a view with a div that is looped many times. Each of the created divs need to have a unique ID so I can access them specifically (at the moment, all my divs have the same ID specified in html so whenever I try to access a specific div it just finds the first one).
This is the version that I currently have (multiple 'rowBox'es are...
Consider the following example:
#include <iostream>
#include <sstream>
#include <vector>
#include <wchar.h>
#include <stdlib.h>
using namespace std;
struct odp {
int f;
wchar_t* pstr;
};
int main()
{
vector<odp> vec;
ostringstream ss;
wchar_t base[5];
wcscpy_s(base, L"1234");
for (int i = 0; i < 4; i++)...
I'm working on a real frankensite here not of my own design. There's a rudimentary CMS and one of the pages shows customer records from a MySQL DB.
For some reason, it has no probs picking up the data from the DB - there's no duplicate records - but it renders each row twice.
<?php
$limit = 500;
$area = 'customers_list';
$prc = 'custom...
Array
(
[0] => Array
(
[auth_id] => 1
[auth_section] => Client Data Base
[auth_parent_id] => 0
[auth_admin] => 1
[sub] => Array
(
[0] => Array
(
[auth_id] => 2
...
I'm making a IRC client using LUA. I'm using the the libraries that came with "Lua for Windows ". So I'm using luasocket for the comms and IUP for the UI bits.
The problem I'm having is that I'm getting stuck in a loop when I read the IO. I tried the timer in IUP but that didn't seem to work.
I'm was looking for a way to delay the IO r...
Thank you for your help.
My code looks like:
var CatItems = "";
for(var x=0; x < data.PRODUCTS.length; x++) {
if (x % 3 === 0) CatItems += '<li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-'+[x]+' jcarousel-item-'+[x]+'-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal">';
CatItems += '<div>...
Hi There,
I have a standard UL as follows:
<ul>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
</ul>
I am trying to find a quick & efficient way to calculate the combined with of all the LI tags. Currently I have:
var width = ...
I decided to do an image to explain this better, I just want to check my thinking is ok, and that I can reduce total permutations by 75%:
...
I have been tasked with sifting through the worst classic asp spaghetti i've ever come across.
The script runs a series of recordsets in sequence, getting 1 record at a time. As the record is built it takes the id and passes it to the next loop, which gets data, and passes on the id to the next loop. It then continues in this manner and...
I have a script that loops through a database for images to convert with gd & imagick.
I unset or replace all variables and objects in between each loop.
For each loop, get_memory_usage(1) reveals a concurrent amount of memory used by that script. Which is expected.
But, when I run "top", the %MEM column reports that this script, (sam...
I have a WPF application that calls an API to operate a device (a scanner). This API is COM based, and internally has a hidden window that the scanner sends messsages too. The intent of the API is to turn those windows messages into COM events. The problem is that the WPF application doesn't have a message pump, and therefore none of the...
Good Day Gurus,
I am trying to concatenate clobs in a PL/SQL loop and it has been returning null whilst when using DBMS_OUTPUT prints out the loop values and when executing each result of the clobs gives an output as well.
The system is meant to execute an already stored SQL in a table based on the report name passed into it. This part...
I have a third party api, which has a class that returns an enumerator for different items in the class.
I need to remove an item in that enumerator, so I cannot use "for each". Only option I can think of is to get the count by iterating over the enum and then run a normal for loop to remove the items.
Anyone know of a way to avoid the...