Hi!
Is there a straightforward way of determining the number of decimal places in a(n) integer/double value in PHP? (that is, without using explode)
Thanks,
Erwin
Hi,
I do have two buttons
'btnPrev' and 'btnNext'
What I want to do is to be able to determine the number of clicks of the button so that I could enable and disable them. The process is almost similar to 'paging' method.
Initial state: btnPrev - disabled, btnNext - enabled
1st Click (btnNext): btnPrev - enabled, btnNext - enabled
2nd Click (btnNext): btnPrev - enabled, btnNext - enabled
3rd Click (btnNext): btnPrev - enabled, btnNext - disabled
the idea is almost the same vice-versa (for btnPrev)
any suggestions how to do it?
I'm using a jQuery plugin called InfiniteScroll (https://github.com/paulirish/infinite-scroll) and I have a URL with this pattern: '/category/2/', when I paged the result I use the following pattern: "/category/2?page=2".
When Infinite Scroll makes de request, he increments the wrong number, in the case above, the request is: "/category/3?page=2" in place of "/category/2?page=3".
Anyone knows how workaround this?
In the following short program:
use Template;
my $template = Template->new (INCLUDE_PATH => ".");
$template->process ("non-existent-file")
or die $template->error ();
why does "die" not produce a line number and newline? Output looks like this:
$ perl template.pl
file error - non-existent-file: not found ~ 503 $
Is there a limit to the maximum number of concurrent users connected to SQL Server 2008? I am guessing computer resources determine that limit (if it exists), but I am also wondering if there is a theoretical limit. I have tried googling the answer, but all the information I have found is based upon earlier versions of SQL Server. If there is a limit, does it apply to just a database or a SQL Server instance?
My JSON looks like this:
{
"[email protected]":"Person1",
"[email protected]":"Person65",
"[email protected]":"Person24"
}
It's returned in various number of elements, and various keys. How do I traverse the data if my code is like this:
$.post("includes/ajax.php", {
group_id : $('#group').val()
}, function(data) {
//how do i traverse data here?
}, "json");
Any help will be appreciated :)
Thanks!
Hi i am Dhananjay,
I need to keep track of the number of visitors to a web page.
I have planned like this: on load of the home page, I will call a javascript callCounter();
From javascript, I need then to call an action and update a record in database.
Please help me with this.
How do i call the action?
I should be in the same home jsp after updating database.
Thanks in advance,
Dhananjay
I have two buttons
'btnPrev' and 'btnNext'
What I want to do is to be able to determine the number of clicks of the button so that I could enable and disable them. The process is almost similar to 'paging' method.
Initial state: btnPrev - disabled, btnNext - enabled
1st Click (btnNext): btnPrev - enabled, btnNext - enabled
2nd Click (btnNext): btnPrev - enabled, btnNext - enabled
3rd Click (btnNext): btnPrev - enabled, btnNext - disabled
the idea is almost the same vice-versa (for btnPrev).
I need to use VBA to determine the number of arguments passed to an Excel formula. For instance, suppose a cell contains the formula =MyFunc($A$1, "xyz", SUM(1,2,COUNT(C1:C12)), IF(B12,1,0)). Then the counter function should return 4. Does VBA contain any built-in functions for this, or does someone have an example of a regular expression that could calculate this?
Hi,
I'm trying to figure out how I can convert a number between 1 and 50 to a greyscale color that could be used here:
g.setColor(MyGreyScaleColour);
1 would be lightest (white) and 50 would be darkest (black).
e.g.
Color intToCol(int colNum)
{
code here
}
Any suggestions?
Hello,
I would like a regular expression in this format. It Must match one of the following formats:
* (###)###-####
* ###-###-####
* ###.###.####
* ##########
Strip all whitespace. Make sure it's a valid phone number, then (if necessary) translate it to the first format listed above.
I am using C and Grand Central Dispatch to parallelize some heavy computations. How can I get the number of threads used by GCD? Also is it possible to know on which thread a piece of code is currently running on? Basically I'd like to use sprng (parallel random numbers) with multiple streams and for that I need to know what stream id to use (and therefore what thread is being used).
I'm developing a simple web application where in I need to display number a to my users in string format.
Example:
12 - One Two or Twelve
-20 - minus Two zero or minus twenty
Either way is fine. I need this to be done in PHP. Any help will be appreciated.
I'm trying to get a very simple Flash video working using SWFembed, and it does work across multiple computers at this point in multiple browsers, but as soon as I pushed it live I got this:
http://cl.ly/1EDS
I've adjusted file permissions, but it is exactly the same code and files as in another directory on the server. I've seen this a few times (green box with version number), but have not been able to find any reference to it online.
Thanks for any suggestions in advance!
how can i extend the singleton pattern to a number of objects for a class i.e. how can i have only 5 objects of a class at max and not more than that in ruby
How can I display a number in the marker on a google map? I want to do server side clustering and I need to display how many points the cluster represents.
I am trying to get to grips with BDD web development in Ruby using cucumber + capybara and I am stuck at what should be an easy task - just to check the number of rows in a table. Something along the lines of:
page.should have_xpath("//table[@id='myTable']")
find("//table[@id='myTable']/tr").length.should = 3
But this doesn't work and I can't find a way to assert against the table length.
Any ideas anyone (please be easy on me tho' I'm a ruby nooby)
Thanks in advance
Neil
I know how to do it mathematically, but i want it now to do it in c++ using some easy algorithm. Is is possible ?
The question is that i need some methods/ideas for writing a number N in basis M, for ex. 14 in basis 3 = 2*(3^0) + 1*(3^1) + 1*(3^2) etc.
Hi
I am calculating yhe number of days between
from and to date
if from date is 13/04/2010 and the To date is 15/04/2010
The result must be 2 how to get the result using javascript
I am trying to get the total count for the phone numbers listed in the AddressBook, in all groups as a whole.
I can successfully retrieve Person count and Group count, just not the total number of Phone Numbers.
ABAddressBookRef m_addressbook = ABAddressBookCreate();
CFIndex nPeople = ABAddressBookGetPersonCount(m_addressbook);
CFIndex nGroups = ABAddressBookGetGroupCount(m_addressbook);
I have hierarchical data that I represent using the adjacency list model.
TABLE
ID
parentID
title
I am wondering, what is the simplest way to SELECT the number of immediate children for each node? If possible, I'd like to do this in a single select, yielding a resultset like so...
RESULTS...
ID title childCount
1 test1 10
2 test2 2
3 test3 0
etc...
Thanks for your advice!
Hi,
I was puzzled with one of the question in Microsoft interview which is as given below:
A function should accept a range( 3 - 21 ) and it should print all the consecutive numbers combination's to form each number as given below:
3=1+2
5=2+3
6=1+2+3
7=3+4
9=4+5
10=1+2+3+4
11=5+6
13=6+7
15=1+2+3+4+5
17=7+8
19=8+9
21=10+11
21=1+2+3+4+5+6
could you please help me in forming this sequence in C#?
Thanks,
Mahesh
I'm adding GeoIP tracking to WCF Web Service using MaxMinds' GeoIP Lite Country. All works well for their IPv4 database but they don't give any samples to calculate an IPv6 IP Number. I've contacted them and they said to use a search engine.
Anyone have a sample they're willing to share? Any language will do.